From b606bdd0e05c7cee3863be4b0493a9e32146be4a Mon Sep 17 00:00:00 2001 From: Ross Blair Date: Mon, 27 Mar 2023 16:51:23 -0500 Subject: [PATCH 01/33] add checks that can occur after dataset walk to allow for hed validation. Add hed validator dep built from current master. --- .../src/deps/hed-validator/index.js | 23919 ++++++++++++++++ .../src/deps/hed-validator/index.js.map | 7 + bids-validator/src/types/check.ts | 11 +- bids-validator/src/validators/bids.ts | 13 +- bids-validator/src/validators/hed.ts | 67 + 5 files changed, 24012 insertions(+), 5 deletions(-) create mode 100644 bids-validator/src/deps/hed-validator/index.js create mode 100644 bids-validator/src/deps/hed-validator/index.js.map create mode 100644 bids-validator/src/validators/hed.ts diff --git a/bids-validator/src/deps/hed-validator/index.js b/bids-validator/src/deps/hed-validator/index.js new file mode 100644 index 000000000..dd45fcd8b --- /dev/null +++ b/bids-validator/src/deps/hed-validator/index.js @@ -0,0 +1,23919 @@ +var __create = Object.create +var __defProp = Object.defineProperty +var __getOwnPropDesc = Object.getOwnPropertyDescriptor +var __getOwnPropNames = Object.getOwnPropertyNames +var __getProtoOf = Object.getPrototypeOf +var __hasOwnProp = Object.prototype.hasOwnProperty +var __defNormalProp = (obj, key, value) => + key in obj + ? __defProp(obj, key, { + enumerable: true, + configurable: true, + writable: true, + value, + }) + : (obj[key] = value) +var __require = /* @__PURE__ */ ((x) => + typeof require !== 'undefined' + ? require + : typeof Proxy !== 'undefined' + ? new Proxy(x, { + get: (a, b) => (typeof require !== 'undefined' ? require : a)[b], + }) + : x)(function (x) { + if (typeof require !== 'undefined') return require.apply(this, arguments) + throw new Error('Dynamic require of "' + x + '" is not supported') +}) +var __esm = (fn, res) => + function __init() { + return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])((fn = 0))), res + } +var __commonJS = (cb, mod) => + function __require2() { + return ( + mod || + (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), + mod.exports + ) + } +var __copyProps = (to, from, except, desc) => { + if ((from && typeof from === 'object') || typeof from === 'function') { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { + get: () => from[key], + enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable, + }) + } + return to +} +var __toESM = (mod, isNodeMode, target) => ( + (target = mod != null ? __create(__getProtoOf(mod)) : {}), + __copyProps( + isNodeMode || !mod || !mod.__esModule + ? __defProp(target, 'default', { value: mod, enumerable: true }) + : target, + mod, + ) +) +var __publicField = (obj, key, value) => { + __defNormalProp(obj, typeof key !== 'symbol' ? key + '' : key, value) + return value +} + +// +var define_process_default +var init_define_process = __esm({ + ''() { + define_process_default = { + env: {}, + argv: [], + stdout: '', + stderr: '', + stdin: '', + version: 'v12.14.1', + } + }, +}) + +// node_modules/date-and-time/date-and-time.js +var require_date_and_time = __commonJS({ + 'node_modules/date-and-time/date-and-time.js'(exports, module) { + init_define_process() + ;(function (global2) { + 'use strict' + var date2 = {}, + locales = {}, + plugins = {}, + lang = 'en', + _res = { + MMMM: [ + 'January', + 'February', + 'March', + 'April', + 'May', + 'June', + 'July', + 'August', + 'September', + 'October', + 'November', + 'December', + ], + MMM: [ + 'Jan', + 'Feb', + 'Mar', + 'Apr', + 'May', + 'Jun', + 'Jul', + 'Aug', + 'Sep', + 'Oct', + 'Nov', + 'Dec', + ], + dddd: [ + 'Sunday', + 'Monday', + 'Tuesday', + 'Wednesday', + 'Thursday', + 'Friday', + 'Saturday', + ], + ddd: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], + dd: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'], + A: ['AM', 'PM'], + }, + _formatter = { + YYYY: function (d) { + return ('000' + d.getFullYear()).slice(-4) + }, + YY: function (d) { + return ('0' + d.getFullYear()).slice(-2) + }, + Y: function (d) { + return '' + d.getFullYear() + }, + MMMM: function (d) { + return this.res.MMMM[d.getMonth()] + }, + MMM: function (d) { + return this.res.MMM[d.getMonth()] + }, + MM: function (d) { + return ('0' + (d.getMonth() + 1)).slice(-2) + }, + M: function (d) { + return '' + (d.getMonth() + 1) + }, + DD: function (d) { + return ('0' + d.getDate()).slice(-2) + }, + D: function (d) { + return '' + d.getDate() + }, + HH: function (d) { + return ('0' + d.getHours()).slice(-2) + }, + H: function (d) { + return '' + d.getHours() + }, + A: function (d) { + return this.res.A[(d.getHours() > 11) | 0] + }, + hh: function (d) { + return ('0' + (d.getHours() % 12 || 12)).slice(-2) + }, + h: function (d) { + return '' + (d.getHours() % 12 || 12) + }, + mm: function (d) { + return ('0' + d.getMinutes()).slice(-2) + }, + m: function (d) { + return '' + d.getMinutes() + }, + ss: function (d) { + return ('0' + d.getSeconds()).slice(-2) + }, + s: function (d) { + return '' + d.getSeconds() + }, + SSS: function (d) { + return ('00' + d.getMilliseconds()).slice(-3) + }, + SS: function (d) { + return ('0' + ((d.getMilliseconds() / 10) | 0)).slice(-2) + }, + S: function (d) { + return '' + ((d.getMilliseconds() / 100) | 0) + }, + dddd: function (d) { + return this.res.dddd[d.getDay()] + }, + ddd: function (d) { + return this.res.ddd[d.getDay()] + }, + dd: function (d) { + return this.res.dd[d.getDay()] + }, + Z: function (d) { + return d.utc ? '+0000' : /[\+-]\d{4}/.exec(d.toTimeString())[0] + }, + post: function (str) { + return str + }, + }, + _parser = { + YYYY: function (str) { + return this.exec(/^\d{4}/, str) + }, + Y: function (str) { + return this.exec(/^\d{1,4}/, str) + }, + MMMM: function (str) { + var result = this.find(this.res.MMMM, str) + result.value++ + return result + }, + MMM: function (str) { + var result = this.find(this.res.MMM, str) + result.value++ + return result + }, + MM: function (str) { + return this.exec(/^\d\d/, str) + }, + M: function (str) { + return this.exec(/^\d\d?/, str) + }, + DD: function (str) { + return this.exec(/^\d\d/, str) + }, + D: function (str) { + return this.exec(/^\d\d?/, str) + }, + HH: function (str) { + return this.exec(/^\d\d/, str) + }, + H: function (str) { + return this.exec(/^\d\d?/, str) + }, + A: function (str) { + return this.find(this.res.A, str) + }, + hh: function (str) { + return this.exec(/^\d\d/, str) + }, + h: function (str) { + return this.exec(/^\d\d?/, str) + }, + mm: function (str) { + return this.exec(/^\d\d/, str) + }, + m: function (str) { + return this.exec(/^\d\d?/, str) + }, + ss: function (str) { + return this.exec(/^\d\d/, str) + }, + s: function (str) { + return this.exec(/^\d\d?/, str) + }, + SSS: function (str) { + return this.exec(/^\d{1,3}/, str) + }, + SS: function (str) { + var result = this.exec(/^\d\d?/, str) + result.value *= 10 + return result + }, + S: function (str) { + var result = this.exec(/^\d/, str) + result.value *= 100 + return result + }, + Z: function (str) { + var result = this.exec(/^[\+-]\d{2}[0-5]\d/, str) + result.value = + ((result.value / 100) | 0) * -60 - (result.value % 100) + return result + }, + h12: function (h, a) { + return (h === 12 ? 0 : h) + a * 12 + }, + exec: function (re, str) { + var result = (re.exec(str) || [''])[0] + return { value: result | 0, length: result.length } + }, + find: function (array, str) { + var index = -1, + length = 0 + for (var i = 0, len = array.length, item; i < len; i++) { + item = array[i] + if (!str.indexOf(item) && item.length > length) { + index = i + length = item.length + } + } + return { value: index, length } + }, + pre: function (str) { + return str + }, + }, + customize = function (code, base, locale) { + var extend = function (proto, props, res) { + var Locale = function (r) { + if (r) { + this.res = r + } + } + Locale.prototype = proto + Locale.prototype.constructor = Locale + var newLocale = new Locale(res), + value + for (var key in props || {}) { + value = props[key] + newLocale[key] = value.slice ? value.slice() : value + } + return newLocale + }, + loc = { res: extend(base.res, locale.res) } + loc.formatter = extend(base.formatter, locale.formatter, loc.res) + loc.parser = extend(base.parser, locale.parser, loc.res) + locales[code] = loc + } + date2.compile = function (formatString) { + var re = /\[([^\[\]]|\[[^\[\]]*])*]|([A-Za-z])\2+|\.{3}|./g, + keys, + pattern = [formatString] + while ((keys = re.exec(formatString))) { + pattern[pattern.length] = keys[0] + } + return pattern + } + date2.format = function (dateObj, arg, utc) { + var pattern = typeof arg === 'string' ? date2.compile(arg) : arg, + d = date2.addMinutes(dateObj, utc ? dateObj.getTimezoneOffset() : 0), + formatter = locales[lang].formatter, + str = '' + d.utc = utc || false + for (var i = 1, len = pattern.length, token; i < len; i++) { + token = pattern[i] + str += formatter[token] + ? formatter.post(formatter[token](d, pattern[0])) + : token.replace(/\[(.*)]/, '$1') + } + return str + } + date2.preparse = function (dateString, arg) { + var pattern = typeof arg === 'string' ? date2.compile(arg) : arg, + dt = { + Y: 1970, + M: 1, + D: 1, + H: 0, + A: 0, + h: 0, + m: 0, + s: 0, + S: 0, + Z: 0, + _index: 0, + _length: 0, + _match: 0, + }, + comment = /\[(.*)]/, + parser = locales[lang].parser, + offset = 0 + dateString = parser.pre(dateString) + for (var i = 1, len = pattern.length, token, result; i < len; i++) { + token = pattern[i] + if (parser[token]) { + result = parser[token](dateString.slice(offset), pattern[0]) + if (!result.length) { + break + } + offset += result.length + dt[token.charAt(0)] = result.value + dt._match++ + } else if (token === dateString.charAt(offset) || token === ' ') { + offset++ + } else if ( + comment.test(token) && + !dateString.slice(offset).indexOf(comment.exec(token)[1]) + ) { + offset += token.length - 2 + } else if (token === '...') { + offset = dateString.length + break + } else { + break + } + } + dt.H = dt.H || parser.h12(dt.h, dt.A) + dt._index = offset + dt._length = dateString.length + return dt + } + date2.isValid = function (arg1, arg2) { + var dt = typeof arg1 === 'string' ? date2.preparse(arg1, arg2) : arg1, + last = [ + 31, + (28 + date2.isLeapYear(dt.Y)) | 0, + 31, + 30, + 31, + 30, + 31, + 31, + 30, + 31, + 30, + 31, + ][dt.M - 1] + return !( + dt._index < 1 || + dt._length < 1 || + dt._index - dt._length || + dt._match < 1 || + dt.Y < 1 || + dt.Y > 9999 || + dt.M < 1 || + dt.M > 12 || + dt.D < 1 || + dt.D > last || + dt.H < 0 || + dt.H > 23 || + dt.m < 0 || + dt.m > 59 || + dt.s < 0 || + dt.s > 59 || + dt.S < 0 || + dt.S > 999 || + dt.Z < -720 || + dt.Z > 840 + ) + } + date2.parse = function (dateString, arg, utc) { + var dt = date2.preparse(dateString, arg) + if (date2.isValid(dt)) { + dt.M -= dt.Y < 100 ? 22801 : 1 + if (utc || dt.Z) { + return new Date( + Date.UTC(dt.Y, dt.M, dt.D, dt.H, dt.m + dt.Z, dt.s, dt.S), + ) + } + return new Date(dt.Y, dt.M, dt.D, dt.H, dt.m, dt.s, dt.S) + } + return new Date(NaN) + } + date2.transform = function (dateString, arg1, arg2, utc) { + return date2.format(date2.parse(dateString, arg1), arg2, utc) + } + date2.addYears = function (dateObj, years) { + return date2.addMonths(dateObj, years * 12) + } + date2.addMonths = function (dateObj, months) { + var d = new Date(dateObj.getTime()) + d.setMonth(d.getMonth() + months) + return d + } + date2.addDays = function (dateObj, days) { + var d = new Date(dateObj.getTime()) + d.setDate(d.getDate() + days) + return d + } + date2.addHours = function (dateObj, hours) { + return date2.addMinutes(dateObj, hours * 60) + } + date2.addMinutes = function (dateObj, minutes) { + return date2.addSeconds(dateObj, minutes * 60) + } + date2.addSeconds = function (dateObj, seconds) { + return date2.addMilliseconds(dateObj, seconds * 1e3) + } + date2.addMilliseconds = function (dateObj, milliseconds) { + return new Date(dateObj.getTime() + milliseconds) + } + date2.subtract = function (date1, date22) { + var delta = date1.getTime() - date22.getTime() + return { + toMilliseconds: function () { + return delta + }, + toSeconds: function () { + return delta / 1e3 + }, + toMinutes: function () { + return delta / 6e4 + }, + toHours: function () { + return delta / 36e5 + }, + toDays: function () { + return delta / 864e5 + }, + } + } + date2.isLeapYear = function (y) { + return (!(y % 4) && !!(y % 100)) || !(y % 400) + } + date2.isSameDay = function (date1, date22) { + return date1.toDateString() === date22.toDateString() + } + date2.locale = function (code, locale) { + if (locale) { + customize( + code, + { res: _res, formatter: _formatter, parser: _parser }, + locale, + ) + } else if (typeof code === 'function') { + lang = code(date2) + } else if (code) { + if (global2 && !global2.date) { + console.warn( + 'This method of changing the locale is deprecated. See documentation for details.', + ) + } + lang = code + } + return lang + } + date2.extend = function (extension) { + var extender = extension.extender || {} + for (var key in extender) { + if (!date2[key]) { + date2[key] = extender[key] + } + } + if (extension.formatter || extension.parser || extension.res) { + customize(lang, locales[lang], extension) + } + } + date2.plugin = function (plugin, extension) { + if (typeof plugin === 'function') { + date2.extend(plugins[plugin(date2)]) + } else { + plugins[plugin] = plugins[plugin] || extension + if (!extension && plugins[plugin]) { + date2.extend(plugins[plugin]) + if (global2 && !global2.date) { + console.warn( + 'This method of applying plugins is deprecated. See documentation for details.', + ) + } + } + } + } + date2.locale(lang, {}) + if (typeof module === 'object' && typeof module.exports === 'object') { + module.exports = date2 + } else if (typeof define === 'function' && define.amd) { + define([], function () { + return date2 + }) + } else { + global2.date = date2 + } + })(exports) + }, +}) + +// node_modules/xml2js/lib/defaults.js +var require_defaults = __commonJS({ + 'node_modules/xml2js/lib/defaults.js'(exports) { + init_define_process() + ;(function () { + exports.defaults = { + 0.1: { + explicitCharkey: false, + trim: true, + normalize: true, + normalizeTags: false, + attrkey: '@', + charkey: '#', + explicitArray: false, + ignoreAttrs: false, + mergeAttrs: false, + explicitRoot: false, + validator: null, + xmlns: false, + explicitChildren: false, + childkey: '@@', + charsAsChildren: false, + includeWhiteChars: false, + async: false, + strict: true, + attrNameProcessors: null, + attrValueProcessors: null, + tagNameProcessors: null, + valueProcessors: null, + emptyTag: '', + }, + 0.2: { + explicitCharkey: false, + trim: false, + normalize: false, + normalizeTags: false, + attrkey: '$', + charkey: '_', + explicitArray: true, + ignoreAttrs: false, + mergeAttrs: false, + explicitRoot: true, + validator: null, + xmlns: false, + explicitChildren: false, + preserveChildrenOrder: false, + childkey: '$$', + charsAsChildren: false, + includeWhiteChars: false, + async: false, + strict: true, + attrNameProcessors: null, + attrValueProcessors: null, + tagNameProcessors: null, + valueProcessors: null, + rootName: 'root', + xmldec: { + version: '1.0', + encoding: 'UTF-8', + standalone: true, + }, + doctype: null, + renderOpts: { + pretty: true, + indent: ' ', + newline: '\n', + }, + headless: false, + chunkSize: 1e4, + emptyTag: '', + cdata: false, + }, + } + }.call(exports)) + }, +}) + +// node_modules/xmlbuilder/lib/Utility.js +var require_Utility = __commonJS({ + 'node_modules/xmlbuilder/lib/Utility.js'(exports, module) { + init_define_process() + ;(function () { + var assign, + getValue, + isArray, + isEmpty, + isFunction, + isObject, + isPlainObject, + slice = [].slice, + hasProp = {}.hasOwnProperty + assign = function () { + var i, key, len, source, sources, target + ;(target = arguments[0]), + (sources = 2 <= arguments.length ? slice.call(arguments, 1) : []) + if (isFunction(Object.assign)) { + Object.assign.apply(null, arguments) + } else { + for (i = 0, len = sources.length; i < len; i++) { + source = sources[i] + if (source != null) { + for (key in source) { + if (!hasProp.call(source, key)) continue + target[key] = source[key] + } + } + } + } + return target + } + isFunction = function (val) { + return ( + !!val && Object.prototype.toString.call(val) === '[object Function]' + ) + } + isObject = function (val) { + var ref + return !!val && ((ref = typeof val) === 'function' || ref === 'object') + } + isArray = function (val) { + if (isFunction(Array.isArray)) { + return Array.isArray(val) + } else { + return Object.prototype.toString.call(val) === '[object Array]' + } + } + isEmpty = function (val) { + var key + if (isArray(val)) { + return !val.length + } else { + for (key in val) { + if (!hasProp.call(val, key)) continue + return false + } + return true + } + } + isPlainObject = function (val) { + var ctor, proto + return ( + isObject(val) && + (proto = Object.getPrototypeOf(val)) && + (ctor = proto.constructor) && + typeof ctor === 'function' && + ctor instanceof ctor && + Function.prototype.toString.call(ctor) === + Function.prototype.toString.call(Object) + ) + } + getValue = function (obj) { + if (isFunction(obj.valueOf)) { + return obj.valueOf() + } else { + return obj + } + } + module.exports.assign = assign + module.exports.isFunction = isFunction + module.exports.isObject = isObject + module.exports.isArray = isArray + module.exports.isEmpty = isEmpty + module.exports.isPlainObject = isPlainObject + module.exports.getValue = getValue + }.call(exports)) + }, +}) + +// node_modules/xmlbuilder/lib/XMLDOMImplementation.js +var require_XMLDOMImplementation = __commonJS({ + 'node_modules/xmlbuilder/lib/XMLDOMImplementation.js'(exports, module) { + init_define_process() + ;(function () { + var XMLDOMImplementation + module.exports = XMLDOMImplementation = (function () { + function XMLDOMImplementation2() {} + XMLDOMImplementation2.prototype.hasFeature = function ( + feature, + version, + ) { + return true + } + XMLDOMImplementation2.prototype.createDocumentType = function ( + qualifiedName, + publicId, + systemId, + ) { + throw new Error('This DOM method is not implemented.') + } + XMLDOMImplementation2.prototype.createDocument = function ( + namespaceURI, + qualifiedName, + doctype, + ) { + throw new Error('This DOM method is not implemented.') + } + XMLDOMImplementation2.prototype.createHTMLDocument = function (title) { + throw new Error('This DOM method is not implemented.') + } + XMLDOMImplementation2.prototype.getFeature = function ( + feature, + version, + ) { + throw new Error('This DOM method is not implemented.') + } + return XMLDOMImplementation2 + })() + }.call(exports)) + }, +}) + +// node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js +var require_XMLDOMErrorHandler = __commonJS({ + 'node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js'(exports, module) { + init_define_process() + ;(function () { + var XMLDOMErrorHandler + module.exports = XMLDOMErrorHandler = (function () { + function XMLDOMErrorHandler2() {} + XMLDOMErrorHandler2.prototype.handleError = function (error) { + throw new Error(error) + } + return XMLDOMErrorHandler2 + })() + }.call(exports)) + }, +}) + +// node_modules/xmlbuilder/lib/XMLDOMStringList.js +var require_XMLDOMStringList = __commonJS({ + 'node_modules/xmlbuilder/lib/XMLDOMStringList.js'(exports, module) { + init_define_process() + ;(function () { + var XMLDOMStringList + module.exports = XMLDOMStringList = (function () { + function XMLDOMStringList2(arr) { + this.arr = arr || [] + } + Object.defineProperty(XMLDOMStringList2.prototype, 'length', { + get: function () { + return this.arr.length + }, + }) + XMLDOMStringList2.prototype.item = function (index) { + return this.arr[index] || null + } + XMLDOMStringList2.prototype.contains = function (str) { + return this.arr.indexOf(str) !== -1 + } + return XMLDOMStringList2 + })() + }.call(exports)) + }, +}) + +// node_modules/xmlbuilder/lib/XMLDOMConfiguration.js +var require_XMLDOMConfiguration = __commonJS({ + 'node_modules/xmlbuilder/lib/XMLDOMConfiguration.js'(exports, module) { + init_define_process() + ;(function () { + var XMLDOMConfiguration, XMLDOMErrorHandler, XMLDOMStringList + XMLDOMErrorHandler = require_XMLDOMErrorHandler() + XMLDOMStringList = require_XMLDOMStringList() + module.exports = XMLDOMConfiguration = (function () { + function XMLDOMConfiguration2() { + var clonedSelf + this.defaultParams = { + 'canonical-form': false, + 'cdata-sections': false, + comments: false, + 'datatype-normalization': false, + 'element-content-whitespace': true, + entities: true, + 'error-handler': new XMLDOMErrorHandler(), + infoset: true, + 'validate-if-schema': false, + namespaces: true, + 'namespace-declarations': true, + 'normalize-characters': false, + 'schema-location': '', + 'schema-type': '', + 'split-cdata-sections': true, + validate: false, + 'well-formed': true, + } + this.params = clonedSelf = Object.create(this.defaultParams) + } + Object.defineProperty( + XMLDOMConfiguration2.prototype, + 'parameterNames', + { + get: function () { + return new XMLDOMStringList(Object.keys(this.defaultParams)) + }, + }, + ) + XMLDOMConfiguration2.prototype.getParameter = function (name) { + if (this.params.hasOwnProperty(name)) { + return this.params[name] + } else { + return null + } + } + XMLDOMConfiguration2.prototype.canSetParameter = function ( + name, + value, + ) { + return true + } + XMLDOMConfiguration2.prototype.setParameter = function (name, value) { + if (value != null) { + return (this.params[name] = value) + } else { + return delete this.params[name] + } + } + return XMLDOMConfiguration2 + })() + }.call(exports)) + }, +}) + +// node_modules/xmlbuilder/lib/NodeType.js +var require_NodeType = __commonJS({ + 'node_modules/xmlbuilder/lib/NodeType.js'(exports, module) { + init_define_process() + ;(function () { + module.exports = { + Element: 1, + Attribute: 2, + Text: 3, + CData: 4, + EntityReference: 5, + EntityDeclaration: 6, + ProcessingInstruction: 7, + Comment: 8, + Document: 9, + DocType: 10, + DocumentFragment: 11, + NotationDeclaration: 12, + Declaration: 201, + Raw: 202, + AttributeDeclaration: 203, + ElementDeclaration: 204, + Dummy: 205, + } + }.call(exports)) + }, +}) + +// node_modules/xmlbuilder/lib/XMLAttribute.js +var require_XMLAttribute = __commonJS({ + 'node_modules/xmlbuilder/lib/XMLAttribute.js'(exports, module) { + init_define_process() + ;(function () { + var NodeType, XMLAttribute, XMLNode + NodeType = require_NodeType() + XMLNode = require_XMLNode() + module.exports = XMLAttribute = (function () { + function XMLAttribute2(parent, name, value) { + this.parent = parent + if (this.parent) { + this.options = this.parent.options + this.stringify = this.parent.stringify + } + if (name == null) { + throw new Error('Missing attribute name. ' + this.debugInfo(name)) + } + this.name = this.stringify.name(name) + this.value = this.stringify.attValue(value) + this.type = NodeType.Attribute + this.isId = false + this.schemaTypeInfo = null + } + Object.defineProperty(XMLAttribute2.prototype, 'nodeType', { + get: function () { + return this.type + }, + }) + Object.defineProperty(XMLAttribute2.prototype, 'ownerElement', { + get: function () { + return this.parent + }, + }) + Object.defineProperty(XMLAttribute2.prototype, 'textContent', { + get: function () { + return this.value + }, + set: function (value) { + return (this.value = value || '') + }, + }) + Object.defineProperty(XMLAttribute2.prototype, 'namespaceURI', { + get: function () { + return '' + }, + }) + Object.defineProperty(XMLAttribute2.prototype, 'prefix', { + get: function () { + return '' + }, + }) + Object.defineProperty(XMLAttribute2.prototype, 'localName', { + get: function () { + return this.name + }, + }) + Object.defineProperty(XMLAttribute2.prototype, 'specified', { + get: function () { + return true + }, + }) + XMLAttribute2.prototype.clone = function () { + return Object.create(this) + } + XMLAttribute2.prototype.toString = function (options) { + return this.options.writer.attribute( + this, + this.options.writer.filterOptions(options), + ) + } + XMLAttribute2.prototype.debugInfo = function (name) { + name = name || this.name + if (name == null) { + return 'parent: <' + this.parent.name + '>' + } else { + return ( + 'attribute: {' + name + '}, parent: <' + this.parent.name + '>' + ) + } + } + XMLAttribute2.prototype.isEqualNode = function (node) { + if (node.namespaceURI !== this.namespaceURI) { + return false + } + if (node.prefix !== this.prefix) { + return false + } + if (node.localName !== this.localName) { + return false + } + if (node.value !== this.value) { + return false + } + return true + } + return XMLAttribute2 + })() + }.call(exports)) + }, +}) + +// node_modules/xmlbuilder/lib/XMLNamedNodeMap.js +var require_XMLNamedNodeMap = __commonJS({ + 'node_modules/xmlbuilder/lib/XMLNamedNodeMap.js'(exports, module) { + init_define_process() + ;(function () { + var XMLNamedNodeMap + module.exports = XMLNamedNodeMap = (function () { + function XMLNamedNodeMap2(nodes) { + this.nodes = nodes + } + Object.defineProperty(XMLNamedNodeMap2.prototype, 'length', { + get: function () { + return Object.keys(this.nodes).length || 0 + }, + }) + XMLNamedNodeMap2.prototype.clone = function () { + return (this.nodes = null) + } + XMLNamedNodeMap2.prototype.getNamedItem = function (name) { + return this.nodes[name] + } + XMLNamedNodeMap2.prototype.setNamedItem = function (node) { + var oldNode + oldNode = this.nodes[node.nodeName] + this.nodes[node.nodeName] = node + return oldNode || null + } + XMLNamedNodeMap2.prototype.removeNamedItem = function (name) { + var oldNode + oldNode = this.nodes[name] + delete this.nodes[name] + return oldNode || null + } + XMLNamedNodeMap2.prototype.item = function (index) { + return this.nodes[Object.keys(this.nodes)[index]] || null + } + XMLNamedNodeMap2.prototype.getNamedItemNS = function ( + namespaceURI, + localName, + ) { + throw new Error('This DOM method is not implemented.') + } + XMLNamedNodeMap2.prototype.setNamedItemNS = function (node) { + throw new Error('This DOM method is not implemented.') + } + XMLNamedNodeMap2.prototype.removeNamedItemNS = function ( + namespaceURI, + localName, + ) { + throw new Error('This DOM method is not implemented.') + } + return XMLNamedNodeMap2 + })() + }.call(exports)) + }, +}) + +// node_modules/xmlbuilder/lib/XMLElement.js +var require_XMLElement = __commonJS({ + 'node_modules/xmlbuilder/lib/XMLElement.js'(exports, module) { + init_define_process() + ;(function () { + var NodeType, + XMLAttribute, + XMLElement, + XMLNamedNodeMap, + XMLNode, + getValue, + isFunction, + isObject, + ref, + extend = function (child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) child[key] = parent[key] + } + function ctor() { + this.constructor = child + } + ctor.prototype = parent.prototype + child.prototype = new ctor() + child.__super__ = parent.prototype + return child + }, + hasProp = {}.hasOwnProperty + ;(ref = require_Utility()), + (isObject = ref.isObject), + (isFunction = ref.isFunction), + (getValue = ref.getValue) + XMLNode = require_XMLNode() + NodeType = require_NodeType() + XMLAttribute = require_XMLAttribute() + XMLNamedNodeMap = require_XMLNamedNodeMap() + module.exports = XMLElement = (function (superClass) { + extend(XMLElement2, superClass) + function XMLElement2(parent, name, attributes) { + var child, j, len, ref1 + XMLElement2.__super__.constructor.call(this, parent) + if (name == null) { + throw new Error('Missing element name. ' + this.debugInfo()) + } + this.name = this.stringify.name(name) + this.type = NodeType.Element + this.attribs = {} + this.schemaTypeInfo = null + if (attributes != null) { + this.attribute(attributes) + } + if (parent.type === NodeType.Document) { + this.isRoot = true + this.documentObject = parent + parent.rootObject = this + if (parent.children) { + ref1 = parent.children + for (j = 0, len = ref1.length; j < len; j++) { + child = ref1[j] + if (child.type === NodeType.DocType) { + child.name = this.name + break + } + } + } + } + } + Object.defineProperty(XMLElement2.prototype, 'tagName', { + get: function () { + return this.name + }, + }) + Object.defineProperty(XMLElement2.prototype, 'namespaceURI', { + get: function () { + return '' + }, + }) + Object.defineProperty(XMLElement2.prototype, 'prefix', { + get: function () { + return '' + }, + }) + Object.defineProperty(XMLElement2.prototype, 'localName', { + get: function () { + return this.name + }, + }) + Object.defineProperty(XMLElement2.prototype, 'id', { + get: function () { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + }, + }) + Object.defineProperty(XMLElement2.prototype, 'className', { + get: function () { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + }, + }) + Object.defineProperty(XMLElement2.prototype, 'classList', { + get: function () { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + }, + }) + Object.defineProperty(XMLElement2.prototype, 'attributes', { + get: function () { + if (!this.attributeMap || !this.attributeMap.nodes) { + this.attributeMap = new XMLNamedNodeMap(this.attribs) + } + return this.attributeMap + }, + }) + XMLElement2.prototype.clone = function () { + var att, attName, clonedSelf, ref1 + clonedSelf = Object.create(this) + if (clonedSelf.isRoot) { + clonedSelf.documentObject = null + } + clonedSelf.attribs = {} + ref1 = this.attribs + for (attName in ref1) { + if (!hasProp.call(ref1, attName)) continue + att = ref1[attName] + clonedSelf.attribs[attName] = att.clone() + } + clonedSelf.children = [] + this.children.forEach(function (child) { + var clonedChild + clonedChild = child.clone() + clonedChild.parent = clonedSelf + return clonedSelf.children.push(clonedChild) + }) + return clonedSelf + } + XMLElement2.prototype.attribute = function (name, value) { + var attName, attValue + if (name != null) { + name = getValue(name) + } + if (isObject(name)) { + for (attName in name) { + if (!hasProp.call(name, attName)) continue + attValue = name[attName] + this.attribute(attName, attValue) + } + } else { + if (isFunction(value)) { + value = value.apply() + } + if (this.options.keepNullAttributes && value == null) { + this.attribs[name] = new XMLAttribute(this, name, '') + } else if (value != null) { + this.attribs[name] = new XMLAttribute(this, name, value) + } + } + return this + } + XMLElement2.prototype.removeAttribute = function (name) { + var attName, j, len + if (name == null) { + throw new Error('Missing attribute name. ' + this.debugInfo()) + } + name = getValue(name) + if (Array.isArray(name)) { + for (j = 0, len = name.length; j < len; j++) { + attName = name[j] + delete this.attribs[attName] + } + } else { + delete this.attribs[name] + } + return this + } + XMLElement2.prototype.toString = function (options) { + return this.options.writer.element( + this, + this.options.writer.filterOptions(options), + ) + } + XMLElement2.prototype.att = function (name, value) { + return this.attribute(name, value) + } + XMLElement2.prototype.a = function (name, value) { + return this.attribute(name, value) + } + XMLElement2.prototype.getAttribute = function (name) { + if (this.attribs.hasOwnProperty(name)) { + return this.attribs[name].value + } else { + return null + } + } + XMLElement2.prototype.setAttribute = function (name, value) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLElement2.prototype.getAttributeNode = function (name) { + if (this.attribs.hasOwnProperty(name)) { + return this.attribs[name] + } else { + return null + } + } + XMLElement2.prototype.setAttributeNode = function (newAttr) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLElement2.prototype.removeAttributeNode = function (oldAttr) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLElement2.prototype.getElementsByTagName = function (name) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLElement2.prototype.getAttributeNS = function ( + namespaceURI, + localName, + ) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLElement2.prototype.setAttributeNS = function ( + namespaceURI, + qualifiedName, + value, + ) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLElement2.prototype.removeAttributeNS = function ( + namespaceURI, + localName, + ) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLElement2.prototype.getAttributeNodeNS = function ( + namespaceURI, + localName, + ) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLElement2.prototype.setAttributeNodeNS = function (newAttr) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLElement2.prototype.getElementsByTagNameNS = function ( + namespaceURI, + localName, + ) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLElement2.prototype.hasAttribute = function (name) { + return this.attribs.hasOwnProperty(name) + } + XMLElement2.prototype.hasAttributeNS = function ( + namespaceURI, + localName, + ) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLElement2.prototype.setIdAttribute = function (name, isId) { + if (this.attribs.hasOwnProperty(name)) { + return this.attribs[name].isId + } else { + return isId + } + } + XMLElement2.prototype.setIdAttributeNS = function ( + namespaceURI, + localName, + isId, + ) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLElement2.prototype.setIdAttributeNode = function (idAttr, isId) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLElement2.prototype.getElementsByTagName = function (tagname) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLElement2.prototype.getElementsByTagNameNS = function ( + namespaceURI, + localName, + ) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLElement2.prototype.getElementsByClassName = function (classNames) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLElement2.prototype.isEqualNode = function (node) { + var i, j, ref1 + if ( + !XMLElement2.__super__.isEqualNode + .apply(this, arguments) + .isEqualNode(node) + ) { + return false + } + if (node.namespaceURI !== this.namespaceURI) { + return false + } + if (node.prefix !== this.prefix) { + return false + } + if (node.localName !== this.localName) { + return false + } + if (node.attribs.length !== this.attribs.length) { + return false + } + for ( + i = j = 0, ref1 = this.attribs.length - 1; + 0 <= ref1 ? j <= ref1 : j >= ref1; + i = 0 <= ref1 ? ++j : --j + ) { + if (!this.attribs[i].isEqualNode(node.attribs[i])) { + return false + } + } + return true + } + return XMLElement2 + })(XMLNode) + }.call(exports)) + }, +}) + +// node_modules/xmlbuilder/lib/XMLCharacterData.js +var require_XMLCharacterData = __commonJS({ + 'node_modules/xmlbuilder/lib/XMLCharacterData.js'(exports, module) { + init_define_process() + ;(function () { + var XMLCharacterData, + XMLNode, + extend = function (child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) child[key] = parent[key] + } + function ctor() { + this.constructor = child + } + ctor.prototype = parent.prototype + child.prototype = new ctor() + child.__super__ = parent.prototype + return child + }, + hasProp = {}.hasOwnProperty + XMLNode = require_XMLNode() + module.exports = XMLCharacterData = (function (superClass) { + extend(XMLCharacterData2, superClass) + function XMLCharacterData2(parent) { + XMLCharacterData2.__super__.constructor.call(this, parent) + this.value = '' + } + Object.defineProperty(XMLCharacterData2.prototype, 'data', { + get: function () { + return this.value + }, + set: function (value) { + return (this.value = value || '') + }, + }) + Object.defineProperty(XMLCharacterData2.prototype, 'length', { + get: function () { + return this.value.length + }, + }) + Object.defineProperty(XMLCharacterData2.prototype, 'textContent', { + get: function () { + return this.value + }, + set: function (value) { + return (this.value = value || '') + }, + }) + XMLCharacterData2.prototype.clone = function () { + return Object.create(this) + } + XMLCharacterData2.prototype.substringData = function (offset, count) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLCharacterData2.prototype.appendData = function (arg) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLCharacterData2.prototype.insertData = function (offset, arg) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLCharacterData2.prototype.deleteData = function (offset, count) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLCharacterData2.prototype.replaceData = function ( + offset, + count, + arg, + ) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLCharacterData2.prototype.isEqualNode = function (node) { + if ( + !XMLCharacterData2.__super__.isEqualNode + .apply(this, arguments) + .isEqualNode(node) + ) { + return false + } + if (node.data !== this.data) { + return false + } + return true + } + return XMLCharacterData2 + })(XMLNode) + }.call(exports)) + }, +}) + +// node_modules/xmlbuilder/lib/XMLCData.js +var require_XMLCData = __commonJS({ + 'node_modules/xmlbuilder/lib/XMLCData.js'(exports, module) { + init_define_process() + ;(function () { + var NodeType, + XMLCData, + XMLCharacterData, + extend = function (child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) child[key] = parent[key] + } + function ctor() { + this.constructor = child + } + ctor.prototype = parent.prototype + child.prototype = new ctor() + child.__super__ = parent.prototype + return child + }, + hasProp = {}.hasOwnProperty + NodeType = require_NodeType() + XMLCharacterData = require_XMLCharacterData() + module.exports = XMLCData = (function (superClass) { + extend(XMLCData2, superClass) + function XMLCData2(parent, text) { + XMLCData2.__super__.constructor.call(this, parent) + if (text == null) { + throw new Error('Missing CDATA text. ' + this.debugInfo()) + } + this.name = '#cdata-section' + this.type = NodeType.CData + this.value = this.stringify.cdata(text) + } + XMLCData2.prototype.clone = function () { + return Object.create(this) + } + XMLCData2.prototype.toString = function (options) { + return this.options.writer.cdata( + this, + this.options.writer.filterOptions(options), + ) + } + return XMLCData2 + })(XMLCharacterData) + }.call(exports)) + }, +}) + +// node_modules/xmlbuilder/lib/XMLComment.js +var require_XMLComment = __commonJS({ + 'node_modules/xmlbuilder/lib/XMLComment.js'(exports, module) { + init_define_process() + ;(function () { + var NodeType, + XMLCharacterData, + XMLComment, + extend = function (child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) child[key] = parent[key] + } + function ctor() { + this.constructor = child + } + ctor.prototype = parent.prototype + child.prototype = new ctor() + child.__super__ = parent.prototype + return child + }, + hasProp = {}.hasOwnProperty + NodeType = require_NodeType() + XMLCharacterData = require_XMLCharacterData() + module.exports = XMLComment = (function (superClass) { + extend(XMLComment2, superClass) + function XMLComment2(parent, text) { + XMLComment2.__super__.constructor.call(this, parent) + if (text == null) { + throw new Error('Missing comment text. ' + this.debugInfo()) + } + this.name = '#comment' + this.type = NodeType.Comment + this.value = this.stringify.comment(text) + } + XMLComment2.prototype.clone = function () { + return Object.create(this) + } + XMLComment2.prototype.toString = function (options) { + return this.options.writer.comment( + this, + this.options.writer.filterOptions(options), + ) + } + return XMLComment2 + })(XMLCharacterData) + }.call(exports)) + }, +}) + +// node_modules/xmlbuilder/lib/XMLDeclaration.js +var require_XMLDeclaration = __commonJS({ + 'node_modules/xmlbuilder/lib/XMLDeclaration.js'(exports, module) { + init_define_process() + ;(function () { + var NodeType, + XMLDeclaration, + XMLNode, + isObject, + extend = function (child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) child[key] = parent[key] + } + function ctor() { + this.constructor = child + } + ctor.prototype = parent.prototype + child.prototype = new ctor() + child.__super__ = parent.prototype + return child + }, + hasProp = {}.hasOwnProperty + isObject = require_Utility().isObject + XMLNode = require_XMLNode() + NodeType = require_NodeType() + module.exports = XMLDeclaration = (function (superClass) { + extend(XMLDeclaration2, superClass) + function XMLDeclaration2(parent, version, encoding, standalone) { + var ref + XMLDeclaration2.__super__.constructor.call(this, parent) + if (isObject(version)) { + ;(ref = version), + (version = ref.version), + (encoding = ref.encoding), + (standalone = ref.standalone) + } + if (!version) { + version = '1.0' + } + this.type = NodeType.Declaration + this.version = this.stringify.xmlVersion(version) + if (encoding != null) { + this.encoding = this.stringify.xmlEncoding(encoding) + } + if (standalone != null) { + this.standalone = this.stringify.xmlStandalone(standalone) + } + } + XMLDeclaration2.prototype.toString = function (options) { + return this.options.writer.declaration( + this, + this.options.writer.filterOptions(options), + ) + } + return XMLDeclaration2 + })(XMLNode) + }.call(exports)) + }, +}) + +// node_modules/xmlbuilder/lib/XMLDTDAttList.js +var require_XMLDTDAttList = __commonJS({ + 'node_modules/xmlbuilder/lib/XMLDTDAttList.js'(exports, module) { + init_define_process() + ;(function () { + var NodeType, + XMLDTDAttList, + XMLNode, + extend = function (child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) child[key] = parent[key] + } + function ctor() { + this.constructor = child + } + ctor.prototype = parent.prototype + child.prototype = new ctor() + child.__super__ = parent.prototype + return child + }, + hasProp = {}.hasOwnProperty + XMLNode = require_XMLNode() + NodeType = require_NodeType() + module.exports = XMLDTDAttList = (function (superClass) { + extend(XMLDTDAttList2, superClass) + function XMLDTDAttList2( + parent, + elementName, + attributeName, + attributeType, + defaultValueType, + defaultValue, + ) { + XMLDTDAttList2.__super__.constructor.call(this, parent) + if (elementName == null) { + throw new Error('Missing DTD element name. ' + this.debugInfo()) + } + if (attributeName == null) { + throw new Error( + 'Missing DTD attribute name. ' + this.debugInfo(elementName), + ) + } + if (!attributeType) { + throw new Error( + 'Missing DTD attribute type. ' + this.debugInfo(elementName), + ) + } + if (!defaultValueType) { + throw new Error( + 'Missing DTD attribute default. ' + this.debugInfo(elementName), + ) + } + if (defaultValueType.indexOf('#') !== 0) { + defaultValueType = '#' + defaultValueType + } + if ( + !defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/) + ) { + throw new Error( + 'Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. ' + + this.debugInfo(elementName), + ) + } + if (defaultValue && !defaultValueType.match(/^(#FIXED|#DEFAULT)$/)) { + throw new Error( + 'Default value only applies to #FIXED or #DEFAULT. ' + + this.debugInfo(elementName), + ) + } + this.elementName = this.stringify.name(elementName) + this.type = NodeType.AttributeDeclaration + this.attributeName = this.stringify.name(attributeName) + this.attributeType = this.stringify.dtdAttType(attributeType) + if (defaultValue) { + this.defaultValue = this.stringify.dtdAttDefault(defaultValue) + } + this.defaultValueType = defaultValueType + } + XMLDTDAttList2.prototype.toString = function (options) { + return this.options.writer.dtdAttList( + this, + this.options.writer.filterOptions(options), + ) + } + return XMLDTDAttList2 + })(XMLNode) + }.call(exports)) + }, +}) + +// node_modules/xmlbuilder/lib/XMLDTDEntity.js +var require_XMLDTDEntity = __commonJS({ + 'node_modules/xmlbuilder/lib/XMLDTDEntity.js'(exports, module) { + init_define_process() + ;(function () { + var NodeType, + XMLDTDEntity, + XMLNode, + isObject, + extend = function (child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) child[key] = parent[key] + } + function ctor() { + this.constructor = child + } + ctor.prototype = parent.prototype + child.prototype = new ctor() + child.__super__ = parent.prototype + return child + }, + hasProp = {}.hasOwnProperty + isObject = require_Utility().isObject + XMLNode = require_XMLNode() + NodeType = require_NodeType() + module.exports = XMLDTDEntity = (function (superClass) { + extend(XMLDTDEntity2, superClass) + function XMLDTDEntity2(parent, pe, name, value) { + XMLDTDEntity2.__super__.constructor.call(this, parent) + if (name == null) { + throw new Error('Missing DTD entity name. ' + this.debugInfo(name)) + } + if (value == null) { + throw new Error('Missing DTD entity value. ' + this.debugInfo(name)) + } + this.pe = !!pe + this.name = this.stringify.name(name) + this.type = NodeType.EntityDeclaration + if (!isObject(value)) { + this.value = this.stringify.dtdEntityValue(value) + this.internal = true + } else { + if (!value.pubID && !value.sysID) { + throw new Error( + 'Public and/or system identifiers are required for an external entity. ' + + this.debugInfo(name), + ) + } + if (value.pubID && !value.sysID) { + throw new Error( + 'System identifier is required for a public external entity. ' + + this.debugInfo(name), + ) + } + this.internal = false + if (value.pubID != null) { + this.pubID = this.stringify.dtdPubID(value.pubID) + } + if (value.sysID != null) { + this.sysID = this.stringify.dtdSysID(value.sysID) + } + if (value.nData != null) { + this.nData = this.stringify.dtdNData(value.nData) + } + if (this.pe && this.nData) { + throw new Error( + 'Notation declaration is not allowed in a parameter entity. ' + + this.debugInfo(name), + ) + } + } + } + Object.defineProperty(XMLDTDEntity2.prototype, 'publicId', { + get: function () { + return this.pubID + }, + }) + Object.defineProperty(XMLDTDEntity2.prototype, 'systemId', { + get: function () { + return this.sysID + }, + }) + Object.defineProperty(XMLDTDEntity2.prototype, 'notationName', { + get: function () { + return this.nData || null + }, + }) + Object.defineProperty(XMLDTDEntity2.prototype, 'inputEncoding', { + get: function () { + return null + }, + }) + Object.defineProperty(XMLDTDEntity2.prototype, 'xmlEncoding', { + get: function () { + return null + }, + }) + Object.defineProperty(XMLDTDEntity2.prototype, 'xmlVersion', { + get: function () { + return null + }, + }) + XMLDTDEntity2.prototype.toString = function (options) { + return this.options.writer.dtdEntity( + this, + this.options.writer.filterOptions(options), + ) + } + return XMLDTDEntity2 + })(XMLNode) + }.call(exports)) + }, +}) + +// node_modules/xmlbuilder/lib/XMLDTDElement.js +var require_XMLDTDElement = __commonJS({ + 'node_modules/xmlbuilder/lib/XMLDTDElement.js'(exports, module) { + init_define_process() + ;(function () { + var NodeType, + XMLDTDElement, + XMLNode, + extend = function (child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) child[key] = parent[key] + } + function ctor() { + this.constructor = child + } + ctor.prototype = parent.prototype + child.prototype = new ctor() + child.__super__ = parent.prototype + return child + }, + hasProp = {}.hasOwnProperty + XMLNode = require_XMLNode() + NodeType = require_NodeType() + module.exports = XMLDTDElement = (function (superClass) { + extend(XMLDTDElement2, superClass) + function XMLDTDElement2(parent, name, value) { + XMLDTDElement2.__super__.constructor.call(this, parent) + if (name == null) { + throw new Error('Missing DTD element name. ' + this.debugInfo()) + } + if (!value) { + value = '(#PCDATA)' + } + if (Array.isArray(value)) { + value = '(' + value.join(',') + ')' + } + this.name = this.stringify.name(name) + this.type = NodeType.ElementDeclaration + this.value = this.stringify.dtdElementValue(value) + } + XMLDTDElement2.prototype.toString = function (options) { + return this.options.writer.dtdElement( + this, + this.options.writer.filterOptions(options), + ) + } + return XMLDTDElement2 + })(XMLNode) + }.call(exports)) + }, +}) + +// node_modules/xmlbuilder/lib/XMLDTDNotation.js +var require_XMLDTDNotation = __commonJS({ + 'node_modules/xmlbuilder/lib/XMLDTDNotation.js'(exports, module) { + init_define_process() + ;(function () { + var NodeType, + XMLDTDNotation, + XMLNode, + extend = function (child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) child[key] = parent[key] + } + function ctor() { + this.constructor = child + } + ctor.prototype = parent.prototype + child.prototype = new ctor() + child.__super__ = parent.prototype + return child + }, + hasProp = {}.hasOwnProperty + XMLNode = require_XMLNode() + NodeType = require_NodeType() + module.exports = XMLDTDNotation = (function (superClass) { + extend(XMLDTDNotation2, superClass) + function XMLDTDNotation2(parent, name, value) { + XMLDTDNotation2.__super__.constructor.call(this, parent) + if (name == null) { + throw new Error( + 'Missing DTD notation name. ' + this.debugInfo(name), + ) + } + if (!value.pubID && !value.sysID) { + throw new Error( + 'Public or system identifiers are required for an external entity. ' + + this.debugInfo(name), + ) + } + this.name = this.stringify.name(name) + this.type = NodeType.NotationDeclaration + if (value.pubID != null) { + this.pubID = this.stringify.dtdPubID(value.pubID) + } + if (value.sysID != null) { + this.sysID = this.stringify.dtdSysID(value.sysID) + } + } + Object.defineProperty(XMLDTDNotation2.prototype, 'publicId', { + get: function () { + return this.pubID + }, + }) + Object.defineProperty(XMLDTDNotation2.prototype, 'systemId', { + get: function () { + return this.sysID + }, + }) + XMLDTDNotation2.prototype.toString = function (options) { + return this.options.writer.dtdNotation( + this, + this.options.writer.filterOptions(options), + ) + } + return XMLDTDNotation2 + })(XMLNode) + }.call(exports)) + }, +}) + +// node_modules/xmlbuilder/lib/XMLDocType.js +var require_XMLDocType = __commonJS({ + 'node_modules/xmlbuilder/lib/XMLDocType.js'(exports, module) { + init_define_process() + ;(function () { + var NodeType, + XMLDTDAttList, + XMLDTDElement, + XMLDTDEntity, + XMLDTDNotation, + XMLDocType, + XMLNamedNodeMap, + XMLNode, + isObject, + extend = function (child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) child[key] = parent[key] + } + function ctor() { + this.constructor = child + } + ctor.prototype = parent.prototype + child.prototype = new ctor() + child.__super__ = parent.prototype + return child + }, + hasProp = {}.hasOwnProperty + isObject = require_Utility().isObject + XMLNode = require_XMLNode() + NodeType = require_NodeType() + XMLDTDAttList = require_XMLDTDAttList() + XMLDTDEntity = require_XMLDTDEntity() + XMLDTDElement = require_XMLDTDElement() + XMLDTDNotation = require_XMLDTDNotation() + XMLNamedNodeMap = require_XMLNamedNodeMap() + module.exports = XMLDocType = (function (superClass) { + extend(XMLDocType2, superClass) + function XMLDocType2(parent, pubID, sysID) { + var child, i, len, ref, ref1, ref2 + XMLDocType2.__super__.constructor.call(this, parent) + this.type = NodeType.DocType + if (parent.children) { + ref = parent.children + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i] + if (child.type === NodeType.Element) { + this.name = child.name + break + } + } + } + this.documentObject = parent + if (isObject(pubID)) { + ;(ref1 = pubID), (pubID = ref1.pubID), (sysID = ref1.sysID) + } + if (sysID == null) { + ;(ref2 = [pubID, sysID]), (sysID = ref2[0]), (pubID = ref2[1]) + } + if (pubID != null) { + this.pubID = this.stringify.dtdPubID(pubID) + } + if (sysID != null) { + this.sysID = this.stringify.dtdSysID(sysID) + } + } + Object.defineProperty(XMLDocType2.prototype, 'entities', { + get: function () { + var child, i, len, nodes, ref + nodes = {} + ref = this.children + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i] + if (child.type === NodeType.EntityDeclaration && !child.pe) { + nodes[child.name] = child + } + } + return new XMLNamedNodeMap(nodes) + }, + }) + Object.defineProperty(XMLDocType2.prototype, 'notations', { + get: function () { + var child, i, len, nodes, ref + nodes = {} + ref = this.children + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i] + if (child.type === NodeType.NotationDeclaration) { + nodes[child.name] = child + } + } + return new XMLNamedNodeMap(nodes) + }, + }) + Object.defineProperty(XMLDocType2.prototype, 'publicId', { + get: function () { + return this.pubID + }, + }) + Object.defineProperty(XMLDocType2.prototype, 'systemId', { + get: function () { + return this.sysID + }, + }) + Object.defineProperty(XMLDocType2.prototype, 'internalSubset', { + get: function () { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + }, + }) + XMLDocType2.prototype.element = function (name, value) { + var child + child = new XMLDTDElement(this, name, value) + this.children.push(child) + return this + } + XMLDocType2.prototype.attList = function ( + elementName, + attributeName, + attributeType, + defaultValueType, + defaultValue, + ) { + var child + child = new XMLDTDAttList( + this, + elementName, + attributeName, + attributeType, + defaultValueType, + defaultValue, + ) + this.children.push(child) + return this + } + XMLDocType2.prototype.entity = function (name, value) { + var child + child = new XMLDTDEntity(this, false, name, value) + this.children.push(child) + return this + } + XMLDocType2.prototype.pEntity = function (name, value) { + var child + child = new XMLDTDEntity(this, true, name, value) + this.children.push(child) + return this + } + XMLDocType2.prototype.notation = function (name, value) { + var child + child = new XMLDTDNotation(this, name, value) + this.children.push(child) + return this + } + XMLDocType2.prototype.toString = function (options) { + return this.options.writer.docType( + this, + this.options.writer.filterOptions(options), + ) + } + XMLDocType2.prototype.ele = function (name, value) { + return this.element(name, value) + } + XMLDocType2.prototype.att = function ( + elementName, + attributeName, + attributeType, + defaultValueType, + defaultValue, + ) { + return this.attList( + elementName, + attributeName, + attributeType, + defaultValueType, + defaultValue, + ) + } + XMLDocType2.prototype.ent = function (name, value) { + return this.entity(name, value) + } + XMLDocType2.prototype.pent = function (name, value) { + return this.pEntity(name, value) + } + XMLDocType2.prototype.not = function (name, value) { + return this.notation(name, value) + } + XMLDocType2.prototype.up = function () { + return this.root() || this.documentObject + } + XMLDocType2.prototype.isEqualNode = function (node) { + if ( + !XMLDocType2.__super__.isEqualNode + .apply(this, arguments) + .isEqualNode(node) + ) { + return false + } + if (node.name !== this.name) { + return false + } + if (node.publicId !== this.publicId) { + return false + } + if (node.systemId !== this.systemId) { + return false + } + return true + } + return XMLDocType2 + })(XMLNode) + }.call(exports)) + }, +}) + +// node_modules/xmlbuilder/lib/XMLRaw.js +var require_XMLRaw = __commonJS({ + 'node_modules/xmlbuilder/lib/XMLRaw.js'(exports, module) { + init_define_process() + ;(function () { + var NodeType, + XMLNode, + XMLRaw, + extend = function (child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) child[key] = parent[key] + } + function ctor() { + this.constructor = child + } + ctor.prototype = parent.prototype + child.prototype = new ctor() + child.__super__ = parent.prototype + return child + }, + hasProp = {}.hasOwnProperty + NodeType = require_NodeType() + XMLNode = require_XMLNode() + module.exports = XMLRaw = (function (superClass) { + extend(XMLRaw2, superClass) + function XMLRaw2(parent, text) { + XMLRaw2.__super__.constructor.call(this, parent) + if (text == null) { + throw new Error('Missing raw text. ' + this.debugInfo()) + } + this.type = NodeType.Raw + this.value = this.stringify.raw(text) + } + XMLRaw2.prototype.clone = function () { + return Object.create(this) + } + XMLRaw2.prototype.toString = function (options) { + return this.options.writer.raw( + this, + this.options.writer.filterOptions(options), + ) + } + return XMLRaw2 + })(XMLNode) + }.call(exports)) + }, +}) + +// node_modules/xmlbuilder/lib/XMLText.js +var require_XMLText = __commonJS({ + 'node_modules/xmlbuilder/lib/XMLText.js'(exports, module) { + init_define_process() + ;(function () { + var NodeType, + XMLCharacterData, + XMLText, + extend = function (child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) child[key] = parent[key] + } + function ctor() { + this.constructor = child + } + ctor.prototype = parent.prototype + child.prototype = new ctor() + child.__super__ = parent.prototype + return child + }, + hasProp = {}.hasOwnProperty + NodeType = require_NodeType() + XMLCharacterData = require_XMLCharacterData() + module.exports = XMLText = (function (superClass) { + extend(XMLText2, superClass) + function XMLText2(parent, text) { + XMLText2.__super__.constructor.call(this, parent) + if (text == null) { + throw new Error('Missing element text. ' + this.debugInfo()) + } + this.name = '#text' + this.type = NodeType.Text + this.value = this.stringify.text(text) + } + Object.defineProperty( + XMLText2.prototype, + 'isElementContentWhitespace', + { + get: function () { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + }, + }, + ) + Object.defineProperty(XMLText2.prototype, 'wholeText', { + get: function () { + var next, prev, str + str = '' + prev = this.previousSibling + while (prev) { + str = prev.data + str + prev = prev.previousSibling + } + str += this.data + next = this.nextSibling + while (next) { + str = str + next.data + next = next.nextSibling + } + return str + }, + }) + XMLText2.prototype.clone = function () { + return Object.create(this) + } + XMLText2.prototype.toString = function (options) { + return this.options.writer.text( + this, + this.options.writer.filterOptions(options), + ) + } + XMLText2.prototype.splitText = function (offset) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLText2.prototype.replaceWholeText = function (content) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + return XMLText2 + })(XMLCharacterData) + }.call(exports)) + }, +}) + +// node_modules/xmlbuilder/lib/XMLProcessingInstruction.js +var require_XMLProcessingInstruction = __commonJS({ + 'node_modules/xmlbuilder/lib/XMLProcessingInstruction.js'(exports, module) { + init_define_process() + ;(function () { + var NodeType, + XMLCharacterData, + XMLProcessingInstruction, + extend = function (child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) child[key] = parent[key] + } + function ctor() { + this.constructor = child + } + ctor.prototype = parent.prototype + child.prototype = new ctor() + child.__super__ = parent.prototype + return child + }, + hasProp = {}.hasOwnProperty + NodeType = require_NodeType() + XMLCharacterData = require_XMLCharacterData() + module.exports = XMLProcessingInstruction = (function (superClass) { + extend(XMLProcessingInstruction2, superClass) + function XMLProcessingInstruction2(parent, target, value) { + XMLProcessingInstruction2.__super__.constructor.call(this, parent) + if (target == null) { + throw new Error('Missing instruction target. ' + this.debugInfo()) + } + this.type = NodeType.ProcessingInstruction + this.target = this.stringify.insTarget(target) + this.name = this.target + if (value) { + this.value = this.stringify.insValue(value) + } + } + XMLProcessingInstruction2.prototype.clone = function () { + return Object.create(this) + } + XMLProcessingInstruction2.prototype.toString = function (options) { + return this.options.writer.processingInstruction( + this, + this.options.writer.filterOptions(options), + ) + } + XMLProcessingInstruction2.prototype.isEqualNode = function (node) { + if ( + !XMLProcessingInstruction2.__super__.isEqualNode + .apply(this, arguments) + .isEqualNode(node) + ) { + return false + } + if (node.target !== this.target) { + return false + } + return true + } + return XMLProcessingInstruction2 + })(XMLCharacterData) + }.call(exports)) + }, +}) + +// node_modules/xmlbuilder/lib/XMLDummy.js +var require_XMLDummy = __commonJS({ + 'node_modules/xmlbuilder/lib/XMLDummy.js'(exports, module) { + init_define_process() + ;(function () { + var NodeType, + XMLDummy, + XMLNode, + extend = function (child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) child[key] = parent[key] + } + function ctor() { + this.constructor = child + } + ctor.prototype = parent.prototype + child.prototype = new ctor() + child.__super__ = parent.prototype + return child + }, + hasProp = {}.hasOwnProperty + XMLNode = require_XMLNode() + NodeType = require_NodeType() + module.exports = XMLDummy = (function (superClass) { + extend(XMLDummy2, superClass) + function XMLDummy2(parent) { + XMLDummy2.__super__.constructor.call(this, parent) + this.type = NodeType.Dummy + } + XMLDummy2.prototype.clone = function () { + return Object.create(this) + } + XMLDummy2.prototype.toString = function (options) { + return '' + } + return XMLDummy2 + })(XMLNode) + }.call(exports)) + }, +}) + +// node_modules/xmlbuilder/lib/XMLNodeList.js +var require_XMLNodeList = __commonJS({ + 'node_modules/xmlbuilder/lib/XMLNodeList.js'(exports, module) { + init_define_process() + ;(function () { + var XMLNodeList + module.exports = XMLNodeList = (function () { + function XMLNodeList2(nodes) { + this.nodes = nodes + } + Object.defineProperty(XMLNodeList2.prototype, 'length', { + get: function () { + return this.nodes.length || 0 + }, + }) + XMLNodeList2.prototype.clone = function () { + return (this.nodes = null) + } + XMLNodeList2.prototype.item = function (index) { + return this.nodes[index] || null + } + return XMLNodeList2 + })() + }.call(exports)) + }, +}) + +// node_modules/xmlbuilder/lib/DocumentPosition.js +var require_DocumentPosition = __commonJS({ + 'node_modules/xmlbuilder/lib/DocumentPosition.js'(exports, module) { + init_define_process() + ;(function () { + module.exports = { + Disconnected: 1, + Preceding: 2, + Following: 4, + Contains: 8, + ContainedBy: 16, + ImplementationSpecific: 32, + } + }.call(exports)) + }, +}) + +// node_modules/xmlbuilder/lib/XMLNode.js +var require_XMLNode = __commonJS({ + 'node_modules/xmlbuilder/lib/XMLNode.js'(exports, module) { + init_define_process() + ;(function () { + var DocumentPosition, + NodeType, + XMLCData, + XMLComment, + XMLDeclaration, + XMLDocType, + XMLDummy, + XMLElement, + XMLNamedNodeMap, + XMLNode, + XMLNodeList, + XMLProcessingInstruction, + XMLRaw, + XMLText, + getValue, + isEmpty, + isFunction, + isObject, + ref1, + hasProp = {}.hasOwnProperty + ;(ref1 = require_Utility()), + (isObject = ref1.isObject), + (isFunction = ref1.isFunction), + (isEmpty = ref1.isEmpty), + (getValue = ref1.getValue) + XMLElement = null + XMLCData = null + XMLComment = null + XMLDeclaration = null + XMLDocType = null + XMLRaw = null + XMLText = null + XMLProcessingInstruction = null + XMLDummy = null + NodeType = null + XMLNodeList = null + XMLNamedNodeMap = null + DocumentPosition = null + module.exports = XMLNode = (function () { + function XMLNode2(parent1) { + this.parent = parent1 + if (this.parent) { + this.options = this.parent.options + this.stringify = this.parent.stringify + } + this.value = null + this.children = [] + this.baseURI = null + if (!XMLElement) { + XMLElement = require_XMLElement() + XMLCData = require_XMLCData() + XMLComment = require_XMLComment() + XMLDeclaration = require_XMLDeclaration() + XMLDocType = require_XMLDocType() + XMLRaw = require_XMLRaw() + XMLText = require_XMLText() + XMLProcessingInstruction = require_XMLProcessingInstruction() + XMLDummy = require_XMLDummy() + NodeType = require_NodeType() + XMLNodeList = require_XMLNodeList() + XMLNamedNodeMap = require_XMLNamedNodeMap() + DocumentPosition = require_DocumentPosition() + } + } + Object.defineProperty(XMLNode2.prototype, 'nodeName', { + get: function () { + return this.name + }, + }) + Object.defineProperty(XMLNode2.prototype, 'nodeType', { + get: function () { + return this.type + }, + }) + Object.defineProperty(XMLNode2.prototype, 'nodeValue', { + get: function () { + return this.value + }, + }) + Object.defineProperty(XMLNode2.prototype, 'parentNode', { + get: function () { + return this.parent + }, + }) + Object.defineProperty(XMLNode2.prototype, 'childNodes', { + get: function () { + if (!this.childNodeList || !this.childNodeList.nodes) { + this.childNodeList = new XMLNodeList(this.children) + } + return this.childNodeList + }, + }) + Object.defineProperty(XMLNode2.prototype, 'firstChild', { + get: function () { + return this.children[0] || null + }, + }) + Object.defineProperty(XMLNode2.prototype, 'lastChild', { + get: function () { + return this.children[this.children.length - 1] || null + }, + }) + Object.defineProperty(XMLNode2.prototype, 'previousSibling', { + get: function () { + var i + i = this.parent.children.indexOf(this) + return this.parent.children[i - 1] || null + }, + }) + Object.defineProperty(XMLNode2.prototype, 'nextSibling', { + get: function () { + var i + i = this.parent.children.indexOf(this) + return this.parent.children[i + 1] || null + }, + }) + Object.defineProperty(XMLNode2.prototype, 'ownerDocument', { + get: function () { + return this.document() || null + }, + }) + Object.defineProperty(XMLNode2.prototype, 'textContent', { + get: function () { + var child, j, len, ref2, str + if ( + this.nodeType === NodeType.Element || + this.nodeType === NodeType.DocumentFragment + ) { + str = '' + ref2 = this.children + for (j = 0, len = ref2.length; j < len; j++) { + child = ref2[j] + if (child.textContent) { + str += child.textContent + } + } + return str + } else { + return null + } + }, + set: function (value) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + }, + }) + XMLNode2.prototype.setParent = function (parent) { + var child, j, len, ref2, results + this.parent = parent + if (parent) { + this.options = parent.options + this.stringify = parent.stringify + } + ref2 = this.children + results = [] + for (j = 0, len = ref2.length; j < len; j++) { + child = ref2[j] + results.push(child.setParent(this)) + } + return results + } + XMLNode2.prototype.element = function (name, attributes, text) { + var childNode, item, j, k, key, lastChild, len, len1, ref2, ref3, val + lastChild = null + if (attributes === null && text == null) { + ;(ref2 = [{}, null]), (attributes = ref2[0]), (text = ref2[1]) + } + if (attributes == null) { + attributes = {} + } + attributes = getValue(attributes) + if (!isObject(attributes)) { + ;(ref3 = [attributes, text]), + (text = ref3[0]), + (attributes = ref3[1]) + } + if (name != null) { + name = getValue(name) + } + if (Array.isArray(name)) { + for (j = 0, len = name.length; j < len; j++) { + item = name[j] + lastChild = this.element(item) + } + } else if (isFunction(name)) { + lastChild = this.element(name.apply()) + } else if (isObject(name)) { + for (key in name) { + if (!hasProp.call(name, key)) continue + val = name[key] + if (isFunction(val)) { + val = val.apply() + } + if ( + !this.options.ignoreDecorators && + this.stringify.convertAttKey && + key.indexOf(this.stringify.convertAttKey) === 0 + ) { + lastChild = this.attribute( + key.substr(this.stringify.convertAttKey.length), + val, + ) + } else if ( + !this.options.separateArrayItems && + Array.isArray(val) && + isEmpty(val) + ) { + lastChild = this.dummy() + } else if (isObject(val) && isEmpty(val)) { + lastChild = this.element(key) + } else if (!this.options.keepNullNodes && val == null) { + lastChild = this.dummy() + } else if ( + !this.options.separateArrayItems && + Array.isArray(val) + ) { + for (k = 0, len1 = val.length; k < len1; k++) { + item = val[k] + childNode = {} + childNode[key] = item + lastChild = this.element(childNode) + } + } else if (isObject(val)) { + if ( + !this.options.ignoreDecorators && + this.stringify.convertTextKey && + key.indexOf(this.stringify.convertTextKey) === 0 + ) { + lastChild = this.element(val) + } else { + lastChild = this.element(key) + lastChild.element(val) + } + } else { + lastChild = this.element(key, val) + } + } + } else if (!this.options.keepNullNodes && text === null) { + lastChild = this.dummy() + } else { + if ( + !this.options.ignoreDecorators && + this.stringify.convertTextKey && + name.indexOf(this.stringify.convertTextKey) === 0 + ) { + lastChild = this.text(text) + } else if ( + !this.options.ignoreDecorators && + this.stringify.convertCDataKey && + name.indexOf(this.stringify.convertCDataKey) === 0 + ) { + lastChild = this.cdata(text) + } else if ( + !this.options.ignoreDecorators && + this.stringify.convertCommentKey && + name.indexOf(this.stringify.convertCommentKey) === 0 + ) { + lastChild = this.comment(text) + } else if ( + !this.options.ignoreDecorators && + this.stringify.convertRawKey && + name.indexOf(this.stringify.convertRawKey) === 0 + ) { + lastChild = this.raw(text) + } else if ( + !this.options.ignoreDecorators && + this.stringify.convertPIKey && + name.indexOf(this.stringify.convertPIKey) === 0 + ) { + lastChild = this.instruction( + name.substr(this.stringify.convertPIKey.length), + text, + ) + } else { + lastChild = this.node(name, attributes, text) + } + } + if (lastChild == null) { + throw new Error( + 'Could not create any elements with: ' + + name + + '. ' + + this.debugInfo(), + ) + } + return lastChild + } + XMLNode2.prototype.insertBefore = function (name, attributes, text) { + var child, i, newChild, refChild, removed + if (name != null ? name.type : void 0) { + newChild = name + refChild = attributes + newChild.setParent(this) + if (refChild) { + i = children.indexOf(refChild) + removed = children.splice(i) + children.push(newChild) + Array.prototype.push.apply(children, removed) + } else { + children.push(newChild) + } + return newChild + } else { + if (this.isRoot) { + throw new Error( + 'Cannot insert elements at root level. ' + this.debugInfo(name), + ) + } + i = this.parent.children.indexOf(this) + removed = this.parent.children.splice(i) + child = this.parent.element(name, attributes, text) + Array.prototype.push.apply(this.parent.children, removed) + return child + } + } + XMLNode2.prototype.insertAfter = function (name, attributes, text) { + var child, i, removed + if (this.isRoot) { + throw new Error( + 'Cannot insert elements at root level. ' + this.debugInfo(name), + ) + } + i = this.parent.children.indexOf(this) + removed = this.parent.children.splice(i + 1) + child = this.parent.element(name, attributes, text) + Array.prototype.push.apply(this.parent.children, removed) + return child + } + XMLNode2.prototype.remove = function () { + var i, ref2 + if (this.isRoot) { + throw new Error( + 'Cannot remove the root element. ' + this.debugInfo(), + ) + } + i = this.parent.children.indexOf(this) + ;[].splice.apply( + this.parent.children, + [i, i - i + 1].concat((ref2 = [])), + ), + ref2 + return this.parent + } + XMLNode2.prototype.node = function (name, attributes, text) { + var child, ref2 + if (name != null) { + name = getValue(name) + } + attributes || (attributes = {}) + attributes = getValue(attributes) + if (!isObject(attributes)) { + ;(ref2 = [attributes, text]), + (text = ref2[0]), + (attributes = ref2[1]) + } + child = new XMLElement(this, name, attributes) + if (text != null) { + child.text(text) + } + this.children.push(child) + return child + } + XMLNode2.prototype.text = function (value) { + var child + if (isObject(value)) { + this.element(value) + } + child = new XMLText(this, value) + this.children.push(child) + return this + } + XMLNode2.prototype.cdata = function (value) { + var child + child = new XMLCData(this, value) + this.children.push(child) + return this + } + XMLNode2.prototype.comment = function (value) { + var child + child = new XMLComment(this, value) + this.children.push(child) + return this + } + XMLNode2.prototype.commentBefore = function (value) { + var child, i, removed + i = this.parent.children.indexOf(this) + removed = this.parent.children.splice(i) + child = this.parent.comment(value) + Array.prototype.push.apply(this.parent.children, removed) + return this + } + XMLNode2.prototype.commentAfter = function (value) { + var child, i, removed + i = this.parent.children.indexOf(this) + removed = this.parent.children.splice(i + 1) + child = this.parent.comment(value) + Array.prototype.push.apply(this.parent.children, removed) + return this + } + XMLNode2.prototype.raw = function (value) { + var child + child = new XMLRaw(this, value) + this.children.push(child) + return this + } + XMLNode2.prototype.dummy = function () { + var child + child = new XMLDummy(this) + return child + } + XMLNode2.prototype.instruction = function (target, value) { + var insTarget, insValue, instruction, j, len + if (target != null) { + target = getValue(target) + } + if (value != null) { + value = getValue(value) + } + if (Array.isArray(target)) { + for (j = 0, len = target.length; j < len; j++) { + insTarget = target[j] + this.instruction(insTarget) + } + } else if (isObject(target)) { + for (insTarget in target) { + if (!hasProp.call(target, insTarget)) continue + insValue = target[insTarget] + this.instruction(insTarget, insValue) + } + } else { + if (isFunction(value)) { + value = value.apply() + } + instruction = new XMLProcessingInstruction(this, target, value) + this.children.push(instruction) + } + return this + } + XMLNode2.prototype.instructionBefore = function (target, value) { + var child, i, removed + i = this.parent.children.indexOf(this) + removed = this.parent.children.splice(i) + child = this.parent.instruction(target, value) + Array.prototype.push.apply(this.parent.children, removed) + return this + } + XMLNode2.prototype.instructionAfter = function (target, value) { + var child, i, removed + i = this.parent.children.indexOf(this) + removed = this.parent.children.splice(i + 1) + child = this.parent.instruction(target, value) + Array.prototype.push.apply(this.parent.children, removed) + return this + } + XMLNode2.prototype.declaration = function ( + version, + encoding, + standalone, + ) { + var doc, xmldec + doc = this.document() + xmldec = new XMLDeclaration(doc, version, encoding, standalone) + if (doc.children.length === 0) { + doc.children.unshift(xmldec) + } else if (doc.children[0].type === NodeType.Declaration) { + doc.children[0] = xmldec + } else { + doc.children.unshift(xmldec) + } + return doc.root() || doc + } + XMLNode2.prototype.dtd = function (pubID, sysID) { + var child, doc, doctype, i, j, k, len, len1, ref2, ref3 + doc = this.document() + doctype = new XMLDocType(doc, pubID, sysID) + ref2 = doc.children + for (i = j = 0, len = ref2.length; j < len; i = ++j) { + child = ref2[i] + if (child.type === NodeType.DocType) { + doc.children[i] = doctype + return doctype + } + } + ref3 = doc.children + for (i = k = 0, len1 = ref3.length; k < len1; i = ++k) { + child = ref3[i] + if (child.isRoot) { + doc.children.splice(i, 0, doctype) + return doctype + } + } + doc.children.push(doctype) + return doctype + } + XMLNode2.prototype.up = function () { + if (this.isRoot) { + throw new Error( + 'The root node has no parent. Use doc() if you need to get the document object.', + ) + } + return this.parent + } + XMLNode2.prototype.root = function () { + var node + node = this + while (node) { + if (node.type === NodeType.Document) { + return node.rootObject + } else if (node.isRoot) { + return node + } else { + node = node.parent + } + } + } + XMLNode2.prototype.document = function () { + var node + node = this + while (node) { + if (node.type === NodeType.Document) { + return node + } else { + node = node.parent + } + } + } + XMLNode2.prototype.end = function (options) { + return this.document().end(options) + } + XMLNode2.prototype.prev = function () { + var i + i = this.parent.children.indexOf(this) + if (i < 1) { + throw new Error('Already at the first node. ' + this.debugInfo()) + } + return this.parent.children[i - 1] + } + XMLNode2.prototype.next = function () { + var i + i = this.parent.children.indexOf(this) + if (i === -1 || i === this.parent.children.length - 1) { + throw new Error('Already at the last node. ' + this.debugInfo()) + } + return this.parent.children[i + 1] + } + XMLNode2.prototype.importDocument = function (doc) { + var clonedRoot + clonedRoot = doc.root().clone() + clonedRoot.parent = this + clonedRoot.isRoot = false + this.children.push(clonedRoot) + return this + } + XMLNode2.prototype.debugInfo = function (name) { + var ref2, ref3 + name = name || this.name + if ( + name == null && + !((ref2 = this.parent) != null ? ref2.name : void 0) + ) { + return '' + } else if (name == null) { + return 'parent: <' + this.parent.name + '>' + } else if (!((ref3 = this.parent) != null ? ref3.name : void 0)) { + return 'node: <' + name + '>' + } else { + return 'node: <' + name + '>, parent: <' + this.parent.name + '>' + } + } + XMLNode2.prototype.ele = function (name, attributes, text) { + return this.element(name, attributes, text) + } + XMLNode2.prototype.nod = function (name, attributes, text) { + return this.node(name, attributes, text) + } + XMLNode2.prototype.txt = function (value) { + return this.text(value) + } + XMLNode2.prototype.dat = function (value) { + return this.cdata(value) + } + XMLNode2.prototype.com = function (value) { + return this.comment(value) + } + XMLNode2.prototype.ins = function (target, value) { + return this.instruction(target, value) + } + XMLNode2.prototype.doc = function () { + return this.document() + } + XMLNode2.prototype.dec = function (version, encoding, standalone) { + return this.declaration(version, encoding, standalone) + } + XMLNode2.prototype.e = function (name, attributes, text) { + return this.element(name, attributes, text) + } + XMLNode2.prototype.n = function (name, attributes, text) { + return this.node(name, attributes, text) + } + XMLNode2.prototype.t = function (value) { + return this.text(value) + } + XMLNode2.prototype.d = function (value) { + return this.cdata(value) + } + XMLNode2.prototype.c = function (value) { + return this.comment(value) + } + XMLNode2.prototype.r = function (value) { + return this.raw(value) + } + XMLNode2.prototype.i = function (target, value) { + return this.instruction(target, value) + } + XMLNode2.prototype.u = function () { + return this.up() + } + XMLNode2.prototype.importXMLBuilder = function (doc) { + return this.importDocument(doc) + } + XMLNode2.prototype.replaceChild = function (newChild, oldChild) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLNode2.prototype.removeChild = function (oldChild) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLNode2.prototype.appendChild = function (newChild) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLNode2.prototype.hasChildNodes = function () { + return this.children.length !== 0 + } + XMLNode2.prototype.cloneNode = function (deep) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLNode2.prototype.normalize = function () { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLNode2.prototype.isSupported = function (feature, version) { + return true + } + XMLNode2.prototype.hasAttributes = function () { + return this.attribs.length !== 0 + } + XMLNode2.prototype.compareDocumentPosition = function (other) { + var ref, res + ref = this + if (ref === other) { + return 0 + } else if (this.document() !== other.document()) { + res = + DocumentPosition.Disconnected | + DocumentPosition.ImplementationSpecific + if (Math.random() < 0.5) { + res |= DocumentPosition.Preceding + } else { + res |= DocumentPosition.Following + } + return res + } else if (ref.isAncestor(other)) { + return DocumentPosition.Contains | DocumentPosition.Preceding + } else if (ref.isDescendant(other)) { + return DocumentPosition.Contains | DocumentPosition.Following + } else if (ref.isPreceding(other)) { + return DocumentPosition.Preceding + } else { + return DocumentPosition.Following + } + } + XMLNode2.prototype.isSameNode = function (other) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLNode2.prototype.lookupPrefix = function (namespaceURI) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLNode2.prototype.isDefaultNamespace = function (namespaceURI) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLNode2.prototype.lookupNamespaceURI = function (prefix) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLNode2.prototype.isEqualNode = function (node) { + var i, j, ref2 + if (node.nodeType !== this.nodeType) { + return false + } + if (node.children.length !== this.children.length) { + return false + } + for ( + i = j = 0, ref2 = this.children.length - 1; + 0 <= ref2 ? j <= ref2 : j >= ref2; + i = 0 <= ref2 ? ++j : --j + ) { + if (!this.children[i].isEqualNode(node.children[i])) { + return false + } + } + return true + } + XMLNode2.prototype.getFeature = function (feature, version) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLNode2.prototype.setUserData = function (key, data, handler) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLNode2.prototype.getUserData = function (key) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLNode2.prototype.contains = function (other) { + if (!other) { + return false + } + return other === this || this.isDescendant(other) + } + XMLNode2.prototype.isDescendant = function (node) { + var child, isDescendantChild, j, len, ref2 + ref2 = this.children + for (j = 0, len = ref2.length; j < len; j++) { + child = ref2[j] + if (node === child) { + return true + } + isDescendantChild = child.isDescendant(node) + if (isDescendantChild) { + return true + } + } + return false + } + XMLNode2.prototype.isAncestor = function (node) { + return node.isDescendant(this) + } + XMLNode2.prototype.isPreceding = function (node) { + var nodePos, thisPos + nodePos = this.treePosition(node) + thisPos = this.treePosition(this) + if (nodePos === -1 || thisPos === -1) { + return false + } else { + return nodePos < thisPos + } + } + XMLNode2.prototype.isFollowing = function (node) { + var nodePos, thisPos + nodePos = this.treePosition(node) + thisPos = this.treePosition(this) + if (nodePos === -1 || thisPos === -1) { + return false + } else { + return nodePos > thisPos + } + } + XMLNode2.prototype.treePosition = function (node) { + var found, pos + pos = 0 + found = false + this.foreachTreeNode(this.document(), function (childNode) { + pos++ + if (!found && childNode === node) { + return (found = true) + } + }) + if (found) { + return pos + } else { + return -1 + } + } + XMLNode2.prototype.foreachTreeNode = function (node, func) { + var child, j, len, ref2, res + node || (node = this.document()) + ref2 = node.children + for (j = 0, len = ref2.length; j < len; j++) { + child = ref2[j] + if ((res = func(child))) { + return res + } else { + res = this.foreachTreeNode(child, func) + if (res) { + return res + } + } + } + } + return XMLNode2 + })() + }.call(exports)) + }, +}) + +// node_modules/xmlbuilder/lib/XMLStringifier.js +var require_XMLStringifier = __commonJS({ + 'node_modules/xmlbuilder/lib/XMLStringifier.js'(exports, module) { + init_define_process() + ;(function () { + var XMLStringifier, + bind = function (fn, me) { + return function () { + return fn.apply(me, arguments) + } + }, + hasProp = {}.hasOwnProperty + module.exports = XMLStringifier = (function () { + function XMLStringifier2(options) { + this.assertLegalName = bind(this.assertLegalName, this) + this.assertLegalChar = bind(this.assertLegalChar, this) + var key, ref, value + options || (options = {}) + this.options = options + if (!this.options.version) { + this.options.version = '1.0' + } + ref = options.stringify || {} + for (key in ref) { + if (!hasProp.call(ref, key)) continue + value = ref[key] + this[key] = value + } + } + XMLStringifier2.prototype.name = function (val) { + if (this.options.noValidation) { + return val + } + return this.assertLegalName('' + val || '') + } + XMLStringifier2.prototype.text = function (val) { + if (this.options.noValidation) { + return val + } + return this.assertLegalChar(this.textEscape('' + val || '')) + } + XMLStringifier2.prototype.cdata = function (val) { + if (this.options.noValidation) { + return val + } + val = '' + val || '' + val = val.replace(']]>', ']]]]>') + return this.assertLegalChar(val) + } + XMLStringifier2.prototype.comment = function (val) { + if (this.options.noValidation) { + return val + } + val = '' + val || '' + if (val.match(/--/)) { + throw new Error('Comment text cannot contain double-hypen: ' + val) + } + return this.assertLegalChar(val) + } + XMLStringifier2.prototype.raw = function (val) { + if (this.options.noValidation) { + return val + } + return '' + val || '' + } + XMLStringifier2.prototype.attValue = function (val) { + if (this.options.noValidation) { + return val + } + return this.assertLegalChar(this.attEscape((val = '' + val || ''))) + } + XMLStringifier2.prototype.insTarget = function (val) { + if (this.options.noValidation) { + return val + } + return this.assertLegalChar('' + val || '') + } + XMLStringifier2.prototype.insValue = function (val) { + if (this.options.noValidation) { + return val + } + val = '' + val || '' + if (val.match(/\?>/)) { + throw new Error('Invalid processing instruction value: ' + val) + } + return this.assertLegalChar(val) + } + XMLStringifier2.prototype.xmlVersion = function (val) { + if (this.options.noValidation) { + return val + } + val = '' + val || '' + if (!val.match(/1\.[0-9]+/)) { + throw new Error('Invalid version number: ' + val) + } + return val + } + XMLStringifier2.prototype.xmlEncoding = function (val) { + if (this.options.noValidation) { + return val + } + val = '' + val || '' + if (!val.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)) { + throw new Error('Invalid encoding: ' + val) + } + return this.assertLegalChar(val) + } + XMLStringifier2.prototype.xmlStandalone = function (val) { + if (this.options.noValidation) { + return val + } + if (val) { + return 'yes' + } else { + return 'no' + } + } + XMLStringifier2.prototype.dtdPubID = function (val) { + if (this.options.noValidation) { + return val + } + return this.assertLegalChar('' + val || '') + } + XMLStringifier2.prototype.dtdSysID = function (val) { + if (this.options.noValidation) { + return val + } + return this.assertLegalChar('' + val || '') + } + XMLStringifier2.prototype.dtdElementValue = function (val) { + if (this.options.noValidation) { + return val + } + return this.assertLegalChar('' + val || '') + } + XMLStringifier2.prototype.dtdAttType = function (val) { + if (this.options.noValidation) { + return val + } + return this.assertLegalChar('' + val || '') + } + XMLStringifier2.prototype.dtdAttDefault = function (val) { + if (this.options.noValidation) { + return val + } + return this.assertLegalChar('' + val || '') + } + XMLStringifier2.prototype.dtdEntityValue = function (val) { + if (this.options.noValidation) { + return val + } + return this.assertLegalChar('' + val || '') + } + XMLStringifier2.prototype.dtdNData = function (val) { + if (this.options.noValidation) { + return val + } + return this.assertLegalChar('' + val || '') + } + XMLStringifier2.prototype.convertAttKey = '@' + XMLStringifier2.prototype.convertPIKey = '?' + XMLStringifier2.prototype.convertTextKey = '#text' + XMLStringifier2.prototype.convertCDataKey = '#cdata' + XMLStringifier2.prototype.convertCommentKey = '#comment' + XMLStringifier2.prototype.convertRawKey = '#raw' + XMLStringifier2.prototype.assertLegalChar = function (str) { + var regex, res + if (this.options.noValidation) { + return str + } + regex = '' + if (this.options.version === '1.0') { + regex = + /[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/ + if ((res = str.match(regex))) { + throw new Error( + 'Invalid character in string: ' + + str + + ' at index ' + + res.index, + ) + } + } else if (this.options.version === '1.1') { + regex = + /[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/ + if ((res = str.match(regex))) { + throw new Error( + 'Invalid character in string: ' + + str + + ' at index ' + + res.index, + ) + } + } + return str + } + XMLStringifier2.prototype.assertLegalName = function (str) { + var regex + if (this.options.noValidation) { + return str + } + this.assertLegalChar(str) + regex = + /^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/ + if (!str.match(regex)) { + throw new Error('Invalid character in name') + } + return str + } + XMLStringifier2.prototype.textEscape = function (str) { + var ampregex + if (this.options.noValidation) { + return str + } + ampregex = this.options.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g + return str + .replace(ampregex, '&') + .replace(//g, '>') + .replace(/\r/g, ' ') + } + XMLStringifier2.prototype.attEscape = function (str) { + var ampregex + if (this.options.noValidation) { + return str + } + ampregex = this.options.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g + return str + .replace(ampregex, '&') + .replace(/ 0) { + return new Array(indentLevel).join(options.indent) + } + } + return '' + } + XMLWriterBase2.prototype.endline = function (node, options, level) { + if (!options.pretty || options.suppressPrettyCount) { + return '' + } else { + return options.newline + } + } + XMLWriterBase2.prototype.attribute = function (att, options, level) { + var r + this.openAttribute(att, options, level) + r = ' ' + att.name + '="' + att.value + '"' + this.closeAttribute(att, options, level) + return r + } + XMLWriterBase2.prototype.cdata = function (node, options, level) { + var r + this.openNode(node, options, level) + options.state = WriterState.OpenTag + r = this.indent(node, options, level) + '' + this.endline(node, options, level) + options.state = WriterState.None + this.closeNode(node, options, level) + return r + } + XMLWriterBase2.prototype.comment = function (node, options, level) { + var r + this.openNode(node, options, level) + options.state = WriterState.OpenTag + r = this.indent(node, options, level) + '' + this.endline(node, options, level) + options.state = WriterState.None + this.closeNode(node, options, level) + return r + } + XMLWriterBase2.prototype.declaration = function (node, options, level) { + var r + this.openNode(node, options, level) + options.state = WriterState.OpenTag + r = this.indent(node, options, level) + '' + r += this.endline(node, options, level) + options.state = WriterState.None + this.closeNode(node, options, level) + return r + } + XMLWriterBase2.prototype.docType = function (node, options, level) { + var child, i, len, r, ref + level || (level = 0) + this.openNode(node, options, level) + options.state = WriterState.OpenTag + r = this.indent(node, options, level) + r += ' 0) { + r += ' [' + r += this.endline(node, options, level) + options.state = WriterState.InsideTag + ref = node.children + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i] + r += this.writeChildNode(child, options, level + 1) + } + options.state = WriterState.CloseTag + r += ']' + } + options.state = WriterState.CloseTag + r += options.spaceBeforeSlash + '>' + r += this.endline(node, options, level) + options.state = WriterState.None + this.closeNode(node, options, level) + return r + } + XMLWriterBase2.prototype.element = function (node, options, level) { + var att, + child, + childNodeCount, + firstChildNode, + i, + j, + len, + len1, + name, + prettySuppressed, + r, + ref, + ref1, + ref2 + level || (level = 0) + prettySuppressed = false + r = '' + this.openNode(node, options, level) + options.state = WriterState.OpenTag + r += this.indent(node, options, level) + '<' + node.name + ref = node.attribs + for (name in ref) { + if (!hasProp.call(ref, name)) continue + att = ref[name] + r += this.attribute(att, options, level) + } + childNodeCount = node.children.length + firstChildNode = childNodeCount === 0 ? null : node.children[0] + if ( + childNodeCount === 0 || + node.children.every(function (e) { + return ( + (e.type === NodeType.Text || e.type === NodeType.Raw) && + e.value === '' + ) + }) + ) { + if (options.allowEmpty) { + r += '>' + options.state = WriterState.CloseTag + r += '' + this.endline(node, options, level) + } else { + options.state = WriterState.CloseTag + r += + options.spaceBeforeSlash + + '/>' + + this.endline(node, options, level) + } + } else if ( + options.pretty && + childNodeCount === 1 && + (firstChildNode.type === NodeType.Text || + firstChildNode.type === NodeType.Raw) && + firstChildNode.value != null + ) { + r += '>' + options.state = WriterState.InsideTag + options.suppressPrettyCount++ + prettySuppressed = true + r += this.writeChildNode(firstChildNode, options, level + 1) + options.suppressPrettyCount-- + prettySuppressed = false + options.state = WriterState.CloseTag + r += '' + this.endline(node, options, level) + } else { + if (options.dontPrettyTextNodes) { + ref1 = node.children + for (i = 0, len = ref1.length; i < len; i++) { + child = ref1[i] + if ( + (child.type === NodeType.Text || + child.type === NodeType.Raw) && + child.value != null + ) { + options.suppressPrettyCount++ + prettySuppressed = true + break + } + } + } + r += '>' + this.endline(node, options, level) + options.state = WriterState.InsideTag + ref2 = node.children + for (j = 0, len1 = ref2.length; j < len1; j++) { + child = ref2[j] + r += this.writeChildNode(child, options, level + 1) + } + options.state = WriterState.CloseTag + r += this.indent(node, options, level) + '' + if (prettySuppressed) { + options.suppressPrettyCount-- + } + r += this.endline(node, options, level) + options.state = WriterState.None + } + this.closeNode(node, options, level) + return r + } + XMLWriterBase2.prototype.writeChildNode = function ( + node, + options, + level, + ) { + switch (node.type) { + case NodeType.CData: + return this.cdata(node, options, level) + case NodeType.Comment: + return this.comment(node, options, level) + case NodeType.Element: + return this.element(node, options, level) + case NodeType.Raw: + return this.raw(node, options, level) + case NodeType.Text: + return this.text(node, options, level) + case NodeType.ProcessingInstruction: + return this.processingInstruction(node, options, level) + case NodeType.Dummy: + return '' + case NodeType.Declaration: + return this.declaration(node, options, level) + case NodeType.DocType: + return this.docType(node, options, level) + case NodeType.AttributeDeclaration: + return this.dtdAttList(node, options, level) + case NodeType.ElementDeclaration: + return this.dtdElement(node, options, level) + case NodeType.EntityDeclaration: + return this.dtdEntity(node, options, level) + case NodeType.NotationDeclaration: + return this.dtdNotation(node, options, level) + default: + throw new Error('Unknown XML node type: ' + node.constructor.name) + } + } + XMLWriterBase2.prototype.processingInstruction = function ( + node, + options, + level, + ) { + var r + this.openNode(node, options, level) + options.state = WriterState.OpenTag + r = this.indent(node, options, level) + '' + r += this.endline(node, options, level) + options.state = WriterState.None + this.closeNode(node, options, level) + return r + } + XMLWriterBase2.prototype.raw = function (node, options, level) { + var r + this.openNode(node, options, level) + options.state = WriterState.OpenTag + r = this.indent(node, options, level) + options.state = WriterState.InsideTag + r += node.value + options.state = WriterState.CloseTag + r += this.endline(node, options, level) + options.state = WriterState.None + this.closeNode(node, options, level) + return r + } + XMLWriterBase2.prototype.text = function (node, options, level) { + var r + this.openNode(node, options, level) + options.state = WriterState.OpenTag + r = this.indent(node, options, level) + options.state = WriterState.InsideTag + r += node.value + options.state = WriterState.CloseTag + r += this.endline(node, options, level) + options.state = WriterState.None + this.closeNode(node, options, level) + return r + } + XMLWriterBase2.prototype.dtdAttList = function (node, options, level) { + var r + this.openNode(node, options, level) + options.state = WriterState.OpenTag + r = this.indent(node, options, level) + '' + this.endline(node, options, level) + options.state = WriterState.None + this.closeNode(node, options, level) + return r + } + XMLWriterBase2.prototype.dtdElement = function (node, options, level) { + var r + this.openNode(node, options, level) + options.state = WriterState.OpenTag + r = this.indent(node, options, level) + '' + this.endline(node, options, level) + options.state = WriterState.None + this.closeNode(node, options, level) + return r + } + XMLWriterBase2.prototype.dtdEntity = function (node, options, level) { + var r + this.openNode(node, options, level) + options.state = WriterState.OpenTag + r = this.indent(node, options, level) + '' + this.endline(node, options, level) + options.state = WriterState.None + this.closeNode(node, options, level) + return r + } + XMLWriterBase2.prototype.dtdNotation = function (node, options, level) { + var r + this.openNode(node, options, level) + options.state = WriterState.OpenTag + r = this.indent(node, options, level) + '' + this.endline(node, options, level) + options.state = WriterState.None + this.closeNode(node, options, level) + return r + } + XMLWriterBase2.prototype.openNode = function (node, options, level) {} + XMLWriterBase2.prototype.closeNode = function (node, options, level) {} + XMLWriterBase2.prototype.openAttribute = function ( + att, + options, + level, + ) {} + XMLWriterBase2.prototype.closeAttribute = function ( + att, + options, + level, + ) {} + return XMLWriterBase2 + })() + }.call(exports)) + }, +}) + +// node_modules/xmlbuilder/lib/XMLStringWriter.js +var require_XMLStringWriter = __commonJS({ + 'node_modules/xmlbuilder/lib/XMLStringWriter.js'(exports, module) { + init_define_process() + ;(function () { + var XMLStringWriter, + XMLWriterBase, + extend = function (child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) child[key] = parent[key] + } + function ctor() { + this.constructor = child + } + ctor.prototype = parent.prototype + child.prototype = new ctor() + child.__super__ = parent.prototype + return child + }, + hasProp = {}.hasOwnProperty + XMLWriterBase = require_XMLWriterBase() + module.exports = XMLStringWriter = (function (superClass) { + extend(XMLStringWriter2, superClass) + function XMLStringWriter2(options) { + XMLStringWriter2.__super__.constructor.call(this, options) + } + XMLStringWriter2.prototype.document = function (doc, options) { + var child, i, len, r, ref + options = this.filterOptions(options) + r = '' + ref = doc.children + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i] + r += this.writeChildNode(child, options, 0) + } + if ( + options.pretty && + r.slice(-options.newline.length) === options.newline + ) { + r = r.slice(0, -options.newline.length) + } + return r + } + return XMLStringWriter2 + })(XMLWriterBase) + }.call(exports)) + }, +}) + +// node_modules/xmlbuilder/lib/XMLDocument.js +var require_XMLDocument = __commonJS({ + 'node_modules/xmlbuilder/lib/XMLDocument.js'(exports, module) { + init_define_process() + ;(function () { + var NodeType, + XMLDOMConfiguration, + XMLDOMImplementation, + XMLDocument, + XMLNode, + XMLStringWriter, + XMLStringifier, + isPlainObject, + extend = function (child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) child[key] = parent[key] + } + function ctor() { + this.constructor = child + } + ctor.prototype = parent.prototype + child.prototype = new ctor() + child.__super__ = parent.prototype + return child + }, + hasProp = {}.hasOwnProperty + isPlainObject = require_Utility().isPlainObject + XMLDOMImplementation = require_XMLDOMImplementation() + XMLDOMConfiguration = require_XMLDOMConfiguration() + XMLNode = require_XMLNode() + NodeType = require_NodeType() + XMLStringifier = require_XMLStringifier() + XMLStringWriter = require_XMLStringWriter() + module.exports = XMLDocument = (function (superClass) { + extend(XMLDocument2, superClass) + function XMLDocument2(options) { + XMLDocument2.__super__.constructor.call(this, null) + this.name = '#document' + this.type = NodeType.Document + this.documentURI = null + this.domConfig = new XMLDOMConfiguration() + options || (options = {}) + if (!options.writer) { + options.writer = new XMLStringWriter() + } + this.options = options + this.stringify = new XMLStringifier(options) + } + Object.defineProperty(XMLDocument2.prototype, 'implementation', { + value: new XMLDOMImplementation(), + }) + Object.defineProperty(XMLDocument2.prototype, 'doctype', { + get: function () { + var child, i, len, ref + ref = this.children + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i] + if (child.type === NodeType.DocType) { + return child + } + } + return null + }, + }) + Object.defineProperty(XMLDocument2.prototype, 'documentElement', { + get: function () { + return this.rootObject || null + }, + }) + Object.defineProperty(XMLDocument2.prototype, 'inputEncoding', { + get: function () { + return null + }, + }) + Object.defineProperty(XMLDocument2.prototype, 'strictErrorChecking', { + get: function () { + return false + }, + }) + Object.defineProperty(XMLDocument2.prototype, 'xmlEncoding', { + get: function () { + if ( + this.children.length !== 0 && + this.children[0].type === NodeType.Declaration + ) { + return this.children[0].encoding + } else { + return null + } + }, + }) + Object.defineProperty(XMLDocument2.prototype, 'xmlStandalone', { + get: function () { + if ( + this.children.length !== 0 && + this.children[0].type === NodeType.Declaration + ) { + return this.children[0].standalone === 'yes' + } else { + return false + } + }, + }) + Object.defineProperty(XMLDocument2.prototype, 'xmlVersion', { + get: function () { + if ( + this.children.length !== 0 && + this.children[0].type === NodeType.Declaration + ) { + return this.children[0].version + } else { + return '1.0' + } + }, + }) + Object.defineProperty(XMLDocument2.prototype, 'URL', { + get: function () { + return this.documentURI + }, + }) + Object.defineProperty(XMLDocument2.prototype, 'origin', { + get: function () { + return null + }, + }) + Object.defineProperty(XMLDocument2.prototype, 'compatMode', { + get: function () { + return null + }, + }) + Object.defineProperty(XMLDocument2.prototype, 'characterSet', { + get: function () { + return null + }, + }) + Object.defineProperty(XMLDocument2.prototype, 'contentType', { + get: function () { + return null + }, + }) + XMLDocument2.prototype.end = function (writer) { + var writerOptions + writerOptions = {} + if (!writer) { + writer = this.options.writer + } else if (isPlainObject(writer)) { + writerOptions = writer + writer = this.options.writer + } + return writer.document(this, writer.filterOptions(writerOptions)) + } + XMLDocument2.prototype.toString = function (options) { + return this.options.writer.document( + this, + this.options.writer.filterOptions(options), + ) + } + XMLDocument2.prototype.createElement = function (tagName) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLDocument2.prototype.createDocumentFragment = function () { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLDocument2.prototype.createTextNode = function (data) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLDocument2.prototype.createComment = function (data) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLDocument2.prototype.createCDATASection = function (data) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLDocument2.prototype.createProcessingInstruction = function ( + target, + data, + ) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLDocument2.prototype.createAttribute = function (name) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLDocument2.prototype.createEntityReference = function (name) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLDocument2.prototype.getElementsByTagName = function (tagname) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLDocument2.prototype.importNode = function (importedNode, deep) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLDocument2.prototype.createElementNS = function ( + namespaceURI, + qualifiedName, + ) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLDocument2.prototype.createAttributeNS = function ( + namespaceURI, + qualifiedName, + ) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLDocument2.prototype.getElementsByTagNameNS = function ( + namespaceURI, + localName, + ) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLDocument2.prototype.getElementById = function (elementId) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLDocument2.prototype.adoptNode = function (source) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLDocument2.prototype.normalizeDocument = function () { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLDocument2.prototype.renameNode = function ( + node, + namespaceURI, + qualifiedName, + ) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLDocument2.prototype.getElementsByClassName = function (classNames) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLDocument2.prototype.createEvent = function (eventInterface) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLDocument2.prototype.createRange = function () { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLDocument2.prototype.createNodeIterator = function ( + root, + whatToShow, + filter, + ) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + XMLDocument2.prototype.createTreeWalker = function ( + root, + whatToShow, + filter, + ) { + throw new Error( + 'This DOM method is not implemented.' + this.debugInfo(), + ) + } + return XMLDocument2 + })(XMLNode) + }.call(exports)) + }, +}) + +// node_modules/xmlbuilder/lib/XMLDocumentCB.js +var require_XMLDocumentCB = __commonJS({ + 'node_modules/xmlbuilder/lib/XMLDocumentCB.js'(exports, module) { + init_define_process() + ;(function () { + var NodeType, + WriterState, + XMLAttribute, + XMLCData, + XMLComment, + XMLDTDAttList, + XMLDTDElement, + XMLDTDEntity, + XMLDTDNotation, + XMLDeclaration, + XMLDocType, + XMLDocument, + XMLDocumentCB, + XMLElement, + XMLProcessingInstruction, + XMLRaw, + XMLStringWriter, + XMLStringifier, + XMLText, + getValue, + isFunction, + isObject, + isPlainObject, + ref, + hasProp = {}.hasOwnProperty + ;(ref = require_Utility()), + (isObject = ref.isObject), + (isFunction = ref.isFunction), + (isPlainObject = ref.isPlainObject), + (getValue = ref.getValue) + NodeType = require_NodeType() + XMLDocument = require_XMLDocument() + XMLElement = require_XMLElement() + XMLCData = require_XMLCData() + XMLComment = require_XMLComment() + XMLRaw = require_XMLRaw() + XMLText = require_XMLText() + XMLProcessingInstruction = require_XMLProcessingInstruction() + XMLDeclaration = require_XMLDeclaration() + XMLDocType = require_XMLDocType() + XMLDTDAttList = require_XMLDTDAttList() + XMLDTDEntity = require_XMLDTDEntity() + XMLDTDElement = require_XMLDTDElement() + XMLDTDNotation = require_XMLDTDNotation() + XMLAttribute = require_XMLAttribute() + XMLStringifier = require_XMLStringifier() + XMLStringWriter = require_XMLStringWriter() + WriterState = require_WriterState() + module.exports = XMLDocumentCB = (function () { + function XMLDocumentCB2(options, onData, onEnd) { + var writerOptions + this.name = '?xml' + this.type = NodeType.Document + options || (options = {}) + writerOptions = {} + if (!options.writer) { + options.writer = new XMLStringWriter() + } else if (isPlainObject(options.writer)) { + writerOptions = options.writer + options.writer = new XMLStringWriter() + } + this.options = options + this.writer = options.writer + this.writerOptions = this.writer.filterOptions(writerOptions) + this.stringify = new XMLStringifier(options) + this.onDataCallback = onData || function () {} + this.onEndCallback = onEnd || function () {} + this.currentNode = null + this.currentLevel = -1 + this.openTags = {} + this.documentStarted = false + this.documentCompleted = false + this.root = null + } + XMLDocumentCB2.prototype.createChildNode = function (node) { + var att, attName, attributes, child, i, len, ref1, ref2 + switch (node.type) { + case NodeType.CData: + this.cdata(node.value) + break + case NodeType.Comment: + this.comment(node.value) + break + case NodeType.Element: + attributes = {} + ref1 = node.attribs + for (attName in ref1) { + if (!hasProp.call(ref1, attName)) continue + att = ref1[attName] + attributes[attName] = att.value + } + this.node(node.name, attributes) + break + case NodeType.Dummy: + this.dummy() + break + case NodeType.Raw: + this.raw(node.value) + break + case NodeType.Text: + this.text(node.value) + break + case NodeType.ProcessingInstruction: + this.instruction(node.target, node.value) + break + default: + throw new Error( + 'This XML node type is not supported in a JS object: ' + + node.constructor.name, + ) + } + ref2 = node.children + for (i = 0, len = ref2.length; i < len; i++) { + child = ref2[i] + this.createChildNode(child) + if (child.type === NodeType.Element) { + this.up() + } + } + return this + } + XMLDocumentCB2.prototype.dummy = function () { + return this + } + XMLDocumentCB2.prototype.node = function (name, attributes, text) { + var ref1 + if (name == null) { + throw new Error('Missing node name.') + } + if (this.root && this.currentLevel === -1) { + throw new Error( + 'Document can only have one root node. ' + this.debugInfo(name), + ) + } + this.openCurrent() + name = getValue(name) + if (attributes == null) { + attributes = {} + } + attributes = getValue(attributes) + if (!isObject(attributes)) { + ;(ref1 = [attributes, text]), + (text = ref1[0]), + (attributes = ref1[1]) + } + this.currentNode = new XMLElement(this, name, attributes) + this.currentNode.children = false + this.currentLevel++ + this.openTags[this.currentLevel] = this.currentNode + if (text != null) { + this.text(text) + } + return this + } + XMLDocumentCB2.prototype.element = function (name, attributes, text) { + var child, i, len, oldValidationFlag, ref1, root + if (this.currentNode && this.currentNode.type === NodeType.DocType) { + this.dtdElement.apply(this, arguments) + } else { + if (Array.isArray(name) || isObject(name) || isFunction(name)) { + oldValidationFlag = this.options.noValidation + this.options.noValidation = true + root = new XMLDocument(this.options).element('TEMP_ROOT') + root.element(name) + this.options.noValidation = oldValidationFlag + ref1 = root.children + for (i = 0, len = ref1.length; i < len; i++) { + child = ref1[i] + this.createChildNode(child) + if (child.type === NodeType.Element) { + this.up() + } + } + } else { + this.node(name, attributes, text) + } + } + return this + } + XMLDocumentCB2.prototype.attribute = function (name, value) { + var attName, attValue + if (!this.currentNode || this.currentNode.children) { + throw new Error( + 'att() can only be used immediately after an ele() call in callback mode. ' + + this.debugInfo(name), + ) + } + if (name != null) { + name = getValue(name) + } + if (isObject(name)) { + for (attName in name) { + if (!hasProp.call(name, attName)) continue + attValue = name[attName] + this.attribute(attName, attValue) + } + } else { + if (isFunction(value)) { + value = value.apply() + } + if (this.options.keepNullAttributes && value == null) { + this.currentNode.attribs[name] = new XMLAttribute(this, name, '') + } else if (value != null) { + this.currentNode.attribs[name] = new XMLAttribute( + this, + name, + value, + ) + } + } + return this + } + XMLDocumentCB2.prototype.text = function (value) { + var node + this.openCurrent() + node = new XMLText(this, value) + this.onData( + this.writer.text(node, this.writerOptions, this.currentLevel + 1), + this.currentLevel + 1, + ) + return this + } + XMLDocumentCB2.prototype.cdata = function (value) { + var node + this.openCurrent() + node = new XMLCData(this, value) + this.onData( + this.writer.cdata(node, this.writerOptions, this.currentLevel + 1), + this.currentLevel + 1, + ) + return this + } + XMLDocumentCB2.prototype.comment = function (value) { + var node + this.openCurrent() + node = new XMLComment(this, value) + this.onData( + this.writer.comment( + node, + this.writerOptions, + this.currentLevel + 1, + ), + this.currentLevel + 1, + ) + return this + } + XMLDocumentCB2.prototype.raw = function (value) { + var node + this.openCurrent() + node = new XMLRaw(this, value) + this.onData( + this.writer.raw(node, this.writerOptions, this.currentLevel + 1), + this.currentLevel + 1, + ) + return this + } + XMLDocumentCB2.prototype.instruction = function (target, value) { + var i, insTarget, insValue, len, node + this.openCurrent() + if (target != null) { + target = getValue(target) + } + if (value != null) { + value = getValue(value) + } + if (Array.isArray(target)) { + for (i = 0, len = target.length; i < len; i++) { + insTarget = target[i] + this.instruction(insTarget) + } + } else if (isObject(target)) { + for (insTarget in target) { + if (!hasProp.call(target, insTarget)) continue + insValue = target[insTarget] + this.instruction(insTarget, insValue) + } + } else { + if (isFunction(value)) { + value = value.apply() + } + node = new XMLProcessingInstruction(this, target, value) + this.onData( + this.writer.processingInstruction( + node, + this.writerOptions, + this.currentLevel + 1, + ), + this.currentLevel + 1, + ) + } + return this + } + XMLDocumentCB2.prototype.declaration = function ( + version, + encoding, + standalone, + ) { + var node + this.openCurrent() + if (this.documentStarted) { + throw new Error('declaration() must be the first node.') + } + node = new XMLDeclaration(this, version, encoding, standalone) + this.onData( + this.writer.declaration( + node, + this.writerOptions, + this.currentLevel + 1, + ), + this.currentLevel + 1, + ) + return this + } + XMLDocumentCB2.prototype.doctype = function (root, pubID, sysID) { + this.openCurrent() + if (root == null) { + throw new Error('Missing root node name.') + } + if (this.root) { + throw new Error('dtd() must come before the root node.') + } + this.currentNode = new XMLDocType(this, pubID, sysID) + this.currentNode.rootNodeName = root + this.currentNode.children = false + this.currentLevel++ + this.openTags[this.currentLevel] = this.currentNode + return this + } + XMLDocumentCB2.prototype.dtdElement = function (name, value) { + var node + this.openCurrent() + node = new XMLDTDElement(this, name, value) + this.onData( + this.writer.dtdElement( + node, + this.writerOptions, + this.currentLevel + 1, + ), + this.currentLevel + 1, + ) + return this + } + XMLDocumentCB2.prototype.attList = function ( + elementName, + attributeName, + attributeType, + defaultValueType, + defaultValue, + ) { + var node + this.openCurrent() + node = new XMLDTDAttList( + this, + elementName, + attributeName, + attributeType, + defaultValueType, + defaultValue, + ) + this.onData( + this.writer.dtdAttList( + node, + this.writerOptions, + this.currentLevel + 1, + ), + this.currentLevel + 1, + ) + return this + } + XMLDocumentCB2.prototype.entity = function (name, value) { + var node + this.openCurrent() + node = new XMLDTDEntity(this, false, name, value) + this.onData( + this.writer.dtdEntity( + node, + this.writerOptions, + this.currentLevel + 1, + ), + this.currentLevel + 1, + ) + return this + } + XMLDocumentCB2.prototype.pEntity = function (name, value) { + var node + this.openCurrent() + node = new XMLDTDEntity(this, true, name, value) + this.onData( + this.writer.dtdEntity( + node, + this.writerOptions, + this.currentLevel + 1, + ), + this.currentLevel + 1, + ) + return this + } + XMLDocumentCB2.prototype.notation = function (name, value) { + var node + this.openCurrent() + node = new XMLDTDNotation(this, name, value) + this.onData( + this.writer.dtdNotation( + node, + this.writerOptions, + this.currentLevel + 1, + ), + this.currentLevel + 1, + ) + return this + } + XMLDocumentCB2.prototype.up = function () { + if (this.currentLevel < 0) { + throw new Error('The document node has no parent.') + } + if (this.currentNode) { + if (this.currentNode.children) { + this.closeNode(this.currentNode) + } else { + this.openNode(this.currentNode) + } + this.currentNode = null + } else { + this.closeNode(this.openTags[this.currentLevel]) + } + delete this.openTags[this.currentLevel] + this.currentLevel-- + return this + } + XMLDocumentCB2.prototype.end = function () { + while (this.currentLevel >= 0) { + this.up() + } + return this.onEnd() + } + XMLDocumentCB2.prototype.openCurrent = function () { + if (this.currentNode) { + this.currentNode.children = true + return this.openNode(this.currentNode) + } + } + XMLDocumentCB2.prototype.openNode = function (node) { + var att, chunk, name, ref1 + if (!node.isOpen) { + if ( + !this.root && + this.currentLevel === 0 && + node.type === NodeType.Element + ) { + this.root = node + } + chunk = '' + if (node.type === NodeType.Element) { + this.writerOptions.state = WriterState.OpenTag + chunk = + this.writer.indent( + node, + this.writerOptions, + this.currentLevel, + ) + + '<' + + node.name + ref1 = node.attribs + for (name in ref1) { + if (!hasProp.call(ref1, name)) continue + att = ref1[name] + chunk += this.writer.attribute( + att, + this.writerOptions, + this.currentLevel, + ) + } + chunk += + (node.children ? '>' : '/>') + + this.writer.endline(node, this.writerOptions, this.currentLevel) + this.writerOptions.state = WriterState.InsideTag + } else { + this.writerOptions.state = WriterState.OpenTag + chunk = + this.writer.indent( + node, + this.writerOptions, + this.currentLevel, + ) + + '' + } + chunk += this.writer.endline( + node, + this.writerOptions, + this.currentLevel, + ) + } + this.onData(chunk, this.currentLevel) + return (node.isOpen = true) + } + } + XMLDocumentCB2.prototype.closeNode = function (node) { + var chunk + if (!node.isClosed) { + chunk = '' + this.writerOptions.state = WriterState.CloseTag + if (node.type === NodeType.Element) { + chunk = + this.writer.indent( + node, + this.writerOptions, + this.currentLevel, + ) + + '' + + this.writer.endline(node, this.writerOptions, this.currentLevel) + } else { + chunk = + this.writer.indent( + node, + this.writerOptions, + this.currentLevel, + ) + + ']>' + + this.writer.endline(node, this.writerOptions, this.currentLevel) + } + this.writerOptions.state = WriterState.None + this.onData(chunk, this.currentLevel) + return (node.isClosed = true) + } + } + XMLDocumentCB2.prototype.onData = function (chunk, level) { + this.documentStarted = true + return this.onDataCallback(chunk, level + 1) + } + XMLDocumentCB2.prototype.onEnd = function () { + this.documentCompleted = true + return this.onEndCallback() + } + XMLDocumentCB2.prototype.debugInfo = function (name) { + if (name == null) { + return '' + } else { + return 'node: <' + name + '>' + } + } + XMLDocumentCB2.prototype.ele = function () { + return this.element.apply(this, arguments) + } + XMLDocumentCB2.prototype.nod = function (name, attributes, text) { + return this.node(name, attributes, text) + } + XMLDocumentCB2.prototype.txt = function (value) { + return this.text(value) + } + XMLDocumentCB2.prototype.dat = function (value) { + return this.cdata(value) + } + XMLDocumentCB2.prototype.com = function (value) { + return this.comment(value) + } + XMLDocumentCB2.prototype.ins = function (target, value) { + return this.instruction(target, value) + } + XMLDocumentCB2.prototype.dec = function ( + version, + encoding, + standalone, + ) { + return this.declaration(version, encoding, standalone) + } + XMLDocumentCB2.prototype.dtd = function (root, pubID, sysID) { + return this.doctype(root, pubID, sysID) + } + XMLDocumentCB2.prototype.e = function (name, attributes, text) { + return this.element(name, attributes, text) + } + XMLDocumentCB2.prototype.n = function (name, attributes, text) { + return this.node(name, attributes, text) + } + XMLDocumentCB2.prototype.t = function (value) { + return this.text(value) + } + XMLDocumentCB2.prototype.d = function (value) { + return this.cdata(value) + } + XMLDocumentCB2.prototype.c = function (value) { + return this.comment(value) + } + XMLDocumentCB2.prototype.r = function (value) { + return this.raw(value) + } + XMLDocumentCB2.prototype.i = function (target, value) { + return this.instruction(target, value) + } + XMLDocumentCB2.prototype.att = function () { + if (this.currentNode && this.currentNode.type === NodeType.DocType) { + return this.attList.apply(this, arguments) + } else { + return this.attribute.apply(this, arguments) + } + } + XMLDocumentCB2.prototype.a = function () { + if (this.currentNode && this.currentNode.type === NodeType.DocType) { + return this.attList.apply(this, arguments) + } else { + return this.attribute.apply(this, arguments) + } + } + XMLDocumentCB2.prototype.ent = function (name, value) { + return this.entity(name, value) + } + XMLDocumentCB2.prototype.pent = function (name, value) { + return this.pEntity(name, value) + } + XMLDocumentCB2.prototype.not = function (name, value) { + return this.notation(name, value) + } + return XMLDocumentCB2 + })() + }.call(exports)) + }, +}) + +// node_modules/xmlbuilder/lib/XMLStreamWriter.js +var require_XMLStreamWriter = __commonJS({ + 'node_modules/xmlbuilder/lib/XMLStreamWriter.js'(exports, module) { + init_define_process() + ;(function () { + var NodeType, + WriterState, + XMLStreamWriter, + XMLWriterBase, + extend = function (child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) child[key] = parent[key] + } + function ctor() { + this.constructor = child + } + ctor.prototype = parent.prototype + child.prototype = new ctor() + child.__super__ = parent.prototype + return child + }, + hasProp = {}.hasOwnProperty + NodeType = require_NodeType() + XMLWriterBase = require_XMLWriterBase() + WriterState = require_WriterState() + module.exports = XMLStreamWriter = (function (superClass) { + extend(XMLStreamWriter2, superClass) + function XMLStreamWriter2(stream, options) { + this.stream = stream + XMLStreamWriter2.__super__.constructor.call(this, options) + } + XMLStreamWriter2.prototype.endline = function (node, options, level) { + if (node.isLastRootNode && options.state === WriterState.CloseTag) { + return '' + } else { + return XMLStreamWriter2.__super__.endline.call( + this, + node, + options, + level, + ) + } + } + XMLStreamWriter2.prototype.document = function (doc, options) { + var child, i, j, k, len, len1, ref, ref1, results + ref = doc.children + for (i = j = 0, len = ref.length; j < len; i = ++j) { + child = ref[i] + child.isLastRootNode = i === doc.children.length - 1 + } + options = this.filterOptions(options) + ref1 = doc.children + results = [] + for (k = 0, len1 = ref1.length; k < len1; k++) { + child = ref1[k] + results.push(this.writeChildNode(child, options, 0)) + } + return results + } + XMLStreamWriter2.prototype.attribute = function (att, options, level) { + return this.stream.write( + XMLStreamWriter2.__super__.attribute.call( + this, + att, + options, + level, + ), + ) + } + XMLStreamWriter2.prototype.cdata = function (node, options, level) { + return this.stream.write( + XMLStreamWriter2.__super__.cdata.call(this, node, options, level), + ) + } + XMLStreamWriter2.prototype.comment = function (node, options, level) { + return this.stream.write( + XMLStreamWriter2.__super__.comment.call(this, node, options, level), + ) + } + XMLStreamWriter2.prototype.declaration = function ( + node, + options, + level, + ) { + return this.stream.write( + XMLStreamWriter2.__super__.declaration.call( + this, + node, + options, + level, + ), + ) + } + XMLStreamWriter2.prototype.docType = function (node, options, level) { + var child, j, len, ref + level || (level = 0) + this.openNode(node, options, level) + options.state = WriterState.OpenTag + this.stream.write(this.indent(node, options, level)) + this.stream.write(' 0) { + this.stream.write(' [') + this.stream.write(this.endline(node, options, level)) + options.state = WriterState.InsideTag + ref = node.children + for (j = 0, len = ref.length; j < len; j++) { + child = ref[j] + this.writeChildNode(child, options, level + 1) + } + options.state = WriterState.CloseTag + this.stream.write(']') + } + options.state = WriterState.CloseTag + this.stream.write(options.spaceBeforeSlash + '>') + this.stream.write(this.endline(node, options, level)) + options.state = WriterState.None + return this.closeNode(node, options, level) + } + XMLStreamWriter2.prototype.element = function (node, options, level) { + var att, + child, + childNodeCount, + firstChildNode, + j, + len, + name, + prettySuppressed, + ref, + ref1 + level || (level = 0) + this.openNode(node, options, level) + options.state = WriterState.OpenTag + this.stream.write(this.indent(node, options, level) + '<' + node.name) + ref = node.attribs + for (name in ref) { + if (!hasProp.call(ref, name)) continue + att = ref[name] + this.attribute(att, options, level) + } + childNodeCount = node.children.length + firstChildNode = childNodeCount === 0 ? null : node.children[0] + if ( + childNodeCount === 0 || + node.children.every(function (e) { + return ( + (e.type === NodeType.Text || e.type === NodeType.Raw) && + e.value === '' + ) + }) + ) { + if (options.allowEmpty) { + this.stream.write('>') + options.state = WriterState.CloseTag + this.stream.write('') + } else { + options.state = WriterState.CloseTag + this.stream.write(options.spaceBeforeSlash + '/>') + } + } else if ( + options.pretty && + childNodeCount === 1 && + (firstChildNode.type === NodeType.Text || + firstChildNode.type === NodeType.Raw) && + firstChildNode.value != null + ) { + this.stream.write('>') + options.state = WriterState.InsideTag + options.suppressPrettyCount++ + prettySuppressed = true + this.writeChildNode(firstChildNode, options, level + 1) + options.suppressPrettyCount-- + prettySuppressed = false + options.state = WriterState.CloseTag + this.stream.write('') + } else { + this.stream.write('>' + this.endline(node, options, level)) + options.state = WriterState.InsideTag + ref1 = node.children + for (j = 0, len = ref1.length; j < len; j++) { + child = ref1[j] + this.writeChildNode(child, options, level + 1) + } + options.state = WriterState.CloseTag + this.stream.write( + this.indent(node, options, level) + '', + ) + } + this.stream.write(this.endline(node, options, level)) + options.state = WriterState.None + return this.closeNode(node, options, level) + } + XMLStreamWriter2.prototype.processingInstruction = function ( + node, + options, + level, + ) { + return this.stream.write( + XMLStreamWriter2.__super__.processingInstruction.call( + this, + node, + options, + level, + ), + ) + } + XMLStreamWriter2.prototype.raw = function (node, options, level) { + return this.stream.write( + XMLStreamWriter2.__super__.raw.call(this, node, options, level), + ) + } + XMLStreamWriter2.prototype.text = function (node, options, level) { + return this.stream.write( + XMLStreamWriter2.__super__.text.call(this, node, options, level), + ) + } + XMLStreamWriter2.prototype.dtdAttList = function ( + node, + options, + level, + ) { + return this.stream.write( + XMLStreamWriter2.__super__.dtdAttList.call( + this, + node, + options, + level, + ), + ) + } + XMLStreamWriter2.prototype.dtdElement = function ( + node, + options, + level, + ) { + return this.stream.write( + XMLStreamWriter2.__super__.dtdElement.call( + this, + node, + options, + level, + ), + ) + } + XMLStreamWriter2.prototype.dtdEntity = function (node, options, level) { + return this.stream.write( + XMLStreamWriter2.__super__.dtdEntity.call( + this, + node, + options, + level, + ), + ) + } + XMLStreamWriter2.prototype.dtdNotation = function ( + node, + options, + level, + ) { + return this.stream.write( + XMLStreamWriter2.__super__.dtdNotation.call( + this, + node, + options, + level, + ), + ) + } + return XMLStreamWriter2 + })(XMLWriterBase) + }.call(exports)) + }, +}) + +// node_modules/xmlbuilder/lib/index.js +var require_lib = __commonJS({ + 'node_modules/xmlbuilder/lib/index.js'(exports, module) { + init_define_process() + ;(function () { + var NodeType, + WriterState, + XMLDOMImplementation, + XMLDocument, + XMLDocumentCB, + XMLStreamWriter, + XMLStringWriter, + assign, + isFunction, + ref + ;(ref = require_Utility()), + (assign = ref.assign), + (isFunction = ref.isFunction) + XMLDOMImplementation = require_XMLDOMImplementation() + XMLDocument = require_XMLDocument() + XMLDocumentCB = require_XMLDocumentCB() + XMLStringWriter = require_XMLStringWriter() + XMLStreamWriter = require_XMLStreamWriter() + NodeType = require_NodeType() + WriterState = require_WriterState() + module.exports.create = function (name, xmldec, doctype, options) { + var doc, root + if (name == null) { + throw new Error('Root element needs a name.') + } + options = assign({}, xmldec, doctype, options) + doc = new XMLDocument(options) + root = doc.element(name) + if (!options.headless) { + doc.declaration(options) + if (options.pubID != null || options.sysID != null) { + doc.dtd(options) + } + } + return root + } + module.exports.begin = function (options, onData, onEnd) { + var ref1 + if (isFunction(options)) { + ;(ref1 = [options, onData]), (onData = ref1[0]), (onEnd = ref1[1]) + options = {} + } + if (onData) { + return new XMLDocumentCB(options, onData, onEnd) + } else { + return new XMLDocument(options) + } + } + module.exports.stringWriter = function (options) { + return new XMLStringWriter(options) + } + module.exports.streamWriter = function (stream, options) { + return new XMLStreamWriter(stream, options) + } + module.exports.implementation = new XMLDOMImplementation() + module.exports.nodeType = NodeType + module.exports.writerState = WriterState + }.call(exports)) + }, +}) + +// node_modules/xml2js/lib/builder.js +var require_builder = __commonJS({ + 'node_modules/xml2js/lib/builder.js'(exports) { + init_define_process() + ;(function () { + 'use strict' + var builder, + defaults, + escapeCDATA, + requiresCDATA, + wrapCDATA, + hasProp = {}.hasOwnProperty + builder = require_lib() + defaults = require_defaults().defaults + requiresCDATA = function (entry) { + return ( + typeof entry === 'string' && + (entry.indexOf('&') >= 0 || + entry.indexOf('>') >= 0 || + entry.indexOf('<') >= 0) + ) + } + wrapCDATA = function (entry) { + return '' + } + escapeCDATA = function (entry) { + return entry.replace(']]>', ']]]]>') + } + exports.Builder = (function () { + function Builder(opts) { + var key, ref, value + this.options = {} + ref = defaults['0.2'] + for (key in ref) { + if (!hasProp.call(ref, key)) continue + value = ref[key] + this.options[key] = value + } + for (key in opts) { + if (!hasProp.call(opts, key)) continue + value = opts[key] + this.options[key] = value + } + } + Builder.prototype.buildObject = function (rootObj) { + var attrkey, charkey, render, rootElement, rootName + attrkey = this.options.attrkey + charkey = this.options.charkey + if ( + Object.keys(rootObj).length === 1 && + this.options.rootName === defaults['0.2'].rootName + ) { + rootName = Object.keys(rootObj)[0] + rootObj = rootObj[rootName] + } else { + rootName = this.options.rootName + } + render = (function (_this) { + return function (element, obj) { + var attr, child, entry, index, key, value + if (typeof obj !== 'object') { + if (_this.options.cdata && requiresCDATA(obj)) { + element.raw(wrapCDATA(obj)) + } else { + element.txt(obj) + } + } else if (Array.isArray(obj)) { + for (index in obj) { + if (!hasProp.call(obj, index)) continue + child = obj[index] + for (key in child) { + entry = child[key] + element = render(element.ele(key), entry).up() + } + } + } else { + for (key in obj) { + if (!hasProp.call(obj, key)) continue + child = obj[key] + if (key === attrkey) { + if (typeof child === 'object') { + for (attr in child) { + value = child[attr] + element = element.att(attr, value) + } + } + } else if (key === charkey) { + if (_this.options.cdata && requiresCDATA(child)) { + element = element.raw(wrapCDATA(child)) + } else { + element = element.txt(child) + } + } else if (Array.isArray(child)) { + for (index in child) { + if (!hasProp.call(child, index)) continue + entry = child[index] + if (typeof entry === 'string') { + if (_this.options.cdata && requiresCDATA(entry)) { + element = element.ele(key).raw(wrapCDATA(entry)).up() + } else { + element = element.ele(key, entry).up() + } + } else { + element = render(element.ele(key), entry).up() + } + } + } else if (typeof child === 'object') { + element = render(element.ele(key), child).up() + } else { + if ( + typeof child === 'string' && + _this.options.cdata && + requiresCDATA(child) + ) { + element = element.ele(key).raw(wrapCDATA(child)).up() + } else { + if (child == null) { + child = '' + } + element = element.ele(key, child.toString()).up() + } + } + } + } + return element + } + })(this) + rootElement = builder.create( + rootName, + this.options.xmldec, + this.options.doctype, + { + headless: this.options.headless, + allowSurrogateChars: this.options.allowSurrogateChars, + }, + ) + return render(rootElement, rootObj).end(this.options.renderOpts) + } + return Builder + })() + }.call(exports)) + }, +}) + +// node_modules/base64-js/index.js +var require_base64_js = __commonJS({ + 'node_modules/base64-js/index.js'(exports) { + 'use strict' + init_define_process() + exports.byteLength = byteLength + exports.toByteArray = toByteArray + exports.fromByteArray = fromByteArray + var lookup = [] + var revLookup = [] + var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array + var code = + 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' + for (i = 0, len = code.length; i < len; ++i) { + lookup[i] = code[i] + revLookup[code.charCodeAt(i)] = i + } + var i + var len + revLookup['-'.charCodeAt(0)] = 62 + revLookup['_'.charCodeAt(0)] = 63 + function getLens(b64) { + var len2 = b64.length + if (len2 % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + var validLen = b64.indexOf('=') + if (validLen === -1) validLen = len2 + var placeHoldersLen = validLen === len2 ? 0 : 4 - (validLen % 4) + return [validLen, placeHoldersLen] + } + function byteLength(b64) { + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + return ((validLen + placeHoldersLen) * 3) / 4 - placeHoldersLen + } + function _byteLength(b64, validLen, placeHoldersLen) { + return ((validLen + placeHoldersLen) * 3) / 4 - placeHoldersLen + } + function toByteArray(b64) { + var tmp + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) + var curByte = 0 + var len2 = placeHoldersLen > 0 ? validLen - 4 : validLen + var i2 + for (i2 = 0; i2 < len2; i2 += 4) { + tmp = + (revLookup[b64.charCodeAt(i2)] << 18) | + (revLookup[b64.charCodeAt(i2 + 1)] << 12) | + (revLookup[b64.charCodeAt(i2 + 2)] << 6) | + revLookup[b64.charCodeAt(i2 + 3)] + arr[curByte++] = (tmp >> 16) & 255 + arr[curByte++] = (tmp >> 8) & 255 + arr[curByte++] = tmp & 255 + } + if (placeHoldersLen === 2) { + tmp = + (revLookup[b64.charCodeAt(i2)] << 2) | + (revLookup[b64.charCodeAt(i2 + 1)] >> 4) + arr[curByte++] = tmp & 255 + } + if (placeHoldersLen === 1) { + tmp = + (revLookup[b64.charCodeAt(i2)] << 10) | + (revLookup[b64.charCodeAt(i2 + 1)] << 4) | + (revLookup[b64.charCodeAt(i2 + 2)] >> 2) + arr[curByte++] = (tmp >> 8) & 255 + arr[curByte++] = tmp & 255 + } + return arr + } + function tripletToBase64(num) { + return ( + lookup[(num >> 18) & 63] + + lookup[(num >> 12) & 63] + + lookup[(num >> 6) & 63] + + lookup[num & 63] + ) + } + function encodeChunk(uint8, start, end) { + var tmp + var output = [] + for (var i2 = start; i2 < end; i2 += 3) { + tmp = + ((uint8[i2] << 16) & 16711680) + + ((uint8[i2 + 1] << 8) & 65280) + + (uint8[i2 + 2] & 255) + output.push(tripletToBase64(tmp)) + } + return output.join('') + } + function fromByteArray(uint8) { + var tmp + var len2 = uint8.length + var extraBytes = len2 % 3 + var parts = [] + var maxChunkLength = 16383 + for ( + var i2 = 0, len22 = len2 - extraBytes; + i2 < len22; + i2 += maxChunkLength + ) { + parts.push( + encodeChunk( + uint8, + i2, + i2 + maxChunkLength > len22 ? len22 : i2 + maxChunkLength, + ), + ) + } + if (extraBytes === 1) { + tmp = uint8[len2 - 1] + parts.push(lookup[tmp >> 2] + lookup[(tmp << 4) & 63] + '==') + } else if (extraBytes === 2) { + tmp = (uint8[len2 - 2] << 8) + uint8[len2 - 1] + parts.push( + lookup[tmp >> 10] + + lookup[(tmp >> 4) & 63] + + lookup[(tmp << 2) & 63] + + '=', + ) + } + return parts.join('') + } + }, +}) + +// node_modules/ieee754/index.js +var require_ieee754 = __commonJS({ + 'node_modules/ieee754/index.js'(exports) { + init_define_process() + exports.read = function (buffer, offset, isLE, mLen, nBytes) { + var e, m + var eLen = nBytes * 8 - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var nBits = -7 + var i = isLE ? nBytes - 1 : 0 + var d = isLE ? -1 : 1 + var s = buffer[offset + i] + i += d + e = s & ((1 << -nBits) - 1) + s >>= -nBits + nBits += eLen + for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} + m = e & ((1 << -nBits) - 1) + e >>= -nBits + nBits += mLen + for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} + if (e === 0) { + e = 1 - eBias + } else if (e === eMax) { + return m ? NaN : (s ? -1 : 1) * Infinity + } else { + m = m + Math.pow(2, mLen) + e = e - eBias + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen) + } + exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c + var eLen = nBytes * 8 - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0 + var i = isLE ? 0 : nBytes - 1 + var d = isLE ? 1 : -1 + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 + value = Math.abs(value) + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0 + e = eMax + } else { + e = Math.floor(Math.log(value) / Math.LN2) + if (value * (c = Math.pow(2, -e)) < 1) { + e-- + c *= 2 + } + if (e + eBias >= 1) { + value += rt / c + } else { + value += rt * Math.pow(2, 1 - eBias) + } + if (value * c >= 2) { + e++ + c /= 2 + } + if (e + eBias >= eMax) { + m = 0 + e = eMax + } else if (e + eBias >= 1) { + m = (value * c - 1) * Math.pow(2, mLen) + e = e + eBias + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) + e = 0 + } + } + for ( + ; + mLen >= 8; + buffer[offset + i] = m & 255, i += d, m /= 256, mLen -= 8 + ) {} + e = (e << mLen) | m + eLen += mLen + for ( + ; + eLen > 0; + buffer[offset + i] = e & 255, i += d, e /= 256, eLen -= 8 + ) {} + buffer[offset + i - d] |= s * 128 + } + }, +}) + +// node_modules/buffer/index.js +var require_buffer = __commonJS({ + 'node_modules/buffer/index.js'(exports) { + 'use strict' + init_define_process() + var base64 = require_base64_js() + var ieee754 = require_ieee754() + var customInspectSymbol = + typeof Symbol === 'function' && typeof Symbol['for'] === 'function' + ? Symbol['for']('nodejs.util.inspect.custom') + : null + exports.Buffer = Buffer2 + exports.SlowBuffer = SlowBuffer + exports.INSPECT_MAX_BYTES = 50 + var K_MAX_LENGTH = 2147483647 + exports.kMaxLength = K_MAX_LENGTH + Buffer2.TYPED_ARRAY_SUPPORT = typedArraySupport() + if ( + !Buffer2.TYPED_ARRAY_SUPPORT && + typeof console !== 'undefined' && + typeof console.error === 'function' + ) { + console.error( + 'This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.', + ) + } + function typedArraySupport() { + try { + const arr = new Uint8Array(1) + const proto = { + foo: function () { + return 42 + }, + } + Object.setPrototypeOf(proto, Uint8Array.prototype) + Object.setPrototypeOf(arr, proto) + return arr.foo() === 42 + } catch (e) { + return false + } + } + Object.defineProperty(Buffer2.prototype, 'parent', { + enumerable: true, + get: function () { + if (!Buffer2.isBuffer(this)) return void 0 + return this.buffer + }, + }) + Object.defineProperty(Buffer2.prototype, 'offset', { + enumerable: true, + get: function () { + if (!Buffer2.isBuffer(this)) return void 0 + return this.byteOffset + }, + }) + function createBuffer(length) { + if (length > K_MAX_LENGTH) { + throw new RangeError( + 'The value "' + length + '" is invalid for option "size"', + ) + } + const buf = new Uint8Array(length) + Object.setPrototypeOf(buf, Buffer2.prototype) + return buf + } + function Buffer2(arg, encodingOrOffset, length) { + if (typeof arg === 'number') { + if (typeof encodingOrOffset === 'string') { + throw new TypeError( + 'The "string" argument must be of type string. Received type number', + ) + } + return allocUnsafe(arg) + } + return from(arg, encodingOrOffset, length) + } + Buffer2.poolSize = 8192 + function from(value, encodingOrOffset, length) { + if (typeof value === 'string') { + return fromString(value, encodingOrOffset) + } + if (ArrayBuffer.isView(value)) { + return fromArrayView(value) + } + if (value == null) { + throw new TypeError( + 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + + typeof value, + ) + } + if ( + isInstance(value, ArrayBuffer) || + (value && isInstance(value.buffer, ArrayBuffer)) + ) { + return fromArrayBuffer(value, encodingOrOffset, length) + } + if ( + typeof SharedArrayBuffer !== 'undefined' && + (isInstance(value, SharedArrayBuffer) || + (value && isInstance(value.buffer, SharedArrayBuffer))) + ) { + return fromArrayBuffer(value, encodingOrOffset, length) + } + if (typeof value === 'number') { + throw new TypeError( + 'The "value" argument must not be of type number. Received type number', + ) + } + const valueOf = value.valueOf && value.valueOf() + if (valueOf != null && valueOf !== value) { + return Buffer2.from(valueOf, encodingOrOffset, length) + } + const b = fromObject(value) + if (b) return b + if ( + typeof Symbol !== 'undefined' && + Symbol.toPrimitive != null && + typeof value[Symbol.toPrimitive] === 'function' + ) { + return Buffer2.from( + value[Symbol.toPrimitive]('string'), + encodingOrOffset, + length, + ) + } + throw new TypeError( + 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + + typeof value, + ) + } + Buffer2.from = function (value, encodingOrOffset, length) { + return from(value, encodingOrOffset, length) + } + Object.setPrototypeOf(Buffer2.prototype, Uint8Array.prototype) + Object.setPrototypeOf(Buffer2, Uint8Array) + function assertSize(size) { + if (typeof size !== 'number') { + throw new TypeError('"size" argument must be of type number') + } else if (size < 0) { + throw new RangeError( + 'The value "' + size + '" is invalid for option "size"', + ) + } + } + function alloc(size, fill, encoding) { + assertSize(size) + if (size <= 0) { + return createBuffer(size) + } + if (fill !== void 0) { + return typeof encoding === 'string' + ? createBuffer(size).fill(fill, encoding) + : createBuffer(size).fill(fill) + } + return createBuffer(size) + } + Buffer2.alloc = function (size, fill, encoding) { + return alloc(size, fill, encoding) + } + function allocUnsafe(size) { + assertSize(size) + return createBuffer(size < 0 ? 0 : checked(size) | 0) + } + Buffer2.allocUnsafe = function (size) { + return allocUnsafe(size) + } + Buffer2.allocUnsafeSlow = function (size) { + return allocUnsafe(size) + } + function fromString(string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8' + } + if (!Buffer2.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + const length = byteLength(string, encoding) | 0 + let buf = createBuffer(length) + const actual = buf.write(string, encoding) + if (actual !== length) { + buf = buf.slice(0, actual) + } + return buf + } + function fromArrayLike(array) { + const length = array.length < 0 ? 0 : checked(array.length) | 0 + const buf = createBuffer(length) + for (let i = 0; i < length; i += 1) { + buf[i] = array[i] & 255 + } + return buf + } + function fromArrayView(arrayView) { + if (isInstance(arrayView, Uint8Array)) { + const copy = new Uint8Array(arrayView) + return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength) + } + return fromArrayLike(arrayView) + } + function fromArrayBuffer(array, byteOffset, length) { + if (byteOffset < 0 || array.byteLength < byteOffset) { + throw new RangeError('"offset" is outside of buffer bounds') + } + if (array.byteLength < byteOffset + (length || 0)) { + throw new RangeError('"length" is outside of buffer bounds') + } + let buf + if (byteOffset === void 0 && length === void 0) { + buf = new Uint8Array(array) + } else if (length === void 0) { + buf = new Uint8Array(array, byteOffset) + } else { + buf = new Uint8Array(array, byteOffset, length) + } + Object.setPrototypeOf(buf, Buffer2.prototype) + return buf + } + function fromObject(obj) { + if (Buffer2.isBuffer(obj)) { + const len = checked(obj.length) | 0 + const buf = createBuffer(len) + if (buf.length === 0) { + return buf + } + obj.copy(buf, 0, 0, len) + return buf + } + if (obj.length !== void 0) { + if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) { + return createBuffer(0) + } + return fromArrayLike(obj) + } + if (obj.type === 'Buffer' && Array.isArray(obj.data)) { + return fromArrayLike(obj.data) + } + } + function checked(length) { + if (length >= K_MAX_LENGTH) { + throw new RangeError( + 'Attempt to allocate Buffer larger than maximum size: 0x' + + K_MAX_LENGTH.toString(16) + + ' bytes', + ) + } + return length | 0 + } + function SlowBuffer(length) { + if (+length != length) { + length = 0 + } + return Buffer2.alloc(+length) + } + Buffer2.isBuffer = function isBuffer(b) { + return b != null && b._isBuffer === true && b !== Buffer2.prototype + } + Buffer2.compare = function compare(a, b) { + if (isInstance(a, Uint8Array)) a = Buffer2.from(a, a.offset, a.byteLength) + if (isInstance(b, Uint8Array)) b = Buffer2.from(b, b.offset, b.byteLength) + if (!Buffer2.isBuffer(a) || !Buffer2.isBuffer(b)) { + throw new TypeError( + 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array', + ) + } + if (a === b) return 0 + let x = a.length + let y = b.length + for (let i = 0, len = Math.min(x, y); i < len; ++i) { + if (a[i] !== b[i]) { + x = a[i] + y = b[i] + break + } + } + if (x < y) return -1 + if (y < x) return 1 + return 0 + } + Buffer2.isEncoding = function isEncoding(encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'latin1': + case 'binary': + case 'base64': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false + } + } + Buffer2.concat = function concat(list, length) { + if (!Array.isArray(list)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + if (list.length === 0) { + return Buffer2.alloc(0) + } + let i + if (length === void 0) { + length = 0 + for (i = 0; i < list.length; ++i) { + length += list[i].length + } + } + const buffer = Buffer2.allocUnsafe(length) + let pos = 0 + for (i = 0; i < list.length; ++i) { + let buf = list[i] + if (isInstance(buf, Uint8Array)) { + if (pos + buf.length > buffer.length) { + if (!Buffer2.isBuffer(buf)) buf = Buffer2.from(buf) + buf.copy(buffer, pos) + } else { + Uint8Array.prototype.set.call(buffer, buf, pos) + } + } else if (!Buffer2.isBuffer(buf)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } else { + buf.copy(buffer, pos) + } + pos += buf.length + } + return buffer + } + function byteLength(string, encoding) { + if (Buffer2.isBuffer(string)) { + return string.length + } + if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) { + return string.byteLength + } + if (typeof string !== 'string') { + throw new TypeError( + 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + + typeof string, + ) + } + const len = string.length + const mustMatch = arguments.length > 2 && arguments[2] === true + if (!mustMatch && len === 0) return 0 + let loweredCase = false + for (;;) { + switch (encoding) { + case 'ascii': + case 'latin1': + case 'binary': + return len + case 'utf8': + case 'utf-8': + return utf8ToBytes(string).length + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2 + case 'hex': + return len >>> 1 + case 'base64': + return base64ToBytes(string).length + default: + if (loweredCase) { + return mustMatch ? -1 : utf8ToBytes(string).length + } + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } + } + Buffer2.byteLength = byteLength + function slowToString(encoding, start, end) { + let loweredCase = false + if (start === void 0 || start < 0) { + start = 0 + } + if (start > this.length) { + return '' + } + if (end === void 0 || end > this.length) { + end = this.length + } + if (end <= 0) { + return '' + } + end >>>= 0 + start >>>= 0 + if (end <= start) { + return '' + } + if (!encoding) encoding = 'utf8' + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end) + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end) + case 'ascii': + return asciiSlice(this, start, end) + case 'latin1': + case 'binary': + return latin1Slice(this, start, end) + case 'base64': + return base64Slice(this, start, end) + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end) + default: + if (loweredCase) + throw new TypeError('Unknown encoding: ' + encoding) + encoding = (encoding + '').toLowerCase() + loweredCase = true + } + } + } + Buffer2.prototype._isBuffer = true + function swap(b, n, m) { + const i = b[n] + b[n] = b[m] + b[m] = i + } + Buffer2.prototype.swap16 = function swap16() { + const len = this.length + if (len % 2 !== 0) { + throw new RangeError('Buffer size must be a multiple of 16-bits') + } + for (let i = 0; i < len; i += 2) { + swap(this, i, i + 1) + } + return this + } + Buffer2.prototype.swap32 = function swap32() { + const len = this.length + if (len % 4 !== 0) { + throw new RangeError('Buffer size must be a multiple of 32-bits') + } + for (let i = 0; i < len; i += 4) { + swap(this, i, i + 3) + swap(this, i + 1, i + 2) + } + return this + } + Buffer2.prototype.swap64 = function swap64() { + const len = this.length + if (len % 8 !== 0) { + throw new RangeError('Buffer size must be a multiple of 64-bits') + } + for (let i = 0; i < len; i += 8) { + swap(this, i, i + 7) + swap(this, i + 1, i + 6) + swap(this, i + 2, i + 5) + swap(this, i + 3, i + 4) + } + return this + } + Buffer2.prototype.toString = function toString() { + const length = this.length + if (length === 0) return '' + if (arguments.length === 0) return utf8Slice(this, 0, length) + return slowToString.apply(this, arguments) + } + Buffer2.prototype.toLocaleString = Buffer2.prototype.toString + Buffer2.prototype.equals = function equals(b) { + if (!Buffer2.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return true + return Buffer2.compare(this, b) === 0 + } + Buffer2.prototype.inspect = function inspect() { + let str = '' + const max = exports.INSPECT_MAX_BYTES + str = this.toString('hex', 0, max) + .replace(/(.{2})/g, '$1 ') + .trim() + if (this.length > max) str += ' ... ' + return '' + } + if (customInspectSymbol) { + Buffer2.prototype[customInspectSymbol] = Buffer2.prototype.inspect + } + Buffer2.prototype.compare = function compare( + target, + start, + end, + thisStart, + thisEnd, + ) { + if (isInstance(target, Uint8Array)) { + target = Buffer2.from(target, target.offset, target.byteLength) + } + if (!Buffer2.isBuffer(target)) { + throw new TypeError( + 'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + + typeof target, + ) + } + if (start === void 0) { + start = 0 + } + if (end === void 0) { + end = target ? target.length : 0 + } + if (thisStart === void 0) { + thisStart = 0 + } + if (thisEnd === void 0) { + thisEnd = this.length + } + if ( + start < 0 || + end > target.length || + thisStart < 0 || + thisEnd > this.length + ) { + throw new RangeError('out of range index') + } + if (thisStart >= thisEnd && start >= end) { + return 0 + } + if (thisStart >= thisEnd) { + return -1 + } + if (start >= end) { + return 1 + } + start >>>= 0 + end >>>= 0 + thisStart >>>= 0 + thisEnd >>>= 0 + if (this === target) return 0 + let x = thisEnd - thisStart + let y = end - start + const len = Math.min(x, y) + const thisCopy = this.slice(thisStart, thisEnd) + const targetCopy = target.slice(start, end) + for (let i = 0; i < len; ++i) { + if (thisCopy[i] !== targetCopy[i]) { + x = thisCopy[i] + y = targetCopy[i] + break + } + } + if (x < y) return -1 + if (y < x) return 1 + return 0 + } + function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) { + if (buffer.length === 0) return -1 + if (typeof byteOffset === 'string') { + encoding = byteOffset + byteOffset = 0 + } else if (byteOffset > 2147483647) { + byteOffset = 2147483647 + } else if (byteOffset < -2147483648) { + byteOffset = -2147483648 + } + byteOffset = +byteOffset + if (numberIsNaN(byteOffset)) { + byteOffset = dir ? 0 : buffer.length - 1 + } + if (byteOffset < 0) byteOffset = buffer.length + byteOffset + if (byteOffset >= buffer.length) { + if (dir) return -1 + else byteOffset = buffer.length - 1 + } else if (byteOffset < 0) { + if (dir) byteOffset = 0 + else return -1 + } + if (typeof val === 'string') { + val = Buffer2.from(val, encoding) + } + if (Buffer2.isBuffer(val)) { + if (val.length === 0) { + return -1 + } + return arrayIndexOf(buffer, val, byteOffset, encoding, dir) + } else if (typeof val === 'number') { + val = val & 255 + if (typeof Uint8Array.prototype.indexOf === 'function') { + if (dir) { + return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) + } else { + return Uint8Array.prototype.lastIndexOf.call( + buffer, + val, + byteOffset, + ) + } + } + return arrayIndexOf(buffer, [val], byteOffset, encoding, dir) + } + throw new TypeError('val must be string, number or Buffer') + } + function arrayIndexOf(arr, val, byteOffset, encoding, dir) { + let indexSize = 1 + let arrLength = arr.length + let valLength = val.length + if (encoding !== void 0) { + encoding = String(encoding).toLowerCase() + if ( + encoding === 'ucs2' || + encoding === 'ucs-2' || + encoding === 'utf16le' || + encoding === 'utf-16le' + ) { + if (arr.length < 2 || val.length < 2) { + return -1 + } + indexSize = 2 + arrLength /= 2 + valLength /= 2 + byteOffset /= 2 + } + } + function read(buf, i2) { + if (indexSize === 1) { + return buf[i2] + } else { + return buf.readUInt16BE(i2 * indexSize) + } + } + let i + if (dir) { + let foundIndex = -1 + for (i = byteOffset; i < arrLength; i++) { + if ( + read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex) + ) { + if (foundIndex === -1) foundIndex = i + if (i - foundIndex + 1 === valLength) return foundIndex * indexSize + } else { + if (foundIndex !== -1) i -= i - foundIndex + foundIndex = -1 + } + } + } else { + if (byteOffset + valLength > arrLength) + byteOffset = arrLength - valLength + for (i = byteOffset; i >= 0; i--) { + let found = true + for (let j = 0; j < valLength; j++) { + if (read(arr, i + j) !== read(val, j)) { + found = false + break + } + } + if (found) return i + } + } + return -1 + } + Buffer2.prototype.includes = function includes(val, byteOffset, encoding) { + return this.indexOf(val, byteOffset, encoding) !== -1 + } + Buffer2.prototype.indexOf = function indexOf(val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, true) + } + Buffer2.prototype.lastIndexOf = function lastIndexOf( + val, + byteOffset, + encoding, + ) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, false) + } + function hexWrite(buf, string, offset, length) { + offset = Number(offset) || 0 + const remaining = buf.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } + } + const strLen = string.length + if (length > strLen / 2) { + length = strLen / 2 + } + let i + for (i = 0; i < length; ++i) { + const parsed = parseInt(string.substr(i * 2, 2), 16) + if (numberIsNaN(parsed)) return i + buf[offset + i] = parsed + } + return i + } + function utf8Write(buf, string, offset, length) { + return blitBuffer( + utf8ToBytes(string, buf.length - offset), + buf, + offset, + length, + ) + } + function asciiWrite(buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length) + } + function base64Write(buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length) + } + function ucs2Write(buf, string, offset, length) { + return blitBuffer( + utf16leToBytes(string, buf.length - offset), + buf, + offset, + length, + ) + } + Buffer2.prototype.write = function write(string, offset, length, encoding) { + if (offset === void 0) { + encoding = 'utf8' + length = this.length + offset = 0 + } else if (length === void 0 && typeof offset === 'string') { + encoding = offset + length = this.length + offset = 0 + } else if (isFinite(offset)) { + offset = offset >>> 0 + if (isFinite(length)) { + length = length >>> 0 + if (encoding === void 0) encoding = 'utf8' + } else { + encoding = length + length = void 0 + } + } else { + throw new Error( + 'Buffer.write(string, encoding, offset[, length]) is no longer supported', + ) + } + const remaining = this.length - offset + if (length === void 0 || length > remaining) length = remaining + if ( + (string.length > 0 && (length < 0 || offset < 0)) || + offset > this.length + ) { + throw new RangeError('Attempt to write outside buffer bounds') + } + if (!encoding) encoding = 'utf8' + let loweredCase = false + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite(this, string, offset, length) + case 'utf8': + case 'utf-8': + return utf8Write(this, string, offset, length) + case 'ascii': + case 'latin1': + case 'binary': + return asciiWrite(this, string, offset, length) + case 'base64': + return base64Write(this, string, offset, length) + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write(this, string, offset, length) + default: + if (loweredCase) + throw new TypeError('Unknown encoding: ' + encoding) + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } + } + Buffer2.prototype.toJSON = function toJSON() { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0), + } + } + function base64Slice(buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf) + } else { + return base64.fromByteArray(buf.slice(start, end)) + } + } + function utf8Slice(buf, start, end) { + end = Math.min(buf.length, end) + const res = [] + let i = start + while (i < end) { + const firstByte = buf[i] + let codePoint = null + let bytesPerSequence = + firstByte > 239 ? 4 : firstByte > 223 ? 3 : firstByte > 191 ? 2 : 1 + if (i + bytesPerSequence <= end) { + let secondByte, thirdByte, fourthByte, tempCodePoint + switch (bytesPerSequence) { + case 1: + if (firstByte < 128) { + codePoint = firstByte + } + break + case 2: + secondByte = buf[i + 1] + if ((secondByte & 192) === 128) { + tempCodePoint = ((firstByte & 31) << 6) | (secondByte & 63) + if (tempCodePoint > 127) { + codePoint = tempCodePoint + } + } + break + case 3: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + if ((secondByte & 192) === 128 && (thirdByte & 192) === 128) { + tempCodePoint = + ((firstByte & 15) << 12) | + ((secondByte & 63) << 6) | + (thirdByte & 63) + if ( + tempCodePoint > 2047 && + (tempCodePoint < 55296 || tempCodePoint > 57343) + ) { + codePoint = tempCodePoint + } + } + break + case 4: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + fourthByte = buf[i + 3] + if ( + (secondByte & 192) === 128 && + (thirdByte & 192) === 128 && + (fourthByte & 192) === 128 + ) { + tempCodePoint = + ((firstByte & 15) << 18) | + ((secondByte & 63) << 12) | + ((thirdByte & 63) << 6) | + (fourthByte & 63) + if (tempCodePoint > 65535 && tempCodePoint < 1114112) { + codePoint = tempCodePoint + } + } + } + } + if (codePoint === null) { + codePoint = 65533 + bytesPerSequence = 1 + } else if (codePoint > 65535) { + codePoint -= 65536 + res.push(((codePoint >>> 10) & 1023) | 55296) + codePoint = 56320 | (codePoint & 1023) + } + res.push(codePoint) + i += bytesPerSequence + } + return decodeCodePointsArray(res) + } + var MAX_ARGUMENTS_LENGTH = 4096 + function decodeCodePointsArray(codePoints) { + const len = codePoints.length + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints) + } + let res = '' + let i = 0 + while (i < len) { + res += String.fromCharCode.apply( + String, + codePoints.slice(i, (i += MAX_ARGUMENTS_LENGTH)), + ) + } + return res + } + function asciiSlice(buf, start, end) { + let ret = '' + end = Math.min(buf.length, end) + for (let i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i] & 127) + } + return ret + } + function latin1Slice(buf, start, end) { + let ret = '' + end = Math.min(buf.length, end) + for (let i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i]) + } + return ret + } + function hexSlice(buf, start, end) { + const len = buf.length + if (!start || start < 0) start = 0 + if (!end || end < 0 || end > len) end = len + let out = '' + for (let i = start; i < end; ++i) { + out += hexSliceLookupTable[buf[i]] + } + return out + } + function utf16leSlice(buf, start, end) { + const bytes = buf.slice(start, end) + let res = '' + for (let i = 0; i < bytes.length - 1; i += 2) { + res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) + } + return res + } + Buffer2.prototype.slice = function slice(start, end) { + const len = this.length + start = ~~start + end = end === void 0 ? len : ~~end + if (start < 0) { + start += len + if (start < 0) start = 0 + } else if (start > len) { + start = len + } + if (end < 0) { + end += len + if (end < 0) end = 0 + } else if (end > len) { + end = len + } + if (end < start) end = start + const newBuf = this.subarray(start, end) + Object.setPrototypeOf(newBuf, Buffer2.prototype) + return newBuf + } + function checkOffset(offset, ext, length) { + if (offset % 1 !== 0 || offset < 0) + throw new RangeError('offset is not uint') + if (offset + ext > length) + throw new RangeError('Trying to access beyond buffer length') + } + Buffer2.prototype.readUintLE = Buffer2.prototype.readUIntLE = + function readUIntLE(offset, byteLength2, noAssert) { + offset = offset >>> 0 + byteLength2 = byteLength2 >>> 0 + if (!noAssert) checkOffset(offset, byteLength2, this.length) + let val = this[offset] + let mul = 1 + let i = 0 + while (++i < byteLength2 && (mul *= 256)) { + val += this[offset + i] * mul + } + return val + } + Buffer2.prototype.readUintBE = Buffer2.prototype.readUIntBE = + function readUIntBE(offset, byteLength2, noAssert) { + offset = offset >>> 0 + byteLength2 = byteLength2 >>> 0 + if (!noAssert) { + checkOffset(offset, byteLength2, this.length) + } + let val = this[offset + --byteLength2] + let mul = 1 + while (byteLength2 > 0 && (mul *= 256)) { + val += this[offset + --byteLength2] * mul + } + return val + } + Buffer2.prototype.readUint8 = Buffer2.prototype.readUInt8 = + function readUInt8(offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 1, this.length) + return this[offset] + } + Buffer2.prototype.readUint16LE = Buffer2.prototype.readUInt16LE = + function readUInt16LE(offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + return this[offset] | (this[offset + 1] << 8) + } + Buffer2.prototype.readUint16BE = Buffer2.prototype.readUInt16BE = + function readUInt16BE(offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + return (this[offset] << 8) | this[offset + 1] + } + Buffer2.prototype.readUint32LE = Buffer2.prototype.readUInt32LE = + function readUInt32LE(offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + return ( + (this[offset] | (this[offset + 1] << 8) | (this[offset + 2] << 16)) + + this[offset + 3] * 16777216 + ) + } + Buffer2.prototype.readUint32BE = Buffer2.prototype.readUInt32BE = + function readUInt32BE(offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + return ( + this[offset] * 16777216 + + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) + ) + } + Buffer2.prototype.readBigUInt64LE = defineBigIntMethod( + function readBigUInt64LE(offset) { + offset = offset >>> 0 + validateNumber(offset, 'offset') + const first = this[offset] + const last = this[offset + 7] + if (first === void 0 || last === void 0) { + boundsError(offset, this.length - 8) + } + const lo = + first + + this[++offset] * 2 ** 8 + + this[++offset] * 2 ** 16 + + this[++offset] * 2 ** 24 + const hi = + this[++offset] + + this[++offset] * 2 ** 8 + + this[++offset] * 2 ** 16 + + last * 2 ** 24 + return BigInt(lo) + (BigInt(hi) << BigInt(32)) + }, + ) + Buffer2.prototype.readBigUInt64BE = defineBigIntMethod( + function readBigUInt64BE(offset) { + offset = offset >>> 0 + validateNumber(offset, 'offset') + const first = this[offset] + const last = this[offset + 7] + if (first === void 0 || last === void 0) { + boundsError(offset, this.length - 8) + } + const hi = + first * 2 ** 24 + + this[++offset] * 2 ** 16 + + this[++offset] * 2 ** 8 + + this[++offset] + const lo = + this[++offset] * 2 ** 24 + + this[++offset] * 2 ** 16 + + this[++offset] * 2 ** 8 + + last + return (BigInt(hi) << BigInt(32)) + BigInt(lo) + }, + ) + Buffer2.prototype.readIntLE = function readIntLE( + offset, + byteLength2, + noAssert, + ) { + offset = offset >>> 0 + byteLength2 = byteLength2 >>> 0 + if (!noAssert) checkOffset(offset, byteLength2, this.length) + let val = this[offset] + let mul = 1 + let i = 0 + while (++i < byteLength2 && (mul *= 256)) { + val += this[offset + i] * mul + } + mul *= 128 + if (val >= mul) val -= Math.pow(2, 8 * byteLength2) + return val + } + Buffer2.prototype.readIntBE = function readIntBE( + offset, + byteLength2, + noAssert, + ) { + offset = offset >>> 0 + byteLength2 = byteLength2 >>> 0 + if (!noAssert) checkOffset(offset, byteLength2, this.length) + let i = byteLength2 + let mul = 1 + let val = this[offset + --i] + while (i > 0 && (mul *= 256)) { + val += this[offset + --i] * mul + } + mul *= 128 + if (val >= mul) val -= Math.pow(2, 8 * byteLength2) + return val + } + Buffer2.prototype.readInt8 = function readInt8(offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 1, this.length) + if (!(this[offset] & 128)) return this[offset] + return (255 - this[offset] + 1) * -1 + } + Buffer2.prototype.readInt16LE = function readInt16LE(offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + const val = this[offset] | (this[offset + 1] << 8) + return val & 32768 ? val | 4294901760 : val + } + Buffer2.prototype.readInt16BE = function readInt16BE(offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + const val = this[offset + 1] | (this[offset] << 8) + return val & 32768 ? val | 4294901760 : val + } + Buffer2.prototype.readInt32LE = function readInt32LE(offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + return ( + this[offset] | + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) + ) + } + Buffer2.prototype.readInt32BE = function readInt32BE(offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + return ( + (this[offset] << 24) | + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3] + ) + } + Buffer2.prototype.readBigInt64LE = defineBigIntMethod( + function readBigInt64LE(offset) { + offset = offset >>> 0 + validateNumber(offset, 'offset') + const first = this[offset] + const last = this[offset + 7] + if (first === void 0 || last === void 0) { + boundsError(offset, this.length - 8) + } + const val = + this[offset + 4] + + this[offset + 5] * 2 ** 8 + + this[offset + 6] * 2 ** 16 + + (last << 24) + return ( + (BigInt(val) << BigInt(32)) + + BigInt( + first + + this[++offset] * 2 ** 8 + + this[++offset] * 2 ** 16 + + this[++offset] * 2 ** 24, + ) + ) + }, + ) + Buffer2.prototype.readBigInt64BE = defineBigIntMethod( + function readBigInt64BE(offset) { + offset = offset >>> 0 + validateNumber(offset, 'offset') + const first = this[offset] + const last = this[offset + 7] + if (first === void 0 || last === void 0) { + boundsError(offset, this.length - 8) + } + const val = + (first << 24) + + this[++offset] * 2 ** 16 + + this[++offset] * 2 ** 8 + + this[++offset] + return ( + (BigInt(val) << BigInt(32)) + + BigInt( + this[++offset] * 2 ** 24 + + this[++offset] * 2 ** 16 + + this[++offset] * 2 ** 8 + + last, + ) + ) + }, + ) + Buffer2.prototype.readFloatLE = function readFloatLE(offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, true, 23, 4) + } + Buffer2.prototype.readFloatBE = function readFloatBE(offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, false, 23, 4) + } + Buffer2.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, true, 52, 8) + } + Buffer2.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, false, 52, 8) + } + function checkInt(buf, value, offset, ext, max, min) { + if (!Buffer2.isBuffer(buf)) + throw new TypeError('"buffer" argument must be a Buffer instance') + if (value > max || value < min) + throw new RangeError('"value" argument is out of bounds') + if (offset + ext > buf.length) throw new RangeError('Index out of range') + } + Buffer2.prototype.writeUintLE = Buffer2.prototype.writeUIntLE = + function writeUIntLE(value, offset, byteLength2, noAssert) { + value = +value + offset = offset >>> 0 + byteLength2 = byteLength2 >>> 0 + if (!noAssert) { + const maxBytes = Math.pow(2, 8 * byteLength2) - 1 + checkInt(this, value, offset, byteLength2, maxBytes, 0) + } + let mul = 1 + let i = 0 + this[offset] = value & 255 + while (++i < byteLength2 && (mul *= 256)) { + this[offset + i] = (value / mul) & 255 + } + return offset + byteLength2 + } + Buffer2.prototype.writeUintBE = Buffer2.prototype.writeUIntBE = + function writeUIntBE(value, offset, byteLength2, noAssert) { + value = +value + offset = offset >>> 0 + byteLength2 = byteLength2 >>> 0 + if (!noAssert) { + const maxBytes = Math.pow(2, 8 * byteLength2) - 1 + checkInt(this, value, offset, byteLength2, maxBytes, 0) + } + let i = byteLength2 - 1 + let mul = 1 + this[offset + i] = value & 255 + while (--i >= 0 && (mul *= 256)) { + this[offset + i] = (value / mul) & 255 + } + return offset + byteLength2 + } + Buffer2.prototype.writeUint8 = Buffer2.prototype.writeUInt8 = + function writeUInt8(value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 1, 255, 0) + this[offset] = value & 255 + return offset + 1 + } + Buffer2.prototype.writeUint16LE = Buffer2.prototype.writeUInt16LE = + function writeUInt16LE(value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 65535, 0) + this[offset] = value & 255 + this[offset + 1] = value >>> 8 + return offset + 2 + } + Buffer2.prototype.writeUint16BE = Buffer2.prototype.writeUInt16BE = + function writeUInt16BE(value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 65535, 0) + this[offset] = value >>> 8 + this[offset + 1] = value & 255 + return offset + 2 + } + Buffer2.prototype.writeUint32LE = Buffer2.prototype.writeUInt32LE = + function writeUInt32LE(value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 4294967295, 0) + this[offset + 3] = value >>> 24 + this[offset + 2] = value >>> 16 + this[offset + 1] = value >>> 8 + this[offset] = value & 255 + return offset + 4 + } + Buffer2.prototype.writeUint32BE = Buffer2.prototype.writeUInt32BE = + function writeUInt32BE(value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 4294967295, 0) + this[offset] = value >>> 24 + this[offset + 1] = value >>> 16 + this[offset + 2] = value >>> 8 + this[offset + 3] = value & 255 + return offset + 4 + } + function wrtBigUInt64LE(buf, value, offset, min, max) { + checkIntBI(value, min, max, buf, offset, 7) + let lo = Number(value & BigInt(4294967295)) + buf[offset++] = lo + lo = lo >> 8 + buf[offset++] = lo + lo = lo >> 8 + buf[offset++] = lo + lo = lo >> 8 + buf[offset++] = lo + let hi = Number((value >> BigInt(32)) & BigInt(4294967295)) + buf[offset++] = hi + hi = hi >> 8 + buf[offset++] = hi + hi = hi >> 8 + buf[offset++] = hi + hi = hi >> 8 + buf[offset++] = hi + return offset + } + function wrtBigUInt64BE(buf, value, offset, min, max) { + checkIntBI(value, min, max, buf, offset, 7) + let lo = Number(value & BigInt(4294967295)) + buf[offset + 7] = lo + lo = lo >> 8 + buf[offset + 6] = lo + lo = lo >> 8 + buf[offset + 5] = lo + lo = lo >> 8 + buf[offset + 4] = lo + let hi = Number((value >> BigInt(32)) & BigInt(4294967295)) + buf[offset + 3] = hi + hi = hi >> 8 + buf[offset + 2] = hi + hi = hi >> 8 + buf[offset + 1] = hi + hi = hi >> 8 + buf[offset] = hi + return offset + 8 + } + Buffer2.prototype.writeBigUInt64LE = defineBigIntMethod( + function writeBigUInt64LE(value, offset = 0) { + return wrtBigUInt64LE( + this, + value, + offset, + BigInt(0), + BigInt('0xffffffffffffffff'), + ) + }, + ) + Buffer2.prototype.writeBigUInt64BE = defineBigIntMethod( + function writeBigUInt64BE(value, offset = 0) { + return wrtBigUInt64BE( + this, + value, + offset, + BigInt(0), + BigInt('0xffffffffffffffff'), + ) + }, + ) + Buffer2.prototype.writeIntLE = function writeIntLE( + value, + offset, + byteLength2, + noAssert, + ) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + const limit = Math.pow(2, 8 * byteLength2 - 1) + checkInt(this, value, offset, byteLength2, limit - 1, -limit) + } + let i = 0 + let mul = 1 + let sub = 0 + this[offset] = value & 255 + while (++i < byteLength2 && (mul *= 256)) { + if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { + sub = 1 + } + this[offset + i] = (((value / mul) >> 0) - sub) & 255 + } + return offset + byteLength2 + } + Buffer2.prototype.writeIntBE = function writeIntBE( + value, + offset, + byteLength2, + noAssert, + ) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + const limit = Math.pow(2, 8 * byteLength2 - 1) + checkInt(this, value, offset, byteLength2, limit - 1, -limit) + } + let i = byteLength2 - 1 + let mul = 1 + let sub = 0 + this[offset + i] = value & 255 + while (--i >= 0 && (mul *= 256)) { + if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { + sub = 1 + } + this[offset + i] = (((value / mul) >> 0) - sub) & 255 + } + return offset + byteLength2 + } + Buffer2.prototype.writeInt8 = function writeInt8(value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 1, 127, -128) + if (value < 0) value = 255 + value + 1 + this[offset] = value & 255 + return offset + 1 + } + Buffer2.prototype.writeInt16LE = function writeInt16LE( + value, + offset, + noAssert, + ) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 32767, -32768) + this[offset] = value & 255 + this[offset + 1] = value >>> 8 + return offset + 2 + } + Buffer2.prototype.writeInt16BE = function writeInt16BE( + value, + offset, + noAssert, + ) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 32767, -32768) + this[offset] = value >>> 8 + this[offset + 1] = value & 255 + return offset + 2 + } + Buffer2.prototype.writeInt32LE = function writeInt32LE( + value, + offset, + noAssert, + ) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 2147483647, -2147483648) + this[offset] = value & 255 + this[offset + 1] = value >>> 8 + this[offset + 2] = value >>> 16 + this[offset + 3] = value >>> 24 + return offset + 4 + } + Buffer2.prototype.writeInt32BE = function writeInt32BE( + value, + offset, + noAssert, + ) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 2147483647, -2147483648) + if (value < 0) value = 4294967295 + value + 1 + this[offset] = value >>> 24 + this[offset + 1] = value >>> 16 + this[offset + 2] = value >>> 8 + this[offset + 3] = value & 255 + return offset + 4 + } + Buffer2.prototype.writeBigInt64LE = defineBigIntMethod( + function writeBigInt64LE(value, offset = 0) { + return wrtBigUInt64LE( + this, + value, + offset, + -BigInt('0x8000000000000000'), + BigInt('0x7fffffffffffffff'), + ) + }, + ) + Buffer2.prototype.writeBigInt64BE = defineBigIntMethod( + function writeBigInt64BE(value, offset = 0) { + return wrtBigUInt64BE( + this, + value, + offset, + -BigInt('0x8000000000000000'), + BigInt('0x7fffffffffffffff'), + ) + }, + ) + function checkIEEE754(buf, value, offset, ext, max, min) { + if (offset + ext > buf.length) throw new RangeError('Index out of range') + if (offset < 0) throw new RangeError('Index out of range') + } + function writeFloat(buf, value, offset, littleEndian, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + checkIEEE754( + buf, + value, + offset, + 4, + 34028234663852886e22, + -34028234663852886e22, + ) + } + ieee754.write(buf, value, offset, littleEndian, 23, 4) + return offset + 4 + } + Buffer2.prototype.writeFloatLE = function writeFloatLE( + value, + offset, + noAssert, + ) { + return writeFloat(this, value, offset, true, noAssert) + } + Buffer2.prototype.writeFloatBE = function writeFloatBE( + value, + offset, + noAssert, + ) { + return writeFloat(this, value, offset, false, noAssert) + } + function writeDouble(buf, value, offset, littleEndian, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + checkIEEE754( + buf, + value, + offset, + 8, + 17976931348623157e292, + -17976931348623157e292, + ) + } + ieee754.write(buf, value, offset, littleEndian, 52, 8) + return offset + 8 + } + Buffer2.prototype.writeDoubleLE = function writeDoubleLE( + value, + offset, + noAssert, + ) { + return writeDouble(this, value, offset, true, noAssert) + } + Buffer2.prototype.writeDoubleBE = function writeDoubleBE( + value, + offset, + noAssert, + ) { + return writeDouble(this, value, offset, false, noAssert) + } + Buffer2.prototype.copy = function copy(target, targetStart, start, end) { + if (!Buffer2.isBuffer(target)) + throw new TypeError('argument should be a Buffer') + if (!start) start = 0 + if (!end && end !== 0) end = this.length + if (targetStart >= target.length) targetStart = target.length + if (!targetStart) targetStart = 0 + if (end > 0 && end < start) end = start + if (end === start) return 0 + if (target.length === 0 || this.length === 0) return 0 + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds') + } + if (start < 0 || start >= this.length) + throw new RangeError('Index out of range') + if (end < 0) throw new RangeError('sourceEnd out of bounds') + if (end > this.length) end = this.length + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start + } + const len = end - start + if ( + this === target && + typeof Uint8Array.prototype.copyWithin === 'function' + ) { + this.copyWithin(targetStart, start, end) + } else { + Uint8Array.prototype.set.call( + target, + this.subarray(start, end), + targetStart, + ) + } + return len + } + Buffer2.prototype.fill = function fill(val, start, end, encoding) { + if (typeof val === 'string') { + if (typeof start === 'string') { + encoding = start + start = 0 + end = this.length + } else if (typeof end === 'string') { + encoding = end + end = this.length + } + if (encoding !== void 0 && typeof encoding !== 'string') { + throw new TypeError('encoding must be a string') + } + if (typeof encoding === 'string' && !Buffer2.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + if (val.length === 1) { + const code = val.charCodeAt(0) + if ((encoding === 'utf8' && code < 128) || encoding === 'latin1') { + val = code + } + } + } else if (typeof val === 'number') { + val = val & 255 + } else if (typeof val === 'boolean') { + val = Number(val) + } + if (start < 0 || this.length < start || this.length < end) { + throw new RangeError('Out of range index') + } + if (end <= start) { + return this + } + start = start >>> 0 + end = end === void 0 ? this.length : end >>> 0 + if (!val) val = 0 + let i + if (typeof val === 'number') { + for (i = start; i < end; ++i) { + this[i] = val + } + } else { + const bytes = Buffer2.isBuffer(val) ? val : Buffer2.from(val, encoding) + const len = bytes.length + if (len === 0) { + throw new TypeError( + 'The value "' + val + '" is invalid for argument "value"', + ) + } + for (i = 0; i < end - start; ++i) { + this[i + start] = bytes[i % len] + } + } + return this + } + var errors = {} + function E(sym, getMessage, Base) { + errors[sym] = class NodeError extends Base { + constructor() { + super() + Object.defineProperty(this, 'message', { + value: getMessage.apply(this, arguments), + writable: true, + configurable: true, + }) + this.name = `${this.name} [${sym}]` + this.stack + delete this.name + } + get code() { + return sym + } + set code(value) { + Object.defineProperty(this, 'code', { + configurable: true, + enumerable: true, + value, + writable: true, + }) + } + toString() { + return `${this.name} [${sym}]: ${this.message}` + } + } + } + E( + 'ERR_BUFFER_OUT_OF_BOUNDS', + function (name) { + if (name) { + return `${name} is outside of buffer bounds` + } + return 'Attempt to access memory outside buffer bounds' + }, + RangeError, + ) + E( + 'ERR_INVALID_ARG_TYPE', + function (name, actual) { + return `The "${name}" argument must be of type number. Received type ${typeof actual}` + }, + TypeError, + ) + E( + 'ERR_OUT_OF_RANGE', + function (str, range, input) { + let msg = `The value of "${str}" is out of range.` + let received = input + if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) { + received = addNumericalSeparator(String(input)) + } else if (typeof input === 'bigint') { + received = String(input) + if ( + input > BigInt(2) ** BigInt(32) || + input < -(BigInt(2) ** BigInt(32)) + ) { + received = addNumericalSeparator(received) + } + received += 'n' + } + msg += ` It must be ${range}. Received ${received}` + return msg + }, + RangeError, + ) + function addNumericalSeparator(val) { + let res = '' + let i = val.length + const start = val[0] === '-' ? 1 : 0 + for (; i >= start + 4; i -= 3) { + res = `_${val.slice(i - 3, i)}${res}` + } + return `${val.slice(0, i)}${res}` + } + function checkBounds(buf, offset, byteLength2) { + validateNumber(offset, 'offset') + if (buf[offset] === void 0 || buf[offset + byteLength2] === void 0) { + boundsError(offset, buf.length - (byteLength2 + 1)) + } + } + function checkIntBI(value, min, max, buf, offset, byteLength2) { + if (value > max || value < min) { + const n = typeof min === 'bigint' ? 'n' : '' + let range + if (byteLength2 > 3) { + if (min === 0 || min === BigInt(0)) { + range = `>= 0${n} and < 2${n} ** ${(byteLength2 + 1) * 8}${n}` + } else { + range = `>= -(2${n} ** ${ + (byteLength2 + 1) * 8 - 1 + }${n}) and < 2 ** ${(byteLength2 + 1) * 8 - 1}${n}` + } + } else { + range = `>= ${min}${n} and <= ${max}${n}` + } + throw new errors.ERR_OUT_OF_RANGE('value', range, value) + } + checkBounds(buf, offset, byteLength2) + } + function validateNumber(value, name) { + if (typeof value !== 'number') { + throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value) + } + } + function boundsError(value, length, type) { + if (Math.floor(value) !== value) { + validateNumber(value, type) + throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value) + } + if (length < 0) { + throw new errors.ERR_BUFFER_OUT_OF_BOUNDS() + } + throw new errors.ERR_OUT_OF_RANGE( + type || 'offset', + `>= ${type ? 1 : 0} and <= ${length}`, + value, + ) + } + var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g + function base64clean(str) { + str = str.split('=')[0] + str = str.trim().replace(INVALID_BASE64_RE, '') + if (str.length < 2) return '' + while (str.length % 4 !== 0) { + str = str + '=' + } + return str + } + function utf8ToBytes(string, units) { + units = units || Infinity + let codePoint + const length = string.length + let leadSurrogate = null + const bytes = [] + for (let i = 0; i < length; ++i) { + codePoint = string.charCodeAt(i) + if (codePoint > 55295 && codePoint < 57344) { + if (!leadSurrogate) { + if (codePoint > 56319) { + if ((units -= 3) > -1) bytes.push(239, 191, 189) + continue + } else if (i + 1 === length) { + if ((units -= 3) > -1) bytes.push(239, 191, 189) + continue + } + leadSurrogate = codePoint + continue + } + if (codePoint < 56320) { + if ((units -= 3) > -1) bytes.push(239, 191, 189) + leadSurrogate = codePoint + continue + } + codePoint = + (((leadSurrogate - 55296) << 10) | (codePoint - 56320)) + 65536 + } else if (leadSurrogate) { + if ((units -= 3) > -1) bytes.push(239, 191, 189) + } + leadSurrogate = null + if (codePoint < 128) { + if ((units -= 1) < 0) break + bytes.push(codePoint) + } else if (codePoint < 2048) { + if ((units -= 2) < 0) break + bytes.push((codePoint >> 6) | 192, (codePoint & 63) | 128) + } else if (codePoint < 65536) { + if ((units -= 3) < 0) break + bytes.push( + (codePoint >> 12) | 224, + ((codePoint >> 6) & 63) | 128, + (codePoint & 63) | 128, + ) + } else if (codePoint < 1114112) { + if ((units -= 4) < 0) break + bytes.push( + (codePoint >> 18) | 240, + ((codePoint >> 12) & 63) | 128, + ((codePoint >> 6) & 63) | 128, + (codePoint & 63) | 128, + ) + } else { + throw new Error('Invalid code point') + } + } + return bytes + } + function asciiToBytes(str) { + const byteArray = [] + for (let i = 0; i < str.length; ++i) { + byteArray.push(str.charCodeAt(i) & 255) + } + return byteArray + } + function utf16leToBytes(str, units) { + let c, hi, lo + const byteArray = [] + for (let i = 0; i < str.length; ++i) { + if ((units -= 2) < 0) break + c = str.charCodeAt(i) + hi = c >> 8 + lo = c % 256 + byteArray.push(lo) + byteArray.push(hi) + } + return byteArray + } + function base64ToBytes(str) { + return base64.toByteArray(base64clean(str)) + } + function blitBuffer(src, dst, offset, length) { + let i + for (i = 0; i < length; ++i) { + if (i + offset >= dst.length || i >= src.length) break + dst[i + offset] = src[i] + } + return i + } + function isInstance(obj, type) { + return ( + obj instanceof type || + (obj != null && + obj.constructor != null && + obj.constructor.name != null && + obj.constructor.name === type.name) + ) + } + function numberIsNaN(obj) { + return obj !== obj + } + var hexSliceLookupTable = (function () { + const alphabet = '0123456789abcdef' + const table = new Array(256) + for (let i = 0; i < 16; ++i) { + const i16 = i * 16 + for (let j = 0; j < 16; ++j) { + table[i16 + j] = alphabet[i] + alphabet[j] + } + } + return table + })() + function defineBigIntMethod(fn) { + return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn + } + function BufferBigIntNotDefined() { + throw new Error('BigInt not supported') + } + }, +}) + +// node_modules/safe-buffer/index.js +var require_safe_buffer = __commonJS({ + 'node_modules/safe-buffer/index.js'(exports, module) { + init_define_process() + var buffer = require_buffer() + var Buffer2 = buffer.Buffer + function copyProps(src, dst) { + for (var key in src) { + dst[key] = src[key] + } + } + if ( + Buffer2.from && + Buffer2.alloc && + Buffer2.allocUnsafe && + Buffer2.allocUnsafeSlow + ) { + module.exports = buffer + } else { + copyProps(buffer, exports) + exports.Buffer = SafeBuffer + } + function SafeBuffer(arg, encodingOrOffset, length) { + return Buffer2(arg, encodingOrOffset, length) + } + copyProps(Buffer2, SafeBuffer) + SafeBuffer.from = function (arg, encodingOrOffset, length) { + if (typeof arg === 'number') { + throw new TypeError('Argument must not be a number') + } + return Buffer2(arg, encodingOrOffset, length) + } + SafeBuffer.alloc = function (size, fill, encoding) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + var buf = Buffer2(size) + if (fill !== void 0) { + if (typeof encoding === 'string') { + buf.fill(fill, encoding) + } else { + buf.fill(fill) + } + } else { + buf.fill(0) + } + return buf + } + SafeBuffer.allocUnsafe = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return Buffer2(size) + } + SafeBuffer.allocUnsafeSlow = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return buffer.SlowBuffer(size) + } + }, +}) + +// node_modules/string_decoder/lib/string_decoder.js +var require_string_decoder = __commonJS({ + 'node_modules/string_decoder/lib/string_decoder.js'(exports) { + 'use strict' + init_define_process() + var Buffer2 = require_safe_buffer().Buffer + var isEncoding = + Buffer2.isEncoding || + function (encoding) { + encoding = '' + encoding + switch (encoding && encoding.toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'binary': + case 'base64': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + case 'raw': + return true + default: + return false + } + } + function _normalizeEncoding(enc) { + if (!enc) return 'utf8' + var retried + while (true) { + switch (enc) { + case 'utf8': + case 'utf-8': + return 'utf8' + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return 'utf16le' + case 'latin1': + case 'binary': + return 'latin1' + case 'base64': + case 'ascii': + case 'hex': + return enc + default: + if (retried) return + enc = ('' + enc).toLowerCase() + retried = true + } + } + } + function normalizeEncoding(enc) { + var nenc = _normalizeEncoding(enc) + if ( + typeof nenc !== 'string' && + (Buffer2.isEncoding === isEncoding || !isEncoding(enc)) + ) + throw new Error('Unknown encoding: ' + enc) + return nenc || enc + } + exports.StringDecoder = StringDecoder + function StringDecoder(encoding) { + this.encoding = normalizeEncoding(encoding) + var nb + switch (this.encoding) { + case 'utf16le': + this.text = utf16Text + this.end = utf16End + nb = 4 + break + case 'utf8': + this.fillLast = utf8FillLast + nb = 4 + break + case 'base64': + this.text = base64Text + this.end = base64End + nb = 3 + break + default: + this.write = simpleWrite + this.end = simpleEnd + return + } + this.lastNeed = 0 + this.lastTotal = 0 + this.lastChar = Buffer2.allocUnsafe(nb) + } + StringDecoder.prototype.write = function (buf) { + if (buf.length === 0) return '' + var r + var i + if (this.lastNeed) { + r = this.fillLast(buf) + if (r === void 0) return '' + i = this.lastNeed + this.lastNeed = 0 + } else { + i = 0 + } + if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i) + return r || '' + } + StringDecoder.prototype.end = utf8End + StringDecoder.prototype.text = utf8Text + StringDecoder.prototype.fillLast = function (buf) { + if (this.lastNeed <= buf.length) { + buf.copy( + this.lastChar, + this.lastTotal - this.lastNeed, + 0, + this.lastNeed, + ) + return this.lastChar.toString(this.encoding, 0, this.lastTotal) + } + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length) + this.lastNeed -= buf.length + } + function utf8CheckByte(byte) { + if (byte <= 127) return 0 + else if (byte >> 5 === 6) return 2 + else if (byte >> 4 === 14) return 3 + else if (byte >> 3 === 30) return 4 + return byte >> 6 === 2 ? -1 : -2 + } + function utf8CheckIncomplete(self2, buf, i) { + var j = buf.length - 1 + if (j < i) return 0 + var nb = utf8CheckByte(buf[j]) + if (nb >= 0) { + if (nb > 0) self2.lastNeed = nb - 1 + return nb + } + if (--j < i || nb === -2) return 0 + nb = utf8CheckByte(buf[j]) + if (nb >= 0) { + if (nb > 0) self2.lastNeed = nb - 2 + return nb + } + if (--j < i || nb === -2) return 0 + nb = utf8CheckByte(buf[j]) + if (nb >= 0) { + if (nb > 0) { + if (nb === 2) nb = 0 + else self2.lastNeed = nb - 3 + } + return nb + } + return 0 + } + function utf8CheckExtraBytes(self2, buf, p) { + if ((buf[0] & 192) !== 128) { + self2.lastNeed = 0 + return '\uFFFD' + } + if (self2.lastNeed > 1 && buf.length > 1) { + if ((buf[1] & 192) !== 128) { + self2.lastNeed = 1 + return '\uFFFD' + } + if (self2.lastNeed > 2 && buf.length > 2) { + if ((buf[2] & 192) !== 128) { + self2.lastNeed = 2 + return '\uFFFD' + } + } + } + } + function utf8FillLast(buf) { + var p = this.lastTotal - this.lastNeed + var r = utf8CheckExtraBytes(this, buf, p) + if (r !== void 0) return r + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, p, 0, this.lastNeed) + return this.lastChar.toString(this.encoding, 0, this.lastTotal) + } + buf.copy(this.lastChar, p, 0, buf.length) + this.lastNeed -= buf.length + } + function utf8Text(buf, i) { + var total = utf8CheckIncomplete(this, buf, i) + if (!this.lastNeed) return buf.toString('utf8', i) + this.lastTotal = total + var end = buf.length - (total - this.lastNeed) + buf.copy(this.lastChar, 0, end) + return buf.toString('utf8', i, end) + } + function utf8End(buf) { + var r = buf && buf.length ? this.write(buf) : '' + if (this.lastNeed) return r + '\uFFFD' + return r + } + function utf16Text(buf, i) { + if ((buf.length - i) % 2 === 0) { + var r = buf.toString('utf16le', i) + if (r) { + var c = r.charCodeAt(r.length - 1) + if (c >= 55296 && c <= 56319) { + this.lastNeed = 2 + this.lastTotal = 4 + this.lastChar[0] = buf[buf.length - 2] + this.lastChar[1] = buf[buf.length - 1] + return r.slice(0, -1) + } + } + return r + } + this.lastNeed = 1 + this.lastTotal = 2 + this.lastChar[0] = buf[buf.length - 1] + return buf.toString('utf16le', i, buf.length - 1) + } + function utf16End(buf) { + var r = buf && buf.length ? this.write(buf) : '' + if (this.lastNeed) { + var end = this.lastTotal - this.lastNeed + return r + this.lastChar.toString('utf16le', 0, end) + } + return r + } + function base64Text(buf, i) { + var n = (buf.length - i) % 3 + if (n === 0) return buf.toString('base64', i) + this.lastNeed = 3 - n + this.lastTotal = 3 + if (n === 1) { + this.lastChar[0] = buf[buf.length - 1] + } else { + this.lastChar[0] = buf[buf.length - 2] + this.lastChar[1] = buf[buf.length - 1] + } + return buf.toString('base64', i, buf.length - n) + } + function base64End(buf) { + var r = buf && buf.length ? this.write(buf) : '' + if (this.lastNeed) + return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed) + return r + } + function simpleWrite(buf) { + return buf.toString(this.encoding) + } + function simpleEnd(buf) { + return buf && buf.length ? this.write(buf) : '' + } + }, +}) + +// node_modules/sax/lib/sax.js +var require_sax = __commonJS({ + 'node_modules/sax/lib/sax.js'(exports) { + init_define_process() + ;(function (sax) { + sax.parser = function (strict, opt) { + return new SAXParser(strict, opt) + } + sax.SAXParser = SAXParser + sax.SAXStream = SAXStream + sax.createStream = createStream + sax.MAX_BUFFER_LENGTH = 64 * 1024 + var buffers = [ + 'comment', + 'sgmlDecl', + 'textNode', + 'tagName', + 'doctype', + 'procInstName', + 'procInstBody', + 'entity', + 'attribName', + 'attribValue', + 'cdata', + 'script', + ] + sax.EVENTS = [ + 'text', + 'processinginstruction', + 'sgmldeclaration', + 'doctype', + 'comment', + 'opentagstart', + 'attribute', + 'opentag', + 'closetag', + 'opencdata', + 'cdata', + 'closecdata', + 'error', + 'end', + 'ready', + 'script', + 'opennamespace', + 'closenamespace', + ] + function SAXParser(strict, opt) { + if (!(this instanceof SAXParser)) { + return new SAXParser(strict, opt) + } + var parser = this + clearBuffers(parser) + parser.q = parser.c = '' + parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH + parser.opt = opt || {} + parser.opt.lowercase = parser.opt.lowercase || parser.opt.lowercasetags + parser.looseCase = parser.opt.lowercase ? 'toLowerCase' : 'toUpperCase' + parser.tags = [] + parser.closed = parser.closedRoot = parser.sawRoot = false + parser.tag = parser.error = null + parser.strict = !!strict + parser.noscript = !!(strict || parser.opt.noscript) + parser.state = S.BEGIN + parser.strictEntities = parser.opt.strictEntities + parser.ENTITIES = parser.strictEntities + ? Object.create(sax.XML_ENTITIES) + : Object.create(sax.ENTITIES) + parser.attribList = [] + if (parser.opt.xmlns) { + parser.ns = Object.create(rootNS) + } + parser.trackPosition = parser.opt.position !== false + if (parser.trackPosition) { + parser.position = parser.line = parser.column = 0 + } + emit(parser, 'onready') + } + if (!Object.create) { + Object.create = function (o) { + function F() {} + F.prototype = o + var newf = new F() + return newf + } + } + if (!Object.keys) { + Object.keys = function (o) { + var a = [] + for (var i in o) if (o.hasOwnProperty(i)) a.push(i) + return a + } + } + function checkBufferLength(parser) { + var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10) + var maxActual = 0 + for (var i = 0, l = buffers.length; i < l; i++) { + var len = parser[buffers[i]].length + if (len > maxAllowed) { + switch (buffers[i]) { + case 'textNode': + closeText(parser) + break + case 'cdata': + emitNode(parser, 'oncdata', parser.cdata) + parser.cdata = '' + break + case 'script': + emitNode(parser, 'onscript', parser.script) + parser.script = '' + break + default: + error(parser, 'Max buffer length exceeded: ' + buffers[i]) + } + } + maxActual = Math.max(maxActual, len) + } + var m = sax.MAX_BUFFER_LENGTH - maxActual + parser.bufferCheckPosition = m + parser.position + } + function clearBuffers(parser) { + for (var i = 0, l = buffers.length; i < l; i++) { + parser[buffers[i]] = '' + } + } + function flushBuffers(parser) { + closeText(parser) + if (parser.cdata !== '') { + emitNode(parser, 'oncdata', parser.cdata) + parser.cdata = '' + } + if (parser.script !== '') { + emitNode(parser, 'onscript', parser.script) + parser.script = '' + } + } + SAXParser.prototype = { + end: function () { + end(this) + }, + write, + resume: function () { + this.error = null + return this + }, + close: function () { + return this.write(null) + }, + flush: function () { + flushBuffers(this) + }, + } + var Stream + try { + Stream = __require('stream').Stream + } catch (ex) { + Stream = function () {} + } + var streamWraps = sax.EVENTS.filter(function (ev) { + return ev !== 'error' && ev !== 'end' + }) + function createStream(strict, opt) { + return new SAXStream(strict, opt) + } + function SAXStream(strict, opt) { + if (!(this instanceof SAXStream)) { + return new SAXStream(strict, opt) + } + Stream.apply(this) + this._parser = new SAXParser(strict, opt) + this.writable = true + this.readable = true + var me = this + this._parser.onend = function () { + me.emit('end') + } + this._parser.onerror = function (er) { + me.emit('error', er) + me._parser.error = null + } + this._decoder = null + streamWraps.forEach(function (ev) { + Object.defineProperty(me, 'on' + ev, { + get: function () { + return me._parser['on' + ev] + }, + set: function (h) { + if (!h) { + me.removeAllListeners(ev) + me._parser['on' + ev] = h + return h + } + me.on(ev, h) + }, + enumerable: true, + configurable: false, + }) + }) + } + SAXStream.prototype = Object.create(Stream.prototype, { + constructor: { + value: SAXStream, + }, + }) + SAXStream.prototype.write = function (data) { + if ( + typeof Buffer === 'function' && + typeof Buffer.isBuffer === 'function' && + Buffer.isBuffer(data) + ) { + if (!this._decoder) { + var SD = require_string_decoder().StringDecoder + this._decoder = new SD('utf8') + } + data = this._decoder.write(data) + } + this._parser.write(data.toString()) + this.emit('data', data) + return true + } + SAXStream.prototype.end = function (chunk) { + if (chunk && chunk.length) { + this.write(chunk) + } + this._parser.end() + return true + } + SAXStream.prototype.on = function (ev, handler) { + var me = this + if (!me._parser['on' + ev] && streamWraps.indexOf(ev) !== -1) { + me._parser['on' + ev] = function () { + var args = + arguments.length === 1 + ? [arguments[0]] + : Array.apply(null, arguments) + args.splice(0, 0, ev) + me.emit.apply(me, args) + } + } + return Stream.prototype.on.call(me, ev, handler) + } + var CDATA = '[CDATA[' + var DOCTYPE = 'DOCTYPE' + var XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace' + var XMLNS_NAMESPACE = 'http://www.w3.org/2000/xmlns/' + var rootNS = { xml: XML_NAMESPACE, xmlns: XMLNS_NAMESPACE } + var nameStart = + /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/ + var nameBody = + /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/ + var entityStart = + /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/ + var entityBody = + /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/ + function isWhitespace(c) { + return c === ' ' || c === '\n' || c === '\r' || c === ' ' + } + function isQuote(c) { + return c === '"' || c === "'" + } + function isAttribEnd(c) { + return c === '>' || isWhitespace(c) + } + function isMatch(regex, c) { + return regex.test(c) + } + function notMatch(regex, c) { + return !isMatch(regex, c) + } + var S = 0 + sax.STATE = { + BEGIN: S++, + BEGIN_WHITESPACE: S++, + TEXT: S++, + TEXT_ENTITY: S++, + OPEN_WAKA: S++, + SGML_DECL: S++, + SGML_DECL_QUOTED: S++, + DOCTYPE: S++, + DOCTYPE_QUOTED: S++, + DOCTYPE_DTD: S++, + DOCTYPE_DTD_QUOTED: S++, + COMMENT_STARTING: S++, + COMMENT: S++, + COMMENT_ENDING: S++, + COMMENT_ENDED: S++, + CDATA: S++, + CDATA_ENDING: S++, + CDATA_ENDING_2: S++, + PROC_INST: S++, + PROC_INST_BODY: S++, + PROC_INST_ENDING: S++, + OPEN_TAG: S++, + OPEN_TAG_SLASH: S++, + ATTRIB: S++, + ATTRIB_NAME: S++, + ATTRIB_NAME_SAW_WHITE: S++, + ATTRIB_VALUE: S++, + ATTRIB_VALUE_QUOTED: S++, + ATTRIB_VALUE_CLOSED: S++, + ATTRIB_VALUE_UNQUOTED: S++, + ATTRIB_VALUE_ENTITY_Q: S++, + ATTRIB_VALUE_ENTITY_U: S++, + CLOSE_TAG: S++, + CLOSE_TAG_SAW_WHITE: S++, + SCRIPT: S++, + SCRIPT_ENDING: S++, + } + sax.XML_ENTITIES = { + amp: '&', + gt: '>', + lt: '<', + quot: '"', + apos: "'", + } + sax.ENTITIES = { + amp: '&', + gt: '>', + lt: '<', + quot: '"', + apos: "'", + AElig: 198, + Aacute: 193, + Acirc: 194, + Agrave: 192, + Aring: 197, + Atilde: 195, + Auml: 196, + Ccedil: 199, + ETH: 208, + Eacute: 201, + Ecirc: 202, + Egrave: 200, + Euml: 203, + Iacute: 205, + Icirc: 206, + Igrave: 204, + Iuml: 207, + Ntilde: 209, + Oacute: 211, + Ocirc: 212, + Ograve: 210, + Oslash: 216, + Otilde: 213, + Ouml: 214, + THORN: 222, + Uacute: 218, + Ucirc: 219, + Ugrave: 217, + Uuml: 220, + Yacute: 221, + aacute: 225, + acirc: 226, + aelig: 230, + agrave: 224, + aring: 229, + atilde: 227, + auml: 228, + ccedil: 231, + eacute: 233, + ecirc: 234, + egrave: 232, + eth: 240, + euml: 235, + iacute: 237, + icirc: 238, + igrave: 236, + iuml: 239, + ntilde: 241, + oacute: 243, + ocirc: 244, + ograve: 242, + oslash: 248, + otilde: 245, + ouml: 246, + szlig: 223, + thorn: 254, + uacute: 250, + ucirc: 251, + ugrave: 249, + uuml: 252, + yacute: 253, + yuml: 255, + copy: 169, + reg: 174, + nbsp: 160, + iexcl: 161, + cent: 162, + pound: 163, + curren: 164, + yen: 165, + brvbar: 166, + sect: 167, + uml: 168, + ordf: 170, + laquo: 171, + not: 172, + shy: 173, + macr: 175, + deg: 176, + plusmn: 177, + sup1: 185, + sup2: 178, + sup3: 179, + acute: 180, + micro: 181, + para: 182, + middot: 183, + cedil: 184, + ordm: 186, + raquo: 187, + frac14: 188, + frac12: 189, + frac34: 190, + iquest: 191, + times: 215, + divide: 247, + OElig: 338, + oelig: 339, + Scaron: 352, + scaron: 353, + Yuml: 376, + fnof: 402, + circ: 710, + tilde: 732, + Alpha: 913, + Beta: 914, + Gamma: 915, + Delta: 916, + Epsilon: 917, + Zeta: 918, + Eta: 919, + Theta: 920, + Iota: 921, + Kappa: 922, + Lambda: 923, + Mu: 924, + Nu: 925, + Xi: 926, + Omicron: 927, + Pi: 928, + Rho: 929, + Sigma: 931, + Tau: 932, + Upsilon: 933, + Phi: 934, + Chi: 935, + Psi: 936, + Omega: 937, + alpha: 945, + beta: 946, + gamma: 947, + delta: 948, + epsilon: 949, + zeta: 950, + eta: 951, + theta: 952, + iota: 953, + kappa: 954, + lambda: 955, + mu: 956, + nu: 957, + xi: 958, + omicron: 959, + pi: 960, + rho: 961, + sigmaf: 962, + sigma: 963, + tau: 964, + upsilon: 965, + phi: 966, + chi: 967, + psi: 968, + omega: 969, + thetasym: 977, + upsih: 978, + piv: 982, + ensp: 8194, + emsp: 8195, + thinsp: 8201, + zwnj: 8204, + zwj: 8205, + lrm: 8206, + rlm: 8207, + ndash: 8211, + mdash: 8212, + lsquo: 8216, + rsquo: 8217, + sbquo: 8218, + ldquo: 8220, + rdquo: 8221, + bdquo: 8222, + dagger: 8224, + Dagger: 8225, + bull: 8226, + hellip: 8230, + permil: 8240, + prime: 8242, + Prime: 8243, + lsaquo: 8249, + rsaquo: 8250, + oline: 8254, + frasl: 8260, + euro: 8364, + image: 8465, + weierp: 8472, + real: 8476, + trade: 8482, + alefsym: 8501, + larr: 8592, + uarr: 8593, + rarr: 8594, + darr: 8595, + harr: 8596, + crarr: 8629, + lArr: 8656, + uArr: 8657, + rArr: 8658, + dArr: 8659, + hArr: 8660, + forall: 8704, + part: 8706, + exist: 8707, + empty: 8709, + nabla: 8711, + isin: 8712, + notin: 8713, + ni: 8715, + prod: 8719, + sum: 8721, + minus: 8722, + lowast: 8727, + radic: 8730, + prop: 8733, + infin: 8734, + ang: 8736, + and: 8743, + or: 8744, + cap: 8745, + cup: 8746, + int: 8747, + there4: 8756, + sim: 8764, + cong: 8773, + asymp: 8776, + ne: 8800, + equiv: 8801, + le: 8804, + ge: 8805, + sub: 8834, + sup: 8835, + nsub: 8836, + sube: 8838, + supe: 8839, + oplus: 8853, + otimes: 8855, + perp: 8869, + sdot: 8901, + lceil: 8968, + rceil: 8969, + lfloor: 8970, + rfloor: 8971, + lang: 9001, + rang: 9002, + loz: 9674, + spades: 9824, + clubs: 9827, + hearts: 9829, + diams: 9830, + } + Object.keys(sax.ENTITIES).forEach(function (key) { + var e = sax.ENTITIES[key] + var s2 = typeof e === 'number' ? String.fromCharCode(e) : e + sax.ENTITIES[key] = s2 + }) + for (var s in sax.STATE) { + sax.STATE[sax.STATE[s]] = s + } + S = sax.STATE + function emit(parser, event, data) { + parser[event] && parser[event](data) + } + function emitNode(parser, nodeType, data) { + if (parser.textNode) closeText(parser) + emit(parser, nodeType, data) + } + function closeText(parser) { + parser.textNode = textopts(parser.opt, parser.textNode) + if (parser.textNode) emit(parser, 'ontext', parser.textNode) + parser.textNode = '' + } + function textopts(opt, text) { + if (opt.trim) text = text.trim() + if (opt.normalize) text = text.replace(/\s+/g, ' ') + return text + } + function error(parser, er) { + closeText(parser) + if (parser.trackPosition) { + er += + '\nLine: ' + + parser.line + + '\nColumn: ' + + parser.column + + '\nChar: ' + + parser.c + } + er = new Error(er) + parser.error = er + emit(parser, 'onerror', er) + return parser + } + function end(parser) { + if (parser.sawRoot && !parser.closedRoot) + strictFail(parser, 'Unclosed root tag') + if ( + parser.state !== S.BEGIN && + parser.state !== S.BEGIN_WHITESPACE && + parser.state !== S.TEXT + ) { + error(parser, 'Unexpected end') + } + closeText(parser) + parser.c = '' + parser.closed = true + emit(parser, 'onend') + SAXParser.call(parser, parser.strict, parser.opt) + return parser + } + function strictFail(parser, message) { + if (typeof parser !== 'object' || !(parser instanceof SAXParser)) { + throw new Error('bad call to strictFail') + } + if (parser.strict) { + error(parser, message) + } + } + function newTag(parser) { + if (!parser.strict) parser.tagName = parser.tagName[parser.looseCase]() + var parent = parser.tags[parser.tags.length - 1] || parser + var tag = (parser.tag = { name: parser.tagName, attributes: {} }) + if (parser.opt.xmlns) { + tag.ns = parent.ns + } + parser.attribList.length = 0 + emitNode(parser, 'onopentagstart', tag) + } + function qname(name, attribute) { + var i = name.indexOf(':') + var qualName = i < 0 ? ['', name] : name.split(':') + var prefix = qualName[0] + var local = qualName[1] + if (attribute && name === 'xmlns') { + prefix = 'xmlns' + local = '' + } + return { prefix, local } + } + function attrib(parser) { + if (!parser.strict) { + parser.attribName = parser.attribName[parser.looseCase]() + } + if ( + parser.attribList.indexOf(parser.attribName) !== -1 || + parser.tag.attributes.hasOwnProperty(parser.attribName) + ) { + parser.attribName = parser.attribValue = '' + return + } + if (parser.opt.xmlns) { + var qn = qname(parser.attribName, true) + var prefix = qn.prefix + var local = qn.local + if (prefix === 'xmlns') { + if (local === 'xml' && parser.attribValue !== XML_NAMESPACE) { + strictFail( + parser, + 'xml: prefix must be bound to ' + + XML_NAMESPACE + + '\nActual: ' + + parser.attribValue, + ) + } else if ( + local === 'xmlns' && + parser.attribValue !== XMLNS_NAMESPACE + ) { + strictFail( + parser, + 'xmlns: prefix must be bound to ' + + XMLNS_NAMESPACE + + '\nActual: ' + + parser.attribValue, + ) + } else { + var tag = parser.tag + var parent = parser.tags[parser.tags.length - 1] || parser + if (tag.ns === parent.ns) { + tag.ns = Object.create(parent.ns) + } + tag.ns[local] = parser.attribValue + } + } + parser.attribList.push([parser.attribName, parser.attribValue]) + } else { + parser.tag.attributes[parser.attribName] = parser.attribValue + emitNode(parser, 'onattribute', { + name: parser.attribName, + value: parser.attribValue, + }) + } + parser.attribName = parser.attribValue = '' + } + function openTag(parser, selfClosing) { + if (parser.opt.xmlns) { + var tag = parser.tag + var qn = qname(parser.tagName) + tag.prefix = qn.prefix + tag.local = qn.local + tag.uri = tag.ns[qn.prefix] || '' + if (tag.prefix && !tag.uri) { + strictFail( + parser, + 'Unbound namespace prefix: ' + JSON.stringify(parser.tagName), + ) + tag.uri = qn.prefix + } + var parent = parser.tags[parser.tags.length - 1] || parser + if (tag.ns && parent.ns !== tag.ns) { + Object.keys(tag.ns).forEach(function (p) { + emitNode(parser, 'onopennamespace', { + prefix: p, + uri: tag.ns[p], + }) + }) + } + for (var i = 0, l = parser.attribList.length; i < l; i++) { + var nv = parser.attribList[i] + var name = nv[0] + var value = nv[1] + var qualName = qname(name, true) + var prefix = qualName.prefix + var local = qualName.local + var uri = prefix === '' ? '' : tag.ns[prefix] || '' + var a = { + name, + value, + prefix, + local, + uri, + } + if (prefix && prefix !== 'xmlns' && !uri) { + strictFail( + parser, + 'Unbound namespace prefix: ' + JSON.stringify(prefix), + ) + a.uri = prefix + } + parser.tag.attributes[name] = a + emitNode(parser, 'onattribute', a) + } + parser.attribList.length = 0 + } + parser.tag.isSelfClosing = !!selfClosing + parser.sawRoot = true + parser.tags.push(parser.tag) + emitNode(parser, 'onopentag', parser.tag) + if (!selfClosing) { + if (!parser.noscript && parser.tagName.toLowerCase() === 'script') { + parser.state = S.SCRIPT + } else { + parser.state = S.TEXT + } + parser.tag = null + parser.tagName = '' + } + parser.attribName = parser.attribValue = '' + parser.attribList.length = 0 + } + function closeTag(parser) { + if (!parser.tagName) { + strictFail(parser, 'Weird empty close tag.') + parser.textNode += '' + parser.state = S.TEXT + return + } + if (parser.script) { + if (parser.tagName !== 'script') { + parser.script += '' + parser.tagName = '' + parser.state = S.SCRIPT + return + } + emitNode(parser, 'onscript', parser.script) + parser.script = '' + } + var t = parser.tags.length + var tagName = parser.tagName + if (!parser.strict) { + tagName = tagName[parser.looseCase]() + } + var closeTo = tagName + while (t--) { + var close = parser.tags[t] + if (close.name !== closeTo) { + strictFail(parser, 'Unexpected close tag') + } else { + break + } + } + if (t < 0) { + strictFail(parser, 'Unmatched closing tag: ' + parser.tagName) + parser.textNode += '' + parser.state = S.TEXT + return + } + parser.tagName = tagName + var s2 = parser.tags.length + while (s2-- > t) { + var tag = (parser.tag = parser.tags.pop()) + parser.tagName = parser.tag.name + emitNode(parser, 'onclosetag', parser.tagName) + var x = {} + for (var i in tag.ns) { + x[i] = tag.ns[i] + } + var parent = parser.tags[parser.tags.length - 1] || parser + if (parser.opt.xmlns && tag.ns !== parent.ns) { + Object.keys(tag.ns).forEach(function (p) { + var n = tag.ns[p] + emitNode(parser, 'onclosenamespace', { prefix: p, uri: n }) + }) + } + } + if (t === 0) parser.closedRoot = true + parser.tagName = parser.attribValue = parser.attribName = '' + parser.attribList.length = 0 + parser.state = S.TEXT + } + function parseEntity(parser) { + var entity = parser.entity + var entityLC = entity.toLowerCase() + var num + var numStr = '' + if (parser.ENTITIES[entity]) { + return parser.ENTITIES[entity] + } + if (parser.ENTITIES[entityLC]) { + return parser.ENTITIES[entityLC] + } + entity = entityLC + if (entity.charAt(0) === '#') { + if (entity.charAt(1) === 'x') { + entity = entity.slice(2) + num = parseInt(entity, 16) + numStr = num.toString(16) + } else { + entity = entity.slice(1) + num = parseInt(entity, 10) + numStr = num.toString(10) + } + } + entity = entity.replace(/^0+/, '') + if (isNaN(num) || numStr.toLowerCase() !== entity) { + strictFail(parser, 'Invalid character entity') + return '&' + parser.entity + ';' + } + return String.fromCodePoint(num) + } + function beginWhiteSpace(parser, c) { + if (c === '<') { + parser.state = S.OPEN_WAKA + parser.startTagPosition = parser.position + } else if (!isWhitespace(c)) { + strictFail(parser, 'Non-whitespace before first tag.') + parser.textNode = c + parser.state = S.TEXT + } + } + function charAt(chunk, i) { + var result = '' + if (i < chunk.length) { + result = chunk.charAt(i) + } + return result + } + function write(chunk) { + var parser = this + if (this.error) { + throw this.error + } + if (parser.closed) { + return error( + parser, + 'Cannot write after close. Assign an onready handler.', + ) + } + if (chunk === null) { + return end(parser) + } + if (typeof chunk === 'object') { + chunk = chunk.toString() + } + var i = 0 + var c = '' + while (true) { + c = charAt(chunk, i++) + parser.c = c + if (!c) { + break + } + if (parser.trackPosition) { + parser.position++ + if (c === '\n') { + parser.line++ + parser.column = 0 + } else { + parser.column++ + } + } + switch (parser.state) { + case S.BEGIN: + parser.state = S.BEGIN_WHITESPACE + if (c === '\uFEFF') { + continue + } + beginWhiteSpace(parser, c) + continue + case S.BEGIN_WHITESPACE: + beginWhiteSpace(parser, c) + continue + case S.TEXT: + if (parser.sawRoot && !parser.closedRoot) { + var starti = i - 1 + while (c && c !== '<' && c !== '&') { + c = charAt(chunk, i++) + if (c && parser.trackPosition) { + parser.position++ + if (c === '\n') { + parser.line++ + parser.column = 0 + } else { + parser.column++ + } + } + } + parser.textNode += chunk.substring(starti, i - 1) + } + if ( + c === '<' && + !(parser.sawRoot && parser.closedRoot && !parser.strict) + ) { + parser.state = S.OPEN_WAKA + parser.startTagPosition = parser.position + } else { + if ( + !isWhitespace(c) && + (!parser.sawRoot || parser.closedRoot) + ) { + strictFail(parser, 'Text data outside of root node.') + } + if (c === '&') { + parser.state = S.TEXT_ENTITY + } else { + parser.textNode += c + } + } + continue + case S.SCRIPT: + if (c === '<') { + parser.state = S.SCRIPT_ENDING + } else { + parser.script += c + } + continue + case S.SCRIPT_ENDING: + if (c === '/') { + parser.state = S.CLOSE_TAG + } else { + parser.script += '<' + c + parser.state = S.SCRIPT + } + continue + case S.OPEN_WAKA: + if (c === '!') { + parser.state = S.SGML_DECL + parser.sgmlDecl = '' + } else if (isWhitespace(c)) { + } else if (isMatch(nameStart, c)) { + parser.state = S.OPEN_TAG + parser.tagName = c + } else if (c === '/') { + parser.state = S.CLOSE_TAG + parser.tagName = '' + } else if (c === '?') { + parser.state = S.PROC_INST + parser.procInstName = parser.procInstBody = '' + } else { + strictFail(parser, 'Unencoded <') + if (parser.startTagPosition + 1 < parser.position) { + var pad = parser.position - parser.startTagPosition + c = new Array(pad).join(' ') + c + } + parser.textNode += '<' + c + parser.state = S.TEXT + } + continue + case S.SGML_DECL: + if ((parser.sgmlDecl + c).toUpperCase() === CDATA) { + emitNode(parser, 'onopencdata') + parser.state = S.CDATA + parser.sgmlDecl = '' + parser.cdata = '' + } else if (parser.sgmlDecl + c === '--') { + parser.state = S.COMMENT + parser.comment = '' + parser.sgmlDecl = '' + } else if ((parser.sgmlDecl + c).toUpperCase() === DOCTYPE) { + parser.state = S.DOCTYPE + if (parser.doctype || parser.sawRoot) { + strictFail( + parser, + 'Inappropriately located doctype declaration', + ) + } + parser.doctype = '' + parser.sgmlDecl = '' + } else if (c === '>') { + emitNode(parser, 'onsgmldeclaration', parser.sgmlDecl) + parser.sgmlDecl = '' + parser.state = S.TEXT + } else if (isQuote(c)) { + parser.state = S.SGML_DECL_QUOTED + parser.sgmlDecl += c + } else { + parser.sgmlDecl += c + } + continue + case S.SGML_DECL_QUOTED: + if (c === parser.q) { + parser.state = S.SGML_DECL + parser.q = '' + } + parser.sgmlDecl += c + continue + case S.DOCTYPE: + if (c === '>') { + parser.state = S.TEXT + emitNode(parser, 'ondoctype', parser.doctype) + parser.doctype = true + } else { + parser.doctype += c + if (c === '[') { + parser.state = S.DOCTYPE_DTD + } else if (isQuote(c)) { + parser.state = S.DOCTYPE_QUOTED + parser.q = c + } + } + continue + case S.DOCTYPE_QUOTED: + parser.doctype += c + if (c === parser.q) { + parser.q = '' + parser.state = S.DOCTYPE + } + continue + case S.DOCTYPE_DTD: + parser.doctype += c + if (c === ']') { + parser.state = S.DOCTYPE + } else if (isQuote(c)) { + parser.state = S.DOCTYPE_DTD_QUOTED + parser.q = c + } + continue + case S.DOCTYPE_DTD_QUOTED: + parser.doctype += c + if (c === parser.q) { + parser.state = S.DOCTYPE_DTD + parser.q = '' + } + continue + case S.COMMENT: + if (c === '-') { + parser.state = S.COMMENT_ENDING + } else { + parser.comment += c + } + continue + case S.COMMENT_ENDING: + if (c === '-') { + parser.state = S.COMMENT_ENDED + parser.comment = textopts(parser.opt, parser.comment) + if (parser.comment) { + emitNode(parser, 'oncomment', parser.comment) + } + parser.comment = '' + } else { + parser.comment += '-' + c + parser.state = S.COMMENT + } + continue + case S.COMMENT_ENDED: + if (c !== '>') { + strictFail(parser, 'Malformed comment') + parser.comment += '--' + c + parser.state = S.COMMENT + } else { + parser.state = S.TEXT + } + continue + case S.CDATA: + if (c === ']') { + parser.state = S.CDATA_ENDING + } else { + parser.cdata += c + } + continue + case S.CDATA_ENDING: + if (c === ']') { + parser.state = S.CDATA_ENDING_2 + } else { + parser.cdata += ']' + c + parser.state = S.CDATA + } + continue + case S.CDATA_ENDING_2: + if (c === '>') { + if (parser.cdata) { + emitNode(parser, 'oncdata', parser.cdata) + } + emitNode(parser, 'onclosecdata') + parser.cdata = '' + parser.state = S.TEXT + } else if (c === ']') { + parser.cdata += ']' + } else { + parser.cdata += ']]' + c + parser.state = S.CDATA + } + continue + case S.PROC_INST: + if (c === '?') { + parser.state = S.PROC_INST_ENDING + } else if (isWhitespace(c)) { + parser.state = S.PROC_INST_BODY + } else { + parser.procInstName += c + } + continue + case S.PROC_INST_BODY: + if (!parser.procInstBody && isWhitespace(c)) { + continue + } else if (c === '?') { + parser.state = S.PROC_INST_ENDING + } else { + parser.procInstBody += c + } + continue + case S.PROC_INST_ENDING: + if (c === '>') { + emitNode(parser, 'onprocessinginstruction', { + name: parser.procInstName, + body: parser.procInstBody, + }) + parser.procInstName = parser.procInstBody = '' + parser.state = S.TEXT + } else { + parser.procInstBody += '?' + c + parser.state = S.PROC_INST_BODY + } + continue + case S.OPEN_TAG: + if (isMatch(nameBody, c)) { + parser.tagName += c + } else { + newTag(parser) + if (c === '>') { + openTag(parser) + } else if (c === '/') { + parser.state = S.OPEN_TAG_SLASH + } else { + if (!isWhitespace(c)) { + strictFail(parser, 'Invalid character in tag name') + } + parser.state = S.ATTRIB + } + } + continue + case S.OPEN_TAG_SLASH: + if (c === '>') { + openTag(parser, true) + closeTag(parser) + } else { + strictFail( + parser, + 'Forward-slash in opening tag not followed by >', + ) + parser.state = S.ATTRIB + } + continue + case S.ATTRIB: + if (isWhitespace(c)) { + continue + } else if (c === '>') { + openTag(parser) + } else if (c === '/') { + parser.state = S.OPEN_TAG_SLASH + } else if (isMatch(nameStart, c)) { + parser.attribName = c + parser.attribValue = '' + parser.state = S.ATTRIB_NAME + } else { + strictFail(parser, 'Invalid attribute name') + } + continue + case S.ATTRIB_NAME: + if (c === '=') { + parser.state = S.ATTRIB_VALUE + } else if (c === '>') { + strictFail(parser, 'Attribute without value') + parser.attribValue = parser.attribName + attrib(parser) + openTag(parser) + } else if (isWhitespace(c)) { + parser.state = S.ATTRIB_NAME_SAW_WHITE + } else if (isMatch(nameBody, c)) { + parser.attribName += c + } else { + strictFail(parser, 'Invalid attribute name') + } + continue + case S.ATTRIB_NAME_SAW_WHITE: + if (c === '=') { + parser.state = S.ATTRIB_VALUE + } else if (isWhitespace(c)) { + continue + } else { + strictFail(parser, 'Attribute without value') + parser.tag.attributes[parser.attribName] = '' + parser.attribValue = '' + emitNode(parser, 'onattribute', { + name: parser.attribName, + value: '', + }) + parser.attribName = '' + if (c === '>') { + openTag(parser) + } else if (isMatch(nameStart, c)) { + parser.attribName = c + parser.state = S.ATTRIB_NAME + } else { + strictFail(parser, 'Invalid attribute name') + parser.state = S.ATTRIB + } + } + continue + case S.ATTRIB_VALUE: + if (isWhitespace(c)) { + continue + } else if (isQuote(c)) { + parser.q = c + parser.state = S.ATTRIB_VALUE_QUOTED + } else { + strictFail(parser, 'Unquoted attribute value') + parser.state = S.ATTRIB_VALUE_UNQUOTED + parser.attribValue = c + } + continue + case S.ATTRIB_VALUE_QUOTED: + if (c !== parser.q) { + if (c === '&') { + parser.state = S.ATTRIB_VALUE_ENTITY_Q + } else { + parser.attribValue += c + } + continue + } + attrib(parser) + parser.q = '' + parser.state = S.ATTRIB_VALUE_CLOSED + continue + case S.ATTRIB_VALUE_CLOSED: + if (isWhitespace(c)) { + parser.state = S.ATTRIB + } else if (c === '>') { + openTag(parser) + } else if (c === '/') { + parser.state = S.OPEN_TAG_SLASH + } else if (isMatch(nameStart, c)) { + strictFail(parser, 'No whitespace between attributes') + parser.attribName = c + parser.attribValue = '' + parser.state = S.ATTRIB_NAME + } else { + strictFail(parser, 'Invalid attribute name') + } + continue + case S.ATTRIB_VALUE_UNQUOTED: + if (!isAttribEnd(c)) { + if (c === '&') { + parser.state = S.ATTRIB_VALUE_ENTITY_U + } else { + parser.attribValue += c + } + continue + } + attrib(parser) + if (c === '>') { + openTag(parser) + } else { + parser.state = S.ATTRIB + } + continue + case S.CLOSE_TAG: + if (!parser.tagName) { + if (isWhitespace(c)) { + continue + } else if (notMatch(nameStart, c)) { + if (parser.script) { + parser.script += '') { + closeTag(parser) + } else if (isMatch(nameBody, c)) { + parser.tagName += c + } else if (parser.script) { + parser.script += '') { + closeTag(parser) + } else { + strictFail(parser, 'Invalid characters in closing tag') + } + continue + case S.TEXT_ENTITY: + case S.ATTRIB_VALUE_ENTITY_Q: + case S.ATTRIB_VALUE_ENTITY_U: + var returnState + var buffer + switch (parser.state) { + case S.TEXT_ENTITY: + returnState = S.TEXT + buffer = 'textNode' + break + case S.ATTRIB_VALUE_ENTITY_Q: + returnState = S.ATTRIB_VALUE_QUOTED + buffer = 'attribValue' + break + case S.ATTRIB_VALUE_ENTITY_U: + returnState = S.ATTRIB_VALUE_UNQUOTED + buffer = 'attribValue' + break + } + if (c === ';') { + parser[buffer] += parseEntity(parser) + parser.entity = '' + parser.state = returnState + } else if ( + isMatch(parser.entity.length ? entityBody : entityStart, c) + ) { + parser.entity += c + } else { + strictFail(parser, 'Invalid character in entity name') + parser[buffer] += '&' + parser.entity + c + parser.entity = '' + parser.state = returnState + } + continue + default: + throw new Error(parser, 'Unknown state: ' + parser.state) + } + } + if (parser.position >= parser.bufferCheckPosition) { + checkBufferLength(parser) + } + return parser + } + if (!String.fromCodePoint) { + ;(function () { + var stringFromCharCode = String.fromCharCode + var floor = Math.floor + var fromCodePoint = function () { + var MAX_SIZE = 16384 + var codeUnits = [] + var highSurrogate + var lowSurrogate + var index = -1 + var length = arguments.length + if (!length) { + return '' + } + var result = '' + while (++index < length) { + var codePoint = Number(arguments[index]) + if ( + !isFinite(codePoint) || + codePoint < 0 || + codePoint > 1114111 || + floor(codePoint) !== codePoint + ) { + throw RangeError('Invalid code point: ' + codePoint) + } + if (codePoint <= 65535) { + codeUnits.push(codePoint) + } else { + codePoint -= 65536 + highSurrogate = (codePoint >> 10) + 55296 + lowSurrogate = (codePoint % 1024) + 56320 + codeUnits.push(highSurrogate, lowSurrogate) + } + if (index + 1 === length || codeUnits.length > MAX_SIZE) { + result += stringFromCharCode.apply(null, codeUnits) + codeUnits.length = 0 + } + } + return result + } + if (Object.defineProperty) { + Object.defineProperty(String, 'fromCodePoint', { + value: fromCodePoint, + configurable: true, + writable: true, + }) + } else { + String.fromCodePoint = fromCodePoint + } + })() + } + })(typeof exports === 'undefined' ? (exports.sax = {}) : exports) + }, +}) + +// node_modules/events/events.js +var require_events = __commonJS({ + 'node_modules/events/events.js'(exports, module) { + 'use strict' + init_define_process() + var R = typeof Reflect === 'object' ? Reflect : null + var ReflectApply = + R && typeof R.apply === 'function' + ? R.apply + : function ReflectApply2(target, receiver, args) { + return Function.prototype.apply.call(target, receiver, args) + } + var ReflectOwnKeys + if (R && typeof R.ownKeys === 'function') { + ReflectOwnKeys = R.ownKeys + } else if (Object.getOwnPropertySymbols) { + ReflectOwnKeys = function ReflectOwnKeys2(target) { + return Object.getOwnPropertyNames(target).concat( + Object.getOwnPropertySymbols(target), + ) + } + } else { + ReflectOwnKeys = function ReflectOwnKeys2(target) { + return Object.getOwnPropertyNames(target) + } + } + function ProcessEmitWarning(warning) { + if (console && console.warn) console.warn(warning) + } + var NumberIsNaN = + Number.isNaN || + function NumberIsNaN2(value) { + return value !== value + } + function EventEmitter() { + EventEmitter.init.call(this) + } + module.exports = EventEmitter + module.exports.once = once + EventEmitter.EventEmitter = EventEmitter + EventEmitter.prototype._events = void 0 + EventEmitter.prototype._eventsCount = 0 + EventEmitter.prototype._maxListeners = void 0 + var defaultMaxListeners = 10 + function checkListener(listener) { + if (typeof listener !== 'function') { + throw new TypeError( + 'The "listener" argument must be of type Function. Received type ' + + typeof listener, + ) + } + } + Object.defineProperty(EventEmitter, 'defaultMaxListeners', { + enumerable: true, + get: function () { + return defaultMaxListeners + }, + set: function (arg) { + if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) { + throw new RangeError( + 'The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + + arg + + '.', + ) + } + defaultMaxListeners = arg + }, + }) + EventEmitter.init = function () { + if ( + this._events === void 0 || + this._events === Object.getPrototypeOf(this)._events + ) { + this._events = /* @__PURE__ */ Object.create(null) + this._eventsCount = 0 + } + this._maxListeners = this._maxListeners || void 0 + } + EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) { + if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) { + throw new RangeError( + 'The value of "n" is out of range. It must be a non-negative number. Received ' + + n + + '.', + ) + } + this._maxListeners = n + return this + } + function _getMaxListeners(that) { + if (that._maxListeners === void 0) return EventEmitter.defaultMaxListeners + return that._maxListeners + } + EventEmitter.prototype.getMaxListeners = function getMaxListeners() { + return _getMaxListeners(this) + } + EventEmitter.prototype.emit = function emit(type) { + var args = [] + for (var i = 1; i < arguments.length; i++) args.push(arguments[i]) + var doError = type === 'error' + var events = this._events + if (events !== void 0) doError = doError && events.error === void 0 + else if (!doError) return false + if (doError) { + var er + if (args.length > 0) er = args[0] + if (er instanceof Error) { + throw er + } + var err = new Error( + 'Unhandled error.' + (er ? ' (' + er.message + ')' : ''), + ) + err.context = er + throw err + } + var handler = events[type] + if (handler === void 0) return false + if (typeof handler === 'function') { + ReflectApply(handler, this, args) + } else { + var len = handler.length + var listeners = arrayClone(handler, len) + for (var i = 0; i < len; ++i) ReflectApply(listeners[i], this, args) + } + return true + } + function _addListener(target, type, listener, prepend) { + var m + var events + var existing + checkListener(listener) + events = target._events + if (events === void 0) { + events = target._events = /* @__PURE__ */ Object.create(null) + target._eventsCount = 0 + } else { + if (events.newListener !== void 0) { + target.emit( + 'newListener', + type, + listener.listener ? listener.listener : listener, + ) + events = target._events + } + existing = events[type] + } + if (existing === void 0) { + existing = events[type] = listener + ++target._eventsCount + } else { + if (typeof existing === 'function') { + existing = events[type] = prepend + ? [listener, existing] + : [existing, listener] + } else if (prepend) { + existing.unshift(listener) + } else { + existing.push(listener) + } + m = _getMaxListeners(target) + if (m > 0 && existing.length > m && !existing.warned) { + existing.warned = true + var w = new Error( + 'Possible EventEmitter memory leak detected. ' + + existing.length + + ' ' + + String(type) + + ' listeners added. Use emitter.setMaxListeners() to increase limit', + ) + w.name = 'MaxListenersExceededWarning' + w.emitter = target + w.type = type + w.count = existing.length + ProcessEmitWarning(w) + } + } + return target + } + EventEmitter.prototype.addListener = function addListener(type, listener) { + return _addListener(this, type, listener, false) + } + EventEmitter.prototype.on = EventEmitter.prototype.addListener + EventEmitter.prototype.prependListener = function prependListener( + type, + listener, + ) { + return _addListener(this, type, listener, true) + } + function onceWrapper() { + if (!this.fired) { + this.target.removeListener(this.type, this.wrapFn) + this.fired = true + if (arguments.length === 0) return this.listener.call(this.target) + return this.listener.apply(this.target, arguments) + } + } + function _onceWrap(target, type, listener) { + var state = { fired: false, wrapFn: void 0, target, type, listener } + var wrapped = onceWrapper.bind(state) + wrapped.listener = listener + state.wrapFn = wrapped + return wrapped + } + EventEmitter.prototype.once = function once2(type, listener) { + checkListener(listener) + this.on(type, _onceWrap(this, type, listener)) + return this + } + EventEmitter.prototype.prependOnceListener = function prependOnceListener( + type, + listener, + ) { + checkListener(listener) + this.prependListener(type, _onceWrap(this, type, listener)) + return this + } + EventEmitter.prototype.removeListener = function removeListener( + type, + listener, + ) { + var list, events, position, i, originalListener + checkListener(listener) + events = this._events + if (events === void 0) return this + list = events[type] + if (list === void 0) return this + if (list === listener || list.listener === listener) { + if (--this._eventsCount === 0) + this._events = /* @__PURE__ */ Object.create(null) + else { + delete events[type] + if (events.removeListener) + this.emit('removeListener', type, list.listener || listener) + } + } else if (typeof list !== 'function') { + position = -1 + for (i = list.length - 1; i >= 0; i--) { + if (list[i] === listener || list[i].listener === listener) { + originalListener = list[i].listener + position = i + break + } + } + if (position < 0) return this + if (position === 0) list.shift() + else { + spliceOne(list, position) + } + if (list.length === 1) events[type] = list[0] + if (events.removeListener !== void 0) + this.emit('removeListener', type, originalListener || listener) + } + return this + } + EventEmitter.prototype.off = EventEmitter.prototype.removeListener + EventEmitter.prototype.removeAllListeners = function removeAllListeners( + type, + ) { + var listeners, events, i + events = this._events + if (events === void 0) return this + if (events.removeListener === void 0) { + if (arguments.length === 0) { + this._events = /* @__PURE__ */ Object.create(null) + this._eventsCount = 0 + } else if (events[type] !== void 0) { + if (--this._eventsCount === 0) + this._events = /* @__PURE__ */ Object.create(null) + else delete events[type] + } + return this + } + if (arguments.length === 0) { + var keys = Object.keys(events) + var key + for (i = 0; i < keys.length; ++i) { + key = keys[i] + if (key === 'removeListener') continue + this.removeAllListeners(key) + } + this.removeAllListeners('removeListener') + this._events = /* @__PURE__ */ Object.create(null) + this._eventsCount = 0 + return this + } + listeners = events[type] + if (typeof listeners === 'function') { + this.removeListener(type, listeners) + } else if (listeners !== void 0) { + for (i = listeners.length - 1; i >= 0; i--) { + this.removeListener(type, listeners[i]) + } + } + return this + } + function _listeners(target, type, unwrap) { + var events = target._events + if (events === void 0) return [] + var evlistener = events[type] + if (evlistener === void 0) return [] + if (typeof evlistener === 'function') + return unwrap ? [evlistener.listener || evlistener] : [evlistener] + return unwrap + ? unwrapListeners(evlistener) + : arrayClone(evlistener, evlistener.length) + } + EventEmitter.prototype.listeners = function listeners(type) { + return _listeners(this, type, true) + } + EventEmitter.prototype.rawListeners = function rawListeners(type) { + return _listeners(this, type, false) + } + EventEmitter.listenerCount = function (emitter, type) { + if (typeof emitter.listenerCount === 'function') { + return emitter.listenerCount(type) + } else { + return listenerCount.call(emitter, type) + } + } + EventEmitter.prototype.listenerCount = listenerCount + function listenerCount(type) { + var events = this._events + if (events !== void 0) { + var evlistener = events[type] + if (typeof evlistener === 'function') { + return 1 + } else if (evlistener !== void 0) { + return evlistener.length + } + } + return 0 + } + EventEmitter.prototype.eventNames = function eventNames() { + return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [] + } + function arrayClone(arr, n) { + var copy = new Array(n) + for (var i = 0; i < n; ++i) copy[i] = arr[i] + return copy + } + function spliceOne(list, index) { + for (; index + 1 < list.length; index++) list[index] = list[index + 1] + list.pop() + } + function unwrapListeners(arr) { + var ret = new Array(arr.length) + for (var i = 0; i < ret.length; ++i) { + ret[i] = arr[i].listener || arr[i] + } + return ret + } + function once(emitter, name) { + return new Promise(function (resolve, reject) { + function errorListener(err) { + emitter.removeListener(name, resolver) + reject(err) + } + function resolver() { + if (typeof emitter.removeListener === 'function') { + emitter.removeListener('error', errorListener) + } + resolve([].slice.call(arguments)) + } + eventTargetAgnosticAddListener(emitter, name, resolver, { once: true }) + if (name !== 'error') { + addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true }) + } + }) + } + function addErrorHandlerIfEventEmitter(emitter, handler, flags) { + if (typeof emitter.on === 'function') { + eventTargetAgnosticAddListener(emitter, 'error', handler, flags) + } + } + function eventTargetAgnosticAddListener(emitter, name, listener, flags) { + if (typeof emitter.on === 'function') { + if (flags.once) { + emitter.once(name, listener) + } else { + emitter.on(name, listener) + } + } else if (typeof emitter.addEventListener === 'function') { + emitter.addEventListener(name, function wrapListener(arg) { + if (flags.once) { + emitter.removeEventListener(name, wrapListener) + } + listener(arg) + }) + } else { + throw new TypeError( + 'The "emitter" argument must be of type EventEmitter. Received type ' + + typeof emitter, + ) + } + } + }, +}) + +// node_modules/xml2js/lib/bom.js +var require_bom = __commonJS({ + 'node_modules/xml2js/lib/bom.js'(exports) { + init_define_process() + ;(function () { + 'use strict' + exports.stripBOM = function (str) { + if (str[0] === '\uFEFF') { + return str.substring(1) + } else { + return str + } + } + }.call(exports)) + }, +}) + +// node_modules/xml2js/lib/processors.js +var require_processors = __commonJS({ + 'node_modules/xml2js/lib/processors.js'(exports) { + init_define_process() + ;(function () { + 'use strict' + var prefixMatch + prefixMatch = new RegExp(/(?!xmlns)^.*:/) + exports.normalize = function (str) { + return str.toLowerCase() + } + exports.firstCharLowerCase = function (str) { + return str.charAt(0).toLowerCase() + str.slice(1) + } + exports.stripPrefix = function (str) { + return str.replace(prefixMatch, '') + } + exports.parseNumbers = function (str) { + if (!isNaN(str)) { + str = str % 1 === 0 ? parseInt(str, 10) : parseFloat(str) + } + return str + } + exports.parseBooleans = function (str) { + if (/^(?:true|false)$/i.test(str)) { + str = str.toLowerCase() === 'true' + } + return str + } + }.call(exports)) + }, +}) + +// globals:timers +var require_timers = __commonJS({ + 'globals:timers'(exports, module) { + init_define_process() + module.exports = globalThis + }, +}) + +// node_modules/xml2js/lib/parser.js +var require_parser = __commonJS({ + 'node_modules/xml2js/lib/parser.js'(exports) { + init_define_process() + ;(function () { + 'use strict' + var bom, + defaults, + events, + isEmpty, + processItem, + processors, + sax, + setImmediate, + bind = function (fn, me) { + return function () { + return fn.apply(me, arguments) + } + }, + extend = function (child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) child[key] = parent[key] + } + function ctor() { + this.constructor = child + } + ctor.prototype = parent.prototype + child.prototype = new ctor() + child.__super__ = parent.prototype + return child + }, + hasProp = {}.hasOwnProperty + sax = require_sax() + events = require_events() + bom = require_bom() + processors = require_processors() + setImmediate = require_timers().setImmediate + defaults = require_defaults().defaults + isEmpty = function (thing) { + return ( + typeof thing === 'object' && + thing != null && + Object.keys(thing).length === 0 + ) + } + processItem = function (processors2, item, key) { + var i, len, process2 + for (i = 0, len = processors2.length; i < len; i++) { + process2 = processors2[i] + item = process2(item, key) + } + return item + } + exports.Parser = (function (superClass) { + extend(Parser, superClass) + function Parser(opts) { + this.parseStringPromise = bind(this.parseStringPromise, this) + this.parseString = bind(this.parseString, this) + this.reset = bind(this.reset, this) + this.assignOrPush = bind(this.assignOrPush, this) + this.processAsync = bind(this.processAsync, this) + var key, ref, value + if (!(this instanceof exports.Parser)) { + return new exports.Parser(opts) + } + this.options = {} + ref = defaults['0.2'] + for (key in ref) { + if (!hasProp.call(ref, key)) continue + value = ref[key] + this.options[key] = value + } + for (key in opts) { + if (!hasProp.call(opts, key)) continue + value = opts[key] + this.options[key] = value + } + if (this.options.xmlns) { + this.options.xmlnskey = this.options.attrkey + 'ns' + } + if (this.options.normalizeTags) { + if (!this.options.tagNameProcessors) { + this.options.tagNameProcessors = [] + } + this.options.tagNameProcessors.unshift(processors.normalize) + } + this.reset() + } + Parser.prototype.processAsync = function () { + var chunk, err + try { + if (this.remaining.length <= this.options.chunkSize) { + chunk = this.remaining + this.remaining = '' + this.saxParser = this.saxParser.write(chunk) + return this.saxParser.close() + } else { + chunk = this.remaining.substr(0, this.options.chunkSize) + this.remaining = this.remaining.substr( + this.options.chunkSize, + this.remaining.length, + ) + this.saxParser = this.saxParser.write(chunk) + return setImmediate(this.processAsync) + } + } catch (error1) { + err = error1 + if (!this.saxParser.errThrown) { + this.saxParser.errThrown = true + return this.emit(err) + } + } + } + Parser.prototype.assignOrPush = function (obj, key, newValue) { + if (!(key in obj)) { + if (!this.options.explicitArray) { + return (obj[key] = newValue) + } else { + return (obj[key] = [newValue]) + } + } else { + if (!(obj[key] instanceof Array)) { + obj[key] = [obj[key]] + } + return obj[key].push(newValue) + } + } + Parser.prototype.reset = function () { + var attrkey, charkey, ontext, stack + this.removeAllListeners() + this.saxParser = sax.parser(this.options.strict, { + trim: false, + normalize: false, + xmlns: this.options.xmlns, + }) + this.saxParser.errThrown = false + this.saxParser.onerror = (function (_this) { + return function (error) { + _this.saxParser.resume() + if (!_this.saxParser.errThrown) { + _this.saxParser.errThrown = true + return _this.emit('error', error) + } + } + })(this) + this.saxParser.onend = (function (_this) { + return function () { + if (!_this.saxParser.ended) { + _this.saxParser.ended = true + return _this.emit('end', _this.resultObject) + } + } + })(this) + this.saxParser.ended = false + this.EXPLICIT_CHARKEY = this.options.explicitCharkey + this.resultObject = null + stack = [] + attrkey = this.options.attrkey + charkey = this.options.charkey + this.saxParser.onopentag = (function (_this) { + return function (node) { + var key, newValue, obj, processedKey, ref + obj = {} + obj[charkey] = '' + if (!_this.options.ignoreAttrs) { + ref = node.attributes + for (key in ref) { + if (!hasProp.call(ref, key)) continue + if (!(attrkey in obj) && !_this.options.mergeAttrs) { + obj[attrkey] = {} + } + newValue = _this.options.attrValueProcessors + ? processItem( + _this.options.attrValueProcessors, + node.attributes[key], + key, + ) + : node.attributes[key] + processedKey = _this.options.attrNameProcessors + ? processItem(_this.options.attrNameProcessors, key) + : key + if (_this.options.mergeAttrs) { + _this.assignOrPush(obj, processedKey, newValue) + } else { + obj[attrkey][processedKey] = newValue + } + } + } + obj['#name'] = _this.options.tagNameProcessors + ? processItem(_this.options.tagNameProcessors, node.name) + : node.name + if (_this.options.xmlns) { + obj[_this.options.xmlnskey] = { + uri: node.uri, + local: node.local, + } + } + return stack.push(obj) + } + })(this) + this.saxParser.onclosetag = (function (_this) { + return function () { + var cdata, + emptyStr, + key, + node, + nodeName, + obj, + objClone, + old, + s, + xpath + obj = stack.pop() + nodeName = obj['#name'] + if ( + !_this.options.explicitChildren || + !_this.options.preserveChildrenOrder + ) { + delete obj['#name'] + } + if (obj.cdata === true) { + cdata = obj.cdata + delete obj.cdata + } + s = stack[stack.length - 1] + if (obj[charkey].match(/^\s*$/) && !cdata) { + emptyStr = obj[charkey] + delete obj[charkey] + } else { + if (_this.options.trim) { + obj[charkey] = obj[charkey].trim() + } + if (_this.options.normalize) { + obj[charkey] = obj[charkey].replace(/\s{2,}/g, ' ').trim() + } + obj[charkey] = _this.options.valueProcessors + ? processItem( + _this.options.valueProcessors, + obj[charkey], + nodeName, + ) + : obj[charkey] + if ( + Object.keys(obj).length === 1 && + charkey in obj && + !_this.EXPLICIT_CHARKEY + ) { + obj = obj[charkey] + } + } + if (isEmpty(obj)) { + obj = + _this.options.emptyTag !== '' + ? _this.options.emptyTag + : emptyStr + } + if (_this.options.validator != null) { + xpath = + '/' + + (function () { + var i, len, results + results = [] + for (i = 0, len = stack.length; i < len; i++) { + node = stack[i] + results.push(node['#name']) + } + return results + })() + .concat(nodeName) + .join('/') + ;(function () { + var err + try { + return (obj = _this.options.validator( + xpath, + s && s[nodeName], + obj, + )) + } catch (error1) { + err = error1 + return _this.emit('error', err) + } + })() + } + if ( + _this.options.explicitChildren && + !_this.options.mergeAttrs && + typeof obj === 'object' + ) { + if (!_this.options.preserveChildrenOrder) { + node = {} + if (_this.options.attrkey in obj) { + node[_this.options.attrkey] = obj[_this.options.attrkey] + delete obj[_this.options.attrkey] + } + if ( + !_this.options.charsAsChildren && + _this.options.charkey in obj + ) { + node[_this.options.charkey] = obj[_this.options.charkey] + delete obj[_this.options.charkey] + } + if (Object.getOwnPropertyNames(obj).length > 0) { + node[_this.options.childkey] = obj + } + obj = node + } else if (s) { + s[_this.options.childkey] = s[_this.options.childkey] || [] + objClone = {} + for (key in obj) { + if (!hasProp.call(obj, key)) continue + objClone[key] = obj[key] + } + s[_this.options.childkey].push(objClone) + delete obj['#name'] + if ( + Object.keys(obj).length === 1 && + charkey in obj && + !_this.EXPLICIT_CHARKEY + ) { + obj = obj[charkey] + } + } + } + if (stack.length > 0) { + return _this.assignOrPush(s, nodeName, obj) + } else { + if (_this.options.explicitRoot) { + old = obj + obj = {} + obj[nodeName] = old + } + _this.resultObject = obj + _this.saxParser.ended = true + return _this.emit('end', _this.resultObject) + } + } + })(this) + ontext = (function (_this) { + return function (text) { + var charChild, s + s = stack[stack.length - 1] + if (s) { + s[charkey] += text + if ( + _this.options.explicitChildren && + _this.options.preserveChildrenOrder && + _this.options.charsAsChildren && + (_this.options.includeWhiteChars || + text.replace(/\\n/g, '').trim() !== '') + ) { + s[_this.options.childkey] = s[_this.options.childkey] || [] + charChild = { + '#name': '__text__', + } + charChild[charkey] = text + if (_this.options.normalize) { + charChild[charkey] = charChild[charkey] + .replace(/\s{2,}/g, ' ') + .trim() + } + s[_this.options.childkey].push(charChild) + } + return s + } + } + })(this) + this.saxParser.ontext = ontext + return (this.saxParser.oncdata = (function (_this) { + return function (text) { + var s + s = ontext(text) + if (s) { + return (s.cdata = true) + } + } + })(this)) + } + Parser.prototype.parseString = function (str, cb) { + var err + if (cb != null && typeof cb === 'function') { + this.on('end', function (result) { + this.reset() + return cb(null, result) + }) + this.on('error', function (err2) { + this.reset() + return cb(err2) + }) + } + try { + str = str.toString() + if (str.trim() === '') { + this.emit('end', null) + return true + } + str = bom.stripBOM(str) + if (this.options.async) { + this.remaining = str + setImmediate(this.processAsync) + return this.saxParser + } + return this.saxParser.write(str).close() + } catch (error1) { + err = error1 + if (!(this.saxParser.errThrown || this.saxParser.ended)) { + this.emit('error', err) + return (this.saxParser.errThrown = true) + } else if (this.saxParser.ended) { + throw err + } + } + } + Parser.prototype.parseStringPromise = function (str) { + return new Promise( + (function (_this) { + return function (resolve, reject) { + return _this.parseString(str, function (err, value) { + if (err) { + return reject(err) + } else { + return resolve(value) + } + }) + } + })(this), + ) + } + return Parser + })(events) + exports.parseString = function (str, a, b) { + var cb, options, parser + if (b != null) { + if (typeof b === 'function') { + cb = b + } + if (typeof a === 'object') { + options = a + } + } else { + if (typeof a === 'function') { + cb = a + } + options = {} + } + parser = new exports.Parser(options) + return parser.parseString(str, cb) + } + exports.parseStringPromise = function (str, a) { + var options, parser + if (typeof a === 'object') { + options = a + } + parser = new exports.Parser(options) + return parser.parseStringPromise(str) + } + }.call(exports)) + }, +}) + +// node_modules/xml2js/lib/xml2js.js +var require_xml2js = __commonJS({ + 'node_modules/xml2js/lib/xml2js.js'(exports) { + init_define_process() + ;(function () { + 'use strict' + var builder, + defaults, + parser, + processors, + extend = function (child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) child[key] = parent[key] + } + function ctor() { + this.constructor = child + } + ctor.prototype = parent.prototype + child.prototype = new ctor() + child.__super__ = parent.prototype + return child + }, + hasProp = {}.hasOwnProperty + defaults = require_defaults() + builder = require_builder() + parser = require_parser() + processors = require_processors() + exports.defaults = defaults.defaults + exports.processors = processors + exports.ValidationError = (function (superClass) { + extend(ValidationError, superClass) + function ValidationError(message) { + this.message = message + } + return ValidationError + })(Error) + exports.Builder = builder.Builder + exports.Parser = parser.Parser + exports.parseString = parser.parseString + exports.parseStringPromise = parser.parseStringPromise + }.call(exports)) + }, +}) + +// (disabled):fs +var require_fs = __commonJS({ + '(disabled):fs'() { + init_define_process() + }, +}) + +// node_modules/http-response-object/lib/index.js +var require_lib2 = __commonJS({ + 'node_modules/http-response-object/lib/index.js'(exports, module) { + 'use strict' + init_define_process() + var Response = (function () { + function Response2(statusCode, headers, body, url) { + if (typeof statusCode !== 'number') { + throw new TypeError( + 'statusCode must be a number but was ' + typeof statusCode, + ) + } + if (headers === null) { + throw new TypeError('headers cannot be null') + } + if (typeof headers !== 'object') { + throw new TypeError( + 'headers must be an object but was ' + typeof headers, + ) + } + this.statusCode = statusCode + var headersToLowerCase = {} + for (var key in headers) { + headersToLowerCase[key.toLowerCase()] = headers[key] + } + this.headers = headersToLowerCase + this.body = body + this.url = url + } + Response2.prototype.isError = function () { + return this.statusCode === 0 || this.statusCode >= 400 + } + Response2.prototype.getBody = function (encoding) { + if (this.statusCode === 0) { + var err = new Error( + 'This request to ' + + this.url + + ' resulted in a status code of 0. This usually indicates some kind of network error in a browser (e.g. CORS not being set up or the DNS failing to resolve):\n' + + this.body.toString(), + ) + err.statusCode = this.statusCode + err.headers = this.headers + err.body = this.body + err.url = this.url + throw err + } + if (this.statusCode >= 300) { + var err = new Error( + 'Server responded to ' + + this.url + + ' with status code ' + + this.statusCode + + ':\n' + + this.body.toString(), + ) + err.statusCode = this.statusCode + err.headers = this.headers + err.body = this.body + err.url = this.url + throw err + } + if (!encoding || typeof this.body === 'string') { + return this.body + } + return this.body.toString(encoding) + } + return Response2 + })() + module.exports = Response + }, +}) + +// node_modules/asap/browser-raw.js +var require_browser_raw = __commonJS({ + 'node_modules/asap/browser-raw.js'(exports, module) { + 'use strict' + init_define_process() + module.exports = rawAsap + function rawAsap(task) { + if (!queue.length) { + requestFlush() + flushing = true + } + queue[queue.length] = task + } + var queue = [] + var flushing = false + var requestFlush + var index = 0 + var capacity = 1024 + function flush() { + while (index < queue.length) { + var currentIndex = index + index = index + 1 + queue[currentIndex].call() + if (index > capacity) { + for ( + var scan = 0, newLength = queue.length - index; + scan < newLength; + scan++ + ) { + queue[scan] = queue[scan + index] + } + queue.length -= index + index = 0 + } + } + queue.length = 0 + index = 0 + flushing = false + } + var scope = typeof globalThis !== 'undefined' ? globalThis : self + var BrowserMutationObserver = + scope.MutationObserver || scope.WebKitMutationObserver + if (typeof BrowserMutationObserver === 'function') { + requestFlush = makeRequestCallFromMutationObserver(flush) + } else { + requestFlush = makeRequestCallFromTimer(flush) + } + rawAsap.requestFlush = requestFlush + function makeRequestCallFromMutationObserver(callback) { + var toggle = 1 + var observer = new BrowserMutationObserver(callback) + var node = document.createTextNode('') + observer.observe(node, { characterData: true }) + return function requestCall() { + toggle = -toggle + node.data = toggle + } + } + function makeRequestCallFromTimer(callback) { + return function requestCall() { + var timeoutHandle = setTimeout(handleTimer, 0) + var intervalHandle = setInterval(handleTimer, 50) + function handleTimer() { + clearTimeout(timeoutHandle) + clearInterval(intervalHandle) + callback() + } + } + } + rawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer + }, +}) + +// node_modules/promise/lib/core.js +var require_core = __commonJS({ + 'node_modules/promise/lib/core.js'(exports, module) { + 'use strict' + init_define_process() + var asap = require_browser_raw() + function noop() {} + var LAST_ERROR = null + var IS_ERROR = {} + function getThen(obj) { + try { + return obj.then + } catch (ex) { + LAST_ERROR = ex + return IS_ERROR + } + } + function tryCallOne(fn, a) { + try { + return fn(a) + } catch (ex) { + LAST_ERROR = ex + return IS_ERROR + } + } + function tryCallTwo(fn, a, b) { + try { + fn(a, b) + } catch (ex) { + LAST_ERROR = ex + return IS_ERROR + } + } + module.exports = Promise2 + function Promise2(fn) { + if (typeof this !== 'object') { + throw new TypeError('Promises must be constructed via new') + } + if (typeof fn !== 'function') { + throw new TypeError("Promise constructor's argument is not a function") + } + this._U = 0 + this._V = 0 + this._W = null + this._X = null + if (fn === noop) return + doResolve(fn, this) + } + Promise2._Y = null + Promise2._Z = null + Promise2._0 = noop + Promise2.prototype.then = function (onFulfilled, onRejected) { + if (this.constructor !== Promise2) { + return safeThen(this, onFulfilled, onRejected) + } + var res = new Promise2(noop) + handle(this, new Handler(onFulfilled, onRejected, res)) + return res + } + function safeThen(self2, onFulfilled, onRejected) { + return new self2.constructor(function (resolve2, reject2) { + var res = new Promise2(noop) + res.then(resolve2, reject2) + handle(self2, new Handler(onFulfilled, onRejected, res)) + }) + } + function handle(self2, deferred) { + while (self2._V === 3) { + self2 = self2._W + } + if (Promise2._Y) { + Promise2._Y(self2) + } + if (self2._V === 0) { + if (self2._U === 0) { + self2._U = 1 + self2._X = deferred + return + } + if (self2._U === 1) { + self2._U = 2 + self2._X = [self2._X, deferred] + return + } + self2._X.push(deferred) + return + } + handleResolved(self2, deferred) + } + function handleResolved(self2, deferred) { + asap(function () { + var cb = self2._V === 1 ? deferred.onFulfilled : deferred.onRejected + if (cb === null) { + if (self2._V === 1) { + resolve(deferred.promise, self2._W) + } else { + reject(deferred.promise, self2._W) + } + return + } + var ret = tryCallOne(cb, self2._W) + if (ret === IS_ERROR) { + reject(deferred.promise, LAST_ERROR) + } else { + resolve(deferred.promise, ret) + } + }) + } + function resolve(self2, newValue) { + if (newValue === self2) { + return reject( + self2, + new TypeError('A promise cannot be resolved with itself.'), + ) + } + if ( + newValue && + (typeof newValue === 'object' || typeof newValue === 'function') + ) { + var then = getThen(newValue) + if (then === IS_ERROR) { + return reject(self2, LAST_ERROR) + } + if (then === self2.then && newValue instanceof Promise2) { + self2._V = 3 + self2._W = newValue + finale(self2) + return + } else if (typeof then === 'function') { + doResolve(then.bind(newValue), self2) + return + } + } + self2._V = 1 + self2._W = newValue + finale(self2) + } + function reject(self2, newValue) { + self2._V = 2 + self2._W = newValue + if (Promise2._Z) { + Promise2._Z(self2, newValue) + } + finale(self2) + } + function finale(self2) { + if (self2._U === 1) { + handle(self2, self2._X) + self2._X = null + } + if (self2._U === 2) { + for (var i = 0; i < self2._X.length; i++) { + handle(self2, self2._X[i]) + } + self2._X = null + } + } + function Handler(onFulfilled, onRejected, promise) { + this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null + this.onRejected = typeof onRejected === 'function' ? onRejected : null + this.promise = promise + } + function doResolve(fn, promise) { + var done = false + var res = tryCallTwo( + fn, + function (value) { + if (done) return + done = true + resolve(promise, value) + }, + function (reason) { + if (done) return + done = true + reject(promise, reason) + }, + ) + if (!done && res === IS_ERROR) { + done = true + reject(promise, LAST_ERROR) + } + } + }, +}) + +// node_modules/promise/lib/done.js +var require_done = __commonJS({ + 'node_modules/promise/lib/done.js'(exports, module) { + 'use strict' + init_define_process() + var Promise2 = require_core() + module.exports = Promise2 + Promise2.prototype.done = function (onFulfilled, onRejected) { + var self2 = arguments.length ? this.then.apply(this, arguments) : this + self2.then(null, function (err) { + setTimeout(function () { + throw err + }, 0) + }) + } + }, +}) + +// node_modules/promise/lib/finally.js +var require_finally = __commonJS({ + 'node_modules/promise/lib/finally.js'(exports, module) { + 'use strict' + init_define_process() + var Promise2 = require_core() + module.exports = Promise2 + Promise2.prototype.finally = function (f) { + return this.then( + function (value) { + return Promise2.resolve(f()).then(function () { + return value + }) + }, + function (err) { + return Promise2.resolve(f()).then(function () { + throw err + }) + }, + ) + } + }, +}) + +// node_modules/promise/lib/es6-extensions.js +var require_es6_extensions = __commonJS({ + 'node_modules/promise/lib/es6-extensions.js'(exports, module) { + 'use strict' + init_define_process() + var Promise2 = require_core() + module.exports = Promise2 + var TRUE = valuePromise(true) + var FALSE = valuePromise(false) + var NULL = valuePromise(null) + var UNDEFINED = valuePromise(void 0) + var ZERO = valuePromise(0) + var EMPTYSTRING = valuePromise('') + function valuePromise(value) { + var p = new Promise2(Promise2._0) + p._V = 1 + p._W = value + return p + } + Promise2.resolve = function (value) { + if (value instanceof Promise2) return value + if (value === null) return NULL + if (value === void 0) return UNDEFINED + if (value === true) return TRUE + if (value === false) return FALSE + if (value === 0) return ZERO + if (value === '') return EMPTYSTRING + if (typeof value === 'object' || typeof value === 'function') { + try { + var then = value.then + if (typeof then === 'function') { + return new Promise2(then.bind(value)) + } + } catch (ex) { + return new Promise2(function (resolve, reject) { + reject(ex) + }) + } + } + return valuePromise(value) + } + var iterableToArray = function (iterable) { + if (typeof Array.from === 'function') { + iterableToArray = Array.from + return Array.from(iterable) + } + iterableToArray = function (x) { + return Array.prototype.slice.call(x) + } + return Array.prototype.slice.call(iterable) + } + Promise2.all = function (arr) { + var args = iterableToArray(arr) + return new Promise2(function (resolve, reject) { + if (args.length === 0) return resolve([]) + var remaining = args.length + function res(i2, val) { + if (val && (typeof val === 'object' || typeof val === 'function')) { + if ( + val instanceof Promise2 && + val.then === Promise2.prototype.then + ) { + while (val._V === 3) { + val = val._W + } + if (val._V === 1) return res(i2, val._W) + if (val._V === 2) reject(val._W) + val.then(function (val2) { + res(i2, val2) + }, reject) + return + } else { + var then = val.then + if (typeof then === 'function') { + var p = new Promise2(then.bind(val)) + p.then(function (val2) { + res(i2, val2) + }, reject) + return + } + } + } + args[i2] = val + if (--remaining === 0) { + resolve(args) + } + } + for (var i = 0; i < args.length; i++) { + res(i, args[i]) + } + }) + } + Promise2.reject = function (value) { + return new Promise2(function (resolve, reject) { + reject(value) + }) + } + Promise2.race = function (values) { + return new Promise2(function (resolve, reject) { + iterableToArray(values).forEach(function (value) { + Promise2.resolve(value).then(resolve, reject) + }) + }) + } + Promise2.prototype['catch'] = function (onRejected) { + return this.then(null, onRejected) + } + }, +}) + +// node_modules/asap/browser-asap.js +var require_browser_asap = __commonJS({ + 'node_modules/asap/browser-asap.js'(exports, module) { + 'use strict' + init_define_process() + var rawAsap = require_browser_raw() + var freeTasks = [] + var pendingErrors = [] + var requestErrorThrow = rawAsap.makeRequestCallFromTimer(throwFirstError) + function throwFirstError() { + if (pendingErrors.length) { + throw pendingErrors.shift() + } + } + module.exports = asap + function asap(task) { + var rawTask + if (freeTasks.length) { + rawTask = freeTasks.pop() + } else { + rawTask = new RawTask() + } + rawTask.task = task + rawAsap(rawTask) + } + function RawTask() { + this.task = null + } + RawTask.prototype.call = function () { + try { + this.task.call() + } catch (error) { + if (asap.onerror) { + asap.onerror(error) + } else { + pendingErrors.push(error) + requestErrorThrow() + } + } finally { + this.task = null + freeTasks[freeTasks.length] = this + } + } + }, +}) + +// node_modules/promise/lib/node-extensions.js +var require_node_extensions = __commonJS({ + 'node_modules/promise/lib/node-extensions.js'(exports, module) { + 'use strict' + init_define_process() + var Promise2 = require_core() + var asap = require_browser_asap() + module.exports = Promise2 + Promise2.denodeify = function (fn, argumentCount) { + if (typeof argumentCount === 'number' && argumentCount !== Infinity) { + return denodeifyWithCount(fn, argumentCount) + } else { + return denodeifyWithoutCount(fn) + } + } + var callbackFn = + 'function (err, res) {if (err) { rj(err); } else { rs(res); }}' + function denodeifyWithCount(fn, argumentCount) { + var args = [] + for (var i = 0; i < argumentCount; i++) { + args.push('a' + i) + } + var body = [ + 'return function (' + args.join(',') + ') {', + 'var self = this;', + 'return new Promise(function (rs, rj) {', + 'var res = fn.call(', + ['self'].concat(args).concat([callbackFn]).join(','), + ');', + 'if (res &&', + '(typeof res === "object" || typeof res === "function") &&', + 'typeof res.then === "function"', + ') {rs(res);}', + '});', + '};', + ].join('') + return Function(['Promise', 'fn'], body)(Promise2, fn) + } + function denodeifyWithoutCount(fn) { + var fnLength = Math.max(fn.length - 1, 3) + var args = [] + for (var i = 0; i < fnLength; i++) { + args.push('a' + i) + } + var body = [ + 'return function (' + args.join(',') + ') {', + 'var self = this;', + 'var args;', + 'var argLength = arguments.length;', + 'if (arguments.length > ' + fnLength + ') {', + 'args = new Array(arguments.length + 1);', + 'for (var i = 0; i < arguments.length; i++) {', + 'args[i] = arguments[i];', + '}', + '}', + 'return new Promise(function (rs, rj) {', + 'var cb = ' + callbackFn + ';', + 'var res;', + 'switch (argLength) {', + args + .concat(['extra']) + .map(function (_, index) { + return ( + 'case ' + + index + + ':res = fn.call(' + + ['self'].concat(args.slice(0, index)).concat('cb').join(',') + + ');break;' + ) + }) + .join(''), + 'default:', + 'args[argLength] = cb;', + 'res = fn.apply(self, args);', + '}', + 'if (res &&', + '(typeof res === "object" || typeof res === "function") &&', + 'typeof res.then === "function"', + ') {rs(res);}', + '});', + '};', + ].join('') + return Function(['Promise', 'fn'], body)(Promise2, fn) + } + Promise2.nodeify = function (fn) { + return function () { + var args = Array.prototype.slice.call(arguments) + var callback = + typeof args[args.length - 1] === 'function' ? args.pop() : null + var ctx = this + try { + return fn.apply(this, arguments).nodeify(callback, ctx) + } catch (ex) { + if (callback === null || typeof callback == 'undefined') { + return new Promise2(function (resolve, reject) { + reject(ex) + }) + } else { + asap(function () { + callback.call(ctx, ex) + }) + } + } + } + } + Promise2.prototype.nodeify = function (callback, ctx) { + if (typeof callback != 'function') return this + this.then( + function (value) { + asap(function () { + callback.call(ctx, null, value) + }) + }, + function (err) { + asap(function () { + callback.call(ctx, err) + }) + }, + ) + } + }, +}) + +// node_modules/promise/lib/synchronous.js +var require_synchronous = __commonJS({ + 'node_modules/promise/lib/synchronous.js'(exports, module) { + 'use strict' + init_define_process() + var Promise2 = require_core() + module.exports = Promise2 + Promise2.enableSynchronous = function () { + Promise2.prototype.isPending = function () { + return this.getState() == 0 + } + Promise2.prototype.isFulfilled = function () { + return this.getState() == 1 + } + Promise2.prototype.isRejected = function () { + return this.getState() == 2 + } + Promise2.prototype.getValue = function () { + if (this._V === 3) { + return this._W.getValue() + } + if (!this.isFulfilled()) { + throw new Error('Cannot get a value of an unfulfilled promise.') + } + return this._W + } + Promise2.prototype.getReason = function () { + if (this._V === 3) { + return this._W.getReason() + } + if (!this.isRejected()) { + throw new Error( + 'Cannot get a rejection reason of a non-rejected promise.', + ) + } + return this._W + } + Promise2.prototype.getState = function () { + if (this._V === 3) { + return this._W.getState() + } + if (this._V === -1 || this._V === -2) { + return 0 + } + return this._V + } + } + Promise2.disableSynchronous = function () { + Promise2.prototype.isPending = void 0 + Promise2.prototype.isFulfilled = void 0 + Promise2.prototype.isRejected = void 0 + Promise2.prototype.getValue = void 0 + Promise2.prototype.getReason = void 0 + Promise2.prototype.getState = void 0 + } + }, +}) + +// node_modules/promise/lib/index.js +var require_lib3 = __commonJS({ + 'node_modules/promise/lib/index.js'(exports, module) { + 'use strict' + init_define_process() + module.exports = require_core() + require_done() + require_finally() + require_es6_extensions() + require_node_extensions() + require_synchronous() + }, +}) + +// node_modules/promise/index.js +var require_promise = __commonJS({ + 'node_modules/promise/index.js'(exports, module) { + 'use strict' + init_define_process() + module.exports = require_lib3() + }, +}) + +// node_modules/then-request/lib/ResponsePromise.js +var require_ResponsePromise = __commonJS({ + 'node_modules/then-request/lib/ResponsePromise.js'(exports) { + 'use strict' + init_define_process() + exports.__esModule = true + var Promise2 = require_promise() + function getBody(encoding) { + if (!encoding) { + return this.then(getBodyBinary) + } + if (encoding === 'utf8') { + return this.then(getBodyUTF8) + } + return this.then(getBodyWithEncoding(encoding)) + } + function getBodyWithEncoding(encoding) { + return function (res) { + return res.getBody(encoding) + } + } + function getBodyBinary(res) { + return res.getBody() + } + function getBodyUTF8(res) { + return res.getBody('utf8') + } + function toResponsePromise(result) { + result.getBody = getBody + return result + } + exports['default'] = toResponsePromise + exports.ResponsePromise = void 0 + }, +}) + +// node_modules/has-symbols/shams.js +var require_shams = __commonJS({ + 'node_modules/has-symbols/shams.js'(exports, module) { + 'use strict' + init_define_process() + module.exports = function hasSymbols() { + if ( + typeof Symbol !== 'function' || + typeof Object.getOwnPropertySymbols !== 'function' + ) { + return false + } + if (typeof Symbol.iterator === 'symbol') { + return true + } + var obj = {} + var sym = Symbol('test') + var symObj = Object(sym) + if (typeof sym === 'string') { + return false + } + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { + return false + } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { + return false + } + var symVal = 42 + obj[sym] = symVal + for (sym in obj) { + return false + } + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { + return false + } + if ( + typeof Object.getOwnPropertyNames === 'function' && + Object.getOwnPropertyNames(obj).length !== 0 + ) { + return false + } + var syms = Object.getOwnPropertySymbols(obj) + if (syms.length !== 1 || syms[0] !== sym) { + return false + } + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { + return false + } + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym) + if (descriptor.value !== symVal || descriptor.enumerable !== true) { + return false + } + } + return true + } + }, +}) + +// node_modules/has-symbols/index.js +var require_has_symbols = __commonJS({ + 'node_modules/has-symbols/index.js'(exports, module) { + 'use strict' + init_define_process() + var origSymbol = typeof Symbol !== 'undefined' && Symbol + var hasSymbolSham = require_shams() + module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { + return false + } + if (typeof Symbol !== 'function') { + return false + } + if (typeof origSymbol('foo') !== 'symbol') { + return false + } + if (typeof Symbol('bar') !== 'symbol') { + return false + } + return hasSymbolSham() + } + }, +}) + +// node_modules/function-bind/implementation.js +var require_implementation = __commonJS({ + 'node_modules/function-bind/implementation.js'(exports, module) { + 'use strict' + init_define_process() + var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ' + var slice = Array.prototype.slice + var toStr = Object.prototype.toString + var funcType = '[object Function]' + module.exports = function bind(that) { + var target = this + if (typeof target !== 'function' || toStr.call(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target) + } + var args = slice.call(arguments, 1) + var bound + var binder = function () { + if (this instanceof bound) { + var result = target.apply(this, args.concat(slice.call(arguments))) + if (Object(result) === result) { + return result + } + return this + } else { + return target.apply(that, args.concat(slice.call(arguments))) + } + } + var boundLength = Math.max(0, target.length - args.length) + var boundArgs = [] + for (var i = 0; i < boundLength; i++) { + boundArgs.push('$' + i) + } + bound = Function( + 'binder', + 'return function (' + + boundArgs.join(',') + + '){ return binder.apply(this,arguments); }', + )(binder) + if (target.prototype) { + var Empty = function Empty2() {} + Empty.prototype = target.prototype + bound.prototype = new Empty() + Empty.prototype = null + } + return bound + } + }, +}) + +// node_modules/function-bind/index.js +var require_function_bind = __commonJS({ + 'node_modules/function-bind/index.js'(exports, module) { + 'use strict' + init_define_process() + var implementation = require_implementation() + module.exports = Function.prototype.bind || implementation + }, +}) + +// node_modules/has/src/index.js +var require_src = __commonJS({ + 'node_modules/has/src/index.js'(exports, module) { + 'use strict' + init_define_process() + var bind = require_function_bind() + module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty) + }, +}) + +// node_modules/get-intrinsic/index.js +var require_get_intrinsic = __commonJS({ + 'node_modules/get-intrinsic/index.js'(exports, module) { + 'use strict' + init_define_process() + var undefined2 + var $SyntaxError = SyntaxError + var $Function = Function + var $TypeError = TypeError + var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function( + '"use strict"; return (' + expressionSyntax + ').constructor;', + )() + } catch (e) {} + } + var $gOPD = Object.getOwnPropertyDescriptor + if ($gOPD) { + try { + $gOPD({}, '') + } catch (e) { + $gOPD = null + } + } + var throwTypeError = function () { + throw new $TypeError() + } + var ThrowTypeError = $gOPD + ? (function () { + try { + arguments.callee + return throwTypeError + } catch (calleeThrows) { + try { + return $gOPD(arguments, 'callee').get + } catch (gOPDthrows) { + return throwTypeError + } + } + })() + : throwTypeError + var hasSymbols = require_has_symbols()() + var getProto = + Object.getPrototypeOf || + function (x) { + return x.__proto__ + } + var needsEval = {} + var TypedArray = + typeof Uint8Array === 'undefined' ? undefined2 : getProto(Uint8Array) + var INTRINSICS = { + '%AggregateError%': + typeof AggregateError === 'undefined' ? undefined2 : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': + typeof ArrayBuffer === 'undefined' ? undefined2 : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols + ? getProto([][Symbol.iterator]()) + : undefined2, + '%AsyncFromSyncIteratorPrototype%': undefined2, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined2 : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined2 : BigInt, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined2 : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': Error, + '%eval%': eval, + '%EvalError%': EvalError, + '%Float32Array%': + typeof Float32Array === 'undefined' ? undefined2 : Float32Array, + '%Float64Array%': + typeof Float64Array === 'undefined' ? undefined2 : Float64Array, + '%FinalizationRegistry%': + typeof FinalizationRegistry === 'undefined' + ? undefined2 + : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined2 : Int8Array, + '%Int16Array%': + typeof Int16Array === 'undefined' ? undefined2 : Int16Array, + '%Int32Array%': + typeof Int32Array === 'undefined' ? undefined2 : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols + ? getProto(getProto([][Symbol.iterator]())) + : undefined2, + '%JSON%': typeof JSON === 'object' ? JSON : undefined2, + '%Map%': typeof Map === 'undefined' ? undefined2 : Map, + '%MapIteratorPrototype%': + typeof Map === 'undefined' || !hasSymbols + ? undefined2 + : getProto(/* @__PURE__ */ new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined2 : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined2 : Proxy, + '%RangeError%': RangeError, + '%ReferenceError%': ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined2 : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined2 : Set, + '%SetIteratorPrototype%': + typeof Set === 'undefined' || !hasSymbols + ? undefined2 + : getProto(/* @__PURE__ */ new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': + typeof SharedArrayBuffer === 'undefined' + ? undefined2 + : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols + ? getProto(''[Symbol.iterator]()) + : undefined2, + '%Symbol%': hasSymbols ? Symbol : undefined2, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': + typeof Uint8Array === 'undefined' ? undefined2 : Uint8Array, + '%Uint8ClampedArray%': + typeof Uint8ClampedArray === 'undefined' + ? undefined2 + : Uint8ClampedArray, + '%Uint16Array%': + typeof Uint16Array === 'undefined' ? undefined2 : Uint16Array, + '%Uint32Array%': + typeof Uint32Array === 'undefined' ? undefined2 : Uint32Array, + '%URIError%': URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined2 : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined2 : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined2 : WeakSet, + } + var doEval = function doEval2(name) { + var value + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}') + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}') + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}') + } else if (name === '%AsyncGenerator%') { + var fn = doEval2('%AsyncGeneratorFunction%') + if (fn) { + value = fn.prototype + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval2('%AsyncGenerator%') + if (gen) { + value = getProto(gen.prototype) + } + } + INTRINSICS[name] = value + return value + } + var LEGACY_ALIASES = { + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': [ + 'AsyncGeneratorFunction', + 'prototype', + 'prototype', + ], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'], + } + var bind = require_function_bind() + var hasOwn = require_src() + var $concat = bind.call(Function.call, Array.prototype.concat) + var $spliceApply = bind.call(Function.apply, Array.prototype.splice) + var $replace = bind.call(Function.call, String.prototype.replace) + var $strSlice = bind.call(Function.call, String.prototype.slice) + var rePropName = + /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g + var reEscapeChar = /\\(\\)?/g + var stringToPath = function stringToPath2(string) { + var first = $strSlice(string, 0, 1) + var last = $strSlice(string, -1) + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`') + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`') + } + var result = [] + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote + ? $replace(subString, reEscapeChar, '$1') + : number || match + }) + return result + } + var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) { + var intrinsicName = name + var alias + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName] + intrinsicName = '%' + alias[0] + '%' + } + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName] + if (value === needsEval) { + value = doEval(intrinsicName) + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError( + 'intrinsic ' + + name + + ' exists, but is not available. Please file an issue!', + ) + } + return { + alias, + name: intrinsicName, + value, + } + } + throw new $SyntaxError('intrinsic ' + name + ' does not exist!') + } + module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string') + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean') + } + var parts = stringToPath(name) + var intrinsicBaseName = parts.length > 0 ? parts[0] : '' + var intrinsic = getBaseIntrinsic( + '%' + intrinsicBaseName + '%', + allowMissing, + ) + var intrinsicRealName = intrinsic.name + var value = intrinsic.value + var skipFurtherCaching = false + var alias = intrinsic.alias + if (alias) { + intrinsicBaseName = alias[0] + $spliceApply(parts, $concat([0, 1], alias)) + } + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i] + var first = $strSlice(part, 0, 1) + var last = $strSlice(part, -1) + if ( + (first === '"' || + first === "'" || + first === '`' || + last === '"' || + last === "'" || + last === '`') && + first !== last + ) { + throw new $SyntaxError( + 'property names with quotes must have matching quotes', + ) + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true + } + intrinsicBaseName += '.' + part + intrinsicRealName = '%' + intrinsicBaseName + '%' + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName] + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError( + 'base intrinsic for ' + + name + + ' exists, but the property is not available.', + ) + } + return void 0 + } + if ($gOPD && i + 1 >= parts.length) { + var desc = $gOPD(value, part) + isOwn = !!desc + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get + } else { + value = value[part] + } + } else { + isOwn = hasOwn(value, part) + value = value[part] + } + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value + } + } + } + return value + } + }, +}) + +// node_modules/call-bind/index.js +var require_call_bind = __commonJS({ + 'node_modules/call-bind/index.js'(exports, module) { + 'use strict' + init_define_process() + var bind = require_function_bind() + var GetIntrinsic = require_get_intrinsic() + var $apply = GetIntrinsic('%Function.prototype.apply%') + var $call = GetIntrinsic('%Function.prototype.call%') + var $reflectApply = + GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply) + var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true) + var $defineProperty = GetIntrinsic('%Object.defineProperty%', true) + var $max = GetIntrinsic('%Math.max%') + if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }) + } catch (e) { + $defineProperty = null + } + } + module.exports = function callBind(originalFunction) { + var func = $reflectApply(bind, $call, arguments) + if ($gOPD && $defineProperty) { + var desc = $gOPD(func, 'length') + if (desc.configurable) { + $defineProperty(func, 'length', { + value: + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + }) + } + } + return func + } + var applyBind = function applyBind2() { + return $reflectApply(bind, $apply, arguments) + } + if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }) + } else { + module.exports.apply = applyBind + } + }, +}) + +// node_modules/call-bind/callBound.js +var require_callBound = __commonJS({ + 'node_modules/call-bind/callBound.js'(exports, module) { + 'use strict' + init_define_process() + var GetIntrinsic = require_get_intrinsic() + var callBind = require_call_bind() + var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')) + module.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing) + if ( + typeof intrinsic === 'function' && + $indexOf(name, '.prototype.') > -1 + ) { + return callBind(intrinsic) + } + return intrinsic + } + }, +}) + +// (disabled):node_modules/object-inspect/util.inspect +var require_util = __commonJS({ + '(disabled):node_modules/object-inspect/util.inspect'() { + init_define_process() + }, +}) + +// node_modules/object-inspect/index.js +var require_object_inspect = __commonJS({ + 'node_modules/object-inspect/index.js'(exports, module) { + init_define_process() + var hasMap = typeof Map === 'function' && Map.prototype + var mapSizeDescriptor = + Object.getOwnPropertyDescriptor && hasMap + ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') + : null + var mapSize = + hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' + ? mapSizeDescriptor.get + : null + var mapForEach = hasMap && Map.prototype.forEach + var hasSet = typeof Set === 'function' && Set.prototype + var setSizeDescriptor = + Object.getOwnPropertyDescriptor && hasSet + ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') + : null + var setSize = + hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' + ? setSizeDescriptor.get + : null + var setForEach = hasSet && Set.prototype.forEach + var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype + var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null + var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype + var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null + var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype + var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null + var booleanValueOf = Boolean.prototype.valueOf + var objectToString = Object.prototype.toString + var functionToString = Function.prototype.toString + var match = String.prototype.match + var bigIntValueOf = + typeof BigInt === 'function' ? BigInt.prototype.valueOf : null + var gOPS = Object.getOwnPropertySymbols + var symToString = + typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' + ? Symbol.prototype.toString + : null + var hasShammedSymbols = + typeof Symbol === 'function' && typeof Symbol.iterator === 'object' + var isEnumerable = Object.prototype.propertyIsEnumerable + var gPO = + (typeof Reflect === 'function' + ? Reflect.getPrototypeOf + : Object.getPrototypeOf) || + ([].__proto__ === Array.prototype + ? function (O) { + return O.__proto__ + } + : null) + var inspectCustom = require_util().custom + var inspectSymbol = + inspectCustom && isSymbol(inspectCustom) ? inspectCustom : null + var toStringTag = + typeof Symbol === 'function' && typeof Symbol.toStringTag !== 'undefined' + ? Symbol.toStringTag + : null + module.exports = function inspect_(obj, options, depth, seen) { + var opts = options || {} + if ( + has(opts, 'quoteStyle') && + opts.quoteStyle !== 'single' && + opts.quoteStyle !== 'double' + ) { + throw new TypeError('option "quoteStyle" must be "single" or "double"') + } + if ( + has(opts, 'maxStringLength') && + (typeof opts.maxStringLength === 'number' + ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity + : opts.maxStringLength !== null) + ) { + throw new TypeError( + 'option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`', + ) + } + var customInspect = has(opts, 'customInspect') ? opts.customInspect : true + if (typeof customInspect !== 'boolean') { + throw new TypeError( + 'option "customInspect", if provided, must be `true` or `false`', + ) + } + if ( + has(opts, 'indent') && + opts.indent !== null && + opts.indent !== ' ' && + !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0) + ) { + throw new TypeError( + 'options "indent" must be "\\t", an integer > 0, or `null`', + ) + } + if (typeof obj === 'undefined') { + return 'undefined' + } + if (obj === null) { + return 'null' + } + if (typeof obj === 'boolean') { + return obj ? 'true' : 'false' + } + if (typeof obj === 'string') { + return inspectString(obj, opts) + } + if (typeof obj === 'number') { + if (obj === 0) { + return Infinity / obj > 0 ? '0' : '-0' + } + return String(obj) + } + if (typeof obj === 'bigint') { + return String(obj) + 'n' + } + var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth + if (typeof depth === 'undefined') { + depth = 0 + } + if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') { + return isArray(obj) ? '[Array]' : '[Object]' + } + var indent = getIndent(opts, depth) + if (typeof seen === 'undefined') { + seen = [] + } else if (indexOf(seen, obj) >= 0) { + return '[Circular]' + } + function inspect(value, from, noIndent) { + if (from) { + seen = seen.slice() + seen.push(from) + } + if (noIndent) { + var newOpts = { + depth: opts.depth, + } + if (has(opts, 'quoteStyle')) { + newOpts.quoteStyle = opts.quoteStyle + } + return inspect_(value, newOpts, depth + 1, seen) + } + return inspect_(value, opts, depth + 1, seen) + } + if (typeof obj === 'function') { + var name = nameOf(obj) + var keys = arrObjKeys(obj, inspect) + return ( + '[Function' + + (name ? ': ' + name : ' (anonymous)') + + ']' + + (keys.length > 0 ? ' { ' + keys.join(', ') + ' }' : '') + ) + } + if (isSymbol(obj)) { + var symString = hasShammedSymbols + ? String(obj).replace(/^(Symbol\(.*\))_[^)]*$/, '$1') + : symToString.call(obj) + return typeof obj === 'object' && !hasShammedSymbols + ? markBoxed(symString) + : symString + } + if (isElement(obj)) { + var s = '<' + String(obj.nodeName).toLowerCase() + var attrs = obj.attributes || [] + for (var i = 0; i < attrs.length; i++) { + s += + ' ' + + attrs[i].name + + '=' + + wrapQuotes(quote(attrs[i].value), 'double', opts) + } + s += '>' + if (obj.childNodes && obj.childNodes.length) { + s += '...' + } + s += '' + return s + } + if (isArray(obj)) { + if (obj.length === 0) { + return '[]' + } + var xs = arrObjKeys(obj, inspect) + if (indent && !singleLineValues(xs)) { + return '[' + indentedJoin(xs, indent) + ']' + } + return '[ ' + xs.join(', ') + ' ]' + } + if (isError(obj)) { + var parts = arrObjKeys(obj, inspect) + if (parts.length === 0) { + return '[' + String(obj) + ']' + } + return '{ [' + String(obj) + '] ' + parts.join(', ') + ' }' + } + if (typeof obj === 'object' && customInspect) { + if (inspectSymbol && typeof obj[inspectSymbol] === 'function') { + return obj[inspectSymbol]() + } else if (typeof obj.inspect === 'function') { + return obj.inspect() + } + } + if (isMap(obj)) { + var mapParts = [] + mapForEach.call(obj, function (value, key) { + mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj)) + }) + return collectionOf('Map', mapSize.call(obj), mapParts, indent) + } + if (isSet(obj)) { + var setParts = [] + setForEach.call(obj, function (value) { + setParts.push(inspect(value, obj)) + }) + return collectionOf('Set', setSize.call(obj), setParts, indent) + } + if (isWeakMap(obj)) { + return weakCollectionOf('WeakMap') + } + if (isWeakSet(obj)) { + return weakCollectionOf('WeakSet') + } + if (isWeakRef(obj)) { + return weakCollectionOf('WeakRef') + } + if (isNumber2(obj)) { + return markBoxed(inspect(Number(obj))) + } + if (isBigInt(obj)) { + return markBoxed(inspect(bigIntValueOf.call(obj))) + } + if (isBoolean(obj)) { + return markBoxed(booleanValueOf.call(obj)) + } + if (isString(obj)) { + return markBoxed(inspect(String(obj))) + } + if (!isDate(obj) && !isRegExp(obj)) { + var ys = arrObjKeys(obj, inspect) + var isPlainObject = gPO + ? gPO(obj) === Object.prototype + : obj instanceof Object || obj.constructor === Object + var protoTag = obj instanceof Object ? '' : 'null prototype' + var stringTag = + !isPlainObject && + toStringTag && + Object(obj) === obj && + toStringTag in obj + ? toStr(obj).slice(8, -1) + : protoTag + ? 'Object' + : '' + var constructorTag = + isPlainObject || typeof obj.constructor !== 'function' + ? '' + : obj.constructor.name + ? obj.constructor.name + ' ' + : '' + var tag = + constructorTag + + (stringTag || protoTag + ? '[' + [].concat(stringTag || [], protoTag || []).join(': ') + '] ' + : '') + if (ys.length === 0) { + return tag + '{}' + } + if (indent) { + return tag + '{' + indentedJoin(ys, indent) + '}' + } + return tag + '{ ' + ys.join(', ') + ' }' + } + return String(obj) + } + function wrapQuotes(s, defaultStyle, opts) { + var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'" + return quoteChar + s + quoteChar + } + function quote(s) { + return String(s).replace(/"/g, '"') + } + function isArray(obj) { + return ( + toStr(obj) === '[object Array]' && + (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)) + ) + } + function isDate(obj) { + return ( + toStr(obj) === '[object Date]' && + (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)) + ) + } + function isRegExp(obj) { + return ( + toStr(obj) === '[object RegExp]' && + (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)) + ) + } + function isError(obj) { + return ( + toStr(obj) === '[object Error]' && + (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)) + ) + } + function isString(obj) { + return ( + toStr(obj) === '[object String]' && + (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)) + ) + } + function isNumber2(obj) { + return ( + toStr(obj) === '[object Number]' && + (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)) + ) + } + function isBoolean(obj) { + return ( + toStr(obj) === '[object Boolean]' && + (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)) + ) + } + function isSymbol(obj) { + if (hasShammedSymbols) { + return obj && typeof obj === 'object' && obj instanceof Symbol + } + if (typeof obj === 'symbol') { + return true + } + if (!obj || typeof obj !== 'object' || !symToString) { + return false + } + try { + symToString.call(obj) + return true + } catch (e) {} + return false + } + function isBigInt(obj) { + if (!obj || typeof obj !== 'object' || !bigIntValueOf) { + return false + } + try { + bigIntValueOf.call(obj) + return true + } catch (e) {} + return false + } + var hasOwn = + Object.prototype.hasOwnProperty || + function (key) { + return key in this + } + function has(obj, key) { + return hasOwn.call(obj, key) + } + function toStr(obj) { + return objectToString.call(obj) + } + function nameOf(f) { + if (f.name) { + return f.name + } + var m = match.call(functionToString.call(f), /^function\s*([\w$]+)/) + if (m) { + return m[1] + } + return null + } + function indexOf(xs, x) { + if (xs.indexOf) { + return xs.indexOf(x) + } + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) { + return i + } + } + return -1 + } + function isMap(x) { + if (!mapSize || !x || typeof x !== 'object') { + return false + } + try { + mapSize.call(x) + try { + setSize.call(x) + } catch (s) { + return true + } + return x instanceof Map + } catch (e) {} + return false + } + function isWeakMap(x) { + if (!weakMapHas || !x || typeof x !== 'object') { + return false + } + try { + weakMapHas.call(x, weakMapHas) + try { + weakSetHas.call(x, weakSetHas) + } catch (s) { + return true + } + return x instanceof WeakMap + } catch (e) {} + return false + } + function isWeakRef(x) { + if (!weakRefDeref || !x || typeof x !== 'object') { + return false + } + try { + weakRefDeref.call(x) + return true + } catch (e) {} + return false + } + function isSet(x) { + if (!setSize || !x || typeof x !== 'object') { + return false + } + try { + setSize.call(x) + try { + mapSize.call(x) + } catch (m) { + return true + } + return x instanceof Set + } catch (e) {} + return false + } + function isWeakSet(x) { + if (!weakSetHas || !x || typeof x !== 'object') { + return false + } + try { + weakSetHas.call(x, weakSetHas) + try { + weakMapHas.call(x, weakMapHas) + } catch (s) { + return true + } + return x instanceof WeakSet + } catch (e) {} + return false + } + function isElement(x) { + if (!x || typeof x !== 'object') { + return false + } + if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) { + return true + } + return ( + typeof x.nodeName === 'string' && typeof x.getAttribute === 'function' + ) + } + function inspectString(str, opts) { + if (str.length > opts.maxStringLength) { + var remaining = str.length - opts.maxStringLength + var trailer = + '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '') + return inspectString(str.slice(0, opts.maxStringLength), opts) + trailer + } + var s = str.replace(/(['\\])/g, '\\$1').replace(/[\x00-\x1f]/g, lowbyte) + return wrapQuotes(s, 'single', opts) + } + function lowbyte(c) { + var n = c.charCodeAt(0) + var x = { + 8: 'b', + 9: 't', + 10: 'n', + 12: 'f', + 13: 'r', + }[n] + if (x) { + return '\\' + x + } + return '\\x' + (n < 16 ? '0' : '') + n.toString(16).toUpperCase() + } + function markBoxed(str) { + return 'Object(' + str + ')' + } + function weakCollectionOf(type) { + return type + ' { ? }' + } + function collectionOf(type, size, entries, indent) { + var joinedEntries = indent + ? indentedJoin(entries, indent) + : entries.join(', ') + return type + ' (' + size + ') {' + joinedEntries + '}' + } + function singleLineValues(xs) { + for (var i = 0; i < xs.length; i++) { + if (indexOf(xs[i], '\n') >= 0) { + return false + } + } + return true + } + function getIndent(opts, depth) { + var baseIndent + if (opts.indent === ' ') { + baseIndent = ' ' + } else if (typeof opts.indent === 'number' && opts.indent > 0) { + baseIndent = Array(opts.indent + 1).join(' ') + } else { + return null + } + return { + base: baseIndent, + prev: Array(depth + 1).join(baseIndent), + } + } + function indentedJoin(xs, indent) { + if (xs.length === 0) { + return '' + } + var lineJoiner = '\n' + indent.prev + indent.base + return lineJoiner + xs.join(',' + lineJoiner) + '\n' + indent.prev + } + function arrObjKeys(obj, inspect) { + var isArr = isArray(obj) + var xs = [] + if (isArr) { + xs.length = obj.length + for (var i = 0; i < obj.length; i++) { + xs[i] = has(obj, i) ? inspect(obj[i], obj) : '' + } + } + var syms = typeof gOPS === 'function' ? gOPS(obj) : [] + var symMap + if (hasShammedSymbols) { + symMap = {} + for (var k = 0; k < syms.length; k++) { + symMap['$' + syms[k]] = syms[k] + } + } + for (var key in obj) { + if (!has(obj, key)) { + continue + } + if (isArr && String(Number(key)) === key && key < obj.length) { + continue + } + if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) { + continue + } else if (/[^\w$]/.test(key)) { + xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj)) + } else { + xs.push(key + ': ' + inspect(obj[key], obj)) + } + } + if (typeof gOPS === 'function') { + for (var j = 0; j < syms.length; j++) { + if (isEnumerable.call(obj, syms[j])) { + xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj)) + } + } + } + return xs + } + }, +}) + +// node_modules/side-channel/index.js +var require_side_channel = __commonJS({ + 'node_modules/side-channel/index.js'(exports, module) { + 'use strict' + init_define_process() + var GetIntrinsic = require_get_intrinsic() + var callBound = require_callBound() + var inspect = require_object_inspect() + var $TypeError = GetIntrinsic('%TypeError%') + var $WeakMap = GetIntrinsic('%WeakMap%', true) + var $Map = GetIntrinsic('%Map%', true) + var $weakMapGet = callBound('WeakMap.prototype.get', true) + var $weakMapSet = callBound('WeakMap.prototype.set', true) + var $weakMapHas = callBound('WeakMap.prototype.has', true) + var $mapGet = callBound('Map.prototype.get', true) + var $mapSet = callBound('Map.prototype.set', true) + var $mapHas = callBound('Map.prototype.has', true) + var listGetNode = function (list, key) { + for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) { + if (curr.key === key) { + prev.next = curr.next + curr.next = list.next + list.next = curr + return curr + } + } + } + var listGet = function (objects, key) { + var node = listGetNode(objects, key) + return node && node.value + } + var listSet = function (objects, key, value) { + var node = listGetNode(objects, key) + if (node) { + node.value = value + } else { + objects.next = { + key, + next: objects.next, + value, + } + } + } + var listHas = function (objects, key) { + return !!listGetNode(objects, key) + } + module.exports = function getSideChannel() { + var $wm + var $m + var $o + var channel = { + assert: function (key) { + if (!channel.has(key)) { + throw new $TypeError( + 'Side channel does not contain ' + inspect(key), + ) + } + }, + get: function (key) { + if ( + $WeakMap && + key && + (typeof key === 'object' || typeof key === 'function') + ) { + if ($wm) { + return $weakMapGet($wm, key) + } + } else if ($Map) { + if ($m) { + return $mapGet($m, key) + } + } else { + if ($o) { + return listGet($o, key) + } + } + }, + has: function (key) { + if ( + $WeakMap && + key && + (typeof key === 'object' || typeof key === 'function') + ) { + if ($wm) { + return $weakMapHas($wm, key) + } + } else if ($Map) { + if ($m) { + return $mapHas($m, key) + } + } else { + if ($o) { + return listHas($o, key) + } + } + return false + }, + set: function (key, value) { + if ( + $WeakMap && + key && + (typeof key === 'object' || typeof key === 'function') + ) { + if (!$wm) { + $wm = new $WeakMap() + } + $weakMapSet($wm, key, value) + } else if ($Map) { + if (!$m) { + $m = new $Map() + } + $mapSet($m, key, value) + } else { + if (!$o) { + $o = { key: {}, next: null } + } + listSet($o, key, value) + } + }, + } + return channel + } + }, +}) + +// node_modules/qs/lib/formats.js +var require_formats = __commonJS({ + 'node_modules/qs/lib/formats.js'(exports, module) { + 'use strict' + init_define_process() + var replace = String.prototype.replace + var percentTwenties = /%20/g + var Format = { + RFC1738: 'RFC1738', + RFC3986: 'RFC3986', + } + module.exports = { + default: Format.RFC3986, + formatters: { + RFC1738: function (value) { + return replace.call(value, percentTwenties, '+') + }, + RFC3986: function (value) { + return String(value) + }, + }, + RFC1738: Format.RFC1738, + RFC3986: Format.RFC3986, + } + }, +}) + +// node_modules/qs/lib/utils.js +var require_utils = __commonJS({ + 'node_modules/qs/lib/utils.js'(exports, module) { + 'use strict' + init_define_process() + var formats = require_formats() + var has = Object.prototype.hasOwnProperty + var isArray = Array.isArray + var hexTable = (function () { + var array = [] + for (var i = 0; i < 256; ++i) { + array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase()) + } + return array + })() + var compactQueue = function compactQueue2(queue) { + while (queue.length > 1) { + var item = queue.pop() + var obj = item.obj[item.prop] + if (isArray(obj)) { + var compacted = [] + for (var j = 0; j < obj.length; ++j) { + if (typeof obj[j] !== 'undefined') { + compacted.push(obj[j]) + } + } + item.obj[item.prop] = compacted + } + } + } + var arrayToObject = function arrayToObject2(source, options) { + var obj = + options && options.plainObjects + ? /* @__PURE__ */ Object.create(null) + : {} + for (var i = 0; i < source.length; ++i) { + if (typeof source[i] !== 'undefined') { + obj[i] = source[i] + } + } + return obj + } + var merge = function merge2(target, source, options) { + if (!source) { + return target + } + if (typeof source !== 'object') { + if (isArray(target)) { + target.push(source) + } else if (target && typeof target === 'object') { + if ( + (options && (options.plainObjects || options.allowPrototypes)) || + !has.call(Object.prototype, source) + ) { + target[source] = true + } + } else { + return [target, source] + } + return target + } + if (!target || typeof target !== 'object') { + return [target].concat(source) + } + var mergeTarget = target + if (isArray(target) && !isArray(source)) { + mergeTarget = arrayToObject(target, options) + } + if (isArray(target) && isArray(source)) { + source.forEach(function (item, i) { + if (has.call(target, i)) { + var targetItem = target[i] + if ( + targetItem && + typeof targetItem === 'object' && + item && + typeof item === 'object' + ) { + target[i] = merge2(targetItem, item, options) + } else { + target.push(item) + } + } else { + target[i] = item + } + }) + return target + } + return Object.keys(source).reduce(function (acc, key) { + var value = source[key] + if (has.call(acc, key)) { + acc[key] = merge2(acc[key], value, options) + } else { + acc[key] = value + } + return acc + }, mergeTarget) + } + var assign = function assignSingleSource(target, source) { + return Object.keys(source).reduce(function (acc, key) { + acc[key] = source[key] + return acc + }, target) + } + var decode = function (str, decoder, charset) { + var strWithoutPlus = str.replace(/\+/g, ' ') + if (charset === 'iso-8859-1') { + return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape) + } + try { + return decodeURIComponent(strWithoutPlus) + } catch (e) { + return strWithoutPlus + } + } + var encode = function encode2(str, defaultEncoder, charset, kind, format) { + if (str.length === 0) { + return str + } + var string = str + if (typeof str === 'symbol') { + string = Symbol.prototype.toString.call(str) + } else if (typeof str !== 'string') { + string = String(str) + } + if (charset === 'iso-8859-1') { + return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) { + return '%26%23' + parseInt($0.slice(2), 16) + '%3B' + }) + } + var out = '' + for (var i = 0; i < string.length; ++i) { + var c = string.charCodeAt(i) + if ( + c === 45 || + c === 46 || + c === 95 || + c === 126 || + (c >= 48 && c <= 57) || + (c >= 65 && c <= 90) || + (c >= 97 && c <= 122) || + (format === formats.RFC1738 && (c === 40 || c === 41)) + ) { + out += string.charAt(i) + continue + } + if (c < 128) { + out = out + hexTable[c] + continue + } + if (c < 2048) { + out = out + (hexTable[192 | (c >> 6)] + hexTable[128 | (c & 63)]) + continue + } + if (c < 55296 || c >= 57344) { + out = + out + + (hexTable[224 | (c >> 12)] + + hexTable[128 | ((c >> 6) & 63)] + + hexTable[128 | (c & 63)]) + continue + } + i += 1 + c = 65536 + (((c & 1023) << 10) | (string.charCodeAt(i) & 1023)) + out += + hexTable[240 | (c >> 18)] + + hexTable[128 | ((c >> 12) & 63)] + + hexTable[128 | ((c >> 6) & 63)] + + hexTable[128 | (c & 63)] + } + return out + } + var compact = function compact2(value) { + var queue = [{ obj: { o: value }, prop: 'o' }] + var refs = [] + for (var i = 0; i < queue.length; ++i) { + var item = queue[i] + var obj = item.obj[item.prop] + var keys = Object.keys(obj) + for (var j = 0; j < keys.length; ++j) { + var key = keys[j] + var val = obj[key] + if ( + typeof val === 'object' && + val !== null && + refs.indexOf(val) === -1 + ) { + queue.push({ obj, prop: key }) + refs.push(val) + } + } + } + compactQueue(queue) + return value + } + var isRegExp = function isRegExp2(obj) { + return Object.prototype.toString.call(obj) === '[object RegExp]' + } + var isBuffer = function isBuffer2(obj) { + if (!obj || typeof obj !== 'object') { + return false + } + return !!( + obj.constructor && + obj.constructor.isBuffer && + obj.constructor.isBuffer(obj) + ) + } + var combine = function combine2(a, b) { + return [].concat(a, b) + } + var maybeMap = function maybeMap2(val, fn) { + if (isArray(val)) { + var mapped = [] + for (var i = 0; i < val.length; i += 1) { + mapped.push(fn(val[i])) + } + return mapped + } + return fn(val) + } + module.exports = { + arrayToObject, + assign, + combine, + compact, + decode, + encode, + isBuffer, + isRegExp, + maybeMap, + merge, + } + }, +}) + +// node_modules/qs/lib/stringify.js +var require_stringify = __commonJS({ + 'node_modules/qs/lib/stringify.js'(exports, module) { + 'use strict' + init_define_process() + var getSideChannel = require_side_channel() + var utils = require_utils() + var formats = require_formats() + var has = Object.prototype.hasOwnProperty + var arrayPrefixGenerators = { + brackets: function brackets(prefix) { + return prefix + '[]' + }, + comma: 'comma', + indices: function indices(prefix, key) { + return prefix + '[' + key + ']' + }, + repeat: function repeat(prefix) { + return prefix + }, + } + var isArray = Array.isArray + var split = String.prototype.split + var push = Array.prototype.push + var pushToArray = function (arr, valueOrArray) { + push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]) + } + var toISO = Date.prototype.toISOString + var defaultFormat = formats['default'] + var defaults = { + addQueryPrefix: false, + allowDots: false, + charset: 'utf-8', + charsetSentinel: false, + delimiter: '&', + encode: true, + encoder: utils.encode, + encodeValuesOnly: false, + format: defaultFormat, + formatter: formats.formatters[defaultFormat], + indices: false, + serializeDate: function serializeDate(date2) { + return toISO.call(date2) + }, + skipNulls: false, + strictNullHandling: false, + } + var isNonNullishPrimitive = function isNonNullishPrimitive2(v) { + return ( + typeof v === 'string' || + typeof v === 'number' || + typeof v === 'boolean' || + typeof v === 'symbol' || + typeof v === 'bigint' + ) + } + var sentinel = {} + var stringify = function stringify2( + object, + prefix, + generateArrayPrefix, + commaRoundTrip, + strictNullHandling, + skipNulls, + encoder, + filter, + sort, + allowDots, + serializeDate, + format, + formatter, + encodeValuesOnly, + charset, + sideChannel, + ) { + var obj = object + var tmpSc = sideChannel + var step = 0 + var findFlag = false + while ((tmpSc = tmpSc.get(sentinel)) !== void 0 && !findFlag) { + var pos = tmpSc.get(object) + step += 1 + if (typeof pos !== 'undefined') { + if (pos === step) { + throw new RangeError('Cyclic object value') + } else { + findFlag = true + } + } + if (typeof tmpSc.get(sentinel) === 'undefined') { + step = 0 + } + } + if (typeof filter === 'function') { + obj = filter(prefix, obj) + } else if (obj instanceof Date) { + obj = serializeDate(obj) + } else if (generateArrayPrefix === 'comma' && isArray(obj)) { + obj = utils.maybeMap(obj, function (value2) { + if (value2 instanceof Date) { + return serializeDate(value2) + } + return value2 + }) + } + if (obj === null) { + if (strictNullHandling) { + return encoder && !encodeValuesOnly + ? encoder(prefix, defaults.encoder, charset, 'key', format) + : prefix + } + obj = '' + } + if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) { + if (encoder) { + var keyValue = encodeValuesOnly + ? prefix + : encoder(prefix, defaults.encoder, charset, 'key', format) + if (generateArrayPrefix === 'comma' && encodeValuesOnly) { + var valuesArray = split.call(String(obj), ',') + var valuesJoined = '' + for (var i = 0; i < valuesArray.length; ++i) { + valuesJoined += + (i === 0 ? '' : ',') + + formatter( + encoder( + valuesArray[i], + defaults.encoder, + charset, + 'value', + format, + ), + ) + } + return [ + formatter(keyValue) + + (commaRoundTrip && isArray(obj) && valuesArray.length === 1 + ? '[]' + : '') + + '=' + + valuesJoined, + ] + } + return [ + formatter(keyValue) + + '=' + + formatter( + encoder(obj, defaults.encoder, charset, 'value', format), + ), + ] + } + return [formatter(prefix) + '=' + formatter(String(obj))] + } + var values = [] + if (typeof obj === 'undefined') { + return values + } + var objKeys + if (generateArrayPrefix === 'comma' && isArray(obj)) { + objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void 0 }] + } else if (isArray(filter)) { + objKeys = filter + } else { + var keys = Object.keys(obj) + objKeys = sort ? keys.sort(sort) : keys + } + var adjustedPrefix = + commaRoundTrip && isArray(obj) && obj.length === 1 + ? prefix + '[]' + : prefix + for (var j = 0; j < objKeys.length; ++j) { + var key = objKeys[j] + var value = + typeof key === 'object' && typeof key.value !== 'undefined' + ? key.value + : obj[key] + if (skipNulls && value === null) { + continue + } + var keyPrefix = isArray(obj) + ? typeof generateArrayPrefix === 'function' + ? generateArrayPrefix(adjustedPrefix, key) + : adjustedPrefix + : adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']') + sideChannel.set(object, step) + var valueSideChannel = getSideChannel() + valueSideChannel.set(sentinel, sideChannel) + pushToArray( + values, + stringify2( + value, + keyPrefix, + generateArrayPrefix, + commaRoundTrip, + strictNullHandling, + skipNulls, + encoder, + filter, + sort, + allowDots, + serializeDate, + format, + formatter, + encodeValuesOnly, + charset, + valueSideChannel, + ), + ) + } + return values + } + var normalizeStringifyOptions = function normalizeStringifyOptions2(opts) { + if (!opts) { + return defaults + } + if ( + opts.encoder !== null && + typeof opts.encoder !== 'undefined' && + typeof opts.encoder !== 'function' + ) { + throw new TypeError('Encoder has to be a function.') + } + var charset = opts.charset || defaults.charset + if ( + typeof opts.charset !== 'undefined' && + opts.charset !== 'utf-8' && + opts.charset !== 'iso-8859-1' + ) { + throw new TypeError( + 'The charset option must be either utf-8, iso-8859-1, or undefined', + ) + } + var format = formats['default'] + if (typeof opts.format !== 'undefined') { + if (!has.call(formats.formatters, opts.format)) { + throw new TypeError('Unknown format option provided.') + } + format = opts.format + } + var formatter = formats.formatters[format] + var filter = defaults.filter + if (typeof opts.filter === 'function' || isArray(opts.filter)) { + filter = opts.filter + } + return { + addQueryPrefix: + typeof opts.addQueryPrefix === 'boolean' + ? opts.addQueryPrefix + : defaults.addQueryPrefix, + allowDots: + typeof opts.allowDots === 'undefined' + ? defaults.allowDots + : !!opts.allowDots, + charset, + charsetSentinel: + typeof opts.charsetSentinel === 'boolean' + ? opts.charsetSentinel + : defaults.charsetSentinel, + delimiter: + typeof opts.delimiter === 'undefined' + ? defaults.delimiter + : opts.delimiter, + encode: + typeof opts.encode === 'boolean' ? opts.encode : defaults.encode, + encoder: + typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder, + encodeValuesOnly: + typeof opts.encodeValuesOnly === 'boolean' + ? opts.encodeValuesOnly + : defaults.encodeValuesOnly, + filter, + format, + formatter, + serializeDate: + typeof opts.serializeDate === 'function' + ? opts.serializeDate + : defaults.serializeDate, + skipNulls: + typeof opts.skipNulls === 'boolean' + ? opts.skipNulls + : defaults.skipNulls, + sort: typeof opts.sort === 'function' ? opts.sort : null, + strictNullHandling: + typeof opts.strictNullHandling === 'boolean' + ? opts.strictNullHandling + : defaults.strictNullHandling, + } + } + module.exports = function (object, opts) { + var obj = object + var options = normalizeStringifyOptions(opts) + var objKeys + var filter + if (typeof options.filter === 'function') { + filter = options.filter + obj = filter('', obj) + } else if (isArray(options.filter)) { + filter = options.filter + objKeys = filter + } + var keys = [] + if (typeof obj !== 'object' || obj === null) { + return '' + } + var arrayFormat + if (opts && opts.arrayFormat in arrayPrefixGenerators) { + arrayFormat = opts.arrayFormat + } else if (opts && 'indices' in opts) { + arrayFormat = opts.indices ? 'indices' : 'repeat' + } else { + arrayFormat = 'indices' + } + var generateArrayPrefix = arrayPrefixGenerators[arrayFormat] + if ( + opts && + 'commaRoundTrip' in opts && + typeof opts.commaRoundTrip !== 'boolean' + ) { + throw new TypeError('`commaRoundTrip` must be a boolean, or absent') + } + var commaRoundTrip = + generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip + if (!objKeys) { + objKeys = Object.keys(obj) + } + if (options.sort) { + objKeys.sort(options.sort) + } + var sideChannel = getSideChannel() + for (var i = 0; i < objKeys.length; ++i) { + var key = objKeys[i] + if (options.skipNulls && obj[key] === null) { + continue + } + pushToArray( + keys, + stringify( + obj[key], + key, + generateArrayPrefix, + commaRoundTrip, + options.strictNullHandling, + options.skipNulls, + options.encode ? options.encoder : null, + options.filter, + options.sort, + options.allowDots, + options.serializeDate, + options.format, + options.formatter, + options.encodeValuesOnly, + options.charset, + sideChannel, + ), + ) + } + var joined = keys.join(options.delimiter) + var prefix = options.addQueryPrefix === true ? '?' : '' + if (options.charsetSentinel) { + if (options.charset === 'iso-8859-1') { + prefix += 'utf8=%26%2310003%3B&' + } else { + prefix += 'utf8=%E2%9C%93&' + } + } + return joined.length > 0 ? prefix + joined : '' + } + }, +}) + +// node_modules/qs/lib/parse.js +var require_parse = __commonJS({ + 'node_modules/qs/lib/parse.js'(exports, module) { + 'use strict' + init_define_process() + var utils = require_utils() + var has = Object.prototype.hasOwnProperty + var isArray = Array.isArray + var defaults = { + allowDots: false, + allowPrototypes: false, + allowSparse: false, + arrayLimit: 20, + charset: 'utf-8', + charsetSentinel: false, + comma: false, + decoder: utils.decode, + delimiter: '&', + depth: 5, + ignoreQueryPrefix: false, + interpretNumericEntities: false, + parameterLimit: 1e3, + parseArrays: true, + plainObjects: false, + strictNullHandling: false, + } + var interpretNumericEntities = function (str) { + return str.replace(/&#(\d+);/g, function ($0, numberStr) { + return String.fromCharCode(parseInt(numberStr, 10)) + }) + } + var parseArrayValue = function (val, options) { + if ( + val && + typeof val === 'string' && + options.comma && + val.indexOf(',') > -1 + ) { + return val.split(',') + } + return val + } + var isoSentinel = 'utf8=%26%2310003%3B' + var charsetSentinel = 'utf8=%E2%9C%93' + var parseValues = function parseQueryStringValues(str, options) { + var obj = {} + var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str + var limit = + options.parameterLimit === Infinity ? void 0 : options.parameterLimit + var parts = cleanStr.split(options.delimiter, limit) + var skipIndex = -1 + var i + var charset = options.charset + if (options.charsetSentinel) { + for (i = 0; i < parts.length; ++i) { + if (parts[i].indexOf('utf8=') === 0) { + if (parts[i] === charsetSentinel) { + charset = 'utf-8' + } else if (parts[i] === isoSentinel) { + charset = 'iso-8859-1' + } + skipIndex = i + i = parts.length + } + } + } + for (i = 0; i < parts.length; ++i) { + if (i === skipIndex) { + continue + } + var part = parts[i] + var bracketEqualsPos = part.indexOf(']=') + var pos = + bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1 + var key, val + if (pos === -1) { + key = options.decoder(part, defaults.decoder, charset, 'key') + val = options.strictNullHandling ? null : '' + } else { + key = options.decoder( + part.slice(0, pos), + defaults.decoder, + charset, + 'key', + ) + val = utils.maybeMap( + parseArrayValue(part.slice(pos + 1), options), + function (encodedVal) { + return options.decoder( + encodedVal, + defaults.decoder, + charset, + 'value', + ) + }, + ) + } + if ( + val && + options.interpretNumericEntities && + charset === 'iso-8859-1' + ) { + val = interpretNumericEntities(val) + } + if (part.indexOf('[]=') > -1) { + val = isArray(val) ? [val] : val + } + if (has.call(obj, key)) { + obj[key] = utils.combine(obj[key], val) + } else { + obj[key] = val + } + } + return obj + } + var parseObject = function (chain, val, options, valuesParsed) { + var leaf = valuesParsed ? val : parseArrayValue(val, options) + for (var i = chain.length - 1; i >= 0; --i) { + var obj + var root = chain[i] + if (root === '[]' && options.parseArrays) { + obj = [].concat(leaf) + } else { + obj = options.plainObjects ? /* @__PURE__ */ Object.create(null) : {} + var cleanRoot = + root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' + ? root.slice(1, -1) + : root + var index = parseInt(cleanRoot, 10) + if (!options.parseArrays && cleanRoot === '') { + obj = { 0: leaf } + } else if ( + !isNaN(index) && + root !== cleanRoot && + String(index) === cleanRoot && + index >= 0 && + options.parseArrays && + index <= options.arrayLimit + ) { + obj = [] + obj[index] = leaf + } else if (cleanRoot !== '__proto__') { + obj[cleanRoot] = leaf + } + } + leaf = obj + } + return leaf + } + var parseKeys = function parseQueryStringKeys( + givenKey, + val, + options, + valuesParsed, + ) { + if (!givenKey) { + return + } + var key = options.allowDots + ? givenKey.replace(/\.([^.[]+)/g, '[$1]') + : givenKey + var brackets = /(\[[^[\]]*])/ + var child = /(\[[^[\]]*])/g + var segment = options.depth > 0 && brackets.exec(key) + var parent = segment ? key.slice(0, segment.index) : key + var keys = [] + if (parent) { + if (!options.plainObjects && has.call(Object.prototype, parent)) { + if (!options.allowPrototypes) { + return + } + } + keys.push(parent) + } + var i = 0 + while ( + options.depth > 0 && + (segment = child.exec(key)) !== null && + i < options.depth + ) { + i += 1 + if ( + !options.plainObjects && + has.call(Object.prototype, segment[1].slice(1, -1)) + ) { + if (!options.allowPrototypes) { + return + } + } + keys.push(segment[1]) + } + if (segment) { + keys.push('[' + key.slice(segment.index) + ']') + } + return parseObject(keys, val, options, valuesParsed) + } + var normalizeParseOptions = function normalizeParseOptions2(opts) { + if (!opts) { + return defaults + } + if ( + opts.decoder !== null && + opts.decoder !== void 0 && + typeof opts.decoder !== 'function' + ) { + throw new TypeError('Decoder has to be a function.') + } + if ( + typeof opts.charset !== 'undefined' && + opts.charset !== 'utf-8' && + opts.charset !== 'iso-8859-1' + ) { + throw new TypeError( + 'The charset option must be either utf-8, iso-8859-1, or undefined', + ) + } + var charset = + typeof opts.charset === 'undefined' ? defaults.charset : opts.charset + return { + allowDots: + typeof opts.allowDots === 'undefined' + ? defaults.allowDots + : !!opts.allowDots, + allowPrototypes: + typeof opts.allowPrototypes === 'boolean' + ? opts.allowPrototypes + : defaults.allowPrototypes, + allowSparse: + typeof opts.allowSparse === 'boolean' + ? opts.allowSparse + : defaults.allowSparse, + arrayLimit: + typeof opts.arrayLimit === 'number' + ? opts.arrayLimit + : defaults.arrayLimit, + charset, + charsetSentinel: + typeof opts.charsetSentinel === 'boolean' + ? opts.charsetSentinel + : defaults.charsetSentinel, + comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma, + decoder: + typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder, + delimiter: + typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) + ? opts.delimiter + : defaults.delimiter, + depth: + typeof opts.depth === 'number' || opts.depth === false + ? +opts.depth + : defaults.depth, + ignoreQueryPrefix: opts.ignoreQueryPrefix === true, + interpretNumericEntities: + typeof opts.interpretNumericEntities === 'boolean' + ? opts.interpretNumericEntities + : defaults.interpretNumericEntities, + parameterLimit: + typeof opts.parameterLimit === 'number' + ? opts.parameterLimit + : defaults.parameterLimit, + parseArrays: opts.parseArrays !== false, + plainObjects: + typeof opts.plainObjects === 'boolean' + ? opts.plainObjects + : defaults.plainObjects, + strictNullHandling: + typeof opts.strictNullHandling === 'boolean' + ? opts.strictNullHandling + : defaults.strictNullHandling, + } + } + module.exports = function (str, opts) { + var options = normalizeParseOptions(opts) + if (str === '' || str === null || typeof str === 'undefined') { + return options.plainObjects ? /* @__PURE__ */ Object.create(null) : {} + } + var tempObj = typeof str === 'string' ? parseValues(str, options) : str + var obj = options.plainObjects ? /* @__PURE__ */ Object.create(null) : {} + var keys = Object.keys(tempObj) + for (var i = 0; i < keys.length; ++i) { + var key = keys[i] + var newObj = parseKeys( + key, + tempObj[key], + options, + typeof str === 'string', + ) + obj = utils.merge(obj, newObj, options) + } + if (options.allowSparse === true) { + return obj + } + return utils.compact(obj) + } + }, +}) + +// node_modules/qs/lib/index.js +var require_lib4 = __commonJS({ + 'node_modules/qs/lib/index.js'(exports, module) { + 'use strict' + init_define_process() + var stringify = require_stringify() + var parse = require_parse() + var formats = require_formats() + module.exports = { + formats, + parse, + stringify, + } + }, +}) + +// node_modules/then-request/lib/handle-qs.js +var require_handle_qs = __commonJS({ + 'node_modules/then-request/lib/handle-qs.js'(exports) { + 'use strict' + init_define_process() + exports.__esModule = true + var qs_1 = require_lib4() + function handleQs(url, query) { + var _a = url.split('?'), + start = _a[0], + part2 = _a[1] + var qs = (part2 || '').split('#')[0] + var end = + part2 && part2.split('#').length > 1 ? '#' + part2.split('#')[1] : '' + var baseQs = qs_1.parse(qs) + for (var i in query) { + baseQs[i] = query[i] + } + qs = qs_1.stringify(baseQs) + if (qs !== '') { + qs = '?' + qs + } + return start + qs + end + } + exports['default'] = handleQs + }, +}) + +// node_modules/then-request/lib/browser.js +var require_browser = __commonJS({ + 'node_modules/then-request/lib/browser.js'(exports, module) { + 'use strict' + init_define_process() + var __assign = + (exports && exports.__assign) || + Object.assign || + function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i] + for (var p in s) + if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p] + } + return t + } + exports.__esModule = true + var GenericResponse = require_lib2() + var Promise2 = require_promise() + var ResponsePromise_1 = require_ResponsePromise() + exports.ResponsePromise = ResponsePromise_1.ResponsePromise + var handle_qs_1 = require_handle_qs() + function request2(method, url, options) { + return ResponsePromise_1['default']( + new Promise2(function (resolve, reject) { + var xhr = new XMLHttpRequest() + if (typeof method !== 'string') { + throw new TypeError('The method must be a string.') + } + if (typeof url !== 'string') { + throw new TypeError('The URL/path must be a string.') + } + if (options == null) { + options = {} + } + if (typeof options !== 'object') { + throw new TypeError('Options must be an object (or null).') + } + method = method.toUpperCase() + function attempt(n, options2) { + request2(method, url, { + qs: options2.qs, + headers: options2.headers, + timeout: options2.timeout, + }).nodeify(function (err, res) { + var retry = !!(err || res.statusCode >= 400) + if (typeof options2.retry === 'function') { + retry = options2.retry(err, res, n + 1) + } + if (n >= (options2.maxRetries || 5)) { + retry = false + } + if (retry) { + var delay = options2.retryDelay + if (typeof options2.retryDelay === 'function') { + delay = options2.retryDelay(err, res, n + 1) + } + delay = delay || 200 + setTimeout(function () { + attempt(n + 1, options2) + }, delay) + } else { + if (err) reject(err) + else resolve(res) + } + }) + } + if (options.retry && method === 'GET') { + return attempt(0, options) + } + var headers = options.headers || {} + var match + var crossDomain = !!( + (match = /^([\w-]+:)?\/\/([^\/]+)/.exec(url)) && + match[2] != location.host + ) + if (!crossDomain) { + headers = __assign({}, headers, { + 'X-Requested-With': 'XMLHttpRequest', + }) + } + if (options.qs) { + url = handle_qs_1['default'](url, options.qs) + } + if (options.json) { + options.body = JSON.stringify(options.json) + headers = __assign({}, headers, { + 'Content-Type': 'application/json', + }) + } + if (options.form) { + options.body = options.form + } + if (options.timeout) { + xhr.timeout = options.timeout + var start_1 = Date.now() + xhr.ontimeout = function () { + var duration = Date.now() - start_1 + var err = new Error('Request timed out after ' + duration + 'ms') + err.timeout = true + err.duration = duration + reject(err) + } + } + xhr.onreadystatechange = function () { + if (xhr.readyState === 4) { + var headers2 = {} + xhr + .getAllResponseHeaders() + .split('\r\n') + .forEach(function (header) { + var h = header.split(':') + if (h.length > 1) { + headers2[h[0].toLowerCase()] = h.slice(1).join(':').trim() + } + }) + var res = new GenericResponse( + xhr.status, + headers2, + xhr.responseText, + url, + ) + resolve(res) + } + } + xhr.open(method, url, true) + for (var name in headers) { + xhr.setRequestHeader(name, headers[name]) + } + xhr.send(options.body ? options.body : null) + }), + ) + } + var fd = FormData + exports.FormData = fd + exports['default'] = request2 + module.exports = request2 + module.exports['default'] = request2 + module.exports.FormData = fd + }, +}) + +// data/HED8.0.0.xml +var require_HED8_0_0 = __commonJS({ + 'data/HED8.0.0.xml'(exports, module) { + module.exports = + '\n\n This schema is the first official release that includes an xsd and requires unit class, unit modifier, value class, schema attribute and property sections.\n\n \n \n Event\n Something that happens at a given time and (typically) place. Elements of this tag subtree designate the general category in which an event falls.\n \n suggestedTag\n Task-property\n \n \n Sensory-event\n Something perceivable by the participant. An event meant to be an experimental stimulus should include the tag Task-property/Task-event-role/Experimental-stimulus.\n \n suggestedTag\n Task-event-role\n Attribute/Sensory\n \n \n \n Agent-action\n Any action engaged in by an agent (see the Agent subtree for agent categories). A participant response to an experiment stimulus should include the tag Agent-property/Agent-task-role/Experiment-participant.\n \n suggestedTag\n Task-event-role\n Agent\n \n \n \n Data-feature\n An event marking the occurrence of a data feature such as an interictal spike or alpha burst that is often added post hoc to the data record.\n \n suggestedTag\n Data-property\n \n \n \n Experiment-control\n An event pertaining to the physical control of the experiment during its operation.\n \n \n Experiment-procedure\n An event indicating an experimental procedure, as in performing a saliva swab during the experiment or administering a survey.\n \n \n Experiment-structure\n An event specifying a change-point of the structure of experiment. This event is typically used to indicate a change in experimental conditions or tasks.\n \n \n Measurement-event\n A discrete measure returned by an instrument.\n \n suggestedTag\n Data-property\n \n \n \n \n Agent\n Someone or something that takes an active role or produces a specified effect.The role or effect may be implicit. Being alive or performing an activity such as a computation may qualify something to be an agent. An agent may also be something that simulates something else.\n \n suggestedTag\n Agent-property\n \n \n Animal-agent\n An agent that is an animal.\n \n \n Avatar-agent\n An agent associated with an icon or avatar representing another agent.\n \n \n Controller-agent\n An agent experiment control software or hardware.\n \n \n Human-agent\n A person who takes an active role or produces a specified effect.\n \n \n Robotic-agent\n An agent mechanical device capable of performing a variety of often complex tasks on command or by being programmed in advance.\n \n \n Software-agent\n An agent computer program.\n \n \n \n Action\n Do something.\n \n extensionAllowed\n \n \n Communicate\n Convey knowledge of or information about something.\n \n Communicate-gesturally\n Communicate nonverbally using visible bodily actions, either in place of speech or together and in parallel with spoken words. Gestures include movement of the hands, face, or other parts of the body.\n \n relatedTag\n Move-face\n Move-upper-extremity\n \n \n Clap-hands\n Strike the palms of against one another resoundingly, and usually repeatedly, especially to express approval.\n \n \n Clear-throat\n Cough slightly so as to speak more clearly, attract attention, or to express hesitancy before saying something awkward.\n \n relatedTag\n Move-face\n Move-head\n \n \n \n Frown\n Express disapproval, displeasure, or concentration, typically by turning down the corners of the mouth.\n \n relatedTag\n Move-face\n \n \n \n Grimace\n Make a twisted expression, typically expressing disgust, pain, or wry amusement.\n \n relatedTag\n Move-face\n \n \n \n Nod-head\n Tilt head in alternating up and down arcs along the sagittal plane. It is most commonly, but not universally, used to indicate agreement, acceptance, or acknowledgement.\n \n relatedTag\n Move-head\n \n \n \n Pump-fist\n Raise with fist clenched in triumph or affirmation.\n \n relatedTag\n Move-upper-extremity\n \n \n \n Raise-eyebrows\n Move eyebrows upward.\n \n relatedTag\n Move-face\n Move-eyes\n \n \n \n Shake-fist\n Clench hand into a fist and shake to demonstrate anger.\n \n relatedTag\n Move-upper-extremity\n \n \n \n Shake-head\n Turn head from side to side as a way of showing disagreement or refusal.\n \n relatedTag\n Move-head\n \n \n \n Shhh\n Place finger over lips and possibly uttering the syllable shhh to indicate the need to be quiet.\n \n relatedTag\n Move-upper-extremity\n \n \n \n Shrug\n Lift shoulders up towards head to indicate a lack of knowledge about a particular topic.\n \n relatedTag\n Move-upper-extremity\n Move-torso\n \n \n \n Smile\n Form facial features into a pleased, kind, or amused expression, typically with the corners of the mouth turned up and the front teeth exposed.\n \n relatedTag\n Move-face\n \n \n \n Spread-hands\n Spread hands apart to indicate ignorance.\n \n relatedTag\n Move-upper-extremity\n \n \n \n Thumbs-down\n Extend the thumb downward to indicate disapproval.\n \n relatedTag\n Move-upper-extremity\n \n \n \n Thumb-up\n Extend the thumb upward to indicate approval.\n \n relatedTag\n Move-upper-extremity\n \n \n \n Wave\n Raise hand and move left and right, as a greeting or sign of departure.\n \n relatedTag\n Move-upper-extremity\n \n \n \n Widen-eyes\n Open eyes and possibly with eyebrows lifted especially to express surprise or fear.\n \n relatedTag\n Move-face\n Move-eyes\n \n \n \n Wink\n Close and open one eye quickly, typically to indicate that something is a joke or a secret or as a signal of affection or greeting.\n \n relatedTag\n Move-face\n Move-eyes\n \n \n \n \n Communicate-musically\n Communicate using music.\n \n Hum\n Make a low, steady continuous sound like that of a bee. Sing with the lips closed and without uttering speech.\n \n \n Play-instrument\n Make musical sounds using an instrument.\n \n \n Sing\n Produce musical tones by means of the voice.\n \n \n Vocalize\n Utter vocal sounds.\n \n \n Whistle\n Produce a shrill clear sound by forcing breath out or air in through the puckered lips.\n \n \n \n Communicate-vocally\n Communicate using mouth or vocal cords.\n \n Cry\n Shed tears associated with emotions, usually sadness but also joy or frustration.\n \n \n Groan\n Make a deep inarticulate sound in response to pain or despair.\n \n \n Laugh\n Make the spontaneous sounds and movements of the face and body that are the instinctive expressions of lively amusement and sometimes also of contempt or derision.\n \n \n Scream\n Make loud, vociferous cries or yells to express pain, excitement, or fear.\n \n \n Shout\n Say something very loudly.\n \n \n Sigh\n Emit a long, deep, audible breath expressing sadness, relief, tiredness, or a similar feeling.\n \n \n Speak\n Communicate using spoken language.\n \n \n Whisper\n Speak very softly using breath without vocal cords.\n \n \n \n \n Move\n Move in a specified direction or manner. Change position or posture.\n \n Breathe\n Inhale or exhale during respiration.\n \n Blow\n Expel air through pursed lips.\n \n \n Cough\n Suddenly and audibly expel air from the lungs through a partially closed glottis, preceded by inhalation.\n \n \n Exhale\n Blow out or expel breath.\n \n \n Hiccup\n Involuntarily spasm the diaphragm and respiratory organs, with a sudden closure of the glottis and a characteristic sound like that of a cough.\n \n \n Hold-breath\n Interrupt normal breathing by ceasing to inhale or exhale.\n \n \n Inhale\n Draw in with the breath through the nose or mouth.\n \n \n Sneeze\n Suddenly and violently expel breath through the nose and mouth.\n \n \n Sniff\n Draw in air audibly through the nose to detect a smell, to stop it from running, or to express contempt.\n \n \n \n Move-body\n Move entire body.\n \n Bend\n Move body in a bowed or curved manner.\n \n \n Dance\n Perform a purposefully selected sequences of human movement often with aesthetic or symbolic value. Move rhythmically to music, typically following a set sequence of steps.\n \n \n Fall-down\n Lose balance and collapse.\n \n \n Flex\n Cause a muscle to stand out by contracting or tensing it. Bend a limb or joint.\n \n \n Jerk\n Make a quick, sharp, sudden movement.\n \n \n Lie-down\n Move to a horizontal or resting position.\n \n \n Recover-balance\n Return to a stable, upright body position.\n \n \n Sit-down\n Move from a standing to a sitting position.\n \n \n Sit-up\n Move from lying down to a sitting position.\n \n \n Stand-up\n Move from a sitting to a standing position.\n \n \n Stretch\n Straighten or extend body or a part of body to its full length, typically so as to tighten muscles or in order to reach something.\n \n \n Shudder\n Tremble convulsively, sometimes as a result of fear or revulsion.\n \n \n Stumble\n Trip or momentarily lose balance and almost fall.\n \n \n Turn\n Change or cause to change direction.\n \n \n \n Move-body-part\n Move one part of a body.\n \n Move-eyes\n Move eyes.\n \n Blink\n Shut and open the eyes quickly.\n \n \n Close-eyes\n Lower and keep eyelids in a closed position.\n \n \n Fixate\n Direct eyes to a specific point or target.\n \n \n Inhibit-blinks\n Purposely prevent blinking.\n \n \n Open-eyes\n Raise eyelids to expose pupil.\n \n \n Saccade\n Move eyes rapidly between fixation points.\n \n \n Squint\n Squeeze one or both eyes partly closed in an attempt to see more clearly or as a reaction to strong light.\n \n \n Stare\n Look fixedly or vacantly at someone or something with eyes wide open.\n \n \n \n Move-face\n Move the face or jaw.\n \n Bite\n Seize with teeth or jaws an object or organism so as to grip or break the surface covering.\n \n \n Burp\n Noisily release air from the stomach through the mouth. Belch.\n \n \n Chew\n Repeatedly grinding, tearing, and or crushing with teeth or jaws.\n \n \n Gurgle\n Make a hollow bubbling sound like that made by water running out of a bottle.\n \n \n Swallow\n Cause or allow something, especially food or drink to pass down the throat.\n \n Gulp\n Swallow quickly or in large mouthfuls, often audibly, sometimes to indicate apprehension.\n \n \n \n Yawn\n Take a deep involuntary inhalation with the mouth open often as a sign of drowsiness or boredom.\n \n \n \n Move-head\n Move head.\n \n Lift-head\n Tilt head back lifting chin.\n \n \n Lower-head\n Move head downward so that eyes are in a lower position.\n \n \n Turn-head\n Rotate head horizontally to look in a different direction.\n \n \n \n Move-lower-extremity\n Move leg and/or foot.\n \n Curl-toes\n Bend toes sometimes to grip.\n \n \n Hop\n Jump on one foot.\n \n \n Jog\n Run at a trot to exercise.\n \n \n Jump\n Move off the ground or other surface through sudden muscular effort in the legs.\n \n \n Kick\n Strike out or flail with the foot or feet. Strike using the leg, in unison usually with an area of the knee or lower using the foot.\n \n \n Pedal\n Move by working the pedals of a bicycle or other machine.\n \n \n Press-foot\n Move by pressing foot.\n \n \n Run\n Travel on foot at a fast pace.\n \n \n Step\n Put one leg in front of the other and shift weight onto it.\n \n Heel-strike\n Strike the ground with the heel during a step.\n \n \n Toe-off\n Push with toe as part of a stride.\n \n \n \n Trot\n Run at a moderate pace, typically with short steps.\n \n \n Walk\n Move at a regular pace by lifting and setting down each foot in turn never having both feet off the ground at once.\n \n \n \n Move-torso\n Move body trunk.\n \n \n Move-upper-extremity\n Move arm, shoulder, and/or hand.\n \n Drop\n Let or cause to fall vertically.\n \n \n Grab\n Seize suddenly or quickly. Snatch or clutch.\n \n \n Grasp\n Seize and hold firmly.\n \n \n Hold-down\n Prevent someone or something from moving by holding them firmly.\n \n \n Lift\n Raising something to higher position.\n \n \n Make-fist\n Close hand tightly with the fingers bent against the palm.\n \n \n Point\n Draw attention to something by extending a finger or arm.\n \n \n Press\n Apply pressure to something to flatten, shape, smooth or depress it. This action tag should be used to indicate key presses and mouse clicks.\n \n relatedTag\n Push\n \n \n \n Push\n Apply force in order to move something away. Use Press to indicate a key press or mouse click.\n \n relatedTag\n Press\n \n \n \n Reach\n Stretch out your arm in order to get or touch something.\n \n \n Release\n Make available or set free.\n \n \n Retract\n Draw or pull back.\n \n \n Scratch\n Drag claws or nails over a surface or on skin.\n \n \n Snap-fingers\n Make a noise by pushing second finger hard against thumb and then releasing it suddenly so that it hits the base of the thumb.\n \n \n Touch\n Come into or be in contact with.\n \n \n \n \n \n Perceive\n Produce an internal, conscious image through stimulating a sensory system.\n \n Hear\n Give attention to a sound.\n \n \n See\n Direct gaze toward someone or something or in a specified direction.\n \n \n Smell\n Inhale in order to ascertain an odor or scent.\n \n \n Taste\n Sense a flavor in the mouth and throat on contact with a substance.\n \n \n Sense-by-touch\n Sense something through receptors in the skin.\n \n \n \n Perform\n Carry out or accomplish an action, task, or function.\n \n Close\n Act as to blocked against entry or passage.\n \n \n Collide-with\n Hit with force when moving.\n \n \n Halt\n Bring or come to an abrupt stop.\n \n \n Modify\n Change something.\n \n \n Open\n Widen an aperture, door, or gap, especially one allowing access to something.\n \n \n Operate\n Control the functioning of a machine, process, or system.\n \n \n Play\n Engage in activity for enjoyment and recreation rather than a serious or practical purpose.\n \n \n Read\n Interpret something that is written or printed.\n \n \n Repeat\n Make do or perform again.\n \n \n Rest\n Be inactive in order to regain strength, health, or energy.\n \n \n Write\n Communicate or express by means of letters or symbols written or imprinted on a surface.\n \n \n \n Think\n Direct the mind toward someone or something or use the mind actively to form connected ideas.\n \n Allow\n Allow access to something such as allowing a car to pass.\n \n \n Attend-to\n Focus mental experience on specific targets.\n \n \n Count\n Tally items either silently or aloud.\n \n \n Deny\n Refuse to give or grant something requested or desired by someone.\n \n \n Detect\n Discover or identify the presence or existence of something.\n \n \n Discriminate\n Recognize a distinction.\n \n \n Encode\n Convert information or an instruction into a particular form.\n \n \n Evade\n Escape or avoid, especially by cleverness or trickery.\n \n \n Generate\n Cause something, especially an emotion or situation to arise or come about.\n \n \n Identify\n Establish or indicate who or what someone or something is.\n \n \n Imagine\n Form a mental image or concept of something.\n \n \n Judge\n Evaluate evidence to make a decision or form a belief.\n \n \n Learn\n Adaptively change behavior as the result of experience.\n \n \n Memorize\n Adaptively change behavior as the result of experience.\n \n \n Plan\n Think about the activities required to achieve a desired goal.\n \n \n Predict\n Say or estimate that something will happen or will be a consequence of something without having exact informaton.\n \n \n Recognize\n Identify someone or something from having encountered them before.\n \n \n Respond\n React to something such as a treatment or a stimulus.\n \n \n Recall\n Remember information by mental effort.\n \n \n Switch-attention\n Transfer attention from one focus to another.\n \n \n Track\n Follow a person, animal, or object through space or time.\n \n \n \n \n Item\n An independently existing thing (living or nonliving).\n \n extensionAllowed\n \n \n Biological-item\n An entity that is biological, that is related to living organisms.\n \n Anatomical-item\n A biological structure, system, fluid or other substance excluding single molecular entities.\n \n Body-part\n Any part of an organism.\n \n Head\n The upper part of the human body, or the front or upper part of the body of an animal, typically separated from the rest of the body by a neck, and containing the brain, mouth, and sense organs.\n \n Hair\n The filamentous outgrowth of the epidermis.\n \n \n Ear\n A sense organ needed for the detection of sound and for establishing balance.\n \n \n Face\n The anterior portion of the head extending from the forehead to the chin and ear to ear. The facial structures contain the eyes, nose and mouth, cheeks and jaws.\n \n Cheek\n The fleshy part of the face bounded by the eyes, nose, ear, and jaw line.\n \n \n Chin\n The part of the face below the lower lip and including the protruding part of the lower jaw.\n \n \n Eye\n The organ of sight or vision.\n \n \n Eyebrow\n The arched strip of hair on the bony ridge above each eye socket.\n \n \n Forehead\n The part of the face between the eyebrows and the normal hairline.\n \n \n Lip\n Fleshy fold which surrounds the opening of the mouth.\n \n \n Nose\n A structure of special sense serving as an organ of the sense of smell and as an entrance to the respiratory tract.\n \n \n Mouth\n The proximal portion of the digestive tract, containing the oral cavity and bounded by the oral opening.\n \n \n Teeth\n The hard bonelike structures in the jaws. A collection of teeth arranged in some pattern in the mouth or other part of the body.\n \n \n \n \n Lower-extremity\n Refers to the whole inferior limb (leg and/or foot).\n \n Ankle\n A gliding joint between the distal ends of the tibia and fibula and the proximal end of the talus.\n \n \n Calf\n The fleshy part at the back of the leg below the knee.\n \n \n Foot\n The structure found below the ankle joint required for locomotion.\n \n Big-toe\n The largest toe on the inner side of the foot.\n \n \n Heel\n The back of the foot below the ankle.\n \n \n Instep\n The part of the foot between the ball and the heel on the inner side.\n \n \n Little-toe\n The smallest toe located on the outer side of the foot.\n \n \n Toes\n The terminal digits of the foot.\n \n \n \n Knee\n A joint connecting the lower part of the femur with the upper part of the tibia.\n \n \n Shin\n Front part of the leg below the knee.\n \n \n Thigh\n Upper part of the leg between hip and knee.\n \n \n \n Torso\n The body excluding the head and neck and limbs.\n \n Torso-back\n The rear surface of the human body from the shoulders to the hips.\n \n \n Buttocks\n The round fleshy parts that form the lower rear area of a human trunk.\n \n \n Torso-chest\n The anterior side of the thorax from the neck to the abdomen.\n \n \n Gentalia\n The external organs of reproduction.\n \n \n Hip\n The lateral prominence of the pelvis from the waist to the thigh.\n \n \n Waist\n The abdominal circumference at the navel.\n \n \n \n Upper-extremity\n Refers to the whole superior limb (shoulder, arm, elbow, wrist, hand).\n \n Elbow\n A type of hinge joint located between the forearm and upper arm.\n \n \n Forearm\n Lower part of the arm between the elbow and wrist.\n \n \n Hand\n The distal portion of the upper extremity. It consists of the carpus, metacarpus, and digits.\n \n Finger\n Any of the digits of the hand.\n \n Index-finger\n The second finger from the radial side of the hand, next to the thumb.\n \n \n Little-finger\n The fifth and smallest finger from the radial side of the hand.\n \n \n Middle-finger\n The middle or third finger from the radial side of the hand.\n \n \n Ring-finger\n The fourth finger from the radial side of the hand.\n \n \n Thumb\n The thick and short hand digit which is next to the index finger in humans.\n \n \n \n Palm\n The part of the inner surface of the hand that extends from the wrist to the bases of the fingers.\n \n \n Knuckles\n A part of a finger at a joint where the bone is near the surface, especially where the finger joins the hand.\n \n \n \n Shoulder\n Joint attaching upper arm to trunk.\n \n \n Upper-arm\n Portion of arm between shoulder and elbow.\n \n \n Wrist\n A joint between the distal end of the radius and the proximal row of carpal bones.\n \n \n \n \n \n Organism\n A living entity, more specifically a biological entity that consists of one or more cells and is capable of genomic replication (independently or not).\n \n Animal\n A living organism that has membranous cell walls, requires oxygen and organic foods, and is capable of voluntary movement.\n \n \n Human\n The bipedal primate mammal Homo sapiens.\n \n \n Plant\n Any living organism that typically synthesizes its food from inorganic substances and possesses cellulose cell walls.\n \n \n \n \n Language-item\n An entity related to a systematic means of communicating by the use of sounds, symbols, or gestures.\n \n suggestedTag\n Attribute/Sensory\n \n \n Character\n A mark or symbol used in writing.\n \n \n Clause\n A unit of grammatical organization next below the sentence in rank, usually consisting of a subject and predicate.\n \n \n Glyph\n A hieroglyphic character, symbol, or pictograph.\n \n \n Nonword\n A group of letters or speech sounds that looks or sounds like a word but that is not accepted as such by native speakers.\n \n \n Paragraph\n A distinct section of a piece of writing, usually dealing with a single theme.\n \n \n Phoneme\n A speech sound that is distinguished by the speakers of a particular language.\n \n \n Phrase\n A phrase is a group of words functioning as a single unit in the syntax of a sentence.\n \n \n Sentence\n A set of words that is complete in itself, conveying a statement, question, exclamation, or command and typically containing an explicit or implied subject and a predicate containing a finite verb.\n \n \n Syllable\n A unit of spoken language larger than a phoneme.\n \n \n Textblock\n A block of text.\n \n \n Word\n A word is the smallest free form (an item that may be expressed in isolation with semantic or pragmatic content) in a language.\n \n \n \n Object\n Something perceptible by one or more of the senses, especially by vision or touch. A material thing.\n \n suggestedTag\n Attribute/Sensory\n \n \n Geometric-object\n An object or a representation that has structure and topology in space.\n \n Pattern\n An arrangement of objects, facts, behaviors, or other things which have scientific, mathematical, geometric, statistical, or other meaning.\n \n Dots\n A small round mark or spot.\n \n \n LED-pattern\n A pattern created by lighting selected members of a fixed light emitting diode array.\n \n \n \n 2D-shape\n A planar, two-dimensional shape.\n \n Clockface\n The dial face of a clock. A location identifier based on clockface numbering or anatomic subregion.\n \n \n Cross\n A figure or mark formed by two intersecting lines crossing at their midpoints.\n \n \n Dash\n A horizontal stroke in writing or printing to mark a pause or break in sense or to represent omitted letters or words.\n \n \n Ellipse\n A closed plane curve resulting from the intersection of a circular cone and a plane cutting completely through it, especially a plane not parallel to the base.\n \n Circle\n A ring-shaped structure with every point equidistant from the center.\n \n \n \n Rectangle\n A parallelogram with four right angles.\n \n Square\n A square is a special rectangle with four equal sides.\n \n \n \n Single-point\n A point is a geometric entity that is located in a zero-dimensional spatial region and whose position is defined by its coordinates in some coordinate system.\n \n \n Star\n A conventional or stylized representation of a star, typically one having five or more points.\n \n \n Triangle\n A three-sided polygon.\n \n \n \n 3D-shape\n A geometric three-dimensional shape.\n \n Box\n A square or rectangular vessel, usually made of cardboard or plastic.\n \n Cube\n A solid or semi-solid in the shape of a three dimensional square.\n \n \n \n Cone\n A shape whose base is a circle and whose sides taper up to a point.\n \n \n Cylinder\n A surface formed by circles of a given radius that are contained in a plane perpendicular to a given axis, whose centers align on the axis.\n \n \n Ellipsoid\n A closed plane curve resulting from the intersection of a circular cone and a plane cutting completely through it, especially a plane not parallel to the base.\n \n Sphere\n A solid or hollow three-dimensional object bounded by a closed surface such that every point on the surface is equidistant from the center.\n \n \n \n Pyramid\n A polyhedron of which one face is a polygon of any number of sides, and the other faces are triangles with a common vertex.\n \n \n \n \n Ingestible-object\n Something that can be taken into the body by the mouth for digestion or absorption.\n \n \n Man-made-object\n Something constructed by human means.\n \n Building\n A structure that has a roof and walls and stands more or less permanently in one place.\n \n Room\n An area within a building enclosed by walls and floor and ceiling.\n \n \n Roof\n A roof is the covering on the uppermost part of a building which provides protection from animals and weather, notably rain, but also heat, wind and sunlight.\n \n \n Entrance\n The means or place of entry.\n \n \n Attic\n A room or a space immediately below the roof of a building.\n \n \n Basement\n The part of a building that is wholly or partly below ground level.\n \n \n \n Clothing\n A covering designed to be worn on the body.\n \n \n Device\n An object contrived for a specific purpose.\n \n Assistive-device\n A device that help an individual accomplish a task.\n \n Glasses\n Frames with lenses worn in front of the eye for vision correction, eye protection, or protection from UV rays.\n \n \n Writing-device\n A device used for writing.\n \n Pen\n A common writing instrument used to apply ink to a surface for writing or drawing.\n \n \n Pencil\n An implement for writing or drawing that is constructed of a narrow solid pigment core in a protective casing that prevents the core from being broken or marking the hand.\n \n \n \n \n Computing-device\n An electronic device which take inputs and processes results from the inputs.\n \n Cellphone\n A telephone with access to a cellular radio system so it can be used over a wide area, without a physical connection to a network.\n \n \n Desktop-computer\n A computer suitable for use at an ordinary desk.\n \n \n Laptop-computer\n A computer that is portable and suitable for use while traveling.\n \n \n Tablet-computer\n A small portable computer that accepts input directly on to its screen rather than via a keyboard or mouse.\n \n \n \n Engine\n A motor is a machine designed to convert one or more forms of energy into mechanical energy.\n \n \n IO-device\n Hardware used by a human (or other system) to communicate with a computer.\n \n Input-device\n A piece of equipment used to provide data and control signals to an information processing system such as a computer or information appliance.\n \n Computer-mouse\n A hand-held pointing device that detects two-dimensional motion relative to a surface.\n \n Mouse-button\n An electric switch on a computer mouse which can be pressed or clicked to select or interact with an element of a graphical user interface.\n \n \n Scroll-wheel\n A scroll wheel or mouse wheel is a wheel used for scrolling made of hard plastic with a rubbery surface usually located between the left and right mouse buttons and is positioned perpendicular to the mouse surface.\n \n \n \n Joystick\n A control device that uses a movable handle to create two-axis input for a computer device.\n \n \n Keyboard\n A device consisting of mechanical keys that are pressed to create input to a computer.\n \n Keyboard-key\n A button on a keyboard usually representing letters, numbers, functions, or symbols.\n \n #\n Value of a keyboard key.\n \n takesValue\n \n \n \n \n \n Keypad\n A device consisting of keys, usually in a block arrangement, that provides limited input to a system.\n \n Keypad-key\n A key on a separate section of a computer keyboard that groups together numeric keys and those for mathematical or other special functions in an arrangement like that of a calculator.\n \n #\n Value of keypad key.\n \n takesValue\n \n \n \n \n \n Microphone\n A device designed to convert sound to an electrical signal.\n \n \n Push-button\n A switch designed to be operated by pressing a button.\n \n \n \n Output-device\n Any piece of computer hardware equipment which converts information into human understandable form.\n \n Display-device\n An output device for presentation of information in visual or tactile form the latter used for example in tactile electronic displays for blind people.\n \n Head-mounted-display\n An instrument that functions as a display device, worn on the head or as part of a helmet, that has a small display optic in front of one (monocular HMD) or each eye (binocular HMD).\n \n \n LED-display\n A LED display is a flat panel display that uses an array of light-emitting diodes as pixels for a video display.\n \n \n Computer-screen\n An electronic device designed as a display or a physical device designed to be a protective meshwork.\n \n Screen-window\n A part of a computer screen that contains a display different from the rest of the screen. A window is a graphical control element consisting of a visual area containing some of the graphical user interface of the program it belongs to and is framed by a window decoration.\n \n \n \n \n Auditory-device\n A device designed to produce sound.\n \n Headphones\n An instrument that consists of a pair of small loudspeakers, or less commonly a single speaker, held close to ears and connected to a signal source such as an audio amplifier, radio, CD player or portable media player.\n \n \n Loudspeaker\n A device designed to convert electrical signals to sounds that can be heard.\n \n \n \n \n Recording-device\n A device that copies information in a signal into a persistent information bearer.\n \n EEG-recorder\n A device for recording electric currents in the brain using electrodes applied to the scalp, to the surface of the brain, or placed within the substance of the brain.\n \n \n File-storage\n A device for recording digital information to a permanent media.\n \n \n MEG-recorder\n A device for measuring the magnetic fields produced by electrical activity in the brain, usually conducted externally.\n \n \n Motion-capture\n A device for recording the movement of objects or people.\n \n \n Tape-recorder\n A device for recording and reproduction usually using magnetic tape for storage that can be saved and played back.\n \n \n \n Touchscreen\n A control component that operates an electronic device by pressing the display on the screen.\n \n \n \n Machine\n A human-made device that uses power to apply forces and control movement to perform an action.\n \n \n Measurement-device\n A device in which a measure function inheres.\n \n Clock\n A device designed to indicate the time of day or to measure the time duration of an event or action.\n \n Clock-face\n A location identifier based on clockface numbering or anatomic subregion.\n \n \n \n \n Robot\n A mechanical device that sometimes resembles a living animal and is capable of performing a variety of often complex human tasks on command or by being programmed in advance.\n \n \n Tool\n A component that is not part of a device but is designed to support its assemby or operation.\n \n \n \n Document\n A physical object, or electronic counterpart, that is characterized by containing writing which is meant to be human-readable.\n \n Letter\n A written message addressed to a person or organization.\n \n \n Note\n A brief written record.\n \n \n Book\n A volume made up of pages fastened along one edge and enclosed between protective covers.\n \n \n Notebook\n A book for notes or memoranda.\n \n \n \n Furnishing\n Furniture, fittings, and other decorative accessories, such as curtains and carpets, for a house or room.\n \n \n Manufactured-material\n Substances created or extracted from raw materials.\n \n Ceramic\n A hard, brittle, heat-resistant and corrosion-resistant material made by shaping and then firing a nonmetallic mineral, such as clay, at a high temperature.\n \n \n Glass\n A brittle transparent solid with irregular atomic structure.\n \n \n Paper\n A thin sheet material produced by mechanically or chemically processing cellulose fibres derived from wood, rags, grasses or other vegetable sources in water.\n \n \n Plastic\n Various high-molecular-weight thermoplastic or thermosetting polymers that are capable of being molded, extruded, drawn, or otherwise shaped and then hardened into a form.\n \n \n Steel\n An alloy made up of iron with typically a few tenths of a percent of carbon to improve its strength and fracture resistance compared to iron.\n \n \n \n Media\n Media are audo/visual/audiovisual modes of communicating information for mass consumption.\n \n Media-clip\n A short segment of media.\n \n Audio-clip\n A short segment of audio.\n \n \n Audiovisual-clip\n A short media segment containing both audio and video.\n \n \n Video-clip\n A short segment of video.\n \n \n \n Visualization\n An planned process that creates images, diagrams or animations from the input data.\n \n Animation\n A form of graphical illustration that changes with time to give a sense of motion or represent dynamic changes in the portrayal.\n \n \n Art-installation\n A large-scale, mixed-media constructions, often designed for a specific place or for a temporary period of time.\n \n \n Braille\n A display using a system of raised dots that can be read with the fingers by people who are blind.\n \n \n Image\n Any record of an imaging event whether physical or electronic.\n \n Cartoon\n A type of illustration, sometimes animated, typically in a non-realistic or semi-realistic style. The specific meaning has evolved over time, but the modern usage usually refers to either an image or series of images intended for satire, caricature, or humor. A motion picture that relies on a sequence of illustrations for its animation.\n \n \n Drawing\n A representation of an object or outlining a figure, plan, or sketch by means of lines.\n \n \n Icon\n A sign (such as a word or graphic symbol) whose form suggests its meaning.\n \n \n Painting\n A work produced through the art of painting.\n \n \n Photograph\n An image recorded by a camera.\n \n \n \n Movie\n A sequence of images displayed in succession giving the illusion of continuous movement.\n \n \n Outline-visualization\n A visualization consisting of a line or set of lines enclosing or indicating the shape of an object in a sketch or diagram.\n \n \n Point-light-visualization\n A display in which action is depicted using a few points of light, often generated from discrete sensors in motion capture.\n \n \n Sculpture\n A two- or three-dimensional representative or abstract forms, especially by carving stone or wood or by casting metal or plaster.\n \n \n Stick-figure-visualization\n A drawing showing the head of a human being or animal as a circle and all other parts as straight lines.\n \n \n \n \n Navigational-object\n An object whose purpose is to assist directed movement from one location to another.\n \n Path\n A trodden way. A way or track laid down for walking or made by continual treading.\n \n \n Road\n An open way for the passage of vehicles, persons, or animals on land.\n \n Lane\n A defined path with physical dimensions through which an object or substance may traverse.\n \n \n \n Runway\n A paved strip of ground on a landing field for the landing and takeoff of aircraft.\n \n \n \n Vehicle\n A mobile machine which transports people or cargo.\n \n Aircraft\n A vehicle which is able to travel through air in an atmosphere.\n \n \n Bicycle\n A human-powered, pedal-driven, single-track vehicle, having two wheels attached to a frame, one behind the other.\n \n \n Boat\n A watercraft of any size which is able to float or plane on water.\n \n \n Car\n A wheeled motor vehicle used primarily for the transportation of human passengers.\n \n \n Cart\n A cart is a vehicle which has two wheels and is designed to transport human passengers or cargo.\n \n \n Tractor\n A mobile machine specifically designed to deliver a high tractive effort at slow speeds, and mainly used for the purposes of hauling a trailer or machinery used in agriculture or construction.\n \n \n Train\n A connected line of railroad cars with or without a locomotive.\n \n \n Truck\n A motor vehicle which, as its primary funcion, transports cargo rather than human passangers.\n \n \n \n \n Natural-object\n Something that exists in or is produced by nature, and is not artificial or man-made.\n \n Mineral\n A solid, homogeneous, inorganic substance occurring in nature and having a definite chemical composition.\n \n \n Natural-feature\n A feature that occurs in nature. A prominent or identifiable aspect, region, or site of interest.\n \n Field\n An unbroken expanse as of ice or grassland.\n \n \n Hill\n A rounded elevation of limited extent rising above the surrounding land with local relief of less than 300m.\n \n \n Mountain\n A landform that extends above the surrounding terrain in a limited area.\n \n \n River\n A natural freshwater surface stream of considerable volume and a permanent or seasonal flow, moving in a definite channel toward a sea, lake, or another river.\n \n \n Waterfall\n A sudden descent of water over a step or ledge in the bed of a river.\n \n \n \n \n \n Sound\n Mechanical vibrations transmitted by an elastic medium. Something that can be heard.\n \n Environmental-sound\n Sounds occuring in the environment. An accumulation of noise pollution that occurs outside. This noise can be caused by transport, industrial, and recreational activities.\n \n Crowd-sound\n Noise produced by a mixture of sounds from a large group of people.\n \n \n Signal-noise\n Any part of a signal that is not the true or original signal but is introduced by the communication mechanism.\n \n \n \n Musical-sound\n Sound produced by continuous and regular vibrations, as opposed to noise.\n \n Tone\n A musical note, warble, or other sound used as a particular signal on a telephone or answering machine.\n \n \n Instrument-sound\n Sound produced by a musical instrument.\n \n \n Vocalized-sound\n Musical sound produced by vocal cords in a biological agent.\n \n \n \n Named-animal-sound\n A sound recognizable as being associated with particular animals.\n \n Barking\n Sharp explosive cries like sounds made by certain animals, especially a dog, fox, or seal.\n \n \n Bleating\n Wavering cries like sounds made by a sheep, goat, or calf.\n \n \n Crowing\n Loud shrill sounds characteristic of roosters.\n \n \n Chirping\n Short, sharp, high-pitched noises like sounds made by small birds or an insects.\n \n \n Growling\n Low guttural sounds like those that made in the throat by a hostile dog or other animal.\n \n \n Meowing\n Vocalizations like those made by as those cats. These sounds have diverse tones and are sometimes chattered, murmured or whispered. The purpose can be assertive.\n \n \n Mooing\n Deep vocal sounds like those made by a cow.\n \n \n Purring\n Low continuous vibratory sound such as those made by cats. The sound expresses contentment.\n \n \n Roaring\n Loud, deep, or harsh prolonged sounds such as those made by big cats and bears for long-distance communication and intimidation.\n \n \n Squawking\n Loud, harsh noises such as those made by geese.\n \n \n \n Named-object-sound\n A sound identifiable as coming from a particular type of object.\n \n Alarm-sound\n A loud signal often loud continuous ringing to alert people to a problem or condition that requires urgent attention.\n \n \n Beep\n A short, single tone, that is typically high-pitched and generally made by a computer or other machine.\n \n \n Buzz\n A persistent vibratory sound often made by a buzzer device and used to indicate something incorrect.\n \n \n Ka-ching\n The sound made by a mechanical cash register, often to designate a reward.\n \n \n Click\n The sound made by a mechanical cash register, often to designate a reward.\n \n \n Ding\n A short ringing sound such as that made by a bell, often to indicate a correct response or the expiration of time.\n \n \n Horn-blow\n A loud sound made by forcing air through a sound device that funnels air to create the sound, often used to sound an alert.\n \n \n Siren\n A loud, continuous sound often varying in frequency designed to indicate an emergency.\n \n \n \n \n \n Property\n Something that pertains to a thing. A characteristic of some entity. A quality or feature regarded as a characteristic or inherent part of someone or something. HED attributes are adjectives or adverbs.\n \n extensionAllowed\n \n \n Agent-property\n Something that pertains to an agent.\n \n extensionAllowed\n \n \n Agent-state\n The state of the agent.\n \n Agent-cognitive-state\n The state of the cognitive processes or state of mind of the agent.\n \n Alert\n Condition of heightened watchfulness or preparation for action.\n \n \n Anesthetized\n Having lost sensation to pain or having senses dulled due to the effects of an anesthetic.\n \n \n Asleep\n Having entered a periodic, readily reversible state of reduced awareness and metabolic activity, usually accompanied by physical relaxation and brain activity.\n \n \n Attentive\n Concentrating and focusing mental energy on the task or surroundings.\n \n \n Awake\n In a non sleeping state.\n \n \n Brain-dead\n Characterized by the irreversible absence of cortical and brain stem functioning.\n \n \n Comatose\n In a state of profound unconsciousness associated with markedly depressed cerebral activity.\n \n \n Drowsy\n In a state of near-sleep, a strong desire for sleep, or sleeping for unusually long periods.\n \n \n Intoxicated\n In a state with disturbed psychophysiological functions and responses as a result of administration or ingestion of a psychoactive substance.\n \n \n Locked-in\n In a state of complete paralysis of all voluntary muscles except for the ones that control the movements of the eyes.\n \n \n Passive\n Not responding or initiating an action in response to a stimulus.\n \n \n Resting\n A state in which the agent is not exhibiting any physical exertion.\n \n \n Vegetative\n A state of wakefulness and conscience, but (in contrast to coma) with involuntary opening of the eyes and movements (such as teeth grinding, yawning, or thrashing of the extremities).\n \n \n \n Agent-emotional-state\n The status of the general temperament and outlook of an agent.\n \n Angry\n Experiencing emotions characterized by marked annoyance or hostility.\n \n \n Aroused\n In a state reactive to stimuli leading to increased heart rate and blood pressure, sensory alertness, mobility and readiness to respond.\n \n \n Awed\n Filled with wonder. Feeling grand, sublime or powerful emotions characterized by a combination of joy, fear, admiration, reverence, and/or respect.\n \n \n Compassionate\n Feeling or showing sympathy and concern for others often evoked for a person who is in distress and associated with altruistic motivation.\n \n \n Content\n Feeling satisfaction with things as they are.\n \n \n Disgusted\n Feeling revulsion or profound disapproval aroused by something unpleasant or offensive.\n \n \n Emotionally-neutral\n Feeling neither satisfied nor dissatisfied.\n \n \n Empathetic\n Understanding and sharing the feelings of another. Being aware of, being sensitive to, and vicariously experiencing the feelings, thoughts, and experience of another.\n \n \n Excited\n Feeling great enthusiasm and eagerness.\n \n \n Fearful\n Feeling apprehension that one may be in danger.\n \n \n Frustrated\n Feeling annoyed as a result of being blocked, thwarted, disappointed or defeated.\n \n \n Grieving\n Feeling sorrow in response to loss, whether physical or abstract.\n \n \n Happy\n Feeling pleased and content.\n \n \n Jealous\n Feeling threatened by a rival in a relationship with another individual, in particular an intimate partner, usually involves feelings of threat, fear, suspicion, distrust, anxiety, anger, betrayal, and rejection.\n \n \n Joyful\n Feeling delight or intense happiness.\n \n \n Loving\n Feeling a strong positive emotion of affection and attraction.\n \n \n Relieved\n No longer feeling pain, distress, anxiety, or reassured.\n \n \n Sad\n Feeling grief or unhappiness.\n \n \n Stressed\n Experiencing mental or emotional strain or tension.\n \n \n \n Agent-physiological-state\n Having to do with the mechanical, physical, or biochemical function of an agent.\n \n Healthy\n Having no significant health-related issues.\n \n relatedTag\n Sick\n \n \n \n Hungry\n Being in a state of craving or desiring food.\n \n relatedTag\n Sated\n Thirsty\n \n \n \n Rested\n Feeling refreshed and relaxed.\n \n relatedTag\n Tired\n \n \n \n Sated\n Feeling full.\n \n relatedTag\n Hungry\n \n \n \n Sick\n Being in a state of ill health, bodily malfunction, or discomfort.\n \n relatedTag\n Healthy\n \n \n \n Thirsty\n Feeling a need to drink.\n \n relatedTag\n Hungry\n \n \n \n Tired\n Feeling in need of sleep or rest.\n \n relatedTag\n Rested\n \n \n \n \n Agent-postural-state\n Pertaining to the position in which agent holds their body.\n \n Crouching\n Adopting a position where the knees are bent and the upper body is brought forward and down, sometimes to avoid detection or to defend oneself.\n \n \n Eyes-closed\n Keeping eyes closed with no blinking.\n \n \n Eyes-open\n Keeping eyes open with occasional blinking.\n \n \n Kneeling\n Positioned where one or both knees are on the ground.\n \n \n On-treadmill\n Ambulation on an exercise apparatus with an endless moving belt to support moving in place.\n \n \n Prone\n Positioned in a recumbent body position whereby the person lies on its stomach and faces downward.\n \n \n Sitting\n In a seated position.\n \n \n Standing\n Assuming or maintaining an erect upright position.\n \n \n Seated-with-chin-rest\n Using a device that supports the chin and head.\n \n \n \n \n Agent-task-role\n The function or part that is ascribed to an agent in performing the task.\n \n Experiment-actor\n An agent who plays a predetermined role to create the experiment scenario.\n \n \n Experiment-controller\n An agent exerting control over some aspect of the experiment.\n \n \n Experiment-participant\n Someone who takes part in an activity related to an experiment.\n \n \n Experimenter\n Person who is the owner of the experiment and has its responsibility.\n \n \n \n Agent-trait\n A genetically, environmentally, or socially determined characteristic of an agent.\n \n Age\n Length of time elapsed time since birth of the agent.\n \n #\n \n takesValue\n \n \n \n \n Agent-experience-level\n Amount of skill or knowledge that the agent has as pertains to the task.\n \n Expert-level\n Having comprehensive and authoritative knowledge of or skill in a particular area related to the task.\n \n relatedTag\n Intermediate-experience-level\n Novice-level\n \n \n \n Intermediate-experience-level\n Having a moderate amount of knowledge or skill related to the task.\n \n relatedTag\n Expert-level\n Novice-level\n \n \n \n Novice-level\n Being inexperienced in a field or situation related to the task.\n \n relatedTag\n Expert-level\n Intermediate-experience-level\n \n \n \n \n Gender\n Characteristics that are socially constructed, including norms, behaviors, and roles based on sex.\n \n \n Sex\n Physical properties or qualities by which male is distinguished from female.\n \n Female\n Biological sex of an individual with female sexual organs such ova.\n \n \n Male\n Biological sex of an individual with male sexual organs producing sperm.\n \n \n Intersex\n Having genitalia and/or secondary sexual characteristics of indeterminate sex.\n \n \n \n Handedness\n Individual preference for use of a hand, known as the dominant hand.\n \n Left-handed\n Preference for using the left hand or foot for tasks requiring the use of a single hand or foot.\n \n \n Right-handed\n Preference for using the right hand or foot for tasks requiring the use of a single hand or foot.\n \n \n Ambidextrous\n Having no overall dominance in the use of right or left hand or foot in the performance of tasks that require one hand or foot.\n \n \n \n \n \n Data-property\n Something that pertains to data or information.\n \n extensionAllowed\n \n \n Data-marker\n An indicator placed to mark something.\n \n Temporal-marker\n An indicator placed at a particular time in the data.\n \n Onset\n Labels the start or beginning of something, usually an event.\n \n topLevelTagGroup\n \n \n \n Offset\n Labels the time at which something stops.\n \n topLevelTagGroup\n \n \n \n Pause\n Indicates the temporary interruption of the operation a process and subsequently wait for a signal to continue.\n \n \n Time-out\n A cancellation or cessation that automatically occurs when a predefined interval of time has passed without a certain event occurring.\n \n \n Time-sync\n A synchronization signal whose purpose to help synchronize different signals or processes. Often used to indicate a marker inserted into the recorded data to allow post hoc synchronization of concurrently recorded data streams.\n \n \n \n \n Data-resolution\n Smallest change in a quality being measured by an sensor that causes a perceptible change.\n \n Printer-resolution\n Resolution of a printer, usually expressed as the number of dots-per-inch for a printer.\n \n #\n \n takesValue\n \n \n \n \n Screen-resolution\n Resolution of a screen, usually expressed as the of pixels in a dimension for a digital display device.\n \n #\n \n takesValue\n \n \n \n \n Sensory-resolution\n Resolution of measurements by a sensing device.\n \n #\n \n takesValue\n \n \n \n \n Spatial-resolution\n Linear spacing of a spatial measurement.\n \n #\n \n takesValue\n \n \n \n \n Spectral-resolution\n Measures the ability of a sensor to resolve features in the electromagnetic spectrum.\n \n #\n \n takesValue\n \n \n \n \n Temporal-resolution\n Measures the ability of a sensor to resolve features in time.\n \n #\n \n takesValue\n \n \n \n \n \n Data-source-type\n The type of place, person, or thing from which the data comes or can be obtained.\n \n Computed-feature\n A feature computed from the data by a tool. This tag should be grouped with a label of the form Toolname_propertyName.\n \n \n Computed-prediction\n A computed extrapolation of known data.\n \n \n Expert-annotation\n An explanatory or critical comment or other in-context information provided by an authority.\n \n \n Instrument-measurement\n Information obtained from a device that is used to measure material properties or make other observations.\n \n \n Observation\n Active acquisition of information from a primary source. Should be grouped with a label of the form AgentID_featureName.\n \n \n \n Data-value\n Designation of the type of a data item.\n \n Categorical-value\n Indicates that something can take on a limited and usually fixed number of possible values.\n \n Categorical-class-value\n Categorical values that fall into discrete classes such as true or false. The grouping is absolute in the sense that it is the same for all participants.\n \n All\n To a complete degree or to the full or entire extent.\n \n relatedTag\n Some\n None\n \n \n \n Correct\n Free from error. Especially conforming to fact or truth.\n \n relatedTag\n Incorrect\n \n \n \n Explicit\n Stated clearly and in detail, leaving no room for confusion or doubt.\n \n relatedTag\n Implicit\n \n \n \n False\n Not in accordance with facts, reality or definitive criteria.\n \n relatedTag\n True\n \n \n \n Implicit\n Implied though not plainly expressed.\n \n relatedTag\n Explicit\n \n \n \n Invalid\n Not true because based on erroneous information or unsound reasoning or not conforming to the correct format or specifications.\n \n relatedTag\n Valid\n \n \n \n None\n No person or thing, nobody, not any.\n \n relatedTag\n All\n Some\n \n \n \n Some\n At least a small amount or number of, but not a large amount of, or often.\n \n relatedTag\n All\n None\n \n \n \n True\n Conforming to facts, reality or definitive criteria.\n \n relatedTag\n False\n \n \n \n Valid\n Allowable, usable, or acceptable.\n \n relatedTag\n Invalid\n \n \n \n Wrong\n Not accurate, correct, or appropriate.\n \n relatedTag\n Correct\n \n \n \n \n Categorical-judgment-value\n Categorical values that are based on the judgment or perception of the participant such familiar and famous.\n \n Abnormal\n Deviating in any way from the state, position, structure, condition, behavior, or rule which is considered a norm.\n \n relatedTag\n Normal\n \n \n \n Asymmetrical\n Lacking symmetry or having parts that fail to correspond to one another in shape, size, or arrangement.\n \n relatedTag\n Symmetrical\n \n \n \n Audible\n A sound that can be perceived by the participant.\n \n relatedTag\n Inaudible\n \n \n \n Congruent\n Concordance of multiple evidence lines. In agreement or harmony.\n \n relatedTag\n Incongruent\n \n \n \n Complex\n Hard, involved or complicated, elaborate, having many parts.\n \n relatedTag\n Simple\n \n \n \n Constrained\n Keeping something within particular limits or bounds.\n \n relatedTag\n Unconstrained\n \n \n \n Disordered\n Not neatly arranged. Confused and untidy. A structural quality in which the parts of an object are non-rigid.\n \n relatedTag\n Ordered\n \n \n \n Familiar\n Recognized, familiar, or within the scope of knowledge.\n \n relatedTag\n Unfamiliar\n Famous\n \n \n \n Famous\n A person who has a high degree of recognition by the general population for his or her success or accomplishments. A famous person.\n \n relatedTag\n Familiar\n Unfamiliar\n \n \n \n Inaudible\n A sound below the threshold of perception of the participant.\n \n relatedTag\n Audible\n \n \n \n Incongruent\n Not in agreement or harmony.\n \n relatedTag\n Congruent\n \n \n \n Involuntary\n An action that is not made by choice. In the body, involuntary actions (such as blushing) occur automatically, and cannot be controlled by choice.\n \n relatedTag\n Voluntary\n \n \n \n Masked\n Information exists but is not provided or is partially obscured due to security, privacy, or other concerns.\n \n relatedTag\n Unmasked\n \n \n \n Normal\n Being approximately average or within certain limits. Conforming with or constituting a norm or standard or level or type or social norm.\n \n relatedTag\n Abnormal\n \n \n \n Ordered\n Conforming to a logical or comprehensible arrangement of separate elements.\n \n relatedTag\n Disordered\n \n \n \n Simple\n Easily understood or presenting no difficulties.\n \n relatedTag\n Complex\n \n \n \n Symmetrical\n Made up of exactly similar parts facing each other or around an axis. Showing aspects of symmetry.\n \n relatedTag\n Asymmetrical\n \n \n \n Unconstrained\n Moving without restriction.\n \n relatedTag\n Constrained\n \n \n \n Unfamiliar\n Not having knowledge or experience of.\n \n relatedTag\n Familiar\n Famous\n \n \n \n Unmasked\n Information is revealed.\n \n relatedTag\n Masked\n \n \n \n Voluntary\n Using free will or design; not forced or compelled; controlled by individual volition.\n \n relatedTag\n Involuntary\n \n \n \n \n Categorical-level-value\n Categorical values based on dividing a continuous variable into levels such as high and low.\n \n Cold\n Characterized by an absence of heat.\n \n relatedTag\n Hot\n \n \n \n Deep\n Extending relatively far inward or downward.\n \n relatedTag\n Shallow\n \n \n \n High\n Having a greater than normal degree, intensity, or amount.\n \n relatedTag\n Low\n Medium\n \n \n \n Hot\n Characterized by an excess of heat.\n \n relatedTag\n Cold\n \n \n \n Liminal\n Situated at a sensory threshold that is barely perceptible or capable of eliciting a response.\n \n relatedTag\n Subliminal\n Supraliminal\n \n \n \n Loud\n Characterizing a perceived high intensity of sound.\n \n relatedTag\n Quiet\n \n \n \n Low\n Less than normal in degree, intensity or amount.\n \n relatedTag\n High\n \n \n \n Medium\n Mid-way between small and large in number, quantity, magnitude or extent.\n \n relatedTag\n Low\n High\n \n \n \n Negative\n Involving disadvantage or harm.\n \n relatedTag\n Positive\n \n \n \n Positive\n Involving advantage or good.\n \n relatedTag\n Negative\n \n \n \n Quiet\n Characterizing a perceived low intensity of sound.\n \n relatedTag\n Loud\n \n \n \n Rough\n Having a surface with perceptible bumps, ridges, or irregularities.\n \n relatedTag\n Smooth\n \n \n \n Shallow\n Having a depth which is relatively low.\n \n relatedTag\n Deep\n \n \n \n Smooth\n Having a surface free from bumps, ridges, or irregularities.\n \n relatedTag\n Rough\n \n \n \n Subliminal\n Situated below a sensory threshold that is imperceptible or not capable of eliciting a response.\n \n relatedTag\n Liminal\n Supraliminal\n \n \n \n Supraliminal\n Situated above a sensory threshold that is perceptible or capable of eliciting a response.\n \n relatedTag\n Liminal\n Subliminal\n \n \n \n Thick\n Wide in width, extent or cross-section.\n \n relatedTag\n Thin\n \n \n \n Thin\n Narrow in width, extent or cross-section.\n \n relatedTag\n Thick\n \n \n \n \n Categorical-orientation-value\n Value indicating the orientation or direction of something.\n \n Backward\n Directed behind or to the rear.\n \n relatedTag\n Forward\n \n \n \n Downward\n Moving or leading toward a lower place or level.\n \n relatedTag\n Leftward\n Rightward\n Upward\n \n \n \n Forward\n At or near or directed toward the front.\n \n relatedTag\n Backward\n \n \n \n Horizontally-oriented\n Oriented parallel to or in the plane of the horizon.\n \n \n Leftward\n Going toward or facing the left.\n \n relatedTag\n Downward\n Rightward\n Upward\n \n \n \n Oblique\n Slanting or inclined in direction, course, or position that is neither parallel nor perpendicular nor right-angular.\n \n relatedTag\n Rotated\n \n \n \n Rightward\n Going toward or situated on the right.\n \n relatedTag\n Downward\n Leftward\n Upward\n \n \n \n Rotated\n Positioned offset around an axis or center.\n \n \n Upward\n Moving, pointing, or leading to a higher place, point, or level.\n \n relatedTag\n Downward\n Leftward\n Rightward\n \n \n \n Vertically-oriented\n Oriented perpendicular to the plane of the horizon.\n \n \n \n \n Physical-value\n The value of some physical property of something.\n \n Weight\n The relative mass or the quantity of matter contained by something.\n \n #\n \n takesValue\n \n \n unitClass\n weightUnits\n \n \n valueClass\n numericClass\n \n \n \n \n \n Quantitative-value\n Something capable of being estimated or expressed with numeric values.\n \n Fraction\n A numerical value betwee 0 and 1.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Item-count\n The integer count of something which is usually grouped with the entity it is counting. (Item-count/3, A) indicates that 3 of A have occurred up to this point.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Item-interval\n An integer indicating how many items or entities have passed since the last one of these. An item interval of 0 indicates the current item.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Percentage\n A fraction or ratio with 100 understood as the denominator.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Ratio\n A quotient of quantities of the same kind for different components within the same system.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n \n Statistical-value\n A value based on or employing the principles of statistics.\n \n extensionAllowed\n \n \n Data-maximum\n The largest possible quantity or degree.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Data-mean\n The sum of a set of values divided by the number of values in the set.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Data-median\n The value which has an equal number of values greater and less than it.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Data-minimum\n The smallest possible quantity.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Probability\n A measure of the expectation of the occurrence of a particular event.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Standard-deviation\n A measure of the range of values in a set of numbers. Standard deviation is a statistic used as a measure of the dispersion or variation in a distribution, equal to the square root of the arithmetic mean of the squares of the deviations from the arithmetic mean.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Statistical-accuracy\n A measure of closeness to true value expressed as a number between 0 and 1.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Statistical-precision\n A quantitative representation of the degree of accuracy necessary for or associated with a particular action.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Statistical-recall\n Sensitivity is a measurement datum qualifying a binary classification test and is computed by substracting the false negative rate to the integral numeral 1.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Statistical-uncertainty\n A measure of the inherent variability of repeated observation measurements of a quantity including quantities evaluated by statistical methods and by other means.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n \n Spatiotemporal-value\n A property relating to space and/or time.\n \n Rate-of-change\n The amount of change accumulated per unit time.\n \n Acceleration\n Magnitude of the rate of change in either speed or direction. The direction of change should be given separately.\n \n #\n \n takesValue\n \n \n unitClass\n accelerationUnits\n \n \n valueClass\n numericClass\n \n \n \n \n Frequency\n Frequency is the number of occurrences of a repeating event per unit time.\n \n #\n \n takesValue\n \n \n unitClass\n frequencyUnits\n \n \n valueClass\n numericClass\n \n \n \n \n Jerk-rate\n Magnitude of the rate at which the acceleration of an object changes with respect to time. The direction of change should be given separately.\n \n #\n \n takesValue\n \n \n unitClass\n jerkUnits\n \n \n valueClass\n numericClass\n \n \n \n \n Sampling-rate\n The number of digital samples taken or recorded per unit of time.\n \n #\n \n takesValue\n \n \n unitClass\n frequencyUnits\n \n \n \n \n Refresh-rate\n The frequency with which the image on a computer monitor or similar electronic display screen is refreshed, usually expressed in hertz.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Speed\n A scalar measure of the rate of movement of the object expressed either as the distance travelled divided by the time taken (average speed) or the rate of change of position with respect to time at a particular point (instantaneous speed). The direction of change should be given separately.\n \n #\n \n takesValue\n \n \n unitClass\n speedUnits\n \n \n valueClass\n numericClass\n \n \n \n \n Temporal-rate\n The number of items per unit of time.\n \n #\n \n takesValue\n \n \n unitClass\n frequencyUnits\n \n \n valueClass\n numericClass\n \n \n \n \n \n Spatial-value\n Value of an item involving space.\n \n Angle\n The amount of inclination of one line to another or the plane of one object to another.\n \n unitClass\n angleUnits\n \n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Distance\n A measure of the space separating two objects or points.\n \n #\n \n takesValue\n \n \n unitClass\n physicalLengthUnits\n \n \n valueClass\n numericClass\n \n \n \n \n Position\n A reference to the alignment of an object, a particular situation or view of a situation, or the location of an object. Coordinates with respect a specified frame of reference or the default Screen-frame if no frame is given.\n \n X-position\n The position along the x-axis of the frame of reference.\n \n #\n \n takesValue\n \n \n unitClass\n physicalLengthUnits\n \n \n valueClass\n numericClass\n \n \n \n \n Y-position\n The position along the y-axis of the frame of reference.\n \n #\n \n takesValue\n \n \n unitClass\n physicalLengthUnits\n \n \n valueClass\n numericClass\n \n \n \n \n Z-position\n The position along the z-axis of the frame of reference.\n \n #\n \n takesValue\n \n \n unitClass\n physicalLengthUnits\n \n \n valueClass\n numericClass\n \n \n \n \n \n Size\n The physical magnitude of something.\n \n Area\n The extent of a 2-dimensional surface enclosed within a boundary.\n \n #\n \n takesValue\n \n \n unitClass\n areaUnits\n \n \n valueClass\n numericClass\n \n \n \n \n Depth\n The distance from the surface of something especially from the perspective of looking from the front.\n \n #\n \n takesValue\n \n \n unitClass\n physicalLengthUnits\n \n \n valueClass\n numericClass\n \n \n \n \n Length\n The linear extent in space from one end of something to the other end, or the extent of something from beginning to end.\n \n #\n \n takesValue\n \n \n unitClass\n physicalLengthUnits\n \n \n valueClass\n numericClass\n \n \n \n \n Width\n The extent or measurement of something from side to side.\n \n #\n \n takesValue\n \n \n unitClass\n physicalLengthUnits\n \n \n valueClass\n numericClass\n \n \n \n \n Height\n The vertical measurement or distance from the base to the top of an object.\n \n #\n \n takesValue\n \n \n unitClass\n physicalLengthUnits\n \n \n valueClass\n numericClass\n \n \n \n \n Volume\n The amount of three dimensional space occupied by an object or the capacity of a space or container.\n \n #\n \n takesValue\n \n \n unitClass\n volumeUnits\n \n \n valueClass\n numericClass\n \n \n \n \n \n \n Temporal-value\n A characteristic of or relating to time or limited by time.\n \n Delay\n Time during which some action is awaited.\n \n #\n \n takesValue\n \n \n unitClass\n timeUnits\n \n \n valueClass\n numericClass\n \n \n \n \n Duration\n The period of time during which something occurs or continues.\n \n #\n \n takesValue\n \n \n unitClass\n timeUnits\n \n \n valueClass\n numericClass\n \n \n \n \n Time-interval\n The period of time separating two instances, events, or occurrences.\n \n #\n \n takesValue\n \n \n unitClass\n timeUnits\n \n \n valueClass\n numericClass\n \n \n \n \n Time-value\n A value with units of time. Usually grouped with tags identifying what the value represents.\n \n #\n \n takesValue\n \n \n unitClass\n timeUnits\n \n \n valueClass\n numericClass\n \n \n \n \n \n \n \n Data-variability-attribute\n An attribute describing how something changes or varies.\n \n Abrupt\n Marked by sudden change.\n \n \n Constant\n Continually recurring or continuing without interruption. Not changing in time or space.\n \n \n Continuous\n Uninterrupted in time, sequence, substance, or extent.\n \n relatedTag\n Discrete\n Discontinuous\n \n \n \n Decreasing\n Becoming smaller or fewer in size, amount, intensity, or degree.\n \n relatedTag\n Increasing\n \n \n \n Deterministic\n No randomness is involved in the development of the future states of the element.\n \n relatedTag\n Random\n Stochastic\n \n \n \n Discontinuous\n Having a gap in time, sequence, substance, or extent.\n \n relatedTag\n Continuous\n \n \n \n Discrete\n Constituting a separate entities or parts.\n \n relatedTag\n Continuous\n Discontinuous\n \n \n \n Flickering\n Moving irregularly or unsteadily or burning or shining fitfully or with a fluctuating light.\n \n \n Estimated-value\n Something that has been calculated or measured approximately.\n \n \n Exact-value\n A value that is viewed to the true value according to some standard.\n \n \n Fractal\n Having extremely irregular curves or shapes for which any suitably chosen part is similar in shape to a given larger or smaller part when magnified or reduced to the same size.\n \n \n Increasing\n Becoming greater in size, amount, or degree.\n \n relatedTag\n Decreasing\n \n \n \n Random\n Governed by or depending on chance. Lacking any definite plan or order or purpose.\n \n relatedTag\n Deterministic\n Stochastic\n \n \n \n Repetitive\n A recurring action that is often non-purposeful.\n \n \n Stochastic\n Uses a random probability distribution or pattern that may be analysed statistically but may not be predicted precisely to determine future states.\n \n relatedTag\n Deterministic\n Random\n \n \n \n Varying\n Differing in size, amount, degree, or nature.\n \n \n \n \n Environmental-property\n Relating to or arising from the surroundings of an agent.\n \n Indoors\n Located inside a building or enclosure.\n \n \n Outdoors\n Any area outside a building or shelter.\n \n \n Real-world\n Located in a place that exists in real space and time under realistic conditions.\n \n \n Virtual-world\n Using technology that creates immersive, computer-generated experiences that a person can interact with and navigate through. The digital content is generally delivered to the user through some type of headset and responds to changes in head position or through interaction with other types of sensors. Existing in a virtual setting such as a simulation or game environment.\n \n \n Augmented-reality\n Using technology that enhances real-world experiences with computer-derived digital overlays to change some aspects of perception of the natural environment. The digital content is shown to the user through a smart device or glasses and responds to changes in the environment.\n \n \n Motion-platform\n A mechanism that creates the feelings of being in a real motion environment.\n \n \n Urban\n Relating to, located in, or characteristic of a city or densely populated area.\n \n \n Rural\n Of or pertaining to the country as opposed to the city.\n \n \n Terrain\n Characterization of the physical features of a tract of land.\n \n Composite-terrain\n Tracts of land characterized by a mixure of physical features.\n \n \n Dirt-terrain\n Tracts of land characterized by a soil surface and lack of vegetation.\n \n \n Grassy-terrain\n Tracts of land covered by grass.\n \n \n Gravel-terrain\n Tracts of land covered by a surface consisting a loose aggregation of small water-worn or pounded stones.\n \n \n Leaf-covered-terrain\n Tracts of land covered by leaves and composited organic material.\n \n \n Muddy-terrain\n Tracts of land covered by a liquid or semi-liquid mixture of water and some combination of soil, silt, and clay.\n \n \n Paved-terrain\n Tracts of land covered with concrete, asphalt, stones, or bricks.\n \n \n Rocky-terrain\n Tracts of land consisting or full of rock or rocks.\n \n \n Sloped-terrain\n Tracts of land arranged in a sloping or inclined position.\n \n \n Uneven-terrain\n Tracts of land that are not level, smooth, or regular.\n \n \n \n \n Informational-property\n Something that pertains to a task.\n \n extensionAllowed\n \n \n Description\n An explanation of what the tag group it is in means. If the description is at the top-level of an event string, the description applies to the event.\n \n requireChild\n \n \n #\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n ID\n An alphanumeric name that identifies either a unique object or a unique class of objects. Here the object or class may be an idea, physical countable object (or class), or physical uncountable substance (or class).\n \n requireChild\n \n \n #\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Label\n A string of 20 or fewer characters identifying something. Labels usually refer to general classes of things while IDs refer to specific instances. A term that is associated with some entity. A brief description given for purposes of identification. An identifying or descriptive marker that is attached to an object.\n \n requireChild\n \n \n #\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Metadata\n Data about data. Information that describes another set of data.\n \n CogAtlas\n The Cognitive Atlas ID number of something.\n \n #\n \n takesValue\n \n \n \n \n CogPo\n The CogPO ID number of something.\n \n #\n \n takesValue\n \n \n \n \n Creation-date\n The date on which data creation of this element began.\n \n requireChild\n \n \n #\n \n takesValue\n \n \n valueClass\n dateTimeClass\n \n \n \n \n Experimental-note\n A brief written record about the experiment.\n \n #\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Library-name\n Official name of a HED library.\n \n #\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n OBO-identifier\n The identifier of a term in some Open Biology Ontology (OBO) ontology.\n \n #\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Pathname\n The specification of a node (file or directory) in a hierarchical file system, usually specified by listing the nodes top-down.\n \n #\n \n takesValue\n \n \n \n \n Subject-identifier\n A sequence of characters used to identify, name, or characterize a trial or study subject.\n \n #\n \n takesValue\n \n \n \n \n Version-identifier\n An alphanumeric character string that identifies a form or variant of a type or original.\n \n #\n Usually is a semantic version.\n \n takesValue\n \n \n \n \n \n Parameter\n Something user-defined for this experiment.\n \n Parameter-label\n The name of the parameter.\n \n #\n \n takesValue\n \n \n valueClass\n labelClass\n \n \n \n \n Parameter-value\n The value of the parameter.\n \n #\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n \n Organizational-property\n Relating to an organization or the action of organizing something.\n \n Collection\n A tag designating a grouping of items such as in a set or list.\n \n #\n Name of the collection.\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Condition-variable\n An aspect of the experiment or task that is to be varied during the experiment. Task-conditions are sometimes called independent variables or contrasts.\n \n #\n Name of the condition variable.\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Control-variable\n An aspect of the experiment that is fixed throughout the study and usually is explicitly controlled.\n \n #\n Name of the control variable.\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Def\n A HED-specific utility tag used with a defined name to represent the tags associated with that definition.\n \n requireChild\n \n \n #\n Name of the definition.\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Def-expand\n A HED specific utility tag that is grouped with an expanded definition. The child value of the Def-expand is the name of the expanded definition.\n \n requireChild\n \n \n tagGroup\n \n \n #\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Definition\n A HED-specific utility tag whose child value is the name of the concept and the tag group associated with the tag is an English language explanation of a concept.\n \n requireChild\n \n \n topLevelTagGroup\n \n \n #\n Name of the definition.\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Event-context\n A special HED tag inserted as part of a top-level tag group to contain information about the interrelated conditions under which the event occurs. The event context includes information about other events that are ongoing when this event happens.\n \n topLevelTagGroup\n \n \n unique\n \n \n \n Event-stream\n A special HED tag indicating that this event is a member of an ordered succession of events.\n \n #\n Name of the event stream.\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Experimental-intertrial\n A tag used to indicate a part of the experiment between trials usually where nothing is happening.\n \n #\n Optional label for the intertrial block.\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Experimental-trial\n Designates a run or execution of an activity, for example, one execution of a script. A tag used to indicate a particular organizational part in the experimental design often containing a stimulus-response pair or stimulus-response-feedback triad.\n \n #\n Optional label for the trial (often a numerical string).\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Indicator-variable\n An aspect of the experiment or task that is measured as task conditions are varied during the experiment. Experiment indicators are sometimes called dependent variables.\n \n #\n Name of the indicator variable.\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Recording\n A tag designating the data recording. Recording tags are usually have temporal scope which is the entire recording.\n \n #\n Optional label for the recording.\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Task\n An assigned piece of work, usually with a time allotment. A tag used to indicate a linkage the structured activities performed as part of the experiment.\n \n #\n Optional label for the task block.\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Time-block\n A tag used to indicate a contiguous time block in the experiment during which something is fixed or noted.\n \n #\n Optional label for the task block.\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n \n Sensory-property\n Relating to sensation or the physical senses.\n \n Sensory-attribute\n A sensory characteristic associated with another entity.\n \n Auditory-attribute\n Pertaining to the sense of hearing.\n \n Loudness\n Perceived intensity of a sound.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Pitch\n A perceptual property that allows the user to order sounds on a frequency scale.\n \n #\n \n takesValue\n \n \n unitClass\n frequencyUnits\n \n \n valueClass\n numericClass\n \n \n \n \n Sound-envelope\n Description of how a sound changes over time.\n \n Sound-envelope-attack\n The time taken for initial run-up of level from nil to peak usually beginning when the key on a musical instrument is pressed.\n \n #\n \n takesValue\n \n \n unitClass\n timeUnits\n \n \n valueClass\n numericClass\n \n \n \n \n Sound-envelope-decay\n The time taken for the subsequent run down from the attack level to the designated sustain level.\n \n #\n \n takesValue\n \n \n unitClass\n timeUnits\n \n \n valueClass\n numericClass\n \n \n \n \n Sound-envelope-release\n The time taken for the level to decay from the sustain level to zero after the key is released\n \n #\n \n takesValue\n \n \n unitClass\n timeUnits\n \n \n valueClass\n numericClass\n \n \n \n \n Sound-envelope-sustain\n The time taken for the main sequence of the sound duration, until the key is released.\n \n #\n \n takesValue\n \n \n unitClass\n timeUnits\n \n \n valueClass\n numericClass\n \n \n \n \n \n Timbre\n The perceived sound quality of a singing voice or musical instrument.\n \n #\n \n takesValue\n \n \n valueClass\n labelClass\n \n \n \n \n \n Gustatory-attribute\n Pertaining to the sense of taste.\n \n Bitter\n Having a sharp, pungent taste.\n \n \n Salty\n Tasting of or like salt.\n \n \n Savory\n Belonging to a taste that is salty or spicy rather than sweet.\n \n \n Sour\n Having a sharp, acidic taste.\n \n \n Sweet\n Having or resembling the taste of sugar.\n \n \n \n Olfactory-attribute\n Having a smell.\n \n \n Somatic-attribute\n Pertaining to the feelings in the body or of the nervous system.\n \n Pain\n The sensation of discomfort, distress, or agony, resulting from the stimulation of specialized nerve endings.\n \n \n Stress\n The negative mental, emotional, and physical reactions that occur when environmental stressors are perceived as exceeding the adaptive capacities of the individual.\n \n \n \n Tactile-attribute\n Pertaining to the sense of touch.\n \n Tactile-pressure\n Having a feeling of heaviness.\n \n \n Tactile-temperature\n Having a feeling of hotness or coldness.\n \n \n Tactile-texture\n Having a feeling of roughness.\n \n \n Tactile-vibration\n Having a feeling of mechanical oscillation.\n \n \n \n Vestibular-attribute\n Pertaining to the sense of balance or body position.\n \n \n Visual-attribute\n Pertaining to the sense of sight.\n \n Color\n The appearance of objects (or light sources) described in terms of perception of their hue and lightness (or brightness) and saturation.\n \n CSS-color\n One of 140 colors supported by all browsers. For more details such as the color RGB or HEX values, check: https://www.w3schools.com/colors/colors_groups.asp\n \n Blue-color\n CSS color group\n \n CadetBlue\n CSS-color 0x5F9EA0\n \n \n SteelBlue\n CSS-color 0x4682B4\n \n \n LightSteelBlue\n CSS-color 0xB0C4DE\n \n \n LightBlue\n CSS-color 0xADD8E6\n \n \n PowderBlue\n CSS-color 0xB0E0E6\n \n \n LightSkyBlue\n CSS-color 0x87CEFA\n \n \n SkyBlue\n CSS-color 0x87CEEB\n \n \n CornflowerBlue\n CSS-color 0x6495ED\n \n \n DeepSkyBlue\n CSS-color 0x00BFFF\n \n \n DodgerBlue\n CSS-color 0x1E90FF\n \n \n RoyalBlue\n CSS-color 0x4169E1\n \n \n Blue\n CSS-color 0x0000FF\n \n \n MediumBlue\n CSS-color 0x0000CD\n \n \n DarkBlue\n CSS-color 0x00008B\n \n \n Navy\n CSS-color 0x000080\n \n \n MidnightBlue\n CSS-color 0x191970\n \n \n \n Brown-color\n CSS color group\n \n Cornsilk\n CSS-color 0xFFF8DC\n \n \n BlanchedAlmond\n CSS-color 0xFFEBCD\n \n \n Bisque\n CSS-color 0xFFE4C4\n \n \n NavajoWhite\n CSS-color 0xFFDEAD\n \n \n Wheat\n CSS-color 0xF5DEB3\n \n \n BurlyWood\n CSS-color 0xDEB887\n \n \n Tan\n CSS-color 0xD2B48C\n \n \n RosyBrown\n CSS-color 0xBC8F8F\n \n \n SandyBrown\n CSS-color 0xF4A460\n \n \n GoldenRod\n CSS-color 0xDAA520\n \n \n DarkGoldenRod\n CSS-color 0xB8860B\n \n \n Peru\n CSS-color 0xCD853F\n \n \n Chocolate\n CSS-color 0xD2691E\n \n \n Olive\n CSS-color 0x808000\n \n \n SaddleBrown\n CSS-color 0x8B4513\n \n \n Sienna\n CSS-color 0xA0522D\n \n \n Brown\n CSS-color 0xA52A2A\n \n \n Maroon\n CSS-color 0x800000\n \n \n \n Cyan-color\n CSS color group\n \n Aqua\n CSS-color 0x00FFFF\n \n \n Cyan\n CSS-color 0x00FFFF\n \n \n LightCyan\n CSS-color 0xE0FFFF\n \n \n PaleTurquoise\n CSS-color 0xAFEEEE\n \n \n Aquamarine\n CSS-color 0x7FFFD4\n \n \n Turquoise\n CSS-color 0x40E0D0\n \n \n MediumTurquoise\n CSS-color 0x48D1CC\n \n \n DarkTurquoise\n CSS-color 0x00CED1\n \n \n \n Green-color\n CSS color group\n \n GreenYellow\n CSS-color 0xADFF2F\n \n \n Chartreuse\n CSS-color 0x7FFF00\n \n \n LawnGreen\n CSS-color 0x7CFC00\n \n \n Lime\n CSS-color 0x00FF00\n \n \n LimeGreen\n CSS-color 0x32CD32\n \n \n PaleGreen\n CSS-color 0x98FB98\n \n \n LightGreen\n CSS-color 0x90EE90\n \n \n MediumSpringGreen\n CSS-color 0x00FA9A\n \n \n SpringGreen\n CSS-color 0x00FF7F\n \n \n MediumSeaGreen\n CSS-color 0x3CB371\n \n \n SeaGreen\n CSS-color 0x2E8B57\n \n \n ForestGreen\n CSS-color 0x228B22\n \n \n Green\n CSS-color 0x008000\n \n \n DarkGreen\n CSS-color 0x006400\n \n \n YellowGreen\n CSS-color 0x9ACD32\n \n \n OliveDrab\n CSS-color 0x6B8E23\n \n \n DarkOliveGreen\n CSS-color 0x556B2F\n \n \n MediumAquaMarine\n CSS-color 0x66CDAA\n \n \n DarkSeaGreen\n CSS-color 0x8FBC8F\n \n \n LightSeaGreen\n CSS-color 0x20B2AA\n \n \n DarkCyan\n CSS-color 0x008B8B\n \n \n Teal\n CSS-color 0x008080\n \n \n \n Gray-color\n CSS color group\n \n Gainsboro\n CSS-color 0xDCDCDC\n \n \n LightGray\n CSS-color 0xD3D3D3\n \n \n Silver\n CSS-color 0xC0C0C0\n \n \n DarkGray\n CSS-color 0xA9A9A9\n \n \n DimGray\n CSS-color 0x696969\n \n \n Gray\n CSS-color 0x808080\n \n \n LightSlateGray\n CSS-color 0x778899\n \n \n SlateGray\n CSS-color 0x708090\n \n \n DarkSlateGray\n CSS-color 0x2F4F4F\n \n \n Black\n CSS-color 0x000000\n \n \n \n Orange-color\n CSS color group\n \n Orange\n CSS-color 0xFFA500\n \n \n DarkOrange\n CSS-color 0xFF8C00\n \n \n Coral\n CSS-color 0xFF7F50\n \n \n Tomato\n CSS-color 0xFF6347\n \n \n OrangeRed\n CSS-color 0xFF4500\n \n \n \n Pink-color\n CSS color group\n \n Pink\n CSS-color 0xFFC0CB\n \n \n LightPink\n CSS-color 0xFFB6C1\n \n \n HotPink\n CSS-color 0xFF69B4\n \n \n DeepPink\n CSS-color 0xFF1493\n \n \n PaleVioletRed\n CSS-color 0xDB7093\n \n \n MediumVioletRed\n CSS-color 0xC71585\n \n \n \n Purple-color\n CSS color group\n \n Lavender\n CSS-color 0xE6E6FA\n \n \n Thistle\n CSS-color 0xD8BFD8\n \n \n Plum\n CSS-color 0xDDA0DD\n \n \n Orchid\n CSS-color 0xDA70D6\n \n \n Violet\n CSS-color 0xEE82EE\n \n \n Fuchsia\n CSS-color 0xFF00FF\n \n \n Magenta\n CSS-color 0xFF00FF\n \n \n MediumOrchid\n CSS-color 0xBA55D3\n \n \n DarkOrchid\n CSS-color 0x9932CC\n \n \n DarkViolet\n CSS-color 0x9400D3\n \n \n BlueViolet\n CSS-color 0x8A2BE2\n \n \n DarkMagenta\n CSS-color 0x8B008B\n \n \n Purple\n CSS-color 0x800080\n \n \n MediumPurple\n CSS-color 0x9370DB\n \n \n MediumSlateBlue\n CSS-color 0x7B68EE\n \n \n SlateBlue\n CSS-color 0x6A5ACD\n \n \n DarkSlateBlue\n CSS-color 0x483D8B\n \n \n RebeccaPurple\n CSS-color 0x663399\n \n \n Indigo\n CSS-color 0x4B0082\n \n \n \n Red-color\n CSS color group\n \n LightSalmon\n CSS-color 0xFFA07A\n \n \n Salmon\n CSS-color 0xFA8072\n \n \n DarkSalmon\n CSS-color 0xE9967A\n \n \n LightCoral\n CSS-color 0xF08080\n \n \n IndianRed\n CSS-color 0xCD5C5C\n \n \n Crimson\n CSS-color 0xDC143C\n \n \n Red\n CSS-color 0xFF0000\n \n \n FireBrick\n CSS-color 0xB22222\n \n \n DarkRed\n CSS-color 0x8B0000\n \n \n \n Yellow-color\n CSS color group\n \n Gold\n CSS-color 0xFFD700\n \n \n Yellow\n CSS-color 0xFFFF00\n \n \n LightYellow\n CSS-color 0xFFFFE0\n \n \n LemonChiffon\n CSS-color 0xFFFACD\n \n \n LightGoldenRodYellow\n CSS-color 0xFAFAD2\n \n \n PapayaWhip\n CSS-color 0xFFEFD5\n \n \n Moccasin\n CSS-color 0xFFE4B5\n \n \n PeachPuff\n CSS-color 0xFFDAB9\n \n \n PaleGoldenRod\n CSS-color 0xEEE8AA\n \n \n Khaki\n CSS-color 0xF0E68C\n \n \n DarkKhaki\n CSS-color 0xBDB76B\n \n \n \n White-color\n CSS color group\n \n White\n CSS-color 0xFFFFFF\n \n \n Snow\n CSS-color 0xFFFAFA\n \n \n HoneyDew\n CSS-color 0xF0FFF0\n \n \n MintCream\n CSS-color 0xF5FFFA\n \n \n Azure\n CSS-color 0xF0FFFF\n \n \n AliceBlue\n CSS-color 0xF0F8FF\n \n \n GhostWhite\n CSS-color 0xF8F8FF\n \n \n WhiteSmoke\n CSS-color 0xF5F5F5\n \n \n SeaShell\n CSS-color 0xFFF5EE\n \n \n Beige\n CSS-color 0xF5F5DC\n \n \n OldLace\n CSS-color 0xFDF5E6\n \n \n FloralWhite\n CSS-color 0xFFFAF0\n \n \n Ivory\n CSS-color 0xFFFFF0\n \n \n AntiqueWhite\n CSS-color 0xFAEBD7\n \n \n Linen\n CSS-color 0xFAF0E6\n \n \n LavenderBlush\n CSS-color 0xFFF0F5\n \n \n MistyRose\n CSS-color 0xFFE4E1\n \n \n \n \n Color-shade\n A slight degree of difference between colors, especially with regard to how light or dark it is or as distinguished from one nearly like it.\n \n Dark-shade\n A color tone not reflecting much light.\n \n \n Light-shade\n A color tone reflecting more light.\n \n \n \n Grayscale\n Using a color map composed of shades of gray, varying from black at the weakest intensity to white at the strongest.\n \n #\n White intensity between 0 and 1\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n HSV-color\n A color representation that models how colors appear under light.\n \n Hue\n Attribute of a visual sensation according to which an area appears to be similar to one of the perceived colors.\n \n #\n Angular value between 0 and 360\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Saturation\n Colorfulness of a stimulus relative to its own brightness.\n \n #\n B value of RGB between 0 and 1\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n HSV-value\n AAttribute of a visual sensation according to which an area appears to emit more or less light.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n \n RGB-color\n A color from the RGB schema.\n \n RGB-red\n The red component.\n \n #\n R value of RGB between 0 and 1\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n RGB-blue\n The blue component.\n \n #\n B value of RGB between 0 and 1\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n RGB-green\n The green component.\n \n #\n G value of RGB between 0 and 1\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n \n \n Luminance\n A quality that exists by virtue of the luminous intensity per unit area projected in a given direction.\n \n \n Opacity\n A measure of impenetrability to light.\n \n \n \n \n Sensory-presentation\n The entity has a sensory manifestation.\n \n Auditory-presentation\n The sense of hearing is used in the presentation to the user.\n \n Loudspeaker-separation\n The distance between two loudspeakers. Grouped with the Distance tag.\n \n suggestedTag\n Distance\n \n \n \n Monophonic\n Relating to sound transmission, recording, or reproduction involving a single transmission path.\n \n \n Silent\n The absence of ambient audible sound or the state of having ceased to produce sounds.\n \n \n Stereophonic\n Relating to, or constituting sound reproduction involving the use of separated microphones and two transmission channels to achieve the sound separation of a live hearing.\n \n \n \n Gustatory-presentation\n The sense of taste used in the presentation to the user.\n \n \n Olfactory-presentation\n The sense of smell used in the presentation to the user.\n \n \n Somatic-presentation\n The nervous system is used in the presentation to the user.\n \n \n Tactile-presentation\n The sense of touch used in the presentation to the user.\n \n \n Vestibular-presentation\n The sense balance used in the presentation to the user.\n \n \n Visual-presentation\n The sense of sight used in the presentation to the user.\n \n 2D-view\n A view showing only two dimensions.\n \n \n 3D-view\n A view showing three dimensions.\n \n \n Background-view\n Parts of the view that are farthest from the viewer and usually the not part of the visual focus.\n \n \n Bistable-view\n Something having two stable visual forms that have two distinguishable stable forms as in optical illusions.\n \n \n Foreground-view\n Parts of the view that are closest to the viewer and usually the most important part of the visual focus.\n \n \n Foveal-view\n Visual presentation directly on the fovea. A view projected on the small depression in the retina containing only cones and where vision is most acute.\n \n \n Map-view\n A diagrammatic representation of an area of land or sea showing physical features, cities, roads.\n \n Aerial-view\n Elevated view of an object from above, with a perspective as though the observer were a bird.\n \n \n Satellite-view\n A representation as captured by technology such as a satellite.\n \n \n Street-view\n A 360-degrees panoramic view from a position on the ground.\n \n \n \n Peripheral-view\n Indirect vision as it occurs outside the point of fixation.\n \n \n \n \n \n Task-property\n Something that pertains to a task.\n \n extensionAllowed\n \n \n Task-attentional-demand\n Strategy for allocating attention toward goal-relevant information.\n \n Bottom-up-attention\n Attentional guidance purely by externally driven factors to stimuli that are salient because of their inherent properties relative to the background. Sometimes this is referred to as stimulus driven.\n \n relatedTag\n Top-down-attention\n \n \n \n Covert-attention\n Paying attention without moving the eyes.\n \n relatedTag\n Overt-attention\n \n \n \n Divided-attention\n Integrating parallel multiple stimuli. Behavior involving responding simultaneously to multiple tasks or multiple task demands.\n \n relatedTag\n Focused-attention\n \n \n \n Focused-attention\n Responding discretely to specific visual, auditory, or tactile stimuli.\n \n relatedTag\n Divided-attention\n \n \n \n Orienting-attention\n Directing attention to a target stimulus.\n \n \n Overt-attention\n Selectively processing one location over others by moving the eyes to point at that location.\n \n relatedTag\n Covert-attention\n \n \n \n Selective-attention\n Maintaining a behavioral or cognitive set in the face of distracting or competing stimuli. Ability to pay attention to a limited array of all available sensory information.\n \n \n Sustained-attention\n Maintaining a consistent behavioral response during continuous and repetitive activity.\n \n \n Switched-attention\n Having to switch attention between two or more modalities of presentation.\n \n \n Top-down-attention\n Voluntary allocation of attention to certain features. Sometimes this is referred to goal-oriented attention.\n \n relatedTag\n Bottom-up-attention\n \n \n \n \n Task-effect-evidence\n The evidence supporting the conclusion that the event had the specified effect.\n \n Computational-evidence\n A type of evidence in which data are produced, and/or generated, and/or analyzed on a computer.\n \n \n External-evidence\n A phenomenon that follows and is caused by some previous phenomenon.\n \n \n Intended-effect\n A phenomenon that is intended to follow and be caused by some previous phenomenon.\n \n \n Behavioral-evidence\n An indication or conclusion based on the behavior of an agent.\n \n \n \n Task-event-role\n The purpose of an event with respect to the task.\n \n Experimental-stimulus\n Part of something designed to elicit a response in the experiment.\n \n \n Incidental\n Usually associated with a sensory event intended to give instructions to the participant about the task or behavior.\n \n \n Instructional\n Usually associated with a sensory event intended to give instructions to the participant about the task or behavior.\n \n \n Mishap\n Unplanned disruption such as an equipment or experiment control abnormality or experimenter error.\n \n \n Participant-response\n Something related to a participant actions in performing the task.\n \n \n Task-activity\n Something that is part of the overall task or is necessary to the overall experiment but is not directly part of a stimulus-response cycle. Examples would be taking a survey or provided providing a silva sample.\n \n \n Warning\n Something that should warn the participant that the parameters of the task have been or are about to be exceeded such as a warning message about getting too close to the shoulder of the road in a driving task.\n \n \n \n Task-action-type\n How an agent action should be interpreted in terms of the task specification.\n \n Appropriate-action\n An action suitable or proper in the circumstances.\n \n relatedTag\n Inappropriate-action\n \n \n \n Correct-action\n An action that was a correct response in the context of the task.\n \n relatedTag\n Incorrect-action\n Indeterminate-action\n \n \n \n Correction\n An action offering an improvement to replace a mistake or error.\n \n \n Incorrect-action\n An action considered wrong or incorrect in the context of the task.\n \n relatedTag\n Correct-action\n Indeterminate-action\n \n \n \n Imagined-action\n Form a mental image or concept of something. This is used to identity something that only happened in the imagination of the participant as in imagined movements in motor imagery paradigms.\n \n \n Inappropriate-action\n An action not in keeping with what is correct or proper for the task.\n \n relatedTag\n Appropriate-action\n \n \n \n Indeterminate-action\n An action that cannot be distinguished between two or more possibibities in the current context. This tag might be applied when an outside evaluator or a classification algorithm cannot determine a definitive result.\n \n relatedTag\n Correct-action\n Incorrect-action\n Miss\n Near-miss\n \n \n \n Omitted-action\n An expected response was skipped.\n \n \n Miss\n An action considered to be a failure in the context of the task. For example, if the agent is supposed to try to hit a target and misses.\n \n relatedTag\n Near-miss\n \n \n \n Near-miss\n An action barely satisfied the requirements of the task. In a driving experiment for example this could pertain to a narrowly avoided collision or other accident.\n \n relatedTag\n Miss\n \n \n \n \n Task-relationship\n Specifying organizational importance of sub-tasks.\n \n Background-subtask\n A part of the task which should be performed in the background as for example inhibiting blinks due to instruction while performing the primary task.\n \n \n Primary-subtask\n A part of the task which should be the primary focus of the participant.\n \n \n \n Task-stimulus-role\n The role the stimulus plays in the task.\n \n Cue\n A signal for an action, a pattern of stimuli indicating a particular response.\n \n \n Distractor\n A person or thing that distracts or a plausible but incorrect option in a multiple-choice question. In pyschological studies this is sometimes referred to as a foil.\n \n \n Expected\n Considered likely, probable or anticipated. Something of low information value as in frequent non-targets in an RSVP paradigm.\n \n relatedTag\n Unexpected\n \n \n suggestedTag\n Target\n \n \n \n Extraneous\n Irrelevant or unrelated to the subject being dealt with.\n \n \n Feedback\n An evaluative response to an inquiry, process, event, or activity.\n \n \n Go-signal\n An indicator to proceed with a planned action.\n \n relatedTag\n Stop-signal\n \n \n \n Meaningful\n Conveying significant or relevant information.\n \n \n Newly-learned\n Representing recently acquired information or understanding.\n \n \n Non-informative\n Something that is not useful in forming an opinion or judging an outcome.\n \n \n Non-target\n Something other than that done or looked for. Also tag Expected if the Non-target is frequent.\n \n relatedTag\n Target\n \n \n \n Not-meaningful\n Not having a serious, important, or useful quality or purpose.\n \n \n Novel\n Having no previous example or precedent or parallel.\n \n \n Oddball\n Something unusual, or infrequent.\n \n relatedTag\n Unexpected\n \n \n suggestedTag\n Target\n \n \n \n Planned\n Something that was decided on or arranged in advance.\n \n relatedTag\n Unplanned\n \n \n \n Penalty\n A disadvantage, loss, or hardship due to some action.\n \n \n Priming\n An implicit memory effect in which exposure to a stimulus influences response to a later stimulus.\n \n \n Query\n A sentence of inquiry that asks for a reply.\n \n \n Reward\n A positive reinforcement for a desired action, behavior or response.\n \n \n Stop-signal\n An indicator that the agent should stop the current activity.\n \n relatedTag\n Go-signal\n \n \n \n Target\n Something fixed as a goal, destination, or point of examination.\n \n \n Threat\n An indicator that signifies hostility and predicts an increased probability of attack.\n \n \n Timed\n Something planned or scheduled to be done at a particular time or lasting for a specified amount of time.\n \n \n Unexpected\n Something that is not anticipated.\n \n relatedTag\n Expected\n \n \n \n Unplanned\n Something that has not been planned as part of the task.\n \n relatedTag\n Planned\n \n \n \n \n \n \n Relation\n Concerns the way in which two or more people or things are connected.\n \n Comparative-relation\n Something considered in comparison to something else.\n \n Approximately-equal-to\n (A (Approximately-equal-to B)) indicates that A and B have almost the same value. Here A and B could refer to sizes, orders, positions or other quantities.\n \n \n Less-than\n (A (Less-than B)) indicates that A is smaller than B. Here A and B could refer to sizes, orders, positions or other quantities.\n \n \n Less-than-or-equal-to\n (A (Less-than-or-equal-to B)) indicates that the relative size or order of A is smaller than or equal to B.\n \n \n Greater-than\n (A (Greater-than B)) indicates that the relative size or order of A is bigger than that of B.\n \n \n Greater-than-or-equal-to\n (A (Greater-than-or-equal-to B)) indicates that the relative size or order of A is bigger than or the same as that of B.\n \n \n Equal-to\n (A (Equal-to B)) indicates that the size or order of A is the same as that of B.\n \n \n Not-equal-to\n (A (Not-equal-to B)) indicates that the size or order of A is not the same as that of B.\n \n \n \n Connective-relation\n Indicates two items are related in some way.\n \n Belongs-to\n (A (Belongs-to B)) indicates that A is a member of B.\n \n \n Connected-to\n (A (Connected-to) B) indicates that A is related to B in some respect, usually through a direct link.\n \n \n Contained-in\n (A (Contained-in B)) indicates that A is completely inside of B.\n \n \n Described-by\n (A (Described-by B)) indicates that B provides information about A.\n \n \n From-to\n (A (From-to B)) indicates a directional relation from A to B. A is considered the source.\n \n \n Group-of\n (A (Group-of B)) indicates A is a group of items of type B.\n \n \n Implied-by\n (A (Implied-by B)) indicates B is suggested by A.\n \n \n Interacts-with\n (A (Interacts-with B)) indicates A and B interact, possibly reciprocally.\n \n \n Member-of\n (A (Member-of B)) indicates A is a member of group B.\n \n \n Part-of\n (A (Part-of B)) indicates A is a part of the whole B.\n \n \n Performed-by\n (A (Performed-by B)) Indicates that ction or procedure A was carried out by agent B.\n \n \n Related-to\n (A (Relative-to B)) indicates A is a part of the whole B.\n \n \n \n Directional-relation\n A relationship indicating direction of change.\n \n Away-from\n Go away from a place or object.\n \n \n Towards\n Moving in the direction of. A relation binding a relational quality or disposition to the relevant type of entity\n \n \n \n Spatial-relation\n Indicating information about position.\n \n Above\n (A (Adjacent-to B)) means A is in a place or position that is higher than B.\n \n \n Across-from\n (A (Across-from B)) means A is on the opposite side of something from B.\n \n \n Adjacent-to\n (A (Adjacent-to B)) indicates that A is next to B in time or space.\n \n \n Ahead-of\n (A (Ahead-of B)) indicates that A is further forward in time or space in B.\n \n \n Around\n (A (Around B)) means A is in or near the present place or situation of B.\n \n \n Behind\n (A (Behind B)) means A is at or to the far side of B, typically so as to be hidden by it.\n \n \n Below\n (A (Below B)) means A is in a place or position that is lower than the position of B.\n \n \n Between\n (A (Between, (B, C))) means A is in the space or interval separating B and C.\n \n \n Bilateral-to\n (A (Bilateral B)) means A is on both sides of B or affects both sides of B.\n \n \n Bottom-edge-of\n (A (Bottom-edge-of B)) means A is on the bottom most part or or near the boundary of B.\n \n relatedTag\n Left-edge-of\n Right-edge-of\n Top-edge-of\n \n \n \n Boundary-of\n (A (Boundary-of B)) means A is on or part of the edge or boundary of B.\n \n \n Center-of\n (A (Center-of B)) means A is at a point or or in an area that is approximately central within B.\n \n \n Close-to\n (A (Close-to B)) means A is at a small distance from or is located near in space to B.\n \n \n Far-from\n (A (Far-from B)) means A is at a large distance from or is not located near in space to B.\n \n \n In-front-of\n (A (In-front-of B)) means A is in a position just ahead or at the front part of B, potentially partially blocking B from view.\n \n \n Left-edge-of\n (A (Left-edge-of B)) means A is located on the left side of B on or near the boundary of B.\n \n relatedTag\n Bottom-edge-of\n Right-edge-of\n Top-edge-of\n \n \n \n Left-side-of\n (A (Left-side-of B)) means A is located on the left side of B usually as part of B.\n \n relatedTag\n Right-side-of\n \n \n \n Lower-left-of\n (A (Lower-left-of B)) means A is situated on the lower left part of B. This relation is often used to specify qualitative information about screen position.\n \n relatedTag\n Lower-right-of\n \n \n \n Lower-right-of\n (A (Lower-right-of B)) means A is situated on the lower right part of B. This relation is often used to specify qualitative information about screen position.\n \n relatedTag\n Upper-left-of\n \n \n \n Outside-of\n (A (Outside-of B)) means A is located in the space around but not including B.\n \n \n Over\n (A (over B)) means A above is above B so as to cover or protect or A extends over the a general area as from a from a vantage point.\n \n \n Right-edge-of\n (A (Right-edge-of B)) means A is located on the right side of B on or near the boundary of B.\n \n relatedTag\n Bottom-edge-of\n Left-edge-of\n Top-edge-of\n \n \n \n Right-side-of\n (A (Right-side-of B)) means A is located on the right side of B usually as part of B.\n \n relatedTag\n Left-side-of\n \n \n \n To-left-of\n (A (To-left-of B)) means A is located on or directed toward the side to the west of B when B is facing north. This term is used when A is not part of B.\n \n \n To-right-of\n (A (To-right-of B)) means A is located on or directed toward the side to the east of B when B is facing north. This term is used when A is not part of B.\n \n \n Top-edge-of\n (A (Top-edge-of B)) means A is on the uppermost part or or near the boundary of B.\n \n relatedTag\n Left-edge-of\n Right-edge-of\n Bottom-edge-of\n \n \n \n Top-of\n (A (Top-of B)) means A is on the uppermost part, side, or surface of B.\n \n \n Underneath\n (A (Underneath B)) means A is situated directly below and may be concealed by B.\n \n \n Upper-left-of\n (A (Upper-left-of B)) means A is situated on the upper left part of B. This relation is often used to specify qualitative information about screen position.\n \n relatedTag\n Lower-left-of\n \n \n \n Upper-right-of\n (A (Upper-right-of B)) means A is situated on the upper right part of B. This relation is often used to specify qualitative information about screen position.\n \n relatedTag\n Lower-left-of\n \n \n \n Within\n (A (Within B)) means A is on the inside of or contained in B.\n \n \n \n Temporal-relation\n Any relationship which includes a temporal or time-based component.\n \n After\n (A After B) means A happens at a time subsequent to a reference time related to B.\n \n \n Asynchronous-with\n (A Asynchronous-with B) means A happens at times not occurring at the same time or having the same period or phase as B.\n \n \n Before\n (A Before B) means A happens at a time earlier in time or order than B.\n \n \n During\n (A During B) means A happens at some point in a given period of time in which B is ongoing.\n \n \n Synchronous-with\n (A Synchronous-with B) means A happens at occurs at the same time or rate as B.\n \n \n Waiting-for\n (A Waiting-for B) means A pauses for something to happen in B.\n \n \n \n \n \n \n accelerationUnits\n \n defaultUnits\n m-per-s^2\n \n \n m-per-s^2\n \n SIUnit\n \n \n unitSymbol\n \n \n \n \n angleUnits\n \n defaultUnits\n radian\n \n \n radian\n \n SIUnit\n \n \n \n rad\n \n SIUnit\n \n \n unitSymbol\n \n \n \n degree\n \n \n \n areaUnits\n \n defaultUnits\n m^2\n \n \n m^2\n \n SIUnit\n \n \n unitSymbol\n \n \n \n \n currencyUnits\n Units indicating the worth of something.\n \n defaultUnits\n $\n \n \n dollar\n \n \n $\n \n unitPrefix\n \n \n unitSymbol\n \n \n \n point\n \n \n \n frequencyUnits\n \n defaultUnits\n Hz\n \n \n hertz\n \n SIUnit\n \n \n \n Hz\n \n SIUnit\n \n \n unitSymbol\n \n \n \n \n intensityUnits\n \n defaultUnits\n dB\n \n \n dB\n Intensity expressed as ratio to a threshold. Often used for sound intensity.\n \n unitSymbol\n \n \n \n candela\n Units used to express light intensity.\n \n SIUnit\n \n \n \n cd\n Units used to express light intensity.\n \n SIUnit\n \n \n unitSymbol\n \n \n \n \n jerkUnits\n \n defaultUnits\n m-per-s^3\n \n \n m-per-s^3\n \n unitSymbol\n \n \n \n \n memorySizeUnits\n \n defaultUnits\n B\n \n \n byte\n \n SIUnit\n \n \n \n B\n \n SIUnit\n \n \n unitSymbol\n \n \n \n \n physicalLengthUnits\n \n defaultUnits\n m\n \n \n foot\n \n \n inch\n \n \n metre\n \n SIUnit\n \n \n \n m\n \n SIUnit\n \n \n unitSymbol\n \n \n \n mile\n \n \n \n speedUnits\n \n defaultUnits\n m-per-s\n \n \n m-per-s\n \n SIUnit\n \n \n unitSymbol\n \n \n \n mph\n \n unitSymbol\n \n \n \n kph\n \n unitSymbol\n \n \n \n \n timeUnits\n \n defaultUnits\n s\n \n \n second\n \n SIUnit\n \n \n \n s\n \n SIUnit\n \n \n unitSymbol\n \n \n \n day\n \n \n minute\n \n \n hour\n Should be in 24-hour format.\n \n \n \n volumeUnits\n \n defaultUnits\n m^3\n \n \n m^3\n \n SIUnit\n \n \n unitSymbol\n \n \n \n \n weightUnits\n \n defaultUnits\n g\n \n \n g\n \n SIUnit\n \n \n unitSymbol\n \n \n \n gram\n \n SIUnit\n \n \n \n pound\n \n \n lb\n \n \n \n \n \n deca\n SI unit multiple representing 10^1\n \n SIUnitModifier\n \n \n \n da\n SI unit multiple representing 10^1\n \n SIUnitSymbolModifier\n \n \n \n hecto\n SI unit multiple representing 10^2\n \n SIUnitModifier\n \n \n \n h\n SI unit multiple representing 10^2\n \n SIUnitSymbolModifier\n \n \n \n kilo\n SI unit multiple representing 10^3\n \n SIUnitModifier\n \n \n \n k\n SI unit multiple representing 10^3\n \n SIUnitSymbolModifier\n \n \n \n mega\n SI unit multiple representing 10^6\n \n SIUnitModifier\n \n \n \n M\n SI unit multiple representing 10^6\n \n SIUnitSymbolModifier\n \n \n \n giga\n SI unit multiple representing 10^9\n \n SIUnitModifier\n \n \n \n G\n SI unit multiple representing 10^9\n \n SIUnitSymbolModifier\n \n \n \n tera\n SI unit multiple representing 10^12\n \n SIUnitModifier\n \n \n \n T\n SI unit multiple representing 10^12\n \n SIUnitSymbolModifier\n \n \n \n peta\n SI unit multiple representing 10^15\n \n SIUnitModifier\n \n \n \n P\n SI unit multiple representing 10^15\n \n SIUnitSymbolModifier\n \n \n \n exa\n SI unit multiple representing 10^18\n \n SIUnitModifier\n \n \n \n E\n SI unit multiple representing 10^18\n \n SIUnitSymbolModifier\n \n \n \n zetta\n SI unit multiple representing 10^21\n \n SIUnitModifier\n \n \n \n Z\n SI unit multiple representing 10^21\n \n SIUnitSymbolModifier\n \n \n \n yotta\n SI unit multiple representing 10^24\n \n SIUnitModifier\n \n \n \n Y\n SI unit multiple representing 10^24\n \n SIUnitSymbolModifier\n \n \n \n deci\n SI unit submultiple representing 10^-1\n \n SIUnitModifier\n \n \n \n d\n SI unit submultiple representing 10^-1\n \n SIUnitSymbolModifier\n \n \n \n centi\n SI unit submultiple representing 10^-2\n \n SIUnitModifier\n \n \n \n c\n SI unit submultiple representing 10^-2\n \n SIUnitSymbolModifier\n \n \n \n milli\n SI unit submultiple representing 10^-3\n \n SIUnitModifier\n \n \n \n m\n SI unit submultiple representing 10^-3\n \n SIUnitSymbolModifier\n \n \n \n micro\n SI unit submultiple representing 10^-6\n \n SIUnitModifier\n \n \n \n u\n SI unit submultiple representing 10^-6\n \n SIUnitSymbolModifier\n \n \n \n nano\n SI unit submultiple representing 10^-9\n \n SIUnitModifier\n \n \n \n n\n SI unit submultiple representing 10^-9\n \n SIUnitSymbolModifier\n \n \n \n pico\n SI unit submultiple representing 10^-12\n \n SIUnitModifier\n \n \n \n p\n SI unit submultiple representing 10^-12\n \n SIUnitSymbolModifier\n \n \n \n femto\n SI unit submultiple representing 10^-15\n \n SIUnitModifier\n \n \n \n f\n SI unit submultiple representing 10^-15\n \n SIUnitSymbolModifier\n \n \n \n atto\n SI unit submultiple representing 10^-18\n \n SIUnitModifier\n \n \n \n a\n SI unit submultiple representing 10^-18\n \n SIUnitSymbolModifier\n \n \n \n zepto\n SI unit submultiple representing 10^-21\n \n SIUnitModifier\n \n \n \n z\n SI unit submultiple representing 10^-21\n \n SIUnitSymbolModifier\n \n \n \n yocto\n SI unit submultiple representing 10^-24\n \n SIUnitModifier\n \n \n \n y\n SI unit submultiple representing 10^-24\n \n SIUnitSymbolModifier\n \n \n \n \n \n dateTimeClass\n Date-times should conform to ISO8601 date-time format YYYY-MM-DDThh:mm:ss. Any variation on the full form is allowed.\n \n allowedCharacter\n digits\n T\n -\n :\n \n \n \n nameClass\n Value class designating values that have the characteristics of node names. The allowed characters are alphanumeric, hyphen, and underbar.\n \n allowedCharacter\n letters\n digits\n _\n -\n \n \n \n numericClass\n Value must be a valid numerical value.\n \n allowedCharacter\n digits\n E\n e\n +\n -\n .\n \n \n \n posixPath\n Posix path specification.\n \n allowedCharacter\n digits\n letters\n /\n :\n \n \n \n textClass\n Value class designating values that have the characteristics of text such as in descriptions.\n \n allowedCharacter\n letters\n digits\n blank\n +\n -\n :\n ;\n .\n /\n (\n )\n ?\n *\n %\n $\n @\n \n \n \n \n \n allowedCharacter\n A schema attribute of value classes specifying a special character that is allowed in expressing the value of a placeholder. Normally the allowed characters are listed individually. However, the word letters designates the upper and lower case alphabetic characters and the word digits designates the digits 0-9. The word blank designates the blank character.\n \n valueClassProperty\n \n \n \n defaultUnits\n A schema attribute of unit classes specifying the default units to use if the placeholder has a unit class but the substituted value has no units.\n \n unitClassProperty\n \n \n \n extensionAllowed\n A schema attribute indicating that users can add unlimited levels of child nodes under this tag. This tag is propagated to child nodes with the exception of the hashtag placeholders.\n \n boolProperty\n \n \n \n recommended\n A schema attribute indicating that the event-level HED string should include this tag.\n \n boolProperty\n \n \n \n relatedTag\n A schema attribute suggesting HED tags that are closely related to this tag. This attribute is used by tagging tools.\n \n \n requireChild\n A schema attribute indicating that one of the node elements descendants must be included when using this tag.\n \n boolProperty\n \n \n \n required\n A schema attribute indicating that every event-level HED string should include this tag.\n \n boolProperty\n \n \n \n SIUnit\n A schema attribute indicating that this unit element is an SI unit and can be modified by multiple and submultiple names. Note that some units such as byte are designated as SI units although they are not part of the standard.\n \n boolProperty\n \n \n unitProperty\n \n \n \n SIUnitModifier\n A schema attribute indicating that this SI unit modifier represents a multiple or submultiple of a base unit rather than a unit symbol.\n \n boolProperty\n \n \n unitModifierProperty\n \n \n \n SIUnitSymbolModifier\n A schema attribute indicating that this SI unit modifier represents a multiple or submultiple of a unit symbol rather than a base symbol.\n \n boolProperty\n \n \n unitModifierProperty\n \n \n \n suggestedTag\n A schema attribute that indicates another tag that is often associated with this tag. This attribute is used by tagging tools to provide tagging suggestions.\n \n \n tagGroup\n A schema attribute indicating the tag can only appear inside a tag group.\n \n boolProperty\n \n \n \n takesValue\n A schema attribute indicating the tag is a hashtag placeholder that is expected to be replaced with a user-defined value.\n \n boolProperty\n \n \n \n topLevelTagGroup\n A schema attribute indicating that this tag (or its descendants) can only appear in a top-level tag group.\n \n boolProperty\n \n \n \n unique\n A schema attribute indicating that only one of this tag or its descendants can be used in the event-level HED string.\n \n boolProperty\n \n \n \n unitClass\n A schema attribute specifying which unit class this value tag belongs to.\n \n \n unitPrefix\n A schema attribute applied specifically to unit elements to designate that the unit indicator is a prefix (e.g., dollar sign in the currency units).\n \n boolProperty\n \n \n unitProperty\n \n \n \n unitSymbol\n A schema attribute indicating this tag is an abbreviation or symbol representing a type of unit. Unit symbols represent both the singular and the plural and thus cannot be pluralized.\n \n boolProperty\n \n \n unitProperty\n \n \n \n valueClass\n A schema attribute specifying which value class this value tag belongs to.\n \n \n \n \n boolProperty\n Indicates that the schema attribute represents something that is either true or false and does not have a value. Attributes without this value are assumed to have string values.\n \n \n unitClassProperty\n Indicates that the schema attribute is meant to be applied to unit classes.\n \n \n unitModifierProperty\n Indicates that the schema attribute is meant to be applied to unit modifier classes.\n \n \n unitProperty\n Indicates that the schema attribute is meant to be applied to units within a unit class.\n \n \n valueClassProperty\n Indicates that the schema attribute is meant to be applied to value classes.\n \n \n This is an updated version of the schema format. The properties are now part of the schema. The schema attributes are designed to be checked in software rather than hard-coded. The schema attributes, themselves have properties.\n\n\n' + }, +}) + +// data/HED8.1.0.xml +var require_HED8_1_0 = __commonJS({ + 'data/HED8.1.0.xml'(exports, module) { + module.exports = + '\n\n This schema includes an xsd and requires unit class, unit modifier, value class, schema attribute and property sections.\n\n\n \n \n Event\n Something that happens at a given time and (typically) place. Elements of this tag subtree designate the general category in which an event falls.\n \n suggestedTag\n Task-property\n \n \n Sensory-event\n Something perceivable by the participant. An event meant to be an experimental stimulus should include the tag Task-property/Task-event-role/Experimental-stimulus.\n \n suggestedTag\n Task-event-role\n Sensory-presentation\n \n \n \n Agent-action\n Any action engaged in by an agent (see the Agent subtree for agent categories). A participant response to an experiment stimulus should include the tag Agent-property/Agent-task-role/Experiment-participant.\n \n suggestedTag\n Task-event-role\n Agent\n \n \n \n Data-feature\n An event marking the occurrence of a data feature such as an interictal spike or alpha burst that is often added post hoc to the data record.\n \n suggestedTag\n Data-property\n \n \n \n Experiment-control\n An event pertaining to the physical control of the experiment during its operation.\n \n \n Experiment-procedure\n An event indicating an experimental procedure, as in performing a saliva swab during the experiment or administering a survey.\n \n \n Experiment-structure\n An event specifying a change-point of the structure of experiment. This event is typically used to indicate a change in experimental conditions or tasks.\n \n \n Measurement-event\n A discrete measure returned by an instrument.\n \n suggestedTag\n Data-property\n \n \n \n \n Agent\n Someone or something that takes an active role or produces a specified effect.The role or effect may be implicit. Being alive or performing an activity such as a computation may qualify something to be an agent. An agent may also be something that simulates something else.\n \n suggestedTag\n Agent-property\n \n \n Animal-agent\n An agent that is an animal.\n \n \n Avatar-agent\n An agent associated with an icon or avatar representing another agent.\n \n \n Controller-agent\n An agent experiment control software or hardware.\n \n \n Human-agent\n A person who takes an active role or produces a specified effect.\n \n \n Robotic-agent\n An agent mechanical device capable of performing a variety of often complex tasks on command or by being programmed in advance.\n \n \n Software-agent\n An agent computer program.\n \n \n \n Action\n Do something.\n \n extensionAllowed\n \n \n Communicate\n Convey knowledge of or information about something.\n \n Communicate-gesturally\n Communicate nonverbally using visible bodily actions, either in place of speech or together and in parallel with spoken words. Gestures include movement of the hands, face, or other parts of the body.\n \n relatedTag\n Move-face\n Move-upper-extremity\n \n \n Clap-hands\n Strike the palms of against one another resoundingly, and usually repeatedly, especially to express approval.\n \n \n Clear-throat\n Cough slightly so as to speak more clearly, attract attention, or to express hesitancy before saying something awkward.\n \n relatedTag\n Move-face\n Move-head\n \n \n \n Frown\n Express disapproval, displeasure, or concentration, typically by turning down the corners of the mouth.\n \n relatedTag\n Move-face\n \n \n \n Grimace\n Make a twisted expression, typically expressing disgust, pain, or wry amusement.\n \n relatedTag\n Move-face\n \n \n \n Nod-head\n Tilt head in alternating up and down arcs along the sagittal plane. It is most commonly, but not universally, used to indicate agreement, acceptance, or acknowledgement.\n \n relatedTag\n Move-head\n \n \n \n Pump-fist\n Raise with fist clenched in triumph or affirmation.\n \n relatedTag\n Move-upper-extremity\n \n \n \n Raise-eyebrows\n Move eyebrows upward.\n \n relatedTag\n Move-face\n Move-eyes\n \n \n \n Shake-fist\n Clench hand into a fist and shake to demonstrate anger.\n \n relatedTag\n Move-upper-extremity\n \n \n \n Shake-head\n Turn head from side to side as a way of showing disagreement or refusal.\n \n relatedTag\n Move-head\n \n \n \n Shhh\n Place finger over lips and possibly uttering the syllable shhh to indicate the need to be quiet.\n \n relatedTag\n Move-upper-extremity\n \n \n \n Shrug\n Lift shoulders up towards head to indicate a lack of knowledge about a particular topic.\n \n relatedTag\n Move-upper-extremity\n Move-torso\n \n \n \n Smile\n Form facial features into a pleased, kind, or amused expression, typically with the corners of the mouth turned up and the front teeth exposed.\n \n relatedTag\n Move-face\n \n \n \n Spread-hands\n Spread hands apart to indicate ignorance.\n \n relatedTag\n Move-upper-extremity\n \n \n \n Thumbs-down\n Extend the thumb downward to indicate disapproval.\n \n relatedTag\n Move-upper-extremity\n \n \n \n Thumb-up\n Extend the thumb upward to indicate approval.\n \n relatedTag\n Move-upper-extremity\n \n \n \n Wave\n Raise hand and move left and right, as a greeting or sign of departure.\n \n relatedTag\n Move-upper-extremity\n \n \n \n Widen-eyes\n Open eyes and possibly with eyebrows lifted especially to express surprise or fear.\n \n relatedTag\n Move-face\n Move-eyes\n \n \n \n Wink\n Close and open one eye quickly, typically to indicate that something is a joke or a secret or as a signal of affection or greeting.\n \n relatedTag\n Move-face\n Move-eyes\n \n \n \n \n Communicate-musically\n Communicate using music.\n \n Hum\n Make a low, steady continuous sound like that of a bee. Sing with the lips closed and without uttering speech.\n \n \n Play-instrument\n Make musical sounds using an instrument.\n \n \n Sing\n Produce musical tones by means of the voice.\n \n \n Vocalize\n Utter vocal sounds.\n \n \n Whistle\n Produce a shrill clear sound by forcing breath out or air in through the puckered lips.\n \n \n \n Communicate-vocally\n Communicate using mouth or vocal cords.\n \n Cry\n Shed tears associated with emotions, usually sadness but also joy or frustration.\n \n \n Groan\n Make a deep inarticulate sound in response to pain or despair.\n \n \n Laugh\n Make the spontaneous sounds and movements of the face and body that are the instinctive expressions of lively amusement and sometimes also of contempt or derision.\n \n \n Scream\n Make loud, vociferous cries or yells to express pain, excitement, or fear.\n \n \n Shout\n Say something very loudly.\n \n \n Sigh\n Emit a long, deep, audible breath expressing sadness, relief, tiredness, or a similar feeling.\n \n \n Speak\n Communicate using spoken language.\n \n \n Whisper\n Speak very softly using breath without vocal cords.\n \n \n \n \n Move\n Move in a specified direction or manner. Change position or posture.\n \n Breathe\n Inhale or exhale during respiration.\n \n Blow\n Expel air through pursed lips.\n \n \n Cough\n Suddenly and audibly expel air from the lungs through a partially closed glottis, preceded by inhalation.\n \n \n Exhale\n Blow out or expel breath.\n \n \n Hiccup\n Involuntarily spasm the diaphragm and respiratory organs, with a sudden closure of the glottis and a characteristic sound like that of a cough.\n \n \n Hold-breath\n Interrupt normal breathing by ceasing to inhale or exhale.\n \n \n Inhale\n Draw in with the breath through the nose or mouth.\n \n \n Sneeze\n Suddenly and violently expel breath through the nose and mouth.\n \n \n Sniff\n Draw in air audibly through the nose to detect a smell, to stop it from running, or to express contempt.\n \n \n \n Move-body\n Move entire body.\n \n Bend\n Move body in a bowed or curved manner.\n \n \n Dance\n Perform a purposefully selected sequences of human movement often with aesthetic or symbolic value. Move rhythmically to music, typically following a set sequence of steps.\n \n \n Fall-down\n Lose balance and collapse.\n \n \n Flex\n Cause a muscle to stand out by contracting or tensing it. Bend a limb or joint.\n \n \n Jerk\n Make a quick, sharp, sudden movement.\n \n \n Lie-down\n Move to a horizontal or resting position.\n \n \n Recover-balance\n Return to a stable, upright body position.\n \n \n Sit-down\n Move from a standing to a sitting position.\n \n \n Sit-up\n Move from lying down to a sitting position.\n \n \n Stand-up\n Move from a sitting to a standing position.\n \n \n Stretch\n Straighten or extend body or a part of body to its full length, typically so as to tighten muscles or in order to reach something.\n \n \n Shudder\n Tremble convulsively, sometimes as a result of fear or revulsion.\n \n \n Stumble\n Trip or momentarily lose balance and almost fall.\n \n \n Turn\n Change or cause to change direction.\n \n \n \n Move-body-part\n Move one part of a body.\n \n Move-eyes\n Move eyes.\n \n Blink\n Shut and open the eyes quickly.\n \n \n Close-eyes\n Lower and keep eyelids in a closed position.\n \n \n Fixate\n Direct eyes to a specific point or target.\n \n \n Inhibit-blinks\n Purposely prevent blinking.\n \n \n Open-eyes\n Raise eyelids to expose pupil.\n \n \n Saccade\n Move eyes rapidly between fixation points.\n \n \n Squint\n Squeeze one or both eyes partly closed in an attempt to see more clearly or as a reaction to strong light.\n \n \n Stare\n Look fixedly or vacantly at someone or something with eyes wide open.\n \n \n \n Move-face\n Move the face or jaw.\n \n Bite\n Seize with teeth or jaws an object or organism so as to grip or break the surface covering.\n \n \n Burp\n Noisily release air from the stomach through the mouth. Belch.\n \n \n Chew\n Repeatedly grinding, tearing, and or crushing with teeth or jaws.\n \n \n Gurgle\n Make a hollow bubbling sound like that made by water running out of a bottle.\n \n \n Swallow\n Cause or allow something, especially food or drink to pass down the throat.\n \n Gulp\n Swallow quickly or in large mouthfuls, often audibly, sometimes to indicate apprehension.\n \n \n \n Yawn\n Take a deep involuntary inhalation with the mouth open often as a sign of drowsiness or boredom.\n \n \n \n Move-head\n Move head.\n \n Lift-head\n Tilt head back lifting chin.\n \n \n Lower-head\n Move head downward so that eyes are in a lower position.\n \n \n Turn-head\n Rotate head horizontally to look in a different direction.\n \n \n \n Move-lower-extremity\n Move leg and/or foot.\n \n Curl-toes\n Bend toes sometimes to grip.\n \n \n Hop\n Jump on one foot.\n \n \n Jog\n Run at a trot to exercise.\n \n \n Jump\n Move off the ground or other surface through sudden muscular effort in the legs.\n \n \n Kick\n Strike out or flail with the foot or feet. Strike using the leg, in unison usually with an area of the knee or lower using the foot.\n \n \n Pedal\n Move by working the pedals of a bicycle or other machine.\n \n \n Press-foot\n Move by pressing foot.\n \n \n Run\n Travel on foot at a fast pace.\n \n \n Step\n Put one leg in front of the other and shift weight onto it.\n \n Heel-strike\n Strike the ground with the heel during a step.\n \n \n Toe-off\n Push with toe as part of a stride.\n \n \n \n Trot\n Run at a moderate pace, typically with short steps.\n \n \n Walk\n Move at a regular pace by lifting and setting down each foot in turn never having both feet off the ground at once.\n \n \n \n Move-torso\n Move body trunk.\n \n \n Move-upper-extremity\n Move arm, shoulder, and/or hand.\n \n Drop\n Let or cause to fall vertically.\n \n \n Grab\n Seize suddenly or quickly. Snatch or clutch.\n \n \n Grasp\n Seize and hold firmly.\n \n \n Hold-down\n Prevent someone or something from moving by holding them firmly.\n \n \n Lift\n Raising something to higher position.\n \n \n Make-fist\n Close hand tightly with the fingers bent against the palm.\n \n \n Point\n Draw attention to something by extending a finger or arm.\n \n \n Press\n Apply pressure to something to flatten, shape, smooth or depress it. This action tag should be used to indicate key presses and mouse clicks.\n \n relatedTag\n Push\n \n \n \n Push\n Apply force in order to move something away. Use Press to indicate a key press or mouse click.\n \n relatedTag\n Press\n \n \n \n Reach\n Stretch out your arm in order to get or touch something.\n \n \n Release\n Make available or set free.\n \n \n Retract\n Draw or pull back.\n \n \n Scratch\n Drag claws or nails over a surface or on skin.\n \n \n Snap-fingers\n Make a noise by pushing second finger hard against thumb and then releasing it suddenly so that it hits the base of the thumb.\n \n \n Touch\n Come into or be in contact with.\n \n \n \n \n \n Perceive\n Produce an internal, conscious image through stimulating a sensory system.\n \n Hear\n Give attention to a sound.\n \n \n See\n Direct gaze toward someone or something or in a specified direction.\n \n \n Smell\n Inhale in order to ascertain an odor or scent.\n \n \n Taste\n Sense a flavor in the mouth and throat on contact with a substance.\n \n \n Sense-by-touch\n Sense something through receptors in the skin.\n \n \n \n Perform\n Carry out or accomplish an action, task, or function.\n \n Close\n Act as to blocked against entry or passage.\n \n \n Collide-with\n Hit with force when moving.\n \n \n Halt\n Bring or come to an abrupt stop.\n \n \n Modify\n Change something.\n \n \n Open\n Widen an aperture, door, or gap, especially one allowing access to something.\n \n \n Operate\n Control the functioning of a machine, process, or system.\n \n \n Play\n Engage in activity for enjoyment and recreation rather than a serious or practical purpose.\n \n \n Read\n Interpret something that is written or printed.\n \n \n Repeat\n Make do or perform again.\n \n \n Rest\n Be inactive in order to regain strength, health, or energy.\n \n \n Write\n Communicate or express by means of letters or symbols written or imprinted on a surface.\n \n \n \n Think\n Direct the mind toward someone or something or use the mind actively to form connected ideas.\n \n Allow\n Allow access to something such as allowing a car to pass.\n \n \n Attend-to\n Focus mental experience on specific targets.\n \n \n Count\n Tally items either silently or aloud.\n \n \n Deny\n Refuse to give or grant something requested or desired by someone.\n \n \n Detect\n Discover or identify the presence or existence of something.\n \n \n Discriminate\n Recognize a distinction.\n \n \n Encode\n Convert information or an instruction into a particular form.\n \n \n Evade\n Escape or avoid, especially by cleverness or trickery.\n \n \n Generate\n Cause something, especially an emotion or situation to arise or come about.\n \n \n Identify\n Establish or indicate who or what someone or something is.\n \n \n Imagine\n Form a mental image or concept of something.\n \n \n Judge\n Evaluate evidence to make a decision or form a belief.\n \n \n Learn\n Adaptively change behavior as the result of experience.\n \n \n Memorize\n Adaptively change behavior as the result of experience.\n \n \n Plan\n Think about the activities required to achieve a desired goal.\n \n \n Predict\n Say or estimate that something will happen or will be a consequence of something without having exact informaton.\n \n \n Recognize\n Identify someone or something from having encountered them before.\n \n \n Respond\n React to something such as a treatment or a stimulus.\n \n \n Recall\n Remember information by mental effort.\n \n \n Switch-attention\n Transfer attention from one focus to another.\n \n \n Track\n Follow a person, animal, or object through space or time.\n \n \n \n \n Item\n An independently existing thing (living or nonliving).\n \n extensionAllowed\n \n \n Biological-item\n An entity that is biological, that is related to living organisms.\n \n Anatomical-item\n A biological structure, system, fluid or other substance excluding single molecular entities.\n \n Body\n The biological structure representing an organism.\n \n \n Body-part\n Any part of an organism.\n \n Head\n The upper part of the human body, or the front or upper part of the body of an animal, typically separated from the rest of the body by a neck, and containing the brain, mouth, and sense organs.\n \n Hair\n The filamentous outgrowth of the epidermis.\n \n \n Ear\n A sense organ needed for the detection of sound and for establishing balance.\n \n \n Face\n The anterior portion of the head extending from the forehead to the chin and ear to ear. The facial structures contain the eyes, nose and mouth, cheeks and jaws.\n \n Cheek\n The fleshy part of the face bounded by the eyes, nose, ear, and jaw line.\n \n \n Chin\n The part of the face below the lower lip and including the protruding part of the lower jaw.\n \n \n Eye\n The organ of sight or vision.\n \n \n Eyebrow\n The arched strip of hair on the bony ridge above each eye socket.\n \n \n Forehead\n The part of the face between the eyebrows and the normal hairline.\n \n \n Lip\n Fleshy fold which surrounds the opening of the mouth.\n \n \n Nose\n A structure of special sense serving as an organ of the sense of smell and as an entrance to the respiratory tract.\n \n \n Mouth\n The proximal portion of the digestive tract, containing the oral cavity and bounded by the oral opening.\n \n \n Teeth\n The hard bonelike structures in the jaws. A collection of teeth arranged in some pattern in the mouth or other part of the body.\n \n \n \n \n Lower-extremity\n Refers to the whole inferior limb (leg and/or foot).\n \n Ankle\n A gliding joint between the distal ends of the tibia and fibula and the proximal end of the talus.\n \n \n Calf\n The fleshy part at the back of the leg below the knee.\n \n \n Foot\n The structure found below the ankle joint required for locomotion.\n \n Big-toe\n The largest toe on the inner side of the foot.\n \n \n Heel\n The back of the foot below the ankle.\n \n \n Instep\n The part of the foot between the ball and the heel on the inner side.\n \n \n Little-toe\n The smallest toe located on the outer side of the foot.\n \n \n Toes\n The terminal digits of the foot.\n \n \n \n Knee\n A joint connecting the lower part of the femur with the upper part of the tibia.\n \n \n Shin\n Front part of the leg below the knee.\n \n \n Thigh\n Upper part of the leg between hip and knee.\n \n \n \n Torso\n The body excluding the head and neck and limbs.\n \n Torso-back\n The rear surface of the human body from the shoulders to the hips.\n \n \n Buttocks\n The round fleshy parts that form the lower rear area of a human trunk.\n \n \n Torso-chest\n The anterior side of the thorax from the neck to the abdomen.\n \n \n Gentalia\n The external organs of reproduction.\n \n \n Hip\n The lateral prominence of the pelvis from the waist to the thigh.\n \n \n Waist\n The abdominal circumference at the navel.\n \n \n \n Upper-extremity\n Refers to the whole superior limb (shoulder, arm, elbow, wrist, hand).\n \n Elbow\n A type of hinge joint located between the forearm and upper arm.\n \n \n Forearm\n Lower part of the arm between the elbow and wrist.\n \n \n Hand\n The distal portion of the upper extremity. It consists of the carpus, metacarpus, and digits.\n \n Finger\n Any of the digits of the hand.\n \n Index-finger\n The second finger from the radial side of the hand, next to the thumb.\n \n \n Little-finger\n The fifth and smallest finger from the radial side of the hand.\n \n \n Middle-finger\n The middle or third finger from the radial side of the hand.\n \n \n Ring-finger\n The fourth finger from the radial side of the hand.\n \n \n Thumb\n The thick and short hand digit which is next to the index finger in humans.\n \n \n \n Palm\n The part of the inner surface of the hand that extends from the wrist to the bases of the fingers.\n \n \n Knuckles\n A part of a finger at a joint where the bone is near the surface, especially where the finger joins the hand.\n \n \n \n Shoulder\n Joint attaching upper arm to trunk.\n \n \n Upper-arm\n Portion of arm between shoulder and elbow.\n \n \n Wrist\n A joint between the distal end of the radius and the proximal row of carpal bones.\n \n \n \n \n \n Organism\n A living entity, more specifically a biological entity that consists of one or more cells and is capable of genomic replication (independently or not).\n \n Animal\n A living organism that has membranous cell walls, requires oxygen and organic foods, and is capable of voluntary movement.\n \n \n Human\n The bipedal primate mammal Homo sapiens.\n \n \n Plant\n Any living organism that typically synthesizes its food from inorganic substances and possesses cellulose cell walls.\n \n \n \n \n Language-item\n An entity related to a systematic means of communicating by the use of sounds, symbols, or gestures.\n \n suggestedTag\n Sensory-presentation\n \n \n Character\n A mark or symbol used in writing.\n \n \n Clause\n A unit of grammatical organization next below the sentence in rank, usually consisting of a subject and predicate.\n \n \n Glyph\n A hieroglyphic character, symbol, or pictograph.\n \n \n Nonword\n A group of letters or speech sounds that looks or sounds like a word but that is not accepted as such by native speakers.\n \n \n Paragraph\n A distinct section of a piece of writing, usually dealing with a single theme.\n \n \n Phoneme\n A speech sound that is distinguished by the speakers of a particular language.\n \n \n Phrase\n A phrase is a group of words functioning as a single unit in the syntax of a sentence.\n \n \n Sentence\n A set of words that is complete in itself, conveying a statement, question, exclamation, or command and typically containing an explicit or implied subject and a predicate containing a finite verb.\n \n \n Syllable\n A unit of spoken language larger than a phoneme.\n \n \n Textblock\n A block of text.\n \n \n Word\n A word is the smallest free form (an item that may be expressed in isolation with semantic or pragmatic content) in a language.\n \n \n \n Object\n Something perceptible by one or more of the senses, especially by vision or touch. A material thing.\n \n suggestedTag\n Sensory-presentation\n \n \n Geometric-object\n An object or a representation that has structure and topology in space.\n \n Pattern\n An arrangement of objects, facts, behaviors, or other things which have scientific, mathematical, geometric, statistical, or other meaning.\n \n Dots\n A small round mark or spot.\n \n \n LED-pattern\n A pattern created by lighting selected members of a fixed light emitting diode array.\n \n \n \n 2D-shape\n A planar, two-dimensional shape.\n \n Arrow\n A shape with a pointed end indicating direction.\n \n \n Clockface\n The dial face of a clock. A location identifier based on clockface numbering or anatomic subregion.\n \n \n Cross\n A figure or mark formed by two intersecting lines crossing at their midpoints.\n \n \n Dash\n A horizontal stroke in writing or printing to mark a pause or break in sense or to represent omitted letters or words.\n \n \n Ellipse\n A closed plane curve resulting from the intersection of a circular cone and a plane cutting completely through it, especially a plane not parallel to the base.\n \n Circle\n A ring-shaped structure with every point equidistant from the center.\n \n \n \n Rectangle\n A parallelogram with four right angles.\n \n Square\n A square is a special rectangle with four equal sides.\n \n \n \n Single-point\n A point is a geometric entity that is located in a zero-dimensional spatial region and whose position is defined by its coordinates in some coordinate system.\n \n \n Star\n A conventional or stylized representation of a star, typically one having five or more points.\n \n \n Triangle\n A three-sided polygon.\n \n \n \n 3D-shape\n A geometric three-dimensional shape.\n \n Box\n A square or rectangular vessel, usually made of cardboard or plastic.\n \n Cube\n A solid or semi-solid in the shape of a three dimensional square.\n \n \n \n Cone\n A shape whose base is a circle and whose sides taper up to a point.\n \n \n Cylinder\n A surface formed by circles of a given radius that are contained in a plane perpendicular to a given axis, whose centers align on the axis.\n \n \n Ellipsoid\n A closed plane curve resulting from the intersection of a circular cone and a plane cutting completely through it, especially a plane not parallel to the base.\n \n Sphere\n A solid or hollow three-dimensional object bounded by a closed surface such that every point on the surface is equidistant from the center.\n \n \n \n Pyramid\n A polyhedron of which one face is a polygon of any number of sides, and the other faces are triangles with a common vertex.\n \n \n \n \n Ingestible-object\n Something that can be taken into the body by the mouth for digestion or absorption.\n \n \n Man-made-object\n Something constructed by human means.\n \n Building\n A structure that has a roof and walls and stands more or less permanently in one place.\n \n Room\n An area within a building enclosed by walls and floor and ceiling.\n \n \n Roof\n A roof is the covering on the uppermost part of a building which provides protection from animals and weather, notably rain, but also heat, wind and sunlight.\n \n \n Entrance\n The means or place of entry.\n \n \n Attic\n A room or a space immediately below the roof of a building.\n \n \n Basement\n The part of a building that is wholly or partly below ground level.\n \n \n \n Clothing\n A covering designed to be worn on the body.\n \n \n Device\n An object contrived for a specific purpose.\n \n Assistive-device\n A device that help an individual accomplish a task.\n \n Glasses\n Frames with lenses worn in front of the eye for vision correction, eye protection, or protection from UV rays.\n \n \n Writing-device\n A device used for writing.\n \n Pen\n A common writing instrument used to apply ink to a surface for writing or drawing.\n \n \n Pencil\n An implement for writing or drawing that is constructed of a narrow solid pigment core in a protective casing that prevents the core from being broken or marking the hand.\n \n \n \n \n Computing-device\n An electronic device which take inputs and processes results from the inputs.\n \n Cellphone\n A telephone with access to a cellular radio system so it can be used over a wide area, without a physical connection to a network.\n \n \n Desktop-computer\n A computer suitable for use at an ordinary desk.\n \n \n Laptop-computer\n A computer that is portable and suitable for use while traveling.\n \n \n Tablet-computer\n A small portable computer that accepts input directly on to its screen rather than via a keyboard or mouse.\n \n \n \n Engine\n A motor is a machine designed to convert one or more forms of energy into mechanical energy.\n \n \n IO-device\n Hardware used by a human (or other system) to communicate with a computer.\n \n Input-device\n A piece of equipment used to provide data and control signals to an information processing system such as a computer or information appliance.\n \n Computer-mouse\n A hand-held pointing device that detects two-dimensional motion relative to a surface.\n \n Mouse-button\n An electric switch on a computer mouse which can be pressed or clicked to select or interact with an element of a graphical user interface.\n \n \n Scroll-wheel\n A scroll wheel or mouse wheel is a wheel used for scrolling made of hard plastic with a rubbery surface usually located between the left and right mouse buttons and is positioned perpendicular to the mouse surface.\n \n \n \n Joystick\n A control device that uses a movable handle to create two-axis input for a computer device.\n \n \n Keyboard\n A device consisting of mechanical keys that are pressed to create input to a computer.\n \n Keyboard-key\n A button on a keyboard usually representing letters, numbers, functions, or symbols.\n \n #\n Value of a keyboard key.\n \n takesValue\n \n \n \n \n \n Keypad\n A device consisting of keys, usually in a block arrangement, that provides limited input to a system.\n \n Keypad-key\n A key on a separate section of a computer keyboard that groups together numeric keys and those for mathematical or other special functions in an arrangement like that of a calculator.\n \n #\n Value of keypad key.\n \n takesValue\n \n \n \n \n \n Microphone\n A device designed to convert sound to an electrical signal.\n \n \n Push-button\n A switch designed to be operated by pressing a button.\n \n \n \n Output-device\n Any piece of computer hardware equipment which converts information into human understandable form.\n \n Display-device\n An output device for presentation of information in visual or tactile form the latter used for example in tactile electronic displays for blind people.\n \n Head-mounted-display\n An instrument that functions as a display device, worn on the head or as part of a helmet, that has a small display optic in front of one (monocular HMD) or each eye (binocular HMD).\n \n \n LED-display\n A LED display is a flat panel display that uses an array of light-emitting diodes as pixels for a video display.\n \n \n Computer-screen\n An electronic device designed as a display or a physical device designed to be a protective meshwork.\n \n Screen-window\n A part of a computer screen that contains a display different from the rest of the screen. A window is a graphical control element consisting of a visual area containing some of the graphical user interface of the program it belongs to and is framed by a window decoration.\n \n \n \n \n Auditory-device\n A device designed to produce sound.\n \n Headphones\n An instrument that consists of a pair of small loudspeakers, or less commonly a single speaker, held close to ears and connected to a signal source such as an audio amplifier, radio, CD player or portable media player.\n \n \n Loudspeaker\n A device designed to convert electrical signals to sounds that can be heard.\n \n \n \n \n Recording-device\n A device that copies information in a signal into a persistent information bearer.\n \n EEG-recorder\n A device for recording electric currents in the brain using electrodes applied to the scalp, to the surface of the brain, or placed within the substance of the brain.\n \n \n File-storage\n A device for recording digital information to a permanent media.\n \n \n MEG-recorder\n A device for measuring the magnetic fields produced by electrical activity in the brain, usually conducted externally.\n \n \n Motion-capture\n A device for recording the movement of objects or people.\n \n \n Tape-recorder\n A device for recording and reproduction usually using magnetic tape for storage that can be saved and played back.\n \n \n \n Touchscreen\n A control component that operates an electronic device by pressing the display on the screen.\n \n \n \n Machine\n A human-made device that uses power to apply forces and control movement to perform an action.\n \n \n Measurement-device\n A device in which a measure function inheres.\n \n Clock\n A device designed to indicate the time of day or to measure the time duration of an event or action.\n \n Clock-face\n A location identifier based on clockface numbering or anatomic subregion.\n \n \n \n \n Robot\n A mechanical device that sometimes resembles a living animal and is capable of performing a variety of often complex human tasks on command or by being programmed in advance.\n \n \n Tool\n A component that is not part of a device but is designed to support its assemby or operation.\n \n \n \n Document\n A physical object, or electronic counterpart, that is characterized by containing writing which is meant to be human-readable.\n \n Letter\n A written message addressed to a person or organization.\n \n \n Note\n A brief written record.\n \n \n Book\n A volume made up of pages fastened along one edge and enclosed between protective covers.\n \n \n Notebook\n A book for notes or memoranda.\n \n \n Questionnaire\n A document consisting of questions and possibly responses, depending on whether it has been filled out.\n \n \n \n Furnishing\n Furniture, fittings, and other decorative accessories, such as curtains and carpets, for a house or room.\n \n \n Manufactured-material\n Substances created or extracted from raw materials.\n \n Ceramic\n A hard, brittle, heat-resistant and corrosion-resistant material made by shaping and then firing a nonmetallic mineral, such as clay, at a high temperature.\n \n \n Glass\n A brittle transparent solid with irregular atomic structure.\n \n \n Paper\n A thin sheet material produced by mechanically or chemically processing cellulose fibres derived from wood, rags, grasses or other vegetable sources in water.\n \n \n Plastic\n Various high-molecular-weight thermoplastic or thermosetting polymers that are capable of being molded, extruded, drawn, or otherwise shaped and then hardened into a form.\n \n \n Steel\n An alloy made up of iron with typically a few tenths of a percent of carbon to improve its strength and fracture resistance compared to iron.\n \n \n \n Media\n Media are audo/visual/audiovisual modes of communicating information for mass consumption.\n \n Media-clip\n A short segment of media.\n \n Audio-clip\n A short segment of audio.\n \n \n Audiovisual-clip\n A short media segment containing both audio and video.\n \n \n Video-clip\n A short segment of video.\n \n \n \n Visualization\n An planned process that creates images, diagrams or animations from the input data.\n \n Animation\n A form of graphical illustration that changes with time to give a sense of motion or represent dynamic changes in the portrayal.\n \n \n Art-installation\n A large-scale, mixed-media constructions, often designed for a specific place or for a temporary period of time.\n \n \n Braille\n A display using a system of raised dots that can be read with the fingers by people who are blind.\n \n \n Image\n Any record of an imaging event whether physical or electronic.\n \n Cartoon\n A type of illustration, sometimes animated, typically in a non-realistic or semi-realistic style. The specific meaning has evolved over time, but the modern usage usually refers to either an image or series of images intended for satire, caricature, or humor. A motion picture that relies on a sequence of illustrations for its animation.\n \n \n Drawing\n A representation of an object or outlining a figure, plan, or sketch by means of lines.\n \n \n Icon\n A sign (such as a word or graphic symbol) whose form suggests its meaning.\n \n \n Painting\n A work produced through the art of painting.\n \n \n Photograph\n An image recorded by a camera.\n \n \n \n Movie\n A sequence of images displayed in succession giving the illusion of continuous movement.\n \n \n Outline-visualization\n A visualization consisting of a line or set of lines enclosing or indicating the shape of an object in a sketch or diagram.\n \n \n Point-light-visualization\n A display in which action is depicted using a few points of light, often generated from discrete sensors in motion capture.\n \n \n Sculpture\n A two- or three-dimensional representative or abstract forms, especially by carving stone or wood or by casting metal or plaster.\n \n \n Stick-figure-visualization\n A drawing showing the head of a human being or animal as a circle and all other parts as straight lines.\n \n \n \n \n Navigational-object\n An object whose purpose is to assist directed movement from one location to another.\n \n Path\n A trodden way. A way or track laid down for walking or made by continual treading.\n \n \n Road\n An open way for the passage of vehicles, persons, or animals on land.\n \n Lane\n A defined path with physical dimensions through which an object or substance may traverse.\n \n \n \n Runway\n A paved strip of ground on a landing field for the landing and takeoff of aircraft.\n \n \n \n Vehicle\n A mobile machine which transports people or cargo.\n \n Aircraft\n A vehicle which is able to travel through air in an atmosphere.\n \n \n Bicycle\n A human-powered, pedal-driven, single-track vehicle, having two wheels attached to a frame, one behind the other.\n \n \n Boat\n A watercraft of any size which is able to float or plane on water.\n \n \n Car\n A wheeled motor vehicle used primarily for the transportation of human passengers.\n \n \n Cart\n A cart is a vehicle which has two wheels and is designed to transport human passengers or cargo.\n \n \n Tractor\n A mobile machine specifically designed to deliver a high tractive effort at slow speeds, and mainly used for the purposes of hauling a trailer or machinery used in agriculture or construction.\n \n \n Train\n A connected line of railroad cars with or without a locomotive.\n \n \n Truck\n A motor vehicle which, as its primary funcion, transports cargo rather than human passangers.\n \n \n \n \n Natural-object\n Something that exists in or is produced by nature, and is not artificial or man-made.\n \n Mineral\n A solid, homogeneous, inorganic substance occurring in nature and having a definite chemical composition.\n \n \n Natural-feature\n A feature that occurs in nature. A prominent or identifiable aspect, region, or site of interest.\n \n Field\n An unbroken expanse as of ice or grassland.\n \n \n Hill\n A rounded elevation of limited extent rising above the surrounding land with local relief of less than 300m.\n \n \n Mountain\n A landform that extends above the surrounding terrain in a limited area.\n \n \n River\n A natural freshwater surface stream of considerable volume and a permanent or seasonal flow, moving in a definite channel toward a sea, lake, or another river.\n \n \n Waterfall\n A sudden descent of water over a step or ledge in the bed of a river.\n \n \n \n \n \n Sound\n Mechanical vibrations transmitted by an elastic medium. Something that can be heard.\n \n Environmental-sound\n Sounds occuring in the environment. An accumulation of noise pollution that occurs outside. This noise can be caused by transport, industrial, and recreational activities.\n \n Crowd-sound\n Noise produced by a mixture of sounds from a large group of people.\n \n \n Signal-noise\n Any part of a signal that is not the true or original signal but is introduced by the communication mechanism.\n \n \n \n Musical-sound\n Sound produced by continuous and regular vibrations, as opposed to noise.\n \n Tone\n A musical note, warble, or other sound used as a particular signal on a telephone or answering machine.\n \n \n Instrument-sound\n Sound produced by a musical instrument.\n \n \n Vocalized-sound\n Musical sound produced by vocal cords in a biological agent.\n \n \n \n Named-animal-sound\n A sound recognizable as being associated with particular animals.\n \n Barking\n Sharp explosive cries like sounds made by certain animals, especially a dog, fox, or seal.\n \n \n Bleating\n Wavering cries like sounds made by a sheep, goat, or calf.\n \n \n Crowing\n Loud shrill sounds characteristic of roosters.\n \n \n Chirping\n Short, sharp, high-pitched noises like sounds made by small birds or an insects.\n \n \n Growling\n Low guttural sounds like those that made in the throat by a hostile dog or other animal.\n \n \n Meowing\n Vocalizations like those made by as those cats. These sounds have diverse tones and are sometimes chattered, murmured or whispered. The purpose can be assertive.\n \n \n Mooing\n Deep vocal sounds like those made by a cow.\n \n \n Purring\n Low continuous vibratory sound such as those made by cats. The sound expresses contentment.\n \n \n Roaring\n Loud, deep, or harsh prolonged sounds such as those made by big cats and bears for long-distance communication and intimidation.\n \n \n Squawking\n Loud, harsh noises such as those made by geese.\n \n \n \n Named-object-sound\n A sound identifiable as coming from a particular type of object.\n \n Alarm-sound\n A loud signal often loud continuous ringing to alert people to a problem or condition that requires urgent attention.\n \n \n Beep\n A short, single tone, that is typically high-pitched and generally made by a computer or other machine.\n \n \n Buzz\n A persistent vibratory sound often made by a buzzer device and used to indicate something incorrect.\n \n \n Ka-ching\n The sound made by a mechanical cash register, often to designate a reward.\n \n \n Click\n The sound made by a mechanical cash register, often to designate a reward.\n \n \n Ding\n A short ringing sound such as that made by a bell, often to indicate a correct response or the expiration of time.\n \n \n Horn-blow\n A loud sound made by forcing air through a sound device that funnels air to create the sound, often used to sound an alert.\n \n \n Siren\n A loud, continuous sound often varying in frequency designed to indicate an emergency.\n \n \n \n \n \n Property\n Something that pertains to a thing. A characteristic of some entity. A quality or feature regarded as a characteristic or inherent part of someone or something. HED attributes are adjectives or adverbs.\n \n extensionAllowed\n \n \n Agent-property\n Something that pertains to an agent.\n \n extensionAllowed\n \n \n Agent-state\n The state of the agent.\n \n Agent-cognitive-state\n The state of the cognitive processes or state of mind of the agent.\n \n Alert\n Condition of heightened watchfulness or preparation for action.\n \n \n Anesthetized\n Having lost sensation to pain or having senses dulled due to the effects of an anesthetic.\n \n \n Asleep\n Having entered a periodic, readily reversible state of reduced awareness and metabolic activity, usually accompanied by physical relaxation and brain activity.\n \n \n Attentive\n Concentrating and focusing mental energy on the task or surroundings.\n \n \n Distracted\n Lacking in concentration because of being preoccupied.\n \n \n Awake\n In a non sleeping state.\n \n \n Brain-dead\n Characterized by the irreversible absence of cortical and brain stem functioning.\n \n \n Comatose\n In a state of profound unconsciousness associated with markedly depressed cerebral activity.\n \n \n Drowsy\n In a state of near-sleep, a strong desire for sleep, or sleeping for unusually long periods.\n \n \n Intoxicated\n In a state with disturbed psychophysiological functions and responses as a result of administration or ingestion of a psychoactive substance.\n \n \n Locked-in\n In a state of complete paralysis of all voluntary muscles except for the ones that control the movements of the eyes.\n \n \n Passive\n Not responding or initiating an action in response to a stimulus.\n \n \n Resting\n A state in which the agent is not exhibiting any physical exertion.\n \n \n Vegetative\n A state of wakefulness and conscience, but (in contrast to coma) with involuntary opening of the eyes and movements (such as teeth grinding, yawning, or thrashing of the extremities).\n \n \n \n Agent-emotional-state\n The status of the general temperament and outlook of an agent.\n \n Angry\n Experiencing emotions characterized by marked annoyance or hostility.\n \n \n Aroused\n In a state reactive to stimuli leading to increased heart rate and blood pressure, sensory alertness, mobility and readiness to respond.\n \n \n Awed\n Filled with wonder. Feeling grand, sublime or powerful emotions characterized by a combination of joy, fear, admiration, reverence, and/or respect.\n \n \n Compassionate\n Feeling or showing sympathy and concern for others often evoked for a person who is in distress and associated with altruistic motivation.\n \n \n Content\n Feeling satisfaction with things as they are.\n \n \n Disgusted\n Feeling revulsion or profound disapproval aroused by something unpleasant or offensive.\n \n \n Emotionally-neutral\n Feeling neither satisfied nor dissatisfied.\n \n \n Empathetic\n Understanding and sharing the feelings of another. Being aware of, being sensitive to, and vicariously experiencing the feelings, thoughts, and experience of another.\n \n \n Excited\n Feeling great enthusiasm and eagerness.\n \n \n Fearful\n Feeling apprehension that one may be in danger.\n \n \n Frustrated\n Feeling annoyed as a result of being blocked, thwarted, disappointed or defeated.\n \n \n Grieving\n Feeling sorrow in response to loss, whether physical or abstract.\n \n \n Happy\n Feeling pleased and content.\n \n \n Jealous\n Feeling threatened by a rival in a relationship with another individual, in particular an intimate partner, usually involves feelings of threat, fear, suspicion, distrust, anxiety, anger, betrayal, and rejection.\n \n \n Joyful\n Feeling delight or intense happiness.\n \n \n Loving\n Feeling a strong positive emotion of affection and attraction.\n \n \n Relieved\n No longer feeling pain, distress, anxiety, or reassured.\n \n \n Sad\n Feeling grief or unhappiness.\n \n \n Stressed\n Experiencing mental or emotional strain or tension.\n \n \n \n Agent-physiological-state\n Having to do with the mechanical, physical, or biochemical function of an agent.\n \n Healthy\n Having no significant health-related issues.\n \n relatedTag\n Sick\n \n \n \n Hungry\n Being in a state of craving or desiring food.\n \n relatedTag\n Sated\n Thirsty\n \n \n \n Rested\n Feeling refreshed and relaxed.\n \n relatedTag\n Tired\n \n \n \n Sated\n Feeling full.\n \n relatedTag\n Hungry\n \n \n \n Sick\n Being in a state of ill health, bodily malfunction, or discomfort.\n \n relatedTag\n Healthy\n \n \n \n Thirsty\n Feeling a need to drink.\n \n relatedTag\n Hungry\n \n \n \n Tired\n Feeling in need of sleep or rest.\n \n relatedTag\n Rested\n \n \n \n \n Agent-postural-state\n Pertaining to the position in which agent holds their body.\n \n Crouching\n Adopting a position where the knees are bent and the upper body is brought forward and down, sometimes to avoid detection or to defend oneself.\n \n \n Eyes-closed\n Keeping eyes closed with no blinking.\n \n \n Eyes-open\n Keeping eyes open with occasional blinking.\n \n \n Kneeling\n Positioned where one or both knees are on the ground.\n \n \n On-treadmill\n Ambulation on an exercise apparatus with an endless moving belt to support moving in place.\n \n \n Prone\n Positioned in a recumbent body position whereby the person lies on its stomach and faces downward.\n \n \n Sitting\n In a seated position.\n \n \n Standing\n Assuming or maintaining an erect upright position.\n \n \n Seated-with-chin-rest\n Using a device that supports the chin and head.\n \n \n \n \n Agent-task-role\n The function or part that is ascribed to an agent in performing the task.\n \n Experiment-actor\n An agent who plays a predetermined role to create the experiment scenario.\n \n \n Experiment-controller\n An agent exerting control over some aspect of the experiment.\n \n \n Experiment-participant\n Someone who takes part in an activity related to an experiment.\n \n \n Experimenter\n Person who is the owner of the experiment and has its responsibility.\n \n \n \n Agent-trait\n A genetically, environmentally, or socially determined characteristic of an agent.\n \n Age\n Length of time elapsed time since birth of the agent.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Agent-experience-level\n Amount of skill or knowledge that the agent has as pertains to the task.\n \n Expert-level\n Having comprehensive and authoritative knowledge of or skill in a particular area related to the task.\n \n relatedTag\n Intermediate-experience-level\n Novice-level\n \n \n \n Intermediate-experience-level\n Having a moderate amount of knowledge or skill related to the task.\n \n relatedTag\n Expert-level\n Novice-level\n \n \n \n Novice-level\n Being inexperienced in a field or situation related to the task.\n \n relatedTag\n Expert-level\n Intermediate-experience-level\n \n \n \n \n Gender\n Characteristics that are socially constructed, including norms, behaviors, and roles based on sex.\n \n \n Sex\n Physical properties or qualities by which male is distinguished from female.\n \n Female\n Biological sex of an individual with female sexual organs such ova.\n \n \n Male\n Biological sex of an individual with male sexual organs producing sperm.\n \n \n Intersex\n Having genitalia and/or secondary sexual characteristics of indeterminate sex.\n \n \n \n Handedness\n Individual preference for use of a hand, known as the dominant hand.\n \n Left-handed\n Preference for using the left hand or foot for tasks requiring the use of a single hand or foot.\n \n \n Right-handed\n Preference for using the right hand or foot for tasks requiring the use of a single hand or foot.\n \n \n Ambidextrous\n Having no overall dominance in the use of right or left hand or foot in the performance of tasks that require one hand or foot.\n \n \n \n \n \n Data-property\n Something that pertains to data or information.\n \n extensionAllowed\n \n \n Data-marker\n An indicator placed to mark something.\n \n Data-break-marker\n An indicator place to indicate a gap in the data.\n \n \n Temporal-marker\n An indicator placed at a particular time in the data.\n \n Onset\n Labels the start or beginning of something, usually an event.\n \n topLevelTagGroup\n \n \n \n Offset\n Labels the time at which something stops.\n \n topLevelTagGroup\n \n \n \n Pause\n Indicates the temporary interruption of the operation a process and subsequently wait for a signal to continue.\n \n \n Time-out\n A cancellation or cessation that automatically occurs when a predefined interval of time has passed without a certain event occurring.\n \n \n Time-sync\n A synchronization signal whose purpose to help synchronize different signals or processes. Often used to indicate a marker inserted into the recorded data to allow post hoc synchronization of concurrently recorded data streams.\n \n \n \n \n Data-resolution\n Smallest change in a quality being measured by an sensor that causes a perceptible change.\n \n Printer-resolution\n Resolution of a printer, usually expressed as the number of dots-per-inch for a printer.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Screen-resolution\n Resolution of a screen, usually expressed as the of pixels in a dimension for a digital display device.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Sensory-resolution\n Resolution of measurements by a sensing device.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Spatial-resolution\n Linear spacing of a spatial measurement.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Spectral-resolution\n Measures the ability of a sensor to resolve features in the electromagnetic spectrum.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Temporal-resolution\n Measures the ability of a sensor to resolve features in time.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n \n Data-source-type\n The type of place, person, or thing from which the data comes or can be obtained.\n \n Computed-feature\n A feature computed from the data by a tool. This tag should be grouped with a label of the form Toolname_propertyName.\n \n \n Computed-prediction\n A computed extrapolation of known data.\n \n \n Expert-annotation\n An explanatory or critical comment or other in-context information provided by an authority.\n \n \n Instrument-measurement\n Information obtained from a device that is used to measure material properties or make other observations.\n \n \n Observation\n Active acquisition of information from a primary source. Should be grouped with a label of the form AgentID_featureName.\n \n \n \n Data-value\n Designation of the type of a data item.\n \n Categorical-value\n Indicates that something can take on a limited and usually fixed number of possible values.\n \n Categorical-class-value\n Categorical values that fall into discrete classes such as true or false. The grouping is absolute in the sense that it is the same for all participants.\n \n All\n To a complete degree or to the full or entire extent.\n \n relatedTag\n Some\n None\n \n \n \n Correct\n Free from error. Especially conforming to fact or truth.\n \n relatedTag\n Wrong\n \n \n \n Explicit\n Stated clearly and in detail, leaving no room for confusion or doubt.\n \n relatedTag\n Implicit\n \n \n \n False\n Not in accordance with facts, reality or definitive criteria.\n \n relatedTag\n True\n \n \n \n Implicit\n Implied though not plainly expressed.\n \n relatedTag\n Explicit\n \n \n \n Invalid\n Not allowed or not conforming to the correct format or specifications.\n \n relatedTag\n Valid\n \n \n \n None\n No person or thing, nobody, not any.\n \n relatedTag\n All\n Some\n \n \n \n Some\n At least a small amount or number of, but not a large amount of, or often.\n \n relatedTag\n All\n None\n \n \n \n True\n Conforming to facts, reality or definitive criteria.\n \n relatedTag\n False\n \n \n \n Valid\n Allowable, usable, or acceptable.\n \n relatedTag\n Invalid\n \n \n \n Wrong\n Inaccurate or not correct.\n \n relatedTag\n Correct\n \n \n \n \n Categorical-judgment-value\n Categorical values that are based on the judgment or perception of the participant such familiar and famous.\n \n Abnormal\n Deviating in any way from the state, position, structure, condition, behavior, or rule which is considered a norm.\n \n relatedTag\n Normal\n \n \n \n Asymmetrical\n Lacking symmetry or having parts that fail to correspond to one another in shape, size, or arrangement.\n \n relatedTag\n Symmetrical\n \n \n \n Audible\n A sound that can be perceived by the participant.\n \n relatedTag\n Inaudible\n \n \n \n Congruent\n Concordance of multiple evidence lines. In agreement or harmony.\n \n relatedTag\n Incongruent\n \n \n \n Complex\n Hard, involved or complicated, elaborate, having many parts.\n \n relatedTag\n Simple\n \n \n \n Constrained\n Keeping something within particular limits or bounds.\n \n relatedTag\n Unconstrained\n \n \n \n Disordered\n Not neatly arranged. Confused and untidy. A structural quality in which the parts of an object are non-rigid.\n \n relatedTag\n Ordered\n \n \n \n Familiar\n Recognized, familiar, or within the scope of knowledge.\n \n relatedTag\n Unfamiliar\n Famous\n \n \n \n Famous\n A person who has a high degree of recognition by the general population for his or her success or accomplishments. A famous person.\n \n relatedTag\n Familiar\n Unfamiliar\n \n \n \n Inaudible\n A sound below the threshold of perception of the participant.\n \n relatedTag\n Audible\n \n \n \n Incongruent\n Not in agreement or harmony.\n \n relatedTag\n Congruent\n \n \n \n Involuntary\n An action that is not made by choice. In the body, involuntary actions (such as blushing) occur automatically, and cannot be controlled by choice.\n \n relatedTag\n Voluntary\n \n \n \n Masked\n Information exists but is not provided or is partially obscured due to security, privacy, or other concerns.\n \n relatedTag\n Unmasked\n \n \n \n Normal\n Being approximately average or within certain limits. Conforming with or constituting a norm or standard or level or type or social norm.\n \n relatedTag\n Abnormal\n \n \n \n Ordered\n Conforming to a logical or comprehensible arrangement of separate elements.\n \n relatedTag\n Disordered\n \n \n \n Simple\n Easily understood or presenting no difficulties.\n \n relatedTag\n Complex\n \n \n \n Symmetrical\n Made up of exactly similar parts facing each other or around an axis. Showing aspects of symmetry.\n \n relatedTag\n Asymmetrical\n \n \n \n Unconstrained\n Moving without restriction.\n \n relatedTag\n Constrained\n \n \n \n Unfamiliar\n Not having knowledge or experience of.\n \n relatedTag\n Familiar\n Famous\n \n \n \n Unmasked\n Information is revealed.\n \n relatedTag\n Masked\n \n \n \n Voluntary\n Using free will or design; not forced or compelled; controlled by individual volition.\n \n relatedTag\n Involuntary\n \n \n \n \n Categorical-level-value\n Categorical values based on dividing a continuous variable into levels such as high and low.\n \n Cold\n Having an absence of heat.\n \n relatedTag\n Hot\n \n \n \n Deep\n Extending relatively far inward or downward.\n \n relatedTag\n Shallow\n \n \n \n High\n Having a greater than normal degree, intensity, or amount.\n \n relatedTag\n Low\n Medium\n \n \n \n Hot\n Having an excess of heat.\n \n relatedTag\n Cold\n \n \n \n Large\n Having a great extent such as in physical dimensions, period of time, amplitude or frequency.\n \n relatedTag\n Small\n \n \n \n Liminal\n Situated at a sensory threshold that is barely perceptible or capable of eliciting a response.\n \n relatedTag\n Subliminal\n Supraliminal\n \n \n \n Loud\n Having a perceived high intensity of sound.\n \n relatedTag\n Quiet\n \n \n \n Low\n Less than normal in degree, intensity or amount.\n \n relatedTag\n High\n \n \n \n Medium\n Mid-way between small and large in number, quantity, magnitude or extent.\n \n relatedTag\n Low\n High\n \n \n \n Negative\n Involving disadvantage or harm.\n \n relatedTag\n Positive\n \n \n \n Positive\n Involving advantage or good.\n \n relatedTag\n Negative\n \n \n \n Quiet\n Characterizing a perceived low intensity of sound.\n \n relatedTag\n Loud\n \n \n \n Rough\n Having a surface with perceptible bumps, ridges, or irregularities.\n \n relatedTag\n Smooth\n \n \n \n Shallow\n Having a depth which is relatively low.\n \n relatedTag\n Deep\n \n \n \n Small\n Having a small extent such as in physical dimensions, period of time, amplitude or frequency.\n \n relatedTag\n Large\n \n \n \n Smooth\n Having a surface free from bumps, ridges, or irregularities.\n \n relatedTag\n Rough\n \n \n \n Subliminal\n Situated below a sensory threshold that is imperceptible or not capable of eliciting a response.\n \n relatedTag\n Liminal\n Supraliminal\n \n \n \n Supraliminal\n Situated above a sensory threshold that is perceptible or capable of eliciting a response.\n \n relatedTag\n Liminal\n Subliminal\n \n \n \n Thick\n Wide in width, extent or cross-section.\n \n relatedTag\n Thin\n \n \n \n Thin\n Narrow in width, extent or cross-section.\n \n relatedTag\n Thick\n \n \n \n \n Categorical-orientation-value\n Value indicating the orientation or direction of something.\n \n Backward\n Directed behind or to the rear.\n \n relatedTag\n Forward\n \n \n \n Downward\n Moving or leading toward a lower place or level.\n \n relatedTag\n Leftward\n Rightward\n Upward\n \n \n \n Forward\n At or near or directed toward the front.\n \n relatedTag\n Backward\n \n \n \n Horizontally-oriented\n Oriented parallel to or in the plane of the horizon.\n \n relatedTag\n Vertically-oriented\n \n \n \n Leftward\n Going toward or facing the left.\n \n relatedTag\n Downward\n Rightward\n Upward\n \n \n \n Oblique\n Slanting or inclined in direction, course, or position that is neither parallel nor perpendicular nor right-angular.\n \n relatedTag\n Rotated\n \n \n \n Rightward\n Going toward or situated on the right.\n \n relatedTag\n Downward\n Leftward\n Upward\n \n \n \n Rotated\n Positioned offset around an axis or center.\n \n \n Upward\n Moving, pointing, or leading to a higher place, point, or level.\n \n relatedTag\n Downward\n Leftward\n Rightward\n \n \n \n Vertically-oriented\n Oriented perpendicular to the plane of the horizon.\n \n relatedTag\n Horizontally-oriented\n \n \n \n \n \n Physical-value\n The value of some physical property of something.\n \n Weight\n The relative mass or the quantity of matter contained by something.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n weightUnits\n \n \n \n \n Temperature\n A measure of hot or cold based on the average kinetic energy of the atoms or molecules in the system.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n temperatureUnits\n \n \n \n \n \n Quantitative-value\n Something capable of being estimated or expressed with numeric values.\n \n Fraction\n A numerical value between 0 and 1.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Item-count\n The integer count of something which is usually grouped with the entity it is counting. (Item-count/3, A) indicates that 3 of A have occurred up to this point.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Item-index\n The index of an item in a collection, sequence or other structure. (A (Item-index/3, B)) means that A is item number 3 in B.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Item-interval\n An integer indicating how many items or entities have passed since the last one of these. An item interval of 0 indicates the current item.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Percentage\n A fraction or ratio with 100 understood as the denominator.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Ratio\n A quotient of quantities of the same kind for different components within the same system.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n \n Statistical-value\n A value based on or employing the principles of statistics.\n \n extensionAllowed\n \n \n Data-maximum\n The largest possible quantity or degree.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Data-mean\n The sum of a set of values divided by the number of values in the set.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Data-median\n The value which has an equal number of values greater and less than it.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Data-minimum\n The smallest possible quantity.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Probability\n A measure of the expectation of the occurrence of a particular event.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Standard-deviation\n A measure of the range of values in a set of numbers. Standard deviation is a statistic used as a measure of the dispersion or variation in a distribution, equal to the square root of the arithmetic mean of the squares of the deviations from the arithmetic mean.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Statistical-accuracy\n A measure of closeness to true value expressed as a number between 0 and 1.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Statistical-precision\n A quantitative representation of the degree of accuracy necessary for or associated with a particular action.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Statistical-recall\n Sensitivity is a measurement datum qualifying a binary classification test and is computed by substracting the false negative rate to the integral numeral 1.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Statistical-uncertainty\n A measure of the inherent variability of repeated observation measurements of a quantity including quantities evaluated by statistical methods and by other means.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n \n Spatiotemporal-value\n A property relating to space and/or time.\n \n Rate-of-change\n The amount of change accumulated per unit time.\n \n Acceleration\n Magnitude of the rate of change in either speed or direction. The direction of change should be given separately.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n accelerationUnits\n \n \n \n \n Frequency\n Frequency is the number of occurrences of a repeating event per unit time.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n frequencyUnits\n \n \n \n \n Jerk-rate\n Magnitude of the rate at which the acceleration of an object changes with respect to time. The direction of change should be given separately.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n jerkUnits\n \n \n \n \n Sampling-rate\n The number of digital samples taken or recorded per unit of time.\n \n #\n \n takesValue\n \n \n unitClass\n frequencyUnits\n \n \n \n \n Refresh-rate\n The frequency with which the image on a computer monitor or similar electronic display screen is refreshed, usually expressed in hertz.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Speed\n A scalar measure of the rate of movement of the object expressed either as the distance travelled divided by the time taken (average speed) or the rate of change of position with respect to time at a particular point (instantaneous speed). The direction of change should be given separately.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n speedUnits\n \n \n \n \n Temporal-rate\n The number of items per unit of time.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n frequencyUnits\n \n \n \n \n \n Spatial-value\n Value of an item involving space.\n \n Angle\n The amount of inclination of one line to another or the plane of one object to another.\n \n #\n \n takesValue\n \n \n unitClass\n angleUnits\n \n \n valueClass\n numericClass\n \n \n \n \n Distance\n A measure of the space separating two objects or points.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n physicalLengthUnits\n \n \n \n \n Position\n A reference to the alignment of an object, a particular situation or view of a situation, or the location of an object. Coordinates with respect a specified frame of reference or the default Screen-frame if no frame is given.\n \n X-position\n The position along the x-axis of the frame of reference.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n physicalLengthUnits\n \n \n \n \n Y-position\n The position along the y-axis of the frame of reference.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n physicalLengthUnits\n \n \n \n \n Z-position\n The position along the z-axis of the frame of reference.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n physicalLengthUnits\n \n \n \n \n \n Size\n The physical magnitude of something.\n \n Area\n The extent of a 2-dimensional surface enclosed within a boundary.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n areaUnits\n \n \n \n \n Depth\n The distance from the surface of something especially from the perspective of looking from the front.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n physicalLengthUnits\n \n \n \n \n Length\n The linear extent in space from one end of something to the other end, or the extent of something from beginning to end.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n physicalLengthUnits\n \n \n \n \n Width\n The extent or measurement of something from side to side.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n physicalLengthUnits\n \n \n \n \n Height\n The vertical measurement or distance from the base to the top of an object.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n physicalLengthUnits\n \n \n \n \n Volume\n The amount of three dimensional space occupied by an object or the capacity of a space or container.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n volumeUnits\n \n \n \n \n \n \n Temporal-value\n A characteristic of or relating to time or limited by time.\n \n Delay\n Time during which some action is awaited.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n timeUnits\n \n \n \n \n Duration\n The period of time during which something occurs or continues.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n timeUnits\n \n \n \n \n Time-interval\n The period of time separating two instances, events, or occurrences.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n timeUnits\n \n \n \n \n Time-value\n A value with units of time. Usually grouped with tags identifying what the value represents.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n timeUnits\n \n \n \n \n \n \n \n Data-variability-attribute\n An attribute describing how something changes or varies.\n \n Abrupt\n Marked by sudden change.\n \n \n Constant\n Continually recurring or continuing without interruption. Not changing in time or space.\n \n \n Continuous\n Uninterrupted in time, sequence, substance, or extent.\n \n relatedTag\n Discrete\n Discontinuous\n \n \n \n Decreasing\n Becoming smaller or fewer in size, amount, intensity, or degree.\n \n relatedTag\n Increasing\n \n \n \n Deterministic\n No randomness is involved in the development of the future states of the element.\n \n relatedTag\n Random\n Stochastic\n \n \n \n Discontinuous\n Having a gap in time, sequence, substance, or extent.\n \n relatedTag\n Continuous\n \n \n \n Discrete\n Constituting a separate entities or parts.\n \n relatedTag\n Continuous\n Discontinuous\n \n \n \n Flickering\n Moving irregularly or unsteadily or burning or shining fitfully or with a fluctuating light.\n \n \n Estimated-value\n Something that has been calculated or measured approximately.\n \n \n Exact-value\n A value that is viewed to the true value according to some standard.\n \n \n Fractal\n Having extremely irregular curves or shapes for which any suitably chosen part is similar in shape to a given larger or smaller part when magnified or reduced to the same size.\n \n \n Increasing\n Becoming greater in size, amount, or degree.\n \n relatedTag\n Decreasing\n \n \n \n Random\n Governed by or depending on chance. Lacking any definite plan or order or purpose.\n \n relatedTag\n Deterministic\n Stochastic\n \n \n \n Repetitive\n A recurring action that is often non-purposeful.\n \n \n Stochastic\n Uses a random probability distribution or pattern that may be analysed statistically but may not be predicted precisely to determine future states.\n \n relatedTag\n Deterministic\n Random\n \n \n \n Varying\n Differing in size, amount, degree, or nature.\n \n \n \n \n Environmental-property\n Relating to or arising from the surroundings of an agent.\n \n Indoors\n Located inside a building or enclosure.\n \n \n Outdoors\n Any area outside a building or shelter.\n \n \n Real-world\n Located in a place that exists in real space and time under realistic conditions.\n \n \n Virtual-world\n Using technology that creates immersive, computer-generated experiences that a person can interact with and navigate through. The digital content is generally delivered to the user through some type of headset and responds to changes in head position or through interaction with other types of sensors. Existing in a virtual setting such as a simulation or game environment.\n \n \n Augmented-reality\n Using technology that enhances real-world experiences with computer-derived digital overlays to change some aspects of perception of the natural environment. The digital content is shown to the user through a smart device or glasses and responds to changes in the environment.\n \n \n Motion-platform\n A mechanism that creates the feelings of being in a real motion environment.\n \n \n Urban\n Relating to, located in, or characteristic of a city or densely populated area.\n \n \n Rural\n Of or pertaining to the country as opposed to the city.\n \n \n Terrain\n Characterization of the physical features of a tract of land.\n \n Composite-terrain\n Tracts of land characterized by a mixure of physical features.\n \n \n Dirt-terrain\n Tracts of land characterized by a soil surface and lack of vegetation.\n \n \n Grassy-terrain\n Tracts of land covered by grass.\n \n \n Gravel-terrain\n Tracts of land covered by a surface consisting a loose aggregation of small water-worn or pounded stones.\n \n \n Leaf-covered-terrain\n Tracts of land covered by leaves and composited organic material.\n \n \n Muddy-terrain\n Tracts of land covered by a liquid or semi-liquid mixture of water and some combination of soil, silt, and clay.\n \n \n Paved-terrain\n Tracts of land covered with concrete, asphalt, stones, or bricks.\n \n \n Rocky-terrain\n Tracts of land consisting or full of rock or rocks.\n \n \n Sloped-terrain\n Tracts of land arranged in a sloping or inclined position.\n \n \n Uneven-terrain\n Tracts of land that are not level, smooth, or regular.\n \n \n \n \n Informational-property\n Something that pertains to a task.\n \n extensionAllowed\n \n \n Description\n An explanation of what the tag group it is in means. If the description is at the top-level of an event string, the description applies to the event.\n \n requireChild\n \n \n #\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n ID\n An alphanumeric name that identifies either a unique object or a unique class of objects. Here the object or class may be an idea, physical countable object (or class), or physical uncountable substance (or class).\n \n requireChild\n \n \n #\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Label\n A string of 20 or fewer characters identifying something. Labels usually refer to general classes of things while IDs refer to specific instances. A term that is associated with some entity. A brief description given for purposes of identification. An identifying or descriptive marker that is attached to an object.\n \n requireChild\n \n \n #\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Metadata\n Data about data. Information that describes another set of data.\n \n CogAtlas\n The Cognitive Atlas ID number of something.\n \n #\n \n takesValue\n \n \n \n \n CogPo\n The CogPO ID number of something.\n \n #\n \n takesValue\n \n \n \n \n Creation-date\n The date on which data creation of this element began.\n \n requireChild\n \n \n #\n \n takesValue\n \n \n valueClass\n dateTimeClass\n \n \n \n \n Experimental-note\n A brief written record about the experiment.\n \n #\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Library-name\n Official name of a HED library.\n \n #\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n OBO-identifier\n The identifier of a term in some Open Biology Ontology (OBO) ontology.\n \n #\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Pathname\n The specification of a node (file or directory) in a hierarchical file system, usually specified by listing the nodes top-down.\n \n #\n \n takesValue\n \n \n \n \n Subject-identifier\n A sequence of characters used to identify, name, or characterize a trial or study subject.\n \n #\n \n takesValue\n \n \n \n \n Version-identifier\n An alphanumeric character string that identifies a form or variant of a type or original.\n \n #\n Usually is a semantic version.\n \n takesValue\n \n \n \n \n \n Parameter\n Something user-defined for this experiment.\n \n Parameter-label\n The name of the parameter.\n \n #\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Parameter-value\n The value of the parameter.\n \n #\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n \n Organizational-property\n Relating to an organization or the action of organizing something.\n \n Collection\n A tag designating a grouping of items such as in a set or list.\n \n #\n Name of the collection.\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Condition-variable\n An aspect of the experiment or task that is to be varied during the experiment. Task-conditions are sometimes called independent variables or contrasts.\n \n #\n Name of the condition variable.\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Control-variable\n An aspect of the experiment that is fixed throughout the study and usually is explicitly controlled.\n \n #\n Name of the control variable.\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Def\n A HED-specific utility tag used with a defined name to represent the tags associated with that definition.\n \n requireChild\n \n \n #\n Name of the definition.\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Def-expand\n A HED specific utility tag that is grouped with an expanded definition. The child value of the Def-expand is the name of the expanded definition.\n \n requireChild\n \n \n tagGroup\n \n \n #\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Definition\n A HED-specific utility tag whose child value is the name of the concept and the tag group associated with the tag is an English language explanation of a concept.\n \n requireChild\n \n \n topLevelTagGroup\n \n \n #\n Name of the definition.\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Event-context\n A special HED tag inserted as part of a top-level tag group to contain information about the interrelated conditions under which the event occurs. The event context includes information about other events that are ongoing when this event happens.\n \n topLevelTagGroup\n \n \n unique\n \n \n \n Event-stream\n A special HED tag indicating that this event is a member of an ordered succession of events.\n \n #\n Name of the event stream.\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Experimental-intertrial\n A tag used to indicate a part of the experiment between trials usually where nothing is happening.\n \n #\n Optional label for the intertrial block.\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Experimental-trial\n Designates a run or execution of an activity, for example, one execution of a script. A tag used to indicate a particular organizational part in the experimental design often containing a stimulus-response pair or stimulus-response-feedback triad.\n \n #\n Optional label for the trial (often a numerical string).\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Indicator-variable\n An aspect of the experiment or task that is measured as task conditions are varied during the experiment. Experiment indicators are sometimes called dependent variables.\n \n #\n Name of the indicator variable.\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Recording\n A tag designating the data recording. Recording tags are usually have temporal scope which is the entire recording.\n \n #\n Optional label for the recording.\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Task\n An assigned piece of work, usually with a time allotment. A tag used to indicate a linkage the structured activities performed as part of the experiment.\n \n #\n Optional label for the task block.\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Time-block\n A tag used to indicate a contiguous time block in the experiment during which something is fixed or noted.\n \n #\n Optional label for the task block.\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n \n Sensory-property\n Relating to sensation or the physical senses.\n \n Sensory-attribute\n A sensory characteristic associated with another entity.\n \n Auditory-attribute\n Pertaining to the sense of hearing.\n \n Loudness\n Perceived intensity of a sound.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n nameClass\n \n \n \n \n Pitch\n A perceptual property that allows the user to order sounds on a frequency scale.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n frequencyUnits\n \n \n \n \n Sound-envelope\n Description of how a sound changes over time.\n \n Sound-envelope-attack\n The time taken for initial run-up of level from nil to peak usually beginning when the key on a musical instrument is pressed.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n timeUnits\n \n \n \n \n Sound-envelope-decay\n The time taken for the subsequent run down from the attack level to the designated sustain level.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n timeUnits\n \n \n \n \n Sound-envelope-release\n The time taken for the level to decay from the sustain level to zero after the key is released.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n timeUnits\n \n \n \n \n Sound-envelope-sustain\n The time taken for the main sequence of the sound duration, until the key is released.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n timeUnits\n \n \n \n \n \n Timbre\n The perceived sound quality of a singing voice or musical instrument.\n \n #\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Sound-volume\n The sound pressure level (SPL) usually the ratio to a reference signal estimated as the lower bound of hearing.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n intensityUnits\n \n \n \n \n \n Gustatory-attribute\n Pertaining to the sense of taste.\n \n Bitter\n Having a sharp, pungent taste.\n \n \n Salty\n Tasting of or like salt.\n \n \n Savory\n Belonging to a taste that is salty or spicy rather than sweet.\n \n \n Sour\n Having a sharp, acidic taste.\n \n \n Sweet\n Having or resembling the taste of sugar.\n \n \n \n Olfactory-attribute\n Having a smell.\n \n \n Somatic-attribute\n Pertaining to the feelings in the body or of the nervous system.\n \n Pain\n The sensation of discomfort, distress, or agony, resulting from the stimulation of specialized nerve endings.\n \n \n Stress\n The negative mental, emotional, and physical reactions that occur when environmental stressors are perceived as exceeding the adaptive capacities of the individual.\n \n \n \n Tactile-attribute\n Pertaining to the sense of touch.\n \n Tactile-pressure\n Having a feeling of heaviness.\n \n \n Tactile-temperature\n Having a feeling of hotness or coldness.\n \n \n Tactile-texture\n Having a feeling of roughness.\n \n \n Tactile-vibration\n Having a feeling of mechanical oscillation.\n \n \n \n Vestibular-attribute\n Pertaining to the sense of balance or body position.\n \n \n Visual-attribute\n Pertaining to the sense of sight.\n \n Color\n The appearance of objects (or light sources) described in terms of perception of their hue and lightness (or brightness) and saturation.\n \n CSS-color\n One of 140 colors supported by all browsers. For more details such as the color RGB or HEX values, check: https://www.w3schools.com/colors/colors_groups.asp.\n \n Blue-color\n CSS color group.\n \n CadetBlue\n CSS-color 0x5F9EA0.\n \n \n SteelBlue\n CSS-color 0x4682B4.\n \n \n LightSteelBlue\n CSS-color 0xB0C4DE.\n \n \n LightBlue\n CSS-color 0xADD8E6.\n \n \n PowderBlue\n CSS-color 0xB0E0E6.\n \n \n LightSkyBlue\n CSS-color 0x87CEFA.\n \n \n SkyBlue\n CSS-color 0x87CEEB.\n \n \n CornflowerBlue\n CSS-color 0x6495ED.\n \n \n DeepSkyBlue\n CSS-color 0x00BFFF.\n \n \n DodgerBlue\n CSS-color 0x1E90FF.\n \n \n RoyalBlue\n CSS-color 0x4169E1.\n \n \n Blue\n CSS-color 0x0000FF.\n \n \n MediumBlue\n CSS-color 0x0000CD.\n \n \n DarkBlue\n CSS-color 0x00008B.\n \n \n Navy\n CSS-color 0x000080.\n \n \n MidnightBlue\n CSS-color 0x191970.\n \n \n \n Brown-color\n CSS color group.\n \n Cornsilk\n CSS-color 0xFFF8DC.\n \n \n BlanchedAlmond\n CSS-color 0xFFEBCD.\n \n \n Bisque\n CSS-color 0xFFE4C4.\n \n \n NavajoWhite\n CSS-color 0xFFDEAD.\n \n \n Wheat\n CSS-color 0xF5DEB3.\n \n \n BurlyWood\n CSS-color 0xDEB887.\n \n \n Tan\n CSS-color 0xD2B48C.\n \n \n RosyBrown\n CSS-color 0xBC8F8F.\n \n \n SandyBrown\n CSS-color 0xF4A460.\n \n \n GoldenRod\n CSS-color 0xDAA520.\n \n \n DarkGoldenRod\n CSS-color 0xB8860B.\n \n \n Peru\n CSS-color 0xCD853F.\n \n \n Chocolate\n CSS-color 0xD2691E.\n \n \n Olive\n CSS-color 0x808000.\n \n \n SaddleBrown\n CSS-color 0x8B4513.\n \n \n Sienna\n CSS-color 0xA0522D.\n \n \n Brown\n CSS-color 0xA52A2A.\n \n \n Maroon\n CSS-color 0x800000.\n \n \n \n Cyan-color\n CSS color group.\n \n Aqua\n CSS-color 0x00FFFF.\n \n \n Cyan\n CSS-color 0x00FFFF.\n \n \n LightCyan\n CSS-color 0xE0FFFF.\n \n \n PaleTurquoise\n CSS-color 0xAFEEEE.\n \n \n Aquamarine\n CSS-color 0x7FFFD4.\n \n \n Turquoise\n CSS-color 0x40E0D0.\n \n \n MediumTurquoise\n CSS-color 0x48D1CC.\n \n \n DarkTurquoise\n CSS-color 0x00CED1.\n \n \n \n Green-color\n CSS color group.\n \n GreenYellow\n CSS-color 0xADFF2F.\n \n \n Chartreuse\n CSS-color 0x7FFF00.\n \n \n LawnGreen\n CSS-color 0x7CFC00.\n \n \n Lime\n CSS-color 0x00FF00.\n \n \n LimeGreen\n CSS-color 0x32CD32.\n \n \n PaleGreen\n CSS-color 0x98FB98.\n \n \n LightGreen\n CSS-color 0x90EE90.\n \n \n MediumSpringGreen\n CSS-color 0x00FA9A.\n \n \n SpringGreen\n CSS-color 0x00FF7F.\n \n \n MediumSeaGreen\n CSS-color 0x3CB371.\n \n \n SeaGreen\n CSS-color 0x2E8B57.\n \n \n ForestGreen\n CSS-color 0x228B22.\n \n \n Green\n CSS-color 0x008000.\n \n \n DarkGreen\n CSS-color 0x006400.\n \n \n YellowGreen\n CSS-color 0x9ACD32.\n \n \n OliveDrab\n CSS-color 0x6B8E23.\n \n \n DarkOliveGreen\n CSS-color 0x556B2F.\n \n \n MediumAquaMarine\n CSS-color 0x66CDAA.\n \n \n DarkSeaGreen\n CSS-color 0x8FBC8F.\n \n \n LightSeaGreen\n CSS-color 0x20B2AA.\n \n \n DarkCyan\n CSS-color 0x008B8B.\n \n \n Teal\n CSS-color 0x008080.\n \n \n \n Gray-color\n CSS color group.\n \n Gainsboro\n CSS-color 0xDCDCDC.\n \n \n LightGray\n CSS-color 0xD3D3D3.\n \n \n Silver\n CSS-color 0xC0C0C0.\n \n \n DarkGray\n CSS-color 0xA9A9A9.\n \n \n DimGray\n CSS-color 0x696969.\n \n \n Gray\n CSS-color 0x808080.\n \n \n LightSlateGray\n CSS-color 0x778899.\n \n \n SlateGray\n CSS-color 0x708090.\n \n \n DarkSlateGray\n CSS-color 0x2F4F4F.\n \n \n Black\n CSS-color 0x000000.\n \n \n \n Orange-color\n CSS color group.\n \n Orange\n CSS-color 0xFFA500.\n \n \n DarkOrange\n CSS-color 0xFF8C00.\n \n \n Coral\n CSS-color 0xFF7F50.\n \n \n Tomato\n CSS-color 0xFF6347.\n \n \n OrangeRed\n CSS-color 0xFF4500.\n \n \n \n Pink-color\n CSS color group.\n \n Pink\n CSS-color 0xFFC0CB.\n \n \n LightPink\n CSS-color 0xFFB6C1.\n \n \n HotPink\n CSS-color 0xFF69B4.\n \n \n DeepPink\n CSS-color 0xFF1493.\n \n \n PaleVioletRed\n CSS-color 0xDB7093.\n \n \n MediumVioletRed\n CSS-color 0xC71585.\n \n \n \n Purple-color\n CSS color group.\n \n Lavender\n CSS-color 0xE6E6FA.\n \n \n Thistle\n CSS-color 0xD8BFD8.\n \n \n Plum\n CSS-color 0xDDA0DD.\n \n \n Orchid\n CSS-color 0xDA70D6.\n \n \n Violet\n CSS-color 0xEE82EE.\n \n \n Fuchsia\n CSS-color 0xFF00FF.\n \n \n Magenta\n CSS-color 0xFF00FF.\n \n \n MediumOrchid\n CSS-color 0xBA55D3.\n \n \n DarkOrchid\n CSS-color 0x9932CC.\n \n \n DarkViolet\n CSS-color 0x9400D3.\n \n \n BlueViolet\n CSS-color 0x8A2BE2.\n \n \n DarkMagenta\n CSS-color 0x8B008B.\n \n \n Purple\n CSS-color 0x800080.\n \n \n MediumPurple\n CSS-color 0x9370DB.\n \n \n MediumSlateBlue\n CSS-color 0x7B68EE.\n \n \n SlateBlue\n CSS-color 0x6A5ACD.\n \n \n DarkSlateBlue\n CSS-color 0x483D8B.\n \n \n RebeccaPurple\n CSS-color 0x663399.\n \n \n Indigo\n CSS-color 0x4B0082.\n \n \n \n Red-color\n CSS color group.\n \n LightSalmon\n CSS-color 0xFFA07A.\n \n \n Salmon\n CSS-color 0xFA8072.\n \n \n DarkSalmon\n CSS-color 0xE9967A.\n \n \n LightCoral\n CSS-color 0xF08080.\n \n \n IndianRed\n CSS-color 0xCD5C5C.\n \n \n Crimson\n CSS-color 0xDC143C.\n \n \n Red\n CSS-color 0xFF0000.\n \n \n FireBrick\n CSS-color 0xB22222.\n \n \n DarkRed\n CSS-color 0x8B0000.\n \n \n \n Yellow-color\n CSS color group.\n \n Gold\n CSS-color 0xFFD700.\n \n \n Yellow\n CSS-color 0xFFFF00.\n \n \n LightYellow\n CSS-color 0xFFFFE0.\n \n \n LemonChiffon\n CSS-color 0xFFFACD.\n \n \n LightGoldenRodYellow\n CSS-color 0xFAFAD2.\n \n \n PapayaWhip\n CSS-color 0xFFEFD5.\n \n \n Moccasin\n CSS-color 0xFFE4B5.\n \n \n PeachPuff\n CSS-color 0xFFDAB9.\n \n \n PaleGoldenRod\n CSS-color 0xEEE8AA.\n \n \n Khaki\n CSS-color 0xF0E68C.\n \n \n DarkKhaki\n CSS-color 0xBDB76B.\n \n \n \n White-color\n CSS color group.\n \n White\n CSS-color 0xFFFFFF.\n \n \n Snow\n CSS-color 0xFFFAFA.\n \n \n HoneyDew\n CSS-color 0xF0FFF0.\n \n \n MintCream\n CSS-color 0xF5FFFA.\n \n \n Azure\n CSS-color 0xF0FFFF.\n \n \n AliceBlue\n CSS-color 0xF0F8FF.\n \n \n GhostWhite\n CSS-color 0xF8F8FF.\n \n \n WhiteSmoke\n CSS-color 0xF5F5F5.\n \n \n SeaShell\n CSS-color 0xFFF5EE.\n \n \n Beige\n CSS-color 0xF5F5DC.\n \n \n OldLace\n CSS-color 0xFDF5E6.\n \n \n FloralWhite\n CSS-color 0xFFFAF0.\n \n \n Ivory\n CSS-color 0xFFFFF0.\n \n \n AntiqueWhite\n CSS-color 0xFAEBD7.\n \n \n Linen\n CSS-color 0xFAF0E6.\n \n \n LavenderBlush\n CSS-color 0xFFF0F5.\n \n \n MistyRose\n CSS-color 0xFFE4E1.\n \n \n \n \n Color-shade\n A slight degree of difference between colors, especially with regard to how light or dark it is or as distinguished from one nearly like it.\n \n Dark-shade\n A color tone not reflecting much light.\n \n \n Light-shade\n A color tone reflecting more light.\n \n \n \n Grayscale\n Using a color map composed of shades of gray, varying from black at the weakest intensity to white at the strongest.\n \n #\n White intensity between 0 and 1.\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n HSV-color\n A color representation that models how colors appear under light.\n \n Hue\n Attribute of a visual sensation according to which an area appears to be similar to one of the perceived colors.\n \n #\n Angular value between 0 and 360.\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Saturation\n Colorfulness of a stimulus relative to its own brightness.\n \n #\n B value of RGB between 0 and 1.\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n HSV-value\n An attribute of a visual sensation according to which an area appears to emit more or less light.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n \n RGB-color\n A color from the RGB schema.\n \n RGB-red\n The red component.\n \n #\n R value of RGB between 0 and 1.\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n RGB-blue\n The blue component.\n \n #\n B value of RGB between 0 and 1.\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n RGB-green\n The green component.\n \n #\n G value of RGB between 0 and 1.\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n \n \n Luminance\n A quality that exists by virtue of the luminous intensity per unit area projected in a given direction.\n \n \n Opacity\n A measure of impenetrability to light.\n \n \n \n \n Sensory-presentation\n The entity has a sensory manifestation.\n \n Auditory-presentation\n The sense of hearing is used in the presentation to the user.\n \n Loudspeaker-separation\n The distance between two loudspeakers. Grouped with the Distance tag.\n \n suggestedTag\n Distance\n \n \n \n Monophonic\n Relating to sound transmission, recording, or reproduction involving a single transmission path.\n \n \n Silent\n The absence of ambient audible sound or the state of having ceased to produce sounds.\n \n \n Stereophonic\n Relating to, or constituting sound reproduction involving the use of separated microphones and two transmission channels to achieve the sound separation of a live hearing.\n \n \n \n Gustatory-presentation\n The sense of taste used in the presentation to the user.\n \n \n Olfactory-presentation\n The sense of smell used in the presentation to the user.\n \n \n Somatic-presentation\n The nervous system is used in the presentation to the user.\n \n \n Tactile-presentation\n The sense of touch used in the presentation to the user.\n \n \n Vestibular-presentation\n The sense balance used in the presentation to the user.\n \n \n Visual-presentation\n The sense of sight used in the presentation to the user.\n \n 2D-view\n A view showing only two dimensions.\n \n \n 3D-view\n A view showing three dimensions.\n \n \n Background-view\n Parts of the view that are farthest from the viewer and usually the not part of the visual focus.\n \n \n Bistable-view\n Something having two stable visual forms that have two distinguishable stable forms as in optical illusions.\n \n \n Foreground-view\n Parts of the view that are closest to the viewer and usually the most important part of the visual focus.\n \n \n Foveal-view\n Visual presentation directly on the fovea. A view projected on the small depression in the retina containing only cones and where vision is most acute.\n \n \n Map-view\n A diagrammatic representation of an area of land or sea showing physical features, cities, roads.\n \n Aerial-view\n Elevated view of an object from above, with a perspective as though the observer were a bird.\n \n \n Satellite-view\n A representation as captured by technology such as a satellite.\n \n \n Street-view\n A 360-degrees panoramic view from a position on the ground.\n \n \n \n Peripheral-view\n Indirect vision as it occurs outside the point of fixation.\n \n \n \n \n \n Task-property\n Something that pertains to a task.\n \n extensionAllowed\n \n \n Task-attentional-demand\n Strategy for allocating attention toward goal-relevant information.\n \n Bottom-up-attention\n Attentional guidance purely by externally driven factors to stimuli that are salient because of their inherent properties relative to the background. Sometimes this is referred to as stimulus driven.\n \n relatedTag\n Top-down-attention\n \n \n \n Covert-attention\n Paying attention without moving the eyes.\n \n relatedTag\n Overt-attention\n \n \n \n Divided-attention\n Integrating parallel multiple stimuli. Behavior involving responding simultaneously to multiple tasks or multiple task demands.\n \n relatedTag\n Focused-attention\n \n \n \n Focused-attention\n Responding discretely to specific visual, auditory, or tactile stimuli.\n \n relatedTag\n Divided-attention\n \n \n \n Orienting-attention\n Directing attention to a target stimulus.\n \n \n Overt-attention\n Selectively processing one location over others by moving the eyes to point at that location.\n \n relatedTag\n Covert-attention\n \n \n \n Selective-attention\n Maintaining a behavioral or cognitive set in the face of distracting or competing stimuli. Ability to pay attention to a limited array of all available sensory information.\n \n \n Sustained-attention\n Maintaining a consistent behavioral response during continuous and repetitive activity.\n \n \n Switched-attention\n Having to switch attention between two or more modalities of presentation.\n \n \n Top-down-attention\n Voluntary allocation of attention to certain features. Sometimes this is referred to goal-oriented attention.\n \n relatedTag\n Bottom-up-attention\n \n \n \n \n Task-effect-evidence\n The evidence supporting the conclusion that the event had the specified effect.\n \n Computational-evidence\n A type of evidence in which data are produced, and/or generated, and/or analyzed on a computer.\n \n \n External-evidence\n A phenomenon that follows and is caused by some previous phenomenon.\n \n \n Intended-effect\n A phenomenon that is intended to follow and be caused by some previous phenomenon.\n \n \n Behavioral-evidence\n An indication or conclusion based on the behavior of an agent.\n \n \n \n Task-event-role\n The purpose of an event with respect to the task.\n \n Experimental-stimulus\n Part of something designed to elicit a response in the experiment.\n \n \n Incidental\n A sensory or other type of event that is unrelated to the task or experiment.\n \n \n Instructional\n Usually associated with a sensory event intended to give instructions to the participant about the task or behavior.\n \n \n Mishap\n Unplanned disruption such as an equipment or experiment control abnormality or experimenter error.\n \n \n Participant-response\n Something related to a participant actions in performing the task.\n \n \n Task-activity\n Something that is part of the overall task or is necessary to the overall experiment but is not directly part of a stimulus-response cycle. Examples would be taking a survey or provided providing a silva sample.\n \n \n Warning\n Something that should warn the participant that the parameters of the task have been or are about to be exceeded such as a warning message about getting too close to the shoulder of the road in a driving task.\n \n \n \n Task-action-type\n How an agent action should be interpreted in terms of the task specification.\n \n Appropriate-action\n An action suitable or proper in the circumstances.\n \n relatedTag\n Inappropriate-action\n \n \n \n Correct-action\n An action that was a correct response in the context of the task.\n \n relatedTag\n Incorrect-action\n Indeterminate-action\n \n \n \n Correction\n An action offering an improvement to replace a mistake or error.\n \n \n Done-indication\n An action that indicates that the participant has completed this step in the task.\n \n relatedTag\n Ready-indication\n \n \n \n Incorrect-action\n An action considered wrong or incorrect in the context of the task.\n \n relatedTag\n Correct-action\n Indeterminate-action\n \n \n \n Imagined-action\n Form a mental image or concept of something. This is used to identity something that only happened in the imagination of the participant as in imagined movements in motor imagery paradigms.\n \n \n Inappropriate-action\n An action not in keeping with what is correct or proper for the task.\n \n relatedTag\n Appropriate-action\n \n \n \n Indeterminate-action\n An action that cannot be distinguished between two or more possibibities in the current context. This tag might be applied when an outside evaluator or a classification algorithm cannot determine a definitive result.\n \n relatedTag\n Correct-action\n Incorrect-action\n Miss\n Near-miss\n \n \n \n Omitted-action\n An expected response was skipped.\n \n \n Miss\n An action considered to be a failure in the context of the task. For example, if the agent is supposed to try to hit a target and misses.\n \n relatedTag\n Near-miss\n \n \n \n Near-miss\n An action barely satisfied the requirements of the task. In a driving experiment for example this could pertain to a narrowly avoided collision or other accident.\n \n relatedTag\n Miss\n \n \n \n Ready-indication\n An action that indicates that the participant is ready to perform the next step in the task.\n \n relatedTag\n Done-indication\n \n \n \n \n Task-relationship\n Specifying organizational importance of sub-tasks.\n \n Background-subtask\n A part of the task which should be performed in the background as for example inhibiting blinks due to instruction while performing the primary task.\n \n \n Primary-subtask\n A part of the task which should be the primary focus of the participant.\n \n \n \n Task-stimulus-role\n The role the stimulus plays in the task.\n \n Cue\n A signal for an action, a pattern of stimuli indicating a particular response.\n \n \n Distractor\n A person or thing that distracts or a plausible but incorrect option in a multiple-choice question. In pyschological studies this is sometimes referred to as a foil.\n \n \n Expected\n Considered likely, probable or anticipated. Something of low information value as in frequent non-targets in an RSVP paradigm.\n \n relatedTag\n Unexpected\n \n \n suggestedTag\n Target\n \n \n \n Extraneous\n Irrelevant or unrelated to the subject being dealt with.\n \n \n Feedback\n An evaluative response to an inquiry, process, event, or activity.\n \n \n Go-signal\n An indicator to proceed with a planned action.\n \n relatedTag\n Stop-signal\n \n \n \n Meaningful\n Conveying significant or relevant information.\n \n \n Newly-learned\n Representing recently acquired information or understanding.\n \n \n Non-informative\n Something that is not useful in forming an opinion or judging an outcome.\n \n \n Non-target\n Something other than that done or looked for. Also tag Expected if the Non-target is frequent.\n \n relatedTag\n Target\n \n \n \n Not-meaningful\n Not having a serious, important, or useful quality or purpose.\n \n \n Novel\n Having no previous example or precedent or parallel.\n \n \n Oddball\n Something unusual, or infrequent.\n \n relatedTag\n Unexpected\n \n \n suggestedTag\n Target\n \n \n \n Planned\n Something that was decided on or arranged in advance.\n \n relatedTag\n Unplanned\n \n \n \n Penalty\n A disadvantage, loss, or hardship due to some action.\n \n \n Priming\n An implicit memory effect in which exposure to a stimulus influences response to a later stimulus.\n \n \n Query\n A sentence of inquiry that asks for a reply.\n \n \n Reward\n A positive reinforcement for a desired action, behavior or response.\n \n \n Stop-signal\n An indicator that the agent should stop the current activity.\n \n relatedTag\n Go-signal\n \n \n \n Target\n Something fixed as a goal, destination, or point of examination.\n \n \n Threat\n An indicator that signifies hostility and predicts an increased probability of attack.\n \n \n Timed\n Something planned or scheduled to be done at a particular time or lasting for a specified amount of time.\n \n \n Unexpected\n Something that is not anticipated.\n \n relatedTag\n Expected\n \n \n \n Unplanned\n Something that has not been planned as part of the task.\n \n relatedTag\n Planned\n \n \n \n \n \n \n Relation\n Concerns the way in which two or more people or things are connected.\n \n extensionAllowed\n \n \n Comparative-relation\n Something considered in comparison to something else. The first argument is the focus.\n \n Approximately-equal-to\n (A, (Approximately-equal-to, B)) indicates that A and B have almost the same value. Here A and B could refer to sizes, orders, positions or other quantities.\n \n \n Less-than\n (A, (Less-than, B)) indicates that A is smaller than B. Here A and B could refer to sizes, orders, positions or other quantities.\n \n \n Less-than-or-equal-to\n (A, (Less-than-or-equal-to, B)) indicates that the relative size or order of A is smaller than or equal to B.\n \n \n Greater-than\n (A, (Greater-than, B)) indicates that the relative size or order of A is bigger than that of B.\n \n \n Greater-than-or-equal-to\n (A, (Greater-than-or-equal-to, B)) indicates that the relative size or order of A is bigger than or the same as that of B.\n \n \n Equal-to\n (A, (Equal-to, B)) indicates that the size or order of A is the same as that of B.\n \n \n Not-equal-to\n (A, (Not-equal-to, B)) indicates that the size or order of A is not the same as that of B.\n \n \n \n Connective-relation\n Indicates two items are related in some way.\n \n Belongs-to\n (A, (Belongs-to, B)) indicates that A is a member of B.\n \n \n Connected-to\n (A, (Connected-to, B)) indicates that A is related to B in some respect, usually through a direct link.\n \n \n Contained-in\n (A, (Contained-in, B)) indicates that A is completely inside of B.\n \n \n Described-by\n (A, (Described-by, B)) indicates that B provides information about A.\n \n \n From-to\n (A, (From-to, B)) indicates a directional relation from A to B. A is considered the source.\n \n \n Group-of\n (A, (Group-of, B)) indicates A is a group of items of type B.\n \n \n Implied-by\n (A, (Implied-by, B)) indicates B is suggested by A.\n \n \n Includes\n (A, (Includes, B)) indicates that A has B as a member or part.\n \n \n Interacts-with\n (A, (Interacts-with, B)) indicates A and B interact, possibly reciprocally.\n \n \n Member-of\n (A, (Member-of, B)) indicates A is a member of group B.\n \n \n Part-of\n (A, (Part-of, B)) indicates A is a part of the whole B.\n \n \n Performed-by\n (A, (Performed-by, B)) indicates that the action or procedure A was carried out by agent B.\n \n \n Performed-using\n A, (Performed-using, B)) indicates that the action or procedure A was accomplished using B.\n \n \n Related-to\n (A, (Related-to, B)) indicates A has some relationship to B.\n \n \n Unrelated-to\n (A, (Unrelated-to, B)) indicates that A is not related to B. For example, A is not related to Task.\n \n \n \n Directional-relation\n A relationship indicating direction of change.\n \n Away-from\n (A, (Away-from, B)) indicates that A is going or has moved away from B. The meaning depends on A and B.\n \n \n Towards\n (A, (Towards, B)) indicates that A is going to or has moved to B. The meaning depends on A and B.\n \n \n \n Spatial-relation\n Indicating information about position.\n \n Above\n (A, (Above, B)) means A is in a place or position that is higher than B.\n \n \n Across-from\n (A, (Across-from, B)) means A is on the opposite side of something from B.\n \n \n Adjacent-to\n (A, (Adjacent-to, B)) indicates that A is next to B in time or space.\n \n \n Ahead-of\n (A, (Ahead-of, B)) indicates that A is further forward in time or space in B.\n \n \n Around\n (A, (Around, B)) means A is in or near the present place or situation of B.\n \n \n Behind\n (A, (Behind, B)) means A is at or to the far side of B, typically so as to be hidden by it.\n \n \n Below\n (A, (Below, B)) means A is in a place or position that is lower than the position of B.\n \n \n Between\n (A, (Between, (B, C))) means A is in the space or interval separating B and C.\n \n \n Bilateral-to\n (A, (Bilateral, B)) means A is on both sides of B or affects both sides of B.\n \n \n Bottom-edge-of\n (A, (Bottom-edge-of, B)) means A is on the bottom most part or or near the boundary of B.\n \n relatedTag\n Left-edge-of\n Right-edge-of\n Top-edge-of\n \n \n \n Boundary-of\n (A, (Boundary-of, B)) means A is on or part of the edge or boundary of B.\n \n \n Center-of\n (A, (Center-of, B)) means A is at a point or or in an area that is approximately central within B.\n \n \n Close-to\n (A, (Close-to, B)) means A is at a small distance from or is located near in space to B.\n \n \n Far-from\n (A, (Far-from, B)) means A is at a large distance from or is not located near in space to B.\n \n \n In-front-of\n (A, (In-front-of, B)) means A is in a position just ahead or at the front part of B, potentially partially blocking B from view.\n \n \n Left-edge-of\n (A, (Left-edge-of, B)) means A is located on the left side of B on or near the boundary of B.\n \n relatedTag\n Bottom-edge-of\n Right-edge-of\n Top-edge-of\n \n \n \n Left-side-of\n (A, (Left-side-of, B)) means A is located on the left side of B usually as part of B.\n \n relatedTag\n Right-side-of\n \n \n \n Lower-left-of\n (A, (Lower-left-of, B)) means A is situated on the lower left part of B. This relation is often used to specify qualitative information about screen position.\n \n relatedTag\n Lower-right-of\n Upper-left-of\n Upper-right-of\n \n \n \n Lower-right-of\n (A, (Lower-right-of, B)) means A is situated on the lower right part of B. This relation is often used to specify qualitative information about screen position.\n \n relatedTag\n Upper-left-of\n Upper-left-of\n Lower-right-of\n \n \n \n Outside-of\n (A, (Outside-of, B)) means A is located in the space around but not including B.\n \n \n Over\n (A, (Over, B)) means A above is above B so as to cover or protect or A extends over the a general area as from a from a vantage point.\n \n \n Right-edge-of\n (A, (Right-edge-of, B)) means A is located on the right side of B on or near the boundary of B.\n \n relatedTag\n Bottom-edge-of\n Left-edge-of\n Top-edge-of\n \n \n \n Right-side-of\n (A, (Right-side-of, B)) means A is located on the right side of B usually as part of B.\n \n relatedTag\n Left-side-of\n \n \n \n To-left-of\n (A, (To-left-of, B)) means A is located on or directed toward the side to the west of B when B is facing north. This term is used when A is not part of B.\n \n \n To-right-of\n (A, (To-right-of, B)) means A is located on or directed toward the side to the east of B when B is facing north. This term is used when A is not part of B.\n \n \n Top-edge-of\n (A, (Top-edge-of, B)) means A is on the uppermost part or or near the boundary of B.\n \n relatedTag\n Left-edge-of\n Right-edge-of\n Bottom-edge-of\n \n \n \n Top-of\n (A, (Top-of, B)) means A is on the uppermost part, side, or surface of B.\n \n \n Upper-left-of\n (A, (Upper-left-of, B)) means A is situated on the upper left part of B. This relation is often used to specify qualitative information about screen position.\n \n relatedTag\n Lower-left-of\n Lower-right-of\n Upper-right-of\n \n \n \n Upper-right-of\n (A, (Upper-right-of, B)) means A is situated on the upper right part of B. This relation is often used to specify qualitative information about screen position.\n \n relatedTag\n Lower-left-of\n Upper-left-of\n Lower-right-of\n \n \n \n Underneath\n (A, (Underneath, B)) means A is situated directly below and may be concealed by B.\n \n \n Within\n (A, (Within, B)) means A is on the inside of or contained in B.\n \n \n \n Temporal-relation\n Any relationship which includes a temporal or time-based component.\n \n After\n (A, (After B)) means A happens at a time subsequent to a reference time related to B.\n \n \n Asynchronous-with\n (A, (Asynchronous-with, B)) means A happens at times not occurring at the same time or having the same period or phase as B.\n \n \n Before\n (A, (Before B)) means A happens at a time earlier in time or order than B.\n \n \n During\n (A, (During, B)) means A happens at some point in a given period of time in which B is ongoing.\n \n \n Synchronous-with\n (A, (Synchronous-with, B)) means A happens at occurs at the same time or rate as B.\n \n \n Waiting-for\n (A, (Waiting-for, B)) means A pauses for something to happen in B.\n \n \n \n \n \n \n accelerationUnits\n \n defaultUnits\n m-per-s^2\n \n \n m-per-s^2\n \n SIUnit\n \n \n unitSymbol\n \n \n conversionFactor\n 1.0\n \n \n \n \n angleUnits\n \n defaultUnits\n radian\n \n \n radian\n \n SIUnit\n \n \n conversionFactor\n 1.0\n \n \n \n rad\n \n SIUnit\n \n \n unitSymbol\n \n \n conversionFactor\n 1.0\n \n \n \n degree\n \n conversionFactor\n 0.0174533\n \n \n \n \n areaUnits\n \n defaultUnits\n m^2\n \n \n m^2\n \n SIUnit\n \n \n unitSymbol\n \n \n conversionFactor\n 1.0\n \n \n \n \n currencyUnits\n Units indicating the worth of something.\n \n defaultUnits\n $\n \n \n dollar\n \n conversionFactor\n 1.0\n \n \n \n $\n \n unitPrefix\n \n \n unitSymbol\n \n \n conversionFactor\n 1.0\n \n \n \n euro\n \n \n point\n \n \n \n electricPotentialUnits\n \n defaultUnits\n uv\n \n \n v\n \n SIUnit\n \n \n unitSymbol\n \n \n conversionFactor\n 0.000001\n \n \n \n Volt\n \n SIUnit\n \n \n conversionFactor\n 0.000001\n \n \n \n \n frequencyUnits\n \n defaultUnits\n Hz\n \n \n hertz\n \n SIUnit\n \n \n conversionFactor\n 1.0\n \n \n \n Hz\n \n SIUnit\n \n \n unitSymbol\n \n \n conversionFactor\n 1.0\n \n \n \n \n intensityUnits\n \n defaultUnits\n dB\n \n \n dB\n Intensity expressed as ratio to a threshold. May be used for sound intensity.\n \n unitSymbol\n \n \n conversionFactor\n 1.0\n \n \n \n candela\n Units used to express light intensity.\n \n SIUnit\n \n \n \n cd\n Units used to express light intensity.\n \n SIUnit\n \n \n unitSymbol\n \n \n \n \n jerkUnits\n \n defaultUnits\n m-per-s^3\n \n \n m-per-s^3\n \n unitSymbol\n \n \n conversionFactor\n 1.0\n \n \n \n \n magneticFieldUnits\n Units used to magnetic field intensity.\n \n defaultUnits\n fT\n \n \n tesla\n \n SIUnit\n \n \n conversionFactor\n 10^-15\n \n \n \n T\n \n SIUnit\n \n \n unitSymbol\n \n \n conversionFactor\n 10^-15\n \n \n \n \n memorySizeUnits\n \n defaultUnits\n B\n \n \n byte\n \n SIUnit\n \n \n conversionFactor\n 1.0\n \n \n \n B\n \n SIUnit\n \n \n unitSymbol\n \n \n conversionFactor\n 1.0\n \n \n \n \n physicalLengthUnits\n \n defaultUnits\n m\n \n \n foot\n \n conversionFactor\n 0.3048\n \n \n \n inch\n \n conversionFactor\n 0.0254\n \n \n \n metre\n \n SIUnit\n \n \n conversionFactor\n 1.0\n \n \n \n m\n \n SIUnit\n \n \n unitSymbol\n \n \n conversionFactor\n 1.0\n \n \n \n mile\n \n conversionFactor\n 1609.34\n \n \n \n \n speedUnits\n \n defaultUnits\n m-per-s\n \n \n m-per-s\n \n SIUnit\n \n \n unitSymbol\n \n \n conversionFactor\n 1.0\n \n \n \n mph\n \n unitSymbol\n \n \n conversionFactor\n 0.44704\n \n \n \n kph\n \n unitSymbol\n \n \n conversionFactor\n 0.277778\n \n \n \n \n temperatureUnits\n \n degree Celsius\n \n SIUnit\n \n \n conversionFactor\n 1.0\n \n \n \n oC\n \n SIUnit\n \n \n unitSymbol\n \n \n conversionFactor\n 1.0\n \n \n \n \n timeUnits\n \n defaultUnits\n s\n \n \n second\n \n SIUnit\n \n \n conversionFactor\n 1.0\n \n \n \n s\n \n SIUnit\n \n \n unitSymbol\n \n \n conversionFactor\n 1.0\n \n \n \n day\n \n conversionFactor\n 86400\n \n \n \n minute\n \n conversionFactor\n 60\n \n \n \n hour\n Should be in 24-hour format.\n \n conversionFactor\n 3600\n \n \n \n \n volumeUnits\n \n defaultUnits\n m^3\n \n \n m^3\n \n SIUnit\n \n \n unitSymbol\n \n \n conversionFactor\n 1.0\n \n \n \n \n weightUnits\n \n defaultUnits\n g\n \n \n g\n \n SIUnit\n \n \n unitSymbol\n \n \n conversionFactor\n 1.0\n \n \n \n gram\n \n SIUnit\n \n \n conversionFactor\n 1.0\n \n \n \n pound\n \n conversionFactor\n 453.592\n \n \n \n lb\n \n conversionFactor\n 453.592\n \n \n \n \n \n \n deca\n SI unit multiple representing 10^1.\n \n SIUnitModifier\n \n \n conversionFactor\n 10.0\n \n \n \n da\n SI unit multiple representing 10^1.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 10.0\n \n \n \n hecto\n SI unit multiple representing 10^2.\n \n SIUnitModifier\n \n \n conversionFactor\n 100.0\n \n \n \n h\n SI unit multiple representing 10^2.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 100.0\n \n \n \n kilo\n SI unit multiple representing 10^3.\n \n SIUnitModifier\n \n \n conversionFactor\n 1000.0\n \n \n \n k\n SI unit multiple representing 10^3.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 1000.0\n \n \n \n mega\n SI unit multiple representing 10^6.\n \n SIUnitModifier\n \n \n conversionFactor\n 10^6\n \n \n \n M\n SI unit multiple representing 10^6.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 10^6\n \n \n \n giga\n SI unit multiple representing 10^9.\n \n SIUnitModifier\n \n \n conversionFactor\n 10^9\n \n \n \n G\n SI unit multiple representing 10^9.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 10^9\n \n \n \n tera\n SI unit multiple representing 10^12.\n \n SIUnitModifier\n \n \n conversionFactor\n 10^12\n \n \n \n T\n SI unit multiple representing 10^12.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 10^12\n \n \n \n peta\n SI unit multiple representing 10^15.\n \n SIUnitModifier\n \n \n conversionFactor\n 10^15\n \n \n \n P\n SI unit multiple representing 10^15.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 10^15\n \n \n \n exa\n SI unit multiple representing 10^18.\n \n SIUnitModifier\n \n \n conversionFactor\n 10^18\n \n \n \n E\n SI unit multiple representing 10^18.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 10^18\n \n \n \n zetta\n SI unit multiple representing 10^21.\n \n SIUnitModifier\n \n \n conversionFactor\n 10^21\n \n \n \n Z\n SI unit multiple representing 10^21.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 10^21\n \n \n \n yotta\n SI unit multiple representing 10^24.\n \n SIUnitModifier\n \n \n conversionFactor\n 10^24\n \n \n \n Y\n SI unit multiple representing 10^24.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 10^24\n \n \n \n deci\n SI unit submultiple representing 10^-1.\n \n SIUnitModifier\n \n \n conversionFactor\n 0.1\n \n \n \n d\n SI unit submultiple representing 10^-1.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 0.1\n \n \n \n centi\n SI unit submultiple representing 10^-2.\n \n SIUnitModifier\n \n \n conversionFactor\n 0.01\n \n \n \n c\n SI unit submultiple representing 10^-2.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 0.01\n \n \n \n milli\n SI unit submultiple representing 10^-3.\n \n SIUnitModifier\n \n \n conversionFactor\n 0.001\n \n \n \n m\n SI unit submultiple representing 10^-3.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 0.001\n \n \n \n micro\n SI unit submultiple representing 10^-6.\n \n SIUnitModifier\n \n \n conversionFactor\n 10^-6\n \n \n \n u\n SI unit submultiple representing 10^-6.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 10^-6\n \n \n \n nano\n SI unit submultiple representing 10^-9.\n \n SIUnitModifier\n \n \n conversionFactor\n 10^-9\n \n \n \n n\n SI unit submultiple representing 10^-9.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 10^-9\n \n \n \n pico\n SI unit submultiple representing 10^-12.\n \n SIUnitModifier\n \n \n conversionFactor\n 10^-12\n \n \n \n p\n SI unit submultiple representing 10^-12.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 10^-12\n \n \n \n femto\n SI unit submultiple representing 10^-15.\n \n SIUnitModifier\n \n \n conversionFactor\n 10^-15\n \n \n \n f\n SI unit submultiple representing 10^-15.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 10^-15\n \n \n \n atto\n SI unit submultiple representing 10^-18.\n \n SIUnitModifier\n \n \n conversionFactor\n 10^-18\n \n \n \n a\n SI unit submultiple representing 10^-18.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 10^-18\n \n \n \n zepto\n SI unit submultiple representing 10^-21.\n \n SIUnitModifier\n \n \n conversionFactor\n 10^-21\n \n \n \n z\n SI unit submultiple representing 10^-21.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 10^-21\n \n \n \n yocto\n SI unit submultiple representing 10^-24.\n \n SIUnitModifier\n \n \n conversionFactor\n 10^-24\n \n \n \n y\n SI unit submultiple representing 10^-24.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 10^-24\n \n \n \n \n \n dateTimeClass\n Date-times should conform to ISO8601 date-time format YYYY-MM-DDThh:mm:ss. Any variation on the full form is allowed.\n \n allowedCharacter\n digits\n T\n -\n :\n \n \n \n nameClass\n Value class designating values that have the characteristics of node names. The allowed characters are alphanumeric, hyphen, and underbar.\n \n allowedCharacter\n letters\n digits\n _\n -\n \n \n \n numericClass\n Value must be a valid numerical value.\n \n allowedCharacter\n digits\n E\n e\n +\n -\n .\n \n \n \n posixPath\n Posix path specification.\n \n allowedCharacter\n digits\n letters\n /\n :\n \n \n \n textClass\n Value class designating values that have the characteristics of text such as in descriptions.\n \n allowedCharacter\n letters\n digits\n blank\n +\n -\n :\n ;\n .\n /\n (\n )\n ?\n *\n %\n $\n @\n \n \n \n \n \n allowedCharacter\n A schema attribute of value classes specifying a special character that is allowed in expressing the value of a placeholder. Normally the allowed characters are listed individually. However, the word letters designates the upper and lower case alphabetic characters and the word digits designates the digits 0-9. The word blank designates the blank character.\n \n valueClassProperty\n \n \n \n conversionFactor\n The multiplicative factor to multiply these units to convert to default units.\n \n unitProperty\n \n \n unitModifierProperty\n \n \n \n defaultUnits\n A schema attribute of unit classes specifying the default units to use if the placeholder has a unit class but the substituted value has no units.\n \n unitClassProperty\n \n \n \n extensionAllowed\n A schema attribute indicating that users can add unlimited levels of child nodes under this tag. This tag is propagated to child nodes with the exception of the hashtag placeholders.\n \n boolProperty\n \n \n \n recommended\n A schema attribute indicating that the event-level HED string should include this tag.\n \n boolProperty\n \n \n \n relatedTag\n A schema attribute suggesting HED tags that are closely related to this tag. This attribute is used by tagging tools.\n \n \n requireChild\n A schema attribute indicating that one of the node elements descendants must be included when using this tag.\n \n boolProperty\n \n \n \n required\n A schema attribute indicating that every event-level HED string should include this tag.\n \n boolProperty\n \n \n \n SIUnit\n A schema attribute indicating that this unit element is an SI unit and can be modified by multiple and submultiple names. Note that some units such as byte are designated as SI units although they are not part of the standard.\n \n boolProperty\n \n \n unitProperty\n \n \n \n SIUnitModifier\n A schema attribute indicating that this SI unit modifier represents a multiple or submultiple of a base unit rather than a unit symbol.\n \n boolProperty\n \n \n unitModifierProperty\n \n \n \n SIUnitSymbolModifier\n A schema attribute indicating that this SI unit modifier represents a multiple or submultiple of a unit symbol rather than a base symbol.\n \n boolProperty\n \n \n unitModifierProperty\n \n \n \n suggestedTag\n A schema attribute that indicates another tag that is often associated with this tag. This attribute is used by tagging tools to provide tagging suggestions.\n \n \n tagGroup\n A schema attribute indicating the tag can only appear inside a tag group.\n \n boolProperty\n \n \n \n takesValue\n A schema attribute indicating the tag is a hashtag placeholder that is expected to be replaced with a user-defined value.\n \n boolProperty\n \n \n \n topLevelTagGroup\n A schema attribute indicating that this tag (or its descendants) can only appear in a top-level tag group. A tag group can have at most one tag with this attribute.\n \n boolProperty\n \n \n \n unique\n A schema attribute indicating that only one of this tag or its descendants can be used in the event-level HED string.\n \n boolProperty\n \n \n \n unitClass\n A schema attribute specifying which unit class this value tag belongs to.\n \n \n unitPrefix\n A schema attribute applied specifically to unit elements to designate that the unit indicator is a prefix (e.g., dollar sign in the currency units).\n \n boolProperty\n \n \n unitProperty\n \n \n \n unitSymbol\n A schema attribute indicating this tag is an abbreviation or symbol representing a type of unit. Unit symbols represent both the singular and the plural and thus cannot be pluralized.\n \n boolProperty\n \n \n unitProperty\n \n \n \n valueClass\n A schema attribute specifying which value class this value tag belongs to.\n \n \n \n \n boolProperty\n Indicates that the schema attribute represents something that is either true or false and does not have a value. Attributes without this value are assumed to have string values.\n \n \n unitClassProperty\n Indicates that the schema attribute is meant to be applied to unit classes.\n \n \n unitModifierProperty\n Indicates that the schema attribute is meant to be applied to unit modifier classes.\n \n \n unitProperty\n Indicates that the schema attribute is meant to be applied to units within a unit class.\n \n \n valueClassProperty\n Indicates that the schema attribute is meant to be applied to value classes.\n \n \n This is an updated version of the schema format. The properties are now part of the schema. The schema attributes are designed to be checked in software rather than hard-coded. The schema attributes, themselves have properties.\n\n\n\n' + }, +}) + +// data/HED_score_1.0.0.xml +var require_HED_score_1_0_0 = __commonJS({ + 'data/HED_score_1.0.0.xml'(exports, module) { + module.exports = + '\n\n This schema is a Hierarchical Event Descriptors (HED) Library Schema implementation of Standardized Computer-based Organized Reporting of EEG (SCORE)[1,2] for describing events occurring during neuroimaging time series recordings.\nThe HED-SCORE library schema allows neurologists, neurophysiologists, and brain researchers to annotate electrophysiology recordings using terms from an internationally accepted set of defined terms (SCORE) compatible with the HED framework.\nThe resulting annotations are understandable to clinicians and directly usable in computer analysis.\nFuture extensions may be implemented in the HED-SCORE library schema.\nFor more information see https://hed-schema-library.readthedocs.io/en/latest/index.html.\n \n \n Modulator\n External stimuli / interventions or changes in the alertness level (sleep) that modify: the background activity, or how often a graphoelement is occurring, or change other features of the graphoelement (like intra-burst frequency). For each observed finding, there is an option of specifying how they are influenced by the modulators and procedures that were done during the recording.\n \n requireChild\n \n \n Sleep-modulator\n \n Sleep-deprivation\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Sleep-following-sleep-deprivation\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Natural-sleep\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Induced-sleep\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Drowsiness\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Awakening\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Medication-modulator\n \n Medication-administered-during-recording\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Medication-withdrawal-or-reduction-during-recording\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Eye-modulator\n \n Manual-eye-closure\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Manual-eye-opening\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Stimulation-modulator\n \n Intermittent-photic-stimulation\n \n requireChild\n \n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n frequencyUnits\n \n \n \n \n Auditory-stimulation\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Nociceptive-stimulation\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Hyperventilation\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Physical-effort\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Cognitive-task\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Other-modulator-or-procedure\n \n requireChild\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Background-activity\n An EEG activity representing the setting in which a given normal or abnormal pattern appears and from which such pattern is distinguished.\n \n requireChild\n \n \n Posterior-dominant-rhythm\n Rhythmic activity occurring during wakefulness over the posterior regions of the head, generally with maximum amplitudes over the occipital areas. Amplitude varies. Best seen with eyes closed and during physical relaxation and relative mental inactivity. Blocked or attenuated by attention, especially visual, and mental effort. In adults this is the alpha rhythm, and the frequency is 8 to 13 Hz. However the frequency can be higher or lower than this range (often a supra or sub harmonic of alpha frequency) and is called alpha variant rhythm (fast and slow alpha variant rhythm). In children, the normal range of the frequency of the posterior dominant rhythm is age-dependant.\n \n suggestedTag\n Finding-significance-to-recording\n Finding-frequency\n Posterior-dominant-rhythm-amplitude-range\n Finding-amplitude-asymmetry\n Posterior-dominant-rhythm-frequency-asymmetry\n Posterior-dominant-rhythm-eye-opening-reactivity\n Posterior-dominant-rhythm-organization\n Posterior-dominant-rhythm-caveat\n Absence-of-posterior-dominant-rhythm\n \n \n \n Mu-rhythm\n EEG rhythm at 7-11 Hz composed of arch-shaped waves occurring over the central or centro-parietal regions of the scalp during wakefulness. Amplitudes varies but is mostly below 50 microV. Blocked or attenuated most clearly by contralateral movement, thought of movement, readiness to move or tactile stimulation.\n \n suggestedTag\n Finding-frequency\n Finding-significance-to-recording\n Brain-laterality\n Brain-region\n Sensors\n \n \n \n Other-organized-rhythm\n EEG activity that consisting of waves of approximately constant period, which is considered as part of the background (ongoing) activity, but does not fulfill the criteria of the posterior dominant rhythm.\n \n requireChild\n \n \n suggestedTag\n Delta-activity-morphology\n Theta-activity-morphology\n Alpha-activity-morphology\n Beta-activity-morphology\n Gamma-activity-morphology\n Finding-significance-to-recording\n Brain-laterality\n Brain-region\n Sensors\n Appearance-mode\n Discharge-pattern\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Background-activity-special-feature\n Special Features. Special features contains scoring options for the background activity of critically ill patients.\n \n requireChild\n \n \n Continuous-background-activity\n \n suggestedTag\n Delta-activity-morphology\n Theta-activity-morphology\n Alpha-activity-morphology\n Beta-activity-morphology\n Gamma-activity-morphology\n Brain-laterality\n Brain-region\n Sensors\n Finding-extent\n \n \n \n Nearly-continuous-background-activity\n \n suggestedTag\n Delta-activity-morphology\n Theta-activity-morphology\n Alpha-activity-morphology\n Beta-activity-morphology\n Gamma-activity-morphology\n Brain-laterality\n Brain-region\n Sensors\n Finding-extent\n \n \n \n Discontinuous-background-activity\n \n suggestedTag\n Delta-activity-morphology\n Theta-activity-morphology\n Alpha-activity-morphology\n Beta-activity-morphology\n Gamma-activity-morphology\n Brain-laterality\n Brain-region\n Sensors\n Finding-extent\n \n \n \n Background-burst-suppression\n EEG pattern consisting of bursts (activity appearing and disappearing abruptly) interrupted by periods of low amplitude (below 20 microV) and which occurs simultaneously over all head regions.\n \n suggestedTag\n Brain-laterality\n Brain-region\n Sensors\n Finding-extent\n \n \n \n Background-burst-attenuation\n \n suggestedTag\n Brain-laterality\n Brain-region\n Sensors\n Finding-extent\n \n \n \n Background-activity-suppression\n Periods showing activity under 10 microV (referential montage) and interrupting the background (ongoing) activity.\n \n suggestedTag\n Brain-laterality\n Brain-region\n Sensors\n Finding-extent\n Appearance-mode\n \n \n \n Electrocerebral-inactivity\n Absence of any ongoing cortical electric activities; in all leads EEG is isoelectric or only contains artifacts. Sensitivity has to be increased up to 2 microV/mm; recording time: at least 30 minutes.\n \n \n \n \n Sleep-and-drowsiness\n The features of the ongoing activity during sleep are scored here. If abnormal graphoelements appear, disappear or change their morphology during sleep, that is not scored here but at the entry corresponding to that graphooelement (as a modulator).\n \n requireChild\n \n \n Sleep-architecture\n For longer recordings. Only to be scored if whole-night sleep is part of the recording. It is a global descriptor of the structure and pattern of sleep: estimation of the amount of time spent in REM and NREM sleep, sleep duration, NREM-REM cycle.\n \n suggestedTag\n Property-not-possible-to-determine\n \n \n Normal-sleep-architecture\n \n \n Abnormal-sleep-architecture\n \n \n \n Sleep-stage-reached\n For normal sleep patterns the sleep stages reached during the recording can be specified\n \n requireChild\n \n \n suggestedTag\n Property-not-possible-to-determine\n Finding-significance-to-recording\n \n \n Sleep-stage-N1\n Sleep stage 1.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Sleep-stage-N2\n Sleep stage 2.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Sleep-stage-N3\n Sleep stage 3.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Sleep-stage-REM\n Rapid eye movement.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Sleep-spindles\n Burst at 11-15 Hz but mostly at 12-14 Hz generally diffuse but of higher voltage over the central regions of the head, occurring during sleep. Amplitude varies but is mostly below 50 microV in the adult.\n \n suggestedTag\n Finding-significance-to-recording\n Brain-laterality\n Brain-region\n Sensors\n Finding-amplitude-asymmetry\n \n \n \n Arousal-pattern\n Arousal pattern in children. Prolonged, marked high voltage 4-6/s activity in all leads with some intermixed slower frequencies, in children.\n \n suggestedTag\n Brain-laterality\n Brain-region\n Sensors\n Appearance-mode\n Discharge-pattern\n \n \n \n Frontal-arousal-rhythm\n Prolonged (up to 20s) rhythmical sharp or spiky activity over the frontal areas (maximum over the frontal midline) seen at arousal from sleep in children with minimal cerebral dysfunction.\n \n suggestedTag\n Appearance-mode\n Discharge-pattern\n \n \n \n Vertex-wave\n Sharp potential, maximal at the vertex, negative relative to other areas, apparently occurring spontaneously during sleep or in response to a sensory stimulus during sleep or wakefulness. May be single or repetitive. Amplitude varies but rarely exceeds 250 microV. Abbreviation: V wave. Synonym: vertex sharp wave.\n \n suggestedTag\n Finding-significance-to-recording\n Brain-laterality\n Brain-region\n Sensors\n Finding-amplitude-asymmetry\n \n \n \n K-complex\n A burst of somewhat variable appearance, consisting most commonly of a high voltage negative slow wave followed by a smaller positive slow wave frequently associated with a sleep spindle. Duration greater than 0.5 s. Amplitude is generally maximal in the frontal vertex. K complexes occur during nonREM sleep, apparently spontaneously, or in response to sudden sensory / auditory stimuli, and are not specific for any individual sensory modality.\n \n suggestedTag\n Finding-significance-to-recording\n Brain-laterality\n Brain-region\n Sensors\n Finding-amplitude-asymmetry\n \n \n \n Saw-tooth-waves\n Vertex negative 2-5 Hz waves occuring in series during REM sleep\n \n suggestedTag\n Finding-significance-to-recording\n Brain-laterality\n Brain-region\n Sensors\n Finding-amplitude-asymmetry\n \n \n \n POSTS\n Positive occipital sharp transients of sleep. Sharp transient maximal over the occipital regions, positive relative to other areas, apparently occurring spontaneously during sleep. May be single or repetitive. Amplitude varies but is generally bellow 50 microV.\n \n suggestedTag\n Finding-significance-to-recording\n Brain-laterality\n Brain-region\n Sensors\n Finding-amplitude-asymmetry\n \n \n \n Hypnagogic-hypersynchrony\n Bursts of bilateral, synchronous delta or theta activity of large amplitude, occasionally with superimposed faster components, occurring during falling asleep or during awakening, in children.\n \n suggestedTag\n Finding-significance-to-recording\n Brain-laterality\n Brain-region\n Sensors\n Finding-amplitude-asymmetry\n \n \n \n Non-reactive-sleep\n EEG activity consisting of normal sleep graphoelements, but which cannot be interrupted by external stimuli/ the patient cannot be waken.\n \n \n \n Interictal-finding\n EEG pattern / transient that is distinguished form the background activity, considered abnormal, but is not recorded during ictal period (seizure) or postictal period; the presence of an interictal finding does not necessarily imply that the patient has epilepsy.\n \n requireChild\n \n \n Epileptiform-interictal-activity\n \n suggestedTag\n Spike-morphology\n Spike-and-slow-wave-morphology\n Runs-of-rapid-spikes-morphology\n Polyspikes-morphology\n Polyspike-and-slow-wave-morphology\n Sharp-wave-morphology\n Sharp-and-slow-wave-morphology\n Slow-sharp-wave-morphology\n High-frequency-oscillation-morphology\n Hypsarrhythmia-classic-morphology\n Hypsarrhythmia-modified-morphology\n Brain-laterality\n Brain-region\n Sensors\n Finding-propagation\n Multifocal-finding\n Appearance-mode\n Discharge-pattern\n Finding-incidence\n \n \n \n Abnormal-interictal-rhythmic-activity\n \n suggestedTag\n Delta-activity-morphology\n Theta-activity-morphology\n Alpha-activity-morphology\n Beta-activity-morphology\n Gamma-activity-morphology\n Polymorphic-delta-activity-morphology\n Frontal-intermittent-rhythmic-delta-activity-morphology\n Occipital-intermittent-rhythmic-delta-activity-morphology\n Temporal-intermittent-rhythmic-delta-activity-morphology\n Brain-laterality\n Brain-region\n Sensors\n Appearance-mode\n Discharge-pattern\n Finding-incidence\n \n \n \n Interictal-special-patterns\n \n requireChild\n \n \n Interictal-periodic-discharges\n Periodic discharge not further specified (PDs).\n \n suggestedTag\n Periodic-discharges-superimposed-activity\n Periodic-discharge-sharpness\n Number-of-periodic-discharge-phases\n Periodic-discharge-triphasic-morphology\n Periodic-discharge-absolute-amplitude\n Periodic-discharge-relative-amplitude\n Periodic-discharge-polarity\n Brain-laterality\n Brain-region\n Sensors\n Periodic-discharge-duration\n Periodic-discharge-onset\n Periodic-discharge-dynamics\n \n \n Generalized-periodic-discharges\n GPDs.\n \n \n Lateralized-periodic-discharges\n LPDs.\n \n \n Bilateral-independent-periodic-discharges\n BIPDs.\n \n \n Multifocal-periodic-discharges\n MfPDs.\n \n \n \n Extreme-delta-brush\n \n suggestedTag\n Brain-laterality\n Brain-region\n Sensors\n Appearance-mode\n Discharge-pattern\n \n \n \n \n \n Critically-ill-patients-patterns\n Rhythmic or periodic patterns in critically ill patients (RPPs) are scored according to the 2012 version of the American Clinical Neurophysiology Society Standardized Critical Care EEG Terminology (Hirsch et al., 2013).\n \n requireChild\n \n \n Critically-ill-patients-periodic-discharges\n Periodic discharges (PDs).\n \n suggestedTag\n Periodic-discharges-superimposed-activity\n Periodic-discharge-sharpness\n Number-of-periodic-discharge-phases\n Periodic-discharge-triphasic-morphology\n Periodic-discharge-absolute-amplitude\n Periodic-discharge-relative-amplitude\n Periodic-discharge-polarity\n Brain-laterality\n Brain-region\n Sensors\n Finding-frequency\n Periodic-discharge-duration\n Periodic-discharge-onset\n Periodic-discharge-dynamics\n \n \n \n Rhythmic-delta-activity\n RDA\n \n suggestedTag\n Periodic-discharges-superimposed-activity\n Periodic-discharge-absolute-amplitude\n Brain-laterality\n Brain-region\n Sensors\n Finding-frequency\n Periodic-discharge-duration\n Periodic-discharge-onset\n Periodic-discharge-dynamics\n \n \n \n Spike-or-sharp-and-wave\n SW\n \n suggestedTag\n Periodic-discharge-sharpness\n Number-of-periodic-discharge-phases\n Periodic-discharge-triphasic-morphology\n Periodic-discharge-absolute-amplitude\n Periodic-discharge-relative-amplitude\n Periodic-discharge-polarity\n Brain-laterality\n Brain-region\n Sensors\n Multifocal-finding\n Finding-frequency\n Periodic-discharge-duration\n Periodic-discharge-onset\n Periodic-discharge-dynamics\n \n \n \n \n Episode\n Clinical episode or electrographic seizure.\n \n requireChild\n \n \n Epileptic-seizure\n \n requireChild\n \n \n Focal-onset-epileptic-seizure\n \n suggestedTag\n Episode-phase\n Seizure-dynamics\n Episode-consciousness\n Episode-awareness\n Clinical-EEG-temporal-relationship\n Episode-event-count\n State-episode-start\n Episode-postictal-phase\n Episode-prodrome\n Episode-tongue-biting\n \n \n Aware-focal-onset-epileptic-seizure\n \n suggestedTag\n Episode-phase\n Seizure-classification\n Seizure-dynamics\n Episode-consciousness\n Episode-awareness\n Clinical-EEG-temporal-relationship\n Episode-event-count\n State-episode-start\n Episode-postictal-phase\n Episode-prodrome\n Episode-tongue-biting\n \n \n \n Impaired-awareness-focal-onset-epileptic-seizure\n \n suggestedTag\n Episode-phase\n Seizure-classification\n Seizure-dynamics\n Episode-consciousness\n Episode-awareness\n Clinical-EEG-temporal-relationship\n Episode-event-count\n State-episode-start\n Episode-postictal-phase\n Episode-prodrome\n Episode-tongue-biting\n \n \n \n Awareness-unknown-focal-onset-epileptic-seizure\n \n suggestedTag\n Episode-phase\n Seizure-classification\n Seizure-dynamics\n Episode-consciousness\n Episode-awareness\n Clinical-EEG-temporal-relationship\n Episode-event-count\n State-episode-start\n Episode-postictal-phase\n Episode-prodrome\n Episode-tongue-biting\n \n \n \n Focal-to-bilateral-tonic-clonic-focal-onset-epileptic-seizure\n \n suggestedTag\n Episode-phase\n Seizure-dynamics\n Episode-consciousness\n Episode-awareness\n Clinical-EEG-temporal-relationship\n Episode-event-count\n State-episode-start\n Episode-postictal-phase\n Episode-prodrome\n Episode-tongue-biting\n \n \n \n \n Generalized-onset-epileptic-seizure\n \n suggestedTag\n Episode-phase\n Seizure-classification\n Seizure-dynamics\n Episode-consciousness\n Episode-awareness\n Clinical-EEG-temporal-relationship\n Episode-event-count\n State-episode-start\n Episode-postictal-phase\n Episode-prodrome\n Episode-tongue-biting\n \n \n \n Unknown-onset-epileptic-seizure\n \n suggestedTag\n Episode-phase\n Seizure-classification\n Seizure-dynamics\n Episode-consciousness\n Episode-awareness\n Clinical-EEG-temporal-relationship\n Episode-event-count\n State-episode-start\n Episode-postictal-phase\n Episode-prodrome\n Episode-tongue-biting\n \n \n \n Unclassified-epileptic-seizure\n \n suggestedTag\n Episode-phase\n Seizure-dynamics\n Episode-consciousness\n Episode-awareness\n Clinical-EEG-temporal-relationship\n Episode-event-count\n State-episode-start\n Episode-postictal-phase\n Episode-prodrome\n Episode-tongue-biting\n \n \n \n \n Subtle-seizure\n Seizure type frequent in neonates, sometimes referred to as motor automatisms; they may include random and roving eye movements, sucking, chewing motions, tongue protrusion, rowing or swimming or boxing movements of the arms, pedaling and bicycling movements of the lower limbs; apneic seizures are relatively common. Although some subtle seizures are associated with rhythmic ictal EEG discharges, and are clearly epileptic, ictal EEG often does not show typical epileptic activity.\n \n suggestedTag\n Episode-phase\n Episode-consciousness\n Episode-awareness\n Clinical-EEG-temporal-relationship\n Episode-event-count\n State-episode-start\n Episode-postictal-phase\n Episode-prodrome\n Episode-tongue-biting\n \n \n \n Electrographic-seizure\n Referred usually to non convulsive status. Ictal EEG: rhythmic discharge or spike and wave pattern with definite evolution in frequency, location, or morphology lasting at least 10 s; evolution in amplitude alone did not qualify.\n \n suggestedTag\n Episode-phase\n Episode-consciousness\n Episode-awareness\n Clinical-EEG-temporal-relationship\n Episode-event-count\n State-episode-start\n Episode-postictal-phase\n Episode-prodrome\n Episode-tongue-biting\n \n \n \n Seizure-PNES\n Psychogenic non-epileptic seizure.\n \n suggestedTag\n Episode-phase\n Finding-significance-to-recording\n Episode-consciousness\n Episode-awareness\n Clinical-EEG-temporal-relationship\n Episode-event-count\n State-episode-start\n Episode-postictal-phase\n Episode-prodrome\n Episode-tongue-biting\n \n \n \n Sleep-related-episode\n \n requireChild\n \n \n Sleep-related-arousal\n Normal.\n \n suggestedTag\n Episode-phase\n Finding-significance-to-recording\n Episode-consciousness\n Episode-awareness\n Clinical-EEG-temporal-relationship\n Episode-event-count\n State-episode-start\n Episode-postictal-phase\n Episode-prodrome\n Episode-tongue-biting\n \n \n \n Benign-sleep-myoclonus\n A distinctive disorder of sleep characterized by a) neonatal onset, b) rhythmic myoclonic jerks only during sleep and c) abrupt and consistent cessation with arousal, d) absence of concomitant electrographic changes suggestive of seizures, and e) good outcome.\n \n suggestedTag\n Episode-phase\n Finding-significance-to-recording\n Episode-consciousness\n Episode-awareness\n Clinical-EEG-temporal-relationship\n Episode-event-count\n State-episode-start\n Episode-postictal-phase\n Episode-prodrome\n Episode-tongue-biting\n \n \n \n Confusional-awakening\n Episode of non epileptic nature included in NREM parasomnias, characterized by sudden arousal and complex behavior but without full alertness, usually lasting a few minutes and occurring almost in all children at least occasionally. Amnesia of the episode is the rule.\n \n suggestedTag\n Episode-phase\n Finding-significance-to-recording\n Episode-consciousness\n Episode-awareness\n Clinical-EEG-temporal-relationship\n Episode-event-count\n State-episode-start\n Episode-postictal-phase\n Episode-prodrome\n Episode-tongue-biting\n \n \n \n Sleep-periodic-limb-movement\n PLMS. Periodic limb movement in sleep. Episodes are characterized by brief (0.5- to 5.0-second) lower-extremity movements during sleep, which typically occur at 20- to 40-second intervals, most commonly during the first 3 hours of sleep. The affected individual is usually not aware of the movements or of the transient partial arousals.\n \n suggestedTag\n Episode-phase\n Finding-significance-to-recording\n Episode-consciousness\n Episode-awareness\n Clinical-EEG-temporal-relationship\n Episode-event-count\n State-episode-start\n Episode-postictal-phase\n Episode-prodrome\n Episode-tongue-biting\n \n \n \n REM-sleep-behavioral-disorder\n REM sleep behavioral disorder. Episodes characterized by: a) presence of REM sleep without atonia (RSWA) on polysomnography (PSG); b) presence of at least 1 of the following conditions - (1) Sleep-related behaviors, by history, that have been injurious, potentially injurious, or disruptive (example: dream enactment behavior); (2) abnormal REM sleep behavior documented during PSG monitoring; (3) absence of epileptiform activity on electroencephalogram (EEG) during REM sleep (unless RBD can be clearly distinguished from any concurrent REM sleep-related seizure disorder); (4) sleep disorder not better explained by another sleep disorder, a medical or neurologic disorder, a mental disorder, medication use, or a substance use disorder.\n \n suggestedTag\n Episode-phase\n Finding-significance-to-recording\n Episode-consciousness\n Episode-awareness\n Clinical-EEG-temporal-relationship\n Episode-event-count\n State-episode-start\n Episode-postictal-phase\n Episode-prodrome\n Episode-tongue-biting\n \n \n \n Sleep-walking\n Episodes characterized by ambulation during sleep; the patient is difficult to arouse during an episode, and is usually amnesic following the episode. Episodes usually occur in the first third of the night during slow wave sleep. Polysomnographic recordings demonstrate 2 abnormalities during the first sleep cycle: frequent, brief, non-behavioral EEG-defined arousals prior to the somnambulistic episode and abnormally low gamma (0.75-2.0 Hz) EEG power on spectral analysis, correlating with high-voltage (hyper-synchronic gamma) waves lasting 10 to 15 s occurring just prior to the movement. This is followed by stage I NREM sleep, and there is no evidence of complete awakening.\n \n suggestedTag\n Episode-phase\n Finding-significance-to-recording\n Episode-consciousness\n Episode-awareness\n Clinical-EEG-temporal-relationship\n Episode-event-count\n State-episode-start\n Episode-postictal-phase\n Episode-prodrome\n Episode-tongue-biting\n \n \n \n \n Pediatric-episode\n \n requireChild\n \n \n Hyperekplexia\n Disorder characterized by exaggerated startle response and hypertonicity that may occur during the first year of life and in severe cases during the neonatal period. Children usually present with marked irritability and recurrent startles in response to handling and sounds. Severely affected infants can have severe jerks and stiffening, sometimes with breath-holding spells.\n \n suggestedTag\n Episode-phase\n Finding-significance-to-recording\n Episode-consciousness\n Episode-awareness\n Clinical-EEG-temporal-relationship\n Episode-event-count\n State-episode-start\n Episode-postictal-phase\n Episode-prodrome\n Episode-tongue-biting\n \n \n \n Jactatio-capitis-nocturna\n Relatively common in normal children at the time of going to bed, especially during the first year of life, the rhythmic head movements persist during sleep. Usually, these phenomena disappear before 3 years of age.\n \n suggestedTag\n Episode-phase\n Finding-significance-to-recording\n Episode-consciousness\n Episode-awareness\n Clinical-EEG-temporal-relationship\n Episode-event-count\n State-episode-start\n Episode-postictal-phase\n Episode-prodrome\n Episode-tongue-biting\n \n \n \n Pavor-nocturnus\n A nocturnal episode characterized by age of onset of less than five years (mean age 18 months, with peak prevalence at five to seven years), appearance of signs of panic two hours after falling asleep with crying, screams, a fearful expression, inability to recognize other people including parents (for a duration of 5-15 minutes), amnesia upon awakening. Pavor nocturnus occurs in patients almost every night for months or years (but the frequency is highly variable and may be as low as once a month) and is likely to disappear spontaneously at the age of six to eight years.\n \n suggestedTag\n Episode-phase\n Finding-significance-to-recording\n Episode-consciousness\n Episode-awareness\n Clinical-EEG-temporal-relationship\n Episode-event-count\n State-episode-start\n Episode-postictal-phase\n Episode-prodrome\n Episode-tongue-biting\n \n \n \n Pediatric-stereotypical-behavior-episode\n Repetitive motor behavior in children, typically rhythmic and persistent; usually not paroxysmal and rarely suggest epilepsy. They include headbanging, head-rolling, jactatio capitis nocturna, body rocking, buccal or lingual movements, hand flapping and related mannerisms, repetitive hand-waving (to self-induce photosensitive seizures).\n \n suggestedTag\n Episode-phase\n Finding-significance-to-recording\n Episode-consciousness\n Episode-awareness\n Clinical-EEG-temporal-relationship\n Episode-event-count\n State-episode-start\n Episode-postictal-phase\n Episode-prodrome\n Episode-tongue-biting\n \n \n \n \n Paroxysmal-motor-event\n Paroxysmal phenomena during neonatal or childhood periods characterized by recurrent motor or behavioral signs or symptoms that must be distinguishes from epileptic disorders.\n \n suggestedTag\n Episode-phase\n Finding-significance-to-recording\n Episode-consciousness\n Episode-awareness\n Clinical-EEG-temporal-relationship\n Episode-event-count\n State-episode-start\n Episode-postictal-phase\n Episode-prodrome\n Episode-tongue-biting\n \n \n \n Syncope\n Episode with loss of consciousness and muscle tone that is abrupt in onset, of short duration and followed by rapid recovery; it occurs in response to transient impairment of cerebral perfusion. Typical prodromal symptoms often herald onset of syncope and postictal symptoms are minimal. Syncopal convulsions resulting from cerebral anoxia are common but are not a form of epilepsy, nor are there any accompanying EEG ictal discharges.\n \n suggestedTag\n Episode-phase\n Finding-significance-to-recording\n Episode-consciousness\n Episode-awareness\n Clinical-EEG-temporal-relationship\n Episode-event-count\n State-episode-start\n Episode-postictal-phase\n Episode-prodrome\n Episode-tongue-biting\n \n \n \n Cataplexy\n A sudden decrement in muscle tone and loss of deep tendon reflexes, leading to muscle weakness, paralysis, or postural collapse. Cataplexy usually is precipitated by an outburst of emotional expression-notably laughter, anger, or startle. It is one of the tetrad of symptoms of narcolepsy. During cataplexy, respiration and voluntary eye movements are not compromised. Consciousness is preserved.\n \n suggestedTag\n Episode-phase\n Finding-significance-to-recording\n Episode-consciousness\n Episode-awareness\n Clinical-EEG-temporal-relationship\n Episode-event-count\n State-episode-start\n Episode-postictal-phase\n Episode-prodrome\n Episode-tongue-biting\n \n \n \n Other-episode\n \n requireChild\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Physiologic-pattern\n EEG graphoelements or rhythms that are considered normal. They only should be scored if the physician considers that they have a specific clinical significance for the recording.\n \n requireChild\n \n \n Rhythmic-activity-pattern\n Not further specified.\n \n suggestedTag\n Delta-activity-morphology\n Theta-activity-morphology\n Alpha-activity-morphology\n Beta-activity-morphology\n Gamma-activity-morphology\n Brain-laterality\n Brain-region\n Sensors\n Appearance-mode\n Discharge-pattern\n \n \n \n Slow-alpha-variant-rhythm\n Characteristic rhythms mostly at 4-5 Hz, recorded most prominently over the posterior regions of the head. Generally alternate, or are intermixed, with alpha rhythm to which they often are harmonically related. Amplitude varies but is frequently close to 50 micro V. Blocked or attenuated by attention, especially visual, and mental effort. Comment: slow alpha variant rhythms should be distinguished from posterior slow waves characteristic of children and adolescents and occasionally seen in young adults.\n \n suggestedTag\n Brain-laterality\n Brain-region\n Sensors\n Appearance-mode\n Discharge-pattern\n \n \n \n Fast-alpha-variant-rhythm\n Characteristic rhythm at 14-20 Hz, detected most prominently over the posterior regions of the head. May alternate or be intermixed with alpha rhythm. Blocked or attenuated by attention, especially visual, and mental effort.\n \n suggestedTag\n Appearance-mode\n Discharge-pattern\n \n \n \n Ciganek-rhythm\n Midline theta rhythm (Ciganek rhythm) may be observed during wakefulness or drowsiness. The frequency is 4-7 Hz, and the location is midline (ie, vertex). The morphology is rhythmic, smooth, sinusoidal, arciform, spiky, or mu-like.\n \n suggestedTag\n Brain-laterality\n Brain-region\n Sensors\n Appearance-mode\n Discharge-pattern\n \n \n \n Lambda-wave\n Diphasic sharp transient occurring over occipital regions of the head of waking subjects during visual exploration. The main component is positive relative to other areas. Time-locked to saccadic eye movement. Amplitude varies but is generally below 50 micro V.\n \n suggestedTag\n Brain-laterality\n Brain-region\n Sensors\n Appearance-mode\n Discharge-pattern\n \n \n \n Posterior-slow-waves-youth\n Waves in the delta and theta range, of variable form, lasting 0.35 to 0.5 s or longer without any consistent periodicity, found in the range of 6-12 years (occasionally seen in young adults). Alpha waves are almost always intermingled or superimposed. Reactive similar to alpha activity.\n \n suggestedTag\n Brain-laterality\n Brain-region\n Sensors\n Appearance-mode\n Discharge-pattern\n \n \n \n Diffuse-slowing-hyperventilation\n Diffuse slowing induced by hyperventilation. Bilateral, diffuse slowing during hyperventilation. Recorded in 70 percent of normal children (3-5 years) and less then 10 percent of adults. Usually appear in the posterior regions and spread forward in younger age group, whereas they tend to appear in the frontal regions and spread backward in the older age group.\n \n suggestedTag\n Brain-laterality\n Brain-region\n Sensors\n Appearance-mode\n Discharge-pattern\n \n \n \n Photic-driving\n Physiologic response consisting of rhythmic activity elicited over the posterior regions of the head by repetitive photic stimulation at frequencies of about 5-30 Hz. Comments: term should be limited to activity time-locked to the stimulus and of frequency identical or harmonically related to the stimulus frequency. Photic driving should be distinguished from the visual evoked potentials elicited by isolated flashes of light or flashes repeated at very low frequency.\n \n suggestedTag\n Brain-laterality\n Brain-region\n Sensors\n Appearance-mode\n Discharge-pattern\n \n \n \n Photomyogenic-response\n A response to intermittent photic stimulation characterized by the appearance in the record of brief, repetitive muscular artifacts (spikes) over the anterior regions of the head. These often increase gradually in amplitude as stimuli are continued and cease promptly when the stimulus is withdrawn. Comment: this response is frequently associated with flutter of the eyelids and vertical oscillations of the eyeballs and sometimes with discrete jerking mostly involving the musculature of the face and head. (Preferred to synonym: photo-myoclonic response).\n \n suggestedTag\n Brain-laterality\n Brain-region\n Sensors\n Appearance-mode\n Discharge-pattern\n \n \n \n Other-physiologic-pattern\n \n requireChild\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Uncertain-significant-pattern\n EEG graphoelements or rhythms that resemble abnormal patterns but that are not necessarily associated with a pathology, and the physician does not consider them abnormal in the context of the scored recording (like normal variants and patterns).\n \n requireChild\n \n \n Sharp-transient-pattern\n \n suggestedTag\n Brain-laterality\n Brain-region\n Sensors\n Appearance-mode\n Discharge-pattern\n \n \n \n Wicket-spikes\n Spike-like monophasic negative single waves or trains of waves occurring over the temporal regions during drowsiness that have an arcuate or mu-like appearance. These are mainly seen in older individuals and represent a benign variant that is of little clinical significance.\n \n \n Small-sharp-spikes\n Benign epileptiform Transients of Sleep (BETS). Small sharp spikes (SSS) of very short duration and low amplitude, often followed by a small theta wave, occurring in the temporal regions during drowsiness and light sleep. They occur on one or both sides (often asynchronously). The main negative and positive components are of about equally spiky character. Rarely seen in children, they are seen most often in adults and the elderly. Two thirds of the patients have a history of epileptic seizures.\n \n suggestedTag\n Brain-laterality\n Brain-region\n Sensors\n Appearance-mode\n Discharge-pattern\n \n \n \n Fourteen-six-Hz-positive-burst\n Burst of arch-shaped waves at 13-17 Hz and/or 5-7-Hz but most commonly at 14 and or 6 Hz seen generally over the posterior temporal and adjacent areas of one or both sides of the head during sleep. The sharp peaks of its component waves are positive with respect to other regions. Amplitude varies but is generally below 75 micro V. Comments: (1) best demonstrated by referential recording using contralateral earlobe or other remote, reference electrodes. (2) This pattern has no established clinical significance.\n \n suggestedTag\n Brain-laterality\n Brain-region\n Sensors\n Appearance-mode\n Discharge-pattern\n \n \n \n Six-Hz-spike-slow-wave\n Spike and slow wave complexes at 4-7Hz, but mostly at 6 Hz occurring generally in brief bursts bilaterally and synchronously, symmetrically or asymmetrically, and either confined to or of larger amplitude over the posterior or anterior regions of the head. The spike has a strong positive component. Amplitude varies but is generally smaller than that of spike-and slow-wave complexes repeating at slower rates. Comment: this pattern should be distinguished from epileptiform discharges. Synonym: wave and spike phantom.\n \n suggestedTag\n Brain-laterality\n Brain-region\n Sensors\n Appearance-mode\n Discharge-pattern\n \n \n \n Rudimentary-spike-wave-complex\n Synonym: Pseudo petit mal discharge. Paroxysmal discharge that consists of generalized or nearly generalized high voltage 3 to 4/sec waves with poorly developed spike in the positive trough between the slow waves, occurring in drowsiness only. It is found only in infancy and early childhood when marked hypnagogic rhythmical theta activity is paramount in the drowsy state.\n \n suggestedTag\n Brain-laterality\n Brain-region\n Sensors\n Appearance-mode\n Discharge-pattern\n \n \n \n Slow-fused-transient\n A posterior slow-wave preceded by a sharp-contoured potential that blends together with the ensuing slow wave, in children.\n \n suggestedTag\n Brain-laterality\n Brain-region\n Sensors\n Appearance-mode\n Discharge-pattern\n \n \n \n Needle-like-occipital-spikes-blind\n Spike discharges of a particularly fast and needle-like character develop over the occipital region in most congenitally blind children. Completely disappear during childhood or adolescence.\n \n suggestedTag\n Brain-laterality\n Brain-region\n Sensors\n Appearance-mode\n Discharge-pattern\n \n \n \n Subclinical-rhythmic-EEG-discharge-adults\n Subclinical rhythmic EEG discharge of adults (SERDA). A rhythmic pattern seen in the adult age group, mainly in the waking state or drowsiness. It consists of a mixture of frequencies, often predominant in the theta range. The onset may be fairly abrupt with widespread sharp rhythmical theta and occasionally with delta activity. As to the spatial distribution, a maximum of this discharge is usually found over the centroparietal region and especially over the vertex. It may resemble a seizure discharge but is not accompanied by any clinical signs or symptoms.\n \n suggestedTag\n Brain-laterality\n Brain-region\n Sensors\n Appearance-mode\n Discharge-pattern\n \n \n \n Rhythmic-temporal-theta-burst-drowsiness\n Rhythmic temporal theta burst of drowsiness (RTTD). Characteristic burst of 4-7 Hz waves frequently notched by faster waves, occurring over the temporal regions of the head during drowsiness. Synonym: psychomotor variant pattern. Comment: this is a pattern of drowsiness that is of no clinical significance.\n \n \n Temporal-slowing-elderly\n Focal theta and/or delta activity over the temporal regions, especially the left, in persons over the age of 60. Amplitudes are low/similar to the background activity. Comment: focal temporal theta was found in 20 percent of people between the ages of 40-59 years, and 40 percent of people between 60 and 79 years. One third of people older than 60 years had focal temporal delta activity.\n \n suggestedTag\n Brain-laterality\n Brain-region\n Sensors\n Appearance-mode\n Discharge-pattern\n \n \n \n Breach-rhythm\n Rhythmical activity recorded over cranial bone defects. Usually it is in the 6 to 11/sec range, does not respond to movements.\n \n suggestedTag\n Brain-laterality\n Brain-region\n Sensors\n Appearance-mode\n Discharge-pattern\n \n \n \n Other-uncertain-significant-pattern\n \n requireChild\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Artifact\n When relevant for the clinical interpretation, artifacts can be scored by specifying the type and the location.\n \n requireChild\n \n \n Biological-artifact\n \n requireChild\n \n \n Eye-blink-artifact\n Example for EEG: Fp1/Fp2 become electropositive with eye closure because the cornea is positively charged causing a negative deflection in Fp1/Fp2. If the eye blink is unilateral, consider prosthetic eye. If it is in F8 rather than Fp2 then the electrodes are plugged in wrong.\n \n suggestedTag\n Brain-laterality\n Brain-region\n Sensors\n Multifocal-finding\n Artifact-significance-to-recording\n \n \n \n Eye-movement-horizontal-artifact\n Example for EEG: There is an upward deflection in the Fp2-F8 derivation, when the eyes move to the right side. In this case F8 becomes more positive and therefore. When the eyes move to the left, F7 becomes more positive and there is an upward deflection in the Fp1-F7 derivation.\n \n suggestedTag\n Brain-laterality\n Brain-region\n Sensors\n Multifocal-finding\n Artifact-significance-to-recording\n \n \n \n Eye-movement-vertical-artifact\n Example for EEG: The EEG shows positive potentials (50-100 micro V) with bi-frontal distribution, maximum at Fp1 and Fp2, when the eyeball rotated upward. The downward rotation of the eyeball was associated with the negative deflection. The time course of the deflections was similar to the time course of the eyeball movement.\n \n suggestedTag\n Brain-laterality\n Brain-region\n Sensors\n Multifocal-finding\n Artifact-significance-to-recording\n \n \n \n Slow-eye-movement-artifact\n Slow, rolling eye-movements, seen during drowsiness.\n \n suggestedTag\n Brain-laterality\n Brain-region\n Sensors\n Multifocal-finding\n Artifact-significance-to-recording\n \n \n \n Nystagmus-artifact\n \n suggestedTag\n Artifact-significance-to-recording\n \n \n \n Chewing-artifact\n \n suggestedTag\n Brain-laterality\n Brain-region\n Sensors\n Multifocal-finding\n Artifact-significance-to-recording\n \n \n \n Sucking-artifact\n \n suggestedTag\n Brain-laterality\n Brain-region\n Sensors\n Multifocal-finding\n Artifact-significance-to-recording\n \n \n \n Glossokinetic-artifact\n The tongue functions as a dipole, with the tip negative with respect to the base. The artifact produced by the tongue has a broad potential field that drops from frontal to occipital areas, although it is less steep than that produced by eye movement artifacts. The amplitude of the potentials is greater inferiorly than in parasagittal regions; the frequency is variable but usually in the delta range. Chewing and sucking can produce similar artifacts.\n \n suggestedTag\n Brain-laterality\n Brain-region\n Sensors\n Multifocal-finding\n Artifact-significance-to-recording\n \n \n \n Rocking-patting-artifact\n Quasi-rhythmical artifacts in recordings from infants caused by rocking/patting.\n \n suggestedTag\n Brain-laterality\n Brain-region\n Sensors\n Multifocal-finding\n Artifact-significance-to-recording\n \n \n \n Movement-artifact\n Example for EEG: Large amplitude artifact, with irregular morphology (usually resembling a slow-wave or a wave with complex morphology) seen in one or several channels, due to movement. If the causing movement is repetitive, the artifact might resemble a rhythmic EEG activity.\n \n suggestedTag\n Brain-laterality\n Brain-region\n Sensors\n Multifocal-finding\n Artifact-significance-to-recording\n \n \n \n Respiration-artifact\n Respiration can produce 2 kinds of artifacts. One type is in the form of slow and rhythmic activity, synchronous with the body movements of respiration and mechanically affecting the impedance of (usually) one electrode. The other type can be slow or sharp waves that occur synchronously with inhalation or exhalation and involve those electrodes on which the patient is lying.\n \n suggestedTag\n Brain-laterality\n Brain-region\n Sensors\n Multifocal-finding\n Artifact-significance-to-recording\n \n \n \n Pulse-artifact\n Example for EEG: Occurs when an EEG electrode is placed over a pulsating vessel. The pulsation can cause slow waves that may simulate EEG activity. A direct relationship exists between ECG and the pulse waves (200-300 millisecond delay after ECG equals QRS complex).\n \n suggestedTag\n Brain-laterality\n Brain-region\n Sensors\n Multifocal-finding\n Artifact-significance-to-recording\n \n \n \n ECG-artifact\n Example for EEG: Far-field potential generated in the heart. The voltage and apparent surface of the artifact vary from derivation to derivation and, consequently, from montage to montage. The artifact is observed best in referential montages using earlobe electrodes A1 and A2. ECG artifact is recognized easily by its rhythmicity/regularity and coincidence with the ECG tracing.\n \n suggestedTag\n Brain-laterality\n Brain-region\n Sensors\n Multifocal-finding\n Artifact-significance-to-recording\n \n \n \n Sweat-artifact\n Is a low amplitude undulating waveform that is usually greater than 2 seconds and may appear to be an unstable baseline.\n \n suggestedTag\n Brain-laterality\n Brain-region\n Sensors\n Multifocal-finding\n Artifact-significance-to-recording\n \n \n \n EMG-artifact\n Myogenic potentials are the most common artifacts. Frontalis and temporalis muscles (ex..: clenching of jaw muscles) are common causes. Generally, the potentials generated in the muscles are of shorter duration than those generated in the brain. The frequency components are usually beyond 30-50 Hz, and the bursts are arrhythmic.\n \n suggestedTag\n Brain-laterality\n Brain-region\n Sensors\n Multifocal-finding\n Artifact-significance-to-recording\n \n \n \n \n Non-biological-artifact\n \n requireChild\n \n \n Power-supply-artifact\n 50-60 Hz artifact. Monomorphic waveform due to 50 or 60 Hz A/C power supply.\n \n suggestedTag\n Artifact-significance-to-recording\n \n \n \n Induction-artifact\n Artifacts (usually of high frequency) induced by nearby equipment (like in the intensive care unit).\n \n suggestedTag\n Artifact-significance-to-recording\n \n \n \n Dialysis-artifact\n \n suggestedTag\n Artifact-significance-to-recording\n \n \n \n Artificial-ventilation-artifact\n \n suggestedTag\n Artifact-significance-to-recording\n \n \n \n Electrode-pops-artifact\n Are brief discharges with a very steep upslope and shallow fall that occur in all leads which include that electrode.\n \n suggestedTag\n Artifact-significance-to-recording\n \n \n \n Salt-bridge-artifact\n Typically occurs in 1 channel which may appear isoelectric. Only seen in bipolar montage.\n \n suggestedTag\n Artifact-significance-to-recording\n \n \n \n \n Other-artifact\n \n requireChild\n \n \n suggestedTag\n Artifact-significance-to-recording\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Polygraphic-channel-finding\n Changes observed in polygraphic channels can be scored: EOG, Respiration, ECG, EMG, other polygraphic channel (+ free text), and their significance logged (normal, abnormal, no definite abnormality).\n \n requireChild\n \n \n EOG-channel-finding\n ElectroOculoGraphy.\n \n suggestedTag\n Finding-significance-to-recording\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Respiration-channel-finding\n \n suggestedTag\n Finding-significance-to-recording\n \n \n Respiration-oxygen-saturation\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Respiration-feature\n \n Apnoe-respiration\n Add duration (range in seconds) and comments in free text.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Hypopnea-respiration\n Add duration (range in seconds) and comments in free text\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Apnea-hypopnea-index-respiration\n Events/h. Frequency can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Rate-of-change/Frequency\n \n requireChild\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Periodic-respiration\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Tachypnea-respiration\n Cycles/min. Frequency can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Rate-of-change/Frequency\n \n requireChild\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Other-respiration-feature\n \n requireChild\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n \n ECG-channel-finding\n Electrocardiography.\n \n suggestedTag\n Finding-significance-to-recording\n \n \n ECG-QT-period\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n ECG-feature\n \n ECG-sinus-rhythm\n Normal rhythm. Frequency can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Rate-of-change/Frequency\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n ECG-arrhythmia\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n ECG-asystolia\n Add duration (range in seconds) and comments in free text.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n ECG-bradycardia\n Frequency can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Rate-of-change/Frequency\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n ECG-extrasystole\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n ECG-ventricular-premature-depolarization\n Frequency can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Rate-of-change/Frequency\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n ECG-tachycardia\n Frequency can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Rate-of-change/Frequency\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Other-ECG-feature\n \n requireChild\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n \n EMG-channel-finding\n electromyography\n \n suggestedTag\n Finding-significance-to-recording\n \n \n EMG-muscle-side\n \n EMG-left-muscle\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n EMG-right-muscle\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n EMG-bilateral-muscle\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n EMG-muscle-name\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n EMG-feature\n \n EMG-myoclonus\n \n Negative-myoclonus\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n EMG-myoclonus-rhythmic\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n EMG-myoclonus-arrhythmic\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n EMG-myoclonus-synchronous\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n EMG-myoclonus-asynchronous\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n EMG-PLMS\n Periodic limb movements in sleep.\n \n \n EMG-spasm\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n EMG-tonic-contraction\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n EMG-asymmetric-activation\n \n requireChild\n \n \n EMG-asymmetric-activation-left-first\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n EMG-asymmetric-activation-right-first\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Other-EMG-features\n \n requireChild\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n \n Other-polygraphic-channel\n \n requireChild\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Finding-property\n Descriptive element similar to main HED /Property. Something that pertains to a thing. A characteristic of some entity. A quality or feature regarded as a characteristic or inherent part of someone or something. HED attributes are adjectives or adverbs.\n \n requireChild\n \n \n Signal-morphology-property\n \n requireChild\n \n \n Rhythmic-activity-morphology\n EEG activity consisting of a sequence of waves approximately constant period.\n \n Delta-activity-morphology\n EEG rhythm in the delta (under 4 Hz) range that does not belong to the posterior dominant rhythm (scored under other organized rhythms).\n \n suggestedTag\n Finding-frequency\n Finding-amplitude\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Theta-activity-morphology\n EEG rhythm in the theta (4-8 Hz) range that does not belong to the posterior dominant rhythm (scored under other organized rhythm).\n \n suggestedTag\n Finding-frequency\n Finding-amplitude\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Alpha-activity-morphology\n EEG rhythm in the alpha range (8-13 Hz) which is considered part of the background (ongoing) activity but does not fulfill the criteria of the posterior dominant rhythm (alpha rhythm).\n \n suggestedTag\n Finding-frequency\n Finding-amplitude\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Beta-activity-morphology\n EEG rhythm between 14 and 40 Hz, which is considered part of the background (ongoing) activity but does not fulfill the criteria of the posterior dominant rhythm. Most characteristically: a rhythm from 14 to 40 Hz recorded over the fronto-central regions of the head during wakefulness. Amplitude of the beta rhythm varies but is mostly below 30 microV. Other beta rhythms are most prominent in other locations or are diffuse.\n \n suggestedTag\n Finding-frequency\n Finding-amplitude\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Gamma-activity-morphology\n \n suggestedTag\n Finding-frequency\n Finding-amplitude\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Spike-morphology\n A transient, clearly distinguished from background activity, with pointed peak at a conventional paper speed or time scale and duration from 20 to under 70 ms, i.e. 1/50-1/15 s approximately. Main component is generally negative relative to other areas. Amplitude varies.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Spike-and-slow-wave-morphology\n A pattern consisting of a spike followed by a slow wave.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Runs-of-rapid-spikes-morphology\n Bursts of spike discharges at a rate from 10 to 25/sec (in most cases somewhat irregular). The bursts last more than 2 seconds (usually 2 to 10 seconds) and it is typically seen in sleep. Synonyms: rhythmic spikes, generalized paroxysmal fast activity, fast paroxysmal rhythms, grand mal discharge, fast beta activity.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Polyspikes-morphology\n Two or more consecutive spikes.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Polyspike-and-slow-wave-morphology\n Two or more consecutive spikes associated with one or more slow waves.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Sharp-wave-morphology\n A transient clearly distinguished from background activity, with pointed peak at a conventional paper speed or time scale, and duration of 70-200 ms, i.e. over 1/4-1/5 s approximately. Main component is generally negative relative to other areas. Amplitude varies.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Sharp-and-slow-wave-morphology\n A sequence of a sharp wave and a slow wave.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Slow-sharp-wave-morphology\n A transient that bears all the characteristics of a sharp-wave, but exceeds 200 ms. Synonym: blunted sharp wave.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n High-frequency-oscillation-morphology\n HFO.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Hypsarrhythmia-classic-morphology\n Abnormal interictal high amplitude waves and a background of irregular spikes.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Hypsarrhythmia-modified-morphology\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Fast-spike-activity-morphology\n A burst consisting of a sequence of spikes. Duration greater than 1 s. Frequency at least in the alpha range.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Low-voltage-fast-activity-morphology\n Refers to the fast, and often recruiting activity which can be recorded at the onset of an ictal discharge, particularly in invasive EEG recording of a seizure.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Polysharp-waves-morphology\n A sequence of two or more sharp-waves.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Slow-wave-large-amplitude-morphology\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Irregular-delta-or-theta-activity-morphology\n EEG activity consisting of repetitive waves of inconsistent wave-duration but in delta and/or theta rang (greater than 125 ms).\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Electrodecremental-change-morphology\n Sudden desynchronization of electrical activity.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n DC-shift-morphology\n Shift of negative polarity of the direct current recordings, during seizures.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Disappearance-of-ongoing-activity-morphology\n Disappearance of the EEG activity that preceded the ictal event but still remnants of background activity (thus not enough to name it electrodecremental change).\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Polymorphic-delta-activity-morphology\n EEG activity consisting of waves in the delta range (over 250 ms duration for each wave) but of different morphology.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Frontal-intermittent-rhythmic-delta-activity-morphology\n Frontal intermittent rhythmic delta activity (FIRDA). Fairly regular or approximately sinusoidal waves, mostly occurring in bursts at 1.5-2.5 Hz over the frontal areas of one or both sides of the head. Comment: most commonly associated with unspecified encephalopathy, in adults.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Occipital-intermittent-rhythmic-delta-activity-morphology\n Occipital intermittent rhythmic delta activity (OIRDA). Fairly regular or approximately sinusoidal waves, mostly occurring in bursts at 2-3 Hz over the occipital or posterior head regions of one or both sides of the head. Frequently blocked or attenuated by opening the eyes. Comment: most commonly associated with unspecified encephalopathy, in children.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Temporal-intermittent-rhythmic-delta-activity-morphology\n Temporal intermittent rhythmic delta activity (TIRDA). Fairly regular or approximately sinusoidal waves, mostly occurring in bursts at over the temporal areas of one side of the head. Comment: most commonly associated with temporal lobe epilepsy.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Periodic-discharges-morphology\n Periodic discharges not further specified (PDs).\n \n requireChild\n \n \n Periodic-discharges-superimposed-activity\n \n requireChild\n \n \n suggestedTag\n Property-not-possible-to-determine\n \n \n Periodic-discharges-fast-superimposed-activity\n \n suggestedTag\n Finding-frequency\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Periodic-discharges-rhythmic-superimposed-activity\n \n suggestedTag\n Finding-frequency\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Periodic-discharge-sharpness\n \n requireChild\n \n \n suggestedTag\n Property-not-possible-to-determine\n \n \n Spiky-periodic-discharge-sharpness\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Sharp-periodic-discharge-sharpness\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Sharply-contoured-periodic-discharge-sharpness\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Blunt-periodic-discharge-sharpness\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Number-of-periodic-discharge-phases\n \n requireChild\n \n \n suggestedTag\n Property-not-possible-to-determine\n \n \n 1-periodic-discharge-phase\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n 2-periodic-discharge-phases\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n 3-periodic-discharge-phases\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Greater-than-3-periodic-discharge-phases\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Periodic-discharge-triphasic-morphology\n \n suggestedTag\n Property-not-possible-to-determine\n Property-exists\n Property-absence\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Periodic-discharge-absolute-amplitude\n \n requireChild\n \n \n suggestedTag\n Property-not-possible-to-determine\n \n \n Periodic-discharge-absolute-amplitude-very-low\n Lower than 20 microV.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Low-periodic-discharge-absolute-amplitude\n 20 to 49 microV.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Medium-periodic-discharge-absolute-amplitude\n 50 to 199 microV.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n High-periodic-discharge-absolute-amplitude\n Greater than 200 microV.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Periodic-discharge-relative-amplitude\n \n requireChild\n \n \n suggestedTag\n Property-not-possible-to-determine\n \n \n Periodic-discharge-relative-amplitude-less-than-equal-2\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Periodic-discharge-relative-amplitude-greater-than-2\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Periodic-discharge-polarity\n \n requireChild\n \n \n Periodic-discharge-postitive-polarity\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Periodic-discharge-negative-polarity\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Periodic-discharge-unclear-polarity\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n \n \n Source-analysis-property\n How the current in the brain reaches the electrode sensors.\n \n requireChild\n \n \n Source-analysis-laterality\n \n requireChild\n \n \n suggestedTag\n Brain-laterality\n \n \n \n Source-analysis-brain-region\n \n requireChild\n \n \n Source-analysis-frontal-perisylvian-superior-surface\n \n \n Source-analysis-frontal-lateral\n \n \n Source-analysis-frontal-mesial\n \n \n Source-analysis-frontal-polar\n \n \n Source-analysis-frontal-orbitofrontal\n \n \n Source-analysis-temporal-polar\n \n \n Source-analysis-temporal-basal\n \n \n Source-analysis-temporal-lateral-anterior\n \n \n Source-analysis-temporal-lateral-posterior\n \n \n Source-analysis-temporal-perisylvian-inferior-surface\n \n \n Source-analysis-central-lateral-convexity\n \n \n Source-analysis-central-mesial\n \n \n Source-analysis-central-sulcus-anterior-surface\n \n \n Source-analysis-central-sulcus-posterior-surface\n \n \n Source-analysis-central-opercular\n \n \n Source-analysis-parietal-lateral-convexity\n \n \n Source-analysis-parietal-mesial\n \n \n Source-analysis-parietal-opercular\n \n \n Source-analysis-occipital-lateral\n \n \n Source-analysis-occipital-mesial\n \n \n Source-analysis-occipital-basal\n \n \n Source-analysis-insula\n \n \n \n \n Location-property\n Location can be scored for findings. Semiologic finding can also be characterized by the somatotopic modifier (i.e. the part of the body where it occurs). In this respect, laterality (left, right, symmetric, asymmetric, left greater than right, right greater than left), body part (eyelid, face, arm, leg, trunk, visceral, hemi-) and centricity (axial, proximal limb, distal limb) can be scored.\n \n requireChild\n \n \n Brain-laterality\n \n requireChild\n \n \n Brain-laterality-left\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Brain-laterality-left-greater-right\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Brain-laterality-right\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Brain-laterality-right-greater-left\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Brain-laterality-midline\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Brain-laterality-diffuse-asynchronous\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Brain-region\n \n requireChild\n \n \n Brain-region-frontal\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Brain-region-temporal\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Brain-region-central\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Brain-region-parietal\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Brain-region-occipital\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Body-part-location\n \n requireChild\n \n \n Eyelid-location\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Face-location\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Arm-location\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Leg-location\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Trunk-location\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Visceral-location\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Hemi-location\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Brain-centricity\n \n requireChild\n \n \n Brain-centricity-axial\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Brain-centricity-proximal-limb\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Brain-centricity-distal-limb\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Sensors\n Lists all corresponding sensors (electrodes/channels in montage). The sensor-group is selected from a list defined in the site-settings for each EEG-lab.\n \n requireChild\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Finding-propagation\n When propagation within the graphoelement is observed, first the location of the onset region is scored. Then, the location of the propagation can be noted.\n \n suggestedTag\n Property-exists\n Property-absence\n Brain-laterality\n Brain-region\n Sensors\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Multifocal-finding\n When the same interictal graphoelement is observed bilaterally and at least in three independent locations, can score them using one entry, and choosing multifocal as a descriptor of the locations of the given interictal graphoelements, optionally emphasizing the involved, and the most active sites.\n \n suggestedTag\n Property-not-possible-to-determine\n Property-exists\n Property-absence\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Modulators-property\n For each described graphoelement, the influence of the modulators can be scored. Only modulators present in the recording are scored.\n \n requireChild\n \n \n Modulators-reactivity\n Susceptibility of individual rhythms or the EEG as a whole to change following sensory stimulation or other physiologic actions.\n \n requireChild\n \n \n suggestedTag\n Property-exists\n Property-absence\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Eye-closure-sensitivity\n Eye closure sensitivity.\n \n suggestedTag\n Property-exists\n Property-absence\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Eye-opening-passive\n Passive eye opening. Used with base schema Increasing/Decreasing.\n \n suggestedTag\n Property-not-possible-to-determine\n Finding-stopped-by\n Finding-unmodified\n Finding-triggered-by\n \n \n \n Medication-effect-EEG\n Medications effect on EEG. Used with base schema Increasing/Decreasing.\n \n suggestedTag\n Property-not-possible-to-determine\n Finding-stopped-by\n Finding-unmodified\n \n \n \n Medication-reduction-effect-EEG\n Medications reduction or withdrawal effect on EEG. Used with base schema Increasing/Decreasing.\n \n suggestedTag\n Property-not-possible-to-determine\n Finding-stopped-by\n Finding-unmodified\n \n \n \n Auditive-stimuli-effect\n Used with base schema Increasing/Decreasing.\n \n suggestedTag\n Property-not-possible-to-determine\n Finding-stopped-by\n Finding-unmodified\n \n \n \n Nociceptive-stimuli-effect\n Used with base schema Increasing/Decreasing.\n \n suggestedTag\n Property-not-possible-to-determine\n Finding-stopped-by\n Finding-unmodified\n Finding-triggered-by\n \n \n \n Physical-effort-effect\n Used with base schema Increasing/Decreasing\n \n suggestedTag\n Property-not-possible-to-determine\n Finding-stopped-by\n Finding-unmodified\n Finding-triggered-by\n \n \n \n Cognitive-task-effect\n Used with base schema Increasing/Decreasing.\n \n suggestedTag\n Property-not-possible-to-determine\n Finding-stopped-by\n Finding-unmodified\n Finding-triggered-by\n \n \n \n Other-modulators-effect-EEG\n \n requireChild\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Facilitating-factor\n Facilitating factors are defined as transient and sporadic endogenous or exogenous elements capable of augmenting seizure incidence (increasing the likelihood of seizure occurrence).\n \n Facilitating-factor-alcohol\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Facilitating-factor-awake\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Facilitating-factor-catamenial\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Facilitating-factor-fever\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Facilitating-factor-sleep\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Facilitating-factor-sleep-deprived\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Facilitating-factor-other\n \n requireChild\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Provocative-factor\n Provocative factors are defined as transient and sporadic endogenous or exogenous elements capable of evoking/triggering seizures immediately following the exposure to it.\n \n requireChild\n \n \n Hyperventilation-provoked\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Reflex-provoked\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Medication-effect-clinical\n Medications clinical effect. Used with base schema Increasing/Decreasing.\n \n suggestedTag\n Finding-stopped-by\n Finding-unmodified\n \n \n \n Medication-reduction-effect-clinical\n Medications reduction or withdrawal clinical effect. Used with base schema Increasing/Decreasing.\n \n suggestedTag\n Finding-stopped-by\n Finding-unmodified\n \n \n \n Other-modulators-effect-clinical\n \n requireChild\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Intermittent-photic-stimulation-effect\n \n requireChild\n \n \n Posterior-stimulus-dependent-intermittent-photic-stimulation-response\n \n suggestedTag\n Finding-frequency\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Posterior-stimulus-independent-intermittent-photic-stimulation-response-limited\n limited to the stimulus-train\n \n suggestedTag\n Finding-frequency\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Posterior-stimulus-independent-intermittent-photic-stimulation-response-self-sustained\n \n suggestedTag\n Finding-frequency\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Generalized-photoparoxysmal-intermittent-photic-stimulation-response-limited\n Limited to the stimulus-train.\n \n suggestedTag\n Finding-frequency\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Generalized-photoparoxysmal-intermittent-photic-stimulation-response-self-sustained\n \n suggestedTag\n Finding-frequency\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Activation-of-pre-existing-epileptogenic-area-intermittent-photic-stimulation-effect\n \n suggestedTag\n Finding-frequency\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Unmodified-intermittent-photic-stimulation-effect\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Quality-of-hyperventilation\n \n requireChild\n \n \n Hyperventilation-refused-procedure\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Hyperventilation-poor-effort\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Hyperventilation-good-effort\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Hyperventilation-excellent-effort\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Modulators-effect\n Tags for describing the influence of the modulators\n \n requireChild\n \n \n Modulators-effect-continuous-during-NRS\n Continuous during non-rapid-eye-movement-sleep (NRS)\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Modulators-effect-only-during\n \n #\n Only during Sleep/Awakening/Hyperventilation/Physical effort/Cognitive task. Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Modulators-effect-change-of-patterns\n Change of patterns during sleep/awakening.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n \n Time-related-property\n Important to estimate how often an interictal abnormality is seen in the recording.\n \n requireChild\n \n \n Appearance-mode\n Describes how the non-ictal EEG pattern/graphoelement is distributed through the recording.\n \n requireChild\n \n \n suggestedTag\n Property-not-possible-to-determine\n \n \n Random-appearance-mode\n Occurrence of the non-ictal EEG pattern / graphoelement without any rhythmicity / periodicity.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Periodic-appearance-mode\n Non-ictal EEG pattern / graphoelement occurring at an approximately regular rate / interval (generally of 1 to several seconds).\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Variable-appearance-mode\n Occurrence of non-ictal EEG pattern / graphoelements, that is sometimes rhythmic or periodic, other times random, throughout the recording.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Intermittent-appearance-mode\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Continuous-appearance-mode\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Discharge-pattern\n Describes the organization of the EEG signal within the discharge (distinguish between single and repetitive discharges)\n \n requireChild\n \n \n Single-discharge-pattern\n Applies to the intra-burst pattern: a graphoelement that is not repetitive; before and after the graphoelement one can distinguish the background activity.\n \n suggestedTag\n Finding-incidence\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Rhythmic-trains-or-bursts-discharge-pattern\n Applies to the intra-burst pattern: a non-ictal graphoelement that repeats itself without returning to the background activity between them. The graphoelements within this repetition occur at approximately constant period.\n \n suggestedTag\n Finding-prevalence\n Finding-frequency\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Arrhythmic-trains-or-bursts-discharge-pattern\n Applies to the intra-burst pattern: a non-ictal graphoelement that repeats itself without returning to the background activity between them. The graphoelements within this repetition occur at inconstant period.\n \n suggestedTag\n Finding-prevalence\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Fragmented-discharge-pattern\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Periodic-discharge-time-related-features\n Periodic discharges not further specified (PDs) time-relayed features tags.\n \n requireChild\n \n \n Periodic-discharge-duration\n \n requireChild\n \n \n suggestedTag\n Property-not-possible-to-determine\n \n \n Very-brief-periodic-discharge-duration\n Less than 10 sec.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Brief-periodic-discharge-duration\n 10 to 59 sec.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Intermediate-periodic-discharge-duration\n 1 to 4.9 min.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Long-periodic-discharge-duration\n 5 to 59 min.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Very-long-periodic-discharge-duration\n Greater than 1 hour.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Periodic-discharge-onset\n \n requireChild\n \n \n suggestedTag\n Property-not-possible-to-determine\n \n \n Sudden-periodic-discharge-onset\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Gradual-periodic-discharge-onset\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Periodic-discharge-dynamics\n \n requireChild\n \n \n suggestedTag\n Property-not-possible-to-determine\n \n \n Evolving-periodic-discharge-dynamics\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Fluctuating-periodic-discharge-dynamics\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Static-periodic-discharge-dynamics\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n \n Finding-extent\n Percentage of occurrence during the recording (background activity and interictal finding).\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Finding-incidence\n How often it occurs/time-epoch.\n \n requireChild\n \n \n Only-once-finding-incidence\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Rare-finding-incidence\n less than 1/h\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Uncommon-finding-incidence\n 1/5 min to 1/h.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Occasional-finding-incidence\n 1/min to 1/5min.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Frequent-finding-incidence\n 1/10 s to 1/min.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Abundant-finding-incidence\n Greater than 1/10 s).\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Finding-prevalence\n The percentage of the recording covered by the train/burst.\n \n requireChild\n \n \n Rare-finding-prevalence\n Less than 1 percent.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Occasional-finding-prevalence\n 1 to 9 percent.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Frequent-finding-prevalence\n 10 to 49 percent.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Abundant-finding-prevalence\n 50 to 89 percent.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Continuous-finding-prevalence\n Greater than 90 percent.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n \n Posterior-dominant-rhythm-property\n Posterior dominant rhythm is the most often scored EEG feature in clinical practice. Therefore, there are specific terms that can be chosen for characterizing the PDR.\n \n requireChild\n \n \n Posterior-dominant-rhythm-amplitude-range\n \n requireChild\n \n \n suggestedTag\n Property-not-possible-to-determine\n \n \n Low-posterior-dominant-rhythm-amplitude-range\n Low (less than 20 microV).\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Medium-posterior-dominant-rhythm-amplitude-range\n Medium (between 20 and 70 microV).\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n High-posterior-dominant-rhythm-amplitude-range\n High (more than 70 microV).\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Posterior-dominant-rhythm-frequency-asymmetry\n When symmetrical could be labeled with base schema Symmetrical tag.\n \n requireChild\n \n \n Posterior-dominant-rhythm-frequency-asymmetry-lower-left\n Hz lower on the left side.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Posterior-dominant-rhythm-frequency-asymmetry-lower-right\n Hz lower on the right side.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Posterior-dominant-rhythm-eye-opening-reactivity\n Change (disappearance or measurable decrease in amplitude) of a posterior dominant rhythm following eye-opening. Eye closure has the opposite effect.\n \n suggestedTag\n Property-not-possible-to-determine\n \n \n Posterior-dominant-rhythm-eye-opening-reactivity-reduced-left\n Reduced left side reactivity.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Posterior-dominant-rhythm-eye-opening-reactivity-reduced-right\n Reduced right side reactivity.\n \n #\n free text\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Posterior-dominant-rhythm-eye-opening-reactivity-reduced-both\n Reduced reactivity on both sides.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Posterior-dominant-rhythm-organization\n When normal could be labeled with base schema Normal tag.\n \n requireChild\n \n \n Posterior-dominant-rhythm-organization-poorly-organized\n Poorly organized.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Posterior-dominant-rhythm-organization-disorganized\n Disorganized.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Posterior-dominant-rhythm-organization-markedly-disorganized\n Markedly disorganized.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Posterior-dominant-rhythm-caveat\n Caveat to the annotation of PDR.\n \n requireChild\n \n \n No-posterior-dominant-rhythm-caveat\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Posterior-dominant-rhythm-caveat-only-open-eyes-during-the-recording\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Posterior-dominant-rhythm-caveat-sleep-deprived-caveat\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Posterior-dominant-rhythm-caveat-drowsy\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Posterior-dominant-rhythm-caveat-only-following-hyperventilation\n \n \n \n Absence-of-posterior-dominant-rhythm\n Reason for absence of PDR.\n \n requireChild\n \n \n Absence-of-posterior-dominant-rhythm-artifacts\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Absence-of-posterior-dominant-rhythm-extreme-low-voltage\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Absence-of-posterior-dominant-rhythm-eye-closure-could-not-be-achieved\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Absence-of-posterior-dominant-rhythm-lack-of-awake-period\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Absence-of-posterior-dominant-rhythm-lack-of-compliance\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Absence-of-posterior-dominant-rhythm-other-causes\n \n requireChild\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n \n Episode-property\n \n requireChild\n \n \n Seizure-classification\n Epileptic seizures are named using the current ILAE seizure classification (Fisher et al., 2017, Beniczky et al., 2017).\n \n requireChild\n \n \n Motor-onset-seizure\n \n Myoclonic-motor-onset-seizure\n \n \n Negative-myoclonic-motor-onset-seizure\n \n \n Clonic-motor-onset-seizure\n \n \n Tonic-motor-onset-seizure\n \n \n Atonic-motor-onset-seizure\n \n \n Myoclonic-atonic-motor-onset-seizure\n \n \n Myoclonic-tonic-clonic-motor-onset-seizure\n \n \n Tonic-clonic-motor-onset-seizure\n \n \n Automatism-motor-onset-seizure\n \n \n Hyperkinetic-motor-onset-seizure\n \n \n Epileptic-spasm-episode\n \n \n \n Nonmotor-onset-seizure\n \n Behavior-arrest-nonmotor-onset-seizure\n \n \n Sensory-nonmotor-onset-seizure\n \n \n Emotional-nonmotor-onset-seizure\n \n \n Cognitive-nonmotor-onset-seizure\n \n \n Autonomic-nonmotor-onset-seizure\n \n \n \n Absence-seizure\n \n Typical-absence-seizure\n \n \n Atypical-absence-seizure\n \n \n Myoclonic-absence-seizure\n \n \n Eyelid-myoclonia-absence-seizure\n \n \n \n \n Episode-phase\n The electroclinical findings (i.e., the seizure semiology and the ictal EEG) are divided in three phases: onset, propagation, and postictal.\n \n requireChild\n \n \n suggestedTag\n Seizure-semiology-manifestation\n Postictal-semiology-manifestation\n Ictal-EEG-patterns\n \n \n Episode-phase-initial\n \n \n Episode-phase-subsequent\n \n \n Episode-phase-postictal\n \n \n \n Seizure-semiology-manifestation\n Semiology is described according to the ILAE Glossary of Descriptive Terminology for Ictal Semiology (Blume et al., 2001). Besides the name, the semiologic finding can also be characterized by the somatotopic modifier, laterality, body part and centricity. Uses Location-property tags.\n \n requireChild\n \n \n Semiology-motor-manifestation\n \n Semiology-elementary-motor\n \n Semiology-motor-tonic\n A sustained increase in muscle contraction lasting a few seconds to minutes.\n \n suggestedTag\n Brain-laterality\n Body-part-location\n Brain-centricity\n Episode-event-count\n \n \n \n Semiology-motor-dystonic\n Sustained contractions of both agonist and antagonist muscles producing athetoid or twisting movements, which, when prolonged, may produce abnormal postures.\n \n suggestedTag\n Brain-laterality\n Body-part-location\n Brain-centricity\n Episode-event-count\n \n \n \n Semiology-motor-epileptic-spasm\n A sudden flexion, extension, or mixed extension flexion of predominantly proximal and truncal muscles that is usually more sustained than a myoclonic movement but not so sustained as a tonic seizure (i.e., about 1 s). Limited forms may occur: grimacing, head nodding. Frequent occurrence in clusters.\n \n suggestedTag\n Brain-laterality\n Body-part-location\n Brain-centricity\n Episode-event-count\n \n \n \n Semiology-motor-postural\n Adoption of a posture that may be bilaterally symmetric or asymmetric (as in a fencing posture).\n \n suggestedTag\n Brain-laterality\n Body-part-location\n Brain-centricity\n Episode-event-count\n \n \n \n Semiology-motor-versive\n A sustained, forced conjugate ocular, cephalic, and/or truncal rotation or lateral deviation from the midline.\n \n suggestedTag\n Body-part-location\n Episode-event-count\n \n \n \n Semiology-motor-clonic\n Myoclonus that is regularly repetitive, involves the same muscle groups, at a frequency of about 2 to 3 c/s, and is prolonged. Synonym: rhythmic myoclonus .\n \n suggestedTag\n Brain-laterality\n Body-part-location\n Brain-centricity\n Episode-event-count\n \n \n \n Semiology-motor-myoclonic\n Characterized by myoclonus. MYOCLONUS : sudden, brief (lower than 100 ms) involuntary single or multiple contraction(s) of muscles(s) or muscle groups of variable topography (axial, proximal limb, distal).\n \n suggestedTag\n Brain-laterality\n Body-part-location\n Brain-centricity\n Episode-event-count\n \n \n \n Semiology-motor-jacksonian-march\n Term indicating spread of clonic movements through contiguous body parts unilaterally.\n \n suggestedTag\n Brain-laterality\n Body-part-location\n Brain-centricity\n Episode-event-count\n \n \n \n Semiology-motor-negative-myoclonus\n Characterized by negative myoclonus. NEGATIVE MYOCLONUS: interruption of tonic muscular activity for lower than 500 ms without evidence of preceding myoclonia.\n \n suggestedTag\n Brain-laterality\n Body-part-location\n Brain-centricity\n Episode-event-count\n \n \n \n Semiology-motor-tonic-clonic\n A sequence consisting of a tonic followed by a clonic phase. Variants such as clonic-tonic-clonic may be seen. Asymmetry of limb posture during the tonic phase of a GTC: one arm is rigidly extended at the elbow (often with the fist clenched tightly and flexed at the wrist), whereas the opposite arm is flexed at the elbow.\n \n requireChild\n \n \n Semiology-motor-tonic-clonic-without-figure-of-four\n \n suggestedTag\n Brain-laterality\n Body-part-location\n Brain-centricity\n Episode-event-count\n \n \n \n Semiology-motor-tonic-clonic-with-figure-of-four-extension-left-elbow\n \n suggestedTag\n Brain-laterality\n Body-part-location\n Brain-centricity\n Episode-event-count\n \n \n \n Semiology-motor-tonic-clonic-with-figure-of-four-extension-right-elbow\n \n suggestedTag\n Brain-laterality\n Body-part-location\n Brain-centricity\n Episode-event-count\n \n \n \n \n Semiology-motor-astatic\n Loss of erect posture that results from an atonic, myoclonic, or tonic mechanism. Synonym: drop attack.\n \n suggestedTag\n Brain-laterality\n Body-part-location\n Brain-centricity\n Episode-event-count\n \n \n \n Semiology-motor-atonic\n Sudden loss or diminution of muscle tone without apparent preceding myoclonic or tonic event lasting greater or equal to 1 to 2 s, involving head, trunk, jaw, or limb musculature.\n \n suggestedTag\n Brain-laterality\n Body-part-location\n Brain-centricity\n Episode-event-count\n \n \n \n Semiology-motor-eye-blinking\n \n suggestedTag\n Brain-laterality\n Episode-event-count\n \n \n \n Semiology-motor-other-elementary-motor\n \n requireChild\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Semiology-motor-automatisms\n \n Semiology-motor-automatisms-mimetic\n Facial expression suggesting an emotional state, often fear.\n \n suggestedTag\n Episode-responsiveness\n Episode-appearance\n Episode-event-count\n \n \n \n Semiology-motor-automatisms-oroalimentary\n Lip smacking, lip pursing, chewing, licking, tooth grinding, or swallowing.\n \n suggestedTag\n Episode-responsiveness\n Episode-appearance\n Episode-event-count\n \n \n \n Semiology-motor-automatisms-dacrystic\n Bursts of crying.\n \n suggestedTag\n Episode-responsiveness\n Episode-appearance\n Episode-event-count\n \n \n \n Semiology-motor-automatisms-dyspraxic\n Inability to perform learned movements spontaneously or on command or imitation despite intact relevant motor and sensory systems and adequate comprehension and cooperation.\n \n suggestedTag\n Brain-laterality\n Body-part-location\n Brain-centricity\n Episode-responsiveness\n Episode-appearance\n Episode-event-count\n \n \n \n Semiology-motor-automatisms-manual\n 1. Indicates principally distal components, bilateral or unilateral. 2. Fumbling, tapping, manipulating movements.\n \n suggestedTag\n Brain-laterality\n Brain-centricity\n Episode-responsiveness\n Episode-appearance\n Episode-event-count\n \n \n \n Semiology-motor-automatisms-gestural\n Semipurposive, asynchronous hand movements. Often unilateral.\n \n suggestedTag\n Brain-laterality\n Episode-responsiveness\n Episode-appearance\n Episode-event-count\n \n \n \n Semiology-motor-automatisms-pedal\n 1. Indicates principally distal components, bilateral or unilateral. 2. Fumbling, tapping, manipulating movements.\n \n suggestedTag\n Brain-laterality\n Brain-centricity\n Episode-responsiveness\n Episode-appearance\n Episode-event-count\n \n \n \n Semiology-motor-automatisms-hypermotor\n 1. Involves predominantly proximal limb or axial muscles producing irregular sequential ballistic movements, such as pedaling, pelvic thrusting, thrashing, rocking movements. 2. Increase in rate of ongoing movements or inappropriately rapid performance of a movement.\n \n suggestedTag\n Brain-laterality\n Body-part-location\n Brain-centricity\n Episode-responsiveness\n Episode-appearance\n Episode-event-count\n \n \n \n Semiology-motor-automatisms-hypokinetic\n A decrease in amplitude and/or rate or arrest of ongoing motor activity.\n \n suggestedTag\n Brain-laterality\n Body-part-location\n Brain-centricity\n Episode-responsiveness\n Episode-appearance\n Episode-event-count\n \n \n \n Semiology-motor-automatisms-gelastic\n Bursts of laughter or giggling, usually without an appropriate affective tone.\n \n suggestedTag\n Episode-responsiveness\n Episode-appearance\n Episode-event-count\n \n \n \n Semiology-motor-other-automatisms\n \n requireChild\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Semiology-motor-behavioral-arrest\n Interruption of ongoing motor activity or of ongoing behaviors with fixed gaze, without movement of the head or trunk (oro-alimentary and hand automatisms may continue).\n \n suggestedTag\n Brain-laterality\n Body-part-location\n Brain-centricity\n Episode-event-count\n \n \n \n \n Semiology-non-motor-manifestation\n \n Semiology-sensory\n \n Semiology-sensory-headache\n Headache occurring in close temporal proximity to the seizure or as the sole seizure manifestation.\n \n suggestedTag\n Brain-laterality\n Episode-event-count\n \n \n \n Semiology-sensory-visual\n Flashing or flickering lights, spots, simple patterns, scotomata, or amaurosis.\n \n suggestedTag\n Brain-laterality\n Episode-event-count\n \n \n \n Semiology-sensory-auditory\n Buzzing, drumming sounds or single tones.\n \n suggestedTag\n Brain-laterality\n Episode-event-count\n \n \n \n Semiology-sensory-olfactory\n \n suggestedTag\n Body-part-location\n Episode-event-count\n \n \n \n Semiology-sensory-gustatory\n Taste sensations including acidic, bitter, salty, sweet, or metallic.\n \n suggestedTag\n Episode-event-count\n \n \n \n Semiology-sensory-epigastric\n Abdominal discomfort including nausea, emptiness, tightness, churning, butterflies, malaise, pain, and hunger; sensation may rise to chest or throat. Some phenomena may reflect ictal autonomic dysfunction.\n \n suggestedTag\n Episode-event-count\n \n \n \n Semiology-sensory-somatosensory\n Tingling, numbness, electric-shock sensation, sense of movement or desire to move.\n \n suggestedTag\n Brain-laterality\n Body-part-location\n Brain-centricity\n Episode-event-count\n \n \n \n Semiology-sensory-painful\n Peripheral (lateralized/bilateral), cephalic, abdominal.\n \n suggestedTag\n Brain-laterality\n Body-part-location\n Brain-centricity\n Episode-event-count\n \n \n \n Semiology-sensory-autonomic-sensation\n A sensation consistent with involvement of the autonomic nervous system, including cardiovascular, gastrointestinal, sudomotor, vasomotor, and thermoregulatory functions. (Thus autonomic aura; cf. autonomic events 3.0).\n \n suggestedTag\n Episode-event-count\n \n \n \n Semiology-sensory-other\n \n requireChild\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Semiology-experiential\n \n Semiology-experiential-affective-emotional\n Components include fear, depression, joy, and (rarely) anger.\n \n suggestedTag\n Episode-event-count\n \n \n \n Semiology-experiential-hallucinatory\n Composite perceptions without corresponding external stimuli involving visual, auditory, somatosensory, olfactory, and/or gustatory phenomena. Example: hearing and seeing people talking.\n \n suggestedTag\n Episode-event-count\n \n \n \n Semiology-experiential-illusory\n An alteration of actual percepts involving the visual, auditory, somatosensory, olfactory, or gustatory systems.\n \n suggestedTag\n Episode-event-count\n \n \n \n Semiology-experiential-mnemonic\n Components that reflect ictal dysmnesia such as feelings of familiarity (deja-vu) and unfamiliarity (jamais-vu).\n \n Semiology-experiential-mnemonic-Deja-vu\n \n suggestedTag\n Episode-event-count\n \n \n \n Semiology-experiential-mnemonic-Jamais-vu\n \n suggestedTag\n Episode-event-count\n \n \n \n \n Semiology-experiential-other\n \n requireChild\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Semiology-dyscognitive\n The term describes events in which (1) disturbance of cognition is the predominant or most apparent feature, and (2a) two or more of the following components are involved, or (2b) involvement of such components remains undetermined. Otherwise, use the more specific term (e.g., mnemonic experiential seizure or hallucinatory experiential seizure). Components of cognition: ++ perception: symbolic conception of sensory information ++ attention: appropriate selection of a principal perception or task ++ emotion: appropriate affective significance of a perception ++ memory: ability to store and retrieve percepts or concepts ++ executive function: anticipation, selection, monitoring of consequences, and initiation of motor activity including praxis, speech.\n \n suggestedTag\n Episode-event-count\n \n \n \n Semiology-language-related\n \n Semiology-language-related-vocalization\n \n suggestedTag\n Episode-event-count\n \n \n \n Semiology-language-related-verbalization\n \n suggestedTag\n Episode-event-count\n \n \n \n Semiology-language-related-dysphasia\n \n suggestedTag\n Episode-event-count\n \n \n \n Semiology-language-related-aphasia\n \n suggestedTag\n Episode-event-count\n \n \n \n Semiology-language-related-other\n \n requireChild\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Semiology-autonomic\n \n Semiology-autonomic-pupillary\n Mydriasis, miosis (either bilateral or unilateral).\n \n suggestedTag\n Brain-laterality\n Episode-event-count\n \n \n \n Semiology-autonomic-hypersalivation\n Increase in production of saliva leading to uncontrollable drooling\n \n suggestedTag\n Episode-event-count\n \n \n \n Semiology-autonomic-respiratory-apnoeic\n subjective shortness of breath, hyperventilation, stridor, coughing, choking, apnea, oxygen desaturation, neurogenic pulmonary edema.\n \n suggestedTag\n Episode-event-count\n \n \n \n Semiology-autonomic-cardiovascular\n Modifications of heart rate (tachycardia, bradycardia), cardiac arrhythmias (such as sinus arrhythmia, sinus arrest, supraventricular tachycardia, atrial premature depolarizations, ventricular premature depolarizations, atrio-ventricular block, bundle branch block, atrioventricular nodal escape rhythm, asystole).\n \n suggestedTag\n Episode-event-count\n \n \n \n Semiology-autonomic-gastrointestinal\n Nausea, eructation, vomiting, retching, abdominal sensations, abdominal pain, flatulence, spitting, diarrhea.\n \n suggestedTag\n Episode-event-count\n \n \n \n Semiology-autonomic-urinary-incontinence\n urinary urge (intense urinary urge at the beginning of seizures), urinary incontinence, ictal urination (rare symptom of partial seizures without loss of consciousness).\n \n suggestedTag\n Episode-event-count\n \n \n \n Semiology-autonomic-genital\n Sexual auras (erotic thoughts and feelings, sexual arousal and orgasm). Genital auras (unpleasant, sometimes painful, frightening or emotionally neutral somatosensory sensations in the genitals that can be accompanied by ictal orgasm). Sexual automatisms (hypermotor movements consisting of writhing, thrusting, rhythmic movements of the pelvis, arms and legs, sometimes associated with picking and rhythmic manipulation of the groin or genitalia, exhibitionism and masturbation).\n \n suggestedTag\n Episode-event-count\n \n \n \n Semiology-autonomic-vasomotor\n Flushing or pallor (may be accompanied by feelings of warmth, cold and pain).\n \n suggestedTag\n Episode-event-count\n \n \n \n Semiology-autonomic-sudomotor\n Sweating and piloerection (may be accompanied by feelings of warmth, cold and pain).\n \n suggestedTag\n Brain-laterality\n Episode-event-count\n \n \n \n Semiology-autonomic-thermoregulatory\n Hyperthermia, fever.\n \n suggestedTag\n Episode-event-count\n \n \n \n Semiology-autonomic-other\n \n requireChild\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n \n Semiology-manifestation-other\n \n requireChild\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Postictal-semiology-manifestation\n \n requireChild\n \n \n Postictal-semiology-unconscious\n \n suggestedTag\n Episode-event-count\n \n \n \n Postictal-semiology-quick-recovery-of-consciousness\n Quick recovery of awareness and responsiveness.\n \n suggestedTag\n Episode-event-count\n \n \n \n Postictal-semiology-aphasia-or-dysphasia\n Impaired communication involving language without dysfunction of relevant primary motor or sensory pathways, manifested as impaired comprehension, anomia, parahasic errors or a combination of these.\n \n suggestedTag\n Episode-event-count\n \n \n \n Postictal-semiology-behavioral-change\n Occurring immediately after a aseizure. Including psychosis, hypomanina, obsessive-compulsive behavior.\n \n suggestedTag\n Episode-event-count\n \n \n \n Postictal-semiology-hemianopia\n Postictal visual loss in a a hemi field.\n \n suggestedTag\n Brain-laterality\n Episode-event-count\n \n \n \n Postictal-semiology-impaired-cognition\n Decreased Cognitive performance involving one or more of perception, attention, emotion, memory, execution, praxis, speech.\n \n suggestedTag\n Episode-event-count\n \n \n \n Postictal-semiology-dysphoria\n Depression, irritability, euphoric mood, fear, anxiety.\n \n suggestedTag\n Episode-event-count\n \n \n \n Postictal-semiology-headache\n Headache with features of tension-type or migraine headache that develops within 3 h following the seizure and resolves within 72 h after seizure.\n \n suggestedTag\n Episode-event-count\n \n \n \n Postictal-semiology-nose-wiping\n Noes-wiping usually within 60 sec of seizure offset, usually with the hand ipsilateral to the seizure onset.\n \n suggestedTag\n Brain-laterality\n Episode-event-count\n \n \n \n Postictal-semiology-anterograde-amnesia\n Impaired ability to remember new material.\n \n suggestedTag\n Episode-event-count\n \n \n \n Postictal-semiology-retrograde-amnesia\n Impaired ability to recall previously remember material.\n \n suggestedTag\n Episode-event-count\n \n \n \n Postictal-semiology-paresis\n Todds palsy. Any unilateral postictal dysfunction relating to motor, language, sensory and/or integrative functions.\n \n suggestedTag\n Brain-laterality\n Body-part-location\n Brain-centricity\n Episode-event-count\n \n \n \n Postictal-semiology-sleep\n Invincible need to sleep after a seizure.\n \n \n Postictal-semiology-unilateral-myoclonic-jerks\n unilateral motor phenomena, other then specified, occurring in postictal phase.\n \n \n Postictal-semiology-other-unilateral-motor-phenomena\n \n requireChild\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Polygraphic-channel-relation-to-episode\n \n requireChild\n \n \n suggestedTag\n Property-not-possible-to-determine\n \n \n Polygraphic-channel-cause-to-episode\n \n \n Polygraphic-channel-consequence-of-episode\n \n \n \n Ictal-EEG-patterns\n \n Ictal-EEG-patterns-obscured-by-artifacts\n The interpretation of the EEG is not possible due to artifacts.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Ictal-EEG-activity\n \n suggestedTag\n Polyspikes-morphology\n Fast-spike-activity-morphology\n Low-voltage-fast-activity-morphology\n Polysharp-waves-morphology\n Spike-and-slow-wave-morphology\n Polyspike-and-slow-wave-morphology\n Sharp-and-slow-wave-morphology\n Rhythmic-activity-morphology\n Slow-wave-large-amplitude-morphology\n Irregular-delta-or-theta-activity-morphology\n Electrodecremental-change-morphology\n DC-shift-morphology\n Disappearance-of-ongoing-activity-morphology\n Brain-laterality\n Brain-region\n Sensors\n Source-analysis-laterality\n Source-analysis-brain-region\n Episode-event-count\n \n \n \n Postictal-EEG-activity\n \n suggestedTag\n Brain-laterality\n Body-part-location\n Brain-centricity\n \n \n \n \n Episode-time-context-property\n Additional clinically relevant features related to episodes can be scored under timing and context. If needed, episode duration can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Temporal-value/Duration.\n \n Episode-consciousness\n \n requireChild\n \n \n suggestedTag\n Property-not-possible-to-determine\n \n \n Episode-consciousness-not-tested\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Episode-consciousness-affected\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Episode-consciousness-mildly-affected\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Episode-consciousness-not-affected\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Episode-awareness\n \n suggestedTag\n Property-not-possible-to-determine\n Property-exists\n Property-absence\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Clinical-EEG-temporal-relationship\n \n suggestedTag\n Property-not-possible-to-determine\n \n \n Clinical-start-followed-EEG\n Clinical start, followed by EEG start by X seconds.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n timeUnits\n \n \n \n \n EEG-start-followed-clinical\n EEG start, followed by clinical start by X seconds.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n timeUnits\n \n \n \n \n Simultaneous-start-clinical-EEG\n \n \n Clinical-EEG-temporal-relationship-notes\n Clinical notes to annotate the clinical-EEG temporal relationship.\n \n #\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Episode-event-count\n Number of stereotypical episodes during the recording.\n \n suggestedTag\n Property-not-possible-to-determine\n \n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n State-episode-start\n State at the start of the episode.\n \n requireChild\n \n \n suggestedTag\n Property-not-possible-to-determine\n \n \n Episode-start-from-sleep\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Episode-start-from-awake\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Episode-postictal-phase\n \n suggestedTag\n Property-not-possible-to-determine\n \n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n timeUnits\n \n \n \n \n Episode-prodrome\n Prodrome is a preictal phenomenon, and it is defined as a subjective or objective clinical alteration (e.g., ill-localized sensation or agitation) that heralds the onset of an epileptic seizure but does not form part of it (Blume et al., 2001). Therefore, prodrome should be distinguished from aura (which is an ictal phenomenon).\n \n suggestedTag\n Property-exists\n Property-absence\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Episode-tongue-biting\n \n suggestedTag\n Property-exists\n Property-absence\n \n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Episode-responsiveness\n \n requireChild\n \n \n suggestedTag\n Property-not-possible-to-determine\n \n \n Episode-responsiveness-preserved\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Episode-responsiveness-affected\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Episode-appearance\n \n requireChild\n \n \n Episode-appearance-interactive\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Episode-appearance-spontaneous\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Seizure-dynamics\n Spatiotemporal dynamics can be scored (evolution in morphology; evolution in frequency; evolution in location).\n \n requireChild\n \n \n Seizure-dynamics-evolution-morphology\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Seizure-dynamics-evolution-frequency\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Seizure-dynamics-evolution-location\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Seizure-dynamics-not-possible-to-determine\n Not possible to determine.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n \n \n Other-finding-property\n \n requireChild\n \n \n Artifact-significance-to-recording\n It is important to score the significance of the described artifacts: recording is not interpretable, recording of reduced diagnostic value, does not interfere with the interpretation of the recording.\n \n requireChild\n \n \n Recording-not-interpretable-due-to-artifact\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Recording-of-reduced-diagnostic-value-due-to-artifact\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Artifact-does-not-interfere-recording\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Finding-significance-to-recording\n Significance of finding. When normal/abnormal could be labeled with base schema Normal/Abnormal tags.\n \n requireChild\n \n \n Finding-no-definite-abnormality\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Finding-significance-not-possible-to-determine\n Not possible to determine.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Finding-frequency\n Value in Hz (number) typed in.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n frequencyUnits\n \n \n \n \n Finding-amplitude\n Value in microvolts (number) typed in.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n electricPotentialUnits\n \n \n \n \n Finding-amplitude-asymmetry\n For posterior dominant rhythm: a difference in amplitude between the homologous area on opposite sides of the head that consistently exceeds 50 percent. When symmetrical could be labeled with base schema Symmetrical tag. For sleep: Absence or consistently marked amplitude asymmetry (greater than 50 percent) of a normal sleep graphoelement.\n \n requireChild\n \n \n Finding-amplitude-asymmetry-lower-left\n Amplitude lower on the left side.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Finding-amplitude-asymmetry-lower-right\n Amplitude lower on the right side.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Finding-amplitude-asymmetry-not-possible-to-determine\n Not possible to determine.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n Finding-stopped-by\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Finding-triggered-by\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Finding-unmodified\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Property-not-possible-to-determine\n Not possible to determine.\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Property-exists\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Property-absence\n \n #\n Free text.\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n \n \n \n accelerationUnits\n \n defaultUnits\n m-per-s^2\n \n \n m-per-s^2\n \n SIUnit\n \n \n unitSymbol\n \n \n conversionFactor\n 1.0\n \n \n \n \n angleUnits\n \n defaultUnits\n radian\n \n \n radian\n \n SIUnit\n \n \n conversionFactor\n 1.0\n \n \n \n rad\n \n SIUnit\n \n \n unitSymbol\n \n \n conversionFactor\n 1.0\n \n \n \n degree\n \n conversionFactor\n 0.0174533\n \n \n \n \n areaUnits\n \n defaultUnits\n m^2\n \n \n m^2\n \n SIUnit\n \n \n unitSymbol\n \n \n conversionFactor\n 1.0\n \n \n \n \n currencyUnits\n Units indicating the worth of something.\n \n defaultUnits\n $\n \n \n dollar\n \n conversionFactor\n 1.0\n \n \n \n $\n \n unitPrefix\n \n \n unitSymbol\n \n \n conversionFactor\n 1.0\n \n \n \n euro\n \n \n point\n \n \n \n electricPotentialUnits\n \n defaultUnits\n uv\n \n \n v\n \n SIUnit\n \n \n unitSymbol\n \n \n conversionFactor\n 0.000001\n \n \n \n Volt\n \n SIUnit\n \n \n conversionFactor\n 0.000001\n \n \n \n \n frequencyUnits\n \n defaultUnits\n Hz\n \n \n hertz\n \n SIUnit\n \n \n conversionFactor\n 1.0\n \n \n \n Hz\n \n SIUnit\n \n \n unitSymbol\n \n \n conversionFactor\n 1.0\n \n \n \n \n intensityUnits\n \n defaultUnits\n dB\n \n \n dB\n Intensity expressed as ratio to a threshold. May be used for sound intensity.\n \n unitSymbol\n \n \n conversionFactor\n 1.0\n \n \n \n candela\n Units used to express light intensity.\n \n SIUnit\n \n \n \n cd\n Units used to express light intensity.\n \n SIUnit\n \n \n unitSymbol\n \n \n \n \n jerkUnits\n \n defaultUnits\n m-per-s^3\n \n \n m-per-s^3\n \n unitSymbol\n \n \n conversionFactor\n 1.0\n \n \n \n \n magneticFieldUnits\n Units used to magnetic field intensity.\n \n defaultUnits\n fT\n \n \n tesla\n \n SIUnit\n \n \n conversionFactor\n 10^-15\n \n \n \n T\n \n SIUnit\n \n \n unitSymbol\n \n \n conversionFactor\n 10^-15\n \n \n \n \n memorySizeUnits\n \n defaultUnits\n B\n \n \n byte\n \n SIUnit\n \n \n conversionFactor\n 1.0\n \n \n \n B\n \n SIUnit\n \n \n unitSymbol\n \n \n conversionFactor\n 1.0\n \n \n \n \n physicalLengthUnits\n \n defaultUnits\n m\n \n \n foot\n \n conversionFactor\n 0.3048\n \n \n \n inch\n \n conversionFactor\n 0.0254\n \n \n \n metre\n \n SIUnit\n \n \n conversionFactor\n 1.0\n \n \n \n m\n \n SIUnit\n \n \n unitSymbol\n \n \n conversionFactor\n 1.0\n \n \n \n mile\n \n conversionFactor\n 1609.34\n \n \n \n \n speedUnits\n \n defaultUnits\n m-per-s\n \n \n m-per-s\n \n SIUnit\n \n \n unitSymbol\n \n \n conversionFactor\n 1.0\n \n \n \n mph\n \n unitSymbol\n \n \n conversionFactor\n 0.44704\n \n \n \n kph\n \n unitSymbol\n \n \n conversionFactor\n 0.277778\n \n \n \n \n temperatureUnits\n \n degree Celsius\n \n SIUnit\n \n \n conversionFactor\n 1.0\n \n \n \n oC\n \n SIUnit\n \n \n unitSymbol\n \n \n conversionFactor\n 1.0\n \n \n \n \n timeUnits\n \n defaultUnits\n s\n \n \n second\n \n SIUnit\n \n \n conversionFactor\n 1.0\n \n \n \n s\n \n SIUnit\n \n \n unitSymbol\n \n \n conversionFactor\n 1.0\n \n \n \n day\n \n conversionFactor\n 86400\n \n \n \n minute\n \n conversionFactor\n 60\n \n \n \n hour\n Should be in 24-hour format.\n \n conversionFactor\n 3600\n \n \n \n \n volumeUnits\n \n defaultUnits\n m^3\n \n \n m^3\n \n SIUnit\n \n \n unitSymbol\n \n \n conversionFactor\n 1.0\n \n \n \n \n weightUnits\n \n defaultUnits\n g\n \n \n g\n \n SIUnit\n \n \n unitSymbol\n \n \n conversionFactor\n 1.0\n \n \n \n gram\n \n SIUnit\n \n \n conversionFactor\n 1.0\n \n \n \n pound\n \n conversionFactor\n 453.592\n \n \n \n lb\n \n conversionFactor\n 453.592\n \n \n \n \n \n \n deca\n SI unit multiple representing 10^1.\n \n SIUnitModifier\n \n \n conversionFactor\n 10.0\n \n \n \n da\n SI unit multiple representing 10^1.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 10.0\n \n \n \n hecto\n SI unit multiple representing 10^2.\n \n SIUnitModifier\n \n \n conversionFactor\n 100.0\n \n \n \n h\n SI unit multiple representing 10^2.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 100.0\n \n \n \n kilo\n SI unit multiple representing 10^3.\n \n SIUnitModifier\n \n \n conversionFactor\n 1000.0\n \n \n \n k\n SI unit multiple representing 10^3.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 1000.0\n \n \n \n mega\n SI unit multiple representing 10^6.\n \n SIUnitModifier\n \n \n conversionFactor\n 10^6\n \n \n \n M\n SI unit multiple representing 10^6.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 10^6\n \n \n \n giga\n SI unit multiple representing 10^9.\n \n SIUnitModifier\n \n \n conversionFactor\n 10^9\n \n \n \n G\n SI unit multiple representing 10^9.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 10^9\n \n \n \n tera\n SI unit multiple representing 10^12.\n \n SIUnitModifier\n \n \n conversionFactor\n 10^12\n \n \n \n T\n SI unit multiple representing 10^12.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 10^12\n \n \n \n peta\n SI unit multiple representing 10^15.\n \n SIUnitModifier\n \n \n conversionFactor\n 10^15\n \n \n \n P\n SI unit multiple representing 10^15.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 10^15\n \n \n \n exa\n SI unit multiple representing 10^18.\n \n SIUnitModifier\n \n \n conversionFactor\n 10^18\n \n \n \n E\n SI unit multiple representing 10^18.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 10^18\n \n \n \n zetta\n SI unit multiple representing 10^21.\n \n SIUnitModifier\n \n \n conversionFactor\n 10^21\n \n \n \n Z\n SI unit multiple representing 10^21.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 10^21\n \n \n \n yotta\n SI unit multiple representing 10^24.\n \n SIUnitModifier\n \n \n conversionFactor\n 10^24\n \n \n \n Y\n SI unit multiple representing 10^24.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 10^24\n \n \n \n deci\n SI unit submultiple representing 10^-1.\n \n SIUnitModifier\n \n \n conversionFactor\n 0.1\n \n \n \n d\n SI unit submultiple representing 10^-1.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 0.1\n \n \n \n centi\n SI unit submultiple representing 10^-2.\n \n SIUnitModifier\n \n \n conversionFactor\n 0.01\n \n \n \n c\n SI unit submultiple representing 10^-2.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 0.01\n \n \n \n milli\n SI unit submultiple representing 10^-3.\n \n SIUnitModifier\n \n \n conversionFactor\n 0.001\n \n \n \n m\n SI unit submultiple representing 10^-3.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 0.001\n \n \n \n micro\n SI unit submultiple representing 10^-6.\n \n SIUnitModifier\n \n \n conversionFactor\n 10^-6\n \n \n \n u\n SI unit submultiple representing 10^-6.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 10^-6\n \n \n \n nano\n SI unit submultiple representing 10^-9.\n \n SIUnitModifier\n \n \n conversionFactor\n 10^-9\n \n \n \n n\n SI unit submultiple representing 10^-9.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 10^-9\n \n \n \n pico\n SI unit submultiple representing 10^-12.\n \n SIUnitModifier\n \n \n conversionFactor\n 10^-12\n \n \n \n p\n SI unit submultiple representing 10^-12.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 10^-12\n \n \n \n femto\n SI unit submultiple representing 10^-15.\n \n SIUnitModifier\n \n \n conversionFactor\n 10^-15\n \n \n \n f\n SI unit submultiple representing 10^-15.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 10^-15\n \n \n \n atto\n SI unit submultiple representing 10^-18.\n \n SIUnitModifier\n \n \n conversionFactor\n 10^-18\n \n \n \n a\n SI unit submultiple representing 10^-18.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 10^-18\n \n \n \n zepto\n SI unit submultiple representing 10^-21.\n \n SIUnitModifier\n \n \n conversionFactor\n 10^-21\n \n \n \n z\n SI unit submultiple representing 10^-21.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 10^-21\n \n \n \n yocto\n SI unit submultiple representing 10^-24.\n \n SIUnitModifier\n \n \n conversionFactor\n 10^-24\n \n \n \n y\n SI unit submultiple representing 10^-24.\n \n SIUnitSymbolModifier\n \n \n conversionFactor\n 10^-24\n \n \n \n \n \n dateTimeClass\n Date-times should conform to ISO8601 date-time format YYYY-MM-DDThh:mm:ss. Any variation on the full form is allowed.\n \n allowedCharacter\n digits\n T\n -\n :\n \n \n \n nameClass\n Value class designating values that have the characteristics of node names. The allowed characters are alphanumeric, hyphen, and underbar.\n \n allowedCharacter\n letters\n digits\n _\n -\n \n \n \n numericClass\n Value must be a valid numerical value.\n \n allowedCharacter\n digits\n E\n e\n +\n -\n .\n \n \n \n posixPath\n Posix path specification.\n \n allowedCharacter\n digits\n letters\n /\n :\n \n \n \n textClass\n Value class designating values that have the characteristics of text such as in descriptions.\n \n allowedCharacter\n letters\n digits\n blank\n +\n -\n :\n ;\n .\n /\n (\n )\n ?\n *\n %\n $\n @\n \n \n \n \n \n allowedCharacter\n A schema attribute of value classes specifying a special character that is allowed in expressing the value of a placeholder. Normally the allowed characters are listed individually. However, the word letters designates the upper and lower case alphabetic characters and the word digits designates the digits 0-9. The word blank designates the blank character.\n \n valueClassProperty\n \n \n \n conversionFactor\n The multiplicative factor to multiply these units to convert to default units.\n \n unitProperty\n \n \n unitModifierProperty\n \n \n \n defaultUnits\n A schema attribute of unit classes specifying the default units to use if the placeholder has a unit class but the substituted value has no units.\n \n unitClassProperty\n \n \n \n extensionAllowed\n A schema attribute indicating that users can add unlimited levels of child nodes under this tag. This tag is propagated to child nodes with the exception of the hashtag placeholders.\n \n boolProperty\n \n \n \n recommended\n A schema attribute indicating that the event-level HED string should include this tag.\n \n boolProperty\n \n \n \n relatedTag\n A schema attribute suggesting HED tags that are closely related to this tag. This attribute is used by tagging tools.\n \n \n requireChild\n A schema attribute indicating that one of the node elements descendants must be included when using this tag.\n \n boolProperty\n \n \n \n required\n A schema attribute indicating that every event-level HED string should include this tag.\n \n boolProperty\n \n \n \n SIUnit\n A schema attribute indicating that this unit element is an SI unit and can be modified by multiple and submultiple names. Note that some units such as byte are designated as SI units although they are not part of the standard.\n \n boolProperty\n \n \n unitProperty\n \n \n \n SIUnitModifier\n A schema attribute indicating that this SI unit modifier represents a multiple or submultiple of a base unit rather than a unit symbol.\n \n boolProperty\n \n \n unitModifierProperty\n \n \n \n SIUnitSymbolModifier\n A schema attribute indicating that this SI unit modifier represents a multiple or submultiple of a unit symbol rather than a base symbol.\n \n boolProperty\n \n \n unitModifierProperty\n \n \n \n suggestedTag\n A schema attribute that indicates another tag that is often associated with this tag. This attribute is used by tagging tools to provide tagging suggestions.\n \n \n tagGroup\n A schema attribute indicating the tag can only appear inside a tag group.\n \n boolProperty\n \n \n \n takesValue\n A schema attribute indicating the tag is a hashtag placeholder that is expected to be replaced with a user-defined value.\n \n boolProperty\n \n \n \n topLevelTagGroup\n A schema attribute indicating that this tag (or its descendants) can only appear in a top-level tag group. A tag group can have at most one tag with this attribute.\n \n boolProperty\n \n \n \n unique\n A schema attribute indicating that only one of this tag or its descendants can be used in the event-level HED string.\n \n boolProperty\n \n \n \n unitClass\n A schema attribute specifying which unit class this value tag belongs to.\n \n \n unitPrefix\n A schema attribute applied specifically to unit elements to designate that the unit indicator is a prefix (e.g., dollar sign in the currency units).\n \n boolProperty\n \n \n unitProperty\n \n \n \n unitSymbol\n A schema attribute indicating this tag is an abbreviation or symbol representing a type of unit. Unit symbols represent both the singular and the plural and thus cannot be pluralized.\n \n boolProperty\n \n \n unitProperty\n \n \n \n valueClass\n A schema attribute specifying which value class this value tag belongs to.\n \n \n \n \n boolProperty\n Indicates that the schema attribute represents something that is either true or false and does not have a value. Attributes without this value are assumed to have string values.\n \n \n unitClassProperty\n Indicates that the schema attribute is meant to be applied to unit classes.\n \n \n unitModifierProperty\n Indicates that the schema attribute is meant to be applied to unit modifier classes.\n \n \n unitProperty\n Indicates that the schema attribute is meant to be applied to units within a unit class.\n \n \n valueClassProperty\n Indicates that the schema attribute is meant to be applied to value classes.\n \n \n The Standardized Computer-based Organized Reporting of EEG (SCORE) is a standard terminology for scalp EEG data assessment designed for use in clinical practice that may also be used for research purposes.\nThe SCORE standard defines terms for describing phenomena observed in scalp EEG data. It is also potentially applicable (with some suitable extensions) to EEG recorded in critical care and neonatal settings.\nThe SCORE standard received European consensus and has been endorsed by the European Chapter of the International Federation of Clinical Neurophysiology (IFCN) and the International League Against Epilepsy (ILAE) Commission on European Affairs.\nA second revised and extended version of SCORE achieved international consensus.\n[1] Beniczky, Sandor, et al. "Standardized computer based organized reporting of EEG: SCORE." Epilepsia 54.6 (2013).\n[2] Beniczky, Sandor, et al. "Standardized computer based organized reporting of EEG: SCORE second version." Clinical Neurophysiology 128.11 (2017). \nTPA, January 2023\n\n' + }, +}) + +// data/HED_testlib_1.0.2.xml +var require_HED_testlib_1_0_2 = __commonJS({ + 'data/HED_testlib_1.0.2.xml'(exports, module) { + module.exports = + '\n\n This schema is the first official release that includes an xsd and requires unit class, unit modifier, value class, schema attribute and property sections.\n\n\n \n \n Event\n Something that happens at a given time and (typically) place. Elements of this tag subtree designate the general category in which an event falls.\n \n suggestedTag\n Task-property\n \n \n Sensory-event\n Something perceivable by the participant. An event meant to be an experimental stimulus should include the tag Task-property/Task-event-role/Experimental-stimulus.\n \n suggestedTag\n Task-event-role\n Sensory-presentation\n \n \n \n Agent-action\n Any action engaged in by an agent (see the Agent subtree for agent categories). A participant response to an experiment stimulus should include the tag Agent-property/Agent-task-role/Experiment-participant.\n \n suggestedTag\n Task-event-role\n Agent\n \n \n \n Data-feature\n An event marking the occurrence of a data feature such as an interictal spike or alpha burst that is often added post hoc to the data record.\n \n suggestedTag\n Data-property\n \n \n \n Experiment-control\n An event pertaining to the physical control of the experiment during its operation.\n \n \n Experiment-procedure\n An event indicating an experimental procedure, as in performing a saliva swab during the experiment or administering a survey.\n \n \n Experiment-structure\n An event specifying a change-point of the structure of experiment. This event is typically used to indicate a change in experimental conditions or tasks.\n \n \n Measurement-event\n A discrete measure returned by an instrument.\n \n suggestedTag\n Data-property\n \n \n \n \n Agent\n Someone or something that takes an active role or produces a specified effect.The role or effect may be implicit. Being alive or performing an activity such as a computation may qualify something to be an agent. An agent may also be something that simulates something else.\n \n suggestedTag\n Agent-property\n \n \n Animal-agent\n An agent that is an animal.\n \n \n Avatar-agent\n An agent associated with an icon or avatar representing another agent.\n \n \n Controller-agent\n An agent experiment control software or hardware.\n \n \n Human-agent\n A person who takes an active role or produces a specified effect.\n \n \n Robotic-agent\n An agent mechanical device capable of performing a variety of often complex tasks on command or by being programmed in advance.\n \n \n Software-agent\n An agent computer program.\n \n \n \n Action\n Do something.\n \n extensionAllowed\n \n \n Communicate\n Convey knowledge of or information about something.\n \n Communicate-gesturally\n Communicate nonverbally using visible bodily actions, either in place of speech or together and in parallel with spoken words. Gestures include movement of the hands, face, or other parts of the body.\n \n relatedTag\n Move-face\n Move-upper-extremity\n \n \n Clap-hands\n Strike the palms of against one another resoundingly, and usually repeatedly, especially to express approval.\n \n \n Clear-throat\n Cough slightly so as to speak more clearly, attract attention, or to express hesitancy before saying something awkward.\n \n relatedTag\n Move-face\n Move-head\n \n \n \n Frown\n Express disapproval, displeasure, or concentration, typically by turning down the corners of the mouth.\n \n relatedTag\n Move-face\n \n \n \n Grimace\n Make a twisted expression, typically expressing disgust, pain, or wry amusement.\n \n relatedTag\n Move-face\n \n \n \n Nod-head\n Tilt head in alternating up and down arcs along the sagittal plane. It is most commonly, but not universally, used to indicate agreement, acceptance, or acknowledgement.\n \n relatedTag\n Move-head\n \n \n \n Pump-fist\n Raise with fist clenched in triumph or affirmation.\n \n relatedTag\n Move-upper-extremity\n \n \n \n Raise-eyebrows\n Move eyebrows upward.\n \n relatedTag\n Move-face\n Move-eyes\n \n \n \n Shake-fist\n Clench hand into a fist and shake to demonstrate anger.\n \n relatedTag\n Move-upper-extremity\n \n \n \n Shake-head\n Turn head from side to side as a way of showing disagreement or refusal.\n \n relatedTag\n Move-head\n \n \n \n Shhh\n Place finger over lips and possibly uttering the syllable shhh to indicate the need to be quiet.\n \n relatedTag\n Move-upper-extremity\n \n \n \n Shrug\n Lift shoulders up towards head to indicate a lack of knowledge about a particular topic.\n \n relatedTag\n Move-upper-extremity\n Move-torso\n \n \n \n Smile\n Form facial features into a pleased, kind, or amused expression, typically with the corners of the mouth turned up and the front teeth exposed.\n \n relatedTag\n Move-face\n \n \n \n Spread-hands\n Spread hands apart to indicate ignorance.\n \n relatedTag\n Move-upper-extremity\n \n \n \n Thumbs-down\n Extend the thumb downward to indicate disapproval.\n \n relatedTag\n Move-upper-extremity\n \n \n \n Thumb-up\n Extend the thumb upward to indicate approval.\n \n relatedTag\n Move-upper-extremity\n \n \n \n Wave\n Raise hand and move left and right, as a greeting or sign of departure.\n \n relatedTag\n Move-upper-extremity\n \n \n \n Widen-eyes\n Open eyes and possibly with eyebrows lifted especially to express surprise or fear.\n \n relatedTag\n Move-face\n Move-eyes\n \n \n \n Wink\n Close and open one eye quickly, typically to indicate that something is a joke or a secret or as a signal of affection or greeting.\n \n relatedTag\n Move-face\n Move-eyes\n \n \n \n \n Communicate-musically\n Communicate using music.\n \n Hum\n Make a low, steady continuous sound like that of a bee. Sing with the lips closed and without uttering speech.\n \n \n Play-instrument\n Make musical sounds using an instrument.\n \n \n Sing\n Produce musical tones by means of the voice.\n \n \n Vocalize\n Utter vocal sounds.\n \n \n Whistle\n Produce a shrill clear sound by forcing breath out or air in through the puckered lips.\n \n \n \n Communicate-vocally\n Communicate using mouth or vocal cords.\n \n Cry\n Shed tears associated with emotions, usually sadness but also joy or frustration.\n \n \n Groan\n Make a deep inarticulate sound in response to pain or despair.\n \n \n Laugh\n Make the spontaneous sounds and movements of the face and body that are the instinctive expressions of lively amusement and sometimes also of contempt or derision.\n \n \n Scream\n Make loud, vociferous cries or yells to express pain, excitement, or fear.\n \n \n Shout\n Say something very loudly.\n \n \n Sigh\n Emit a long, deep, audible breath expressing sadness, relief, tiredness, or a similar feeling.\n \n \n Speak\n Communicate using spoken language.\n \n \n Whisper\n Speak very softly using breath without vocal cords.\n \n \n \n \n Move\n Move in a specified direction or manner. Change position or posture.\n \n Breathe\n Inhale or exhale during respiration.\n \n Blow\n Expel air through pursed lips.\n \n \n Cough\n Suddenly and audibly expel air from the lungs through a partially closed glottis, preceded by inhalation.\n \n \n Exhale\n Blow out or expel breath.\n \n \n Hiccup\n Involuntarily spasm the diaphragm and respiratory organs, with a sudden closure of the glottis and a characteristic sound like that of a cough.\n \n \n Hold-breath\n Interrupt normal breathing by ceasing to inhale or exhale.\n \n \n Inhale\n Draw in with the breath through the nose or mouth.\n \n \n Sneeze\n Suddenly and violently expel breath through the nose and mouth.\n \n \n Sniff\n Draw in air audibly through the nose to detect a smell, to stop it from running, or to express contempt.\n \n \n \n Move-body\n Move entire body.\n \n Bend\n Move body in a bowed or curved manner.\n \n \n Dance\n Perform a purposefully selected sequences of human movement often with aesthetic or symbolic value. Move rhythmically to music, typically following a set sequence of steps.\n \n \n Fall-down\n Lose balance and collapse.\n \n \n Flex\n Cause a muscle to stand out by contracting or tensing it. Bend a limb or joint.\n \n \n Jerk\n Make a quick, sharp, sudden movement.\n \n \n Lie-down\n Move to a horizontal or resting position.\n \n \n Recover-balance\n Return to a stable, upright body position.\n \n \n Sit-down\n Move from a standing to a sitting position.\n \n \n Sit-up\n Move from lying down to a sitting position.\n \n \n Stand-up\n Move from a sitting to a standing position.\n \n \n Stretch\n Straighten or extend body or a part of body to its full length, typically so as to tighten muscles or in order to reach something.\n \n \n Shudder\n Tremble convulsively, sometimes as a result of fear or revulsion.\n \n \n Stumble\n Trip or momentarily lose balance and almost fall.\n \n \n Turn\n Change or cause to change direction.\n \n \n \n Move-body-part\n Move one part of a body.\n \n Move-eyes\n Move eyes.\n \n Blink\n Shut and open the eyes quickly.\n \n \n Close-eyes\n Lower and keep eyelids in a closed position.\n \n \n Fixate\n Direct eyes to a specific point or target.\n \n \n Inhibit-blinks\n Purposely prevent blinking.\n \n \n Open-eyes\n Raise eyelids to expose pupil.\n \n \n Saccade\n Move eyes rapidly between fixation points.\n \n \n Squint\n Squeeze one or both eyes partly closed in an attempt to see more clearly or as a reaction to strong light.\n \n \n Stare\n Look fixedly or vacantly at someone or something with eyes wide open.\n \n \n \n Move-face\n Move the face or jaw.\n \n Bite\n Seize with teeth or jaws an object or organism so as to grip or break the surface covering.\n \n \n Burp\n Noisily release air from the stomach through the mouth. Belch.\n \n \n Chew\n Repeatedly grinding, tearing, and or crushing with teeth or jaws.\n \n \n Gurgle\n Make a hollow bubbling sound like that made by water running out of a bottle.\n \n \n Swallow\n Cause or allow something, especially food or drink to pass down the throat.\n \n Gulp\n Swallow quickly or in large mouthfuls, often audibly, sometimes to indicate apprehension.\n \n \n \n Yawn\n Take a deep involuntary inhalation with the mouth open often as a sign of drowsiness or boredom.\n \n \n \n Move-head\n Move head.\n \n Lift-head\n Tilt head back lifting chin.\n \n \n Lower-head\n Move head downward so that eyes are in a lower position.\n \n \n Turn-head\n Rotate head horizontally to look in a different direction.\n \n \n \n Move-lower-extremity\n Move leg and/or foot.\n \n Curl-toes\n Bend toes sometimes to grip.\n \n \n Hop\n Jump on one foot.\n \n \n Jog\n Run at a trot to exercise.\n \n \n Jump\n Move off the ground or other surface through sudden muscular effort in the legs.\n \n \n Kick\n Strike out or flail with the foot or feet. Strike using the leg, in unison usually with an area of the knee or lower using the foot.\n \n \n Pedal\n Move by working the pedals of a bicycle or other machine.\n \n \n Press-foot\n Move by pressing foot.\n \n \n Run\n Travel on foot at a fast pace.\n \n \n Step\n Put one leg in front of the other and shift weight onto it.\n \n Heel-strike\n Strike the ground with the heel during a step.\n \n \n Toe-off\n Push with toe as part of a stride.\n \n \n \n Trot\n Run at a moderate pace, typically with short steps.\n \n \n Walk\n Move at a regular pace by lifting and setting down each foot in turn never having both feet off the ground at once.\n \n \n \n Move-torso\n Move body trunk.\n \n \n Move-upper-extremity\n Move arm, shoulder, and/or hand.\n \n Drop\n Let or cause to fall vertically.\n \n \n Grab\n Seize suddenly or quickly. Snatch or clutch.\n \n \n Grasp\n Seize and hold firmly.\n \n \n Hold-down\n Prevent someone or something from moving by holding them firmly.\n \n \n Lift\n Raising something to higher position.\n \n \n Make-fist\n Close hand tightly with the fingers bent against the palm.\n \n \n Point\n Draw attention to something by extending a finger or arm.\n \n \n Press\n Apply pressure to something to flatten, shape, smooth or depress it. This action tag should be used to indicate key presses and mouse clicks.\n \n relatedTag\n Push\n \n \n \n Push\n Apply force in order to move something away. Use Press to indicate a key press or mouse click.\n \n relatedTag\n Press\n \n \n \n Reach\n Stretch out your arm in order to get or touch something.\n \n \n Release\n Make available or set free.\n \n \n Retract\n Draw or pull back.\n \n \n Scratch\n Drag claws or nails over a surface or on skin.\n \n \n Snap-fingers\n Make a noise by pushing second finger hard against thumb and then releasing it suddenly so that it hits the base of the thumb.\n \n \n Touch\n Come into or be in contact with.\n \n \n \n \n \n Perceive\n Produce an internal, conscious image through stimulating a sensory system.\n \n Hear\n Give attention to a sound.\n \n \n See\n Direct gaze toward someone or something or in a specified direction.\n \n \n Smell\n Inhale in order to ascertain an odor or scent.\n \n \n Taste\n Sense a flavor in the mouth and throat on contact with a substance.\n \n \n Sense-by-touch\n Sense something through receptors in the skin.\n \n \n \n Perform\n Carry out or accomplish an action, task, or function.\n \n Close\n Act as to blocked against entry or passage.\n \n \n Collide-with\n Hit with force when moving.\n \n \n Halt\n Bring or come to an abrupt stop.\n \n \n Modify\n Change something.\n \n \n Open\n Widen an aperture, door, or gap, especially one allowing access to something.\n \n \n Operate\n Control the functioning of a machine, process, or system.\n \n \n Play\n Engage in activity for enjoyment and recreation rather than a serious or practical purpose.\n \n \n Read\n Interpret something that is written or printed.\n \n \n Repeat\n Make do or perform again.\n \n \n Rest\n Be inactive in order to regain strength, health, or energy.\n \n \n Write\n Communicate or express by means of letters or symbols written or imprinted on a surface.\n \n \n \n Think\n Direct the mind toward someone or something or use the mind actively to form connected ideas.\n \n Allow\n Allow access to something such as allowing a car to pass.\n \n \n Attend-to\n Focus mental experience on specific targets.\n \n \n Count\n Tally items either silently or aloud.\n \n \n Deny\n Refuse to give or grant something requested or desired by someone.\n \n \n Detect\n Discover or identify the presence or existence of something.\n \n \n Discriminate\n Recognize a distinction.\n \n \n Encode\n Convert information or an instruction into a particular form.\n \n \n Evade\n Escape or avoid, especially by cleverness or trickery.\n \n \n Generate\n Cause something, especially an emotion or situation to arise or come about.\n \n \n Identify\n Establish or indicate who or what someone or something is.\n \n \n Imagine\n Form a mental image or concept of something.\n \n \n Judge\n Evaluate evidence to make a decision or form a belief.\n \n \n Learn\n Adaptively change behavior as the result of experience.\n \n \n Memorize\n Adaptively change behavior as the result of experience.\n \n \n Plan\n Think about the activities required to achieve a desired goal.\n \n \n Predict\n Say or estimate that something will happen or will be a consequence of something without having exact informaton.\n \n \n Recognize\n Identify someone or something from having encountered them before.\n \n \n Respond\n React to something such as a treatment or a stimulus.\n \n \n Recall\n Remember information by mental effort.\n \n \n Switch-attention\n Transfer attention from one focus to another.\n \n \n Track\n Follow a person, animal, or object through space or time.\n \n \n \n \n Item\n An independently existing thing (living or nonliving).\n \n extensionAllowed\n \n \n Biological-item\n An entity that is biological, that is related to living organisms.\n \n Anatomical-item\n A biological structure, system, fluid or other substance excluding single molecular entities.\n \n Body-part\n Any part of an organism.\n \n Head\n The upper part of the human body, or the front or upper part of the body of an animal, typically separated from the rest of the body by a neck, and containing the brain, mouth, and sense organs.\n \n Hair\n The filamentous outgrowth of the epidermis.\n \n \n Ear\n A sense organ needed for the detection of sound and for establishing balance.\n \n \n Face\n The anterior portion of the head extending from the forehead to the chin and ear to ear. The facial structures contain the eyes, nose and mouth, cheeks and jaws.\n \n Cheek\n The fleshy part of the face bounded by the eyes, nose, ear, and jaw line.\n \n \n Chin\n The part of the face below the lower lip and including the protruding part of the lower jaw.\n \n \n Eye\n The organ of sight or vision.\n \n \n Eyebrow\n The arched strip of hair on the bony ridge above each eye socket.\n \n \n Forehead\n The part of the face between the eyebrows and the normal hairline.\n \n \n Lip\n Fleshy fold which surrounds the opening of the mouth.\n \n \n Nose\n A structure of special sense serving as an organ of the sense of smell and as an entrance to the respiratory tract.\n \n \n Mouth\n The proximal portion of the digestive tract, containing the oral cavity and bounded by the oral opening.\n \n \n Teeth\n The hard bonelike structures in the jaws. A collection of teeth arranged in some pattern in the mouth or other part of the body.\n \n \n \n \n Lower-extremity\n Refers to the whole inferior limb (leg and/or foot).\n \n Ankle\n A gliding joint between the distal ends of the tibia and fibula and the proximal end of the talus.\n \n \n Calf\n The fleshy part at the back of the leg below the knee.\n \n \n Foot\n The structure found below the ankle joint required for locomotion.\n \n Big-toe\n The largest toe on the inner side of the foot.\n \n \n Heel\n The back of the foot below the ankle.\n \n \n Instep\n The part of the foot between the ball and the heel on the inner side.\n \n \n Little-toe\n The smallest toe located on the outer side of the foot.\n \n \n Toes\n The terminal digits of the foot.\n \n \n \n Knee\n A joint connecting the lower part of the femur with the upper part of the tibia.\n \n \n Shin\n Front part of the leg below the knee.\n \n \n Thigh\n Upper part of the leg between hip and knee.\n \n \n \n Torso\n The body excluding the head and neck and limbs.\n \n Torso-back\n The rear surface of the human body from the shoulders to the hips.\n \n \n Buttocks\n The round fleshy parts that form the lower rear area of a human trunk.\n \n \n Torso-chest\n The anterior side of the thorax from the neck to the abdomen.\n \n \n Gentalia\n The external organs of reproduction.\n \n \n Hip\n The lateral prominence of the pelvis from the waist to the thigh.\n \n \n Waist\n The abdominal circumference at the navel.\n \n \n \n Upper-extremity\n Refers to the whole superior limb (shoulder, arm, elbow, wrist, hand).\n \n Elbow\n A type of hinge joint located between the forearm and upper arm.\n \n \n Forearm\n Lower part of the arm between the elbow and wrist.\n \n \n Hand\n The distal portion of the upper extremity. It consists of the carpus, metacarpus, and digits.\n \n Finger\n Any of the digits of the hand.\n \n Index-finger\n The second finger from the radial side of the hand, next to the thumb.\n \n \n Little-finger\n The fifth and smallest finger from the radial side of the hand.\n \n \n Middle-finger\n The middle or third finger from the radial side of the hand.\n \n \n Ring-finger\n The fourth finger from the radial side of the hand.\n \n \n Thumb\n The thick and short hand digit which is next to the index finger in humans.\n \n \n \n Palm\n The part of the inner surface of the hand that extends from the wrist to the bases of the fingers.\n \n \n Knuckles\n A part of a finger at a joint where the bone is near the surface, especially where the finger joins the hand.\n \n \n \n Shoulder\n Joint attaching upper arm to trunk.\n \n \n Upper-arm\n Portion of arm between shoulder and elbow.\n \n \n Wrist\n A joint between the distal end of the radius and the proximal row of carpal bones.\n \n \n \n \n \n Organism\n A living entity, more specifically a biological entity that consists of one or more cells and is capable of genomic replication (independently or not).\n \n Animal\n A living organism that has membranous cell walls, requires oxygen and organic foods, and is capable of voluntary movement.\n \n \n Human\n The bipedal primate mammal Homo sapiens.\n \n \n Plant\n Any living organism that typically synthesizes its food from inorganic substances and possesses cellulose cell walls.\n \n \n \n \n Language-item\n An entity related to a systematic means of communicating by the use of sounds, symbols, or gestures.\n \n suggestedTag\n Sensory-presentation\n \n \n Character\n A mark or symbol used in writing.\n \n \n Clause\n A unit of grammatical organization next below the sentence in rank, usually consisting of a subject and predicate.\n \n \n Glyph\n A hieroglyphic character, symbol, or pictograph.\n \n \n Nonword\n A group of letters or speech sounds that looks or sounds like a word but that is not accepted as such by native speakers.\n \n \n Paragraph\n A distinct section of a piece of writing, usually dealing with a single theme.\n \n \n Phoneme\n A speech sound that is distinguished by the speakers of a particular language.\n \n \n Phrase\n A phrase is a group of words functioning as a single unit in the syntax of a sentence.\n \n \n Sentence\n A set of words that is complete in itself, conveying a statement, question, exclamation, or command and typically containing an explicit or implied subject and a predicate containing a finite verb.\n \n \n Syllable\n A unit of spoken language larger than a phoneme.\n \n \n Textblock\n A block of text.\n \n \n Word\n A word is the smallest free form (an item that may be expressed in isolation with semantic or pragmatic content) in a language.\n \n \n \n Object\n Something perceptible by one or more of the senses, especially by vision or touch. A material thing.\n \n suggestedTag\n Sensory-presentation\n \n \n Geometric-object\n An object or a representation that has structure and topology in space.\n \n Pattern\n An arrangement of objects, facts, behaviors, or other things which have scientific, mathematical, geometric, statistical, or other meaning.\n \n Dots\n A small round mark or spot.\n \n \n LED-pattern\n A pattern created by lighting selected members of a fixed light emitting diode array.\n \n \n \n 2D-shape\n A planar, two-dimensional shape.\n \n Clockface\n The dial face of a clock. A location identifier based on clockface numbering or anatomic subregion.\n \n \n Cross\n A figure or mark formed by two intersecting lines crossing at their midpoints.\n \n \n Dash\n A horizontal stroke in writing or printing to mark a pause or break in sense or to represent omitted letters or words.\n \n \n Ellipse\n A closed plane curve resulting from the intersection of a circular cone and a plane cutting completely through it, especially a plane not parallel to the base.\n \n Circle\n A ring-shaped structure with every point equidistant from the center.\n \n \n \n Rectangle\n A parallelogram with four right angles.\n \n Square\n A square is a special rectangle with four equal sides.\n \n \n \n Single-point\n A point is a geometric entity that is located in a zero-dimensional spatial region and whose position is defined by its coordinates in some coordinate system.\n \n \n Star\n A conventional or stylized representation of a star, typically one having five or more points.\n \n \n Triangle\n A three-sided polygon.\n \n \n \n 3D-shape\n A geometric three-dimensional shape.\n \n Box\n A square or rectangular vessel, usually made of cardboard or plastic.\n \n Cube\n A solid or semi-solid in the shape of a three dimensional square.\n \n \n \n Cone\n A shape whose base is a circle and whose sides taper up to a point.\n \n \n Cylinder\n A surface formed by circles of a given radius that are contained in a plane perpendicular to a given axis, whose centers align on the axis.\n \n \n Ellipsoid\n A closed plane curve resulting from the intersection of a circular cone and a plane cutting completely through it, especially a plane not parallel to the base.\n \n Sphere\n A solid or hollow three-dimensional object bounded by a closed surface such that every point on the surface is equidistant from the center.\n \n \n \n Pyramid\n A polyhedron of which one face is a polygon of any number of sides, and the other faces are triangles with a common vertex.\n \n \n \n \n Ingestible-object\n Something that can be taken into the body by the mouth for digestion or absorption.\n \n \n Man-made-object\n Something constructed by human means.\n \n Building\n A structure that has a roof and walls and stands more or less permanently in one place.\n \n Room\n An area within a building enclosed by walls and floor and ceiling.\n \n \n Roof\n A roof is the covering on the uppermost part of a building which provides protection from animals and weather, notably rain, but also heat, wind and sunlight.\n \n \n Entrance\n The means or place of entry.\n \n \n Attic\n A room or a space immediately below the roof of a building.\n \n \n Basement\n The part of a building that is wholly or partly below ground level.\n \n \n \n Clothing\n A covering designed to be worn on the body.\n \n \n Device\n An object contrived for a specific purpose.\n \n Assistive-device\n A device that help an individual accomplish a task.\n \n Glasses\n Frames with lenses worn in front of the eye for vision correction, eye protection, or protection from UV rays.\n \n \n Writing-device\n A device used for writing.\n \n Pen\n A common writing instrument used to apply ink to a surface for writing or drawing.\n \n \n Pencil\n An implement for writing or drawing that is constructed of a narrow solid pigment core in a protective casing that prevents the core from being broken or marking the hand.\n \n \n \n \n Computing-device\n An electronic device which take inputs and processes results from the inputs.\n \n Cellphone\n A telephone with access to a cellular radio system so it can be used over a wide area, without a physical connection to a network.\n \n \n Desktop-computer\n A computer suitable for use at an ordinary desk.\n \n \n Laptop-computer\n A computer that is portable and suitable for use while traveling.\n \n \n Tablet-computer\n A small portable computer that accepts input directly on to its screen rather than via a keyboard or mouse.\n \n \n \n Engine\n A motor is a machine designed to convert one or more forms of energy into mechanical energy.\n \n \n IO-device\n Hardware used by a human (or other system) to communicate with a computer.\n \n Input-device\n A piece of equipment used to provide data and control signals to an information processing system such as a computer or information appliance.\n \n Computer-mouse\n A hand-held pointing device that detects two-dimensional motion relative to a surface.\n \n Mouse-button\n An electric switch on a computer mouse which can be pressed or clicked to select or interact with an element of a graphical user interface.\n \n \n Scroll-wheel\n A scroll wheel or mouse wheel is a wheel used for scrolling made of hard plastic with a rubbery surface usually located between the left and right mouse buttons and is positioned perpendicular to the mouse surface.\n \n \n \n Joystick\n A control device that uses a movable handle to create two-axis input for a computer device.\n \n \n Keyboard\n A device consisting of mechanical keys that are pressed to create input to a computer.\n \n Keyboard-key\n A button on a keyboard usually representing letters, numbers, functions, or symbols.\n \n #\n Value of a keyboard key.\n \n takesValue\n \n \n \n \n \n Keypad\n A device consisting of keys, usually in a block arrangement, that provides limited input to a system.\n \n Keypad-key\n A key on a separate section of a computer keyboard that groups together numeric keys and those for mathematical or other special functions in an arrangement like that of a calculator.\n \n #\n Value of keypad key.\n \n takesValue\n \n \n \n \n \n Microphone\n A device designed to convert sound to an electrical signal.\n \n \n Push-button\n A switch designed to be operated by pressing a button.\n \n \n \n Output-device\n Any piece of computer hardware equipment which converts information into human understandable form.\n \n Display-device\n An output device for presentation of information in visual or tactile form the latter used for example in tactile electronic displays for blind people.\n \n Head-mounted-display\n An instrument that functions as a display device, worn on the head or as part of a helmet, that has a small display optic in front of one (monocular HMD) or each eye (binocular HMD).\n \n \n LED-display\n A LED display is a flat panel display that uses an array of light-emitting diodes as pixels for a video display.\n \n \n Computer-screen\n An electronic device designed as a display or a physical device designed to be a protective meshwork.\n \n Screen-window\n A part of a computer screen that contains a display different from the rest of the screen. A window is a graphical control element consisting of a visual area containing some of the graphical user interface of the program it belongs to and is framed by a window decoration.\n \n \n \n \n Auditory-device\n A device designed to produce sound.\n \n Headphones\n An instrument that consists of a pair of small loudspeakers, or less commonly a single speaker, held close to ears and connected to a signal source such as an audio amplifier, radio, CD player or portable media player.\n \n \n Loudspeaker\n A device designed to convert electrical signals to sounds that can be heard.\n \n \n \n \n Recording-device\n A device that copies information in a signal into a persistent information bearer.\n \n EEG-recorder\n A device for recording electric currents in the brain using electrodes applied to the scalp, to the surface of the brain, or placed within the substance of the brain.\n \n \n File-storage\n A device for recording digital information to a permanent media.\n \n \n MEG-recorder\n A device for measuring the magnetic fields produced by electrical activity in the brain, usually conducted externally.\n \n \n Motion-capture\n A device for recording the movement of objects or people.\n \n \n Tape-recorder\n A device for recording and reproduction usually using magnetic tape for storage that can be saved and played back.\n \n \n \n Touchscreen\n A control component that operates an electronic device by pressing the display on the screen.\n \n \n \n Machine\n A human-made device that uses power to apply forces and control movement to perform an action.\n \n \n Measurement-device\n A device in which a measure function inheres.\n \n Clock\n A device designed to indicate the time of day or to measure the time duration of an event or action.\n \n Clock-face\n A location identifier based on clockface numbering or anatomic subregion.\n \n \n \n \n Robot\n A mechanical device that sometimes resembles a living animal and is capable of performing a variety of often complex human tasks on command or by being programmed in advance.\n \n \n Tool\n A component that is not part of a device but is designed to support its assemby or operation.\n \n \n \n Document\n A physical object, or electronic counterpart, that is characterized by containing writing which is meant to be human-readable.\n \n Letter\n A written message addressed to a person or organization.\n \n \n Note\n A brief written record.\n \n \n Book\n A volume made up of pages fastened along one edge and enclosed between protective covers.\n \n \n Notebook\n A book for notes or memoranda.\n \n \n \n Furnishing\n Furniture, fittings, and other decorative accessories, such as curtains and carpets, for a house or room.\n \n \n Manufactured-material\n Substances created or extracted from raw materials.\n \n Ceramic\n A hard, brittle, heat-resistant and corrosion-resistant material made by shaping and then firing a nonmetallic mineral, such as clay, at a high temperature.\n \n \n Glass\n A brittle transparent solid with irregular atomic structure.\n \n \n Paper\n A thin sheet material produced by mechanically or chemically processing cellulose fibres derived from wood, rags, grasses or other vegetable sources in water.\n \n \n Plastic\n Various high-molecular-weight thermoplastic or thermosetting polymers that are capable of being molded, extruded, drawn, or otherwise shaped and then hardened into a form.\n \n \n Steel\n An alloy made up of iron with typically a few tenths of a percent of carbon to improve its strength and fracture resistance compared to iron.\n \n \n \n Media\n Media are audo/visual/audiovisual modes of communicating information for mass consumption.\n \n Media-clip\n A short segment of media.\n \n Audio-clip\n A short segment of audio.\n \n \n Audiovisual-clip\n A short media segment containing both audio and video.\n \n \n Video-clip\n A short segment of video.\n \n \n \n Visualization\n An planned process that creates images, diagrams or animations from the input data.\n \n Animation\n A form of graphical illustration that changes with time to give a sense of motion or represent dynamic changes in the portrayal.\n \n \n Art-installation\n A large-scale, mixed-media constructions, often designed for a specific place or for a temporary period of time.\n \n \n Braille\n A display using a system of raised dots that can be read with the fingers by people who are blind.\n \n \n Image\n Any record of an imaging event whether physical or electronic.\n \n Cartoon\n A type of illustration, sometimes animated, typically in a non-realistic or semi-realistic style. The specific meaning has evolved over time, but the modern usage usually refers to either an image or series of images intended for satire, caricature, or humor. A motion picture that relies on a sequence of illustrations for its animation.\n \n \n Drawing\n A representation of an object or outlining a figure, plan, or sketch by means of lines.\n \n \n Icon\n A sign (such as a word or graphic symbol) whose form suggests its meaning.\n \n \n Painting\n A work produced through the art of painting.\n \n \n Photograph\n An image recorded by a camera.\n \n \n \n Movie\n A sequence of images displayed in succession giving the illusion of continuous movement.\n \n \n Outline-visualization\n A visualization consisting of a line or set of lines enclosing or indicating the shape of an object in a sketch or diagram.\n \n \n Point-light-visualization\n A display in which action is depicted using a few points of light, often generated from discrete sensors in motion capture.\n \n \n Sculpture\n A two- or three-dimensional representative or abstract forms, especially by carving stone or wood or by casting metal or plaster.\n \n \n Stick-figure-visualization\n A drawing showing the head of a human being or animal as a circle and all other parts as straight lines.\n \n \n \n \n Navigational-object\n An object whose purpose is to assist directed movement from one location to another.\n \n Path\n A trodden way. A way or track laid down for walking or made by continual treading.\n \n \n Road\n An open way for the passage of vehicles, persons, or animals on land.\n \n Lane\n A defined path with physical dimensions through which an object or substance may traverse.\n \n \n \n Runway\n A paved strip of ground on a landing field for the landing and takeoff of aircraft.\n \n \n \n Vehicle\n A mobile machine which transports people or cargo.\n \n Aircraft\n A vehicle which is able to travel through air in an atmosphere.\n \n \n Bicycle\n A human-powered, pedal-driven, single-track vehicle, having two wheels attached to a frame, one behind the other.\n \n \n Boat\n A watercraft of any size which is able to float or plane on water.\n \n \n Car\n A wheeled motor vehicle used primarily for the transportation of human passengers.\n \n \n Cart\n A cart is a vehicle which has two wheels and is designed to transport human passengers or cargo.\n \n \n Tractor\n A mobile machine specifically designed to deliver a high tractive effort at slow speeds, and mainly used for the purposes of hauling a trailer or machinery used in agriculture or construction.\n \n \n Train\n A connected line of railroad cars with or without a locomotive.\n \n \n Truck\n A motor vehicle which, as its primary funcion, transports cargo rather than human passangers.\n \n \n \n \n Natural-object\n Something that exists in or is produced by nature, and is not artificial or man-made.\n \n Mineral\n A solid, homogeneous, inorganic substance occurring in nature and having a definite chemical composition.\n \n \n Natural-feature\n A feature that occurs in nature. A prominent or identifiable aspect, region, or site of interest.\n \n Field\n An unbroken expanse as of ice or grassland.\n \n \n Hill\n A rounded elevation of limited extent rising above the surrounding land with local relief of less than 300m.\n \n \n Mountain\n A landform that extends above the surrounding terrain in a limited area.\n \n \n River\n A natural freshwater surface stream of considerable volume and a permanent or seasonal flow, moving in a definite channel toward a sea, lake, or another river.\n \n \n Waterfall\n A sudden descent of water over a step or ledge in the bed of a river.\n \n \n \n \n \n Sound\n Mechanical vibrations transmitted by an elastic medium. Something that can be heard.\n \n Environmental-sound\n Sounds occuring in the environment. An accumulation of noise pollution that occurs outside. This noise can be caused by transport, industrial, and recreational activities.\n \n Crowd-sound\n Noise produced by a mixture of sounds from a large group of people.\n \n \n Signal-noise\n Any part of a signal that is not the true or original signal but is introduced by the communication mechanism.\n \n \n \n Musical-sound\n Sound produced by continuous and regular vibrations, as opposed to noise.\n \n Tone\n A musical note, warble, or other sound used as a particular signal on a telephone or answering machine.\n \n \n Instrument-sound\n Sound produced by a musical instrument.\n \n \n Vocalized-sound\n Musical sound produced by vocal cords in a biological agent.\n \n \n \n Named-animal-sound\n A sound recognizable as being associated with particular animals.\n \n Barking\n Sharp explosive cries like sounds made by certain animals, especially a dog, fox, or seal.\n \n \n Bleating\n Wavering cries like sounds made by a sheep, goat, or calf.\n \n \n Crowing\n Loud shrill sounds characteristic of roosters.\n \n \n Chirping\n Short, sharp, high-pitched noises like sounds made by small birds or an insects.\n \n \n Growling\n Low guttural sounds like those that made in the throat by a hostile dog or other animal.\n \n \n Meowing\n Vocalizations like those made by as those cats. These sounds have diverse tones and are sometimes chattered, murmured or whispered. The purpose can be assertive.\n \n \n Mooing\n Deep vocal sounds like those made by a cow.\n \n \n Purring\n Low continuous vibratory sound such as those made by cats. The sound expresses contentment.\n \n \n Roaring\n Loud, deep, or harsh prolonged sounds such as those made by big cats and bears for long-distance communication and intimidation.\n \n \n Squawking\n Loud, harsh noises such as those made by geese.\n \n \n \n Named-object-sound\n A sound identifiable as coming from a particular type of object.\n \n Alarm-sound\n A loud signal often loud continuous ringing to alert people to a problem or condition that requires urgent attention.\n \n \n Beep\n A short, single tone, that is typically high-pitched and generally made by a computer or other machine.\n \n \n Buzz\n A persistent vibratory sound often made by a buzzer device and used to indicate something incorrect.\n \n \n Ka-ching\n The sound made by a mechanical cash register, often to designate a reward.\n \n \n Click\n The sound made by a mechanical cash register, often to designate a reward.\n \n \n Ding\n A short ringing sound such as that made by a bell, often to indicate a correct response or the expiration of time.\n \n \n Horn-blow\n A loud sound made by forcing air through a sound device that funnels air to create the sound, often used to sound an alert.\n \n \n Siren\n A loud, continuous sound often varying in frequency designed to indicate an emergency.\n \n \n \n \n \n Property\n Something that pertains to a thing. A characteristic of some entity. A quality or feature regarded as a characteristic or inherent part of someone or something. HED attributes are adjectives or adverbs.\n \n extensionAllowed\n \n \n Agent-property\n Something that pertains to an agent.\n \n extensionAllowed\n \n \n Agent-state\n The state of the agent.\n \n Agent-cognitive-state\n The state of the cognitive processes or state of mind of the agent.\n \n Alert\n Condition of heightened watchfulness or preparation for action.\n \n \n Anesthetized\n Having lost sensation to pain or having senses dulled due to the effects of an anesthetic.\n \n \n Asleep\n Having entered a periodic, readily reversible state of reduced awareness and metabolic activity, usually accompanied by physical relaxation and brain activity.\n \n \n Attentive\n Concentrating and focusing mental energy on the task or surroundings.\n \n \n Awake\n In a non sleeping state.\n \n \n Brain-dead\n Characterized by the irreversible absence of cortical and brain stem functioning.\n \n \n Comatose\n In a state of profound unconsciousness associated with markedly depressed cerebral activity.\n \n \n Drowsy\n In a state of near-sleep, a strong desire for sleep, or sleeping for unusually long periods.\n \n \n Intoxicated\n In a state with disturbed psychophysiological functions and responses as a result of administration or ingestion of a psychoactive substance.\n \n \n Locked-in\n In a state of complete paralysis of all voluntary muscles except for the ones that control the movements of the eyes.\n \n \n Passive\n Not responding or initiating an action in response to a stimulus.\n \n \n Resting\n A state in which the agent is not exhibiting any physical exertion.\n \n \n Vegetative\n A state of wakefulness and conscience, but (in contrast to coma) with involuntary opening of the eyes and movements (such as teeth grinding, yawning, or thrashing of the extremities).\n \n \n \n Agent-emotional-state\n The status of the general temperament and outlook of an agent.\n \n Angry\n Experiencing emotions characterized by marked annoyance or hostility.\n \n \n Aroused\n In a state reactive to stimuli leading to increased heart rate and blood pressure, sensory alertness, mobility and readiness to respond.\n \n \n Awed\n Filled with wonder. Feeling grand, sublime or powerful emotions characterized by a combination of joy, fear, admiration, reverence, and/or respect.\n \n \n Compassionate\n Feeling or showing sympathy and concern for others often evoked for a person who is in distress and associated with altruistic motivation.\n \n \n Content\n Feeling satisfaction with things as they are.\n \n \n Disgusted\n Feeling revulsion or profound disapproval aroused by something unpleasant or offensive.\n \n \n Emotionally-neutral\n Feeling neither satisfied nor dissatisfied.\n \n \n Empathetic\n Understanding and sharing the feelings of another. Being aware of, being sensitive to, and vicariously experiencing the feelings, thoughts, and experience of another.\n \n \n Excited\n Feeling great enthusiasm and eagerness.\n \n \n Fearful\n Feeling apprehension that one may be in danger.\n \n \n Frustrated\n Feeling annoyed as a result of being blocked, thwarted, disappointed or defeated.\n \n \n Grieving\n Feeling sorrow in response to loss, whether physical or abstract.\n \n \n Happy\n Feeling pleased and content.\n \n \n Jealous\n Feeling threatened by a rival in a relationship with another individual, in particular an intimate partner, usually involves feelings of threat, fear, suspicion, distrust, anxiety, anger, betrayal, and rejection.\n \n \n Joyful\n Feeling delight or intense happiness.\n \n \n Loving\n Feeling a strong positive emotion of affection and attraction.\n \n \n Relieved\n No longer feeling pain, distress, anxiety, or reassured.\n \n \n Sad\n Feeling grief or unhappiness.\n \n \n Stressed\n Experiencing mental or emotional strain or tension.\n \n \n \n Agent-physiological-state\n Having to do with the mechanical, physical, or biochemical function of an agent.\n \n Healthy\n Having no significant health-related issues.\n \n relatedTag\n Sick\n \n \n \n Hungry\n Being in a state of craving or desiring food.\n \n relatedTag\n Sated\n Thirsty\n \n \n \n Rested\n Feeling refreshed and relaxed.\n \n relatedTag\n Tired\n \n \n \n Sated\n Feeling full.\n \n relatedTag\n Hungry\n \n \n \n Sick\n Being in a state of ill health, bodily malfunction, or discomfort.\n \n relatedTag\n Healthy\n \n \n \n Thirsty\n Feeling a need to drink.\n \n relatedTag\n Hungry\n \n \n \n Tired\n Feeling in need of sleep or rest.\n \n relatedTag\n Rested\n \n \n \n \n Agent-postural-state\n Pertaining to the position in which agent holds their body.\n \n Crouching\n Adopting a position where the knees are bent and the upper body is brought forward and down, sometimes to avoid detection or to defend oneself.\n \n \n Eyes-closed\n Keeping eyes closed with no blinking.\n \n \n Eyes-open\n Keeping eyes open with occasional blinking.\n \n \n Kneeling\n Positioned where one or both knees are on the ground.\n \n \n On-treadmill\n Ambulation on an exercise apparatus with an endless moving belt to support moving in place.\n \n \n Prone\n Positioned in a recumbent body position whereby the person lies on its stomach and faces downward.\n \n \n Sitting\n In a seated position.\n \n \n Standing\n Assuming or maintaining an erect upright position.\n \n \n Seated-with-chin-rest\n Using a device that supports the chin and head.\n \n \n \n \n Agent-task-role\n The function or part that is ascribed to an agent in performing the task.\n \n Experiment-actor\n An agent who plays a predetermined role to create the experiment scenario.\n \n \n Experiment-controller\n An agent exerting control over some aspect of the experiment.\n \n \n Experiment-participant\n Someone who takes part in an activity related to an experiment.\n \n \n Experimenter\n Person who is the owner of the experiment and has its responsibility.\n \n \n \n Agent-trait\n A genetically, environmentally, or socially determined characteristic of an agent.\n \n Age\n Length of time elapsed time since birth of the agent.\n \n #\n \n takesValue\n \n \n \n \n Agent-experience-level\n Amount of skill or knowledge that the agent has as pertains to the task.\n \n Expert-level\n Having comprehensive and authoritative knowledge of or skill in a particular area related to the task.\n \n relatedTag\n Intermediate-experience-level\n Novice-level\n \n \n \n Intermediate-experience-level\n Having a moderate amount of knowledge or skill related to the task.\n \n relatedTag\n Expert-level\n Novice-level\n \n \n \n Novice-level\n Being inexperienced in a field or situation related to the task.\n \n relatedTag\n Expert-level\n Intermediate-experience-level\n \n \n \n \n Gender\n Characteristics that are socially constructed, including norms, behaviors, and roles based on sex.\n \n \n Sex\n Physical properties or qualities by which male is distinguished from female.\n \n Female\n Biological sex of an individual with female sexual organs such ova.\n \n \n Male\n Biological sex of an individual with male sexual organs producing sperm.\n \n \n Intersex\n Having genitalia and/or secondary sexual characteristics of indeterminate sex.\n \n \n \n Handedness\n Individual preference for use of a hand, known as the dominant hand.\n \n Left-handed\n Preference for using the left hand or foot for tasks requiring the use of a single hand or foot.\n \n \n Right-handed\n Preference for using the right hand or foot for tasks requiring the use of a single hand or foot.\n \n \n Ambidextrous\n Having no overall dominance in the use of right or left hand or foot in the performance of tasks that require one hand or foot.\n \n \n \n \n \n Data-property\n Something that pertains to data or information.\n \n extensionAllowed\n \n \n Data-marker\n An indicator placed to mark something.\n \n Temporal-marker\n An indicator placed at a particular time in the data.\n \n Onset\n Labels the start or beginning of something, usually an event.\n \n topLevelTagGroup\n \n \n \n Offset\n Labels the time at which something stops.\n \n topLevelTagGroup\n \n \n \n Pause\n Indicates the temporary interruption of the operation a process and subsequently wait for a signal to continue.\n \n \n Time-out\n A cancellation or cessation that automatically occurs when a predefined interval of time has passed without a certain event occurring.\n \n \n Time-sync\n A synchronization signal whose purpose to help synchronize different signals or processes. Often used to indicate a marker inserted into the recorded data to allow post hoc synchronization of concurrently recorded data streams.\n \n \n \n \n Data-resolution\n Smallest change in a quality being measured by an sensor that causes a perceptible change.\n \n Printer-resolution\n Resolution of a printer, usually expressed as the number of dots-per-inch for a printer.\n \n #\n \n takesValue\n \n \n \n \n Screen-resolution\n Resolution of a screen, usually expressed as the of pixels in a dimension for a digital display device.\n \n #\n \n takesValue\n \n \n \n \n Sensory-resolution\n Resolution of measurements by a sensing device.\n \n #\n \n takesValue\n \n \n \n \n Spatial-resolution\n Linear spacing of a spatial measurement.\n \n #\n \n takesValue\n \n \n \n \n Spectral-resolution\n Measures the ability of a sensor to resolve features in the electromagnetic spectrum.\n \n #\n \n takesValue\n \n \n \n \n Temporal-resolution\n Measures the ability of a sensor to resolve features in time.\n \n #\n \n takesValue\n \n \n \n \n \n Data-source-type\n The type of place, person, or thing from which the data comes or can be obtained.\n \n Computed-feature\n A feature computed from the data by a tool. This tag should be grouped with a label of the form Toolname_propertyName.\n \n \n Computed-prediction\n A computed extrapolation of known data.\n \n \n Expert-annotation\n An explanatory or critical comment or other in-context information provided by an authority.\n \n \n Instrument-measurement\n Information obtained from a device that is used to measure material properties or make other observations.\n \n \n Observation\n Active acquisition of information from a primary source. Should be grouped with a label of the form AgentID_featureName.\n \n \n \n Data-value\n Designation of the type of a data item.\n \n Categorical-value\n Indicates that something can take on a limited and usually fixed number of possible values.\n \n Categorical-class-value\n Categorical values that fall into discrete classes such as true or false. The grouping is absolute in the sense that it is the same for all participants.\n \n All\n To a complete degree or to the full or entire extent.\n \n relatedTag\n Some\n None\n \n \n \n Correct\n Free from error. Especially conforming to fact or truth.\n \n relatedTag\n Wrong\n \n \n \n Explicit\n Stated clearly and in detail, leaving no room for confusion or doubt.\n \n relatedTag\n Implicit\n \n \n \n False\n Not in accordance with facts, reality or definitive criteria.\n \n relatedTag\n True\n \n \n \n Implicit\n Implied though not plainly expressed.\n \n relatedTag\n Explicit\n \n \n \n Invalid\n Not allowed or not conforming to the correct format or specifications.\n \n relatedTag\n Valid\n \n \n \n None\n No person or thing, nobody, not any.\n \n relatedTag\n All\n Some\n \n \n \n Some\n At least a small amount or number of, but not a large amount of, or often.\n \n relatedTag\n All\n None\n \n \n \n True\n Conforming to facts, reality or definitive criteria.\n \n relatedTag\n False\n \n \n \n Valid\n Allowable, usable, or acceptable.\n \n relatedTag\n Invalid\n \n \n \n Wrong\n Inaccurate or not correct.\n \n relatedTag\n Correct\n \n \n \n \n Categorical-judgment-value\n Categorical values that are based on the judgment or perception of the participant such familiar and famous.\n \n Abnormal\n Deviating in any way from the state, position, structure, condition, behavior, or rule which is considered a norm.\n \n relatedTag\n Normal\n \n \n \n Asymmetrical\n Lacking symmetry or having parts that fail to correspond to one another in shape, size, or arrangement.\n \n relatedTag\n Symmetrical\n \n \n \n Audible\n A sound that can be perceived by the participant.\n \n relatedTag\n Inaudible\n \n \n \n Congruent\n Concordance of multiple evidence lines. In agreement or harmony.\n \n relatedTag\n Incongruent\n \n \n \n Complex\n Hard, involved or complicated, elaborate, having many parts.\n \n relatedTag\n Simple\n \n \n \n Constrained\n Keeping something within particular limits or bounds.\n \n relatedTag\n Unconstrained\n \n \n \n Disordered\n Not neatly arranged. Confused and untidy. A structural quality in which the parts of an object are non-rigid.\n \n relatedTag\n Ordered\n \n \n \n Familiar\n Recognized, familiar, or within the scope of knowledge.\n \n relatedTag\n Unfamiliar\n Famous\n \n \n \n Famous\n A person who has a high degree of recognition by the general population for his or her success or accomplishments. A famous person.\n \n relatedTag\n Familiar\n Unfamiliar\n \n \n \n Inaudible\n A sound below the threshold of perception of the participant.\n \n relatedTag\n Audible\n \n \n \n Incongruent\n Not in agreement or harmony.\n \n relatedTag\n Congruent\n \n \n \n Involuntary\n An action that is not made by choice. In the body, involuntary actions (such as blushing) occur automatically, and cannot be controlled by choice.\n \n relatedTag\n Voluntary\n \n \n \n Masked\n Information exists but is not provided or is partially obscured due to security, privacy, or other concerns.\n \n relatedTag\n Unmasked\n \n \n \n Normal\n Being approximately average or within certain limits. Conforming with or constituting a norm or standard or level or type or social norm.\n \n relatedTag\n Abnormal\n \n \n \n Ordered\n Conforming to a logical or comprehensible arrangement of separate elements.\n \n relatedTag\n Disordered\n \n \n \n Simple\n Easily understood or presenting no difficulties.\n \n relatedTag\n Complex\n \n \n \n Symmetrical\n Made up of exactly similar parts facing each other or around an axis. Showing aspects of symmetry.\n \n relatedTag\n Asymmetrical\n \n \n \n Unconstrained\n Moving without restriction.\n \n relatedTag\n Constrained\n \n \n \n Unfamiliar\n Not having knowledge or experience of.\n \n relatedTag\n Familiar\n Famous\n \n \n \n Unmasked\n Information is revealed.\n \n relatedTag\n Masked\n \n \n \n Voluntary\n Using free will or design; not forced or compelled; controlled by individual volition.\n \n relatedTag\n Involuntary\n \n \n \n \n Categorical-level-value\n Categorical values based on dividing a continuous variable into levels such as high and low.\n \n Cold\n Characterized by an absence of heat.\n \n relatedTag\n Hot\n \n \n \n Deep\n Extending relatively far inward or downward.\n \n relatedTag\n Shallow\n \n \n \n High\n Having a greater than normal degree, intensity, or amount.\n \n relatedTag\n Low\n Medium\n \n \n \n Hot\n Characterized by an excess of heat.\n \n relatedTag\n Cold\n \n \n \n Liminal\n Situated at a sensory threshold that is barely perceptible or capable of eliciting a response.\n \n relatedTag\n Subliminal\n Supraliminal\n \n \n \n Loud\n Characterizing a perceived high intensity of sound.\n \n relatedTag\n Quiet\n \n \n \n Low\n Less than normal in degree, intensity or amount.\n \n relatedTag\n High\n \n \n \n Medium\n Mid-way between small and large in number, quantity, magnitude or extent.\n \n relatedTag\n Low\n High\n \n \n \n Negative\n Involving disadvantage or harm.\n \n relatedTag\n Positive\n \n \n \n Positive\n Involving advantage or good.\n \n relatedTag\n Negative\n \n \n \n Quiet\n Characterizing a perceived low intensity of sound.\n \n relatedTag\n Loud\n \n \n \n Rough\n Having a surface with perceptible bumps, ridges, or irregularities.\n \n relatedTag\n Smooth\n \n \n \n Shallow\n Having a depth which is relatively low.\n \n relatedTag\n Deep\n \n \n \n Smooth\n Having a surface free from bumps, ridges, or irregularities.\n \n relatedTag\n Rough\n \n \n \n Subliminal\n Situated below a sensory threshold that is imperceptible or not capable of eliciting a response.\n \n relatedTag\n Liminal\n Supraliminal\n \n \n \n Supraliminal\n Situated above a sensory threshold that is perceptible or capable of eliciting a response.\n \n relatedTag\n Liminal\n Subliminal\n \n \n \n Thick\n Wide in width, extent or cross-section.\n \n relatedTag\n Thin\n \n \n \n Thin\n Narrow in width, extent or cross-section.\n \n relatedTag\n Thick\n \n \n \n \n Categorical-orientation-value\n Value indicating the orientation or direction of something.\n \n Backward\n Directed behind or to the rear.\n \n relatedTag\n Forward\n \n \n \n Downward\n Moving or leading toward a lower place or level.\n \n relatedTag\n Leftward\n Rightward\n Upward\n \n \n \n Forward\n At or near or directed toward the front.\n \n relatedTag\n Backward\n \n \n \n Horizontally-oriented\n Oriented parallel to or in the plane of the horizon.\n \n relatedTag\n Vertically-oriented\n \n \n \n Leftward\n Going toward or facing the left.\n \n relatedTag\n Downward\n Rightward\n Upward\n \n \n \n Oblique\n Slanting or inclined in direction, course, or position that is neither parallel nor perpendicular nor right-angular.\n \n relatedTag\n Rotated\n \n \n \n Rightward\n Going toward or situated on the right.\n \n relatedTag\n Downward\n Leftward\n Upward\n \n \n \n Rotated\n Positioned offset around an axis or center.\n \n \n Upward\n Moving, pointing, or leading to a higher place, point, or level.\n \n relatedTag\n Downward\n Leftward\n Rightward\n \n \n \n Vertically-oriented\n Oriented perpendicular to the plane of the horizon.\n \n relatedTag\n Horizontally-oriented\n \n \n \n \n \n Physical-value\n The value of some physical property of something.\n \n Weight\n The relative mass or the quantity of matter contained by something.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n weightUnits\n \n \n \n \n \n Quantitative-value\n Something capable of being estimated or expressed with numeric values.\n \n Fraction\n A numerical value between 0 and 1.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Item-count\n The integer count of something which is usually grouped with the entity it is counting. (Item-count/3, A) indicates that 3 of A have occurred up to this point.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Item-interval\n An integer indicating how many items or entities have passed since the last one of these. An item interval of 0 indicates the current item.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Percentage\n A fraction or ratio with 100 understood as the denominator.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Ratio\n A quotient of quantities of the same kind for different components within the same system.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n \n Statistical-value\n A value based on or employing the principles of statistics.\n \n extensionAllowed\n \n \n Data-maximum\n The largest possible quantity or degree.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Data-mean\n The sum of a set of values divided by the number of values in the set.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Data-median\n The value which has an equal number of values greater and less than it.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Data-minimum\n The smallest possible quantity.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Probability\n A measure of the expectation of the occurrence of a particular event.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Standard-deviation\n A measure of the range of values in a set of numbers. Standard deviation is a statistic used as a measure of the dispersion or variation in a distribution, equal to the square root of the arithmetic mean of the squares of the deviations from the arithmetic mean.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Statistical-accuracy\n A measure of closeness to true value expressed as a number between 0 and 1.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Statistical-precision\n A quantitative representation of the degree of accuracy necessary for or associated with a particular action.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Statistical-recall\n Sensitivity is a measurement datum qualifying a binary classification test and is computed by substracting the false negative rate to the integral numeral 1.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Statistical-uncertainty\n A measure of the inherent variability of repeated observation measurements of a quantity including quantities evaluated by statistical methods and by other means.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n \n Spatiotemporal-value\n A property relating to space and/or time.\n \n Rate-of-change\n The amount of change accumulated per unit time.\n \n Acceleration\n Magnitude of the rate of change in either speed or direction. The direction of change should be given separately.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n accelerationUnits\n \n \n \n \n Frequency\n Frequency is the number of occurrences of a repeating event per unit time.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n frequencyUnits\n \n \n \n \n Jerk-rate\n Magnitude of the rate at which the acceleration of an object changes with respect to time. The direction of change should be given separately.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n jerkUnits\n \n \n \n \n Sampling-rate\n The number of digital samples taken or recorded per unit of time.\n \n #\n \n takesValue\n \n \n unitClass\n frequencyUnits\n \n \n \n \n Refresh-rate\n The frequency with which the image on a computer monitor or similar electronic display screen is refreshed, usually expressed in hertz.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Speed\n A scalar measure of the rate of movement of the object expressed either as the distance travelled divided by the time taken (average speed) or the rate of change of position with respect to time at a particular point (instantaneous speed). The direction of change should be given separately.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n speedUnits\n \n \n \n \n Temporal-rate\n The number of items per unit of time.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n frequencyUnits\n \n \n \n \n \n Spatial-value\n Value of an item involving space.\n \n Angle\n The amount of inclination of one line to another or the plane of one object to another.\n \n #\n \n takesValue\n \n \n unitClass\n angleUnits\n \n \n valueClass\n numericClass\n \n \n \n \n Distance\n A measure of the space separating two objects or points.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n physicalLengthUnits\n \n \n \n \n Position\n A reference to the alignment of an object, a particular situation or view of a situation, or the location of an object. Coordinates with respect a specified frame of reference or the default Screen-frame if no frame is given.\n \n X-position\n The position along the x-axis of the frame of reference.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n physicalLengthUnits\n \n \n \n \n Y-position\n The position along the y-axis of the frame of reference.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n physicalLengthUnits\n \n \n \n \n Z-position\n The position along the z-axis of the frame of reference.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n physicalLengthUnits\n \n \n \n \n \n Size\n The physical magnitude of something.\n \n Area\n The extent of a 2-dimensional surface enclosed within a boundary.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n areaUnits\n \n \n \n \n Depth\n The distance from the surface of something especially from the perspective of looking from the front.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n physicalLengthUnits\n \n \n \n \n Length\n The linear extent in space from one end of something to the other end, or the extent of something from beginning to end.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n physicalLengthUnits\n \n \n \n \n Width\n The extent or measurement of something from side to side.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n physicalLengthUnits\n \n \n \n \n Height\n The vertical measurement or distance from the base to the top of an object.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n physicalLengthUnits\n \n \n \n \n Volume\n The amount of three dimensional space occupied by an object or the capacity of a space or container.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n volumeUnits\n \n \n \n \n \n \n Temporal-value\n A characteristic of or relating to time or limited by time.\n \n Delay\n Time during which some action is awaited.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n timeUnits\n \n \n \n \n Duration\n The period of time during which something occurs or continues.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n timeUnits\n \n \n \n \n Time-interval\n The period of time separating two instances, events, or occurrences.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n timeUnits\n \n \n \n \n Time-value\n A value with units of time. Usually grouped with tags identifying what the value represents.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n timeUnits\n \n \n \n \n \n \n \n Data-variability-attribute\n An attribute describing how something changes or varies.\n \n Abrupt\n Marked by sudden change.\n \n \n Constant\n Continually recurring or continuing without interruption. Not changing in time or space.\n \n \n Continuous\n Uninterrupted in time, sequence, substance, or extent.\n \n relatedTag\n Discrete\n Discontinuous\n \n \n \n Decreasing\n Becoming smaller or fewer in size, amount, intensity, or degree.\n \n relatedTag\n Increasing\n \n \n \n Deterministic\n No randomness is involved in the development of the future states of the element.\n \n relatedTag\n Random\n Stochastic\n \n \n \n Discontinuous\n Having a gap in time, sequence, substance, or extent.\n \n relatedTag\n Continuous\n \n \n \n Discrete\n Constituting a separate entities or parts.\n \n relatedTag\n Continuous\n Discontinuous\n \n \n \n Flickering\n Moving irregularly or unsteadily or burning or shining fitfully or with a fluctuating light.\n \n \n Estimated-value\n Something that has been calculated or measured approximately.\n \n \n Exact-value\n A value that is viewed to the true value according to some standard.\n \n \n Fractal\n Having extremely irregular curves or shapes for which any suitably chosen part is similar in shape to a given larger or smaller part when magnified or reduced to the same size.\n \n \n Increasing\n Becoming greater in size, amount, or degree.\n \n relatedTag\n Decreasing\n \n \n \n Random\n Governed by or depending on chance. Lacking any definite plan or order or purpose.\n \n relatedTag\n Deterministic\n Stochastic\n \n \n \n Repetitive\n A recurring action that is often non-purposeful.\n \n \n Stochastic\n Uses a random probability distribution or pattern that may be analysed statistically but may not be predicted precisely to determine future states.\n \n relatedTag\n Deterministic\n Random\n \n \n \n Varying\n Differing in size, amount, degree, or nature.\n \n \n \n \n Environmental-property\n Relating to or arising from the surroundings of an agent.\n \n Indoors\n Located inside a building or enclosure.\n \n \n Outdoors\n Any area outside a building or shelter.\n \n \n Real-world\n Located in a place that exists in real space and time under realistic conditions.\n \n \n Virtual-world\n Using technology that creates immersive, computer-generated experiences that a person can interact with and navigate through. The digital content is generally delivered to the user through some type of headset and responds to changes in head position or through interaction with other types of sensors. Existing in a virtual setting such as a simulation or game environment.\n \n \n Augmented-reality\n Using technology that enhances real-world experiences with computer-derived digital overlays to change some aspects of perception of the natural environment. The digital content is shown to the user through a smart device or glasses and responds to changes in the environment.\n \n \n Motion-platform\n A mechanism that creates the feelings of being in a real motion environment.\n \n \n Urban\n Relating to, located in, or characteristic of a city or densely populated area.\n \n \n Rural\n Of or pertaining to the country as opposed to the city.\n \n \n Terrain\n Characterization of the physical features of a tract of land.\n \n Composite-terrain\n Tracts of land characterized by a mixure of physical features.\n \n \n Dirt-terrain\n Tracts of land characterized by a soil surface and lack of vegetation.\n \n \n Grassy-terrain\n Tracts of land covered by grass.\n \n \n Gravel-terrain\n Tracts of land covered by a surface consisting a loose aggregation of small water-worn or pounded stones.\n \n \n Leaf-covered-terrain\n Tracts of land covered by leaves and composited organic material.\n \n \n Muddy-terrain\n Tracts of land covered by a liquid or semi-liquid mixture of water and some combination of soil, silt, and clay.\n \n \n Paved-terrain\n Tracts of land covered with concrete, asphalt, stones, or bricks.\n \n \n Rocky-terrain\n Tracts of land consisting or full of rock or rocks.\n \n \n Sloped-terrain\n Tracts of land arranged in a sloping or inclined position.\n \n \n Uneven-terrain\n Tracts of land that are not level, smooth, or regular.\n \n \n \n \n Informational-property\n Something that pertains to a task.\n \n extensionAllowed\n \n \n Description\n An explanation of what the tag group it is in means. If the description is at the top-level of an event string, the description applies to the event.\n \n requireChild\n \n \n #\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n ID\n An alphanumeric name that identifies either a unique object or a unique class of objects. Here the object or class may be an idea, physical countable object (or class), or physical uncountable substance (or class).\n \n requireChild\n \n \n #\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Label\n A string of 20 or fewer characters identifying something. Labels usually refer to general classes of things while IDs refer to specific instances. A term that is associated with some entity. A brief description given for purposes of identification. An identifying or descriptive marker that is attached to an object.\n \n requireChild\n \n \n #\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Metadata\n Data about data. Information that describes another set of data.\n \n CogAtlas\n The Cognitive Atlas ID number of something.\n \n #\n \n takesValue\n \n \n \n \n CogPo\n The CogPO ID number of something.\n \n #\n \n takesValue\n \n \n \n \n Creation-date\n The date on which data creation of this element began.\n \n requireChild\n \n \n #\n \n takesValue\n \n \n valueClass\n dateTimeClass\n \n \n \n \n Experimental-note\n A brief written record about the experiment.\n \n #\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n Library-name\n Official name of a HED library.\n \n #\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n OBO-identifier\n The identifier of a term in some Open Biology Ontology (OBO) ontology.\n \n #\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Pathname\n The specification of a node (file or directory) in a hierarchical file system, usually specified by listing the nodes top-down.\n \n #\n \n takesValue\n \n \n \n \n Subject-identifier\n A sequence of characters used to identify, name, or characterize a trial or study subject.\n \n #\n \n takesValue\n \n \n \n \n Version-identifier\n An alphanumeric character string that identifies a form or variant of a type or original.\n \n #\n Usually is a semantic version.\n \n takesValue\n \n \n \n \n \n Parameter\n Something user-defined for this experiment.\n \n Parameter-label\n The name of the parameter.\n \n #\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Parameter-value\n The value of the parameter.\n \n #\n \n takesValue\n \n \n valueClass\n textClass\n \n \n \n \n \n \n Organizational-property\n Relating to an organization or the action of organizing something.\n \n Collection\n A tag designating a grouping of items such as in a set or list.\n \n #\n Name of the collection.\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Condition-variable\n An aspect of the experiment or task that is to be varied during the experiment. Task-conditions are sometimes called independent variables or contrasts.\n \n #\n Name of the condition variable.\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Control-variable\n An aspect of the experiment that is fixed throughout the study and usually is explicitly controlled.\n \n #\n Name of the control variable.\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Def\n A HED-specific utility tag used with a defined name to represent the tags associated with that definition.\n \n requireChild\n \n \n #\n Name of the definition.\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Def-expand\n A HED specific utility tag that is grouped with an expanded definition. The child value of the Def-expand is the name of the expanded definition.\n \n requireChild\n \n \n tagGroup\n \n \n #\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Definition\n A HED-specific utility tag whose child value is the name of the concept and the tag group associated with the tag is an English language explanation of a concept.\n \n requireChild\n \n \n topLevelTagGroup\n \n \n #\n Name of the definition.\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Event-context\n A special HED tag inserted as part of a top-level tag group to contain information about the interrelated conditions under which the event occurs. The event context includes information about other events that are ongoing when this event happens.\n \n topLevelTagGroup\n \n \n unique\n \n \n \n Event-stream\n A special HED tag indicating that this event is a member of an ordered succession of events.\n \n #\n Name of the event stream.\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Experimental-intertrial\n A tag used to indicate a part of the experiment between trials usually where nothing is happening.\n \n #\n Optional label for the intertrial block.\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Experimental-trial\n Designates a run or execution of an activity, for example, one execution of a script. A tag used to indicate a particular organizational part in the experimental design often containing a stimulus-response pair or stimulus-response-feedback triad.\n \n #\n Optional label for the trial (often a numerical string).\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Indicator-variable\n An aspect of the experiment or task that is measured as task conditions are varied during the experiment. Experiment indicators are sometimes called dependent variables.\n \n #\n Name of the indicator variable.\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Recording\n A tag designating the data recording. Recording tags are usually have temporal scope which is the entire recording.\n \n #\n Optional label for the recording.\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Task\n An assigned piece of work, usually with a time allotment. A tag used to indicate a linkage the structured activities performed as part of the experiment.\n \n #\n Optional label for the task block.\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n Time-block\n A tag used to indicate a contiguous time block in the experiment during which something is fixed or noted.\n \n #\n Optional label for the task block.\n \n takesValue\n \n \n valueClass\n nameClass\n \n \n \n \n \n Sensory-property\n Relating to sensation or the physical senses.\n \n Sensory-attribute\n A sensory characteristic associated with another entity.\n \n Auditory-attribute\n Pertaining to the sense of hearing.\n \n Loudness\n Perceived intensity of a sound.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Pitch\n A perceptual property that allows the user to order sounds on a frequency scale.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n frequencyUnits\n \n \n \n \n Sound-envelope\n Description of how a sound changes over time.\n \n Sound-envelope-attack\n The time taken for initial run-up of level from nil to peak usually beginning when the key on a musical instrument is pressed.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n timeUnits\n \n \n \n \n Sound-envelope-decay\n The time taken for the subsequent run down from the attack level to the designated sustain level.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n timeUnits\n \n \n \n \n Sound-envelope-release\n The time taken for the level to decay from the sustain level to zero after the key is released\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n timeUnits\n \n \n \n \n Sound-envelope-sustain\n The time taken for the main sequence of the sound duration, until the key is released.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n unitClass\n timeUnits\n \n \n \n \n \n Timbre\n The perceived sound quality of a singing voice or musical instrument.\n \n #\n \n takesValue\n \n \n valueClass\n labelClass\n \n \n \n \n \n Gustatory-attribute\n Pertaining to the sense of taste.\n \n Bitter\n Having a sharp, pungent taste.\n \n \n Salty\n Tasting of or like salt.\n \n \n Savory\n Belonging to a taste that is salty or spicy rather than sweet.\n \n \n Sour\n Having a sharp, acidic taste.\n \n \n Sweet\n Having or resembling the taste of sugar.\n \n \n \n Olfactory-attribute\n Having a smell.\n \n \n Somatic-attribute\n Pertaining to the feelings in the body or of the nervous system.\n \n Pain\n The sensation of discomfort, distress, or agony, resulting from the stimulation of specialized nerve endings.\n \n \n Stress\n The negative mental, emotional, and physical reactions that occur when environmental stressors are perceived as exceeding the adaptive capacities of the individual.\n \n \n \n Tactile-attribute\n Pertaining to the sense of touch.\n \n Tactile-pressure\n Having a feeling of heaviness.\n \n \n Tactile-temperature\n Having a feeling of hotness or coldness.\n \n \n Tactile-texture\n Having a feeling of roughness.\n \n \n Tactile-vibration\n Having a feeling of mechanical oscillation.\n \n \n \n Vestibular-attribute\n Pertaining to the sense of balance or body position.\n \n \n Visual-attribute\n Pertaining to the sense of sight.\n \n Color\n The appearance of objects (or light sources) described in terms of perception of their hue and lightness (or brightness) and saturation.\n \n CSS-color\n One of 140 colors supported by all browsers. For more details such as the color RGB or HEX values, check: https://www.w3schools.com/colors/colors_groups.asp\n \n Blue-color\n CSS color group\n \n CadetBlue\n CSS-color 0x5F9EA0\n \n \n SteelBlue\n CSS-color 0x4682B4\n \n \n LightSteelBlue\n CSS-color 0xB0C4DE\n \n \n LightBlue\n CSS-color 0xADD8E6\n \n \n PowderBlue\n CSS-color 0xB0E0E6\n \n \n LightSkyBlue\n CSS-color 0x87CEFA\n \n \n SkyBlue\n CSS-color 0x87CEEB\n \n \n CornflowerBlue\n CSS-color 0x6495ED\n \n \n DeepSkyBlue\n CSS-color 0x00BFFF\n \n \n DodgerBlue\n CSS-color 0x1E90FF\n \n \n RoyalBlue\n CSS-color 0x4169E1\n \n \n Blue\n CSS-color 0x0000FF\n \n \n MediumBlue\n CSS-color 0x0000CD\n \n \n DarkBlue\n CSS-color 0x00008B\n \n \n Navy\n CSS-color 0x000080\n \n \n MidnightBlue\n CSS-color 0x191970\n \n \n \n Brown-color\n CSS color group\n \n Cornsilk\n CSS-color 0xFFF8DC\n \n \n BlanchedAlmond\n CSS-color 0xFFEBCD\n \n \n Bisque\n CSS-color 0xFFE4C4\n \n \n NavajoWhite\n CSS-color 0xFFDEAD\n \n \n Wheat\n CSS-color 0xF5DEB3\n \n \n BurlyWood\n CSS-color 0xDEB887\n \n \n Tan\n CSS-color 0xD2B48C\n \n \n RosyBrown\n CSS-color 0xBC8F8F\n \n \n SandyBrown\n CSS-color 0xF4A460\n \n \n GoldenRod\n CSS-color 0xDAA520\n \n \n DarkGoldenRod\n CSS-color 0xB8860B\n \n \n Peru\n CSS-color 0xCD853F\n \n \n Chocolate\n CSS-color 0xD2691E\n \n \n Olive\n CSS-color 0x808000\n \n \n SaddleBrown\n CSS-color 0x8B4513\n \n \n Sienna\n CSS-color 0xA0522D\n \n \n Brown\n CSS-color 0xA52A2A\n \n \n Maroon\n CSS-color 0x800000\n \n \n \n Cyan-color\n CSS color group\n \n Aqua\n CSS-color 0x00FFFF\n \n \n Cyan\n CSS-color 0x00FFFF\n \n \n LightCyan\n CSS-color 0xE0FFFF\n \n \n PaleTurquoise\n CSS-color 0xAFEEEE\n \n \n Aquamarine\n CSS-color 0x7FFFD4\n \n \n Turquoise\n CSS-color 0x40E0D0\n \n \n MediumTurquoise\n CSS-color 0x48D1CC\n \n \n DarkTurquoise\n CSS-color 0x00CED1\n \n \n \n Green-color\n CSS color group\n \n GreenYellow\n CSS-color 0xADFF2F\n \n \n Chartreuse\n CSS-color 0x7FFF00\n \n \n LawnGreen\n CSS-color 0x7CFC00\n \n \n Lime\n CSS-color 0x00FF00\n \n \n LimeGreen\n CSS-color 0x32CD32\n \n \n PaleGreen\n CSS-color 0x98FB98\n \n \n LightGreen\n CSS-color 0x90EE90\n \n \n MediumSpringGreen\n CSS-color 0x00FA9A\n \n \n SpringGreen\n CSS-color 0x00FF7F\n \n \n MediumSeaGreen\n CSS-color 0x3CB371\n \n \n SeaGreen\n CSS-color 0x2E8B57\n \n \n ForestGreen\n CSS-color 0x228B22\n \n \n Green\n CSS-color 0x008000\n \n \n DarkGreen\n CSS-color 0x006400\n \n \n YellowGreen\n CSS-color 0x9ACD32\n \n \n OliveDrab\n CSS-color 0x6B8E23\n \n \n DarkOliveGreen\n CSS-color 0x556B2F\n \n \n MediumAquaMarine\n CSS-color 0x66CDAA\n \n \n DarkSeaGreen\n CSS-color 0x8FBC8F\n \n \n LightSeaGreen\n CSS-color 0x20B2AA\n \n \n DarkCyan\n CSS-color 0x008B8B\n \n \n Teal\n CSS-color 0x008080\n \n \n \n Gray-color\n CSS color group\n \n Gainsboro\n CSS-color 0xDCDCDC\n \n \n LightGray\n CSS-color 0xD3D3D3\n \n \n Silver\n CSS-color 0xC0C0C0\n \n \n DarkGray\n CSS-color 0xA9A9A9\n \n \n DimGray\n CSS-color 0x696969\n \n \n Gray\n CSS-color 0x808080\n \n \n LightSlateGray\n CSS-color 0x778899\n \n \n SlateGray\n CSS-color 0x708090\n \n \n DarkSlateGray\n CSS-color 0x2F4F4F\n \n \n Black\n CSS-color 0x000000\n \n \n \n Orange-color\n CSS color group\n \n Orange\n CSS-color 0xFFA500\n \n \n DarkOrange\n CSS-color 0xFF8C00\n \n \n Coral\n CSS-color 0xFF7F50\n \n \n Tomato\n CSS-color 0xFF6347\n \n \n OrangeRed\n CSS-color 0xFF4500\n \n \n \n Pink-color\n CSS color group\n \n Pink\n CSS-color 0xFFC0CB\n \n \n LightPink\n CSS-color 0xFFB6C1\n \n \n HotPink\n CSS-color 0xFF69B4\n \n \n DeepPink\n CSS-color 0xFF1493\n \n \n PaleVioletRed\n CSS-color 0xDB7093\n \n \n MediumVioletRed\n CSS-color 0xC71585\n \n \n \n Purple-color\n CSS color group\n \n Lavender\n CSS-color 0xE6E6FA\n \n \n Thistle\n CSS-color 0xD8BFD8\n \n \n Plum\n CSS-color 0xDDA0DD\n \n \n Orchid\n CSS-color 0xDA70D6\n \n \n Violet\n CSS-color 0xEE82EE\n \n \n Fuchsia\n CSS-color 0xFF00FF\n \n \n Magenta\n CSS-color 0xFF00FF\n \n \n MediumOrchid\n CSS-color 0xBA55D3\n \n \n DarkOrchid\n CSS-color 0x9932CC\n \n \n DarkViolet\n CSS-color 0x9400D3\n \n \n BlueViolet\n CSS-color 0x8A2BE2\n \n \n DarkMagenta\n CSS-color 0x8B008B\n \n \n Purple\n CSS-color 0x800080\n \n \n MediumPurple\n CSS-color 0x9370DB\n \n \n MediumSlateBlue\n CSS-color 0x7B68EE\n \n \n SlateBlue\n CSS-color 0x6A5ACD\n \n \n DarkSlateBlue\n CSS-color 0x483D8B\n \n \n RebeccaPurple\n CSS-color 0x663399\n \n \n Indigo\n CSS-color 0x4B0082\n \n \n \n Red-color\n CSS color group\n \n LightSalmon\n CSS-color 0xFFA07A\n \n \n Salmon\n CSS-color 0xFA8072\n \n \n DarkSalmon\n CSS-color 0xE9967A\n \n \n LightCoral\n CSS-color 0xF08080\n \n \n IndianRed\n CSS-color 0xCD5C5C\n \n \n Crimson\n CSS-color 0xDC143C\n \n \n Red\n CSS-color 0xFF0000\n \n \n FireBrick\n CSS-color 0xB22222\n \n \n DarkRed\n CSS-color 0x8B0000\n \n \n \n Yellow-color\n CSS color group\n \n Gold\n CSS-color 0xFFD700\n \n \n Yellow\n CSS-color 0xFFFF00\n \n \n LightYellow\n CSS-color 0xFFFFE0\n \n \n LemonChiffon\n CSS-color 0xFFFACD\n \n \n LightGoldenRodYellow\n CSS-color 0xFAFAD2\n \n \n PapayaWhip\n CSS-color 0xFFEFD5\n \n \n Moccasin\n CSS-color 0xFFE4B5\n \n \n PeachPuff\n CSS-color 0xFFDAB9\n \n \n PaleGoldenRod\n CSS-color 0xEEE8AA\n \n \n Khaki\n CSS-color 0xF0E68C\n \n \n DarkKhaki\n CSS-color 0xBDB76B\n \n \n \n White-color\n CSS color group\n \n White\n CSS-color 0xFFFFFF\n \n \n Snow\n CSS-color 0xFFFAFA\n \n \n HoneyDew\n CSS-color 0xF0FFF0\n \n \n MintCream\n CSS-color 0xF5FFFA\n \n \n Azure\n CSS-color 0xF0FFFF\n \n \n AliceBlue\n CSS-color 0xF0F8FF\n \n \n GhostWhite\n CSS-color 0xF8F8FF\n \n \n WhiteSmoke\n CSS-color 0xF5F5F5\n \n \n SeaShell\n CSS-color 0xFFF5EE\n \n \n Beige\n CSS-color 0xF5F5DC\n \n \n OldLace\n CSS-color 0xFDF5E6\n \n \n FloralWhite\n CSS-color 0xFFFAF0\n \n \n Ivory\n CSS-color 0xFFFFF0\n \n \n AntiqueWhite\n CSS-color 0xFAEBD7\n \n \n Linen\n CSS-color 0xFAF0E6\n \n \n LavenderBlush\n CSS-color 0xFFF0F5\n \n \n MistyRose\n CSS-color 0xFFE4E1\n \n \n \n \n Color-shade\n A slight degree of difference between colors, especially with regard to how light or dark it is or as distinguished from one nearly like it.\n \n Dark-shade\n A color tone not reflecting much light.\n \n \n Light-shade\n A color tone reflecting more light.\n \n \n \n Grayscale\n Using a color map composed of shades of gray, varying from black at the weakest intensity to white at the strongest.\n \n #\n White intensity between 0 and 1\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n HSV-color\n A color representation that models how colors appear under light.\n \n Hue\n Attribute of a visual sensation according to which an area appears to be similar to one of the perceived colors.\n \n #\n Angular value between 0 and 360\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n Saturation\n Colorfulness of a stimulus relative to its own brightness.\n \n #\n B value of RGB between 0 and 1\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n HSV-value\n An attribute of a visual sensation according to which an area appears to emit more or less light.\n \n #\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n \n RGB-color\n A color from the RGB schema.\n \n RGB-red\n The red component.\n \n #\n R value of RGB between 0 and 1\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n RGB-blue\n The blue component.\n \n #\n B value of RGB between 0 and 1\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n RGB-green\n The green component.\n \n #\n G value of RGB between 0 and 1\n \n takesValue\n \n \n valueClass\n numericClass\n \n \n \n \n \n \n Luminance\n A quality that exists by virtue of the luminous intensity per unit area projected in a given direction.\n \n \n Opacity\n A measure of impenetrability to light.\n \n \n \n \n Sensory-presentation\n The entity has a sensory manifestation.\n \n Auditory-presentation\n The sense of hearing is used in the presentation to the user.\n \n Loudspeaker-separation\n The distance between two loudspeakers. Grouped with the Distance tag.\n \n suggestedTag\n Distance\n \n \n \n Monophonic\n Relating to sound transmission, recording, or reproduction involving a single transmission path.\n \n \n Silent\n The absence of ambient audible sound or the state of having ceased to produce sounds.\n \n \n Stereophonic\n Relating to, or constituting sound reproduction involving the use of separated microphones and two transmission channels to achieve the sound separation of a live hearing.\n \n \n \n Gustatory-presentation\n The sense of taste used in the presentation to the user.\n \n \n Olfactory-presentation\n The sense of smell used in the presentation to the user.\n \n \n Somatic-presentation\n The nervous system is used in the presentation to the user.\n \n \n Tactile-presentation\n The sense of touch used in the presentation to the user.\n \n \n Vestibular-presentation\n The sense balance used in the presentation to the user.\n \n \n Visual-presentation\n The sense of sight used in the presentation to the user.\n \n 2D-view\n A view showing only two dimensions.\n \n \n 3D-view\n A view showing three dimensions.\n \n \n Background-view\n Parts of the view that are farthest from the viewer and usually the not part of the visual focus.\n \n \n Bistable-view\n Something having two stable visual forms that have two distinguishable stable forms as in optical illusions.\n \n \n Foreground-view\n Parts of the view that are closest to the viewer and usually the most important part of the visual focus.\n \n \n Foveal-view\n Visual presentation directly on the fovea. A view projected on the small depression in the retina containing only cones and where vision is most acute.\n \n \n Map-view\n A diagrammatic representation of an area of land or sea showing physical features, cities, roads.\n \n Aerial-view\n Elevated view of an object from above, with a perspective as though the observer were a bird.\n \n \n Satellite-view\n A representation as captured by technology such as a satellite.\n \n \n Street-view\n A 360-degrees panoramic view from a position on the ground.\n \n \n \n Peripheral-view\n Indirect vision as it occurs outside the point of fixation.\n \n \n \n \n \n Task-property\n Something that pertains to a task.\n \n extensionAllowed\n \n \n Task-attentional-demand\n Strategy for allocating attention toward goal-relevant information.\n \n Bottom-up-attention\n Attentional guidance purely by externally driven factors to stimuli that are salient because of their inherent properties relative to the background. Sometimes this is referred to as stimulus driven.\n \n relatedTag\n Top-down-attention\n \n \n \n Covert-attention\n Paying attention without moving the eyes.\n \n relatedTag\n Overt-attention\n \n \n \n Divided-attention\n Integrating parallel multiple stimuli. Behavior involving responding simultaneously to multiple tasks or multiple task demands.\n \n relatedTag\n Focused-attention\n \n \n \n Focused-attention\n Responding discretely to specific visual, auditory, or tactile stimuli.\n \n relatedTag\n Divided-attention\n \n \n \n Orienting-attention\n Directing attention to a target stimulus.\n \n \n Overt-attention\n Selectively processing one location over others by moving the eyes to point at that location.\n \n relatedTag\n Covert-attention\n \n \n \n Selective-attention\n Maintaining a behavioral or cognitive set in the face of distracting or competing stimuli. Ability to pay attention to a limited array of all available sensory information.\n \n \n Sustained-attention\n Maintaining a consistent behavioral response during continuous and repetitive activity.\n \n \n Switched-attention\n Having to switch attention between two or more modalities of presentation.\n \n \n Top-down-attention\n Voluntary allocation of attention to certain features. Sometimes this is referred to goal-oriented attention.\n \n relatedTag\n Bottom-up-attention\n \n \n \n \n Task-effect-evidence\n The evidence supporting the conclusion that the event had the specified effect.\n \n Computational-evidence\n A type of evidence in which data are produced, and/or generated, and/or analyzed on a computer.\n \n \n External-evidence\n A phenomenon that follows and is caused by some previous phenomenon.\n \n \n Intended-effect\n A phenomenon that is intended to follow and be caused by some previous phenomenon.\n \n \n Behavioral-evidence\n An indication or conclusion based on the behavior of an agent.\n \n \n \n Task-event-role\n The purpose of an event with respect to the task.\n \n Experimental-stimulus\n Part of something designed to elicit a response in the experiment.\n \n \n Incidental\n A sensory or other type of event that is unrelated to the task or experiment.\n \n \n Instructional\n Usually associated with a sensory event intended to give instructions to the participant about the task or behavior.\n \n \n Mishap\n Unplanned disruption such as an equipment or experiment control abnormality or experimenter error.\n \n \n Participant-response\n Something related to a participant actions in performing the task.\n \n \n Task-activity\n Something that is part of the overall task or is necessary to the overall experiment but is not directly part of a stimulus-response cycle. Examples would be taking a survey or provided providing a silva sample.\n \n \n Warning\n Something that should warn the participant that the parameters of the task have been or are about to be exceeded such as a warning message about getting too close to the shoulder of the road in a driving task.\n \n \n \n Task-action-type\n How an agent action should be interpreted in terms of the task specification.\n \n Appropriate-action\n An action suitable or proper in the circumstances.\n \n relatedTag\n Inappropriate-action\n \n \n \n Correct-action\n An action that was a correct response in the context of the task.\n \n relatedTag\n Incorrect-action\n Indeterminate-action\n \n \n \n Correction\n An action offering an improvement to replace a mistake or error.\n \n \n Incorrect-action\n An action considered wrong or incorrect in the context of the task.\n \n relatedTag\n Correct-action\n Indeterminate-action\n \n \n \n Imagined-action\n Form a mental image or concept of something. This is used to identity something that only happened in the imagination of the participant as in imagined movements in motor imagery paradigms.\n \n \n Inappropriate-action\n An action not in keeping with what is correct or proper for the task.\n \n relatedTag\n Appropriate-action\n \n \n \n Indeterminate-action\n An action that cannot be distinguished between two or more possibibities in the current context. This tag might be applied when an outside evaluator or a classification algorithm cannot determine a definitive result.\n \n relatedTag\n Correct-action\n Incorrect-action\n Miss\n Near-miss\n \n \n \n Omitted-action\n An expected response was skipped.\n \n \n Miss\n An action considered to be a failure in the context of the task. For example, if the agent is supposed to try to hit a target and misses.\n \n relatedTag\n Near-miss\n \n \n \n Near-miss\n An action barely satisfied the requirements of the task. In a driving experiment for example this could pertain to a narrowly avoided collision or other accident.\n \n relatedTag\n Miss\n \n \n \n \n Task-relationship\n Specifying organizational importance of sub-tasks.\n \n Background-subtask\n A part of the task which should be performed in the background as for example inhibiting blinks due to instruction while performing the primary task.\n \n \n Primary-subtask\n A part of the task which should be the primary focus of the participant.\n \n \n \n Task-stimulus-role\n The role the stimulus plays in the task.\n \n Cue\n A signal for an action, a pattern of stimuli indicating a particular response.\n \n \n Distractor\n A person or thing that distracts or a plausible but incorrect option in a multiple-choice question. In pyschological studies this is sometimes referred to as a foil.\n \n \n Expected\n Considered likely, probable or anticipated. Something of low information value as in frequent non-targets in an RSVP paradigm.\n \n relatedTag\n Unexpected\n \n \n suggestedTag\n Target\n \n \n \n Extraneous\n Irrelevant or unrelated to the subject being dealt with.\n \n \n Feedback\n An evaluative response to an inquiry, process, event, or activity.\n \n \n Go-signal\n An indicator to proceed with a planned action.\n \n relatedTag\n Stop-signal\n \n \n \n Meaningful\n Conveying significant or relevant information.\n \n \n Newly-learned\n Representing recently acquired information or understanding.\n \n \n Non-informative\n Something that is not useful in forming an opinion or judging an outcome.\n \n \n Non-target\n Something other than that done or looked for. Also tag Expected if the Non-target is frequent.\n \n relatedTag\n Target\n \n \n \n Not-meaningful\n Not having a serious, important, or useful quality or purpose.\n \n \n Novel\n Having no previous example or precedent or parallel.\n \n \n Oddball\n Something unusual, or infrequent.\n \n relatedTag\n Unexpected\n \n \n suggestedTag\n Target\n \n \n \n Planned\n Something that was decided on or arranged in advance.\n \n relatedTag\n Unplanned\n \n \n \n Penalty\n A disadvantage, loss, or hardship due to some action.\n \n \n Priming\n An implicit memory effect in which exposure to a stimulus influences response to a later stimulus.\n \n \n Query\n A sentence of inquiry that asks for a reply.\n \n \n Reward\n A positive reinforcement for a desired action, behavior or response.\n \n \n Stop-signal\n An indicator that the agent should stop the current activity.\n \n relatedTag\n Go-signal\n \n \n \n Target\n Something fixed as a goal, destination, or point of examination.\n \n \n Threat\n An indicator that signifies hostility and predicts an increased probability of attack.\n \n \n Timed\n Something planned or scheduled to be done at a particular time or lasting for a specified amount of time.\n \n \n Unexpected\n Something that is not anticipated.\n \n relatedTag\n Expected\n \n \n \n Unplanned\n Something that has not been planned as part of the task.\n \n relatedTag\n Planned\n \n \n \n \n \n \n Relation\n Concerns the way in which two or more people or things are connected.\n \n Comparative-relation\n Something considered in comparison to something else.\n \n Approximately-equal-to\n (A (Approximately-equal-to B)) indicates that A and B have almost the same value. Here A and B could refer to sizes, orders, positions or other quantities.\n \n \n Less-than\n (A (Less-than B)) indicates that A is smaller than B. Here A and B could refer to sizes, orders, positions or other quantities.\n \n \n Less-than-or-equal-to\n (A (Less-than-or-equal-to B)) indicates that the relative size or order of A is smaller than or equal to B.\n \n \n Greater-than\n (A (Greater-than B)) indicates that the relative size or order of A is bigger than that of B.\n \n \n Greater-than-or-equal-to\n (A (Greater-than-or-equal-to B)) indicates that the relative size or order of A is bigger than or the same as that of B.\n \n \n Equal-to\n (A (Equal-to B)) indicates that the size or order of A is the same as that of B.\n \n \n Not-equal-to\n (A (Not-equal-to B)) indicates that the size or order of A is not the same as that of B.\n \n \n \n Connective-relation\n Indicates two items are related in some way.\n \n Belongs-to\n (A (Belongs-to B)) indicates that A is a member of B.\n \n \n Connected-to\n (A (Connected-to) B) indicates that A is related to B in some respect, usually through a direct link.\n \n \n Contained-in\n (A (Contained-in B)) indicates that A is completely inside of B.\n \n \n Described-by\n (A (Described-by B)) indicates that B provides information about A.\n \n \n From-to\n (A (From-to B)) indicates a directional relation from A to B. A is considered the source.\n \n \n Group-of\n (A (Group-of B)) indicates A is a group of items of type B.\n \n \n Implied-by\n (A (Implied-by B)) indicates B is suggested by A.\n \n \n Interacts-with\n (A (Interacts-with B)) indicates A and B interact, possibly reciprocally.\n \n \n Member-of\n (A (Member-of B)) indicates A is a member of group B.\n \n \n Part-of\n (A (Part-of B)) indicates A is a part of the whole B.\n \n \n Performed-by\n (A (Performed-by B)) Indicates that ction or procedure A was carried out by agent B.\n \n \n Related-to\n (A (Relative-to B)) indicates A is a part of the whole B.\n \n \n \n Directional-relation\n A relationship indicating direction of change.\n \n Away-from\n Go away from a place or object.\n \n \n Towards\n Moving in the direction of. A relation binding a relational quality or disposition to the relevant type of entity\n \n \n \n Spatial-relation\n Indicating information about position.\n \n Above\n (A (Adjacent-to B)) means A is in a place or position that is higher than B.\n \n \n Across-from\n (A (Across-from B)) means A is on the opposite side of something from B.\n \n \n Adjacent-to\n (A (Adjacent-to B)) indicates that A is next to B in time or space.\n \n \n Ahead-of\n (A (Ahead-of B)) indicates that A is further forward in time or space in B.\n \n \n Around\n (A (Around B)) means A is in or near the present place or situation of B.\n \n \n Behind\n (A (Behind B)) means A is at or to the far side of B, typically so as to be hidden by it.\n \n \n Below\n (A (Below B)) means A is in a place or position that is lower than the position of B.\n \n \n Between\n (A (Between, (B, C))) means A is in the space or interval separating B and C.\n \n \n Bilateral-to\n (A (Bilateral B)) means A is on both sides of B or affects both sides of B.\n \n \n Bottom-edge-of\n (A (Bottom-edge-of B)) means A is on the bottom most part or or near the boundary of B.\n \n relatedTag\n Left-edge-of\n Right-edge-of\n Top-edge-of\n \n \n \n Boundary-of\n (A (Boundary-of B)) means A is on or part of the edge or boundary of B.\n \n \n Center-of\n (A (Center-of B)) means A is at a point or or in an area that is approximately central within B.\n \n \n Close-to\n (A (Close-to B)) means A is at a small distance from or is located near in space to B.\n \n \n Far-from\n (A (Far-from B)) means A is at a large distance from or is not located near in space to B.\n \n \n In-front-of\n (A (In-front-of B)) means A is in a position just ahead or at the front part of B, potentially partially blocking B from view.\n \n \n Left-edge-of\n (A (Left-edge-of B)) means A is located on the left side of B on or near the boundary of B.\n \n relatedTag\n Bottom-edge-of\n Right-edge-of\n Top-edge-of\n \n \n \n Left-side-of\n (A (Left-side-of B)) means A is located on the left side of B usually as part of B.\n \n relatedTag\n Right-side-of\n \n \n \n Lower-left-of\n (A (Lower-left-of B)) means A is situated on the lower left part of B. This relation is often used to specify qualitative information about screen position.\n \n relatedTag\n Lower-right-of\n Upper-left-of\n Upper-right-of\n \n \n \n Lower-right-of\n (A (Lower-right-of B)) means A is situated on the lower right part of B. This relation is often used to specify qualitative information about screen position.\n \n relatedTag\n Upper-left-of\n Upper-left-of\n Lower-right-of\n \n \n \n Outside-of\n (A (Outside-of B)) means A is located in the space around but not including B.\n \n \n Over\n (A (over B)) means A above is above B so as to cover or protect or A extends over the a general area as from a from a vantage point.\n \n \n Right-edge-of\n (A (Right-edge-of B)) means A is located on the right side of B on or near the boundary of B.\n \n relatedTag\n Bottom-edge-of\n Left-edge-of\n Top-edge-of\n \n \n \n Right-side-of\n (A (Right-side-of B)) means A is located on the right side of B usually as part of B.\n \n relatedTag\n Left-side-of\n \n \n \n To-left-of\n (A (To-left-of B)) means A is located on or directed toward the side to the west of B when B is facing north. This term is used when A is not part of B.\n \n \n To-right-of\n (A (To-right-of B)) means A is located on or directed toward the side to the east of B when B is facing north. This term is used when A is not part of B.\n \n \n Top-edge-of\n (A (Top-edge-of B)) means A is on the uppermost part or or near the boundary of B.\n \n relatedTag\n Left-edge-of\n Right-edge-of\n Bottom-edge-of\n \n \n \n Top-of\n (A (Top-of B)) means A is on the uppermost part, side, or surface of B.\n \n \n Upper-left-of\n (A (Upper-left-of B)) means A is situated on the upper left part of B. This relation is often used to specify qualitative information about screen position.\n \n relatedTag\n Lower-left-of\n Lower-right-of\n Upper-right-of\n \n \n \n Upper-right-of\n (A (Upper-right-of B)) means A is situated on the upper right part of B. This relation is often used to specify qualitative information about screen position.\n \n relatedTag\n Lower-left-of\n Upper-left-of\n Lower-right-of\n \n \n \n Underneath\n (A (Underneath B)) means A is situated directly below and may be concealed by B.\n \n \n Within\n (A (Within B)) means A is on the inside of or contained in B.\n \n \n \n Temporal-relation\n Any relationship which includes a temporal or time-based component.\n \n After\n (A After B) means A happens at a time subsequent to a reference time related to B.\n \n \n Asynchronous-with\n (A Asynchronous-with B) means A happens at times not occurring at the same time or having the same period or phase as B.\n \n \n Before\n (A Before B) means A happens at a time earlier in time or order than B.\n \n \n During\n (A During B) means A happens at some point in a given period of time in which B is ongoing.\n \n \n Synchronous-with\n (A Synchronous-with B) means A happens at occurs at the same time or rate as B.\n \n \n Waiting-for\n (A Waiting-for B) means A pauses for something to happen in B.\n \n \n \n \n \n \n accelerationUnits\n \n defaultUnits\n m-per-s^2\n \n \n m-per-s^2\n \n SIUnit\n \n \n unitSymbol\n \n \n \n \n angleUnits\n \n defaultUnits\n radian\n \n \n radian\n \n SIUnit\n \n \n \n rad\n \n SIUnit\n \n \n unitSymbol\n \n \n \n degree\n \n \n \n areaUnits\n \n defaultUnits\n m^2\n \n \n m^2\n \n SIUnit\n \n \n unitSymbol\n \n \n \n \n currencyUnits\n Units indicating the worth of something.\n \n defaultUnits\n $\n \n \n dollar\n \n \n $\n \n unitPrefix\n \n \n unitSymbol\n \n \n \n point\n \n \n \n frequencyUnits\n \n defaultUnits\n Hz\n \n \n hertz\n \n SIUnit\n \n \n \n Hz\n \n SIUnit\n \n \n unitSymbol\n \n \n \n \n intensityUnits\n \n defaultUnits\n dB\n \n \n dB\n Intensity expressed as ratio to a threshold. Often used for sound intensity.\n \n unitSymbol\n \n \n \n candela\n Units used to express light intensity.\n \n SIUnit\n \n \n \n cd\n Units used to express light intensity.\n \n SIUnit\n \n \n unitSymbol\n \n \n \n \n jerkUnits\n \n defaultUnits\n m-per-s^3\n \n \n m-per-s^3\n \n unitSymbol\n \n \n \n \n memorySizeUnits\n \n defaultUnits\n B\n \n \n byte\n \n SIUnit\n \n \n \n B\n \n SIUnit\n \n \n unitSymbol\n \n \n \n \n physicalLengthUnits\n \n defaultUnits\n m\n \n \n foot\n \n \n inch\n \n \n metre\n \n SIUnit\n \n \n \n m\n \n SIUnit\n \n \n unitSymbol\n \n \n \n mile\n \n \n \n speedUnits\n \n defaultUnits\n m-per-s\n \n \n m-per-s\n \n SIUnit\n \n \n unitSymbol\n \n \n \n mph\n \n unitSymbol\n \n \n \n kph\n \n unitSymbol\n \n \n \n \n timeUnits\n \n defaultUnits\n s\n \n \n second\n \n SIUnit\n \n \n \n s\n \n SIUnit\n \n \n unitSymbol\n \n \n \n day\n \n \n minute\n \n \n hour\n Should be in 24-hour format.\n \n \n \n volumeUnits\n \n defaultUnits\n m^3\n \n \n m^3\n \n SIUnit\n \n \n unitSymbol\n \n \n \n \n weightUnits\n \n defaultUnits\n g\n \n \n g\n \n SIUnit\n \n \n unitSymbol\n \n \n \n gram\n \n SIUnit\n \n \n \n pound\n \n \n lb\n \n \n \n \n \n deca\n SI unit multiple representing 10^1\n \n SIUnitModifier\n \n \n \n da\n SI unit multiple representing 10^1\n \n SIUnitSymbolModifier\n \n \n \n hecto\n SI unit multiple representing 10^2\n \n SIUnitModifier\n \n \n \n h\n SI unit multiple representing 10^2\n \n SIUnitSymbolModifier\n \n \n \n kilo\n SI unit multiple representing 10^3\n \n SIUnitModifier\n \n \n \n k\n SI unit multiple representing 10^3\n \n SIUnitSymbolModifier\n \n \n \n mega\n SI unit multiple representing 10^6\n \n SIUnitModifier\n \n \n \n M\n SI unit multiple representing 10^6\n \n SIUnitSymbolModifier\n \n \n \n giga\n SI unit multiple representing 10^9\n \n SIUnitModifier\n \n \n \n G\n SI unit multiple representing 10^9\n \n SIUnitSymbolModifier\n \n \n \n tera\n SI unit multiple representing 10^12\n \n SIUnitModifier\n \n \n \n T\n SI unit multiple representing 10^12\n \n SIUnitSymbolModifier\n \n \n \n peta\n SI unit multiple representing 10^15\n \n SIUnitModifier\n \n \n \n P\n SI unit multiple representing 10^15\n \n SIUnitSymbolModifier\n \n \n \n exa\n SI unit multiple representing 10^18\n \n SIUnitModifier\n \n \n \n E\n SI unit multiple representing 10^18\n \n SIUnitSymbolModifier\n \n \n \n zetta\n SI unit multiple representing 10^21\n \n SIUnitModifier\n \n \n \n Z\n SI unit multiple representing 10^21\n \n SIUnitSymbolModifier\n \n \n \n yotta\n SI unit multiple representing 10^24\n \n SIUnitModifier\n \n \n \n Y\n SI unit multiple representing 10^24\n \n SIUnitSymbolModifier\n \n \n \n deci\n SI unit submultiple representing 10^-1\n \n SIUnitModifier\n \n \n \n d\n SI unit submultiple representing 10^-1\n \n SIUnitSymbolModifier\n \n \n \n centi\n SI unit submultiple representing 10^-2\n \n SIUnitModifier\n \n \n \n c\n SI unit submultiple representing 10^-2\n \n SIUnitSymbolModifier\n \n \n \n milli\n SI unit submultiple representing 10^-3\n \n SIUnitModifier\n \n \n \n m\n SI unit submultiple representing 10^-3\n \n SIUnitSymbolModifier\n \n \n \n micro\n SI unit submultiple representing 10^-6\n \n SIUnitModifier\n \n \n \n u\n SI unit submultiple representing 10^-6\n \n SIUnitSymbolModifier\n \n \n \n nano\n SI unit submultiple representing 10^-9\n \n SIUnitModifier\n \n \n \n n\n SI unit submultiple representing 10^-9\n \n SIUnitSymbolModifier\n \n \n \n pico\n SI unit submultiple representing 10^-12\n \n SIUnitModifier\n \n \n \n p\n SI unit submultiple representing 10^-12\n \n SIUnitSymbolModifier\n \n \n \n femto\n SI unit submultiple representing 10^-15\n \n SIUnitModifier\n \n \n \n f\n SI unit submultiple representing 10^-15\n \n SIUnitSymbolModifier\n \n \n \n atto\n SI unit submultiple representing 10^-18\n \n SIUnitModifier\n \n \n \n a\n SI unit submultiple representing 10^-18\n \n SIUnitSymbolModifier\n \n \n \n zepto\n SI unit submultiple representing 10^-21\n \n SIUnitModifier\n \n \n \n z\n SI unit submultiple representing 10^-21\n \n SIUnitSymbolModifier\n \n \n \n yocto\n SI unit submultiple representing 10^-24\n \n SIUnitModifier\n \n \n \n y\n SI unit submultiple representing 10^-24\n \n SIUnitSymbolModifier\n \n \n \n \n \n dateTimeClass\n Date-times should conform to ISO8601 date-time format YYYY-MM-DDThh:mm:ss. Any variation on the full form is allowed.\n \n allowedCharacter\n digits\n T\n -\n :\n \n \n \n nameClass\n Value class designating values that have the characteristics of node names. The allowed characters are alphanumeric, hyphen, and underbar.\n \n allowedCharacter\n letters\n digits\n _\n -\n \n \n \n numericClass\n Value must be a valid numerical value.\n \n allowedCharacter\n digits\n E\n e\n +\n -\n .\n \n \n \n posixPath\n Posix path specification.\n \n allowedCharacter\n digits\n letters\n /\n :\n \n \n \n textClass\n Value class designating values that have the characteristics of text such as in descriptions.\n \n allowedCharacter\n letters\n digits\n blank\n +\n -\n :\n ;\n .\n /\n (\n )\n ?\n *\n %\n $\n @\n \n \n \n \n \n allowedCharacter\n A schema attribute of value classes specifying a special character that is allowed in expressing the value of a placeholder. Normally the allowed characters are listed individually. However, the word letters designates the upper and lower case alphabetic characters and the word digits designates the digits 0-9. The word blank designates the blank character.\n \n valueClassProperty\n \n \n \n defaultUnits\n A schema attribute of unit classes specifying the default units to use if the placeholder has a unit class but the substituted value has no units.\n \n unitClassProperty\n \n \n \n extensionAllowed\n A schema attribute indicating that users can add unlimited levels of child nodes under this tag. This tag is propagated to child nodes with the exception of the hashtag placeholders.\n \n boolProperty\n \n \n \n recommended\n A schema attribute indicating that the event-level HED string should include this tag.\n \n boolProperty\n \n \n \n relatedTag\n A schema attribute suggesting HED tags that are closely related to this tag. This attribute is used by tagging tools.\n \n \n requireChild\n A schema attribute indicating that one of the node elements descendants must be included when using this tag.\n \n boolProperty\n \n \n \n required\n A schema attribute indicating that every event-level HED string should include this tag.\n \n boolProperty\n \n \n \n SIUnit\n A schema attribute indicating that this unit element is an SI unit and can be modified by multiple and submultiple names. Note that some units such as byte are designated as SI units although they are not part of the standard.\n \n boolProperty\n \n \n unitProperty\n \n \n \n SIUnitModifier\n A schema attribute indicating that this SI unit modifier represents a multiple or submultiple of a base unit rather than a unit symbol.\n \n boolProperty\n \n \n unitModifierProperty\n \n \n \n SIUnitSymbolModifier\n A schema attribute indicating that this SI unit modifier represents a multiple or submultiple of a unit symbol rather than a base symbol.\n \n boolProperty\n \n \n unitModifierProperty\n \n \n \n suggestedTag\n A schema attribute that indicates another tag that is often associated with this tag. This attribute is used by tagging tools to provide tagging suggestions.\n \n \n tagGroup\n A schema attribute indicating the tag can only appear inside a tag group.\n \n boolProperty\n \n \n \n takesValue\n A schema attribute indicating the tag is a hashtag placeholder that is expected to be replaced with a user-defined value.\n \n boolProperty\n \n \n \n topLevelTagGroup\n A schema attribute indicating that this tag (or its descendants) can only appear in a top-level tag group.\n \n boolProperty\n \n \n \n unique\n A schema attribute indicating that only one of this tag or its descendants can be used in the event-level HED string.\n \n boolProperty\n \n \n \n unitClass\n A schema attribute specifying which unit class this value tag belongs to.\n \n \n unitPrefix\n A schema attribute applied specifically to unit elements to designate that the unit indicator is a prefix (e.g., dollar sign in the currency units).\n \n boolProperty\n \n \n unitProperty\n \n \n \n unitSymbol\n A schema attribute indicating this tag is an abbreviation or symbol representing a type of unit. Unit symbols represent both the singular and the plural and thus cannot be pluralized.\n \n boolProperty\n \n \n unitProperty\n \n \n \n valueClass\n A schema attribute specifying which value class this value tag belongs to.\n \n \n \n \n boolProperty\n Indicates that the schema attribute represents something that is either true or false and does not have a value. Attributes without this value are assumed to have string values.\n \n \n unitClassProperty\n Indicates that the schema attribute is meant to be applied to unit classes.\n \n \n unitModifierProperty\n Indicates that the schema attribute is meant to be applied to unit modifier classes.\n \n \n unitProperty\n Indicates that the schema attribute is meant to be applied to units within a unit class.\n \n \n valueClassProperty\n Indicates that the schema attribute is meant to be applied to value classes.\n \n \n This is an updated version of the schema format. The properties are now part of the schema. The schema attributes are designed to be checked in software rather than hard-coded. The schema attributes, themselves have properties.\n\n\n\n' + }, +}) + +// node_modules/semver/internal/debug.js +var require_debug = __commonJS({ + 'node_modules/semver/internal/debug.js'(exports, module) { + init_define_process() + var debug = + typeof define_process_default === 'object' && + define_process_default.env && + define_process_default.env.NODE_DEBUG && + /\bsemver\b/i.test(define_process_default.env.NODE_DEBUG) + ? (...args) => console.error('SEMVER', ...args) + : () => {} + module.exports = debug + }, +}) + +// node_modules/semver/internal/constants.js +var require_constants = __commonJS({ + 'node_modules/semver/internal/constants.js'(exports, module) { + init_define_process() + var SEMVER_SPEC_VERSION = '2.0.0' + var MAX_LENGTH = 256 + var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991 + var MAX_SAFE_COMPONENT_LENGTH = 16 + module.exports = { + SEMVER_SPEC_VERSION, + MAX_LENGTH, + MAX_SAFE_INTEGER, + MAX_SAFE_COMPONENT_LENGTH, + } + }, +}) + +// node_modules/semver/internal/re.js +var require_re = __commonJS({ + 'node_modules/semver/internal/re.js'(exports, module) { + init_define_process() + var { MAX_SAFE_COMPONENT_LENGTH } = require_constants() + var debug = require_debug() + exports = module.exports = {} + var re = (exports.re = []) + var src = (exports.src = []) + var t = (exports.t = {}) + var R = 0 + var createToken = (name, value, isGlobal) => { + const index = R++ + debug(index, value) + t[name] = index + src[index] = value + re[index] = new RegExp(value, isGlobal ? 'g' : void 0) + } + createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*') + createToken('NUMERICIDENTIFIERLOOSE', '[0-9]+') + createToken('NONNUMERICIDENTIFIER', '\\d*[a-zA-Z-][a-zA-Z0-9-]*') + createToken( + 'MAINVERSION', + `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${ + src[t.NUMERICIDENTIFIER] + })`, + ) + createToken( + 'MAINVERSIONLOOSE', + `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${ + src[t.NUMERICIDENTIFIERLOOSE] + })\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`, + ) + createToken( + 'PRERELEASEIDENTIFIER', + `(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`, + ) + createToken( + 'PRERELEASEIDENTIFIERLOOSE', + `(?:${src[t.NUMERICIDENTIFIERLOOSE]}|${src[t.NONNUMERICIDENTIFIER]})`, + ) + createToken( + 'PRERELEASE', + `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${ + src[t.PRERELEASEIDENTIFIER] + })*))`, + ) + createToken( + 'PRERELEASELOOSE', + `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${ + src[t.PRERELEASEIDENTIFIERLOOSE] + })*))`, + ) + createToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+') + createToken( + 'BUILD', + `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`, + ) + createToken( + 'FULLPLAIN', + `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`, + ) + createToken('FULL', `^${src[t.FULLPLAIN]}$`) + createToken( + 'LOOSEPLAIN', + `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${ + src[t.BUILD] + }?`, + ) + createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`) + createToken('GTLT', '((?:<|>)?=?)') + createToken( + 'XRANGEIDENTIFIERLOOSE', + `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`, + ) + createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`) + createToken( + 'XRANGEPLAIN', + `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${ + src[t.XRANGEIDENTIFIER] + })(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${ + src[t.BUILD] + }?)?)?`, + ) + createToken( + 'XRANGEPLAINLOOSE', + `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${ + src[t.XRANGEIDENTIFIERLOOSE] + })(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${ + src[t.BUILD] + }?)?)?`, + ) + createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`) + createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`) + createToken( + 'COERCE', + `${'(^|[^\\d])(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:$|[^\\d])`, + ) + createToken('COERCERTL', src[t.COERCE], true) + createToken('LONETILDE', '(?:~>?)') + createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true) + exports.tildeTrimReplace = '$1~' + createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`) + createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`) + createToken('LONECARET', '(?:\\^)') + createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true) + exports.caretTrimReplace = '$1^' + createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`) + createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`) + createToken( + 'COMPARATORLOOSE', + `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`, + ) + createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`) + createToken( + 'COMPARATORTRIM', + `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, + true, + ) + exports.comparatorTrimReplace = '$1$2$3' + createToken( + 'HYPHENRANGE', + `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`, + ) + createToken( + 'HYPHENRANGELOOSE', + `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${ + src[t.XRANGEPLAINLOOSE] + })\\s*$`, + ) + createToken('STAR', '(<|>)?=?\\s*\\*') + createToken('GTE0', '^\\s*>=\\s*0.0.0\\s*$') + createToken('GTE0PRE', '^\\s*>=\\s*0.0.0-0\\s*$') + }, +}) + +// node_modules/semver/internal/parse-options.js +var require_parse_options = __commonJS({ + 'node_modules/semver/internal/parse-options.js'(exports, module) { + init_define_process() + var opts = ['includePrerelease', 'loose', 'rtl'] + var parseOptions = (options) => + !options + ? {} + : typeof options !== 'object' + ? { loose: true } + : opts + .filter((k) => options[k]) + .reduce((options2, k) => { + options2[k] = true + return options2 + }, {}) + module.exports = parseOptions + }, +}) + +// node_modules/semver/internal/identifiers.js +var require_identifiers = __commonJS({ + 'node_modules/semver/internal/identifiers.js'(exports, module) { + init_define_process() + var numeric = /^[0-9]+$/ + var compareIdentifiers = (a, b) => { + const anum = numeric.test(a) + const bnum = numeric.test(b) + if (anum && bnum) { + a = +a + b = +b + } + return a === b + ? 0 + : anum && !bnum + ? -1 + : bnum && !anum + ? 1 + : a < b + ? -1 + : 1 + } + var rcompareIdentifiers = (a, b) => compareIdentifiers(b, a) + module.exports = { + compareIdentifiers, + rcompareIdentifiers, + } + }, +}) + +// node_modules/semver/classes/semver.js +var require_semver = __commonJS({ + 'node_modules/semver/classes/semver.js'(exports, module) { + init_define_process() + var debug = require_debug() + var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants() + var { re, t } = require_re() + var parseOptions = require_parse_options() + var { compareIdentifiers } = require_identifiers() + var SemVer = class { + constructor(version, options) { + options = parseOptions(options) + if (version instanceof SemVer) { + if ( + version.loose === !!options.loose && + version.includePrerelease === !!options.includePrerelease + ) { + return version + } else { + version = version.version + } + } else if (typeof version !== 'string') { + throw new TypeError(`Invalid Version: ${version}`) + } + if (version.length > MAX_LENGTH) { + throw new TypeError(`version is longer than ${MAX_LENGTH} characters`) + } + debug('SemVer', version, options) + this.options = options + this.loose = !!options.loose + this.includePrerelease = !!options.includePrerelease + const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]) + if (!m) { + throw new TypeError(`Invalid Version: ${version}`) + } + this.raw = version + this.major = +m[1] + this.minor = +m[2] + this.patch = +m[3] + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError('Invalid major version') + } + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError('Invalid minor version') + } + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError('Invalid patch version') + } + if (!m[4]) { + this.prerelease = [] + } else { + this.prerelease = m[4].split('.').map((id) => { + if (/^[0-9]+$/.test(id)) { + const num = +id + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num + } + } + return id + }) + } + this.build = m[5] ? m[5].split('.') : [] + this.format() + } + format() { + this.version = `${this.major}.${this.minor}.${this.patch}` + if (this.prerelease.length) { + this.version += `-${this.prerelease.join('.')}` + } + return this.version + } + toString() { + return this.version + } + compare(other) { + debug('SemVer.compare', this.version, this.options, other) + if (!(other instanceof SemVer)) { + if (typeof other === 'string' && other === this.version) { + return 0 + } + other = new SemVer(other, this.options) + } + if (other.version === this.version) { + return 0 + } + return this.compareMain(other) || this.comparePre(other) + } + compareMain(other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + return ( + compareIdentifiers(this.major, other.major) || + compareIdentifiers(this.minor, other.minor) || + compareIdentifiers(this.patch, other.patch) + ) + } + comparePre(other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + if (this.prerelease.length && !other.prerelease.length) { + return -1 + } else if (!this.prerelease.length && other.prerelease.length) { + return 1 + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0 + } + let i = 0 + do { + const a = this.prerelease[i] + const b = other.prerelease[i] + debug('prerelease compare', i, a, b) + if (a === void 0 && b === void 0) { + return 0 + } else if (b === void 0) { + return 1 + } else if (a === void 0) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) + } + compareBuild(other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + let i = 0 + do { + const a = this.build[i] + const b = other.build[i] + debug('prerelease compare', i, a, b) + if (a === void 0 && b === void 0) { + return 0 + } else if (b === void 0) { + return 1 + } else if (a === void 0) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) + } + inc(release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0 + this.patch = 0 + this.minor = 0 + this.major++ + this.inc('pre', identifier) + break + case 'preminor': + this.prerelease.length = 0 + this.patch = 0 + this.minor++ + this.inc('pre', identifier) + break + case 'prepatch': + this.prerelease.length = 0 + this.inc('patch', identifier) + this.inc('pre', identifier) + break + case 'prerelease': + if (this.prerelease.length === 0) { + this.inc('patch', identifier) + } + this.inc('pre', identifier) + break + case 'major': + if ( + this.minor !== 0 || + this.patch !== 0 || + this.prerelease.length === 0 + ) { + this.major++ + } + this.minor = 0 + this.patch = 0 + this.prerelease = [] + break + case 'minor': + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++ + } + this.patch = 0 + this.prerelease = [] + break + case 'patch': + if (this.prerelease.length === 0) { + this.patch++ + } + this.prerelease = [] + break + case 'pre': + if (this.prerelease.length === 0) { + this.prerelease = [0] + } else { + let i = this.prerelease.length + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++ + i = -2 + } + } + if (i === -1) { + this.prerelease.push(0) + } + } + if (identifier) { + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) { + this.prerelease = [identifier, 0] + } + } else { + this.prerelease = [identifier, 0] + } + } + break + default: + throw new Error(`invalid increment argument: ${release}`) + } + this.format() + this.raw = this.version + return this + } + } + module.exports = SemVer + }, +}) + +// node_modules/semver/functions/compare.js +var require_compare = __commonJS({ + 'node_modules/semver/functions/compare.js'(exports, module) { + init_define_process() + var SemVer = require_semver() + var compare = (a, b, loose) => + new SemVer(a, loose).compare(new SemVer(b, loose)) + module.exports = compare + }, +}) + +// node_modules/semver/functions/lt.js +var require_lt = __commonJS({ + 'node_modules/semver/functions/lt.js'(exports, module) { + init_define_process() + var compare = require_compare() + var lt2 = (a, b, loose) => compare(a, b, loose) < 0 + module.exports = lt2 + }, +}) + +// node_modules/pluralize/pluralize.js +var require_pluralize = __commonJS({ + 'node_modules/pluralize/pluralize.js'(exports, module) { + init_define_process() + ;(function (root, pluralize3) { + if ( + typeof __require === 'function' && + typeof exports === 'object' && + typeof module === 'object' + ) { + module.exports = pluralize3() + } else if (typeof define === 'function' && define.amd) { + define(function () { + return pluralize3() + }) + } else { + root.pluralize = pluralize3() + } + })(exports, function () { + var pluralRules = [] + var singularRules = [] + var uncountables = {} + var irregularPlurals = {} + var irregularSingles = {} + function sanitizeRule(rule) { + if (typeof rule === 'string') { + return new RegExp('^' + rule + '$', 'i') + } + return rule + } + function restoreCase(word, token) { + if (word === token) return token + if (word === word.toLowerCase()) return token.toLowerCase() + if (word === word.toUpperCase()) return token.toUpperCase() + if (word[0] === word[0].toUpperCase()) { + return token.charAt(0).toUpperCase() + token.substr(1).toLowerCase() + } + return token.toLowerCase() + } + function interpolate(str, args) { + return str.replace(/\$(\d{1,2})/g, function (match, index) { + return args[index] || '' + }) + } + function replace(word, rule) { + return word.replace(rule[0], function (match, index) { + var result = interpolate(rule[1], arguments) + if (match === '') { + return restoreCase(word[index - 1], result) + } + return restoreCase(match, result) + }) + } + function sanitizeWord(token, word, rules) { + if (!token.length || uncountables.hasOwnProperty(token)) { + return word + } + var len = rules.length + while (len--) { + var rule = rules[len] + if (rule[0].test(word)) return replace(word, rule) + } + return word + } + function replaceWord(replaceMap, keepMap, rules) { + return function (word) { + var token = word.toLowerCase() + if (keepMap.hasOwnProperty(token)) { + return restoreCase(word, token) + } + if (replaceMap.hasOwnProperty(token)) { + return restoreCase(word, replaceMap[token]) + } + return sanitizeWord(token, word, rules) + } + } + function checkWord(replaceMap, keepMap, rules, bool) { + return function (word) { + var token = word.toLowerCase() + if (keepMap.hasOwnProperty(token)) return true + if (replaceMap.hasOwnProperty(token)) return false + return sanitizeWord(token, token, rules) === token + } + } + function pluralize3(word, count, inclusive) { + var pluralized = + count === 1 ? pluralize3.singular(word) : pluralize3.plural(word) + return (inclusive ? count + ' ' : '') + pluralized + } + pluralize3.plural = replaceWord( + irregularSingles, + irregularPlurals, + pluralRules, + ) + pluralize3.isPlural = checkWord( + irregularSingles, + irregularPlurals, + pluralRules, + ) + pluralize3.singular = replaceWord( + irregularPlurals, + irregularSingles, + singularRules, + ) + pluralize3.isSingular = checkWord( + irregularPlurals, + irregularSingles, + singularRules, + ) + pluralize3.addPluralRule = function (rule, replacement) { + pluralRules.push([sanitizeRule(rule), replacement]) + } + pluralize3.addSingularRule = function (rule, replacement) { + singularRules.push([sanitizeRule(rule), replacement]) + } + pluralize3.addUncountableRule = function (word) { + if (typeof word === 'string') { + uncountables[word.toLowerCase()] = true + return + } + pluralize3.addPluralRule(word, '$0') + pluralize3.addSingularRule(word, '$0') + } + pluralize3.addIrregularRule = function (single, plural) { + plural = plural.toLowerCase() + single = single.toLowerCase() + irregularSingles[single] = plural + irregularPlurals[plural] = single + } + ;[ + ['I', 'we'], + ['me', 'us'], + ['he', 'they'], + ['she', 'they'], + ['them', 'them'], + ['myself', 'ourselves'], + ['yourself', 'yourselves'], + ['itself', 'themselves'], + ['herself', 'themselves'], + ['himself', 'themselves'], + ['themself', 'themselves'], + ['is', 'are'], + ['was', 'were'], + ['has', 'have'], + ['this', 'these'], + ['that', 'those'], + ['echo', 'echoes'], + ['dingo', 'dingoes'], + ['volcano', 'volcanoes'], + ['tornado', 'tornadoes'], + ['torpedo', 'torpedoes'], + ['genus', 'genera'], + ['viscus', 'viscera'], + ['stigma', 'stigmata'], + ['stoma', 'stomata'], + ['dogma', 'dogmata'], + ['lemma', 'lemmata'], + ['schema', 'schemata'], + ['anathema', 'anathemata'], + ['ox', 'oxen'], + ['axe', 'axes'], + ['die', 'dice'], + ['yes', 'yeses'], + ['foot', 'feet'], + ['eave', 'eaves'], + ['goose', 'geese'], + ['tooth', 'teeth'], + ['quiz', 'quizzes'], + ['human', 'humans'], + ['proof', 'proofs'], + ['carve', 'carves'], + ['valve', 'valves'], + ['looey', 'looies'], + ['thief', 'thieves'], + ['groove', 'grooves'], + ['pickaxe', 'pickaxes'], + ['passerby', 'passersby'], + ].forEach(function (rule) { + return pluralize3.addIrregularRule(rule[0], rule[1]) + }) + ;[ + [/s?$/i, 's'], + [/[^\u0000-\u007F]$/i, '$0'], + [/([^aeiou]ese)$/i, '$1'], + [/(ax|test)is$/i, '$1es'], + [/(alias|[^aou]us|t[lm]as|gas|ris)$/i, '$1es'], + [/(e[mn]u)s?$/i, '$1s'], + [/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i, '$1'], + [ + /(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, + '$1i', + ], + [/(alumn|alg|vertebr)(?:a|ae)$/i, '$1ae'], + [/(seraph|cherub)(?:im)?$/i, '$1im'], + [/(her|at|gr)o$/i, '$1oes'], + [ + /(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i, + '$1a', + ], + [ + /(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i, + '$1a', + ], + [/sis$/i, 'ses'], + [/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i, '$1$2ves'], + [/([^aeiouy]|qu)y$/i, '$1ies'], + [/([^ch][ieo][ln])ey$/i, '$1ies'], + [/(x|ch|ss|sh|zz)$/i, '$1es'], + [/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i, '$1ices'], + [/\b((?:tit)?m|l)(?:ice|ouse)$/i, '$1ice'], + [/(pe)(?:rson|ople)$/i, '$1ople'], + [/(child)(?:ren)?$/i, '$1ren'], + [/eaux$/i, '$0'], + [/m[ae]n$/i, 'men'], + ['thou', 'you'], + ].forEach(function (rule) { + return pluralize3.addPluralRule(rule[0], rule[1]) + }) + ;[ + [/s$/i, ''], + [/(ss)$/i, '$1'], + [ + /(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i, + '$1fe', + ], + [/(ar|(?:wo|[ae])l|[eo][ao])ves$/i, '$1f'], + [/ies$/i, 'y'], + [ + /\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i, + '$1ie', + ], + [/\b(mon|smil)ies$/i, '$1ey'], + [/\b((?:tit)?m|l)ice$/i, '$1ouse'], + [/(seraph|cherub)im$/i, '$1'], + [ + /(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i, + '$1', + ], + [ + /(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i, + '$1sis', + ], + [/(movie|twelve|abuse|e[mn]u)s$/i, '$1'], + [/(test)(?:is|es)$/i, '$1is'], + [ + /(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, + '$1us', + ], + [ + /(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i, + '$1um', + ], + [ + /(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i, + '$1on', + ], + [/(alumn|alg|vertebr)ae$/i, '$1a'], + [/(cod|mur|sil|vert|ind)ices$/i, '$1ex'], + [/(matr|append)ices$/i, '$1ix'], + [/(pe)(rson|ople)$/i, '$1rson'], + [/(child)ren$/i, '$1'], + [/(eau)x?$/i, '$1'], + [/men$/i, 'man'], + ].forEach(function (rule) { + return pluralize3.addSingularRule(rule[0], rule[1]) + }) + ;[ + 'adulthood', + 'advice', + 'agenda', + 'aid', + 'aircraft', + 'alcohol', + 'ammo', + 'analytics', + 'anime', + 'athletics', + 'audio', + 'bison', + 'blood', + 'bream', + 'buffalo', + 'butter', + 'carp', + 'cash', + 'chassis', + 'chess', + 'clothing', + 'cod', + 'commerce', + 'cooperation', + 'corps', + 'debris', + 'diabetes', + 'digestion', + 'elk', + 'energy', + 'equipment', + 'excretion', + 'expertise', + 'firmware', + 'flounder', + 'fun', + 'gallows', + 'garbage', + 'graffiti', + 'hardware', + 'headquarters', + 'health', + 'herpes', + 'highjinks', + 'homework', + 'housework', + 'information', + 'jeans', + 'justice', + 'kudos', + 'labour', + 'literature', + 'machinery', + 'mackerel', + 'mail', + 'media', + 'mews', + 'moose', + 'music', + 'mud', + 'manga', + 'news', + 'only', + 'personnel', + 'pike', + 'plankton', + 'pliers', + 'police', + 'pollution', + 'premises', + 'rain', + 'research', + 'rice', + 'salmon', + 'scissors', + 'series', + 'sewage', + 'shambles', + 'shrimp', + 'software', + 'species', + 'staff', + 'swine', + 'tennis', + 'traffic', + 'transportation', + 'trout', + 'tuna', + 'wealth', + 'welfare', + 'whiting', + 'wildebeest', + 'wildlife', + 'you', + /pok[eé]mon$/i, + /[^aeiou]ese$/i, + /deer$/i, + /fish$/i, + /measles$/i, + /o[iu]s$/i, + /pox$/i, + /sheep$/i, + ].forEach(pluralize3.addUncountableRule) + return pluralize3 + }) + }, +}) + +// node_modules/lodash/identity.js +var require_identity = __commonJS({ + 'node_modules/lodash/identity.js'(exports, module) { + init_define_process() + function identity(value) { + return value + } + module.exports = identity + }, +}) + +// node_modules/lodash/_apply.js +var require_apply = __commonJS({ + 'node_modules/lodash/_apply.js'(exports, module) { + init_define_process() + function apply(func, thisArg, args) { + switch (args.length) { + case 0: + return func.call(thisArg) + case 1: + return func.call(thisArg, args[0]) + case 2: + return func.call(thisArg, args[0], args[1]) + case 3: + return func.call(thisArg, args[0], args[1], args[2]) + } + return func.apply(thisArg, args) + } + module.exports = apply + }, +}) + +// node_modules/lodash/_overRest.js +var require_overRest = __commonJS({ + 'node_modules/lodash/_overRest.js'(exports, module) { + init_define_process() + var apply = require_apply() + var nativeMax = Math.max + function overRest(func, start, transform) { + start = nativeMax(start === void 0 ? func.length - 1 : start, 0) + return function () { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length) + while (++index < length) { + array[index] = args[start + index] + } + index = -1 + var otherArgs = Array(start + 1) + while (++index < start) { + otherArgs[index] = args[index] + } + otherArgs[start] = transform(array) + return apply(func, this, otherArgs) + } + } + module.exports = overRest + }, +}) + +// node_modules/lodash/constant.js +var require_constant = __commonJS({ + 'node_modules/lodash/constant.js'(exports, module) { + init_define_process() + function constant(value) { + return function () { + return value + } + } + module.exports = constant + }, +}) + +// node_modules/lodash/_freeGlobal.js +var require_freeGlobal = __commonJS({ + 'node_modules/lodash/_freeGlobal.js'(exports, module) { + init_define_process() + var freeGlobal = + typeof globalThis == 'object' && + globalThis && + globalThis.Object === Object && + globalThis + module.exports = freeGlobal + }, +}) + +// node_modules/lodash/_root.js +var require_root = __commonJS({ + 'node_modules/lodash/_root.js'(exports, module) { + init_define_process() + var freeGlobal = require_freeGlobal() + var freeSelf = + typeof self == 'object' && self && self.Object === Object && self + var root = freeGlobal || freeSelf || Function('return this')() + module.exports = root + }, +}) + +// node_modules/lodash/_Symbol.js +var require_Symbol = __commonJS({ + 'node_modules/lodash/_Symbol.js'(exports, module) { + init_define_process() + var root = require_root() + var Symbol2 = root.Symbol + module.exports = Symbol2 + }, +}) + +// node_modules/lodash/_getRawTag.js +var require_getRawTag = __commonJS({ + 'node_modules/lodash/_getRawTag.js'(exports, module) { + init_define_process() + var Symbol2 = require_Symbol() + var objectProto = Object.prototype + var hasOwnProperty = objectProto.hasOwnProperty + var nativeObjectToString = objectProto.toString + var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0 + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag] + try { + value[symToStringTag] = void 0 + var unmasked = true + } catch (e) {} + var result = nativeObjectToString.call(value) + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag + } else { + delete value[symToStringTag] + } + } + return result + } + module.exports = getRawTag + }, +}) + +// node_modules/lodash/_objectToString.js +var require_objectToString = __commonJS({ + 'node_modules/lodash/_objectToString.js'(exports, module) { + init_define_process() + var objectProto = Object.prototype + var nativeObjectToString = objectProto.toString + function objectToString(value) { + return nativeObjectToString.call(value) + } + module.exports = objectToString + }, +}) + +// node_modules/lodash/_baseGetTag.js +var require_baseGetTag = __commonJS({ + 'node_modules/lodash/_baseGetTag.js'(exports, module) { + init_define_process() + var Symbol2 = require_Symbol() + var getRawTag = require_getRawTag() + var objectToString = require_objectToString() + var nullTag = '[object Null]' + var undefinedTag = '[object Undefined]' + var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0 + function baseGetTag(value) { + if (value == null) { + return value === void 0 ? undefinedTag : nullTag + } + return symToStringTag && symToStringTag in Object(value) + ? getRawTag(value) + : objectToString(value) + } + module.exports = baseGetTag + }, +}) + +// node_modules/lodash/isObject.js +var require_isObject = __commonJS({ + 'node_modules/lodash/isObject.js'(exports, module) { + init_define_process() + function isObject(value) { + var type = typeof value + return value != null && (type == 'object' || type == 'function') + } + module.exports = isObject + }, +}) + +// node_modules/lodash/isFunction.js +var require_isFunction = __commonJS({ + 'node_modules/lodash/isFunction.js'(exports, module) { + init_define_process() + var baseGetTag = require_baseGetTag() + var isObject = require_isObject() + var asyncTag = '[object AsyncFunction]' + var funcTag = '[object Function]' + var genTag = '[object GeneratorFunction]' + var proxyTag = '[object Proxy]' + function isFunction(value) { + if (!isObject(value)) { + return false + } + var tag = baseGetTag(value) + return ( + tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag + ) + } + module.exports = isFunction + }, +}) + +// node_modules/lodash/_coreJsData.js +var require_coreJsData = __commonJS({ + 'node_modules/lodash/_coreJsData.js'(exports, module) { + init_define_process() + var root = require_root() + var coreJsData = root['__core-js_shared__'] + module.exports = coreJsData + }, +}) + +// node_modules/lodash/_isMasked.js +var require_isMasked = __commonJS({ + 'node_modules/lodash/_isMasked.js'(exports, module) { + init_define_process() + var coreJsData = require_coreJsData() + var maskSrcKey = (function () { + var uid = /[^.]+$/.exec( + (coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO) || '', + ) + return uid ? 'Symbol(src)_1.' + uid : '' + })() + function isMasked(func) { + return !!maskSrcKey && maskSrcKey in func + } + module.exports = isMasked + }, +}) + +// node_modules/lodash/_toSource.js +var require_toSource = __commonJS({ + 'node_modules/lodash/_toSource.js'(exports, module) { + init_define_process() + var funcProto = Function.prototype + var funcToString = funcProto.toString + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func) + } catch (e) {} + try { + return func + '' + } catch (e) {} + } + return '' + } + module.exports = toSource + }, +}) + +// node_modules/lodash/_baseIsNative.js +var require_baseIsNative = __commonJS({ + 'node_modules/lodash/_baseIsNative.js'(exports, module) { + init_define_process() + var isFunction = require_isFunction() + var isMasked = require_isMasked() + var isObject = require_isObject() + var toSource = require_toSource() + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g + var reIsHostCtor = /^\[object .+?Constructor\]$/ + var funcProto = Function.prototype + var objectProto = Object.prototype + var funcToString = funcProto.toString + var hasOwnProperty = objectProto.hasOwnProperty + var reIsNative = RegExp( + '^' + + funcToString + .call(hasOwnProperty) + .replace(reRegExpChar, '\\$&') + .replace( + /hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, + '$1.*?', + ) + + '$', + ) + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor + return pattern.test(toSource(value)) + } + module.exports = baseIsNative + }, +}) + +// node_modules/lodash/_getValue.js +var require_getValue = __commonJS({ + 'node_modules/lodash/_getValue.js'(exports, module) { + init_define_process() + function getValue(object, key) { + return object == null ? void 0 : object[key] + } + module.exports = getValue + }, +}) + +// node_modules/lodash/_getNative.js +var require_getNative = __commonJS({ + 'node_modules/lodash/_getNative.js'(exports, module) { + init_define_process() + var baseIsNative = require_baseIsNative() + var getValue = require_getValue() + function getNative(object, key) { + var value = getValue(object, key) + return baseIsNative(value) ? value : void 0 + } + module.exports = getNative + }, +}) + +// node_modules/lodash/_defineProperty.js +var require_defineProperty = __commonJS({ + 'node_modules/lodash/_defineProperty.js'(exports, module) { + init_define_process() + var getNative = require_getNative() + var defineProperty = (function () { + try { + var func = getNative(Object, 'defineProperty') + func({}, '', {}) + return func + } catch (e) {} + })() + module.exports = defineProperty + }, +}) + +// node_modules/lodash/_baseSetToString.js +var require_baseSetToString = __commonJS({ + 'node_modules/lodash/_baseSetToString.js'(exports, module) { + init_define_process() + var constant = require_constant() + var defineProperty = require_defineProperty() + var identity = require_identity() + var baseSetToString = !defineProperty + ? identity + : function (func, string) { + return defineProperty(func, 'toString', { + configurable: true, + enumerable: false, + value: constant(string), + writable: true, + }) + } + module.exports = baseSetToString + }, +}) + +// node_modules/lodash/_shortOut.js +var require_shortOut = __commonJS({ + 'node_modules/lodash/_shortOut.js'(exports, module) { + init_define_process() + var HOT_COUNT = 800 + var HOT_SPAN = 16 + var nativeNow = Date.now + function shortOut(func) { + var count = 0, + lastCalled = 0 + return function () { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled) + lastCalled = stamp + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0] + } + } else { + count = 0 + } + return func.apply(void 0, arguments) + } + } + module.exports = shortOut + }, +}) + +// node_modules/lodash/_setToString.js +var require_setToString = __commonJS({ + 'node_modules/lodash/_setToString.js'(exports, module) { + init_define_process() + var baseSetToString = require_baseSetToString() + var shortOut = require_shortOut() + var setToString = shortOut(baseSetToString) + module.exports = setToString + }, +}) + +// node_modules/lodash/_baseRest.js +var require_baseRest = __commonJS({ + 'node_modules/lodash/_baseRest.js'(exports, module) { + init_define_process() + var identity = require_identity() + var overRest = require_overRest() + var setToString = require_setToString() + function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + '') + } + module.exports = baseRest + }, +}) + +// node_modules/lodash/_arrayFilter.js +var require_arrayFilter = __commonJS({ + 'node_modules/lodash/_arrayFilter.js'(exports, module) { + init_define_process() + function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = [] + while (++index < length) { + var value = array[index] + if (predicate(value, index, array)) { + result[resIndex++] = value + } + } + return result + } + module.exports = arrayFilter + }, +}) + +// node_modules/lodash/_arrayMap.js +var require_arrayMap = __commonJS({ + 'node_modules/lodash/_arrayMap.js'(exports, module) { + init_define_process() + function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length) + while (++index < length) { + result[index] = iteratee(array[index], index, array) + } + return result + } + module.exports = arrayMap + }, +}) + +// node_modules/lodash/_baseProperty.js +var require_baseProperty = __commonJS({ + 'node_modules/lodash/_baseProperty.js'(exports, module) { + init_define_process() + function baseProperty(key) { + return function (object) { + return object == null ? void 0 : object[key] + } + } + module.exports = baseProperty + }, +}) + +// node_modules/lodash/_baseTimes.js +var require_baseTimes = __commonJS({ + 'node_modules/lodash/_baseTimes.js'(exports, module) { + init_define_process() + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n) + while (++index < n) { + result[index] = iteratee(index) + } + return result + } + module.exports = baseTimes + }, +}) + +// node_modules/lodash/isLength.js +var require_isLength = __commonJS({ + 'node_modules/lodash/isLength.js'(exports, module) { + init_define_process() + var MAX_SAFE_INTEGER = 9007199254740991 + function isLength(value) { + return ( + typeof value == 'number' && + value > -1 && + value % 1 == 0 && + value <= MAX_SAFE_INTEGER + ) + } + module.exports = isLength + }, +}) + +// node_modules/lodash/isArrayLike.js +var require_isArrayLike = __commonJS({ + 'node_modules/lodash/isArrayLike.js'(exports, module) { + init_define_process() + var isFunction = require_isFunction() + var isLength = require_isLength() + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value) + } + module.exports = isArrayLike + }, +}) + +// node_modules/lodash/isObjectLike.js +var require_isObjectLike = __commonJS({ + 'node_modules/lodash/isObjectLike.js'(exports, module) { + init_define_process() + function isObjectLike(value) { + return value != null && typeof value == 'object' + } + module.exports = isObjectLike + }, +}) + +// node_modules/lodash/isArrayLikeObject.js +var require_isArrayLikeObject = __commonJS({ + 'node_modules/lodash/isArrayLikeObject.js'(exports, module) { + init_define_process() + var isArrayLike = require_isArrayLike() + var isObjectLike = require_isObjectLike() + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value) + } + module.exports = isArrayLikeObject + }, +}) + +// node_modules/lodash/unzip.js +var require_unzip = __commonJS({ + 'node_modules/lodash/unzip.js'(exports, module) { + init_define_process() + var arrayFilter = require_arrayFilter() + var arrayMap = require_arrayMap() + var baseProperty = require_baseProperty() + var baseTimes = require_baseTimes() + var isArrayLikeObject = require_isArrayLikeObject() + var nativeMax = Math.max + function unzip(array) { + if (!(array && array.length)) { + return [] + } + var length = 0 + array = arrayFilter(array, function (group) { + if (isArrayLikeObject(group)) { + length = nativeMax(group.length, length) + return true + } + }) + return baseTimes(length, function (index) { + return arrayMap(array, baseProperty(index)) + }) + } + module.exports = unzip + }, +}) + +// node_modules/lodash/zip.js +var require_zip = __commonJS({ + 'node_modules/lodash/zip.js'(exports, module) { + init_define_process() + var baseRest = require_baseRest() + var unzip = require_unzip() + var zip3 = baseRest(unzip) + module.exports = zip3 + }, +}) + +// node_modules/lodash/_nativeCreate.js +var require_nativeCreate = __commonJS({ + 'node_modules/lodash/_nativeCreate.js'(exports, module) { + init_define_process() + var getNative = require_getNative() + var nativeCreate = getNative(Object, 'create') + module.exports = nativeCreate + }, +}) + +// node_modules/lodash/_hashClear.js +var require_hashClear = __commonJS({ + 'node_modules/lodash/_hashClear.js'(exports, module) { + init_define_process() + var nativeCreate = require_nativeCreate() + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {} + this.size = 0 + } + module.exports = hashClear + }, +}) + +// node_modules/lodash/_hashDelete.js +var require_hashDelete = __commonJS({ + 'node_modules/lodash/_hashDelete.js'(exports, module) { + init_define_process() + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key] + this.size -= result ? 1 : 0 + return result + } + module.exports = hashDelete + }, +}) + +// node_modules/lodash/_hashGet.js +var require_hashGet = __commonJS({ + 'node_modules/lodash/_hashGet.js'(exports, module) { + init_define_process() + var nativeCreate = require_nativeCreate() + var HASH_UNDEFINED = '__lodash_hash_undefined__' + var objectProto = Object.prototype + var hasOwnProperty = objectProto.hasOwnProperty + function hashGet(key) { + var data = this.__data__ + if (nativeCreate) { + var result = data[key] + return result === HASH_UNDEFINED ? void 0 : result + } + return hasOwnProperty.call(data, key) ? data[key] : void 0 + } + module.exports = hashGet + }, +}) + +// node_modules/lodash/_hashHas.js +var require_hashHas = __commonJS({ + 'node_modules/lodash/_hashHas.js'(exports, module) { + init_define_process() + var nativeCreate = require_nativeCreate() + var objectProto = Object.prototype + var hasOwnProperty = objectProto.hasOwnProperty + function hashHas(key) { + var data = this.__data__ + return nativeCreate + ? data[key] !== void 0 + : hasOwnProperty.call(data, key) + } + module.exports = hashHas + }, +}) + +// node_modules/lodash/_hashSet.js +var require_hashSet = __commonJS({ + 'node_modules/lodash/_hashSet.js'(exports, module) { + init_define_process() + var nativeCreate = require_nativeCreate() + var HASH_UNDEFINED = '__lodash_hash_undefined__' + function hashSet(key, value) { + var data = this.__data__ + this.size += this.has(key) ? 0 : 1 + data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value + return this + } + module.exports = hashSet + }, +}) + +// node_modules/lodash/_Hash.js +var require_Hash = __commonJS({ + 'node_modules/lodash/_Hash.js'(exports, module) { + init_define_process() + var hashClear = require_hashClear() + var hashDelete = require_hashDelete() + var hashGet = require_hashGet() + var hashHas = require_hashHas() + var hashSet = require_hashSet() + function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length + this.clear() + while (++index < length) { + var entry = entries[index] + this.set(entry[0], entry[1]) + } + } + Hash.prototype.clear = hashClear + Hash.prototype['delete'] = hashDelete + Hash.prototype.get = hashGet + Hash.prototype.has = hashHas + Hash.prototype.set = hashSet + module.exports = Hash + }, +}) + +// node_modules/lodash/_listCacheClear.js +var require_listCacheClear = __commonJS({ + 'node_modules/lodash/_listCacheClear.js'(exports, module) { + init_define_process() + function listCacheClear() { + this.__data__ = [] + this.size = 0 + } + module.exports = listCacheClear + }, +}) + +// node_modules/lodash/eq.js +var require_eq = __commonJS({ + 'node_modules/lodash/eq.js'(exports, module) { + init_define_process() + function eq(value, other) { + return value === other || (value !== value && other !== other) + } + module.exports = eq + }, +}) + +// node_modules/lodash/_assocIndexOf.js +var require_assocIndexOf = __commonJS({ + 'node_modules/lodash/_assocIndexOf.js'(exports, module) { + init_define_process() + var eq = require_eq() + function assocIndexOf(array, key) { + var length = array.length + while (length--) { + if (eq(array[length][0], key)) { + return length + } + } + return -1 + } + module.exports = assocIndexOf + }, +}) + +// node_modules/lodash/_listCacheDelete.js +var require_listCacheDelete = __commonJS({ + 'node_modules/lodash/_listCacheDelete.js'(exports, module) { + init_define_process() + var assocIndexOf = require_assocIndexOf() + var arrayProto = Array.prototype + var splice = arrayProto.splice + function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key) + if (index < 0) { + return false + } + var lastIndex = data.length - 1 + if (index == lastIndex) { + data.pop() + } else { + splice.call(data, index, 1) + } + --this.size + return true + } + module.exports = listCacheDelete + }, +}) + +// node_modules/lodash/_listCacheGet.js +var require_listCacheGet = __commonJS({ + 'node_modules/lodash/_listCacheGet.js'(exports, module) { + init_define_process() + var assocIndexOf = require_assocIndexOf() + function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key) + return index < 0 ? void 0 : data[index][1] + } + module.exports = listCacheGet + }, +}) + +// node_modules/lodash/_listCacheHas.js +var require_listCacheHas = __commonJS({ + 'node_modules/lodash/_listCacheHas.js'(exports, module) { + init_define_process() + var assocIndexOf = require_assocIndexOf() + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1 + } + module.exports = listCacheHas + }, +}) + +// node_modules/lodash/_listCacheSet.js +var require_listCacheSet = __commonJS({ + 'node_modules/lodash/_listCacheSet.js'(exports, module) { + init_define_process() + var assocIndexOf = require_assocIndexOf() + function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key) + if (index < 0) { + ++this.size + data.push([key, value]) + } else { + data[index][1] = value + } + return this + } + module.exports = listCacheSet + }, +}) + +// node_modules/lodash/_ListCache.js +var require_ListCache = __commonJS({ + 'node_modules/lodash/_ListCache.js'(exports, module) { + init_define_process() + var listCacheClear = require_listCacheClear() + var listCacheDelete = require_listCacheDelete() + var listCacheGet = require_listCacheGet() + var listCacheHas = require_listCacheHas() + var listCacheSet = require_listCacheSet() + function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length + this.clear() + while (++index < length) { + var entry = entries[index] + this.set(entry[0], entry[1]) + } + } + ListCache.prototype.clear = listCacheClear + ListCache.prototype['delete'] = listCacheDelete + ListCache.prototype.get = listCacheGet + ListCache.prototype.has = listCacheHas + ListCache.prototype.set = listCacheSet + module.exports = ListCache + }, +}) + +// node_modules/lodash/_Map.js +var require_Map = __commonJS({ + 'node_modules/lodash/_Map.js'(exports, module) { + init_define_process() + var getNative = require_getNative() + var root = require_root() + var Map2 = getNative(root, 'Map') + module.exports = Map2 + }, +}) + +// node_modules/lodash/_mapCacheClear.js +var require_mapCacheClear = __commonJS({ + 'node_modules/lodash/_mapCacheClear.js'(exports, module) { + init_define_process() + var Hash = require_Hash() + var ListCache = require_ListCache() + var Map2 = require_Map() + function mapCacheClear() { + this.size = 0 + this.__data__ = { + hash: new Hash(), + map: new (Map2 || ListCache)(), + string: new Hash(), + } + } + module.exports = mapCacheClear + }, +}) + +// node_modules/lodash/_isKeyable.js +var require_isKeyable = __commonJS({ + 'node_modules/lodash/_isKeyable.js'(exports, module) { + init_define_process() + function isKeyable(value) { + var type = typeof value + return type == 'string' || + type == 'number' || + type == 'symbol' || + type == 'boolean' + ? value !== '__proto__' + : value === null + } + module.exports = isKeyable + }, +}) + +// node_modules/lodash/_getMapData.js +var require_getMapData = __commonJS({ + 'node_modules/lodash/_getMapData.js'(exports, module) { + init_define_process() + var isKeyable = require_isKeyable() + function getMapData(map, key) { + var data = map.__data__ + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map + } + module.exports = getMapData + }, +}) + +// node_modules/lodash/_mapCacheDelete.js +var require_mapCacheDelete = __commonJS({ + 'node_modules/lodash/_mapCacheDelete.js'(exports, module) { + init_define_process() + var getMapData = require_getMapData() + function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key) + this.size -= result ? 1 : 0 + return result + } + module.exports = mapCacheDelete + }, +}) + +// node_modules/lodash/_mapCacheGet.js +var require_mapCacheGet = __commonJS({ + 'node_modules/lodash/_mapCacheGet.js'(exports, module) { + init_define_process() + var getMapData = require_getMapData() + function mapCacheGet(key) { + return getMapData(this, key).get(key) + } + module.exports = mapCacheGet + }, +}) + +// node_modules/lodash/_mapCacheHas.js +var require_mapCacheHas = __commonJS({ + 'node_modules/lodash/_mapCacheHas.js'(exports, module) { + init_define_process() + var getMapData = require_getMapData() + function mapCacheHas(key) { + return getMapData(this, key).has(key) + } + module.exports = mapCacheHas + }, +}) + +// node_modules/lodash/_mapCacheSet.js +var require_mapCacheSet = __commonJS({ + 'node_modules/lodash/_mapCacheSet.js'(exports, module) { + init_define_process() + var getMapData = require_getMapData() + function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size + data.set(key, value) + this.size += data.size == size ? 0 : 1 + return this + } + module.exports = mapCacheSet + }, +}) + +// node_modules/lodash/_MapCache.js +var require_MapCache = __commonJS({ + 'node_modules/lodash/_MapCache.js'(exports, module) { + init_define_process() + var mapCacheClear = require_mapCacheClear() + var mapCacheDelete = require_mapCacheDelete() + var mapCacheGet = require_mapCacheGet() + var mapCacheHas = require_mapCacheHas() + var mapCacheSet = require_mapCacheSet() + function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length + this.clear() + while (++index < length) { + var entry = entries[index] + this.set(entry[0], entry[1]) + } + } + MapCache.prototype.clear = mapCacheClear + MapCache.prototype['delete'] = mapCacheDelete + MapCache.prototype.get = mapCacheGet + MapCache.prototype.has = mapCacheHas + MapCache.prototype.set = mapCacheSet + module.exports = MapCache + }, +}) + +// node_modules/lodash/_setCacheAdd.js +var require_setCacheAdd = __commonJS({ + 'node_modules/lodash/_setCacheAdd.js'(exports, module) { + init_define_process() + var HASH_UNDEFINED = '__lodash_hash_undefined__' + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED) + return this + } + module.exports = setCacheAdd + }, +}) + +// node_modules/lodash/_setCacheHas.js +var require_setCacheHas = __commonJS({ + 'node_modules/lodash/_setCacheHas.js'(exports, module) { + init_define_process() + function setCacheHas(value) { + return this.__data__.has(value) + } + module.exports = setCacheHas + }, +}) + +// node_modules/lodash/_SetCache.js +var require_SetCache = __commonJS({ + 'node_modules/lodash/_SetCache.js'(exports, module) { + init_define_process() + var MapCache = require_MapCache() + var setCacheAdd = require_setCacheAdd() + var setCacheHas = require_setCacheHas() + function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length + this.__data__ = new MapCache() + while (++index < length) { + this.add(values[index]) + } + } + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd + SetCache.prototype.has = setCacheHas + module.exports = SetCache + }, +}) + +// node_modules/lodash/_baseFindIndex.js +var require_baseFindIndex = __commonJS({ + 'node_modules/lodash/_baseFindIndex.js'(exports, module) { + init_define_process() + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1) + while (fromRight ? index-- : ++index < length) { + if (predicate(array[index], index, array)) { + return index + } + } + return -1 + } + module.exports = baseFindIndex + }, +}) + +// node_modules/lodash/_baseIsNaN.js +var require_baseIsNaN = __commonJS({ + 'node_modules/lodash/_baseIsNaN.js'(exports, module) { + init_define_process() + function baseIsNaN(value) { + return value !== value + } + module.exports = baseIsNaN + }, +}) + +// node_modules/lodash/_strictIndexOf.js +var require_strictIndexOf = __commonJS({ + 'node_modules/lodash/_strictIndexOf.js'(exports, module) { + init_define_process() + function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length + while (++index < length) { + if (array[index] === value) { + return index + } + } + return -1 + } + module.exports = strictIndexOf + }, +}) + +// node_modules/lodash/_baseIndexOf.js +var require_baseIndexOf = __commonJS({ + 'node_modules/lodash/_baseIndexOf.js'(exports, module) { + init_define_process() + var baseFindIndex = require_baseFindIndex() + var baseIsNaN = require_baseIsNaN() + var strictIndexOf = require_strictIndexOf() + function baseIndexOf(array, value, fromIndex) { + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex) + } + module.exports = baseIndexOf + }, +}) + +// node_modules/lodash/_arrayIncludes.js +var require_arrayIncludes = __commonJS({ + 'node_modules/lodash/_arrayIncludes.js'(exports, module) { + init_define_process() + var baseIndexOf = require_baseIndexOf() + function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length + return !!length && baseIndexOf(array, value, 0) > -1 + } + module.exports = arrayIncludes + }, +}) + +// node_modules/lodash/_arrayIncludesWith.js +var require_arrayIncludesWith = __commonJS({ + 'node_modules/lodash/_arrayIncludesWith.js'(exports, module) { + init_define_process() + function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length + while (++index < length) { + if (comparator(value, array[index])) { + return true + } + } + return false + } + module.exports = arrayIncludesWith + }, +}) + +// node_modules/lodash/_baseUnary.js +var require_baseUnary = __commonJS({ + 'node_modules/lodash/_baseUnary.js'(exports, module) { + init_define_process() + function baseUnary(func) { + return function (value) { + return func(value) + } + } + module.exports = baseUnary + }, +}) + +// node_modules/lodash/_cacheHas.js +var require_cacheHas = __commonJS({ + 'node_modules/lodash/_cacheHas.js'(exports, module) { + init_define_process() + function cacheHas(cache, key) { + return cache.has(key) + } + module.exports = cacheHas + }, +}) + +// node_modules/lodash/_baseDifference.js +var require_baseDifference = __commonJS({ + 'node_modules/lodash/_baseDifference.js'(exports, module) { + init_define_process() + var SetCache = require_SetCache() + var arrayIncludes = require_arrayIncludes() + var arrayIncludesWith = require_arrayIncludesWith() + var arrayMap = require_arrayMap() + var baseUnary = require_baseUnary() + var cacheHas = require_cacheHas() + var LARGE_ARRAY_SIZE = 200 + function baseDifference(array, values, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + isCommon = true, + length = array.length, + result = [], + valuesLength = values.length + if (!length) { + return result + } + if (iteratee) { + values = arrayMap(values, baseUnary(iteratee)) + } + if (comparator) { + includes = arrayIncludesWith + isCommon = false + } else if (values.length >= LARGE_ARRAY_SIZE) { + includes = cacheHas + isCommon = false + values = new SetCache(values) + } + outer: while (++index < length) { + var value = array[index], + computed = iteratee == null ? value : iteratee(value) + value = comparator || value !== 0 ? value : 0 + if (isCommon && computed === computed) { + var valuesIndex = valuesLength + while (valuesIndex--) { + if (values[valuesIndex] === computed) { + continue outer + } + } + result.push(value) + } else if (!includes(values, computed, comparator)) { + result.push(value) + } + } + return result + } + module.exports = baseDifference + }, +}) + +// node_modules/lodash/_arrayPush.js +var require_arrayPush = __commonJS({ + 'node_modules/lodash/_arrayPush.js'(exports, module) { + init_define_process() + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length + while (++index < length) { + array[offset + index] = values[index] + } + return array + } + module.exports = arrayPush + }, +}) + +// node_modules/lodash/_baseIsArguments.js +var require_baseIsArguments = __commonJS({ + 'node_modules/lodash/_baseIsArguments.js'(exports, module) { + init_define_process() + var baseGetTag = require_baseGetTag() + var isObjectLike = require_isObjectLike() + var argsTag = '[object Arguments]' + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag + } + module.exports = baseIsArguments + }, +}) + +// node_modules/lodash/isArguments.js +var require_isArguments = __commonJS({ + 'node_modules/lodash/isArguments.js'(exports, module) { + init_define_process() + var baseIsArguments = require_baseIsArguments() + var isObjectLike = require_isObjectLike() + var objectProto = Object.prototype + var hasOwnProperty = objectProto.hasOwnProperty + var propertyIsEnumerable = objectProto.propertyIsEnumerable + var isArguments = baseIsArguments( + (function () { + return arguments + })(), + ) + ? baseIsArguments + : function (value) { + return ( + isObjectLike(value) && + hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee') + ) + } + module.exports = isArguments + }, +}) + +// node_modules/lodash/isArray.js +var require_isArray = __commonJS({ + 'node_modules/lodash/isArray.js'(exports, module) { + init_define_process() + var isArray = Array.isArray + module.exports = isArray + }, +}) + +// node_modules/lodash/_isFlattenable.js +var require_isFlattenable = __commonJS({ + 'node_modules/lodash/_isFlattenable.js'(exports, module) { + init_define_process() + var Symbol2 = require_Symbol() + var isArguments = require_isArguments() + var isArray = require_isArray() + var spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : void 0 + function isFlattenable(value) { + return ( + isArray(value) || + isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]) + ) + } + module.exports = isFlattenable + }, +}) + +// node_modules/lodash/_baseFlatten.js +var require_baseFlatten = __commonJS({ + 'node_modules/lodash/_baseFlatten.js'(exports, module) { + init_define_process() + var arrayPush = require_arrayPush() + var isFlattenable = require_isFlattenable() + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length + predicate || (predicate = isFlattenable) + result || (result = []) + while (++index < length) { + var value = array[index] + if (depth > 0 && predicate(value)) { + if (depth > 1) { + baseFlatten(value, depth - 1, predicate, isStrict, result) + } else { + arrayPush(result, value) + } + } else if (!isStrict) { + result[result.length] = value + } + } + return result + } + module.exports = baseFlatten + }, +}) + +// node_modules/lodash/last.js +var require_last = __commonJS({ + 'node_modules/lodash/last.js'(exports, module) { + init_define_process() + function last(array) { + var length = array == null ? 0 : array.length + return length ? array[length - 1] : void 0 + } + module.exports = last + }, +}) + +// node_modules/lodash/differenceWith.js +var require_differenceWith = __commonJS({ + 'node_modules/lodash/differenceWith.js'(exports, module) { + init_define_process() + var baseDifference = require_baseDifference() + var baseFlatten = require_baseFlatten() + var baseRest = require_baseRest() + var isArrayLikeObject = require_isArrayLikeObject() + var last = require_last() + var differenceWith3 = baseRest(function (array, values) { + var comparator = last(values) + if (isArrayLikeObject(comparator)) { + comparator = void 0 + } + return isArrayLikeObject(array) + ? baseDifference( + array, + baseFlatten(values, 1, isArrayLikeObject, true), + void 0, + comparator, + ) + : [] + }) + module.exports = differenceWith3 + }, +}) + +// node_modules/lodash/flattenDeep.js +var require_flattenDeep = __commonJS({ + 'node_modules/lodash/flattenDeep.js'(exports, module) { + init_define_process() + var baseFlatten = require_baseFlatten() + var INFINITY = 1 / 0 + function flattenDeep4(array) { + var length = array == null ? 0 : array.length + return length ? baseFlatten(array, INFINITY) : [] + } + module.exports = flattenDeep4 + }, +}) + +// node_modules/lodash/_stackClear.js +var require_stackClear = __commonJS({ + 'node_modules/lodash/_stackClear.js'(exports, module) { + init_define_process() + var ListCache = require_ListCache() + function stackClear() { + this.__data__ = new ListCache() + this.size = 0 + } + module.exports = stackClear + }, +}) + +// node_modules/lodash/_stackDelete.js +var require_stackDelete = __commonJS({ + 'node_modules/lodash/_stackDelete.js'(exports, module) { + init_define_process() + function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key) + this.size = data.size + return result + } + module.exports = stackDelete + }, +}) + +// node_modules/lodash/_stackGet.js +var require_stackGet = __commonJS({ + 'node_modules/lodash/_stackGet.js'(exports, module) { + init_define_process() + function stackGet(key) { + return this.__data__.get(key) + } + module.exports = stackGet + }, +}) + +// node_modules/lodash/_stackHas.js +var require_stackHas = __commonJS({ + 'node_modules/lodash/_stackHas.js'(exports, module) { + init_define_process() + function stackHas(key) { + return this.__data__.has(key) + } + module.exports = stackHas + }, +}) + +// node_modules/lodash/_stackSet.js +var require_stackSet = __commonJS({ + 'node_modules/lodash/_stackSet.js'(exports, module) { + init_define_process() + var ListCache = require_ListCache() + var Map2 = require_Map() + var MapCache = require_MapCache() + var LARGE_ARRAY_SIZE = 200 + function stackSet(key, value) { + var data = this.__data__ + if (data instanceof ListCache) { + var pairs = data.__data__ + if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) { + pairs.push([key, value]) + this.size = ++data.size + return this + } + data = this.__data__ = new MapCache(pairs) + } + data.set(key, value) + this.size = data.size + return this + } + module.exports = stackSet + }, +}) + +// node_modules/lodash/_Stack.js +var require_Stack = __commonJS({ + 'node_modules/lodash/_Stack.js'(exports, module) { + init_define_process() + var ListCache = require_ListCache() + var stackClear = require_stackClear() + var stackDelete = require_stackDelete() + var stackGet = require_stackGet() + var stackHas = require_stackHas() + var stackSet = require_stackSet() + function Stack(entries) { + var data = (this.__data__ = new ListCache(entries)) + this.size = data.size + } + Stack.prototype.clear = stackClear + Stack.prototype['delete'] = stackDelete + Stack.prototype.get = stackGet + Stack.prototype.has = stackHas + Stack.prototype.set = stackSet + module.exports = Stack + }, +}) + +// node_modules/lodash/_arraySome.js +var require_arraySome = __commonJS({ + 'node_modules/lodash/_arraySome.js'(exports, module) { + init_define_process() + function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length + while (++index < length) { + if (predicate(array[index], index, array)) { + return true + } + } + return false + } + module.exports = arraySome + }, +}) + +// node_modules/lodash/_equalArrays.js +var require_equalArrays = __commonJS({ + 'node_modules/lodash/_equalArrays.js'(exports, module) { + init_define_process() + var SetCache = require_SetCache() + var arraySome = require_arraySome() + var cacheHas = require_cacheHas() + var COMPARE_PARTIAL_FLAG = 1 + var COMPARE_UNORDERED_FLAG = 2 + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false + } + var arrStacked = stack.get(array) + var othStacked = stack.get(other) + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array + } + var index = -1, + result = true, + seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : void 0 + stack.set(array, other) + stack.set(other, array) + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index] + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack) + } + if (compared !== void 0) { + if (compared) { + continue + } + result = false + break + } + if (seen) { + if ( + !arraySome(other, function (othValue2, othIndex) { + if ( + !cacheHas(seen, othIndex) && + (arrValue === othValue2 || + equalFunc(arrValue, othValue2, bitmask, customizer, stack)) + ) { + return seen.push(othIndex) + } + }) + ) { + result = false + break + } + } else if ( + !( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + ) + ) { + result = false + break + } + } + stack['delete'](array) + stack['delete'](other) + return result + } + module.exports = equalArrays + }, +}) + +// node_modules/lodash/_Uint8Array.js +var require_Uint8Array = __commonJS({ + 'node_modules/lodash/_Uint8Array.js'(exports, module) { + init_define_process() + var root = require_root() + var Uint8Array2 = root.Uint8Array + module.exports = Uint8Array2 + }, +}) + +// node_modules/lodash/_mapToArray.js +var require_mapToArray = __commonJS({ + 'node_modules/lodash/_mapToArray.js'(exports, module) { + init_define_process() + function mapToArray(map) { + var index = -1, + result = Array(map.size) + map.forEach(function (value, key) { + result[++index] = [key, value] + }) + return result + } + module.exports = mapToArray + }, +}) + +// node_modules/lodash/_setToArray.js +var require_setToArray = __commonJS({ + 'node_modules/lodash/_setToArray.js'(exports, module) { + init_define_process() + function setToArray(set) { + var index = -1, + result = Array(set.size) + set.forEach(function (value) { + result[++index] = value + }) + return result + } + module.exports = setToArray + }, +}) + +// node_modules/lodash/_equalByTag.js +var require_equalByTag = __commonJS({ + 'node_modules/lodash/_equalByTag.js'(exports, module) { + init_define_process() + var Symbol2 = require_Symbol() + var Uint8Array2 = require_Uint8Array() + var eq = require_eq() + var equalArrays = require_equalArrays() + var mapToArray = require_mapToArray() + var setToArray = require_setToArray() + var COMPARE_PARTIAL_FLAG = 1 + var COMPARE_UNORDERED_FLAG = 2 + var boolTag = '[object Boolean]' + var dateTag = '[object Date]' + var errorTag = '[object Error]' + var mapTag = '[object Map]' + var numberTag = '[object Number]' + var regexpTag = '[object RegExp]' + var setTag = '[object Set]' + var stringTag = '[object String]' + var symbolTag = '[object Symbol]' + var arrayBufferTag = '[object ArrayBuffer]' + var dataViewTag = '[object DataView]' + var symbolProto = Symbol2 ? Symbol2.prototype : void 0 + var symbolValueOf = symbolProto ? symbolProto.valueOf : void 0 + function equalByTag( + object, + other, + tag, + bitmask, + customizer, + equalFunc, + stack, + ) { + switch (tag) { + case dataViewTag: + if ( + object.byteLength != other.byteLength || + object.byteOffset != other.byteOffset + ) { + return false + } + object = object.buffer + other = other.buffer + case arrayBufferTag: + if ( + object.byteLength != other.byteLength || + !equalFunc(new Uint8Array2(object), new Uint8Array2(other)) + ) { + return false + } + return true + case boolTag: + case dateTag: + case numberTag: + return eq(+object, +other) + case errorTag: + return object.name == other.name && object.message == other.message + case regexpTag: + case stringTag: + return object == other + '' + case mapTag: + var convert = mapToArray + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG + convert || (convert = setToArray) + if (object.size != other.size && !isPartial) { + return false + } + var stacked = stack.get(object) + if (stacked) { + return stacked == other + } + bitmask |= COMPARE_UNORDERED_FLAG + stack.set(object, other) + var result = equalArrays( + convert(object), + convert(other), + bitmask, + customizer, + equalFunc, + stack, + ) + stack['delete'](object) + return result + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other) + } + } + return false + } + module.exports = equalByTag + }, +}) + +// node_modules/lodash/_baseGetAllKeys.js +var require_baseGetAllKeys = __commonJS({ + 'node_modules/lodash/_baseGetAllKeys.js'(exports, module) { + init_define_process() + var arrayPush = require_arrayPush() + var isArray = require_isArray() + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object) + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)) + } + module.exports = baseGetAllKeys + }, +}) + +// node_modules/lodash/stubArray.js +var require_stubArray = __commonJS({ + 'node_modules/lodash/stubArray.js'(exports, module) { + init_define_process() + function stubArray() { + return [] + } + module.exports = stubArray + }, +}) + +// node_modules/lodash/_getSymbols.js +var require_getSymbols = __commonJS({ + 'node_modules/lodash/_getSymbols.js'(exports, module) { + init_define_process() + var arrayFilter = require_arrayFilter() + var stubArray = require_stubArray() + var objectProto = Object.prototype + var propertyIsEnumerable = objectProto.propertyIsEnumerable + var nativeGetSymbols = Object.getOwnPropertySymbols + var getSymbols = !nativeGetSymbols + ? stubArray + : function (object) { + if (object == null) { + return [] + } + object = Object(object) + return arrayFilter(nativeGetSymbols(object), function (symbol) { + return propertyIsEnumerable.call(object, symbol) + }) + } + module.exports = getSymbols + }, +}) + +// node_modules/lodash/stubFalse.js +var require_stubFalse = __commonJS({ + 'node_modules/lodash/stubFalse.js'(exports, module) { + init_define_process() + function stubFalse() { + return false + } + module.exports = stubFalse + }, +}) + +// node_modules/lodash/isBuffer.js +var require_isBuffer = __commonJS({ + 'node_modules/lodash/isBuffer.js'(exports, module) { + init_define_process() + var root = require_root() + var stubFalse = require_stubFalse() + var freeExports = + typeof exports == 'object' && exports && !exports.nodeType && exports + var freeModule = + freeExports && + typeof module == 'object' && + module && + !module.nodeType && + module + var moduleExports = freeModule && freeModule.exports === freeExports + var Buffer2 = moduleExports ? root.Buffer : void 0 + var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0 + var isBuffer = nativeIsBuffer || stubFalse + module.exports = isBuffer + }, +}) + +// node_modules/lodash/_isIndex.js +var require_isIndex = __commonJS({ + 'node_modules/lodash/_isIndex.js'(exports, module) { + init_define_process() + var MAX_SAFE_INTEGER = 9007199254740991 + var reIsUint = /^(?:0|[1-9]\d*)$/ + function isIndex(value, length) { + var type = typeof value + length = length == null ? MAX_SAFE_INTEGER : length + return ( + !!length && + (type == 'number' || (type != 'symbol' && reIsUint.test(value))) && + value > -1 && + value % 1 == 0 && + value < length + ) + } + module.exports = isIndex + }, +}) + +// node_modules/lodash/_baseIsTypedArray.js +var require_baseIsTypedArray = __commonJS({ + 'node_modules/lodash/_baseIsTypedArray.js'(exports, module) { + init_define_process() + var baseGetTag = require_baseGetTag() + var isLength = require_isLength() + var isObjectLike = require_isObjectLike() + var argsTag = '[object Arguments]' + var arrayTag = '[object Array]' + var boolTag = '[object Boolean]' + var dateTag = '[object Date]' + var errorTag = '[object Error]' + var funcTag = '[object Function]' + var mapTag = '[object Map]' + var numberTag = '[object Number]' + var objectTag = '[object Object]' + var regexpTag = '[object RegExp]' + var setTag = '[object Set]' + var stringTag = '[object String]' + var weakMapTag = '[object WeakMap]' + var arrayBufferTag = '[object ArrayBuffer]' + var dataViewTag = '[object DataView]' + var float32Tag = '[object Float32Array]' + var float64Tag = '[object Float64Array]' + var int8Tag = '[object Int8Array]' + var int16Tag = '[object Int16Array]' + var int32Tag = '[object Int32Array]' + var uint8Tag = '[object Uint8Array]' + var uint8ClampedTag = '[object Uint8ClampedArray]' + var uint16Tag = '[object Uint16Array]' + var uint32Tag = '[object Uint32Array]' + var typedArrayTags = {} + typedArrayTags[float32Tag] = + typedArrayTags[float64Tag] = + typedArrayTags[int8Tag] = + typedArrayTags[int16Tag] = + typedArrayTags[int32Tag] = + typedArrayTags[uint8Tag] = + typedArrayTags[uint8ClampedTag] = + typedArrayTags[uint16Tag] = + typedArrayTags[uint32Tag] = + true + typedArrayTags[argsTag] = + typedArrayTags[arrayTag] = + typedArrayTags[arrayBufferTag] = + typedArrayTags[boolTag] = + typedArrayTags[dataViewTag] = + typedArrayTags[dateTag] = + typedArrayTags[errorTag] = + typedArrayTags[funcTag] = + typedArrayTags[mapTag] = + typedArrayTags[numberTag] = + typedArrayTags[objectTag] = + typedArrayTags[regexpTag] = + typedArrayTags[setTag] = + typedArrayTags[stringTag] = + typedArrayTags[weakMapTag] = + false + function baseIsTypedArray(value) { + return ( + isObjectLike(value) && + isLength(value.length) && + !!typedArrayTags[baseGetTag(value)] + ) + } + module.exports = baseIsTypedArray + }, +}) + +// node_modules/lodash/_nodeUtil.js +var require_nodeUtil = __commonJS({ + 'node_modules/lodash/_nodeUtil.js'(exports, module) { + init_define_process() + var freeGlobal = require_freeGlobal() + var freeExports = + typeof exports == 'object' && exports && !exports.nodeType && exports + var freeModule = + freeExports && + typeof module == 'object' && + module && + !module.nodeType && + module + var moduleExports = freeModule && freeModule.exports === freeExports + var freeProcess = moduleExports && freeGlobal.process + var nodeUtil = (function () { + try { + var types = + freeModule && freeModule.require && freeModule.require('util').types + if (types) { + return types + } + return freeProcess && freeProcess.binding && freeProcess.binding('util') + } catch (e) {} + })() + module.exports = nodeUtil + }, +}) + +// node_modules/lodash/isTypedArray.js +var require_isTypedArray = __commonJS({ + 'node_modules/lodash/isTypedArray.js'(exports, module) { + init_define_process() + var baseIsTypedArray = require_baseIsTypedArray() + var baseUnary = require_baseUnary() + var nodeUtil = require_nodeUtil() + var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray + var isTypedArray = nodeIsTypedArray + ? baseUnary(nodeIsTypedArray) + : baseIsTypedArray + module.exports = isTypedArray + }, +}) + +// node_modules/lodash/_arrayLikeKeys.js +var require_arrayLikeKeys = __commonJS({ + 'node_modules/lodash/_arrayLikeKeys.js'(exports, module) { + init_define_process() + var baseTimes = require_baseTimes() + var isArguments = require_isArguments() + var isArray = require_isArray() + var isBuffer = require_isBuffer() + var isIndex = require_isIndex() + var isTypedArray = require_isTypedArray() + var objectProto = Object.prototype + var hasOwnProperty = objectProto.hasOwnProperty + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length + for (var key in value) { + if ( + (inherited || hasOwnProperty.call(value, key)) && + !( + skipIndexes && + (key == 'length' || + (isBuff && (key == 'offset' || key == 'parent')) || + (isType && + (key == 'buffer' || + key == 'byteLength' || + key == 'byteOffset')) || + isIndex(key, length)) + ) + ) { + result.push(key) + } + } + return result + } + module.exports = arrayLikeKeys + }, +}) + +// node_modules/lodash/_isPrototype.js +var require_isPrototype = __commonJS({ + 'node_modules/lodash/_isPrototype.js'(exports, module) { + init_define_process() + var objectProto = Object.prototype + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto + return value === proto + } + module.exports = isPrototype + }, +}) + +// node_modules/lodash/_overArg.js +var require_overArg = __commonJS({ + 'node_modules/lodash/_overArg.js'(exports, module) { + init_define_process() + function overArg(func, transform) { + return function (arg) { + return func(transform(arg)) + } + } + module.exports = overArg + }, +}) + +// node_modules/lodash/_nativeKeys.js +var require_nativeKeys = __commonJS({ + 'node_modules/lodash/_nativeKeys.js'(exports, module) { + init_define_process() + var overArg = require_overArg() + var nativeKeys = overArg(Object.keys, Object) + module.exports = nativeKeys + }, +}) + +// node_modules/lodash/_baseKeys.js +var require_baseKeys = __commonJS({ + 'node_modules/lodash/_baseKeys.js'(exports, module) { + init_define_process() + var isPrototype = require_isPrototype() + var nativeKeys = require_nativeKeys() + var objectProto = Object.prototype + var hasOwnProperty = objectProto.hasOwnProperty + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object) + } + var result = [] + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key) + } + } + return result + } + module.exports = baseKeys + }, +}) + +// node_modules/lodash/keys.js +var require_keys = __commonJS({ + 'node_modules/lodash/keys.js'(exports, module) { + init_define_process() + var arrayLikeKeys = require_arrayLikeKeys() + var baseKeys = require_baseKeys() + var isArrayLike = require_isArrayLike() + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object) + } + module.exports = keys + }, +}) + +// node_modules/lodash/_getAllKeys.js +var require_getAllKeys = __commonJS({ + 'node_modules/lodash/_getAllKeys.js'(exports, module) { + init_define_process() + var baseGetAllKeys = require_baseGetAllKeys() + var getSymbols = require_getSymbols() + var keys = require_keys() + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols) + } + module.exports = getAllKeys + }, +}) + +// node_modules/lodash/_equalObjects.js +var require_equalObjects = __commonJS({ + 'node_modules/lodash/_equalObjects.js'(exports, module) { + init_define_process() + var getAllKeys = require_getAllKeys() + var COMPARE_PARTIAL_FLAG = 1 + var objectProto = Object.prototype + var hasOwnProperty = objectProto.hasOwnProperty + function equalObjects( + object, + other, + bitmask, + customizer, + equalFunc, + stack, + ) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length + if (objLength != othLength && !isPartial) { + return false + } + var index = objLength + while (index--) { + var key = objProps[index] + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false + } + } + var objStacked = stack.get(object) + var othStacked = stack.get(other) + if (objStacked && othStacked) { + return objStacked == other && othStacked == object + } + var result = true + stack.set(object, other) + stack.set(other, object) + var skipCtor = isPartial + while (++index < objLength) { + key = objProps[index] + var objValue = object[key], + othValue = other[key] + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack) + } + if ( + !(compared === void 0 + ? objValue === othValue || + equalFunc(objValue, othValue, bitmask, customizer, stack) + : compared) + ) { + result = false + break + } + skipCtor || (skipCtor = key == 'constructor') + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor + if ( + objCtor != othCtor && + 'constructor' in object && + 'constructor' in other && + !( + typeof objCtor == 'function' && + objCtor instanceof objCtor && + typeof othCtor == 'function' && + othCtor instanceof othCtor + ) + ) { + result = false + } + } + stack['delete'](object) + stack['delete'](other) + return result + } + module.exports = equalObjects + }, +}) + +// node_modules/lodash/_DataView.js +var require_DataView = __commonJS({ + 'node_modules/lodash/_DataView.js'(exports, module) { + init_define_process() + var getNative = require_getNative() + var root = require_root() + var DataView2 = getNative(root, 'DataView') + module.exports = DataView2 + }, +}) + +// node_modules/lodash/_Promise.js +var require_Promise = __commonJS({ + 'node_modules/lodash/_Promise.js'(exports, module) { + init_define_process() + var getNative = require_getNative() + var root = require_root() + var Promise2 = getNative(root, 'Promise') + module.exports = Promise2 + }, +}) + +// node_modules/lodash/_Set.js +var require_Set = __commonJS({ + 'node_modules/lodash/_Set.js'(exports, module) { + init_define_process() + var getNative = require_getNative() + var root = require_root() + var Set2 = getNative(root, 'Set') + module.exports = Set2 + }, +}) + +// node_modules/lodash/_WeakMap.js +var require_WeakMap = __commonJS({ + 'node_modules/lodash/_WeakMap.js'(exports, module) { + init_define_process() + var getNative = require_getNative() + var root = require_root() + var WeakMap2 = getNative(root, 'WeakMap') + module.exports = WeakMap2 + }, +}) + +// node_modules/lodash/_getTag.js +var require_getTag = __commonJS({ + 'node_modules/lodash/_getTag.js'(exports, module) { + init_define_process() + var DataView2 = require_DataView() + var Map2 = require_Map() + var Promise2 = require_Promise() + var Set2 = require_Set() + var WeakMap2 = require_WeakMap() + var baseGetTag = require_baseGetTag() + var toSource = require_toSource() + var mapTag = '[object Map]' + var objectTag = '[object Object]' + var promiseTag = '[object Promise]' + var setTag = '[object Set]' + var weakMapTag = '[object WeakMap]' + var dataViewTag = '[object DataView]' + var dataViewCtorString = toSource(DataView2) + var mapCtorString = toSource(Map2) + var promiseCtorString = toSource(Promise2) + var setCtorString = toSource(Set2) + var weakMapCtorString = toSource(WeakMap2) + var getTag = baseGetTag + if ( + (DataView2 && getTag(new DataView2(new ArrayBuffer(1))) != dataViewTag) || + (Map2 && getTag(new Map2()) != mapTag) || + (Promise2 && getTag(Promise2.resolve()) != promiseTag) || + (Set2 && getTag(new Set2()) != setTag) || + (WeakMap2 && getTag(new WeakMap2()) != weakMapTag) + ) { + getTag = function (value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : void 0, + ctorString = Ctor ? toSource(Ctor) : '' + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: + return dataViewTag + case mapCtorString: + return mapTag + case promiseCtorString: + return promiseTag + case setCtorString: + return setTag + case weakMapCtorString: + return weakMapTag + } + } + return result + } + } + module.exports = getTag + }, +}) + +// node_modules/lodash/_baseIsEqualDeep.js +var require_baseIsEqualDeep = __commonJS({ + 'node_modules/lodash/_baseIsEqualDeep.js'(exports, module) { + init_define_process() + var Stack = require_Stack() + var equalArrays = require_equalArrays() + var equalByTag = require_equalByTag() + var equalObjects = require_equalObjects() + var getTag = require_getTag() + var isArray = require_isArray() + var isBuffer = require_isBuffer() + var isTypedArray = require_isTypedArray() + var COMPARE_PARTIAL_FLAG = 1 + var argsTag = '[object Arguments]' + var arrayTag = '[object Array]' + var objectTag = '[object Object]' + var objectProto = Object.prototype + var hasOwnProperty = objectProto.hasOwnProperty + function baseIsEqualDeep( + object, + other, + bitmask, + customizer, + equalFunc, + stack, + ) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other) + objTag = objTag == argsTag ? objectTag : objTag + othTag = othTag == argsTag ? objectTag : othTag + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false + } + objIsArr = true + objIsObj = false + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack()) + return objIsArr || isTypedArray(object) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag( + object, + other, + objTag, + bitmask, + customizer, + equalFunc, + stack, + ) + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = + objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__') + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other + stack || (stack = new Stack()) + return equalFunc( + objUnwrapped, + othUnwrapped, + bitmask, + customizer, + stack, + ) + } + } + if (!isSameTag) { + return false + } + stack || (stack = new Stack()) + return equalObjects(object, other, bitmask, customizer, equalFunc, stack) + } + module.exports = baseIsEqualDeep + }, +}) + +// node_modules/lodash/_baseIsEqual.js +var require_baseIsEqual = __commonJS({ + 'node_modules/lodash/_baseIsEqual.js'(exports, module) { + init_define_process() + var baseIsEqualDeep = require_baseIsEqualDeep() + var isObjectLike = require_isObjectLike() + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true + } + if ( + value == null || + other == null || + (!isObjectLike(value) && !isObjectLike(other)) + ) { + return value !== value && other !== other + } + return baseIsEqualDeep( + value, + other, + bitmask, + customizer, + baseIsEqual, + stack, + ) + } + module.exports = baseIsEqual + }, +}) + +// node_modules/lodash/isEqual.js +var require_isEqual = __commonJS({ + 'node_modules/lodash/isEqual.js'(exports, module) { + init_define_process() + var baseIsEqual = require_baseIsEqual() + function isEqual2(value, other) { + return baseIsEqual(value, other) + } + module.exports = isEqual2 + }, +}) + +// node_modules/semver/functions/parse.js +var require_parse2 = __commonJS({ + 'node_modules/semver/functions/parse.js'(exports, module) { + init_define_process() + var { MAX_LENGTH } = require_constants() + var { re, t } = require_re() + var SemVer = require_semver() + var parseOptions = require_parse_options() + var parse = (version, options) => { + options = parseOptions(options) + if (version instanceof SemVer) { + return version + } + if (typeof version !== 'string') { + return null + } + if (version.length > MAX_LENGTH) { + return null + } + const r = options.loose ? re[t.LOOSE] : re[t.FULL] + if (!r.test(version)) { + return null + } + try { + return new SemVer(version, options) + } catch (er) { + return null + } + } + module.exports = parse + }, +}) + +// node_modules/semver/functions/valid.js +var require_valid = __commonJS({ + 'node_modules/semver/functions/valid.js'(exports, module) { + init_define_process() + var parse = require_parse2() + var valid = (version, options) => { + const v = parse(version, options) + return v ? v.version : null + } + module.exports = valid + }, +}) + +// node_modules/semver/functions/clean.js +var require_clean = __commonJS({ + 'node_modules/semver/functions/clean.js'(exports, module) { + init_define_process() + var parse = require_parse2() + var clean = (version, options) => { + const s = parse(version.trim().replace(/^[=v]+/, ''), options) + return s ? s.version : null + } + module.exports = clean + }, +}) + +// node_modules/semver/functions/inc.js +var require_inc = __commonJS({ + 'node_modules/semver/functions/inc.js'(exports, module) { + init_define_process() + var SemVer = require_semver() + var inc = (version, release, options, identifier) => { + if (typeof options === 'string') { + identifier = options + options = void 0 + } + try { + return new SemVer(version, options).inc(release, identifier).version + } catch (er) { + return null + } + } + module.exports = inc + }, +}) + +// node_modules/semver/functions/eq.js +var require_eq2 = __commonJS({ + 'node_modules/semver/functions/eq.js'(exports, module) { + init_define_process() + var compare = require_compare() + var eq = (a, b, loose) => compare(a, b, loose) === 0 + module.exports = eq + }, +}) + +// node_modules/semver/functions/diff.js +var require_diff = __commonJS({ + 'node_modules/semver/functions/diff.js'(exports, module) { + init_define_process() + var parse = require_parse2() + var eq = require_eq2() + var diff = (version1, version2) => { + if (eq(version1, version2)) { + return null + } else { + const v1 = parse(version1) + const v2 = parse(version2) + const hasPre = v1.prerelease.length || v2.prerelease.length + const prefix = hasPre ? 'pre' : '' + const defaultResult = hasPre ? 'prerelease' : '' + for (const key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return prefix + key + } + } + } + return defaultResult + } + } + module.exports = diff + }, +}) + +// node_modules/semver/functions/major.js +var require_major = __commonJS({ + 'node_modules/semver/functions/major.js'(exports, module) { + init_define_process() + var SemVer = require_semver() + var major = (a, loose) => new SemVer(a, loose).major + module.exports = major + }, +}) + +// node_modules/semver/functions/minor.js +var require_minor = __commonJS({ + 'node_modules/semver/functions/minor.js'(exports, module) { + init_define_process() + var SemVer = require_semver() + var minor = (a, loose) => new SemVer(a, loose).minor + module.exports = minor + }, +}) + +// node_modules/semver/functions/patch.js +var require_patch = __commonJS({ + 'node_modules/semver/functions/patch.js'(exports, module) { + init_define_process() + var SemVer = require_semver() + var patch = (a, loose) => new SemVer(a, loose).patch + module.exports = patch + }, +}) + +// node_modules/semver/functions/prerelease.js +var require_prerelease = __commonJS({ + 'node_modules/semver/functions/prerelease.js'(exports, module) { + init_define_process() + var parse = require_parse2() + var prerelease = (version, options) => { + const parsed = parse(version, options) + return parsed && parsed.prerelease.length ? parsed.prerelease : null + } + module.exports = prerelease + }, +}) + +// node_modules/semver/functions/rcompare.js +var require_rcompare = __commonJS({ + 'node_modules/semver/functions/rcompare.js'(exports, module) { + init_define_process() + var compare = require_compare() + var rcompare = (a, b, loose) => compare(b, a, loose) + module.exports = rcompare + }, +}) + +// node_modules/semver/functions/compare-loose.js +var require_compare_loose = __commonJS({ + 'node_modules/semver/functions/compare-loose.js'(exports, module) { + init_define_process() + var compare = require_compare() + var compareLoose = (a, b) => compare(a, b, true) + module.exports = compareLoose + }, +}) + +// node_modules/semver/functions/compare-build.js +var require_compare_build = __commonJS({ + 'node_modules/semver/functions/compare-build.js'(exports, module) { + init_define_process() + var SemVer = require_semver() + var compareBuild = (a, b, loose) => { + const versionA = new SemVer(a, loose) + const versionB = new SemVer(b, loose) + return versionA.compare(versionB) || versionA.compareBuild(versionB) + } + module.exports = compareBuild + }, +}) + +// node_modules/semver/functions/sort.js +var require_sort = __commonJS({ + 'node_modules/semver/functions/sort.js'(exports, module) { + init_define_process() + var compareBuild = require_compare_build() + var sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)) + module.exports = sort + }, +}) + +// node_modules/semver/functions/rsort.js +var require_rsort = __commonJS({ + 'node_modules/semver/functions/rsort.js'(exports, module) { + init_define_process() + var compareBuild = require_compare_build() + var rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)) + module.exports = rsort + }, +}) + +// node_modules/semver/functions/gt.js +var require_gt = __commonJS({ + 'node_modules/semver/functions/gt.js'(exports, module) { + init_define_process() + var compare = require_compare() + var gt = (a, b, loose) => compare(a, b, loose) > 0 + module.exports = gt + }, +}) + +// node_modules/semver/functions/neq.js +var require_neq = __commonJS({ + 'node_modules/semver/functions/neq.js'(exports, module) { + init_define_process() + var compare = require_compare() + var neq = (a, b, loose) => compare(a, b, loose) !== 0 + module.exports = neq + }, +}) + +// node_modules/semver/functions/gte.js +var require_gte = __commonJS({ + 'node_modules/semver/functions/gte.js'(exports, module) { + init_define_process() + var compare = require_compare() + var gte = (a, b, loose) => compare(a, b, loose) >= 0 + module.exports = gte + }, +}) + +// node_modules/semver/functions/lte.js +var require_lte = __commonJS({ + 'node_modules/semver/functions/lte.js'(exports, module) { + init_define_process() + var compare = require_compare() + var lte = (a, b, loose) => compare(a, b, loose) <= 0 + module.exports = lte + }, +}) + +// node_modules/semver/functions/cmp.js +var require_cmp = __commonJS({ + 'node_modules/semver/functions/cmp.js'(exports, module) { + init_define_process() + var eq = require_eq2() + var neq = require_neq() + var gt = require_gt() + var gte = require_gte() + var lt2 = require_lt() + var lte = require_lte() + var cmp = (a, op, b, loose) => { + switch (op) { + case '===': + if (typeof a === 'object') a = a.version + if (typeof b === 'object') b = b.version + return a === b + case '!==': + if (typeof a === 'object') a = a.version + if (typeof b === 'object') b = b.version + return a !== b + case '': + case '=': + case '==': + return eq(a, b, loose) + case '!=': + return neq(a, b, loose) + case '>': + return gt(a, b, loose) + case '>=': + return gte(a, b, loose) + case '<': + return lt2(a, b, loose) + case '<=': + return lte(a, b, loose) + default: + throw new TypeError(`Invalid operator: ${op}`) + } + } + module.exports = cmp + }, +}) + +// node_modules/semver/functions/coerce.js +var require_coerce = __commonJS({ + 'node_modules/semver/functions/coerce.js'(exports, module) { + init_define_process() + var SemVer = require_semver() + var parse = require_parse2() + var { re, t } = require_re() + var coerce = (version, options) => { + if (version instanceof SemVer) { + return version + } + if (typeof version === 'number') { + version = String(version) + } + if (typeof version !== 'string') { + return null + } + options = options || {} + let match = null + if (!options.rtl) { + match = version.match(re[t.COERCE]) + } else { + let next + while ( + (next = re[t.COERCERTL].exec(version)) && + (!match || match.index + match[0].length !== version.length) + ) { + if ( + !match || + next.index + next[0].length !== match.index + match[0].length + ) { + match = next + } + re[t.COERCERTL].lastIndex = + next.index + next[1].length + next[2].length + } + re[t.COERCERTL].lastIndex = -1 + } + if (match === null) return null + return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options) + } + module.exports = coerce + }, +}) + +// node_modules/yallist/iterator.js +var require_iterator = __commonJS({ + 'node_modules/yallist/iterator.js'(exports, module) { + 'use strict' + init_define_process() + module.exports = function (Yallist) { + Yallist.prototype[Symbol.iterator] = function* () { + for (let walker = this.head; walker; walker = walker.next) { + yield walker.value + } + } + } + }, +}) + +// node_modules/yallist/yallist.js +var require_yallist = __commonJS({ + 'node_modules/yallist/yallist.js'(exports, module) { + 'use strict' + init_define_process() + module.exports = Yallist + Yallist.Node = Node + Yallist.create = Yallist + function Yallist(list) { + var self2 = this + if (!(self2 instanceof Yallist)) { + self2 = new Yallist() + } + self2.tail = null + self2.head = null + self2.length = 0 + if (list && typeof list.forEach === 'function') { + list.forEach(function (item) { + self2.push(item) + }) + } else if (arguments.length > 0) { + for (var i = 0, l = arguments.length; i < l; i++) { + self2.push(arguments[i]) + } + } + return self2 + } + Yallist.prototype.removeNode = function (node) { + if (node.list !== this) { + throw new Error('removing node which does not belong to this list') + } + var next = node.next + var prev = node.prev + if (next) { + next.prev = prev + } + if (prev) { + prev.next = next + } + if (node === this.head) { + this.head = next + } + if (node === this.tail) { + this.tail = prev + } + node.list.length-- + node.next = null + node.prev = null + node.list = null + return next + } + Yallist.prototype.unshiftNode = function (node) { + if (node === this.head) { + return + } + if (node.list) { + node.list.removeNode(node) + } + var head = this.head + node.list = this + node.next = head + if (head) { + head.prev = node + } + this.head = node + if (!this.tail) { + this.tail = node + } + this.length++ + } + Yallist.prototype.pushNode = function (node) { + if (node === this.tail) { + return + } + if (node.list) { + node.list.removeNode(node) + } + var tail = this.tail + node.list = this + node.prev = tail + if (tail) { + tail.next = node + } + this.tail = node + if (!this.head) { + this.head = node + } + this.length++ + } + Yallist.prototype.push = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + push(this, arguments[i]) + } + return this.length + } + Yallist.prototype.unshift = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + unshift(this, arguments[i]) + } + return this.length + } + Yallist.prototype.pop = function () { + if (!this.tail) { + return void 0 + } + var res = this.tail.value + this.tail = this.tail.prev + if (this.tail) { + this.tail.next = null + } else { + this.head = null + } + this.length-- + return res + } + Yallist.prototype.shift = function () { + if (!this.head) { + return void 0 + } + var res = this.head.value + this.head = this.head.next + if (this.head) { + this.head.prev = null + } else { + this.tail = null + } + this.length-- + return res + } + Yallist.prototype.forEach = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.head, i = 0; walker !== null; i++) { + fn.call(thisp, walker.value, i, this) + walker = walker.next + } + } + Yallist.prototype.forEachReverse = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { + fn.call(thisp, walker.value, i, this) + walker = walker.prev + } + } + Yallist.prototype.get = function (n) { + for (var i = 0, walker = this.head; walker !== null && i < n; i++) { + walker = walker.next + } + if (i === n && walker !== null) { + return walker.value + } + } + Yallist.prototype.getReverse = function (n) { + for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { + walker = walker.prev + } + if (i === n && walker !== null) { + return walker.value + } + } + Yallist.prototype.map = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.head; walker !== null; ) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.next + } + return res + } + Yallist.prototype.mapReverse = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.tail; walker !== null; ) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.prev + } + return res + } + Yallist.prototype.reduce = function (fn, initial) { + var acc + var walker = this.head + if (arguments.length > 1) { + acc = initial + } else if (this.head) { + walker = this.head.next + acc = this.head.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } + for (var i = 0; walker !== null; i++) { + acc = fn(acc, walker.value, i) + walker = walker.next + } + return acc + } + Yallist.prototype.reduceReverse = function (fn, initial) { + var acc + var walker = this.tail + if (arguments.length > 1) { + acc = initial + } else if (this.tail) { + walker = this.tail.prev + acc = this.tail.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } + for (var i = this.length - 1; walker !== null; i--) { + acc = fn(acc, walker.value, i) + walker = walker.prev + } + return acc + } + Yallist.prototype.toArray = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.head; walker !== null; i++) { + arr[i] = walker.value + walker = walker.next + } + return arr + } + Yallist.prototype.toArrayReverse = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.tail; walker !== null; i++) { + arr[i] = walker.value + walker = walker.prev + } + return arr + } + Yallist.prototype.slice = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length + } + from = from || 0 + if (from < 0) { + from += this.length + } + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for (var i = 0, walker = this.head; walker !== null && i < from; i++) { + walker = walker.next + } + for (; walker !== null && i < to; i++, walker = walker.next) { + ret.push(walker.value) + } + return ret + } + Yallist.prototype.sliceReverse = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length + } + from = from || 0 + if (from < 0) { + from += this.length + } + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for ( + var i = this.length, walker = this.tail; + walker !== null && i > to; + i-- + ) { + walker = walker.prev + } + for (; walker !== null && i > from; i--, walker = walker.prev) { + ret.push(walker.value) + } + return ret + } + Yallist.prototype.splice = function (start, deleteCount, ...nodes) { + if (start > this.length) { + start = this.length - 1 + } + if (start < 0) { + start = this.length + start + } + for (var i = 0, walker = this.head; walker !== null && i < start; i++) { + walker = walker.next + } + var ret = [] + for (var i = 0; walker && i < deleteCount; i++) { + ret.push(walker.value) + walker = this.removeNode(walker) + } + if (walker === null) { + walker = this.tail + } + if (walker !== this.head && walker !== this.tail) { + walker = walker.prev + } + for (var i = 0; i < nodes.length; i++) { + walker = insert(this, walker, nodes[i]) + } + return ret + } + Yallist.prototype.reverse = function () { + var head = this.head + var tail = this.tail + for (var walker = head; walker !== null; walker = walker.prev) { + var p = walker.prev + walker.prev = walker.next + walker.next = p + } + this.head = tail + this.tail = head + return this + } + function insert(self2, node, value) { + var inserted = + node === self2.head + ? new Node(value, null, node, self2) + : new Node(value, node, node.next, self2) + if (inserted.next === null) { + self2.tail = inserted + } + if (inserted.prev === null) { + self2.head = inserted + } + self2.length++ + return inserted + } + function push(self2, item) { + self2.tail = new Node(item, self2.tail, null, self2) + if (!self2.head) { + self2.head = self2.tail + } + self2.length++ + } + function unshift(self2, item) { + self2.head = new Node(item, null, self2.head, self2) + if (!self2.tail) { + self2.tail = self2.head + } + self2.length++ + } + function Node(value, prev, next, list) { + if (!(this instanceof Node)) { + return new Node(value, prev, next, list) + } + this.list = list + this.value = value + if (prev) { + prev.next = this + this.prev = prev + } else { + this.prev = null + } + if (next) { + next.prev = this + this.next = next + } else { + this.next = null + } + } + try { + require_iterator()(Yallist) + } catch (er) {} + }, +}) + +// node_modules/lru-cache/index.js +var require_lru_cache = __commonJS({ + 'node_modules/lru-cache/index.js'(exports, module) { + 'use strict' + init_define_process() + var Yallist = require_yallist() + var MAX = Symbol('max') + var LENGTH = Symbol('length') + var LENGTH_CALCULATOR = Symbol('lengthCalculator') + var ALLOW_STALE = Symbol('allowStale') + var MAX_AGE = Symbol('maxAge') + var DISPOSE = Symbol('dispose') + var NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet') + var LRU_LIST = Symbol('lruList') + var CACHE = Symbol('cache') + var UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet') + var naiveLength = () => 1 + var LRUCache = class { + constructor(options) { + if (typeof options === 'number') options = { max: options } + if (!options) options = {} + if (options.max && (typeof options.max !== 'number' || options.max < 0)) + throw new TypeError('max must be a non-negative number') + const max = (this[MAX] = options.max || Infinity) + const lc3 = options.length || naiveLength + this[LENGTH_CALCULATOR] = typeof lc3 !== 'function' ? naiveLength : lc3 + this[ALLOW_STALE] = options.stale || false + if (options.maxAge && typeof options.maxAge !== 'number') + throw new TypeError('maxAge must be a number') + this[MAX_AGE] = options.maxAge || 0 + this[DISPOSE] = options.dispose + this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false + this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false + this.reset() + } + set max(mL) { + if (typeof mL !== 'number' || mL < 0) + throw new TypeError('max must be a non-negative number') + this[MAX] = mL || Infinity + trim(this) + } + get max() { + return this[MAX] + } + set allowStale(allowStale) { + this[ALLOW_STALE] = !!allowStale + } + get allowStale() { + return this[ALLOW_STALE] + } + set maxAge(mA) { + if (typeof mA !== 'number') + throw new TypeError('maxAge must be a non-negative number') + this[MAX_AGE] = mA + trim(this) + } + get maxAge() { + return this[MAX_AGE] + } + set lengthCalculator(lC) { + if (typeof lC !== 'function') lC = naiveLength + if (lC !== this[LENGTH_CALCULATOR]) { + this[LENGTH_CALCULATOR] = lC + this[LENGTH] = 0 + this[LRU_LIST].forEach((hit) => { + hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key) + this[LENGTH] += hit.length + }) + } + trim(this) + } + get lengthCalculator() { + return this[LENGTH_CALCULATOR] + } + get length() { + return this[LENGTH] + } + get itemCount() { + return this[LRU_LIST].length + } + rforEach(fn, thisp) { + thisp = thisp || this + for (let walker = this[LRU_LIST].tail; walker !== null; ) { + const prev = walker.prev + forEachStep(this, fn, walker, thisp) + walker = prev + } + } + forEach(fn, thisp) { + thisp = thisp || this + for (let walker = this[LRU_LIST].head; walker !== null; ) { + const next = walker.next + forEachStep(this, fn, walker, thisp) + walker = next + } + } + keys() { + return this[LRU_LIST].toArray().map((k) => k.key) + } + values() { + return this[LRU_LIST].toArray().map((k) => k.value) + } + reset() { + if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) { + this[LRU_LIST].forEach((hit) => this[DISPOSE](hit.key, hit.value)) + } + this[CACHE] = /* @__PURE__ */ new Map() + this[LRU_LIST] = new Yallist() + this[LENGTH] = 0 + } + dump() { + return this[LRU_LIST].map((hit) => + isStale(this, hit) + ? false + : { + k: hit.key, + v: hit.value, + e: hit.now + (hit.maxAge || 0), + }, + ) + .toArray() + .filter((h) => h) + } + dumpLru() { + return this[LRU_LIST] + } + set(key, value, maxAge) { + maxAge = maxAge || this[MAX_AGE] + if (maxAge && typeof maxAge !== 'number') + throw new TypeError('maxAge must be a number') + const now = maxAge ? Date.now() : 0 + const len = this[LENGTH_CALCULATOR](value, key) + if (this[CACHE].has(key)) { + if (len > this[MAX]) { + del(this, this[CACHE].get(key)) + return false + } + const node = this[CACHE].get(key) + const item = node.value + if (this[DISPOSE]) { + if (!this[NO_DISPOSE_ON_SET]) this[DISPOSE](key, item.value) + } + item.now = now + item.maxAge = maxAge + item.value = value + this[LENGTH] += len - item.length + item.length = len + this.get(key) + trim(this) + return true + } + const hit = new Entry(key, value, len, now, maxAge) + if (hit.length > this[MAX]) { + if (this[DISPOSE]) this[DISPOSE](key, value) + return false + } + this[LENGTH] += hit.length + this[LRU_LIST].unshift(hit) + this[CACHE].set(key, this[LRU_LIST].head) + trim(this) + return true + } + has(key) { + if (!this[CACHE].has(key)) return false + const hit = this[CACHE].get(key).value + return !isStale(this, hit) + } + get(key) { + return get(this, key, true) + } + peek(key) { + return get(this, key, false) + } + pop() { + const node = this[LRU_LIST].tail + if (!node) return null + del(this, node) + return node.value + } + del(key) { + del(this, this[CACHE].get(key)) + } + load(arr) { + this.reset() + const now = Date.now() + for (let l = arr.length - 1; l >= 0; l--) { + const hit = arr[l] + const expiresAt = hit.e || 0 + if (expiresAt === 0) this.set(hit.k, hit.v) + else { + const maxAge = expiresAt - now + if (maxAge > 0) { + this.set(hit.k, hit.v, maxAge) + } + } + } + } + prune() { + this[CACHE].forEach((value, key) => get(this, key, false)) + } + } + var get = (self2, key, doUse) => { + const node = self2[CACHE].get(key) + if (node) { + const hit = node.value + if (isStale(self2, hit)) { + del(self2, node) + if (!self2[ALLOW_STALE]) return void 0 + } else { + if (doUse) { + if (self2[UPDATE_AGE_ON_GET]) node.value.now = Date.now() + self2[LRU_LIST].unshiftNode(node) + } + } + return hit.value + } + } + var isStale = (self2, hit) => { + if (!hit || (!hit.maxAge && !self2[MAX_AGE])) return false + const diff = Date.now() - hit.now + return hit.maxAge + ? diff > hit.maxAge + : self2[MAX_AGE] && diff > self2[MAX_AGE] + } + var trim = (self2) => { + if (self2[LENGTH] > self2[MAX]) { + for ( + let walker = self2[LRU_LIST].tail; + self2[LENGTH] > self2[MAX] && walker !== null; + + ) { + const prev = walker.prev + del(self2, walker) + walker = prev + } + } + } + var del = (self2, node) => { + if (node) { + const hit = node.value + if (self2[DISPOSE]) self2[DISPOSE](hit.key, hit.value) + self2[LENGTH] -= hit.length + self2[CACHE].delete(hit.key) + self2[LRU_LIST].removeNode(node) + } + } + var Entry = class { + constructor(key, value, length, now, maxAge) { + this.key = key + this.value = value + this.length = length + this.now = now + this.maxAge = maxAge || 0 + } + } + var forEachStep = (self2, fn, node, thisp) => { + let hit = node.value + if (isStale(self2, hit)) { + del(self2, node) + if (!self2[ALLOW_STALE]) hit = void 0 + } + if (hit) fn.call(thisp, hit.value, hit.key, self2) + } + module.exports = LRUCache + }, +}) + +// node_modules/semver/classes/range.js +var require_range = __commonJS({ + 'node_modules/semver/classes/range.js'(exports, module) { + init_define_process() + var Range = class { + constructor(range, options) { + options = parseOptions(options) + if (range instanceof Range) { + if ( + range.loose === !!options.loose && + range.includePrerelease === !!options.includePrerelease + ) { + return range + } else { + return new Range(range.raw, options) + } + } + if (range instanceof Comparator) { + this.raw = range.value + this.set = [[range]] + this.format() + return this + } + this.options = options + this.loose = !!options.loose + this.includePrerelease = !!options.includePrerelease + this.raw = range + this.set = range + .split(/\s*\|\|\s*/) + .map((range2) => this.parseRange(range2.trim())) + .filter((c) => c.length) + if (!this.set.length) { + throw new TypeError(`Invalid SemVer Range: ${range}`) + } + if (this.set.length > 1) { + const first = this.set[0] + this.set = this.set.filter((c) => !isNullSet(c[0])) + if (this.set.length === 0) this.set = [first] + else if (this.set.length > 1) { + for (const c of this.set) { + if (c.length === 1 && isAny(c[0])) { + this.set = [c] + break + } + } + } + } + this.format() + } + format() { + this.range = this.set + .map((comps) => { + return comps.join(' ').trim() + }) + .join('||') + .trim() + return this.range + } + toString() { + return this.range + } + parseRange(range) { + range = range.trim() + const memoOpts = Object.keys(this.options).join(',') + const memoKey = `parseRange:${memoOpts}:${range}` + const cached = cache.get(memoKey) + if (cached) return cached + const loose = this.options.loose + const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] + range = range.replace(hr, hyphenReplace(this.options.includePrerelease)) + debug('hyphen replace', range) + range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) + debug('comparator trim', range, re[t.COMPARATORTRIM]) + range = range.replace(re[t.TILDETRIM], tildeTrimReplace) + range = range.replace(re[t.CARETTRIM], caretTrimReplace) + range = range.split(/\s+/).join(' ') + const compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] + const rangeList = range + .split(' ') + .map((comp) => parseComparator(comp, this.options)) + .join(' ') + .split(/\s+/) + .map((comp) => replaceGTE0(comp, this.options)) + .filter( + this.options.loose ? (comp) => !!comp.match(compRe) : () => true, + ) + .map((comp) => new Comparator(comp, this.options)) + const l = rangeList.length + const rangeMap = /* @__PURE__ */ new Map() + for (const comp of rangeList) { + if (isNullSet(comp)) return [comp] + rangeMap.set(comp.value, comp) + } + if (rangeMap.size > 1 && rangeMap.has('')) rangeMap.delete('') + const result = [...rangeMap.values()] + cache.set(memoKey, result) + return result + } + intersects(range, options) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required') + } + return this.set.some((thisComparators) => { + return ( + isSatisfiable(thisComparators, options) && + range.set.some((rangeComparators) => { + return ( + isSatisfiable(rangeComparators, options) && + thisComparators.every((thisComparator) => { + return rangeComparators.every((rangeComparator) => { + return thisComparator.intersects(rangeComparator, options) + }) + }) + ) + }) + ) + }) + } + test(version) { + if (!version) { + return false + } + if (typeof version === 'string') { + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } + } + for (let i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version, this.options)) { + return true + } + } + return false + } + } + module.exports = Range + var LRU = require_lru_cache() + var cache = new LRU({ max: 1e3 }) + var parseOptions = require_parse_options() + var Comparator = require_comparator() + var debug = require_debug() + var SemVer = require_semver() + var { re, t, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = + require_re() + var isNullSet = (c) => c.value === '<0.0.0-0' + var isAny = (c) => c.value === '' + var isSatisfiable = (comparators, options) => { + let result = true + const remainingComparators = comparators.slice() + let testComparator = remainingComparators.pop() + while (result && remainingComparators.length) { + result = remainingComparators.every((otherComparator) => { + return testComparator.intersects(otherComparator, options) + }) + testComparator = remainingComparators.pop() + } + return result + } + var parseComparator = (comp, options) => { + debug('comp', comp, options) + comp = replaceCarets(comp, options) + debug('caret', comp) + comp = replaceTildes(comp, options) + debug('tildes', comp) + comp = replaceXRanges(comp, options) + debug('xrange', comp) + comp = replaceStars(comp, options) + debug('stars', comp) + return comp + } + var isX = (id) => !id || id.toLowerCase() === 'x' || id === '*' + var replaceTildes = (comp, options) => + comp + .trim() + .split(/\s+/) + .map((comp2) => { + return replaceTilde(comp2, options) + }) + .join(' ') + var replaceTilde = (comp, options) => { + const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] + return comp.replace(r, (_, M, m, p, pr) => { + debug('tilde', comp, _, M, m, p, pr) + let ret + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = `>=${M}.0.0 <${+M + 1}.0.0-0` + } else if (isX(p)) { + ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0` + } else if (pr) { + debug('replaceTilde pr', pr) + ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0` + } else { + ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0` + } + debug('tilde return', ret) + return ret + }) + } + var replaceCarets = (comp, options) => + comp + .trim() + .split(/\s+/) + .map((comp2) => { + return replaceCaret(comp2, options) + }) + .join(' ') + var replaceCaret = (comp, options) => { + debug('caret', comp, options) + const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] + const z = options.includePrerelease ? '-0' : '' + return comp.replace(r, (_, M, m, p, pr) => { + debug('caret', comp, _, M, m, p, pr) + let ret + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0` + } else if (isX(p)) { + if (M === '0') { + ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0` + } else { + ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0` + } + } else if (pr) { + debug('replaceCaret pr', pr) + if (M === '0') { + if (m === '0') { + ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0` + } else { + ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0` + } + } else { + ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0` + } + } else { + debug('no pr') + if (M === '0') { + if (m === '0') { + ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0` + } else { + ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0` + } + } else { + ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0` + } + } + debug('caret return', ret) + return ret + }) + } + var replaceXRanges = (comp, options) => { + debug('replaceXRanges', comp, options) + return comp + .split(/\s+/) + .map((comp2) => { + return replaceXRange(comp2, options) + }) + .join(' ') + } + var replaceXRange = (comp, options) => { + comp = comp.trim() + const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] + return comp.replace(r, (ret, gtlt, M, m, p, pr) => { + debug('xRange', comp, ret, gtlt, M, m, p, pr) + const xM = isX(M) + const xm = xM || isX(m) + const xp = xm || isX(p) + const anyX = xp + if (gtlt === '=' && anyX) { + gtlt = '' + } + pr = options.includePrerelease ? '-0' : '' + if (xM) { + if (gtlt === '>' || gtlt === '<') { + ret = '<0.0.0-0' + } else { + ret = '*' + } + } else if (gtlt && anyX) { + if (xm) { + m = 0 + } + p = 0 + if (gtlt === '>') { + gtlt = '>=' + if (xm) { + M = +M + 1 + m = 0 + p = 0 + } else { + m = +m + 1 + p = 0 + } + } else if (gtlt === '<=') { + gtlt = '<' + if (xm) { + M = +M + 1 + } else { + m = +m + 1 + } + } + if (gtlt === '<') pr = '-0' + ret = `${gtlt + M}.${m}.${p}${pr}` + } else if (xm) { + ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0` + } else if (xp) { + ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0` + } + debug('xRange return', ret) + return ret + }) + } + var replaceStars = (comp, options) => { + debug('replaceStars', comp, options) + return comp.trim().replace(re[t.STAR], '') + } + var replaceGTE0 = (comp, options) => { + debug('replaceGTE0', comp, options) + return comp + .trim() + .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '') + } + var hyphenReplace = + (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) => { + if (isX(fM)) { + from = '' + } else if (isX(fm)) { + from = `>=${fM}.0.0${incPr ? '-0' : ''}` + } else if (isX(fp)) { + from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}` + } else if (fpr) { + from = `>=${from}` + } else { + from = `>=${from}${incPr ? '-0' : ''}` + } + if (isX(tM)) { + to = '' + } else if (isX(tm)) { + to = `<${+tM + 1}.0.0-0` + } else if (isX(tp)) { + to = `<${tM}.${+tm + 1}.0-0` + } else if (tpr) { + to = `<=${tM}.${tm}.${tp}-${tpr}` + } else if (incPr) { + to = `<${tM}.${tm}.${+tp + 1}-0` + } else { + to = `<=${to}` + } + return `${from} ${to}`.trim() + } + var testSet = (set, version, options) => { + for (let i = 0; i < set.length; i++) { + if (!set[i].test(version)) { + return false + } + } + if (version.prerelease.length && !options.includePrerelease) { + for (let i = 0; i < set.length; i++) { + debug(set[i].semver) + if (set[i].semver === Comparator.ANY) { + continue + } + if (set[i].semver.prerelease.length > 0) { + const allowed = set[i].semver + if ( + allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch + ) { + return true + } + } + } + return false + } + return true + } + }, +}) + +// node_modules/semver/classes/comparator.js +var require_comparator = __commonJS({ + 'node_modules/semver/classes/comparator.js'(exports, module) { + init_define_process() + var ANY = Symbol('SemVer ANY') + var Comparator = class { + static get ANY() { + return ANY + } + constructor(comp, options) { + options = parseOptions(options) + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) { + return comp + } else { + comp = comp.value + } + } + debug('comparator', comp, options) + this.options = options + this.loose = !!options.loose + this.parse(comp) + if (this.semver === ANY) { + this.value = '' + } else { + this.value = this.operator + this.semver.version + } + debug('comp', this) + } + parse(comp) { + const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] + const m = comp.match(r) + if (!m) { + throw new TypeError(`Invalid comparator: ${comp}`) + } + this.operator = m[1] !== void 0 ? m[1] : '' + if (this.operator === '=') { + this.operator = '' + } + if (!m[2]) { + this.semver = ANY + } else { + this.semver = new SemVer(m[2], this.options.loose) + } + } + toString() { + return this.value + } + test(version) { + debug('Comparator.test', version, this.options.loose) + if (this.semver === ANY || version === ANY) { + return true + } + if (typeof version === 'string') { + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } + } + return cmp(version, this.operator, this.semver, this.options) + } + intersects(comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required') + } + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false, + } + } + if (this.operator === '') { + if (this.value === '') { + return true + } + return new Range(comp.value, options).test(this.value) + } else if (comp.operator === '') { + if (comp.value === '') { + return true + } + return new Range(this.value, options).test(comp.semver) + } + const sameDirectionIncreasing = + (this.operator === '>=' || this.operator === '>') && + (comp.operator === '>=' || comp.operator === '>') + const sameDirectionDecreasing = + (this.operator === '<=' || this.operator === '<') && + (comp.operator === '<=' || comp.operator === '<') + const sameSemVer = this.semver.version === comp.semver.version + const differentDirectionsInclusive = + (this.operator === '>=' || this.operator === '<=') && + (comp.operator === '>=' || comp.operator === '<=') + const oppositeDirectionsLessThan = + cmp(this.semver, '<', comp.semver, options) && + (this.operator === '>=' || this.operator === '>') && + (comp.operator === '<=' || comp.operator === '<') + const oppositeDirectionsGreaterThan = + cmp(this.semver, '>', comp.semver, options) && + (this.operator === '<=' || this.operator === '<') && + (comp.operator === '>=' || comp.operator === '>') + return ( + sameDirectionIncreasing || + sameDirectionDecreasing || + (sameSemVer && differentDirectionsInclusive) || + oppositeDirectionsLessThan || + oppositeDirectionsGreaterThan + ) + } + } + module.exports = Comparator + var parseOptions = require_parse_options() + var { re, t } = require_re() + var cmp = require_cmp() + var debug = require_debug() + var SemVer = require_semver() + var Range = require_range() + }, +}) + +// node_modules/semver/functions/satisfies.js +var require_satisfies = __commonJS({ + 'node_modules/semver/functions/satisfies.js'(exports, module) { + init_define_process() + var Range = require_range() + var satisfies = (version, range, options) => { + try { + range = new Range(range, options) + } catch (er) { + return false + } + return range.test(version) + } + module.exports = satisfies + }, +}) + +// node_modules/semver/ranges/to-comparators.js +var require_to_comparators = __commonJS({ + 'node_modules/semver/ranges/to-comparators.js'(exports, module) { + init_define_process() + var Range = require_range() + var toComparators = (range, options) => + new Range(range, options).set.map((comp) => + comp + .map((c) => c.value) + .join(' ') + .trim() + .split(' '), + ) + module.exports = toComparators + }, +}) + +// node_modules/semver/ranges/max-satisfying.js +var require_max_satisfying = __commonJS({ + 'node_modules/semver/ranges/max-satisfying.js'(exports, module) { + init_define_process() + var SemVer = require_semver() + var Range = require_range() + var maxSatisfying = (versions, range, options) => { + let max = null + let maxSV = null + let rangeObj = null + try { + rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach((v) => { + if (rangeObj.test(v)) { + if (!max || maxSV.compare(v) === -1) { + max = v + maxSV = new SemVer(max, options) + } + } + }) + return max + } + module.exports = maxSatisfying + }, +}) + +// node_modules/semver/ranges/min-satisfying.js +var require_min_satisfying = __commonJS({ + 'node_modules/semver/ranges/min-satisfying.js'(exports, module) { + init_define_process() + var SemVer = require_semver() + var Range = require_range() + var minSatisfying = (versions, range, options) => { + let min = null + let minSV = null + let rangeObj = null + try { + rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach((v) => { + if (rangeObj.test(v)) { + if (!min || minSV.compare(v) === 1) { + min = v + minSV = new SemVer(min, options) + } + } + }) + return min + } + module.exports = minSatisfying + }, +}) + +// node_modules/semver/ranges/min-version.js +var require_min_version = __commonJS({ + 'node_modules/semver/ranges/min-version.js'(exports, module) { + init_define_process() + var SemVer = require_semver() + var Range = require_range() + var gt = require_gt() + var minVersion = (range, loose) => { + range = new Range(range, loose) + let minver = new SemVer('0.0.0') + if (range.test(minver)) { + return minver + } + minver = new SemVer('0.0.0-0') + if (range.test(minver)) { + return minver + } + minver = null + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i] + let setMin = null + comparators.forEach((comparator) => { + const compver = new SemVer(comparator.semver.version) + switch (comparator.operator) { + case '>': + if (compver.prerelease.length === 0) { + compver.patch++ + } else { + compver.prerelease.push(0) + } + compver.raw = compver.format() + case '': + case '>=': + if (!setMin || gt(compver, setMin)) { + setMin = compver + } + break + case '<': + case '<=': + break + default: + throw new Error(`Unexpected operation: ${comparator.operator}`) + } + }) + if (setMin && (!minver || gt(minver, setMin))) minver = setMin + } + if (minver && range.test(minver)) { + return minver + } + return null + } + module.exports = minVersion + }, +}) + +// node_modules/semver/ranges/valid.js +var require_valid2 = __commonJS({ + 'node_modules/semver/ranges/valid.js'(exports, module) { + init_define_process() + var Range = require_range() + var validRange = (range, options) => { + try { + return new Range(range, options).range || '*' + } catch (er) { + return null + } + } + module.exports = validRange + }, +}) + +// node_modules/semver/ranges/outside.js +var require_outside = __commonJS({ + 'node_modules/semver/ranges/outside.js'(exports, module) { + init_define_process() + var SemVer = require_semver() + var Comparator = require_comparator() + var { ANY } = Comparator + var Range = require_range() + var satisfies = require_satisfies() + var gt = require_gt() + var lt2 = require_lt() + var lte = require_lte() + var gte = require_gte() + var outside = (version, range, hilo, options) => { + version = new SemVer(version, options) + range = new Range(range, options) + let gtfn, ltefn, ltfn, comp, ecomp + switch (hilo) { + case '>': + gtfn = gt + ltefn = lte + ltfn = lt2 + comp = '>' + ecomp = '>=' + break + case '<': + gtfn = lt2 + ltefn = gte + ltfn = gt + comp = '<' + ecomp = '<=' + break + default: + throw new TypeError('Must provide a hilo val of "<" or ">"') + } + if (satisfies(version, range, options)) { + return false + } + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i] + let high = null + let low = null + comparators.forEach((comparator) => { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') + } + high = high || comparator + low = low || comparator + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator + } + }) + if (high.operator === comp || high.operator === ecomp) { + return false + } + if ( + (!low.operator || low.operator === comp) && + ltefn(version, low.semver) + ) { + return false + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false + } + } + return true + } + module.exports = outside + }, +}) + +// node_modules/semver/ranges/gtr.js +var require_gtr = __commonJS({ + 'node_modules/semver/ranges/gtr.js'(exports, module) { + init_define_process() + var outside = require_outside() + var gtr = (version, range, options) => outside(version, range, '>', options) + module.exports = gtr + }, +}) + +// node_modules/semver/ranges/ltr.js +var require_ltr = __commonJS({ + 'node_modules/semver/ranges/ltr.js'(exports, module) { + init_define_process() + var outside = require_outside() + var ltr = (version, range, options) => outside(version, range, '<', options) + module.exports = ltr + }, +}) + +// node_modules/semver/ranges/intersects.js +var require_intersects = __commonJS({ + 'node_modules/semver/ranges/intersects.js'(exports, module) { + init_define_process() + var Range = require_range() + var intersects = (r1, r2, options) => { + r1 = new Range(r1, options) + r2 = new Range(r2, options) + return r1.intersects(r2) + } + module.exports = intersects + }, +}) + +// node_modules/semver/ranges/simplify.js +var require_simplify = __commonJS({ + 'node_modules/semver/ranges/simplify.js'(exports, module) { + init_define_process() + var satisfies = require_satisfies() + var compare = require_compare() + module.exports = (versions, range, options) => { + const set = [] + let min = null + let prev = null + const v = versions.sort((a, b) => compare(a, b, options)) + for (const version of v) { + const included = satisfies(version, range, options) + if (included) { + prev = version + if (!min) min = version + } else { + if (prev) { + set.push([min, prev]) + } + prev = null + min = null + } + } + if (min) set.push([min, null]) + const ranges = [] + for (const [min2, max] of set) { + if (min2 === max) ranges.push(min2) + else if (!max && min2 === v[0]) ranges.push('*') + else if (!max) ranges.push(`>=${min2}`) + else if (min2 === v[0]) ranges.push(`<=${max}`) + else ranges.push(`${min2} - ${max}`) + } + const simplified = ranges.join(' || ') + const original = typeof range.raw === 'string' ? range.raw : String(range) + return simplified.length < original.length ? simplified : range + } + }, +}) + +// node_modules/semver/ranges/subset.js +var require_subset = __commonJS({ + 'node_modules/semver/ranges/subset.js'(exports, module) { + init_define_process() + var Range = require_range() + var Comparator = require_comparator() + var { ANY } = Comparator + var satisfies = require_satisfies() + var compare = require_compare() + var subset = (sub, dom, options = {}) => { + if (sub === dom) return true + sub = new Range(sub, options) + dom = new Range(dom, options) + let sawNonNull = false + OUTER: for (const simpleSub of sub.set) { + for (const simpleDom of dom.set) { + const isSub = simpleSubset(simpleSub, simpleDom, options) + sawNonNull = sawNonNull || isSub !== null + if (isSub) continue OUTER + } + if (sawNonNull) return false + } + return true + } + var simpleSubset = (sub, dom, options) => { + if (sub === dom) return true + if (sub.length === 1 && sub[0].semver === ANY) { + if (dom.length === 1 && dom[0].semver === ANY) return true + else if (options.includePrerelease) sub = [new Comparator('>=0.0.0-0')] + else sub = [new Comparator('>=0.0.0')] + } + if (dom.length === 1 && dom[0].semver === ANY) { + if (options.includePrerelease) return true + else dom = [new Comparator('>=0.0.0')] + } + const eqSet = /* @__PURE__ */ new Set() + let gt, lt2 + for (const c of sub) { + if (c.operator === '>' || c.operator === '>=') + gt = higherGT(gt, c, options) + else if (c.operator === '<' || c.operator === '<=') + lt2 = lowerLT(lt2, c, options) + else eqSet.add(c.semver) + } + if (eqSet.size > 1) return null + let gtltComp + if (gt && lt2) { + gtltComp = compare(gt.semver, lt2.semver, options) + if (gtltComp > 0) return null + else if ( + gtltComp === 0 && + (gt.operator !== '>=' || lt2.operator !== '<=') + ) + return null + } + for (const eq of eqSet) { + if (gt && !satisfies(eq, String(gt), options)) return null + if (lt2 && !satisfies(eq, String(lt2), options)) return null + for (const c of dom) { + if (!satisfies(eq, String(c), options)) return false + } + return true + } + let higher, lower + let hasDomLT, hasDomGT + let needDomLTPre = + lt2 && !options.includePrerelease && lt2.semver.prerelease.length + ? lt2.semver + : false + let needDomGTPre = + gt && !options.includePrerelease && gt.semver.prerelease.length + ? gt.semver + : false + if ( + needDomLTPre && + needDomLTPre.prerelease.length === 1 && + lt2.operator === '<' && + needDomLTPre.prerelease[0] === 0 + ) { + needDomLTPre = false + } + for (const c of dom) { + hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>=' + hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<=' + if (gt) { + if (needDomGTPre) { + if ( + c.semver.prerelease && + c.semver.prerelease.length && + c.semver.major === needDomGTPre.major && + c.semver.minor === needDomGTPre.minor && + c.semver.patch === needDomGTPre.patch + ) { + needDomGTPre = false + } + } + if (c.operator === '>' || c.operator === '>=') { + higher = higherGT(gt, c, options) + if (higher === c && higher !== gt) return false + } else if ( + gt.operator === '>=' && + !satisfies(gt.semver, String(c), options) + ) + return false + } + if (lt2) { + if (needDomLTPre) { + if ( + c.semver.prerelease && + c.semver.prerelease.length && + c.semver.major === needDomLTPre.major && + c.semver.minor === needDomLTPre.minor && + c.semver.patch === needDomLTPre.patch + ) { + needDomLTPre = false + } + } + if (c.operator === '<' || c.operator === '<=') { + lower = lowerLT(lt2, c, options) + if (lower === c && lower !== lt2) return false + } else if ( + lt2.operator === '<=' && + !satisfies(lt2.semver, String(c), options) + ) + return false + } + if (!c.operator && (lt2 || gt) && gtltComp !== 0) return false + } + if (gt && hasDomLT && !lt2 && gtltComp !== 0) return false + if (lt2 && hasDomGT && !gt && gtltComp !== 0) return false + if (needDomGTPre || needDomLTPre) return false + return true + } + var higherGT = (a, b, options) => { + if (!a) return b + const comp = compare(a.semver, b.semver, options) + return comp > 0 + ? a + : comp < 0 + ? b + : b.operator === '>' && a.operator === '>=' + ? b + : a + } + var lowerLT = (a, b, options) => { + if (!a) return b + const comp = compare(a.semver, b.semver, options) + return comp < 0 + ? a + : comp > 0 + ? b + : b.operator === '<' && a.operator === '<=' + ? b + : a + } + module.exports = subset + }, +}) + +// node_modules/semver/index.js +var require_semver2 = __commonJS({ + 'node_modules/semver/index.js'(exports, module) { + init_define_process() + var internalRe = require_re() + module.exports = { + re: internalRe.re, + src: internalRe.src, + tokens: internalRe.t, + SEMVER_SPEC_VERSION: require_constants().SEMVER_SPEC_VERSION, + SemVer: require_semver(), + compareIdentifiers: require_identifiers().compareIdentifiers, + rcompareIdentifiers: require_identifiers().rcompareIdentifiers, + parse: require_parse2(), + valid: require_valid(), + clean: require_clean(), + inc: require_inc(), + diff: require_diff(), + major: require_major(), + minor: require_minor(), + patch: require_patch(), + prerelease: require_prerelease(), + compare: require_compare(), + rcompare: require_rcompare(), + compareLoose: require_compare_loose(), + compareBuild: require_compare_build(), + sort: require_sort(), + rsort: require_rsort(), + gt: require_gt(), + lt: require_lt(), + eq: require_eq2(), + neq: require_neq(), + gte: require_gte(), + lte: require_lte(), + cmp: require_cmp(), + coerce: require_coerce(), + Comparator: require_comparator(), + Range: require_range(), + satisfies: require_satisfies(), + toComparators: require_to_comparators(), + maxSatisfying: require_max_satisfying(), + minSatisfying: require_min_satisfying(), + minVersion: require_min_version(), + validRange: require_valid2(), + outside: require_outside(), + gtr: require_gtr(), + ltr: require_ltr(), + intersects: require_intersects(), + simplifyRange: require_simplify(), + subset: require_subset(), + } + }, +}) + +// index.js +init_define_process() + +// converter/index.js +init_define_process() + +// converter/converter.js +init_define_process() + +// converter/types.js +init_define_process() +var TagEntry = class { + shortTag + longTag + longFormattedTag + constructor(shortTag, longTag) { + this.shortTag = shortTag + this.longTag = longTag + this.longFormattedTag = longTag.toLowerCase() + } +} +var Mapping = class { + mappingData + hasNoDuplicates + constructor(mappingData, hasNoDuplicates) { + this.mappingData = mappingData + this.hasNoDuplicates = hasNoDuplicates + } +} + +// utils/array.js +init_define_process() +var asArray = function (array) { + return Array.isArray(array) ? array : [array] +} +function recursiveMap(fn, array) { + if (Array.isArray(array)) { + return array.map((element) => recursiveMap(fn, element)) + } else { + return fn(array) + } +} + +// converter/issues.js +init_define_process() + +// common/issues/issues.js +init_define_process() + +// common/issues/data.js +init_define_process() + +// utils/string.js +init_define_process() +var import_date_and_time = __toESM(require_date_and_time()) + +// node_modules/date-fns/esm/parseISO/index.js +init_define_process() + +// node_modules/date-fns/esm/_lib/toInteger/index.js +init_define_process() +function toInteger(dirtyNumber) { + if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) { + return NaN + } + var number = Number(dirtyNumber) + if (isNaN(number)) { + return number + } + return number < 0 ? Math.ceil(number) : Math.floor(number) +} + +// node_modules/date-fns/esm/_lib/requiredArgs/index.js +init_define_process() +function requiredArgs(required, args) { + if (args.length < required) { + throw new TypeError( + required + + ' argument' + + (required > 1 ? 's' : '') + + ' required, but only ' + + args.length + + ' present', + ) + } +} + +// node_modules/date-fns/esm/parseISO/index.js +var MILLISECONDS_IN_HOUR = 36e5 +var MILLISECONDS_IN_MINUTE = 6e4 +var DEFAULT_ADDITIONAL_DIGITS = 2 +var patterns = { + dateTimeDelimiter: /[T ]/, + timeZoneDelimiter: /[Z ]/i, + timezone: /([Z+-].*)$/, +} +var dateRegex = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/ +var timeRegex = + /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/ +var timezoneRegex = /^([+-])(\d{2})(?::?(\d{2}))?$/ +function parseISO(argument, dirtyOptions) { + requiredArgs(1, arguments) + var options = dirtyOptions || {} + var additionalDigits = + options.additionalDigits == null + ? DEFAULT_ADDITIONAL_DIGITS + : toInteger(options.additionalDigits) + if ( + additionalDigits !== 2 && + additionalDigits !== 1 && + additionalDigits !== 0 + ) { + throw new RangeError('additionalDigits must be 0, 1 or 2') + } + if ( + !( + typeof argument === 'string' || + Object.prototype.toString.call(argument) === '[object String]' + ) + ) { + return new Date(NaN) + } + var dateStrings = splitDateString(argument) + var date2 + if (dateStrings.date) { + var parseYearResult = parseYear(dateStrings.date, additionalDigits) + date2 = parseDate(parseYearResult.restDateString, parseYearResult.year) + } + if (isNaN(date2) || !date2) { + return new Date(NaN) + } + var timestamp = date2.getTime() + var time = 0 + var offset + if (dateStrings.time) { + time = parseTime(dateStrings.time) + if (isNaN(time) || time === null) { + return new Date(NaN) + } + } + if (dateStrings.timezone) { + offset = parseTimezone(dateStrings.timezone) + if (isNaN(offset)) { + return new Date(NaN) + } + } else { + var dirtyDate = new Date(timestamp + time) + var result = new Date(0) + result.setFullYear( + dirtyDate.getUTCFullYear(), + dirtyDate.getUTCMonth(), + dirtyDate.getUTCDate(), + ) + result.setHours( + dirtyDate.getUTCHours(), + dirtyDate.getUTCMinutes(), + dirtyDate.getUTCSeconds(), + dirtyDate.getUTCMilliseconds(), + ) + return result + } + return new Date(timestamp + time + offset) +} +function splitDateString(dateString) { + var dateStrings = {} + var array = dateString.split(patterns.dateTimeDelimiter) + var timeString + if (array.length > 2) { + return dateStrings + } + if (/:/.test(array[0])) { + dateStrings.date = null + timeString = array[0] + } else { + dateStrings.date = array[0] + timeString = array[1] + if (patterns.timeZoneDelimiter.test(dateStrings.date)) { + dateStrings.date = dateString.split(patterns.timeZoneDelimiter)[0] + timeString = dateString.substr(dateStrings.date.length, dateString.length) + } + } + if (timeString) { + var token = patterns.timezone.exec(timeString) + if (token) { + dateStrings.time = timeString.replace(token[1], '') + dateStrings.timezone = token[1] + } else { + dateStrings.time = timeString + } + } + return dateStrings +} +function parseYear(dateString, additionalDigits) { + var regex = new RegExp( + '^(?:(\\d{4}|[+-]\\d{' + + (4 + additionalDigits) + + '})|(\\d{2}|[+-]\\d{' + + (2 + additionalDigits) + + '})$)', + ) + var captures = dateString.match(regex) + if (!captures) + return { + year: null, + } + var year = captures[1] && parseInt(captures[1]) + var century = captures[2] && parseInt(captures[2]) + return { + year: century == null ? year : century * 100, + restDateString: dateString.slice((captures[1] || captures[2]).length), + } +} +function parseDate(dateString, year) { + if (year === null) return null + var captures = dateString.match(dateRegex) + if (!captures) return null + var isWeekDate = !!captures[4] + var dayOfYear = parseDateUnit(captures[1]) + var month = parseDateUnit(captures[2]) - 1 + var day = parseDateUnit(captures[3]) + var week = parseDateUnit(captures[4]) + var dayOfWeek = parseDateUnit(captures[5]) - 1 + if (isWeekDate) { + if (!validateWeekDate(year, week, dayOfWeek)) { + return new Date(NaN) + } + return dayOfISOWeekYear(year, week, dayOfWeek) + } else { + var date2 = new Date(0) + if ( + !validateDate(year, month, day) || + !validateDayOfYearDate(year, dayOfYear) + ) { + return new Date(NaN) + } + date2.setUTCFullYear(year, month, Math.max(dayOfYear, day)) + return date2 + } +} +function parseDateUnit(value) { + return value ? parseInt(value) : 1 +} +function parseTime(timeString) { + var captures = timeString.match(timeRegex) + if (!captures) return null + var hours = parseTimeUnit(captures[1]) + var minutes = parseTimeUnit(captures[2]) + var seconds = parseTimeUnit(captures[3]) + if (!validateTime(hours, minutes, seconds)) { + return NaN + } + return ( + hours * MILLISECONDS_IN_HOUR + + minutes * MILLISECONDS_IN_MINUTE + + seconds * 1e3 + ) +} +function parseTimeUnit(value) { + return (value && parseFloat(value.replace(',', '.'))) || 0 +} +function parseTimezone(timezoneString) { + if (timezoneString === 'Z') return 0 + var captures = timezoneString.match(timezoneRegex) + if (!captures) return 0 + var sign = captures[1] === '+' ? -1 : 1 + var hours = parseInt(captures[2]) + var minutes = (captures[3] && parseInt(captures[3])) || 0 + if (!validateTimezone(hours, minutes)) { + return NaN + } + return ( + sign * (hours * MILLISECONDS_IN_HOUR + minutes * MILLISECONDS_IN_MINUTE) + ) +} +function dayOfISOWeekYear(isoWeekYear, week, day) { + var date2 = new Date(0) + date2.setUTCFullYear(isoWeekYear, 0, 4) + var fourthOfJanuaryDay = date2.getUTCDay() || 7 + var diff = (week - 1) * 7 + day + 1 - fourthOfJanuaryDay + date2.setUTCDate(date2.getUTCDate() + diff) + return date2 +} +var daysInMonths = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] +function isLeapYearIndex(year) { + return year % 400 === 0 || (year % 4 === 0 && year % 100) +} +function validateDate(year, month, date2) { + return ( + month >= 0 && + month <= 11 && + date2 >= 1 && + date2 <= (daysInMonths[month] || (isLeapYearIndex(year) ? 29 : 28)) + ) +} +function validateDayOfYearDate(year, dayOfYear) { + return dayOfYear >= 1 && dayOfYear <= (isLeapYearIndex(year) ? 366 : 365) +} +function validateWeekDate(_year, week, day) { + return week >= 1 && week <= 53 && day >= 0 && day <= 6 +} +function validateTime(hours, minutes, seconds) { + if (hours === 24) { + return minutes === 0 && seconds === 0 + } + return ( + seconds >= 0 && + seconds < 60 && + minutes >= 0 && + minutes < 60 && + hours >= 0 && + hours < 25 + ) +} +function validateTimezone(_hours, minutes) { + return minutes >= 0 && minutes <= 59 +} + +// node_modules/date-fns/esm/isValid/index.js +init_define_process() + +// node_modules/date-fns/esm/toDate/index.js +init_define_process() +function toDate(argument) { + requiredArgs(1, arguments) + var argStr = Object.prototype.toString.call(argument) + if ( + argument instanceof Date || + (typeof argument === 'object' && argStr === '[object Date]') + ) { + return new Date(argument.getTime()) + } else if (typeof argument === 'number' || argStr === '[object Number]') { + return new Date(argument) + } else { + if ( + (typeof argument === 'string' || argStr === '[object String]') && + typeof console !== 'undefined' + ) { + console.warn( + "Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule", + ) + console.warn(new Error().stack) + } + return new Date(NaN) + } +} + +// node_modules/date-fns/esm/isValid/index.js +function isValid(dirtyDate) { + requiredArgs(1, arguments) + var date2 = toDate(dirtyDate) + return !isNaN(date2) +} + +// utils/string.js +var rfc3339ish = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(.\d+)?$/ +var digitExpression = /^-?\d+(?:\.\d+)?(?:[Ee]-?\d+)?$/ +var stringIsEmpty = function (string) { + return !string.trim() +} +var getCharacterCount = function (string, characterToCount) { + return string.split(characterToCount).length - 1 +} +var isClockFaceTime = function (timeString) { + return ( + import_date_and_time.default.isValid(timeString, 'HH:mm') || + import_date_and_time.default.isValid(timeString, 'HH:mm:ss') + ) +} +var isDateTime = function (dateTimeString) { + return isValid(parseISO(dateTimeString)) && rfc3339ish.test(dateTimeString) +} +var isNumber = function (numericString) { + return digitExpression.test(numericString) +} +var stringTemplate = function (strings, ...keys) { + return function (...values) { + const dict = values[values.length - 1] ?? {} + const result = [strings[0]] + keys.forEach((key, i) => { + const value = Number.isInteger(key) ? values[key] : dict[key] + result.push(value, strings[i + 1]) + }) + return result.join('') + } +} + +// common/issues/data.js +var data_default = { + parentheses: { + hedCode: 'HED_PARENTHESES_MISMATCH', + level: 'error', + message: stringTemplate`Number of opening and closing parentheses are unequal. ${'opening'} opening parentheses. ${'closing'} closing parentheses.`, + }, + unopenedParentheses: { + hedCode: 'HED_PARENTHESES_MISMATCH', + level: 'error', + message: stringTemplate`Closing parenthesis at index ${'index'} of string "${'string'}" does not have a corresponding opening parenthesis.`, + }, + unclosedParentheses: { + hedCode: 'HED_PARENTHESES_MISMATCH', + level: 'error', + message: stringTemplate`Opening parenthesis at index ${'index'} of string "${'string'}" does not have a corresponding closing parenthesis.`, + }, + extraDelimiter: { + hedCode: 'HED_TAG_EMPTY', + level: 'error', + message: stringTemplate`Extra delimiter "${'character'}" at index ${'index'} of string "${'string'}"`, + }, + commaMissing: { + hedCode: 'HED_COMMA MISSING', + level: 'error', + message: stringTemplate`Comma missing after - "${'tag'}"`, + }, + duplicateTag: { + hedCode: 'HED_TAG_REPEATED', + level: 'error', + message: stringTemplate`Duplicate tag at indices (${0}, ${1}) - "${'tag'}"`, + }, + invalidCharacter: { + hedCode: 'HED_CHARACTER_INVALID', + level: 'error', + message: stringTemplate`Invalid character "${'character'}" at index ${'index'} of string "${'string'}"`, + }, + invalidTag: { + hedCode: 'HED_TAG_INVALID', + level: 'error', + message: stringTemplate`Invalid tag - "${'tag'}"`, + }, + extraCommaOrInvalid: { + hedCode: 'HED_TAG_INVALID', + level: 'error', + message: stringTemplate`Either "${'previousTag'}" contains a comma when it should not or "${'tag'}" is not a valid tag`, + }, + multipleUniqueTags: { + hedCode: 'HED_TAG_NOT_UNIQUE', + level: 'error', + message: stringTemplate`Multiple unique tags with prefix - "${'tag'}"`, + }, + childRequired: { + hedCode: 'HED_TAG_REQUIRES_CHILD', + level: 'error', + message: stringTemplate`Descendant tag required - "${'tag'}"`, + }, + requiredPrefixMissing: { + hedCode: 'HED_REQUIRED_TAG_MISSING', + level: 'warning', + message: stringTemplate`Tag with prefix "${'tagPrefix'}" is required`, + }, + unitClassDefaultUsed: { + hedCode: 'HED_UNITS_MISSING', + level: 'warning', + message: stringTemplate`No unit specified. Using "${'defaultUnit'}" as the default - "${'tag'}"`, + }, + unitClassInvalidUnit: { + hedCode: 'HED_UNITS_INVALID', + level: 'error', + message: stringTemplate`Invalid unit - "${'tag'}" - valid units are "${'unitClassUnits'}"`, + }, + invalidValue: { + hedCode: 'HED_VALUE_INVALID', + level: 'error', + message: stringTemplate`Invalid placeholder value for tag "${'tag'}"`, + }, + invalidPlaceholder: { + hedCode: 'HED_PLACEHOLDER_INVALID', + level: 'error', + message: stringTemplate`Invalid placeholder - "${'tag'}"`, + }, + missingPlaceholder: { + hedCode: 'HED_PLACEHOLDER_INVALID', + level: 'error', + message: stringTemplate`HED value string "${'string'}" is missing a required placeholder.`, + }, + extension: { + hedCode: 'HED_TAG_EXTENDED', + level: 'warning', + message: stringTemplate`Tag extension found - "${'tag'}"`, + }, + invalidPlaceholderInDefinition: { + hedCode: 'DEFINITION_INVALID', + level: 'error', + message: stringTemplate`Invalid placeholder in definition - "${'definition'}"`, + }, + nestedDefinition: { + hedCode: 'DEFINITION_INVALID', + level: 'error', + message: stringTemplate`Illegal nested definition in tag group for definition "${'definition'}"`, + }, + missingDefinition: { + hedCode: 'DEF_INVALID', + level: 'error', + message: stringTemplate`Def tag found for definition name "${'definition'}" does not correspond to an existing definition`, + }, + duplicateDefinition: { + hedCode: 'DEFINITION_INVALID', + level: 'error', + message: stringTemplate`Definition "${'definition'}" is declared multiple times. This instance's tag group is "${'tagGroup'}"`, + }, + multipleTagGroupsInDefinition: { + hedCode: 'DEFINITION_INVALID', + level: 'error', + message: stringTemplate`Multiple inner tag groups found in definition "${'definition'}"`, + }, + illegalDefinitionGroupTag: { + hedCode: 'DEFINITION_INVALID', + level: 'error', + message: stringTemplate`Illegal tag "${'tag'}" in tag group for definition "${'definition'}"`, + }, + inactiveOnset: { + hedCode: 'ONSET_OFFSET_ERROR', + level: 'error', + message: stringTemplate`Offset found for inactive onset with definition name and value "${'definition'}"`, + }, + temporalWithoutInnerGroup: { + hedCode: 'ONSET_OFFSET_ERROR', + level: 'error', + message: stringTemplate`Onset or offset found without an included inner top-level tag group. This instance's tag group is "${'tagGroup'}"`, + }, + temporalWithMultipleDefinitions: { + hedCode: 'ONSET_OFFSET_ERROR', + level: 'error', + message: stringTemplate`Onset or offset found with multiple included definitions. This instance's tag group is "${'tagGroup'}"`, + }, + temporalWithoutDefinition: { + hedCode: 'ONSET_OFFSET_ERROR', + level: 'error', + message: stringTemplate`Onset or offset found without an included definition. This instance's tag group is "${'tagGroup'}"`, + }, + extraTagsInTemporal: { + hedCode: 'ONSET_OFFSET_ERROR', + level: 'error', + message: stringTemplate`Extra non-definition top-level tags or tag groups found in onset or offset group with definition "${'definition'}"`, + }, + duplicateTemporal: { + hedCode: 'ONSET_OFFSET_ERROR', + level: 'error', + message: stringTemplate`HED event string "${'string'}" has onset/offset tags with duplicated definition "${'definition'}"`, + }, + invalidTopLevelTagGroupTag: { + hedCode: 'TAG_GROUP_ERROR', + level: 'error', + message: stringTemplate`Tag "${'tag'}" is only allowed inside of a top-level tag group.`, + }, + multipleTopLevelTagGroupTags: { + hedCode: 'TAG_GROUP_ERROR', + level: 'error', + message: stringTemplate`Tag "${'tag'}" found in top-level tag group where "${'otherTag'}" was already defined.`, + }, + invalidTopLevelTag: { + hedCode: 'TAG_GROUP_ERROR', + level: 'error', + message: stringTemplate`Tag "${'tag'}" is only allowed inside of a tag group.`, + }, + invalidParentNode: { + hedCode: 'HED_VALUE_IS_NODE', + level: 'error', + message: stringTemplate`"${'tag'}" appears as "${'parentTag'}" and cannot be used as an extension. Indices (${0}, ${1}).`, + }, + emptyTagFound: { + hedCode: 'HED_NODE_NAME_EMPTY', + level: 'error', + message: stringTemplate`Empty tag cannot be converted.`, + }, + duplicateTagsInSchema: { + hedCode: 'HED_GENERIC_ERROR', + level: 'error', + message: stringTemplate`Source HED schema is invalid as it contains duplicate tags.`, + }, + invalidSchemaNickname: { + hedCode: 'HED_SCHEMA_LOAD_FAILED', + level: 'error', + message: stringTemplate`The prefix nickname "${'nickname'}" in specification "${'spec'}" is duplicated or invalid.`, + }, + invalidSchemaSpecification: { + hedCode: 'HED_SCHEMA_LOAD_FAILED', + level: 'error', + message: stringTemplate`The supplied schema specification is invalid. Specification: ${'spec'}`, + }, + requestedSchemaLoadFailedFallbackUsed: { + hedCode: 'HED_SCHEMA_LOAD_FAILED', + level: 'warning', + message: stringTemplate`The requested schema failed to load. The fallback schema bundled with this validator will be used instead. Specification: ${'spec'}`, + }, + requestedSchemaLoadFailedNoFallbackUsed: { + hedCode: 'HED_SCHEMA_LOAD_FAILED', + level: 'error', + message: stringTemplate`The requested schema failed to load. The validator did not attempt to load a fallback schema. Specification: ${'spec'}`, + }, + fallbackSchemaLoadFailed: { + hedCode: 'HED_SCHEMA_LOAD_FAILED', + level: 'error', + message: stringTemplate`The fallback schema bundled with this validator failed to load. No HED validation was performed.`, + }, + bundledSchemaLoadFailed: { + hedCode: 'HED_SCHEMA_LOAD_FAILED', + level: 'error', + message: stringTemplate`Could not load HED schema for spec "${'spec'}" from bundled copy - "${'error'}".`, + }, + localSchemaLoadFailed: { + hedCode: 'HED_SCHEMA_LOAD_FAILED', + level: 'error', + message: stringTemplate`Could not load HED schema from path "${'path'}" - "${'error'}".`, + }, + remoteSchemaLoadFailed: { + hedCode: 'HED_SCHEMA_LOAD_FAILED', + level: 'error', + message: stringTemplate`Could not load HED schema "${'spec'}" from remote repository - "${'error'}".`, + }, + unmatchedBaseSchema: { + hedCode: 'HED_LIBRARY_UNMATCHED', + level: 'error', + message: stringTemplate`Tag "${'tag'}" is declared to use a base schema in the dataset's schema listing, but no such schema was defined.`, + }, + unmatchedLibrarySchema: { + hedCode: 'HED_LIBRARY_UNMATCHED', + level: 'error', + message: stringTemplate`Tag "${'tag'}" is declared to use a library schema nicknamed "${'library'}" in the dataset's schema listing, but no such schema was found.`, + }, + genericError: { + hedCode: 'HED_GENERIC_ERROR', + level: 'error', + message: stringTemplate`Unknown HED error "${'internalCode'}" - parameters: "${'parameters'}".`, + }, +} + +// common/issues/issues.js +var IssueError = class extends Error { + constructor(issue, ...params) { + super(...params) + if (Error.captureStackTrace) { + Error.captureStackTrace(this, IssueError) + } + this.name = 'IssueError' + this.issue = issue + this.message = issue.message + Object.setPrototypeOf(this, IssueError.prototype) + } +} +var Issue = class { + internalCode + code + hedCode + level + message + constructor(internalCode, hedCode, level, message) { + this.internalCode = internalCode + this.code = internalCode + this.hedCode = hedCode + this.level = level + this.message = `${level.toUpperCase()}: [${hedCode}] ${message}` + } +} +var generateIssue = function (internalCode, parameters) { + const issueCodeData = data_default[internalCode] || data_default.genericError + const { hedCode, level, message } = issueCodeData + const bounds = parameters.bounds ?? [] + if (issueCodeData === data_default.genericError) { + parameters.internalCode = internalCode + parameters.parameters = 'Issue parameters: ' + JSON.stringify(parameters) + } + const parsedMessage = message(...bounds, parameters) + return new Issue(internalCode, hedCode, level, parsedMessage) +} + +// converter/issues.js +function issues_default(code, hedString, parameters = {}, bounds = []) { + parameters.tag = hedString.slice(bounds[0], bounds[1]) + parameters.bounds = bounds + const issue = generateIssue(code, parameters) + issue.sourceString = hedString + return issue +} + +// converter/splitHedString.js +init_define_process() +var tagDelimiters = /* @__PURE__ */ new Set([',', '(', ')', '~']) +function splitHedString(hedString) { + const resultPositions = [] + let currentSpacing = 0 + let insideDelimiter = true + let startPosition = -1 + let lastEndPosition = 0 + for (let i = 0; i < hedString.length; i++) { + const character = hedString.charAt(i) + if (character === ' ') { + currentSpacing++ + continue + } + if (tagDelimiters.has(character)) { + if (!insideDelimiter) { + insideDelimiter = true + if (startPosition >= 0) { + lastEndPosition = i - currentSpacing + resultPositions.push([true, [startPosition, lastEndPosition]]) + currentSpacing = 0 + startPosition = -1 + } + } + continue + } + if (insideDelimiter && lastEndPosition >= 0) { + if (lastEndPosition !== i) { + resultPositions.push([false, [lastEndPosition, i]]) + } + lastEndPosition = -1 + } + currentSpacing = 0 + insideDelimiter = false + if (startPosition < 0) { + startPosition = i + } + } + if (lastEndPosition >= 0 && hedString.length !== lastEndPosition) { + resultPositions.push([false, [lastEndPosition, hedString.length]]) + } + if (startPosition >= 0) { + resultPositions.push([ + true, + [startPosition, hedString.length - currentSpacing], + ]) + if (currentSpacing > 0) { + resultPositions.push([ + false, + [hedString.length - currentSpacing, hedString.length], + ]) + } + } + return resultPositions +} + +// converter/converter.js +var doubleSlashPattern = /[\s/]*\/+[\s/]*/g +var removeSlashesAndSpaces = function (hedString) { + return hedString.replace(doubleSlashPattern, '/') +} +var convertTagToLong = function (schema, hedTag, hedString, offset) { + const mapping = schema.mapping + if (hedTag.startsWith('/')) { + hedTag = hedTag.slice(1) + } + if (hedTag.endsWith('/')) { + hedTag = hedTag.slice(0, -1) + } + const cleanedTag = hedTag.toLowerCase() + const splitTag = cleanedTag.split('/') + let foundTagEntry = null + let takesValueTag = false + let endingIndex = 0 + let foundUnknownExtension = false + let foundEndingIndex = 0 + const generateParentNodeIssue = (tagEntries, startingIndex, endingIndex2) => { + return [ + hedTag, + [ + issues_default( + 'invalidParentNode', + hedString, + { + parentTag: Array.isArray(tagEntries) + ? tagEntries.map((tagEntry) => { + return tagEntry.longTag + }) + : tagEntries.longTag, + }, + [startingIndex + offset, endingIndex2 + offset], + ), + ], + ] + } + for (const tag of splitTag) { + if (endingIndex !== 0) { + endingIndex++ + } + const startingIndex = endingIndex + endingIndex += tag.length + const tagEntries = asArray(mapping.mappingData.get(tag)) + if (foundUnknownExtension) { + if (mapping.mappingData.has(tag)) { + return generateParentNodeIssue(tagEntries, startingIndex, endingIndex) + } else { + continue + } + } + if (!mapping.mappingData.has(tag)) { + if (foundTagEntry === null) { + return [ + hedTag, + [ + issues_default('invalidTag', hedString, {}, [ + startingIndex + offset, + endingIndex + offset, + ]), + ], + ] + } + foundUnknownExtension = true + continue + } + let tagFound = false + for (const tagEntry of tagEntries) { + const tagString = tagEntry.longFormattedTag + const mainHedPortion = cleanedTag.slice(0, endingIndex) + if (tagString.endsWith(mainHedPortion)) { + tagFound = true + foundEndingIndex = endingIndex + foundTagEntry = tagEntry + if (tagEntry.takesValue) { + takesValueTag = true + } + break + } + } + if (!tagFound && !takesValueTag) { + return generateParentNodeIssue(tagEntries, startingIndex, endingIndex) + } + } + const remainder = hedTag.slice(foundEndingIndex) + const longTagString = foundTagEntry.longTag + remainder + return [longTagString, []] +} +var convertTagToShort = function (schema, hedTag, hedString, offset) { + const mapping = schema.mapping + if (hedTag.startsWith('/')) { + hedTag = hedTag.slice(1) + } + if (hedTag.endsWith('/')) { + hedTag = hedTag.slice(0, -1) + } + const cleanedTag = hedTag.toLowerCase() + const splitTag = cleanedTag.split('/') + splitTag.reverse() + let foundTagEntry = null + let index = hedTag.length + let lastFoundIndex = index + for (const tag of splitTag) { + if (mapping.mappingData.has(tag)) { + foundTagEntry = mapping.mappingData.get(tag) + lastFoundIndex = index + index -= tag.length + break + } + lastFoundIndex = index + index -= tag.length + if (index !== 0) { + index-- + } + } + if (foundTagEntry === null) { + return [ + hedTag, + [ + issues_default('invalidTag', hedString, {}, [ + index + offset, + lastFoundIndex + offset, + ]), + ], + ] + } + const mainHedPortion = cleanedTag.slice(0, lastFoundIndex) + const tagString = foundTagEntry.longFormattedTag + if (!tagString.endsWith(mainHedPortion)) { + return [ + hedTag, + [ + issues_default( + 'invalidParentNode', + hedString, + { parentTag: foundTagEntry.longTag }, + [index + offset, lastFoundIndex + offset], + ), + ], + ] + } + const remainder = hedTag.slice(lastFoundIndex) + const shortTagString = foundTagEntry.shortTag + remainder + return [shortTagString, []] +} +var convertPartialHedStringToLong = function ( + schema, + partialHedString, + fullHedString, + offset, +) { + let issues = [] + const hedString = removeSlashesAndSpaces(partialHedString) + if (hedString === '') { + issues.push(issues_default('emptyTagFound', '')) + return [hedString, issues] + } + const hedTags = splitHedString(hedString) + let finalString = '' + for (const [isHedTag, [startPosition, endPosition]] of hedTags) { + const tag = hedString.slice(startPosition, endPosition) + if (isHedTag) { + const [shortTagString, singleError] = convertTagToLong( + schema, + tag, + fullHedString, + startPosition + offset, + ) + issues = issues.concat(singleError) + finalString += shortTagString + } else { + finalString += tag + } + } + return [finalString, issues] +} +var convertHedString = function (schema, hedString, conversionFn) { + let issues = [] + if (!schema.mapping.hasNoDuplicates) { + issues.push(issues_default('duplicateTagsInSchema', '')) + return [hedString, issues] + } + hedString = removeSlashesAndSpaces(hedString) + if (hedString === '') { + issues.push(issues_default('emptyTagFound', '')) + return [hedString, issues] + } + const hedTags = splitHedString(hedString) + let finalString = '' + for (const [isHedTag, [startPosition, endPosition]] of hedTags) { + const tag = hedString.slice(startPosition, endPosition) + if (isHedTag) { + const [shortTagString, singleError] = conversionFn( + schema, + tag, + hedString, + startPosition, + ) + issues = issues.concat(singleError) + finalString += shortTagString + } else { + finalString += tag + } + } + return [finalString, issues] +} +var convertHedStringToLong = function (schemas, hedString) { + return convertHedString(schemas.baseSchema, hedString, convertTagToLong) +} +var convertHedStringToShort = function (schemas, hedString) { + return convertHedString(schemas.baseSchema, hedString, convertTagToShort) +} + +// converter/schema.js +init_define_process() + +// utils/xpath.js +init_define_process() +var childToParent = { + unitClass: 'unitClasses', + unitModifier: 'unitModifiers', + unitClassDefinition: 'unitClassDefinitions', + unitModifierDefinition: 'unitModifierDefinitions', + valueClassDefinition: 'valueClassDefinitions', + schemaAttributeDefinition: 'schemaAttributeDefinitions', + propertyDefinition: 'propertyDefinitions', +} +var find = function (element, query) { + const { elementName, attributeName } = parseXPath(query) + if (elementName === 'node') { + const parentElement = element.schema?.[0] ?? element + const nodeList = parentElement.node ?? [] + return nodeList.flatMap((child) => + search(child, elementName, attributeName), + ) + } + return element?.[childToParent[elementName]]?.[0][elementName] ?? [] +} +var parseXPath = function (query) { + const nodeQuery = /^\/\/(\w+)$/ + const attributeQuery = /^\/\/(\w+)\[@(\w+)]$/ + let elementName, attributeName + const attributeMatch = query.match(attributeQuery) + if (attributeMatch) { + ;[, elementName, attributeName] = attributeMatch + } else { + const nodeMatch = query.match(nodeQuery) + if (nodeMatch) { + ;[, elementName] = nodeMatch + } else { + return {} + } + } + return { elementName, attributeName } +} +var search = function (element, elementName, attributeName) { + let result = [] + if ( + attributeName === void 0 || + ('$' in element && attributeName in element.$) + ) { + result.push(element) + } + if (elementName in element) { + result = result.concat( + element[elementName].flatMap((element2) => { + return search(element2, elementName, attributeName) + }), + ) + } + return result +} + +// common/schema/loader.js +init_define_process() +var import_xml2js = __toESM(require_xml2js()) + +// utils/files.js +init_define_process() +var import_fs = __toESM(require_fs()) +var import_then_request = __toESM(require_browser()) +var readFile = function (fileName) { + return new Promise((resolve) => { + import_fs.default.readFile(fileName, 'utf8', (err, data) => { + define_process_default.nextTick(() => resolve(data)) + }) + }) +} +var readHTTPSFile = function (url) { + return (0, import_then_request.default)('GET', url).then((res) => + res.getBody(), + ) +} + +// common/schema/config.js +init_define_process() +var localSchemaList = /* @__PURE__ */ new Map([ + ['HED8.0.0', require_HED8_0_0()], + ['HED8.1.0', require_HED8_1_0()], + ['HED_score_1.0.0', require_HED_score_1_0_0()], + ['HED_testlib_1.0.2', require_HED_testlib_1_0_2()], +]) +var fallbackFilePath = 'data/HED8.0.0.xml' + +// common/schema/loader.js +var loadSchema = function ( + schemaDef = null, + useFallback = true, + reportNoFallbackError = true, +) { + const schemaPromise = loadPromise(schemaDef) + if (schemaPromise === null) { + return Promise.reject([ + generateIssue('invalidSchemaSpecification', { + spec: JSON.stringify(schemaDef), + }), + ]) + } + return schemaPromise + .then((xmlData) => [xmlData, []]) + .catch((issues) => { + if (useFallback) { + issues.push( + generateIssue('requestedSchemaLoadFailedFallbackUsed', { + spec: JSON.stringify(schemaDef), + }), + ) + return loadLocalSchema(fallbackFilePath) + .then((xmlData) => [xmlData, issues]) + .catch((fallbackIssues) => { + fallbackIssues.push(generateIssue('fallbackSchemaLoadFailed', {})) + return Promise.reject(issues.concat(fallbackIssues)) + }) + } else { + if (reportNoFallbackError) { + issues.push( + generateIssue('requestedSchemaLoadFailedNoFallbackUsed', { + spec: JSON.stringify(schemaDef), + }), + ) + } + return Promise.reject(issues) + } + }) +} +var loadPromise = function (schemaDef) { + if (schemaDef === null) { + return null + } else if (schemaDef.path) { + return loadLocalSchema(schemaDef.path) + } else { + if (localSchemaList.has(schemaDef.localName)) { + return loadBundledSchema(schemaDef) + } else { + return loadRemoteSchema(schemaDef) + } + } +} +var loadRemoteSchema = function (schemaDef) { + let url + if (schemaDef.library) { + url = `https://raw.githubusercontent.com/hed-standard/hed-schemas/main/library_schemas/${schemaDef.library}/hedxml/HED_${schemaDef.library}_${schemaDef.version}.xml` + } else { + url = `https://raw.githubusercontent.com/hed-standard/hed-schemas/main/standard_schema/hedxml/HED${schemaDef.version}.xml` + } + return loadSchemaFile(readHTTPSFile(url), 'remoteSchemaLoadFailed', { + spec: JSON.stringify(schemaDef), + }) +} +var loadLocalSchema = function (path) { + return loadSchemaFile(readFile(path), 'localSchemaLoadFailed', { path }) +} +var loadBundledSchema = function (schemaDef) { + return parseSchemaXML(localSchemaList.get(schemaDef.localName)).catch( + (error) => { + const issueArgs = { spec: schemaDef, error: error.message } + return Promise.reject([ + generateIssue('bundledSchemaLoadFailed', issueArgs), + ]) + }, + ) +} +var loadSchemaFile = function (xmlDataPromise, issueCode, issueArgs) { + return xmlDataPromise.then(parseSchemaXML).catch((error) => { + issueArgs.error = error.message + return Promise.reject([generateIssue(issueCode, issueArgs)]) + }) +} +var parseSchemaXML = function (data) { + return import_xml2js.default.parseStringPromise(data, { + explicitCharkey: true, + }) +} + +// common/schema/types.js +init_define_process() + +// utils/hedData.js +init_define_process() +var import_lt = __toESM(require_lt()) + +// validator/parser/parsedHedTag.js +init_define_process() + +// utils/hedStrings.js +init_define_process() +var import_pluralize = __toESM(require_pluralize()) +import_pluralize.default.addUncountableRule('hertz') +var unitPrefixType = 'unitPrefix' +var unitSymbolType = 'unitSymbol' +var SIUnitKey = 'SIUnit' +var SIUnitModifierKey = 'SIUnitModifier' +var SIUnitSymbolModifierKey = 'SIUnitSymbolModifier' +var replaceTagNameWithPound = function (formattedTag) { + const lastTagSlashIndex = formattedTag.lastIndexOf('/') + if (lastTagSlashIndex !== -1) { + return formattedTag.substring(0, lastTagSlashIndex) + '/#' + } else { + return '#' + } +} +var getTagSlashIndices = function (tag) { + const indices = [] + let i = -1 + while ((i = tag.indexOf('/', i + 1)) >= 0) { + indices.push(i) + } + return indices +} +var getTagName = function (tag, character = '/') { + const lastSlashIndex = tag.lastIndexOf(character) + if (lastSlashIndex === -1) { + return tag + } else { + return tag.substring(lastSlashIndex + 1) + } +} +var getParentTag = function (tag, character = '/') { + const lastSlashIndex = tag.lastIndexOf(character) + if (lastSlashIndex === -1) { + return tag + } else { + return tag.substring(0, lastSlashIndex) + } +} +var openingGroupCharacter = '(' +var closingGroupCharacter = ')' +var hedStringIsAGroup = function (hedString) { + const trimmedHedString = hedString.trim() + return ( + trimmedHedString.startsWith(openingGroupCharacter) && + trimmedHedString.endsWith(closingGroupCharacter) + ) +} +var isPrefixUnit = function (unit, hedSchemaAttributes) { + if (unitPrefixType in hedSchemaAttributes.unitAttributes) { + return hedSchemaAttributes.unitAttributes[unitPrefixType][unit] || false + } else { + return unit === '$' + } +} +var getValidDerivativeUnits = function (unit, hedSchemaAttributes) { + const pluralUnits = [unit] + const isUnitSymbol = + hedSchemaAttributes.unitAttributes[unitSymbolType][unit] !== void 0 + if (hedSchemaAttributes.hasUnitModifiers && !isUnitSymbol) { + pluralUnits.push(import_pluralize.default.plural(unit)) + } + const isSIUnit = + hedSchemaAttributes.unitAttributes[SIUnitKey][unit] !== void 0 + if (isSIUnit && hedSchemaAttributes.hasUnitModifiers) { + const derivativeUnits = [].concat(pluralUnits) + const modifierKey = isUnitSymbol + ? SIUnitSymbolModifierKey + : SIUnitModifierKey + for (const unitModifier in hedSchemaAttributes.unitModifiers[modifierKey]) { + for (const plural of pluralUnits) { + derivativeUnits.push(unitModifier + plural) + } + } + return derivativeUnits + } else { + return pluralUnits + } +} +var validateUnits = function ( + originalTagUnitValue, + tagUnitClassUnits, + hedSchemaAttributes, +) { + const validUnits = getAllUnits(hedSchemaAttributes) + validUnits.sort((first, second) => { + return second.length - first.length + }) + let actualUnit = getTagName(originalTagUnitValue, ' ') + let noUnitFound = false + if (actualUnit === originalTagUnitValue) { + actualUnit = '' + noUnitFound = true + } + let foundUnit, foundWrongCaseUnit, strippedValue + for (const unit of validUnits) { + const isUnitSymbol = + hedSchemaAttributes.unitAttributes[unitSymbolType][unit] !== void 0 + const derivativeUnits = getValidDerivativeUnits(unit, hedSchemaAttributes) + for (const derivativeUnit of derivativeUnits) { + if ( + isPrefixUnit(unit, hedSchemaAttributes) && + originalTagUnitValue.startsWith(derivativeUnit) + ) { + foundUnit = true + noUnitFound = false + strippedValue = originalTagUnitValue + .substring(derivativeUnit.length) + .trim() + } + if (actualUnit === derivativeUnit) { + foundUnit = true + strippedValue = getParentTag(originalTagUnitValue, ' ') + } else if (actualUnit.toLowerCase() === derivativeUnit.toLowerCase()) { + if (isUnitSymbol) { + foundWrongCaseUnit = true + } else { + foundUnit = true + } + strippedValue = getParentTag(originalTagUnitValue, ' ') + } + if (foundUnit) { + const unitIsValid = tagUnitClassUnits.includes(unit) + return [true, unitIsValid, strippedValue] + } + } + if (foundWrongCaseUnit) { + return [true, false, strippedValue] + } + } + return [!noUnitFound, false, originalTagUnitValue] +} +var getAllUnits = function (hedSchemaAttributes) { + const units = [] + for (const unitClass in hedSchemaAttributes.unitClasses) { + const unitClassUnits = hedSchemaAttributes.unitClasses[unitClass] + Array.prototype.push.apply(units, unitClassUnits) + } + return units +} + +// validator/parser/parsedHedSubstring.js +init_define_process() + +// utils/types.js +init_define_process() +var MemoizerMixin = (Base) => { + return class extends Base { + constructor(...args) { + super(...args) + this._memoizedProperties = /* @__PURE__ */ new Map() + } + _memoize(propertyName, valueComputer) { + if (!propertyName) { + throw new Error('Invalid property name in Memoizer subclass.') + } + if (this._memoizedProperties.has(propertyName)) { + return this._memoizedProperties.get(propertyName) + } + const value = valueComputer() + this._memoizedProperties.set(propertyName, value) + return value + } + } +} +var Memoizer = class extends MemoizerMixin(Object) {} + +// validator/parser/parsedHedSubstring.js +var ParsedHedSubstring = class extends Memoizer { + originalTag + originalBounds + constructor(originalTag, originalBounds) { + super() + this.originalTag = originalTag + this.originalBounds = originalBounds + } +} + +// validator/parser/parsedHedTag.js +var ParsedHedTag = class extends ParsedHedSubstring { + formattedTag + canonicalTag + conversionIssues + schema + constructor( + originalTag, + hedString, + originalBounds, + hedSchemas, + schemaName = '', + ) { + super(originalTag, originalBounds) + this._convertTag(hedString, hedSchemas, schemaName) + this.formattedTag = this._formatTag() + } + _convertTag(hedString, hedSchemas, schemaName) { + if (hedSchemas.isSyntaxOnly) { + this.canonicalTag = this.originalTag + this.conversionIssues = [] + return + } + this.schema = hedSchemas.getSchema(schemaName) + if (this.schema === void 0) { + if (schemaName !== '') { + this.conversionIssues = [ + generateIssue('unmatchedLibrarySchema', { + tag: this.originalTag, + library: schemaName, + }), + ] + } else { + this.conversionIssues = [ + generateIssue('unmatchedBaseSchema', { + tag: this.originalTag, + }), + ] + } + this.canonicalTag = this.originalTag + return + } + const [canonicalTag, conversionIssues] = convertPartialHedStringToLong( + this.schema, + this.originalTag, + hedString, + this.originalBounds[0], + ) + this.canonicalTag = canonicalTag + this.conversionIssues = conversionIssues + } + _formatTag() { + this.originalTag = this.originalTag.replace('\n', ' ') + let hedTagString = this.canonicalTag.trim() + if (hedTagString.startsWith('"')) { + hedTagString = hedTagString.slice(1) + } + if (hedTagString.endsWith('"')) { + hedTagString = hedTagString.slice(0, -1) + } + if (hedTagString.startsWith('/')) { + hedTagString = hedTagString.slice(1) + } + if (hedTagString.endsWith('/')) { + hedTagString = hedTagString.slice(0, -1) + } + return hedTagString.toLowerCase() + } + hasAttribute(attribute) { + return this.schema.tagHasAttribute(this.formattedTag, attribute) + } + parentHasAttribute(attribute) { + return this.schema.tagHasAttribute(this.parentFormattedTag, attribute) + } + static getTagName(tagString) { + const lastSlashIndex = tagString.lastIndexOf('/') + if (lastSlashIndex === -1) { + return tagString + } else { + return tagString.substring(lastSlashIndex + 1) + } + } + get canonicalTagName() { + return this._memoize('canonicalTagName', () => { + return ParsedHedTag.getTagName(this.canonicalTag) + }) + } + get formattedTagName() { + return this._memoize('formattedTagName', () => { + return ParsedHedTag.getTagName(this.formattedTag) + }) + } + get originalTagName() { + return this._memoize('originalTagName', () => { + return ParsedHedTag.getTagName(this.originalTag) + }) + } + static getParentTag(tagString) { + const lastSlashIndex = tagString.lastIndexOf('/') + if (lastSlashIndex === -1) { + return tagString + } else { + return tagString.substring(0, lastSlashIndex) + } + } + get parentCanonicalTag() { + return this._memoize('parentCanonicalTag', () => { + return ParsedHedTag.getParentTag(this.canonicalTag) + }) + } + get parentFormattedTag() { + return this._memoize('parentFormattedTag', () => { + return ParsedHedTag.getParentTag(this.formattedTag) + }) + } + get parentOriginalTag() { + return this._memoize('parentOriginalTag', () => { + return ParsedHedTag.getParentTag(this.originalTag) + }) + } + static *ancestorIterator(tagString) { + while (tagString.lastIndexOf('/') >= 0) { + yield tagString + tagString = ParsedHedTag.getParentTag(tagString) + } + yield tagString + } + isDescendantOf(parent) { + if (parent instanceof ParsedHedTag) { + parent = parent.formattedTag + } + for (const ancestor of ParsedHedTag.ancestorIterator(this.formattedTag)) { + if (ancestor === parent) { + return true + } + } + return false + } + get allowsExtensions() { + return this._memoize('allowsExtensions', () => { + const extensionAllowedAttribute2 = 'extensionAllowed' + if (this.hasAttribute(extensionAllowedAttribute2)) { + return true + } + const tagSlashIndices = getTagSlashIndices(this.formattedTag) + for (const tagSlashIndex of tagSlashIndices) { + const tagSubstring = this.formattedTag.slice(0, tagSlashIndex) + if ( + this.schema.tagHasAttribute(tagSubstring, extensionAllowedAttribute2) + ) { + return true + } + } + return false + }) + } + equivalent(other) { + return ( + other instanceof ParsedHedTag && + this.formattedTag === other.formattedTag && + this.schema === other.schema + ) + } +} +var ParsedHed2Tag = class extends ParsedHedTag { + get existsInSchema() { + return this._memoize('existsInSchema', () => { + return this.schema.attributes.tags.includes(this.formattedTag) + }) + } + get takesValueFormattedTag() { + return this._memoize('takesValueFormattedTag', () => { + return replaceTagNameWithPound(this.formattedTag) + }) + } + get takesValue() { + return this._memoize('takesValue', () => { + return this.schema.tagHasAttribute( + this.takesValueFormattedTag, + 'takesValue', + ) + }) + } + get hasUnitClass() { + return this._memoize('hasUnitClass', () => { + if (!this.schema.attributes.hasUnitClasses) { + return false + } + return ( + this.takesValueFormattedTag in this.schema.attributes.tagUnitClasses + ) + }) + } + get unitClasses() { + return this._memoize('unitClasses', () => { + if (this.hasUnitClass) { + return this.schema.attributes.tagUnitClasses[ + this.takesValueFormattedTag + ] + } else { + return [] + } + }) + } + get defaultUnit() { + return this._memoize('defaultUnit', () => { + const defaultUnitForTagAttribute2 = 'default' + const defaultUnitsForUnitClassAttribute = 'defaultUnits' + if (!this.hasUnitClass) { + return '' + } + const takesValueTag = this.takesValueFormattedTag + let hasDefaultAttribute = this.schema.tagHasAttribute( + takesValueTag, + defaultUnitForTagAttribute2, + ) + if (hasDefaultAttribute) { + return this.schema.attributes.tagAttributes[ + defaultUnitForTagAttribute2 + ][takesValueTag] + } + hasDefaultAttribute = this.schema.tagHasAttribute( + takesValueTag, + defaultUnitsForUnitClassAttribute, + ) + if (hasDefaultAttribute) { + return this.schema.attributes.tagAttributes[ + defaultUnitsForUnitClassAttribute + ][takesValueTag] + } + const unitClasses = this.schema.attributes.tagUnitClasses[takesValueTag] + const firstUnitClass = unitClasses[0] + return this.schema.attributes.unitClassAttributes[firstUnitClass][ + defaultUnitsForUnitClassAttribute + ][0] + }) + } + get validUnits() { + return this._memoize('validUnits', () => { + const tagUnitClasses = this.unitClasses + const units = [] + for (const unitClass of tagUnitClasses) { + const unitClassUnits = this.schema.attributes.unitClasses[unitClass] + units.push(...unitClassUnits) + } + return units + }) + } +} +var ParsedHed3Tag = class extends ParsedHedTag { + get existsInSchema() { + return this._memoize('existsInSchema', () => { + return this.schema.entries.definitions + .get('tags') + .hasEntry(this.formattedTag) + }) + } + get takesValueFormattedTag() { + return this._memoize('takesValueFormattedTag', () => { + const takesValueType = 'takesValue' + for (const ancestor of ParsedHedTag.ancestorIterator(this.formattedTag)) { + const takesValueTag = replaceTagNameWithPound(ancestor) + if (this.schema.tagHasAttribute(takesValueTag, takesValueType)) { + return takesValueTag + } + } + return null + }) + } + get takesValue() { + return this._memoize('takesValue', () => { + return this.takesValueFormattedTag !== null + }) + } + get hasUnitClass() { + return this._memoize('hasUnitClass', () => { + if (!this.schema.entries.definitions.has('unitClasses')) { + return false + } + if (this.takesValueTag === null) { + return false + } + return this.takesValueTag.hasUnitClasses + }) + } + get unitClasses() { + return this._memoize('unitClasses', () => { + if (this.hasUnitClass) { + return this.takesValueTag.unitClasses + } else { + return [] + } + }) + } + get defaultUnit() { + return this._memoize('defaultUnit', () => { + const defaultUnitsForUnitClassAttribute = 'defaultUnits' + if (!this.hasUnitClass) { + return '' + } + const tagDefaultUnit = this.takesValueTag.getNamedAttributeValue( + defaultUnitsForUnitClassAttribute, + ) + if (tagDefaultUnit) { + return tagDefaultUnit + } + const firstUnitClass = this.unitClasses[0] + return firstUnitClass.getNamedAttributeValue( + defaultUnitsForUnitClassAttribute, + ) + }) + } + get validUnits() { + return this._memoize('validUnits', () => { + const tagUnitClasses = this.unitClasses + const units = /* @__PURE__ */ new Set() + for (const unitClass of tagUnitClasses) { + const unitClassUnits = this.schema.entries.unitClassMap.getEntry( + unitClass.name, + ).units + for (const unit of unitClassUnits.values()) { + units.add(unit) + } + } + return units + }) + } + get takesValueTag() { + return this._memoize('takesValueTag', () => { + if (this.takesValueFormattedTag !== null) { + return this.schema.entries.definitions + .get('tags') + .getEntry(this.takesValueFormattedTag) + } else { + return null + } + }) + } +} + +// utils/hedData.js +var getGenerationForSchemaVersion = function (version) { + if ((0, import_lt.default)(version, '4.0.0')) { + return 1 + } else if ((0, import_lt.default)(version, '8.0.0-alpha')) { + return 2 + } else { + return 3 + } +} +var mergeParsingIssues = function (previousIssues, currentIssues) { + for (const key of Object.keys(currentIssues)) { + previousIssues[key] = + previousIssues[key] !== void 0 + ? previousIssues[key].concat(currentIssues[key]) + : currentIssues[key] + } +} +var getParsedParentTags = function (hedSchemas, shortTag) { + const parentTags = /* @__PURE__ */ new Map() + for (const [schemaNickname, schema] of hedSchemas.schemas) { + const parentTag = new ParsedHedTag( + shortTag, + shortTag, + [0, shortTag.length - 1], + hedSchemas, + schemaNickname, + ) + parentTags.set(schema, parentTag) + parentTag.conversionIssues = parentTag.conversionIssues.filter( + (issue) => issue.internalCode !== 'invalidTag', + ) + } + return parentTags +} + +// common/schema/types.js +var Schema = class { + xmlData + version + generation + library + attributes + mapping + constructor(xmlData, attributes, mapping) { + this.xmlData = xmlData + const rootElement = xmlData.HED + this.version = rootElement.$.version + this.library = rootElement.$.library ?? '' + this.attributes = attributes + this.mapping = mapping + if (this.library) { + this.generation = 3 + } else { + this.generation = getGenerationForSchemaVersion(this.version) + } + } + get isHed2() { + return this.generation === 2 + } + get isHed3() { + return this.generation === 3 + } + tagHasAttribute(tag, tagAttribute) {} +} +var Hed2Schema = class extends Schema { + tagHasAttribute(tag, tagAttribute) { + return this.attributes.tagHasAttribute(tag, tagAttribute) + } +} +var Hed3Schema = class extends Schema { + entries + constructor(xmlData, entries, mapping) { + super(xmlData, null, mapping) + this.entries = entries + } + tagHasAttribute(tag, tagAttribute) { + return this.entries.tagHasAttribute(tag, tagAttribute) + } +} +var Schemas = class { + schemas + constructor(schemas) { + if (schemas === null || schemas instanceof Map) { + this.schemas = schemas + } else if (schemas instanceof Schema) { + this.schemas = /* @__PURE__ */ new Map([['', schemas]]) + } else { + throw new Error('Invalid type passed to Schemas constructor') + } + } + getSchema(schemaName) { + return this.schemas?.get(schemaName) + } + get baseSchema() { + return this.getSchema('') + } + get standardSchema() { + for (const schema of this.schemas.values()) { + if (schema.library === '') { + return schema + } + } + return void 0 + } + get librarySchemas() { + if (this.schemas !== null) { + const schemasCopy = new Map(this.schemas) + schemasCopy.delete('') + return schemasCopy + } else { + return null + } + } + get generation() { + if (this.schemas === null || this.schemas.size === 0) { + return 0 + } else if (this.librarySchemas.size > 0) { + return 3 + } else if (this.baseSchema) { + return this.baseSchema.generation + } else { + return 0 + } + } + get isSyntaxOnly() { + return this.generation === 0 + } + get isHed2() { + return this.generation === 2 + } + get isHed3() { + return this.generation === 3 + } +} +var SchemaSpec = class { + nickname + version + library + localPath + constructor(nickname, version, library = '', localPath = '') { + this.nickname = nickname + this.version = version + this.library = library + this.localPath = localPath + } + get localName() { + if (!this.library) { + return 'HED' + this.version + } else { + return 'HED_' + this.library + '_' + this.version + } + } + get path() { + return this.localPath + } +} +var SchemasSpec = class { + data + constructor() { + this.data = /* @__PURE__ */ new Map() + } + addSchemaSpec(schemaSpec) { + this.data.set(schemaSpec.nickname, schemaSpec) + return this + } + isDuplicate(schemaSpec) { + return this.data.has(schemaSpec.nickname) + } +} + +// utils/xml2js.js +init_define_process() +var setNodeParent = function (node, parent) { + if ('$parent' in node) { + return + } + node.$parent = parent + const childNodes = node.node ?? [] + for (const child of childNodes) { + setNodeParent(child, node) + } +} +var setParent = function (node, parent) { + if (node.schema) { + node.$parent = null + setNodeParent(node.schema[0], null) + } else { + setNodeParent(node, parent) + } +} + +// converter/schema.js +var buildMappingObject = function (xmlData) { + const nodeData = /* @__PURE__ */ new Map() + const tagElementData = /* @__PURE__ */ new Map() + let hasNoDuplicates = true + const rootElement = xmlData.HED + setParent(rootElement, null) + const tagElements = find(rootElement, '//node') + for (const tagElement of tagElements) { + if (getElementTagValue(tagElement) === '#') { + tagElementData.get(tagElement.$parent).takesValue = true + continue + } + const tagPath = getTagPathFromTagElement(tagElement) + const shortPath = tagPath[0] + const cleanedShortPath = shortPath.toLowerCase() + tagPath.reverse() + const longPath = tagPath.join('/') + const tagObject = new TagEntry(shortPath, longPath) + tagElementData.set(tagElement, tagObject) + if (!nodeData.has(cleanedShortPath)) { + nodeData.set(cleanedShortPath, tagObject) + } else { + hasNoDuplicates = false + const duplicateArray = asArray(nodeData.get(cleanedShortPath)) + duplicateArray.push(tagObject) + nodeData.set(cleanedShortPath, duplicateArray) + } + } + return new Mapping(nodeData, hasNoDuplicates) +} +var getTagPathFromTagElement = function (tagElement) { + const ancestorTags = [getElementTagValue(tagElement)] + let parentTagName = getParentTagName(tagElement) + let parentElement = tagElement.$parent + while (parentTagName) { + ancestorTags.push(parentTagName) + parentTagName = getParentTagName(parentElement) + parentElement = parentElement.$parent + } + return ancestorTags +} +var getElementTagValue = function (element, tagName = 'name') { + return element[tagName][0]._ +} +var getParentTagName = function (tagElement) { + const parentTagElement = tagElement.$parent + if (parentTagElement && 'name' in parentTagElement) { + return parentTagElement.name[0]._ + } else { + return '' + } +} +var buildSchema = function (schemaDef = {}) { + return loadSchema(schemaDef).then(([xmlData, issues]) => { + const mapping = buildMappingObject(xmlData) + const baseSchema = new Schema(xmlData, null, mapping) + return new Schemas(baseSchema) + }) +} + +// converter/index.js +var converter_default = { + convertHedStringToLong, + convertHedStringToShort, + buildSchema, +} + +// validator/index.js +init_define_process() + +// validator/bids/index.js +init_define_process() + +// validator/bids/types.js +init_define_process() + +// utils/bids.js +init_define_process() +var sidecarValueHasHed = function (sidecarValue) { + return ( + sidecarValue !== null && + typeof sidecarValue === 'object' && + sidecarValue.HED !== void 0 + ) +} + +// validator/bids/types.js +var BidsData = class { + parsedStringMapping + definitions + hedIssues + constructor() { + this.parsedStringMapping = /* @__PURE__ */ new Map() + this.definitions = /* @__PURE__ */ new Map() + this.hedIssues = [] + } +} +var BidsFile = class extends BidsData { + file + constructor(name, file) { + super() + this.file = file + } +} +var BidsJsonFile = class extends BidsFile { + jsonData + constructor(name, jsonData, file) { + super(name, file) + this.jsonData = jsonData + } +} +var BidsTsvFile = class extends BidsFile { + parsedTsv + hedColumnHedStrings + constructor(name, parsedTsv, file) { + super(name, file) + this.parsedTsv = parsedTsv + this._parseHedColumn() + } + _parseHedColumn() { + const hedColumnIndex = this.parsedTsv.headers.indexOf('HED') + if (hedColumnIndex === -1) { + this.hedColumnHedStrings = [] + } else { + this.hedColumnHedStrings = this.parsedTsv.rows + .slice(1) + .map((rowCells) => rowCells[hedColumnIndex]) + .map((hedCell) => (hedCell && hedCell !== 'n/a' ? hedCell : '')) + } + } +} +var BidsEventFile = class extends BidsTsvFile { + potentialSidecars + mergedSidecar + sidecarHedData + constructor(name, potentialSidecars, mergedDictionary, parsedTsv, file) { + super(name, parsedTsv, file) + this.potentialSidecars = potentialSidecars + this.mergedSidecar = new BidsSidecar(name, mergedDictionary, null) + this.sidecarHedData = this.mergedSidecar.hedData + } +} +var BidsSidecar = class extends BidsJsonFile { + hedData + hedValueStrings + hedCategoricalStrings + constructor(name, sidecarData = {}, file) { + super(name, sidecarData, file) + this._filterHedStrings() + this._categorizeHedStrings() + } + _filterHedStrings() { + const sidecarHedTags = Object.entries(this.jsonData) + .map(([sidecarKey, sidecarValue]) => { + if (sidecarValueHasHed(sidecarValue)) { + return [sidecarKey, sidecarValue.HED] + } else { + return [] + } + }) + .filter((x) => x.length > 0) + this.hedData = new Map(sidecarHedTags) + } + _categorizeHedStrings() { + this.hedValueStrings = [] + this.hedCategoricalStrings = [] + for (const sidecarValue of this.hedData.values()) { + if (typeof sidecarValue === 'string') { + this.hedValueStrings.push(sidecarValue) + } else { + this.hedCategoricalStrings.push(...Object.values(sidecarValue)) + } + } + } + get hedStrings() { + return this.hedValueStrings.concat(this.hedCategoricalStrings) + } + get sidecarData() { + return this.jsonData + } +} +var fallbackDatasetDescription = new BidsJsonFile( + './dataset_description.json', + null, +) +var BidsDataset = class extends BidsData { + eventData + sidecarData + datasetDescription + datasetRootDirectory + constructor( + eventData, + sidecarData, + datasetDescription = fallbackDatasetDescription, + datasetRootDirectory = null, + ) { + super() + this.eventData = eventData + this.sidecarData = sidecarData + this.datasetDescription = datasetDescription + this.datasetRootDirectory = datasetRootDirectory + } +} +var bidsHedErrorCodes = /* @__PURE__ */ new Set([104, 106, 107]) +var BidsIssue = class { + code + file + evidence + constructor(issueCode, file, evidence) { + this.code = issueCode + this.file = file + this.evidence = evidence + } + isError() { + return bidsHedErrorCodes.has(this.code) + } + static generateInternalErrorPromise(error) { + return Promise.resolve([new BidsIssue(107, null, error.message)]) + } +} +var BidsHedIssue = class extends BidsIssue { + hedIssue + constructor(hedIssue, file) { + super(hedIssue.level === 'warning' ? 105 : 104, file, hedIssue.message) + this.hedIssue = hedIssue + } +} + +// validator/bids/validate.js +init_define_process() + +// validator/dataset.js +init_define_process() +var import_zip = __toESM(require_zip()) + +// validator/event/index.js +init_define_process() + +// validator/event/init.js +init_define_process() + +// validator/parser/main.js +init_define_process() + +// validator/parser/parsedHedString.js +init_define_process() + +// validator/parser/parsedHedGroup.js +init_define_process() +var import_differenceWith = __toESM(require_differenceWith()) +var _ParsedHedGroup = class extends ParsedHedSubstring { + tags + specialTags + hasDefExpandChildren + defExpandChildren + constructor(parsedHedTags, hedSchemas, hedString, originalBounds) { + const originalTag = hedString.substring(...originalBounds) + super(originalTag, originalBounds) + this.tags = parsedHedTags + this._findSpecialGroups(hedSchemas) + } + _findSpecialGroups(hedSchemas) { + this.specialTags = /* @__PURE__ */ new Map() + for (const shortTag of _ParsedHedGroup.SPECIAL_SHORT_TAGS) { + const tags = _ParsedHedGroup.findGroupTags(this, hedSchemas, shortTag) + if (tags !== void 0) { + this.specialTags.set(shortTag, tags) + } + } + this.defExpandChildren = Array.from(this.topLevelGroupIterator()).filter( + (subgroup) => subgroup.isDefExpandGroup, + ) + this.hasDefExpandChildren = this.defExpandChildren.length !== 0 + } + static findGroupTags(group, hedSchemas, shortTag) { + if (!hedSchemas.isHed3) { + return void 0 + } + const parsedTags = getParsedParentTags(hedSchemas, shortTag) + const tags = group.tags.filter((tag) => { + if (!(tag instanceof ParsedHedTag)) { + return false + } + const parsedTag = parsedTags.get(tag.schema) + return tag.isDescendantOf(parsedTag) + }) + switch (tags.length) { + case 0: + return void 0 + default: + return tags + } + } + get definitionTags() { + return this.specialTags.get('Definition') + } + get defTags() { + return this.specialTags.get('Def') + } + get defExpandTags() { + return this.specialTags.get('Def-expand') + } + get isDefinitionGroup() { + return this.specialTags.has('Definition') + } + get isDefGroup() { + return this.specialTags.has('Def') + } + get isDefExpandGroup() { + return this.specialTags.has('Def-expand') + } + get isOnsetGroup() { + return this.specialTags.has('Onset') + } + get isOffsetGroup() { + return this.specialTags.has('Offset') + } + get isTemporalGroup() { + return this.isOnsetGroup || this.isOffsetGroup + } + get definitionTag() { + return this.getSingleDefinitionTag('definitionTag', 'Definition') + } + get defExpandTag() { + return this.getSingleDefinitionTag('defExpandTag', 'Def-expand') + } + getSingleDefinitionTag(fieldName, parentTag) { + return this._memoize(fieldName, () => { + switch (this.specialTags.get(parentTag).length) { + case 0: + return void 0 + case 1: + return this.specialTags.get(parentTag)[0] + default: + throw new Error( + `Single ${parentTag} tag asserted, but multiple ${parentTag} tags found.`, + ) + } + }) + } + static findDefinitionName(canonicalTag, definitionBase) { + const tag = canonicalTag + let value = getTagName(tag) + let previousValue + for (const level of ParsedHedTag.ancestorIterator(tag)) { + if (value.toLowerCase() === definitionBase.toLowerCase()) { + return previousValue + } + previousValue = value + value = getTagName(level) + } + throw Error( + `Completed iteration through ${definitionBase.toLowerCase()} tag without finding ${definitionBase} level.`, + ) + } + get definitionName() { + return this.getSingleDefinitionName('definitionName', 'Definition') + } + get defExpandName() { + return this.getSingleDefinitionName('defExpandName', 'Def-expand') + } + getSingleDefinitionName(fieldName, parentTag) { + return this._memoize(fieldName, () => { + if (!this.specialTags.has(parentTag)) { + return null + } + return _ParsedHedGroup.findDefinitionName( + this.getSingleDefinitionTag(fieldName, parentTag).canonicalTag, + parentTag, + ) + }) + } + get definitionValue() { + return this.getSingleDefinitionValue('definitionValue', 'Definition') + } + get defExpandValue() { + return this.getSingleDefinitionValue('defExpandValue', 'Def-expand') + } + getSingleDefinitionValue(fieldName, parentTag) { + return this._memoize(fieldName, () => { + if (!this.specialTags.has(parentTag)) { + return null + } + return _ParsedHedGroup.getDefinitionTagValue( + this.getSingleDefinitionTag(fieldName, parentTag), + parentTag, + ) + }) + } + get definitionNameAndValue() { + return this.getSingleDefinitionNameAndValue( + 'definitionNameAndValue', + 'Definition', + ) + } + get defExpandNameAndValue() { + return this.getSingleDefinitionNameAndValue( + 'defExpandNameAndValue', + 'Def-expand', + ) + } + getSingleDefinitionNameAndValue(fieldName, parentTag) { + return this._memoize(fieldName, () => { + if (!this.specialTags.has(parentTag)) { + return null + } else if (this.getSingleDefinitionValue(fieldName, parentTag)) { + return ( + this.getSingleDefinitionName(fieldName, parentTag) + + '/' + + this.getSingleDefinitionValue(fieldName, parentTag) + ) + } else { + return this.getSingleDefinitionName(fieldName, parentTag) + } + }) + } + get defName() { + return this._memoize('defName', () => { + if (!this.isDefGroup && !this.hasDefExpandChildren) { + return null + } else if (!this.isTemporalGroup) { + return [].concat( + this.defExpandChildren.map( + (defExpandChild) => defExpandChild.defExpandName, + ), + this.defTags.map((defTag) => + _ParsedHedGroup.findDefinitionName(defTag.canonicalTag, 'Def'), + ), + ) + } else if (this.defCount > 1) { + throw new IssueError( + generateIssue('temporalWithMultipleDefinitions', { + tagGroup: this.originalTag, + }), + ) + } else if (this.hasDefExpandChildren) { + return this.defExpandChildren[0].defExpandName + } + return _ParsedHedGroup.findDefinitionName( + this.defTags[0].canonicalTag, + 'Def', + ) + }) + } + get defValue() { + return this._memoize('defValue', () => { + if (!this.isDefGroup && !this.hasDefExpandChildren) { + return null + } else if (!this.isTemporalGroup) { + return [].concat( + this.defExpandChildren.map( + (defExpandChild) => defExpandChild.defExpandValue, + ), + this.defTags.map((defTag) => + _ParsedHedGroup.getDefinitionTagValue(defTag, 'Def'), + ), + ) + } else if (this.defCount > 1) { + throw new IssueError( + generateIssue('temporalWithMultipleDefinitions', { + tagGroup: this.originalTag, + }), + ) + } else if (this.hasDefExpandChildren) { + return this.defExpandChildren[0].defExpandValue + } + return _ParsedHedGroup.getDefinitionTagValue(this.defTags[0], 'Def') + }) + } + get defNameAndValue() { + return this._memoize('defNameAndValue', () => { + if (!this.isDefGroup && !this.hasDefExpandChildren) { + return null + } else if (this.defValue) { + return this.defName + '/' + this.defValue + } else { + return this.defName + } + }) + } + static getDefinitionTagValue(tag, parentTag) { + if (getTagName(tag.parentCanonicalTag) === parentTag) { + return '' + } else { + return tag.originalTagName + } + } + get definitionGroup() { + return this._memoize('definitionGroup', () => { + if (!this.isDefinitionGroup) { + return null + } + for (const subgroup of this.tags) { + if (subgroup instanceof _ParsedHedGroup) { + return subgroup + } + } + return null + }) + } + get defCount() { + return this._memoize('defCount', () => { + if (this.isDefGroup) { + return this.defTags.length + this.defExpandChildren.length + } else { + return this.defExpandChildren.length + } + }) + } + equivalent(other) { + if (!(other instanceof _ParsedHedGroup)) { + return false + } + return ( + (0, import_differenceWith.default)( + this.tags, + other.tags, + (ours, theirs) => ours.equivalent(theirs), + ).length === 0 + ) + } + nestedGroups() { + const currentGroup = [] + for (const innerTag of this.tags) { + if (innerTag instanceof ParsedHedTag) { + currentGroup.push(innerTag) + } else if (innerTag instanceof _ParsedHedGroup) { + currentGroup.push(innerTag.nestedGroups()) + } + } + return currentGroup + } + *subGroupArrayIterator() { + const currentGroup = [] + for (const innerTag of this.tags) { + if (innerTag instanceof ParsedHedTag) { + currentGroup.push(innerTag) + } else if (innerTag instanceof _ParsedHedGroup) { + yield* innerTag.subGroupArrayIterator() + } + } + yield currentGroup + } + *subParsedGroupIterator() { + yield this + for (const innerTag of this.tags) { + if (innerTag instanceof _ParsedHedGroup) { + yield* innerTag.subParsedGroupIterator() + } + } + } + *tagIterator() { + for (const innerTag of this.tags) { + if (innerTag instanceof ParsedHedTag) { + yield innerTag + } else if (innerTag instanceof _ParsedHedGroup) { + yield* innerTag.tagIterator() + } + } + } + *topLevelGroupIterator() { + for (const innerTag of this.tags) { + if (innerTag instanceof _ParsedHedGroup) { + yield innerTag + } + } + } +} +var ParsedHedGroup = _ParsedHedGroup +__publicField( + ParsedHedGroup, + 'SPECIAL_SHORT_TAGS', + /* @__PURE__ */ new Set([ + 'Definition', + 'Def', + 'Def-expand', + 'Onset', + 'Offset', + ]), +) + +// validator/parser/parsedHedString.js +var ParsedHedString = class { + hedString + tagGroups + topLevelTags + tags + topLevelTagGroups + definitionGroups + constructor(hedString, parsedTags) { + this.hedString = hedString + this.tagGroups = parsedTags.filter( + (tagOrGroup) => tagOrGroup instanceof ParsedHedGroup, + ) + this.topLevelTags = parsedTags.filter( + (tagOrGroup) => tagOrGroup instanceof ParsedHedTag, + ) + const subgroupTags = this.tagGroups.flatMap((tagGroup) => + Array.from(tagGroup.tagIterator()), + ) + this.tags = this.topLevelTags.concat(subgroupTags) + this.topLevelTagGroups = this.tagGroups.map((tagGroup) => + tagGroup.tags.filter((tagOrGroup) => tagOrGroup instanceof ParsedHedTag), + ) + this.definitionGroups = this.tagGroups.filter((group) => { + return group.isDefinitionGroup + }) + } + get definitions() { + return this.definitionGroups.map((group) => { + return [group.definitionName, group] + }) + } +} + +// validator/parser/splitHedString.js +init_define_process() +var import_flattenDeep = __toESM(require_flattenDeep()) +var openingGroupCharacter2 = '(' +var closingGroupCharacter2 = ')' +var commaCharacter = ',' +var colonCharacter = ':' +var slashCharacter = '/' +var invalidCharacters = /* @__PURE__ */ new Set(['{', '}', '[', ']', '~', '"']) +var invalidCharactersOutsideOfValues = /* @__PURE__ */ new Set([':']) +var generationToClass = [ + ParsedHedTag, + ParsedHedTag, + ParsedHed2Tag, + ParsedHed3Tag, +] +var TagSpec = class { + constructor(tag, start, end, librarySchema) { + this.tag = tag.trim() + this.bounds = [start, end] + this.library = librarySchema + } +} +var GroupSpec = class { + constructor(start, finish) { + this.start = start + this.finish = finish + this.children = [] + } + get bounds() { + return [this.start, this.finish] + } +} +var tokenizeHedString = function (hedString) { + const syntaxIssues = [] + let currentTag = '' + let groupDepth = 0 + let startingIndex = 0 + let resetStartingIndex = false + let slashFound = false + let librarySchema = '' + const currentGroupStack = [[]] + const parenthesesStack = [new GroupSpec(0, hedString.length)] + const pushTag = (i) => { + if (!stringIsEmpty(currentTag)) { + currentGroupStack[groupDepth].push( + new TagSpec(currentTag, startingIndex, i, librarySchema), + ) + } + resetStartingIndex = true + slashFound = false + librarySchema = '' + } + const closeGroup = (i) => { + const bounds = parenthesesStack.pop() + bounds.finish = i + 1 + parenthesesStack[groupDepth - 1].children.push(bounds) + currentGroupStack[groupDepth - 1].push(currentGroupStack.pop()) + groupDepth-- + } + for (let i = 0; i < hedString.length; i++) { + const character = hedString.charAt(i) + switch (character) { + case openingGroupCharacter2: + currentGroupStack.push([]) + parenthesesStack.push(new GroupSpec(i)) + resetStartingIndex = true + groupDepth++ + break + case closingGroupCharacter2: { + pushTag(i) + if (groupDepth <= 0) { + syntaxIssues.push( + generateIssue('unopenedParenthesis', { + index: i, + string: hedString, + }), + ) + break + } + closeGroup(i) + break + } + case commaCharacter: + pushTag(i) + break + case colonCharacter: + if (!slashFound && !librarySchema) { + librarySchema = currentTag + resetStartingIndex = true + } else { + currentTag += character + } + break + case slashCharacter: + slashFound = true + currentTag += character + break + default: + currentTag += character + resetStartingIndex = stringIsEmpty(currentTag) + } + if (resetStartingIndex) { + resetStartingIndex = false + startingIndex = i + 1 + currentTag = '' + } + } + pushTag(hedString.length) + while (groupDepth > 0) { + syntaxIssues.push( + generateIssue('unclosedParenthesis', { + index: parenthesesStack[parenthesesStack.length - 1].start, + string: hedString, + }), + ) + closeGroup(hedString.length) + } + const tagSpecs = currentGroupStack.pop() + const groupSpecs = parenthesesStack.pop() + const issues = { + syntax: syntaxIssues, + conversion: [], + } + return [tagSpecs, groupSpecs, issues] +} +var checkForInvalidCharacters = function (hedString, tagSpecs) { + const syntaxIssues = [] + const flatTagSpecs = (0, import_flattenDeep.default)(tagSpecs) + for (const tagSpec of flatTagSpecs) { + const alwaysInvalidIssues = checkTagForInvalidCharacters( + hedString, + tagSpec, + tagSpec.tag, + invalidCharacters, + ) + const valueTag = replaceTagNameWithPound(tagSpec.tag) + const outsideValueIssues = checkTagForInvalidCharacters( + hedString, + tagSpec, + valueTag, + invalidCharactersOutsideOfValues, + ) + syntaxIssues.push(...alwaysInvalidIssues, ...outsideValueIssues) + } + return { syntax: syntaxIssues, conversion: [] } +} +var checkTagForInvalidCharacters = function ( + hedString, + tagSpec, + tag, + invalidSet, +) { + const issues = [] + for (let i = 0; i < tag.length; i++) { + const character = tag.charAt(i) + if (invalidSet.has(character)) { + tagSpec.invalidCharacter = true + issues.push( + generateIssue('invalidCharacter', { + character, + index: tagSpec.bounds[0] + i, + string: hedString, + }), + ) + } + } + return issues +} +var createParsedTags = function (hedString, hedSchemas, tagSpecs, groupSpecs) { + const conversionIssues = [] + const syntaxIssues = [] + const ParsedHedTagClass = generationToClass[hedSchemas.generation] + const createParsedTag = ({ + library: librarySchema, + tag: originalTag, + bounds: originalBounds, + }) => { + const parsedTag = new ParsedHedTagClass( + originalTag, + hedString, + originalBounds, + hedSchemas, + librarySchema, + ) + conversionIssues.push(...parsedTag.conversionIssues) + return parsedTag + } + const createParsedGroups = (tags, groupSpecs2) => { + const tagGroups = [] + let index = 0 + for (const tag of tags) { + if (Array.isArray(tag)) { + const groupSpec = groupSpecs2[index] + tagGroups.push( + new ParsedHedGroup( + createParsedGroups(tag, groupSpec.children), + hedSchemas, + hedString, + groupSpec.bounds, + ), + ) + index++ + } else { + tagGroups.push(tag) + } + } + return tagGroups + } + const parsedTags = recursiveMap(createParsedTag, tagSpecs) + const parsedTagsWithGroups = createParsedGroups( + parsedTags, + groupSpecs.children, + ) + const issues = { + syntax: syntaxIssues, + conversion: conversionIssues, + } + return [parsedTagsWithGroups, issues] +} +function splitHedString2(hedString, hedSchemas) { + const [tagSpecs, groupBounds, splitIssues] = tokenizeHedString(hedString) + const characterIssues = checkForInvalidCharacters(hedString, tagSpecs) + mergeParsingIssues(splitIssues, characterIssues) + if (splitIssues.syntax.length > 0) { + return [null, splitIssues] + } + const [parsedTags, parsingIssues] = createParsedTags( + hedString, + hedSchemas, + tagSpecs, + groupBounds, + ) + mergeParsingIssues(splitIssues, parsingIssues) + return [parsedTags, splitIssues] +} + +// validator/parser/main.js +var openingGroupCharacter3 = '(' +var closingGroupCharacter3 = ')' +var delimiters = /* @__PURE__ */ new Set([',']) +var substituteCharacters = function (hedString) { + const issues = [] + const illegalCharacterMap = { '\0': ['ASCII NUL', ' '] } + const flaggedCharacters = /[^\w\d./$ :-]/g + const replaceFunction = function (match, offset) { + if (match in illegalCharacterMap) { + const [name, replacement] = illegalCharacterMap[match] + issues.push( + generateIssue('invalidCharacter', { + character: name, + index: offset, + string: hedString, + }), + ) + return replacement + } else { + return match + } + } + const fixedString = hedString.replace(flaggedCharacters, replaceFunction) + return [fixedString, issues] +} +var countTagGroupParentheses = function (hedString) { + const issues = [] + const numberOfOpeningParentheses = getCharacterCount( + hedString, + openingGroupCharacter3, + ) + const numberOfClosingParentheses = getCharacterCount( + hedString, + closingGroupCharacter3, + ) + if (numberOfOpeningParentheses !== numberOfClosingParentheses) { + issues.push( + generateIssue('parentheses', { + opening: numberOfOpeningParentheses, + closing: numberOfClosingParentheses, + }), + ) + } + return issues +} +var isCommaMissingAfterClosingParenthesis = function ( + lastNonEmptyCharacter, + currentCharacter, +) { + return ( + lastNonEmptyCharacter === closingGroupCharacter3 && + !( + delimiters.has(currentCharacter) || + currentCharacter === closingGroupCharacter3 + ) + ) +} +var findDelimiterIssuesInHedString = function (hedString) { + const issues = [] + let lastNonEmptyValidCharacter = '' + let lastNonEmptyValidIndex = 0 + let currentTag = '' + for (let i = 0; i < hedString.length; i++) { + const currentCharacter = hedString.charAt(i) + currentTag += currentCharacter + if (stringIsEmpty(currentCharacter)) { + continue + } + if (delimiters.has(currentCharacter)) { + if (currentTag.trim() === currentCharacter) { + issues.push( + generateIssue('extraDelimiter', { + character: currentCharacter, + index: i, + string: hedString, + }), + ) + currentTag = '' + continue + } + currentTag = '' + } else if (currentCharacter === openingGroupCharacter3) { + if (currentTag.trim() === openingGroupCharacter3) { + currentTag = '' + } else { + issues.push(generateIssue('invalidTag', { tag: currentTag })) + } + } else if ( + isCommaMissingAfterClosingParenthesis( + lastNonEmptyValidCharacter, + currentCharacter, + ) + ) { + issues.push( + generateIssue('commaMissing', { + tag: currentTag.slice(0, -1), + }), + ) + break + } + lastNonEmptyValidCharacter = currentCharacter + lastNonEmptyValidIndex = i + } + if (delimiters.has(lastNonEmptyValidCharacter)) { + issues.push( + generateIssue('extraDelimiter', { + character: lastNonEmptyValidCharacter, + index: lastNonEmptyValidIndex, + string: hedString, + }), + ) + } + return issues +} +var validateFullUnparsedHedString = function (hedString) { + const [fixedHedString, substitutionIssues] = substituteCharacters(hedString) + const delimiterIssues = [].concat( + countTagGroupParentheses(fixedHedString), + findDelimiterIssuesInHedString(fixedHedString), + ) + return { + substitution: substitutionIssues, + delimiter: delimiterIssues, + } +} +var parseHedString = function (hedString, hedSchemas) { + const fullStringIssues = validateFullUnparsedHedString(hedString) + if (fullStringIssues.delimiter.length > 0) { + fullStringIssues.syntax = [] + return [null, fullStringIssues] + } + const [parsedTags, splitIssues] = splitHedString2(hedString, hedSchemas) + const parsingIssues = Object.assign(fullStringIssues, splitIssues) + if (parsedTags === null) { + return [null, parsingIssues] + } + const parsedString = new ParsedHedString(hedString, parsedTags) + return [parsedString, parsingIssues] +} +var parseHedStrings = function (hedStrings, hedSchemas) { + return hedStrings + .map((hedString) => { + return parseHedString(hedString, hedSchemas) + }) + .reduce( + ([previousStrings, previousIssues], [currentString, currentIssues]) => { + previousStrings.push(currentString) + mergeParsingIssues(previousIssues, currentIssues) + return [previousStrings, previousIssues] + }, + [[], {}], + ) +} + +// validator/event/validator.js +init_define_process() +var uniqueType = 'unique' +var requiredType = 'required' +var requireChildType = 'requireChild' +var clockTimeUnitClass = 'clockTime' +var dateTimeUnitClass = 'dateTime' +var timeUnitClass = 'time' +var HedValidator = class { + parsedString + hedSchemas + options + issues + constructor(parsedString, hedSchemas, options) { + this.parsedString = parsedString + this.hedSchemas = hedSchemas + this.options = options + this.issues = [] + } + validateStringLevel() { + this.options.isEventLevel = false + this.validateFullParsedHedString() + this.validateIndividualHedTags() + this.validateHedTagGroups() + } + validateEventLevel() { + this.options.isEventLevel = true + this.validateTopLevelTags() + this.validateIndividualHedTags() + this.validateHedTagLevels() + this.validateHedTagGroups() + } + validateFullParsedHedString() { + this.checkPlaceholderStringSyntax() + } + validateIndividualHedTags() { + let previousTag = null + for (const tag of this.parsedString.tags) { + this.validateIndividualHedTag(tag, previousTag) + previousTag = tag + } + } + validateIndividualHedTag(tag, previousTag) { + if (this.hedSchemas.generation > 0) { + this.checkIfTagIsValid(tag, previousTag) + this.checkIfTagUnitClassUnitsAreValid(tag) + this.checkIfTagRequiresChild(tag) + if (!this.options.isEventLevel) { + this.checkValueTagSyntax(tag) + } + } + if (this.options.expectValuePlaceholderString) { + this.checkPlaceholderTagSyntax(tag) + } + } + validateHedTagLevels() { + for (const tagGroup of this.parsedString.tagGroups) { + for (const subGroup of tagGroup.subGroupArrayIterator()) { + this.validateHedTagLevel(subGroup) + } + } + this.validateHedTagLevel(this.parsedString.topLevelTags) + } + validateHedTagLevel(tagList) { + if (this.hedSchemas.generation > 0) { + this.checkForMultipleUniqueTags(tagList) + } + this.checkForDuplicateTags(tagList) + } + validateHedTagGroups() { + for (const tagGroup of this.parsedString.tagGroups) { + for (const subGroup of tagGroup.subParsedGroupIterator()) { + this.validateHedTagGroup(subGroup) + } + } + } + validateHedTagGroup(parsedTagGroup) {} + validateTopLevelTags() { + if (this.hedSchemas.generation > 0 && this.options.checkForWarnings) { + this.checkForRequiredTags() + } + } + checkForDuplicateTags(tagList) { + const duplicateTags = /* @__PURE__ */ new Set() + const addIssue = (tag) => { + if (duplicateTags.has(tag)) { + return + } + this.pushIssue('duplicateTag', { + tag: tag.originalTag, + bounds: tag.originalBounds, + }) + duplicateTags.add(tag) + } + for (const firstTag of tagList) { + for (const secondTag of tagList) { + if (firstTag !== secondTag && firstTag.equivalent(secondTag)) { + addIssue(firstTag) + addIssue(secondTag) + } + } + } + } + checkForMultipleUniqueTags(tagList) { + this._checkForTagAttribute(uniqueType, (uniqueTagPrefix) => { + if ( + tagList.filter((tag) => tag.formattedTag.startsWith(uniqueTagPrefix)) + .length > 1 + ) { + this.pushIssue('multipleUniqueTags', { + tag: uniqueTagPrefix, + }) + } + }) + } + checkForRequiredTags() { + this._checkForTagAttribute(requiredType, (requiredTagPrefix) => { + if ( + !this.parsedString.topLevelTags.some((tag) => + tag.formattedTag.startsWith(requiredTagPrefix), + ) + ) { + this.pushIssue('requiredPrefixMissing', { + tagPrefix: requiredTagPrefix, + }) + } + }) + } + _checkForTagAttribute(attribute, fn) {} + checkIfTagRequiresChild(tag) { + const invalid = tag.hasAttribute(requireChildType) + if (invalid) { + this.pushIssue('childRequired', { tag: tag.originalTag }) + } + } + checkIfTagUnitClassUnitsAreValid(tag) {} + checkValueTagSyntax(tag) {} + checkIfTagIsValid(tag, previousTag) { + if (tag.existsInSchema || tag.takesValue) { + return + } + const isExtensionAllowedTag = tag.allowsExtensions + if ( + this.options.expectValuePlaceholderString && + tag.formattedTag.split('#').length === 2 + ) { + const valueTag = replaceTagNameWithPound(tag.formattedTag) + if (valueTag.split('#').length !== 2) { + } else { + this.pushIssue('invalidPlaceholder', { + tag: tag.originalTag, + }) + } + } else if ( + !isExtensionAllowedTag && + previousTag && + previousTag.takesValue + ) { + this.pushIssue('extraCommaOrInvalid', { + tag: tag.originalTag, + previousTag: previousTag.originalTag, + }) + } else if (!isExtensionAllowedTag) { + this.pushIssue('invalidTag', { tag: tag.originalTag }) + } else if (!this.options.isEventLevel && this.options.checkForWarnings) { + this.pushIssue('extension', { tag: tag.originalTag }) + } + } + checkPlaceholderTagSyntax(tag) { + const placeholderCount = getCharacterCount(tag.formattedTag, '#') + if (placeholderCount === 1) { + const valueTag = replaceTagNameWithPound(tag.formattedTag) + if (getCharacterCount(valueTag, '#') !== 1) { + this.pushIssue('invalidPlaceholder', { + tag: tag.originalTag, + }) + } + } else if (placeholderCount > 1) { + this.pushIssue('invalidPlaceholder', { + tag: tag.originalTag, + }) + } + } + checkPlaceholderStringSyntax() { + let standalonePlaceholders = 0 + let definitionPlaceholders + let standaloneIssueGenerated = false + let firstStandaloneTag = '' + for (const tag of this.parsedString.topLevelTags) { + const tagString = tag.formattedTag + const tagPlaceholders = getCharacterCount(tagString, '#') + standalonePlaceholders += tagPlaceholders + if (!firstStandaloneTag && standalonePlaceholders >= 1) { + firstStandaloneTag = tag.originalTag + } + if ( + tagPlaceholders && + ((!this.options.expectValuePlaceholderString && + standalonePlaceholders) || + standalonePlaceholders > 1) + ) { + if ( + this.options.expectValuePlaceholderString && + !standaloneIssueGenerated + ) { + this.pushIssue('invalidPlaceholder', { + tag: firstStandaloneTag, + }) + } + this.pushIssue('invalidPlaceholder', { + tag: tag.originalTag, + }) + standaloneIssueGenerated = true + } + } + for (const tagGroup of this.parsedString.tagGroups) { + if (tagGroup.isDefinitionGroup) { + definitionPlaceholders = 0 + const isDefinitionPlaceholder = + tagGroup.definitionTag.formattedTagName === '#' + const definitionName = tagGroup.definitionName + for (const tag of tagGroup.tagIterator()) { + if (isDefinitionPlaceholder && tag === tagGroup.definitionTag) { + continue + } + const tagString = tag.formattedTag + definitionPlaceholders += getCharacterCount(tagString, '#') + } + if ( + !( + (!isDefinitionPlaceholder && definitionPlaceholders === 0) || + (isDefinitionPlaceholder && definitionPlaceholders === 1) + ) + ) { + this.pushIssue('invalidPlaceholderInDefinition', { + definition: definitionName, + }) + } + } else if (!standaloneIssueGenerated) { + for (const tag of tagGroup.tagIterator()) { + const tagString = tag.formattedTag + const tagPlaceholders = getCharacterCount(tagString, '#') + standalonePlaceholders += tagPlaceholders + if (!firstStandaloneTag && standalonePlaceholders >= 1) { + firstStandaloneTag = tag.originalTag + } + if ( + tagPlaceholders && + ((!this.options.expectValuePlaceholderString && + standalonePlaceholders) || + standalonePlaceholders > 1) + ) { + if ( + this.options.expectValuePlaceholderString && + !standaloneIssueGenerated + ) { + this.pushIssue('invalidPlaceholder', { + tag: firstStandaloneTag, + }) + } + this.pushIssue('invalidPlaceholder', { + tag: tag.originalTag, + }) + standaloneIssueGenerated = true + } + } + } + } + if ( + this.options.expectValuePlaceholderString && + standalonePlaceholders === 0 + ) { + this.pushIssue('missingPlaceholder', { + string: this.parsedString.hedString, + }) + } + } + pushIssue(internalCode, parameters) { + this.issues.push(generateIssue(internalCode, parameters)) + } +} +var Hed2Validator = class extends HedValidator { + constructor(parsedString, hedSchemas, options) { + super(parsedString, hedSchemas, options) + } + _checkForTagAttribute(attribute, fn) { + const tags = this.hedSchemas.baseSchema.attributes.tagAttributes[attribute] + for (const tag of Object.keys(tags)) { + fn(tag) + } + } + checkIfTagUnitClassUnitsAreValid(tag) { + if (tag.existsInSchema || !tag.hasUnitClass) { + return + } + const tagUnitClasses = tag.unitClasses + const originalTagUnitValue = tag.originalTagName + const formattedTagUnitValue = tag.formattedTagName + const tagUnitClassUnits = tag.validUnits + if ( + dateTimeUnitClass in this.hedSchemas.baseSchema.attributes.unitClasses && + tagUnitClasses.includes(dateTimeUnitClass) + ) { + if (!isDateTime(formattedTagUnitValue)) { + this.pushIssue('invalidValue', { tag: tag.originalTag }) + } + return + } else if ( + clockTimeUnitClass in this.hedSchemas.baseSchema.attributes.unitClasses && + tagUnitClasses.includes(clockTimeUnitClass) + ) { + if (!isClockFaceTime(formattedTagUnitValue)) { + this.pushIssue('invalidValue', { tag: tag.originalTag }) + } + return + } else if ( + timeUnitClass in this.hedSchemas.baseSchema.attributes.unitClasses && + tagUnitClasses.includes(timeUnitClass) && + tag.originalTag.includes(':') + ) { + if (!isClockFaceTime(formattedTagUnitValue)) { + this.pushIssue('invalidValue', { tag: tag.originalTag }) + } + return + } + const [foundUnit, validUnit, value] = validateUnits( + originalTagUnitValue, + tagUnitClassUnits, + this.hedSchemas.baseSchema.attributes, + ) + const validValue = this.validateValue( + value, + this.hedSchemas.baseSchema.tagHasAttribute( + tag.takesValueFormattedTag, + 'isNumeric', + ), + ) + if (!foundUnit && this.options.checkForWarnings) { + const defaultUnit = tag.defaultUnit + this.pushIssue('unitClassDefaultUsed', { + tag: tag.originalTag, + defaultUnit, + }) + } else if (!validUnit) { + this.pushIssue('unitClassInvalidUnit', { + tag: tag.originalTag, + unitClassUnits: tagUnitClassUnits.sort().join(','), + }) + } else if (!validValue) { + this.pushIssue('invalidValue', { tag: tag.originalTag }) + } + } + checkValueTagSyntax(tag) { + if (tag.takesValue && !tag.hasUnitClass) { + const isValidValue = this.validateValue( + tag.formattedTagName, + this.hedSchemas.baseSchema.tagHasAttribute( + tag.takesValueFormattedTag, + 'isNumeric', + ), + ) + if (!isValidValue) { + this.pushIssue('invalidValue', { tag: tag.originalTag }) + } + } + } + validateValue(value, isNumeric) { + if (value === '#') { + return true + } + if (isNumeric) { + return isNumber(value) + } + const hed2ValidValueCharacters = /^[-a-zA-Z0-9.$%^+_; :]+$/ + return hed2ValidValueCharacters.test(value) + } +} + +// validator/event/hed3.js +init_define_process() +var import_differenceWith2 = __toESM(require_differenceWith()) +var tagGroupType = 'tagGroup' +var topLevelTagGroupType = 'topLevelTagGroup' +var Hed3Validator = class extends HedValidator { + definitions + constructor(parsedString, hedSchemas, definitions, options) { + super(parsedString, hedSchemas, options) + this.definitions = definitions + } + validateEventLevel() { + super.validateEventLevel() + this.validateTopLevelTagGroups() + } + validateIndividualHedTag(tag, previousTag) { + super.validateIndividualHedTag(tag, previousTag) + if (this.definitions !== null) { + this.checkForMissingDefinitions(tag, 'Def') + this.checkForMissingDefinitions(tag, 'Def-expand') + } + } + validateHedTagGroup(parsedTagGroup) { + super.validateHedTagGroup(parsedTagGroup) + this.checkDefinitionSyntax(parsedTagGroup) + this.checkTemporalSyntax(parsedTagGroup) + } + validateTopLevelTags() { + super.validateTopLevelTags() + this.checkForInvalidTopLevelTags() + } + validateTopLevelTagGroups() { + this.checkForInvalidTopLevelTagGroupTags() + } + _checkForTagAttribute(attribute, fn) { + const schemas = this.hedSchemas.schemas.values() + for (const schema of schemas) { + const tags = schema.entries.definitions + .get('tags') + .getEntriesWithBooleanAttribute(attribute) + for (const tag of tags) { + fn(tag.name) + } + } + } + checkIfTagUnitClassUnitsAreValid(tag) { + if (tag.existsInSchema || !tag.hasUnitClass) { + return + } + const [foundUnit, validUnit, value] = this.validateUnits(tag) + if (!foundUnit && this.options.checkForWarnings) { + const defaultUnit = tag.defaultUnit + this.pushIssue('unitClassDefaultUsed', { + tag: tag.originalTag, + defaultUnit, + }) + } else if (!validUnit) { + const tagUnitClassUnits = Array.from(tag.validUnits).map( + (unit) => unit.name, + ) + this.pushIssue('unitClassInvalidUnit', { + tag: tag.originalTag, + unitClassUnits: tagUnitClassUnits.sort().join(','), + }) + } else { + const validValue = this.validateValue(value, true) + if (!validValue) { + this.pushIssue('invalidValue', { tag: tag.originalTag }) + } + } + } + checkValueTagSyntax(tag) { + if (tag.takesValue && !tag.hasUnitClass) { + const isValidValue = this.validateValue( + tag.formattedTagName, + tag.takesValueTag.hasAttributeName('isNumeric'), + ) + if (!isValidValue) { + this.pushIssue('invalidValue', { tag: tag.originalTag }) + } + } + } + validateUnits(tag) { + const originalTagUnitValue = tag.originalTagName + const tagUnitClassUnits = tag.validUnits + const validUnits = tag.schema.entries.allUnits + const unitStrings = Array.from(validUnits.keys()) + unitStrings.sort((first, second) => { + return second.length - first.length + }) + let actualUnit = getTagName(originalTagUnitValue, ' ') + let noUnitFound = false + if (actualUnit === originalTagUnitValue) { + actualUnit = '' + noUnitFound = true + } + let foundUnit, foundWrongCaseUnit, strippedValue + for (const unitName of unitStrings) { + const unit = validUnits.get(unitName) + const isPrefixUnit2 = unit.isPrefixUnit + const isUnitSymbol = unit.isUnitSymbol + for (const derivativeUnit of unit.derivativeUnits()) { + if (isPrefixUnit2 && originalTagUnitValue.startsWith(derivativeUnit)) { + foundUnit = true + noUnitFound = false + strippedValue = originalTagUnitValue + .substring(derivativeUnit.length) + .trim() + } + if (actualUnit === derivativeUnit) { + foundUnit = true + strippedValue = getParentTag(originalTagUnitValue, ' ') + } else if (actualUnit.toLowerCase() === derivativeUnit.toLowerCase()) { + if (isUnitSymbol) { + foundWrongCaseUnit = true + } else { + foundUnit = true + } + strippedValue = getParentTag(originalTagUnitValue, ' ') + } + if (foundUnit) { + const unitIsValid = tagUnitClassUnits.has(unit) + return [true, unitIsValid, strippedValue] + } + } + if (foundWrongCaseUnit) { + return [true, false, strippedValue] + } + } + return [!noUnitFound, false, originalTagUnitValue] + } + validateValue(value, isNumeric) { + if (value === '#') { + return true + } + if (isNumeric) { + return isNumber(value) + } + const hed3ValidValueCharacters = /^[-a-zA-Z0-9.$%^+_; ]+$/ + return hed3ValidValueCharacters.test(value) + } + checkDefinitionSyntax(tagGroup) { + const definitionShortTag = 'definition' + const defExpandShortTag = 'def-expand' + const defShortTag = 'def' + const definitionParentTag = + this.getStandardSchemaParsedTag(definitionShortTag) + const defExpandParentTag = + this.getStandardSchemaParsedTag(defExpandShortTag) + const defParentTag = this.getStandardSchemaParsedTag(defShortTag) + let definitionTagFound = false + let definitionName + for (const tag of tagGroup.tags) { + if (tag instanceof ParsedHedGroup) { + continue + } + if (tag.isDescendantOf(definitionParentTag)) { + definitionTagFound = true + definitionName = tag.originalTagName + break + } + } + if (!definitionTagFound) { + return + } + let tagGroupValidated = false + let tagGroupIssueGenerated = false + for (const tag of tagGroup.tags) { + if (tag instanceof ParsedHedGroup) { + if (tagGroupValidated && !tagGroupIssueGenerated) { + this.pushIssue('multipleTagGroupsInDefinition', { + definition: definitionName, + }) + tagGroupIssueGenerated = true + continue + } + tagGroupValidated = true + for (const innerTag of tag.tagIterator()) { + const nestedDefinitionParentTags = [ + definitionParentTag, + defExpandParentTag, + defParentTag, + ] + if ( + nestedDefinitionParentTags.some((parentTag) => { + return innerTag.isDescendantOf(parentTag) + }) + ) { + this.pushIssue('nestedDefinition', { + definition: definitionName, + }) + } + } + } else if ( + definitionTagFound && + !tag.isDescendantOf(definitionParentTag) + ) { + this.pushIssue('illegalDefinitionGroupTag', { + tag: tag.originalTag, + definition: definitionName, + }) + } + } + } + checkForMissingDefinitions(tag, defShortTag = 'Def') { + const defParentTags = getParsedParentTags(this.hedSchemas, defShortTag) + if (!tag.isDescendantOf(defParentTags.get(tag.schema))) { + return + } + const defName = ParsedHedGroup.findDefinitionName( + tag.canonicalTag, + defShortTag, + ) + if (!this.definitions.has(defName)) { + this.pushIssue('missingDefinition', { definition: defName }) + } + } + checkTemporalSyntax(tagGroup) { + if (!tagGroup.isTemporalGroup) { + return + } + const definitionName = this._getTemporalDefinitionName(tagGroup) + const defExpandChildren = tagGroup.defExpandChildren + const defTags = tagGroup.defTags ?? [] + if (tagGroup.defCount === 0) { + this.pushIssue('temporalWithoutDefinition', { + tagGroup: tagGroup.originalTag, + }) + } + const allowedTags = [ + this.getStandardSchemaParsedTag( + tagGroup.isOnsetGroup ? 'Onset' : 'Offset', + ), + ...defExpandChildren, + ...defTags, + ] + const remainingTags = (0, import_differenceWith2.default)( + tagGroup.tags, + allowedTags, + (ours, theirs) => ours.equivalent(theirs), + ) + const allowedRemainingTags = tagGroup.isOnsetGroup ? 1 : 0 + if ( + remainingTags.length > allowedRemainingTags || + remainingTags.filter((tag) => tag instanceof ParsedHedTag).length > 0 + ) { + this.pushIssue('extraTagsInTemporal', { + definition: definitionName, + }) + } + } + _getTemporalDefinitionName(tagGroup) { + if (!tagGroup.isTemporalGroup) { + throw new Error( + 'Internal validator function "Hed3Validator._getTemporalDefinitionName()" called outside of its intended context', + ) + } + try { + return tagGroup.defNameAndValue + } catch (e) { + if (e instanceof IssueError) { + this.issues.push(e.issue) + return 'Multiple definition tags found' + } + } + } + checkForInvalidTopLevelTags() { + for (const topLevelTag of this.parsedString.topLevelTags) { + if ( + !hedStringIsAGroup(topLevelTag.formattedTag) && + (topLevelTag.hasAttribute(tagGroupType) || + topLevelTag.parentHasAttribute(tagGroupType)) + ) { + this.pushIssue('invalidTopLevelTag', { + tag: topLevelTag.originalTag, + }) + } + } + } + checkForInvalidTopLevelTagGroupTags() { + const topLevelTagGroupTagsFound = {} + for (const tag of this.parsedString.tags) { + if ( + tag.hasAttribute(topLevelTagGroupType) || + tag.parentHasAttribute(topLevelTagGroupType) + ) { + let tagFound = false + this.parsedString.topLevelTagGroups.forEach((tagGroup, index) => { + if (tagGroup.includes(tag)) { + tagFound = true + if (topLevelTagGroupTagsFound[index]) { + this.pushIssue('multipleTopLevelTagGroupTags', { + tag: tag.originalTag, + otherTag: topLevelTagGroupTagsFound[index], + }) + } else { + topLevelTagGroupTagsFound[index] = tag.originalTag + } + } + }) + if (!tagFound) { + this.pushIssue('invalidTopLevelTagGroupTag', { + tag: tag.originalTag, + }) + } + } + } + } + getStandardSchemaParsedTag(shortTag) { + return getParsedParentTags(this.hedSchemas, shortTag).get( + this.hedSchemas.standardSchema, + ) + } +} + +// validator/event/init.js +var initiallyValidateHedString = function ( + hedString, + hedSchemas, + options, + definitions = null, +) { + const doSemanticValidation = hedSchemas instanceof Schemas + if (!doSemanticValidation) { + hedSchemas = new Schemas(null) + } + let parsedString, parsingIssues + if (hedString instanceof ParsedHedString) { + parsedString = hedString + parsingIssues = { syntax: [], delimiter: [] } + } else { + ;[parsedString, parsingIssues] = parseHedString(hedString, hedSchemas) + } + if (parsedString === null) { + return [null, [].concat(Object.values(parsingIssues)), null] + } else if (parsingIssues.syntax.length + parsingIssues.delimiter.length > 0) { + hedSchemas = new Schemas(null) + } + let hedValidator + switch (hedSchemas.generation) { + case 0: + hedValidator = new HedValidator(parsedString, hedSchemas, options) + break + case 2: + hedValidator = new Hed2Validator(parsedString, hedSchemas, options) + break + case 3: + hedValidator = new Hed3Validator( + parsedString, + hedSchemas, + definitions, + options, + ) + } + const allParsingIssues = [].concat(...Object.values(parsingIssues)) + return [parsedString, allParsingIssues, hedValidator] +} +var validateHedString = function ( + hedString, + hedSchemas, + checkForWarnings = false, + expectValuePlaceholderString = false, +) { + const [parsedString, parsedStringIssues, hedValidator] = + initiallyValidateHedString(hedString, hedSchemas, { + checkForWarnings, + expectValuePlaceholderString, + }) + if (parsedString === null) { + return [false, parsedStringIssues] + } + hedValidator.validateStringLevel() + const issues = [].concat(parsedStringIssues, hedValidator.issues) + return [issues.length === 0, issues] +} +var validateHedEvent = function ( + hedString, + hedSchemas, + checkForWarnings = false, +) { + const [parsedString, parsedStringIssues, hedValidator] = + initiallyValidateHedString(hedString, hedSchemas, { + checkForWarnings, + }) + if (parsedString === null) { + return [false, parsedStringIssues] + } + hedValidator.validateEventLevel() + const issues = [].concat(parsedStringIssues, hedValidator.issues) + return [issues.length === 0, issues] +} +var validateHedEventWithDefinitions = function ( + hedString, + hedSchemas, + definitions, + checkForWarnings = false, +) { + const [parsedString, parsedStringIssues, hedValidator] = + initiallyValidateHedString( + hedString, + hedSchemas, + { checkForWarnings }, + definitions, + ) + if (parsedString === null) { + return [false, parsedStringIssues] + } + hedValidator.validateEventLevel() + const issues = [].concat(parsedStringIssues, hedValidator.issues) + return [issues.length === 0, issues] +} + +// utils/map.js +init_define_process() +var import_isEqual = __toESM(require_isEqual()) +var filterNonEqualDuplicates = function ( + list, + equalityFunction = import_isEqual.default, +) { + const map = /* @__PURE__ */ new Map() + const duplicateKeySet = /* @__PURE__ */ new Set() + const duplicates = [] + for (const [key, value] of list) { + if (!map.has(key)) { + map.set(key, value) + } else if (!equalityFunction(map.get(key), value)) { + duplicates.push([key, value]) + duplicateKeySet.add(key) + } + } + for (const key of duplicateKeySet) { + const value = map.get(key) + map.delete(key) + duplicates.push([key, value]) + } + return [map, duplicates] +} + +// validator/dataset.js +var parseDefinitions = function (parsedHedStrings) { + const issues = [] + const parsedHedStringDefinitions = parsedHedStrings.flatMap( + (parsedHedString) => { + return parsedHedString.definitions + }, + ) + const [definitionMap, definitionDuplicates] = filterNonEqualDuplicates( + parsedHedStringDefinitions, + (definition, other) => { + return definition.equivalent(other) + }, + ) + for (const [duplicateKey, duplicateValue] of definitionDuplicates) { + issues.push( + generateIssue('duplicateDefinition', { + definition: duplicateKey, + tagGroup: duplicateValue.originalTag, + }), + ) + } + return [definitionMap, issues] +} +var checkGroupForTemporalOrder = (parsedGroup, activeScopes) => { + if (parsedGroup.isOnsetGroup) { + activeScopes.add(parsedGroup.defNameAndValue) + } + if ( + parsedGroup.isOffsetGroup && + !activeScopes.delete(parsedGroup.defNameAndValue) + ) { + return [ + generateIssue('inactiveOnset', { + definition: parsedGroup.defNameAndValue, + }), + ] + } + return [] +} +var validateTemporalOrder = function (hedStrings, hedSchemas) { + const issues = [] + const activeScopes = /* @__PURE__ */ new Set() + for (const hedString of hedStrings) { + const temporalGroups = hedString.tagGroups.filter( + (tagGroup) => tagGroup.isTemporalGroup, + ) + const defNames = temporalGroups.map((tagGroup) => tagGroup.defNameAndValue) + const [defToGroup, duplicates] = filterNonEqualDuplicates( + (0, import_zip.default)(defNames, temporalGroups), + (tagGroup, other) => tagGroup.equivalent(other), + ) + const duplicateDefs = new Set(duplicates.map((duplicate) => duplicate[0])) + for (const duplicate of duplicateDefs) { + issues.push( + generateIssue('duplicateTemporal', { + string: hedString.hedString, + definition: duplicate, + }), + ) + } + for (const parsedGroup of defToGroup.values()) { + issues.push(...checkGroupForTemporalOrder(parsedGroup, activeScopes)) + } + } + return issues +} +var validateDataset = function (definitions, hedStrings, hedSchemas) { + const temporalOrderIssues = validateTemporalOrder(hedStrings, hedSchemas) + return temporalOrderIssues +} +var validateHedEvents = function ( + parsedHedStrings, + hedSchemas, + definitions, + checkForWarnings, +) { + let stringsValid = true + let stringIssues = [] + for (const hedString of parsedHedStrings) { + const [valid, issues] = validateHedEventWithDefinitions( + hedString, + hedSchemas, + definitions, + checkForWarnings, + ) + stringsValid = stringsValid && valid + stringIssues = stringIssues.concat(issues) + } + return [stringsValid, stringIssues] +} +var validateHedDataset = function ( + hedStrings, + hedSchemas, + checkForWarnings = false, +) { + if (hedStrings.length === 0) { + return [true, []] + } + const [parsedHedStrings, parsingIssues] = parseHedStrings( + hedStrings, + hedSchemas, + ) + const [definitions, definitionIssues] = parseDefinitions(parsedHedStrings) + const [stringsValid, stringIssues] = validateHedEvents( + parsedHedStrings, + hedSchemas, + definitions, + checkForWarnings, + ) + const datasetIssues = validateDataset( + definitions, + parsedHedStrings, + hedSchemas, + ) + const issues = stringIssues.concat( + ...Object.values(parsingIssues), + definitionIssues, + datasetIssues, + ) + return [issues.length === 0, issues] +} +var validateHedDatasetWithContext = function ( + hedStrings, + contextHedStrings, + hedSchemas, + checkForWarnings = false, +) { + if (hedStrings.length + contextHedStrings.length === 0) { + return [true, []] + } + const [parsedHedStrings, parsingIssues] = parseHedStrings( + hedStrings, + hedSchemas, + ) + const [parsedContextHedStrings, contextParsingIssues] = parseHedStrings( + contextHedStrings, + hedSchemas, + ) + const combinedParsedHedStrings = parsedHedStrings.concat( + parsedContextHedStrings, + ) + const [definitions, definitionIssues] = parseDefinitions( + combinedParsedHedStrings, + ) + const [stringsValid, stringIssues] = validateHedEvents( + parsedHedStrings, + hedSchemas, + definitions, + checkForWarnings, + ) + const datasetIssues = validateDataset( + definitions, + parsedHedStrings, + hedSchemas, + ) + const issues = stringIssues.concat( + ...Object.values(parsingIssues), + ...Object.values(contextParsingIssues), + definitionIssues, + datasetIssues, + ) + return [issues.length === 0, issues] +} + +// validator/bids/schema.js +init_define_process() +var import_semver2 = __toESM(require_semver2()) + +// validator/schema/init.js +init_define_process() +var import_zip2 = __toESM(require_zip()) +var import_semver = __toESM(require_semver2()) + +// validator/schema/hed2.js +init_define_process() +var import_flattenDeep3 = __toESM(require_flattenDeep()) + +// validator/schema/parser.js +init_define_process() +var import_flattenDeep2 = __toESM(require_flattenDeep()) +var SchemaParser = class { + constructor(rootElement) { + this.rootElement = rootElement + } + populateDictionaries() { + this.populateUnitClassDictionaries() + this.populateUnitModifierDictionaries() + this.populateTagDictionaries() + } + populateTagDictionaries() {} + populateUnitClassDictionaries() {} + populateUnitModifierDictionaries() {} + getAllChildTags( + parentElement, + elementName = 'node', + excludeTakeValueTags = true, + ) { + if (excludeTakeValueTags && this.getElementTagName(parentElement) === '#') { + return [] + } + const tagElementChildren = this.getElementsByName( + elementName, + parentElement, + ) + const childTags = (0, import_flattenDeep2.default)( + tagElementChildren.map((child) => + this.getAllChildTags(child, elementName, excludeTakeValueTags), + ), + ) + childTags.push(parentElement) + return childTags + } + getElementsByName(elementName = 'node', parentElement = this.rootElement) { + return find(parentElement, '//' + elementName) + } + getTagPathFromTagElement(tagElement) { + const ancestorTagNames = this.getAncestorTagNames(tagElement) + ancestorTagNames.unshift(this.getElementTagName(tagElement)) + ancestorTagNames.reverse() + return ancestorTagNames.join('/') + } + getAncestorTagNames(tagElement) { + const ancestorTags = [] + let parentTagName = this.getParentTagName(tagElement) + let parentElement = tagElement.$parent + while (parentTagName) { + ancestorTags.push(parentTagName) + parentTagName = this.getParentTagName(parentElement) + parentElement = parentElement.$parent + } + return ancestorTags + } + getParentTagName(tagElement) { + const parentTagElement = tagElement.$parent + if (parentTagElement && parentTagElement.$parent) { + return this.getElementTagName(parentTagElement) + } else { + return '' + } + } + getElementTagName(element) { + return element.name[0]._ + } + getElementTagValue(element, tagName) { + return element[tagName][0]._ + } + stringListToLowercaseTrueDictionary(stringList) { + const lowercaseDictionary = {} + for (const stringElement of stringList) { + lowercaseDictionary[stringElement.toLowerCase()] = true + } + return lowercaseDictionary + } +} + +// validator/schema/types.js +init_define_process() +var import_pluralize2 = __toESM(require_pluralize()) +import_pluralize2.default.addUncountableRule('hertz') +var SchemaAttributes = class { + tags + tagAttributes + tagUnitClasses + unitClasses + unitClassAttributes + unitAttributes + unitModifiers + hasUnitClasses + hasUnitModifiers + constructor(schemaParser) { + this.tags = schemaParser.tags + this.tagAttributes = schemaParser.tagAttributes + this.tagUnitClasses = schemaParser.tagUnitClasses + this.unitClasses = schemaParser.unitClasses + this.unitClassAttributes = schemaParser.unitClassAttributes + this.unitAttributes = schemaParser.unitAttributes + this.unitModifiers = schemaParser.unitModifiers + this.hasUnitClasses = schemaParser.hasUnitClasses + this.hasUnitModifiers = schemaParser.hasUnitModifiers + } + tagHasAttribute(tag, tagAttribute) { + if (!(tagAttribute in this.tagAttributes)) { + return null + } + return tag.toLowerCase() in this.tagAttributes[tagAttribute] + } +} +var SchemaEntries = class extends Memoizer { + properties + attributes + definitions + constructor(schemaParser) { + super() + this.properties = new SchemaEntryManager(schemaParser.properties) + this.attributes = new SchemaEntryManager(schemaParser.attributes) + this.definitions = schemaParser.definitions + } + get unitClassMap() { + return this.definitions.get('unitClasses') + } + get allUnits() { + return this._memoize('allUnits', () => { + const units = [] + for (const unitClass of this.unitClassMap.values()) { + const unitClassUnits = unitClass.units + units.push(...unitClassUnits) + } + return new Map(units) + }) + } + get SIUnitModifiers() { + const unitModifiers = this.definitions.get('unitModifiers') + return unitModifiers.getEntriesWithBooleanAttribute('SIUnitModifier') + } + get SIUnitSymbolModifiers() { + const unitModifiers = this.definitions.get('unitModifiers') + return unitModifiers.getEntriesWithBooleanAttribute('SIUnitSymbolModifier') + } + tagHasAttribute(tag, tagAttribute) { + if (!this.definitions.get('tags').hasEntry(tag)) { + return false + } + return this.definitions + .get('tags') + .getEntry(tag) + .hasAttributeName(tagAttribute) + } +} +var SchemaEntryManager = class extends Memoizer { + _definitions + constructor(definitions) { + super() + this._definitions = definitions + } + [Symbol.iterator]() { + return this._definitions.entries() + } + values() { + return this._definitions.values() + } + hasEntry(name) { + return this._definitions.has(name) + } + getEntry(name) { + return this._definitions.get(name) + } + getEntriesWithBooleanAttribute(booleanPropertyName) { + return this._memoize(booleanPropertyName, () => { + return this.filter(([_, v]) => { + return v.hasAttributeName(booleanPropertyName) + }) + }) + } + filter(fn) { + const pairArray = Array.from(this._definitions.entries()) + return new Map(pairArray.filter((entry) => fn(entry))) + } + get length() { + return this._definitions.size + } +} +var SchemaEntry = class { + _name + booleanAttributes + valueAttributes + booleanAttributeNames + valueAttributeNames + constructor(name, booleanAttributes, valueAttributes) { + this._name = name + this.booleanAttributes = booleanAttributes + this.valueAttributes = valueAttributes + this.booleanAttributeNames = /* @__PURE__ */ new Set() + for (const attribute of booleanAttributes) { + this.booleanAttributeNames.add(attribute.name) + } + this.valueAttributeNames = /* @__PURE__ */ new Map() + for (const [attributeName, value] of valueAttributes) { + this.valueAttributeNames.set(attributeName.name, value) + } + } + get name() { + return this._name + } + hasAttribute(attribute) { + return this.booleanAttributes.has(attribute) + } + getAttributeValue(attribute, alwaysReturnArray = false) { + return SchemaEntry._getMapArrayValue( + this.valueAttributes, + attribute, + alwaysReturnArray, + ) + } + hasAttributeName(attributeName) { + return this.booleanAttributeNames.has(attributeName) + } + getNamedAttributeValue(attributeName, alwaysReturnArray = false) { + return SchemaEntry._getMapArrayValue( + this.valueAttributeNames, + attributeName, + alwaysReturnArray, + ) + } + static _getMapArrayValue(map, key, alwaysReturnArray) { + const value = map.get(key) + if (!alwaysReturnArray && Array.isArray(value) && value.length === 1) { + return value[0] + } else { + return value + } + } +} +var categoryProperty = 'categoryProperty' +var typeProperty = 'typeProperty' +var SchemaProperty = class extends SchemaEntry { + _propertyType + constructor(name, propertyType) { + super(name, /* @__PURE__ */ new Set(), /* @__PURE__ */ new Map()) + this._propertyType = propertyType + } + get isCategoryProperty() { + return this._propertyType === categoryProperty + } + get isTypeProperty() { + return this._propertyType === typeProperty + } +} +var nodeProperty = new SchemaProperty('nodeProperty', categoryProperty) +var attributeProperty = new SchemaProperty( + 'attributeProperty', + categoryProperty, +) +var stringProperty = new SchemaProperty('stringProperty', typeProperty) +var SchemaAttribute = class extends SchemaEntry { + _categoryProperty + _typeProperty + constructor(name, properties) { + super(name, /* @__PURE__ */ new Set(), /* @__PURE__ */ new Map()) + const categoryProperties = properties.filter( + (property) => property.isCategoryProperty, + ) + this._categoryProperty = + categoryProperties.length === 0 ? nodeProperty : categoryProperties[0] + const typeProperties = properties.filter( + (property) => property.isTypeProperty, + ) + this._typeProperty = + typeProperties.length === 0 ? stringProperty : typeProperties[0] + } + get categoryProperty() { + return this._categoryProperty + } + get typeProperty() { + return this._typeProperty + } +} +var SchemaUnit = class extends SchemaEntry { + _derivativeUnits + constructor(name, booleanAttributes, valueAttributes, unitModifiers) { + super(name, booleanAttributes, valueAttributes) + this._derivativeUnits = [name] + if (!this.isSIUnit) { + return + } + const matchingModifiers = unitModifiers.filter(([_, unitModifier]) => { + return this.isUnitSymbol === unitModifier.isSIUnitSymbolModifier + }) + for (const modifierName of matchingModifiers.keys()) { + this._derivativeUnits.push(modifierName + name) + } + if (!this.isUnitSymbol) { + const pluralUnit = import_pluralize2.default.plural(name) + this._derivativeUnits.push(pluralUnit) + const SIUnitModifiers = + unitModifiers.getEntriesWithBooleanAttribute('SIUnitModifier') + for (const modifierName of SIUnitModifiers.keys()) { + this._derivativeUnits.push(modifierName + pluralUnit) + } + } + } + *derivativeUnits() { + for (const unit of this._derivativeUnits) { + yield unit + } + } + get isPrefixUnit() { + return this.hasAttributeName('unitPrefix') + } + get isSIUnit() { + return this.hasAttributeName('SIUnit') + } + get isUnitSymbol() { + return this.hasAttributeName('unitSymbol') + } +} +var SchemaUnitClass = class extends SchemaEntry { + _units + constructor(name, booleanAttributes, valueAttributes, units) { + super(name, booleanAttributes, valueAttributes) + this._units = units + } + get units() { + return new Map(this._units) + } + get defaultUnit() { + return this._units.get(this.getNamedAttributeValue('defaultUnits')) + } +} +var SchemaUnitModifier = class extends SchemaEntry { + constructor(name, booleanAttributes, valueAttributes) { + super(name, booleanAttributes, valueAttributes) + } + get isSIUnitModifier() { + return this.hasAttributeName('SIUnitModifier') + } + get isSIUnitSymbolModifier() { + return this.hasAttributeName('SIUnitSymbolModifier') + } +} +var SchemaValueClass = class extends SchemaEntry { + constructor(name, booleanAttributes, valueAttributes) { + super(name, booleanAttributes, valueAttributes) + } +} +var SchemaTag = class extends SchemaEntry { + _unitClasses + constructor(name, booleanAttributes, valueAttributes, unitClasses) { + super(name, booleanAttributes, valueAttributes) + this._unitClasses = unitClasses ?? [] + } + get unitClasses() { + return this._unitClasses.slice() + } + get hasUnitClasses() { + return this._unitClasses.length !== 0 + } +} + +// validator/schema/hed2.js +var defaultUnitForTagAttribute = 'default' +var defaultUnitForUnitClassAttribute = 'defaultUnits' +var defaultUnitForOldUnitClassAttribute = 'default' +var extensionAllowedAttribute = 'extensionAllowed' +var tagDictionaryKeys = [ + 'default', + 'extensionAllowed', + 'isNumeric', + 'position', + 'predicateType', + 'recommended', + 'required', + 'requireChild', + 'tags', + 'takesValue', + 'unique', + 'unitClass', +] +var unitClassDictionaryKeys = ['SIUnit', 'unitSymbol'] +var unitModifierDictionaryKeys = ['SIUnitModifier', 'SIUnitSymbolModifier'] +var tagsDictionaryKey = 'tags' +var tagUnitClassAttribute = 'unitClass' +var unitClassElement = 'unitClass' +var unitClassUnitElement = 'unit' +var unitClassUnitsElement = 'units' +var unitModifierElement = 'unitModifier' +var lc = (str) => str.toLowerCase() +var Hed2SchemaParser = class extends SchemaParser { + parse() { + this.populateDictionaries() + return new SchemaAttributes(this) + } + populateTagDictionaries() { + this.tagAttributes = {} + for (const dictionaryKey of tagDictionaryKeys) { + const [tags, tagElements] = this.getTagsByAttribute(dictionaryKey) + if (dictionaryKey === extensionAllowedAttribute) { + const tagDictionary = this.stringListToLowercaseTrueDictionary(tags) + const childTagElements = (0, import_flattenDeep3.default)( + tagElements.map((tagElement) => this.getAllChildTags(tagElement)), + ) + const childTags = childTagElements.map((tagElement) => { + return this.getTagPathFromTagElement(tagElement) + }) + const childDictionary = + this.stringListToLowercaseTrueDictionary(childTags) + this.tagAttributes[extensionAllowedAttribute] = Object.assign( + {}, + tagDictionary, + childDictionary, + ) + } else if (dictionaryKey === defaultUnitForTagAttribute) { + this.populateTagToAttributeDictionary(tags, tagElements, dictionaryKey) + } else if (dictionaryKey === tagUnitClassAttribute) { + this.populateTagUnitClassDictionary(tags, tagElements) + } else if (dictionaryKey === tagsDictionaryKey) { + const tags2 = this.getAllTags()[0] + this.tags = tags2.map(lc) + } else { + this.tagAttributes[dictionaryKey] = + this.stringListToLowercaseTrueDictionary(tags) + } + } + } + populateUnitClassDictionaries() { + const unitClassElements = this.getElementsByName(unitClassElement) + if (unitClassElements.length === 0) { + this.hasUnitClasses = false + return + } + this.hasUnitClasses = true + this.populateUnitClassUnitsDictionary(unitClassElements) + this.populateUnitClassDefaultUnitDictionary(unitClassElements) + } + populateUnitClassUnitsDictionary(unitClassElements) { + this.unitClasses = {} + this.unitClassAttributes = {} + this.unitAttributes = {} + for (const unitClassKey of unitClassDictionaryKeys) { + this.unitAttributes[unitClassKey] = {} + } + for (const unitClassElement2 of unitClassElements) { + const unitClassName = this.getElementTagName(unitClassElement2) + this.unitClassAttributes[unitClassName] = {} + const units = + unitClassElement2[unitClassUnitsElement][0][unitClassUnitElement] + if (units === void 0) { + const elementUnits = this.getElementTagValue( + unitClassElement2, + unitClassUnitsElement, + ) + const units2 = elementUnits.split(',') + this.unitClasses[unitClassName] = units2.map(lc) + continue + } + this.unitClasses[unitClassName] = units.map((element) => element._) + for (const unit of units) { + if (unit.$) { + const unitName = unit._ + for (const unitClassKey of unitClassDictionaryKeys) { + this.unitAttributes[unitClassKey][unitName] = unit.$[unitClassKey] + } + } + } + } + } + populateUnitClassDefaultUnitDictionary(unitClassElements) { + for (const unitClassElement2 of unitClassElements) { + const elementName = this.getElementTagName(unitClassElement2) + const defaultUnit = unitClassElement2.$[defaultUnitForUnitClassAttribute] + if (defaultUnit === void 0) { + this.unitClassAttributes[elementName][ + defaultUnitForUnitClassAttribute + ] = [unitClassElement2.$[defaultUnitForOldUnitClassAttribute]] + } else { + this.unitClassAttributes[elementName][ + defaultUnitForUnitClassAttribute + ] = [defaultUnit] + } + } + } + populateUnitModifierDictionaries() { + this.unitModifiers = {} + const unitModifierElements = this.getElementsByName(unitModifierElement) + if (unitModifierElements.length === 0) { + this.hasUnitModifiers = false + return + } + this.hasUnitModifiers = true + for (const unitModifierKey of unitModifierDictionaryKeys) { + this.unitModifiers[unitModifierKey] = {} + } + for (const unitModifierElement2 of unitModifierElements) { + const unitModifierName = this.getElementTagName(unitModifierElement2) + if (unitModifierElement2.$) { + for (const unitModifierKey of unitModifierDictionaryKeys) { + if (unitModifierElement2.$[unitModifierKey] !== void 0) { + this.unitModifiers[unitModifierKey][unitModifierName] = + unitModifierElement2.$[unitModifierKey] + } + } + } + } + } + populateTagToAttributeDictionary(tagList, tagElementList, attributeName) { + this.tagAttributes[attributeName] = {} + for (let i = 0; i < tagList.length; i++) { + const tag = tagList[i] + this.tagAttributes[attributeName][tag.toLowerCase()] = + tagElementList[i].$[attributeName] + } + } + populateTagUnitClassDictionary(tagList, tagElementList) { + this.tagUnitClasses = {} + for (let i = 0; i < tagList.length; i++) { + const tag = tagList[i] + const unitClassString = tagElementList[i].$[tagUnitClassAttribute] + if (unitClassString) { + this.tagUnitClasses[tag.toLowerCase()] = unitClassString.split(',') + } + } + } + getTagsByAttribute(attributeName) { + const tags = [] + const tagElements = find(this.rootElement, '//node[@' + attributeName + ']') + for (const attributeTagElement of tagElements) { + const tag = this.getTagPathFromTagElement(attributeTagElement) + tags.push(tag) + } + return [tags, tagElements] + } + getAllTags(tagElementName = 'node', excludeTakeValueTags = true) { + const tags = [] + const tagElements = find(this.rootElement, '//' + tagElementName) + for (const tagElement of tagElements) { + if (excludeTakeValueTags && this.getElementTagName(tagElement) === '#') { + continue + } + const tag = this.getTagPathFromTagElement(tagElement) + tags.push(tag) + } + return [tags, tagElements] + } +} + +// validator/schema/hed3.js +init_define_process() +var lc2 = (str) => str.toLowerCase() +var Hed3SchemaParser = class extends SchemaParser { + constructor(rootElement) { + super(rootElement) + this._versionDefinitions = {} + } + parse() { + this.populateDictionaries() + return new SchemaEntries(this) + } + populateDictionaries() { + this.parseProperties() + this.parseAttributes() + this.definitions = /* @__PURE__ */ new Map() + this.parseUnitModifiers() + this.parseUnitClasses() + this.parseTags() + } + static attributeFilter(propertyName) { + return (element) => { + const validProperty = propertyName + if (!element.property) { + return false + } + for (const property of element.property) { + if (property.name[0]._ === validProperty) { + return true + } + } + return false + } + } + getAllTags(tagElementName = 'node') { + const tagElements = find(this.rootElement, '//' + tagElementName) + const tags = tagElements.map((element) => + this.getTagPathFromTagElement(element), + ) + return [tags, tagElements] + } + parseProperties() { + const propertyDefinitions = this.getElementsByName('propertyDefinition') + this.properties = /* @__PURE__ */ new Map() + for (const definition of propertyDefinitions) { + const propertyName = this.getElementTagName(definition) + if ( + this._versionDefinitions.categoryProperties && + this._versionDefinitions.categoryProperties.has(propertyName) + ) { + this.properties.set( + propertyName, + new SchemaProperty(propertyName, 'categoryProperty'), + ) + } else if ( + this._versionDefinitions.typeProperties && + this._versionDefinitions.typeProperties.has(propertyName) + ) { + this.properties.set( + propertyName, + new SchemaProperty(propertyName, 'typeProperty'), + ) + } + } + } + parseAttributes() { + const attributeDefinitions = this.getElementsByName( + 'schemaAttributeDefinition', + ) + this.attributes = /* @__PURE__ */ new Map() + for (const definition of attributeDefinitions) { + const attributeName = this.getElementTagName(definition) + const propertyElements = definition.property + let properties + if (propertyElements === void 0) { + properties = [] + } else { + properties = propertyElements.map((element) => + this.properties.get(element.name[0]._), + ) + } + this.attributes.set( + attributeName, + new SchemaAttribute(attributeName, properties), + ) + } + if (this._addAttributes) { + this._addAttributes() + } + } + parseValueClasses() { + const valueClasses = /* @__PURE__ */ new Map() + const [booleanAttributeDefinitions, valueAttributeDefinitions] = + this._parseDefinitions('valueClass') + for (const [name, valueAttributes] of valueAttributeDefinitions) { + const booleanAttributes = booleanAttributeDefinitions.get(name) + valueClasses.set( + name, + new SchemaValueClass(name, booleanAttributes, valueAttributes), + ) + } + this.definitions.set('valueClasses', new SchemaEntryManager(valueClasses)) + } + parseUnitModifiers() { + const unitModifiers = /* @__PURE__ */ new Map() + const [booleanAttributeDefinitions, valueAttributeDefinitions] = + this._parseDefinitions('unitModifier') + for (const [name, valueAttributes] of valueAttributeDefinitions) { + const booleanAttributes = booleanAttributeDefinitions.get(name) + unitModifiers.set( + name, + new SchemaUnitModifier(name, booleanAttributes, valueAttributes), + ) + } + this.definitions.set('unitModifiers', new SchemaEntryManager(unitModifiers)) + } + parseUnitClasses() { + const unitClasses = /* @__PURE__ */ new Map() + const [booleanAttributeDefinitions, valueAttributeDefinitions] = + this._parseDefinitions('unitClass') + const unitClassUnits = this.parseUnits() + for (const [name, valueAttributes] of valueAttributeDefinitions) { + const booleanAttributes = booleanAttributeDefinitions.get(name) + unitClasses.set( + name, + new SchemaUnitClass( + name, + booleanAttributes, + valueAttributes, + unitClassUnits.get(name), + ), + ) + } + this.definitions.set('unitClasses', new SchemaEntryManager(unitClasses)) + } + parseUnits() { + const unitClassUnits = /* @__PURE__ */ new Map() + const unitClassElements = this.getElementsByName('unitClassDefinition') + const unitModifiers = this.definitions.get('unitModifiers') + for (const element of unitClassElements) { + const elementName = this.getElementTagName(element) + const units = /* @__PURE__ */ new Map() + unitClassUnits.set(elementName, units) + if (element.unit === void 0) { + continue + } + const [unitBooleanAttributeDefinitions, unitValueAttributeDefinitions] = + this._parseAttributeElements(element.unit, this.getElementTagName) + for (const [name, valueAttributes] of unitValueAttributeDefinitions) { + const booleanAttributes = unitBooleanAttributeDefinitions.get(name) + units.set( + name, + new SchemaUnit( + name, + booleanAttributes, + valueAttributes, + unitModifiers, + ), + ) + } + } + return unitClassUnits + } + parseTags() { + const [tags, tagElements] = this.getAllTags() + const lowercaseTags = tags.map(lc2) + this.tags = new Set(lowercaseTags) + const [booleanAttributeDefinitions, valueAttributeDefinitions] = + this._parseAttributeElements(tagElements, (element) => + this.getTagPathFromTagElement(element), + ) + const recursiveAttributes = Array.from(this.attributes.values()).filter( + (attribute) => attribute.hasAttributeName('recursive'), + ) + const unitClasses = this.definitions.get('unitClasses') + const tagUnitClassAttribute2 = this.attributes.get('unitClass') + const tagUnitClassDefinitions = /* @__PURE__ */ new Map() + const recursiveChildren = /* @__PURE__ */ new Map() + tags.forEach((tagName, index) => { + const tagElement = tagElements[index] + const valueAttributes = valueAttributeDefinitions.get(tagName) + if (valueAttributes.has(tagUnitClassAttribute2)) { + tagUnitClassDefinitions.set( + tagName, + valueAttributes.get(tagUnitClassAttribute2).map((unitClassName) => { + return unitClasses.getEntry(unitClassName) + }), + ) + valueAttributes.delete(tagUnitClassAttribute2) + } + for (const attribute of recursiveAttributes) { + const children2 = recursiveChildren.get(attribute) ?? [] + if (booleanAttributeDefinitions.get(tagName).has(attribute)) { + children2.push(...this.getAllChildTags(tagElement)) + } + recursiveChildren.set(attribute, children2) + } + }) + for (const [attribute, childTagElements] of recursiveChildren) { + for (const tagElement of childTagElements) { + const tagName = this.getTagPathFromTagElement(tagElement) + booleanAttributeDefinitions.get(tagName).add(attribute) + } + } + const tagEntries = /* @__PURE__ */ new Map() + for (const [name, valueAttributes] of valueAttributeDefinitions) { + const booleanAttributes = booleanAttributeDefinitions.get(name) + const unitClasses2 = tagUnitClassDefinitions.get(name) + tagEntries.set( + lc2(name), + new SchemaTag(name, booleanAttributes, valueAttributes, unitClasses2), + ) + } + for (const tagElement of tagElements) { + const tagName = this.getTagPathFromTagElement(tagElement) + const parentTagName = this.getParentTagName(tagElement) + if (parentTagName) { + tagEntries.get(lc2(tagName))._parent = tagEntries.get( + lc2(parentTagName), + ) + } + } + this.definitions.set('tags', new SchemaEntryManager(tagEntries)) + } + _parseDefinitions(category) { + const categoryTagName = category + 'Definition' + const definitionElements = this.getElementsByName(categoryTagName) + return this._parseAttributeElements( + definitionElements, + this.getElementTagName, + ) + } + _parseAttributeElements(elements, namer) { + const booleanAttributeDefinitions = /* @__PURE__ */ new Map() + const valueAttributeDefinitions = /* @__PURE__ */ new Map() + for (const element of elements) { + const [booleanAttributes, valueAttributes] = + this._parseAttributeElement(element) + const elementName = namer(element) + booleanAttributeDefinitions.set(elementName, booleanAttributes) + valueAttributeDefinitions.set(elementName, valueAttributes) + } + return [booleanAttributeDefinitions, valueAttributeDefinitions] + } + _parseAttributeElement(element) { + const booleanAttributes = /* @__PURE__ */ new Set() + const valueAttributes = /* @__PURE__ */ new Map() + const tagAttributes = element.attribute ?? [] + for (const tagAttribute of tagAttributes) { + const attributeName = this.getElementTagName(tagAttribute) + if (tagAttribute.value === void 0) { + booleanAttributes.add(this.attributes.get(attributeName)) + continue + } + const values = tagAttribute.value.map((value) => value._) + valueAttributes.set(this.attributes.get(attributeName), values) + } + return [booleanAttributes, valueAttributes] + } +} +var HedV8SchemaParser = class extends Hed3SchemaParser { + constructor(rootElement) { + super(rootElement) + this._versionDefinitions = { + typeProperties: /* @__PURE__ */ new Set(['boolProperty']), + categoryProperties: /* @__PURE__ */ new Set([ + 'unitProperty', + 'unitClassProperty', + 'unitModifierProperty', + 'valueClassProperty', + ]), + } + } + _addAttributes() { + const recursiveAttribute = new SchemaAttribute('recursive', [ + this.properties.get('boolProperty'), + attributeProperty, + ]) + this.attributes.set('recursive', recursiveAttribute) + const extensionAllowedAttribute2 = this.attributes.get('extensionAllowed') + extensionAllowedAttribute2.booleanAttributes.add(recursiveAttribute) + extensionAllowedAttribute2.booleanAttributeNames.add('recursive') + } +} + +// validator/schema/init.js +var isHed3Schema = function (xmlData) { + return ( + xmlData.HED.$.library !== void 0 || + import_semver.default.gte(xmlData.HED.$.version, '8.0.0-alpha.3') + ) +} +var buildSchemaAttributesObject = function (xmlData) { + const rootElement = xmlData.HED + setParent(rootElement, null) + if (isHed3Schema(xmlData)) { + return new HedV8SchemaParser(rootElement).parse() + } else { + return new Hed2SchemaParser(rootElement).parse() + } +} +var buildSchemaObject = function (xmlData) { + const schemaAttributes = buildSchemaAttributesObject(xmlData) + const mapping = buildMappingObject(xmlData) + if (isHed3Schema(xmlData)) { + return new Hed3Schema(xmlData, schemaAttributes, mapping) + } else { + return new Hed2Schema(xmlData, schemaAttributes, mapping) + } +} +var buildSchema2 = function (schemaDef = {}, useFallback = true) { + return loadSchema(schemaDef, useFallback).then( + ([xmlData, baseSchemaIssues]) => { + const baseSchema = buildSchemaObject(xmlData) + if (schemaDef.libraries === void 0) { + return new Schemas(baseSchema) + } + const [libraryKeys, libraryDefs] = (0, import_zip2.default)( + ...Object.entries(schemaDef.libraries), + ) + return Promise.all( + libraryDefs.map((libraryDef) => { + return loadSchema(libraryDef, false) + }), + ).then((libraryXmlDataAndIssues) => { + const [libraryXmlData, libraryXmlIssues] = (0, import_zip2.default)( + ...libraryXmlDataAndIssues, + ) + const librarySchemaObjects = libraryXmlData.map(buildSchemaObject) + const schemas = new Map( + (0, import_zip2.default)(libraryKeys, librarySchemaObjects), + ) + schemas.set('', baseSchema) + return new Schemas(schemas) + }) + }, + ) +} +var buildSchemas = function (schemaSpecs) { + if (schemaSpecs instanceof SchemasSpec) { + schemaSpecs = schemaSpecs.data + } + const schemaKeys = Array.from(schemaSpecs.keys()) + return Promise.all( + schemaKeys.map((k) => { + const spec = schemaSpecs.get(k) + return loadSchema(spec, false, false) + }), + ).then((schemaXmlDataAndIssues) => { + const [schemaXmlData, schemaXmlIssues] = (0, import_zip2.default)( + ...schemaXmlDataAndIssues, + ) + const schemaObjects = schemaXmlData.map(buildSchemaObject) + const schemas = new Map((0, import_zip2.default)(schemaKeys, schemaObjects)) + return [new Schemas(schemas), schemaXmlIssues.flat()] + }) +} + +// validator/bids/schema.js +var alphanumericRegExp = new RegExp('^[a-zA-Z0-9]+$') +function buildBidsSchemas(dataset, schemaDefinition) { + let schemasSpec + let issues + if (schemaDefinition) { + ;[schemasSpec, issues] = validateSchemasSpec(schemaDefinition) + } else if (dataset.datasetDescription.jsonData?.HEDVersion) { + ;[schemasSpec, issues] = parseSchemasSpec( + dataset.datasetDescription.jsonData.HEDVersion, + ) + } else { + ;[schemasSpec, issues] = [ + null, + [ + generateIssue('invalidSchemaSpecification', { + spec: 'no schema available', + }), + ], + ] + } + if (issues.length > 0) { + return Promise.reject(issues) + } else { + return buildSchemas(schemasSpec).then(([schemas]) => [schemas, issues]) + } +} +function validateSchemasSpec(schemasSpec) { + if (schemasSpec instanceof SchemasSpec) { + return [schemasSpec, []] + } else if (schemasSpec instanceof Map) { + const newSchemasSpec = new SchemasSpec() + newSchemasSpec.data = schemasSpec + return [newSchemasSpec, []] + } else if ( + 'version' in schemasSpec || + 'path' in schemasSpec || + 'libraries' in schemasSpec + ) { + return [convertOldSpecToSchemasSpec(schemasSpec), []] + } else { + return [ + null, + [ + generateIssue('invalidSchemaSpecification', { + spec: JSON.stringify(schemasSpec), + }), + ], + ] + } +} +function convertOldSpecToSchemasSpec(oldSpec) { + const newSpec = new SchemasSpec() + return newSpec +} +function parseSchemasSpec(hedVersion) { + const schemasSpec = new SchemasSpec() + const processVersion = asArray(hedVersion) + const issues = [] + for (const schemaVersion of processVersion) { + const [schemaSpec, verIssues] = parseSchemaSpec(schemaVersion) + if (verIssues.length > 0) { + issues.push(...verIssues) + } else if (schemasSpec.isDuplicate(schemaSpec)) { + issues.push( + generateIssue('invalidSchemaNickname', { + spec: schemaVersion, + nickname: schemaSpec.nickname, + }), + ) + } else { + schemasSpec.addSchemaSpec(schemaSpec) + } + } + return [schemasSpec, issues] +} +function parseSchemaSpec(schemaVersion) { + const [[nickname, schema], nicknameIssues] = + splitNicknameAndSchema(schemaVersion) + if (nicknameIssues.length > 0) { + return [null, nicknameIssues] + } + const [[library, version], libraryIssues] = splitLibraryAndVersion( + schema, + schemaVersion, + ) + if (libraryIssues.length > 0) { + return [null, libraryIssues] + } + const schemaSpec = new SchemaSpec(nickname, version, library) + return [schemaSpec, []] +} +function splitNicknameAndSchema(schemaVersion) { + const nicknameSplit = schemaVersion.split(':') + let nickname = '' + let schema + if (nicknameSplit.length > 2) { + return [ + ['', ''], + [generateIssue('invalidSchemaSpecification', { spec: schemaVersion })], + ] + } + if (nicknameSplit.length > 1) { + ;[nickname, schema] = nicknameSplit + if (nickname === '' || !alphanumericRegExp.test(nickname)) { + return [ + ['', ''], + [ + generateIssue('invalidSchemaNickname', { + nickname, + spec: schemaVersion, + }), + ], + ] + } + } else { + schema = nicknameSplit[0] + } + return [[nickname, schema], []] +} +function splitLibraryAndVersion(schemaVersion, originalVersion) { + const versionSplit = schemaVersion.split('_') + let library = '' + let version + if (versionSplit.length > 2) { + return [ + ['', ''], + [generateIssue('invalidSchemaSpecification', { spec: originalVersion })], + ] + } + if (versionSplit.length > 1) { + ;[library, version] = versionSplit + if (library === '' || !alphanumericRegExp.test(library)) { + return [ + ['', ''], + [ + generateIssue('invalidSchemaSpecification', { + spec: originalVersion, + }), + ], + ] + } + } else { + version = versionSplit[0] + } + if (!import_semver2.default.valid(version)) { + return [ + ['', ''], + [generateIssue('invalidSchemaSpecification', { spec: originalVersion })], + ] + } + return [[library, version], []] +} + +// validator/bids/validate.js +function validateBidsDataset(dataset, schemaDefinition) { + return buildBidsSchemas(dataset, schemaDefinition).then( + ([hedSchemas, schemaLoadIssues]) => { + return validateFullDataset(dataset, hedSchemas) + .catch(BidsIssue.generateInternalErrorPromise) + .then((issues) => + issues.concat( + convertHedIssuesToBidsIssues( + schemaLoadIssues, + dataset.datasetDescription.file, + ), + ), + ) + }, + (issues) => + convertHedIssuesToBidsIssues(issues, dataset.datasetDescription.file), + ) +} +function validateFullDataset(dataset, hedSchemas) { + try { + const [sidecarErrorsFound, sidecarIssues] = validateSidecars( + dataset.sidecarData, + hedSchemas, + ) + const [hedColumnErrorsFound, hedColumnIssues] = validateHedColumn( + dataset.eventData, + hedSchemas, + ) + if (sidecarErrorsFound || hedColumnErrorsFound) { + return Promise.resolve([].concat(sidecarIssues, hedColumnIssues)) + } + const eventFileIssues = dataset.eventData.map((eventFileData) => { + return validateBidsEventFile(eventFileData, hedSchemas) + }) + return Promise.resolve( + [].concat(sidecarIssues, hedColumnIssues, ...eventFileIssues), + ) + } catch (e) { + return Promise.reject(e) + } +} +function validateBidsEventFile(eventFileData, hedSchemas) { + const [hedStrings, tsvIssues] = parseTsvHed(eventFileData) + if (!hedStrings) { + return [] + } else { + const datasetIssues = validateCombinedDataset( + hedStrings, + hedSchemas, + eventFileData, + ) + return [].concat(tsvIssues, datasetIssues) + } +} +function validateSidecars(sidecarData, hedSchema) { + const issues = [] + let sidecarErrorsFound = false + for (const sidecar of sidecarData) { + const valueStringIssues = validateStrings( + sidecar.hedValueStrings, + hedSchema, + sidecar.file, + true, + ) + const categoricalStringIssues = validateStrings( + sidecar.hedCategoricalStrings, + hedSchema, + sidecar.file, + false, + ) + const fileIssues = [].concat(valueStringIssues, categoricalStringIssues) + sidecarErrorsFound = + sidecarErrorsFound || + fileIssues.some((fileIssue) => { + return fileIssue.isError() + }) + issues.push(...fileIssues) + } + return [sidecarErrorsFound, issues] +} +function validateHedColumn(eventData, hedSchemas) { + const issues = eventData.flatMap((eventFileData) => { + return validateStrings( + eventFileData.hedColumnHedStrings, + hedSchemas, + eventFileData.file, + false, + ) + }) + const errorsFound = issues.some((issue) => { + return issue.isError() + }) + return [errorsFound, issues] +} +function parseTsvHed(eventFileData) { + const hedStrings = [] + const issues = [] + const sidecarHedColumnIndices = {} + for (const sidecarHedColumn of eventFileData.sidecarHedData.keys()) { + const sidecarHedColumnHeader = + eventFileData.parsedTsv.headers.indexOf(sidecarHedColumn) + if (sidecarHedColumnHeader > -1) { + sidecarHedColumnIndices[sidecarHedColumn] = sidecarHedColumnHeader + } + } + if ( + eventFileData.hedColumnHedStrings.length + + sidecarHedColumnIndices.length === + 0 + ) { + return [[], []] + } + eventFileData.parsedTsv.rows.slice(1).forEach((rowCells, rowIndex) => { + const hedStringParts = [] + if (eventFileData.hedColumnHedStrings[rowIndex]) { + hedStringParts.push(eventFileData.hedColumnHedStrings[rowIndex]) + } + for (const sidecarHedColumn of Object.keys(sidecarHedColumnIndices)) { + const sidecarHedIndex = sidecarHedColumnIndices[sidecarHedColumn] + const sidecarHedData = eventFileData.sidecarHedData.get(sidecarHedColumn) + const rowCell = rowCells[sidecarHedIndex] + if (rowCell && rowCell !== 'n/a') { + let sidecarHedString + if (!sidecarHedData) { + continue + } + if (typeof sidecarHedData === 'string') { + sidecarHedString = sidecarHedData.replace('#', rowCell) + } else { + sidecarHedString = sidecarHedData[rowCell] + } + if (sidecarHedString !== void 0) { + hedStringParts.push(sidecarHedString) + } else { + issues.push(new BidsIssue(108, eventFileData.file, rowCell)) + } + } + } + if (hedStringParts.length > 0) { + hedStrings.push(hedStringParts.join(',')) + } + }) + return [hedStrings, issues] +} +function validateCombinedDataset(hedStrings, hedSchema, eventFileData) { + const [isHedDatasetValid, hedIssues] = validateHedDatasetWithContext( + hedStrings, + eventFileData.mergedSidecar.hedStrings, + hedSchema, + true, + ) + if (!isHedDatasetValid) { + return convertHedIssuesToBidsIssues(hedIssues, eventFileData.file) + } else { + return [] + } +} +function validateStrings( + hedStrings, + hedSchema, + fileObject, + areValueStrings = false, +) { + const issues = [] + for (const hedString of hedStrings) { + if (!hedString) { + continue + } + const [isHedStringValid, hedIssues] = validateHedString( + hedString, + hedSchema, + true, + areValueStrings, + ) + if (!isHedStringValid) { + const convertedIssues = convertHedIssuesToBidsIssues( + hedIssues, + fileObject, + ) + issues.push(...convertedIssues) + } + } + return issues +} +function convertHedIssuesToBidsIssues(hedIssues, file) { + return hedIssues.map((hedIssue) => new BidsHedIssue(hedIssue, file)) +} + +// validator/index.js +var validator_default = { + BidsDataset, + BidsEventFile, + BidsJsonFile, + BidsSidecar, + validateBidsDataset, + validateHedDataset, + validateHedEvent, + validateHedString, + buildSchema: buildSchema2, + buildSchemas, +} + +// index.js +var hed_javascript_default = { + converter: converter_default, + validator: validator_default, +} +export { + converter_default as converter, + hed_javascript_default as default, + validator_default as validator, +} +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */ +/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ +/** + * @preserve date-and-time.js (c) KNOWLEDGECODE | MIT + */ +//# sourceMappingURL=index.js.map diff --git a/bids-validator/src/deps/hed-validator/index.js.map b/bids-validator/src/deps/hed-validator/index.js.map new file mode 100644 index 000000000..b6f02c6d2 --- /dev/null +++ b/bids-validator/src/deps/hed-validator/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../node_modules/date-and-time/date-and-time.js", "../../node_modules/xml2js/lib/defaults.js", "../../node_modules/xmlbuilder/lib/Utility.js", "../../node_modules/xmlbuilder/lib/XMLDOMImplementation.js", "../../node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js", "../../node_modules/xmlbuilder/lib/XMLDOMStringList.js", "../../node_modules/xmlbuilder/lib/XMLDOMConfiguration.js", "../../node_modules/xmlbuilder/lib/NodeType.js", "../../node_modules/xmlbuilder/lib/XMLAttribute.js", "../../node_modules/xmlbuilder/lib/XMLNamedNodeMap.js", "../../node_modules/xmlbuilder/lib/XMLElement.js", "../../node_modules/xmlbuilder/lib/XMLCharacterData.js", "../../node_modules/xmlbuilder/lib/XMLCData.js", "../../node_modules/xmlbuilder/lib/XMLComment.js", "../../node_modules/xmlbuilder/lib/XMLDeclaration.js", "../../node_modules/xmlbuilder/lib/XMLDTDAttList.js", "../../node_modules/xmlbuilder/lib/XMLDTDEntity.js", "../../node_modules/xmlbuilder/lib/XMLDTDElement.js", "../../node_modules/xmlbuilder/lib/XMLDTDNotation.js", "../../node_modules/xmlbuilder/lib/XMLDocType.js", "../../node_modules/xmlbuilder/lib/XMLRaw.js", "../../node_modules/xmlbuilder/lib/XMLText.js", "../../node_modules/xmlbuilder/lib/XMLProcessingInstruction.js", "../../node_modules/xmlbuilder/lib/XMLDummy.js", "../../node_modules/xmlbuilder/lib/XMLNodeList.js", "../../node_modules/xmlbuilder/lib/DocumentPosition.js", "../../node_modules/xmlbuilder/lib/XMLNode.js", "../../node_modules/xmlbuilder/lib/XMLStringifier.js", "../../node_modules/xmlbuilder/lib/WriterState.js", "../../node_modules/xmlbuilder/lib/XMLWriterBase.js", "../../node_modules/xmlbuilder/lib/XMLStringWriter.js", "../../node_modules/xmlbuilder/lib/XMLDocument.js", "../../node_modules/xmlbuilder/lib/XMLDocumentCB.js", "../../node_modules/xmlbuilder/lib/XMLStreamWriter.js", "../../node_modules/xmlbuilder/lib/index.js", "../../node_modules/xml2js/lib/builder.js", "../../node_modules/base64-js/index.js", "../../node_modules/ieee754/index.js", "../../node_modules/buffer/index.js", "../../node_modules/safe-buffer/index.js", "../../node_modules/string_decoder/lib/string_decoder.js", "../../node_modules/sax/lib/sax.js", "../../node_modules/events/events.js", "../../node_modules/xml2js/lib/bom.js", "../../node_modules/xml2js/lib/processors.js", "globals:timers", "../../node_modules/xml2js/lib/parser.js", "../../node_modules/xml2js/lib/xml2js.js", "(disabled):fs", "../../node_modules/http-response-object/lib/index.js", "../../node_modules/asap/browser-raw.js", "../../node_modules/promise/lib/core.js", "../../node_modules/promise/lib/done.js", "../../node_modules/promise/lib/finally.js", "../../node_modules/promise/lib/es6-extensions.js", "../../node_modules/asap/browser-asap.js", "../../node_modules/promise/lib/node-extensions.js", "../../node_modules/promise/lib/synchronous.js", "../../node_modules/promise/lib/index.js", "../../node_modules/promise/index.js", "../../node_modules/then-request/lib/ResponsePromise.js", "../../node_modules/has-symbols/shams.js", "../../node_modules/has-symbols/index.js", "../../node_modules/function-bind/implementation.js", "../../node_modules/function-bind/index.js", "../../node_modules/has/src/index.js", "../../node_modules/get-intrinsic/index.js", "../../node_modules/call-bind/index.js", "../../node_modules/call-bind/callBound.js", "../../node_modules/object-inspect/util.inspect", "../../node_modules/object-inspect/index.js", "../../node_modules/side-channel/index.js", "../../node_modules/qs/lib/formats.js", "../../node_modules/qs/lib/utils.js", "../../node_modules/qs/lib/stringify.js", "../../node_modules/qs/lib/parse.js", "../../node_modules/qs/lib/index.js", "../../node_modules/then-request/lib/handle-qs.js", "../../node_modules/then-request/lib/browser.js", "../../node_modules/semver/internal/debug.js", "../../node_modules/semver/internal/constants.js", "../../node_modules/semver/internal/re.js", "../../node_modules/semver/internal/parse-options.js", "../../node_modules/semver/internal/identifiers.js", "../../node_modules/semver/classes/semver.js", "../../node_modules/semver/functions/compare.js", "../../node_modules/semver/functions/lt.js", "../../node_modules/pluralize/pluralize.js", "../../node_modules/lodash/identity.js", "../../node_modules/lodash/_apply.js", "../../node_modules/lodash/_overRest.js", "../../node_modules/lodash/constant.js", "../../node_modules/lodash/_freeGlobal.js", "../../node_modules/lodash/_root.js", "../../node_modules/lodash/_Symbol.js", "../../node_modules/lodash/_getRawTag.js", "../../node_modules/lodash/_objectToString.js", "../../node_modules/lodash/_baseGetTag.js", "../../node_modules/lodash/isObject.js", "../../node_modules/lodash/isFunction.js", "../../node_modules/lodash/_coreJsData.js", "../../node_modules/lodash/_isMasked.js", "../../node_modules/lodash/_toSource.js", "../../node_modules/lodash/_baseIsNative.js", "../../node_modules/lodash/_getValue.js", "../../node_modules/lodash/_getNative.js", "../../node_modules/lodash/_defineProperty.js", "../../node_modules/lodash/_baseSetToString.js", "../../node_modules/lodash/_shortOut.js", "../../node_modules/lodash/_setToString.js", "../../node_modules/lodash/_baseRest.js", "../../node_modules/lodash/_arrayFilter.js", "../../node_modules/lodash/_arrayMap.js", "../../node_modules/lodash/_baseProperty.js", "../../node_modules/lodash/_baseTimes.js", "../../node_modules/lodash/isLength.js", "../../node_modules/lodash/isArrayLike.js", "../../node_modules/lodash/isObjectLike.js", "../../node_modules/lodash/isArrayLikeObject.js", "../../node_modules/lodash/unzip.js", "../../node_modules/lodash/zip.js", "../../node_modules/lodash/_nativeCreate.js", "../../node_modules/lodash/_hashClear.js", "../../node_modules/lodash/_hashDelete.js", "../../node_modules/lodash/_hashGet.js", "../../node_modules/lodash/_hashHas.js", "../../node_modules/lodash/_hashSet.js", "../../node_modules/lodash/_Hash.js", "../../node_modules/lodash/_listCacheClear.js", "../../node_modules/lodash/eq.js", "../../node_modules/lodash/_assocIndexOf.js", "../../node_modules/lodash/_listCacheDelete.js", "../../node_modules/lodash/_listCacheGet.js", "../../node_modules/lodash/_listCacheHas.js", "../../node_modules/lodash/_listCacheSet.js", "../../node_modules/lodash/_ListCache.js", "../../node_modules/lodash/_Map.js", "../../node_modules/lodash/_mapCacheClear.js", "../../node_modules/lodash/_isKeyable.js", "../../node_modules/lodash/_getMapData.js", "../../node_modules/lodash/_mapCacheDelete.js", "../../node_modules/lodash/_mapCacheGet.js", "../../node_modules/lodash/_mapCacheHas.js", "../../node_modules/lodash/_mapCacheSet.js", "../../node_modules/lodash/_MapCache.js", "../../node_modules/lodash/_setCacheAdd.js", "../../node_modules/lodash/_setCacheHas.js", "../../node_modules/lodash/_SetCache.js", "../../node_modules/lodash/_baseFindIndex.js", "../../node_modules/lodash/_baseIsNaN.js", "../../node_modules/lodash/_strictIndexOf.js", "../../node_modules/lodash/_baseIndexOf.js", "../../node_modules/lodash/_arrayIncludes.js", "../../node_modules/lodash/_arrayIncludesWith.js", "../../node_modules/lodash/_baseUnary.js", "../../node_modules/lodash/_cacheHas.js", "../../node_modules/lodash/_baseDifference.js", "../../node_modules/lodash/_arrayPush.js", "../../node_modules/lodash/_baseIsArguments.js", "../../node_modules/lodash/isArguments.js", "../../node_modules/lodash/isArray.js", "../../node_modules/lodash/_isFlattenable.js", "../../node_modules/lodash/_baseFlatten.js", "../../node_modules/lodash/last.js", "../../node_modules/lodash/differenceWith.js", "../../node_modules/lodash/flattenDeep.js", "../../node_modules/lodash/_stackClear.js", "../../node_modules/lodash/_stackDelete.js", "../../node_modules/lodash/_stackGet.js", "../../node_modules/lodash/_stackHas.js", "../../node_modules/lodash/_stackSet.js", "../../node_modules/lodash/_Stack.js", "../../node_modules/lodash/_arraySome.js", "../../node_modules/lodash/_equalArrays.js", "../../node_modules/lodash/_Uint8Array.js", "../../node_modules/lodash/_mapToArray.js", "../../node_modules/lodash/_setToArray.js", "../../node_modules/lodash/_equalByTag.js", "../../node_modules/lodash/_baseGetAllKeys.js", "../../node_modules/lodash/stubArray.js", "../../node_modules/lodash/_getSymbols.js", "../../node_modules/lodash/stubFalse.js", "../../node_modules/lodash/isBuffer.js", "../../node_modules/lodash/_isIndex.js", "../../node_modules/lodash/_baseIsTypedArray.js", "../../node_modules/lodash/_nodeUtil.js", "../../node_modules/lodash/isTypedArray.js", "../../node_modules/lodash/_arrayLikeKeys.js", "../../node_modules/lodash/_isPrototype.js", "../../node_modules/lodash/_overArg.js", "../../node_modules/lodash/_nativeKeys.js", "../../node_modules/lodash/_baseKeys.js", "../../node_modules/lodash/keys.js", "../../node_modules/lodash/_getAllKeys.js", "../../node_modules/lodash/_equalObjects.js", "../../node_modules/lodash/_DataView.js", "../../node_modules/lodash/_Promise.js", "../../node_modules/lodash/_Set.js", "../../node_modules/lodash/_WeakMap.js", "../../node_modules/lodash/_getTag.js", "../../node_modules/lodash/_baseIsEqualDeep.js", "../../node_modules/lodash/_baseIsEqual.js", "../../node_modules/lodash/isEqual.js", "../../node_modules/semver/functions/parse.js", "../../node_modules/semver/functions/valid.js", "../../node_modules/semver/functions/clean.js", "../../node_modules/semver/functions/inc.js", "../../node_modules/semver/functions/eq.js", "../../node_modules/semver/functions/diff.js", "../../node_modules/semver/functions/major.js", "../../node_modules/semver/functions/minor.js", "../../node_modules/semver/functions/patch.js", "../../node_modules/semver/functions/prerelease.js", "../../node_modules/semver/functions/rcompare.js", "../../node_modules/semver/functions/compare-loose.js", "../../node_modules/semver/functions/compare-build.js", "../../node_modules/semver/functions/sort.js", "../../node_modules/semver/functions/rsort.js", "../../node_modules/semver/functions/gt.js", "../../node_modules/semver/functions/neq.js", "../../node_modules/semver/functions/gte.js", "../../node_modules/semver/functions/lte.js", "../../node_modules/semver/functions/cmp.js", "../../node_modules/semver/functions/coerce.js", "../../node_modules/yallist/iterator.js", "../../node_modules/yallist/yallist.js", "../../node_modules/lru-cache/index.js", "../../node_modules/semver/classes/range.js", "../../node_modules/semver/classes/comparator.js", "../../node_modules/semver/functions/satisfies.js", "../../node_modules/semver/ranges/to-comparators.js", "../../node_modules/semver/ranges/max-satisfying.js", "../../node_modules/semver/ranges/min-satisfying.js", "../../node_modules/semver/ranges/min-version.js", "../../node_modules/semver/ranges/valid.js", "../../node_modules/semver/ranges/outside.js", "../../node_modules/semver/ranges/gtr.js", "../../node_modules/semver/ranges/ltr.js", "../../node_modules/semver/ranges/intersects.js", "../../node_modules/semver/ranges/simplify.js", "../../node_modules/semver/ranges/subset.js", "../../node_modules/semver/index.js", "../../index.js", "../../converter/index.js", "../../converter/converter.js", "../../converter/types.js", "../../utils/array.js", "../../converter/issues.js", "../../common/issues/issues.js", "../../common/issues/data.js", "../../utils/string.js", "../../node_modules/date-fns/esm/parseISO/index.js", "../../node_modules/date-fns/esm/_lib/toInteger/index.js", "../../node_modules/date-fns/esm/_lib/requiredArgs/index.js", "../../node_modules/date-fns/esm/isValid/index.js", "../../node_modules/date-fns/esm/toDate/index.js", "../../converter/splitHedString.js", "../../converter/schema.js", "../../utils/xpath.js", "../../common/schema/loader.js", "../../utils/files.js", "../../common/schema/config.js", "../../common/schema/types.js", "../../utils/hedData.js", "../../validator/parser/parsedHedTag.js", "../../utils/hedStrings.js", "../../validator/parser/parsedHedSubstring.js", "../../utils/types.js", "../../utils/xml2js.js", "../../validator/index.js", "../../validator/bids/index.js", "../../validator/bids/types.js", "../../utils/bids.js", "../../validator/bids/validate.js", "../../validator/dataset.js", "../../validator/event/index.js", "../../validator/event/init.js", "../../validator/parser/main.js", "../../validator/parser/parsedHedString.js", "../../validator/parser/parsedHedGroup.js", "../../validator/parser/splitHedString.js", "../../validator/event/validator.js", "../../validator/event/hed3.js", "../../utils/map.js", "../../validator/bids/schema.js", "../../validator/schema/init.js", "../../validator/schema/hed2.js", "../../validator/schema/parser.js", "../../validator/schema/types.js", "../../validator/schema/hed3.js"], + "sourcesContent": ["/**\n * @preserve date-and-time.js (c) KNOWLEDGECODE | MIT\n */\n(function (global) {\n 'use strict';\n\n var date = {},\n locales = {},\n plugins = {},\n lang = 'en',\n _res = {\n MMMM: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],\n MMM: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n dddd: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n ddd: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n dd: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],\n A: ['AM', 'PM']\n },\n _formatter = {\n YYYY: function (d/*, formatString*/) { return ('000' + d.getFullYear()).slice(-4); },\n YY: function (d/*, formatString*/) { return ('0' + d.getFullYear()).slice(-2); },\n Y: function (d/*, formatString*/) { return '' + d.getFullYear(); },\n MMMM: function (d/*, formatString*/) { return this.res.MMMM[d.getMonth()]; },\n MMM: function (d/*, formatString*/) { return this.res.MMM[d.getMonth()]; },\n MM: function (d/*, formatString*/) { return ('0' + (d.getMonth() + 1)).slice(-2); },\n M: function (d/*, formatString*/) { return '' + (d.getMonth() + 1); },\n DD: function (d/*, formatString*/) { return ('0' + d.getDate()).slice(-2); },\n D: function (d/*, formatString*/) { return '' + d.getDate(); },\n HH: function (d/*, formatString*/) { return ('0' + d.getHours()).slice(-2); },\n H: function (d/*, formatString*/) { return '' + d.getHours(); },\n A: function (d/*, formatString*/) { return this.res.A[d.getHours() > 11 | 0]; },\n hh: function (d/*, formatString*/) { return ('0' + (d.getHours() % 12 || 12)).slice(-2); },\n h: function (d/*, formatString*/) { return '' + (d.getHours() % 12 || 12); },\n mm: function (d/*, formatString*/) { return ('0' + d.getMinutes()).slice(-2); },\n m: function (d/*, formatString*/) { return '' + d.getMinutes(); },\n ss: function (d/*, formatString*/) { return ('0' + d.getSeconds()).slice(-2); },\n s: function (d/*, formatString*/) { return '' + d.getSeconds(); },\n SSS: function (d/*, formatString*/) { return ('00' + d.getMilliseconds()).slice(-3); },\n SS: function (d/*, formatString*/) { return ('0' + (d.getMilliseconds() / 10 | 0)).slice(-2); },\n S: function (d/*, formatString*/) { return '' + (d.getMilliseconds() / 100 | 0); },\n dddd: function (d/*, formatString*/) { return this.res.dddd[d.getDay()]; },\n ddd: function (d/*, formatString*/) { return this.res.ddd[d.getDay()]; },\n dd: function (d/*, formatString*/) { return this.res.dd[d.getDay()]; },\n Z: function (d/*, formatString*/) { return d.utc ? '+0000' : /[\\+-]\\d{4}/.exec(d.toTimeString())[0]; },\n post: function (str) { return str; }\n },\n _parser = {\n YYYY: function (str/*, formatString */) { return this.exec(/^\\d{4}/, str); },\n Y: function (str/*, formatString */) { return this.exec(/^\\d{1,4}/, str); },\n MMMM: function (str/*, formatString */) {\n var result = this.find(this.res.MMMM, str);\n result.value++;\n return result;\n },\n MMM: function (str/*, formatString */) {\n var result = this.find(this.res.MMM, str);\n result.value++;\n return result;\n },\n MM: function (str/*, formatString */) { return this.exec(/^\\d\\d/, str); },\n M: function (str/*, formatString */) { return this.exec(/^\\d\\d?/, str); },\n DD: function (str/*, formatString */) { return this.exec(/^\\d\\d/, str); },\n D: function (str/*, formatString */) { return this.exec(/^\\d\\d?/, str); },\n HH: function (str/*, formatString */) { return this.exec(/^\\d\\d/, str); },\n H: function (str/*, formatString */) { return this.exec(/^\\d\\d?/, str); },\n A: function (str/*, formatString */) { return this.find(this.res.A, str); },\n hh: function (str/*, formatString */) { return this.exec(/^\\d\\d/, str); },\n h: function (str/*, formatString */) { return this.exec(/^\\d\\d?/, str); },\n mm: function (str/*, formatString */) { return this.exec(/^\\d\\d/, str); },\n m: function (str/*, formatString */) { return this.exec(/^\\d\\d?/, str); },\n ss: function (str/*, formatString */) { return this.exec(/^\\d\\d/, str); },\n s: function (str/*, formatString */) { return this.exec(/^\\d\\d?/, str); },\n SSS: function (str/*, formatString */) { return this.exec(/^\\d{1,3}/, str); },\n SS: function (str/*, formatString */) {\n var result = this.exec(/^\\d\\d?/, str);\n result.value *= 10;\n return result;\n },\n S: function (str/*, formatString */) {\n var result = this.exec(/^\\d/, str);\n result.value *= 100;\n return result;\n },\n Z: function (str/*, formatString */) {\n var result = this.exec(/^[\\+-]\\d{2}[0-5]\\d/, str);\n result.value = (result.value / 100 | 0) * -60 - result.value % 100;\n return result;\n },\n h12: function (h, a) { return (h === 12 ? 0 : h) + a * 12; },\n exec: function (re, str) {\n var result = (re.exec(str) || [''])[0];\n return { value: result | 0, length: result.length };\n },\n find: function (array, str) {\n var index = -1, length = 0;\n\n for (var i = 0, len = array.length, item; i < len; i++) {\n item = array[i];\n if (!str.indexOf(item) && item.length > length) {\n index = i;\n length = item.length;\n }\n }\n return { value: index, length: length };\n },\n pre: function (str) { return str; }\n },\n customize = function (code, base, locale) {\n var extend = function (proto, props, res) {\n var Locale = function (r) {\n if (r) { this.res = r; }\n };\n\n Locale.prototype = proto;\n Locale.prototype.constructor = Locale;\n\n var newLocale = new Locale(res),\n value;\n\n for (var key in props || {}) {\n value = props[key];\n newLocale[key] = value.slice ? value.slice() : value;\n }\n return newLocale;\n },\n loc = { res: extend(base.res, locale.res) };\n\n loc.formatter = extend(base.formatter, locale.formatter, loc.res);\n loc.parser = extend(base.parser, locale.parser, loc.res);\n locales[code] = loc;\n };\n\n /**\n * compiling a format string\n * @param {string} formatString - a format string\n * @returns {Array.} a compiled object\n */\n date.compile = function (formatString) {\n var re = /\\[([^\\[\\]]|\\[[^\\[\\]]*])*]|([A-Za-z])\\2+|\\.{3}|./g, keys, pattern = [formatString];\n\n while ((keys = re.exec(formatString))) {\n pattern[pattern.length] = keys[0];\n }\n return pattern;\n };\n\n /**\n * formatting a date\n * @param {Date} dateObj - a Date object\n * @param {string|Array.} arg - a format string or a compiled object\n * @param {boolean} [utc] - output as UTC\n * @returns {string} a formatted string\n */\n date.format = function (dateObj, arg, utc) {\n var pattern = typeof arg === 'string' ? date.compile(arg) : arg,\n d = date.addMinutes(dateObj, utc ? dateObj.getTimezoneOffset() : 0),\n formatter = locales[lang].formatter, str = '';\n\n d.utc = utc || false;\n for (var i = 1, len = pattern.length, token; i < len; i++) {\n token = pattern[i];\n str += formatter[token] ? formatter.post(formatter[token](d, pattern[0])) : token.replace(/\\[(.*)]/, '$1');\n }\n return str;\n };\n\n /**\n * pre-parsing a date string\n * @param {string} dateString - a date string\n * @param {string|Array.} arg - a format string or a compiled object\n * @returns {Object} a date structure\n */\n date.preparse = function (dateString, arg) {\n var pattern = typeof arg === 'string' ? date.compile(arg) : arg,\n dt = { Y: 1970, M: 1, D: 1, H: 0, A: 0, h: 0, m: 0, s: 0, S: 0, Z: 0, _index: 0, _length: 0, _match: 0 },\n comment = /\\[(.*)]/, parser = locales[lang].parser, offset = 0;\n\n dateString = parser.pre(dateString);\n for (var i = 1, len = pattern.length, token, result; i < len; i++) {\n token = pattern[i];\n if (parser[token]) {\n result = parser[token](dateString.slice(offset), pattern[0]);\n if (!result.length) {\n break;\n }\n offset += result.length;\n dt[token.charAt(0)] = result.value;\n dt._match++;\n } else if (token === dateString.charAt(offset) || token === ' ') {\n offset++;\n } else if (comment.test(token) && !dateString.slice(offset).indexOf(comment.exec(token)[1])) {\n offset += token.length - 2;\n } else if (token === '...') {\n offset = dateString.length;\n break;\n } else {\n break;\n }\n }\n dt.H = dt.H || parser.h12(dt.h, dt.A);\n dt._index = offset;\n dt._length = dateString.length;\n return dt;\n };\n\n /**\n * validation\n * @param {Object|string} arg1 - a date structure or a date string\n * @param {string|Array.} [arg2] - a format string or a compiled object\n * @returns {boolean} whether the date string is a valid date\n */\n date.isValid = function (arg1, arg2) {\n var dt = typeof arg1 === 'string' ? date.preparse(arg1, arg2) : arg1,\n last = [31, 28 + date.isLeapYear(dt.Y) | 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][dt.M - 1];\n\n return !(\n dt._index < 1 || dt._length < 1 || dt._index - dt._length || dt._match < 1 ||\n dt.Y < 1 || dt.Y > 9999 || dt.M < 1 || dt.M > 12 || dt.D < 1 || dt.D > last ||\n dt.H < 0 || dt.H > 23 || dt.m < 0 || dt.m > 59 || dt.s < 0 || dt.s > 59 || dt.S < 0 || dt.S > 999 ||\n dt.Z < -720 || dt.Z > 840\n );\n };\n\n /**\n * parsing a date string\n * @param {string} dateString - a date string\n * @param {string|Array.} arg - a format string or a compiled object\n * @param {boolean} [utc] - input as UTC\n * @returns {Date} a constructed date\n */\n date.parse = function (dateString, arg, utc) {\n var dt = date.preparse(dateString, arg);\n\n if (date.isValid(dt)) {\n dt.M -= dt.Y < 100 ? 22801 : 1; // 22801 = 1900 * 12 + 1\n if (utc || dt.Z) {\n return new Date(Date.UTC(dt.Y, dt.M, dt.D, dt.H, dt.m + dt.Z, dt.s, dt.S));\n }\n return new Date(dt.Y, dt.M, dt.D, dt.H, dt.m, dt.s, dt.S);\n }\n return new Date(NaN);\n };\n\n /**\n * transformation of date string\n * @param {string} dateString - a date string\n * @param {string|Array.} arg1 - the format string of the date string or the compiled object\n * @param {string|Array.} arg2 - the transformed format string or the compiled object\n * @param {boolean} [utc] - output as UTC\n * @returns {string} a formatted string\n */\n date.transform = function (dateString, arg1, arg2, utc) {\n return date.format(date.parse(dateString, arg1), arg2, utc);\n };\n\n /**\n * adding years\n * @param {Date} dateObj - a date object\n * @param {number} years - number of years to add\n * @returns {Date} a date after adding the value\n */\n date.addYears = function (dateObj, years) {\n return date.addMonths(dateObj, years * 12);\n };\n\n /**\n * adding months\n * @param {Date} dateObj - a date object\n * @param {number} months - number of months to add\n * @returns {Date} a date after adding the value\n */\n date.addMonths = function (dateObj, months) {\n var d = new Date(dateObj.getTime());\n\n d.setMonth(d.getMonth() + months);\n return d;\n };\n\n /**\n * adding days\n * @param {Date} dateObj - a date object\n * @param {number} days - number of days to add\n * @returns {Date} a date after adding the value\n */\n date.addDays = function (dateObj, days) {\n var d = new Date(dateObj.getTime());\n\n d.setDate(d.getDate() + days);\n return d;\n };\n\n /**\n * adding hours\n * @param {Date} dateObj - a date object\n * @param {number} hours - number of hours to add\n * @returns {Date} a date after adding the value\n */\n date.addHours = function (dateObj, hours) {\n return date.addMinutes(dateObj, hours * 60);\n };\n\n /**\n * adding minutes\n * @param {Date} dateObj - a date object\n * @param {number} minutes - number of minutes to add\n * @returns {Date} a date after adding the value\n */\n date.addMinutes = function (dateObj, minutes) {\n return date.addSeconds(dateObj, minutes * 60);\n };\n\n /**\n * adding seconds\n * @param {Date} dateObj - a date object\n * @param {number} seconds - number of seconds to add\n * @returns {Date} a date after adding the value\n */\n date.addSeconds = function (dateObj, seconds) {\n return date.addMilliseconds(dateObj, seconds * 1000);\n };\n\n /**\n * adding milliseconds\n * @param {Date} dateObj - a date object\n * @param {number} milliseconds - number of milliseconds to add\n * @returns {Date} a date after adding the value\n */\n date.addMilliseconds = function (dateObj, milliseconds) {\n return new Date(dateObj.getTime() + milliseconds);\n };\n\n /**\n * subtracting\n * @param {Date} date1 - a Date object\n * @param {Date} date2 - a Date object\n * @returns {Object} a result object subtracting date2 from date1\n */\n date.subtract = function (date1, date2) {\n var delta = date1.getTime() - date2.getTime();\n\n return {\n toMilliseconds: function () {\n return delta;\n },\n toSeconds: function () {\n return delta / 1000;\n },\n toMinutes: function () {\n return delta / 60000;\n },\n toHours: function () {\n return delta / 3600000;\n },\n toDays: function () {\n return delta / 86400000;\n }\n };\n };\n\n /**\n * leap year\n * @param {number} y - year\n * @returns {boolean} whether the year is a leap year\n */\n date.isLeapYear = function (y) {\n return (!(y % 4) && !!(y % 100)) || !(y % 400);\n };\n\n /**\n * comparison of two dates\n * @param {Date} date1 - a Date object\n * @param {Date} date2 - a Date object\n * @returns {boolean} whether the dates are the same day (times are ignored)\n */\n date.isSameDay = function (date1, date2) {\n return date1.toDateString() === date2.toDateString();\n };\n\n /**\n * change locale or setting a new locale definition\n * @param {Function|string} [code] - locale function | language code\n * @param {Object} [locale] - locale definition\n * @returns {string} current language code\n */\n date.locale = function (code, locale) {\n if (locale) {\n customize(code, { res: _res, formatter: _formatter, parser: _parser }, locale);\n } else if (typeof code === 'function') {\n lang = code(date);\n } else if (code) {\n if (global && !global.date) {\n console.warn('This method of changing the locale is deprecated. See documentation for details.');\n }\n lang = code;\n }\n return lang;\n };\n\n /**\n * locale extension\n * @param {Object} extension - locale extension\n * @returns {void}\n */\n date.extend = function (extension) {\n var extender = extension.extender || {};\n\n for (var key in extender) {\n if (!date[key]) {\n date[key] = extender[key];\n }\n }\n if (extension.formatter || extension.parser || extension.res) {\n customize(lang, locales[lang], extension);\n }\n };\n\n /**\n * plugin import or definition\n * @param {Function|string} plugin - plugin function | plugin name\n * @param {Object} [extension] - locale extension\n * @returns {void}\n */\n date.plugin = function (plugin, extension) {\n if (typeof plugin === 'function') {\n date.extend(plugins[plugin(date)]);\n } else {\n plugins[plugin] = plugins[plugin] || extension;\n if (!extension && plugins[plugin]) {\n date.extend(plugins[plugin]);\n if (global && !global.date) {\n console.warn('This method of applying plugins is deprecated. See documentation for details.');\n }\n }\n }\n };\n\n // Create default locale (English)\n date.locale(lang, {});\n\n if (typeof module === 'object' && typeof module.exports === 'object') {\n module.exports = date;\n } else if (typeof define === 'function' && define.amd) {\n define([], function () {\n return date;\n });\n } else {\n global.date = date;\n }\n\n}(this));\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n exports.defaults = {\n \"0.1\": {\n explicitCharkey: false,\n trim: true,\n normalize: true,\n normalizeTags: false,\n attrkey: \"@\",\n charkey: \"#\",\n explicitArray: false,\n ignoreAttrs: false,\n mergeAttrs: false,\n explicitRoot: false,\n validator: null,\n xmlns: false,\n explicitChildren: false,\n childkey: '@@',\n charsAsChildren: false,\n includeWhiteChars: false,\n async: false,\n strict: true,\n attrNameProcessors: null,\n attrValueProcessors: null,\n tagNameProcessors: null,\n valueProcessors: null,\n emptyTag: ''\n },\n \"0.2\": {\n explicitCharkey: false,\n trim: false,\n normalize: false,\n normalizeTags: false,\n attrkey: \"$\",\n charkey: \"_\",\n explicitArray: true,\n ignoreAttrs: false,\n mergeAttrs: false,\n explicitRoot: true,\n validator: null,\n xmlns: false,\n explicitChildren: false,\n preserveChildrenOrder: false,\n childkey: '$$',\n charsAsChildren: false,\n includeWhiteChars: false,\n async: false,\n strict: true,\n attrNameProcessors: null,\n attrValueProcessors: null,\n tagNameProcessors: null,\n valueProcessors: null,\n rootName: 'root',\n xmldec: {\n 'version': '1.0',\n 'encoding': 'UTF-8',\n 'standalone': true\n },\n doctype: null,\n renderOpts: {\n 'pretty': true,\n 'indent': ' ',\n 'newline': '\\n'\n },\n headless: false,\n chunkSize: 10000,\n emptyTag: '',\n cdata: false\n }\n };\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var assign, getValue, isArray, isEmpty, isFunction, isObject, isPlainObject,\n slice = [].slice,\n hasProp = {}.hasOwnProperty;\n\n assign = function() {\n var i, key, len, source, sources, target;\n target = arguments[0], sources = 2 <= arguments.length ? slice.call(arguments, 1) : [];\n if (isFunction(Object.assign)) {\n Object.assign.apply(null, arguments);\n } else {\n for (i = 0, len = sources.length; i < len; i++) {\n source = sources[i];\n if (source != null) {\n for (key in source) {\n if (!hasProp.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n }\n }\n return target;\n };\n\n isFunction = function(val) {\n return !!val && Object.prototype.toString.call(val) === '[object Function]';\n };\n\n isObject = function(val) {\n var ref;\n return !!val && ((ref = typeof val) === 'function' || ref === 'object');\n };\n\n isArray = function(val) {\n if (isFunction(Array.isArray)) {\n return Array.isArray(val);\n } else {\n return Object.prototype.toString.call(val) === '[object Array]';\n }\n };\n\n isEmpty = function(val) {\n var key;\n if (isArray(val)) {\n return !val.length;\n } else {\n for (key in val) {\n if (!hasProp.call(val, key)) continue;\n return false;\n }\n return true;\n }\n };\n\n isPlainObject = function(val) {\n var ctor, proto;\n return isObject(val) && (proto = Object.getPrototypeOf(val)) && (ctor = proto.constructor) && (typeof ctor === 'function') && (ctor instanceof ctor) && (Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object));\n };\n\n getValue = function(obj) {\n if (isFunction(obj.valueOf)) {\n return obj.valueOf();\n } else {\n return obj;\n }\n };\n\n module.exports.assign = assign;\n\n module.exports.isFunction = isFunction;\n\n module.exports.isObject = isObject;\n\n module.exports.isArray = isArray;\n\n module.exports.isEmpty = isEmpty;\n\n module.exports.isPlainObject = isPlainObject;\n\n module.exports.getValue = getValue;\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var XMLDOMImplementation;\n\n module.exports = XMLDOMImplementation = (function() {\n function XMLDOMImplementation() {}\n\n XMLDOMImplementation.prototype.hasFeature = function(feature, version) {\n return true;\n };\n\n XMLDOMImplementation.prototype.createDocumentType = function(qualifiedName, publicId, systemId) {\n throw new Error(\"This DOM method is not implemented.\");\n };\n\n XMLDOMImplementation.prototype.createDocument = function(namespaceURI, qualifiedName, doctype) {\n throw new Error(\"This DOM method is not implemented.\");\n };\n\n XMLDOMImplementation.prototype.createHTMLDocument = function(title) {\n throw new Error(\"This DOM method is not implemented.\");\n };\n\n XMLDOMImplementation.prototype.getFeature = function(feature, version) {\n throw new Error(\"This DOM method is not implemented.\");\n };\n\n return XMLDOMImplementation;\n\n })();\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var XMLDOMErrorHandler;\n\n module.exports = XMLDOMErrorHandler = (function() {\n function XMLDOMErrorHandler() {}\n\n XMLDOMErrorHandler.prototype.handleError = function(error) {\n throw new Error(error);\n };\n\n return XMLDOMErrorHandler;\n\n })();\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var XMLDOMStringList;\n\n module.exports = XMLDOMStringList = (function() {\n function XMLDOMStringList(arr) {\n this.arr = arr || [];\n }\n\n Object.defineProperty(XMLDOMStringList.prototype, 'length', {\n get: function() {\n return this.arr.length;\n }\n });\n\n XMLDOMStringList.prototype.item = function(index) {\n return this.arr[index] || null;\n };\n\n XMLDOMStringList.prototype.contains = function(str) {\n return this.arr.indexOf(str) !== -1;\n };\n\n return XMLDOMStringList;\n\n })();\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var XMLDOMConfiguration, XMLDOMErrorHandler, XMLDOMStringList;\n\n XMLDOMErrorHandler = require('./XMLDOMErrorHandler');\n\n XMLDOMStringList = require('./XMLDOMStringList');\n\n module.exports = XMLDOMConfiguration = (function() {\n function XMLDOMConfiguration() {\n var clonedSelf;\n this.defaultParams = {\n \"canonical-form\": false,\n \"cdata-sections\": false,\n \"comments\": false,\n \"datatype-normalization\": false,\n \"element-content-whitespace\": true,\n \"entities\": true,\n \"error-handler\": new XMLDOMErrorHandler(),\n \"infoset\": true,\n \"validate-if-schema\": false,\n \"namespaces\": true,\n \"namespace-declarations\": true,\n \"normalize-characters\": false,\n \"schema-location\": '',\n \"schema-type\": '',\n \"split-cdata-sections\": true,\n \"validate\": false,\n \"well-formed\": true\n };\n this.params = clonedSelf = Object.create(this.defaultParams);\n }\n\n Object.defineProperty(XMLDOMConfiguration.prototype, 'parameterNames', {\n get: function() {\n return new XMLDOMStringList(Object.keys(this.defaultParams));\n }\n });\n\n XMLDOMConfiguration.prototype.getParameter = function(name) {\n if (this.params.hasOwnProperty(name)) {\n return this.params[name];\n } else {\n return null;\n }\n };\n\n XMLDOMConfiguration.prototype.canSetParameter = function(name, value) {\n return true;\n };\n\n XMLDOMConfiguration.prototype.setParameter = function(name, value) {\n if (value != null) {\n return this.params[name] = value;\n } else {\n return delete this.params[name];\n }\n };\n\n return XMLDOMConfiguration;\n\n })();\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n module.exports = {\n Element: 1,\n Attribute: 2,\n Text: 3,\n CData: 4,\n EntityReference: 5,\n EntityDeclaration: 6,\n ProcessingInstruction: 7,\n Comment: 8,\n Document: 9,\n DocType: 10,\n DocumentFragment: 11,\n NotationDeclaration: 12,\n Declaration: 201,\n Raw: 202,\n AttributeDeclaration: 203,\n ElementDeclaration: 204,\n Dummy: 205\n };\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLAttribute, XMLNode;\n\n NodeType = require('./NodeType');\n\n XMLNode = require('./XMLNode');\n\n module.exports = XMLAttribute = (function() {\n function XMLAttribute(parent, name, value) {\n this.parent = parent;\n if (this.parent) {\n this.options = this.parent.options;\n this.stringify = this.parent.stringify;\n }\n if (name == null) {\n throw new Error(\"Missing attribute name. \" + this.debugInfo(name));\n }\n this.name = this.stringify.name(name);\n this.value = this.stringify.attValue(value);\n this.type = NodeType.Attribute;\n this.isId = false;\n this.schemaTypeInfo = null;\n }\n\n Object.defineProperty(XMLAttribute.prototype, 'nodeType', {\n get: function() {\n return this.type;\n }\n });\n\n Object.defineProperty(XMLAttribute.prototype, 'ownerElement', {\n get: function() {\n return this.parent;\n }\n });\n\n Object.defineProperty(XMLAttribute.prototype, 'textContent', {\n get: function() {\n return this.value;\n },\n set: function(value) {\n return this.value = value || '';\n }\n });\n\n Object.defineProperty(XMLAttribute.prototype, 'namespaceURI', {\n get: function() {\n return '';\n }\n });\n\n Object.defineProperty(XMLAttribute.prototype, 'prefix', {\n get: function() {\n return '';\n }\n });\n\n Object.defineProperty(XMLAttribute.prototype, 'localName', {\n get: function() {\n return this.name;\n }\n });\n\n Object.defineProperty(XMLAttribute.prototype, 'specified', {\n get: function() {\n return true;\n }\n });\n\n XMLAttribute.prototype.clone = function() {\n return Object.create(this);\n };\n\n XMLAttribute.prototype.toString = function(options) {\n return this.options.writer.attribute(this, this.options.writer.filterOptions(options));\n };\n\n XMLAttribute.prototype.debugInfo = function(name) {\n name = name || this.name;\n if (name == null) {\n return \"parent: <\" + this.parent.name + \">\";\n } else {\n return \"attribute: {\" + name + \"}, parent: <\" + this.parent.name + \">\";\n }\n };\n\n XMLAttribute.prototype.isEqualNode = function(node) {\n if (node.namespaceURI !== this.namespaceURI) {\n return false;\n }\n if (node.prefix !== this.prefix) {\n return false;\n }\n if (node.localName !== this.localName) {\n return false;\n }\n if (node.value !== this.value) {\n return false;\n }\n return true;\n };\n\n return XMLAttribute;\n\n })();\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var XMLNamedNodeMap;\n\n module.exports = XMLNamedNodeMap = (function() {\n function XMLNamedNodeMap(nodes) {\n this.nodes = nodes;\n }\n\n Object.defineProperty(XMLNamedNodeMap.prototype, 'length', {\n get: function() {\n return Object.keys(this.nodes).length || 0;\n }\n });\n\n XMLNamedNodeMap.prototype.clone = function() {\n return this.nodes = null;\n };\n\n XMLNamedNodeMap.prototype.getNamedItem = function(name) {\n return this.nodes[name];\n };\n\n XMLNamedNodeMap.prototype.setNamedItem = function(node) {\n var oldNode;\n oldNode = this.nodes[node.nodeName];\n this.nodes[node.nodeName] = node;\n return oldNode || null;\n };\n\n XMLNamedNodeMap.prototype.removeNamedItem = function(name) {\n var oldNode;\n oldNode = this.nodes[name];\n delete this.nodes[name];\n return oldNode || null;\n };\n\n XMLNamedNodeMap.prototype.item = function(index) {\n return this.nodes[Object.keys(this.nodes)[index]] || null;\n };\n\n XMLNamedNodeMap.prototype.getNamedItemNS = function(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\");\n };\n\n XMLNamedNodeMap.prototype.setNamedItemNS = function(node) {\n throw new Error(\"This DOM method is not implemented.\");\n };\n\n XMLNamedNodeMap.prototype.removeNamedItemNS = function(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\");\n };\n\n return XMLNamedNodeMap;\n\n })();\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLAttribute, XMLElement, XMLNamedNodeMap, XMLNode, getValue, isFunction, isObject, ref,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n ref = require('./Utility'), isObject = ref.isObject, isFunction = ref.isFunction, getValue = ref.getValue;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n XMLAttribute = require('./XMLAttribute');\n\n XMLNamedNodeMap = require('./XMLNamedNodeMap');\n\n module.exports = XMLElement = (function(superClass) {\n extend(XMLElement, superClass);\n\n function XMLElement(parent, name, attributes) {\n var child, j, len, ref1;\n XMLElement.__super__.constructor.call(this, parent);\n if (name == null) {\n throw new Error(\"Missing element name. \" + this.debugInfo());\n }\n this.name = this.stringify.name(name);\n this.type = NodeType.Element;\n this.attribs = {};\n this.schemaTypeInfo = null;\n if (attributes != null) {\n this.attribute(attributes);\n }\n if (parent.type === NodeType.Document) {\n this.isRoot = true;\n this.documentObject = parent;\n parent.rootObject = this;\n if (parent.children) {\n ref1 = parent.children;\n for (j = 0, len = ref1.length; j < len; j++) {\n child = ref1[j];\n if (child.type === NodeType.DocType) {\n child.name = this.name;\n break;\n }\n }\n }\n }\n }\n\n Object.defineProperty(XMLElement.prototype, 'tagName', {\n get: function() {\n return this.name;\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'namespaceURI', {\n get: function() {\n return '';\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'prefix', {\n get: function() {\n return '';\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'localName', {\n get: function() {\n return this.name;\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'id', {\n get: function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'className', {\n get: function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'classList', {\n get: function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'attributes', {\n get: function() {\n if (!this.attributeMap || !this.attributeMap.nodes) {\n this.attributeMap = new XMLNamedNodeMap(this.attribs);\n }\n return this.attributeMap;\n }\n });\n\n XMLElement.prototype.clone = function() {\n var att, attName, clonedSelf, ref1;\n clonedSelf = Object.create(this);\n if (clonedSelf.isRoot) {\n clonedSelf.documentObject = null;\n }\n clonedSelf.attribs = {};\n ref1 = this.attribs;\n for (attName in ref1) {\n if (!hasProp.call(ref1, attName)) continue;\n att = ref1[attName];\n clonedSelf.attribs[attName] = att.clone();\n }\n clonedSelf.children = [];\n this.children.forEach(function(child) {\n var clonedChild;\n clonedChild = child.clone();\n clonedChild.parent = clonedSelf;\n return clonedSelf.children.push(clonedChild);\n });\n return clonedSelf;\n };\n\n XMLElement.prototype.attribute = function(name, value) {\n var attName, attValue;\n if (name != null) {\n name = getValue(name);\n }\n if (isObject(name)) {\n for (attName in name) {\n if (!hasProp.call(name, attName)) continue;\n attValue = name[attName];\n this.attribute(attName, attValue);\n }\n } else {\n if (isFunction(value)) {\n value = value.apply();\n }\n if (this.options.keepNullAttributes && (value == null)) {\n this.attribs[name] = new XMLAttribute(this, name, \"\");\n } else if (value != null) {\n this.attribs[name] = new XMLAttribute(this, name, value);\n }\n }\n return this;\n };\n\n XMLElement.prototype.removeAttribute = function(name) {\n var attName, j, len;\n if (name == null) {\n throw new Error(\"Missing attribute name. \" + this.debugInfo());\n }\n name = getValue(name);\n if (Array.isArray(name)) {\n for (j = 0, len = name.length; j < len; j++) {\n attName = name[j];\n delete this.attribs[attName];\n }\n } else {\n delete this.attribs[name];\n }\n return this;\n };\n\n XMLElement.prototype.toString = function(options) {\n return this.options.writer.element(this, this.options.writer.filterOptions(options));\n };\n\n XMLElement.prototype.att = function(name, value) {\n return this.attribute(name, value);\n };\n\n XMLElement.prototype.a = function(name, value) {\n return this.attribute(name, value);\n };\n\n XMLElement.prototype.getAttribute = function(name) {\n if (this.attribs.hasOwnProperty(name)) {\n return this.attribs[name].value;\n } else {\n return null;\n }\n };\n\n XMLElement.prototype.setAttribute = function(name, value) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.getAttributeNode = function(name) {\n if (this.attribs.hasOwnProperty(name)) {\n return this.attribs[name];\n } else {\n return null;\n }\n };\n\n XMLElement.prototype.setAttributeNode = function(newAttr) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.removeAttributeNode = function(oldAttr) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.getElementsByTagName = function(name) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.getAttributeNS = function(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.setAttributeNS = function(namespaceURI, qualifiedName, value) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.removeAttributeNS = function(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.getAttributeNodeNS = function(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.setAttributeNodeNS = function(newAttr) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.getElementsByTagNameNS = function(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.hasAttribute = function(name) {\n return this.attribs.hasOwnProperty(name);\n };\n\n XMLElement.prototype.hasAttributeNS = function(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.setIdAttribute = function(name, isId) {\n if (this.attribs.hasOwnProperty(name)) {\n return this.attribs[name].isId;\n } else {\n return isId;\n }\n };\n\n XMLElement.prototype.setIdAttributeNS = function(namespaceURI, localName, isId) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.setIdAttributeNode = function(idAttr, isId) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.getElementsByTagName = function(tagname) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.getElementsByTagNameNS = function(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.getElementsByClassName = function(classNames) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.isEqualNode = function(node) {\n var i, j, ref1;\n if (!XMLElement.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) {\n return false;\n }\n if (node.namespaceURI !== this.namespaceURI) {\n return false;\n }\n if (node.prefix !== this.prefix) {\n return false;\n }\n if (node.localName !== this.localName) {\n return false;\n }\n if (node.attribs.length !== this.attribs.length) {\n return false;\n }\n for (i = j = 0, ref1 = this.attribs.length - 1; 0 <= ref1 ? j <= ref1 : j >= ref1; i = 0 <= ref1 ? ++j : --j) {\n if (!this.attribs[i].isEqualNode(node.attribs[i])) {\n return false;\n }\n }\n return true;\n };\n\n return XMLElement;\n\n })(XMLNode);\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var XMLCharacterData, XMLNode,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n XMLNode = require('./XMLNode');\n\n module.exports = XMLCharacterData = (function(superClass) {\n extend(XMLCharacterData, superClass);\n\n function XMLCharacterData(parent) {\n XMLCharacterData.__super__.constructor.call(this, parent);\n this.value = '';\n }\n\n Object.defineProperty(XMLCharacterData.prototype, 'data', {\n get: function() {\n return this.value;\n },\n set: function(value) {\n return this.value = value || '';\n }\n });\n\n Object.defineProperty(XMLCharacterData.prototype, 'length', {\n get: function() {\n return this.value.length;\n }\n });\n\n Object.defineProperty(XMLCharacterData.prototype, 'textContent', {\n get: function() {\n return this.value;\n },\n set: function(value) {\n return this.value = value || '';\n }\n });\n\n XMLCharacterData.prototype.clone = function() {\n return Object.create(this);\n };\n\n XMLCharacterData.prototype.substringData = function(offset, count) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLCharacterData.prototype.appendData = function(arg) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLCharacterData.prototype.insertData = function(offset, arg) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLCharacterData.prototype.deleteData = function(offset, count) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLCharacterData.prototype.replaceData = function(offset, count, arg) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLCharacterData.prototype.isEqualNode = function(node) {\n if (!XMLCharacterData.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) {\n return false;\n }\n if (node.data !== this.data) {\n return false;\n }\n return true;\n };\n\n return XMLCharacterData;\n\n })(XMLNode);\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLCData, XMLCharacterData,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n NodeType = require('./NodeType');\n\n XMLCharacterData = require('./XMLCharacterData');\n\n module.exports = XMLCData = (function(superClass) {\n extend(XMLCData, superClass);\n\n function XMLCData(parent, text) {\n XMLCData.__super__.constructor.call(this, parent);\n if (text == null) {\n throw new Error(\"Missing CDATA text. \" + this.debugInfo());\n }\n this.name = \"#cdata-section\";\n this.type = NodeType.CData;\n this.value = this.stringify.cdata(text);\n }\n\n XMLCData.prototype.clone = function() {\n return Object.create(this);\n };\n\n XMLCData.prototype.toString = function(options) {\n return this.options.writer.cdata(this, this.options.writer.filterOptions(options));\n };\n\n return XMLCData;\n\n })(XMLCharacterData);\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLCharacterData, XMLComment,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n NodeType = require('./NodeType');\n\n XMLCharacterData = require('./XMLCharacterData');\n\n module.exports = XMLComment = (function(superClass) {\n extend(XMLComment, superClass);\n\n function XMLComment(parent, text) {\n XMLComment.__super__.constructor.call(this, parent);\n if (text == null) {\n throw new Error(\"Missing comment text. \" + this.debugInfo());\n }\n this.name = \"#comment\";\n this.type = NodeType.Comment;\n this.value = this.stringify.comment(text);\n }\n\n XMLComment.prototype.clone = function() {\n return Object.create(this);\n };\n\n XMLComment.prototype.toString = function(options) {\n return this.options.writer.comment(this, this.options.writer.filterOptions(options));\n };\n\n return XMLComment;\n\n })(XMLCharacterData);\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLDeclaration, XMLNode, isObject,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n isObject = require('./Utility').isObject;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n module.exports = XMLDeclaration = (function(superClass) {\n extend(XMLDeclaration, superClass);\n\n function XMLDeclaration(parent, version, encoding, standalone) {\n var ref;\n XMLDeclaration.__super__.constructor.call(this, parent);\n if (isObject(version)) {\n ref = version, version = ref.version, encoding = ref.encoding, standalone = ref.standalone;\n }\n if (!version) {\n version = '1.0';\n }\n this.type = NodeType.Declaration;\n this.version = this.stringify.xmlVersion(version);\n if (encoding != null) {\n this.encoding = this.stringify.xmlEncoding(encoding);\n }\n if (standalone != null) {\n this.standalone = this.stringify.xmlStandalone(standalone);\n }\n }\n\n XMLDeclaration.prototype.toString = function(options) {\n return this.options.writer.declaration(this, this.options.writer.filterOptions(options));\n };\n\n return XMLDeclaration;\n\n })(XMLNode);\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLDTDAttList, XMLNode,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n module.exports = XMLDTDAttList = (function(superClass) {\n extend(XMLDTDAttList, superClass);\n\n function XMLDTDAttList(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) {\n XMLDTDAttList.__super__.constructor.call(this, parent);\n if (elementName == null) {\n throw new Error(\"Missing DTD element name. \" + this.debugInfo());\n }\n if (attributeName == null) {\n throw new Error(\"Missing DTD attribute name. \" + this.debugInfo(elementName));\n }\n if (!attributeType) {\n throw new Error(\"Missing DTD attribute type. \" + this.debugInfo(elementName));\n }\n if (!defaultValueType) {\n throw new Error(\"Missing DTD attribute default. \" + this.debugInfo(elementName));\n }\n if (defaultValueType.indexOf('#') !== 0) {\n defaultValueType = '#' + defaultValueType;\n }\n if (!defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) {\n throw new Error(\"Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. \" + this.debugInfo(elementName));\n }\n if (defaultValue && !defaultValueType.match(/^(#FIXED|#DEFAULT)$/)) {\n throw new Error(\"Default value only applies to #FIXED or #DEFAULT. \" + this.debugInfo(elementName));\n }\n this.elementName = this.stringify.name(elementName);\n this.type = NodeType.AttributeDeclaration;\n this.attributeName = this.stringify.name(attributeName);\n this.attributeType = this.stringify.dtdAttType(attributeType);\n if (defaultValue) {\n this.defaultValue = this.stringify.dtdAttDefault(defaultValue);\n }\n this.defaultValueType = defaultValueType;\n }\n\n XMLDTDAttList.prototype.toString = function(options) {\n return this.options.writer.dtdAttList(this, this.options.writer.filterOptions(options));\n };\n\n return XMLDTDAttList;\n\n })(XMLNode);\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLDTDEntity, XMLNode, isObject,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n isObject = require('./Utility').isObject;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n module.exports = XMLDTDEntity = (function(superClass) {\n extend(XMLDTDEntity, superClass);\n\n function XMLDTDEntity(parent, pe, name, value) {\n XMLDTDEntity.__super__.constructor.call(this, parent);\n if (name == null) {\n throw new Error(\"Missing DTD entity name. \" + this.debugInfo(name));\n }\n if (value == null) {\n throw new Error(\"Missing DTD entity value. \" + this.debugInfo(name));\n }\n this.pe = !!pe;\n this.name = this.stringify.name(name);\n this.type = NodeType.EntityDeclaration;\n if (!isObject(value)) {\n this.value = this.stringify.dtdEntityValue(value);\n this.internal = true;\n } else {\n if (!value.pubID && !value.sysID) {\n throw new Error(\"Public and/or system identifiers are required for an external entity. \" + this.debugInfo(name));\n }\n if (value.pubID && !value.sysID) {\n throw new Error(\"System identifier is required for a public external entity. \" + this.debugInfo(name));\n }\n this.internal = false;\n if (value.pubID != null) {\n this.pubID = this.stringify.dtdPubID(value.pubID);\n }\n if (value.sysID != null) {\n this.sysID = this.stringify.dtdSysID(value.sysID);\n }\n if (value.nData != null) {\n this.nData = this.stringify.dtdNData(value.nData);\n }\n if (this.pe && this.nData) {\n throw new Error(\"Notation declaration is not allowed in a parameter entity. \" + this.debugInfo(name));\n }\n }\n }\n\n Object.defineProperty(XMLDTDEntity.prototype, 'publicId', {\n get: function() {\n return this.pubID;\n }\n });\n\n Object.defineProperty(XMLDTDEntity.prototype, 'systemId', {\n get: function() {\n return this.sysID;\n }\n });\n\n Object.defineProperty(XMLDTDEntity.prototype, 'notationName', {\n get: function() {\n return this.nData || null;\n }\n });\n\n Object.defineProperty(XMLDTDEntity.prototype, 'inputEncoding', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDTDEntity.prototype, 'xmlEncoding', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDTDEntity.prototype, 'xmlVersion', {\n get: function() {\n return null;\n }\n });\n\n XMLDTDEntity.prototype.toString = function(options) {\n return this.options.writer.dtdEntity(this, this.options.writer.filterOptions(options));\n };\n\n return XMLDTDEntity;\n\n })(XMLNode);\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLDTDElement, XMLNode,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n module.exports = XMLDTDElement = (function(superClass) {\n extend(XMLDTDElement, superClass);\n\n function XMLDTDElement(parent, name, value) {\n XMLDTDElement.__super__.constructor.call(this, parent);\n if (name == null) {\n throw new Error(\"Missing DTD element name. \" + this.debugInfo());\n }\n if (!value) {\n value = '(#PCDATA)';\n }\n if (Array.isArray(value)) {\n value = '(' + value.join(',') + ')';\n }\n this.name = this.stringify.name(name);\n this.type = NodeType.ElementDeclaration;\n this.value = this.stringify.dtdElementValue(value);\n }\n\n XMLDTDElement.prototype.toString = function(options) {\n return this.options.writer.dtdElement(this, this.options.writer.filterOptions(options));\n };\n\n return XMLDTDElement;\n\n })(XMLNode);\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLDTDNotation, XMLNode,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n module.exports = XMLDTDNotation = (function(superClass) {\n extend(XMLDTDNotation, superClass);\n\n function XMLDTDNotation(parent, name, value) {\n XMLDTDNotation.__super__.constructor.call(this, parent);\n if (name == null) {\n throw new Error(\"Missing DTD notation name. \" + this.debugInfo(name));\n }\n if (!value.pubID && !value.sysID) {\n throw new Error(\"Public or system identifiers are required for an external entity. \" + this.debugInfo(name));\n }\n this.name = this.stringify.name(name);\n this.type = NodeType.NotationDeclaration;\n if (value.pubID != null) {\n this.pubID = this.stringify.dtdPubID(value.pubID);\n }\n if (value.sysID != null) {\n this.sysID = this.stringify.dtdSysID(value.sysID);\n }\n }\n\n Object.defineProperty(XMLDTDNotation.prototype, 'publicId', {\n get: function() {\n return this.pubID;\n }\n });\n\n Object.defineProperty(XMLDTDNotation.prototype, 'systemId', {\n get: function() {\n return this.sysID;\n }\n });\n\n XMLDTDNotation.prototype.toString = function(options) {\n return this.options.writer.dtdNotation(this, this.options.writer.filterOptions(options));\n };\n\n return XMLDTDNotation;\n\n })(XMLNode);\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLNamedNodeMap, XMLNode, isObject,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n isObject = require('./Utility').isObject;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n XMLDTDAttList = require('./XMLDTDAttList');\n\n XMLDTDEntity = require('./XMLDTDEntity');\n\n XMLDTDElement = require('./XMLDTDElement');\n\n XMLDTDNotation = require('./XMLDTDNotation');\n\n XMLNamedNodeMap = require('./XMLNamedNodeMap');\n\n module.exports = XMLDocType = (function(superClass) {\n extend(XMLDocType, superClass);\n\n function XMLDocType(parent, pubID, sysID) {\n var child, i, len, ref, ref1, ref2;\n XMLDocType.__super__.constructor.call(this, parent);\n this.type = NodeType.DocType;\n if (parent.children) {\n ref = parent.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n if (child.type === NodeType.Element) {\n this.name = child.name;\n break;\n }\n }\n }\n this.documentObject = parent;\n if (isObject(pubID)) {\n ref1 = pubID, pubID = ref1.pubID, sysID = ref1.sysID;\n }\n if (sysID == null) {\n ref2 = [pubID, sysID], sysID = ref2[0], pubID = ref2[1];\n }\n if (pubID != null) {\n this.pubID = this.stringify.dtdPubID(pubID);\n }\n if (sysID != null) {\n this.sysID = this.stringify.dtdSysID(sysID);\n }\n }\n\n Object.defineProperty(XMLDocType.prototype, 'entities', {\n get: function() {\n var child, i, len, nodes, ref;\n nodes = {};\n ref = this.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n if ((child.type === NodeType.EntityDeclaration) && !child.pe) {\n nodes[child.name] = child;\n }\n }\n return new XMLNamedNodeMap(nodes);\n }\n });\n\n Object.defineProperty(XMLDocType.prototype, 'notations', {\n get: function() {\n var child, i, len, nodes, ref;\n nodes = {};\n ref = this.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n if (child.type === NodeType.NotationDeclaration) {\n nodes[child.name] = child;\n }\n }\n return new XMLNamedNodeMap(nodes);\n }\n });\n\n Object.defineProperty(XMLDocType.prototype, 'publicId', {\n get: function() {\n return this.pubID;\n }\n });\n\n Object.defineProperty(XMLDocType.prototype, 'systemId', {\n get: function() {\n return this.sysID;\n }\n });\n\n Object.defineProperty(XMLDocType.prototype, 'internalSubset', {\n get: function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n XMLDocType.prototype.element = function(name, value) {\n var child;\n child = new XMLDTDElement(this, name, value);\n this.children.push(child);\n return this;\n };\n\n XMLDocType.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) {\n var child;\n child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue);\n this.children.push(child);\n return this;\n };\n\n XMLDocType.prototype.entity = function(name, value) {\n var child;\n child = new XMLDTDEntity(this, false, name, value);\n this.children.push(child);\n return this;\n };\n\n XMLDocType.prototype.pEntity = function(name, value) {\n var child;\n child = new XMLDTDEntity(this, true, name, value);\n this.children.push(child);\n return this;\n };\n\n XMLDocType.prototype.notation = function(name, value) {\n var child;\n child = new XMLDTDNotation(this, name, value);\n this.children.push(child);\n return this;\n };\n\n XMLDocType.prototype.toString = function(options) {\n return this.options.writer.docType(this, this.options.writer.filterOptions(options));\n };\n\n XMLDocType.prototype.ele = function(name, value) {\n return this.element(name, value);\n };\n\n XMLDocType.prototype.att = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) {\n return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue);\n };\n\n XMLDocType.prototype.ent = function(name, value) {\n return this.entity(name, value);\n };\n\n XMLDocType.prototype.pent = function(name, value) {\n return this.pEntity(name, value);\n };\n\n XMLDocType.prototype.not = function(name, value) {\n return this.notation(name, value);\n };\n\n XMLDocType.prototype.up = function() {\n return this.root() || this.documentObject;\n };\n\n XMLDocType.prototype.isEqualNode = function(node) {\n if (!XMLDocType.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) {\n return false;\n }\n if (node.name !== this.name) {\n return false;\n }\n if (node.publicId !== this.publicId) {\n return false;\n }\n if (node.systemId !== this.systemId) {\n return false;\n }\n return true;\n };\n\n return XMLDocType;\n\n })(XMLNode);\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLNode, XMLRaw,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n NodeType = require('./NodeType');\n\n XMLNode = require('./XMLNode');\n\n module.exports = XMLRaw = (function(superClass) {\n extend(XMLRaw, superClass);\n\n function XMLRaw(parent, text) {\n XMLRaw.__super__.constructor.call(this, parent);\n if (text == null) {\n throw new Error(\"Missing raw text. \" + this.debugInfo());\n }\n this.type = NodeType.Raw;\n this.value = this.stringify.raw(text);\n }\n\n XMLRaw.prototype.clone = function() {\n return Object.create(this);\n };\n\n XMLRaw.prototype.toString = function(options) {\n return this.options.writer.raw(this, this.options.writer.filterOptions(options));\n };\n\n return XMLRaw;\n\n })(XMLNode);\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLCharacterData, XMLText,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n NodeType = require('./NodeType');\n\n XMLCharacterData = require('./XMLCharacterData');\n\n module.exports = XMLText = (function(superClass) {\n extend(XMLText, superClass);\n\n function XMLText(parent, text) {\n XMLText.__super__.constructor.call(this, parent);\n if (text == null) {\n throw new Error(\"Missing element text. \" + this.debugInfo());\n }\n this.name = \"#text\";\n this.type = NodeType.Text;\n this.value = this.stringify.text(text);\n }\n\n Object.defineProperty(XMLText.prototype, 'isElementContentWhitespace', {\n get: function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n Object.defineProperty(XMLText.prototype, 'wholeText', {\n get: function() {\n var next, prev, str;\n str = '';\n prev = this.previousSibling;\n while (prev) {\n str = prev.data + str;\n prev = prev.previousSibling;\n }\n str += this.data;\n next = this.nextSibling;\n while (next) {\n str = str + next.data;\n next = next.nextSibling;\n }\n return str;\n }\n });\n\n XMLText.prototype.clone = function() {\n return Object.create(this);\n };\n\n XMLText.prototype.toString = function(options) {\n return this.options.writer.text(this, this.options.writer.filterOptions(options));\n };\n\n XMLText.prototype.splitText = function(offset) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLText.prototype.replaceWholeText = function(content) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n return XMLText;\n\n })(XMLCharacterData);\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLCharacterData, XMLProcessingInstruction,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n NodeType = require('./NodeType');\n\n XMLCharacterData = require('./XMLCharacterData');\n\n module.exports = XMLProcessingInstruction = (function(superClass) {\n extend(XMLProcessingInstruction, superClass);\n\n function XMLProcessingInstruction(parent, target, value) {\n XMLProcessingInstruction.__super__.constructor.call(this, parent);\n if (target == null) {\n throw new Error(\"Missing instruction target. \" + this.debugInfo());\n }\n this.type = NodeType.ProcessingInstruction;\n this.target = this.stringify.insTarget(target);\n this.name = this.target;\n if (value) {\n this.value = this.stringify.insValue(value);\n }\n }\n\n XMLProcessingInstruction.prototype.clone = function() {\n return Object.create(this);\n };\n\n XMLProcessingInstruction.prototype.toString = function(options) {\n return this.options.writer.processingInstruction(this, this.options.writer.filterOptions(options));\n };\n\n XMLProcessingInstruction.prototype.isEqualNode = function(node) {\n if (!XMLProcessingInstruction.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) {\n return false;\n }\n if (node.target !== this.target) {\n return false;\n }\n return true;\n };\n\n return XMLProcessingInstruction;\n\n })(XMLCharacterData);\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLDummy, XMLNode,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n module.exports = XMLDummy = (function(superClass) {\n extend(XMLDummy, superClass);\n\n function XMLDummy(parent) {\n XMLDummy.__super__.constructor.call(this, parent);\n this.type = NodeType.Dummy;\n }\n\n XMLDummy.prototype.clone = function() {\n return Object.create(this);\n };\n\n XMLDummy.prototype.toString = function(options) {\n return '';\n };\n\n return XMLDummy;\n\n })(XMLNode);\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var XMLNodeList;\n\n module.exports = XMLNodeList = (function() {\n function XMLNodeList(nodes) {\n this.nodes = nodes;\n }\n\n Object.defineProperty(XMLNodeList.prototype, 'length', {\n get: function() {\n return this.nodes.length || 0;\n }\n });\n\n XMLNodeList.prototype.clone = function() {\n return this.nodes = null;\n };\n\n XMLNodeList.prototype.item = function(index) {\n return this.nodes[index] || null;\n };\n\n return XMLNodeList;\n\n })();\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n module.exports = {\n Disconnected: 1,\n Preceding: 2,\n Following: 4,\n Contains: 8,\n ContainedBy: 16,\n ImplementationSpecific: 32\n };\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var DocumentPosition, NodeType, XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLNamedNodeMap, XMLNode, XMLNodeList, XMLProcessingInstruction, XMLRaw, XMLText, getValue, isEmpty, isFunction, isObject, ref1,\n hasProp = {}.hasOwnProperty;\n\n ref1 = require('./Utility'), isObject = ref1.isObject, isFunction = ref1.isFunction, isEmpty = ref1.isEmpty, getValue = ref1.getValue;\n\n XMLElement = null;\n\n XMLCData = null;\n\n XMLComment = null;\n\n XMLDeclaration = null;\n\n XMLDocType = null;\n\n XMLRaw = null;\n\n XMLText = null;\n\n XMLProcessingInstruction = null;\n\n XMLDummy = null;\n\n NodeType = null;\n\n XMLNodeList = null;\n\n XMLNamedNodeMap = null;\n\n DocumentPosition = null;\n\n module.exports = XMLNode = (function() {\n function XMLNode(parent1) {\n this.parent = parent1;\n if (this.parent) {\n this.options = this.parent.options;\n this.stringify = this.parent.stringify;\n }\n this.value = null;\n this.children = [];\n this.baseURI = null;\n if (!XMLElement) {\n XMLElement = require('./XMLElement');\n XMLCData = require('./XMLCData');\n XMLComment = require('./XMLComment');\n XMLDeclaration = require('./XMLDeclaration');\n XMLDocType = require('./XMLDocType');\n XMLRaw = require('./XMLRaw');\n XMLText = require('./XMLText');\n XMLProcessingInstruction = require('./XMLProcessingInstruction');\n XMLDummy = require('./XMLDummy');\n NodeType = require('./NodeType');\n XMLNodeList = require('./XMLNodeList');\n XMLNamedNodeMap = require('./XMLNamedNodeMap');\n DocumentPosition = require('./DocumentPosition');\n }\n }\n\n Object.defineProperty(XMLNode.prototype, 'nodeName', {\n get: function() {\n return this.name;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'nodeType', {\n get: function() {\n return this.type;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'nodeValue', {\n get: function() {\n return this.value;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'parentNode', {\n get: function() {\n return this.parent;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'childNodes', {\n get: function() {\n if (!this.childNodeList || !this.childNodeList.nodes) {\n this.childNodeList = new XMLNodeList(this.children);\n }\n return this.childNodeList;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'firstChild', {\n get: function() {\n return this.children[0] || null;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'lastChild', {\n get: function() {\n return this.children[this.children.length - 1] || null;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'previousSibling', {\n get: function() {\n var i;\n i = this.parent.children.indexOf(this);\n return this.parent.children[i - 1] || null;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'nextSibling', {\n get: function() {\n var i;\n i = this.parent.children.indexOf(this);\n return this.parent.children[i + 1] || null;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'ownerDocument', {\n get: function() {\n return this.document() || null;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'textContent', {\n get: function() {\n var child, j, len, ref2, str;\n if (this.nodeType === NodeType.Element || this.nodeType === NodeType.DocumentFragment) {\n str = '';\n ref2 = this.children;\n for (j = 0, len = ref2.length; j < len; j++) {\n child = ref2[j];\n if (child.textContent) {\n str += child.textContent;\n }\n }\n return str;\n } else {\n return null;\n }\n },\n set: function(value) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n XMLNode.prototype.setParent = function(parent) {\n var child, j, len, ref2, results;\n this.parent = parent;\n if (parent) {\n this.options = parent.options;\n this.stringify = parent.stringify;\n }\n ref2 = this.children;\n results = [];\n for (j = 0, len = ref2.length; j < len; j++) {\n child = ref2[j];\n results.push(child.setParent(this));\n }\n return results;\n };\n\n XMLNode.prototype.element = function(name, attributes, text) {\n var childNode, item, j, k, key, lastChild, len, len1, ref2, ref3, val;\n lastChild = null;\n if (attributes === null && (text == null)) {\n ref2 = [{}, null], attributes = ref2[0], text = ref2[1];\n }\n if (attributes == null) {\n attributes = {};\n }\n attributes = getValue(attributes);\n if (!isObject(attributes)) {\n ref3 = [attributes, text], text = ref3[0], attributes = ref3[1];\n }\n if (name != null) {\n name = getValue(name);\n }\n if (Array.isArray(name)) {\n for (j = 0, len = name.length; j < len; j++) {\n item = name[j];\n lastChild = this.element(item);\n }\n } else if (isFunction(name)) {\n lastChild = this.element(name.apply());\n } else if (isObject(name)) {\n for (key in name) {\n if (!hasProp.call(name, key)) continue;\n val = name[key];\n if (isFunction(val)) {\n val = val.apply();\n }\n if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) {\n lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val);\n } else if (!this.options.separateArrayItems && Array.isArray(val) && isEmpty(val)) {\n lastChild = this.dummy();\n } else if (isObject(val) && isEmpty(val)) {\n lastChild = this.element(key);\n } else if (!this.options.keepNullNodes && (val == null)) {\n lastChild = this.dummy();\n } else if (!this.options.separateArrayItems && Array.isArray(val)) {\n for (k = 0, len1 = val.length; k < len1; k++) {\n item = val[k];\n childNode = {};\n childNode[key] = item;\n lastChild = this.element(childNode);\n }\n } else if (isObject(val)) {\n if (!this.options.ignoreDecorators && this.stringify.convertTextKey && key.indexOf(this.stringify.convertTextKey) === 0) {\n lastChild = this.element(val);\n } else {\n lastChild = this.element(key);\n lastChild.element(val);\n }\n } else {\n lastChild = this.element(key, val);\n }\n }\n } else if (!this.options.keepNullNodes && text === null) {\n lastChild = this.dummy();\n } else {\n if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) {\n lastChild = this.text(text);\n } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) {\n lastChild = this.cdata(text);\n } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) {\n lastChild = this.comment(text);\n } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) {\n lastChild = this.raw(text);\n } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && name.indexOf(this.stringify.convertPIKey) === 0) {\n lastChild = this.instruction(name.substr(this.stringify.convertPIKey.length), text);\n } else {\n lastChild = this.node(name, attributes, text);\n }\n }\n if (lastChild == null) {\n throw new Error(\"Could not create any elements with: \" + name + \". \" + this.debugInfo());\n }\n return lastChild;\n };\n\n XMLNode.prototype.insertBefore = function(name, attributes, text) {\n var child, i, newChild, refChild, removed;\n if (name != null ? name.type : void 0) {\n newChild = name;\n refChild = attributes;\n newChild.setParent(this);\n if (refChild) {\n i = children.indexOf(refChild);\n removed = children.splice(i);\n children.push(newChild);\n Array.prototype.push.apply(children, removed);\n } else {\n children.push(newChild);\n }\n return newChild;\n } else {\n if (this.isRoot) {\n throw new Error(\"Cannot insert elements at root level. \" + this.debugInfo(name));\n }\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i);\n child = this.parent.element(name, attributes, text);\n Array.prototype.push.apply(this.parent.children, removed);\n return child;\n }\n };\n\n XMLNode.prototype.insertAfter = function(name, attributes, text) {\n var child, i, removed;\n if (this.isRoot) {\n throw new Error(\"Cannot insert elements at root level. \" + this.debugInfo(name));\n }\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i + 1);\n child = this.parent.element(name, attributes, text);\n Array.prototype.push.apply(this.parent.children, removed);\n return child;\n };\n\n XMLNode.prototype.remove = function() {\n var i, ref2;\n if (this.isRoot) {\n throw new Error(\"Cannot remove the root element. \" + this.debugInfo());\n }\n i = this.parent.children.indexOf(this);\n [].splice.apply(this.parent.children, [i, i - i + 1].concat(ref2 = [])), ref2;\n return this.parent;\n };\n\n XMLNode.prototype.node = function(name, attributes, text) {\n var child, ref2;\n if (name != null) {\n name = getValue(name);\n }\n attributes || (attributes = {});\n attributes = getValue(attributes);\n if (!isObject(attributes)) {\n ref2 = [attributes, text], text = ref2[0], attributes = ref2[1];\n }\n child = new XMLElement(this, name, attributes);\n if (text != null) {\n child.text(text);\n }\n this.children.push(child);\n return child;\n };\n\n XMLNode.prototype.text = function(value) {\n var child;\n if (isObject(value)) {\n this.element(value);\n }\n child = new XMLText(this, value);\n this.children.push(child);\n return this;\n };\n\n XMLNode.prototype.cdata = function(value) {\n var child;\n child = new XMLCData(this, value);\n this.children.push(child);\n return this;\n };\n\n XMLNode.prototype.comment = function(value) {\n var child;\n child = new XMLComment(this, value);\n this.children.push(child);\n return this;\n };\n\n XMLNode.prototype.commentBefore = function(value) {\n var child, i, removed;\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i);\n child = this.parent.comment(value);\n Array.prototype.push.apply(this.parent.children, removed);\n return this;\n };\n\n XMLNode.prototype.commentAfter = function(value) {\n var child, i, removed;\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i + 1);\n child = this.parent.comment(value);\n Array.prototype.push.apply(this.parent.children, removed);\n return this;\n };\n\n XMLNode.prototype.raw = function(value) {\n var child;\n child = new XMLRaw(this, value);\n this.children.push(child);\n return this;\n };\n\n XMLNode.prototype.dummy = function() {\n var child;\n child = new XMLDummy(this);\n return child;\n };\n\n XMLNode.prototype.instruction = function(target, value) {\n var insTarget, insValue, instruction, j, len;\n if (target != null) {\n target = getValue(target);\n }\n if (value != null) {\n value = getValue(value);\n }\n if (Array.isArray(target)) {\n for (j = 0, len = target.length; j < len; j++) {\n insTarget = target[j];\n this.instruction(insTarget);\n }\n } else if (isObject(target)) {\n for (insTarget in target) {\n if (!hasProp.call(target, insTarget)) continue;\n insValue = target[insTarget];\n this.instruction(insTarget, insValue);\n }\n } else {\n if (isFunction(value)) {\n value = value.apply();\n }\n instruction = new XMLProcessingInstruction(this, target, value);\n this.children.push(instruction);\n }\n return this;\n };\n\n XMLNode.prototype.instructionBefore = function(target, value) {\n var child, i, removed;\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i);\n child = this.parent.instruction(target, value);\n Array.prototype.push.apply(this.parent.children, removed);\n return this;\n };\n\n XMLNode.prototype.instructionAfter = function(target, value) {\n var child, i, removed;\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i + 1);\n child = this.parent.instruction(target, value);\n Array.prototype.push.apply(this.parent.children, removed);\n return this;\n };\n\n XMLNode.prototype.declaration = function(version, encoding, standalone) {\n var doc, xmldec;\n doc = this.document();\n xmldec = new XMLDeclaration(doc, version, encoding, standalone);\n if (doc.children.length === 0) {\n doc.children.unshift(xmldec);\n } else if (doc.children[0].type === NodeType.Declaration) {\n doc.children[0] = xmldec;\n } else {\n doc.children.unshift(xmldec);\n }\n return doc.root() || doc;\n };\n\n XMLNode.prototype.dtd = function(pubID, sysID) {\n var child, doc, doctype, i, j, k, len, len1, ref2, ref3;\n doc = this.document();\n doctype = new XMLDocType(doc, pubID, sysID);\n ref2 = doc.children;\n for (i = j = 0, len = ref2.length; j < len; i = ++j) {\n child = ref2[i];\n if (child.type === NodeType.DocType) {\n doc.children[i] = doctype;\n return doctype;\n }\n }\n ref3 = doc.children;\n for (i = k = 0, len1 = ref3.length; k < len1; i = ++k) {\n child = ref3[i];\n if (child.isRoot) {\n doc.children.splice(i, 0, doctype);\n return doctype;\n }\n }\n doc.children.push(doctype);\n return doctype;\n };\n\n XMLNode.prototype.up = function() {\n if (this.isRoot) {\n throw new Error(\"The root node has no parent. Use doc() if you need to get the document object.\");\n }\n return this.parent;\n };\n\n XMLNode.prototype.root = function() {\n var node;\n node = this;\n while (node) {\n if (node.type === NodeType.Document) {\n return node.rootObject;\n } else if (node.isRoot) {\n return node;\n } else {\n node = node.parent;\n }\n }\n };\n\n XMLNode.prototype.document = function() {\n var node;\n node = this;\n while (node) {\n if (node.type === NodeType.Document) {\n return node;\n } else {\n node = node.parent;\n }\n }\n };\n\n XMLNode.prototype.end = function(options) {\n return this.document().end(options);\n };\n\n XMLNode.prototype.prev = function() {\n var i;\n i = this.parent.children.indexOf(this);\n if (i < 1) {\n throw new Error(\"Already at the first node. \" + this.debugInfo());\n }\n return this.parent.children[i - 1];\n };\n\n XMLNode.prototype.next = function() {\n var i;\n i = this.parent.children.indexOf(this);\n if (i === -1 || i === this.parent.children.length - 1) {\n throw new Error(\"Already at the last node. \" + this.debugInfo());\n }\n return this.parent.children[i + 1];\n };\n\n XMLNode.prototype.importDocument = function(doc) {\n var clonedRoot;\n clonedRoot = doc.root().clone();\n clonedRoot.parent = this;\n clonedRoot.isRoot = false;\n this.children.push(clonedRoot);\n return this;\n };\n\n XMLNode.prototype.debugInfo = function(name) {\n var ref2, ref3;\n name = name || this.name;\n if ((name == null) && !((ref2 = this.parent) != null ? ref2.name : void 0)) {\n return \"\";\n } else if (name == null) {\n return \"parent: <\" + this.parent.name + \">\";\n } else if (!((ref3 = this.parent) != null ? ref3.name : void 0)) {\n return \"node: <\" + name + \">\";\n } else {\n return \"node: <\" + name + \">, parent: <\" + this.parent.name + \">\";\n }\n };\n\n XMLNode.prototype.ele = function(name, attributes, text) {\n return this.element(name, attributes, text);\n };\n\n XMLNode.prototype.nod = function(name, attributes, text) {\n return this.node(name, attributes, text);\n };\n\n XMLNode.prototype.txt = function(value) {\n return this.text(value);\n };\n\n XMLNode.prototype.dat = function(value) {\n return this.cdata(value);\n };\n\n XMLNode.prototype.com = function(value) {\n return this.comment(value);\n };\n\n XMLNode.prototype.ins = function(target, value) {\n return this.instruction(target, value);\n };\n\n XMLNode.prototype.doc = function() {\n return this.document();\n };\n\n XMLNode.prototype.dec = function(version, encoding, standalone) {\n return this.declaration(version, encoding, standalone);\n };\n\n XMLNode.prototype.e = function(name, attributes, text) {\n return this.element(name, attributes, text);\n };\n\n XMLNode.prototype.n = function(name, attributes, text) {\n return this.node(name, attributes, text);\n };\n\n XMLNode.prototype.t = function(value) {\n return this.text(value);\n };\n\n XMLNode.prototype.d = function(value) {\n return this.cdata(value);\n };\n\n XMLNode.prototype.c = function(value) {\n return this.comment(value);\n };\n\n XMLNode.prototype.r = function(value) {\n return this.raw(value);\n };\n\n XMLNode.prototype.i = function(target, value) {\n return this.instruction(target, value);\n };\n\n XMLNode.prototype.u = function() {\n return this.up();\n };\n\n XMLNode.prototype.importXMLBuilder = function(doc) {\n return this.importDocument(doc);\n };\n\n XMLNode.prototype.replaceChild = function(newChild, oldChild) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLNode.prototype.removeChild = function(oldChild) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLNode.prototype.appendChild = function(newChild) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLNode.prototype.hasChildNodes = function() {\n return this.children.length !== 0;\n };\n\n XMLNode.prototype.cloneNode = function(deep) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLNode.prototype.normalize = function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLNode.prototype.isSupported = function(feature, version) {\n return true;\n };\n\n XMLNode.prototype.hasAttributes = function() {\n return this.attribs.length !== 0;\n };\n\n XMLNode.prototype.compareDocumentPosition = function(other) {\n var ref, res;\n ref = this;\n if (ref === other) {\n return 0;\n } else if (this.document() !== other.document()) {\n res = DocumentPosition.Disconnected | DocumentPosition.ImplementationSpecific;\n if (Math.random() < 0.5) {\n res |= DocumentPosition.Preceding;\n } else {\n res |= DocumentPosition.Following;\n }\n return res;\n } else if (ref.isAncestor(other)) {\n return DocumentPosition.Contains | DocumentPosition.Preceding;\n } else if (ref.isDescendant(other)) {\n return DocumentPosition.Contains | DocumentPosition.Following;\n } else if (ref.isPreceding(other)) {\n return DocumentPosition.Preceding;\n } else {\n return DocumentPosition.Following;\n }\n };\n\n XMLNode.prototype.isSameNode = function(other) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLNode.prototype.lookupPrefix = function(namespaceURI) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLNode.prototype.isDefaultNamespace = function(namespaceURI) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLNode.prototype.lookupNamespaceURI = function(prefix) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLNode.prototype.isEqualNode = function(node) {\n var i, j, ref2;\n if (node.nodeType !== this.nodeType) {\n return false;\n }\n if (node.children.length !== this.children.length) {\n return false;\n }\n for (i = j = 0, ref2 = this.children.length - 1; 0 <= ref2 ? j <= ref2 : j >= ref2; i = 0 <= ref2 ? ++j : --j) {\n if (!this.children[i].isEqualNode(node.children[i])) {\n return false;\n }\n }\n return true;\n };\n\n XMLNode.prototype.getFeature = function(feature, version) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLNode.prototype.setUserData = function(key, data, handler) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLNode.prototype.getUserData = function(key) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLNode.prototype.contains = function(other) {\n if (!other) {\n return false;\n }\n return other === this || this.isDescendant(other);\n };\n\n XMLNode.prototype.isDescendant = function(node) {\n var child, isDescendantChild, j, len, ref2;\n ref2 = this.children;\n for (j = 0, len = ref2.length; j < len; j++) {\n child = ref2[j];\n if (node === child) {\n return true;\n }\n isDescendantChild = child.isDescendant(node);\n if (isDescendantChild) {\n return true;\n }\n }\n return false;\n };\n\n XMLNode.prototype.isAncestor = function(node) {\n return node.isDescendant(this);\n };\n\n XMLNode.prototype.isPreceding = function(node) {\n var nodePos, thisPos;\n nodePos = this.treePosition(node);\n thisPos = this.treePosition(this);\n if (nodePos === -1 || thisPos === -1) {\n return false;\n } else {\n return nodePos < thisPos;\n }\n };\n\n XMLNode.prototype.isFollowing = function(node) {\n var nodePos, thisPos;\n nodePos = this.treePosition(node);\n thisPos = this.treePosition(this);\n if (nodePos === -1 || thisPos === -1) {\n return false;\n } else {\n return nodePos > thisPos;\n }\n };\n\n XMLNode.prototype.treePosition = function(node) {\n var found, pos;\n pos = 0;\n found = false;\n this.foreachTreeNode(this.document(), function(childNode) {\n pos++;\n if (!found && childNode === node) {\n return found = true;\n }\n });\n if (found) {\n return pos;\n } else {\n return -1;\n }\n };\n\n XMLNode.prototype.foreachTreeNode = function(node, func) {\n var child, j, len, ref2, res;\n node || (node = this.document());\n ref2 = node.children;\n for (j = 0, len = ref2.length; j < len; j++) {\n child = ref2[j];\n if (res = func(child)) {\n return res;\n } else {\n res = this.foreachTreeNode(child, func);\n if (res) {\n return res;\n }\n }\n }\n };\n\n return XMLNode;\n\n })();\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var XMLStringifier,\n bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n hasProp = {}.hasOwnProperty;\n\n module.exports = XMLStringifier = (function() {\n function XMLStringifier(options) {\n this.assertLegalName = bind(this.assertLegalName, this);\n this.assertLegalChar = bind(this.assertLegalChar, this);\n var key, ref, value;\n options || (options = {});\n this.options = options;\n if (!this.options.version) {\n this.options.version = '1.0';\n }\n ref = options.stringify || {};\n for (key in ref) {\n if (!hasProp.call(ref, key)) continue;\n value = ref[key];\n this[key] = value;\n }\n }\n\n XMLStringifier.prototype.name = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalName('' + val || '');\n };\n\n XMLStringifier.prototype.text = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar(this.textEscape('' + val || ''));\n };\n\n XMLStringifier.prototype.cdata = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n val = '' + val || '';\n val = val.replace(']]>', ']]]]>');\n return this.assertLegalChar(val);\n };\n\n XMLStringifier.prototype.comment = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n val = '' + val || '';\n if (val.match(/--/)) {\n throw new Error(\"Comment text cannot contain double-hypen: \" + val);\n }\n return this.assertLegalChar(val);\n };\n\n XMLStringifier.prototype.raw = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n return '' + val || '';\n };\n\n XMLStringifier.prototype.attValue = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar(this.attEscape(val = '' + val || ''));\n };\n\n XMLStringifier.prototype.insTarget = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n };\n\n XMLStringifier.prototype.insValue = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n val = '' + val || '';\n if (val.match(/\\?>/)) {\n throw new Error(\"Invalid processing instruction value: \" + val);\n }\n return this.assertLegalChar(val);\n };\n\n XMLStringifier.prototype.xmlVersion = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n val = '' + val || '';\n if (!val.match(/1\\.[0-9]+/)) {\n throw new Error(\"Invalid version number: \" + val);\n }\n return val;\n };\n\n XMLStringifier.prototype.xmlEncoding = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n val = '' + val || '';\n if (!val.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)) {\n throw new Error(\"Invalid encoding: \" + val);\n }\n return this.assertLegalChar(val);\n };\n\n XMLStringifier.prototype.xmlStandalone = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n if (val) {\n return \"yes\";\n } else {\n return \"no\";\n }\n };\n\n XMLStringifier.prototype.dtdPubID = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n };\n\n XMLStringifier.prototype.dtdSysID = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n };\n\n XMLStringifier.prototype.dtdElementValue = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n };\n\n XMLStringifier.prototype.dtdAttType = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n };\n\n XMLStringifier.prototype.dtdAttDefault = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n };\n\n XMLStringifier.prototype.dtdEntityValue = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n };\n\n XMLStringifier.prototype.dtdNData = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n };\n\n XMLStringifier.prototype.convertAttKey = '@';\n\n XMLStringifier.prototype.convertPIKey = '?';\n\n XMLStringifier.prototype.convertTextKey = '#text';\n\n XMLStringifier.prototype.convertCDataKey = '#cdata';\n\n XMLStringifier.prototype.convertCommentKey = '#comment';\n\n XMLStringifier.prototype.convertRawKey = '#raw';\n\n XMLStringifier.prototype.assertLegalChar = function(str) {\n var regex, res;\n if (this.options.noValidation) {\n return str;\n }\n regex = '';\n if (this.options.version === '1.0') {\n regex = /[\\0-\\x08\\x0B\\f\\x0E-\\x1F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/;\n if (res = str.match(regex)) {\n throw new Error(\"Invalid character in string: \" + str + \" at index \" + res.index);\n }\n } else if (this.options.version === '1.1') {\n regex = /[\\0\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/;\n if (res = str.match(regex)) {\n throw new Error(\"Invalid character in string: \" + str + \" at index \" + res.index);\n }\n }\n return str;\n };\n\n XMLStringifier.prototype.assertLegalName = function(str) {\n var regex;\n if (this.options.noValidation) {\n return str;\n }\n this.assertLegalChar(str);\n regex = /^([:A-Z_a-z\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|[\\uD800-\\uDB7F][\\uDC00-\\uDFFF])([\\x2D\\.0-:A-Z_a-z\\xB7\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u037D\\u037F-\\u1FFF\\u200C\\u200D\\u203F\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|[\\uD800-\\uDB7F][\\uDC00-\\uDFFF])*$/;\n if (!str.match(regex)) {\n throw new Error(\"Invalid character in name\");\n }\n return str;\n };\n\n XMLStringifier.prototype.textEscape = function(str) {\n var ampregex;\n if (this.options.noValidation) {\n return str;\n }\n ampregex = this.options.noDoubleEncoding ? /(?!&\\S+;)&/g : /&/g;\n return str.replace(ampregex, '&').replace(//g, '>').replace(/\\r/g, ' ');\n };\n\n XMLStringifier.prototype.attEscape = function(str) {\n var ampregex;\n if (this.options.noValidation) {\n return str;\n }\n ampregex = this.options.noDoubleEncoding ? /(?!&\\S+;)&/g : /&/g;\n return str.replace(ampregex, '&').replace(/ 0) {\n return new Array(indentLevel).join(options.indent);\n }\n }\n return '';\n };\n\n XMLWriterBase.prototype.endline = function(node, options, level) {\n if (!options.pretty || options.suppressPrettyCount) {\n return '';\n } else {\n return options.newline;\n }\n };\n\n XMLWriterBase.prototype.attribute = function(att, options, level) {\n var r;\n this.openAttribute(att, options, level);\n r = ' ' + att.name + '=\"' + att.value + '\"';\n this.closeAttribute(att, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.cdata = function(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.comment = function(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.declaration = function(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '';\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.docType = function(node, options, level) {\n var child, i, len, r, ref;\n level || (level = 0);\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level);\n r += ' 0) {\n r += ' [';\n r += this.endline(node, options, level);\n options.state = WriterState.InsideTag;\n ref = node.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n r += this.writeChildNode(child, options, level + 1);\n }\n options.state = WriterState.CloseTag;\n r += ']';\n }\n options.state = WriterState.CloseTag;\n r += options.spaceBeforeSlash + '>';\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.element = function(node, options, level) {\n var att, child, childNodeCount, firstChildNode, i, j, len, len1, name, prettySuppressed, r, ref, ref1, ref2;\n level || (level = 0);\n prettySuppressed = false;\n r = '';\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r += this.indent(node, options, level) + '<' + node.name;\n ref = node.attribs;\n for (name in ref) {\n if (!hasProp.call(ref, name)) continue;\n att = ref[name];\n r += this.attribute(att, options, level);\n }\n childNodeCount = node.children.length;\n firstChildNode = childNodeCount === 0 ? null : node.children[0];\n if (childNodeCount === 0 || node.children.every(function(e) {\n return (e.type === NodeType.Text || e.type === NodeType.Raw) && e.value === '';\n })) {\n if (options.allowEmpty) {\n r += '>';\n options.state = WriterState.CloseTag;\n r += '' + this.endline(node, options, level);\n } else {\n options.state = WriterState.CloseTag;\n r += options.spaceBeforeSlash + '/>' + this.endline(node, options, level);\n }\n } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw) && (firstChildNode.value != null)) {\n r += '>';\n options.state = WriterState.InsideTag;\n options.suppressPrettyCount++;\n prettySuppressed = true;\n r += this.writeChildNode(firstChildNode, options, level + 1);\n options.suppressPrettyCount--;\n prettySuppressed = false;\n options.state = WriterState.CloseTag;\n r += '' + this.endline(node, options, level);\n } else {\n if (options.dontPrettyTextNodes) {\n ref1 = node.children;\n for (i = 0, len = ref1.length; i < len; i++) {\n child = ref1[i];\n if ((child.type === NodeType.Text || child.type === NodeType.Raw) && (child.value != null)) {\n options.suppressPrettyCount++;\n prettySuppressed = true;\n break;\n }\n }\n }\n r += '>' + this.endline(node, options, level);\n options.state = WriterState.InsideTag;\n ref2 = node.children;\n for (j = 0, len1 = ref2.length; j < len1; j++) {\n child = ref2[j];\n r += this.writeChildNode(child, options, level + 1);\n }\n options.state = WriterState.CloseTag;\n r += this.indent(node, options, level) + '';\n if (prettySuppressed) {\n options.suppressPrettyCount--;\n }\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n }\n this.closeNode(node, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.writeChildNode = function(node, options, level) {\n switch (node.type) {\n case NodeType.CData:\n return this.cdata(node, options, level);\n case NodeType.Comment:\n return this.comment(node, options, level);\n case NodeType.Element:\n return this.element(node, options, level);\n case NodeType.Raw:\n return this.raw(node, options, level);\n case NodeType.Text:\n return this.text(node, options, level);\n case NodeType.ProcessingInstruction:\n return this.processingInstruction(node, options, level);\n case NodeType.Dummy:\n return '';\n case NodeType.Declaration:\n return this.declaration(node, options, level);\n case NodeType.DocType:\n return this.docType(node, options, level);\n case NodeType.AttributeDeclaration:\n return this.dtdAttList(node, options, level);\n case NodeType.ElementDeclaration:\n return this.dtdElement(node, options, level);\n case NodeType.EntityDeclaration:\n return this.dtdEntity(node, options, level);\n case NodeType.NotationDeclaration:\n return this.dtdNotation(node, options, level);\n default:\n throw new Error(\"Unknown XML node type: \" + node.constructor.name);\n }\n };\n\n XMLWriterBase.prototype.processingInstruction = function(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '';\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.raw = function(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level);\n options.state = WriterState.InsideTag;\n r += node.value;\n options.state = WriterState.CloseTag;\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.text = function(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level);\n options.state = WriterState.InsideTag;\n r += node.value;\n options.state = WriterState.CloseTag;\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.dtdAttList = function(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.dtdElement = function(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.dtdEntity = function(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.dtdNotation = function(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.openNode = function(node, options, level) {};\n\n XMLWriterBase.prototype.closeNode = function(node, options, level) {};\n\n XMLWriterBase.prototype.openAttribute = function(att, options, level) {};\n\n XMLWriterBase.prototype.closeAttribute = function(att, options, level) {};\n\n return XMLWriterBase;\n\n })();\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var XMLStringWriter, XMLWriterBase,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n XMLWriterBase = require('./XMLWriterBase');\n\n module.exports = XMLStringWriter = (function(superClass) {\n extend(XMLStringWriter, superClass);\n\n function XMLStringWriter(options) {\n XMLStringWriter.__super__.constructor.call(this, options);\n }\n\n XMLStringWriter.prototype.document = function(doc, options) {\n var child, i, len, r, ref;\n options = this.filterOptions(options);\n r = '';\n ref = doc.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n r += this.writeChildNode(child, options, 0);\n }\n if (options.pretty && r.slice(-options.newline.length) === options.newline) {\n r = r.slice(0, -options.newline.length);\n }\n return r;\n };\n\n return XMLStringWriter;\n\n })(XMLWriterBase);\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLDOMConfiguration, XMLDOMImplementation, XMLDocument, XMLNode, XMLStringWriter, XMLStringifier, isPlainObject,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n isPlainObject = require('./Utility').isPlainObject;\n\n XMLDOMImplementation = require('./XMLDOMImplementation');\n\n XMLDOMConfiguration = require('./XMLDOMConfiguration');\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n XMLStringifier = require('./XMLStringifier');\n\n XMLStringWriter = require('./XMLStringWriter');\n\n module.exports = XMLDocument = (function(superClass) {\n extend(XMLDocument, superClass);\n\n function XMLDocument(options) {\n XMLDocument.__super__.constructor.call(this, null);\n this.name = \"#document\";\n this.type = NodeType.Document;\n this.documentURI = null;\n this.domConfig = new XMLDOMConfiguration();\n options || (options = {});\n if (!options.writer) {\n options.writer = new XMLStringWriter();\n }\n this.options = options;\n this.stringify = new XMLStringifier(options);\n }\n\n Object.defineProperty(XMLDocument.prototype, 'implementation', {\n value: new XMLDOMImplementation()\n });\n\n Object.defineProperty(XMLDocument.prototype, 'doctype', {\n get: function() {\n var child, i, len, ref;\n ref = this.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n if (child.type === NodeType.DocType) {\n return child;\n }\n }\n return null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'documentElement', {\n get: function() {\n return this.rootObject || null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'inputEncoding', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'strictErrorChecking', {\n get: function() {\n return false;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'xmlEncoding', {\n get: function() {\n if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {\n return this.children[0].encoding;\n } else {\n return null;\n }\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'xmlStandalone', {\n get: function() {\n if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {\n return this.children[0].standalone === 'yes';\n } else {\n return false;\n }\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'xmlVersion', {\n get: function() {\n if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {\n return this.children[0].version;\n } else {\n return \"1.0\";\n }\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'URL', {\n get: function() {\n return this.documentURI;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'origin', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'compatMode', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'characterSet', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'contentType', {\n get: function() {\n return null;\n }\n });\n\n XMLDocument.prototype.end = function(writer) {\n var writerOptions;\n writerOptions = {};\n if (!writer) {\n writer = this.options.writer;\n } else if (isPlainObject(writer)) {\n writerOptions = writer;\n writer = this.options.writer;\n }\n return writer.document(this, writer.filterOptions(writerOptions));\n };\n\n XMLDocument.prototype.toString = function(options) {\n return this.options.writer.document(this, this.options.writer.filterOptions(options));\n };\n\n XMLDocument.prototype.createElement = function(tagName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createDocumentFragment = function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createTextNode = function(data) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createComment = function(data) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createCDATASection = function(data) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createProcessingInstruction = function(target, data) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createAttribute = function(name) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createEntityReference = function(name) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.getElementsByTagName = function(tagname) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.importNode = function(importedNode, deep) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createElementNS = function(namespaceURI, qualifiedName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createAttributeNS = function(namespaceURI, qualifiedName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.getElementsByTagNameNS = function(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.getElementById = function(elementId) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.adoptNode = function(source) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.normalizeDocument = function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.renameNode = function(node, namespaceURI, qualifiedName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.getElementsByClassName = function(classNames) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createEvent = function(eventInterface) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createRange = function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createNodeIterator = function(root, whatToShow, filter) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createTreeWalker = function(root, whatToShow, filter) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n return XMLDocument;\n\n })(XMLNode);\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, WriterState, XMLAttribute, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDocument, XMLDocumentCB, XMLElement, XMLProcessingInstruction, XMLRaw, XMLStringWriter, XMLStringifier, XMLText, getValue, isFunction, isObject, isPlainObject, ref,\n hasProp = {}.hasOwnProperty;\n\n ref = require('./Utility'), isObject = ref.isObject, isFunction = ref.isFunction, isPlainObject = ref.isPlainObject, getValue = ref.getValue;\n\n NodeType = require('./NodeType');\n\n XMLDocument = require('./XMLDocument');\n\n XMLElement = require('./XMLElement');\n\n XMLCData = require('./XMLCData');\n\n XMLComment = require('./XMLComment');\n\n XMLRaw = require('./XMLRaw');\n\n XMLText = require('./XMLText');\n\n XMLProcessingInstruction = require('./XMLProcessingInstruction');\n\n XMLDeclaration = require('./XMLDeclaration');\n\n XMLDocType = require('./XMLDocType');\n\n XMLDTDAttList = require('./XMLDTDAttList');\n\n XMLDTDEntity = require('./XMLDTDEntity');\n\n XMLDTDElement = require('./XMLDTDElement');\n\n XMLDTDNotation = require('./XMLDTDNotation');\n\n XMLAttribute = require('./XMLAttribute');\n\n XMLStringifier = require('./XMLStringifier');\n\n XMLStringWriter = require('./XMLStringWriter');\n\n WriterState = require('./WriterState');\n\n module.exports = XMLDocumentCB = (function() {\n function XMLDocumentCB(options, onData, onEnd) {\n var writerOptions;\n this.name = \"?xml\";\n this.type = NodeType.Document;\n options || (options = {});\n writerOptions = {};\n if (!options.writer) {\n options.writer = new XMLStringWriter();\n } else if (isPlainObject(options.writer)) {\n writerOptions = options.writer;\n options.writer = new XMLStringWriter();\n }\n this.options = options;\n this.writer = options.writer;\n this.writerOptions = this.writer.filterOptions(writerOptions);\n this.stringify = new XMLStringifier(options);\n this.onDataCallback = onData || function() {};\n this.onEndCallback = onEnd || function() {};\n this.currentNode = null;\n this.currentLevel = -1;\n this.openTags = {};\n this.documentStarted = false;\n this.documentCompleted = false;\n this.root = null;\n }\n\n XMLDocumentCB.prototype.createChildNode = function(node) {\n var att, attName, attributes, child, i, len, ref1, ref2;\n switch (node.type) {\n case NodeType.CData:\n this.cdata(node.value);\n break;\n case NodeType.Comment:\n this.comment(node.value);\n break;\n case NodeType.Element:\n attributes = {};\n ref1 = node.attribs;\n for (attName in ref1) {\n if (!hasProp.call(ref1, attName)) continue;\n att = ref1[attName];\n attributes[attName] = att.value;\n }\n this.node(node.name, attributes);\n break;\n case NodeType.Dummy:\n this.dummy();\n break;\n case NodeType.Raw:\n this.raw(node.value);\n break;\n case NodeType.Text:\n this.text(node.value);\n break;\n case NodeType.ProcessingInstruction:\n this.instruction(node.target, node.value);\n break;\n default:\n throw new Error(\"This XML node type is not supported in a JS object: \" + node.constructor.name);\n }\n ref2 = node.children;\n for (i = 0, len = ref2.length; i < len; i++) {\n child = ref2[i];\n this.createChildNode(child);\n if (child.type === NodeType.Element) {\n this.up();\n }\n }\n return this;\n };\n\n XMLDocumentCB.prototype.dummy = function() {\n return this;\n };\n\n XMLDocumentCB.prototype.node = function(name, attributes, text) {\n var ref1;\n if (name == null) {\n throw new Error(\"Missing node name.\");\n }\n if (this.root && this.currentLevel === -1) {\n throw new Error(\"Document can only have one root node. \" + this.debugInfo(name));\n }\n this.openCurrent();\n name = getValue(name);\n if (attributes == null) {\n attributes = {};\n }\n attributes = getValue(attributes);\n if (!isObject(attributes)) {\n ref1 = [attributes, text], text = ref1[0], attributes = ref1[1];\n }\n this.currentNode = new XMLElement(this, name, attributes);\n this.currentNode.children = false;\n this.currentLevel++;\n this.openTags[this.currentLevel] = this.currentNode;\n if (text != null) {\n this.text(text);\n }\n return this;\n };\n\n XMLDocumentCB.prototype.element = function(name, attributes, text) {\n var child, i, len, oldValidationFlag, ref1, root;\n if (this.currentNode && this.currentNode.type === NodeType.DocType) {\n this.dtdElement.apply(this, arguments);\n } else {\n if (Array.isArray(name) || isObject(name) || isFunction(name)) {\n oldValidationFlag = this.options.noValidation;\n this.options.noValidation = true;\n root = new XMLDocument(this.options).element('TEMP_ROOT');\n root.element(name);\n this.options.noValidation = oldValidationFlag;\n ref1 = root.children;\n for (i = 0, len = ref1.length; i < len; i++) {\n child = ref1[i];\n this.createChildNode(child);\n if (child.type === NodeType.Element) {\n this.up();\n }\n }\n } else {\n this.node(name, attributes, text);\n }\n }\n return this;\n };\n\n XMLDocumentCB.prototype.attribute = function(name, value) {\n var attName, attValue;\n if (!this.currentNode || this.currentNode.children) {\n throw new Error(\"att() can only be used immediately after an ele() call in callback mode. \" + this.debugInfo(name));\n }\n if (name != null) {\n name = getValue(name);\n }\n if (isObject(name)) {\n for (attName in name) {\n if (!hasProp.call(name, attName)) continue;\n attValue = name[attName];\n this.attribute(attName, attValue);\n }\n } else {\n if (isFunction(value)) {\n value = value.apply();\n }\n if (this.options.keepNullAttributes && (value == null)) {\n this.currentNode.attribs[name] = new XMLAttribute(this, name, \"\");\n } else if (value != null) {\n this.currentNode.attribs[name] = new XMLAttribute(this, name, value);\n }\n }\n return this;\n };\n\n XMLDocumentCB.prototype.text = function(value) {\n var node;\n this.openCurrent();\n node = new XMLText(this, value);\n this.onData(this.writer.text(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n };\n\n XMLDocumentCB.prototype.cdata = function(value) {\n var node;\n this.openCurrent();\n node = new XMLCData(this, value);\n this.onData(this.writer.cdata(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n };\n\n XMLDocumentCB.prototype.comment = function(value) {\n var node;\n this.openCurrent();\n node = new XMLComment(this, value);\n this.onData(this.writer.comment(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n };\n\n XMLDocumentCB.prototype.raw = function(value) {\n var node;\n this.openCurrent();\n node = new XMLRaw(this, value);\n this.onData(this.writer.raw(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n };\n\n XMLDocumentCB.prototype.instruction = function(target, value) {\n var i, insTarget, insValue, len, node;\n this.openCurrent();\n if (target != null) {\n target = getValue(target);\n }\n if (value != null) {\n value = getValue(value);\n }\n if (Array.isArray(target)) {\n for (i = 0, len = target.length; i < len; i++) {\n insTarget = target[i];\n this.instruction(insTarget);\n }\n } else if (isObject(target)) {\n for (insTarget in target) {\n if (!hasProp.call(target, insTarget)) continue;\n insValue = target[insTarget];\n this.instruction(insTarget, insValue);\n }\n } else {\n if (isFunction(value)) {\n value = value.apply();\n }\n node = new XMLProcessingInstruction(this, target, value);\n this.onData(this.writer.processingInstruction(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n }\n return this;\n };\n\n XMLDocumentCB.prototype.declaration = function(version, encoding, standalone) {\n var node;\n this.openCurrent();\n if (this.documentStarted) {\n throw new Error(\"declaration() must be the first node.\");\n }\n node = new XMLDeclaration(this, version, encoding, standalone);\n this.onData(this.writer.declaration(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n };\n\n XMLDocumentCB.prototype.doctype = function(root, pubID, sysID) {\n this.openCurrent();\n if (root == null) {\n throw new Error(\"Missing root node name.\");\n }\n if (this.root) {\n throw new Error(\"dtd() must come before the root node.\");\n }\n this.currentNode = new XMLDocType(this, pubID, sysID);\n this.currentNode.rootNodeName = root;\n this.currentNode.children = false;\n this.currentLevel++;\n this.openTags[this.currentLevel] = this.currentNode;\n return this;\n };\n\n XMLDocumentCB.prototype.dtdElement = function(name, value) {\n var node;\n this.openCurrent();\n node = new XMLDTDElement(this, name, value);\n this.onData(this.writer.dtdElement(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n };\n\n XMLDocumentCB.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) {\n var node;\n this.openCurrent();\n node = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue);\n this.onData(this.writer.dtdAttList(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n };\n\n XMLDocumentCB.prototype.entity = function(name, value) {\n var node;\n this.openCurrent();\n node = new XMLDTDEntity(this, false, name, value);\n this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n };\n\n XMLDocumentCB.prototype.pEntity = function(name, value) {\n var node;\n this.openCurrent();\n node = new XMLDTDEntity(this, true, name, value);\n this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n };\n\n XMLDocumentCB.prototype.notation = function(name, value) {\n var node;\n this.openCurrent();\n node = new XMLDTDNotation(this, name, value);\n this.onData(this.writer.dtdNotation(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n };\n\n XMLDocumentCB.prototype.up = function() {\n if (this.currentLevel < 0) {\n throw new Error(\"The document node has no parent.\");\n }\n if (this.currentNode) {\n if (this.currentNode.children) {\n this.closeNode(this.currentNode);\n } else {\n this.openNode(this.currentNode);\n }\n this.currentNode = null;\n } else {\n this.closeNode(this.openTags[this.currentLevel]);\n }\n delete this.openTags[this.currentLevel];\n this.currentLevel--;\n return this;\n };\n\n XMLDocumentCB.prototype.end = function() {\n while (this.currentLevel >= 0) {\n this.up();\n }\n return this.onEnd();\n };\n\n XMLDocumentCB.prototype.openCurrent = function() {\n if (this.currentNode) {\n this.currentNode.children = true;\n return this.openNode(this.currentNode);\n }\n };\n\n XMLDocumentCB.prototype.openNode = function(node) {\n var att, chunk, name, ref1;\n if (!node.isOpen) {\n if (!this.root && this.currentLevel === 0 && node.type === NodeType.Element) {\n this.root = node;\n }\n chunk = '';\n if (node.type === NodeType.Element) {\n this.writerOptions.state = WriterState.OpenTag;\n chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '<' + node.name;\n ref1 = node.attribs;\n for (name in ref1) {\n if (!hasProp.call(ref1, name)) continue;\n att = ref1[name];\n chunk += this.writer.attribute(att, this.writerOptions, this.currentLevel);\n }\n chunk += (node.children ? '>' : '/>') + this.writer.endline(node, this.writerOptions, this.currentLevel);\n this.writerOptions.state = WriterState.InsideTag;\n } else {\n this.writerOptions.state = WriterState.OpenTag;\n chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '';\n }\n chunk += this.writer.endline(node, this.writerOptions, this.currentLevel);\n }\n this.onData(chunk, this.currentLevel);\n return node.isOpen = true;\n }\n };\n\n XMLDocumentCB.prototype.closeNode = function(node) {\n var chunk;\n if (!node.isClosed) {\n chunk = '';\n this.writerOptions.state = WriterState.CloseTag;\n if (node.type === NodeType.Element) {\n chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '' + this.writer.endline(node, this.writerOptions, this.currentLevel);\n } else {\n chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + ']>' + this.writer.endline(node, this.writerOptions, this.currentLevel);\n }\n this.writerOptions.state = WriterState.None;\n this.onData(chunk, this.currentLevel);\n return node.isClosed = true;\n }\n };\n\n XMLDocumentCB.prototype.onData = function(chunk, level) {\n this.documentStarted = true;\n return this.onDataCallback(chunk, level + 1);\n };\n\n XMLDocumentCB.prototype.onEnd = function() {\n this.documentCompleted = true;\n return this.onEndCallback();\n };\n\n XMLDocumentCB.prototype.debugInfo = function(name) {\n if (name == null) {\n return \"\";\n } else {\n return \"node: <\" + name + \">\";\n }\n };\n\n XMLDocumentCB.prototype.ele = function() {\n return this.element.apply(this, arguments);\n };\n\n XMLDocumentCB.prototype.nod = function(name, attributes, text) {\n return this.node(name, attributes, text);\n };\n\n XMLDocumentCB.prototype.txt = function(value) {\n return this.text(value);\n };\n\n XMLDocumentCB.prototype.dat = function(value) {\n return this.cdata(value);\n };\n\n XMLDocumentCB.prototype.com = function(value) {\n return this.comment(value);\n };\n\n XMLDocumentCB.prototype.ins = function(target, value) {\n return this.instruction(target, value);\n };\n\n XMLDocumentCB.prototype.dec = function(version, encoding, standalone) {\n return this.declaration(version, encoding, standalone);\n };\n\n XMLDocumentCB.prototype.dtd = function(root, pubID, sysID) {\n return this.doctype(root, pubID, sysID);\n };\n\n XMLDocumentCB.prototype.e = function(name, attributes, text) {\n return this.element(name, attributes, text);\n };\n\n XMLDocumentCB.prototype.n = function(name, attributes, text) {\n return this.node(name, attributes, text);\n };\n\n XMLDocumentCB.prototype.t = function(value) {\n return this.text(value);\n };\n\n XMLDocumentCB.prototype.d = function(value) {\n return this.cdata(value);\n };\n\n XMLDocumentCB.prototype.c = function(value) {\n return this.comment(value);\n };\n\n XMLDocumentCB.prototype.r = function(value) {\n return this.raw(value);\n };\n\n XMLDocumentCB.prototype.i = function(target, value) {\n return this.instruction(target, value);\n };\n\n XMLDocumentCB.prototype.att = function() {\n if (this.currentNode && this.currentNode.type === NodeType.DocType) {\n return this.attList.apply(this, arguments);\n } else {\n return this.attribute.apply(this, arguments);\n }\n };\n\n XMLDocumentCB.prototype.a = function() {\n if (this.currentNode && this.currentNode.type === NodeType.DocType) {\n return this.attList.apply(this, arguments);\n } else {\n return this.attribute.apply(this, arguments);\n }\n };\n\n XMLDocumentCB.prototype.ent = function(name, value) {\n return this.entity(name, value);\n };\n\n XMLDocumentCB.prototype.pent = function(name, value) {\n return this.pEntity(name, value);\n };\n\n XMLDocumentCB.prototype.not = function(name, value) {\n return this.notation(name, value);\n };\n\n return XMLDocumentCB;\n\n })();\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, WriterState, XMLStreamWriter, XMLWriterBase,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n NodeType = require('./NodeType');\n\n XMLWriterBase = require('./XMLWriterBase');\n\n WriterState = require('./WriterState');\n\n module.exports = XMLStreamWriter = (function(superClass) {\n extend(XMLStreamWriter, superClass);\n\n function XMLStreamWriter(stream, options) {\n this.stream = stream;\n XMLStreamWriter.__super__.constructor.call(this, options);\n }\n\n XMLStreamWriter.prototype.endline = function(node, options, level) {\n if (node.isLastRootNode && options.state === WriterState.CloseTag) {\n return '';\n } else {\n return XMLStreamWriter.__super__.endline.call(this, node, options, level);\n }\n };\n\n XMLStreamWriter.prototype.document = function(doc, options) {\n var child, i, j, k, len, len1, ref, ref1, results;\n ref = doc.children;\n for (i = j = 0, len = ref.length; j < len; i = ++j) {\n child = ref[i];\n child.isLastRootNode = i === doc.children.length - 1;\n }\n options = this.filterOptions(options);\n ref1 = doc.children;\n results = [];\n for (k = 0, len1 = ref1.length; k < len1; k++) {\n child = ref1[k];\n results.push(this.writeChildNode(child, options, 0));\n }\n return results;\n };\n\n XMLStreamWriter.prototype.attribute = function(att, options, level) {\n return this.stream.write(XMLStreamWriter.__super__.attribute.call(this, att, options, level));\n };\n\n XMLStreamWriter.prototype.cdata = function(node, options, level) {\n return this.stream.write(XMLStreamWriter.__super__.cdata.call(this, node, options, level));\n };\n\n XMLStreamWriter.prototype.comment = function(node, options, level) {\n return this.stream.write(XMLStreamWriter.__super__.comment.call(this, node, options, level));\n };\n\n XMLStreamWriter.prototype.declaration = function(node, options, level) {\n return this.stream.write(XMLStreamWriter.__super__.declaration.call(this, node, options, level));\n };\n\n XMLStreamWriter.prototype.docType = function(node, options, level) {\n var child, j, len, ref;\n level || (level = 0);\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n this.stream.write(this.indent(node, options, level));\n this.stream.write(' 0) {\n this.stream.write(' [');\n this.stream.write(this.endline(node, options, level));\n options.state = WriterState.InsideTag;\n ref = node.children;\n for (j = 0, len = ref.length; j < len; j++) {\n child = ref[j];\n this.writeChildNode(child, options, level + 1);\n }\n options.state = WriterState.CloseTag;\n this.stream.write(']');\n }\n options.state = WriterState.CloseTag;\n this.stream.write(options.spaceBeforeSlash + '>');\n this.stream.write(this.endline(node, options, level));\n options.state = WriterState.None;\n return this.closeNode(node, options, level);\n };\n\n XMLStreamWriter.prototype.element = function(node, options, level) {\n var att, child, childNodeCount, firstChildNode, j, len, name, prettySuppressed, ref, ref1;\n level || (level = 0);\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n this.stream.write(this.indent(node, options, level) + '<' + node.name);\n ref = node.attribs;\n for (name in ref) {\n if (!hasProp.call(ref, name)) continue;\n att = ref[name];\n this.attribute(att, options, level);\n }\n childNodeCount = node.children.length;\n firstChildNode = childNodeCount === 0 ? null : node.children[0];\n if (childNodeCount === 0 || node.children.every(function(e) {\n return (e.type === NodeType.Text || e.type === NodeType.Raw) && e.value === '';\n })) {\n if (options.allowEmpty) {\n this.stream.write('>');\n options.state = WriterState.CloseTag;\n this.stream.write('');\n } else {\n options.state = WriterState.CloseTag;\n this.stream.write(options.spaceBeforeSlash + '/>');\n }\n } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw) && (firstChildNode.value != null)) {\n this.stream.write('>');\n options.state = WriterState.InsideTag;\n options.suppressPrettyCount++;\n prettySuppressed = true;\n this.writeChildNode(firstChildNode, options, level + 1);\n options.suppressPrettyCount--;\n prettySuppressed = false;\n options.state = WriterState.CloseTag;\n this.stream.write('');\n } else {\n this.stream.write('>' + this.endline(node, options, level));\n options.state = WriterState.InsideTag;\n ref1 = node.children;\n for (j = 0, len = ref1.length; j < len; j++) {\n child = ref1[j];\n this.writeChildNode(child, options, level + 1);\n }\n options.state = WriterState.CloseTag;\n this.stream.write(this.indent(node, options, level) + '');\n }\n this.stream.write(this.endline(node, options, level));\n options.state = WriterState.None;\n return this.closeNode(node, options, level);\n };\n\n XMLStreamWriter.prototype.processingInstruction = function(node, options, level) {\n return this.stream.write(XMLStreamWriter.__super__.processingInstruction.call(this, node, options, level));\n };\n\n XMLStreamWriter.prototype.raw = function(node, options, level) {\n return this.stream.write(XMLStreamWriter.__super__.raw.call(this, node, options, level));\n };\n\n XMLStreamWriter.prototype.text = function(node, options, level) {\n return this.stream.write(XMLStreamWriter.__super__.text.call(this, node, options, level));\n };\n\n XMLStreamWriter.prototype.dtdAttList = function(node, options, level) {\n return this.stream.write(XMLStreamWriter.__super__.dtdAttList.call(this, node, options, level));\n };\n\n XMLStreamWriter.prototype.dtdElement = function(node, options, level) {\n return this.stream.write(XMLStreamWriter.__super__.dtdElement.call(this, node, options, level));\n };\n\n XMLStreamWriter.prototype.dtdEntity = function(node, options, level) {\n return this.stream.write(XMLStreamWriter.__super__.dtdEntity.call(this, node, options, level));\n };\n\n XMLStreamWriter.prototype.dtdNotation = function(node, options, level) {\n return this.stream.write(XMLStreamWriter.__super__.dtdNotation.call(this, node, options, level));\n };\n\n return XMLStreamWriter;\n\n })(XMLWriterBase);\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, WriterState, XMLDOMImplementation, XMLDocument, XMLDocumentCB, XMLStreamWriter, XMLStringWriter, assign, isFunction, ref;\n\n ref = require('./Utility'), assign = ref.assign, isFunction = ref.isFunction;\n\n XMLDOMImplementation = require('./XMLDOMImplementation');\n\n XMLDocument = require('./XMLDocument');\n\n XMLDocumentCB = require('./XMLDocumentCB');\n\n XMLStringWriter = require('./XMLStringWriter');\n\n XMLStreamWriter = require('./XMLStreamWriter');\n\n NodeType = require('./NodeType');\n\n WriterState = require('./WriterState');\n\n module.exports.create = function(name, xmldec, doctype, options) {\n var doc, root;\n if (name == null) {\n throw new Error(\"Root element needs a name.\");\n }\n options = assign({}, xmldec, doctype, options);\n doc = new XMLDocument(options);\n root = doc.element(name);\n if (!options.headless) {\n doc.declaration(options);\n if ((options.pubID != null) || (options.sysID != null)) {\n doc.dtd(options);\n }\n }\n return root;\n };\n\n module.exports.begin = function(options, onData, onEnd) {\n var ref1;\n if (isFunction(options)) {\n ref1 = [options, onData], onData = ref1[0], onEnd = ref1[1];\n options = {};\n }\n if (onData) {\n return new XMLDocumentCB(options, onData, onEnd);\n } else {\n return new XMLDocument(options);\n }\n };\n\n module.exports.stringWriter = function(options) {\n return new XMLStringWriter(options);\n };\n\n module.exports.streamWriter = function(stream, options) {\n return new XMLStreamWriter(stream, options);\n };\n\n module.exports.implementation = new XMLDOMImplementation();\n\n module.exports.nodeType = NodeType;\n\n module.exports.writerState = WriterState;\n\n}).call(this);\n", "// Generated by CoffeeScript 1.12.7\n(function() {\n \"use strict\";\n var builder, defaults, escapeCDATA, requiresCDATA, wrapCDATA,\n hasProp = {}.hasOwnProperty;\n\n builder = require('xmlbuilder');\n\n defaults = require('./defaults').defaults;\n\n requiresCDATA = function(entry) {\n return typeof entry === \"string\" && (entry.indexOf('&') >= 0 || entry.indexOf('>') >= 0 || entry.indexOf('<') >= 0);\n };\n\n wrapCDATA = function(entry) {\n return \"\";\n };\n\n escapeCDATA = function(entry) {\n return entry.replace(']]>', ']]]]>');\n };\n\n exports.Builder = (function() {\n function Builder(opts) {\n var key, ref, value;\n this.options = {};\n ref = defaults[\"0.2\"];\n for (key in ref) {\n if (!hasProp.call(ref, key)) continue;\n value = ref[key];\n this.options[key] = value;\n }\n for (key in opts) {\n if (!hasProp.call(opts, key)) continue;\n value = opts[key];\n this.options[key] = value;\n }\n }\n\n Builder.prototype.buildObject = function(rootObj) {\n var attrkey, charkey, render, rootElement, rootName;\n attrkey = this.options.attrkey;\n charkey = this.options.charkey;\n if ((Object.keys(rootObj).length === 1) && (this.options.rootName === defaults['0.2'].rootName)) {\n rootName = Object.keys(rootObj)[0];\n rootObj = rootObj[rootName];\n } else {\n rootName = this.options.rootName;\n }\n render = (function(_this) {\n return function(element, obj) {\n var attr, child, entry, index, key, value;\n if (typeof obj !== 'object') {\n if (_this.options.cdata && requiresCDATA(obj)) {\n element.raw(wrapCDATA(obj));\n } else {\n element.txt(obj);\n }\n } else if (Array.isArray(obj)) {\n for (index in obj) {\n if (!hasProp.call(obj, index)) continue;\n child = obj[index];\n for (key in child) {\n entry = child[key];\n element = render(element.ele(key), entry).up();\n }\n }\n } else {\n for (key in obj) {\n if (!hasProp.call(obj, key)) continue;\n child = obj[key];\n if (key === attrkey) {\n if (typeof child === \"object\") {\n for (attr in child) {\n value = child[attr];\n element = element.att(attr, value);\n }\n }\n } else if (key === charkey) {\n if (_this.options.cdata && requiresCDATA(child)) {\n element = element.raw(wrapCDATA(child));\n } else {\n element = element.txt(child);\n }\n } else if (Array.isArray(child)) {\n for (index in child) {\n if (!hasProp.call(child, index)) continue;\n entry = child[index];\n if (typeof entry === 'string') {\n if (_this.options.cdata && requiresCDATA(entry)) {\n element = element.ele(key).raw(wrapCDATA(entry)).up();\n } else {\n element = element.ele(key, entry).up();\n }\n } else {\n element = render(element.ele(key), entry).up();\n }\n }\n } else if (typeof child === \"object\") {\n element = render(element.ele(key), child).up();\n } else {\n if (typeof child === 'string' && _this.options.cdata && requiresCDATA(child)) {\n element = element.ele(key).raw(wrapCDATA(child)).up();\n } else {\n if (child == null) {\n child = '';\n }\n element = element.ele(key, child.toString()).up();\n }\n }\n }\n }\n return element;\n };\n })(this);\n rootElement = builder.create(rootName, this.options.xmldec, this.options.doctype, {\n headless: this.options.headless,\n allowSurrogateChars: this.options.allowSurrogateChars\n });\n return render(rootElement, rootObj).end(this.options.renderOpts);\n };\n\n return Builder;\n\n })();\n\n}).call(this);\n", "'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n", "/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n", "/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n", "/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n", "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n/**/\n\nvar Buffer = require('safe-buffer').Buffer;\n/**/\n\nvar isEncoding = Buffer.isEncoding || function (encoding) {\n encoding = '' + encoding;\n switch (encoding && encoding.toLowerCase()) {\n case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':\n return true;\n default:\n return false;\n }\n};\n\nfunction _normalizeEncoding(enc) {\n if (!enc) return 'utf8';\n var retried;\n while (true) {\n switch (enc) {\n case 'utf8':\n case 'utf-8':\n return 'utf8';\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return 'utf16le';\n case 'latin1':\n case 'binary':\n return 'latin1';\n case 'base64':\n case 'ascii':\n case 'hex':\n return enc;\n default:\n if (retried) return; // undefined\n enc = ('' + enc).toLowerCase();\n retried = true;\n }\n }\n};\n\n// Do not cache `Buffer.isEncoding` when checking encoding names as some\n// modules monkey-patch it to support additional encodings\nfunction normalizeEncoding(enc) {\n var nenc = _normalizeEncoding(enc);\n if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);\n return nenc || enc;\n}\n\n// StringDecoder provides an interface for efficiently splitting a series of\n// buffers into a series of JS strings without breaking apart multi-byte\n// characters.\nexports.StringDecoder = StringDecoder;\nfunction StringDecoder(encoding) {\n this.encoding = normalizeEncoding(encoding);\n var nb;\n switch (this.encoding) {\n case 'utf16le':\n this.text = utf16Text;\n this.end = utf16End;\n nb = 4;\n break;\n case 'utf8':\n this.fillLast = utf8FillLast;\n nb = 4;\n break;\n case 'base64':\n this.text = base64Text;\n this.end = base64End;\n nb = 3;\n break;\n default:\n this.write = simpleWrite;\n this.end = simpleEnd;\n return;\n }\n this.lastNeed = 0;\n this.lastTotal = 0;\n this.lastChar = Buffer.allocUnsafe(nb);\n}\n\nStringDecoder.prototype.write = function (buf) {\n if (buf.length === 0) return '';\n var r;\n var i;\n if (this.lastNeed) {\n r = this.fillLast(buf);\n if (r === undefined) return '';\n i = this.lastNeed;\n this.lastNeed = 0;\n } else {\n i = 0;\n }\n if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);\n return r || '';\n};\n\nStringDecoder.prototype.end = utf8End;\n\n// Returns only complete characters in a Buffer\nStringDecoder.prototype.text = utf8Text;\n\n// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer\nStringDecoder.prototype.fillLast = function (buf) {\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);\n this.lastNeed -= buf.length;\n};\n\n// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a\n// continuation byte. If an invalid byte is detected, -2 is returned.\nfunction utf8CheckByte(byte) {\n if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;\n return byte >> 6 === 0x02 ? -1 : -2;\n}\n\n// Checks at most 3 bytes at the end of a Buffer in order to detect an\n// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)\n// needed to complete the UTF-8 character (if applicable) are returned.\nfunction utf8CheckIncomplete(self, buf, i) {\n var j = buf.length - 1;\n if (j < i) return 0;\n var nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) self.lastNeed = nb - 1;\n return nb;\n }\n if (--j < i || nb === -2) return 0;\n nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) self.lastNeed = nb - 2;\n return nb;\n }\n if (--j < i || nb === -2) return 0;\n nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) {\n if (nb === 2) nb = 0;else self.lastNeed = nb - 3;\n }\n return nb;\n }\n return 0;\n}\n\n// Validates as many continuation bytes for a multi-byte UTF-8 character as\n// needed or are available. If we see a non-continuation byte where we expect\n// one, we \"replace\" the validated continuation bytes we've seen so far with\n// a single UTF-8 replacement character ('\\ufffd'), to match v8's UTF-8 decoding\n// behavior. The continuation byte check is included three times in the case\n// where all of the continuation bytes for a character exist in the same buffer.\n// It is also done this way as a slight performance increase instead of using a\n// loop.\nfunction utf8CheckExtraBytes(self, buf, p) {\n if ((buf[0] & 0xC0) !== 0x80) {\n self.lastNeed = 0;\n return '\\ufffd';\n }\n if (self.lastNeed > 1 && buf.length > 1) {\n if ((buf[1] & 0xC0) !== 0x80) {\n self.lastNeed = 1;\n return '\\ufffd';\n }\n if (self.lastNeed > 2 && buf.length > 2) {\n if ((buf[2] & 0xC0) !== 0x80) {\n self.lastNeed = 2;\n return '\\ufffd';\n }\n }\n }\n}\n\n// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.\nfunction utf8FillLast(buf) {\n var p = this.lastTotal - this.lastNeed;\n var r = utf8CheckExtraBytes(this, buf, p);\n if (r !== undefined) return r;\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, p, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n buf.copy(this.lastChar, p, 0, buf.length);\n this.lastNeed -= buf.length;\n}\n\n// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a\n// partial character, the character's bytes are buffered until the required\n// number of bytes are available.\nfunction utf8Text(buf, i) {\n var total = utf8CheckIncomplete(this, buf, i);\n if (!this.lastNeed) return buf.toString('utf8', i);\n this.lastTotal = total;\n var end = buf.length - (total - this.lastNeed);\n buf.copy(this.lastChar, 0, end);\n return buf.toString('utf8', i, end);\n}\n\n// For UTF-8, a replacement character is added when ending on a partial\n// character.\nfunction utf8End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) return r + '\\ufffd';\n return r;\n}\n\n// UTF-16LE typically needs two bytes per character, but even if we have an even\n// number of bytes available, we need to check if we end on a leading/high\n// surrogate. In that case, we need to wait for the next two bytes in order to\n// decode the last character properly.\nfunction utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}\n\n// For UTF-16LE we do not explicitly append special replacement characters if we\n// end on a partial character, we simply let v8 handle that.\nfunction utf16End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) {\n var end = this.lastTotal - this.lastNeed;\n return r + this.lastChar.toString('utf16le', 0, end);\n }\n return r;\n}\n\nfunction base64Text(buf, i) {\n var n = (buf.length - i) % 3;\n if (n === 0) return buf.toString('base64', i);\n this.lastNeed = 3 - n;\n this.lastTotal = 3;\n if (n === 1) {\n this.lastChar[0] = buf[buf.length - 1];\n } else {\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n }\n return buf.toString('base64', i, buf.length - n);\n}\n\nfunction base64End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);\n return r;\n}\n\n// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)\nfunction simpleWrite(buf) {\n return buf.toString(this.encoding);\n}\n\nfunction simpleEnd(buf) {\n return buf && buf.length ? this.write(buf) : '';\n}", ";(function (sax) { // wrapper for non-node envs\n sax.parser = function (strict, opt) { return new SAXParser(strict, opt) }\n sax.SAXParser = SAXParser\n sax.SAXStream = SAXStream\n sax.createStream = createStream\n\n // When we pass the MAX_BUFFER_LENGTH position, start checking for buffer overruns.\n // When we check, schedule the next check for MAX_BUFFER_LENGTH - (max(buffer lengths)),\n // since that's the earliest that a buffer overrun could occur. This way, checks are\n // as rare as required, but as often as necessary to ensure never crossing this bound.\n // Furthermore, buffers are only tested at most once per write(), so passing a very\n // large string into write() might have undesirable effects, but this is manageable by\n // the caller, so it is assumed to be safe. Thus, a call to write() may, in the extreme\n // edge case, result in creating at most one complete copy of the string passed in.\n // Set to Infinity to have unlimited buffers.\n sax.MAX_BUFFER_LENGTH = 64 * 1024\n\n var buffers = [\n 'comment', 'sgmlDecl', 'textNode', 'tagName', 'doctype',\n 'procInstName', 'procInstBody', 'entity', 'attribName',\n 'attribValue', 'cdata', 'script'\n ]\n\n sax.EVENTS = [\n 'text',\n 'processinginstruction',\n 'sgmldeclaration',\n 'doctype',\n 'comment',\n 'opentagstart',\n 'attribute',\n 'opentag',\n 'closetag',\n 'opencdata',\n 'cdata',\n 'closecdata',\n 'error',\n 'end',\n 'ready',\n 'script',\n 'opennamespace',\n 'closenamespace'\n ]\n\n function SAXParser (strict, opt) {\n if (!(this instanceof SAXParser)) {\n return new SAXParser(strict, opt)\n }\n\n var parser = this\n clearBuffers(parser)\n parser.q = parser.c = ''\n parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH\n parser.opt = opt || {}\n parser.opt.lowercase = parser.opt.lowercase || parser.opt.lowercasetags\n parser.looseCase = parser.opt.lowercase ? 'toLowerCase' : 'toUpperCase'\n parser.tags = []\n parser.closed = parser.closedRoot = parser.sawRoot = false\n parser.tag = parser.error = null\n parser.strict = !!strict\n parser.noscript = !!(strict || parser.opt.noscript)\n parser.state = S.BEGIN\n parser.strictEntities = parser.opt.strictEntities\n parser.ENTITIES = parser.strictEntities ? Object.create(sax.XML_ENTITIES) : Object.create(sax.ENTITIES)\n parser.attribList = []\n\n // namespaces form a prototype chain.\n // it always points at the current tag,\n // which protos to its parent tag.\n if (parser.opt.xmlns) {\n parser.ns = Object.create(rootNS)\n }\n\n // mostly just for error reporting\n parser.trackPosition = parser.opt.position !== false\n if (parser.trackPosition) {\n parser.position = parser.line = parser.column = 0\n }\n emit(parser, 'onready')\n }\n\n if (!Object.create) {\n Object.create = function (o) {\n function F () {}\n F.prototype = o\n var newf = new F()\n return newf\n }\n }\n\n if (!Object.keys) {\n Object.keys = function (o) {\n var a = []\n for (var i in o) if (o.hasOwnProperty(i)) a.push(i)\n return a\n }\n }\n\n function checkBufferLength (parser) {\n var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10)\n var maxActual = 0\n for (var i = 0, l = buffers.length; i < l; i++) {\n var len = parser[buffers[i]].length\n if (len > maxAllowed) {\n // Text/cdata nodes can get big, and since they're buffered,\n // we can get here under normal conditions.\n // Avoid issues by emitting the text node now,\n // so at least it won't get any bigger.\n switch (buffers[i]) {\n case 'textNode':\n closeText(parser)\n break\n\n case 'cdata':\n emitNode(parser, 'oncdata', parser.cdata)\n parser.cdata = ''\n break\n\n case 'script':\n emitNode(parser, 'onscript', parser.script)\n parser.script = ''\n break\n\n default:\n error(parser, 'Max buffer length exceeded: ' + buffers[i])\n }\n }\n maxActual = Math.max(maxActual, len)\n }\n // schedule the next check for the earliest possible buffer overrun.\n var m = sax.MAX_BUFFER_LENGTH - maxActual\n parser.bufferCheckPosition = m + parser.position\n }\n\n function clearBuffers (parser) {\n for (var i = 0, l = buffers.length; i < l; i++) {\n parser[buffers[i]] = ''\n }\n }\n\n function flushBuffers (parser) {\n closeText(parser)\n if (parser.cdata !== '') {\n emitNode(parser, 'oncdata', parser.cdata)\n parser.cdata = ''\n }\n if (parser.script !== '') {\n emitNode(parser, 'onscript', parser.script)\n parser.script = ''\n }\n }\n\n SAXParser.prototype = {\n end: function () { end(this) },\n write: write,\n resume: function () { this.error = null; return this },\n close: function () { return this.write(null) },\n flush: function () { flushBuffers(this) }\n }\n\n var Stream\n try {\n Stream = require('stream').Stream\n } catch (ex) {\n Stream = function () {}\n }\n\n var streamWraps = sax.EVENTS.filter(function (ev) {\n return ev !== 'error' && ev !== 'end'\n })\n\n function createStream (strict, opt) {\n return new SAXStream(strict, opt)\n }\n\n function SAXStream (strict, opt) {\n if (!(this instanceof SAXStream)) {\n return new SAXStream(strict, opt)\n }\n\n Stream.apply(this)\n\n this._parser = new SAXParser(strict, opt)\n this.writable = true\n this.readable = true\n\n var me = this\n\n this._parser.onend = function () {\n me.emit('end')\n }\n\n this._parser.onerror = function (er) {\n me.emit('error', er)\n\n // if didn't throw, then means error was handled.\n // go ahead and clear error, so we can write again.\n me._parser.error = null\n }\n\n this._decoder = null\n\n streamWraps.forEach(function (ev) {\n Object.defineProperty(me, 'on' + ev, {\n get: function () {\n return me._parser['on' + ev]\n },\n set: function (h) {\n if (!h) {\n me.removeAllListeners(ev)\n me._parser['on' + ev] = h\n return h\n }\n me.on(ev, h)\n },\n enumerable: true,\n configurable: false\n })\n })\n }\n\n SAXStream.prototype = Object.create(Stream.prototype, {\n constructor: {\n value: SAXStream\n }\n })\n\n SAXStream.prototype.write = function (data) {\n if (typeof Buffer === 'function' &&\n typeof Buffer.isBuffer === 'function' &&\n Buffer.isBuffer(data)) {\n if (!this._decoder) {\n var SD = require('string_decoder').StringDecoder\n this._decoder = new SD('utf8')\n }\n data = this._decoder.write(data)\n }\n\n this._parser.write(data.toString())\n this.emit('data', data)\n return true\n }\n\n SAXStream.prototype.end = function (chunk) {\n if (chunk && chunk.length) {\n this.write(chunk)\n }\n this._parser.end()\n return true\n }\n\n SAXStream.prototype.on = function (ev, handler) {\n var me = this\n if (!me._parser['on' + ev] && streamWraps.indexOf(ev) !== -1) {\n me._parser['on' + ev] = function () {\n var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments)\n args.splice(0, 0, ev)\n me.emit.apply(me, args)\n }\n }\n\n return Stream.prototype.on.call(me, ev, handler)\n }\n\n // this really needs to be replaced with character classes.\n // XML allows all manner of ridiculous numbers and digits.\n var CDATA = '[CDATA['\n var DOCTYPE = 'DOCTYPE'\n var XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace'\n var XMLNS_NAMESPACE = 'http://www.w3.org/2000/xmlns/'\n var rootNS = { xml: XML_NAMESPACE, xmlns: XMLNS_NAMESPACE }\n\n // http://www.w3.org/TR/REC-xml/#NT-NameStartChar\n // This implementation works on strings, a single character at a time\n // as such, it cannot ever support astral-plane characters (10000-EFFFF)\n // without a significant breaking change to either this parser, or the\n // JavaScript language. Implementation of an emoji-capable xml parser\n // is left as an exercise for the reader.\n var nameStart = /[:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/\n\n var nameBody = /[:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\u00B7\\u0300-\\u036F\\u203F-\\u2040.\\d-]/\n\n var entityStart = /[#:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/\n var entityBody = /[#:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\u00B7\\u0300-\\u036F\\u203F-\\u2040.\\d-]/\n\n function isWhitespace (c) {\n return c === ' ' || c === '\\n' || c === '\\r' || c === '\\t'\n }\n\n function isQuote (c) {\n return c === '\"' || c === '\\''\n }\n\n function isAttribEnd (c) {\n return c === '>' || isWhitespace(c)\n }\n\n function isMatch (regex, c) {\n return regex.test(c)\n }\n\n function notMatch (regex, c) {\n return !isMatch(regex, c)\n }\n\n var S = 0\n sax.STATE = {\n BEGIN: S++, // leading byte order mark or whitespace\n BEGIN_WHITESPACE: S++, // leading whitespace\n TEXT: S++, // general stuff\n TEXT_ENTITY: S++, // & and such.\n OPEN_WAKA: S++, // <\n SGML_DECL: S++, // \n SCRIPT: S++, //