UNPKG

@nullplatform/ingest

Version:

Client SDK for the nullplatform ingest API: push snapshots and delta events from a collector into the catalog and other targets, follow runs, replay and drift checks

1 lines • 387 kB
{"version":3,"file":"index.cjs","names":["camelCaseToSnakeCase","snakeCaseToCamelCase","Style","isUuidV7","uuidv7"],"sources":["../src/enums.ts","../node_modules/lodash.camelcase/index.js","../node_modules/lodash.snakecase/index.js","../node_modules/lodash.transform/index.js","../node_modules/lodash.includes/index.js","../node_modules/lodash.isplainobject/index.js","../node_modules/lodash.memoize/index.js","../node_modules/@nullplatform/json-keys-transform/src/transform.js","../node_modules/@nullplatform/json-keys-transform/src/index.js","../src/wire.ts","../src/inputs.ts","../src/batcher.ts","../src/event-batcher.ts","../src/ingest-error.ts","../src/must-exist.ts","../src/http.ts","../src/timeout-error.ts","../src/poll.ts","../src/run-handle.ts","../src/tokens/api-key-token.ts","../src/tokens/token-provider.ts","../src/tokens/callback-token.ts","../src/tokens/static-token.ts","../src/pages.ts","../src/transport.ts","../src/client.ts","../src/collector/runtime.ts","../src/collector/client-ingest.ts"],"sourcesContent":["/**\n * The API's closed vocabularies, as runtime enums: write `Engine.JSONATA`,\n * never `'jsonata'`. The values are what the wire carries.\n */\n\n/** What a full run deletes when it finalizes: what it no longer saw, or nothing. */\nexport enum DeletePolicy {\n  SOFT_DELETE_STALE = 'soft_delete_stale',\n  NONE = 'none',\n}\n\n/** Where a run is: open, finalizing, or closed (completed, its guard tripped, or aborted). */\nexport enum RunStatus {\n  OPEN = 'open',\n  FINALIZING = 'finalizing',\n  COMPLETED = 'completed',\n  GUARD_TRIPPED = 'guard_tripped',\n  ABORTED = 'aborted',\n}\n\n/** Where an input is: waiting to be applied, or settled (applied, rejected, dropped, dead). */\nexport enum InputStatus {\n  PENDING = 'pending',\n  APPLIED = 'applied',\n  REJECTED = 'rejected',\n  DROPPED = 'dropped',\n  DEAD = 'dead',\n}\n\n/** What became of an input, or of one entity it named. */\nexport enum Outcome {\n  CREATED = 'created',\n  UPDATED = 'updated',\n  UNCHANGED = 'unchanged',\n  FILTERED = 'filtered',\n  DELETED = 'deleted',\n  SKIPPED = 'skipped',\n  STALE = 'stale',\n  REJECTED = 'rejected',\n  FAILED = 'failed',\n  /** A parent the source has not written yet (a target that assigns ids): tried again. */\n  WAITING = 'waiting',\n}\n\n/** How a source came to own an entity: created by ingest, or adopted (already in the target). */\nexport enum EntityOrigin {\n  CREATED = 'created',\n  ADOPTED = 'adopted',\n}\n\n/** What an event does to its entity: writes it (`UPSERT`, the default) or deletes it. */\nexport enum EventOp {\n  UPSERT = 'upsert',\n  DELETE = 'delete',\n}\n\n/** The expression language of a mapping. */\nexport enum Engine {\n  JSONATA = 'jsonata',\n  JQ = 'jq',\n  CEL = 'cel',\n}\n\n/** What a drift check does: reports what differs, or writes back what was last written. */\nexport enum DriftPolicy {\n  REPORT = 'report',\n  RESTORE = 'restore',\n}\n\n/** Where a drift check is: queued, running, or done (completed, failed). */\nexport enum DriftCheckStatus {\n  QUEUED = 'queued',\n  RUNNING = 'running',\n  COMPLETED = 'completed',\n  FAILED = 'failed',\n}\n\n/** How a drift check found an entity: changed in the target, or gone from it. */\nexport enum DriftType {\n  CHANGED = 'changed',\n  MISSING = 'missing',\n}\n\n/** Where a replay is: queued, queueing its inputs a page at a time, or done (completed, failed). */\nexport enum ReplayStatus {\n  QUEUED = 'queued',\n  RUNNING = 'running',\n  COMPLETED = 'completed',\n  FAILED = 'failed',\n}\n\n/** What a source type revision records. */\nexport enum SourceTypeRevisionAction {\n  CREATE = 'create',\n  UPDATE = 'update',\n  DELETE = 'delete',\n}\n\n/** What a source revision records. */\nexport enum SourceRevisionAction {\n  CREATE = 'create',\n  UPDATE = 'update',\n  DELETE = 'delete',\n}\n\n/** What a mapping revision records. */\nexport enum MappingRevisionAction {\n  CREATE = 'create',\n  UPDATE = 'update',\n  DELETE = 'delete',\n}\n\n/** What a destination revision records. */\nexport enum DestinationRevisionAction {\n  CREATE = 'create',\n  UPDATE = 'update',\n  DELETE = 'delete',\n}\n\n/**\n * What happens to the entities a destination wrote when it stops applying to a\n * source (deleted, disabled, or moved to another endpoint), in the words of a\n * foreign key: `RESTRICT` refuses while it owns live ones, `CASCADE` leaves\n * them to the next full run (deleted behind its guards), `SET_NULL` releases\n * them (they stay in the target, no longer owned).\n */\nexport enum OnDelete {\n  RESTRICT = 'restrict',\n  CASCADE = 'cascade',\n  SET_NULL = 'set_null',\n}\n\n/** What an upsert did with one spec (`sources.upsert`, `mappings.upsertForSource`…). */\nexport enum UpsertOutcome {\n  /** It was missing: created (a deleted one revived). */\n  CREATED = 'created',\n  /** It differed: what differs was written. */\n  UPDATED = 'updated',\n  /** It matched: nothing was sent. */\n  UNCHANGED = 'unchanged',\n}\n\n/** What `runs.open` does when the source already has an open run. */\nexport enum OnConflict {\n  /** Abort the open run (it deletes nothing) and open a new one. */\n  ABORT = 'abort',\n  /** Throw the 409. */\n  FAIL = 'fail',\n}\n\n/** Who assigns an entity's identity at an endpoint's backend (`identity.assignedBy`). */\nexport enum AssignedBy {\n  /** The source: the writer's key addresses the entity, and a write is an upsert by key. */\n  SOURCE = 'source',\n  /** The backend, at create: an entity is found again by its natural key. */\n  BACKEND = 'backend',\n}\n\n/** How a list call of an endpoint's backend pages (`calls.paging`). */\nexport enum PagingStyle {\n  OFFSET = 'offset',\n  PAGE = 'page',\n  CURSOR = 'cursor',\n  LINK = 'link',\n}\n\n/** The HTTP method of an endpoint's call (`EndpointCall.method`). */\nexport enum HttpMethod {\n  GET = 'GET',\n  POST = 'POST',\n  PATCH = 'PATCH',\n  PUT = 'PUT',\n  DELETE = 'DELETE',\n}\n\n/** An endpoint's calls by name (`calls.<name>`, an error rule's `operation`). */\nexport enum OperationName {\n  UPSERT = 'upsert',\n  CREATE = 'create',\n  UPDATE = 'update',\n  READ = 'read',\n  DELETE = 'delete',\n  FIND = 'find',\n  LINK = 'link',\n  UNLINK = 'unlink',\n}\n\n/** What a call sends when its body names a shape (`EndpointCall.body`) rather than a template or an expression. */\nexport enum OperationBody {\n  /** The entity's document. */\n  DOCUMENT = 'document',\n  /** A link set as objects (`[{ id }]`). */\n  LINK_OBJECTS = 'link_objects',\n  /** A link set as ids. */\n  LINK_IDS = 'link_ids',\n}\n\n/** What an emptied link set becomes (`calls.link.emptySet`). */\nexport enum EmptyLinkSet {\n  /** The empty set is sent. */\n  REPLACE = 'replace',\n  /** Each link is removed by an `unlink` call (a backend that refuses an empty set). */\n  UNLINK_EACH = 'unlink_each',\n}\n\n/** What may be written to a field (`fields[f].write`). */\nexport enum FieldRule {\n  /** Sent on create only. */\n  CREATE_ONLY = 'create_only',\n  /** Never changes once created: a change is refused. */\n  IMMUTABLE = 'immutable',\n  /** Sent on update only. */\n  UPDATE_ONLY = 'update_only',\n}\n\n/** How a drift check compares a field (`fields[f].drift`). */\nexport enum FieldComparison {\n  EQUAL = 'equal',\n  /** What was written is contained in what the backend holds. */\n  SUBSET = 'subset',\n  IGNORE = 'ignore',\n}\n\n/** Whether ingest may delete at an endpoint (`behavior.delete`). */\nexport enum TargetDeletePolicy {\n  ALLOWED = 'allowed',\n  /** Finalize and delete events never delete there. */\n  FORBIDDEN = 'forbidden',\n}\n\n/** What a field removed from a document becomes (`behavior.clear`). */\nexport enum ClearSemantics {\n  /** It is written as `null`. */\n  WRITE_NULL = 'write_null',\n  /** The backend cannot clear it: a removal is refused. */\n  UNSUPPORTED = 'unsupported',\n}\n\n/** What ingest does with an entity it finds already in the backend (`behavior.adopt`). */\nexport enum AdoptPolicy {\n  /** Leaves it alone. */\n  NONE = 'none',\n  /** Updates it. */\n  UPDATE = 'update',\n  /** Updates it and deletes it when the source stops reporting it. */\n  MANAGE = 'manage',\n}\n\n/** What a backend's refusal means (`errors[].outcome`). */\nexport enum TargetErrorOutcome {\n  RETRY = 'retry',\n  REJECT = 'reject',\n  /** The entity is already there. */\n  EXISTS = 'exists',\n  /** The entity is gone. */\n  GONE = 'gone',\n  /** Not ready yet: tried again later without spending attempts. */\n  WAIT = 'wait',\n}\n","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match words composed of alphanumeric characters. */\nvar reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n/** Used to match Latin Unicode letters (excluding mathematical operators). */\nvar reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n    rsComboMarksRange = '\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe23',\n    rsComboSymbolsRange = '\\\\u20d0-\\\\u20f0',\n    rsDingbatRange = '\\\\u2700-\\\\u27bf',\n    rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n    rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n    rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n    rsPunctuationRange = '\\\\u2000-\\\\u206f',\n    rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n    rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n    rsVarRange = '\\\\ufe0e\\\\ufe0f',\n    rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n/** Used to compose unicode capture groups. */\nvar rsApos = \"['\\u2019]\",\n    rsAstral = '[' + rsAstralRange + ']',\n    rsBreak = '[' + rsBreakRange + ']',\n    rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']',\n    rsDigits = '\\\\d+',\n    rsDingbat = '[' + rsDingbatRange + ']',\n    rsLower = '[' + rsLowerRange + ']',\n    rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n    rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n    rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n    rsNonAstral = '[^' + rsAstralRange + ']',\n    rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n    rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n    rsUpper = '[' + rsUpperRange + ']',\n    rsZWJ = '\\\\u200d';\n\n/** Used to compose unicode regexes. */\nvar rsLowerMisc = '(?:' + rsLower + '|' + rsMisc + ')',\n    rsUpperMisc = '(?:' + rsUpper + '|' + rsMisc + ')',\n    rsOptLowerContr = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n    rsOptUpperContr = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n    reOptMod = rsModifier + '?',\n    rsOptVar = '[' + rsVarRange + ']?',\n    rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n    rsSeq = rsOptVar + reOptMod + rsOptJoin,\n    rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,\n    rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n/** Used to match apostrophes. */\nvar reApos = RegExp(rsApos, 'g');\n\n/**\n * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n */\nvar reComboMark = RegExp(rsCombo, 'g');\n\n/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\nvar reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n/** Used to match complex or compound words. */\nvar reUnicodeWord = RegExp([\n  rsUpper + '?' + rsLower + '+' + rsOptLowerContr + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n  rsUpperMisc + '+' + rsOptUpperContr + '(?=' + [rsBreak, rsUpper + rsLowerMisc, '$'].join('|') + ')',\n  rsUpper + '?' + rsLowerMisc + '+' + rsOptLowerContr,\n  rsUpper + '+' + rsOptUpperContr,\n  rsDigits,\n  rsEmoji\n].join('|'), 'g');\n\n/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\nvar reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange  + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']');\n\n/** Used to detect strings that need a more robust regexp to match words. */\nvar reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n/** Used to map Latin Unicode letters to basic Latin letters. */\nvar deburredLetters = {\n  // Latin-1 Supplement block.\n  '\\xc0': 'A',  '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n  '\\xe0': 'a',  '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n  '\\xc7': 'C',  '\\xe7': 'c',\n  '\\xd0': 'D',  '\\xf0': 'd',\n  '\\xc8': 'E',  '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n  '\\xe8': 'e',  '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n  '\\xcc': 'I',  '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n  '\\xec': 'i',  '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n  '\\xd1': 'N',  '\\xf1': 'n',\n  '\\xd2': 'O',  '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n  '\\xf2': 'o',  '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n  '\\xd9': 'U',  '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n  '\\xf9': 'u',  '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n  '\\xdd': 'Y',  '\\xfd': 'y', '\\xff': 'y',\n  '\\xc6': 'Ae', '\\xe6': 'ae',\n  '\\xde': 'Th', '\\xfe': 'th',\n  '\\xdf': 'ss',\n  // Latin Extended-A block.\n  '\\u0100': 'A',  '\\u0102': 'A', '\\u0104': 'A',\n  '\\u0101': 'a',  '\\u0103': 'a', '\\u0105': 'a',\n  '\\u0106': 'C',  '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n  '\\u0107': 'c',  '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n  '\\u010e': 'D',  '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n  '\\u0112': 'E',  '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n  '\\u0113': 'e',  '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n  '\\u011c': 'G',  '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n  '\\u011d': 'g',  '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n  '\\u0124': 'H',  '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n  '\\u0128': 'I',  '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n  '\\u0129': 'i',  '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n  '\\u0134': 'J',  '\\u0135': 'j',\n  '\\u0136': 'K',  '\\u0137': 'k', '\\u0138': 'k',\n  '\\u0139': 'L',  '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n  '\\u013a': 'l',  '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n  '\\u0143': 'N',  '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n  '\\u0144': 'n',  '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n  '\\u014c': 'O',  '\\u014e': 'O', '\\u0150': 'O',\n  '\\u014d': 'o',  '\\u014f': 'o', '\\u0151': 'o',\n  '\\u0154': 'R',  '\\u0156': 'R', '\\u0158': 'R',\n  '\\u0155': 'r',  '\\u0157': 'r', '\\u0159': 'r',\n  '\\u015a': 'S',  '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n  '\\u015b': 's',  '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n  '\\u0162': 'T',  '\\u0164': 'T', '\\u0166': 'T',\n  '\\u0163': 't',  '\\u0165': 't', '\\u0167': 't',\n  '\\u0168': 'U',  '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n  '\\u0169': 'u',  '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n  '\\u0174': 'W',  '\\u0175': 'w',\n  '\\u0176': 'Y',  '\\u0177': 'y', '\\u0178': 'Y',\n  '\\u0179': 'Z',  '\\u017b': 'Z', '\\u017d': 'Z',\n  '\\u017a': 'z',  '\\u017c': 'z', '\\u017e': 'z',\n  '\\u0132': 'IJ', '\\u0133': 'ij',\n  '\\u0152': 'Oe', '\\u0153': 'oe',\n  '\\u0149': \"'n\", '\\u017f': 'ss'\n};\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n *  the initial value.\n * @returns {*} Returns the accumulated value.\n */\nfunction arrayReduce(array, iteratee, accumulator, initAccum) {\n  var index = -1,\n      length = array ? array.length : 0;\n\n  if (initAccum && length) {\n    accumulator = array[++index];\n  }\n  while (++index < length) {\n    accumulator = iteratee(accumulator, array[index], index, array);\n  }\n  return accumulator;\n}\n\n/**\n * Converts an ASCII `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction asciiToArray(string) {\n  return string.split('');\n}\n\n/**\n * Splits an ASCII `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\nfunction asciiWords(string) {\n  return string.match(reAsciiWord) || [];\n}\n\n/**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyOf(object) {\n  return function(key) {\n    return object == null ? undefined : object[key];\n  };\n}\n\n/**\n * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n * letters to basic Latin letters.\n *\n * @private\n * @param {string} letter The matched letter to deburr.\n * @returns {string} Returns the deburred letter.\n */\nvar deburrLetter = basePropertyOf(deburredLetters);\n\n/**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\nfunction hasUnicode(string) {\n  return reHasUnicode.test(string);\n}\n\n/**\n * Checks if `string` contains a word composed of Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a word is found, else `false`.\n */\nfunction hasUnicodeWord(string) {\n  return reHasUnicodeWord.test(string);\n}\n\n/**\n * Converts `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction stringToArray(string) {\n  return hasUnicode(string)\n    ? unicodeToArray(string)\n    : asciiToArray(string);\n}\n\n/**\n * Converts a Unicode `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction unicodeToArray(string) {\n  return string.match(reUnicode) || [];\n}\n\n/**\n * Splits a Unicode `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\nfunction unicodeWords(string) {\n  return string.match(reUnicodeWord) || [];\n}\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n    symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction baseSlice(array, start, end) {\n  var index = -1,\n      length = array.length;\n\n  if (start < 0) {\n    start = -start > length ? 0 : (length + start);\n  }\n  end = end > length ? length : end;\n  if (end < 0) {\n    end += length;\n  }\n  length = start > end ? 0 : ((end - start) >>> 0);\n  start >>>= 0;\n\n  var result = Array(length);\n  while (++index < length) {\n    result[index] = array[index + start];\n  }\n  return result;\n}\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n  // Exit early for strings to avoid a performance hit in some environments.\n  if (typeof value == 'string') {\n    return value;\n  }\n  if (isSymbol(value)) {\n    return symbolToString ? symbolToString.call(value) : '';\n  }\n  var result = (value + '');\n  return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Casts `array` to a slice if it's needed.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {number} start The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the cast slice.\n */\nfunction castSlice(array, start, end) {\n  var length = array.length;\n  end = end === undefined ? length : end;\n  return (!start && end >= length) ? array : baseSlice(array, start, end);\n}\n\n/**\n * Creates a function like `_.lowerFirst`.\n *\n * @private\n * @param {string} methodName The name of the `String` case method to use.\n * @returns {Function} Returns the new case function.\n */\nfunction createCaseFirst(methodName) {\n  return function(string) {\n    string = toString(string);\n\n    var strSymbols = hasUnicode(string)\n      ? stringToArray(string)\n      : undefined;\n\n    var chr = strSymbols\n      ? strSymbols[0]\n      : string.charAt(0);\n\n    var trailing = strSymbols\n      ? castSlice(strSymbols, 1).join('')\n      : string.slice(1);\n\n    return chr[methodName]() + trailing;\n  };\n}\n\n/**\n * Creates a function like `_.camelCase`.\n *\n * @private\n * @param {Function} callback The function to combine each word.\n * @returns {Function} Returns the new compounder function.\n */\nfunction createCompounder(callback) {\n  return function(string) {\n    return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n  };\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n  return typeof value == 'symbol' ||\n    (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n  return value == null ? '' : baseToString(value);\n}\n\n/**\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the camel cased string.\n * @example\n *\n * _.camelCase('Foo Bar');\n * // => 'fooBar'\n *\n * _.camelCase('--foo-bar--');\n * // => 'fooBar'\n *\n * _.camelCase('__FOO_BAR__');\n * // => 'fooBar'\n */\nvar camelCase = createCompounder(function(result, word, index) {\n  word = word.toLowerCase();\n  return result + (index ? capitalize(word) : word);\n});\n\n/**\n * Converts the first character of `string` to upper case and the remaining\n * to lower case.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to capitalize.\n * @returns {string} Returns the capitalized string.\n * @example\n *\n * _.capitalize('FRED');\n * // => 'Fred'\n */\nfunction capitalize(string) {\n  return upperFirst(toString(string).toLowerCase());\n}\n\n/**\n * Deburrs `string` by converting\n * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n * letters to basic Latin letters and removing\n * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to deburr.\n * @returns {string} Returns the deburred string.\n * @example\n *\n * _.deburr('déjà vu');\n * // => 'deja vu'\n */\nfunction deburr(string) {\n  string = toString(string);\n  return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n}\n\n/**\n * Converts the first character of `string` to upper case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.upperFirst('fred');\n * // => 'Fred'\n *\n * _.upperFirst('FRED');\n * // => 'FRED'\n */\nvar upperFirst = createCaseFirst('toUpperCase');\n\n/**\n * Splits `string` into an array of its words.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {RegExp|string} [pattern] The pattern to match words.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the words of `string`.\n * @example\n *\n * _.words('fred, barney, & pebbles');\n * // => ['fred', 'barney', 'pebbles']\n *\n * _.words('fred, barney, & pebbles', /[^, ]+/g);\n * // => ['fred', 'barney', '&', 'pebbles']\n */\nfunction words(string, pattern, guard) {\n  string = toString(string);\n  pattern = guard ? undefined : pattern;\n\n  if (pattern === undefined) {\n    return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);\n  }\n  return string.match(pattern) || [];\n}\n\nmodule.exports = camelCase;\n","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match words composed of alphanumeric characters. */\nvar reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n/** Used to match Latin Unicode letters (excluding mathematical operators). */\nvar reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n    rsComboMarksRange = '\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe23',\n    rsComboSymbolsRange = '\\\\u20d0-\\\\u20f0',\n    rsDingbatRange = '\\\\u2700-\\\\u27bf',\n    rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n    rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n    rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n    rsPunctuationRange = '\\\\u2000-\\\\u206f',\n    rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n    rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n    rsVarRange = '\\\\ufe0e\\\\ufe0f',\n    rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n/** Used to compose unicode capture groups. */\nvar rsApos = \"['\\u2019]\",\n    rsBreak = '[' + rsBreakRange + ']',\n    rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']',\n    rsDigits = '\\\\d+',\n    rsDingbat = '[' + rsDingbatRange + ']',\n    rsLower = '[' + rsLowerRange + ']',\n    rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n    rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n    rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n    rsNonAstral = '[^' + rsAstralRange + ']',\n    rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n    rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n    rsUpper = '[' + rsUpperRange + ']',\n    rsZWJ = '\\\\u200d';\n\n/** Used to compose unicode regexes. */\nvar rsLowerMisc = '(?:' + rsLower + '|' + rsMisc + ')',\n    rsUpperMisc = '(?:' + rsUpper + '|' + rsMisc + ')',\n    rsOptLowerContr = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n    rsOptUpperContr = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n    reOptMod = rsModifier + '?',\n    rsOptVar = '[' + rsVarRange + ']?',\n    rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n    rsSeq = rsOptVar + reOptMod + rsOptJoin,\n    rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq;\n\n/** Used to match apostrophes. */\nvar reApos = RegExp(rsApos, 'g');\n\n/**\n * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n */\nvar reComboMark = RegExp(rsCombo, 'g');\n\n/** Used to match complex or compound words. */\nvar reUnicodeWord = RegExp([\n  rsUpper + '?' + rsLower + '+' + rsOptLowerContr + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n  rsUpperMisc + '+' + rsOptUpperContr + '(?=' + [rsBreak, rsUpper + rsLowerMisc, '$'].join('|') + ')',\n  rsUpper + '?' + rsLowerMisc + '+' + rsOptLowerContr,\n  rsUpper + '+' + rsOptUpperContr,\n  rsDigits,\n  rsEmoji\n].join('|'), 'g');\n\n/** Used to detect strings that need a more robust regexp to match words. */\nvar reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n/** Used to map Latin Unicode letters to basic Latin letters. */\nvar deburredLetters = {\n  // Latin-1 Supplement block.\n  '\\xc0': 'A',  '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n  '\\xe0': 'a',  '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n  '\\xc7': 'C',  '\\xe7': 'c',\n  '\\xd0': 'D',  '\\xf0': 'd',\n  '\\xc8': 'E',  '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n  '\\xe8': 'e',  '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n  '\\xcc': 'I',  '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n  '\\xec': 'i',  '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n  '\\xd1': 'N',  '\\xf1': 'n',\n  '\\xd2': 'O',  '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n  '\\xf2': 'o',  '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n  '\\xd9': 'U',  '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n  '\\xf9': 'u',  '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n  '\\xdd': 'Y',  '\\xfd': 'y', '\\xff': 'y',\n  '\\xc6': 'Ae', '\\xe6': 'ae',\n  '\\xde': 'Th', '\\xfe': 'th',\n  '\\xdf': 'ss',\n  // Latin Extended-A block.\n  '\\u0100': 'A',  '\\u0102': 'A', '\\u0104': 'A',\n  '\\u0101': 'a',  '\\u0103': 'a', '\\u0105': 'a',\n  '\\u0106': 'C',  '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n  '\\u0107': 'c',  '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n  '\\u010e': 'D',  '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n  '\\u0112': 'E',  '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n  '\\u0113': 'e',  '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n  '\\u011c': 'G',  '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n  '\\u011d': 'g',  '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n  '\\u0124': 'H',  '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n  '\\u0128': 'I',  '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n  '\\u0129': 'i',  '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n  '\\u0134': 'J',  '\\u0135': 'j',\n  '\\u0136': 'K',  '\\u0137': 'k', '\\u0138': 'k',\n  '\\u0139': 'L',  '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n  '\\u013a': 'l',  '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n  '\\u0143': 'N',  '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n  '\\u0144': 'n',  '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n  '\\u014c': 'O',  '\\u014e': 'O', '\\u0150': 'O',\n  '\\u014d': 'o',  '\\u014f': 'o', '\\u0151': 'o',\n  '\\u0154': 'R',  '\\u0156': 'R', '\\u0158': 'R',\n  '\\u0155': 'r',  '\\u0157': 'r', '\\u0159': 'r',\n  '\\u015a': 'S',  '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n  '\\u015b': 's',  '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n  '\\u0162': 'T',  '\\u0164': 'T', '\\u0166': 'T',\n  '\\u0163': 't',  '\\u0165': 't', '\\u0167': 't',\n  '\\u0168': 'U',  '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n  '\\u0169': 'u',  '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n  '\\u0174': 'W',  '\\u0175': 'w',\n  '\\u0176': 'Y',  '\\u0177': 'y', '\\u0178': 'Y',\n  '\\u0179': 'Z',  '\\u017b': 'Z', '\\u017d': 'Z',\n  '\\u017a': 'z',  '\\u017c': 'z', '\\u017e': 'z',\n  '\\u0132': 'IJ', '\\u0133': 'ij',\n  '\\u0152': 'Oe', '\\u0153': 'oe',\n  '\\u0149': \"'n\", '\\u017f': 'ss'\n};\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n *  the initial value.\n * @returns {*} Returns the accumulated value.\n */\nfunction arrayReduce(array, iteratee, accumulator, initAccum) {\n  var index = -1,\n      length = array ? array.length : 0;\n\n  if (initAccum && length) {\n    accumulator = array[++index];\n  }\n  while (++index < length) {\n    accumulator = iteratee(accumulator, array[index], index, array);\n  }\n  return accumulator;\n}\n\n/**\n * Splits an ASCII `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\nfunction asciiWords(string) {\n  return string.match(reAsciiWord) || [];\n}\n\n/**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyOf(object) {\n  return function(key) {\n    return object == null ? undefined : object[key];\n  };\n}\n\n/**\n * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n * letters to basic Latin letters.\n *\n * @private\n * @param {string} letter The matched letter to deburr.\n * @returns {string} Returns the deburred letter.\n */\nvar deburrLetter = basePropertyOf(deburredLetters);\n\n/**\n * Checks if `string` contains a word composed of Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a word is found, else `false`.\n */\nfunction hasUnicodeWord(string) {\n  return reHasUnicodeWord.test(string);\n}\n\n/**\n * Splits a Unicode `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\nfunction unicodeWords(string) {\n  return string.match(reUnicodeWord) || [];\n}\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n    symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n  // Exit early for strings to avoid a performance hit in some environments.\n  if (typeof value == 'string') {\n    return value;\n  }\n  if (isSymbol(value)) {\n    return symbolToString ? symbolToString.call(value) : '';\n  }\n  var result = (value + '');\n  return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Creates a function like `_.camelCase`.\n *\n * @private\n * @param {Function} callback The function to combine each word.\n * @returns {Function} Returns the new compounder function.\n */\nfunction createCompounder(callback) {\n  return function(string) {\n    return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n  };\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n  return typeof value == 'symbol' ||\n    (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n  return value == null ? '' : baseToString(value);\n}\n\n/**\n * Deburrs `string` by converting\n * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n * letters to basic Latin letters and removing\n * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to deburr.\n * @returns {string} Returns the deburred string.\n * @example\n *\n * _.deburr('déjà vu');\n * // => 'deja vu'\n */\nfunction deburr(string) {\n  string = toString(string);\n  return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n}\n\n/**\n * Converts `string` to\n * [snake case](https://en.wikipedia.org/wiki/Snake_case).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the snake cased string.\n * @example\n *\n * _.snakeCase('Foo Bar');\n * // => 'foo_bar'\n *\n * _.snakeCase('fooBar');\n * // => 'foo_bar'\n *\n * _.snakeCase('--FOO-BAR--');\n * // => 'foo_bar'\n */\nvar snakeCase = createCompounder(function(result, word, index) {\n  return result + (index ? '_' : '') + word.toLowerCase();\n});\n\n/**\n * Splits `string` into an array of its words.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {RegExp|string} [pattern] The pattern to match words.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the words of `string`.\n * @example\n *\n * _.words('fred, barney, & pebbles');\n * // => ['fred', 'barney', 'pebbles']\n *\n * _.words('fred, barney, & pebbles', /[^, ]+/g);\n * // => ['fred', 'barney', '&', 'pebbles']\n */\nfunction words(string, pattern, guard) {\n  string = toString(string);\n  pattern = guard ? undefined : pattern;\n\n  if (pattern === undefined) {\n    return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);\n  }\n  return string.match(pattern) || [];\n}\n\nmodule.exports = snakeCase;\n","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used to compose bitmasks for comparison styles. */\nvar UNORDERED_COMPARE_FLAG = 1,\n    PARTIAL_COMPARE_FLAG = 2;\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n    MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n    arrayTag = '[object Array]',\n    boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    errorTag = '[object Error]',\n    funcTag = '[object Function]',\n    genTag = '[object GeneratorFunction]',\n    mapTag = '[object Map]',\n    numberTag = '[object Number]',\n    objectTag = '[object Object]',\n    promiseTag = '[object Promise]',\n    regexpTag = '[object RegExp]',\n    setTag = '[object Set]',\n    stringTag = '[object String]',\n    symbolTag = '[object Symbol]',\n    weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n    dataViewTag = '[object DataView]',\n    float32Tag = '[object Float32Array]',\n    float64Tag = '[object Float64Array]',\n    int8Tag = '[object Int8Array]',\n    int16Tag = '[object Int16Array]',\n    int32Tag = '[object Int32Array]',\n    uint8Tag = '[object Uint8Array]',\n    uint8ClampedTag = '[object Uint8ClampedArray]',\n    uint16Tag = '[object Uint16Array]',\n    uint32Tag = '[object Uint32Array]';\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n    reIsPlainProp = /^\\w*$/,\n    reLeadingDot = /^\\./,\n    rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n  try {\n    return freeProcess && freeProcess.binding('util');\n  } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n  var index = -1,\n      length = array ? array.length : 0;\n\n  while (++index < length) {\n    if (iteratee(array[index], index, array) === false) {\n      break;\n    }\n  }\n  return array;\n}\n\n/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n *  else `false`.\n */\nfunction arraySome(array, predicate) {\n  var index = -1,\n      length = array ? array.length : 0;\n\n  while (++index < length) {\n    if (predicate(array[index], index, array)) {\n      return true;\n    }\n  }\n  return false;\n}\n\n/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n  return function(object) {\n    return object == null ? undefined : object[key];\n  };\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n  var index = -1,\n      result = Array(n);\n\n  while (++index < n) {\n    result[index] = iteratee(index);\n  }\n  return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n  return function(value) {\n    return func(value);\n  };\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n  return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n  // Many host objects are `Object` objects that can coerce to strings\n  // despite having improperly defined `toString` methods.\n  var result = false;\n  if (value != null && typeof value.toString != 'function') {\n    try {\n      result = !!(value + '');\n    } catch (e) {}\n  }\n  return result;\n}\n\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n  var index = -1,\n      result = Array(map.size);\n\n  map.forEach(function(value, key) {\n    result[++index] = [key, value];\n  });\n  return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n  return function(arg) {\n    return func(transform(arg));\n  };\n}\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n  var index = -1,\n      result = Array(set.size);\n\n  set.forEach(function(value) {\n    result[++index] = value;\n  });\n  return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n    funcProto = Function.prototype,\n    objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n  return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n  funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n  .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Symbol = root.Symbol,\n    Uint8Array = root.Uint8Array,\n    getPrototype = overArg(Object.getPrototypeOf, Object),\n    objectCreate = Object.create,\n    propertyIsEnumerable = objectProto.propertyIsEnumerable,\n    splice = arrayProto.splice;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView'),\n    Map = getNative(root, 'Map'),\n    Promise = getNative(root, 'Promise'),\n    Set = getNative(root, 'Set'),\n    WeakMap = getNative(root, 'WeakMap'),\n    nativeCreate = getNative(Object, 'create');\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n    mapCtorString = toSource(Map),\n    promiseCtorString = toSource(Promise),\n    setCtorString = toSource(Set),\n    weakMapCtorString = toSource(WeakMap);\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n    symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\n    symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n  var index = -1,\n      length = entries ? entries.length : 0;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n  this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n  return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n  var data = this.__data__;\n  if (nativeCreate) {\n    var result = data[key];\n    return result === HASH_UNDEFINED ? undefined : result;\n  }\n  return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n  var data = this.__data__;\n  return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n  var data = this.__data__;\n  data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n  return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n  var index = -1,\n      length = entries ? entries.length : 0;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n  this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    return false;\n  }\n  var lastIndex = data.length - 1;\n  if (index == lastIndex) {\n    data.pop();\n  } else {\n    splice.call(data, index, 1);\n  }\n  return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n  return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    data.push([key, value]);\n  } else {\n    data[index][1] = value;\n  }\n  return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n  var index = -1,\n      length = entries ? entries.length : 0;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n  this.__data__ = {\n    'hash': new Hash,\n    'map': new (Map || ListCache),\n    'string': new Hash\n  };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n  return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n  return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n  return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n  getMapData(this, key).set(key, value);\n  return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n  var index = -1,\n      length = values ? values.length : 0;\n\n  this.__data__ = new MapCache;\n  while (++index < length) {\n    this.add(values[index]);\n  }\n}\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n  this.__data__.set(value, HASH_UNDEFINED);\n  return this;\n}\n\n/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n  return this.__data__.has(value);\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n  this.__data__ = new ListCache(entries);\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n  this.__data__ = new ListCache;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n  return this.__data__['delete'](key);\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n  return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n  return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n  var cache = this.__data__;\n  if (cache instanceof ListCache) {\n    var pairs = cache.__data__;\n    if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n      pairs.push([key, value]);\n      return this;\n    }\n    cache = this.__data__ = new MapCache(pairs);\n  }\n  cache.set(key, value);\n  return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n  // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n  // Safari 9 makes `arguments.length` enumerable in strict mode.\n  var result = (isArray(value) || isArguments(value))\n    ? baseTimes(value.length, String)\n    : [];\n\n  var length = result.length,\n      skipIndexes = !!length;\n\n  for (var key in value) {\n    if ((inherited || hasOwnProperty.call(value, key)) &&\n        !(skipIndexes && (key == 'length' || isIndex(key, length)))) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n  var length = array.length;\n  while (length--) {\n    if (eq(array[length][0], key)) {\n      return length;\n    }\n  }\n  return -1;\n}\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} prototype The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nfunction baseCreate(proto) {\n  return isObject(proto) ? objectCreate(proto) : {};\n}\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n  return object && baseFor(object, iteratee, keys);\n}\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n  path = isKey(path, object) ? [path] : castPath(path);\n\n  var index = 0,\n      length = path.length;\n\n  while (object != null && index < length) {\n    object = object[toKey(path[index++])];\n  }\n  return (index && index == length) ? object : undefined;\n}\n\n/**\n * The base implementation of `getTag`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n  return objectToString.call(value);\n}\n\n/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n  return object != null && key in Object(object);\n}\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {boolean} [bitmask] The bitmask of comparison flags.\n *  The bitmask may be composed of the following flags:\n *     1 - Unordered comparison\n *     2 - Partial comparison\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, customizer, bitmask, stack) {\n  if (value === other) {\n    return true;\n  }\n  if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {\n    return value !== value && other !== other;\n  }\n  return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);\n}\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual`\n *  for more details.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {\n  var objIsArr = isArray(object),\n      othIsArr = isArray(other),\n      objTag = arrayTag,\n      othTag = arrayTag;\n\n  if (!objIsArr) {\n    objTag = getTag(object);\n    objTag = objTag == argsTag ? objectTag : objTag;\n  }\n  if (!othIsArr) {\n    othTag = getTag(other);\n    othTag = othTag == argsTag ? objectTag : othTag;\n  }\n  var objIsObj = objTag == objectTag && !isHostObject(object),\n      othIsObj = othTag == objectTag && !isHostObject(other),\n      isSameTag = objTag == othTag;\n\n  if (isSameTag && !objIsObj) {\n    stack || (stack = new Stack);\n    return (objIsArr || isTypedArray(object))\n      ? equalArrays(object, other, equalFunc, customizer, bitmask, stack)\n      : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);\n  }\n  if (!(bitmask & PARTIAL_COMPARE_FLAG)) {\n    var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n        othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n    if (objIsWrapped || othIsWrapped) {\n      var objUnwrapped = objIsWrapped ? object.value() : object,\n          othUnwrapped = othIsWrapped ? other.value() : other;\n\n      stack || (stack = new Stack);\n      return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack);\n    }\n  }\n  if (!isSameTag) {\n    return false;\n  }\n  stack || (stack = new Stack);\n  return equalObjects(object, other, equalFunc, customizer, bitmask, stack);\n}\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n  var index = matchData.length,\n      length = index,\n      noCustomizer = !customizer;\n\n  if (object == null) {\n    return !length;\n  }\n  object = Object(object);\n  while (index--) {\n    var data = matchData[index];\n    if ((noCustomizer && data[2])\n          ? data[1] !== object[data[0]]\n          : !(data[0] in object)\n        ) {\n      return false;\n    }\n  }\n  while (++index < length) {\n    data = matchData[index];\n    var key = data[0],\n        objValue = object[key],\n        srcValue = data[1];\n\n    if (noCustomizer && data[2]) {\n      if (objValue === undefined && !(key in object)) {\n        return false;\n      }\n    } else {\n      var stack = new Stack;\n      if (customizer) {\n        var result = customizer(objValue, srcValue, key, object, source, stack);\n      }\n      if (!(result === undefined\n            ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack)\n            : result\n          )) {\n        return false;\n      }\n    }\n  }\n  return true;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n *  else `false`.\n */\nfunction baseIsNative(value) {\n  if (!isObject(value) || isMasked(value)) {\n    return false;\n  }\n  var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n  return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n  return isObjectLike(value) &&\n    isLength(value.length) && !!typedArrayTags[objectToString.call(value)];\n}\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n  // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n  // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n  if (typeof value == 'function') {\n    return value;\n  }\n  if (value == null) {\n    return identity;\n  }\n  if (typeof value == 'object') {\n    return isArray(value)\n      ? baseMatchesProperty(value[0], value[1])\n      : baseMatches(value);\n  }\n  return property(value);\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n  if (!isPrototype(object)) {\n    return nativeKeys(object);\n  }\n  var result = [];\n  for (var key in Object(object)) {\n    if (hasOwnProperty.call(object, key) && key != 'constructor') {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n  var matchData = getMatchData(source);\n  if (matchData.length == 1 && matchData[0][2]) {\n    return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n  }\n  return function(object) {\n    return object === source || baseIsMatch(object, source, matchData);\n  };\n}\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n  if (isKey(path) && isStrictComparable(srcValue)) {\n    return matchesStrictComparable(toKey(path), srcValue);\n  }\n  return function(object) {\n    var objValue = get(object, path);\n    return (objValue === undefined && objValue === srcValue)\n      ? hasIn(object, path)\n      : baseIsEqual(srcValue, objValue, undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG);\n  };\n}\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n  return function(object) {\n    return baseGet(object, path);\n  };\n}\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n  // Exit early for strings to avoid a performance hit in some environments.\n  if (typeof value == 'string') {\n    return value;\n  }\n  if (isSymbol(value)) {\n    return symbolToString ? symbolToString.call(value) : '';\n  }\n  var result = (value + '');\n  return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value) {\n  return isArray(value) ? value : stringToPath(value);\n}\n\n/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n  return function(object, iteratee, keysFunc) {\n    var index = -1,\n        iterable = Object(object),\n        props = keysFunc(object),\n        length = props.length;\n\n    while (length--) {\n      var key = props[fromRight ? length : ++index];\n      if (iteratee(iterable[key], key, iterable) === false) {\n        break;\n      }\n    }\n    return object;\n  };\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} customizer The function to customize comparisons.\n * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`\n *  for more details.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, equalFunc, customizer, bitmask, stack) {\n  var isPartial = bitmask & PARTIAL_COMPARE_FLAG,\n      arrLength = array.length,\n      othLength = other.length;\n\n  if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n    return false;\n  }\n  // Assume cyclic values are equal.\n  var stacked = stack.get(array);\n  if (stacked && stack.get(other)) {\n    return stacked == other;\n  }\n  var index = -1,\n      result = true,\n      seen = (bitmask & UNORDERED_COMPARE_FLAG) ? new SetCache : undefined;\n\n  stack.set(array, other);\n  stack.set(other, array);\n\n  // Ignore non-index properties.\n  while (++index < arrLength) {\n    var arrValue = array[index],\n        othValue = other[index];\n\n    if (customizer) {\n      var compared = isPartial\n        ? customizer(othValue, arrValue, index, other, array, stack)\n        : customizer(arrValue, othValue, index, array, other, stack);\n    }\n    if (compared !== undefined) {\n      if (compared) {\n        continue;\n      }\n      result = false;\n      break;\n    }\n    // Recursively compare arrays (susceptible to call stack limits).\n    if (seen) {\n      if (!arraySome(other, function(othValue, othIndex) {\n            if (!seen.has(othIndex) &&\n                (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {\n              return seen.add(othIndex);\n            }\n          })) {\n        result = false;\n        break;\n      }\n    } else if (!(\n          arrValue === othValue ||\n            equalFunc(arrValue, othValue, customizer, bitmask, stack)\n        )) {\n      result = false;\n      break;\n    }\n  }\n  stack['delete'](array);\n  stack['delete'](other);\n  return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} customizer The function to customize comparisons.\n * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`\n *  for more details.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {\n  switch (tag) {\n    case dataViewTag:\n      if ((object.byteLength != other.byteLength) ||\n          (object.byteOffset != other.byteOffset)) {\n        return false;\n      }\n      object = object.buffer;\n      other = other.buffer;\n\n    case arrayBufferTag:\n      if ((object.byteLength != other.byteLength) ||\n          !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n        return false;\n      }\n      return true;\n\n    case boolTag:\n    case dateTag:\n    case numberTag:\n      // Coerce booleans to `1` or `0` and dates to milliseconds.\n      // Invalid dates are coerced to `NaN`.\n      return eq(+object, +other);\n\n    case errorTag:\n      return object.name == other.name && object.message == other.message;\n\n    case regexpTag:\n    case stringTag:\n      // Coerce regexes to strings and treat strings, primitives and objects,\n      // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n      // for more details.\n      return object == (other + '');\n\n    case mapTag:\n      var convert = mapToArray;\n\n    case setTag:\n      var isPartial = bitmask & PARTIAL_COMPARE_FLAG;\n      convert || (convert = setToArray);\n\n      if (object.size != other.size && !isPartial) {\n        return false;\n      }\n      // Assume cyclic values are equal.\n      var stacked = stack.get(object);\n      if (stacked) {\n        return stacked == other;\n      }\n      bitmask |= UNORDERED_COMPARE_FLAG;\n\n      // Recursively compare objects (susceptible to call stack limits).\n      stack.set(object, other);\n      var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack);\n      stack['delete'](object);\n      return result;\n\n    case symbolTag:\n      if (symbolValueOf) {\n        return symbolValueOf.call(object) == symbolValueOf.call(other);\n      }\n  }\n  return false;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} customizer The function to customize comparisons.\n * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`\n *  for more details.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, equalFunc, customizer, bitmask, stack) {\n  var isPartial = bitmask & PARTIAL_COMPARE_FLAG,\n      objProps = keys(object),\n      objLength = objProps.length,\n      othProps = keys(other),\n      othLength = othProps.length;\n\n  if (objLength != othLength && !isPartial) {\n    return false;\n  }\n  var index = objLength;\n  while (index--) {\n    var key = objProps[index];\n    if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n      return false;\n    }\n  }\n  // Assume cyclic values are equal.\n  var stacked = stack.get(object);\n  if (stacked && stack.get(other)) {\n    return stacked == other;\n  }\n  var result = true;\n  stack.set(object, other);\n  stack.set(other, object);\n\n  var skipCtor = isPartial;\n  while (++index < objLength) {\n    key = objProps[index];\n    var objValue = object[key],\n        othValue = other[key];\n\n    if (customizer) {\n      var compared = isPartial\n        ? customizer(othValue, objValue, key, other, object, stack)\n        : customizer(objValue, othValue, key, object, other, stack);\n    }\n    // Recursively compare objects (susceptible to call stack limits).\n    if (!(compared === undefined\n          ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack))\n          : compared\n        )) {\n      result = false;\n      break;\n    }\n    skipCtor || (skipCtor = key == 'constructor');\n  }\n  if (result && !skipCtor) {\n    var objCtor = object.constructor,\n        othCtor = other.constructor;\n\n    // Non `Object` object instances with different constructors are not equal.\n    if (objCtor != othCtor &&\n        ('constructor' in object && 'constructor' in other) &&\n        !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n          typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n      result = false;\n    }\n  }\n  stack['delete'](object);\n  stack['delete'](other);\n  return result;\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n  var data = map.__data__;\n  return isKeyable(key)\n    ? data[typeof key == 'string' ? 'string' : 'hash']\n    : data.map;\n}\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n  var result = keys(object),\n      length = result.length;\n\n  while (length--) {\n    var key = result[length],\n        value = object[key];\n\n    result[length] = [key, value, isStrictComparable(value)];\n  }\n  return result;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n  var value = getValue(object, key);\n  return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11,\n// for data views in Edge < 14, and promises in Node.js.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n    (Map && getTag(new Map) != mapTag) ||\n    (Promise && getTag(Promise.resolve()) != promiseTag) ||\n    (Set && getTag(new Set) != setTag) ||\n    (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n  getTag = function(value) {\n    var result = objectToString.call(value),\n        Ctor = result == objectTag ? value.constructor : undefined,\n        ctorString = Ctor ? toSource(Ctor) : undefined;\n\n    if (ctorString) {\n      switch (ctorString) {\n        case dataViewCtorString: return dataViewTag;\n        case mapCtorString: return mapTag;\n        case promiseCtorString: return promiseTag;\n        case setCtorString: return setTag;\n        case weakMapCtorString: return weakMapTag;\n      }\n    }\n    return result;\n  };\n}\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n  path = isKey(path, object) ? [path] : castPath(path);\n\n  var result,\n      index = -1,\n      length = path.length;\n\n  while (++index < length) {\n    var key = toKey(path[index]);\n    if (!(result = object != null && hasFunc(object, key))) {\n      break;\n    }\n    object = object[key];\n  }\n  if (result) {\n    return result;\n  }\n  var length = object ? object.length : 0;\n  return !!length && isLength(length) && isIndex(key, length) &&\n    (isArray(object) || isArguments(object));\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n  length = length == null ? MAX_SAFE_INTEGER : length;\n  return !!length &&\n    (typeof value == 'number' || reIsUint.test(value)) &&\n    (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n  if (isArray(value)) {\n    return false;\n  }\n  var type = typeof value;\n  if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n      value == null || isSymbol(value)) {\n    return true;\n  }\n  return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n    (object != null && value in Object(object));\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n  var type = typeof value;\n  return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n    ? (value !== '__proto__')\n    : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n  return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n  var Ctor = value && value.constructor,\n      proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n  return value === proto;\n}\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n *  equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n  return value === value && !isObject(value);\n}\n\n/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n  return function(object) {\n    if (object == null) {\n      return false;\n    }\n    return object[key] === srcValue &&\n      (srcValue !== undefined || (key in Object(object)));\n  };\n}\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoize(function(string) {\n  string = toString(string);\n\n  var result = [];\n  if (reLeadingDot.test(string)) {\n    result.push('');\n  }\n  string.replace(rePropName, function(match, number, quote, string) {\n    result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));\n  });\n  return result;\n});\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n  if (typeof value == 'string' || isSymbol(value)) {\n    return value;\n  }\n  var result = (value + '');\n  return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n  if (func != null) {\n    try {\n      return funcToString.call(func);\n    } catch (e) {}\n    try {\n      return (func + '');\n    } catch (e) {}\n  }\n  return '';\n}\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n  if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  var memoized = function() {\n    var args = arguments,\n        key = resolver ? resolver.apply(this, args) : args[0],\n        cache = memoized.cache;\n\n    if (cache.has(key)) {\n      return cache.get(key);\n    }\n    var result = func.apply(this, args);\n    memoized.cache = cache.set(key, result);\n    return result;\n  };\n  memoized.cache = new (memoize.Cache || MapCache);\n  return memoized;\n}\n\n// Assign cache to `_.memoize`.\nmemoize.Cache = MapCache;\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n  return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n *  else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n  // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n  return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n    (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n  return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n *  else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n  return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n  // The use of `Object#toString` avoids issues with the `typeof` operator\n  // in Safari 8-9 which returns 'object' for typed array and other constructors.\n  var tag = isObject(value) ? objectToString.call(value) : '';\n  return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n  return typeof value == 'number' &&\n    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n  var type = typeof value;\n  return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n  return typeof value == 'symbol' ||\n    (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n  return value == null ? '' : baseToString(value);\n}\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n  var result = object == null ? undefined : baseGet(object, path);\n  return result === undefined ? defaultValue : result;\n}\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n  return object != null && hasPath(object, path, baseHasIn);\n}\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n  return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * An alternative to `_.reduce`; this method transforms `object` to a new\n * `accumulator` object which is the result of running each of its own\n * enumerable string keyed properties thru `iteratee`, with each invocation\n * potentially mutating the `accumulator` object. If `accumulator` is not\n * provided, a new object with the same `[[Prototype]]` will be used. The\n * iteratee is invoked with four arguments: (accumulator, value, key, object).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The custom accumulator value.\n * @returns {*} Returns the accumulated value.\n * @example\n *\n * _.transform([2, 3, 4], function(result, n) {\n *   result.push(n *= n);\n *   return n % 2 == 0;\n * }, []);\n * // => [4, 9]\n *\n * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n *   (result[value] || (result[value] = [])).push(key);\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] }\n */\nfunction transform(object, iteratee, accumulator) {\n  var isArr = isArray(object) || isTypedArray(object);\n  iteratee = baseIteratee(iteratee, 4);\n\n  if (accumulator == null) {\n    if (isArr || isObject(object)) {\n      var Ctor = object.constructor;\n      if (isArr) {\n        accumulator = isArray(object) ? new Ctor : [];\n      } else {\n        accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};\n      }\n    } else {\n      accumulator = {};\n    }\n  }\n  (isArr ? arrayEach : baseForOwn)(object, function(value, index, object) {\n    return iteratee(accumulator, value, index, object);\n  });\n  return accumulator;\n}\n\n/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n  return value;\n}\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n *   { 'a': { 'b': 2 } },\n *   { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n  return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nmodule.exports = transform;\n","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n    MAX_SAFE_INTEGER = 9007199254740991,\n    MAX_INTEGER = 1.7976931348623157e+308,\n    NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n    funcTag = '[object Function]',\n    genTag = '[object GeneratorFunction]',\n    stringTag = '[object String]',\n    symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n  var index = -1,\n      length = array ? array.length : 0,\n      result = Array(length);\n\n  while (++index < length) {\n    result[index] = iteratee(array[index], index, array);\n  }\n  return result;\n}\n\n/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n  var length = array.length,\n      index = fromIndex + (fromRight ? 1 : -1);\n\n  while ((fromRight ? index-- : ++index < length)) {\n    if (predicate(array[index], index, array)) {\n      return index;\n    }\n  }\n  return -1;\n}\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n  if (value !== value) {\n    return baseFindIndex(array, baseIsNaN, fromIndex);\n  }\n  var index = fromIndex - 1,\n      length = array.length;\n\n  while (++index < length) {\n    if (array[index] === value) {\n      return index;\n    }\n  }\n  return -1;\n}\n\n/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n  return value !== value;\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n  var index = -1,\n      result = Array(n);\n\n  while (++index < n) {\n    result[index] = iteratee(index);\n  }\n  return result;\n}\n\n/**\n * The base implementation of `_.values` and `_.valuesIn` which creates an\n * array of `object` property values corresponding to the property names\n * of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the array of property values.\n */\nfunction baseValues(object, props) {\n  return arrayMap(props, function(key) {\n    return object[key];\n  });\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n  return function(arg) {\n    return func(transform(arg));\n  };\n}\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object),\n    nativeMax = Math.max;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n  // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n  // Safari 9 makes `arguments.length` enumerable in strict mode.\n  var result = (isArray(value) || isArguments(value))\n    ? baseTimes(value.length, String)\n    : [];\n\n  var length = result.length,\n      skipIndexes = !!length;\n\n  for (var key in value) {\n    if ((inherited || hasOwnProperty.call(value, key)) &&\n        !(skipIndexes && (key == 'length' || isIndex(key, length)))) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n  if (!isPrototype(object)) {\n    return nativeKeys(object);\n  }\n  var result = [];\n  for (var key in Object(object)) {\n    if (hasOwnProperty.call(object, key) && key != 'constructor') {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n  length = length == null ? MAX_SAFE_INTEGER : length;\n  return !!length &&\n    (typeof value == 'number' || reIsUint.test(value)) &&\n    (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n  var Ctor = value && value.constructor,\n      proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n  return value === proto;\n}\n\n/**\n * Checks if `value` is in `collection`. If `collection` is a string, it's\n * checked for a substring of `value`, otherwise\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * is used for equality comparisons. If `fromIndex` is negative, it's used as\n * the offset from the end of `collection`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {boolean} Returns `true` if `value` is found, else `false`.\n * @example\n *\n * _.includes([1, 2, 3], 1);\n * // => true\n *\n * _.includes([1, 2, 3], 1, 2);\n * // => false\n *\n * _.includes({ 'a': 1, 'b': 2 }, 1);\n * // => true\n *\n * _.includes('abcd', 'bc');\n * // => true\n */\nfunction includes(collection, value, fromIndex, guard) {\n  collection = isArrayLike(collection) ? collection : values(collection);\n  fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n  var length = collection.length;\n  if (fromIndex < 0) {\n    fromIndex = nativeMax(length + fromIndex, 0);\n  }\n  return isString(collection)\n    ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n    : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n *  else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n  // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n  return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n    (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n  return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n *  else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n  return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n  // The use of `Object#toString` avoids issues with the `typeof` operator\n  // in Safari 8-9 which returns 'object' for typed array and other constructors.\n  var tag = isObject(value) ? objectToString.call(value) : '';\n  return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n  return typeof value == 'number' &&\n    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n  var type = typeof value;\n  return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n  return typeof value == 'string' ||\n    (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n  return typeof value == 'symbol' ||\n    (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n  if (!value) {\n    return value === 0 ? value : 0;\n  }\n  value = toNumber(value);\n  if (value === INFINITY || value === -INFINITY) {\n    var sign = (value < 0 ? -1 : 1);\n    return sign * MAX_INTEGER;\n  }\n  return value === value ? value : 0;\n}\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n  var result = toFinite(value),\n      remainder = result % 1;\n\n  return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n  if (typeof value == 'number') {\n    return value;\n  }\n  if (isSymbol(value)) {\n    return NAN;\n  }\n  if (isObject(value)) {\n    var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n    value = isObject(other) ? (other + '') : other;\n  }\n  if (typeof value != 'string') {\n    return value === 0 ? value : +value;\n  }\n  value = value.replace(reTrim, '');\n  var isBinary = reIsBinary.test(value);\n  return (isBinary || reIsOctal.test(value))\n    ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n    : (reIsBadHex.test(value) ? NAN : +value);\n}\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n  return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * Creates an array of the own enumerable string keyed property values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.values(new Foo);\n * // => [1, 2] (iteration order is not guaranteed)\n *\n * _.values('hi');\n * // => ['h', 'i']\n */\nfunction values(object) {\n  return object ? baseValues(object, keys(object)) : [];\n}\n\nmodule.exports = includes;\n","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n  // Many host objects are `Object` objects that can coerce to strings\n  // despite having improperly defined `toString` methods.\n  var result = false;\n  if (value != null && typeof value.toString != 'function') {\n    try {\n      result = !!(value + '');\n    } catch (e) {}\n  }\n  return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n  return function(arg) {\n    return func(transform(arg));\n  };\n}\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n    objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n  if (!isObjectLike(value) ||\n      objectToString.call(value) != objectTag || isHostObject(value)) {\n    return false;\n  }\n  var proto = getPrototype(value);\n  if (proto === null) {\n    return true;\n  }\n  var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n  return (typeof Ctor == 'function' &&\n    Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);\n}\n\nmodule.exports = isPlainObject;\n","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** `Object#toString` result references. */\nvar funcTag = '[object Function]',\n    genTag = '[object GeneratorFunction]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n  return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n  // Many host objects are `Object` objects that can coerce to strings\n  // despite having improperly defined `toString` methods.\n  var result = false;\n  if (value != null && typeof value.toString != 'function') {\n    try {\n      result = !!(value + '');\n    } catch (e) {}\n  }\n  return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n    funcProto = Function.prototype,\n    objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n  return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n  funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n  .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map'),\n    nativeCreate = getNative(Object, 'create');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n  var index = -1,\n      length = entries ? entries.length : 0;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n  this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n  return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n  var data = this.__data__;\n  if (nativeCreate) {\n    var result = data[key];\n    return result === HASH_UNDEFINED ? undefined : result;\n  }\n  return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n  var data = this.__data__;\n  return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n  var data = this.__data__;\n  data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n  return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n  var index = -1,\n      length = entries ? entries.length : 0;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n  this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    return false;\n  }\n  var lastIndex = data.length - 1;\n  if (index == lastIndex) {\n    data.pop();\n  } else {\n    splice.call(data, index, 1);\n  }\n  return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n  return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    data.push([key, value]);\n  } else {\n    data[index][1] = value;\n  }\n  return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n  var index = -1,\n      length = entries ? entries.length : 0;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n  this.__data__ = {\n    'hash': new Hash,\n    'map': new (Map || ListCache),\n    'string': new Hash\n  };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n  return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n  return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n  return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n  getMapData(this, key).set(key, value);\n  return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n  var length = array.length;\n  while (length--) {\n    if (eq(array[length][0], key)) {\n      return length;\n    }\n  }\n  return -1;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n *  else `false`.\n */\nfunction baseIsNative(value) {\n  if (!isObject(value) || isMasked(value)) {\n    return false;\n  }\n  var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n  return pattern.test(toSource(value));\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n  var data = map.__data__;\n  return isKeyable(key)\n    ? data[typeof key == 'string' ? 'string' : 'hash']\n    : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n  var value = getValue(object, key);\n  return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n  var type = typeof value;\n  return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n    ? (value !== '__proto__')\n    : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n  return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n  if (func != null) {\n    try {\n      return funcToString.call(func);\n    } catch (e) {}\n    try {\n      return (func + '');\n    } catch (e) {}\n  }\n  return '';\n}\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n  if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  var memoized = function() {\n    var args = arguments,\n        key = resolver ? resolver.apply(this, args) : args[0],\n        cache = memoized.cache;\n\n    if (cache.has(key)) {\n      return cache.get(key);\n    }\n    var result = func.apply(this, args);\n    memoized.cache = cache.set(key, result);\n    return result;\n  };\n  memoized.cache = new (memoize.Cache || MapCache);\n  return memoized;\n}\n\n// Assign cache to `_.memoize`.\nmemoize.Cache = MapCache;\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n  return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n  // The use of `Object#toString` avoids issues with the `typeof` operator\n  // in Safari 8-9 which returns 'object' for typed array and other constructors.\n  var tag = isObject(value) ? objectToString.call(value) : '';\n  return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n  var type = typeof value;\n  return !!value && (type == 'object' || type == 'function');\n}\n\nmodule.exports = memoize;\n","// eslint-disable-next-line import/no-extraneous-dependencies\nconst camelCase = require('lodash.camelcase');\n// eslint-disable-next-line import/no-extraneous-dependencies\nconst snakeCase = require('lodash.snakecase');\n// eslint-disable-next-line import/no-extraneous-dependencies\nconst transform = require('lodash.transform');\n// eslint-disable-next-line import/no-extraneous-dependencies\nconst includes = require('lodash.includes');\n// eslint-disable-next-line import/no-extraneous-dependencies\nconst isPlainObject = require('lodash.isplainobject');\n// eslint-disable-next-line import/no-extraneous-dependencies\nconst memoize = require('lodash.memoize');\n\n/**\n * Enum for specifying key styles.\n * @readonly\n * @enum {Object}\n */\nconst Style = Object.freeze({\n  /** Snake case style */\n  SNAKE_CASE: { name: 'SNAKE_CASE', resolver: snakeCase },\n  /** Camel case style */\n  CAMEL_CASE: { name: 'CAMEL_CASE', resolver: camelCase },\n});\n\n/**\n * Default options for the transformation.\n * @type {Object}\n * @property {Array<Object>} from - The source styles.\n * @property {Array<Object>} to - The target styles.\n * @property {Array<string>} exclude - The paths to exclude from transformation.\n */\nconst DefaultOptions = {\n  from: [Style.CAMEL_CASE, Style.SNAKE_CASE],\n  to: [Style.CAMEL_CASE, Style.SNAKE_CASE],\n  exclude: [],\n};\n\n/**\n * Validates the options object.\n * @param {Object} options - The options object to validate.\n * @throws {Error} If the options object is invalid.\n */\nconst assertOptions = (options) => {\n  if (!options) {\n    throw new Error('\"options\" object must be specified');\n  }\n\n  const { from, to } = options;\n\n  if (!includes(DefaultOptions.from, from)) {\n    throw new Error(\n      `\"from\" option must be one of this valid \"Style\" options: ${DefaultOptions.from.map((style) => style.name).join(', ')}`,\n    );\n  }\n\n  if (!includes(DefaultOptions.to, to)) {\n    throw new Error(\n      `\"to\" option must be one of this valid \"Style\" options: ${DefaultOptions.to.map((style) => style.name).join(', ')}`,\n    );\n  }\n};\n\n/**\n * Checks if a given path matches a specified pattern.\n * @param {string} path - The path to check.\n * @param {string} pattern - The pattern to match against.\n * @returns {boolean} True if the path matches the pattern, false otherwise.\n */\nconst pathMatch = (path, pattern) => {\n  const splitAndFilter = (str) => str.split(/[.[\\]]/).filter((segment) => segment !== '');\n\n  const pathSegments = splitAndFilter(path);\n  const patternSegments = splitAndFilter(pattern);\n\n  if (patternSegments.length !== pathSegments.length) {\n    return false;\n  }\n\n  for (let i = 0; i < patternSegments.length; i += 1) {\n    if (patternSegments[i] !== '*' && patternSegments[i] !== pathSegments[i]) {\n      return false;\n    }\n  }\n\n  return true;\n};\n\n/**\n * Determines if a path should be excluded based on provided patterns.\n * @param {string} path - The path to check.\n * @param {Array<string>} exclude - The patterns to exclude.\n * @returns {boolean} True if the path should be excluded, false otherwise.\n */\nconst shouldExclude = memoize(\n  (path, exclude) => {\n    return exclude ? exclude.some((pattern) => pathMatch(path, pattern)) : false;\n  },\n  (path, exclude) => `${path}:${JSON.stringify(exclude)}`,\n);\n\n/**\n * Processes an object to transform its keys according to specified styles.\n *\n * This function recursively transforms the keys of the provided object based on the given\n * options. It supports transforming keys from snake_case to camelCase and vice versa. It\n * can also exclude specified paths from transformation.\n *\n * @param {Object} object - The object to be transformed.\n * @param {Object} options - Options to customize the transformation.\n * @param {Object} options.from - The style to transform from.\n * @param {Object} options.to - The style to transform to.\n * @param {Array<string>} [options.exclude=[]] - The paths to exclude from transformation.\n * @param {string} [currentPath=''] - The current path being processed (for internal use).\n * @returns {Object} The transformed object.\n * @throws {Error} If a transformed key would overwrite an existing key.\n *\n * @example\n * const { process, Style } = require('path/to/this/module');\n *\n * const obj = { first_name: 'John', last_name: 'Doe' };\n * const transformedObj = process(obj, { from: Style.SNAKE_CASE, to: Style.CAMEL_CASE });\n * console.log(transformedObj); // { firstName: 'John', lastName: 'Doe' }\n */\nconst process = (object, options, currentPath = '') => {\n  assertOptions(options);\n\n  const {\n    to: { resolver },\n    exclude,\n  } = options;\n\n  if (!object) {\n    return object;\n  }\n\n  if (object instanceof Date) {\n    return object;\n  }\n\n  if (Array.isArray(object)) {\n    return object.map((element, index) => process(element, options, `${currentPath}[${index}]`));\n  }\n\n  if (isPlainObject(object)) {\n    return transform(\n      object,\n      (result, value, key) => {\n        const newPath = currentPath ? `${currentPath}.${key}` : key;\n        if (shouldExclude(newPath, exclude)) {\n          // eslint-disable-next-line no-param-reassign\n          result[key] = value;\n        } else {\n          const newKey = resolver(key);\n          if (key !== newKey && newKey in object) {\n            throw new Error(\n              `Key \\`${newKey}\\` would overwrite existing key of the given JSON object`,\n            );\n          }\n          // eslint-disable-next-line no-param-reassign\n          result[newKey] = process(value, options, newPath);\n        }\n      },\n      {},\n    );\n  }\n\n  shouldExclude.cache.clear();\n  return object;\n};\n\nmodule.exports = {\n  /**\n   * Processes an object to transform its keys according to specified styles.\n   *\n   * @function\n   * @param {Object} object - The object to be transformed.\n   * @param {Object} options - Options to customize the transformation.\n   * @returns {Object} The transformed object.\n   */\n  process,\n  /**\n   * Enum for specifying key styles.\n   * @enum {Object}\n   */\n  Style,\n};\n","const { process, Style } = require('./transform.js');\n\n/**\n * Converts the keys of an object from snake_case to camelCase.\n *\n * This function transforms the keys of the provided object from snake_case to camelCase.\n * It uses the `process` function from the 'transform.js' module with predefined styles.\n * Additional options can be provided to override the default behavior.\n *\n * @param {Object} object - The object to be transformed.\n * @param {Object} [options={}] - Additional options to customize the transformation.\n * @param {string} [options.from=Style.SNAKE_CASE] - The style of the keys to transform from.\n * @param {string} [options.to=Style.CAMEL_CASE] - The style of the keys to transform to.\n * @param {Array<string>} [options.exclude=[]] - The paths to exclude from transformation.\n * @returns {Object} The transformed object with camelCase keys.\n *\n * @example\n * const { snakeCaseToCamelCase } = require('@nullplatform/json-keys-transform');\n *\n * const snakeCaseObject = { first_name: 'John', last_name: 'Doe' };\n * const camelCaseObject = snakeCaseToCamelCase(snakeCaseObject);\n * console.log(camelCaseObject); // { firstName: 'John', lastName: 'Doe' }\n *\n * // Example with exclusion\n * const snakeCaseObjectWithNested = { user_info: { first_name: 'John', last_name: 'Doe' } };\n * const camelCaseObjectWithExclusion = snakeCaseToCamelCase(snakeCaseObjectWithNested, { exclude: ['user_info.first_name'] });\n * console.log(camelCaseObjectWithExclusion); // { userInfo: { first_name: 'John', lastName: 'Doe' } }\n */\nconst snakeCaseToCamelCase = (object, options = {}) => {\n  const defaultOptions = { from: Style.SNAKE_CASE, to: Style.CAMEL_CASE };\n  return process(object, { ...defaultOptions, ...options });\n};\n\n/**\n * Converts the keys of an object from camelCase to snake_case.\n *\n * This function transforms the keys of the provided object from camelCase to snake_case.\n * It uses the `process` function from the 'transform.js' module with predefined styles.\n * Additional options can be provided to override the default behavior.\n *\n * @param {Object} object - The object to be transformed.\n * @param {Object} [options={}] - Additional options to customize the transformation.\n * @param {string} [options.from=Style.CAMEL_CASE] - The style of the keys to transform from.\n * @param {string} [options.to=Style.SNAKE_CASE] - The style of the keys to transform to.\n * @param {Array<string>} [options.exclude=[]] - The paths to exclude from transformation.\n * @returns {Object} The transformed object with snake_case keys.\n *\n * @example\n * const { camelCaseToSnakeCase } = require('@nullplatform/json-keys-transform');\n *\n * const camelCaseObject = { firstName: 'John', lastName: 'Doe' };\n * const snakeCaseObject = camelCaseToSnakeCase(camelCaseObject);\n * console.log(snakeCaseObject); // { first_name: 'John', last_name: 'Doe' }\n *\n * // Example with exclusion\n * const camelCaseObjectWithNested = { userInfo: { firstName: 'John', lastName: 'Doe' } };\n * const snakeCaseObjectWithExclusion = camelCaseToSnakeCase(camelCaseObjectWithNested, { exclude: ['userInfo.firstName'] });\n * console.log(snakeCaseObjectWithExclusion); // { user_info: { firstName: 'John', last_name: 'Doe' } }\n */\nconst camelCaseToSnakeCase = (object, options = {}) => {\n  const defaultOptions = { from: Style.CAMEL_CASE, to: Style.SNAKE_CASE };\n  return process(object, { ...defaultOptions, ...options });\n};\n\nmodule.exports = {\n  /**\n   * Processes an object to transform its keys according to specified styles.\n   *\n   * @function\n   * @param {Object} object - The object to be transformed.\n   * @param {Object} options - Options to customize the transformation.\n   * @param {Array<string>} [options.exclude=[]] - The paths to exclude from transformation.\n   * @returns {Object} The transformed object.\n   */\n  transform: process,\n  /**\n   * Converts the keys of an object from snake_case to camelCase.\n   * @function\n   * @param {Object} object - The object to be transformed.\n   * @param {Object} [options={}] - Additional options to customize the transformation.\n   * @param {Array<string>} [options.exclude=[]] - The paths to exclude from transformation.\n   * @returns {Object} The transformed object with camelCase keys.\n   */\n  snakeCaseToCamelCase,\n  /**\n   * Converts the keys of an object from camelCase to snake_case.\n   * @function\n   * @param {Object} object - The object to be transformed.\n   * @param {Object} [options={}] - Additional options to customize the transformation.\n   * @param {Array<string>} [options.exclude=[]] - The paths to exclude from transformation.\n   * @returns {Object} The transformed object with snake_case keys.\n   */\n  camelCaseToSnakeCase,\n  /**\n   * Enum for specifying key styles.\n   * @enum {Object}\n   */\n  Style,\n};\n","/**\n * The SDK speaks camelCase; the API's wire is snake_case. The rename is\n * `@nullplatform/json-keys-transform`, the transform the API applies to its\n * requests and responses, so the SDK undoes exactly what the API does. What the caller owns (a payload, a source's attributes, mapped\n * data) is never renamed: each call excludes the paths its API route excludes,\n * as `exclude` path patterns (`data[*].payload`, `results[*].attributes`).\n * The library is bundled into the SDK, which keeps zero runtime dependencies.\n */\nimport {\n  Style,\n  camelCaseToSnakeCase,\n  snakeCaseToCamelCase,\n} from '@nullplatform/json-keys-transform';\n\n/** The paths of a call's caller-owned content, left as they are. */\nexport interface WireExclude {\n  /** In the request body, as the SDK holds it (camelCase): `['data[*].payload']`. */\n  request?: readonly string[];\n  /** In the response body, as the API sends it (snake_case): `['results[*].data']`. */\n  response?: readonly string[];\n}\n\n/** A request body as the API reads it. */\nexport const toWire = (body: unknown, exclude: readonly string[] = []): unknown =>\n  camelCaseToSnakeCase(body, { exclude });\n\n/** A response as the SDK answers it. */\nexport const fromWire = <Value>(body: unknown, exclude: readonly string[] = []): Value =>\n  snakeCaseToCamelCase<Value>(body, { exclude });\n\n/** A query key as the API reads it. */\nexport const wireKey = (key: string): string => Style.SNAKE_CASE.resolver(key);\n\n/** A `sort` value (`createdAt:desc,slug`) with its field names as the API reads them. */\nexport const wireSort = (sort: string): string =>\n  sort\n    .split(',')\n    .map((part) => {\n      const [field, order] = part.split(':');\n      return [wireKey(field.trim()), order].filter(Boolean).join(':');\n    })\n    .join(',');\n","/**\n * How the SDK turns what a caller hands it into the inputs the API accepts.\n * Every input carries a UUIDv7 `id` (the API requires it: it is the input's\n * idempotency key) and an `observedAt` (the API orders by it). The wire\n * objects are built from the known fields only, because the API rejects a\n * body with an undeclared property.\n */\nimport type { InputCreate, InputSpec } from './types.js';\nimport { isUuidV7, uuidv7 } from './uuid.js';\n\n/** An input ready to send: id and observation time filled in. */\nexport type PreparedInput = InputCreate & { observedAt: string };\n\n/** Fill in a missing `id` and `observedAt`; refuse an `id` that is not a UUIDv7. */\nexport function prepareInput(spec: InputSpec): PreparedInput {\n  if (spec.id !== undefined && !isUuidV7(spec.id)) {\n    throw new TypeError(\n      `input id ${JSON.stringify(spec.id)} is not a UUIDv7: the API requires a UUIDv7 per input ` +\n        '(omit id to have one generated, or create it with uuidv7())',\n    );\n  }\n  return {\n    id: spec.id ?? uuidv7(),\n    ...(spec.runId !== undefined ? { runId: spec.runId } : {}),\n    type: spec.type,\n    ...(spec.op !== undefined ? { op: spec.op } : {}),\n    observedAt: spec.observedAt ?? new Date().toISOString(),\n    payload: spec.payload,\n  };\n}\n\n/**\n * An input as `POST /sources/{sourceId}/inputs` takes it under `data`: built\n * from the known fields only.\n */\nexport function inputOf(spec: InputSpec): PreparedInput {\n  const { id, runId, type, op, observedAt, payload } = prepareInput(spec);\n  return {\n    id,\n    ...(runId !== undefined ? { runId } : {}),\n    type,\n    ...(op !== undefined ? { op } : {}),\n    observedAt,\n    payload,\n  };\n}\n","/**\n * Buffers inputs and ships them in batches bounded by count and by encoded\n * size, so a collector can `add()` records as it enumerates them and never\n * think about the API's limits. Every input gets a UUIDv7 id (idempotency;\n * a given id is validated) and an `observedAt` (ordering) before it is\n * buffered, so a retried batch is harmless and a late batch cannot reorder\n * changes.\n *\n * A batch that fails for good (refused, or still failing after the\n * transport's retries) stops the batcher: every later `add`, `flush` and\n * `close` throws that failure. For a snapshot this is the safety: a run that\n * lost a batch can never be finalized, so it can never delete what the lost\n * batch carried.\n */\nimport { toWire } from './wire.js';\nimport { prepareInput, type PreparedInput } from './inputs.js';\nimport type { Accepted, InputSpec } from './types.js';\n\n/** How inputs are batched (`IngestClientOptions.batching`, or a batcher's own). */\nexport interface BatcherOptions {\n  /** Inputs per request (the API accepts up to 500). */\n  maxBatch: number;\n  /** Encoded bytes per request (the API accepts up to 8 MiB). */\n  maxBytes: number;\n  /** Flush automatically this often; 0 disables the timer. */\n  flushIntervalMs: number;\n  /** Concurrent requests while flushing. */\n  concurrency: number;\n}\n\n/** A batcher's counts so far. */\nexport interface BatcherStats {\n  /** Inputs waiting to be sent. */\n  buffered: number;\n  /** Inputs sent. */\n  sent: number;\n  /** Inputs the API accepted (new). */\n  accepted: number;\n  /** Inputs the API had already (an id sent before): not applied twice. */\n  duplicates: number;\n}\n\nconst encoder = new TextEncoder();\n/** An input's size as the API receives it (its wire form, its payload as it is), plus its separator. */\nconst sizeOf = (input: PreparedInput) =>\n  encoder.encode(JSON.stringify(toWire(input, ['payload']))).length + 1;\n\n/** The request around a batch (`{\"data\":[…]}`): counted against `maxBytes` too. */\nconst ENVELOPE_BYTES = encoder.encode('{\"data\":[]}').length;\n\n/** The most inputs the API takes in one request. */\nconst MAX_BATCH = 500;\n\n/**\n * Refuses batching options a batcher cannot honour: no worker (`concurrency`\n * below 1) would send nothing and still resolve, so a run would finalize as if\n * its records had been delivered.\n * @throws {RangeError} For an option out of range.\n */\nexport function checkBatching(options: BatcherOptions): void {\n  const { maxBatch, maxBytes, flushIntervalMs, concurrency } = options;\n  if (!Number.isInteger(maxBatch) || maxBatch < 1 || maxBatch > MAX_BATCH) {\n    throw new RangeError(`batching.maxBatch must be an integer in 1–${MAX_BATCH}, got ${maxBatch}`);\n  }\n  if (!Number.isInteger(maxBytes) || maxBytes <= ENVELOPE_BYTES) {\n    throw new RangeError(\n      `batching.maxBytes must be an integer above ${ENVELOPE_BYTES}, got ${maxBytes}`,\n    );\n  }\n  if (!Number.isFinite(flushIntervalMs) || flushIntervalMs < 0) {\n    throw new RangeError(`batching.flushIntervalMs must be 0 or more, got ${flushIntervalMs}`);\n  }\n  if (!Number.isInteger(concurrency) || concurrency < 1) {\n    throw new RangeError(\n      `batching.concurrency must be an integer of 1 or more, got ${concurrency}`,\n    );\n  }\n}\n\n/** The batching behind run handles and event batchers (see the module comment). */\nexport class Batcher {\n  readonly #options: BatcherOptions;\n\n  readonly #send: (batch: PreparedInput[]) => Promise<Accepted>;\n\n  /** What the sender adds to every input (a run handle's `runId`): sized with it. */\n  readonly #stamp: Partial<InputSpec>;\n\n  /** The bytes a batch's inputs may take: `maxBytes` less the request around them. */\n  readonly #maxInputBytes: number;\n\n  #buffer: { input: PreparedInput; bytes: number }[] = [];\n\n  #bufferedBytes = 0;\n\n  #timer: ReturnType<typeof setTimeout> | null = null;\n\n  #inFlight: Promise<void> | null = null;\n\n  #closed = false;\n\n  #failure: unknown = null;\n\n  /** What it buffered, sent and had accepted so far. */\n  readonly stats: BatcherStats = { buffered: 0, sent: 0, accepted: 0, duplicates: 0 };\n\n  /**\n   * @param options Batch bounds, timer and concurrency.\n   * @param send Sends one batch (the inputs are prepared: id and observation time set).\n   * @param stamp What `send` adds to every input, counted in its size.\n   * @throws {RangeError} For batching options out of range (see `checkBatching`).\n   */\n  constructor(\n    options: BatcherOptions,\n    send: (batch: PreparedInput[]) => Promise<Accepted>,\n    stamp: Partial<InputSpec> = {},\n  ) {\n    checkBatching(options);\n    this.#options = options;\n    this.#send = send;\n    this.#stamp = stamp;\n    this.#maxInputBytes = options.maxBytes - ENVELOPE_BYTES;\n  }\n\n  /** The failure that stopped this batcher, if one did. */\n  get failure(): unknown {\n    return this.#failure;\n  }\n\n  /** Buffer one input; returns its id. Flushes when a limit is reached. */\n  add(input: InputSpec): string {\n    if (this.#failure) {\n      throw this.#failure;\n    }\n    if (this.#closed) {\n      throw new Error('this batcher is closed');\n    }\n    const prepared = prepareInput({ ...input, ...this.#stamp });\n    const bytes = sizeOf(prepared);\n    if (bytes > this.#maxInputBytes) {\n      throw new RangeError(\n        `input ${prepared.id} (${prepared.type}) encodes to ${bytes} bytes, above the ${this.#options.maxBytes}-byte batch limit`,\n      );\n    }\n    if (this.#buffer.length > 0 && this.#bufferedBytes + bytes > this.#maxInputBytes) {\n      this.#flushInBackground();\n    }\n    this.#buffer.push({ input: prepared, bytes });\n    this.#bufferedBytes += bytes;\n    this.stats.buffered = this.#buffer.length;\n    if (this.#buffer.length >= this.#options.maxBatch) {\n      this.#flushInBackground();\n    } else {\n      this.#arm();\n    }\n    return prepared.id;\n  }\n\n  /** Send everything buffered so far; resolves when it has been accepted. */\n  async flush(): Promise<void> {\n    if (this.#timer) {\n      clearTimeout(this.#timer);\n      this.#timer = null;\n    }\n    const batches = this.#drain();\n    const ship = async () => {\n      if (this.#failure || batches.length === 0) {\n        return;\n      }\n      try {\n        await this.#ship(batches);\n      } catch (error) {\n        this.#failure ??= error;\n      }\n    };\n    const current = (this.#inFlight ?? Promise.resolve()).then(ship);\n    this.#inFlight = current;\n    await current;\n    if (this.#inFlight === current) {\n      this.#inFlight = null;\n    }\n    if (this.#failure) {\n      throw this.#failure;\n    }\n  }\n\n  /** Flush and refuse further inputs. */\n  async close(): Promise<void> {\n    this.#closed = true;\n    await this.flush();\n  }\n\n  /** The failure is kept and surfaces on the next add, flush or close. */\n  #flushInBackground(): void {\n    this.flush().catch(() => undefined);\n  }\n\n  #arm(): void {\n    if (this.#options.flushIntervalMs > 0 && !this.#timer) {\n      this.#timer = setTimeout(() => {\n        this.#timer = null;\n        this.#flushInBackground();\n      }, this.#options.flushIntervalMs);\n      if (typeof this.#timer === 'object' && 'unref' in this.#timer) {\n        this.#timer.unref();\n      }\n    }\n  }\n\n  #drain(): PreparedInput[][] {\n    const batches: PreparedInput[][] = [];\n    let current: PreparedInput[] = [];\n    let bytes = 0;\n    this.#buffer.forEach((entry) => {\n      if (\n        current.length >= this.#options.maxBatch ||\n        (current.length > 0 && bytes + entry.bytes > this.#maxInputBytes)\n      ) {\n        batches.push(current);\n        current = [];\n        bytes = 0;\n      }\n      current.push(entry.input);\n      bytes += entry.bytes;\n    });\n    if (current.length) {\n      batches.push(current);\n    }\n    this.#buffer = [];\n    this.#bufferedBytes = 0;\n    this.stats.buffered = 0;\n    return batches;\n  }\n\n  async #ship(batches: PreparedInput[][]): Promise<void> {\n    const queue = [...batches];\n    let failed = false;\n    const worker = async (): Promise<void> => {\n      const batch = failed ? undefined : queue.shift();\n      if (!batch) {\n        return;\n      }\n      try {\n        const accepted = await this.#send(batch);\n        this.stats.sent += batch.length;\n        this.stats.accepted += accepted.accepted;\n        this.stats.duplicates += accepted.duplicates;\n      } catch (error) {\n        failed = true;\n        throw error;\n      }\n      await worker();\n    };\n    await Promise.all(\n      Array.from({ length: Math.min(this.#options.concurrency, queue.length) }, worker),\n    );\n  }\n}\n","/**\n * Buffers delta events (webhooks, watches, CDC) for one source and ships them\n * in batches as they come. Events never infer deletions: a delete is explicit.\n */\nimport { EventOp } from './enums.js';\nimport { Batcher, type BatcherOptions, type BatcherStats } from './batcher.js';\nimport type { Accepted, EventSpec, InputSpec } from './types.js';\n\n/** An event's options: when it was observed, and its input id. */\nexport type EventOptions = Pick<InputSpec, 'id' | 'observedAt'>;\n\n/**\n * Events of one source, from `IngestClient.events.batcher`: buffered and sent\n * in batches by count, bytes and time. `close` it on shutdown.\n */\nexport class EventBatcher {\n  readonly #batcher: Batcher;\n\n  /** Made by `IngestClient.events.batcher`; not meant to be built by hand. */\n  constructor(send: (events: EventSpec[]) => Promise<Accepted>, batching: BatcherOptions) {\n    this.#batcher = new Batcher(batching, send);\n  }\n\n  /** What the batcher buffered, sent and had accepted so far. */\n  get stats(): BatcherStats {\n    return this.#batcher.stats;\n  }\n\n  /**\n   * Buffer an upsert of an entity's state.\n   * @param options `observedAt` (when the state was observed; now by default) and `id` (a UUIDv7).\n   * @returns Its input id.\n   * @throws {TypeError} For an id that is not a UUIDv7.\n   */\n  upsert(type: string, payload: unknown, options: EventOptions = {}): string {\n    return this.#batcher.add({ ...options, type, op: EventOp.UPSERT, payload });\n  }\n\n  /**\n   * Buffer a delete: the entity the payload maps to is deleted (only one this source owns).\n   * @param options `observedAt` (when it was deleted; now by default) and `id` (a UUIDv7).\n   * @returns Its input id.\n   * @throws {TypeError} For an id that is not a UUIDv7.\n   */\n  delete(type: string, payload: unknown, options: EventOptions = {}): string {\n    return this.#batcher.add({ ...options, type, op: EventOp.DELETE, payload });\n  }\n\n  /** Send what is buffered now (events are otherwise sent about every second). */\n  flush(): Promise<void> {\n    return this.#batcher.flush();\n  }\n\n  /** Send what is buffered and refuse further events. Call it on shutdown. */\n  close(): Promise<void> {\n    return this.#batcher.close();\n  }\n}\n","/**\n * The error codes the API answers with (`IngestError.code`), by status:\n * 400 VALIDATION (including an undeclared body property), 401 AUTHENTICATION,\n * 403 AUTHORIZATION, 404 NOT_FOUND, 409 CONFLICT, 429 TOO_MANY_REQUESTS\n * (with Retry-After), 502 TARGET_REJECTED (a target refused what the API\n * asked it on the call's behalf) and 503 SERVICE_UNAVAILABLE.\n */\nexport enum IngestErrorCode {\n  VALIDATION = 'FST_ERR_VALIDATION',\n  AUTHENTICATION = 'FST_ERR_AUTHENTICATION',\n  AUTHORIZATION = 'FST_ERR_AUTHORIZATION',\n  NOT_FOUND = 'FST_ERR_NOT_FOUND',\n  CONFLICT = 'FST_ERR_CONFLICT',\n  TOO_MANY_REQUESTS = 'FST_ERR_TOO_MANY_REQUESTS',\n  TARGET_REJECTED = 'FST_ERR_TARGET_REJECTED',\n  SERVICE_UNAVAILABLE = 'FST_ERR_SERVICE_UNAVAILABLE',\n}\n\n/**\n * A request the API refused, or could not be reached for. Thrown by every\n * client call, and kept by a batcher whose batch failed for good.\n */\nexport class IngestError extends Error {\n  /** HTTP status; 0 when the API could not be reached. */\n  readonly status: number;\n\n  /** The API's error code (see `IngestErrorCode`), when the response carried one. */\n  readonly code: IngestErrorCode | string | undefined;\n\n  /** The response body, parsed when it was JSON. */\n  readonly body: unknown;\n\n  /**\n   * @param status HTTP status; 0 when the API could not be reached.\n   * @param message The API's message, or why it could not be reached.\n   * @param code The API's error code.\n   * @param body The response body.\n   */\n  constructor(status: number, message: string, code?: string, body?: unknown) {\n    super(message);\n    this.name = 'IngestError';\n    this.status = status;\n    this.code = code;\n    this.body = body;\n  }\n\n  /**\n   * True for the failures the SDK retries on its own: unreachable (0), 429 and\n   * 5xx (503 included). When one reaches you, the retries (or the backpressure\n   * budget) ran out. Every other 4xx — 403 included — is deterministic.\n   */\n  get retryable(): boolean {\n    return this.status === 0 || this.status === 429 || this.status >= 500;\n  }\n}\n","/** A read that must find what it reads: a wait cannot wait on what is not there. */\nimport { IngestError, IngestErrorCode } from './ingest-error.js';\n\n/**\n * What a read answered; a 404 when it answered none (`get` answers `null`\n * for a resource that does not exist).\n * @throws {IngestError} 404 when the resource does not exist.\n */\nexport async function mustExist<Result>(\n  read: Promise<Result | null>,\n  what: string,\n): Promise<Result> {\n  const found = await read;\n  if (found === null) {\n    throw new IngestError(404, `${what} does not exist`, IngestErrorCode.NOT_FOUND);\n  }\n  return found;\n}\n","/**\n * Small HTTP helpers shared by the transport and the wait helpers. Internal —\n * not part of the package's public surface.\n */\n\n/** Retry-After as milliseconds (delta-seconds or an HTTP date); null when absent or unreadable. */\nexport function retryAfterMs(header: string | null, now = Date.now()): number | null {\n  if (!header) {\n    return null;\n  }\n  const seconds = Number(header);\n  if (Number.isFinite(seconds)) {\n    return Math.max(0, seconds * 1000);\n  }\n  const at = Date.parse(header);\n  return Number.isNaN(at) ? null : Math.max(0, at - now);\n}\n\nexport const sleep = (ms: number): Promise<void> =>\n  new Promise<void>((resolve) => {\n    setTimeout(resolve, ms);\n  });\n\n/** Parse JSON, returning the raw text unchanged when it isn't valid JSON (and null when empty). */\nexport const safeJson = (text: string): unknown => {\n  if (!text) {\n    return null;\n  }\n  try {\n    return JSON.parse(text);\n  } catch {\n    return text;\n  }\n};\n","/** A wait helper gave up before the API reached the awaited state. */\nexport class TimeoutError extends Error {\n  constructor(message: string) {\n    super(message);\n    this.name = 'TimeoutError';\n  }\n}\n","/**\n * Polling for the wait helpers: the API applies inputs asynchronously, so a\n * collector that needs the outcome reads until the awaited state is reached.\n */\nimport { sleep } from './http.js';\nimport { TimeoutError } from './timeout-error.js';\n\n/** How a wait helper polls. */\nexport interface WaitOptions {\n  /** Poll interval. Default 500 ms. */\n  intervalMs?: number;\n  /** Give up (with a `TimeoutError`) after this long. Default 10 minutes. */\n  timeoutMs?: number;\n}\n\nexport async function poll<Value>(\n  read: () => Promise<Value>,\n  done: (value: Value) => boolean,\n  what: string,\n  options: WaitOptions,\n): Promise<Value> {\n  const deadline = Date.now() + (options.timeoutMs ?? 10 * 60 * 1000);\n  const interval = options.intervalMs ?? 500;\n  const step = async (): Promise<Value> => {\n    const value = await read();\n    if (done(value)) {\n      return value;\n    }\n    if (Date.now() > deadline) {\n      throw new TimeoutError(`timed out waiting for ${what}`);\n    }\n    await sleep(interval);\n    return step();\n  };\n  return step();\n}\n","/**\n * A snapshot run in progress: `add()` the records of the snapshot as you\n * enumerate them, then `finalize()`. The handle batches the records and keeps\n * a lost batch sticky (see `Batcher`), so a run that lost records can never be\n * finalized into deleting what they carried.\n */\nimport { Batcher, type BatcherOptions, type BatcherStats } from './batcher.js';\nimport { mustExist } from './must-exist.js';\nimport type { WaitOptions } from './poll.js';\nimport type { Accepted, FinalizeOptions, InputSpec, Run } from './types.js';\n\n/** The run calls a handle drives (`IngestClient.runs` provides them). */\nexport interface RunOperations {\n  /** Read a run by id (`null` when there is none). */\n  get(runId: string): Promise<Run | null>;\n  /** Send one batch of records to an open run. */\n  sendRecords(sourceId: string, runId: string, records: InputSpec[]): Promise<Accepted>;\n  /** Finalize a run (or, with `dryRun`, assess it). */\n  finalize(runId: string, options?: FinalizeOptions): Promise<Run>;\n  /** Abort a run: nothing is deleted. */\n  abort(runId: string): Promise<Run>;\n  /** Wait until every input of the run is applied. */\n  waitApplied(runId: string, options?: WaitOptions): Promise<Run>;\n  /** Wait until the run is closed. */\n  waitClosed(runId: string, options?: WaitOptions): Promise<Run>;\n  /** Wait until a dry-run finalize is assessed. */\n  waitDryRun(runId: string, options?: WaitOptions): Promise<Run>;\n}\n\n/**\n * A run in progress, from `IngestClient.runs.open`. `add` every record of the\n * listing, then `finalize`; on any failure `abort` (it deletes nothing).\n *\n * @example\n * const run = await ingest.runs.open(source.id, { onConflict: OnConflict.ABORT });\n * try {\n *   items.forEach((item) => run.add({ type: 'deployment', observedAt, payload: item }));\n *   const done = await run.finalize();\n * } catch (error) {\n *   await run.abort();\n *   throw error;\n * }\n */\nexport class RunHandle {\n  readonly #runs: RunOperations;\n\n  readonly #batcher: Batcher;\n\n  #run: Run;\n\n  /** Made by `IngestClient.runs.open`; not meant to be built by hand. */\n  constructor(runs: RunOperations, run: Run, batching: BatcherOptions) {\n    this.#runs = runs;\n    this.#run = run;\n    this.#batcher = new Batcher(\n      batching,\n      (batch) => runs.sendRecords(run.sourceId, run.id, batch),\n      // `sendRecords` names the run on every record: sized with it.\n      { runId: run.id },\n    );\n  }\n\n  /** The run's id. */\n  get id(): string {\n    return this.#run.id;\n  }\n\n  /** The id of the source the run belongs to. */\n  get sourceId(): string {\n    return this.#run.sourceId;\n  }\n\n  /** The run as last read from the API. */\n  get run(): Run {\n    return this.#run;\n  }\n\n  /** What the handle buffered, sent and had accepted so far. */\n  get stats(): BatcherStats {\n    return this.#batcher.stats;\n  }\n\n  /**\n   * Buffer one record of the listing; it is sent in a batch.\n   * @returns Its input id: the given UUIDv7, or a generated one.\n   * @throws {TypeError} For an id that is not a UUIDv7.\n   * @throws {IngestError} The failure of an earlier batch: the run can no longer be finalized.\n   */\n  add(record: Omit<InputSpec, 'op'>): string {\n    return this.#batcher.add(record);\n  }\n\n  /**\n   * Send what is buffered now (records are otherwise sent as batches fill).\n   * @throws {IngestError} When a batch fails for good; the run can no longer be finalized.\n   */\n  flush(): Promise<void> {\n    return this.#batcher.flush();\n  }\n\n  /** Read the run again from the API; {@link RunHandle.run} answers it after. */\n  async refresh(): Promise<Run> {\n    this.#run = await mustExist(this.#runs.get(this.id), `run '${this.id}'`);\n    return this.#run;\n  }\n\n  /**\n   * Send what is buffered and wait until every record of the run is applied.\n   * @throws {TimeoutError} When it is not within `options.timeoutMs`.\n   */\n  async waitApplied(options: WaitOptions = {}): Promise<Run> {\n    await this.flush();\n    this.#run = await this.#runs.waitApplied(this.id, options);\n    return this.#run;\n  }\n\n  /**\n   * Send what is buffered, finalize, and wait until the run is closed (or,\n   * for a dry run, assessed: it stays open).\n   * @param options Guard overrides for this run, and `dryRun`.\n   * @param wait How long to wait for it.\n   * @returns The run: `status` is `RunStatus.COMPLETED` or `RunStatus.GUARD_TRIPPED`\n   *   (nothing deleted), and `reconciliation` says what was seen, stale and deleted.\n   * @throws {IngestError} When a batch failed: the run cannot be finalized; abort it.\n   */\n  async finalize(options: FinalizeOptions = {}, wait: WaitOptions = {}): Promise<Run> {\n    // A dry run leaves the run open: records may still be added after it.\n    await (options.dryRun ? this.#batcher.flush() : this.#batcher.close());\n    await this.#runs.finalize(this.id, options);\n    this.#run = options.dryRun\n      ? await this.#runs.waitDryRun(this.id, wait)\n      : await this.#runs.waitClosed(this.id, wait);\n    return this.#run;\n  }\n\n  /** Close the run without reconciling: nothing is deleted. Call it on any failure. */\n  async abort(): Promise<Run> {\n    await this.#batcher.close().catch(() => undefined);\n    this.#run = await this.#runs.abort(this.id);\n    return this.#run;\n  }\n}\n","/**\n * A nullplatform API key exchanged for a token (`POST {authBaseURL}/token`),\n * cached, and refreshed with the refresh token shortly before it expires.\n * Concurrent callers share one exchange.\n */\nimport { IngestError } from '../ingest-error.js';\nimport type { TokenProvider } from './token-provider.js';\n\ninterface TokenResponse {\n  access_token: string;\n  token_expires_at?: number;\n  expires_in?: number;\n  refresh_token?: string;\n  organization_id?: number;\n  account_id?: number;\n}\n\n/** How an API key is exchanged. */\nexport interface ApiKeyTokenOptions {\n  /** The nullplatform API key. */\n  apiKey: string;\n  /** Where it is exchanged (`POST {authBaseURL}/token`). */\n  authBaseURL: string;\n  /** The `fetch` to use. */\n  fetchImpl: typeof fetch;\n  /** Timeout of one exchange. */\n  timeoutMs: number;\n  /** Refresh this long before the token expires. Default 60 s. */\n  expiryBufferMs?: number;\n}\n\n/** Lifetime assumed when the token response states none. */\nconst DEFAULT_LIFETIME_MS = 15 * 60 * 1000;\n\n/** A token from a nullplatform API key: exchanged, cached and refreshed before it expires. */\nexport class ApiKeyToken implements TokenProvider {\n  readonly #options: Required<ApiKeyTokenOptions>;\n\n  #token: TokenResponse | null = null;\n\n  #expiresAt = 0;\n\n  #inFlight: Promise<string> | null = null;\n\n  /** @param options The API key, where it is exchanged, and how. */\n  constructor(options: ApiKeyTokenOptions) {\n    this.#options = { expiryBufferMs: 60_000, ...options };\n  }\n\n  /**\n   * The current token: the cached one while it is fresh, otherwise a new one\n   * (refreshed, or exchanged from the key again when the refresh is refused).\n   * @throws {IngestError} When the exchange fails.\n   */\n  async get(): Promise<string> {\n    if (this.#token && Date.now() < this.#expiresAt - this.#options.expiryBufferMs) {\n      return this.#token.access_token;\n    }\n    if (!this.#inFlight) {\n      this.#inFlight = this.#exchange().finally(() => {\n        this.#inFlight = null;\n      });\n    }\n    return this.#inFlight;\n  }\n\n  /** Drop the cached token (after a 401): the next `get` exchanges the key again. */\n  invalidate(): void {\n    this.#token = null;\n    this.#expiresAt = 0;\n  }\n\n  async #exchange(): Promise<string> {\n    const refresh = this.#token?.refresh_token;\n    const body = refresh\n      ? {\n          refresh_token: refresh,\n          organization_id: this.#token?.organization_id,\n          account_id: this.#token?.account_id,\n        }\n      : { apikey: this.#options.apiKey };\n    let response: Response;\n    try {\n      response = await this.#options.fetchImpl(\n        `${this.#options.authBaseURL.replace(/\\/+$/, '')}/token`,\n        {\n          method: 'POST',\n          headers: { 'content-type': 'application/json', accept: 'application/json' },\n          body: JSON.stringify(body),\n          signal: AbortSignal.timeout(this.#options.timeoutMs),\n        },\n      );\n    } catch (error) {\n      // Unreachable: retryable (status 0), as any request is.\n      throw new IngestError(\n        0,\n        `token exchange failed: ${error instanceof Error ? error.message : String(error)}`,\n      );\n    }\n    if (!response.ok) {\n      if (refresh) {\n        // A dead refresh token: start over from the API key.\n        this.#token = null;\n        return this.#exchange();\n      }\n      // The answer's body is left out: it may echo what was sent.\n      throw new IngestError(response.status, `token exchange failed: ${response.status}`);\n    }\n    let token: TokenResponse;\n    try {\n      token = (await response.json()) as TokenResponse;\n    } catch (error) {\n      throw new IngestError(\n        0,\n        `token exchange failed: ${error instanceof Error ? error.message : String(error)}`,\n      );\n    }\n    this.#token = token;\n    if (typeof token.token_expires_at === 'number') {\n      // Unix milliseconds; seconds are accepted too.\n      this.#expiresAt =\n        token.token_expires_at < 1e12 ? token.token_expires_at * 1000 : token.token_expires_at;\n    } else if (typeof token.expires_in === 'number') {\n      this.#expiresAt = Date.now() + token.expires_in * 1000;\n    } else {\n      this.#expiresAt = Date.now() + DEFAULT_LIFETIME_MS;\n    }\n    return token.access_token;\n  }\n}\n","/**\n * Where the client gets its bearer token. A collector normally holds a\n * nullplatform API key (`ApiKeyToken`); a caller that already has a token, or\n * its own way of getting one, uses `StaticToken` or `CallbackToken`.\n */\nexport interface TokenProvider {\n  /** A bearer token (without the `Bearer ` prefix). */\n  get(): Promise<string>;\n  /** Forget the cached token after a 401. */\n  invalidate(): void;\n  /**\n   * Whether a 401 is worth a second try with a new token; `false` for a token\n   * that cannot change (a 401 then reaches the caller at once). Default true.\n   */\n  readonly refreshable?: boolean;\n}\n\n/** Strip an optional `Bearer ` prefix. */\nexport const bareToken = (token: string): string => token.replace(/^Bearer\\s+/i, '');\n","import { bareToken, type TokenProvider } from './token-provider.js';\n\n/** Your own way to get a token: called once, then again after a 401. */\nexport class CallbackToken implements TokenProvider {\n  readonly #getToken: () => Promise<string> | string;\n\n  #cached: string | null = null;\n\n  /** @param getToken Answers a bearer token, with or without `Bearer `. */\n  constructor(getToken: () => Promise<string> | string) {\n    this.#getToken = getToken;\n  }\n\n  /** The token `getToken` answered, cached until invalidated. */\n  async get(): Promise<string> {\n    if (this.#cached === null) {\n      this.#cached = bareToken(await this.#getToken());\n    }\n    return this.#cached;\n  }\n\n  /** Drop the cached token (after a 401): the next `get` calls `getToken` again. */\n  invalidate(): void {\n    this.#cached = null;\n  }\n}\n","import { bareToken, type TokenProvider } from './token-provider.js';\n\n/** A ready token. Nothing to refresh: a 401 surfaces to the caller. */\nexport class StaticToken implements TokenProvider {\n  readonly #token: string;\n\n  /** A static token never changes: a 401 is not tried again. */\n  readonly refreshable = false;\n\n  /** @param token A bearer token, with or without `Bearer `. */\n  constructor(token: string) {\n    this.#token = bareToken(token);\n  }\n\n  /** The token as given (without `Bearer `). */\n  async get(): Promise<string> {\n    return this.#token;\n  }\n\n  /** Nothing to do: a static token cannot be refreshed. */\n  invalidate(): void {\n    // Nothing to refresh.\n  }\n}\n","/**\n * What a list holds, read whole: every page of it, and a filter of several\n * values split into the requests the API takes (at most `MAX_FILTER_VALUES`\n * each), so a caller queries the keys it holds instead of reading every item\n * and filtering.\n */\nimport type { Page } from './types.js';\n\n/** The page size the idempotent calls read with: the API's largest. */\nexport const EVERY_PAGE_LIMIT = 1000;\n\n/** How many values one filter takes in one request (`recordType: ['pod', 'node']`): the API's most. */\nexport const MAX_FILTER_VALUES = 100;\n\n/** A page's place: where the read starts and how much it takes. */\nexport interface PagePlace {\n  limit: number;\n  offset: number;\n}\n\n/**\n * Every item of a list, read a page at a time until a page comes back short:\n * an upsert that saw only the first page would create a duplicate of what is\n * on the next.\n */\nexport async function everyPage<Item>(\n  read: (page: PagePlace) => Promise<Page<Item>>,\n  offset = 0,\n): Promise<Item[]> {\n  const { results } = await read({ limit: EVERY_PAGE_LIMIT, offset });\n  return results.length < EVERY_PAGE_LIMIT\n    ? results\n    : [...results, ...(await everyPage(read, offset + EVERY_PAGE_LIMIT))];\n}\n\n/**\n * Every item of a list filtered by any of `values`, each once: every page of\n * one request per `MAX_FILTER_VALUES` of them, read together. No values, no\n * request: a filter of none matches nothing.\n */\nexport async function everyPageFor<Item>(\n  values: string[],\n  read: (values: string[], page: PagePlace) => Promise<Page<Item>>,\n): Promise<Item[]> {\n  const distinct = [...new Set(values)];\n  const parts = Array.from({ length: Math.ceil(distinct.length / MAX_FILTER_VALUES) }, (_, index) =>\n    distinct.slice(index * MAX_FILTER_VALUES, (index + 1) * MAX_FILTER_VALUES),\n  );\n  const pages = await Promise.all(parts.map((part) => everyPage((page) => read(part, page))));\n  return pages.flat();\n}\n","/**\n * HTTP transport: JSON in and out, a bearer from the token provider, retries\n * with full-jitter backoff on 5xx and network errors (a POST only when it is\n * idempotent: a retried create could create twice), one token refresh on 401\n * when the provider can refresh, and backpressure on 429 (wait as Retry-After\n * says, without spending a retry). Any other 4xx is never retried. Getting\n * the token is retried like the request. Internal — `IngestClient` is the\n * public surface.\n */\nimport { fromWire, toWire, wireKey, wireSort, type WireExclude } from './wire.js';\nimport { IngestError } from './ingest-error.js';\nimport { retryAfterMs, safeJson, sleep } from './http.js';\nimport type { TokenProvider } from './tokens/token-provider.js';\nimport type { ApiError } from './types.js';\n\nexport interface TransportOptions {\n  baseURL: string;\n  tokens: TokenProvider;\n  fetchImpl: typeof fetch;\n  timeoutMs: number;\n  maxRetries: number;\n  retryBaseMs: number;\n  retryMaxMs: number;\n  /**\n   * How long one request may keep waiting on 429 (the source is at its backlog\n   * quota). Those waits follow Retry-After and do not count as retries: the\n   * API is saying \"slow down\", not \"failed\".\n   */\n  backpressureMs: number;\n}\n\nexport type QueryValue = string | number | boolean | undefined;\n\nexport interface RequestOptions {\n  method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';\n  path: string;\n  query?: Record<string, QueryValue>;\n  body?: unknown;\n  /** Headers of the request's own (an `idempotency-key`), beside the transport's. */\n  headers?: Record<string, string>;\n  /** Status codes to return as `null` instead of throwing (e.g. 404 on a lookup). */\n  tolerate?: number[];\n  /** The caller-owned paths left as they are, as the call's API route excludes them. */\n  exclude?: WireExclude;\n  /**\n   * A POST whose resend changes nothing (inputs, by their ids; a replay under\n   * an idempotency key; a preview): retried like a GET. Any other POST is\n   * sent once.\n   */\n  idempotent?: boolean;\n}\n\n/** Longest single wait on one 429, whatever Retry-After says. */\nconst MAX_BACKPRESSURE_WAIT_MS = 60_000;\n\nfunction describe(status: number, body: unknown): { message: string; code?: string } {\n  if (body && typeof body === 'object') {\n    const error = body as ApiError;\n    return {\n      message: error.message ?? `the ingest API responded ${status}`,\n      code: error.code,\n    };\n  }\n  return { message: `the ingest API responded ${status}` };\n}\n\nexport class Transport {\n  readonly #options: TransportOptions;\n\n  constructor(options: TransportOptions) {\n    this.#options = { ...options, baseURL: options.baseURL.replace(/\\/+$/, '') };\n  }\n\n  async request<Result>(options: RequestOptions): Promise<Result> {\n    const backpressureUntil = Date.now() + this.#options.backpressureMs;\n    const retries = options.method !== 'POST' || options.idempotent === true;\n    const attempt = async (retry: number, refreshed: boolean): Promise<Result> => {\n      let token: string;\n      try {\n        token = await this.#options.tokens.get();\n      } catch (error) {\n        // A failed token exchange is retried as the request would be; a provider's own error is not.\n        if (error instanceof IngestError && error.retryable && retry < this.#options.maxRetries) {\n          await sleep(this.#backoff(retry));\n          return attempt(retry + 1, refreshed);\n        }\n        throw error;\n      }\n      let response: Response;\n      let text: string;\n      try {\n        response = await this.#options.fetchImpl(this.#url(options), {\n          method: options.method,\n          headers: {\n            ...options.headers,\n            authorization: `Bearer ${token}`,\n            accept: 'application/json',\n            ...(options.body !== undefined ? { 'content-type': 'application/json' } : {}),\n          },\n          body:\n            options.body !== undefined\n              ? JSON.stringify(toWire(options.body, options.exclude?.request))\n              : undefined,\n          signal: AbortSignal.timeout(this.#options.timeoutMs),\n        });\n        // A connection lost while the body is read is as unreachable as one lost before.\n        text = await response.text();\n      } catch (error) {\n        const failure = new IngestError(\n          0,\n          `the ingest API is unreachable: ${error instanceof Error ? error.message : String(error)}`,\n        );\n        if (retries && retry < this.#options.maxRetries) {\n          await sleep(this.#backoff(retry));\n          return attempt(retry + 1, refreshed);\n        }\n        throw failure;\n      }\n      const body = safeJson(text);\n      if (response.ok) {\n        return fromWire<Result>(body, options.exclude?.response);\n      }\n      if (options.tolerate?.includes(response.status)) {\n        return null as Result;\n      }\n      if (response.status === 401 && !refreshed && this.#options.tokens.refreshable !== false) {\n        this.#options.tokens.invalidate();\n        return attempt(retry, true);\n      }\n      const { message, code } = describe(response.status, body);\n      const failure = new IngestError(response.status, message, code, body);\n      if (response.status === 429) {\n        // Backpressure: wait as told (bounded per wait), without spending a retry.\n        const wait = Math.min(\n          retryAfterMs(response.headers.get('retry-after')) ?? this.#backoff(retry),\n          MAX_BACKPRESSURE_WAIT_MS,\n        );\n        if (Date.now() + wait <= backpressureUntil) {\n          await sleep(wait);\n          return attempt(retry, refreshed);\n        }\n        throw failure;\n      }\n      if (retries && failure.retryable && retry < this.#options.maxRetries) {\n        await sleep(this.#backoff(retry));\n        return attempt(retry + 1, refreshed);\n      }\n      throw failure;\n    };\n    return attempt(0, false);\n  }\n\n  #url(options: RequestOptions): string {\n    const url = new URL(`${this.#options.baseURL}${options.path}`);\n    Object.entries(options.query ?? {}).forEach(([key, value]) => {\n      if (value !== undefined) {\n        const text = String(value);\n        url.searchParams.set(wireKey(key), key === 'sort' ? wireSort(text) : text);\n      }\n    });\n    return url.toString();\n  }\n\n  /** Full jitter: uniform in [0, min(max, base · 2^retry)). */\n  #backoff(retry: number): number {\n    const cap = Math.min(this.#options.retryMaxMs, this.#options.retryBaseMs * 2 ** retry);\n    return Math.floor(Math.random() * cap);\n  }\n}\n","/**\n * The client. One `IngestClient` per collector process: it holds the token\n * provider and the transport, and hands out run handles and event batchers.\n * Every resource of the API is a namespace (`sources`, `sourceTypes`, `mappings`, `mappingPreviews`, `destinations`, `targets`, `endpoints`, `runs`, `events`, `inputs`, `replays`, `entities`, `driftChecks`).\n */\nimport {\n  DriftCheckStatus,\n  DriftPolicy,\n  EventOp,\n  InputStatus,\n  OnConflict,\n  ReplayStatus,\n  RunStatus,\n  UpsertOutcome,\n} from './enums.js';\nimport { checkBatching, type BatcherOptions } from './batcher.js';\nimport { EventBatcher } from './event-batcher.js';\nimport { IngestError } from './ingest-error.js';\nimport { mustExist } from './must-exist.js';\nimport { inputOf } from './inputs.js';\nimport { poll, type WaitOptions } from './poll.js';\nimport { RunHandle } from './run-handle.js';\nimport { ApiKeyToken } from './tokens/api-key-token.js';\nimport { CallbackToken } from './tokens/callback-token.js';\nimport { StaticToken } from './tokens/static-token.js';\nimport type { TokenProvider } from './tokens/token-provider.js';\nimport { everyPageFor, type PagePlace } from './pages.js';\nimport { Transport, type QueryValue } from './transport.js';\nimport type { WireExclude } from './wire.js';\nimport type {\n  Accepted,\n  Destination,\n  DestinationFilter,\n  SourceDestinationFilter,\n  DestinationPatch,\n  DestinationRevision,\n  DestinationSpec,\n  DriftCheck,\n  DriftCheckFilter,\n  FinalizeOptions,\n  InputFilter,\n  Input,\n  InputSummary,\n  EventSpec,\n  InputSpec,\n  Entity,\n  EntitySummary,\n  EntityFilter,\n  Mapping,\n  MappingPreview,\n  MappingCreate,\n  MappingFilter,\n  MappingPatch,\n  MappingPreviewSpec,\n  MappingWriteOptions,\n  MappingRevision,\n  Page,\n  PageOptions,\n  Replay,\n  ReplayFilter,\n  ReplayRequest,\n  Run,\n  RunFilter,\n  Source,\n  SourceFilter,\n  SourceType,\n  SourceTypeFilter,\n  SourceTypePatch,\n  RunSettings,\n  SourceTypeSpec,\n  SourceTypeUpsertSpec,\n  TargetSummary,\n  TypeMappingCreate,\n  Endpoint,\n  EndpointAsWritten,\n  EndpointReadOptions,\n  EndpointSummary,\n  EndpointFilter,\n  TargetFilter,\n  SourcePatch,\n  SourceSpec,\n  SourceUpsertSpec,\n  SourceRevision,\n  SourceTypeRevision,\n  SourceStats,\n  Upserted,\n} from './types.js';\n\n/** Where API keys are exchanged for tokens unless `authBaseURL` says otherwise. */\nexport const DEFAULT_AUTH_BASE_URL = 'https://api.nullplatform.com';\n\n/** The public ingest API, unless `baseURL` says otherwise. */\nexport const DEFAULT_BASE_URL = `${DEFAULT_AUTH_BASE_URL}/catalog/ingest`;\n\n/**\n * How an `IngestClient` reaches the API: its credentials (an API key, a\n * token, or a token callback), where the API is, and how requests are\n * retried and inputs batched. Nothing is read from the environment.\n */\nexport interface IngestClientOptions {\n  /**\n   * The ingest API. Default: the public one, https://api.nullplatform.com/catalog/ingest.\n   * Set it only to reach another installation (a local one, in development).\n   */\n  baseURL?: string;\n  /** A nullplatform API key, exchanged for tokens at `authBaseURL`. */\n  apiKey?: string;\n  /** A ready token (with or without `Bearer `). */\n  token?: string;\n  /** Your own way to get a token; called again after a 401. */\n  getToken?: () => Promise<string> | string;\n  /** Where API keys are exchanged. Default: https://api.nullplatform.com */\n  authBaseURL?: string;\n  /** Override `fetch` (tests, proxies). Default: the global `fetch`. */\n  fetchImpl?: typeof fetch;\n  /** Per-request timeout. Default 30 s. */\n  timeoutMs?: number;\n  /** Retries of a 5xx or network failure. Default 4. */\n  maxRetries?: number;\n  /** Backoff base. Default 250 ms. */\n  retryBaseMs?: number;\n  /** Backoff ceiling. Default 10 s. */\n  retryMaxMs?: number;\n  /** How long a request may wait out 429s (backlog quota) before failing. Default 15 min. */\n  backpressureMs?: number;\n  /** Batching defaults for run handles and event batchers. */\n  batching?: Partial<BatcherOptions>;\n}\n\n/** How `runs.open` opens a run: the record types it covers, and what to do about a run already open. */\nexport interface OpenRunOptions {\n  /** Record types the snapshot covers; all the source maps when omitted. */\n  types?: string[];\n  /** What to do when the source already has an open run: abort it and open a new one, or fail. */\n  onConflict?: OnConflict;\n}\n\nconst TERMINAL_RUN: RunStatus[] = [RunStatus.COMPLETED, RunStatus.GUARD_TRIPPED, RunStatus.ABORTED];\nconst TERMINAL_INPUT: InputStatus[] = [\n  InputStatus.APPLIED,\n  InputStatus.REJECTED,\n  InputStatus.DROPPED,\n  InputStatus.DEAD,\n];\n\nconst DEFAULT_BATCHING: BatcherOptions = {\n  maxBatch: 500,\n  maxBytes: 6 * 1024 * 1024,\n  flushIntervalMs: 1000,\n  concurrency: 2,\n};\n\nfunction tokenProvider(\n  options: IngestClientOptions,\n  fetchImpl: typeof fetch,\n  timeoutMs: number,\n): TokenProvider {\n  const given = [options.apiKey, options.token, options.getToken].filter(Boolean).length;\n  if (given !== 1) {\n    throw new Error('exactly one of apiKey, token or getToken is required');\n  }\n  if (options.apiKey) {\n    return new ApiKeyToken({\n      apiKey: options.apiKey,\n      authBaseURL: options.authBaseURL ?? DEFAULT_AUTH_BASE_URL,\n      fetchImpl,\n      timeoutMs,\n    });\n  }\n  if (options.token) {\n    return new StaticToken(options.token);\n  }\n  return new CallbackToken(options.getToken as () => Promise<string> | string);\n}\n\n/**\n * What each call leaves as it is: the caller's own content, at the paths the\n * API leaves out of its key renaming on that route. Keep each in step with\n * its route.\n */\nconst CONTENT = {\n  /** `POST /sources`, `PATCH /sources/{id}`, `GET /sources/{id}`. */\n  source: { request: ['attributes'], response: ['attributes'] },\n  /** `GET /sources`. */\n  sources: { response: ['results[*].attributes'] },\n  /** `GET /sources/{id}/revisions`: the source as each write left it, under `snapshot`. */\n  sourceRevisions: { response: ['results[*].snapshot.attributes'] },\n  /** `POST /sources/{id}/inputs`. */\n  inputs: { request: ['data[*].payload'] },\n  /** `GET /inputs/{id}`. */\n  input: { response: ['payload'] },\n  /** `POST /mapping_previews`: the sample as sent, and what the engine made as it made it. */\n  mappingPreview: {\n    request: ['sample.payload'],\n    response: ['sample.payload', 'output', 'entities'],\n  },\n  /**\n   * `GET /targets/{id}/endpoints/{id}`: the backend's own content in an\n   * endpoint document (what the API leaves as the backend wrote it).\n   */\n  endpoint: {\n    response: [\n      'model.schema',\n      'model.parents',\n      'model.relations',\n      'fields',\n      'calls.*.query',\n      'calls.*.body',\n      'behavior.gone.in',\n    ],\n  },\n  /** `GET /sources/{id}/entities`. */\n  entities: { response: ['results[*].data', 'results[*].links'] },\n  /** `GET /entities/{id}`. */\n  entity: { response: ['data', 'links', 'payload'] },\n} as const satisfies Record<string, WireExclude>;\n\nconst segment = encodeURIComponent;\n\n/**\n * A list query: the filters as given, and the page checked client-side so a\n * bad value fails here with a clear message instead of as a 400.\n */\nfunction listQuery(query: PageOptions = {}): Record<string, QueryValue> {\n  const { limit, offset } = query;\n  if (limit !== undefined && !(Number.isInteger(limit) && limit >= 1)) {\n    throw new RangeError(`limit must be a positive integer, got ${String(limit)}`);\n  }\n  if (offset !== undefined && !(Number.isInteger(offset) && offset >= 0)) {\n    throw new RangeError(`offset must be a non-negative integer, got ${String(offset)}`);\n  }\n  // A filter of several values is sent as the API reads it: comma separated.\n  return Object.fromEntries(\n    Object.entries(query).map(([key, value]) => [\n      key,\n      Array.isArray(value) ? value.join(',') : (value as QueryValue),\n    ]),\n  );\n}\n\n/** `?dry_run=true` when asked: the write is checked as it would be made, and not made. */\nfunction dryRunQuery({ dryRun }: { dryRun?: boolean }): Record<string, QueryValue> {\n  return dryRun ? { dryRun: 'true' } : {};\n}\n\n/** A resource as an upsert answers it: with what it did. */\nconst upserted = <Resource>(resource: Resource, outcome: UpsertOutcome): Upserted<Resource> => ({\n  ...resource,\n  upserted: outcome,\n});\n\n/**\n * The owner's destinations of the mappings `specs` name, every page: the ones\n * named by slug queried by slug, the ones by id by id (the API takes one of\n * the two per request), each destination once.\n */\nasync function destinationsOfMappings(\n  specs: DestinationSpec[],\n  list: (filter: DestinationFilter & PagePlace) => Promise<Page<Destination>>,\n): Promise<Destination[]> {\n  const slugs = specs.flatMap((spec) => (spec.mapping === undefined ? [] : [spec.mapping]));\n  const ids = specs.flatMap((spec) => (spec.mappingId === undefined ? [] : [spec.mappingId]));\n  const [bySlug, byId] = await Promise.all([\n    everyPageFor(slugs, (mapping, page) => list({ mapping, ...page })),\n    everyPageFor(ids, (mappingId, page) => list({ mappingId, ...page })),\n  ]);\n  // A destination whose mapping one spec names by slug and another by id is read twice.\n  const distinct = new Map(\n    [...bySlug, ...byId].map((destination) => [destination.id, destination]),\n  );\n  return [...distinct.values()];\n}\n\n/**\n * Refuses, before anything is sent, specs that name one resource twice: an\n * upsert would write it twice, and which one wins would be a race.\n */\nfunction uniqueKeys<Spec>(specs: Spec[], keyOf: (spec: Spec) => string, what: string): void {\n  const keys = specs.map(keyOf);\n  const repeated = keys.find((key, index) => keys.indexOf(key) !== index);\n  if (repeated !== undefined) {\n    throw new Error(`two specs name the ${what} '${repeated}': name each once`);\n  }\n}\n\n/**\n * Runs an upsert once more when one of its creates answers 409: another\n * writer created that resource between the read and the write, and a second\n * read finds it. A create is never retried on its own (it is not idempotent).\n */\nasync function rereadOnConflict<Result>(upsert: () => Promise<Result>): Promise<Result> {\n  try {\n    return await upsert();\n  } catch (error) {\n    if (error instanceof IngestError && error.status === 409) {\n      return upsert();\n    }\n    throw error;\n  }\n}\n\n/** A mapping's slug as a create names it: the record type by default. */\nconst slugOf = (spec: MappingCreate): string => spec.slug ?? spec.recordType;\n\n/** What names a destination under its owner: its mapping, target and endpoint (each by slug or by id). */\nconst destinationKeyOf = (spec: DestinationSpec): string =>\n  `${spec.mapping ?? spec.mappingId}:${spec.target ?? spec.targetId}:${spec.endpoint ?? spec.endpointId}`;\n\n/** Whether a destination is the one a spec names: its mapping, and its target and endpoint as the spec names them. */\nconst isNamedBy = (destination: Destination, spec: DestinationSpec): boolean =>\n  (spec.mappingId === undefined\n    ? destination.mapping === spec.mapping\n    : destination.mappingId === spec.mappingId) &&\n  (spec.targetId === undefined\n    ? destination.target === spec.target\n    : destination.targetId === spec.targetId) &&\n  (spec.endpointId === undefined\n    ? destination.endpoint === spec.endpoint\n    : destination.endpointId === spec.endpointId);\n\n/** JSON with its object keys sorted: equal for equal documents, whatever their key order. */\nfunction canonicalJson(value: unknown): string {\n  if (Array.isArray(value)) {\n    return `[${value.map(canonicalJson).join(',')}]`;\n  }\n  if (value !== null && typeof value === 'object') {\n    const entries = Object.keys(value)\n      .sort()\n      .map(\n        (key) => `${JSON.stringify(key)}:${canonicalJson((value as Record<string, unknown>)[key])}`,\n      );\n    return `{${entries.join(',')}}`;\n  }\n  return JSON.stringify(value);\n}\n\n/** Whether two JSON documents are equal. */\nconst sameJson = (left: unknown, right: unknown): boolean =>\n  canonicalJson(left) === canonicalJson(right);\n\n/** Whether two run settings are equal: a list (`unguardedTypes`) as a set, in any order. */\nconst sameSetting = (left: unknown, right: unknown): boolean =>\n  Array.isArray(left) && Array.isArray(right)\n    ? sameJson([...left].sort(), [...right].sort())\n    : left === right;\n\n/**\n * The run settings `wanted` names that differ from `current` (what applies to\n * the type or the source); `undefined` when none do. A setting that already\n * applies, its type's included, is not written again.\n */\nfunction changedRuns(\n  current: RunSettings,\n  wanted: Partial<RunSettings> | undefined,\n): Partial<RunSettings> | undefined {\n  const runs = Object.fromEntries(\n    Object.entries(wanted ?? {}).filter(\n      ([setting, value]) => !sameSetting(current[setting as keyof RunSettings], value),\n    ),\n  );\n  return Object.keys(runs).length ? runs : undefined;\n}\n\n/** Whether a mapping's definition differs from what is wanted. */\nconst differs = (current: Mapping, wanted: Pick<Mapping, 'engine' | 'expression'>): boolean =>\n  current.engine !== wanted.engine || current.expression !== wanted.expression;\n\n/** `endpoints.get`: as it runs by default, as it was written with `{ effective: false }`. */\ninterface EndpointGet {\n  (targetId: string, endpointId: string, options?: { effective?: true }): Promise<Endpoint | null>;\n  (\n    targetId: string,\n    endpointId: string,\n    options: { effective: false },\n  ): Promise<EndpointAsWritten | null>;\n  (\n    targetId: string,\n    endpointId: string,\n    options?: EndpointReadOptions,\n  ): Promise<Endpoint | EndpointAsWritten | null>;\n}\n\n/**\n * The client of the nullplatform ingest API. Create one per process and share\n * it: it holds the token, the transport (retries, backpressure) and the\n * batching defaults. Every resource is a namespace (`sources`, `sourceTypes`, `mappings`, `mappingPreviews`, `destinations`, `targets`, `endpoints`, `runs`, `events`, `inputs`, `replays`, `entities`, `driftChecks`); a resource that belongs to a source or to a\n * source type is listed and created under it (`listForSource`, `listForSourceType`)\n * and read, changed and deleted by its own id.\n *\n * @example\n * const ingest = new IngestClient({ apiKey: process.env.NULLPLATFORM_API_KEY });\n * const [source] = await ingest.sources.upsert([{ slug: 'prod-eu', name: 'Production EU', type: 'kubernetes' }]);\n */\nexport class IngestClient {\n  readonly #transport: Transport;\n\n  readonly #batching: BatcherOptions;\n\n  /** Where the bearer of every request comes from (the API key's exchange, a token, or yours). */\n  readonly tokens: TokenProvider;\n\n  /**\n   * @param options Exactly one of `apiKey`, `token` or `getToken`; everything\n   *   else has a default (the public API, 30 s timeouts, 4 retries).\n   * @throws {Error} When not exactly one of `apiKey`, `token`, `getToken` is given.\n   */\n  constructor(options: IngestClientOptions) {\n    const fetchImpl = options.fetchImpl ?? globalThis.fetch;\n    const timeoutMs = options.timeoutMs ?? 30_000;\n    this.tokens = tokenProvider(options, fetchImpl, timeoutMs);\n    this.#transport = new Transport({\n      baseURL: options.baseURL ?? DEFAULT_BASE_URL,\n      tokens: this.tokens,\n      fetchImpl,\n      timeoutMs,\n      maxRetries: options.maxRetries ?? 4,\n      retryBaseMs: options.retryBaseMs ?? 250,\n      retryMaxMs: options.retryMaxMs ?? 10_000,\n      backpressureMs: options.backpressureMs ?? 15 * 60_000,\n    });\n    this.#batching = { ...DEFAULT_BATCHING, ...options.batching };\n    checkBatching(this.#batching);\n  }\n\n  /** Sources: one system of record each (a cluster, an account), the unit of ownership. */\n  readonly sources = {\n    /**\n     * Create a source. Creating a deleted slug revives it under the same id.\n     * Prefer {@link IngestClient.sources.upsert} in a collector.\n     * @param spec Its slug (unique in the organization), name and type; optionally its NRN,\n     *   attributes and the run settings it overrides.\n     * @returns The source, with the id the API minted.\n     * @throws {IngestError} 409 when a live source has the slug; 400 for an unknown type.\n     */\n    create: (spec: SourceSpec): Promise<Source> =>\n      this.#transport.request<Source>({\n        method: 'POST',\n        path: '/sources',\n        body: spec,\n        exclude: CONTENT.source,\n      }),\n    /**\n     * Read a source by id, a deleted one too (`deletedAt` set).\n     * @returns The source, or `null` when there is none.\n     * @throws {IngestError} 403 when the token may not read it.\n     */\n    get: (id: string): Promise<Source | null> =>\n      this.#transport.request<Source | null>({\n        method: 'GET',\n        path: `/sources/${segment(id)}`,\n        tolerate: [404],\n        exclude: CONTENT.source,\n      }),\n    /**\n     * Find the live source of a slug, looked for at `nrn` (the organization's\n     * root by default): a key granted beneath the organization finds its\n     * sources only where it is granted.\n     * @returns The source, or `null` when there is none.\n     * @throws {IngestError} 403 when the token may not list sources.\n     */\n    find: async (slug: string, options: { nrn?: string } = {}): Promise<Source | null> => {\n      const page = await this.sources.list({ slug, nrn: options.nrn, limit: 1 });\n      return page.results[0] ?? null;\n    },\n    /**\n     * List the organization's sources, narrowed by slug or NRN; deleted ones with `deleted`.\n     * @throws {IngestError} 400 for an unknown sort field; 403 when the token may not list sources.\n     */\n    list: async (filter?: SourceFilter): Promise<Page<Source>> =>\n      this.#transport.request<Page<Source>>({\n        method: 'GET',\n        path: '/sources',\n        query: listQuery(filter),\n        exclude: CONTENT.sources,\n      }),\n    /**\n     * A source's revisions, newest first: every write (created or revived,\n     * changed, deleted), who made it, and what the source set itself then.\n     * @throws {IngestError} 404 when there is no such source; 403 when the token may not read it.\n     */\n    revisions: (id: string, page?: PageOptions): Promise<Page<SourceRevision>> =>\n      this.#transport.request<Page<SourceRevision>>({\n        method: 'GET',\n        path: `/sources/${segment(id)}/revisions`,\n        query: listQuery(page),\n        exclude: CONTENT.sourceRevisions,\n      }),\n    /**\n     * The source at a glance: its backlog, last activity, and what became of\n     * the inputs settled since `since` (24 h by default).\n     * @throws {IngestError} 404 when there is no such source; 403 when the token may not read it.\n     */\n    stats: (id: string, options: { since?: string } = {}): Promise<SourceStats> =>\n      this.#transport.request<SourceStats>({\n        method: 'GET',\n        path: `/sources/${segment(id)}/stats`,\n        query: Object.fromEntries(Object.entries(options)),\n      }),\n    /**\n     * Change a source's name, description, attributes or run settings (a run\n     * setting set to `null` goes back to its type's). Needs `ingest:source:write`.\n     * @throws {IngestError} 400 for an invalid change; 404 when there is no such source; 403 when the token may not write it.\n     */\n    update: (id: string, patch: SourcePatch): Promise<Source> =>\n      this.#transport.request<Source>({\n        method: 'PATCH',\n        path: `/sources/${segment(id)}`,\n        body: patch,\n        exclude: CONTENT.source,\n      }),\n    /**\n     * Soft-delete a source. Its input log, its entities and its runs are kept,\n     * and the entities it wrote are left in their targets.\n     * @returns The source, with `deletedAt` set.\n     * @throws {IngestError} 409 while a run is open; 404 when there is no such source; 403 when the token may not delete it.\n     */\n    delete: (id: string): Promise<Source> =>\n      this.#transport.request<Source>({\n        method: 'DELETE',\n        path: `/sources/${segment(id)}`,\n        exclude: CONTENT.source,\n      }),\n    /**\n     * Sources as `specs` define them, each found by its slug (at its `nrn`,\n     * when it names one): created when missing (a deleted one revived where it\n     * lived), updated where its name, description, attributes (replaced whole)\n     * or a run setting it names differ, nothing sent when they match. Never\n     * deletes. A collector sends only what it owns: what it sends is set again\n     * on every start, over any change made in the console.\n     * @returns The sources, in the order of `specs`, each with what the upsert did\n     *   (`upserted`: created, updated or unchanged); keep their ids, every other call takes them.\n     * @throws {Error} Before sending anything, when two specs name one slug; when\n     *   a slug is a source of another type, or lives at another NRN (neither can change).\n     * @example\n     * const [source] = await ingest.sources.upsert([\n     *   { slug: 'prod-eu', name: 'Production EU', type: 'kubernetes' },\n     * ]);\n     */\n    upsert: async (specs: SourceUpsertSpec[]): Promise<Upserted<Source>[]> => {\n      uniqueKeys(specs, (spec) => spec.slug, 'source');\n      return rereadOnConflict(async () => {\n        const found = await Promise.all(\n          specs.map((spec) => this.sources.find(spec.slug, { nrn: spec.nrn })),\n        );\n        // Every spec is checked before anything is written.\n        specs.forEach((spec, index) => {\n          const existing = found[index];\n          if (!existing) {\n            return;\n          }\n          if (\n            spec.type !== undefined ? existing.type !== spec.type : existing.typeId !== spec.typeId\n          ) {\n            throw new Error(\n              `source '${spec.slug}' is a '${existing.type}' source, not '${spec.type ?? spec.typeId}': use another slug`,\n            );\n          }\n          if (spec.nrn !== undefined && existing.nrn !== spec.nrn) {\n            throw new Error(`source '${spec.slug}' lives at '${existing.nrn}', not '${spec.nrn}'`);\n          }\n        });\n        return Promise.all(\n          specs.map(async (spec, index) => {\n            const existing = found[index];\n            if (!existing) {\n              return upserted(await this.sources.create(spec), UpsertOutcome.CREATED);\n            }\n            const runs = changedRuns(existing.runs, spec.runs);\n            const patch: SourcePatch = {\n              ...(spec.name !== existing.name ? { name: spec.name } : {}),\n              ...(spec.description !== undefined && spec.description !== existing.description\n                ? { description: spec.description }\n                : {}),\n              ...(spec.attributes !== undefined && !sameJson(spec.attributes, existing.attributes)\n                ? { attributes: spec.attributes }\n                : {}),\n              ...(runs ? { runs } : {}),\n            };\n            return Object.keys(patch).length\n              ? upserted(await this.sources.update(existing.id, patch), UpsertOutcome.UPDATED)\n              : upserted(existing, UpsertOutcome.UNCHANGED);\n          }),\n        );\n      });\n    },\n  };\n\n  /** Source types: global ones (nullplatform's, such as `kubernetes`) and the organization's own. */\n  readonly sourceTypes = {\n    /**\n     * List the types the organization sees: the global ones and its own; `slug` finds one.\n     * @throws {IngestError} 403 when the token may not list source types.\n     */\n    list: (filter?: SourceTypeFilter): Promise<Page<SourceType>> =>\n      this.#transport.request<Page<SourceType>>({\n        method: 'GET',\n        path: '/source_types',\n        query: listQuery(filter),\n      }),\n    /**\n     * Read a type by id.\n     * @returns The type, or `null` when there is none.\n     * @throws {IngestError} 403 when the token may not read it.\n     */\n    get: (id: string): Promise<SourceType | null> =>\n      this.#transport.request<SourceType | null>({\n        method: 'GET',\n        path: `/source_types/${segment(id)}`,\n        tolerate: [404],\n      }),\n    /**\n     * Find the live type a slug names for the organization (a global one, or its own).\n     * @returns The type, or `null` when there is none.\n     * @throws {IngestError} 403 when the token may not list source types.\n     */\n    find: async (slug: string): Promise<SourceType | null> => {\n      const page = await this.sourceTypes.list({ slug, limit: 1 });\n      return page.results[0] ?? null;\n    },\n    /**\n     * Create one of the organization's own types; a deleted one of the slug is\n     * revived under its id. Its run settings are every source's defaults.\n     * @throws {IngestError} 409 when the slug is taken, by the organization or by a global type.\n     */\n    create: (spec: SourceTypeSpec): Promise<SourceType> =>\n      this.#transport.request<SourceType>({ method: 'POST', path: '/source_types', body: spec }),\n    /**\n     * Change a type's name, description or run settings (only the settings named).\n     * @throws {IngestError} 400 for an invalid change; 404 when there is no such type; 403 for nullplatform's (global) types.\n     */\n    update: (id: string, patch: SourceTypePatch): Promise<SourceType> =>\n      this.#transport.request<SourceType>({\n        method: 'PATCH',\n        path: `/source_types/${segment(id)}`,\n        body: patch,\n      }),\n    /**\n     * A type's revisions, newest first: every write, who made it, and what the type became.\n     * @throws {IngestError} 404 when there is no such type; 403 when the token may not read it.\n     */\n    revisions: (id: string, page?: PageOptions): Promise<Page<SourceTypeRevision>> =>\n      this.#transport.request<Page<SourceTypeRevision>>({\n        method: 'GET',\n        path: `/source_types/${segment(id)}/revisions`,\n        query: listQuery(page),\n      }),\n    /**\n     * Soft-delete a type.\n     * @throws {IngestError} 409 while a live source or mapping uses it.\n     */\n    delete: (id: string): Promise<SourceType> =>\n      this.#transport.request<SourceType>({\n        method: 'DELETE',\n        path: `/source_types/${segment(id)}`,\n      }),\n    /**\n     * The organization's own types as `specs` define them, each found by its\n     * slug: created when missing (a deleted one revived), updated where its\n     * name, description or a run setting it names differ, nothing sent when\n     * they match. Never deletes.\n     * @returns The types, in the order of `specs`.\n     * @throws {Error} Before sending anything, when two specs name one slug.\n     * @throws {IngestError} 409 when a global type holds a slug; 403 when a\n     *   slug names a global type that differs (nullplatform's are not the organization's to change).\n     * @example\n     * const [github] = await ingest.sourceTypes.upsert([\n     *   { slug: 'github', name: 'GitHub org', runs: { maxDeleteRatio: 0.2 } },\n     * ]);\n     */\n    upsert: async (specs: SourceTypeUpsertSpec[]): Promise<Upserted<SourceType>[]> => {\n      uniqueKeys(specs, (spec) => spec.slug, 'source type');\n      return rereadOnConflict(async () => {\n        const found = await Promise.all(specs.map((spec) => this.sourceTypes.find(spec.slug)));\n        return Promise.all(\n          specs.map(async (spec, index) => {\n            const existing = found[index];\n            if (!existing) {\n              return upserted(await this.sourceTypes.create(spec), UpsertOutcome.CREATED);\n            }\n            const runs = changedRuns(existing.runs, spec.runs);\n            const patch: SourceTypePatch = {\n              ...(spec.name !== existing.name ? { name: spec.name } : {}),\n              ...(spec.description !== undefined && spec.description !== existing.description\n                ? { description: spec.description }\n                : {}),\n              ...(runs ? { runs } : {}),\n            };\n            return Object.keys(patch).length\n              ? upserted(await this.sourceTypes.update(existing.id, patch), UpsertOutcome.UPDATED)\n              : upserted(existing, UpsertOutcome.UNCHANGED);\n          }),\n        );\n      });\n    },\n  };\n\n  /**\n   * Mappings: how a record type becomes entities (an expression), owned by a\n   * source type (shared by every source of it) or by one source. Where a\n   * mapping writes is its destinations'.\n   */\n  readonly mappings = {\n    /**\n     * Create a mapping of a source type: the organization's own (with\n     * `global`, nullplatform's, an operator's call). Creating a deleted slug\n     * revives it.\n     * @param options `dryRun` checks it as it would be written and stores\n     *   nothing. What it makes of a record is `mappingPreviews.create`.\n     * @throws {IngestError} 400 for an invalid expression; 409 when the slug is live.\n     */\n    createForSourceType: (\n      sourceTypeId: string,\n      spec: TypeMappingCreate,\n      options: MappingWriteOptions = {},\n    ): Promise<Mapping> =>\n      this.#transport.request<Mapping>({\n        method: 'POST',\n        path: `/source_types/${segment(sourceTypeId)}/mappings`,\n        query: dryRunQuery(options),\n        body: spec,\n      }),\n    /**\n     * Create a source's own mapping: for a source whose type shares none for\n     * the record type, or to customize one (bind it where the type's is bound,\n     * and it shadows it). Creating a deleted slug revives it.\n     * @param options `dryRun` checks it as it would be written and stores\n     *   nothing. What it makes of a record is `mappingPreviews.create`.\n     * @throws {IngestError} 400 for an invalid expression; 409 when the slug is live.\n     */\n    createForSource: (\n      sourceId: string,\n      spec: MappingCreate,\n      options: MappingWriteOptions = {},\n    ): Promise<Mapping> =>\n      this.#transport.request<Mapping>({\n        method: 'POST',\n        path: `/sources/${segment(sourceId)}/mappings`,\n        query: dryRunQuery(options),\n        body: spec,\n      }),\n    /**\n     * Read a mapping by id (a type's or a source's).\n     * @returns The mapping, or `null` when there is none.\n     * @throws {IngestError} 403 when the token may not read it.\n     */\n    get: (id: string): Promise<Mapping | null> =>\n      this.#transport.request<Mapping | null>({\n        method: 'GET',\n        path: `/mappings/${segment(id)}`,\n        tolerate: [404],\n      }),\n    /**\n     * Find a source's own live mapping of a slug (its record type, unless named otherwise).\n     * @returns The mapping, or `null` when there is none.\n     * @throws {IngestError} 404 when there is no such source; 403 when the token may not list its mappings.\n     */\n    findForSource: async (sourceId: string, slug: string): Promise<Mapping | null> => {\n      const page = await this.mappings.listForSource(sourceId, { slug, limit: 1 });\n      return page.results[0] ?? null;\n    },\n    /**\n     * Find a type's live mapping of a slug the organization sees: nullplatform's\n     * or its own (a slug names one of them on a type).\n     * @returns The mapping, or `null` when there is none.\n     * @throws {IngestError} 404 when there is no such type; 403 when the token may not list its mappings.\n     */\n    findForSourceType: async (sourceTypeId: string, slug: string): Promise<Mapping | null> => {\n      const page = await this.mappings.listForSourceType(sourceTypeId, { slug, limit: 1 });\n      return page.results[0] ?? null;\n    },\n    /**\n     * List a type's mappings the organization sees: the global ones and its own.\n     * @throws {IngestError} 404 when there is no such type; 403 when the token may not list its mappings.\n     */\n    listForSourceType: async (\n      sourceTypeId: string,\n      filter?: MappingFilter,\n    ): Promise<Page<Mapping>> =>\n      this.#transport.request<Page<Mapping>>({\n        method: 'GET',\n        path: `/source_types/${segment(sourceTypeId)}/mappings`,\n        query: listQuery(filter),\n      }),\n    /**\n     * List a source's own mappings.\n     * @throws {IngestError} 404 when there is no such source; 403 when the token may not list its mappings.\n     */\n    listForSource: async (sourceId: string, filter?: MappingFilter): Promise<Page<Mapping>> =>\n      this.#transport.request<Page<Mapping>>({\n        method: 'GET',\n        path: `/sources/${segment(sourceId)}/mappings`,\n        query: listQuery(filter),\n      }),\n    /**\n     * Change a mapping's definition (engine, expression): a new revision, which\n     * every destination following the latest applies. A change of nothing\n     * writes nothing.\n     * @param options `dryRun` checks it as it would be written and stores\n     *   nothing. What it makes of a record is `mappingPreviews.create`.\n     * @throws {IngestError} 400 for an expression that does not compile; 404 when there is no such mapping; 403 for nullplatform's (global) mappings.\n     */\n    update: (\n      id: string,\n      patch: MappingPatch,\n      options: MappingWriteOptions = {},\n    ): Promise<Mapping> =>\n      this.#transport.request<Mapping>({\n        method: 'PATCH',\n        path: `/mappings/${segment(id)}`,\n        query: dryRunQuery(options),\n        body: patch,\n      }),\n    /**\n     * Soft-delete a mapping.\n     * @throws {IngestError} 409 while a live destination binds it.\n     */\n    delete: (id: string): Promise<Mapping> =>\n      this.#transport.request<Mapping>({ method: 'DELETE', path: `/mappings/${segment(id)}` }),\n    /**\n     * A mapping's revisions, newest first: every definition it had, kept for good.\n     * @throws {IngestError} 404 when there is no such mapping; 403 when the token may not read it.\n     */\n    revisions: async (id: string, page?: PageOptions): Promise<Page<MappingRevision>> =>\n      this.#transport.request<Page<MappingRevision>>({\n        method: 'GET',\n        path: `/mappings/${segment(id)}/revisions`,\n        query: listQuery(page),\n      }),\n    /**\n     * A type's mappings as `specs` define them (the organization's own), each\n     * found by its slug (the record type by default) among the ones the\n     * organization sees: created when missing (a deleted one revived), its\n     * definition updated where it differs, nothing sent when it matches.\n     * Never deletes. Where they are written is `destinations.upsertForSourceType`.\n     * @returns The mappings, in the order of `specs`.\n     * @throws {Error} Before sending anything, when two specs name one slug;\n     *   when a slug's mapping maps another record type.\n     * @throws {IngestError} 403 when a slug is nullplatform's mapping and the\n     *   spec differs from it (customize it under another slug); 400 for an invalid expression.\n     * @example\n     * const [pods] = await ingest.mappings.upsertForSourceType(type.id, [\n     *   { slug: 'pod-team', recordType: 'pod', engine: Engine.JSONATA, expression },\n     * ]);\n     */\n    upsertForSourceType: async (\n      sourceTypeId: string,\n      specs: MappingCreate[],\n    ): Promise<Upserted<Mapping>[]> =>\n      this.#upsertMappings(\n        specs,\n        (slugs) =>\n          everyPageFor(slugs, (slug, page) =>\n            this.mappings.listForSourceType(sourceTypeId, { slug, ...page }),\n          ),\n        (spec) => this.mappings.createForSourceType(sourceTypeId, spec),\n      ),\n    /**\n     * A source's own mappings as `specs` define them, each found by its slug\n     * (the record type by default): created when missing (a deleted one\n     * revived), its definition updated where it differs, nothing sent when it\n     * matches. Never deletes. For a collector of the organization's own type\n     * (a collector of a global type, `kubernetes`, defines none); where they\n     * are written is `destinations.upsertForSource`.\n     * @returns The mappings, in the order of `specs`.\n     * @throws {Error} Before sending anything, when two specs name one slug;\n     *   when a slug's mapping maps another record type.\n     * @throws {IngestError} 400 for an invalid expression.\n     * @example\n     * const mappings = await ingest.mappings.upsertForSource(source.id, [\n     *   { recordType: 'repository', engine: Engine.JSONATA, expression },\n     * ]);\n     * await ingest.destinations.upsertForSource(source.id, mappings.map((mapping) => ({\n     *   mappingId: mapping.id, target: 'catalog', endpoint: `github-${mapping.recordType}`,\n     * })));\n     */\n    upsertForSource: async (\n      sourceId: string,\n      specs: MappingCreate[],\n    ): Promise<Upserted<Mapping>[]> =>\n      this.#upsertMappings(\n        specs,\n        (slugs) =>\n          everyPageFor(slugs, (slug, page) =>\n            this.mappings.listForSource(sourceId, { slug, ...page }),\n          ),\n        (spec) => this.mappings.createForSource(sourceId, spec),\n      ),\n  };\n\n  /** Mapping previews: what a mapping makes of a record, nothing stored. */\n  readonly mappingPreviews = {\n    /**\n     * Evaluate a mapping on a sample: a stored one as it is (`mappingId`), a\n     * definition not written yet, or a stored one changed by `definition`.\n     * Nothing is written. With `sourceId`, it is evaluated as that source\n     * (`$source`) and each entity validated against what the source applies.\n     * @returns What was evaluated, its output, its entities, and what each\n     *   endpoint would say; a runtime error is the preview's `errors`.\n     * @throws {IngestError} 400 for an expression that does not compile, or a\n     *   sample that is not exactly one of `payload` and `inputId`.\n     * @example\n     * const preview = await ingest.mappingPreviews.create({\n     *   mappingId: mapping.id,\n     *   sourceId: source.id,\n     *   sample: { payload: deployment },\n     * });\n     */\n    create: (spec: MappingPreviewSpec): Promise<MappingPreview> =>\n      this.#transport.request<MappingPreview>({\n        method: 'POST',\n        path: '/mapping_previews',\n        body: spec,\n        exclude: CONTENT.mappingPreview,\n        // Nothing is stored: a resend answers the same.\n        idempotent: true,\n      }),\n  };\n\n  /**\n   * Destinations: a mapping bound to an endpoint of a target, for every source\n   * of a type (the organization's) or for one source (which shadows the\n   * organization's of the same record type, target and endpoint). Created and\n   * listed under their owner; read, changed and deleted by their own id.\n   */\n  readonly destinations = {\n    /**\n     * Bind mappings for every source of a type in the organization: one\n     * batch, all or none (1–100). Re-binding a deleted one revives it.\n     * @returns The destinations, in the order given.\n     * @throws {IngestError} 404 for an unknown mapping, target or endpoint; 409 for a key\n     *   bound already. A refusal names its item: `data[i]: …`.\n     * @example\n     * await ingest.destinations.createForSourceType(type.id, [\n     *   { mappingId: deployments.id, target: 'catalog', endpoint: 'k8s-deployment' },\n     * ]);\n     */\n    createForSourceType: async (\n      sourceTypeId: string,\n      specs: DestinationSpec[],\n    ): Promise<Destination[]> =>\n      (\n        await this.#transport.request<{ data: Destination[] }>({\n          method: 'POST',\n          path: `/source_types/${segment(sourceTypeId)}/destinations`,\n          body: { data: specs },\n        })\n      ).data,\n    /**\n     * Bind mappings for one source: one batch, all or none (1–100). Each\n     * shadows the organization's of the same record type, target and endpoint.\n     * @returns The destinations, in the order given.\n     * @throws {IngestError} 404 for an unknown mapping, target or endpoint; 409 for a key\n     *   bound already. A refusal names its item: `data[i]: …`.\n     */\n    createForSource: async (sourceId: string, specs: DestinationSpec[]): Promise<Destination[]> =>\n      (\n        await this.#transport.request<{ data: Destination[] }>({\n          method: 'POST',\n          path: `/sources/${segment(sourceId)}/destinations`,\n          body: { data: specs },\n        })\n      ).data,\n    /**\n     * Read a destination by id, a deleted one too.\n     * @returns The destination, or `null` when there is none.\n     * @throws {IngestError} 403 when the token may not read it.\n     */\n    get: (id: string): Promise<Destination | null> =>\n      this.#transport.request<Destination | null>({\n        method: 'GET',\n        path: `/destinations/${segment(id)}`,\n        tolerate: [404],\n      }),\n    /**\n     * List the organization's destinations for every source of a type, newest first.\n     * @throws {IngestError} 404 when there is no such type; 403 when the token may not list its destinations.\n     */\n    listForSourceType: (\n      sourceTypeId: string,\n      filter?: DestinationFilter,\n    ): Promise<Page<Destination>> =>\n      this.#transport.request<Page<Destination>>({\n        method: 'GET',\n        path: `/source_types/${segment(sourceTypeId)}/destinations`,\n        query: listQuery(filter),\n      }),\n    /**\n     * List what a source applies: its own destinations and the organization's\n     * of its type, after shadowing (`effective`, the default); with\n     * `effective: false`, its own destinations only.\n     * @example\n     * const applied = await ingest.destinations.listForSource(source.id);\n     * const types = new Set(applied.results.map((destination) => destination.recordType));\n     * @throws {IngestError} 404 when there is no such source; 403 when the token may not list its destinations.\n     */\n    listForSource: (\n      sourceId: string,\n      filter?: SourceDestinationFilter,\n    ): Promise<Page<Destination>> =>\n      this.#transport.request<Page<Destination>>({\n        method: 'GET',\n        path: `/sources/${segment(sourceId)}/destinations`,\n        query: listQuery(filter),\n      }),\n    /**\n     * Change a destination's endpoint (within its target), the revision it\n     * pins (`null`: follow the latest), its switch or its `onDelete`.\n     * @throws {IngestError} 400 for an invalid change; 404 when there is no such destination or endpoint; 409 when `onDelete: OnDelete.RESTRICT` refuses to stop applying.\n     */\n    update: (id: string, patch: DestinationPatch): Promise<Destination> =>\n      this.#transport.request<Destination>({\n        method: 'PATCH',\n        path: `/destinations/${segment(id)}`,\n        body: patch,\n      }),\n    /**\n     * Soft-delete a destination; its `onDelete` decides what becomes of what\n     * it wrote.\n     * @throws {IngestError} 409 when its `onDelete` is `RESTRICT` and it owns live entities.\n     */\n    delete: (id: string): Promise<Destination> =>\n      this.#transport.request<Destination>({\n        method: 'DELETE',\n        path: `/destinations/${segment(id)}`,\n      }),\n    /**\n     * A destination's revisions, newest first.\n     * @throws {IngestError} 404 when there is no such destination; 403 when the token may not read it.\n     */\n    revisions: (id: string, page?: PageOptions): Promise<Page<DestinationRevision>> =>\n      this.#transport.request<Page<DestinationRevision>>({\n        method: 'GET',\n        path: `/destinations/${segment(id)}/revisions`,\n        query: listQuery(page),\n      }),\n    /**\n     * The organization's destinations for every source of a type, as `specs`\n     * define them, each found by its mapping, target and endpoint: created\n     * when missing (in one batch, all or none), updated where its pin,\n     * switch or `onDelete` differ, nothing sent when they match. Never deletes\n     * one the specs leave out.\n     * @returns The destinations, in the order of `specs`.\n     * @example\n     * await ingest.destinations.upsertForSourceType(type.id, [\n     *   { mappingId: deployments.id, target: 'catalog', endpoint: 'k8s-deployment' },\n     * ]);\n     * @throws {Error} Before sending anything, when two specs name one destination (by slug or by id).\n     * @throws {IngestError} 404 for a mapping, target or endpoint that does not exist; 400 for a mapping of another type.\n     */\n    upsertForSourceType: async (\n      sourceTypeId: string,\n      specs: DestinationSpec[],\n    ): Promise<Upserted<Destination>[]> =>\n      this.#upsertDestinations(\n        (filter) => this.destinations.listForSourceType(sourceTypeId, filter),\n        specs,\n        (missing) => this.destinations.createForSourceType(sourceTypeId, missing),\n      ),\n    /**\n     * One source's own destinations, as `specs` define them, each found by its\n     * mapping, target and endpoint: created when missing (in one batch, all or\n     * none), updated where its pin, switch or `onDelete` differ, nothing sent\n     * when they match. Never deletes one the specs leave out.\n     * @returns The destinations, in the order of `specs`.\n     * @throws {Error} Before sending anything, when two specs name one destination (by slug or by id).\n     * @throws {IngestError} 404 for a mapping, target or endpoint that does not exist; 400 for a mapping of another type.\n     */\n    upsertForSource: async (\n      sourceId: string,\n      specs: DestinationSpec[],\n    ): Promise<Upserted<Destination>[]> =>\n      this.#upsertDestinations(\n        (filter) => this.destinations.listForSource(sourceId, { effective: false, ...filter }),\n        specs,\n        (missing) => this.destinations.createForSource(sourceId, missing),\n      ),\n  };\n\n  /**\n   * Each spec's mapping among the owner's, found by its slug (the owner's of\n   * the specs' slugs, queried by them): created when missing, updated where\n   * its definition differs.\n   */\n  async #upsertMappings(\n    specs: MappingCreate[],\n    readNamed: (slugs: string[]) => Promise<Mapping[]>,\n    create: (spec: MappingCreate) => Promise<Mapping>,\n  ): Promise<Upserted<Mapping>[]> {\n    uniqueKeys(specs, slugOf, 'mapping');\n    return rereadOnConflict(async () => {\n      const existing = await readNamed(specs.map(slugOf));\n      const found = specs.map((spec) => existing.find((each) => each.slug === slugOf(spec)));\n      // Every spec is checked before anything is written.\n      specs.forEach((spec, index) => {\n        const mapping = found[index];\n        if (mapping && mapping.recordType !== spec.recordType) {\n          throw new Error(\n            `mapping '${mapping.slug}' maps '${mapping.recordType}' records, not '${spec.recordType}': use another slug`,\n          );\n        }\n      });\n      return Promise.all(\n        specs.map(async (spec, index) => {\n          const mapping = found[index];\n          if (!mapping) {\n            return upserted(await create(spec), UpsertOutcome.CREATED);\n          }\n          const definition = { engine: spec.engine, expression: spec.expression };\n          return differs(mapping, definition)\n            ? upserted(await this.mappings.update(mapping.id, definition), UpsertOutcome.UPDATED)\n            : upserted(mapping, UpsertOutcome.UNCHANGED);\n        }),\n      );\n    });\n  }\n\n  /**\n   * Each spec's destination among the owner's of the mappings the specs name\n   * (queried by them, by slug and by id): updated where it differs, the\n   * missing ones created.\n   */\n  async #upsertDestinations(\n    list: (filter: DestinationFilter & PagePlace) => Promise<Page<Destination>>,\n    specs: DestinationSpec[],\n    create: (missing: DestinationSpec[]) => Promise<Destination[]>,\n  ): Promise<Upserted<Destination>[]> {\n    uniqueKeys(specs, destinationKeyOf, 'destination');\n    return rereadOnConflict(async () => {\n      const existing = await destinationsOfMappings(specs, list);\n      const found = specs.map((spec) =>\n        existing.find((destination) => isNamedBy(destination, spec)),\n      );\n      // One by slug, another by id: two specs of one destination, refused before anything is written.\n      uniqueKeys(\n        found.filter((destination): destination is Destination => destination !== undefined),\n        (destination) => destination.id,\n        'destination',\n      );\n      return this.#writeDestinations(specs, found, create);\n    });\n  }\n\n  /** The destinations `found` for `specs` updated where they differ, the missing ones created in one batch. */\n  async #writeDestinations(\n    specs: DestinationSpec[],\n    found: (Destination | undefined)[],\n    create: (missing: DestinationSpec[]) => Promise<Destination[]>,\n  ): Promise<Upserted<Destination>[]> {\n    const missing = specs.filter((_, index) => !found[index]);\n    const created = missing.length ? await create(missing) : [];\n    const updated = await Promise.all(\n      specs.map(async (spec, index) => {\n        const destination = found[index];\n        if (!destination) {\n          return upserted(created[missing.indexOf(spec)], UpsertOutcome.CREATED);\n        }\n        const patch: DestinationPatch = {\n          ...(spec.mappingRevision !== undefined &&\n          spec.mappingRevision !== destination.mappingRevision\n            ? { mappingRevision: spec.mappingRevision }\n            : {}),\n          ...(spec.enabled !== undefined && spec.enabled !== destination.enabled\n            ? { enabled: spec.enabled }\n            : {}),\n          ...(spec.onDelete !== undefined && spec.onDelete !== destination.onDelete\n            ? { onDelete: spec.onDelete }\n            : {}),\n        };\n        return Object.keys(patch).length\n          ? upserted(await this.destinations.update(destination.id, patch), UpsertOutcome.UPDATED)\n          : upserted(destination, UpsertOutcome.UNCHANGED);\n      }),\n    );\n    return updated;\n  }\n\n  /** Targets: the backends the platform configured (`catalog`, `core_entities`). Read only. */\n  readonly targets = {\n    /**\n     * List the targets, by slug: what a destination's `target` names; `slug` finds one.\n     * @throws {IngestError} 403 when the token may not list targets.\n     */\n    list: (filter?: TargetFilter): Promise<Page<TargetSummary>> =>\n      this.#transport.request<Page<TargetSummary>>({\n        method: 'GET',\n        path: '/targets',\n        query: listQuery(filter),\n      }),\n    /**\n     * Find the live target of a slug.\n     * @returns The target, or `null` when there is none.\n     * @throws {IngestError} 403 when the token may not list targets.\n     */\n    find: async (slug: string): Promise<TargetSummary | null> => {\n      const page = await this.targets.list({ slug, limit: 1 });\n      return page.results[0] ?? null;\n    },\n  };\n\n  /**\n   * Endpoints: the places in a target's API an entity is written to, listed\n   * under their target and read by its id and theirs. Read only.\n   */\n  readonly endpoints = {\n    /**\n     * List a target's endpoints (declared, and for the catalog its\n     * specifications); `id` or `slug` finds one. At most 100 a page.\n     * @throws {IngestError} 404 when there is no such target; 503 when the target cannot be read now; 403 when it refused the token.\n     */\n    listForTarget: (targetId: string, filter?: EndpointFilter): Promise<Page<EndpointSummary>> =>\n      this.#transport.request<Page<EndpointSummary>>({\n        method: 'GET',\n        path: `/targets/${segment(targetId)}/endpoints`,\n        query: listQuery(filter),\n      }),\n    /**\n     * Read one of a target's endpoints by its id (the organization's own id\n     * for it, what a destination's `endpointId` holds): as it runs, every\n     * section and key present; with `{ effective: false }`, as it was written.\n     * @returns The endpoint, or `null` when there is none.\n     * @throws {IngestError} 404 when there is no such target; 503 when the\n     *   target cannot be read now.\n     * @example\n     * const endpoint = await ingest.endpoints.get(catalog.id, destination.endpointId);\n     */\n    get: ((targetId: string, endpointId: string, options: EndpointReadOptions = {}) =>\n      this.#transport.request<Endpoint | EndpointAsWritten | null>({\n        method: 'GET',\n        path: `/targets/${segment(targetId)}/endpoints/${segment(endpointId)}`,\n        query: options.effective === false ? { effective: 'false' } : {},\n        tolerate: [404],\n        exclude: CONTENT.endpoint,\n      })) as EndpointGet,\n  };\n\n  /**\n   * Runs: one complete listing of a source (a backfill or a resync). On\n   * finalize, what the source owned and the run did not report is deleted,\n   * behind its guards. Prefer {@link IngestClient.runs.open}.\n   */\n  readonly runs = {\n    /**\n     * Open a run of the source, of some record types (all the source maps when omitted).\n     * @throws {RangeError} Before sending, for an empty `types` (omit it for all of them).\n     * @throws {IngestError} 409 when the source has an open run; 404 when there is no such source.\n     */\n    create: (sourceId: string, types?: string[]): Promise<Run> => {\n      if (types !== undefined && types.length === 0) {\n        return Promise.reject(\n          new RangeError('a run names at least one record type: omit types for all of them'),\n        );\n      }\n      return this.#transport.request<Run>({\n        method: 'POST',\n        path: `/sources/${segment(sourceId)}/runs`,\n        body: types ? { types } : {},\n      });\n    },\n    /**\n     * Read a run by id.\n     * @returns The run, or `null` when there is none.\n     * @throws {IngestError} 403 when the token may not read it.\n     */\n    get: (runId: string): Promise<Run | null> =>\n      this.#transport.request<Run | null>({\n        method: 'GET',\n        path: `/runs/${segment(runId)}`,\n        tolerate: [404],\n      }),\n    /**\n     * List the source's runs, newest first; of one status when asked.\n     * @throws {IngestError} 404 when there is no such source; 403 when the token may not read it.\n     */\n    list: async (sourceId: string, filter?: RunFilter): Promise<Page<Run>> =>\n      this.#transport.request<Page<Run>>({\n        method: 'GET',\n        path: `/sources/${segment(sourceId)}/runs`,\n        query: listQuery(filter),\n      }),\n    /**\n     * Send one batch of records to an open run (a run handle batches for\n     * you). Each record gets a UUIDv7 id unless it has one, which must be a\n     * UUIDv7.\n     * @throws {TypeError} Before sending, for an id that is not a UUIDv7.\n     */\n    sendRecords: async (sourceId: string, runId: string, records: InputSpec[]): Promise<Accepted> =>\n      this.inputs.create(\n        sourceId,\n        records.map((record) => ({ ...record, runId })),\n      ),\n    /**\n     * Finalize a run: it reconciles once every record is applied, behind the\n     * source's guards. `dryRun` reports what would be deleted and leaves it open.\n     * @param options Guard overrides for this run (`maxDeleteRatio` needs `ingest:source:write`).\n     * @throws {IngestError} 409 when the run is not open; 404 when there is no such run; 403 when the token may not write its source.\n     */\n    finalize: (runId: string, options: FinalizeOptions = {}): Promise<Run> => {\n      const { dryRun, ...settings } = options;\n      return this.#transport.request<Run>({\n        method: 'PATCH',\n        path: `/runs/${segment(runId)}`,\n        query: dryRunQuery({ dryRun }),\n        // The options go as the run answers them, under `finalize`.\n        body: {\n          status: RunStatus.FINALIZING,\n          ...(Object.keys(settings).length ? { finalize: settings } : {}),\n        },\n      });\n    },\n    /**\n     * Abort a run: closed without reconciling, nothing deleted.\n     * @throws {IngestError} 409 when the run is not open; 404 when there is no such run; 403 when the token may not write its source.\n     */\n    abort: (runId: string): Promise<Run> =>\n      this.#transport.request<Run>({\n        method: 'PATCH',\n        path: `/runs/${segment(runId)}`,\n        body: { status: RunStatus.ABORTED },\n      }),\n    /**\n     * Find the source's open run.\n     * @returns The run, or `null` when it has none.\n     * @throws {IngestError} 404 when there is no such source; 403 when the token may not read it.\n     */\n    findOpen: async (sourceId: string): Promise<Run | null> => {\n      // One open run per source, and it is the newest: the first page holds it.\n      const recent = await this.runs.list(sourceId, { limit: 5 });\n      return (\n        recent.results.find(\n          (run) => run.status === RunStatus.OPEN || run.status === RunStatus.FINALIZING,\n        ) ?? null\n      );\n    },\n    /**\n     * Open a run and get a handle to feed it: `add` every record, then\n     * `finalize` (or `abort` on any failure: it deletes nothing).\n     * @param options `types` limits the run; `onConflict` (`OnConflict.ABORT` by\n     *   default) aborts a run left open, `OnConflict.FAIL` throws its 409.\n     * @example\n     * const run = await ingest.runs.open(source.id, { types: ['deployment'], onConflict: OnConflict.ABORT });\n     * items.forEach((item) => run.add({ type: 'deployment', observedAt, payload: item }));\n     * const done = await run.finalize();\n     * @throws {RangeError} Before sending, for an empty `types`.\n     * @throws {IngestError} 404 when there is no such source; 409 when it has an open run and `onConflict` is `OnConflict.FAIL`.\n     */\n    open: async (sourceId: string, options: OpenRunOptions = {}): Promise<RunHandle> => {\n      let run: Run;\n      try {\n        run = await this.runs.create(sourceId, options.types);\n      } catch (error) {\n        if (\n          !(error instanceof IngestError && error.status === 409) ||\n          options.onConflict === OnConflict.FAIL\n        ) {\n          throw error;\n        }\n        const open = await this.runs.findOpen(sourceId);\n        if (open) {\n          await this.runs.abort(open.id);\n        }\n        run = await this.runs.create(sourceId, options.types);\n      }\n      return new RunHandle(this.runs, run, this.#batching);\n    },\n    /**\n     * Wait until every input of the run has been applied.\n     * @throws {TimeoutError} When it is not within `options.timeoutMs`.\n     */\n    waitApplied: (runId: string, options: WaitOptions = {}): Promise<Run> =>\n      poll(\n        () => mustExist(this.runs.get(runId), `run '${runId}'`),\n        (run) => run.pending === 0,\n        `run ${runId} to be applied`,\n        options,\n      ),\n    /**\n     * Wait until the run is closed: completed, guard tripped or aborted.\n     * @throws {TimeoutError} When it is not within `options.timeoutMs`.\n     */\n    waitClosed: (runId: string, options: WaitOptions = {}): Promise<Run> =>\n      poll(\n        () => mustExist(this.runs.get(runId), `run '${runId}'`),\n        (run) => TERMINAL_RUN.includes(run.status),\n        `run ${runId} to close`,\n        options,\n      ),\n    /**\n     * Wait until a dry-run finalize has been assessed (the run stays open).\n     * @throws {TimeoutError} When it is not within `options.timeoutMs`.\n     */\n    waitDryRun: (runId: string, options: WaitOptions = {}): Promise<Run> =>\n      poll(\n        () => mustExist(this.runs.get(runId), `run '${runId}'`),\n        (run) => run.finalize === null,\n        `dry run of ${runId} to be assessed`,\n        options,\n      ),\n  };\n\n  /** Events: a source's changes, one by one, between runs (the steady state). */\n  readonly events = {\n    /**\n     * Send one batch of events (an event batcher batches for you). `op`\n     * defaults to `EventOp.UPSERT`; each event gets a UUIDv7 id unless it has\n     * one, which must be a UUIDv7.\n     * @throws {TypeError} Before sending, for an id that is not a UUIDv7.\n     */\n    send: async (sourceId: string, events: EventSpec[]): Promise<Accepted> =>\n      this.inputs.create(\n        sourceId,\n        events.map((event) => ({ ...event, op: event.op ?? EventOp.UPSERT })),\n      ),\n    /**\n     * A batcher that sends events as they come, batched by count, bytes and\n     * time. Close it on shutdown.\n     * @example\n     * const events = ingest.events.batcher(source.id);\n     * events.upsert('deployment', deployment, { observedAt: event.time });\n     * await events.close();\n     * @throws {RangeError} For batching options out of range.\n     */\n    batcher: (sourceId: string, batching: Partial<BatcherOptions> = {}): EventBatcher =>\n      new EventBatcher((events) => this.events.send(sourceId, events), {\n        ...this.#batching,\n        ...batching,\n      }),\n  };\n\n  /** Inputs: every record and event a source sent, and what became of each. */\n  readonly inputs = {\n    /**\n     * Send one batch of inputs: records of the open runs they name (`runId`),\n     * or events. Run handles and event batchers batch for you. Each input gets\n     * a UUIDv7 id unless it has one, which must be a UUIDv7.\n     * @returns How many were accepted, and which were duplicates (an id sent before).\n     * @throws {TypeError} Before sending, for an id that is not a UUIDv7.\n     * @throws {IngestError} 409 when an id belongs to another source.\n     */\n    create: async (sourceId: string, inputs: InputSpec[]): Promise<Accepted> =>\n      this.#transport.request<Accepted>({\n        method: 'POST',\n        path: `/sources/${segment(sourceId)}/inputs`,\n        body: { data: inputs.map(inputOf) },\n        // Each input's id makes a resend a duplicate, never a second input.\n        idempotent: true,\n        exclude: CONTENT.inputs,\n      }),\n    /**\n     * List the source's input log, in arrival order, with what became of each input.\n     * @throws {IngestError} 400 for an `after` that is not the source's; 404 when there is no such source.\n     */\n    list: async (sourceId: string, filter?: InputFilter): Promise<Page<InputSummary>> =>\n      this.#transport.request<Page<InputSummary>>({\n        method: 'GET',\n        path: `/sources/${segment(sourceId)}/inputs`,\n        query: listQuery(filter),\n      }),\n    /**\n     * Read one input, its payload included.\n     * @returns The input, or `null` when there is none.\n     * @throws {IngestError} 403 when the token may not read the input log.\n     */\n    get: (inputId: string): Promise<Input | null> =>\n      this.#transport.request<Input | null>({\n        method: 'GET',\n        path: `/inputs/${segment(inputId)}`,\n        tolerate: [404],\n        exclude: CONTENT.input,\n      }),\n    /**\n     * Wait until the given inputs are all settled.\n     * @returns The inputs, in the order of `ids`.\n     * @throws {TimeoutError} When they are not within `options.timeoutMs`.\n     */\n    wait: async (ids: string[], options: WaitOptions = {}): Promise<Input[]> =>\n      poll(\n        () => Promise.all(ids.map((id) => mustExist(this.inputs.get(id), `input '${id}'`))),\n        (rows) => rows.every((row) => TERMINAL_INPUT.includes(row.status)),\n        `inputs ${ids.join(', ')} to settle`,\n        options,\n      ),\n    /**\n     * Wait until the source has no pending input.\n     * @throws {TimeoutError} When it does not within `options.timeoutMs`.\n     */\n    waitIdle: (sourceId: string, options: WaitOptions = {}): Promise<void> =>\n      poll(\n        () => this.inputs.list(sourceId, { status: InputStatus.PENDING, limit: 1 }),\n        (page) => page.results.length === 0,\n        `source ${sourceId} to be idle`,\n        options,\n      ).then(() => undefined),\n  };\n\n  /** Replays: the current mappings applied again to what a source owns (after changing one). */\n  readonly replays = {\n    /**\n     * Create a replay: each live entity's last record is queued again, in the\n     * background. With an `idempotencyKey`, a resend answers the same replay.\n     * @param request Which record types (all when omitted).\n     * @throws {IngestError} 404 when there is no such source; 409 when the idempotency key names another request.\n     */\n    create: (\n      sourceId: string,\n      request: ReplayRequest = {},\n      options: { idempotencyKey?: string } = {},\n    ): Promise<Replay> =>\n      this.#transport.request<Replay>({\n        method: 'POST',\n        path: `/sources/${segment(sourceId)}/replays`,\n        body: request,\n        headers: options.idempotencyKey ? { 'idempotency-key': options.idempotencyKey } : undefined,\n        idempotent: options.idempotencyKey !== undefined,\n      }),\n    /**\n     * Read a replay by id: its status and progress.\n     * @returns The replay, or `null` when there is none.\n     * @throws {IngestError} 403 when the token may not read it.\n     */\n    get: (replayId: string): Promise<Replay | null> =>\n      this.#transport.request<Replay | null>({\n        method: 'GET',\n        path: `/replays/${segment(replayId)}`,\n        tolerate: [404],\n      }),\n    /**\n     * List the source's replays, newest first; of one status when asked.\n     * @throws {IngestError} 404 when there is no such source; 403 when the token may not read it.\n     */\n    list: async (sourceId: string, filter?: ReplayFilter): Promise<Page<Replay>> =>\n      this.#transport.request<Page<Replay>>({\n        method: 'GET',\n        path: `/sources/${segment(sourceId)}/replays`,\n        query: listQuery(filter),\n      }),\n    /**\n     * Wait until the replay has queued everything (or failed); the inputs it\n     * queued may still be applying.\n     * @throws {TimeoutError} When it does not finish within `options.timeoutMs`.\n     */\n    wait: (replayId: string, options: WaitOptions = {}): Promise<Replay> =>\n      poll(\n        () => mustExist(this.replays.get(replayId), `replay '${replayId}'`),\n        (replay) =>\n          replay.status === ReplayStatus.COMPLETED || replay.status === ReplayStatus.FAILED,\n        `replay ${replayId} to finish`,\n        options,\n      ),\n  };\n\n  /** Entities: what a source owns, and what was last written to each. */\n  readonly entities = {\n    /**\n     * List the entities the source owns, with the data last written (no raw records).\n     * @throws {IngestError} 404 when there is no such source; 403 when the token may not read it.\n     */\n    list: async (sourceId: string, filter?: EntityFilter): Promise<Page<EntitySummary>> =>\n      this.#transport.request<Page<EntitySummary>>({\n        method: 'GET',\n        path: `/sources/${segment(sourceId)}/entities`,\n        query: listQuery(filter),\n        exclude: CONTENT.entities,\n      }),\n    /**\n     * Read one owned entity by its id, with the raw record it was last mapped\n     * from (needs `ingest:input:read`).\n     * @returns The entry, or `null` when there is none.\n     * @throws {IngestError} 403 when the token may not read the input log (`ingest:input:read`).\n     */\n    get: (entityId: string): Promise<Entity | null> =>\n      this.#transport.request<Entity | null>({\n        method: 'GET',\n        path: `/entities/${segment(entityId)}`,\n        tolerate: [404],\n        exclude: CONTENT.entity,\n      }),\n  };\n\n  /** Drift checks: what a source owns compared with what its targets hold. */\n  readonly driftChecks = {\n    /**\n     * Create a drift check of the source: `DriftPolicy.REPORT` (the default)\n     * flags what changed or went missing; `DriftPolicy.RESTORE` writes it back.\n     * @throws {IngestError} 404 when there is no such source; 403 when the token may not write it.\n     */\n    create: (sourceId: string, policy: DriftPolicy = DriftPolicy.REPORT): Promise<DriftCheck> =>\n      this.#transport.request<DriftCheck>({\n        method: 'POST',\n        path: `/sources/${segment(sourceId)}/drift_checks`,\n        body: { policy },\n      }),\n    /**\n     * Read a drift check by id.\n     * @returns The drift check, or `null` when there is none.\n     * @throws {IngestError} 403 when the token may not read it.\n     */\n    get: (checkId: string): Promise<DriftCheck | null> =>\n      this.#transport.request<DriftCheck | null>({\n        method: 'GET',\n        path: `/drift_checks/${segment(checkId)}`,\n        tolerate: [404],\n      }),\n    /**\n     * List the source's drift checks, newest first; of one status when asked.\n     * @throws {IngestError} 404 when there is no such source; 403 when the token may not read it.\n     */\n    list: async (sourceId: string, filter?: DriftCheckFilter): Promise<Page<DriftCheck>> =>\n      this.#transport.request<Page<DriftCheck>>({\n        method: 'GET',\n        path: `/sources/${segment(sourceId)}/drift_checks`,\n        query: listQuery(filter),\n      }),\n    /**\n     * Wait until a drift check is completed or failed.\n     * @throws {TimeoutError} When it is not within `options.timeoutMs`.\n     */\n    wait: (checkId: string, options: WaitOptions = {}): Promise<DriftCheck> =>\n      poll(\n        () => mustExist(this.driftChecks.get(checkId), `drift check '${checkId}'`),\n        (check) =>\n          check.status === DriftCheckStatus.COMPLETED || check.status === DriftCheckStatus.FAILED,\n        `drift check ${checkId}`,\n        options,\n      ),\n    /**\n     * Create a drift check and wait for it.\n     * @throws {TimeoutError} When it does not finish within `options.timeoutMs`.\n     */\n    createAndWait: async (\n      sourceId: string,\n      policy: DriftPolicy = DriftPolicy.REPORT,\n      options: WaitOptions = {},\n    ): Promise<DriftCheck> => {\n      const check = await this.driftChecks.create(sourceId, policy);\n      return this.driftChecks.wait(check.id, options);\n    },\n  };\n}\n","/**\n * Feeding a source, independent of how the collector was started:\n *\n *   runSnapshot   one full snapshot: upsert the source and its own mappings,\n *                 open a run, stream every record, finalize. A snapshot that\n *                 throws or is cancelled is aborted, so nothing is ever\n *                 deleted on the strength of a partial listing.\n *   runCollector  a long-running collector: a snapshot every interval (never\n *                 overlapping), the first when one is due by the source's\n *                 last run, and, when the collector has one, its watch,\n *                 restarted with a backoff when it fails; a watch that\n *                 recovers from a failure makes a snapshot due at once.\n *                 Stops on `signal`.\n *\n * The source is configured by slug (its stable name). Every upsert answers\n * with the id the API assigned it, which the calls that follow take; a\n * deleted source is revived with the same id, so an id stays valid.\n */\n\nimport type { FinalizeOptions } from '../types.js';\nimport type {\n  CollectedRecord,\n  CollectorDefinition,\n  EventPort,\n  IngestPort,\n  Logger,\n  RunSource,\n  SnapshotContext,\n  SnapshotResult,\n  UpsertedSource,\n  WatchContext,\n} from './types.js';\n\n/** What one snapshot takes besides the collector and the port. */\nexport interface RunSnapshotOptions {\n  /**\n   * The source it feeds: `slug`, its stable name, unique in the organization\n   * (one per deployment); `nrn`, where it lives and its key is granted (the\n   * organization's root unless given); `name`, over `definition.source.name`.\n   */\n  source: RunSource;\n  /** Where the run says what it does (`console` will do). */\n  log: Logger;\n  /** Aborting it cancels the snapshot: the run is aborted, nothing deleted. */\n  signal?: AbortSignal;\n  /** Told the record types the source applies, each time a snapshot reads them. */\n  applied?: (types: string[]) => void;\n}\n\n/** What a long-running collector takes besides the collector and the port. */\nexport interface RunCollectorOptions extends RunSnapshotOptions {\n  /** Stops the collector: `runCollector` resolves once everything in flight has stopped. */\n  signal: AbortSignal;\n  /**\n   * Seconds between the start of one snapshot and the next; 0 runs a single\n   * one, on start. Above 0, the first is due `intervalSeconds` after the\n   * source's last run started (any status), at once when it has none: a\n   * restart does not snapshot again before then.\n   */\n  intervalSeconds: number;\n  /**\n   * Backoff bounds for restarting a failed watch or a failed setup (1 s to 60 s).\n   * A watch restarted after a failure has recovered once it runs `retryMaxMs`.\n   */\n  retryMinMs?: number;\n  retryMaxMs?: number;\n}\n\n/** A source ready to be fed: its id, and the record types it applies (the only ones sent). */\nexport interface PreparedSource extends UpsertedSource {\n  types: string[];\n}\n\n/**\n * Records between two flushes the listing waits on. A full API batch: when\n * the API pushes back (429, its worker is behind) the listing pauses here\n * instead of buffering the rest of the system of record in memory.\n */\nexport const FLUSH_EVERY = 500;\n\nconst messageOf = (error: unknown) => (error instanceof Error ? error.message : String(error));\n\n/** Resolves after `ms`, or as soon as `signal` aborts. */\nexport function pause(ms: number, signal?: AbortSignal): Promise<void> {\n  return new Promise((resolve) => {\n    if (signal?.aborted) {\n      resolve();\n      return;\n    }\n    const timer = setTimeout(resolve, ms);\n    signal?.addEventListener(\n      'abort',\n      () => {\n        clearTimeout(timer);\n        resolve();\n      },\n      { once: true },\n    );\n  });\n}\n\n/** The record types a collector produces: its `recordTypes` and its own mappings'. */\nexport function declaredTypes(definition: CollectorDefinition): string[] {\n  return [\n    ...new Set([...(definition.recordTypes ?? []), ...Object.keys(definition.mappings ?? {})]),\n  ];\n}\n\n/**\n * Refuses a collector that could never feed a source: no source type, no\n * record types, a mapping with no endpoint, or no snapshot.\n * @throws {Error} naming what is missing.\n */\nexport function validateDefinition(definition: CollectorDefinition): void {\n  if (!definition.source?.type) {\n    throw new Error('collector: `source.type` is required');\n  }\n  if (declaredTypes(definition).length === 0) {\n    throw new Error(\n      'collector: declare the record types it produces (`recordTypes`, or its own `mappings`)',\n    );\n  }\n  const unrouted = Object.entries(definition.mappings ?? {}).find(\n    ([, mapping]) => !mapping?.endpoint,\n  );\n  if (unrouted) {\n    throw new Error(\n      `collector: mapping '${unrouted[0]}' needs an \\`endpoint\\` (the target's endpoint it writes to)`,\n    );\n  }\n  if (typeof definition.snapshot !== 'function') {\n    throw new Error('collector: `snapshot` is required');\n  }\n}\n\n/**\n * Creates or updates the source (by slug) and the collector's own mappings,\n * then learns which of its record types the source applies (an organization\n * binds a type's shared mappings once; a type it has not bound is not sent).\n * @throws {Error} when the source applies none of them: there is nothing to feed.\n */\nexport async function prepareSource(\n  definition: CollectorDefinition,\n  port: IngestPort,\n  options: RunSnapshotOptions,\n): Promise<PreparedSource> {\n  const source = await port.upsertSource({\n    ...definition.source,\n    ...options.source,\n    name: options.source.name || definition.source.name,\n  });\n  if (definition.mappings && Object.keys(definition.mappings).length) {\n    const changed = await port.upsertMappings(source.id, definition.mappings);\n    if (changed.length) {\n      options.log.info(`mappings updated: ${changed.join(', ')}`);\n    }\n  }\n  const declared = declaredTypes(definition);\n  const types = await port.appliedTypes(source.id, declared);\n  if (types.length === 0) {\n    throw new Error(\n      `no record type of this collector is bound for source ${source.slug}: bind the ` +\n        `${definition.source.type} type's mappings to endpoints ` +\n        '(POST /source_types/{source_type_id}/destinations, or /sources/{source_id}/destinations ' +\n        'for this source)',\n    );\n  }\n  const unbound = declared.filter((type) => !types.includes(type));\n  if (unbound.length) {\n    options.log.warn(`not bound for this source, not sent: ${unbound.join(', ')}`);\n  }\n  return { ...source, types };\n}\n\n/**\n * How long until the first snapshot is due: `0` when the source has no run,\n * or its last run started more than `intervalSeconds` ago; otherwise the rest\n * of the interval since then, never more than one interval (a run dated ahead\n * of this clock). Says what it decided, once; a last run that cannot be read\n * is logged and the snapshot is due at once.\n */\nasync function firstSnapshotDelay(\n  port: IngestPort,\n  source: UpsertedSource,\n  intervalSeconds: number,\n  log: Logger,\n): Promise<number> {\n  const intervalMs = intervalSeconds * 1000;\n  let last: { id: string; startedAt: number } | null;\n  try {\n    const latest = await port.lastRun(source.id);\n    const startedAt = latest ? Date.parse(latest.createdAt) : Number.NaN;\n    if (latest && Number.isNaN(startedAt)) {\n      throw new Error(`run ${latest.id} has no valid creation time ('${latest.createdAt}')`);\n    }\n    last = latest ? { id: latest.id, startedAt } : null;\n  } catch (error) {\n    log.error(`could not read the last run of source ${source.slug}: ${messageOf(error)}`);\n    log.info('snapshot due now (last run unknown)');\n    return 0;\n  }\n  if (!last) {\n    log.info('snapshot due now (no previous run)');\n    return 0;\n  }\n  const previous = `last run ${last.id} at ${new Date(last.startedAt).toISOString()}`;\n  const now = Date.now();\n  if (now - last.startedAt > intervalMs) {\n    log.info(`snapshot due now (${previous})`);\n    return 0;\n  }\n  const delay = Math.min(last.startedAt + intervalMs - now, intervalMs);\n  log.info(`next snapshot at ${new Date(now + delay).toISOString()} (${previous})`);\n  return delay;\n}\n\n/** Events of the types the source applies; the rest are not sent (the organization did not bind them). */\nfunction onlyApplied(events: EventPort, applied: () => Set<string>): EventPort {\n  return {\n    upsert: (type, payload, options) => {\n      if (applied().has(type)) {\n        events.upsert(type, payload, options);\n      }\n    },\n    delete: (type, payload, options) => {\n      if (applied().has(type)) {\n        events.delete(type, payload, options);\n      }\n    },\n    flush: () => events.flush(),\n    close: () => events.close(),\n  };\n}\n\nconst isAsyncIterable = (value: object): value is AsyncIterable<CollectedRecord> =>\n  Symbol.asyncIterator in value;\n\n/**\n * Hands every record to `visit`, one at a time, until the listing ends or\n * `visit` answers `false`. Each record waits for the one before it (a\n * flush included), in constant memory. The listing is closed when it is\n * left early or throws, as a `for await` would close it.\n */\nfunction eachRecord(\n  records: AsyncIterable<CollectedRecord> | Iterable<CollectedRecord>,\n  visit: (record: CollectedRecord) => boolean | Promise<boolean>,\n): Promise<void> {\n  const iterator = isAsyncIterable(records)\n    ? records[Symbol.asyncIterator]()\n    : records[Symbol.iterator]();\n  const close = () =>\n    Promise.resolve()\n      .then(() => iterator.return?.())\n      .catch(() => undefined);\n  return new Promise<void>((resolve, reject) => {\n    const fail = (error: unknown) => {\n      close().then(() => reject(error));\n    };\n    const next = (): void => {\n      Promise.resolve()\n        .then(() => iterator.next())\n        .then((step) => {\n          if (step.done) {\n            resolve();\n            return;\n          }\n          Promise.resolve()\n            .then(() => visit(step.value))\n            .then((more) => {\n              if (more) {\n                next();\n              } else {\n                close().then(() => resolve());\n              }\n            }, fail);\n        }, fail);\n    };\n    next();\n  });\n}\n\n/**\n * Takes one full snapshot of the collector's system of record into its\n * source: upserts the source and its own mappings, opens a run of the types\n * the source applies, streams every record the snapshot yields (pausing on a\n * flush every full batch), and finalizes. A snapshot that throws, yields a\n * record of a type it does not declare, or is cancelled is aborted: nothing\n * is deleted. A dry run is reported, then closed.\n * @returns The run as the API closed it.\n * @throws {Error} what made the snapshot fail, after aborting its run.\n * @example\n * const ingest = new ClientIngest(new IngestClient({ apiKey }));\n * const result = await runSnapshot(collector, ingest, { source: { slug: 'eu-cluster' }, log });\n * if (result.reconciliation?.guardTripped) {\n *   log.error('nothing deleted: a guard tripped');\n * }\n */\nexport async function runSnapshot(\n  definition: CollectorDefinition,\n  port: IngestPort,\n  options: RunSnapshotOptions,\n  finalizeOptions: FinalizeOptions = {},\n): Promise<SnapshotResult> {\n  validateDefinition(definition);\n  const { log } = options;\n  // Every snapshot upserts the source (one deleted since the last is revived) and reads which\n  // types it applies now.\n  const { types, ...source } = await prepareSource(definition, port, options);\n  options.applied?.(types);\n  const declared = declaredTypes(definition);\n  const run = await port.openRun(source.id, types);\n  log.info(`snapshot ${run.id} of ${source.slug}`);\n\n  const controller = new AbortController();\n  const stop = () => controller.abort();\n  options.signal?.addEventListener('abort', stop, { once: true });\n  // A stop while the source was set up or the run opened has already fired: never list past it.\n  if (options.signal?.aborted) {\n    stop();\n  }\n  const ctx: SnapshotContext = {\n    source,\n    log,\n    signal: controller.signal,\n    observedAt: new Date(),\n  };\n\n  let records = 0;\n  let unbound = 0;\n  try {\n    const listing = await definition.snapshot(ctx);\n    await eachRecord(listing, (record) => {\n      if (controller.signal.aborted) {\n        return false;\n      }\n      if (!declared.includes(record.type)) {\n        throw new Error(`record type '${record.type}' is not one this collector declares`);\n      }\n      if (!types.includes(record.type)) {\n        // Not bound for the source: the organization chose not to ingest it.\n        unbound += 1;\n        return true;\n      }\n      run.add({ ...record, observedAt: record.observedAt ?? ctx.observedAt });\n      records += 1;\n      return records % FLUSH_EVERY === 0 ? run.flush().then(() => true) : true;\n    });\n    if (controller.signal.aborted) {\n      throw new Error('the snapshot was cancelled');\n    }\n  } catch (error) {\n    // A partial listing must never be finalized: it would delete what it missed.\n    await run.abort().catch(() => undefined);\n    log.error(`snapshot ${run.id} aborted after ${records} record(s): ${messageOf(error)}`);\n    throw error;\n  } finally {\n    options.signal?.removeEventListener('abort', stop);\n  }\n\n  log.info(\n    `${records} record(s) sent${unbound ? ` (${unbound} of types not bound, not sent)` : ''}, ` +\n      'reconciling',\n  );\n  let result: SnapshotResult;\n  try {\n    result = await run.finalize(finalizeOptions);\n  } catch (error) {\n    // A batch failed (the run lost records) or the finalize did: close the run, deleting nothing.\n    await run.abort().catch(() => undefined);\n    log.error(`snapshot ${run.id} aborted, not finalized: ${messageOf(error)}`);\n    throw error;\n  }\n  const { reconciliation } = result;\n  if (reconciliation?.dryRun) {\n    // A dry run is assessed and left open: close it once reported, deleting nothing.\n    await run\n      .abort()\n      .catch((error) =>\n        log.error(`snapshot ${run.id}: could not close the dry run: ${messageOf(error)}`),\n      );\n    log.info(\n      `snapshot ${run.id} dry run: ${reconciliation.seen} seen, ${reconciliation.stale} stale (would be deleted); ` +\n        'nothing deleted',\n    );\n    return { ...result, status: 'aborted' };\n  }\n  if (reconciliation?.guardTripped) {\n    log.warn(\n      `snapshot ${run.id}: nothing deleted, ${reconciliation.guardReason ?? 'a guard tripped'}`,\n    );\n  } else {\n    const outcome = reconciliation\n      ? `${reconciliation.seen} seen, ${reconciliation.stale} stale, ${reconciliation.deleted} deleted`\n      : `${records} record(s)`;\n    log.info(`snapshot ${run.id} ${result.status}: ${outcome}`);\n  }\n  return result;\n}\n\n/**\n * Runs a collector until `options.signal` aborts: sets its source up\n * (retrying with a backoff), then a snapshot every `intervalSeconds` (never\n * two at once; `0`: one, on start) and, when the collector watches, its\n * watch, which starts at once. The first snapshot is due by the source's last\n * run (the API's runs, any status): at once when it has none or it started\n * more than `intervalSeconds` ago, else when the interval since it is over, so\n * a restart or a crash loop does not backfill again; a last run that cannot\n * be read is logged and the snapshot runs at once. The watch\n * sends only the types the source applies and is restarted with a backoff\n * when it fails or ends. A watch that failed and has then run `retryMaxMs`\n * without failing makes a snapshot due at once (after the one running, if\n * any): only a snapshot deletes what vanished while it was down. One per\n * recovered outage, however many restarts it took, and none with an\n * `intervalSeconds` of 0; the schedule continues from it. A failed snapshot\n * is logged and the next one runs on schedule. Every scheduled snapshot finalizes with `finalizeOptions`\n * (`{ dryRun: true }`: each is assessed and closed, nothing deleted).\n * @returns Once everything in flight has stopped.\n * @example\n * const stop = new AbortController();\n * process.on('SIGTERM', () => stop.abort());\n * await runCollector(collector, new ClientIngest(new IngestClient({ apiKey })), {\n *   source: { slug: 'eu-cluster' },\n *   log: console,\n *   signal: stop.signal,\n *   intervalSeconds: 86400,\n * });\n */\nexport async function runCollector(\n  definition: CollectorDefinition,\n  port: IngestPort,\n  options: RunCollectorOptions,\n  finalizeOptions: FinalizeOptions = {},\n): Promise<void> {\n  validateDefinition(definition);\n  const { signal, log } = options;\n  const retryMinMs = options.retryMinMs ?? 1_000;\n  const retryMaxMs = options.retryMaxMs ?? 60_000;\n\n  // The source and mappings must exist before a watch may send events. The\n  // watch keeps this id; each snapshot upserts the source again and uses the\n  // id that answers (the same one: a revived source keeps its id), and the\n  // types it applies now, which is what the watch sends.\n  const setUp = async (backoff: number): Promise<PreparedSource | undefined> => {\n    if (signal.aborted) {\n      return undefined;\n    }\n    try {\n      return await prepareSource(definition, port, options);\n    } catch (error) {\n      log.error(`could not set up source ${options.source.slug}: ${messageOf(error)}; retrying`);\n      await pause(backoff, signal);\n      return setUp(Math.min(backoff * 2, retryMaxMs));\n    }\n  };\n  const prepared = await setUp(retryMinMs);\n  if (!prepared) {\n    return;\n  }\n  const { types: appliedTypes, ...source } = prepared;\n  let applied = new Set(appliedTypes);\n  const snapshotOptions = {\n    ...options,\n    applied: (types: string[]) => {\n      applied = new Set(types);\n    },\n  };\n\n  // A watch that recovers from an outage makes a snapshot due at once: what vanished\n  // meanwhile only a snapshot deletes. It wakes the schedule's wait; one due while a\n  // snapshot runs is kept, and runs when that one ends.\n  let resyncDue = false;\n  let wake: (() => void) | undefined;\n  const resync = (failures: number) => {\n    if (signal.aborted) {\n      return;\n    }\n    log.info(`snapshot due now (watch recovered after ${failures} failure(s))`);\n    resyncDue = true;\n    wake?.();\n  };\n  // Resolves after `ms`, on the stop, or once a resync is due.\n  const untilDue = async (ms: number): Promise<void> => {\n    if (resyncDue || signal.aborted) {\n      return;\n    }\n    const sleeping = new AbortController();\n    const stop = () => sleeping.abort();\n    signal.addEventListener('abort', stop, { once: true });\n    wake = stop;\n    await pause(ms, sleeping.signal);\n    wake = undefined;\n    signal.removeEventListener('abort', stop);\n  };\n\n  const snapshots = async (): Promise<void> => {\n    if (signal.aborted) {\n      return;\n    }\n    resyncDue = false;\n    const started = Date.now();\n    try {\n      await runSnapshot(definition, port, snapshotOptions, finalizeOptions);\n    } catch (error) {\n      if (!signal.aborted) {\n        log.error(`snapshot failed: ${messageOf(error)}`);\n      }\n    }\n    if (options.intervalSeconds <= 0) {\n      return;\n    }\n    await untilDue(Math.max(0, options.intervalSeconds * 1000 - (Date.now() - started)));\n    await snapshots();\n  };\n\n  // `failures`: how many times in a row the watch has failed, since it last recovered.\n  const watching = async (delay: number, failures: number): Promise<void> => {\n    if (!definition.watch || signal.aborted) {\n      return;\n    }\n    const events = onlyApplied(port.events(source.id), () => applied);\n    const ctx: WatchContext = {\n      source,\n      log,\n      signal,\n      events,\n    };\n    const started = Date.now();\n    // Restarted after a failure, it has recovered once it stays up as long as the backoff ceiling.\n    let outage = failures;\n    const recovery =\n      failures > 0 && options.intervalSeconds > 0\n        ? setTimeout(() => {\n            outage = 0;\n            resync(failures);\n          }, retryMaxMs)\n        : undefined;\n    try {\n      await definition.watch(ctx);\n      await events.close();\n      if (signal.aborted) {\n        return;\n      }\n      log.info('watch ended; restarting');\n    } catch (error) {\n      await events.close().catch(() => undefined);\n      if (signal.aborted) {\n        return;\n      }\n      log.error(`watch failed: ${messageOf(error)}; restarting`);\n      outage += 1;\n    } finally {\n      clearTimeout(recovery);\n    }\n    // A watch that ran for a while earns a fresh backoff.\n    const wait = Date.now() - started > retryMaxMs ? retryMinMs : delay;\n    await pause(wait, signal);\n    await watching(Math.min(wait * 2, retryMaxMs), outage);\n  };\n\n  // A restart snapshots only when one is due by the source's last run; the watch starts at once.\n  const scheduled = async (): Promise<void> => {\n    if (options.intervalSeconds > 0) {\n      const delay = await firstSnapshotDelay(port, source, options.intervalSeconds, log);\n      if (delay > 0) {\n        await untilDue(delay);\n      }\n    }\n    await snapshots();\n  };\n\n  await Promise.all([scheduled(), watching(retryMinMs, 0)]);\n}\n","import { DEFAULT_AUTH_BASE_URL, IngestClient, type IngestClientOptions } from '../client.js';\nimport { OnConflict, UpsertOutcome } from '../enums.js';\nimport { everyPageFor } from '../pages.js';\nimport type { FinalizeOptions, Upserted } from '../types.js';\nimport {\n  DEFAULT_MAPPING_TARGET,\n  type CollectedEventOptions,\n  type CollectorMapping,\n  type EventPort,\n  type IngestPort,\n  type LastRun,\n  type RunPort,\n  type SnapshotResult,\n  type SourceSpec,\n  type UpsertedSource,\n} from './types.js';\n\nconst compact = <Fields extends Record<string, unknown>>(value: Fields): Fields =>\n  Object.fromEntries(Object.entries(value).filter(([, field]) => field !== undefined)) as Fields;\n\nconst iso = (value: Date | string | undefined): string | undefined => {\n  if (value === undefined) {\n    return undefined;\n  }\n  return value instanceof Date ? value.toISOString() : value;\n};\n\n/** The event options the client takes: the observation time as ISO text, and the id. */\nconst eventOptions = (options: CollectedEventOptions = {}) =>\n  compact({ id: options.id, observedAt: iso(options.observedAt) });\n\n/**\n * Where a collector's API is and how it authenticates, and the client's\n * tuning (timeouts, retries, backpressure, batching, `fetchImpl`), passed to\n * it as given.\n */\nexport interface ConnectOptions extends Omit<\n  IngestClientOptions,\n  'authBaseURL' | 'baseURL' | 'apiKey' | 'token' | 'getToken'\n> {\n  /**\n   * The nullplatform API: where an API key is exchanged, and where the ingest\n   * API is served (`<authBaseURL>/catalog/ingest`) unless `baseURL` says\n   * otherwise. Default: https://api.nullplatform.com\n   */\n  authBaseURL?: string;\n  /** The ingest API itself, when it is not under `authBaseURL` (a local one, in development). */\n  baseURL?: string;\n  /** A nullplatform API key. */\n  apiKey?: string;\n  /** A ready token (a local API); takes the place of the API key. */\n  token?: string;\n}\n\n/** Where the public API serves the ingest API. */\nconst INGEST_PATH = '/catalog/ingest';\n\n/**\n * The `IngestPort` of the real API, through an `IngestClient`: what a\n * collector feeds outside tests and local runs.\n * @example\n * const ingest = new ClientIngest(new IngestClient({ apiKey: process.env.NP_API_KEY }));\n * await runCollector(collector, ingest, { source: { slug: 'eu-cluster' }, log, signal, intervalSeconds: 86400 });\n */\nexport class ClientIngest implements IngestPort {\n  readonly #client: IngestClient;\n\n  constructor(client: IngestClient) {\n    this.#client = client;\n  }\n\n  /**\n   * The port of the ingest API under `authBaseURL` (or at `baseURL`),\n   * authenticated by a token when given, else by the API key, its client\n   * tuned by the rest of `options`.\n   * @throws {Error} when neither an API key nor a token is given.\n   * @example\n   * const ingest = ClientIngest.connect({ apiKey: process.env.NP_API_KEY, timeoutMs: 60_000 });\n   */\n  static connect(options: ConnectOptions): ClientIngest {\n    const {\n      authBaseURL: authBaseURLOption,\n      baseURL: baseURLOption,\n      apiKey,\n      token,\n      ...tuning\n    } = options;\n    const authBaseURL = (authBaseURLOption ?? DEFAULT_AUTH_BASE_URL).replace(/\\/+$/, '');\n    const baseURL = baseURLOption || `${authBaseURL}${INGEST_PATH}`;\n    if (token) {\n      return new ClientIngest(new IngestClient({ ...tuning, baseURL, token }));\n    }\n    if (!apiKey) {\n      throw new Error('an API key or a token is required to feed the ingest API');\n    }\n    return new ClientIngest(new IngestClient({ ...tuning, baseURL, apiKey, authBaseURL }));\n  }\n\n  async upsertSource(source: SourceSpec): Promise<UpsertedSource> {\n    const [upserted] = await this.#client.sources.upsert([\n      compact({\n        slug: source.slug,\n        nrn: source.nrn,\n        name: source.name,\n        type: source.type,\n        description: source.description,\n        attributes: source.attributes,\n        runs: source.runs && compact({ ...source.runs }),\n      }),\n    ]);\n    return { id: upserted.id, slug: upserted.slug };\n  }\n\n  /**\n   * The client's two upserts: the source's own mapping of each record type,\n   * then its destination at the target and endpoint it names. A destination\n   * of the mapping to another endpoint is left alone (a record type may go to\n   * several). What was written is what the upserts say they did: a mapping or\n   * destination created or updated.\n   */\n  async upsertMappings(\n    sourceId: string,\n    mappings: Record<string, CollectorMapping>,\n  ): Promise<string[]> {\n    const entries = Object.entries(mappings);\n    const upserted = await this.#client.mappings.upsertForSource(\n      sourceId,\n      entries.map(([recordType, mapping]) => ({\n        recordType,\n        engine: mapping.engine,\n        expression: mapping.expression,\n      })),\n    );\n    const bound = await this.#client.destinations.upsertForSource(\n      sourceId,\n      upserted.map((mapping, index) => {\n        const { target, endpoint, enabled } = entries[index][1];\n        return compact({\n          mappingId: mapping.id,\n          target: target ?? DEFAULT_MAPPING_TARGET,\n          endpoint,\n          enabled,\n        });\n      }),\n    );\n    const written = (resource: Upserted<object>) => resource.upserted !== UpsertOutcome.UNCHANGED;\n    return entries\n      .filter((_, index) => written(upserted[index]) || written(bound[index]))\n      .map(([recordType]) => recordType);\n  }\n\n  /** The types of `types` the source applies: what it applies (enabled only), queried by those types. */\n  async appliedTypes(sourceId: string, types: string[]): Promise<string[]> {\n    const applied = await everyPageFor(types, (recordType, page) =>\n      this.#client.destinations.listForSource(sourceId, { recordType, ...page }),\n    );\n    const bound = new Set(applied.map((destination) => destination.recordType));\n    return types.filter((type) => bound.has(type));\n  }\n\n  /** The source's newest run, of any status: one run, asked newest first. */\n  async lastRun(sourceId: string): Promise<LastRun | null> {\n    const page = await this.#client.runs.list(sourceId, { limit: 1, sort: 'createdAt:desc' });\n    const [latest] = page.results;\n    return latest ? { id: latest.id, createdAt: latest.createdAt } : null;\n  }\n\n  async openRun(sourceId: string, types: string[]): Promise<RunPort> {\n    const handle = await this.#client.runs.open(sourceId, {\n      types,\n      onConflict: OnConflict.ABORT,\n    });\n    let records = 0;\n    return {\n      id: handle.id,\n      add: (record) => {\n        records += 1;\n        handle.add(\n          compact({\n            id: record.id,\n            type: record.type,\n            observedAt: iso(record.observedAt),\n            payload: record.payload,\n          }),\n        );\n      },\n      flush: () => handle.flush(),\n      finalize: async (options: FinalizeOptions = {}): Promise<SnapshotResult> => {\n        const run = await handle.finalize(\n          compact({\n            dryRun: options.dryRun,\n            allowFailures: options.allowFailures,\n            allowRejections: options.allowRejections,\n            maxDeleteRatio: options.maxDeleteRatio,\n          }),\n        );\n        return {\n          runId: run.id,\n          status: run.status,\n          records,\n          counters: run.counters,\n          reconciliation: run.reconciliation,\n        };\n      },\n      abort: async () => {\n        await handle.abort();\n      },\n    };\n  }\n\n  events(sourceId: string): EventPort {\n    const batcher = this.#client.events.batcher(sourceId);\n    return {\n      upsert: (type, payload, options) => {\n        batcher.upsert(type, payload, eventOptions(options));\n      },\n      delete: (type, payload, options) => {\n        batcher.delete(type, payload, eventOptions(options));\n      },\n      flush: () => batcher.flush(),\n      close: () => batcher.close(),\n    };\n  }\n}\n"],"ignoreList":[1,2,3,4,5,6,7,8],"mappings":";;;;;;;;;;;AAMA,IAAY,eAAL,yBAAA,cAAA;CACL,aAAA,uBAAA;CACA,aAAA,UAAA;;AACF,EAAA,CAAA,CAAA;;AAGA,IAAY,YAAL,y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