{"version":3,"sources":["","../../node_modules/crypto-js/core.js","../../node_modules/crypto-js/sha256.js","../../node_modules/@appland/sql-parser/dist/sqlite-parser.js","../../node_modules/base64-js/index.js","../../node_modules/ieee754/index.js","../../node_modules/buffer/index.js","../../node_modules/@appland/components/node_modules/sql-formatter/lib/core/tokenTypes.js","../../node_modules/@appland/components/node_modules/sql-formatter/lib/utils.js","../../node_modules/@appland/components/node_modules/sql-formatter/lib/core/Indentation.js","../../node_modules/@appland/components/node_modules/sql-formatter/lib/core/InlineBlock.js","../../node_modules/@appland/components/node_modules/sql-formatter/lib/core/Params.js","../../node_modules/@appland/components/node_modules/sql-formatter/lib/core/token.js","../../node_modules/@appland/components/node_modules/sql-formatter/lib/core/Formatter.js","../../node_modules/@appland/components/node_modules/sql-formatter/lib/core/regexFactory.js","../../node_modules/@appland/components/node_modules/sql-formatter/lib/core/Tokenizer.js","../../node_modules/@appland/components/node_modules/sql-formatter/lib/languages/Db2Formatter.js","../../node_modules/@appland/components/node_modules/sql-formatter/lib/languages/MariaDbFormatter.js","../../node_modules/@appland/components/node_modules/sql-formatter/lib/languages/MySqlFormatter.js","../../node_modules/@appland/components/node_modules/sql-formatter/lib/languages/N1qlFormatter.js","../../node_modules/@appland/components/node_modules/sql-formatter/lib/languages/PlSqlFormatter.js","../../node_modules/@appland/components/node_modules/sql-formatter/lib/languages/PostgreSqlFormatter.js","../../node_modules/@appland/components/node_modules/sql-formatter/lib/languages/RedshiftFormatter.js","../../node_modules/@appland/components/node_modules/sql-formatter/lib/languages/SparkSqlFormatter.js","../../node_modules/@appland/components/node_modules/sql-formatter/lib/languages/StandardSqlFormatter.js","../../node_modules/@appland/components/node_modules/sql-formatter/lib/languages/TSqlFormatter.js","../../node_modules/@appland/components/node_modules/sql-formatter/lib/sqlFormatter.js","../../node_modules/highlight.js/lib/core.js","../../node_modules/@appland/openapi/src/statusCodes.ts","../../node_modules/@appland/openapi/src/appmap/propertiesParserV1.ts","../../node_modules/@appland/openapi/src/appmap/propertiesParserV2.ts","../../node_modules/@appland/openapi/src/appmap/index.ts","../../node_modules/@appland/openapi/src/util.ts","../../node_modules/@appland/openapi/src/schemaInferrer.ts","../../node_modules/@appland/openapi/src/Warnings.ts","../../node_modules/@appland/openapi/src/response.ts","../../node_modules/url/node_modules/punycode/punycode.js","../../node_modules/es-errors/range.js","../../node_modules/es-errors/syntax.js","../../node_modules/es-errors/type.js","../../node_modules/has-symbols/shams.js","../../node_modules/has-symbols/index.js","../../node_modules/has-proto/index.js","../../node_modules/function-bind/implementation.js","../../node_modules/function-bind/index.js","../../node_modules/hasown/index.js","../../node_modules/get-intrinsic/index.js","../../node_modules/has-property-descriptors/index.js","../../node_modules/gopd/index.js","../../node_modules/define-data-property/index.js","../../node_modules/set-function-length/index.js","../../node_modules/call-bind/index.js","../../node_modules/call-bind/callBound.js","../../node_modules/object-inspect/index.js","../../node_modules/side-channel/index.js","../../node_modules/qs/lib/formats.js","../../node_modules/qs/lib/utils.js","../../node_modules/qs/lib/stringify.js","../../node_modules/qs/lib/parse.js","../../node_modules/qs/lib/index.js","../../node_modules/url/url.js","../../node_modules/@appland/openapi/src/rpcRequest.ts","../../node_modules/@appland/openapi/src/objectSchema.ts","../../node_modules/@appland/openapi/src/method.ts","../../node_modules/@appland/openapi/src/path.ts","../../node_modules/@appland/openapi/src/model.ts","../../node_modules/@appland/openapi/src/securitySchemes.ts","../../node_modules/@appland/models/src/codeObjectType.js","../../node_modules/@appland/models/src/codeObjectId.js","../../node_modules/@appland/models/src/util.js","../../node_modules/@appland/models/src/sql/normalize.js","../../node_modules/@appland/models/src/sql/parse.js","../../node_modules/@appland/models/src/sql/parseError.js","../../node_modules/@appland/models/src/sql/sqlErrorHandler.js","../../node_modules/@appland/models/src/sql/analyze.js","../../node_modules/@appland/models/src/codeObject.js","../../node_modules/@appland/models/src/classMap.js","../../node_modules/@appland/models/src/callTree/callNode.js","../../node_modules/@appland/models/src/eventSource.js","../../node_modules/@appland/models/src/callTree/callTree.js","../../node_modules/@appland/models/src/appMap.js","../../node_modules/@appland/models/src/hashBuilder.js","../../node_modules/@appland/models/src/event.js","../../node_modules/@appland/models/src/appMapBuilder/eventStack.js","../../node_modules/@appland/models/src/appMapBuilder/eventSorter.js","../../node_modules/@appland/models/src/appMapBuilder/index.js","../../node_modules/@appland/models/src/eventNavigator.js","../../node_modules/@appland/models/src/eventInfo.js","../../node_modules/@appland/models/src/appMapFilter.js","../../node_modules/@appland/models/src/serialize.js","../../node_modules/@appland/openapi/src/parseHTTPServerRequests.ts","../../node_modules/@appland/openapi/src/index.ts","../../node_modules/yallist/iterator.js","../../node_modules/yallist/yallist.js","../../node_modules/lru-cache/index.js","../../node_modules/@appland/sequence-diagram/dist/mergeWindow.js","../../node_modules/@appland/sequence-diagram/dist/selectEvents.js","../../node_modules/@appland/sequence-diagram/dist/buildDiagram.js","../../node_modules/@datastructures-js/heap/src/heap.js","../../node_modules/@datastructures-js/heap/src/minHeap.js","../../node_modules/@datastructures-js/heap/src/maxHeap.js","../../node_modules/@datastructures-js/heap/index.js","../../node_modules/@datastructures-js/priority-queue/src/minPriorityQueue.js","../../node_modules/@datastructures-js/priority-queue/src/maxPriorityQueue.js","../../node_modules/@datastructures-js/priority-queue/src/priorityQueue.js","../../node_modules/@datastructures-js/priority-queue/index.js","../../node_modules/@appland/sequence-diagram/dist/diff.js","../../node_modules/@appland/sequence-diagram/dist/buildDiffDiagram.js","../../node_modules/@appland/sequence-diagram/dist/unparseDiagram.js","../../node_modules/@appland/sequence-diagram/dist/validateDiagram.js","../../node_modules/@appland/sequence-diagram/dist/formatter/json.js","../../node_modules/diff/src/diff/base.js","../../node_modules/diff/src/diff/character.js","../../node_modules/diff/src/util/params.js","../../node_modules/diff/src/diff/word.js","../../node_modules/diff/src/diff/line.js","../../node_modules/diff/src/diff/sentence.js","../../node_modules/diff/src/diff/css.js","../../node_modules/diff/src/diff/json.js","../../node_modules/diff/src/diff/array.js","../../node_modules/diff/src/patch/parse.js","../../node_modules/diff/src/util/distance-iterator.js","../../node_modules/diff/src/patch/apply.js","../../node_modules/diff/src/patch/create.js","../../node_modules/diff/src/util/array.js","../../node_modules/diff/src/patch/merge.js","../../node_modules/diff/src/convert/dmp.js","../../node_modules/diff/src/convert/xml.js","../../node_modules/diff/src/index.js","../../node_modules/@appland/sequence-diagram/dist/formatter/plantUML.js","../../node_modules/@appland/sequence-diagram/dist/formatter/text.js","../../node_modules/@appland/sequence-diagram/dist/formatter.js","../../node_modules/@appland/sequence-diagram/dist/priority.js","../../node_modules/@appland/sequence-diagram/dist/specification.js","../../node_modules/@appland/sequence-diagram/dist/types.js","../../node_modules/d3-selection/src/namespaces.js","../../node_modules/d3-selection/src/namespace.js","../../node_modules/d3-selection/src/creator.js","../../node_modules/d3-selection/src/selector.js","../../node_modules/d3-selection/src/selection/select.js","../../node_modules/d3-selection/src/array.js","../../node_modules/d3-selection/src/selectorAll.js","../../node_modules/d3-selection/src/selection/selectAll.js","../../node_modules/d3-selection/src/matcher.js","../../node_modules/d3-selection/src/selection/selectChild.js","../../node_modules/d3-selection/src/selection/selectChildren.js","../../node_modules/d3-selection/src/selection/filter.js","../../node_modules/d3-selection/src/selection/sparse.js","../../node_modules/d3-selection/src/selection/enter.js","../../node_modules/d3-selection/src/constant.js","../../node_modules/d3-selection/src/selection/data.js","../../node_modules/d3-selection/src/selection/exit.js","../../node_modules/d3-selection/src/selection/join.js","../../node_modules/d3-selection/src/selection/merge.js","../../node_modules/d3-selection/src/selection/order.js","../../node_modules/d3-selection/src/selection/sort.js","../../node_modules/d3-selection/src/selection/call.js","../../node_modules/d3-selection/src/selection/nodes.js","../../node_modules/d3-selection/src/selection/node.js","../../node_modules/d3-selection/src/selection/size.js","../../node_modules/d3-selection/src/selection/empty.js","../../node_modules/d3-selection/src/selection/each.js","../../node_modules/d3-selection/src/selection/attr.js","../../node_modules/d3-selection/src/window.js","../../node_modules/d3-selection/src/selection/style.js","../../node_modules/d3-selection/src/selection/property.js","../../node_modules/d3-selection/src/selection/classed.js","../../node_modules/d3-selection/src/selection/text.js","../../node_modules/d3-selection/src/selection/html.js","../../node_modules/d3-selection/src/selection/raise.js","../../node_modules/d3-selection/src/selection/lower.js","../../node_modules/d3-selection/src/selection/append.js","../../node_modules/d3-selection/src/selection/insert.js","../../node_modules/d3-selection/src/selection/remove.js","../../node_modules/d3-selection/src/selection/clone.js","../../node_modules/d3-selection/src/selection/datum.js","../../node_modules/d3-selection/src/selection/on.js","../../node_modules/d3-selection/src/selection/dispatch.js","../../node_modules/d3-selection/src/selection/iterator.js","../../node_modules/d3-selection/src/selection/index.js","../../node_modules/d3-selection/src/select.js","../../node_modules/d3-selection/src/sourceEvent.js","../../node_modules/d3-selection/src/pointer.js","../../node_modules/d3-selection/src/selectAll.js","../../node_modules/d3-selection/src/index.js","../../node_modules/deepmerge/dist/cjs.js","../../node_modules/d3-dispatch/src/dispatch.js","../../node_modules/d3-dispatch/src/index.js","../../node_modules/d3-drag/src/noevent.js","../../node_modules/d3-drag/src/nodrag.js","../../node_modules/d3-drag/src/index.js","../../node_modules/d3-color/src/define.js","../../node_modules/d3-color/src/color.js","../../node_modules/d3-color/src/math.js","../../node_modules/d3-color/src/lab.js","../../node_modules/d3-color/src/index.js","../../node_modules/d3-interpolate/src/basis.js","../../node_modules/d3-interpolate/src/basisClosed.js","../../node_modules/d3-interpolate/src/constant.js","../../node_modules/d3-interpolate/src/color.js","../../node_modules/d3-interpolate/src/rgb.js","../../node_modules/d3-interpolate/src/numberArray.js","../../node_modules/d3-interpolate/src/array.js","../../node_modules/d3-interpolate/src/date.js","../../node_modules/d3-interpolate/src/number.js","../../node_modules/d3-interpolate/src/object.js","../../node_modules/d3-interpolate/src/string.js","../../node_modules/d3-interpolate/src/value.js","../../node_modules/d3-interpolate/src/round.js","../../node_modules/d3-interpolate/src/transform/decompose.js","../../node_modules/d3-interpolate/src/transform/parse.js","../../node_modules/d3-interpolate/src/transform/index.js","../../node_modules/d3-interpolate/src/zoom.js","../../node_modules/d3-interpolate/src/hcl.js","../../node_modules/d3-interpolate/src/index.js","../../node_modules/d3-timer/src/timer.js","../../node_modules/d3-timer/src/timeout.js","../../node_modules/d3-timer/src/index.js","../../node_modules/d3-transition/src/transition/schedule.js","../../node_modules/d3-transition/src/interrupt.js","../../node_modules/d3-transition/src/selection/interrupt.js","../../node_modules/d3-transition/src/transition/tween.js","../../node_modules/d3-transition/src/transition/interpolate.js","../../node_modules/d3-transition/src/transition/attr.js","../../node_modules/d3-transition/src/transition/attrTween.js","../../node_modules/d3-transition/src/transition/delay.js","../../node_modules/d3-transition/src/transition/duration.js","../../node_modules/d3-transition/src/transition/ease.js","../../node_modules/d3-transition/src/transition/easeVarying.js","../../node_modules/d3-transition/src/transition/filter.js","../../node_modules/d3-transition/src/transition/merge.js","../../node_modules/d3-transition/src/transition/on.js","../../node_modules/d3-transition/src/transition/remove.js","../../node_modules/d3-transition/src/transition/select.js","../../node_modules/d3-transition/src/transition/selectAll.js","../../node_modules/d3-transition/src/transition/selection.js","../../node_modules/d3-transition/src/transition/style.js","../../node_modules/d3-transition/src/transition/styleTween.js","../../node_modules/d3-transition/src/transition/text.js","../../node_modules/d3-transition/src/transition/textTween.js","../../node_modules/d3-transition/src/transition/transition.js","../../node_modules/d3-transition/src/transition/end.js","../../node_modules/d3-transition/src/transition/index.js","../../node_modules/d3-ease/src/cubic.js","../../node_modules/d3-ease/src/index.js","../../node_modules/d3-transition/src/selection/transition.js","../../node_modules/d3-transition/src/selection/index.js","../../node_modules/d3-transition/src/index.js","../../node_modules/d3-zoom/src/constant.js","../../node_modules/d3-zoom/src/event.js","../../node_modules/d3-zoom/src/transform.js","../../node_modules/d3-zoom/src/noevent.js","../../node_modules/d3-zoom/src/zoom.js","../../node_modules/d3-zoom/src/index.js","../../node_modules/lodash/_listCacheClear.js","../../node_modules/lodash/eq.js","../../node_modules/lodash/_assocIndexOf.js","../../node_modules/lodash/_listCacheDelete.js","../../node_modules/lodash/_listCacheGet.js","../../node_modules/lodash/_listCacheHas.js","../../node_modules/lodash/_listCacheSet.js","../../node_modules/lodash/_ListCache.js","../../node_modules/lodash/_stackClear.js","../../node_modules/lodash/_stackDelete.js","../../node_modules/lodash/_stackGet.js","../../node_modules/lodash/_stackHas.js","../../node_modules/lodash/_freeGlobal.js","../../node_modules/lodash/_root.js","../../node_modules/lodash/_Symbol.js","../../node_modules/lodash/_getRawTag.js","../../node_modules/lodash/_objectToString.js","../../node_modules/lodash/_baseGetTag.js","../../node_modules/lodash/isObject.js","../../node_modules/lodash/isFunction.js","../../node_modules/lodash/_coreJsData.js","../../node_modules/lodash/_isMasked.js","../../node_modules/lodash/_toSource.js","../../node_modules/lodash/_baseIsNative.js","../../node_modules/lodash/_getValue.js","../../node_modules/lodash/_getNative.js","../../node_modules/lodash/_Map.js","../../node_modules/lodash/_nativeCreate.js","../../node_modules/lodash/_hashClear.js","../../node_modules/lodash/_hashDelete.js","../../node_modules/lodash/_hashGet.js","../../node_modules/lodash/_hashHas.js","../../node_modules/lodash/_hashSet.js","../../node_modules/lodash/_Hash.js","../../node_modules/lodash/_mapCacheClear.js","../../node_modules/lodash/_isKeyable.js","../../node_modules/lodash/_getMapData.js","../../node_modules/lodash/_mapCacheDelete.js","../../node_modules/lodash/_mapCacheGet.js","../../node_modules/lodash/_mapCacheHas.js","../../node_modules/lodash/_mapCacheSet.js","../../node_modules/lodash/_MapCache.js","../../node_modules/lodash/_stackSet.js","../../node_modules/lodash/_Stack.js","../../node_modules/lodash/_arrayEach.js","../../node_modules/lodash/_defineProperty.js","../../node_modules/lodash/_baseAssignValue.js","../../node_modules/lodash/_assignValue.js","../../node_modules/lodash/_copyObject.js","../../node_modules/lodash/_baseTimes.js","../../node_modules/lodash/isObjectLike.js","../../node_modules/lodash/_baseIsArguments.js","../../node_modules/lodash/isArguments.js","../../node_modules/lodash/isArray.js","../../node_modules/lodash/stubFalse.js","../../node_modules/lodash/isBuffer.js","../../node_modules/lodash/_isIndex.js","../../node_modules/lodash/isLength.js","../../node_modules/lodash/_baseIsTypedArray.js","../../node_modules/lodash/_baseUnary.js","../../node_modules/lodash/_nodeUtil.js","../../node_modules/lodash/isTypedArray.js","../../node_modules/lodash/_arrayLikeKeys.js","../../node_modules/lodash/_isPrototype.js","../../node_modules/lodash/_overArg.js","../../node_modules/lodash/_nativeKeys.js","../../node_modules/lodash/_baseKeys.js","../../node_modules/lodash/isArrayLike.js","../../node_modules/lodash/keys.js","../../node_modules/lodash/_baseAssign.js","../../node_modules/lodash/_nativeKeysIn.js","../../node_modules/lodash/_baseKeysIn.js","../../node_modules/lodash/keysIn.js","../../node_modules/lodash/_baseAssignIn.js","../../node_modules/lodash/_cloneBuffer.js","../../node_modules/lodash/_copyArray.js","../../node_modules/lodash/_arrayFilter.js","../../node_modules/lodash/stubArray.js","../../node_modules/lodash/_getSymbols.js","../../node_modules/lodash/_copySymbols.js","../../node_modules/lodash/_arrayPush.js","../../node_modules/lodash/_getPrototype.js","../../node_modules/lodash/_getSymbolsIn.js","../../node_modules/lodash/_copySymbolsIn.js","../../node_modules/lodash/_baseGetAllKeys.js","../../node_modules/lodash/_getAllKeys.js","../../node_modules/lodash/_getAllKeysIn.js","../../node_modules/lodash/_DataView.js","../../node_modules/lodash/_Promise.js","../../node_modules/lodash/_Set.js","../../node_modules/lodash/_WeakMap.js","../../node_modules/lodash/_getTag.js","../../node_modules/lodash/_initCloneArray.js","../../node_modules/lodash/_Uint8Array.js","../../node_modules/lodash/_cloneArrayBuffer.js","../../node_modules/lodash/_cloneDataView.js","../../node_modules/lodash/_cloneRegExp.js","../../node_modules/lodash/_cloneSymbol.js","../../node_modules/lodash/_cloneTypedArray.js","../../node_modules/lodash/_initCloneByTag.js","../../node_modules/lodash/_baseCreate.js","../../node_modules/lodash/_initCloneObject.js","../../node_modules/lodash/_baseIsMap.js","../../node_modules/lodash/isMap.js","../../node_modules/lodash/_baseIsSet.js","../../node_modules/lodash/isSet.js","../../node_modules/lodash/_baseClone.js","../../node_modules/lodash/clone.js","../../node_modules/lodash/constant.js","../../node_modules/lodash/_createBaseFor.js","../../node_modules/lodash/_baseFor.js","../../node_modules/lodash/_baseForOwn.js","../../node_modules/lodash/_createBaseEach.js","../../node_modules/lodash/_baseEach.js","../../node_modules/lodash/identity.js","../../node_modules/lodash/_castFunction.js","../../node_modules/lodash/forEach.js","../../node_modules/lodash/each.js","../../node_modules/lodash/_baseFilter.js","../../node_modules/lodash/_setCacheAdd.js","../../node_modules/lodash/_setCacheHas.js","../../node_modules/lodash/_SetCache.js","../../node_modules/lodash/_arraySome.js","../../node_modules/lodash/_cacheHas.js","../../node_modules/lodash/_equalArrays.js","../../node_modules/lodash/_mapToArray.js","../../node_modules/lodash/_setToArray.js","../../node_modules/lodash/_equalByTag.js","../../node_modules/lodash/_equalObjects.js","../../node_modules/lodash/_baseIsEqualDeep.js","../../node_modules/lodash/_baseIsEqual.js","../../node_modules/lodash/_baseIsMatch.js","../../node_modules/lodash/_isStrictComparable.js","../../node_modules/lodash/_getMatchData.js","../../node_modules/lodash/_matchesStrictComparable.js","../../node_modules/lodash/_baseMatches.js","../../node_modules/lodash/isSymbol.js","../../node_modules/lodash/_isKey.js","../../node_modules/lodash/memoize.js","../../node_modules/lodash/_memoizeCapped.js","../../node_modules/lodash/_stringToPath.js","../../node_modules/lodash/_arrayMap.js","../../node_modules/lodash/_baseToString.js","../../node_modules/lodash/toString.js","../../node_modules/lodash/_castPath.js","../../node_modules/lodash/_toKey.js","../../node_modules/lodash/_baseGet.js","../../node_modules/lodash/get.js","../../node_modules/lodash/_baseHasIn.js","../../node_modules/lodash/_hasPath.js","../../node_modules/lodash/hasIn.js","../../node_modules/lodash/_baseMatchesProperty.js","../../node_modules/lodash/_baseProperty.js","../../node_modules/lodash/_basePropertyDeep.js","../../node_modules/lodash/property.js","../../node_modules/lodash/_baseIteratee.js","../../node_modules/lodash/filter.js","../../node_modules/lodash/_baseHas.js","../../node_modules/lodash/has.js","../../node_modules/lodash/isEmpty.js","../../node_modules/lodash/isUndefined.js","../../node_modules/lodash/_baseMap.js","../../node_modules/lodash/map.js","../../node_modules/lodash/_arrayReduce.js","../../node_modules/lodash/_baseReduce.js","../../node_modules/lodash/reduce.js","../../node_modules/lodash/isString.js","../../node_modules/lodash/_asciiSize.js","../../node_modules/lodash/_hasUnicode.js","../../node_modules/lodash/_unicodeSize.js","../../node_modules/lodash/_stringSize.js","../../node_modules/lodash/size.js","../../node_modules/lodash/transform.js","../../node_modules/lodash/_isFlattenable.js","../../node_modules/lodash/_baseFlatten.js","../../node_modules/lodash/_apply.js","../../node_modules/lodash/_overRest.js","../../node_modules/lodash/_baseSetToString.js","../../node_modules/lodash/_shortOut.js","../../node_modules/lodash/_setToString.js","../../node_modules/lodash/_baseRest.js","../../node_modules/lodash/_baseFindIndex.js","../../node_modules/lodash/_baseIsNaN.js","../../node_modules/lodash/_strictIndexOf.js","../../node_modules/lodash/_baseIndexOf.js","../../node_modules/lodash/_arrayIncludes.js","../../node_modules/lodash/_arrayIncludesWith.js","../../node_modules/lodash/noop.js","../../node_modules/lodash/_createSet.js","../../node_modules/lodash/_baseUniq.js","../../node_modules/lodash/isArrayLikeObject.js","../../node_modules/lodash/union.js","../../node_modules/lodash/_baseValues.js","../../node_modules/lodash/values.js","../../node_modules/graphlib/lib/lodash.js","../../node_modules/graphlib/lib/graph.js","../../node_modules/graphlib/lib/version.js","../../node_modules/graphlib/lib/index.js","../../node_modules/graphlib/lib/json.js","../../node_modules/graphlib/lib/alg/components.js","../../node_modules/graphlib/lib/data/priority-queue.js","../../node_modules/graphlib/lib/alg/dijkstra.js","../../node_modules/graphlib/lib/alg/dijkstra-all.js","../../node_modules/graphlib/lib/alg/tarjan.js","../../node_modules/graphlib/lib/alg/find-cycles.js","../../node_modules/graphlib/lib/alg/floyd-warshall.js","../../node_modules/graphlib/lib/alg/topsort.js","../../node_modules/graphlib/lib/alg/is-acyclic.js","../../node_modules/graphlib/lib/alg/dfs.js","../../node_modules/graphlib/lib/alg/postorder.js","../../node_modules/graphlib/lib/alg/preorder.js","../../node_modules/graphlib/lib/alg/prim.js","../../node_modules/graphlib/lib/alg/index.js","../../node_modules/graphlib/index.js","../../node_modules/dagre/lib/graphlib.js","../../node_modules/lodash/cloneDeep.js","../../node_modules/lodash/_isIterateeCall.js","../../node_modules/lodash/defaults.js","../../node_modules/lodash/_createFind.js","../../node_modules/lodash/_trimmedEndIndex.js","../../node_modules/lodash/_baseTrim.js","../../node_modules/lodash/toNumber.js","../../node_modules/lodash/toFinite.js","../../node_modules/lodash/toInteger.js","../../node_modules/lodash/findIndex.js","../../node_modules/lodash/find.js","../../node_modules/lodash/flatten.js","../../node_modules/lodash/forIn.js","../../node_modules/lodash/last.js","../../node_modules/lodash/mapValues.js","../../node_modules/lodash/_baseExtremum.js","../../node_modules/lodash/_baseGt.js","../../node_modules/lodash/max.js","../../node_modules/lodash/_assignMergeValue.js","../../node_modules/lodash/isPlainObject.js","../../node_modules/lodash/_safeGet.js","../../node_modules/lodash/toPlainObject.js","../../node_modules/lodash/_baseMergeDeep.js","../../node_modules/lodash/_baseMerge.js","../../node_modules/lodash/_createAssigner.js","../../node_modules/lodash/merge.js","../../node_modules/lodash/_baseLt.js","../../node_modules/lodash/min.js","../../node_modules/lodash/minBy.js","../../node_modules/lodash/now.js","../../node_modules/lodash/_baseSet.js","../../node_modules/lodash/_basePickBy.js","../../node_modules/lodash/_basePick.js","../../node_modules/lodash/_flatRest.js","../../node_modules/lodash/pick.js","../../node_modules/lodash/_baseRange.js","../../node_modules/lodash/_createRange.js","../../node_modules/lodash/range.js","../../node_modules/lodash/_baseSortBy.js","../../node_modules/lodash/_compareAscending.js","../../node_modules/lodash/_compareMultiple.js","../../node_modules/lodash/_baseOrderBy.js","../../node_modules/lodash/sortBy.js","../../node_modules/lodash/uniqueId.js","../../node_modules/lodash/_baseZipObject.js","../../node_modules/lodash/zipObject.js","../../node_modules/dagre/lib/lodash.js","../../node_modules/dagre/lib/data/list.js","../../node_modules/dagre/lib/greedy-fas.js","../../node_modules/dagre/lib/acyclic.js","../../node_modules/dagre/lib/util.js","../../node_modules/dagre/lib/normalize.js","../../node_modules/dagre/lib/rank/util.js","../../node_modules/dagre/lib/rank/feasible-tree.js","../../node_modules/dagre/lib/rank/network-simplex.js","../../node_modules/dagre/lib/rank/index.js","../../node_modules/dagre/lib/parent-dummy-chains.js","../../node_modules/dagre/lib/nesting-graph.js","../../node_modules/dagre/lib/add-border-segments.js","../../node_modules/dagre/lib/coordinate-system.js","../../node_modules/dagre/lib/order/init-order.js","../../node_modules/dagre/lib/order/cross-count.js","../../node_modules/dagre/lib/order/barycenter.js","../../node_modules/dagre/lib/order/resolve-conflicts.js","../../node_modules/dagre/lib/order/sort.js","../../node_modules/dagre/lib/order/sort-subgraph.js","../../node_modules/dagre/lib/order/build-layer-graph.js","../../node_modules/dagre/lib/order/add-subgraph-constraints.js","../../node_modules/dagre/lib/order/index.js","../../node_modules/dagre/lib/position/bk.js","../../node_modules/dagre/lib/position/index.js","../../node_modules/dagre/lib/layout.js","../../node_modules/dagre/lib/debug.js","../../node_modules/dagre/lib/version.js","../../node_modules/dagre/index.js","../../node_modules/d3-shape/src/constant.js","../../node_modules/d3-shape/src/math.js","../../node_modules/d3-path/src/path.js","../../node_modules/d3-path/src/index.js","../../node_modules/d3-shape/src/path.js","../../node_modules/d3-shape/src/arc.js","../../node_modules/d3-shape/src/array.js","../../node_modules/d3-shape/src/curve/linear.js","../../node_modules/d3-shape/src/point.js","../../node_modules/d3-shape/src/line.js","../../node_modules/d3-shape/src/descending.js","../../node_modules/d3-shape/src/identity.js","../../node_modules/d3-shape/src/pie.js","../../node_modules/d3-shape/src/curve/bump.js","../../node_modules/d3-shape/src/noop.js","../../node_modules/d3-shape/src/curve/basis.js","../../node_modules/d3-shape/src/curve/basisClosed.js","../../node_modules/d3-shape/src/curve/basisOpen.js","../../node_modules/d3-shape/src/curve/bundle.js","../../node_modules/d3-shape/src/curve/cardinal.js","../../node_modules/d3-shape/src/curve/cardinalClosed.js","../../node_modules/d3-shape/src/curve/cardinalOpen.js","../../node_modules/d3-shape/src/curve/catmullRom.js","../../node_modules/d3-shape/src/curve/catmullRomClosed.js","../../node_modules/d3-shape/src/curve/catmullRomOpen.js","../../node_modules/d3-shape/src/curve/linearClosed.js","../../node_modules/d3-shape/src/curve/monotone.js","../../node_modules/d3-shape/src/curve/natural.js","../../node_modules/d3-shape/src/curve/step.js","../../node_modules/d3-shape/src/index.js","../../node_modules/picocolors/picocolors.browser.js","../../node_modules/dom-to-svg/node_modules/postcss/lib/css-syntax-error.js","../../node_modules/dom-to-svg/node_modules/postcss/lib/symbols.js","../../node_modules/dom-to-svg/node_modules/postcss/lib/stringifier.js","../../node_modules/dom-to-svg/node_modules/postcss/lib/stringify.js","../../node_modules/dom-to-svg/node_modules/postcss/lib/node.js","../../node_modules/dom-to-svg/node_modules/postcss/lib/declaration.js","../../node_modules/nanoid/non-secure/index.cjs","../../node_modules/dom-to-svg/node_modules/postcss/lib/previous-map.js","../../node_modules/dom-to-svg/node_modules/postcss/lib/input.js","../../node_modules/dom-to-svg/node_modules/postcss/lib/map-generator.js","../../node_modules/dom-to-svg/node_modules/postcss/lib/comment.js","../../node_modules/dom-to-svg/node_modules/postcss/lib/container.js","../../node_modules/dom-to-svg/node_modules/postcss/lib/document.js","../../node_modules/dom-to-svg/node_modules/postcss/lib/warn-once.js","../../node_modules/dom-to-svg/node_modules/postcss/lib/warning.js","../../node_modules/dom-to-svg/node_modules/postcss/lib/result.js","../../node_modules/dom-to-svg/node_modules/postcss/lib/tokenize.js","../../node_modules/dom-to-svg/node_modules/postcss/lib/at-rule.js","../../node_modules/dom-to-svg/node_modules/postcss/lib/root.js","../../node_modules/dom-to-svg/node_modules/postcss/lib/list.js","../../node_modules/dom-to-svg/node_modules/postcss/lib/rule.js","../../node_modules/dom-to-svg/node_modules/postcss/lib/parser.js","../../node_modules/dom-to-svg/node_modules/postcss/lib/parse.js","../../node_modules/dom-to-svg/node_modules/postcss/lib/lazy-result.js","../../node_modules/dom-to-svg/node_modules/postcss/lib/no-work-result.js","../../node_modules/dom-to-svg/node_modules/postcss/lib/processor.js","../../node_modules/dom-to-svg/node_modules/postcss/lib/fromJSON.js","../../node_modules/dom-to-svg/node_modules/postcss/lib/postcss.js","../../node_modules/postcss-value-parser/lib/parse.js","../../node_modules/postcss-value-parser/lib/walk.js","../../node_modules/postcss-value-parser/lib/stringify.js","../../node_modules/postcss-value-parser/lib/unit.js","../../node_modules/postcss-value-parser/lib/index.js","../../node_modules/gradient-parser/build/node.js","../../node_modules/highlight.js/lib/languages/1c.js","../../node_modules/highlight.js/lib/languages/abnf.js","../../node_modules/highlight.js/lib/languages/accesslog.js","../../node_modules/highlight.js/lib/languages/actionscript.js","../../node_modules/highlight.js/lib/languages/ada.js","../../node_modules/highlight.js/lib/languages/angelscript.js","../../node_modules/highlight.js/lib/languages/apache.js","../../node_modules/highlight.js/lib/languages/applescript.js","../../node_modules/highlight.js/lib/languages/arcade.js","../../node_modules/highlight.js/lib/languages/arduino.js","../../node_modules/highlight.js/lib/languages/armasm.js","../../node_modules/highlight.js/lib/languages/xml.js","../../node_modules/highlight.js/lib/languages/asciidoc.js","../../node_modules/highlight.js/lib/languages/aspectj.js","../../node_modules/highlight.js/lib/languages/autohotkey.js","../../node_modules/highlight.js/lib/languages/autoit.js","../../node_modules/highlight.js/lib/languages/avrasm.js","../../node_modules/highlight.js/lib/languages/awk.js","../../node_modules/highlight.js/lib/languages/axapta.js","../../node_modules/highlight.js/lib/languages/bash.js","../../node_modules/highlight.js/lib/languages/basic.js","../../node_modules/highlight.js/lib/languages/bnf.js","../../node_modules/highlight.js/lib/languages/brainfuck.js","../../node_modules/highlight.js/lib/languages/c.js","../../node_modules/highlight.js/lib/languages/cal.js","../../node_modules/highlight.js/lib/languages/capnproto.js","../../node_modules/highlight.js/lib/languages/ceylon.js","../../node_modules/highlight.js/lib/languages/clean.js","../../node_modules/highlight.js/lib/languages/clojure.js","../../node_modules/highlight.js/lib/languages/clojure-repl.js","../../node_modules/highlight.js/lib/languages/cmake.js","../../node_modules/highlight.js/lib/languages/coffeescript.js","../../node_modules/highlight.js/lib/languages/coq.js","../../node_modules/highlight.js/lib/languages/cos.js","../../node_modules/highlight.js/lib/languages/cpp.js","../../node_modules/highlight.js/lib/languages/crmsh.js","../../node_modules/highlight.js/lib/languages/crystal.js","../../node_modules/highlight.js/lib/languages/csharp.js","../../node_modules/highlight.js/lib/languages/csp.js","../../node_modules/highlight.js/lib/languages/css.js","../../node_modules/highlight.js/lib/languages/d.js","../../node_modules/highlight.js/lib/languages/markdown.js","../../node_modules/highlight.js/lib/languages/dart.js","../../node_modules/highlight.js/lib/languages/delphi.js","../../node_modules/highlight.js/lib/languages/diff.js","../../node_modules/highlight.js/lib/languages/django.js","../../node_modules/highlight.js/lib/languages/dns.js","../../node_modules/highlight.js/lib/languages/dockerfile.js","../../node_modules/highlight.js/lib/languages/dos.js","../../node_modules/highlight.js/lib/languages/dsconfig.js","../../node_modules/highlight.js/lib/languages/dts.js","../../node_modules/highlight.js/lib/languages/dust.js","../../node_modules/highlight.js/lib/languages/ebnf.js","../../node_modules/highlight.js/lib/languages/elixir.js","../../node_modules/highlight.js/lib/languages/elm.js","../../node_modules/highlight.js/lib/languages/ruby.js","../../node_modules/highlight.js/lib/languages/erb.js","../../node_modules/highlight.js/lib/languages/erlang-repl.js","../../node_modules/highlight.js/lib/languages/erlang.js","../../node_modules/highlight.js/lib/languages/excel.js","../../node_modules/highlight.js/lib/languages/fix.js","../../node_modules/highlight.js/lib/languages/flix.js","../../node_modules/highlight.js/lib/languages/fortran.js","../../node_modules/highlight.js/lib/languages/fsharp.js","../../node_modules/highlight.js/lib/languages/gams.js","../../node_modules/highlight.js/lib/languages/gauss.js","../../node_modules/highlight.js/lib/languages/gcode.js","../../node_modules/highlight.js/lib/languages/gherkin.js","../../node_modules/highlight.js/lib/languages/glsl.js","../../node_modules/highlight.js/lib/languages/gml.js","../../node_modules/highlight.js/lib/languages/go.js","../../node_modules/highlight.js/lib/languages/golo.js","../../node_modules/highlight.js/lib/languages/gradle.js","../../node_modules/highlight.js/lib/languages/graphql.js","../../node_modules/highlight.js/lib/languages/groovy.js","../../node_modules/highlight.js/lib/languages/haml.js","../../node_modules/highlight.js/lib/languages/handlebars.js","../../node_modules/highlight.js/lib/languages/haskell.js","../../node_modules/highlight.js/lib/languages/haxe.js","../../node_modules/highlight.js/lib/languages/hsp.js","../../node_modules/highlight.js/lib/languages/http.js","../../node_modules/highlight.js/lib/languages/hy.js","../../node_modules/highlight.js/lib/languages/inform7.js","../../node_modules/highlight.js/lib/languages/ini.js","../../node_modules/highlight.js/lib/languages/irpf90.js","../../node_modules/highlight.js/lib/languages/isbl.js","../../node_modules/highlight.js/lib/languages/java.js","../../node_modules/highlight.js/lib/languages/javascript.js","../../node_modules/highlight.js/lib/languages/jboss-cli.js","../../node_modules/highlight.js/lib/languages/json.js","../../node_modules/highlight.js/lib/languages/julia.js","../../node_modules/highlight.js/lib/languages/julia-repl.js","../../node_modules/highlight.js/lib/languages/kotlin.js","../../node_modules/highlight.js/lib/languages/lasso.js","../../node_modules/highlight.js/lib/languages/latex.js","../../node_modules/highlight.js/lib/languages/ldif.js","../../node_modules/highlight.js/lib/languages/leaf.js","../../node_modules/highlight.js/lib/languages/less.js","../../node_modules/highlight.js/lib/languages/lisp.js","../../node_modules/highlight.js/lib/languages/livecodeserver.js","../../node_modules/highlight.js/lib/languages/livescript.js","../../node_modules/highlight.js/lib/languages/llvm.js","../../node_modules/highlight.js/lib/languages/lsl.js","../../node_modules/highlight.js/lib/languages/lua.js","../../node_modules/highlight.js/lib/languages/makefile.js","../../node_modules/highlight.js/lib/languages/mathematica.js","../../node_modules/highlight.js/lib/languages/matlab.js","../../node_modules/highlight.js/lib/languages/maxima.js","../../node_modules/highlight.js/lib/languages/mel.js","../../node_modules/highlight.js/lib/languages/mercury.js","../../node_modules/highlight.js/lib/languages/mipsasm.js","../../node_modules/highlight.js/lib/languages/mizar.js","../../node_modules/highlight.js/lib/languages/perl.js","../../node_modules/highlight.js/lib/languages/mojolicious.js","../../node_modules/highlight.js/lib/languages/monkey.js","../../node_modules/highlight.js/lib/languages/moonscript.js","../../node_modules/highlight.js/lib/languages/n1ql.js","../../node_modules/highlight.js/lib/languages/nestedtext.js","../../node_modules/highlight.js/lib/languages/nginx.js","../../node_modules/highlight.js/lib/languages/nim.js","../../node_modules/highlight.js/lib/languages/nix.js","../../node_modules/highlight.js/lib/languages/node-repl.js","../../node_modules/highlight.js/lib/languages/nsis.js","../../node_modules/highlight.js/lib/languages/objectivec.js","../../node_modules/highlight.js/lib/languages/ocaml.js","../../node_modules/highlight.js/lib/languages/openscad.js","../../node_modules/highlight.js/lib/languages/oxygene.js","../../node_modules/highlight.js/lib/languages/parser3.js","../../node_modules/highlight.js/lib/languages/pf.js","../../node_modules/highlight.js/lib/languages/pgsql.js","../../node_modules/highlight.js/lib/languages/php.js","../../node_modules/highlight.js/lib/languages/php-template.js","../../node_modules/highlight.js/lib/languages/plaintext.js","../../node_modules/highlight.js/lib/languages/pony.js","../../node_modules/highlight.js/lib/languages/powershell.js","../../node_modules/highlight.js/lib/languages/processing.js","../../node_modules/highlight.js/lib/languages/profile.js","../../node_modules/highlight.js/lib/languages/prolog.js","../../node_modules/highlight.js/lib/languages/properties.js","../../node_modules/highlight.js/lib/languages/protobuf.js","../../node_modules/highlight.js/lib/languages/puppet.js","../../node_modules/highlight.js/lib/languages/purebasic.js","../../node_modules/highlight.js/lib/languages/python.js","../../node_modules/highlight.js/lib/languages/python-repl.js","../../node_modules/highlight.js/lib/languages/q.js","../../node_modules/highlight.js/lib/languages/qml.js","../../node_modules/highlight.js/lib/languages/r.js","../../node_modules/highlight.js/lib/languages/reasonml.js","../../node_modules/highlight.js/lib/languages/rib.js","../../node_modules/highlight.js/lib/languages/roboconf.js","../../node_modules/highlight.js/lib/languages/routeros.js","../../node_modules/highlight.js/lib/languages/rsl.js","../../node_modules/highlight.js/lib/languages/ruleslanguage.js","../../node_modules/highlight.js/lib/languages/rust.js","../../node_modules/highlight.js/lib/languages/sas.js","../../node_modules/highlight.js/lib/languages/scala.js","../../node_modules/highlight.js/lib/languages/scheme.js","../../node_modules/highlight.js/lib/languages/scilab.js","../../node_modules/highlight.js/lib/languages/scss.js","../../node_modules/highlight.js/lib/languages/shell.js","../../node_modules/highlight.js/lib/languages/smali.js","../../node_modules/highlight.js/lib/languages/smalltalk.js","../../node_modules/highlight.js/lib/languages/sml.js","../../node_modules/highlight.js/lib/languages/sqf.js","../../node_modules/highlight.js/lib/languages/sql.js","../../node_modules/highlight.js/lib/languages/stan.js","../../node_modules/highlight.js/lib/languages/stata.js","../../node_modules/highlight.js/lib/languages/step21.js","../../node_modules/highlight.js/lib/languages/stylus.js","../../node_modules/highlight.js/lib/languages/subunit.js","../../node_modules/highlight.js/lib/languages/swift.js","../../node_modules/highlight.js/lib/languages/taggerscript.js","../../node_modules/highlight.js/lib/languages/yaml.js","../../node_modules/highlight.js/lib/languages/tap.js","../../node_modules/highlight.js/lib/languages/tcl.js","../../node_modules/highlight.js/lib/languages/thrift.js","../../node_modules/highlight.js/lib/languages/tp.js","../../node_modules/highlight.js/lib/languages/twig.js","../../node_modules/highlight.js/lib/languages/typescript.js","../../node_modules/highlight.js/lib/languages/vala.js","../../node_modules/highlight.js/lib/languages/vbnet.js","../../node_modules/highlight.js/lib/languages/vbscript.js","../../node_modules/highlight.js/lib/languages/vbscript-html.js","../../node_modules/highlight.js/lib/languages/verilog.js","../../node_modules/highlight.js/lib/languages/vhdl.js","../../node_modules/highlight.js/lib/languages/vim.js","../../node_modules/highlight.js/lib/languages/wasm.js","../../node_modules/highlight.js/lib/languages/wren.js","../../node_modules/highlight.js/lib/languages/x86asm.js","../../node_modules/highlight.js/lib/languages/xl.js","../../node_modules/highlight.js/lib/languages/xquery.js","../../node_modules/highlight.js/lib/languages/zephir.js","../../node_modules/highlight.js/lib/index.js","../../node_modules/ts-dedent/src/index.ts","../../node_modules/dayjs/dayjs.min.js","../../node_modules/@braintree/sanitize-url/dist/index.js","../../node_modules/d3-array/src/ascending.js","../../node_modules/d3-array/src/descending.js","../../node_modules/d3-array/src/bisector.js","../../node_modules/d3-array/src/number.js","../../node_modules/d3-array/src/bisect.js","../../node_modules/internmap/src/index.js","../../node_modules/d3-array/src/ticks.js","../../node_modules/d3-array/src/max.js","../../node_modules/d3-array/src/min.js","../../node_modules/d3-array/src/range.js","../../node_modules/d3-array/src/index.js","../../node_modules/d3-axis/src/identity.js","../../node_modules/d3-axis/src/axis.js","../../node_modules/d3-axis/src/index.js","../../node_modules/d3-brush/src/constant.js","../../node_modules/d3-brush/src/event.js","../../node_modules/d3-brush/src/noevent.js","../../node_modules/d3-brush/src/brush.js","../../node_modules/d3-brush/src/index.js","../../node_modules/d3-chord/src/index.js","../../node_modules/d3-contour/src/index.js","../../node_modules/d3-delaunay/src/index.js","../../node_modules/d3-dsv/src/index.js","../../node_modules/d3-fetch/src/text.js","../../node_modules/d3-fetch/src/xml.js","../../node_modules/d3-fetch/src/index.js","../../node_modules/d3-quadtree/src/index.js","../../node_modules/d3-force/src/index.js","../../node_modules/d3-format/src/formatDecimal.js","../../node_modules/d3-format/src/exponent.js","../../node_modules/d3-format/src/formatGroup.js","../../node_modules/d3-format/src/formatNumerals.js","../../node_modules/d3-format/src/formatSpecifier.js","../../node_modules/d3-format/src/formatTrim.js","../../node_modules/d3-format/src/formatPrefixAuto.js","../../node_modules/d3-format/src/formatRounded.js","../../node_modules/d3-format/src/formatTypes.js","../../node_modules/d3-format/src/identity.js","../../node_modules/d3-format/src/locale.js","../../node_modules/d3-format/src/defaultLocale.js","../../node_modules/d3-format/src/precisionFixed.js","../../node_modules/d3-format/src/precisionPrefix.js","../../node_modules/d3-format/src/precisionRound.js","../../node_modules/d3-format/src/index.js","../../node_modules/d3-geo/src/index.js","../../node_modules/d3-hierarchy/src/index.js","../../node_modules/d3-polygon/src/index.js","../../node_modules/d3-random/src/index.js","../../node_modules/d3-scale/src/init.js","../../node_modules/d3-scale/src/ordinal.js","../../node_modules/d3-scale/src/band.js","../../node_modules/d3-scale/src/constant.js","../../node_modules/d3-scale/src/number.js","../../node_modules/d3-scale/src/continuous.js","../../node_modules/d3-scale/src/tickFormat.js","../../node_modules/d3-scale/src/linear.js","../../node_modules/d3-scale/src/nice.js","../../node_modules/d3-time/src/interval.js","../../node_modules/d3-time/src/millisecond.js","../../node_modules/d3-time/src/second.js","../../node_modules/d3-time/src/minute.js","../../node_modules/d3-time/src/hour.js","../../node_modules/d3-time/src/day.js","../../node_modules/d3-time/src/week.js","../../node_modules/d3-time/src/month.js","../../node_modules/d3-time/src/year.js","../../node_modules/d3-time/src/ticks.js","../../node_modules/d3-time/src/index.js","../../node_modules/d3-time-format/src/locale.js","../../node_modules/d3-time-format/src/defaultLocale.js","../../node_modules/d3-time-format/src/index.js","../../node_modules/d3-scale/src/time.js","../../node_modules/d3-scale/src/index.js","../../node_modules/d3-scale-chromatic/src/colors.js","../../node_modules/d3-scale-chromatic/src/categorical/Tableau10.js","../../node_modules/d3-scale-chromatic/src/index.js","../../node_modules/mermaid/node_modules/d3/src/index.js","../../node_modules/mermaid/node_modules/dompurify/src/utils.js","../../node_modules/mermaid/node_modules/dompurify/src/tags.js","../../node_modules/mermaid/node_modules/dompurify/src/attrs.js","../../node_modules/mermaid/node_modules/dompurify/src/regexp.js","../../node_modules/mermaid/node_modules/dompurify/src/purify.js","../../node_modules/khroma/dist/utils/channel.js","../../node_modules/khroma/dist/utils/lang.js","../../node_modules/khroma/dist/utils/unit.js","../../node_modules/khroma/dist/utils/index.js","../../node_modules/khroma/dist/constants.js","../../node_modules/khroma/dist/channels/type.js","../../node_modules/khroma/dist/channels/index.js","../../node_modules/khroma/dist/channels/reusable.js","../../node_modules/khroma/dist/color/hex.js","../../node_modules/khroma/dist/color/hsl.js","../../node_modules/khroma/dist/color/keyword.js","../../node_modules/khroma/dist/color/rgb.js","../../node_modules/khroma/dist/color/index.js","../../node_modules/khroma/dist/methods/change.js","../../node_modules/khroma/dist/methods/rgba.js","../../node_modules/khroma/dist/methods/channel.js","../../node_modules/khroma/dist/methods/luminance.js","../../node_modules/khroma/dist/methods/is_light.js","../../node_modules/khroma/dist/methods/is_dark.js","../../node_modules/khroma/dist/methods/adjust_channel.js","../../node_modules/khroma/dist/methods/lighten.js","../../node_modules/khroma/dist/methods/darken.js","../../node_modules/khroma/dist/methods/adjust.js","../../node_modules/khroma/dist/methods/mix.js","../../node_modules/khroma/dist/methods/invert.js","../../node_modules/khroma/dist/methods/index.js","../../node_modules/khroma/dist/index.js","../../node_modules/lodash-es/_freeGlobal.js","../../node_modules/lodash-es/_root.js","../../node_modules/lodash-es/_Symbol.js","../../node_modules/lodash-es/_getRawTag.js","../../node_modules/lodash-es/_objectToString.js","../../node_modules/lodash-es/_baseGetTag.js","../../node_modules/lodash-es/isObject.js","../../node_modules/lodash-es/isFunction.js","../../node_modules/lodash-es/_coreJsData.js","../../node_modules/lodash-es/_isMasked.js","../../node_modules/lodash-es/_toSource.js","../../node_modules/lodash-es/_baseIsNative.js","../../node_modules/lodash-es/_getValue.js","../../node_modules/lodash-es/_getNative.js","../../node_modules/lodash-es/_nativeCreate.js","../../node_modules/lodash-es/_hashClear.js","../../node_modules/lodash-es/_hashDelete.js","../../node_modules/lodash-es/_hashGet.js","../../node_modules/lodash-es/_hashHas.js","../../node_modules/lodash-es/_hashSet.js","../../node_modules/lodash-es/_Hash.js","../../node_modules/lodash-es/_listCacheClear.js","../../node_modules/lodash-es/eq.js","../../node_modules/lodash-es/_assocIndexOf.js","../../node_modules/lodash-es/_listCacheDelete.js","../../node_modules/lodash-es/_listCacheGet.js","../../node_modules/lodash-es/_listCacheHas.js","../../node_modules/lodash-es/_listCacheSet.js","../../node_modules/lodash-es/_ListCache.js","../../node_modules/lodash-es/_Map.js","../../node_modules/lodash-es/_mapCacheClear.js","../../node_modules/lodash-es/_isKeyable.js","../../node_modules/lodash-es/_getMapData.js","../../node_modules/lodash-es/_mapCacheDelete.js","../../node_modules/lodash-es/_mapCacheGet.js","../../node_modules/lodash-es/_mapCacheHas.js","../../node_modules/lodash-es/_mapCacheSet.js","../../node_modules/lodash-es/_MapCache.js","../../node_modules/lodash-es/memoize.js","../../node_modules/lodash-es/_stackClear.js","../../node_modules/lodash-es/_stackDelete.js","../../node_modules/lodash-es/_stackGet.js","../../node_modules/lodash-es/_stackHas.js","../../node_modules/lodash-es/_stackSet.js","../../node_modules/lodash-es/_Stack.js","../../node_modules/lodash-es/_defineProperty.js","../../node_modules/lodash-es/_baseAssignValue.js","../../node_modules/lodash-es/_assignMergeValue.js","../../node_modules/lodash-es/_createBaseFor.js","../../node_modules/lodash-es/_baseFor.js","../../node_modules/lodash-es/_cloneBuffer.js","../../node_modules/lodash-es/_Uint8Array.js","../../node_modules/lodash-es/_cloneArrayBuffer.js","../../node_modules/lodash-es/_cloneTypedArray.js","../../node_modules/lodash-es/_copyArray.js","../../node_modules/lodash-es/_baseCreate.js","../../node_modules/lodash-es/_overArg.js","../../node_modules/lodash-es/_getPrototype.js","../../node_modules/lodash-es/_isPrototype.js","../../node_modules/lodash-es/_initCloneObject.js","../../node_modules/lodash-es/isObjectLike.js","../../node_modules/lodash-es/_baseIsArguments.js","../../node_modules/lodash-es/isArguments.js","../../node_modules/lodash-es/isArray.js","../../node_modules/lodash-es/isLength.js","../../node_modules/lodash-es/isArrayLike.js","../../node_modules/lodash-es/isArrayLikeObject.js","../../node_modules/lodash-es/stubFalse.js","../../node_modules/lodash-es/isBuffer.js","../../node_modules/lodash-es/isPlainObject.js","../../node_modules/lodash-es/_baseIsTypedArray.js","../../node_modules/lodash-es/_baseUnary.js","../../node_modules/lodash-es/_nodeUtil.js","../../node_modules/lodash-es/isTypedArray.js","../../node_modules/lodash-es/_safeGet.js","../../node_modules/lodash-es/_assignValue.js","../../node_modules/lodash-es/_copyObject.js","../../node_modules/lodash-es/_baseTimes.js","../../node_modules/lodash-es/_isIndex.js","../../node_modules/lodash-es/_arrayLikeKeys.js","../../node_modules/lodash-es/_nativeKeysIn.js","../../node_modules/lodash-es/_baseKeysIn.js","../../node_modules/lodash-es/keysIn.js","../../node_modules/lodash-es/toPlainObject.js","../../node_modules/lodash-es/_baseMergeDeep.js","../../node_modules/lodash-es/_baseMerge.js","../../node_modules/lodash-es/identity.js","../../node_modules/lodash-es/_apply.js","../../node_modules/lodash-es/_overRest.js","../../node_modules/lodash-es/constant.js","../../node_modules/lodash-es/_baseSetToString.js","../../node_modules/lodash-es/_shortOut.js","../../node_modules/lodash-es/_setToString.js","../../node_modules/lodash-es/_baseRest.js","../../node_modules/lodash-es/_isIterateeCall.js","../../node_modules/lodash-es/_createAssigner.js","../../node_modules/lodash-es/merge.js","../../node_modules/stylis/src/Enum.js","../../node_modules/stylis/src/Utility.js","../../node_modules/stylis/src/Tokenizer.js","../../node_modules/stylis/src/Parser.js","../../node_modules/stylis/src/Prefixer.js","../../node_modules/stylis/src/Serializer.js","../../node_modules/stylis/src/Middleware.js","../../node_modules/stylis/index.js","../../node_modules/lodash-es/_nativeKeys.js","../../node_modules/lodash-es/_baseKeys.js","../../node_modules/lodash-es/_DataView.js","../../node_modules/lodash-es/_Promise.js","../../node_modules/lodash-es/_Set.js","../../node_modules/lodash-es/_WeakMap.js","../../node_modules/lodash-es/_getTag.js","../../node_modules/lodash-es/isEmpty.js","../../node_modules/katex/dist/katex.mjs","../../node_modules/mermaid/dist/svgDrawCommon-5e1cfd1d.js","../../node_modules/mermaid/dist/c4Diagram-ae766693.js","../../node_modules/mermaid/dist/flowDb-c1833063.js","../../node_modules/lodash-es/isSymbol.js","../../node_modules/lodash-es/_arrayMap.js","../../node_modules/lodash-es/_baseToString.js","../../node_modules/lodash-es/_trimmedEndIndex.js","../../node_modules/lodash-es/_baseTrim.js","../../node_modules/lodash-es/toNumber.js","../../node_modules/lodash-es/toFinite.js","../../node_modules/lodash-es/toInteger.js","../../node_modules/lodash-es/noop.js","../../node_modules/lodash-es/_arrayEach.js","../../node_modules/lodash-es/_baseFindIndex.js","../../node_modules/lodash-es/_baseIsNaN.js","../../node_modules/lodash-es/_strictIndexOf.js","../../node_modules/lodash-es/_baseIndexOf.js","../../node_modules/lodash-es/_arrayIncludes.js","../../node_modules/lodash-es/keys.js","../../node_modules/lodash-es/_isKey.js","../../node_modules/lodash-es/_memoizeCapped.js","../../node_modules/lodash-es/_stringToPath.js","../../node_modules/lodash-es/toString.js","../../node_modules/lodash-es/_castPath.js","../../node_modules/lodash-es/_toKey.js","../../node_modules/lodash-es/_baseGet.js","../../node_modules/lodash-es/get.js","../../node_modules/lodash-es/_arrayPush.js","../../node_modules/lodash-es/_isFlattenable.js","../../node_modules/lodash-es/_baseFlatten.js","../../node_modules/lodash-es/flatten.js","../../node_modules/lodash-es/_flatRest.js","../../node_modules/lodash-es/_hasUnicode.js","../../node_modules/lodash-es/_arrayReduce.js","../../node_modules/lodash-es/_baseAssign.js","../../node_modules/lodash-es/_baseAssignIn.js","../../node_modules/lodash-es/_arrayFilter.js","../../node_modules/lodash-es/stubArray.js","../../node_modules/lodash-es/_getSymbols.js","../../node_modules/lodash-es/_copySymbols.js","../../node_modules/lodash-es/_getSymbolsIn.js","../../node_modules/lodash-es/_copySymbolsIn.js","../../node_modules/lodash-es/_baseGetAllKeys.js","../../node_modules/lodash-es/_getAllKeys.js","../../node_modules/lodash-es/_getAllKeysIn.js","../../node_modules/lodash-es/_initCloneArray.js","../../node_modules/lodash-es/_cloneDataView.js","../../node_modules/lodash-es/_cloneRegExp.js","../../node_modules/lodash-es/_cloneSymbol.js","../../node_modules/lodash-es/_initCloneByTag.js","../../node_modules/lodash-es/_baseIsMap.js","../../node_modules/lodash-es/isMap.js","../../node_modules/lodash-es/_baseIsSet.js","../../node_modules/lodash-es/isSet.js","../../node_modules/lodash-es/_baseClone.js","../../node_modules/lodash-es/clone.js","../../node_modules/lodash-es/cloneDeep.js","../../node_modules/lodash-es/_setCacheAdd.js","../../node_modules/lodash-es/_setCacheHas.js","../../node_modules/lodash-es/_SetCache.js","../../node_modules/lodash-es/_arraySome.js","../../node_modules/lodash-es/_cacheHas.js","../../node_modules/lodash-es/_equalArrays.js","../../node_modules/lodash-es/_mapToArray.js","../../node_modules/lodash-es/_setToArray.js","../../node_modules/lodash-es/_equalByTag.js","../../node_modules/lodash-es/_equalObjects.js","../../node_modules/lodash-es/_baseIsEqualDeep.js","../../node_modules/lodash-es/_baseIsEqual.js","../../node_modules/lodash-es/_baseIsMatch.js","../../node_modules/lodash-es/_isStrictComparable.js","../../node_modules/lodash-es/_getMatchData.js","../../node_modules/lodash-es/_matchesStrictComparable.js","../../node_modules/lodash-es/_baseMatches.js","../../node_modules/lodash-es/_baseHasIn.js","../../node_modules/lodash-es/_hasPath.js","../../node_modules/lodash-es/hasIn.js","../../node_modules/lodash-es/_baseMatchesProperty.js","../../node_modules/lodash-es/_baseProperty.js","../../node_modules/lodash-es/_basePropertyDeep.js","../../node_modules/lodash-es/property.js","../../node_modules/lodash-es/_baseIteratee.js","../../node_modules/lodash-es/_baseForOwn.js","../../node_modules/lodash-es/_createBaseEach.js","../../node_modules/lodash-es/_baseEach.js","../../node_modules/lodash-es/now.js","../../node_modules/lodash-es/defaults.js","../../node_modules/lodash-es/_arrayIncludesWith.js","../../node_modules/lodash-es/last.js","../../node_modules/lodash-es/_castFunction.js","../../node_modules/lodash-es/forEach.js","../../node_modules/lodash-es/each.js","../../node_modules/lodash-es/_baseFilter.js","../../node_modules/lodash-es/filter.js","../../node_modules/lodash-es/_createFind.js","../../node_modules/lodash-es/findIndex.js","../../node_modules/lodash-es/find.js","../../node_modules/lodash-es/_baseMap.js","../../node_modules/lodash-es/map.js","../../node_modules/lodash-es/forIn.js","../../node_modules/lodash-es/forOwn.js","../../node_modules/lodash-es/_baseGt.js","../../node_modules/lodash-es/_baseHas.js","../../node_modules/lodash-es/has.js","../../node_modules/lodash-es/isString.js","../../node_modules/lodash-es/_baseValues.js","../../node_modules/lodash-es/values.js","../../node_modules/lodash-es/isUndefined.js","../../node_modules/lodash-es/_baseLt.js","../../node_modules/lodash-es/mapValues.js","../../node_modules/lodash-es/_baseExtremum.js","../../node_modules/lodash-es/max.js","../../node_modules/lodash-es/min.js","../../node_modules/lodash-es/minBy.js","../../node_modules/lodash-es/_baseSet.js","../../node_modules/lodash-es/_basePickBy.js","../../node_modules/lodash-es/_baseSortBy.js","../../node_modules/lodash-es/_compareAscending.js","../../node_modules/lodash-es/_compareMultiple.js","../../node_modules/lodash-es/_baseOrderBy.js","../../node_modules/lodash-es/_asciiSize.js","../../node_modules/lodash-es/_unicodeSize.js","../../node_modules/lodash-es/_stringSize.js","../../node_modules/lodash-es/_basePick.js","../../node_modules/lodash-es/pick.js","../../node_modules/lodash-es/_baseRange.js","../../node_modules/lodash-es/_createRange.js","../../node_modules/lodash-es/range.js","../../node_modules/lodash-es/_baseReduce.js","../../node_modules/lodash-es/reduce.js","../../node_modules/lodash-es/size.js","../../node_modules/lodash-es/sortBy.js","../../node_modules/lodash-es/_createSet.js","../../node_modules/lodash-es/_baseUniq.js","../../node_modules/lodash-es/union.js","../../node_modules/lodash-es/uniqueId.js","../../node_modules/lodash-es/_baseZipObject.js","../../node_modules/lodash-es/zipObject.js","../../node_modules/lodash-es/lodash.js","../../node_modules/dagre-d3-es/src/graphlib/graph.js","../../node_modules/dagre-d3-es/src/graphlib/index.js","../../node_modules/dagre-d3-es/node_modules/d3/src/index.js","../../node_modules/dagre-d3-es/src/dagre/data/list.js","../../node_modules/dagre-d3-es/src/dagre/greedy-fas.js","../../node_modules/dagre-d3-es/src/dagre/acyclic.js","../../node_modules/dagre-d3-es/src/dagre/util.js","../../node_modules/dagre-d3-es/src/dagre/add-border-segments.js","../../node_modules/dagre-d3-es/src/dagre/coordinate-system.js","../../node_modules/dagre-d3-es/src/dagre/normalize.js","../../node_modules/dagre-d3-es/src/dagre/rank/util.js","../../node_modules/dagre-d3-es/src/dagre/rank/feasible-tree.js","../../node_modules/dagre-d3-es/src/graphlib/alg/components.js","../../node_modules/dagre-d3-es/src/graphlib/data/priority-queue.js","../../node_modules/dagre-d3-es/src/graphlib/alg/dijkstra.js","../../node_modules/dagre-d3-es/src/graphlib/alg/dijkstra-all.js","../../node_modules/dagre-d3-es/src/graphlib/alg/tarjan.js","../../node_modules/dagre-d3-es/src/graphlib/alg/find-cycles.js","../../node_modules/dagre-d3-es/src/graphlib/alg/floyd-warshall.js","../../node_modules/dagre-d3-es/src/graphlib/alg/topsort.js","../../node_modules/dagre-d3-es/src/graphlib/alg/is-acyclic.js","../../node_modules/dagre-d3-es/src/graphlib/alg/dfs.js","../../node_modules/dagre-d3-es/src/graphlib/alg/postorder.js","../../node_modules/dagre-d3-es/src/graphlib/alg/preorder.js","../../node_modules/dagre-d3-es/src/graphlib/alg/prim.js","../../node_modules/dagre-d3-es/src/graphlib/alg/index.js","../../node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js","../../node_modules/dagre-d3-es/src/dagre/rank/index.js","../../node_modules/dagre-d3-es/src/dagre/nesting-graph.js","../../node_modules/dagre-d3-es/src/dagre/order/add-subgraph-constraints.js","../../node_modules/dagre-d3-es/src/dagre/order/build-layer-graph.js","../../node_modules/dagre-d3-es/src/dagre/order/cross-count.js","../../node_modules/dagre-d3-es/src/dagre/order/init-order.js","../../node_modules/dagre-d3-es/src/dagre/order/barycenter.js","../../node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js","../../node_modules/dagre-d3-es/src/dagre/order/sort.js","../../node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js","../../node_modules/dagre-d3-es/src/dagre/order/index.js","../../node_modules/dagre-d3-es/src/dagre/parent-dummy-chains.js","../../node_modules/dagre-d3-es/src/dagre/position/bk.js","../../node_modules/dagre-d3-es/src/dagre/position/index.js","../../node_modules/dagre-d3-es/src/dagre/layout.js","../../node_modules/dagre-d3-es/src/dagre/index.js","../../node_modules/dagre-d3-es/src/dagre-js/util.js","../../node_modules/dagre-d3-es/src/dagre-js/arrows.js","../../node_modules/dagre-d3-es/src/dagre-js/label/add-html-label.js","../../node_modules/dagre-d3-es/src/dagre-js/label/add-svg-label.js","../../node_modules/dagre-d3-es/src/dagre-js/label/add-text-label.js","../../node_modules/dagre-d3-es/src/dagre-js/label/add-label.js","../../node_modules/dagre-d3-es/src/dagre-js/create-clusters.js","../../node_modules/dagre-d3-es/src/dagre-js/create-edge-labels.js","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-node.js","../../node_modules/dagre-d3-es/src/dagre-js/create-edge-paths.js","../../node_modules/dagre-d3-es/src/dagre-js/create-nodes.js","../../node_modules/dagre-d3-es/src/dagre-js/position-clusters.js","../../node_modules/dagre-d3-es/src/dagre-js/position-edge-labels.js","../../node_modules/dagre-d3-es/src/dagre-js/position-nodes.js","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-ellipse.js","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-circle.js","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-line.js","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-polygon.js","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-rect.js","../../node_modules/dagre-d3-es/src/dagre-js/shapes.js","../../node_modules/dagre-d3-es/src/dagre-js/render.js","../../node_modules/dagre-d3-es/src/dagre-js/intersect/index.js","../../node_modules/dagre-d3-es/src/index.js","../../node_modules/dagre-d3-es/src/graphlib/json.js","../../node_modules/mdast-util-from-markdown/node_modules/mdast-util-to-string/lib/index.js","../../node_modules/mdast-util-from-markdown/node_modules/mdast-util-to-string/index.js","../../node_modules/micromark-util-chunked/index.js","../../node_modules/micromark-util-combine-extensions/index.js","../../node_modules/micromark-util-character/lib/unicode-punctuation-regex.js","../../node_modules/micromark-util-character/index.js","../../node_modules/micromark-factory-space/index.js","../../node_modules/micromark/lib/initialize/content.js","../../node_modules/micromark/lib/initialize/document.js","../../node_modules/micromark-util-classify-character/index.js","../../node_modules/micromark-util-resolve-all/index.js","../../node_modules/micromark-core-commonmark/lib/attention.js","../../node_modules/micromark-core-commonmark/lib/autolink.js","../../node_modules/micromark-core-commonmark/lib/blank-line.js","../../node_modules/micromark-core-commonmark/lib/block-quote.js","../../node_modules/micromark-core-commonmark/lib/character-escape.js","../../node_modules/decode-named-character-reference/index.dom.js","../../node_modules/micromark-core-commonmark/lib/character-reference.js","../../node_modules/micromark-core-commonmark/lib/code-fenced.js","../../node_modules/micromark-core-commonmark/lib/code-indented.js","../../node_modules/micromark-core-commonmark/lib/code-text.js","../../node_modules/micromark-util-subtokenize/index.js","../../node_modules/micromark-core-commonmark/lib/content.js","../../node_modules/micromark-factory-destination/index.js","../../node_modules/micromark-factory-label/index.js","../../node_modules/micromark-factory-title/index.js","../../node_modules/micromark-factory-whitespace/index.js","../../node_modules/micromark-util-normalize-identifier/index.js","../../node_modules/micromark-core-commonmark/lib/definition.js","../../node_modules/micromark-core-commonmark/lib/hard-break-escape.js","../../node_modules/micromark-core-commonmark/lib/heading-atx.js","../../node_modules/micromark-util-html-tag-name/index.js","../../node_modules/micromark-core-commonmark/lib/html-flow.js","../../node_modules/micromark-core-commonmark/lib/html-text.js","../../node_modules/micromark-core-commonmark/lib/label-end.js","../../node_modules/micromark-core-commonmark/lib/label-start-image.js","../../node_modules/micromark-core-commonmark/lib/label-start-link.js","../../node_modules/micromark-core-commonmark/lib/line-ending.js","../../node_modules/micromark-core-commonmark/lib/thematic-break.js","../../node_modules/micromark-core-commonmark/lib/list.js","../../node_modules/micromark-core-commonmark/lib/setext-underline.js","../../node_modules/micromark-core-commonmark/index.js","../../node_modules/micromark/lib/initialize/flow.js","../../node_modules/micromark/lib/initialize/text.js","../../node_modules/micromark/lib/create-tokenizer.js","../../node_modules/micromark/lib/constructs.js","../../node_modules/micromark/lib/parse.js","../../node_modules/micromark/lib/preprocess.js","../../node_modules/micromark/lib/postprocess.js","../../node_modules/micromark-util-decode-numeric-character-reference/index.js","../../node_modules/micromark-util-decode-string/index.js","../../node_modules/mdast-util-from-markdown/node_modules/unist-util-stringify-position/lib/index.js","../../node_modules/mdast-util-from-markdown/node_modules/unist-util-stringify-position/index.js","../../node_modules/mdast-util-from-markdown/lib/index.js","../../node_modules/mdast-util-from-markdown/index.js","../../node_modules/mermaid/dist/createText-ca0c5216.js","../../node_modules/mermaid/dist/edges-066a5561.js","../../node_modules/mermaid/dist/index-01f381cb.js","../../node_modules/mermaid/dist/styles-483fbfea.js","../../node_modules/mermaid/dist/flowDiagram-b222e15a.js","../../node_modules/mermaid/dist/flowDiagram-v2-13329dc7.js","../../node_modules/mermaid/node_modules/uuid/dist/esm-browser/regex.js","../../node_modules/mermaid/node_modules/uuid/dist/esm-browser/validate.js","../../node_modules/mermaid/node_modules/uuid/dist/esm-browser/stringify.js","../../node_modules/mermaid/node_modules/uuid/dist/esm-browser/parse.js","../../node_modules/mermaid/node_modules/uuid/dist/esm-browser/v35.js","../../node_modules/mermaid/node_modules/uuid/dist/esm-browser/sha1.js","../../node_modules/mermaid/node_modules/uuid/dist/esm-browser/v5.js","../../node_modules/mermaid/node_modules/uuid/dist/esm-browser/index.js","../../node_modules/mermaid/dist/erDiagram-09d1c15f.js","../../node_modules/mermaid/dist/gitGraphDiagram-942e62fe.js","../../node_modules/dayjs/plugin/isoWeek.js","../../node_modules/dayjs/plugin/customParseFormat.js","../../node_modules/dayjs/plugin/advancedFormat.js","../../node_modules/mermaid/dist/ganttDiagram-b62c793e.js","../../node_modules/mermaid/dist/infoDiagram-94cd232f.js","../../node_modules/mermaid/dist/pieDiagram-bb1d19e5.js","../../node_modules/mermaid/dist/quadrantDiagram-c759a472.js","../../node_modules/mermaid/dist/xychartDiagram-f11f50a6.js","../../node_modules/mermaid/dist/requirementDiagram-87253d64.js","../../node_modules/mermaid/dist/sequenceDiagram-6894f283.js","../../node_modules/mermaid/dist/styles-b83b31c9.js","../../node_modules/mermaid/dist/classDiagram-fb54d2a0.js","../../node_modules/mermaid/dist/classDiagram-v2-a2b738ad.js","../../node_modules/mermaid/dist/styles-0784dbeb.js","../../node_modules/mermaid/dist/stateDiagram-5dee940d.js","../../node_modules/mermaid/dist/stateDiagram-v2-1992cada.js","../../node_modules/mermaid/dist/journeyDiagram-6625b456.js","../../node_modules/elkjs/lib/elk.bundled.js","../../node_modules/mermaid/dist/flowchart-elk-definition-ae0efee6.js","../../node_modules/mermaid/dist/timeline-definition-bf702344.js","../../node_modules/cytoscape/dist/cytoscape.esm.mjs","../../node_modules/layout-base/layout-base.js","../../node_modules/cose-base/cose-base.js","../../node_modules/cytoscape-cose-bilkent/cytoscape-cose-bilkent.js","../../node_modules/mermaid/dist/mindmap-definition-307c710a.js","../../node_modules/d3-sankey/node_modules/d3-array/src/max.js","../../node_modules/d3-sankey/node_modules/d3-array/src/min.js","../../node_modules/d3-sankey/node_modules/d3-array/src/sum.js","../../node_modules/d3-sankey/node_modules/d3-array/src/index.js","../../node_modules/d3-sankey/src/align.js","../../node_modules/d3-sankey/src/constant.js","../../node_modules/d3-sankey/src/sankey.js","../../node_modules/d3-sankey/node_modules/d3-path/src/path.js","../../node_modules/d3-sankey/node_modules/d3-path/src/index.js","../../node_modules/d3-sankey/node_modules/d3-shape/src/constant.js","../../node_modules/d3-sankey/node_modules/d3-shape/src/point.js","../../node_modules/d3-sankey/node_modules/d3-shape/src/array.js","../../node_modules/d3-sankey/node_modules/d3-shape/src/link/index.js","../../node_modules/d3-sankey/node_modules/d3-shape/src/index.js","../../node_modules/d3-sankey/src/sankeyLinkHorizontal.js","../../node_modules/d3-sankey/src/index.js","../../node_modules/mermaid/dist/sankeyDiagram-707fac0f.js","../../node_modules/mermaid/dist/blockDiagram-9f4a6865.js","../../node_modules/mermaid/dist/mermaid-6dc72991.js","../../node_modules/dompurify/src/utils.js","../../node_modules/dompurify/src/tags.js","../../node_modules/dompurify/src/attrs.js","../../node_modules/dompurify/src/regexp.js","../../node_modules/dompurify/src/purify.js","../../node_modules/@appland/client/src/loadConfiguration.ts","../../node_modules/stream-http/lib/capability.js","../../node_modules/inherits/inherits_browser.js","../../node_modules/events/events.js","../../node_modules/readable-stream/lib/internal/streams/stream-browser.js","../../node_modules/readable-stream/lib/internal/streams/buffer_list.js","../../node_modules/readable-stream/lib/internal/streams/destroy.js","../../node_modules/readable-stream/errors-browser.js","../../node_modules/readable-stream/lib/internal/streams/state.js","../../node_modules/util-deprecate/browser.js","../../node_modules/readable-stream/lib/_stream_writable.js","../../node_modules/readable-stream/lib/_stream_duplex.js","../../node_modules/safe-buffer/index.js","../../node_modules/readable-stream/node_modules/string_decoder/lib/string_decoder.js","../../node_modules/readable-stream/lib/internal/streams/end-of-stream.js","../../node_modules/readable-stream/lib/internal/streams/async_iterator.js","../../node_modules/readable-stream/lib/internal/streams/from-browser.js","../../node_modules/readable-stream/lib/_stream_readable.js","../../node_modules/readable-stream/lib/_stream_transform.js","../../node_modules/readable-stream/lib/_stream_passthrough.js","../../node_modules/readable-stream/lib/internal/streams/pipeline.js","../../node_modules/readable-stream/readable-browser.js","../../node_modules/stream-http/lib/response.js","../../node_modules/stream-http/lib/request.js","../../node_modules/xtend/immutable.js","../../node_modules/builtin-status-codes/browser.js","../../node_modules/stream-http/index.js","../../node_modules/https-browserify/index.js","../../node_modules/@appland/client/src/configuration.ts","../../node_modules/@appland/client/src/buildRequest.ts","../../node_modules/@appland/client/src/handleError.ts","../../node_modules/@appland/client/src/get.ts","../../node_modules/@appland/client/src/retryOn503.ts","../../node_modules/@appland/client/src/retryOnError.ts","../../node_modules/@appland/client/src/reportJson.ts","../../node_modules/@appland/client/src/verbose.ts","../../node_modules/@appland/client/src/retry.ts","../../node_modules/@appland/client/src/licenseKey.ts","../../node_modules/@appland/client/src/mapset.ts","../../node_modules/@appland/client/src/app.ts","../../node_modules/form-data/lib/browser.js","../../node_modules/has-tostringtag/shams.js","../../node_modules/is-arguments/index.js","../../node_modules/is-generator-function/index.js","../../node_modules/is-callable/index.js","../../node_modules/for-each/index.js","../../node_modules/available-typed-arrays/index.js","../../node_modules/which-typed-array/index.js","../../node_modules/is-typed-array/index.js","../../node_modules/util/support/types.js","../../node_modules/util/support/isBufferBrowser.js","../../node_modules/util/util.js","../../node_modules/assert/build/internal/errors.js","../../node_modules/assert/build/internal/assert/assertion_error.js","../../node_modules/object-keys/isArguments.js","../../node_modules/object-keys/implementation.js","../../node_modules/object-keys/index.js","../../node_modules/object.assign/implementation.js","../../node_modules/object.assign/polyfill.js","../../node_modules/object-is/implementation.js","../../node_modules/object-is/polyfill.js","../../node_modules/define-properties/index.js","../../node_modules/object-is/shim.js","../../node_modules/object-is/index.js","../../node_modules/is-nan/implementation.js","../../node_modules/is-nan/polyfill.js","../../node_modules/is-nan/shim.js","../../node_modules/is-nan/index.js","../../node_modules/assert/build/internal/util/comparisons.js","../../node_modules/assert/build/assert.js","../../node_modules/@appland/client/src/appMap.ts","../../node_modules/@appland/client/src/makeRequest.ts","../../node_modules/@appland/client/src/usage.ts","../../node_modules/engine.io-parser/build/cjs/commons.js","../../node_modules/engine.io-parser/build/cjs/encodePacket.browser.js","../../node_modules/engine.io-parser/build/cjs/contrib/base64-arraybuffer.js","../../node_modules/engine.io-parser/build/cjs/decodePacket.browser.js","../../node_modules/engine.io-parser/build/cjs/index.js","../../node_modules/@socket.io/component-emitter/index.mjs","../../node_modules/engine.io-client/build/cjs/globalThis.browser.js","../../node_modules/engine.io-client/build/cjs/util.js","../../node_modules/ms/index.js","../../node_modules/debug/src/common.js","../../node_modules/debug/src/browser.js","../../node_modules/engine.io-client/build/cjs/contrib/parseqs.js","../../node_modules/engine.io-client/build/cjs/transport.js","../../node_modules/engine.io-client/build/cjs/contrib/yeast.js","../../node_modules/engine.io-client/build/cjs/contrib/has-cors.js","../../node_modules/engine.io-client/build/cjs/transports/xmlhttprequest.browser.js","../../node_modules/engine.io-client/build/cjs/transports/polling.js","../../node_modules/engine.io-client/build/cjs/transports/websocket-constructor.browser.js","../../node_modules/engine.io-client/build/cjs/transports/websocket.js","../../node_modules/engine.io-client/build/cjs/transports/webtransport.js","../../node_modules/engine.io-client/build/cjs/transports/index.js","../../node_modules/engine.io-client/build/cjs/contrib/parseuri.js","../../node_modules/engine.io-client/build/cjs/socket.js","../../node_modules/engine.io-client/build/cjs/index.js","../../node_modules/socket.io-client/build/cjs/url.js","../../node_modules/socket.io-parser/build/cjs/is-binary.js","../../node_modules/socket.io-parser/build/cjs/binary.js","../../node_modules/socket.io-parser/build/cjs/index.js","../../node_modules/socket.io-client/build/cjs/on.js","../../node_modules/socket.io-client/build/cjs/socket.js","../../node_modules/socket.io-client/build/cjs/contrib/backo2.js","../../node_modules/socket.io-client/build/cjs/manager.js","../../node_modules/socket.io-client/build/cjs/index.js","../../node_modules/@appland/client/src/aiClient.ts","../../node_modules/@appland/client/src/ai.ts","../../node_modules/@appland/client/src/index.ts","../../node_modules/@appland/rpc/built/search.js","../../node_modules/@appland/rpc/built/appmap.js","../../node_modules/@appland/rpc/built/explain.js","../../node_modules/@appland/rpc/built/configuration.js","../../node_modules/@appland/rpc/built/file.js","../../node_modules/@appland/rpc/built/navie.js","../../node_modules/@appland/rpc/built/index.js","../../node_modules/uuid/dist/esm-browser/rng.js","../../node_modules/uuid/dist/esm-browser/regex.js","../../node_modules/uuid/dist/esm-browser/validate.js","../../node_modules/uuid/dist/esm-browser/stringify.js","../../node_modules/uuid/dist/esm-browser/v1.js","../../node_modules/uuid/dist/esm-browser/parse.js","../../node_modules/uuid/dist/esm-browser/v35.js","../../node_modules/uuid/dist/esm-browser/md5.js","../../node_modules/uuid/dist/esm-browser/v3.js","../../node_modules/uuid/dist/esm-browser/v4.js","../../node_modules/uuid/dist/esm-browser/sha1.js","../../node_modules/uuid/dist/esm-browser/v5.js","../../node_modules/uuid/dist/esm-browser/nil.js","../../node_modules/uuid/dist/esm-browser/version.js","../../node_modules/uuid/dist/esm-browser/index.js","../../node_modules/jayson/lib/generateRequest.js","../../node_modules/jayson/lib/client/browser/index.js","../../app/javascript/packs/scenario.js","../../node_modules/d3/index.js","../../node_modules/d3/dist/package.js","../../node_modules/d3/node_modules/d3-array/src/index.js","../../node_modules/d3/node_modules/d3-array/src/bisect.js","../../node_modules/d3/node_modules/d3-array/src/ascending.js","../../node_modules/d3/node_modules/d3-array/src/bisector.js","../../node_modules/d3/node_modules/d3-array/src/cross.js","../../node_modules/d3/node_modules/d3-array/src/pairs.js","../../node_modules/d3/node_modules/d3-array/src/descending.js","../../node_modules/d3/node_modules/d3-array/src/deviation.js","../../node_modules/d3/node_modules/d3-array/src/variance.js","../../node_modules/d3/node_modules/d3-array/src/number.js","../../node_modules/d3/node_modules/d3-array/src/extent.js","../../node_modules/d3/node_modules/d3-array/src/histogram.js","../../node_modules/d3/node_modules/d3-array/src/array.js","../../node_modules/d3/node_modules/d3-array/src/constant.js","../../node_modules/d3/node_modules/d3-array/src/identity.js","../../node_modules/d3/node_modules/d3-array/src/range.js","../../node_modules/d3/node_modules/d3-array/src/ticks.js","../../node_modules/d3/node_modules/d3-array/src/threshold/sturges.js","../../node_modules/d3/node_modules/d3-array/src/threshold/freedmanDiaconis.js","../../node_modules/d3/node_modules/d3-array/src/quantile.js","../../node_modules/d3/node_modules/d3-array/src/threshold/scott.js","../../node_modules/d3/node_modules/d3-array/src/max.js","../../node_modules/d3/node_modules/d3-array/src/mean.js","../../node_modules/d3/node_modules/d3-array/src/median.js","../../node_modules/d3/node_modules/d3-array/src/merge.js","../../node_modules/d3/node_modules/d3-array/src/min.js","../../node_modules/d3/node_modules/d3-array/src/permute.js","../../node_modules/d3/node_modules/d3-array/src/scan.js","../../node_modules/d3/node_modules/d3-array/src/shuffle.js","../../node_modules/d3/node_modules/d3-array/src/sum.js","../../node_modules/d3/node_modules/d3-array/src/transpose.js","../../node_modules/d3/node_modules/d3-array/src/zip.js","../../node_modules/d3/node_modules/d3-axis/src/index.js","../../node_modules/d3/node_modules/d3-axis/src/axis.js","../../node_modules/d3/node_modules/d3-axis/src/array.js","../../node_modules/d3/node_modules/d3-axis/src/identity.js","../../node_modules/d3/node_modules/d3-brush/src/index.js","../../node_modules/d3/node_modules/d3-brush/src/brush.js","../../node_modules/d3/node_modules/d3-dispatch/src/index.js","../../node_modules/d3/node_modules/d3-dispatch/src/dispatch.js","../../node_modules/d3/node_modules/d3-selection/src/index.js","../../node_modules/d3/node_modules/d3-selection/src/creator.js","../../node_modules/d3/node_modules/d3-selection/src/namespace.js","../../node_modules/d3/node_modules/d3-selection/src/namespaces.js","../../node_modules/d3/node_modules/d3-selection/src/select.js","../../node_modules/d3/node_modules/d3-selection/src/selection/index.js","../../node_modules/d3/node_modules/d3-selection/src/selection/select.js","../../node_modules/d3/node_modules/d3-selection/src/selector.js","../../node_modules/d3/node_modules/d3-selection/src/selection/selectAll.js","../../node_modules/d3/node_modules/d3-selection/src/selectorAll.js","../../node_modules/d3/node_modules/d3-selection/src/selection/filter.js","../../node_modules/d3/node_modules/d3-selection/src/matcher.js","../../node_modules/d3/node_modules/d3-selection/src/selection/data.js","../../node_modules/d3/node_modules/d3-selection/src/selection/enter.js","../../node_modules/d3/node_modules/d3-selection/src/selection/sparse.js","../../node_modules/d3/node_modules/d3-selection/src/constant.js","../../node_modules/d3/node_modules/d3-selection/src/selection/exit.js","../../node_modules/d3/node_modules/d3-selection/src/selection/join.js","../../node_modules/d3/node_modules/d3-selection/src/selection/merge.js","../../node_modules/d3/node_modules/d3-selection/src/selection/order.js","../../node_modules/d3/node_modules/d3-selection/src/selection/sort.js","../../node_modules/d3/node_modules/d3-selection/src/selection/call.js","../../node_modules/d3/node_modules/d3-selection/src/selection/nodes.js","../../node_modules/d3/node_modules/d3-selection/src/selection/node.js","../../node_modules/d3/node_modules/d3-selection/src/selection/size.js","../../node_modules/d3/node_modules/d3-selection/src/selection/empty.js","../../node_modules/d3/node_modules/d3-selection/src/selection/each.js","../../node_modules/d3/node_modules/d3-selection/src/selection/attr.js","../../node_modules/d3/node_modules/d3-selection/src/selection/style.js","../../node_modules/d3/node_modules/d3-selection/src/window.js","../../node_modules/d3/node_modules/d3-selection/src/selection/property.js","../../node_modules/d3/node_modules/d3-selection/src/selection/classed.js","../../node_modules/d3/node_modules/d3-selection/src/selection/text.js","../../node_modules/d3/node_modules/d3-selection/src/selection/html.js","../../node_modules/d3/node_modules/d3-selection/src/selection/raise.js","../../node_modules/d3/node_modules/d3-selection/src/selection/lower.js","../../node_modules/d3/node_modules/d3-selection/src/selection/append.js","../../node_modules/d3/node_modules/d3-selection/src/selection/insert.js","../../node_modules/d3/node_modules/d3-selection/src/selection/remove.js","../../node_modules/d3/node_modules/d3-selection/src/selection/clone.js","../../node_modules/d3/node_modules/d3-selection/src/selection/datum.js","../../node_modules/d3/node_modules/d3-selection/src/selection/on.js","../../node_modules/d3/node_modules/d3-selection/src/selection/dispatch.js","../../node_modules/d3/node_modules/d3-interpolate/src/index.js","../../node_modules/d3/node_modules/d3-color/src/index.js","../../node_modules/d3/node_modules/d3-color/src/color.js","../../node_modules/d3/node_modules/d3-color/src/define.js","../../node_modules/d3/node_modules/d3-interpolate/src/rgb.js","../../node_modules/d3/node_modules/d3-interpolate/src/basis.js","../../node_modules/d3/node_modules/d3-interpolate/src/basisClosed.js","../../node_modules/d3/node_modules/d3-interpolate/src/color.js","../../node_modules/d3/node_modules/d3-interpolate/src/constant.js","../../node_modules/d3/node_modules/d3-interpolate/src/number.js","../../node_modules/d3/node_modules/d3-interpolate/src/string.js","../../node_modules/d3/node_modules/d3-interpolate/src/transform/index.js","../../node_modules/d3/node_modules/d3-interpolate/src/transform/parse.js","../../node_modules/d3/node_modules/d3-interpolate/src/transform/decompose.js","../../node_modules/d3/node_modules/d3-transition/src/index.js","../../node_modules/d3/node_modules/d3-transition/src/selection/index.js","../../node_modules/d3/node_modules/d3-transition/src/selection/interrupt.js","../../node_modules/d3/node_modules/d3-transition/src/interrupt.js","../../node_modules/d3/node_modules/d3-transition/src/transition/schedule.js","../../node_modules/d3/node_modules/d3-timer/src/index.js","../../node_modules/d3/node_modules/d3-timer/src/timer.js","../../node_modules/d3/node_modules/d3-timer/src/timeout.js","../../node_modules/d3/node_modules/d3-transition/src/selection/transition.js","../../node_modules/d3/node_modules/d3-transition/src/transition/index.js","../../node_modules/d3/node_modules/d3-transition/src/transition/attr.js","../../node_modules/d3/node_modules/d3-transition/src/transition/tween.js","../../node_modules/d3/node_modules/d3-transition/src/transition/interpolate.js","../../node_modules/d3/node_modules/d3-transition/src/transition/attrTween.js","../../node_modules/d3/node_modules/d3-transition/src/transition/delay.js","../../node_modules/d3/node_modules/d3-transition/src/transition/duration.js","../../node_modules/d3/node_modules/d3-transition/src/transition/ease.js","../../node_modules/d3/node_modules/d3-transition/src/transition/filter.js","../../node_modules/d3/node_modules/d3-transition/src/transition/merge.js","../../node_modules/d3/node_modules/d3-transition/src/transition/on.js","../../node_modules/d3/node_modules/d3-transition/src/transition/remove.js","../../node_modules/d3/node_modules/d3-transition/src/transition/select.js","../../node_modules/d3/node_modules/d3-transition/src/transition/selectAll.js","../../node_modules/d3/node_modules/d3-transition/src/transition/selection.js","../../node_modules/d3/node_modules/d3-transition/src/transition/style.js","../../node_modules/d3/node_modules/d3-transition/src/transition/styleTween.js","../../node_modules/d3/node_modules/d3-transition/src/transition/text.js","../../node_modules/d3/node_modules/d3-transition/src/transition/textTween.js","../../node_modules/d3/node_modules/d3-transition/src/transition/transition.js","../../node_modules/d3/node_modules/d3-transition/src/transition/end.js","../../node_modules/d3/node_modules/d3-ease/src/index.js","../../node_modules/d3/node_modules/d3-ease/src/cubic.js","../../node_modules/d3/node_modules/d3-transition/src/active.js","../../node_modules/d3/node_modules/d3-brush/src/constant.js","../../node_modules/d3/node_modules/d3-brush/src/event.js","../../node_modules/d3/node_modules/d3-brush/src/noevent.js","../../node_modules/d3/node_modules/d3-chord/src/index.js","../../node_modules/d3/node_modules/d3-chord/src/chord.js","../../node_modules/d3/node_modules/d3-chord/src/math.js","../../node_modules/d3/node_modules/d3-chord/src/ribbon.js","../../node_modules/d3/node_modules/d3-chord/src/array.js","../../node_modules/d3/node_modules/d3-chord/src/constant.js","../../node_modules/d3-collection/src/index.js","../../node_modules/d3-collection/src/nest.js","../../node_modules/d3-collection/src/map.js","../../node_modules/d3-collection/src/set.js","../../node_modules/d3-collection/src/keys.js","../../node_modules/d3-collection/src/values.js","../../node_modules/d3-collection/src/entries.js","../../node_modules/d3/node_modules/d3-contour/src/index.js","../../node_modules/d3/node_modules/d3-contour/src/contours.js","../../node_modules/d3/node_modules/d3-contour/src/array.js","../../node_modules/d3/node_modules/d3-contour/src/ascending.js","../../node_modules/d3/node_modules/d3-contour/src/area.js","../../node_modules/d3/node_modules/d3-contour/src/constant.js","../../node_modules/d3/node_modules/d3-contour/src/contains.js","../../node_modules/d3/node_modules/d3-contour/src/noop.js","../../node_modules/d3/node_modules/d3-contour/src/density.js","../../node_modules/d3/node_modules/d3-contour/src/blur.js","../../node_modules/d3/node_modules/d3-force/src/index.js","../../node_modules/d3/node_modules/d3-force/src/center.js","../../node_modules/d3/node_modules/d3-force/src/collide.js","../../node_modules/d3/node_modules/d3-force/src/constant.js","../../node_modules/d3/node_modules/d3-force/src/jiggle.js","../../node_modules/d3/node_modules/d3-force/src/link.js","../../node_modules/d3/node_modules/d3-force/src/manyBody.js","../../node_modules/d3/node_modules/d3-force/src/simulation.js","../../node_modules/d3/node_modules/d3-force/src/radial.js","../../node_modules/d3/node_modules/d3-force/src/x.js","../../node_modules/d3/node_modules/d3-force/src/y.js","../../node_modules/d3/node_modules/d3-random/src/index.js","../../node_modules/d3/node_modules/d3-random/src/uniform.js","../../node_modules/d3/node_modules/d3-random/src/defaultSource.js","../../node_modules/d3/node_modules/d3-random/src/normal.js","../../node_modules/d3/node_modules/d3-random/src/logNormal.js","../../node_modules/d3/node_modules/d3-random/src/bates.js","../../node_modules/d3/node_modules/d3-random/src/irwinHall.js","../../node_modules/d3/node_modules/d3-random/src/exponential.js","../../node_modules/d3/node_modules/d3-scale/src/index.js","../../node_modules/d3/node_modules/d3-scale/src/band.js","../../node_modules/d3/node_modules/d3-scale/src/init.js","../../node_modules/d3/node_modules/d3-scale/src/ordinal.js","../../node_modules/d3/node_modules/d3-scale/src/array.js","../../node_modules/d3/node_modules/d3-scale/src/identity.js","../../node_modules/d3/node_modules/d3-scale/src/linear.js","../../node_modules/d3/node_modules/d3-scale/src/continuous.js","../../node_modules/d3/node_modules/d3-scale/src/constant.js","../../node_modules/d3/node_modules/d3-scale/src/number.js","../../node_modules/d3/node_modules/d3-scale/src/tickFormat.js","../../node_modules/d3/node_modules/d3-scale/src/log.js","../../node_modules/d3/node_modules/d3-scale/src/nice.js","../../node_modules/d3/node_modules/d3-scale/src/symlog.js","../../node_modules/d3/node_modules/d3-scale/src/pow.js","../../node_modules/d3/node_modules/d3-scale/src/quantile.js","../../node_modules/d3/node_modules/d3-scale/src/quantize.js","../../node_modules/d3/node_modules/d3-scale/src/threshold.js","../../node_modules/d3/node_modules/d3-scale/src/time.js","../../node_modules/d3/node_modules/d3-scale/src/utcTime.js","../../node_modules/d3/node_modules/d3-scale/src/sequential.js","../../node_modules/d3/node_modules/d3-scale/src/sequentialQuantile.js","../../node_modules/d3/node_modules/d3-scale/src/diverging.js","../../node_modules/d3/node_modules/d3-scale-chromatic/src/index.js","../../node_modules/d3/node_modules/d3-scale-chromatic/src/categorical/category10.js","../../node_modules/d3/node_modules/d3-scale-chromatic/src/colors.js","../../node_modules/d3-voronoi/src/index.js","../../node_modules/d3-voronoi/src/voronoi.js","../../node_modules/d3-voronoi/src/constant.js","../../node_modules/d3-voronoi/src/point.js","../../node_modules/d3-voronoi/src/Diagram.js","../../node_modules/d3-voronoi/src/Beach.js","../../node_modules/d3-voronoi/src/RedBlackTree.js","../../node_modules/d3-voronoi/src/Cell.js","../../node_modules/d3-voronoi/src/Edge.js","../../node_modules/d3-voronoi/src/Circle.js","../../node_modules/d3/node_modules/d3-zoom/src/index.js","../../node_modules/d3/node_modules/d3-zoom/src/zoom.js","../../node_modules/d3/node_modules/d3-zoom/src/constant.js","../../node_modules/d3/node_modules/d3-zoom/src/event.js","../../node_modules/d3/node_modules/d3-zoom/src/transform.js","../../node_modules/d3/node_modules/d3-zoom/src/noevent.js","../../node_modules/vue/dist/vue.runtime.esm.js","../../node_modules/@appland/components/dist/index.js","../../node_modules/@appland/components/node_modules/@appland/models/src/codeObjectType.js","../../node_modules/@appland/components/node_modules/@appland/models/src/codeObjectId.js","../../node_modules/@appland/components/node_modules/@appland/models/src/util.js","../../node_modules/@appland/components/node_modules/@appland/models/src/sql/normalize.js","../../node_modules/@appland/components/node_modules/@appland/models/src/sql/parse.js","../../node_modules/@appland/components/node_modules/@appland/models/src/sql/parseError.js","../../node_modules/@appland/components/node_modules/@appland/models/src/sql/sqlErrorHandler.js","../../node_modules/@appland/components/node_modules/@appland/models/src/sql/analyze.js","../../node_modules/@appland/components/node_modules/@appland/models/src/codeObject.js","../../node_modules/@appland/components/node_modules/@appland/models/src/classMap.js","../../node_modules/@appland/components/node_modules/@appland/models/src/callTree/callNode.js","../../node_modules/@appland/components/node_modules/@appland/models/src/eventSource.js","../../node_modules/@appland/components/node_modules/@appland/models/src/callTree/callTree.js","../../node_modules/@appland/components/node_modules/@appland/models/src/appMap.js","../../node_modules/@appland/components/node_modules/@appland/models/src/hashBuilder.js","../../node_modules/@appland/components/node_modules/@appland/models/src/event.js","../../node_modules/@appland/components/node_modules/@appland/models/src/appMapBuilder/eventStack.js","../../node_modules/@appland/components/node_modules/@appland/models/src/appMapBuilder/eventSorter.js","../../node_modules/@appland/components/node_modules/@appland/models/src/appMapBuilder/index.js","../../node_modules/@appland/components/node_modules/@appland/models/src/eventNavigator.js","../../node_modules/@appland/components/node_modules/@appland/models/src/eventInfo.js","../../node_modules/@appland/components/node_modules/@appland/models/src/appMapFilter.js","../../node_modules/@appland/components/node_modules/@appland/models/src/serialize.js","../../node_modules/vuex/dist/vuex.esm.js","../../node_modules/highlight.js/es/core.js","../../node_modules/highlight.js/es/languages/sql.js","../../node_modules/@appland/components/node_modules/@appland/diagrams/dist/index.js","../../node_modules/@appland/components/node_modules/@appland/diagrams/node_modules/@appland/models/src/codeObjectType.js","../../node_modules/@appland/components/node_modules/@appland/diagrams/node_modules/@appland/models/src/codeObjectId.js","../../node_modules/@appland/components/node_modules/@appland/diagrams/node_modules/@appland/models/src/util.js","../../node_modules/@appland/components/node_modules/@appland/diagrams/node_modules/@appland/models/src/sql/normalize.js","../../node_modules/@appland/components/node_modules/@appland/diagrams/node_modules/@appland/models/src/sql/parse.js","../../node_modules/@appland/components/node_modules/@appland/diagrams/node_modules/@appland/models/src/sql/parseError.js","../../node_modules/@appland/components/node_modules/@appland/diagrams/node_modules/@appland/models/src/sql/sqlErrorHandler.js","../../node_modules/@appland/components/node_modules/@appland/diagrams/node_modules/@appland/models/src/sql/analyze.js","../../node_modules/@appland/components/node_modules/@appland/diagrams/node_modules/@appland/models/src/codeObject.js","../../node_modules/@appland/components/node_modules/@appland/diagrams/node_modules/@appland/models/src/classMap.js","../../node_modules/@appland/components/node_modules/@appland/diagrams/node_modules/@appland/models/src/callTree/callNode.js","../../node_modules/@appland/components/node_modules/@appland/diagrams/node_modules/@appland/models/src/eventSource.js","../../node_modules/@appland/components/node_modules/@appland/diagrams/node_modules/@appland/models/src/callTree/callTree.js","../../node_modules/@appland/components/node_modules/@appland/diagrams/node_modules/@appland/models/src/appMap.js","../../node_modules/@appland/components/node_modules/@appland/diagrams/node_modules/@appland/models/src/hashBuilder.js","../../node_modules/@appland/components/node_modules/@appland/diagrams/node_modules/@appland/models/src/event.js","../../node_modules/@appland/components/node_modules/@appland/diagrams/node_modules/@appland/models/src/appMapBuilder/eventStack.js","../../node_modules/@appland/components/node_modules/@appland/diagrams/node_modules/@appland/models/src/appMapBuilder/eventSorter.js","../../node_modules/@appland/components/node_modules/@appland/diagrams/node_modules/@appland/models/src/appMapBuilder/index.js","../../node_modules/@appland/components/node_modules/@appland/diagrams/node_modules/@appland/models/src/eventNavigator.js","../../node_modules/@appland/components/node_modules/@appland/diagrams/node_modules/@appland/models/src/eventInfo.js","../../node_modules/@appland/components/node_modules/@appland/diagrams/node_modules/@appland/models/src/appMapFilter.js","../../node_modules/@appland/components/node_modules/@appland/diagrams/node_modules/@appland/models/src/serialize.js","../../node_modules/diff/lib/index.mjs","../../node_modules/dom-to-svg/src/index.ts","../../node_modules/dom-to-svg/node_modules/postcss/lib/postcss.mjs","../../node_modules/dom-to-svg/src/css.ts","../../node_modules/dom-to-svg/src/dom.ts","../../node_modules/dom-to-svg/src/stacking.ts","../../node_modules/dom-to-svg/src/traversal.ts","../../node_modules/dom-to-svg/src/element.ts","../../node_modules/dom-to-svg/src/accessibility.ts","../../node_modules/dom-to-svg/src/gradients.ts","../../node_modules/dom-to-svg/src/svg.ts","../../node_modules/dom-to-svg/src/text.ts","../../node_modules/dom-to-svg/src/util.ts","../../node_modules/dom-to-svg/src/inline.ts","../../node_modules/highlight.js/es/index.js","../../node_modules/mermaid/dist/mermaid.core.mjs","../../node_modules/pako/dist/pako.esm.mjs","../../node_modules/js-base64/base64.mjs","../../node_modules/marked/src/defaults.ts","../../node_modules/marked/src/helpers.ts","../../node_modules/marked/src/Tokenizer.ts","../../node_modules/marked/src/rules.ts","../../node_modules/marked/src/Lexer.ts","../../node_modules/marked/src/Renderer.ts","../../node_modules/marked/src/TextRenderer.ts","../../node_modules/marked/src/Parser.ts","../../node_modules/marked/src/Hooks.ts","../../node_modules/marked/src/Instance.ts","../../node_modules/marked/src/marked.ts","../../app/javascript/appland/util.js","../../app/javascript/ui/scenarioEdit.js","../../app/javascript/ui/scenarioShare.js"],"sourcesContent":["",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory();\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\troot.CryptoJS = factory();\n\t}\n}(this, function () {\n\n\t/*globals window, global, require*/\n\n\t/**\n\t * CryptoJS core components.\n\t */\n\tvar CryptoJS = CryptoJS || (function (Math, undefined) {\n\n\t var crypto;\n\n\t // Native crypto from window (Browser)\n\t if (typeof window !== 'undefined' && window.crypto) {\n\t crypto = window.crypto;\n\t }\n\n\t // Native crypto in web worker (Browser)\n\t if (typeof self !== 'undefined' && self.crypto) {\n\t crypto = self.crypto;\n\t }\n\n\t // Native crypto from worker\n\t if (typeof globalThis !== 'undefined' && globalThis.crypto) {\n\t crypto = globalThis.crypto;\n\t }\n\n\t // Native (experimental IE 11) crypto from window (Browser)\n\t if (!crypto && typeof window !== 'undefined' && window.msCrypto) {\n\t crypto = window.msCrypto;\n\t }\n\n\t // Native crypto from global (NodeJS)\n\t if (!crypto && typeof global !== 'undefined' && global.crypto) {\n\t crypto = global.crypto;\n\t }\n\n\t // Native crypto import via require (NodeJS)\n\t if (!crypto && typeof require === 'function') {\n\t try {\n\t crypto = require('crypto');\n\t } catch (err) {}\n\t }\n\n\t /*\n\t * Cryptographically secure pseudorandom number generator\n\t *\n\t * As Math.random() is cryptographically not safe to use\n\t */\n\t var cryptoSecureRandomInt = function () {\n\t if (crypto) {\n\t // Use getRandomValues method (Browser)\n\t if (typeof crypto.getRandomValues === 'function') {\n\t try {\n\t return crypto.getRandomValues(new Uint32Array(1))[0];\n\t } catch (err) {}\n\t }\n\n\t // Use randomBytes method (NodeJS)\n\t if (typeof crypto.randomBytes === 'function') {\n\t try {\n\t return crypto.randomBytes(4).readInt32LE();\n\t } catch (err) {}\n\t }\n\t }\n\n\t throw new Error('Native crypto module could not be used to get secure random number.');\n\t };\n\n\t /*\n\t * Local polyfill of Object.create\n\n\t */\n\t var create = Object.create || (function () {\n\t function F() {}\n\n\t return function (obj) {\n\t var subtype;\n\n\t F.prototype = obj;\n\n\t subtype = new F();\n\n\t F.prototype = null;\n\n\t return subtype;\n\t };\n\t }());\n\n\t /**\n\t * CryptoJS namespace.\n\t */\n\t var C = {};\n\n\t /**\n\t * Library namespace.\n\t */\n\t var C_lib = C.lib = {};\n\n\t /**\n\t * Base object for prototypal inheritance.\n\t */\n\t var Base = C_lib.Base = (function () {\n\n\n\t return {\n\t /**\n\t * Creates a new object that inherits from this object.\n\t *\n\t * @param {Object} overrides Properties to copy into the new object.\n\t *\n\t * @return {Object} The new object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var MyType = CryptoJS.lib.Base.extend({\n\t * field: 'value',\n\t *\n\t * method: function () {\n\t * }\n\t * });\n\t */\n\t extend: function (overrides) {\n\t // Spawn\n\t var subtype = create(this);\n\n\t // Augment\n\t if (overrides) {\n\t subtype.mixIn(overrides);\n\t }\n\n\t // Create default initializer\n\t if (!subtype.hasOwnProperty('init') || this.init === subtype.init) {\n\t subtype.init = function () {\n\t subtype.$super.init.apply(this, arguments);\n\t };\n\t }\n\n\t // Initializer's prototype is the subtype object\n\t subtype.init.prototype = subtype;\n\n\t // Reference supertype\n\t subtype.$super = this;\n\n\t return subtype;\n\t },\n\n\t /**\n\t * Extends this object and runs the init method.\n\t * Arguments to create() will be passed to init().\n\t *\n\t * @return {Object} The new object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var instance = MyType.create();\n\t */\n\t create: function () {\n\t var instance = this.extend();\n\t instance.init.apply(instance, arguments);\n\n\t return instance;\n\t },\n\n\t /**\n\t * Initializes a newly created object.\n\t * Override this method to add some logic when your objects are created.\n\t *\n\t * @example\n\t *\n\t * var MyType = CryptoJS.lib.Base.extend({\n\t * init: function () {\n\t * // ...\n\t * }\n\t * });\n\t */\n\t init: function () {\n\t },\n\n\t /**\n\t * Copies properties into this object.\n\t *\n\t * @param {Object} properties The properties to mix in.\n\t *\n\t * @example\n\t *\n\t * MyType.mixIn({\n\t * field: 'value'\n\t * });\n\t */\n\t mixIn: function (properties) {\n\t for (var propertyName in properties) {\n\t if (properties.hasOwnProperty(propertyName)) {\n\t this[propertyName] = properties[propertyName];\n\t }\n\t }\n\n\t // IE won't copy toString using the loop above\n\t if (properties.hasOwnProperty('toString')) {\n\t this.toString = properties.toString;\n\t }\n\t },\n\n\t /**\n\t * Creates a copy of this object.\n\t *\n\t * @return {Object} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = instance.clone();\n\t */\n\t clone: function () {\n\t return this.init.prototype.extend(this);\n\t }\n\t };\n\t }());\n\n\t /**\n\t * An array of 32-bit words.\n\t *\n\t * @property {Array} words The array of 32-bit words.\n\t * @property {number} sigBytes The number of significant bytes in this word array.\n\t */\n\t var WordArray = C_lib.WordArray = Base.extend({\n\t /**\n\t * Initializes a newly created word array.\n\t *\n\t * @param {Array} words (Optional) An array of 32-bit words.\n\t * @param {number} sigBytes (Optional) The number of significant bytes in the words.\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.lib.WordArray.create();\n\t * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);\n\t * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);\n\t */\n\t init: function (words, sigBytes) {\n\t words = this.words = words || [];\n\n\t if (sigBytes != undefined) {\n\t this.sigBytes = sigBytes;\n\t } else {\n\t this.sigBytes = words.length * 4;\n\t }\n\t },\n\n\t /**\n\t * Converts this word array to a string.\n\t *\n\t * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex\n\t *\n\t * @return {string} The stringified word array.\n\t *\n\t * @example\n\t *\n\t * var string = wordArray + '';\n\t * var string = wordArray.toString();\n\t * var string = wordArray.toString(CryptoJS.enc.Utf8);\n\t */\n\t toString: function (encoder) {\n\t return (encoder || Hex).stringify(this);\n\t },\n\n\t /**\n\t * Concatenates a word array to this word array.\n\t *\n\t * @param {WordArray} wordArray The word array to append.\n\t *\n\t * @return {WordArray} This word array.\n\t *\n\t * @example\n\t *\n\t * wordArray1.concat(wordArray2);\n\t */\n\t concat: function (wordArray) {\n\t // Shortcuts\n\t var thisWords = this.words;\n\t var thatWords = wordArray.words;\n\t var thisSigBytes = this.sigBytes;\n\t var thatSigBytes = wordArray.sigBytes;\n\n\t // Clamp excess bits\n\t this.clamp();\n\n\t // Concat\n\t if (thisSigBytes % 4) {\n\t // Copy one byte at a time\n\t for (var i = 0; i < thatSigBytes; i++) {\n\t var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8);\n\t }\n\t } else {\n\t // Copy one word at a time\n\t for (var j = 0; j < thatSigBytes; j += 4) {\n\t thisWords[(thisSigBytes + j) >>> 2] = thatWords[j >>> 2];\n\t }\n\t }\n\t this.sigBytes += thatSigBytes;\n\n\t // Chainable\n\t return this;\n\t },\n\n\t /**\n\t * Removes insignificant bits.\n\t *\n\t * @example\n\t *\n\t * wordArray.clamp();\n\t */\n\t clamp: function () {\n\t // Shortcuts\n\t var words = this.words;\n\t var sigBytes = this.sigBytes;\n\n\t // Clamp\n\t words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8);\n\t words.length = Math.ceil(sigBytes / 4);\n\t },\n\n\t /**\n\t * Creates a copy of this word array.\n\t *\n\t * @return {WordArray} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = wordArray.clone();\n\t */\n\t clone: function () {\n\t var clone = Base.clone.call(this);\n\t clone.words = this.words.slice(0);\n\n\t return clone;\n\t },\n\n\t /**\n\t * Creates a word array filled with random bytes.\n\t *\n\t * @param {number} nBytes The number of random bytes to generate.\n\t *\n\t * @return {WordArray} The random word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.lib.WordArray.random(16);\n\t */\n\t random: function (nBytes) {\n\t var words = [];\n\n\t for (var i = 0; i < nBytes; i += 4) {\n\t words.push(cryptoSecureRandomInt());\n\t }\n\n\t return new WordArray.init(words, nBytes);\n\t }\n\t });\n\n\t /**\n\t * Encoder namespace.\n\t */\n\t var C_enc = C.enc = {};\n\n\t /**\n\t * Hex encoding strategy.\n\t */\n\t var Hex = C_enc.Hex = {\n\t /**\n\t * Converts a word array to a hex string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The hex string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hexString = CryptoJS.enc.Hex.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var hexChars = [];\n\t for (var i = 0; i < sigBytes; i++) {\n\t var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t hexChars.push((bite >>> 4).toString(16));\n\t hexChars.push((bite & 0x0f).toString(16));\n\t }\n\n\t return hexChars.join('');\n\t },\n\n\t /**\n\t * Converts a hex string to a word array.\n\t *\n\t * @param {string} hexStr The hex string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Hex.parse(hexString);\n\t */\n\t parse: function (hexStr) {\n\t // Shortcut\n\t var hexStrLength = hexStr.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < hexStrLength; i += 2) {\n\t words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4);\n\t }\n\n\t return new WordArray.init(words, hexStrLength / 2);\n\t }\n\t };\n\n\t /**\n\t * Latin1 encoding strategy.\n\t */\n\t var Latin1 = C_enc.Latin1 = {\n\t /**\n\t * Converts a word array to a Latin1 string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The Latin1 string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var latin1Chars = [];\n\t for (var i = 0; i < sigBytes; i++) {\n\t var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t latin1Chars.push(String.fromCharCode(bite));\n\t }\n\n\t return latin1Chars.join('');\n\t },\n\n\t /**\n\t * Converts a Latin1 string to a word array.\n\t *\n\t * @param {string} latin1Str The Latin1 string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Latin1.parse(latin1String);\n\t */\n\t parse: function (latin1Str) {\n\t // Shortcut\n\t var latin1StrLength = latin1Str.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < latin1StrLength; i++) {\n\t words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8);\n\t }\n\n\t return new WordArray.init(words, latin1StrLength);\n\t }\n\t };\n\n\t /**\n\t * UTF-8 encoding strategy.\n\t */\n\t var Utf8 = C_enc.Utf8 = {\n\t /**\n\t * Converts a word array to a UTF-8 string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The UTF-8 string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t try {\n\t return decodeURIComponent(escape(Latin1.stringify(wordArray)));\n\t } catch (e) {\n\t throw new Error('Malformed UTF-8 data');\n\t }\n\t },\n\n\t /**\n\t * Converts a UTF-8 string to a word array.\n\t *\n\t * @param {string} utf8Str The UTF-8 string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Utf8.parse(utf8String);\n\t */\n\t parse: function (utf8Str) {\n\t return Latin1.parse(unescape(encodeURIComponent(utf8Str)));\n\t }\n\t };\n\n\t /**\n\t * Abstract buffered block algorithm template.\n\t *\n\t * The property blockSize must be implemented in a concrete subtype.\n\t *\n\t * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0\n\t */\n\t var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({\n\t /**\n\t * Resets this block algorithm's data buffer to its initial state.\n\t *\n\t * @example\n\t *\n\t * bufferedBlockAlgorithm.reset();\n\t */\n\t reset: function () {\n\t // Initial values\n\t this._data = new WordArray.init();\n\t this._nDataBytes = 0;\n\t },\n\n\t /**\n\t * Adds new data to this block algorithm's buffer.\n\t *\n\t * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.\n\t *\n\t * @example\n\t *\n\t * bufferedBlockAlgorithm._append('data');\n\t * bufferedBlockAlgorithm._append(wordArray);\n\t */\n\t _append: function (data) {\n\t // Convert string to WordArray, else assume WordArray already\n\t if (typeof data == 'string') {\n\t data = Utf8.parse(data);\n\t }\n\n\t // Append\n\t this._data.concat(data);\n\t this._nDataBytes += data.sigBytes;\n\t },\n\n\t /**\n\t * Processes available data blocks.\n\t *\n\t * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.\n\t *\n\t * @param {boolean} doFlush Whether all blocks and partial blocks should be processed.\n\t *\n\t * @return {WordArray} The processed data.\n\t *\n\t * @example\n\t *\n\t * var processedData = bufferedBlockAlgorithm._process();\n\t * var processedData = bufferedBlockAlgorithm._process(!!'flush');\n\t */\n\t _process: function (doFlush) {\n\t var processedWords;\n\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\t var dataSigBytes = data.sigBytes;\n\t var blockSize = this.blockSize;\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count blocks ready\n\t var nBlocksReady = dataSigBytes / blockSizeBytes;\n\t if (doFlush) {\n\t // Round up to include partial blocks\n\t nBlocksReady = Math.ceil(nBlocksReady);\n\t } else {\n\t // Round down to include only full blocks,\n\t // less the number of blocks that must remain in the buffer\n\t nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0);\n\t }\n\n\t // Count words ready\n\t var nWordsReady = nBlocksReady * blockSize;\n\n\t // Count bytes ready\n\t var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes);\n\n\t // Process blocks\n\t if (nWordsReady) {\n\t for (var offset = 0; offset < nWordsReady; offset += blockSize) {\n\t // Perform concrete-algorithm logic\n\t this._doProcessBlock(dataWords, offset);\n\t }\n\n\t // Remove processed words\n\t processedWords = dataWords.splice(0, nWordsReady);\n\t data.sigBytes -= nBytesReady;\n\t }\n\n\t // Return processed words\n\t return new WordArray.init(processedWords, nBytesReady);\n\t },\n\n\t /**\n\t * Creates a copy of this object.\n\t *\n\t * @return {Object} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = bufferedBlockAlgorithm.clone();\n\t */\n\t clone: function () {\n\t var clone = Base.clone.call(this);\n\t clone._data = this._data.clone();\n\n\t return clone;\n\t },\n\n\t _minBufferSize: 0\n\t });\n\n\t /**\n\t * Abstract hasher template.\n\t *\n\t * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits)\n\t */\n\t var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({\n\t /**\n\t * Configuration options.\n\t */\n\t cfg: Base.extend(),\n\n\t /**\n\t * Initializes a newly created hasher.\n\t *\n\t * @param {Object} cfg (Optional) The configuration options to use for this hash computation.\n\t *\n\t * @example\n\t *\n\t * var hasher = CryptoJS.algo.SHA256.create();\n\t */\n\t init: function (cfg) {\n\t // Apply config defaults\n\t this.cfg = this.cfg.extend(cfg);\n\n\t // Set initial values\n\t this.reset();\n\t },\n\n\t /**\n\t * Resets this hasher to its initial state.\n\t *\n\t * @example\n\t *\n\t * hasher.reset();\n\t */\n\t reset: function () {\n\t // Reset data buffer\n\t BufferedBlockAlgorithm.reset.call(this);\n\n\t // Perform concrete-hasher logic\n\t this._doReset();\n\t },\n\n\t /**\n\t * Updates this hasher with a message.\n\t *\n\t * @param {WordArray|string} messageUpdate The message to append.\n\t *\n\t * @return {Hasher} This hasher.\n\t *\n\t * @example\n\t *\n\t * hasher.update('message');\n\t * hasher.update(wordArray);\n\t */\n\t update: function (messageUpdate) {\n\t // Append\n\t this._append(messageUpdate);\n\n\t // Update the hash\n\t this._process();\n\n\t // Chainable\n\t return this;\n\t },\n\n\t /**\n\t * Finalizes the hash computation.\n\t * Note that the finalize operation is effectively a destructive, read-once operation.\n\t *\n\t * @param {WordArray|string} messageUpdate (Optional) A final message update.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @example\n\t *\n\t * var hash = hasher.finalize();\n\t * var hash = hasher.finalize('message');\n\t * var hash = hasher.finalize(wordArray);\n\t */\n\t finalize: function (messageUpdate) {\n\t // Final message update\n\t if (messageUpdate) {\n\t this._append(messageUpdate);\n\t }\n\n\t // Perform concrete-hasher logic\n\t var hash = this._doFinalize();\n\n\t return hash;\n\t },\n\n\t blockSize: 512/32,\n\n\t /**\n\t * Creates a shortcut function to a hasher's object interface.\n\t *\n\t * @param {Hasher} hasher The hasher to create a helper for.\n\t *\n\t * @return {Function} The shortcut function.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);\n\t */\n\t _createHelper: function (hasher) {\n\t return function (message, cfg) {\n\t return new hasher.init(cfg).finalize(message);\n\t };\n\t },\n\n\t /**\n\t * Creates a shortcut function to the HMAC's object interface.\n\t *\n\t * @param {Hasher} hasher The hasher to use in this HMAC helper.\n\t *\n\t * @return {Function} The shortcut function.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);\n\t */\n\t _createHmacHelper: function (hasher) {\n\t return function (message, key) {\n\t return new C_algo.HMAC.init(hasher, key).finalize(message);\n\t };\n\t }\n\t });\n\n\t /**\n\t * Algorithm namespace.\n\t */\n\t var C_algo = C.algo = {};\n\n\t return C;\n\t}(Math));\n\n\n\treturn CryptoJS;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function (Math) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_algo = C.algo;\n\n\t // Initialization and round constants tables\n\t var H = [];\n\t var K = [];\n\n\t // Compute constants\n\t (function () {\n\t function isPrime(n) {\n\t var sqrtN = Math.sqrt(n);\n\t for (var factor = 2; factor <= sqrtN; factor++) {\n\t if (!(n % factor)) {\n\t return false;\n\t }\n\t }\n\n\t return true;\n\t }\n\n\t function getFractionalBits(n) {\n\t return ((n - (n | 0)) * 0x100000000) | 0;\n\t }\n\n\t var n = 2;\n\t var nPrime = 0;\n\t while (nPrime < 64) {\n\t if (isPrime(n)) {\n\t if (nPrime < 8) {\n\t H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2));\n\t }\n\t K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3));\n\n\t nPrime++;\n\t }\n\n\t n++;\n\t }\n\t }());\n\n\t // Reusable object\n\t var W = [];\n\n\t /**\n\t * SHA-256 hash algorithm.\n\t */\n\t var SHA256 = C_algo.SHA256 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = new WordArray.init(H.slice(0));\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcut\n\t var H = this._hash.words;\n\n\t // Working variables\n\t var a = H[0];\n\t var b = H[1];\n\t var c = H[2];\n\t var d = H[3];\n\t var e = H[4];\n\t var f = H[5];\n\t var g = H[6];\n\t var h = H[7];\n\n\t // Computation\n\t for (var i = 0; i < 64; i++) {\n\t if (i < 16) {\n\t W[i] = M[offset + i] | 0;\n\t } else {\n\t var gamma0x = W[i - 15];\n\t var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^\n\t ((gamma0x << 14) | (gamma0x >>> 18)) ^\n\t (gamma0x >>> 3);\n\n\t var gamma1x = W[i - 2];\n\t var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^\n\t ((gamma1x << 13) | (gamma1x >>> 19)) ^\n\t (gamma1x >>> 10);\n\n\t W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16];\n\t }\n\n\t var ch = (e & f) ^ (~e & g);\n\t var maj = (a & b) ^ (a & c) ^ (b & c);\n\n\t var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22));\n\t var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25));\n\n\t var t1 = h + sigma1 + ch + K[i] + W[i];\n\t var t2 = sigma0 + maj;\n\n\t h = g;\n\t g = f;\n\t f = e;\n\t e = (d + t1) | 0;\n\t d = c;\n\t c = b;\n\t b = a;\n\t a = (t1 + t2) | 0;\n\t }\n\n\t // Intermediate hash value\n\t H[0] = (H[0] + a) | 0;\n\t H[1] = (H[1] + b) | 0;\n\t H[2] = (H[2] + c) | 0;\n\t H[3] = (H[3] + d) | 0;\n\t H[4] = (H[4] + e) | 0;\n\t H[5] = (H[5] + f) | 0;\n\t H[6] = (H[6] + g) | 0;\n\t H[7] = (H[7] + h) | 0;\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal;\n\t data.sigBytes = dataWords.length * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Return final computed hash\n\t return this._hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA256('message');\n\t * var hash = CryptoJS.SHA256(wordArray);\n\t */\n\t C.SHA256 = Hasher._createHelper(SHA256);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA256(message, key);\n\t */\n\t C.HmacSHA256 = Hasher._createHmacHelper(SHA256);\n\t}(Math));\n\n\n\treturn CryptoJS.SHA256;\n\n}));","/*!\n * @appland/sql-parser - v1.5.1\n * @copyright 2015-2022 Code School (http://codeschool.com)\n * @author Nick Wronski \n */\n(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.sqliteParser = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i0){for(i=1,j=1;i0;},function(d,e){return{'args':Object.assign(e,d)};},function(s){return{'filter':keyNode(s)};},peg$otherExpectation(\"OVER clause\"),function(w){return{over:w};},peg$otherExpectation(\"Window name\"),function(n){return{'type':'identifier','variant':'window','name':n};},peg$otherExpectation(\"Window specification\"),function(w,p,o){return Object.assign({type:'window'},w,p,o);},function(n){return{source:n};},peg$otherExpectation(\"window partition clause\"),function(e){return{partition:e};},peg$otherExpectation(\"Error Message\"),function(m){return m;},peg$otherExpectation(\"Statement\"),function(m,s){return Object.assign(s,m);},peg$otherExpectation(\"QUERY PLAN\"),function(e,q){return{'explain':isOkay(e)};},peg$otherExpectation(\"QUERY PLAN Keyword\"),function(q,p){return foldStringKey([q,p]);},peg$otherExpectation(\"END Transaction Statement\"),function(s,t){return{'type':'statement','variant':'transaction','action':'commit'};},peg$otherExpectation(\"BEGIN Transaction Statement\"),function(s,m,t,n){return Object.assign({'type':'statement','variant':'transaction','action':'begin'},m,n);},function(t){return t;},function(m){return{'defer':keyNode(m)};},peg$otherExpectation(\"ROLLBACK Statement\"),function(s,n){return Object.assign({'type':'statement','variant':'transaction','action':'rollback'},n);},peg$otherExpectation(\"TO Clause\"),function(n){return{'savepoint':n};},function(s){return keyNode(s);},peg$otherExpectation(\"SAVEPOINT Statement\"),function(s,n){return{'type':'statement','variant':s,'target':n};},peg$otherExpectation(\"RELEASE Statement\"),function(s,a,n){return{'type':'statement','variant':keyNode(s),'target':n};},peg$otherExpectation(\"ALTER TABLE Statement\"),function(s,n,e){return Object.assign({'type':'statement','variant':keyNode(s),'target':n},e);},peg$otherExpectation(\"ALTER TABLE Keyword\"),function(a,t){return foldStringKey([a,t]);},peg$otherExpectation(\"RENAME TO Keyword\"),function(s,n){return{'action':keyNode(s),'name':n};},peg$otherExpectation(\"ADD COLUMN Keyword\"),function(s,d){return{'action':keyNode(s),'definition':d};},function(w,s){return Object.assign(s,w);},peg$otherExpectation(\"WITH Clause\"),function(s,v,t){var recursive={'variant':isOkay(v)?'recursive':'common'};if(isArrayOkay(t)){t=t.map(function(elem){return Object.assign(elem,recursive);});}return{'with':t};},function(f,r){return flattenAll([f,r]);},peg$otherExpectation(\"Common Table Expression\"),function(t,s){return Object.assign({'type':'expression','format':'table','variant':'common','target':t},s);},function(s){return{'expression':s};},function(w,s){return Object.assign(s,w);},peg$otherExpectation(\"SET statement\"),function(l,v,r){return Object.assign({type:'statement',variant:'set',local:l||false,target:v},r);},\"local\",peg$literalExpectation(\"LOCAL\",true),function(){return true;},\"session\",peg$literalExpectation(\"SESSION\",true),function(){return false;},\"current\",peg$literalExpectation(\"CURRENT\",true),function(){return{kind:'current'};},function(){return{kind:'default'};},function(l){return{kind:'value',args:l};},function(v,l){return{type:'expression',variant:'list',expression:[v].concat(_toConsumableArray(l))};},function(v){return v;},function(t){return{type:'statement',variant:'show',target:t};},\"time\",peg$literalExpectation(\"TIME\",true),\"zone\",peg$literalExpectation(\"ZONE\",true),function(){return{type:'identifier',variant:'variable',name:'timezone'};},\"transaction\",peg$literalExpectation(\"TRANSACTION\",true),\"isolation\",peg$literalExpectation(\"ISOLATION\",true),\"level\",peg$literalExpectation(\"LEVEL\",true),function(){return{type:'identifier',variant:'variable',name:'transaction_isolation'};},\"authorization\",peg$literalExpectation(\"AUTHORIZATION\",true),function(){return{type:'identifier',variant:'variable',name:'session_authorization'};},\"all\",peg$literalExpectation(\"ALL\",true),function(){return{type:'identifier',variant:'variable',name:'all'};},peg$otherExpectation(\"ATTACH Statement\"),function(a,b,e,n){return{'type':'statement','variant':keyNode(a),'target':n,'attach':e};},peg$otherExpectation(\"DETACH Statement\"),function(d,b,n){return{'type':'statement','variant':keyNode(d),'target':n};},peg$otherExpectation(\"VACUUM Statement\"),function(v,t){return Object.assign({'type':'statement','variant':'vacuum'},t);},function(t){return{'target':t};},peg$otherExpectation(\"ANALYZE Statement\"),function(s,a){return Object.assign({'type':'statement','variant':keyNode(s)},a);},function(n){return{'target':n['name']};},peg$otherExpectation(\"REINDEX Statement\"),function(a){return{'target':a['name']};},peg$otherExpectation(\"PRAGMA Statement\"),function(s,n,v){return{'type':'statement','variant':keyNode(s),'target':n,'args':{'type':'expression','variant':'list','expression':v}};},function(v){return /^(yes|no|on|off|false|true|0|1)$/i.test(v);},function(v){return{'type':'literal','variant':'boolean','normalized':/^(yes|on|true|1)$/i.test(v)?'1':'0','value':v};},function(n){return keyNode(n);},function(n){return{'type':'identifier','variant':'name','name':n};},peg$otherExpectation(\"SELECT Statement\"),function(s,o,l,f){return Object.assign(s,o,l,f);},function(s,o,f,l){return Object.assign(s,o,l,f);},peg$otherExpectation(\"SELECT ... FOR locking clause\"),function(){return{};},function(i,r){return{locking:flattenAll([i,r])};},function(i){return i;},function(s,r,n){return Object.assign({type:'expression',variant:'locking',strength:foldStringWord(s).toLowerCase()},r,n);},function(l){return{target:l};},function(i,r){return flattenAll([i,r]);},function(p){return{policy:foldStringWord(p).toLowerCase()};},peg$otherExpectation(\"WINDOW clause\"),function(l){return{window:l};},function(n,d){return Object.assign(d,{target:n});},peg$otherExpectation(\"ORDER BY Clause\"),function(d){return{'order':d['result']};},peg$otherExpectation(\"LIMIT Clause\"),function(s,e,d){return{'limit':Object.assign({'type':'expression','variant':'limit','start':e},d)};},function(e){return{'limit':{'type':'expression','variant':'limit','offset':e}};},peg$otherExpectation(\"OFFSET Clause\"),function(o,e){return{'offset':e};},function(s,u){if(isArrayOkay(u)){return{'type':'statement','variant':'compound','statement':s,'compound':u};}else{return s;}},peg$otherExpectation(\"Union Operation\"),function(c,s){return{'type':'compound','variant':c,'statement':s};},function(s,f,w,g,i){return Object.assign({'type':'statement','variant':'select'},s,f,w,g,i);},peg$otherExpectation(\"SELECT Results Clause\"),function(d,t){return Object.assign({'result':t},d);},peg$otherExpectation(\"SELECT Results Modifier\"),function(s){return{'distinct':true};},function(s){return{};},peg$otherExpectation(\"FROM Clause\"),function(f,s){return{'from':s};},peg$otherExpectation(\"WHERE Clause\"),function(f,e){return{'where':makeArray(e)};},peg$otherExpectation(\"GROUP BY Clause\"),function(f,e,h){return Object.assign({'group':e},h);},peg$otherExpectation(\"HAVING Clause\"),function(f,e){return{'having':e};},function(q,s){return{'type':'identifier','variant':'star','name':foldStringWord([q,s])};},function(n,s){return foldStringWord([n,s]);},function(e,a){return Object.assign(e,a);},function(f,t){if(isArrayOkay(t)){return{'type':'map','variant':'join','source':f,'map':t};}return f;},function(cl,c){return Object.assign(cl,c);},peg$otherExpectation(\"CROSS JOIN Operation\"),function(n){return{'type':'join','variant':'cross join','source':n};},peg$otherExpectation(\"JOIN Operation\"),function(o,n){return{'type':'join','variant':keyNode(o),'source':n};},function(l,t){return Object.assign(t,l);},function(n,l,a){return Object.assign({'type':'function','variant':'table','name':n,'args':l},a);},function(n,c){return{alias:n,columns:c};},function(c){return{columns:c};},function(f,b){return flattenAll([f,b]);},function(n,t,c){return Object.assign({type:'definition',variant:'column',name:n,datatype:t},c);},function(){return{lateral:true};},peg$otherExpectation(\"Qualified Table\"),function(d,i){return Object.assign(d,i);},peg$otherExpectation(\"Qualified Table Identifier\"),function(n,a){return Object.assign(n,a);},peg$otherExpectation(\"Qualfied Table Index\"),function(s,n){return{'index':n};},function(n,i){return{'index':foldStringKey([n,i])};},peg$otherExpectation(\"SELECT Source\"),function(l,a){return Object.assign(l,a);},peg$otherExpectation(\"Subquery\"),function(s,a){return Object.assign(s,a);},peg$otherExpectation(\"Alias\"),function(a,n,c){return Object.assign({'alias':n},c);},peg$otherExpectation(\"JOIN Operator\"),function(n,t,j){return foldStringKey([n,t,j]);},function(t,o){return foldStringKey([t,o]);},function(t){return keyNode(t);},peg$otherExpectation(\"JOIN Constraint\"),function(c){return{'constraint':Object.assign({'type':'constraint','variant':'join'},c)};},peg$otherExpectation(\"Join ON Clause\"),function(s,e){return{'format':keyNode(s),'on':e};},peg$otherExpectation(\"Join USING Clause\"),function(s,e){return{'format':keyNode(s),'using':e};},peg$otherExpectation(\"VALUES Clause\"),function(s,l){return{'type':'statement','variant':'select','result':l};},function(f,b){return{'result':flattenAll([f,b])};},peg$otherExpectation(\"Ordering Expression\"),function(e,d,n){if(isOkay(d)||isOkay(n)){return Object.assign({'type':'expression','variant':'order','expression':e},d,n);}return e;},function(d){return{nulls:keyNode(d)};},peg$otherExpectation(\"Star\"),peg$otherExpectation(\"Fallback Type\"),peg$otherExpectation(\"INSERT Statement\"),function(k,t,c,r){return Object.assign({'type':'statement','variant':'insert'},k,t,c,r);},peg$otherExpectation(\"RETURNING clause\"),function(t){return{returning:t};},peg$otherExpectation(\"INSERT Keyword\"),function(a,m){return Object.assign({'action':keyNode(a)},m);},peg$otherExpectation(\"REPLACE Keyword\"),function(a){return{'action':keyNode(a)};},peg$otherExpectation(\"INSERT OR Modifier\"),function(s,m){return{'or':keyNode(m)};},function(i,r){return Object.assign({'into':i},r);},peg$otherExpectation(\"INTO Clause\"),function(s,t){return t;},peg$otherExpectation(\"INTO Keyword\"),function(r){return{'result':r};},peg$otherExpectation(\"PostgreSQL INSERT ON CONFLICT clause\"),\"do\",peg$literalExpectation(\"DO\",true),function(i,a){return{conflict:Object.assign(a,i)};},peg$otherExpectation(\"PostgreSQL ON CONFLICT action\"),function(s,t,w){return Object.assign({action:s},t,w);},\"nothing\",peg$literalExpectation(\"NOTHING\",true),function(s){return{action:keyNode(s)};},peg$otherExpectation(\"PostgreSQL ON CONFLICT expression\"),function(i,w){return{on:Object.assign({columns:i},w)};},function(c){return{on:{constraint:c}};},peg$otherExpectation(\"Column List\"),function(f,b){return{'columns':flattenAll([f,b])};},function(c){return c;},peg$otherExpectation(\"Column Name\"),function(n){return{'type':'identifier','variant':'column','name':n};},function(s,r){return r;},peg$otherExpectation(\"VALUES Keyword\"),peg$otherExpectation(\"Wrapped Expression List\"),function(e){return e;},peg$otherExpectation(\"DEFAULT VALUES Clause\"),function(d,v){return{'type':'values','variant':'default'};},peg$otherExpectation(\"Compound Operator\"),peg$otherExpectation(\"UNION Operator\"),function(s,a){return foldStringKey([s,a]);},function(a){return a;},peg$otherExpectation(\"UPDATE Statement\"),function(s,f,t,u,w,o,l,r){return Object.assign({'type':'statement','variant':s,'into':t},f,u,w,o,l,r);},peg$otherExpectation(\"UPDATE Keyword\"),peg$otherExpectation(\"UPDATE OR Modifier\"),function(t){return{'or':keyNode(t)};},peg$otherExpectation(\"SET Clause\"),function(c){return{'set':c};},peg$otherExpectation(\"Column Assignment\"),function(f,e){return{'type':'assignment','target':f,'value':e};},peg$otherExpectation(\"UPDATE value expression\"),function(){return{type:'literal',variant:'default',value:'default'};},peg$otherExpectation(\"DELETE Statement\"),function(s,t,w,o,l,r){return Object.assign({'type':'statement','variant':s,'from':t},w,o,l,r);},peg$otherExpectation(\"DELETE Keyword\"),peg$otherExpectation(\"CREATE Statement\"),peg$otherExpectation(\"CREATE TABLE Statement\"),function(s,ne,id,r){return Object.assign({'type':'statement','name':id},s,r,ne);},function(s,tmp,t){return Object.assign({'variant':s,'format':keyNode(t)},tmp);},function(t){return{'temporary':isOkay(t)};},peg$otherExpectation(\"IF NOT EXISTS Modifier\"),function(i,n,e){return{'condition':makeArray({'type':'condition','variant':keyNode(i),'condition':{'type':'expression','variant':keyNode(e),'operator':foldStringKey([n,e])}})};},peg$otherExpectation(\"Table Definition\"),function(s,t,r){return Object.assign({'definition':flattenAll([s,t])},r);},function(r,w){return{'optimization':[{'type':'optimization','value':foldStringKey([r,w])}]};},function(f){return f;},peg$otherExpectation(\"Column Definition\"),function(n,t,c){return Object.assign({'type':'definition','variant':'column','name':n,'definition':isOkay(c)?c:[]},t);},peg$otherExpectation(\"Column Datatype\"),function(t){return{'datatype':t};},peg$otherExpectation(\"Column Constraint\"),function(n,c,ln){return Object.assign(c,n);},function(cl){return cl[cl.length-1];},peg$otherExpectation(\"CONSTRAINT Name\"),function(n){return{'name':n};},peg$otherExpectation(\"FOREIGN KEY Column Constraint\"),function(f){return Object.assign({'variant':'foreign key'},f);},peg$otherExpectation(\"PRIMARY KEY Column Constraint\"),function(p,d,c,a){return Object.assign(p,c,d,a);},peg$otherExpectation(\"PRIMARY KEY Keyword\"),function(s,k){return{'type':'constraint','variant':foldStringKey([s,k])};},peg$otherExpectation(\"AUTOINCREMENT Keyword\"),function(a){return{'autoIncrement':true};},function(s,c){return Object.assign({'type':'constraint','variant':s},c);},peg$otherExpectation(\"UNIQUE Column Constraint\"),peg$otherExpectation(\"NULL Column Constraint\"),function(n,l){return foldStringKey([n,l]);},peg$otherExpectation(\"CHECK Column Constraint\"),peg$otherExpectation(\"DEFAULT Column Constraint\"),function(s,v){return{'type':'constraint','variant':keyNode(s),'value':v};},peg$otherExpectation(\"COLLATE Column Constraint\"),function(c){return{'type':'constraint','variant':'collate','collate':c};},peg$otherExpectation(\"Table Constraint\"),function(n,c,nl){return Object.assign({'type':'definition','variant':'constraint'},c,n);},peg$otherExpectation(\"CHECK Table Constraint\"),function(c){return{'definition':makeArray(c)};},peg$otherExpectation(\"PRIMARY KEY Table Constraint\"),function(k,c,t){return{'definition':makeArray(Object.assign(k,t,c[1])),'columns':c[0]};},function(s){return{'type':'constraint','variant':keyNode(s)};},function(p,k){return foldStringKey([p,k]);},peg$otherExpectation(\"UNIQUE Keyword\"),function(u){return keyNode(u);},function(f,b){return[f].concat(b);},function(c){return c.map(function(_ref){var _ref2=_slicedToArray(_ref,1),res=_ref2[0];return res;});},function(c){var auto=c.find(function(_ref3){var _ref4=_slicedToArray(_ref3,2),res=_ref4[0],a=_ref4[1];return isOkay(a);});return[c.map(function(_ref5){var _ref6=_slicedToArray(_ref5,2),res=_ref6[0],a=_ref6[1];return res;}),auto?auto[1]:null];},peg$otherExpectation(\"Indexed Column\"),function(e,d,a){var res=e;if(isOkay(d)){res=Object.assign({'type':'expression','variant':'order','expression':e},d);}return[res,a];},peg$otherExpectation(\"Collation\"),function(c){return{'collate':makeArray(c)};},peg$otherExpectation(\"Column Direction\"),function(t){return{'direction':keyNode(t)};},function(s,t){return{'conflict':keyNode(t)};},peg$otherExpectation(\"ON CONFLICT Keyword\"),function(o,c){return foldStringKey([o,c]);},function(k,c){return{'type':'constraint','variant':keyNode(k),'expression':c};},peg$otherExpectation(\"FOREIGN KEY Table Constraint\"),function(k,l,c){return Object.assign({'definition':makeArray(Object.assign(k,c))},l);},peg$otherExpectation(\"FOREIGN KEY Keyword\"),function(f,k){return{'type':'constraint','variant':foldStringKey([f,k])};},function(r,a,d){return Object.assign({'type':'constraint'},r,a,d);},peg$otherExpectation(\"REFERENCES Clause\"),function(s,t){return{'references':t};},function(f,b){return{'action':flattenAll([f,b])};},peg$otherExpectation(\"FOREIGN KEY Action Clause\"),function(m,a,n){return{'type':'action','variant':keyNode(m),'action':keyNode(n)};},peg$otherExpectation(\"FOREIGN KEY Action\"),function(s,v){return foldStringKey([s,v]);},function(c){return keyNode(c);},function(n,a){return foldStringKey([n,a]);},function(m,n){return{'type':'action','variant':keyNode(m),'action':n};},peg$otherExpectation(\"DEFERRABLE Clause\"),function(n,d,i){return{'defer':foldStringKey([n,d,i])};},function(i,d){return foldStringKey([i,d]);},function(s){return{'definition':makeArray(s)};},peg$otherExpectation(\"CREATE INDEX Statement\"),function(s,ne,n,o,w){return Object.assign({'type':'statement','target':n,'on':o},s,ne,w);},function(s,u,i){return Object.assign({'variant':keyNode(s),'format':keyNode(i)},u);},function(u){return{'unique':true};},peg$otherExpectation(\"ON Clause\"),function(o,t,c){return{'type':'identifier','variant':'expression','format':'table','name':t['name'],'columns':c};},peg$otherExpectation(\"CREATE TRIGGER Statement\"),function(s,ne,n,cd,o,me,wh,a){return Object.assign({'type':'statement','target':n,'on':o,'event':cd,'by':isOkay(me)?me:'row','action':makeArray(a)},s,ne,wh);},function(s,tmp,t){return Object.assign({'variant':keyNode(s),'format':keyNode(t)},tmp);},peg$otherExpectation(\"Conditional Clause\"),function(m,d){return Object.assign({'type':'event'},m,d);},function(m){return{'occurs':keyNode(m)};},function(i,o){return foldStringKey([i,o]);},peg$otherExpectation(\"Conditional Action\"),function(o){return{'event':keyNode(o)};},function(s,f){return{'event':keyNode(s),'of':f};},function(s,c){return c;},\"statement\",peg$literalExpectation(\"STATEMENT\",true),function(f,e,r){return keyNode(r);},function(w,e){return{'when':e};},peg$otherExpectation(\"Actions Clause\"),function(s,a,e){return a;},function(l){return l;},peg$otherExpectation(\"CREATE VIEW Statement\"),function(s,ne,n,r){return Object.assign({'type':'statement','target':n,'result':r},s,ne);},function(n,a){return Object.assign({'type':'identifier','variant':'expression','format':'view','name':n['name'],'columns':[]},a);},function(s,tmp,v){return Object.assign({'variant':keyNode(s),'format':keyNode(v)},tmp);},peg$otherExpectation(\"CREATE VIRTUAL TABLE Statement\"),function(s,ne,n,m){return Object.assign({'type':'statement','target':n,'result':m},s,ne);},function(s,v,t){return{'variant':keyNode(s),'format':keyNode(v)};},function(m,a){return Object.assign({'type':'module','variant':'virtual','name':m},a);},peg$otherExpectation(\"Module Arguments\"),function(l){return{'args':{'type':'expression','variant':'list','expression':isOkay(l)?l:[]}};},function(f,b){return flattenAll([f,b]).filter(function(arg){return isOkay(arg);});},peg$otherExpectation(\"DROP Statement\"),function(s,q){return Object.assign({'type':'statement','target':Object.assign(q,{'variant':s['format']})},s);},peg$otherExpectation(\"DROP Keyword\"),function(s,t,i){return Object.assign({'variant':keyNode(s),'format':t,'condition':[]},i);},peg$otherExpectation(\"DROP Type\"),peg$otherExpectation(\"IF EXISTS Keyword\"),function(i,e){return{'condition':[{'type':'condition','variant':keyNode(i),'condition':{'type':'expression','variant':keyNode(e),'operator':keyNode(e)}}]};},peg$otherExpectation(\"Or\"),peg$otherExpectation(\"Add\"),peg$otherExpectation(\"Subtract\"),peg$otherExpectation(\"Multiply\"),peg$otherExpectation(\"Divide\"),peg$otherExpectation(\"Modulo\"),peg$otherExpectation(\"Shift Left\"),peg$otherExpectation(\"Shift Right\"),peg$otherExpectation(\"Logical AND\"),peg$otherExpectation(\"Logical OR\"),peg$otherExpectation(\"Less Than\"),peg$otherExpectation(\"Greater Than\"),peg$otherExpectation(\"Less Than Or Equal\"),peg$otherExpectation(\"Greater Than Or Equal\"),peg$otherExpectation(\"Equal\"),peg$otherExpectation(\"Not Equal\"),peg$otherExpectation(\"PostgreSQL custom binary operarator\"),function(s){var sym=s.join('');if(sym.includes('--')||sym.includes('/*'))return false;var last=s[s.length-1];if(!(last==='-'||last==='+'))return true;return sym.match(/[~@#%^&|`?]/);},function(s){return s.join('');},peg$otherExpectation(\"IS\"),function(i,n){return foldStringKey([i,n]);},peg$otherExpectation(\"Identifier\"),peg$otherExpectation(\"Database Identifier\"),function(n){return{'type':'identifier','variant':'database','name':n};},peg$otherExpectation(\"Function Identifier\"),function(d,n){return{'type':'identifier','variant':'function','name':foldStringWord([d,n])};},peg$otherExpectation(\"Table Identifier\"),function(d,n){return{'type':'identifier','variant':'table','name':foldStringWord([d,n])};},function(n,d){return foldStringWord([n,d]);},peg$otherExpectation(\"Column Identifier\"),function(q,n,i){return Object.assign({'type':'identifier','variant':'column','name':foldStringWord([q,n])},i);},peg$otherExpectation(\"value indirection\"),function(l){return{element:l};},function(i,r){return flattenAll([i,r]);},function(n){return{type:'indirection',variant:'attribute',attribute:n};},function(n){return{type:'indirection',variant:'star',attribute:n};},function(l,u){return Object.assign({type:'indirection',variant:'slice'},l,u);},function(u){return Object.assign({type:'indirection',variant:'slice'},u);},function(e){return{type:'indirection',variant:'index',index:e};},function(e){return{lower:e};},function(e){return{upper:e};},function(){return'';},function(d,t){return foldStringWord([d,t]);},peg$otherExpectation(\"Collation Identifier\"),function(n){return{'type':'identifier','variant':'collation','name':n};},peg$otherExpectation(\"Savepoint Identifier\"),function(n){return{'type':'identifier','variant':'savepoint','name':n};},peg$otherExpectation(\"Index Identifier\"),function(d,n){return{'type':'identifier','variant':'index','name':foldStringWord([d,n])};},peg$otherExpectation(\"Trigger Identifier\"),function(d,n){return{'type':'identifier','variant':'trigger','name':foldStringWord([d,n])};},peg$otherExpectation(\"View Identifier\"),function(d,n){return{'type':'identifier','variant':'view','name':foldStringWord([d,n])};},peg$otherExpectation(\"Pragma Identifier\"),function(d,n){return{'type':'identifier','variant':'pragma','name':foldStringWord([d,n])};},peg$otherExpectation(\"Variable Identifier\"),function(d,n){return{'type':'identifier','variant':'variable','name':foldStringWord([d,n])};},peg$otherExpectation(\"CTE Identifier\"),function(d){return d;},function(n,a){return Object.assign({'type':'identifier','variant':'expression','format':'table','name':n['name'],'columns':[]},a);},peg$otherExpectation(\"Table Constraint Identifier\"),function(n){return{'type':'identifier','variant':'constraint','format':'table','name':n};},peg$otherExpectation(\"Column Constraint Identifier\"),function(n){return{'type':'identifier','variant':'constraint','format':'column','name':n};},peg$otherExpectation(\"Datatype Name\"),function(t){return[t,'text'];},function(t){return[t,'real'];},function(t){return[t,'numeric'];},function(t){return[t,'integer'];},function(t){return[t,'none'];},peg$otherExpectation(\"TEXT Datatype Name\"),\"n\",peg$literalExpectation(\"N\",true),\"var\",peg$literalExpectation(\"VAR\",true),\"char\",peg$literalExpectation(\"CHAR\",true),\"tiny\",peg$literalExpectation(\"TINY\",true),\"medium\",peg$literalExpectation(\"MEDIUM\",true),\"long\",peg$literalExpectation(\"LONG\",true),\"text\",peg$literalExpectation(\"TEXT\",true),\"clob\",peg$literalExpectation(\"CLOB\",true),peg$otherExpectation(\"REAL Datatype Name\"),\"float\",peg$literalExpectation(\"FLOAT\",true),\"real\",peg$literalExpectation(\"REAL\",true),peg$otherExpectation(\"DOUBLE Datatype Name\"),\"double\",peg$literalExpectation(\"DOUBLE\",true),\"precision\",peg$literalExpectation(\"PRECISION\",true),function(d,p){return foldStringWord([d,p]);},peg$otherExpectation(\"NUMERIC Datatype Name\"),\"numeric\",peg$literalExpectation(\"NUMERIC\",true),\"decimal\",peg$literalExpectation(\"DECIMAL\",true),\"boolean\",peg$literalExpectation(\"BOOLEAN\",true),\"date\",peg$literalExpectation(\"DATE\",true),\"stamp\",peg$literalExpectation(\"STAMP\",true),\"string\",peg$literalExpectation(\"STRING\",true),peg$otherExpectation(\"INTEGER Datatype Name\"),\"int\",peg$literalExpectation(\"INT\",true),\"2\",peg$literalExpectation(\"2\",false),\"4\",peg$literalExpectation(\"4\",false),\"8\",peg$literalExpectation(\"8\",false),\"eger\",peg$literalExpectation(\"EGER\",true),\"big\",peg$literalExpectation(\"BIG\",true),\"small\",peg$literalExpectation(\"SMALL\",true),\"floating\",peg$literalExpectation(\"FLOATING\",true),\"point\",peg$literalExpectation(\"POINT\",true),function(f,p){return foldStringWord([f,p]);},peg$otherExpectation(\"BLOB Datatype Name\"),\"blob\",peg$literalExpectation(\"BLOB\",true),/^[a-z0-9$_]/i,peg$classExpectation([[\"a\",\"z\"],[\"0\",\"9\"],\"$\",\"_\"],false,true),\"\\\\u\",peg$literalExpectation(\"\\\\u\",false),/^[a-f0-9]/i,peg$classExpectation([[\"a\",\"f\"],[\"0\",\"9\"]],false,true),function(u,s){return foldStringWord([u,s]).toLowerCase();},function(n){return keyNode(n);},peg$anyExpectation(),function(n){return textNode(n);},/^[ \\t]/,peg$classExpectation([\" \",\"\\t\"],false,false),\"\\\"\",peg$literalExpectation(\"\\\"\",false),\"\\\"\\\"\",peg$literalExpectation(\"\\\"\\\"\",false),/^[^\"]/,peg$classExpectation([\"\\\"\"],true,false),function(n){return unescape(n,'\"');},\"'\",peg$literalExpectation(\"'\",false),function(n){return unescape(n,\"'\");},\"`\",peg$literalExpectation(\"`\",false),\"``\",peg$literalExpectation(\"``\",false),/^[^`]/,peg$classExpectation([\"`\"],true,false),function(n){return unescape(n,'`');},peg$otherExpectation(\"Open Bracket\"),\"[\",peg$literalExpectation(\"[\",false),peg$otherExpectation(\"Close Bracket\"),\"]\",peg$literalExpectation(\"]\",false),peg$otherExpectation(\"Open Parenthesis\"),\"(\",peg$literalExpectation(\"(\",false),peg$otherExpectation(\"Close Parenthesis\"),\")\",peg$literalExpectation(\")\",false),peg$otherExpectation(\"Comma\"),\",\",peg$literalExpectation(\",\",false),peg$otherExpectation(\"Period\"),\".\",peg$literalExpectation(\".\",false),peg$otherExpectation(\"Asterisk\"),\"*\",peg$literalExpectation(\"*\",false),peg$otherExpectation(\"Question Mark\"),\"?\",peg$literalExpectation(\"?\",false),peg$otherExpectation(\"Single Quote\"),peg$otherExpectation(\"Double Quote\"),peg$otherExpectation(\"Backtick\"),peg$otherExpectation(\"Tilde\"),\"~\",peg$literalExpectation(\"~\",false),peg$otherExpectation(\"Plus\"),\"+\",peg$literalExpectation(\"+\",false),peg$otherExpectation(\"Minus\"),\"-\",peg$literalExpectation(\"-\",false),\"=\",peg$literalExpectation(\"=\",false),peg$otherExpectation(\"Ampersand\"),\"&\",peg$literalExpectation(\"&\",false),peg$otherExpectation(\"Pipe\"),\"|\",peg$literalExpectation(\"|\",false),\"%\",peg$literalExpectation(\"%\",false),\"<\",peg$literalExpectation(\"<\",false),\">\",peg$literalExpectation(\">\",false),peg$otherExpectation(\"Exclamation\"),\"!\",peg$literalExpectation(\"!\",false),peg$otherExpectation(\"Semicolon\"),\";\",peg$literalExpectation(\";\",false),peg$otherExpectation(\"Colon\"),peg$otherExpectation(\"Forward Slash\"),\"/\",peg$literalExpectation(\"/\",false),peg$otherExpectation(\"Backslash\"),\"\\\\\",peg$literalExpectation(\"\\\\\",false),peg$otherExpectation(\"Operator characters\"),/^[\\-+*\\/<>=~!@#%\\^&|`]/,peg$classExpectation([\"-\",\"+\",\"*\",\"/\",\"<\",\">\",\"=\",\"~\",\"!\",\"@\",\"#\",\"%\",\"^\",\"&\",\"|\",\"`\"],false,false),\"abort\",peg$literalExpectation(\"ABORT\",true),\"action\",peg$literalExpectation(\"ACTION\",true),\"add\",peg$literalExpectation(\"ADD\",true),\"after\",peg$literalExpectation(\"AFTER\",true),\"alter\",peg$literalExpectation(\"ALTER\",true),\"analyze\",peg$literalExpectation(\"ANALYZE\",true),\"and\",peg$literalExpectation(\"AND\",true),\"array\",peg$literalExpectation(\"ARRAY\",true),\"as\",peg$literalExpectation(\"AS\",true),\"asc\",peg$literalExpectation(\"ASC\",true),\"attach\",peg$literalExpectation(\"ATTACH\",true),\"autoincrement\",peg$literalExpectation(\"AUTOINCREMENT\",true),\"before\",peg$literalExpectation(\"BEFORE\",true),\"begin\",peg$literalExpectation(\"BEGIN\",true),\"between\",peg$literalExpectation(\"BETWEEN\",true),\"by\",peg$literalExpectation(\"BY\",true),\"cascade\",peg$literalExpectation(\"CASCADE\",true),\"case\",peg$literalExpectation(\"CASE\",true),\"cast\",peg$literalExpectation(\"CAST\",true),\"check\",peg$literalExpectation(\"CHECK\",true),\"collate\",peg$literalExpectation(\"COLLATE\",true),\"column\",peg$literalExpectation(\"COLUMN\",true),\"commit\",peg$literalExpectation(\"COMMIT\",true),\"conflict\",peg$literalExpectation(\"CONFLICT\",true),\"constraint\",peg$literalExpectation(\"CONSTRAINT\",true),\"create\",peg$literalExpectation(\"CREATE\",true),\"cross\",peg$literalExpectation(\"CROSS\",true),\"current_date\",peg$literalExpectation(\"CURRENT_DATE\",true),\"current_time\",peg$literalExpectation(\"CURRENT_TIME\",true),\"current_timestamp\",peg$literalExpectation(\"CURRENT_TIMESTAMP\",true),\"database\",peg$literalExpectation(\"DATABASE\",true),\"default\",peg$literalExpectation(\"DEFAULT\",true),\"deferrable\",peg$literalExpectation(\"DEFERRABLE\",true),\"deferred\",peg$literalExpectation(\"DEFERRED\",true),\"delete\",peg$literalExpectation(\"DELETE\",true),\"desc\",peg$literalExpectation(\"DESC\",true),\"detach\",peg$literalExpectation(\"DETACH\",true),\"distinct\",peg$literalExpectation(\"DISTINCT\",true),\"drop\",peg$literalExpectation(\"DROP\",true),\"each\",peg$literalExpectation(\"EACH\",true),\"else\",peg$literalExpectation(\"ELSE\",true),\"end\",peg$literalExpectation(\"END\",true),\"escape\",peg$literalExpectation(\"ESCAPE\",true),\"except\",peg$literalExpectation(\"EXCEPT\",true),\"exclusive\",peg$literalExpectation(\"EXCLUSIVE\",true),\"exists\",peg$literalExpectation(\"EXISTS\",true),\"explain\",peg$literalExpectation(\"EXPLAIN\",true),\"fail\",peg$literalExpectation(\"FAIL\",true),\"first\",peg$literalExpectation(\"FIRST\",true),\"for\",peg$literalExpectation(\"FOR\",true),\"foreign\",peg$literalExpectation(\"FOREIGN\",true),\"from\",peg$literalExpectation(\"FROM\",true),\"full\",peg$literalExpectation(\"FULL\",true),\"glob\",peg$literalExpectation(\"GLOB\",true),\"group\",peg$literalExpectation(\"GROUP\",true),\"having\",peg$literalExpectation(\"HAVING\",true),\"if\",peg$literalExpectation(\"IF\",true),\"ignore\",peg$literalExpectation(\"IGNORE\",true),\"ilike\",peg$literalExpectation(\"ILIKE\",true),\"immediate\",peg$literalExpectation(\"IMMEDIATE\",true),\"in\",peg$literalExpectation(\"IN\",true),\"index\",peg$literalExpectation(\"INDEX\",true),\"indexed\",peg$literalExpectation(\"INDEXED\",true),\"initially\",peg$literalExpectation(\"INITIALLY\",true),\"inner\",peg$literalExpectation(\"INNER\",true),\"insert\",peg$literalExpectation(\"INSERT\",true),\"instead\",peg$literalExpectation(\"INSTEAD\",true),\"intersect\",peg$literalExpectation(\"INTERSECT\",true),\"into\",peg$literalExpectation(\"INTO\",true),\"is\",peg$literalExpectation(\"IS\",true),\"isnull\",peg$literalExpectation(\"ISNULL\",true),\"join\",peg$literalExpectation(\"JOIN\",true),\"key\",peg$literalExpectation(\"KEY\",true),\"last\",peg$literalExpectation(\"LAST\",true),\"lateral\",peg$literalExpectation(\"LATERAL\",true),\"left\",peg$literalExpectation(\"LEFT\",true),\"like\",peg$literalExpectation(\"LIKE\",true),\"limit\",peg$literalExpectation(\"LIMIT\",true),\"locked\",peg$literalExpectation(\"LOCKED\",true),\"match\",peg$literalExpectation(\"MATCH\",true),\"natural\",peg$literalExpectation(\"NATURAL\",true),\"no\",peg$literalExpectation(\"NO\",true),\"not\",peg$literalExpectation(\"NOT\",true),\"notnull\",peg$literalExpectation(\"NOTNULL\",true),\"nowait\",peg$literalExpectation(\"NOWAIT\",true),\"nulls\",peg$literalExpectation(\"NULLS\",true),\"of\",peg$literalExpectation(\"OF\",true),\"offset\",peg$literalExpectation(\"OFFSET\",true),\"on\",peg$literalExpectation(\"ON\",true),\"only\",peg$literalExpectation(\"ONLY\",true),\"or\",peg$literalExpectation(\"OR\",true),\"order\",peg$literalExpectation(\"ORDER\",true),\"outer\",peg$literalExpectation(\"OUTER\",true),\"over\",peg$literalExpectation(\"OVER\",true),\"partition\",peg$literalExpectation(\"PARTITION\",true),\"plan\",peg$literalExpectation(\"PLAN\",true),\"pragma\",peg$literalExpectation(\"PRAGMA\",true),\"primary\",peg$literalExpectation(\"PRIMARY\",true),\"query\",peg$literalExpectation(\"QUERY\",true),\"raise\",peg$literalExpectation(\"RAISE\",true),\"read\",peg$literalExpectation(\"READ\",true),\"recursive\",peg$literalExpectation(\"RECURSIVE\",true),\"references\",peg$literalExpectation(\"REFERENCES\",true),\"regexp\",peg$literalExpectation(\"REGEXP\",true),\"reindex\",peg$literalExpectation(\"REINDEX\",true),\"release\",peg$literalExpectation(\"RELEASE\",true),\"rename\",peg$literalExpectation(\"RENAME\",true),\"replace\",peg$literalExpectation(\"REPLACE\",true),\"restrict\",peg$literalExpectation(\"RESTRICT\",true),\"returning\",peg$literalExpectation(\"RETURNING\",true),\"right\",peg$literalExpectation(\"RIGHT\",true),\"rollback\",peg$literalExpectation(\"ROLLBACK\",true),\"row\",peg$literalExpectation(\"ROW\",true),\"rowid\",peg$literalExpectation(\"ROWID\",true),\"savepoint\",peg$literalExpectation(\"SAVEPOINT\",true),\"select\",peg$literalExpectation(\"SELECT\",true),\"set\",peg$literalExpectation(\"SET\",true),\"share\",peg$literalExpectation(\"SHARE\",true),\"show\",peg$literalExpectation(\"SHOW\",true),\"skip\",peg$literalExpectation(\"SKIP\",true),\"table\",peg$literalExpectation(\"TABLE\",true),\"temp\",peg$literalExpectation(\"TEMP\",true),\"temporary\",peg$literalExpectation(\"TEMPORARY\",true),\"then\",peg$literalExpectation(\"THEN\",true),\"to\",peg$literalExpectation(\"TO\",true),\"trigger\",peg$literalExpectation(\"TRIGGER\",true),\"union\",peg$literalExpectation(\"UNION\",true),\"unique\",peg$literalExpectation(\"UNIQUE\",true),\"update\",peg$literalExpectation(\"UPDATE\",true),\"using\",peg$literalExpectation(\"USING\",true),\"vacuum\",peg$literalExpectation(\"VACUUM\",true),\"values\",peg$literalExpectation(\"VALUES\",true),\"view\",peg$literalExpectation(\"VIEW\",true),\"virtual\",peg$literalExpectation(\"VIRTUAL\",true),\"when\",peg$literalExpectation(\"WHEN\",true),\"where\",peg$literalExpectation(\"WHERE\",true),\"window\",peg$literalExpectation(\"WINDOW\",true),\"with\",peg$literalExpectation(\"WITH\",true),\"without\",peg$literalExpectation(\"WITHOUT\",true),function(r){return keyNode(r);},function(){return null;},peg$otherExpectation(\"Line Comment\"),\"--\",peg$literalExpectation(\"--\",false),/^[\\n\\v\\f\\r]/,peg$classExpectation([\"\\n\",\"\\v\",\"\\f\",\"\\r\"],false,false),peg$otherExpectation(\"Block Comment\"),\"/*\",peg$literalExpectation(\"/*\",false),\"*/\",peg$literalExpectation(\"*/\",false),/^[\\n\\v\\f\\r\\t ]/,peg$classExpectation([\"\\n\",\"\\v\",\"\\f\",\"\\r\",\"\\t\",\" \"],false,false),peg$otherExpectation(\"Whitespace\"),\"__TODO__\",peg$literalExpectation(\"__TODO__\",false)];var peg$bytecode=[peg$decode(\"%;\\u028B/H#;#/?$;\\\".\\\" &\\\"/1$;#/($8$: $!!)($'#(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u028B/C#;#/:$;\\x88/1$;#/($8$: $!!)($'#(#'#(\\\"'#&'#\"),peg$decode(\"%;\\x88/B#;\\u028B/9$$;%0#*;%&/)$8#:!#\\\"\\\" )(#'#(\\\"'#&'#\"),peg$decode(\"$;\\u01ED0#*;\\u01ED&\"),peg$decode(\"$;\\u01ED/�#*;\\u01ED&&&#\"),peg$decode(\"%;$/:#;\\x88/1$;\\u028B/($8#:\\\"#!!)(#'#(\\\"'#&'#\"),peg$decode(\"<%;).# &;*/O#;\\u028B/F$;,.\\\" &\\\"/8$;'.\\\" &\\\"/*$8$:$$##! )($'#(#'#(\\\"'#&'#=.\\\" 7#\"),peg$decode(\"<%;(/9#$;(0#*;(&/)$8\\\":&\\\"\\\"! )(\\\"'#&'#.I &%;\\u028B/?#;\\u01FA/6$;(.\\\" &\\\"/($8#:'#! )(#'#(\\\"'#&'#=.\\\" 7%\"),peg$decode(\"%;\\u028B/Z#;\\u01D8/Q$;\\u028B/H$;9.\\\" &\\\"/:$;\\u028B/1$;\\u01D9/($8&:(&!\\\")(&'#(%'#($'#(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u01C5/' 8!:)!! )\"),peg$decode(\"<%;\\u01CF/9#$;+0#*;+&/)$8\\\":+\\\"\\\"! )(\\\"'#&'#=.\\\" 7*\"),peg$decode(\"%4,\\\"\\\"5!7-/1#;\\u01D1/($8\\\":.\\\"! )(\\\"'#&'#\"),peg$decode(\"<%;\\u01DA/R#;8/I$;\\u028B/@$;-.\\\" &\\\"/2$;\\u01DB/)$8%:0%\\\"#!)(%'#($'#(#'#(\\\"'#&'#=.\\\" 7/\"),peg$decode(\"%;\\u01DC/C#;\\u028B/:$;8/1$;\\u028B/($8$:1$!!)($'#(#'#(\\\"'#&'#\"),peg$decode(\";8.A &;9.; &;4.5 &;/./ &;0.) &;1.# &;5\"),peg$decode(\"<%;\\u0248/1#;\\u028B/($8\\\":3\\\"!!)(\\\"'#&'#=.\\\" 72\"),peg$decode(\"<%;\\u020E.) &;\\u0210.# &;\\u020F/1#;\\u028B/($8\\\":5\\\"!!)(\\\"'#&'#=.\\\" 74\"),peg$decode(\"<%;7.\\\" &\\\"/2#;2/)$8\\\":7\\\"\\\"! )(\\\"'#&'#=.\\\" 76\"),peg$decode(\"<%;\\u01E0/A#$;30#*;3&/1$;\\u01E0/($8#:9#!!)(#'#(\\\"'#&'#=.\\\" 78\"),peg$decode(\"2:\\\"\\\"6:7;.) &4<\\\"\\\"5!7=\"),peg$decode(\"<%4?\\\"\\\"5!7@/1#;2/($8\\\":A\\\"! )(\\\"'#&'#=.\\\" 7>\"),peg$decode(\"<%;&/8#;1.# &;B/)$8\\\":C\\\"\\\"! )(\\\"'#&'#=.\\\" 7B\"),peg$decode(\"%;\\u01D1.# &;\\u01D5/' 8!:D!! )\"),peg$decode(\"<%;\\u01E4.# &;\\u01E5/' 8!:\\\"!! )=.\\\" 7E\"),peg$decode(\"%;7.\\\" &\\\"/2#;9/)$8\\\":F\\\"\\\"! )(\\\"'#&'#\"),peg$decode(\";?.# &;:\"),peg$decode(\"%;;/7#;>.\\\" &\\\"/)$8\\\":G\\\"\\\"! )(\\\"'#&'#\"),peg$decode(\"<;<.# &;==.\\\" 7H\"),peg$decode(\"%$;A/�#*;A&&&#/7#;=.\\\" &\\\"/)$8\\\":I\\\"\\\"! )(\\\"'#&'#\"),peg$decode(\"%;\\u01DD/9#$;A0#*;A&/)$8\\\":J\\\"\\\"! )(\\\"'#&'#\"),peg$decode(\"<%3L\\\"\\\"5!7M/T#4N\\\"\\\"5!7O.\\\" &\\\"/@$$;A/�#*;A&&&#/*$8#:P##\\\"! )(#'#(\\\"'#&'#=.\\\" 7K\"),peg$decode(\"<%3R\\\"\\\"5\\\"7S/?#$;@/�#*;@&&&#/)$8\\\":T\\\"\\\"! )(\\\"'#&'#=.\\\" 7Q\"),peg$decode(\"4U\\\"\\\"5!7V\"),peg$decode(\"4W\\\"\\\"5!7X\"),peg$decode(\"<%;C.) &;E.# &;F/' 8!:Z!! )=.\\\" 7Y\"),peg$decode(\"<%;\\u01DF/@#;D.\\\" &\\\"/2$;\\u028B/)$8#:\\\\#\\\"\\\"!)(#'#(\\\"'#&'#=.\\\" 7[\"),peg$decode(\"%4]\\\"\\\"5!7^/9#$;A0#*;A&/)$8\\\":_\\\"\\\"! )(\\\"'#&'#\"),peg$decode(\"<%4a\\\"\\\"5!7b/H#$;\\u01CD/�#*;\\u01CD&&&#/2$;\\u028B/)$8#:c#\\\"\\\"!)(#'#(\\\"'#&'#=.\\\" 7`\"),peg$decode(\"<%2e\\\"\\\"6e7f/o#$;\\u01CD.) &2g\\\"\\\"6g7h/2#0/*;\\u01CD.) &2g\\\"\\\"6g7h&&&#/A$;\\u028B/8$;G.\\\" &\\\"/*$8$:i$##\\\" )($'#(#'#(\\\"'#&'#=.\\\" 7d\"),peg$decode(\"%;\\u01D5/1#;\\u028B/($8\\\":j\\\"!!)(\\\"'#&'#\"),peg$decode(\"<%;I.\\\" &\\\"/;#;\\u028B/2$;\\xA4/)$8#:l#\\\"\\\" )(#'#(\\\"'#&'#=.\\\" 7k\"),peg$decode(\"<%;u.\\\" &\\\"/;#;\\u0220/2$;\\u028B/)$8#:n#\\\"\\\"!)(#'#(\\\"'#&'#=.\\\" 7m\"),peg$decode(\"<%;\\u0257/_#;\\u028B/V$;\\u01DA/M$;\\u028B/D$;K/;$;\\u028B/2$;\\u01DB/)$8':p'\\\"&\\\")(''#(&'#(%'#($'#(#'#(\\\"'#&'#=.\\\" 7o\"),peg$decode(\"<%;L.# &;M/' 8!:r!! )=.\\\" 7q\"),peg$decode(\"<%;\\u022C/' 8!:t!! )=.\\\" 7s\"),peg$decode(\"%;\\u0263.) &;\\u01F2.# &;\\u0222/M#;\\u028B/D$;\\u01DC/;$;\\u028B/2$;\\x87/)$8%:u%\\\"$ )(%'#($'#(#'#(\\\"'#&'#\"),peg$decode(\";B./ &;~.) &;..# &;\\u01AE\"),peg$decode(\"%;\\u01DA/L#;\\u028B/C$;z/:$;\\u028B/1$;\\u01DB/($8%:v%!\\\")(%'#($'#(#'#(\\\"'#&'#\"),peg$decode(\";O.G &;H.A &;h.; &;j.5 &;J./ &;Q.) &;R.# &;N\"),peg$decode(\"<%;\\u01FA/:#;\\u028B/1$;S/($8#:x#! )(#'#(\\\"'#&'#=.\\\" 7w\"),peg$decode(\"<%;\\u01FA/:#;\\u028B/1$;\\xA4/($8#:z#! )(#'#(\\\"'#&'#=.\\\" 7y\"),peg$decode(\"<%;\\u01D8/R#;\\u028B/I$;T.# &;{/:$;\\u028B/1$;\\u01D9/($8%:|%!\\\")(%'#($'#(#'#(\\\"'#&'#=.\\\" 7{\"),peg$decode(\"<%;S/B#;\\u028B/9$$;U0#*;U&/)$8#:~#\\\"\\\" )(#'#(\\\"'#&'#=.\\\" 7}\"),peg$decode(\"%;\\u01DC/:#;\\u028B/1$;S/($8#:\\x7F#! )(#'#(\\\"'#&'#\"),peg$decode(\"%;P/;#;\\u028B/2$;Z/)$8#:\\x80#\\\"\\\" )(#'#(\\\"'#&'#.# &;P\"),peg$decode(\"<%;V/S#;\\u028B/J$2\\x82\\\"\\\"6\\x827\\x83/;$;\\u028B/2$;&/)$8%:\\x84%\\\"$ )(%'#($'#(#'#(\\\"'#&'#.# &;V=.\\\" 7\\x81\"),peg$decode(\"%;Y/A#;\\u028B/8$;W.# &;z/)$8#:\\x85#\\\"\\\" )(#'#(\\\"'#&'#.# &;W\"),peg$decode(\";\\u01E3.U &;\\u01E5.O &;\\u01E4.I &%%;u/8#%<;\\u0220=.##&&!&'#/#$+\\\")(\\\"'#&'#/\\\"!&,)\"),peg$decode(\"<%;\\u015D/' 8!:\\x87!! )=.\\\" 7\\x86\"),peg$decode(\"%;X/\\x83#$%;\\u028B/>#;\\u0196/5$;\\u028B/,$;X/#$+$)($'#(#'#(\\\"'#&'#0H*%;\\u028B/>#;\\u0196/5$;\\u028B/,$;X/#$+$)($'#(#'#(\\\"'#&'#&/)$8\\\":\\x88\\\"\\\"! )(\\\"'#&'#\"),peg$decode(\"%;[/\\x83#$%;\\u028B/>#;]/5$;\\u028B/,$;[/#$+$)($'#(#'#(\\\"'#&'#0H*%;\\u028B/>#;]/5$;\\u028B/,$;[/#$+$)($'#(#'#(\\\"'#&'#&/)$8\\\":\\x88\\\"\\\"! )(\\\"'#&'#\"),peg$decode(\";\\u0199.) &;\\u019A.# &;\\u019B\"),peg$decode(\"%;\\\\/\\x83#$%;\\u028B/>#;_/5$;\\u028B/,$;\\\\/#$+$)($'#(#'#(\\\"'#&'#0H*%;\\u028B/>#;_/5$;\\u028B/,$;\\\\/#$+$)($'#(#'#(\\\"'#&'#&/)$8\\\":\\x88\\\"\\\"! )(\\\"'#&'#\"),peg$decode(\";\\u0197.# &;\\u0198\"),peg$decode(\"%;^/\\x83#$%;\\u028B/>#;a/5$;\\u028B/,$;^/#$+$)($'#(#'#(\\\"'#&'#0H*%;\\u028B/>#;a/5$;\\u028B/,$;^/#$+$)($'#(#'#(\\\"'#&'#&/)$8\\\":\\x88\\\"\\\"! )(\\\"'#&'#\"),peg$decode(\";\\u019C.[ &;\\u019D.U &;\\u01A7.O &;\\u019E.I &%%;\\u019F/8#%<;\\u019F=.##&&!&'#/#$+\\\")(\\\"'#&'#/\\\"!&,)\"),peg$decode(\"%;`/\\x83#$%;\\u028B/>#;c/5$;\\u028B/,$;`/#$+$)($'#(#'#(\\\"'#&'#0H*%;\\u028B/>#;c/5$;\\u028B/,$;`/#$+$)($'#(#'#(\\\"'#&'#&/)$8\\\":\\x88\\\"\\\"! )(\\\"'#&'#\"),peg$decode(\";\\u01A2.{ &;\\u01A3.u &%%;\\u01A0/8#%<;a=.##&&!&'#/#$+\\\")(\\\"'#&'#/\\\"!&,).I &%%;\\u01A1/8#%<;a=.##&&!&'#/#$+\\\")(\\\"'#&'#/\\\"!&,)\"),peg$decode(\"%;b/9#$;e0#*;e&/)$8\\\":\\x88\\\"\\\"! )(\\\"'#&'#\"),peg$decode(\"%;\\u028B/1#;f/($8\\\":\\x89\\\"! )(\\\"'#&'#.H &%;\\u028B/>#;g/5$;\\u028B/,$;b/#$+$)($'#(#'#(\\\"'#&'#\"),peg$decode(\"%3\\x8A\\\"\\\"5$7\\x8B/?#;\\u028B/6$3\\x8C\\\"\\\"5$7\\x8D/'$8#:\\x8E# )(#'#(\\\"'#&'#.? &%;\\u0239/& 8!:\\x8F! ).. &%;\\u0246/& 8!:\\x8E! )\"),peg$decode(\";\\u01A8./ &;\\u01A5.) &;\\u01A6.# &;\\u01A4\"),peg$decode(\"<%;\\u0205/i#;\\u028B/`$;\\u01DA/W$;z/N$;\\u028B/E$;i/<$;\\u028B/3$;\\u01DB/*$8(:\\x91(#'$\\\")(('#(''#(&'#(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\x90\"),peg$decode(\"<%;\\u01FB/:#;\\u028B/1$;&/($8#:\\x93#! )(#'#(\\\"'#&'#=.\\\" 7\\x92\"),peg$decode(\"<%;\\u0204/\\x93#;\\u028B/\\x8A$;k.\\\" &\\\"/|$;\\u028B/s$$;l/�#*;l&&&#/]$;\\u028B/T$;m.\\\" &\\\"/F$;\\u028B/=$;\\u021C/4$;\\u028B/+$8*:\\x95*$)'%#)(*'#()'#(('#(''#(&'#(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\x94\"),peg$decode(\"%%<;\\u027B=.##&&!&'#/1#;z/($8\\\":\\x96\\\"! )(\\\"'#&'#\"),peg$decode(\"<%;\\u027B/i#;\\u028B/`$;z/W$;\\u028B/N$;\\u026F/E$;\\u028B/<$;z/3$;\\u028B/*$8(:\\x98(#'%!)(('#(''#(&'#(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\x97\"),peg$decode(\"<%;\\u021B/D#;\\u028B/;$;z/2$;\\u028B/)$8$:\\x9A$\\\"#!)($'#(#'#(\\\"'#&'#=.\\\" 7\\x99\"),peg$decode(\"%;d/;#;\\u028B/2$;o/)$8#:\\x9B#\\\"\\\" )(#'#(\\\"'#&'#.# &;d\"),peg$decode(\";v./ &;p.) &;s.# &;q\"),peg$decode(\"<%;\\u0238/n#;\\u028B/e$;u.\\\" &\\\"/W$;\\u0218/N$;\\u028B/E$;\\u0226/<$;\\u028B/3$;n/*$8(:\\x9D(#%$ )(('#(''#(&'#(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\x9C\"),peg$decode(\"<%;u.\\\" &\\\"/u#;\\u023F.5 &;\\u022D./ &;\\u0228.) &;\\u025B.# &;\\u0242/T$;\\u028B/K$;n/B$;\\u028B/9$;r.\\\" &\\\"/+$8&:\\x9F&$%$\\\" )(&'#(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\x9E\"),peg$decode(\"<%;\\u021D/D#;\\u028B/;$;n/2$;\\u028B/)$8$:\\xA1$\\\"#!)($'#(#'#(\\\"'#&'#=.\\\" 7\\xA0\"),peg$decode(\"<%;u.\\\" &\\\"/E#;\\u0201/<$;\\u028B/3$;t/*$8$:\\xA3$##\\\" )($'#(#'#(\\\"'#&'#=.\\\" 7\\xA2\"),peg$decode(\"%;n/W#%;\\u028B/>#;\\u01F9/5$;\\u028B/,$;n/#$+$)($'#(#'#(\\\"'#&'#/)$8\\\":\\xA4\\\"\\\"! )(\\\"'#&'#\"),peg$decode(\"%;\\u0245/1#;\\u028B/($8\\\":\\xA5\\\"!!)(\\\"'#&'#\"),peg$decode(\"<%;u.\\\" &\\\"/E#;\\u022F/<$;\\u028B/3$;w/*$8$:\\xA7$##\\\" )($'#(#'#(\\\"'#&'#=.\\\" 7\\xA6\"),peg$decode(\";x.# &;\\u01AC\"),peg$decode(\"%;\\u01DA/I#;\\xA5.# &;{/:$;\\u028B/1$;\\u01DB/($8$:\\x7F$!\\\")($'#(#'#(\\\"'#&'#\"),peg$decode(\"%;n/\\x83#$%;\\u028B/>#;\\u01F9/5$;\\u028B/,$;n/#$+$)($'#(#'#(\\\"'#&'#0H*%;\\u028B/>#;\\u01F9/5$;\\u028B/,$;n/#$+$)($'#(#'#(\\\"'#&'#&/)$8\\\":\\x88\\\"\\\"! )(\\\"'#&'#\"),peg$decode(\"%;y/\\x83#$%;\\u028B/>#;\\u024E/5$;\\u028B/,$;y/#$+$)($'#(#'#(\\\"'#&'#0H*%;\\u028B/>#;\\u024E/5$;\\u028B/,$;y/#$+$)($'#(#'#(\\\"'#&'#&/)$8\\\":\\x88\\\"\\\"! )(\\\"'#&'#\"),peg$decode(\"<%;|.\\\" &\\\"/1#;\\u028B/($8\\\":\\xA9\\\"!!)(\\\"'#&'#=.\\\" 7\\xA8\"),peg$decode(\"%;z/B#;\\u028B/9$$;}0#*;}&/)$8#:\\xAA#\\\"\\\" )(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u01DC/:#;z/1$;\\u028B/($8#:\\x7F#!!)(#'#(\\\"'#&'#\"),peg$decode(\"<%;\\u01AB/\\x8B#;\\u028B/\\x82$;\\u01DA/y$;\\x80.\\\" &\\\"/k$;\\u028B/b$;\\u01DB/Y$;\\u028B/P$;\\x7F.\\\" &\\\"/B$;\\u028B/9$;\\x82.\\\" &\\\"/+$8*:\\xAC*$)&\\\" )(*'#()'#(('#(''#(&'#(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\xAB\"),peg$decode(\"<%3\\xAE\\\"\\\"5&7\\xAF/p#;\\u028B/g$;\\u01DA/^$;\\u028B/U$;\\u027C/L$;\\u028B/C$;z/:$;\\u028B/1$;\\u01DB/($8):\\xB0)!\\\")()'#(('#(''#(&'#(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\xAD\"),peg$decode(\"<%;\\xE2/' 8!:\\xB2!! ).V &%;\\x81.\\\" &\\\"/G#;{/>$9:\\xB3 \\\"! -\\\"\\\"&!&#/)$8#:\\xB4#\\\"\\\"!)(#'#(\\\"'#&'#=.\\\" 7\\xB1\"),peg$decode(\"%;\\u0218.# &;\\u01F6/1#;\\u028B/($8\\\":\\xB5\\\"!!)(\\\"'#&'#\"),peg$decode(\"<%;\\u0251/@#;\\u028B/7$;\\x84.# &;\\x83/($8#:\\xB7#! )(#'#(\\\"'#&'#=.\\\" 7\\xB6\"),peg$decode(\"<%;\\u01A9/' 8!:\\xB9!! )=.\\\" 7\\xB8\"),peg$decode(\"<%;\\u01DA/\\x81#;\\u028B/x$;\\x85.\\\" &\\\"/j$;\\u028B/a$;\\x86.\\\" &\\\"/S$;\\u028B/J$;\\xCE.\\\" &\\\"/<$;\\u028B/3$;\\u01DB/*$8):\\xBB)#&$\\\")()'#(('#(''#(&'#(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\xBA\"),peg$decode(\"%;\\x83/P#%<%;\\u028B/,#;\\u0202/#$+\\\")(\\\"'#&'#=.##&&!&'#/($8\\\":\\xBC\\\"!!)(\\\"'#&'#\"),peg$decode(\"<%;\\u0252/L#;\\u028B/C$;\\u0202/:$;\\u028B/1$;{/($8%:\\xBE%! )(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\xBD\"),peg$decode(\"<%;1/' 8!:\\xC0!! )=.\\\" 7\\xBF\"),peg$decode(\"<%;\\x89.\\\" &\\\"/;#;\\x8B/2$;\\u028B/)$8#:\\xC2#\\\"\\\"!)(#'#(\\\"'#&'#=.\\\" 7\\xC1\"),peg$decode(\"<%;\\u0221/@#;\\u028B/7$;\\x8A.\\\" &\\\"/)$8#:\\xC4#\\\"\\\" )(#'#(\\\"'#&'#=.\\\" 7\\xC3\"),peg$decode(\"<%;\\u0256/D#;\\u028B/;$;\\u0253/2$;\\u028B/)$8$:\\xC6$\\\"#!)($'#(#'#(\\\"'#&'#=.\\\" 7\\xC5\"),peg$decode(\";\\x9C._ &;\\u012B.Y &;\\u0192.S &;\\x8D.M &;\\x8C.G &;\\x96.A &;\\x90.; &;\\x94.5 &;\\x95./ &;\\xA6.) &;\\xAC.# &;\\xAE\"),peg$decode(\"<%;\\u0209.# &;\\u021C/@#;\\u028B/7$;\\x8E.\\\" &\\\"/)$8#:\\xC8#\\\"\\\" )(#'#(\\\"'#&'#=.\\\" 7\\xC7\"),peg$decode(\"<%;\\u0200/^#;\\u028B/U$;\\x8F.\\\" &\\\"/G$;\\x8E.\\\" &\\\"/9$;\\x92.\\\" &\\\"/+$8%:\\xCA%$$\\\"! )(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\xC9\"),peg$decode(\"%;\\u0271/1#;\\u028B/($8\\\":\\xCB\\\"!!)(\\\"'#&'#\"),peg$decode(\"%;\\u0214.) &;\\u022E.# &;\\u021F/1#;\\u028B/($8\\\":\\xCC\\\"!!)(\\\"'#&'#\"),peg$decode(\"<%;\\u0263/N#;\\u028B/E$;\\x8E.\\\" &\\\"/7$;\\x91.\\\" &\\\"/)$8$:\\xCE$\\\"# )($'#(#'#(\\\"'#&'#=.\\\" 7\\xCD\"),peg$decode(\"<%%;\\u0270/,#;\\u028B/#$+\\\")(\\\"'#&'#.\\\" &\\\"/?#;\\x93.\\\" &\\\"/1$;\\x92/($8#:v#! )(#'#(\\\"'#&'#=.\\\" 7\\xCF\"),peg$decode(\"%;\\u01BB/1#;\\u028B/($8\\\":\\xD0\\\"!!)(\\\"'#&'#\"),peg$decode(\"%;\\u0266/1#;\\u028B/($8\\\":\\xD1\\\"!!)(\\\"'#&'#\"),peg$decode(\"<%;\\x93/2#;\\x92/)$8\\\":\\xD3\\\"\\\"! )(\\\"'#&'#=.\\\" 7\\xD2\"),peg$decode(\"<%;\\u025D/J#;\\u028B/A$;\\x93.\\\" &\\\"/3$;\\x92/*$8$:\\xD5$##! )($'#(#'#(\\\"'#&'#=.\\\" 7\\xD4\"),peg$decode(\"<%;\\x97/N#;\\u01AC/E$;\\u028B/<$;\\x98/3$;\\u028B/*$8%:\\xD7%#$#!)(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\xD6\"),peg$decode(\"<%;\\u01F7/D#;\\u028B/;$;\\u026C/2$;\\u028B/)$8$:\\xD9$\\\"#!)($'#(#'#(\\\"'#&'#=.\\\" 7\\xD8\"),peg$decode(\";\\x99.# &;\\x9A\"),peg$decode(\"<%;\\u025E/M#;\\u028B/D$;\\u0270/;$;\\u028B/2$;\\u01AC/)$8%:\\xDB%\\\"$ )(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\xDA\"),peg$decode(\"<%;\\u01F4/I#;\\u028B/@$;\\x9B.\\\" &\\\"/2$;\\u013C/)$8$:\\xDD$\\\"# )($'#(#'#(\\\"'#&'#=.\\\" 7\\xDC\"),peg$decode(\"%;\\u0208/1#;\\u028B/($8\\\":\\xD1\\\"!!)(\\\"'#&'#\"),peg$decode(\"%;\\x9D/2#;\\xBF/)$8\\\":\\xDE\\\"\\\"! )(\\\"'#&'#\"),peg$decode(\"<%;\\x9E.\\\" &\\\"/1#;\\u028B/($8\\\":.\\\"!!)(\\\"'#&'#=.\\\" 7\\xDF\"),peg$decode(\"%;\\u027E/J#;\\u028B/A$;\\x9F.\\\" &\\\"/3$;\\xA0/*$8$:\\xE0$##! )($'#(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u0259/1#;\\u028B/($8\\\":\\xD1\\\"!!)(\\\"'#&'#\"),peg$decode(\"%;\\xA2/B#;\\u028B/9$$;\\xA10#*;\\xA1&/)$8#:\\xE1#\\\"\\\" )(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u01DC/:#;\\xA2/1$;\\u028B/($8#:\\x7F#!!)(#'#(\\\"'#&'#\"),peg$decode(\"<%;\\u01C1/2#;\\xA3/)$8\\\":\\xE3\\\"\\\"! )(\\\"'#&'#=.\\\" 7\\xE2\"),peg$decode(\"%;\\u01FB/:#;\\u028B/1$;\\xA4/($8#:\\xE4#! )(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u01DA/C#;\\xA5/:$;\\u028B/1$;\\u01DB/($8$: $!\\\")($'#(#'#(\\\"'#&'#\"),peg$decode(\"%;\\x9D/2#;\\xC0/)$8\\\":\\xE5\\\"\\\"! )(\\\"'#&'#\"),peg$decode(\"<%;\\u0268/e#;\\u028B/\\\\$;\\xA7.\\\" &\\\"/N$;\\u028B/E$;\\u01C0/<$;\\u028B/3$;\\xA8/*$8':\\xE7'#$\\\" )(''#(&'#(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\xE6\"),peg$decode(\"%3\\xE8\\\"\\\"5%7\\xE9/& 8!:\\xEA! ).4 &%3\\xEB\\\"\\\"5'7\\xEC/& 8!:\\xED! )\"),peg$decode(\"%;\\u0226/?#;\\u028B/6$3\\xEE\\\"\\\"5'7\\xEF/'$8#:\\xF0# )(#'#(\\\"'#&'#.v &%;\\u0270.# &;\\u01E6/9#;\\u028B/0$;\\u0212/'$8#:\\xF1# )(#'#(\\\"'#&'#.J &%;\\u0270.# &;\\u01E6/:#;\\u028B/1$;\\xA9/($8#:\\xF2#! )(#'#(\\\"'#&'#\"),peg$decode(\"%;\\xAB/9#$;\\xAA0#*;\\xAA&/)$8\\\":\\xF3\\\"\\\"! )(\\\"'#&'#\"),peg$decode(\"%;\\u028B/C#;\\u01DC/:$;\\u028B/1$;\\xAB/($8$:\\xF4$! )($'#(#'#(\\\"'#&'#\"),peg$decode(\";\\xBA.# &;B\"),peg$decode(\"%;\\u026A/:#;\\u028B/1$;\\xAD/($8#:\\xF5#! )(#'#(\\\"'#&'#\"),peg$decode(\"%3\\xF6\\\"\\\"5$7\\xF7/?#;\\u028B/6$3\\xF8\\\"\\\"5$7\\xF9/'$8#:\\xFA# )(#'#(\\\"'#&'#.\\xB6 &%3\\xFB\\\"\\\"5+7\\xFC/W#;\\u028B/N$3\\xFD\\\"\\\"5)7\\xFE/?$;\\u028B/6$3\\xFF\\\"\\\"5%7\\u0100/'$8%:\\u0101% )(%'#($'#(#'#(\\\"'#&'#.l &%3\\xEB\\\"\\\"5'7\\xEC/?#;\\u028B/6$3\\u0102\\\"\\\"5-7\\u0103/'$8#:\\u0104# )(#'#(\\\"'#&'#.: &%3\\u0105\\\"\\\"5#7\\u0106/& 8!:\\u0107! ).# &;\\u01C0\"),peg$decode(\";\\xAF.; &;\\xB1.5 &;\\xB2./ &;\\xB4.) &;\\xB6.# &;\\xB8\"),peg$decode(\"<%;\\u01FD/\\x8B#;\\u028B/\\x82$%;\\u0211/,#;\\u028B/#$+\\\")(\\\"'#&'#.\\\" &\\\"/a$;z/X$;\\u028B/O$;\\u01FB/F$;\\u028B/=$;\\xB0/4$;\\u028B/+$8):\\u0109)$(&%!)()'#(('#(''#(&'#(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\u0108\"),peg$decode(\";\\u01AA.) &;/.# &;B\"),peg$decode(\"<%;\\u0217/f#;\\u028B/]$%;\\u0211/,#;\\u028B/#$+\\\")(\\\"'#&'#.\\\" &\\\"/<$;\\xB0/3$;\\u028B/*$8%:\\u010B%#$\\\"!)(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\u010A\"),peg$decode(\"<%;\\u0277/@#;\\u028B/7$;\\xB3.\\\" &\\\"/)$8#:\\u010D#\\\"\\\" )(#'#(\\\"'#&'#=.\\\" 7\\u010C\"),peg$decode(\"%;\\u01AA/1#;\\u028B/($8\\\":\\u010E\\\"!!)(\\\"'#&'#\"),peg$decode(\"<%;\\u01F8/@#;\\u028B/7$;\\xB5.\\\" &\\\"/)$8#:\\u0110#\\\"\\\" )(#'#(\\\"'#&'#=.\\\" 7\\u010F\"),peg$decode(\"%;\\u01AC.) &;\\u01BC.# &;\\u01AA/1#;\\u028B/($8\\\":\\u0111\\\"!!)(\\\"'#&'#\"),peg$decode(\"<%;\\u025C/I#;\\u028B/@$;\\xB7.\\\" &\\\"/2$;\\u028B/)$8$:\\u0110$\\\"#!)($'#(#'#(\\\"'#&'#=.\\\" 7\\u0112\"),peg$decode(\"%;\\u01AC.) &;\\u01BC.# &;\\u01BA/1#;\\u028B/($8\\\":\\u0113\\\"!!)(\\\"'#&'#\"),peg$decode(\"<%;\\u0254/S#;\\u028B/J$;\\u01BF/A$;\\u028B/8$;\\xB9.\\\" &\\\"/*$8%:\\u0115%#$\\\" )(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\u0114\"),peg$decode(\"%;\\u01DA/C#;\\xBA/:$;\\u028B/1$;\\u01DB/($8$:\\xF4$!\\\")($'#(#'#(\\\"'#&'#.D &%;\\u01E6/:#;\\xBA/1$;\\u028B/($8#:\\xF4#!!)(#'#(\\\"'#&'#\"),peg$decode(\";\\xBC.) &;\\xBB.# &;\\xBE\"),peg$decode(\";8.) &;1.# &;6\"),peg$decode(\"%;\\xBD/<#9:\\u0116 ! -\\\"\\\"&!&#/($8\\\":\\u0117\\\"!!)(\\\"'#&'#\"),peg$decode(\"%$;\\u01CD/�#*;\\u01CD&&&#/' 8!:\\u0118!! )\"),peg$decode(\"%;\\xBD/' 8!:\\u0119!! )\"),peg$decode(\";\\xC0./ &;\\u0108.) &;\\u0121.# &;\\u0129\"),peg$decode(\"<%;\\xD3/k#;\\u028B/b$;\\xCE.\\\" &\\\"/T$;\\u028B/K$;\\xCF/B$;\\u028B/9$;\\xC1.\\\" &\\\"/+$8':\\u011B'$&$\\\" )(''#(&'#(%'#($'#(#'#(\\\"'#&'#.z &%;\\xD3/p#;\\u028B/g$;\\xCE.\\\" &\\\"/Y$;\\u028B/P$;\\xC1.\\\" &\\\"/B$;\\u028B/9$;\\xCF.\\\" &\\\"/+$8':\\u011C'$&$\\\" )(''#(&'#(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\u011A\"),peg$decode(\"<;\\xC2.^ &%;\\u0224/T#;\\u028B/K$;\\u0258/B$;\\u028B/9$;\\u024D/0$;\\u028B/'$8&:\\u011E& )(&'#(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\u011D\"),peg$decode(\"%;\\xC4/B#;\\u028B/9$$;\\xC30#*;\\xC3&/)$8#:\\u011F#\\\"\\\" )(#'#(\\\"'#&'#\"),peg$decode(\"%;\\xC4/1#;\\u028B/($8\\\":\\u0120\\\"!!)(\\\"'#&'#\"),peg$decode(\"%;\\u0224/j#;\\u028B/a$;\\xC5/X$;\\u028B/O$;\\xC6.\\\" &\\\"/A$;\\u028B/8$;\\xC9.\\\" &\\\"/*$8':\\u0121'#$\\\" )(''#(&'#(%'#($'#(#'#(\\\"'#&'#\"),peg$decode(\";\\u0275.y &%;\\u0244/G#;\\u028B/>$;\\u023B/5$;\\u028B/,$;\\u0275/#$+%)(%'#($'#(#'#(\\\"'#&'#.E &;\\u0269.? &%;\\u023B/5#;\\u028B/,$;\\u0269/#$+#)(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u024A/:#;\\u028B/1$;\\xC7/($8#:\\u0122#! )(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u01AC/B#;\\u028B/9$$;\\xC80#*;\\xC8&/)$8#:\\u0123#\\\"\\\" )(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u01DC/:#;\\u028B/1$;\\u01AC/($8#:\\u0120#! )(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u0247.? &%;\\u026B/5#;\\u028B/,$;\\u0241/#$+#)(#'#(\\\"'#&'#/' 8!:\\u0124!! )\"),peg$decode(\"<%;\\u027D/C#;\\u028B/:$;\\xCB/1$;\\u028B/($8$:\\u0126$!!)($'#(#'#(\\\"'#&'#=.\\\" 7\\u0125\"),peg$decode(\"%;\\xCD/B#;\\u028B/9$$;\\xCC0#*;\\xCC&/)$8#:\\xE1#\\\"\\\" )(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u01DC/:#;\\xCD/1$;\\u028B/($8#:1#!!)(#'#(\\\"'#&'#\"),peg$decode(\"%;\\x83/M#;\\u028B/D$;\\u01FB/;$;\\u028B/2$;\\x84/)$8%:\\u0127%\\\"$ )(%'#($'#(#'#(\\\"'#&'#\"),peg$decode(\"<%;\\u024F/L#;\\u028B/C$;\\u0202/:$;\\u028B/1$;\\u0102/($8%:\\u0129%! )(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\u0128\"),peg$decode(\"<%;\\u0240/S#;\\u028B/J$;z/A$;\\u028B/8$;\\xD0.\\\" &\\\"/*$8%:\\u012B%#$\\\" )(%'#($'#(#'#(\\\"'#&'#.D &%;\\u024B/:#;\\u028B/1$;z/($8#:\\u012C#! )(#'#(\\\"'#&'#=.\\\" 7\\u012A\"),peg$decode(\"<%;\\xD1/2#;z/)$8\\\":\\u012E\\\"\\\"! )(\\\"'#&'#=.\\\" 7\\u012D\"),peg$decode(\";\\xD2.# &;\\u01DC\"),peg$decode(\"%;\\u024B/1#;\\u028B/($8\\\":\\xD1\\\"!!)(\\\"'#&'#\"),peg$decode(\"%;\\xD5/B#;\\u028B/9$$;\\xD40#*;\\xD4&/)$8#:\\u012F#\\\"\\\" )(#'#(\\\"'#&'#\"),peg$decode(\"<%;\\u011E/D#;\\u028B/;$;\\xD5/2$;\\u028B/)$8$:\\u0131$\\\"#!)($'#(#'#(\\\"'#&'#=.\\\" 7\\u0130\"),peg$decode(\";\\xD6.# &;\\u0101\"),peg$decode(\"%;\\xD7/m#;\\xDD.\\\" &\\\"/_$;\\xDE.\\\" &\\\"/Q$;\\xDF.\\\" &\\\"/C$;\\u028B/:$;\\xCA.\\\" &\\\"/,$8&:\\u0132&%%$#\\\" )(&'#(%'#($'#(#'#(\\\"'#&'#\"),peg$decode(\"<%;\\u0267/R#;\\u028B/I$;\\xD8.\\\" &\\\"/;$;\\u028B/2$;\\xDB/)$8%:\\u0134%\\\"\\\" )(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\u0133\"),peg$decode(\"<;\\xD9.# &;\\xDA=.\\\" 7\\u0135\"),peg$decode(\"%;\\u0218/1#;\\u028B/($8\\\":\\u0136\\\"!!)(\\\"'#&'#\"),peg$decode(\"%;\\u01F6/1#;\\u028B/($8\\\":\\u0137\\\"!!)(\\\"'#&'#\"),peg$decode(\"%;\\xE1/B#;\\u028B/9$$;\\xDC0#*;\\xDC&/)$8#:\\xE1#\\\"\\\" )(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u01DC/:#;\\xE1/1$;\\u028B/($8#:1#!!)(#'#(\\\"'#&'#\"),peg$decode(\"<%;\\u0226/D#;\\u028B/;$;\\xE5/2$;\\u028B/)$8$:\\u0139$\\\"#!)($'#(#'#(\\\"'#&'#=.\\\" 7\\u0138\"),peg$decode(\"<%;\\u027C/D#;\\u028B/;$;z/2$;\\u028B/)$8$:\\u013B$\\\"#!)($'#(#'#(\\\"'#&'#=.\\\" 7\\u013A\"),peg$decode(\"<%;\\u0229/e#;\\u028B/\\\\$;\\u0202/S$;\\u028B/J$;{/A$;\\u028B/8$;\\xE0.\\\" &\\\"/*$8':\\u013D'#&\\\" )(''#(&'#(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\u013C\"),peg$decode(\"<%;\\u022A/D#;\\u028B/;$;z/2$;\\u028B/)$8$:\\u013F$\\\"#!)($'#(#'#(\\\"'#&'#=.\\\" 7\\u013E\"),peg$decode(\";\\xE2.# &;\\xE4\"),peg$decode(\"%;\\xE3.\\\" &\\\"/2#;\\u0106/)$8\\\":\\u0140\\\"\\\"! )(\\\"'#&'#\"),peg$decode(\"%;\\u01CF/2#;\\u01DD/)$8\\\":\\u0141\\\"\\\"! )(\\\"'#&'#\"),peg$decode(\"%;z/@#;\\u028B/7$;\\xF7.\\\" &\\\"/)$8#:\\u0142#\\\"\\\" )(#'#(\\\"'#&'#\"),peg$decode(\"%;\\xE9/B#;\\u028B/9$$;\\xE60#*;\\xE6&/)$8#:\\u0143#\\\"\\\" )(#'#(\\\"'#&'#\"),peg$decode(\"%;\\xE7.# &;\\xE8/7#;\\xFE.\\\" &\\\"/)$8\\\":\\u0144\\\"\\\"! )(\\\"'#&'#\"),peg$decode(\"<%;\\u01DC/:#;\\xE9/1$;\\u028B/($8#:\\u0146#!!)(#'#(\\\"'#&'#=.\\\" 7\\u0145\"),peg$decode(\"<%;\\xF8/D#;\\u028B/;$;\\xE9/2$;\\u028B/)$8$:\\u0148$\\\"#!)($'#(#'#(\\\"'#&'#=.\\\" 7\\u0147\"),peg$decode(\"%;\\xEF.\\\" &\\\"/S#;\\u028B/J$;\\xF5.5 &;B./ &;\\xEA.) &;\\xF0.# &;\\xF6/)$8#:\\u0149#\\\"\\\" )(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u01AB/S#;\\u028B/J$;\\u011C/A$;\\u028B/8$;\\xEB.\\\" &\\\"/*$8%:\\u014A%#$\\\" )(%'#($'#(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u01FB.\\\" &\\\"/h#;\\u028B/_$;\\u01CF/V$;\\u028B/M$;\\u01DA/D$;\\xEC/;$;\\u028B/2$;\\u01DB/)$8(:\\u014B(\\\"%\\\")(('#(''#(&'#(%'#($'#(#'#(\\\"'#&'#.n &%;\\u01FB/^#;\\u028B/U$;\\u01DA/L$;\\u028B/C$;\\xEC/:$;\\u028B/1$;\\u01DB/($8':\\u014C'!\\\")(''#(&'#(%'#($'#(#'#(\\\"'#&'#.# &;\\xF7\"),peg$decode(\"%;\\xED/B#;\\u028B/9$$;\\xEE0#*;\\xEE&/)$8#:\\u014D#\\\"\\\" )(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u013D/S#;\\u028B/J$;&/A$;\\u028B/8$;\\u015D.\\\" &\\\"/*$8%:\\u014E%#$\\\" )(%'#($'#(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u01DC/C#;\\u028B/:$;\\xED/1$;\\u028B/($8$:\\xCB$!!)($'#(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u023D/& 8!:\\u014F! )\"),peg$decode(\"<%;\\xF1/@#;\\u028B/7$;\\xF2.\\\" &\\\"/)$8#:\\u0151#\\\"\\\" )(#'#(\\\"'#&'#=.\\\" 7\\u0150\"),peg$decode(\"<%;\\u01AC/@#;\\u028B/7$;\\xF7.\\\" &\\\"/)$8#:\\u0153#\\\"\\\" )(#'#(\\\"'#&'#=.\\\" 7\\u0152\"),peg$decode(\"<;\\xF3.# &;\\xF4=.\\\" 7\\u0154\"),peg$decode(\"%;\\u0231/V#;\\u028B/M$;\\u0202/D$;\\u028B/;$;\\u01BC/2$;\\u028B/)$8&:\\u0155&\\\"%!)(&'#(%'#($'#(#'#(\\\"'#&'#\"),peg$decode(\"%;u/;#;\\u0231/2$;\\u028B/)$8#:\\u0156#\\\"\\\"!)(#'#(\\\"'#&'#\"),peg$decode(\"<%;\\u01DA/R#;\\xE5/I$;\\u028B/@$;\\u01DB/7$;\\xF7.\\\" &\\\"/)$8%:\\u0158%\\\"# )(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\u0157\"),peg$decode(\"<%;\\xA4/7#;\\xF7.\\\" &\\\"/)$8\\\":\\u015A\\\"\\\"! )(\\\"'#&'#=.\\\" 7\\u0159\"),peg$decode(\"<%%;\\u01FB/Q#%%<;\\u01CD.# &;\\u0282=.##&&!&'#/,#;\\u028B/#$+\\\")(\\\"'#&'#/#$+\\\")(\\\"'#&'#.\\\" &\\\"/S#;\\u01CF/J$;\\u028B/A$;\\u0115.\\\" &\\\"/3$;\\u028B/*$8%:\\u015C%#$#!)(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\u015B\"),peg$decode(\"<%;\\xF9.\\\" &\\\"/J#;\\u028B/A$;\\xFA.\\\" &\\\"/3$;\\u023A/*$8$:\\u015E$##! )($'#(#'#(\\\"'#&'#=.\\\" 7\\u015D\"),peg$decode(\"%;\\u0243/1#;\\u028B/($8\\\":\\xA5\\\"!!)(\\\"'#&'#\"),peg$decode(\";\\xFB.# &;\\xFD\"),peg$decode(\"%;\\u023E.) &;\\u0262.# &;\\u0227/@#;\\u028B/7$;\\xFC.\\\" &\\\"/)$8#:\\u015F#\\\"\\\" )(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u0250/1#;\\u028B/($8\\\":\\u0160\\\"!!)(\\\"'#&'#\"),peg$decode(\"%;\\u0233.# &;\\u020D/1#;\\u028B/($8\\\":\\u0160\\\"!!)(\\\"'#&'#\"),peg$decode(\"<%;\\xFF.# &;\\u0100/1#;\\u028B/($8\\\":\\u0162\\\"!!)(\\\"'#&'#=.\\\" 7\\u0161\"),peg$decode(\"<%;\\u024C/;#;\\u028B/2$;z/)$8#:\\u0164#\\\"\\\" )(#'#(\\\"'#&'#=.\\\" 7\\u0163\"),peg$decode(\"<%;\\u0276/;#;\\u028B/2$;\\u0115/)$8#:\\u0166#\\\"\\\" )(#'#(\\\"'#&'#=.\\\" 7\\u0165\"),peg$decode(\"<%;\\u0278/;#;\\u028B/2$;\\u011A/)$8#:\\u0168#\\\"\\\" )(#'#(\\\"'#&'#=.\\\" 7\\u0167\"),peg$decode(\"%;\\u0104/B#;\\u028B/9$$;\\u01030#*;\\u0103&/)$8#:\\u0169#\\\"\\\" )(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u01DC/:#;\\u0104/1$;\\u028B/($8#:\\u0120#!!)(#'#(\\\"'#&'#\"),peg$decode(\"<%;z/X#;\\u028B/O$;\\u015F.\\\" &\\\"/A$;\\u028B/8$;\\u0105.\\\" &\\\"/*$8%:\\u016B%#$\\\" )(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\u016A\"),peg$decode(\"%;\\u0249/@#;\\u028B/7$;\\u0223.# &;\\u023C/($8#:\\u016C#! )(#'#(\\\"'#&'#\"),peg$decode(\"<;\\u01DE=.\\\" 7\\u016D\"),peg$decode(\"<;\\u025F.5 &;\\u0263./ &;\\u01F2.) &;\\u0222.# &;\\u022C=.\\\" 7\\u016E\"),peg$decode(\"<%;\\u010A/k#;\\u028B/b$;\\u010E/Y$;\\u028B/P$;\\u0112.\\\" &\\\"/B$;\\u028B/9$;\\u0109.\\\" &\\\"/+$8':\\u0170'$&$\\\" )(''#(&'#(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\u016F\"),peg$decode(\"<%;\\u0261/:#;\\u028B/1$;\\xDB/($8#:\\u0172#! )(#'#(\\\"'#&'#=.\\\" 7\\u0171\"),peg$decode(\";\\u010B.# &;\\u010C\"),peg$decode(\"<%;\\u0234/@#;\\u028B/7$;\\u010D.\\\" &\\\"/)$8#:\\u0174#\\\"\\\" )(#'#(\\\"'#&'#=.\\\" 7\\u0173\"),peg$decode(\"<%;\\u025F/1#;\\u028B/($8\\\":\\u0176\\\"!!)(\\\"'#&'#=.\\\" 7\\u0175\"),peg$decode(\"<%;\\u024E/;#;\\u028B/2$;\\u0107/)$8#:\\u0178#\\\"\\\" )(#'#(\\\"'#&'#=.\\\" 7\\u0177\"),peg$decode(\"%;\\u010F/2#;\\u0111/)$8\\\":\\u0179\\\"\\\"! )(\\\"'#&'#\"),peg$decode(\"<%;\\u0110/2#;\\u01C1/)$8\\\":\\u017B\\\"\\\"! )(\\\"'#&'#=.\\\" 7\\u017A\"),peg$decode(\"<%;\\u0237/,#;\\u028B/#$+\\\")(\\\"'#&'#=.\\\" 7\\u017C\"),peg$decode(\"<%;\\u0118.) &;\\xA5.# &;\\u011D/1#;\\u028B/($8\\\":\\u017D\\\"!!)(\\\"'#&'#=.\\\" 7\\u0167\"),peg$decode(\"<%;\\u0161/j#;\\u028B/a$;\\u0114.\\\" &\\\"/S$;\\u028B/J$3\\u017F\\\"\\\"5\\\"7\\u0180/;$;\\u028B/2$;\\u0113/)$8':\\u0181'\\\"$ )(''#(&'#(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\u017E\"),peg$decode(\"<%;\\u0122/S#;\\u028B/J$;\\u0124/A$;\\u028B/8$;\\xDE.\\\" &\\\"/*$8%:\\u0183%#$\\\" )(%'#($'#(#'#(\\\"'#&'#.5 &%3\\u0184\\\"\\\"5'7\\u0185/' 8!:\\u0186!! )=.\\\" 7\\u0182\"),peg$decode(\"<%;\\u0158/@#;\\u028B/7$;\\xDE.\\\" &\\\"/)$8#:\\u0188#\\\"\\\" )(#'#(\\\"'#&'#.V &%;\\u024C/L#;\\u028B/C$;\\u020B/:$;\\u028B/1$;\\u01A9/($8%:\\u0189%! )(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\u0187\"),peg$decode(\"<%;\\u01DA/T#;\\u0117/K$;\\u028B/B$$;\\u01160#*;\\u0116&/2$;\\u01DB/)$8%:\\u018B%\\\"#!)(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\u018A\"),peg$decode(\"%;\\u01DC/:#;\\u0117/1$;\\u028B/($8#:\\u018C#!!)(#'#(\\\"'#&'#\"),peg$decode(\"<%;\\u01A9/' 8!:\\u018E!! )=.\\\" 7\\u018D\"),peg$decode(\"<%;\\u0119/2#;\\u011A/)$8\\\":\\u018F\\\"\\\"! )(\\\"'#&'#=.\\\" 7\\u0167\"),peg$decode(\"<%;\\u0278/1#;\\u028B/($8\\\":\\xD1\\\"!!)(\\\"'#&'#=.\\\" 7\\u0190\"),peg$decode(\"%;\\u011C/B#;\\u028B/9$$;\\u011B0#*;\\u011B&/)$8#:\\u014D#\\\"\\\" )(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u01DC/:#;\\u011C/1$;\\u028B/($8#:\\x7F#!!)(#'#(\\\"'#&'#\"),peg$decode(\"<%;\\u01DA/C#;{/:$;\\u028B/1$;\\u01DB/($8$:\\u0192$!\\\")($'#(#'#(\\\"'#&'#=.\\\" 7\\u0191\"),peg$decode(\"<%;\\u0212/;#;\\u028B/2$;\\u0278/)$8#:\\u0194#\\\"\\\" )(#'#(\\\"'#&'#=.\\\" 7\\u0193\"),peg$decode(\"<%;\\u011F.) &;\\u0236.# &;\\u021E/' 8!:\\xD1!! )=.\\\" 7\\u0195\"),peg$decode(\"<%;\\u0273/@#;\\u028B/7$;\\u0120.\\\" &\\\"/)$8#:\\u0197#\\\"\\\" )(#'#(\\\"'#&'#=.\\\" 7\\u0196\"),peg$decode(\"%;\\u01F6/1#;\\u028B/($8\\\":\\u0198\\\"!!)(\\\"'#&'#\"),peg$decode(\"<%;\\u0122/\\xA2#;\\u0123.\\\" &\\\"/\\x94$;\\xF0/\\x8B$;\\u028B/\\x82$;\\u0124/y$;\\xDE.\\\" &\\\"/k$;\\xCE.\\\" &\\\"/]$;\\u028B/T$;\\xCF.\\\" &\\\"/F$;\\u028B/=$;\\u0109.\\\" &\\\"//$8+:\\u019A+(*)(&%$\\\" )(+'#(*'#()'#(('#(''#(&'#(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\u0199\"),peg$decode(\"<%;\\u0275/1#;\\u028B/($8\\\":\\xD1\\\"!!)(\\\"'#&'#=.\\\" 7\\u019B\"),peg$decode(\"<%;\\u024E/C#;\\u028B/:$;\\u0107/1$;\\u028B/($8$:\\u019D$!!)($'#(#'#(\\\"'#&'#=.\\\" 7\\u019C\"),peg$decode(\"<%;\\u0268/C#;\\u028B/:$;\\u0125/1$;\\u028B/($8$:\\u019F$!!)($'#(#'#(\\\"'#&'#=.\\\" 7\\u019E\"),peg$decode(\"%;\\u0127/9#$;\\u01260#*;\\u0126&/)$8\\\":\\u014D\\\"\\\"! )(\\\"'#&'#\"),peg$decode(\"%;\\u028B/:#;\\u01DC/1$;\\u0127/($8#:\\u018C#! )(#'#(\\\"'#&'#\"),peg$decode(\"<%;\\u01AE/M#;\\u028B/D$;\\u01E6/;$;\\u0128/2$;\\u028B/)$8%:\\u01A1%\\\"$!)(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\u01A0\"),peg$decode(\"<;z.. &%;\\u0212/& 8!:\\u01A3! )=.\\\" 7\\u01A2\"),peg$decode(\"<%;\\u012A/\\x80#;\\xF0/w$;\\u028B/n$;\\xDE.\\\" &\\\"/`$;\\xCE.\\\" &\\\"/R$;\\xCF.\\\" &\\\"/D$;\\u028B/;$;\\u0109.\\\" &\\\"/-$8(:\\u01A5(&'&$#\\\" )(('#(''#(&'#(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\u01A4\"),peg$decode(\"<%;\\u0215/C#;\\u028B/:$;\\u0226/1$;\\u028B/($8$:\\xD1$!#)($'#(#'#(\\\"'#&'#=.\\\" 7\\u01A6\"),peg$decode(\"<;\\u012D.5 &;\\u012E./ &;\\u012F.) &;\\u0130.# &;\\u0131=.\\\" 7\\u01A7\"),peg$decode(\"%;\\u020C/1#;\\u028B/($8\\\":\\xD1\\\"!!)(\\\"'#&'#\"),peg$decode(\"%%<%;\\u012C/>#;\\u0230./ &;\\u0272.) &;\\u0279.# &;\\u027A/#$+\\\")(\\\"'#&'#=.##&&!&'#/1#;\\u0132/($8\\\":\\u018C\\\"! )(\\\"'#&'#\"),peg$decode(\"%%<%;\\u012C/>#;\\u026C./ &;\\u0272.) &;\\u0279.# &;\\u027A/#$+\\\")(\\\"'#&'#=.##&&!&'#/1#;\\u0173/($8\\\":\\u018C\\\"! )(\\\"'#&'#\"),peg$decode(\"%%<%;\\u012C/>#;\\u026C./ &;\\u0230.) &;\\u0279.# &;\\u027A/#$+\\\")(\\\"'#&'#=.##&&!&'#/1#;\\u0177/($8\\\":\\u018C\\\"! )(\\\"'#&'#\"),peg$decode(\"%%<%;\\u012C/>#;\\u026C./ &;\\u0230.) &;\\u0272.# &;\\u027A/#$+\\\")(\\\"'#&'#=.##&&!&'#/1#;\\u0186/($8\\\":\\u018C\\\"! )(\\\"'#&'#\"),peg$decode(\"%%<%;\\u012C/>#;\\u026C./ &;\\u0230.) &;\\u0272.# &;\\u0279/#$+\\\")(\\\"'#&'#=.##&&!&'#/1#;\\u018A/($8\\\":\\u018C\\\"! )(\\\"'#&'#\"),peg$decode(\"<%;\\u0133/T#;\\u0135.\\\" &\\\"/F$;\\u01AC/=$;\\u028B/4$;\\u0136/+$8%:\\u01A9%$$#\\\" )(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\u01A8\"),peg$decode(\"%;\\u012C/J#;\\u0134.\\\" &\\\"/<$;\\u026C/3$;\\u028B/*$8$:\\u01AA$##\\\"!)($'#(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u026E.# &;\\u026D/1#;\\u028B/($8\\\":\\u01AB\\\"!!)(\\\"'#&'#\"),peg$decode(\"<%;\\u022B/N#;\\u028B/E$;u/<$;\\u0220/3$;\\u028B/*$8%:\\u01AD%#$\\\"!)(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\u01AC\"),peg$decode(\";\\u0137.# &;\\u0172\"),peg$decode(\"<%;\\u01DA/Z#;\\u0139/Q$$;\\u013B0#*;\\u013B&/A$;\\u01DB/8$;\\u0138.\\\" &\\\"/*$8%:\\u01AF%##\\\" )(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\u01AE\"),peg$decode(\"%;\\u027F/D#;\\u028B/;$;\\u0265/2$;\\u028B/)$8$:\\u01B0$\\\"#!)($'#(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u013C/B#;\\u028B/9$$;\\u013A0#*;\\u013A&/)$8#:\\u014D#\\\"\\\" )(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u01DC/:#;\\u013C/1$;\\u028B/($8#:\\xCB#!!)(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u01DC.\\\" &\\\"/1#;\\u0150/($8\\\":\\u01B1\\\"! )(\\\"'#&'#\"),peg$decode(\"<%;\\u013D/O#;\\u028B/F$;\\u013E.\\\" &\\\"/8$;\\u013F.\\\" &\\\"/*$8$:\\u01B3$##! )($'#(#'#(\\\"'#&'#=.\\\" 7\\u01B2\"),peg$decode(\"%;\\u01CF/=#%<;\\u028B=/##&'!&&#/($8\\\":v\\\"!!)(\\\"'#&'#.\\\\ &%%<;\\u013E.) &;\\u0141.# &;\\u0150=.##&&!&'#/:#;\\u028B/1$;\\u01D2/($8#:v#! )(#'#(\\\"'#&'#\"),peg$decode(\"<%;&/1#;\\u028B/($8\\\":\\u01B5\\\"!!)(\\\"'#&'#=.\\\" 7\\u01B4\"),peg$decode(\"%;\\u0141/B#$;\\u01400#*;\\u0140&/2$;\\u028B/)$8#:\\u014D#\\\"\\\"!)(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u028B/1#;\\u0141/($8\\\":\\u018C\\\"! )(\\\"'#&'#\"),peg$decode(\"<%;\\u0142.\\\" &\\\"/A#;\\u0144/8$;\\u0142.\\\" &\\\"/*$8#:\\u01B7##\\\"! )(#'#(\\\"'#&'#=.\\\" 7\\u01B6\"),peg$decode(\"%$;\\u0143/�#*;\\u0143&&&#/' 8!:\\u01B8!! )\"),peg$decode(\"<%;\\u020B/C#;\\u028B/:$;\\u01CF/1$;\\u028B/($8$:\\u01BA$!!)($'#(#'#(\\\"'#&'#=.\\\" 7\\u01B9\"),peg$decode(\";\\u0146.; &;\\u0149.5 &;\\u014C./ &;\\u014D.) &;\\u014F.# &;\\u0145\"),peg$decode(\"<%;\\u0165/' 8!:\\u01BC!! )=.\\\" 7\\u01BB\"),peg$decode(\"<%;\\u0147/U#;\\u015F.\\\" &\\\"/G$;\\u0160.\\\" &\\\"/9$;\\u0148.\\\" &\\\"/+$8$:\\u01BE$$#\\\"! )($'#(#'#(\\\"'#&'#=.\\\" 7\\u01BD\"),peg$decode(\"<%;\\u0255.# &;\\u0254/D#;\\u028B/;$;\\u023B/2$;\\u028B/)$8$:\\u01C0$\\\"#!)($'#(#'#(\\\"'#&'#=.\\\" 7\\u01BF\"),peg$decode(\"<%;\\u01FE/1#;\\u028B/($8\\\":\\u01C2\\\"!!)(\\\"'#&'#=.\\\" 7\\u01C1\"),peg$decode(\"%;\\u014A/@#;\\u0160.\\\" &\\\"/2$;\\u028B/)$8#:\\u01C3#\\\"\\\"!)(#'#(\\\"'#&'#\"),peg$decode(\"<%;\\u014B.# &;\\u0274/1#;\\u028B/($8\\\":\\u0160\\\"!!)(\\\"'#&'#=.\\\" 7\\u01C4\"),peg$decode(\"<%;u.\\\" &\\\"/2#;\\u0248/)$8\\\":\\u01C6\\\"\\\"! )(\\\"'#&'#=.\\\" 7\\u01C5\"),peg$decode(\"<;\\u0162=.\\\" 7\\u01C7\"),peg$decode(\"<%;\\u0212/D#;\\u028B/;$;\\u014E/2$;\\u028B/)$8$:\\u01C9$\\\"#!)($'#(#'#(\\\"'#&'#=.\\\" 7\\u01C8\"),peg$decode(\";O./ &;8.) &;..# &;6\"),peg$decode(\"<%;\\u015D/' 8!:\\u01CB!! )=.\\\" 7\\u01CA\"),peg$decode(\"<%;\\u0142.\\\" &\\\"/J#;\\u0151/A$;\\u028B/8$;\\u0142.\\\" &\\\"/*$8$:\\u01CD$##\\\" )($'#(#'#(\\\"'#&'#=.\\\" 7\\u01CC\"),peg$decode(\";\\u0163.) &;\\u0153.# &;\\u0152\"),peg$decode(\"<%;\\u0162/' 8!:\\u01CF!! )=.\\\" 7\\u01CE\"),peg$decode(\"<%;\\u0154/J#;\\u028B/A$;\\u0159/8$;\\u0160.\\\" &\\\"/*$8$:\\u01D1$##! )($'#(#'#(\\\"'#&'#=.\\\" 7\\u01D0\"),peg$decode(\"%;\\u0155.# &;\\u0156/1#;\\u028B/($8\\\":\\u01D2\\\"!!)(\\\"'#&'#\"),peg$decode(\"<%;\\u0255/;#;\\u028B/2$;\\u023B/)$8#:\\u01D3#\\\"\\\" )(#'#(\\\"'#&'#=.\\\" 7\\u01BF\"),peg$decode(\"<%;\\u0274/' 8!:\\u01D5!! )=.\\\" 7\\u01D4\"),peg$decode(\"%;\\u01DA/T#;\\u015B/K$;\\u028B/B$$;\\u015A0#*;\\u015A&/2$;\\u01DB/)$8%:\\u01D6%\\\"#!)(%'#($'#(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u0157/' 8!:\\u01D7!! )\"),peg$decode(\"%;\\u0157/' 8!:\\u01D8!! )\"),peg$decode(\"%;\\u01DC/:#;\\u015B/1$;\\u028B/($8#:\\u018C#!!)(#'#(\\\"'#&'#\"),peg$decode(\"<%;\\u015C/O#;\\u028B/F$;\\u015F.\\\" &\\\"/8$;\\u0148.\\\" &\\\"/*$8$:\\u01DA$##! )($'#(#'#(\\\"'#&'#=.\\\" 7\\u01D9\"),peg$decode(\"%;\\u0117/\\\\#%<%;\\u028B/8#;\\u01ED.) &;\\u01DB.# &;\\u015F/#$+\\\")(\\\"'#&'#=/##&'!&&#/($8\\\":v\\\"!!)(\\\"'#&'#.# &;z\"),peg$decode(\"<%$;\\u015E/�#*;\\u015E&&&#/' 8!:\\u01DC!! )=.\\\" 7\\u01DB\"),peg$decode(\"%;\\u0207/C#;\\u028B/:$;\\u01BA/1$;\\u028B/($8$:v$!!)($'#(#'#(\\\"'#&'#\"),peg$decode(\"<%;\\u01FC.# &;\\u0216/1#;\\u028B/($8\\\":\\u01DE\\\"!!)(\\\"'#&'#=.\\\" 7\\u01DD\"),peg$decode(\"%;\\u0161/;#;\\u0107/2$;\\u028B/)$8#:\\u01DF#\\\"\\\"!)(#'#(\\\"'#&'#\"),peg$decode(\"<%;\\u024C/D#;\\u028B/;$;\\u020A/2$;\\u028B/)$8$:\\u01E1$\\\"#!)($'#(#'#(\\\"'#&'#=.\\\" 7\\u01E0\"),peg$decode(\"%;\\u0206/;#;\\u028B/2$;O/)$8#:\\u01E2#\\\"\\\" )(#'#(\\\"'#&'#\"),peg$decode(\"<%;\\u0164/E#;\\u0115/<$;\\u0165/3$;\\u028B/*$8$:\\u01E4$##\\\"!)($'#(#'#(\\\"'#&'#=.\\\" 7\\u01E3\"),peg$decode(\"<%;\\u0225/D#;\\u028B/;$;\\u023B/2$;\\u028B/)$8$:\\u01E6$\\\"#!)($'#(#'#(\\\"'#&'#=.\\\" 7\\u01E5\"),peg$decode(\"%;\\u0166/F#;\\u0167.\\\" &\\\"/8$;\\u0170.\\\" &\\\"/*$8#:\\u01E7##\\\"! )(#'#(\\\"'#&'#\"),peg$decode(\"<%;\\u025A/D#;\\u028B/;$;\\u01C1/2$;\\u028B/)$8$:\\u01E9$\\\"#!)($'#(#'#(\\\"'#&'#=.\\\" 7\\u01E8\"),peg$decode(\"%;\\u0169/B#;\\u028B/9$$;\\u01680#*;\\u0168&/)$8#:\\u01EA#\\\"\\\" )(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u0169/1#;\\u028B/($8\\\":\\u0198\\\"!!)(\\\"'#&'#\"),peg$decode(\"<;\\u016A.# &;\\u016F=.\\\" 7\\u01EB\"),peg$decode(\"%;\\u024C/T#;\\u028B/K$;\\u0215.# &;\\u0275/<$;\\u028B/3$;\\u016B/*$8%:\\u01EC%#$\\\" )(%'#($'#(#'#(\\\"'#&'#\"),peg$decode(\"<;\\u016C.) &;\\u016D.# &;\\u016E=.\\\" 7\\u01ED\"),peg$decode(\"%;\\u0268/J#;\\u028B/A$;\\u0248.# &;\\u0212/2$;\\u028B/)$8$:\\u01EE$\\\"#!)($'#(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u0203.# &;\\u0260/1#;\\u028B/($8\\\":\\u01EF\\\"!!)(\\\"'#&'#\"),peg$decode(\"%;\\u0244/D#;\\u028B/;$;\\u01F3/2$;\\u028B/)$8$:\\u01F0$\\\"#!)($'#(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u0242/D#;\\u028B/;$;\\u01CF/2$;\\u028B/)$8$:\\u01F1$\\\"#!)($'#(#'#(\\\"'#&'#\"),peg$decode(\"<%;u.\\\" &\\\"/J#;\\u0213/A$;\\u028B/8$;\\u0171.\\\" &\\\"/*$8$:\\u01F3$##\\\" )($'#(#'#(\\\"'#&'#=.\\\" 7\\u01F2\"),peg$decode(\"%;\\u0232/J#;\\u028B/A$;\\u0214.# &;\\u022E/2$;\\u028B/)$8$:\\u01F4$\\\"#!)($'#(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u0189/' 8!:\\u01F5!! )\"),peg$decode(\"<%;\\u0174/c#;\\u0135.\\\" &\\\"/U$;\\u01BC/L$;\\u028B/C$;\\u0176/:$;\\xDE.\\\" &\\\"/,$8&:\\u01F7&%%$#! )(&'#(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\u01F6\"),peg$decode(\"%;\\u012C/J#;\\u0175.\\\" &\\\"/<$;\\u0230/3$;\\u028B/*$8$:\\u01F8$##\\\"!)($'#(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u0274/1#;\\u028B/($8\\\":\\u01F9\\\"!!)(\\\"'#&'#\"),peg$decode(\"<%;\\u024C/N#;\\u028B/E$;\\u01AC/<$;\\u028B/3$;\\u0158/*$8%:\\u01FB%#$\\\" )(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\u01FA\"),peg$decode(\"<%;\\u0178/\\xA6#;\\u0135.\\\" &\\\"/\\x98$;\\u01BD.\\\" &\\\"/\\x8A$;\\u028B/\\x81$;\\u0179/x$;\\u024C/o$;\\u028B/f$;\\u01AC/]$;\\u028B/T$;\\u0181.\\\" &\\\"/F$;\\u0182.\\\" &\\\"/8$;\\u0183//$8,:\\u01FD,(+*)'$\\\"! )(,'#(+'#(*'#()'#(('#(''#(&'#(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\u01FC\"),peg$decode(\"%;\\u012C/J#;\\u0134.\\\" &\\\"/<$;\\u0272/3$;\\u028B/*$8$:\\u01FE$##\\\"!)($'#(#'#(\\\"'#&'#\"),peg$decode(\"<%;\\u017A.\\\" &\\\"/2#;\\u017C/)$8\\\":\\u0200\\\"\\\"! )(\\\"'#&'#=.\\\" 7\\u01FF\"),peg$decode(\"%;\\u01FF.) &;\\u01F5.# &;\\u017B/1#;\\u028B/($8\\\":\\u0201\\\"!!)(\\\"'#&'#\"),peg$decode(\"%;\\u0235/;#;\\u028B/2$;\\u024A/)$8#:\\u0202#\\\"\\\" )(#'#(\\\"'#&'#\"),peg$decode(\"<;\\u017D.# &;\\u017E=.\\\" 7\\u0203\"),peg$decode(\"%;\\u0215.# &;\\u0234/1#;\\u028B/($8\\\":\\u0204\\\"!!)(\\\"'#&'#\"),peg$decode(\"%;\\u0275/@#;\\u028B/7$;\\u017F.\\\" &\\\"/)$8#:\\u0205#\\\"\\\" )(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u024A/;#;\\u028B/2$;\\u0180/)$8#:\\u0206#\\\"\\\" )(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u0117/B#;\\u028B/9$$;\\u01160#*;\\u0116&/)$8#:\\u014D#\\\"\\\" )(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u0224/c#;\\u028B/Z$;\\u021A/Q$;\\u028B/H$;\\u0264.) &3\\u0207\\\"\\\"5)7\\u0208/3$;\\u028B/*$8&:\\u0209&#%#!)(&'#(%'#($'#(#'#(\\\"'#&'#\"),peg$decode(\"<%;\\u027B/D#;\\u028B/;$;z/2$;\\u028B/)$8$:\\u020A$\\\"#!)($'#(#'#(\\\"'#&'#=.\\\" 7\\x97\"),peg$decode(\"<%;\\u0200/W#;\\u028B/N$;\\u0184/E$;\\u028B/<$;\\u021C/3$;\\u028B/*$8&:\\u020C&#%#!)(&'#(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\u020B\"),peg$decode(\"%$;\\u0185/�#*;\\u0185&&&#/' 8!:\\u020D!! )\"),peg$decode(\"%;\\x9C/:#;\\u028B/1$;$/($8#:\\\"#!\\\")(#'#(\\\"'#&'#\"),peg$decode(\"<%;\\u0188/T#;\\u0135.\\\" &\\\"/F$;\\u0187/=$;\\u028B/4$;\\u0189/+$8%:\\u020F%$$#\\\" )(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\u020E\"),peg$decode(\"%;\\u01BE/;#;\\u028B/2$;\\u0115/)$8#:\\u0210#\\\"\\\" )(#'#(\\\"'#&'#.# &;\\u01BE\"),peg$decode(\"%;\\u012C/J#;\\u0134.\\\" &\\\"/<$;\\u0279/3$;\\u028B/*$8$:\\u0211$##\\\"!)($'#(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u01FB/D#;\\u028B/;$;\\xC0/2$;\\u028B/)$8$:\\u018F$\\\"#!)($'#(#'#(\\\"'#&'#\"),peg$decode(\"<%;\\u018B/f#;\\u0135.\\\" &\\\"/X$;\\u01AC/O$;\\u028B/F$;\\u0276/=$;\\u028B/4$;\\u018C/+$8':\\u0213'$&%$ )(''#(&'#(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\u0212\"),peg$decode(\"%;\\u012C/N#;\\u027A/E$;\\u028B/<$;\\u026C/3$;\\u028B/*$8%:\\u0214%#$#!)(%'#($'#(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u01D1/@#;\\u028B/7$;\\u018D.\\\" &\\\"/)$8#:\\u0215#\\\"\\\" )(#'#(\\\"'#&'#\"),peg$decode(\"<%;\\u01DA/Z#;\\u028B/Q$;\\u018E.\\\" &\\\"/C$;\\u028B/:$;\\u01DB/1$;\\u028B/($8&:\\u0217&!#)(&'#(%'#($'#(#'#(\\\"'#&'#=.\\\" 7\\u0216\"),peg$decode(\"%;\\u0190/9#$;\\u018F0#*;\\u018F&/)$8\\\":\\u0218\\\"\\\"! )(\\\"'#&'#\"),peg$decode(\"%;\\u028B/H#;\\u01DC/?$;\\u028B/6$;\\u0190.\\\" &\\\"/($8$:x$! )($'#(#'#(\\\"'#&'#\"),peg$decode(\"%%<%;\\u01CF/;#;\\u028B/2$;&.# &;\\u0141/#$+#)(#'#(\\\"'#&'#=.##&&!&'#/:#;z/1$;\\u028B/($8#:\\u0192#!!)(#'#(\\\"'#&'#.x &%;\\u0191/n#%%<;\\u01CD=.##&&!&'#/,#;\\u028B/#$+\\\")(\\\"'#&'#/F$;\\u013E.\\\" &\\\"/8$;\\u013F.\\\" &\\\"/*$8$:\\u01B3$##! )($'#(#'#(\\\"'#&'#\"),peg$decode(\";\\u01CF.# &;\\u01D2\"),peg$decode(\"<%;\\u0193/;#;\\u01AC/2$;\\u028B/)$8#:\\u021A#\\\"\\\"!)(#'#(\\\"'#&'#=.\\\" 7\\u0219\"),peg$decode(\"<%;\\u0219/J#;\\u028B/A$;\\u0194/8$;\\u0195.\\\" &\\\"/*$8$:\\u021C$##! )($'#(#'#(\\\"'#&'#=.\\\" 7\\u021B\"),peg$decode(\"<%;\\u026C./ &;\\u0230.) &;\\u0272.# &;\\u0279/1#;\\u028B/($8\\\":\\u0160\\\"!!)(\\\"'#&'#=.\\\" 7\\u021D\"),peg$decode(\"<%;\\u022B/D#;\\u028B/;$;\\u0220/2$;\\u028B/)$8$:\\u021F$\\\"#!)($'#(#'#(\\\"'#&'#=.\\\" 7\\u021E\"),peg$decode(\"<%;\\u01E8/,#;\\u01E8/#$+\\\")(\\\"'#&'#=.\\\" 7\\u0220\"),peg$decode(\"<;\\u01E4=.\\\" 7\\u0221\"),peg$decode(\"<;\\u01E5=.\\\" 7\\u0222\"),peg$decode(\"<;\\u01DE=.\\\" 7\\u0223\"),peg$decode(\"<;\\u01EF=.\\\" 7\\u0224\"),peg$decode(\"<;\\u01E9=.\\\" 7\\u0225\"),peg$decode(\"<%;\\u01EA/,#;\\u01EA/#$+\\\")(\\\"'#&'#=.\\\" 7\\u0226\"),peg$decode(\"<%;\\u01EB/,#;\\u01EB/#$+\\\")(\\\"'#&'#=.\\\" 7\\u0227\"),peg$decode(\"<;\\u01E7=.\\\" 7\\u0228\"),peg$decode(\"<;\\u01E8=.\\\" 7\\u0229\"),peg$decode(\"<;\\u01EA=.\\\" 7\\u022A\"),peg$decode(\"<;\\u01EB=.\\\" 7\\u022B\"),peg$decode(\"<%;\\u01EA/,#;\\u01E6/#$+\\\")(\\\"'#&'#=.\\\" 7\\u022C\"),peg$decode(\"<%;\\u01EB/,#;\\u01E6/#$+\\\")(\\\"'#&'#=.\\\" 7\\u022D\"),peg$decode(\"<%;\\u01E6/1#;\\u01E6.\\\" &\\\"/#$+\\\")(\\\"'#&'#=.\\\" 7\\u022E\"),peg$decode(\"<%;\\u01EC/,#;\\u01E6/#$+\\\")(\\\"'#&'#=.\\\" 7\\u022F\"),peg$decode(\"<%;\\u01EA/,#;\\u01EB/#$+\\\")(\\\"'#&'#=.\\\" 7\\u022F\"),peg$decode(\"<%$;\\u01F1/�#*;\\u01F1&&&#/<#9:\\u0231 ! -\\\"\\\"&!&#/($8\\\":\\u0232\\\"!!)(\\\"'#&'#=.\\\" 7\\u0230\"),peg$decode(\"<%;\\u0238/@#;\\u028B/7$;u.\\\" &\\\"/)$8#:\\u0234#\\\"\\\" )(#'#(\\\"'#&'#=.\\\" 7\\u0233\"),peg$decode(\"<;\\u01CF.# &;\\u01D2=.\\\" 7\\u0235\"),peg$decode(\"<%;\\u01A9/' 8!:\\u0237!! )=.\\\" 7\\u0236\"),peg$decode(\"<%;\\u01AD.\\\" &\\\"/2#;\\u01A9/)$8\\\":\\u0239\\\"\\\"! )(\\\"'#&'#=.\\\" 7\\u0238\"),peg$decode(\"<%;\\u01AD.\\\" &\\\"/2#;\\u01A9/)$8\\\":\\u023B\\\"\\\"! )(\\\"'#&'#=.\\\" 7\\u023A\"),peg$decode(\"%;\\u01A9/2#;\\u01DD/)$8\\\":\\u023C\\\"\\\"! )(\\\"'#&'#\"),peg$decode(\"<%;\\u01B8.) &;\\u01B9.# &;\\u01B7/J#;\\u01A9/A$;\\u028B/8$;\\u01AF.\\\" &\\\"/*$8$:\\u023E$##\\\" )($'#(#'#(\\\"'#&'#=.\\\" 7\\u023D\"),peg$decode(\"<%;\\u01B0/' 8!:\\u0240!! )=.\\\" 7\\u023F\"),peg$decode(\"%;\\u01B1/B#;\\u028B/9$$;\\u01B10#*;\\u01B1&/)$8#:\\u0241#\\\"\\\" )(#'#(\\\"'#&'#\"),peg$decode(\";\\u01B2.) &;\\u01B3.# &;\\u01B4\"),peg$decode(\"%;\\u01DD/:#;\\u028B/1$;\\u01CF/($8#:\\u0242#! )(#'#(\\\"'#&'#.D &%;\\u01DD/:#;\\u028B/1$;\\u01DE/($8#:\\u0243#! )(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u01D8/r#;\\u028B/i$;\\u01B5.\\\" &\\\"/[$;\\u01EE/R$;\\u028B/I$;\\u01B6.\\\" &\\\"/;$;\\u028B/2$;\\u01D9/)$8(:\\u0244(\\\"%\\\")(('#(''#(&'#(%'#($'#(#'#(\\\"'#&'#.m &%;\\u01D8/c#;\\u028B/Z$;\\u01EE/Q$;\\u028B/H$;\\u01B6.\\\" &\\\"/:$;\\u028B/1$;\\u01D9/($8':\\u0245'!\\\")(''#(&'#(%'#($'#(#'#(\\\"'#&'#\"),peg$decode(\"%;\\u01D8/L#;\\u028B/C$;z/:$;\\u028B/1$;\\u01D9/($8%:\\u0246%!\\\")(%'#($'#(#'#(\\\"'#&'#\"),peg$decode(\"%;z/' 8!:\\u0247!! )\"),peg$decode(\"%;z/' 8!:\\u0248!! )\"),peg$decode(\"%;\\u028B/& 8!:\\u0249! )\"),peg$decode(\"%;\\u01AD/2#;\\u01B9/)$8\\\":\\u024A\\\"\\\"! )(\\\"'#&'#\"),peg$decode(\"%;\\u01A9/2#;\\u01DD/)$8\\\":J\\\"\\\"! )(\\\"'#&'#\"),peg$decode(\"<%;\\u01A9/' 8!:\\u024C!! )=.\\\" 7\\u024B\"),peg$decode(\"<%;\\u01A9/' 8!:\\u024E!! )=.\\\" 7\\u024D\"),peg$decode(\"<%;\\u01AD.\\\" &\\\"/2#;\\u01A9/)$8\\\":\\u0250\\\"\\\"! )(\\\"'#&'#=.\\\" 7\\u024F\"),peg$decode(\"<%;\\u01AD.\\\" &\\\"/2#;\\u01A9/)$8\\\":\\u0252\\\"\\\"! )(\\\"'#&'#=.\\\" 7\\u0251\"),peg$decode(\"<%;\\u01AD.\\\" &\\\"/2#;\\u01A9/)$8\\\":\\u0254\\\"\\\"! )(\\\"'#&'#=.\\\" 7\\u0253\"),peg$decode(\"<%;\\u01AD.\\\" &\\\"/2#;\\u01A9/)$8\\\":\\u0256\\\"\\\"! )(\\\"'#&'#=.\\\" 7\\u0255\"),peg$decode(\"<%;\\u01AD.\\\" &\\\"/2#;\\u01A9/)$8\\\":\\u0258\\\"\\\"! )(\\\"'#&'#=.\\\" 7\\u0257\"),peg$decode(\"<%;\\u01C2.# &;\\u01AC/1#;\\u028B/($8\\\":\\u025A\\\"!!)(\\\"'#&'#=.\\\" 7\\u0259\"),peg$decode(\"%;\\u01AC/;#;\\u028B/2$;\\u0115/)$8#:\\u025B#\\\"\\\" )(#'#(\\\"'#&'#\"),peg$decode(\"<%;\\u01A9/' 8!:\\u025D!! )=.\\\" 7\\u025C\"),peg$decode(\"<%;\\u01A9/' 8!:\\u025F!! )=.\\\" 7\\u025E\"),peg$decode(\"<%;\\u01C6/=#%<;\\u01CD=.##&&!&'#/($8\\\":\\u0261\\\"!!)(\\\"'#&'#.\\xC5 &%;\\u01C7/=#%<;\\u01CD=.##&&!&'#/($8\\\":\\u0262\\\"!!)(\\\"'#&'#.\\x9B &%;\\u01C9/=#%<;\\u01CD=.##&&!&'#/($8\\\":\\u0263\\\"!!)(\\\"'#&'#.q &%;\\u01CA/=#%<;\\u01CD=.##&&!&'#/($8\\\":\\u0264\\\"!!)(\\\"'#&'#.G &%;\\u01CC/=#%<;\\u01CD=.##&&!&'#/($8\\\":\\u0265\\\"!!)(\\\"'#&'#=.\\\" 7\\u0260\"),peg$decode(\"<%%3\\u0267\\\"\\\"5!7\\u0268.\\\" &\\\"/F#3\\u0269\\\"\\\"5#7\\u026A.\\\" &\\\"/2$3\\u026B\\\"\\\"5$7\\u026C/#$+#)(#'#(\\\"'#&'#.k &%3\\u026D\\\"\\\"5$7\\u026E.5 &3\\u026F\\\"\\\"5&7\\u0270.) &3\\u0271\\\"\\\"5$7\\u0272.\\\" &\\\"/2#3\\u0273\\\"\\\"5$7\\u0274/#$+\\\")(\\\"'#&'#.) &3\\u0275\\\"\\\"5$7\\u0276/' 8!:\\u0160!! )=.\\\" 7\\u0266\"),peg$decode(\"<%;\\u01C8.5 &3\\u0278\\\"\\\"5%7\\u0279.) &3\\u027A\\\"\\\"5$7\\u027B/' 8!:\\u0160!! )=.\\\" 7\\u0277\"),peg$decode(\"<%3\\u027D\\\"\\\"5&7\\u027E/i#%$4,\\\"\\\"5!7-/,#0)*4,\\\"\\\"5!7-&&&#/2#3\\u027F\\\"\\\"5)7\\u0280/#$+\\\")(\\\"'#&'#.\\\" &\\\"/)$8\\\":\\u0281\\\"\\\"! )(\\\"'#&'#=.\\\" 7\\u027C\"),peg$decode(\"<%3\\u0283\\\"\\\"5'7\\u0284.\\x95 &3\\u0285\\\"\\\"5'7\\u0286.\\x89 &3\\u0287\\\"\\\"5'7\\u0288.} &%3\\u0289\\\"\\\"5$7\\u028A/7#3\\xF6\\\"\\\"5$7\\xF7.\\\" &\\\"/#$+\\\")(\\\"'#&'#.S &%3\\xF6\\\"\\\"5$7\\xF7/7#3\\u028B\\\"\\\"5%7\\u028C.\\\" &\\\"/#$+\\\")(\\\"'#&'#.) &3\\u028D\\\"\\\"5&7\\u028E/' 8!:\\u0160!! )=.\\\" 7\\u0282\"),peg$decode(\"<%%3\\u0290\\\"\\\"5#7\\u0291/V#2\\u0292\\\"\\\"6\\u02927\\u0293.A &2\\u0294\\\"\\\"6\\u02947\\u0295.5 &2\\u0296\\\"\\\"6\\u02967\\u0297.) &3\\u0298\\\"\\\"5$7\\u0299/#$+\\\")(\\\"'#&'#.q &%3\\u029A\\\"\\\"5#7\\u029B.A &3\\u026F\\\"\\\"5&7\\u0270.5 &3\\u029C\\\"\\\"5%7\\u029D.) &3\\u026D\\\"\\\"5$7\\u026E.\\\" &\\\"/2#3\\u0290\\\"\\\"5#7\\u0291/#$+\\\")(\\\"'#&'#.# &;\\u01CB/' 8!:\\u0160!! )=.\\\" 7\\u028F\"),peg$decode(\"%3\\u029E\\\"\\\"5(7\\u029F/d#%$4,\\\"\\\"5!7-/,#0)*4,\\\"\\\"5!7-&&&#/2#3\\u02A0\\\"\\\"5%7\\u02A1/#$+\\\")(\\\"'#&'#/)$8\\\":\\u02A2\\\"\\\"! )(\\\"'#&'#\"),peg$decode(\"<%3\\u02A4\\\"\\\"5$7\\u02A5/' 8!:\\u0160!! )=.\\\" 7\\u02A3\"),peg$decode(\"4\\u02A6\\\"\\\"5!7\\u02A7\"),peg$decode(\"%2\\u02A8\\\"\\\"6\\u02A87\\u02A9/K#$4\\u02AA\\\"\\\"5!7\\u02AB/,#0)*4\\u02AA\\\"\\\"5!7\\u02AB&&&#/)$8\\\":\\u02AC\\\"\\\"! )(\\\"'#&'#\"),peg$decode(\";\\u01D0.# &;\\u01D1\"),peg$decode(\";\\u01D3./ &;\\u01D7.) &;\\u01D5.# &;\\u01D6\"),peg$decode(\"%%<;\\u0280.# &;A=.##&&!&'#/J#$;\\u01CE.# &;\\u01CD/,#0)*;\\u01CE.# &;\\u01CD&&&#/($8\\\":\\u0118\\\"! )(\\\"'#&'#\"),peg$decode(\"%%<;\\u0282.# &;A=.##&&!&'#/J#$;\\u01CE.# &;\\u01CD/,#0)*;\\u01CE.# &;\\u01CD&&&#/($8\\\":\\u02AD\\\"! )(\\\"'#&'#\"),peg$decode(\"%;\\u01D8/\\x99#;\\u028B/\\x90$%$%%<;\\u01D4=.##&&!&'#/1#1\\\"\\\"5!7\\u02AE/#$+\\\")(\\\"'#&'#0G*%%<;\\u01D4=.##&&!&'#/1#1\\\"\\\"5!7\\u02AE/#$+\\\")(\\\"'#&'#&/\\\"!&,)/1$;\\u01D4/($8$:\\u02AF$!!)($'#(#'#(\\\"'#&'#\"),peg$decode(\"%$4\\u02B0\\\"\\\"5!7\\u02B10)*4\\u02B0\\\"\\\"5!7\\u02B1&/5#;\\u01D9/,$;\\u028B/#$+#)(#'#(\\\"'#&'#\"),peg$decode(\"%2\\u02B2\\\"\\\"6\\u02B27\\u02B3/k#$2\\u02B4\\\"\\\"6\\u02B47\\u02B5.) &4\\u02B6\\\"\\\"5!7\\u02B705*2\\u02B4\\\"\\\"6\\u02B47\\u02B5.) &4\\u02B6\\\"\\\"5!7\\u02B7&/7$2\\u02B2\\\"\\\"6\\u02B27\\u02B3/($8#:\\u02B8#!!)(#'#(\\\"'#&'#\"),peg$decode(\"%2\\u02B9\\\"\\\"6\\u02B97\\u02BA/k#$2:\\\"\\\"6:7;.) &4<\\\"\\\"5!7=05*2:\\\"\\\"6:7;.) &4<\\\"\\\"5!7=&/7$2\\u02B9\\\"\\\"6\\u02B97\\u02BA/($8#:\\u02BB#!!)(#'#(\\\"'#&'#\"),peg$decode(\"%2\\u02BC\\\"\\\"6\\u02BC7\\u02BD/k#$2\\u02BE\\\"\\\"6\\u02BE7\\u02BF.) &4\\u02C0\\\"\\\"5!7\\u02C105*2\\u02BE\\\"\\\"6\\u02BE7\\u02BF.) &4\\u02C0\\\"\\\"5!7\\u02C1&/7$2\\u02BC\\\"\\\"6\\u02BC7\\u02BD/($8#:\\u02C2#!!)(#'#(\\\"'#&'#\"),peg$decode(\"<%2\\u02C4\\\"\\\"6\\u02C47\\u02C5/1#;\\u028B/($8\\\":\\\"\\\"!!)(\\\"'#&'#=.\\\" 7\\u02C3\"),peg$decode(\"<%2\\u02C7\\\"\\\"6\\u02C77\\u02C8/1#;\\u028B/($8\\\":\\\"\\\"!!)(\\\"'#&'#=.\\\" 7\\u02C6\"),peg$decode(\"<%2\\u02CA\\\"\\\"6\\u02CA7\\u02CB/1#;\\u028B/($8\\\":\\\"\\\"!!)(\\\"'#&'#=.\\\" 7\\u02C9\"),peg$decode(\"<%2\\u02CD\\\"\\\"6\\u02CD7\\u02CE/1#;\\u028B/($8\\\":\\\"\\\"!!)(\\\"'#&'#=.\\\" 7\\u02CC\"),peg$decode(\"<%2\\u02D0\\\"\\\"6\\u02D07\\u02D1/1#;\\u028B/($8\\\":\\\"\\\"!!)(\\\"'#&'#=.\\\" 7\\u02CF\"),peg$decode(\"<%2\\u02D3\\\"\\\"6\\u02D37\\u02D4/1#;\\u028B/($8\\\":\\\"\\\"!!)(\\\"'#&'#=.\\\" 7\\u02D2\"),peg$decode(\"<%2\\u02D6\\\"\\\"6\\u02D67\\u02D7/1#;\\u028B/($8\\\":\\\"\\\"!!)(\\\"'#&'#=.\\\" 7\\u02D5\"),peg$decode(\"<%2\\u02D9\\\"\\\"6\\u02D97\\u02DA/1#;\\u028B/($8\\\":\\\"\\\"!!)(\\\"'#&'#=.\\\" 7\\u02D8\"),peg$decode(\"<%2\\u02B9\\\"\\\"6\\u02B97\\u02BA/1#;\\u028B/($8\\\":\\\"\\\"!!)(\\\"'#&'#=.\\\" 7\\u02DB\"),peg$decode(\"<%2\\u02B2\\\"\\\"6\\u02B27\\u02B3/1#;\\u028B/($8\\\":\\\"\\\"!!)(\\\"'#&'#=.\\\" 7\\u02DC\"),peg$decode(\"<%2\\u02BC\\\"\\\"6\\u02BC7\\u02BD/1#;\\u028B/($8\\\":\\\"\\\"!!)(\\\"'#&'#=.\\\" 7\\u02DD\"),peg$decode(\"<%2\\u02DF\\\"\\\"6\\u02DF7\\u02E0/1#;\\u028B/($8\\\":\\\"\\\"!!)(\\\"'#&'#=.\\\" 7\\u02DE\"),peg$decode(\"<%2\\u02E2\\\"\\\"6\\u02E27\\u02E3/1#;\\u028B/($8\\\":\\\"\\\"!!)(\\\"'#&'#=.\\\" 7\\u02E1\"),peg$decode(\"<%2\\u02E5\\\"\\\"6\\u02E57\\u02E6/1#;\\u028B/($8\\\":\\\"\\\"!!)(\\\"'#&'#=.\\\" 7\\u02E4\"),peg$decode(\"<%2\\u02E7\\\"\\\"6\\u02E77\\u02E8/1#;\\u028B/($8\\\":\\\"\\\"!!)(\\\"'#&'#=.\\\" 7\\u022E\"),peg$decode(\"<%2\\u02EA\\\"\\\"6\\u02EA7\\u02EB/1#;\\u028B/($8\\\":\\\"\\\"!!)(\\\"'#&'#=.\\\" 7\\u02E9\"),peg$decode(\"<%2\\u02ED\\\"\\\"6\\u02ED7\\u02EE/1#;\\u028B/($8\\\":\\\"\\\"!!)(\\\"'#&'#=.\\\" 7\\u02EC\"),peg$decode(\"<%2\\u02EF\\\"\\\"6\\u02EF7\\u02F0/1#;\\u028B/($8\\\":\\\"\\\"!!)(\\\"'#&'#=.\\\" 7\\u0225\"),peg$decode(\"<%2\\u02F1\\\"\\\"6\\u02F17\\u02F2/1#;\\u028B/($8\\\":\\\"\\\"!!)(\\\"'#&'#=.\\\" 7\\u022A\"),peg$decode(\"<%2\\u02F3\\\"\\\"6\\u02F37\\u02F4/1#;\\u028B/($8\\\":\\\"\\\"!!)(\\\"'#&'#=.\\\" 7\\u022B\"),peg$decode(\"<%2\\u02F6\\\"\\\"6\\u02F67\\u02F7/1#;\\u028B/($8\\\":\\\"\\\"!!)(\\\"'#&'#=.\\\" 7\\u02F5\"),peg$decode(\"<%2\\u02F9\\\"\\\"6\\u02F97\\u02FA/1#;\\u028B/($8\\\":\\\"\\\"!!)(\\\"'#&'#=.\\\" 7\\u02F8\"),peg$decode(\"<%2g\\\"\\\"6g7h/1#;\\u028B/($8\\\":\\\"\\\"!!)(\\\"'#&'#=.\\\" 7\\u02FB\"),peg$decode(\"<%2\\u02FD\\\"\\\"6\\u02FD7\\u02FE/1#;\\u028B/($8\\\":\\\"\\\"!!)(\\\"'#&'#=.\\\" 7\\u02FC\"),peg$decode(\"<%2\\u0300\\\"\\\"6\\u03007\\u0301/1#;\\u028B/($8\\\":\\\"\\\"!!)(\\\"'#&'#=.\\\" 7\\u02FF\"),peg$decode(\"<4\\u0303\\\"\\\"5!7\\u0304=.\\\" 7\\u0302\"),peg$decode(\"%3\\u0305\\\"\\\"5%7\\u0306/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0307\\\"\\\"5&7\\u0308/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0309\\\"\\\"5#7\\u030A/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u030B\\\"\\\"5%7\\u030C/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0105\\\"\\\"5#7\\u0106/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u030D\\\"\\\"5%7\\u030E/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u030F\\\"\\\"5'7\\u0310/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0311\\\"\\\"5#7\\u0312/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0313\\\"\\\"5%7\\u0314/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0315\\\"\\\"5\\\"7\\u0316/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0317\\\"\\\"5#7\\u0318/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0319\\\"\\\"5&7\\u031A/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u031B\\\"\\\"5-7\\u031C/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u031D\\\"\\\"5&7\\u031E/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u031F\\\"\\\"5%7\\u0320/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0321\\\"\\\"5'7\\u0322/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0323\\\"\\\"5\\\"7\\u0324/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0325\\\"\\\"5'7\\u0326/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0327\\\"\\\"5$7\\u0328/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0329\\\"\\\"5$7\\u032A/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u032B\\\"\\\"5%7\\u032C/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u032D\\\"\\\"5'7\\u032E/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u032F\\\"\\\"5&7\\u0330/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0331\\\"\\\"5&7\\u0332/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0333\\\"\\\"5(7\\u0334/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0335\\\"\\\"5*7\\u0336/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0337\\\"\\\"5&7\\u0338/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0339\\\"\\\"5%7\\u033A/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u033B\\\"\\\"5,7\\u033C/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u033D\\\"\\\"5,7\\u033E/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u033F\\\"\\\"517\\u0340/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0341\\\"\\\"5(7\\u0342/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0343\\\"\\\"5'7\\u0344/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0345\\\"\\\"5*7\\u0346/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0347\\\"\\\"5(7\\u0348/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0349\\\"\\\"5&7\\u034A/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u034B\\\"\\\"5$7\\u034C/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u034D\\\"\\\"5&7\\u034E/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u034F\\\"\\\"5(7\\u0350/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0351\\\"\\\"5$7\\u0352/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0353\\\"\\\"5$7\\u0354/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0355\\\"\\\"5$7\\u0356/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0357\\\"\\\"5#7\\u0358/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0359\\\"\\\"5&7\\u035A/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u035B\\\"\\\"5&7\\u035C/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u035D\\\"\\\"5)7\\u035E/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u035F\\\"\\\"5&7\\u0360/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0361\\\"\\\"5'7\\u0362/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0363\\\"\\\"5$7\\u0364/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0365\\\"\\\"5%7\\u0366/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0367\\\"\\\"5#7\\u0368/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0369\\\"\\\"5'7\\u036A/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u036B\\\"\\\"5$7\\u036C/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u036D\\\"\\\"5$7\\u036E/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u036F\\\"\\\"5$7\\u0370/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0371\\\"\\\"5%7\\u0372/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0373\\\"\\\"5&7\\u0374/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0375\\\"\\\"5\\\"7\\u0376/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0377\\\"\\\"5&7\\u0378/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0379\\\"\\\"5%7\\u037A/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u037B\\\"\\\"5)7\\u037C/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u037D\\\"\\\"5\\\"7\\u037E/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u037F\\\"\\\"5%7\\u0380/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0381\\\"\\\"5'7\\u0382/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0383\\\"\\\"5)7\\u0384/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0385\\\"\\\"5%7\\u0386/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0387\\\"\\\"5&7\\u0388/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0389\\\"\\\"5'7\\u038A/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u038B\\\"\\\"5)7\\u038C/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u038D\\\"\\\"5$7\\u038E/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u038F\\\"\\\"5\\\"7\\u0390/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0391\\\"\\\"5&7\\u0392/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0393\\\"\\\"5$7\\u0394/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0395\\\"\\\"5#7\\u0396/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0397\\\"\\\"5$7\\u0398/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0399\\\"\\\"5'7\\u039A/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u039B\\\"\\\"5$7\\u039C/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u039D\\\"\\\"5$7\\u039E/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u039F\\\"\\\"5%7\\u03A0/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03A1\\\"\\\"5&7\\u03A2/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03A3\\\"\\\"5%7\\u03A4/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03A5\\\"\\\"5'7\\u03A6/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03A7\\\"\\\"5\\\"7\\u03A8/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03A9\\\"\\\"5#7\\u03AA/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03AB\\\"\\\"5'7\\u03AC/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03AD\\\"\\\"5&7\\u03AE/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\x8C\\\"\\\"5$7\\x8D/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03AF\\\"\\\"5%7\\u03B0/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03B1\\\"\\\"5\\\"7\\u03B2/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03B3\\\"\\\"5&7\\u03B4/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03B5\\\"\\\"5\\\"7\\u03B6/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03B7\\\"\\\"5$7\\u03B8/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03B9\\\"\\\"5\\\"7\\u03BA/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03BB\\\"\\\"5%7\\u03BC/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03BD\\\"\\\"5%7\\u03BE/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03BF\\\"\\\"5$7\\u03C0/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03C1\\\"\\\"5)7\\u03C2/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03C3\\\"\\\"5$7\\u03C4/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03C5\\\"\\\"5&7\\u03C6/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03C7\\\"\\\"5'7\\u03C8/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03C9\\\"\\\"5%7\\u03CA/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03CB\\\"\\\"5%7\\u03CC/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03CD\\\"\\\"5$7\\u03CE/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03CF\\\"\\\"5)7\\u03D0/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03D1\\\"\\\"5*7\\u03D2/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03D3\\\"\\\"5&7\\u03D4/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03D5\\\"\\\"5'7\\u03D6/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03D7\\\"\\\"5'7\\u03D8/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03D9\\\"\\\"5&7\\u03DA/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03DB\\\"\\\"5'7\\u03DC/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03DD\\\"\\\"5(7\\u03DE/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03DF\\\"\\\"5)7\\u03E0/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03E1\\\"\\\"5%7\\u03E2/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03E3\\\"\\\"5(7\\u03E4/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03E5\\\"\\\"5#7\\u03E6/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03E7\\\"\\\"5%7\\u03E8/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03E9\\\"\\\"5)7\\u03EA/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03EB\\\"\\\"5&7\\u03EC/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03ED\\\"\\\"5#7\\u03EE/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03EF\\\"\\\"5%7\\u03F0/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03F1\\\"\\\"5$7\\u03F2/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03F3\\\"\\\"5$7\\u03F4/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03F5\\\"\\\"5%7\\u03F6/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03F7\\\"\\\"5$7\\u03F8/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03F9\\\"\\\"5)7\\u03FA/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03FB\\\"\\\"5$7\\u03FC/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03FD\\\"\\\"5\\\"7\\u03FE/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\xFB\\\"\\\"5+7\\xFC/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u03FF\\\"\\\"5'7\\u0400/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0401\\\"\\\"5%7\\u0402/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0403\\\"\\\"5&7\\u0404/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0405\\\"\\\"5&7\\u0406/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0407\\\"\\\"5%7\\u0408/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0409\\\"\\\"5&7\\u040A/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u040B\\\"\\\"5&7\\u040C/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u040D\\\"\\\"5$7\\u040E/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u040F\\\"\\\"5'7\\u0410/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0411\\\"\\\"5$7\\u0412/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0413\\\"\\\"5%7\\u0414/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0415\\\"\\\"5&7\\u0416/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0417\\\"\\\"5$7\\u0418/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%3\\u0419\\\"\\\"5'7\\u041A/8#%<;\\u01CD=.##&&!&'#/#$+\\\")(\\\"'#&'#\"),peg$decode(\"%;\\u0281/' 8!:\\u041B!! )\"),peg$decode(\";\\u01F2.\\u0353 &;\\u01F3.\\u034D &;\\u01F4.\\u0347 &;\\u01F5.\\u0341 &;\\u01F6.\\u033B &;\\u01F7.\\u0335 &;\\u01F8.\\u032F &;\\u01F9.\\u0329 &;\\u01FA.\\u0323 &;\\u01FB.\\u031D &;\\u01FC.\\u0317 &;\\u01FD.\\u0311 &;\\u01FE.\\u030B &;\\u01FF.\\u0305 &;\\u0200.\\u02FF &;\\u0201.\\u02F9 &;\\u0202.\\u02F3 &;\\u0203.\\u02ED &;\\u0204.\\u02E7 &;\\u0205.\\u02E1 &;\\u0206.\\u02DB &;\\u0207.\\u02D5 &;\\u0208.\\u02CF &;\\u0209.\\u02C9 &;\\u020A.\\u02C3 &;\\u020B.\\u02BD &;\\u020C.\\u02B7 &;\\u020D.\\u02B1 &;\\u020E.\\u02AB &;\\u020F.\\u02A5 &;\\u0210.\\u029F &;\\u0211.\\u0299 &;\\u0212.\\u0293 &;\\u0213.\\u028D &;\\u0214.\\u0287 &;\\u0215.\\u0281 &;\\u0216.\\u027B &;\\u0217.\\u0275 &;\\u0218.\\u026F &;\\u0219.\\u0269 &;\\u021A.\\u0263 &;\\u021B.\\u025D &;\\u021C.\\u0257 &;\\u021D.\\u0251 &;\\u021E.\\u024B &;\\u021F.\\u0245 &;\\u0220.\\u023F &;\\u0221.\\u0239 &;\\u0222.\\u0233 &;\\u0223.\\u022D &;\\u0224.\\u0227 &;\\u0225.\\u0221 &;\\u0226.\\u021B &;\\u0227.\\u0215 &;\\u0228.\\u020F &;\\u0229.\\u0209 &;\\u022A.\\u0203 &;\\u022B.\\u01FD &;\\u022C.\\u01F7 &;\\u022D.\\u01F1 &;\\u022E.\\u01EB &;\\u022F.\\u01E5 &;\\u0230.\\u01DF &;\\u0231.\\u01D9 &;\\u0232.\\u01D3 &;\\u0233.\\u01CD &;\\u0234.\\u01C7 &;\\u0235.\\u01C1 &;\\u0236.\\u01BB &;\\u0237.\\u01B5 &;\\u0238.\\u01AF &;\\u0239.\\u01A9 &;\\u023A.\\u01A3 &;\\u023B.\\u019D &;\\u023C.\\u0197 &;\\u023E.\\u0191 &;\\u023F.\\u018B &;\\u0240.\\u0185 &;\\u0241.\\u017F &;\\u0242.\\u0179 &;\\u0243.\\u0173 &;\\u0244.\\u016D &;\\u0245.\\u0167 &;\\u0246.\\u0161 &;\\u0247.\\u015B &;\\u0248.\\u0155 &;\\u0249.\\u014F &;\\u024A.\\u0149 &;\\u024B.\\u0143 &;\\u024C.\\u013D &;\\u024D.\\u0137 &;\\u024E.\\u0131 &;\\u024F.\\u012B &;\\u0250.\\u0125 &;\\u0251.\\u011F &;\\u0252.\\u0119 &;\\u0253.\\u0113 &;\\u0254.\\u010D &;\\u0255.\\u0107 &;\\u0256.\\u0101 &;\\u0257.\\xFB &;\\u0258.\\xF5 &;\\u0259.\\xEF &;\\u025A.\\xE9 &;\\u025B.\\xE3 &;\\u025C.\\xDD &;\\u025D.\\xD7 &;\\u025E.\\xD1 &;\\u025F.\\xCB &;\\u0260.\\xC5 &;\\u0261.\\xBF &;\\u0262.\\xB9 &;\\u0263.\\xB3 &;\\u0266.\\xAD &;\\u0267.\\xA7 &;\\u0268.\\xA1 &;\\u0269.\\x9B &;\\u026A.\\x95 &;\\u026B.\\x8F &;\\u026C.\\x89 &;\\u026E.\\x83 &;\\u026F.} &;\\u0270.w &;\\u0271.q &;\\u0272.k &;\\u0273.e &;\\u0274._ &;\\u0275.Y &;\\u0276.S &;\\u0277.M &;\\u0278.G &;\\u0279.A &;\\u027A.; &;\\u027B.5 &;\\u027C./ &;\\u027D.) &;\\u027E.# &;\\u027F\"),peg$decode(\";\\u01F4.\\u0167 &;\\u01F6.\\u0161 &;\\u01F7.\\u015B &;\\u01F9.\\u0155 &;\\u01FB.\\u014F &;\\u01FE.\\u0149 &;\\u0201.\\u0143 &;\\u0204.\\u013D &;\\u0206.\\u0137 &;\\u0207.\\u0131 &;\\u0209.\\u012B &;\\u020B.\\u0125 &;\\u020C.\\u011F &;\\u0212.\\u0119 &;\\u0213.\\u0113 &;\\u0215.\\u010D &;\\u0218.\\u0107 &;\\u0219.\\u0101 &;\\u021B.\\xFB &;\\u021D.\\xF5 &;\\u021E.\\xEF &;\\u0220.\\xE9 &;\\u0225.\\xE3 &;\\u0226.\\xDD &;\\u0229.\\xD7 &;\\u022A.\\xD1 &;\\u022F.\\xCB &;\\u0230.\\xC5 &;\\u0234.\\xBF &;\\u0236.\\xB9 &;\\u0237.\\xB3 &;\\u0238.\\xAD &;\\u0239.\\xA7 &;\\u023A.\\xA1 &;\\u0240.\\x9B &;\\u0245.\\x95 &;\\u0246.\\x8F &;\\u0248.\\x89 &;\\u024C.\\x83 &;\\u024E.} &;\\u024F.w &;\\u0255.q &;\\u025A.k &;\\u0267.e &;\\u0268._ &;\\u026C.Y &;\\u026F.S &;\\u0270.M &;\\u0271.G &;\\u0273.A &;\\u0274.; &;\\u0275.5 &;\\u0276./ &;\\u0278.) &;\\u027B.# &;\\u027C\"),peg$decode(\";\\u0284.. &%;\\u0285/& 8!:\\u041C! )\"),peg$decode(\"<%2\\u041E\\\"\\\"6\\u041E7\\u041F/\\x87#$%%<4\\u0420\\\"\\\"5!7\\u0421=.##&&!&'#/1#1\\\"\\\"5!7\\u02AE/#$+\\\")(\\\"'#&'#0M*%%<4\\u0420\\\"\\\"5!7\\u0421=.##&&!&'#/1#1\\\"\\\"5!7\\u02AE/#$+\\\")(\\\"'#&'#&/#$+\\\")(\\\"'#&'#=.\\\" 7\\u041D\"),peg$decode(\"<%;\\u0286/5#;\\u028A/,$;\\u0287/#$+#)(#'#(\\\"'#&'#=.\\\" 7\\u0422\"),peg$decode(\"2\\u0423\\\"\\\"6\\u04237\\u0424\"),peg$decode(\"2\\u0425\\\"\\\"6\\u04257\\u0426\"),peg$decode(\"$%%<;\\u0287.# &;\\u0286=.##&&!&'#/1#1\\\"\\\"5!7\\u02AE/#$+\\\")(\\\"'#&'#/P#0M*%%<;\\u0287.# &;\\u0286=.##&&!&'#/1#1\\\"\\\"5!7\\u02AE/#$+\\\")(\\\"'#&'#&&&#\"),peg$decode(\";\\u0288.# &;\\u0285\"),peg$decode(\"%;\\u0289/K#$4\\u0427\\\"\\\"5!7\\u0428.# &;\\u02890/*4\\u0427\\\"\\\"5!7\\u0428.# &;\\u0289&/#$+\\\")(\\\"'#&'#\"),peg$decode(\"<%$4\\u0427\\\"\\\"5!7\\u0428.# &;\\u02830/*4\\u0427\\\"\\\"5!7\\u0428.# &;\\u0283&/' 8!:1!! )=.\\\" 7\\u0429\"),peg$decode(\"2\\u042A\\\"\\\"6\\u042A7\\u042B\")];var peg$currPos=0;var peg$savedPos=0;var peg$posDetailsCache=[{line:1,column:1}];var peg$maxFailPos=0;var peg$maxFailExpected=[];var peg$silentFails=0;var peg$resultsCache={};var peg$ruleNames=[\"start\",\"start_streaming\",\"stmt_list\",\"semi_optional\",\"semi_required\",\"stmt_list_tail\",\"type_definition\",\"array_bounds\",\"array_bound\",\"type_definition_types\",\"datatype_custom\",\"datatype_word_tail\",\"type_definition_args\",\"definition_args_loop\",\"literal_value\",\"literal_null\",\"literal_date\",\"literal_string\",\"literal_string_single\",\"literal_string_schar\",\"literal_blob\",\"literal_typed\",\"literal_text\",\"number_sign\",\"literal_number_signed\",\"literal_number\",\"literal_number_decimal\",\"number_decimal_node\",\"number_decimal_full\",\"number_decimal_fraction\",\"number_decimal_exponent\",\"literal_number_hex\",\"number_hex\",\"number_digit\",\"bind_parameter\",\"bind_parameter_numbered\",\"bind_number_id\",\"bind_parameter_named\",\"bind_parameter_tcl\",\"tcl_suffix\",\"expression_exists\",\"expression_exists_ne\",\"expression_raise\",\"expression_raise_args\",\"raise_args_ignore\",\"raise_args_message\",\"expression_root\",\"expression_wrapped\",\"expression_recur\",\"expression_array\",\"expression_array_select\",\"array_expr\",\"array_expr_list\",\"array_expr_tail\",\"expression_unary_collate\",\"expression_pg_cast\",\"expression_unary\",\"expression_unary_op\",\"expression_collate\",\"expression_concat\",\"expression_multiply\",\"expression_multiply_op\",\"expression_add\",\"expression_add_op\",\"expression_shift\",\"expression_shift_op\",\"expression_compare\",\"expression_compare_op\",\"expression_equiv\",\"expression_equiv_tails\",\"expression_equiv_null_op\",\"expression_equiv_op\",\"expression_cast\",\"type_alias\",\"expression_case\",\"case_expression\",\"expression_case_when\",\"expression_case_else\",\"expression_postfix\",\"expression_postfix_tail\",\"expression_distinct\",\"expression_like\",\"expression_escape\",\"expression_between\",\"expression_between_tail\",\"expression_is_not\",\"expression_in\",\"expression_in_target\",\"expression_list_or_select\",\"expression_and\",\"expression\",\"expression_list\",\"expression_list_loop\",\"expression_list_rest\",\"function_call\",\"filter_clause\",\"function_call_args\",\"args_list_distinct\",\"over_clause\",\"window_name\",\"window_specification\",\"source_window_name\",\"partition_clause\",\"error_message\",\"stmt\",\"stmt_modifier\",\"modifier_query\",\"stmt_nodes\",\"stmt_commit\",\"stmt_begin\",\"commit_transaction\",\"stmt_begin_modifier\",\"stmt_rollback\",\"rollback_savepoint\",\"savepoint_name\",\"savepoint_alt\",\"stmt_savepoint\",\"stmt_release\",\"stmt_alter\",\"alter_start\",\"alter_action\",\"alter_action_rename\",\"alter_action_add\",\"action_add_modifier\",\"stmt_crud\",\"stmt_core_with\",\"clause_with\",\"clause_with_recursive\",\"clause_with_tables\",\"clause_with_loop\",\"expression_cte\",\"select_alias\",\"select_wrapped\",\"stmt_select_full\",\"stmt_set\",\"set_local_session\",\"set_rest\",\"var_list\",\"var_list_tail\",\"var_value\",\"stmt_show\",\"show_target\",\"stmt_sqlite\",\"stmt_attach\",\"attach_arg\",\"stmt_detach\",\"stmt_vacuum\",\"vacuum_target\",\"stmt_analyze\",\"analyze_arg\",\"stmt_reindex\",\"reindex_arg\",\"stmt_pragma\",\"pragma_expression\",\"pragma_value\",\"pragma_value_literal\",\"pragma_value_bool\",\"pragma_bool_id\",\"pragma_value_name\",\"stmt_crud_types\",\"stmt_select\",\"stmt_core_for_locking\",\"for_locking_items\",\"for_locking_loop\",\"for_locking_item\",\"for_locking_strength\",\"locked_rels_list\",\"id_table_list\",\"id_table_loop\",\"nowait_or_skip\",\"window_clause\",\"window_definition_list\",\"window_definition_loop\",\"window_definition\",\"stmt_core_order\",\"stmt_core_limit\",\"stmt_core_limit_offset\",\"limit_offset_variant\",\"limit_offset_variant_name\",\"select_loop\",\"select_loop_union\",\"select_parts\",\"select_parts_core\",\"select_core_select\",\"select_modifier\",\"select_modifier_distinct\",\"select_modifier_all\",\"select_target\",\"select_target_loop\",\"select_core_from\",\"stmt_core_where\",\"select_core_group\",\"select_core_having\",\"select_node\",\"select_node_star\",\"select_node_star_qualified\",\"select_node_aliased\",\"select_source\",\"source_loop_tail\",\"select_cross_clause\",\"select_join_clause\",\"table_or_sub\",\"table_or_sub_func\",\"func_alias_clause\",\"table_func_element_list\",\"table_func_element\",\"table_func_element_tail\",\"lateral\",\"table_qualified\",\"table_qualified_id\",\"table_or_sub_index_node\",\"index_node_indexed\",\"index_node_none\",\"table_or_sub_sub\",\"table_or_sub_select\",\"alias\",\"join_operator\",\"join_operator_natural\",\"join_operator_types\",\"operator_types_hand\",\"types_hand_outer\",\"operator_types_misc\",\"join_condition\",\"join_condition_on\",\"join_condition_using\",\"select_parts_values\",\"stmt_core_order_list\",\"stmt_core_order_list_loop\",\"stmt_core_order_list_item\",\"nulls_order\",\"select_star\",\"stmt_fallback_types\",\"stmt_insert\",\"returning_clause\",\"insert_keyword\",\"insert_keyword_ins\",\"insert_keyword_repl\",\"insert_keyword_mod\",\"insert_target\",\"insert_into\",\"insert_into_start\",\"insert_results\",\"opt_on_conflict\",\"opt_on_conflict_action\",\"opt_conf_expr\",\"loop_columns\",\"loop_column_tail\",\"loop_name\",\"insert_value\",\"insert_value_start\",\"insert_values_list\",\"insert_values_loop\",\"expression_list_wrapped\",\"insert_default\",\"operator_compound\",\"compound_union\",\"compound_union_all\",\"stmt_update\",\"update_start\",\"update_fallback\",\"update_set\",\"update_columns\",\"update_columns_tail\",\"update_column\",\"update_expression\",\"stmt_delete\",\"delete_start\",\"stmt_create\",\"create_start\",\"create_table_only\",\"create_index_only\",\"create_trigger_only\",\"create_view_only\",\"create_virtual_only\",\"create_table\",\"create_table_start\",\"create_core_tmp\",\"create_core_ine\",\"create_table_source\",\"table_source_def\",\"source_def_rowid\",\"source_def_loop\",\"source_def_tail\",\"source_tbl_loop\",\"source_def_column\",\"source_def_name\",\"column_type\",\"column_constraints\",\"column_constraint_tail\",\"column_constraint\",\"constraint_name\",\"constraint_name_loop\",\"column_constraint_types\",\"column_constraint_foreign\",\"column_constraint_primary\",\"col_primary_start\",\"col_primary_auto\",\"column_constraint_null\",\"constraint_null_types\",\"constraint_null_value\",\"column_constraint_check\",\"column_constraint_default\",\"column_default_values\",\"column_constraint_collate\",\"table_constraint\",\"table_constraint_types\",\"table_constraint_check\",\"table_constraint_primary\",\"primary_start\",\"primary_start_normal\",\"primary_start_unique\",\"primary_columns\",\"primary_columns_index\",\"primary_columns_table\",\"primary_column_tail\",\"primary_column\",\"primary_column_types\",\"column_collate\",\"column_collate_loop\",\"primary_column_dir\",\"primary_conflict\",\"primary_conflict_start\",\"constraint_check\",\"table_constraint_foreign\",\"foreign_start\",\"foreign_clause\",\"foreign_references\",\"foreign_actions\",\"foreign_actions_tail\",\"foreign_action\",\"foreign_action_on\",\"action_on_action\",\"on_action_set\",\"on_action_cascade\",\"on_action_none\",\"foreign_action_match\",\"foreign_deferrable\",\"deferrable_initially\",\"table_source_select\",\"create_index\",\"create_index_start\",\"index_unique\",\"index_on\",\"create_trigger\",\"create_trigger_start\",\"trigger_conditions\",\"trigger_apply_mods\",\"trigger_apply_instead\",\"trigger_do\",\"trigger_do_on\",\"trigger_do_update\",\"do_update_of\",\"do_update_columns\",\"trigger_foreach\",\"trigger_when\",\"trigger_action\",\"action_loop\",\"action_loop_stmt\",\"create_view\",\"id_view_expression\",\"create_view_start\",\"create_as_select\",\"create_virtual\",\"create_virtual_start\",\"virtual_module\",\"virtual_args\",\"virtual_args_loop\",\"virtual_args_tail\",\"virtual_arg_types\",\"virtual_column_name\",\"stmt_drop\",\"drop_start\",\"drop_types\",\"drop_ie\",\"binary_concat\",\"binary_plus\",\"binary_minus\",\"binary_multiply\",\"binary_divide\",\"binary_mod\",\"binary_left\",\"binary_right\",\"binary_and\",\"binary_or\",\"binary_lt\",\"binary_gt\",\"binary_lte\",\"binary_gte\",\"binary_equal\",\"binary_notequal_a\",\"binary_notequal_b\",\"binary_custom\",\"binary_lang_isnt\",\"id_name\",\"id_database\",\"id_function\",\"id_table\",\"id_table_qualified\",\"id_column\",\"indirection\",\"indirection_loop\",\"indirection_el\",\"indirection_attr\",\"indirection_slice\",\"indirection_index\",\"slice_lbound\",\"slice_ubound\",\"column_unqualified\",\"column_qualifiers\",\"id_column_qualified\",\"id_collation\",\"id_savepoint\",\"id_index\",\"id_trigger\",\"id_view\",\"id_pragma\",\"id_variable\",\"id_cte\",\"id_table_expression\",\"id_constraint_table\",\"id_constraint_column\",\"datatype_types\",\"datatype_text\",\"datatype_real\",\"datatype_real_double\",\"datatype_numeric\",\"datatype_integer\",\"datatype_integer_fp\",\"datatype_none\",\"name_char\",\"unicode_char\",\"name\",\"name_quoted\",\"name_unquoted\",\"name_reserved\",\"name_bracketed\",\"bracket_terminator\",\"name_dblquoted\",\"name_sglquoted\",\"name_backticked\",\"sym_bopen\",\"sym_bclose\",\"sym_popen\",\"sym_pclose\",\"sym_comma\",\"sym_dot\",\"sym_star\",\"sym_quest\",\"sym_sglquote\",\"sym_dblquote\",\"sym_backtick\",\"sym_tilde\",\"sym_plus\",\"sym_minus\",\"sym_equal\",\"sym_amp\",\"sym_pipe\",\"sym_mod\",\"sym_lt\",\"sym_gt\",\"sym_excl\",\"sym_semi\",\"sym_colon\",\"sym_fslash\",\"sym_bslash\",\"sym_op\",\"ABORT\",\"ACTION\",\"ADD\",\"AFTER\",\"ALL\",\"ALTER\",\"ANALYZE\",\"AND\",\"ARRAY\",\"AS\",\"ASC\",\"ATTACH\",\"AUTOINCREMENT\",\"BEFORE\",\"BEGIN\",\"BETWEEN\",\"BY\",\"CASCADE\",\"CASE\",\"CAST\",\"CHECK\",\"COLLATE\",\"COLUMN\",\"COMMIT\",\"CONFLICT\",\"CONSTRAINT\",\"CREATE\",\"CROSS\",\"CURRENT_DATE\",\"CURRENT_TIME\",\"CURRENT_TIMESTAMP\",\"DATABASE\",\"DEFAULT\",\"DEFERRABLE\",\"DEFERRED\",\"DELETE\",\"DESC\",\"DETACH\",\"DISTINCT\",\"DROP\",\"EACH\",\"ELSE\",\"END\",\"ESCAPE\",\"EXCEPT\",\"EXCLUSIVE\",\"EXISTS\",\"EXPLAIN\",\"FAIL\",\"FIRST\",\"FOR\",\"FOREIGN\",\"FROM\",\"FULL\",\"GLOB\",\"GROUP\",\"HAVING\",\"IF\",\"IGNORE\",\"ILIKE\",\"IMMEDIATE\",\"IN\",\"INDEX\",\"INDEXED\",\"INITIALLY\",\"INNER\",\"INSERT\",\"INSTEAD\",\"INTERSECT\",\"INTO\",\"IS\",\"ISNULL\",\"JOIN\",\"KEY\",\"LAST\",\"LATERAL\",\"LEFT\",\"LIKE\",\"LIMIT\",\"LOCKED\",\"MATCH\",\"NATURAL\",\"NO\",\"NOT\",\"NOTNULL\",\"NOWAIT\",\"NULL\",\"NULLS\",\"OF\",\"OFFSET\",\"ON\",\"ONLY\",\"OR\",\"ORDER\",\"OUTER\",\"OVER\",\"PARTITION\",\"PLAN\",\"PRAGMA\",\"PRIMARY\",\"QUERY\",\"RAISE\",\"READ\",\"RECURSIVE\",\"REFERENCES\",\"REGEXP\",\"REINDEX\",\"RELEASE\",\"RENAME\",\"REPLACE\",\"RESTRICT\",\"RETURNING\",\"RIGHT\",\"ROLLBACK\",\"ROW\",\"ROWID\",\"SAVEPOINT\",\"SELECT\",\"SET\",\"SHARE\",\"SHOW\",\"SKIP\",\"TABLE\",\"TEMP\",\"TEMPORARY\",\"THEN\",\"TO\",\"TRANSACTION\",\"TRIGGER\",\"UNION\",\"UNIQUE\",\"UPDATE\",\"USING\",\"VACUUM\",\"VALUES\",\"VIEW\",\"VIRTUAL\",\"WHEN\",\"WHERE\",\"WINDOW\",\"WITH\",\"WITHOUT\",\"reserved_words\",\"reserved_word_list\",\"reserved_critical_list\",\"comment\",\"comment_line\",\"comment_block\",\"comment_block_start\",\"comment_block_end\",\"comment_block_body\",\"block_body_nodes\",\"comment_block_feed\",\"o\",\"_TODO_\"];var peg$descNames=[null,null,null,null,null,null,\"Type Definition\",\"Array bounds\",null,null,\"Custom Datatype Name\",null,\"Type Definition Arguments\",null,null,\"Null Literal\",\"Date Literal\",\"String Literal\",\"Single-quoted String Literal\",null,\"Blob Literal\",\"Typed literal (or bind parameter)\",null,\"Number Sign\",null,null,null,\"Decimal Literal\",null,null,\"Decimal Literal Exponent\",\"Hexidecimal Literal\",null,null,\"Bind Parameter\",\"Numbered Bind Parameter\",null,\"Named Bind Parameter\",\"TCL Bind Parameter\",null,\"EXISTS Expression\",\"EXISTS Keyword\",\"RAISE Expression\",\"RAISE Expression Arguments\",\"IGNORE Keyword\",null,null,null,null,\"ARRAY expression\",\"ARRAY SELECT expression\",\"array expression\",\"multi-dimensional array expression\",null,null,\"PSQL-style cast\",null,null,\"COLLATE Expression\",null,null,null,null,null,null,null,null,null,null,null,null,null,\"CAST Expression\",\"Type Alias\",\"CASE Expression\",null,\"WHEN Clause\",\"ELSE Clause\",null,null,\"IS DISTINCT expression\",\"Comparison Expression\",\"ESCAPE Expression\",\"BETWEEN Expression\",null,null,\"IN Expression\",null,null,null,null,\"Expression List\",null,null,\"Function Call\",\"FILTER clause\",\"Function Call Arguments\",null,\"OVER clause\",\"Window name\",\"Window specification\",null,\"window partition clause\",\"Error Message\",\"Statement\",\"QUERY PLAN\",\"QUERY PLAN Keyword\",null,\"END Transaction Statement\",\"BEGIN Transaction Statement\",null,null,\"ROLLBACK Statement\",\"TO Clause\",null,null,\"SAVEPOINT Statement\",\"RELEASE Statement\",\"ALTER TABLE Statement\",\"ALTER TABLE Keyword\",null,\"RENAME TO Keyword\",\"ADD COLUMN Keyword\",null,null,\"WITH Clause\",null,null,null,null,\"Common Table Expression\",null,null,null,\"SET statement\",null,null,null,null,null,null,null,null,\"ATTACH Statement\",null,\"DETACH Statement\",\"VACUUM Statement\",null,\"ANALYZE Statement\",null,\"REINDEX Statement\",null,\"PRAGMA Statement\",null,null,null,null,null,null,null,\"SELECT Statement\",\"SELECT ... FOR locking clause\",null,null,null,null,null,null,null,null,\"WINDOW clause\",null,null,null,\"ORDER BY Clause\",\"LIMIT Clause\",\"OFFSET Clause\",null,null,null,\"Union Operation\",null,null,\"SELECT Results Clause\",\"SELECT Results Modifier\",null,null,null,null,\"FROM Clause\",\"WHERE Clause\",\"GROUP BY Clause\",\"HAVING Clause\",null,null,null,null,null,null,\"CROSS JOIN Operation\",\"JOIN Operation\",null,null,null,null,null,null,null,\"Qualified Table\",\"Qualified Table Identifier\",\"Qualfied Table Index\",null,null,\"SELECT Source\",\"Subquery\",\"Alias\",\"JOIN Operator\",null,null,null,null,null,\"JOIN Constraint\",\"Join ON Clause\",\"Join USING Clause\",\"VALUES Clause\",null,null,\"Ordering Expression\",null,\"Star\",\"Fallback Type\",\"INSERT Statement\",\"RETURNING clause\",null,\"INSERT Keyword\",\"REPLACE Keyword\",\"INSERT OR Modifier\",null,\"INTO Clause\",\"INTO Keyword\",\"VALUES Clause\",\"PostgreSQL INSERT ON CONFLICT clause\",\"PostgreSQL ON CONFLICT action\",\"PostgreSQL ON CONFLICT expression\",\"Column List\",null,\"Column Name\",\"VALUES Clause\",\"VALUES Keyword\",null,null,\"Wrapped Expression List\",\"DEFAULT VALUES Clause\",\"Compound Operator\",\"UNION Operator\",null,\"UPDATE Statement\",\"UPDATE Keyword\",\"UPDATE OR Modifier\",\"SET Clause\",null,null,\"Column Assignment\",\"UPDATE value expression\",\"DELETE Statement\",\"DELETE Keyword\",\"CREATE Statement\",null,null,null,null,null,null,\"CREATE TABLE Statement\",null,null,\"IF NOT EXISTS Modifier\",null,\"Table Definition\",null,null,null,null,\"Column Definition\",null,\"Column Datatype\",null,null,\"Column Constraint\",null,\"CONSTRAINT Name\",null,\"FOREIGN KEY Column Constraint\",\"PRIMARY KEY Column Constraint\",\"PRIMARY KEY Keyword\",\"AUTOINCREMENT Keyword\",null,\"UNIQUE Column Constraint\",\"NULL Column Constraint\",\"CHECK Column Constraint\",\"DEFAULT Column Constraint\",null,\"COLLATE Column Constraint\",\"Table Constraint\",null,\"CHECK Table Constraint\",\"PRIMARY KEY Table Constraint\",null,\"PRIMARY KEY Keyword\",\"UNIQUE Keyword\",null,null,null,null,\"Indexed Column\",null,\"Collation\",null,\"Column Direction\",null,\"ON CONFLICT Keyword\",null,\"FOREIGN KEY Table Constraint\",\"FOREIGN KEY Keyword\",null,\"REFERENCES Clause\",null,null,\"FOREIGN KEY Action Clause\",null,\"FOREIGN KEY Action\",null,null,null,null,\"DEFERRABLE Clause\",null,null,\"CREATE INDEX Statement\",null,null,\"ON Clause\",\"CREATE TRIGGER Statement\",null,\"Conditional Clause\",null,null,\"Conditional Action\",null,null,null,null,null,\"WHEN Clause\",\"Actions Clause\",null,null,\"CREATE VIEW Statement\",null,null,null,\"CREATE VIRTUAL TABLE Statement\",null,null,\"Module Arguments\",null,null,null,null,\"DROP Statement\",\"DROP Keyword\",\"DROP Type\",\"IF EXISTS Keyword\",\"Or\",\"Add\",\"Subtract\",\"Multiply\",\"Divide\",\"Modulo\",\"Shift Left\",\"Shift Right\",\"Logical AND\",\"Logical OR\",\"Less Than\",\"Greater Than\",\"Less Than Or Equal\",\"Greater Than Or Equal\",\"Equal\",\"Not Equal\",\"Not Equal\",\"PostgreSQL custom binary operarator\",\"IS\",\"Identifier\",\"Database Identifier\",\"Function Identifier\",\"Table Identifier\",null,\"Column Identifier\",\"value indirection\",null,null,null,null,null,null,null,null,null,null,\"Collation Identifier\",\"Savepoint Identifier\",\"Index Identifier\",\"Trigger Identifier\",\"View Identifier\",\"Pragma Identifier\",\"Variable Identifier\",\"CTE Identifier\",null,\"Table Constraint Identifier\",\"Column Constraint Identifier\",\"Datatype Name\",\"TEXT Datatype Name\",\"REAL Datatype Name\",\"DOUBLE Datatype Name\",\"NUMERIC Datatype Name\",\"INTEGER Datatype Name\",null,\"BLOB Datatype Name\",null,null,null,null,null,null,null,null,null,null,null,\"Open Bracket\",\"Close Bracket\",\"Open Parenthesis\",\"Close Parenthesis\",\"Comma\",\"Period\",\"Asterisk\",\"Question Mark\",\"Single Quote\",\"Double Quote\",\"Backtick\",\"Tilde\",\"Plus\",\"Minus\",\"Equal\",\"Ampersand\",\"Pipe\",\"Modulo\",\"Less Than\",\"Greater Than\",\"Exclamation\",\"Semicolon\",\"Colon\",\"Forward Slash\",\"Backslash\",\"Operator characters\",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,\"Line Comment\",\"Block Comment\",null,null,null,null,null,\"Whitespace\",null];var peg$tracer=\"tracer\"in options?options.tracer:new peg$DefaultTracer();var peg$result;if(\"startRule\"in options){if(!(options.startRule in peg$startRuleIndices)){throw new Error(\"Can't start parsing from rule \\\"\"+options.startRule+\"\\\".\");}peg$startRuleIndex=peg$startRuleIndices[options.startRule];}function text(){return input.substring(peg$savedPos,peg$currPos);}function location(){return peg$computeLocation(peg$savedPos,peg$currPos);}function expected(description,location){location=location!==undefined?location:peg$computeLocation(peg$savedPos,peg$currPos);throw peg$buildStructuredError([peg$otherExpectation(description)],input.substring(peg$savedPos,peg$currPos),location);}function error(message,location){location=location!==undefined?location:peg$computeLocation(peg$savedPos,peg$currPos);throw peg$buildSimpleError(message,location);}function peg$literalExpectation(text,ignoreCase){return{type:\"literal\",text:text,ignoreCase:ignoreCase};}function peg$classExpectation(parts,inverted,ignoreCase){return{type:\"class\",parts:parts,inverted:inverted,ignoreCase:ignoreCase};}function peg$anyExpectation(){return{type:\"any\"};}function peg$endExpectation(){return{type:\"end\"};}function peg$otherExpectation(description){return{type:\"other\",description:description};}function peg$computePosDetails(pos){var details=peg$posDetailsCache[pos];var p;if(details){return details;}else{p=pos-1;while(!peg$posDetailsCache[p]){p--;}details=peg$posDetailsCache[p];details={line:details.line,column:details.column};while(ppeg$maxFailPos){peg$maxFailPos=peg$currPos;peg$maxFailExpected=[];}peg$maxFailExpected.push(expected);}function peg$buildSimpleError(message,location){return new peg$SyntaxError(message,null,null,location);}function peg$buildStructuredError(expected,found,location){return new peg$SyntaxError(peg$SyntaxError.buildMessage(expected,found),expected,found,location);}function peg$decode(s){return s.split(\"\").map(function(ch){return ch.charCodeAt(0)-32;});}function peg$parseRule(index){var bc=peg$bytecode[index];var ip=0;var ips=[];var end=bc.length;var ends=[];var stack=[];var startPos=peg$currPos;var params;peg$tracer.trace({type:\"rule.enter\",rule:peg$ruleNames[index],description:peg$descNames[index],location:peg$computeLocation(startPos,startPos)});var key=peg$currPos*621+index;var cached=peg$resultsCache[key];if(cached){peg$currPos=cached.nextPos;if(cached.result!==peg$FAILED){peg$tracer.trace({type:\"rule.match\",rule:peg$ruleNames[index],description:peg$descNames[index],result:cached.result,location:peg$computeLocation(startPos,peg$currPos)});}else{peg$tracer.trace({type:\"rule.fail\",rule:peg$ruleNames[index],description:peg$descNames[index],location:peg$computeLocation(startPos,startPos)});}return cached.result;}while(true){while(ippeg$currPos){end=ip+3+bc[ip+1];ip+=3;}else{end=ip+3+bc[ip+1]+bc[ip+2];ip+=3+bc[ip+1];}break;case 18:ends.push(end);ips.push(ip+4+bc[ip+2]+bc[ip+3]);if(input.substr(peg$currPos,peg$consts[bc[ip+1]].length)===peg$consts[bc[ip+1]]){end=ip+4+bc[ip+2];ip+=4;}else{end=ip+4+bc[ip+2]+bc[ip+3];ip+=4+bc[ip+2];}break;case 19:ends.push(end);ips.push(ip+4+bc[ip+2]+bc[ip+3]);if(input.substr(peg$currPos,peg$consts[bc[ip+1]].length).toLowerCase()===peg$consts[bc[ip+1]]){end=ip+4+bc[ip+2];ip+=4;}else{end=ip+4+bc[ip+2]+bc[ip+3];ip+=4+bc[ip+2];}break;case 20:ends.push(end);ips.push(ip+4+bc[ip+2]+bc[ip+3]);if(peg$consts[bc[ip+1]].test(input.charAt(peg$currPos))){end=ip+4+bc[ip+2];ip+=4;}else{end=ip+4+bc[ip+2]+bc[ip+3];ip+=4+bc[ip+2];}break;case 21:stack.push(input.substr(peg$currPos,bc[ip+1]));peg$currPos+=bc[ip+1];ip+=2;break;case 22:stack.push(peg$consts[bc[ip+1]]);peg$currPos+=peg$consts[bc[ip+1]].length;ip+=2;break;case 23:stack.push(peg$FAILED);if(peg$silentFails===0){peg$fail(peg$consts[bc[ip+1]]);}ip+=2;break;case 24:peg$savedPos=stack[stack.length-1-bc[ip+1]];ip+=2;break;case 25:peg$savedPos=peg$currPos;ip++;break;case 26:params=bc.slice(ip+4,ip+4+bc[ip+3]).map(function(p){return stack[stack.length-1-p];});stack.splice(stack.length-bc[ip+2],bc[ip+2],peg$consts[bc[ip+1]].apply(null,params));ip+=4+bc[ip+3];break;case 27:stack.push(peg$parseRule(bc[ip+1]));ip+=2;break;case 28:peg$silentFails++;ip++;break;case 29:peg$silentFails--;ip++;break;default:throw new Error(\"Invalid opcode: \"+bc[ip]+\".\");}}if(ends.length>0){end=ends.pop();ip=ips.pop();}else{break;}}peg$resultsCache[key]={nextPos:peg$currPos,result:stack[0]};if(stack[0]!==peg$FAILED){peg$tracer.trace({type:\"rule.match\",rule:peg$ruleNames[index],description:peg$descNames[index],result:stack[0],location:peg$computeLocation(startPos,peg$currPos)});}else{peg$tracer.trace({type:\"rule.fail\",rule:peg$ruleNames[index],description:peg$descNames[index],location:peg$computeLocation(startPos,startPos)});}return stack[0];}function makeArray(arr){if(!isOkay(arr)){return[];}return!Array.isArray(arr)?[arr]:arr;}function makeInteger(literal){return Number.parseInt(literal.value);}function isOkay(obj){return obj!=null;}function foldString(parts){var glue=arguments.length>1&&arguments[1]!==undefined?arguments[1]:' ';var folded=parts.filter(function(part){return isOkay(part);}).reduce(function(prev,cur){return\"\"+prev+nodeToString(cur)+glue;},'');return folded.trim();}function foldStringWord(parts){return foldString(parts,'');}function foldStringKey(parts){return foldString(parts).toLowerCase();}function flattenAll(arr){return arr.filter(function(part){return isOkay(part);}).reduce(function(prev,cur){return prev.concat(cur);},[]);}function unescape(str){var quoteChar=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'\\'';var re=new RegExp(quoteChar+\"{2}\",'g');return nodeToString(str).replace(re,quoteChar);}function nodeToString(){var node=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];return makeArray(node).join('');}function textNode(node){return nodeToString(node).trim();}function keyNode(node){return textNode(node).toLowerCase();}function isArrayOkay(arr){return Array.isArray(arr)&&arr.length>0&&isOkay(arr[0]);}function composeBinary(first,rest){return rest.reduce(function(left,_ref7){var _ref8=_slicedToArray(_ref7,4),x=_ref8[0],operation=_ref8[1],y=_ref8[2],right=_ref8[3];return{'type':'expression','format':'binary','variant':'operation','operation':keyNode(operation),'left':left,'right':right};},first);}peg$result=peg$parseRule(peg$startRuleIndex);if(peg$result!==peg$FAILED&&peg$currPos===input.length){return peg$result;}else{if(peg$result!==peg$FAILED&&peg$currPos=0;i-=1){if(func(arr[i])){return i;}}return-1;}function takeWhile(arr,func){var len=arr.length;var i=0;for(;i1){return false;}if(!deep){if(elem.indentation>bestNode.indentation){bestNode=elem;}else{deep=true;}}else if(/^(stmt)$/i.test(elem.rule)){deep=true;return true;}return true;});if(chain.length){location=bestNode.location;firstNode=chain.find(function(elem){return that.firstNodeRule.test(elem.description)&&elem.description!==bestNode.description&&elem.indentation!==bestNode.indentation;});if(firstNode!=null){if(this.statementRule.test(bestNode.description)&&this.statementRule.test(firstNode.description)){chainDetail=firstNode.description;}else{chainDetail=bestNode.description+' ('+firstNode.description+')';}}else{chainDetail=bestNode.description;}message='Syntax error found near '+chainDetail;Object.assign(err,{'message':message,'location':location});}return err;};return Tracer;}();\n\n},{}]},{},[1])(1)\n});\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\n/**\n * Constants for token types\n */\nvar _default = {\n WORD: 'word',\n STRING: 'string',\n RESERVED: 'reserved',\n RESERVED_TOP_LEVEL: 'reserved-top-level',\n RESERVED_TOP_LEVEL_NO_INDENT: 'reserved-top-level-no-indent',\n RESERVED_NEWLINE: 'reserved-newline',\n OPERATOR: 'operator',\n OPEN_PAREN: 'open-paren',\n CLOSE_PAREN: 'close-paren',\n LINE_COMMENT: 'line-comment',\n BLOCK_COMMENT: 'block-comment',\n NUMBER: 'number',\n PLACEHOLDER: 'placeholder'\n};\nexports[\"default\"] = _default;\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.sortByLengthDesc = exports.escapeRegExp = exports.isEmpty = exports.last = exports.trimSpacesEnd = void 0;\n\n// Only removes spaces, not newlines\nvar trimSpacesEnd = function trimSpacesEnd(str) {\n return str.replace(/[\\t ]+$/, '');\n}; // Last element from array\n\n\nexports.trimSpacesEnd = trimSpacesEnd;\n\nvar last = function last(arr) {\n return arr[arr.length - 1];\n}; // True array is empty, or it's not an array at all\n\n\nexports.last = last;\n\nvar isEmpty = function isEmpty(arr) {\n return !Array.isArray(arr) || arr.length === 0;\n}; // Escapes regex special chars\n\n\nexports.isEmpty = isEmpty;\n\nvar escapeRegExp = function escapeRegExp(string) {\n return string.replace(/[\\$\\(-\\+\\.\\?\\[-\\^\\{-\\}]/g, '\\\\$&');\n}; // Sorts strings by length, so that longer ones are first\n// Also sorts alphabetically after sorting by length.\n\n\nexports.escapeRegExp = escapeRegExp;\n\nvar sortByLengthDesc = function sortByLengthDesc(strings) {\n return strings.sort(function (a, b) {\n return b.length - a.length || a.localeCompare(b);\n });\n};\n\nexports.sortByLengthDesc = sortByLengthDesc;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _utils = require(\"../utils\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar INDENT_TYPE_TOP_LEVEL = 'top-level';\nvar INDENT_TYPE_BLOCK_LEVEL = 'block-level';\n/**\n * Manages indentation levels.\n *\n * There are two types of indentation levels:\n *\n * - BLOCK_LEVEL : increased by open-parenthesis\n * - TOP_LEVEL : increased by RESERVED_TOP_LEVEL words\n */\n\nvar Indentation = /*#__PURE__*/function () {\n /**\n * @param {String} indent Indent value, default is \" \" (2 spaces)\n */\n function Indentation(indent) {\n _classCallCheck(this, Indentation);\n\n this.indent = indent || ' ';\n this.indentTypes = [];\n }\n /**\n * Returns current indentation string.\n * @return {String}\n */\n\n\n _createClass(Indentation, [{\n key: \"getIndent\",\n value: function getIndent() {\n return this.indent.repeat(this.indentTypes.length);\n }\n /**\n * Increases indentation by one top-level indent.\n */\n\n }, {\n key: \"increaseTopLevel\",\n value: function increaseTopLevel() {\n this.indentTypes.push(INDENT_TYPE_TOP_LEVEL);\n }\n /**\n * Increases indentation by one block-level indent.\n */\n\n }, {\n key: \"increaseBlockLevel\",\n value: function increaseBlockLevel() {\n this.indentTypes.push(INDENT_TYPE_BLOCK_LEVEL);\n }\n /**\n * Decreases indentation by one top-level indent.\n * Does nothing when the previous indent is not top-level.\n */\n\n }, {\n key: \"decreaseTopLevel\",\n value: function decreaseTopLevel() {\n if (this.indentTypes.length > 0 && (0, _utils.last)(this.indentTypes) === INDENT_TYPE_TOP_LEVEL) {\n this.indentTypes.pop();\n }\n }\n /**\n * Decreases indentation by one block-level indent.\n * If there are top-level indents within the block-level indent,\n * throws away these as well.\n */\n\n }, {\n key: \"decreaseBlockLevel\",\n value: function decreaseBlockLevel() {\n while (this.indentTypes.length > 0) {\n var type = this.indentTypes.pop();\n\n if (type !== INDENT_TYPE_TOP_LEVEL) {\n break;\n }\n }\n }\n }, {\n key: \"resetIndentation\",\n value: function resetIndentation() {\n this.indentTypes = [];\n }\n }]);\n\n return Indentation;\n}();\n\nexports[\"default\"] = Indentation;\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _tokenTypes = _interopRequireDefault(require(\"./tokenTypes\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar INLINE_MAX_LENGTH = 50;\n/**\n * Bookkeeper for inline blocks.\n *\n * Inline blocks are parenthized expressions that are shorter than INLINE_MAX_LENGTH.\n * These blocks are formatted on a single line, unlike longer parenthized\n * expressions where open-parenthesis causes newline and increase of indentation.\n */\n\nvar InlineBlock = /*#__PURE__*/function () {\n function InlineBlock() {\n _classCallCheck(this, InlineBlock);\n\n this.level = 0;\n }\n /**\n * Begins inline block when lookahead through upcoming tokens determines\n * that the block would be smaller than INLINE_MAX_LENGTH.\n * @param {Object[]} tokens Array of all tokens\n * @param {Number} index Current token position\n */\n\n\n _createClass(InlineBlock, [{\n key: \"beginIfPossible\",\n value: function beginIfPossible(tokens, index) {\n if (this.level === 0 && this.isInlineBlock(tokens, index)) {\n this.level = 1;\n } else if (this.level > 0) {\n this.level++;\n } else {\n this.level = 0;\n }\n }\n /**\n * Finishes current inline block.\n * There might be several nested ones.\n */\n\n }, {\n key: \"end\",\n value: function end() {\n this.level--;\n }\n /**\n * True when inside an inline block\n * @return {Boolean}\n */\n\n }, {\n key: \"isActive\",\n value: function isActive() {\n return this.level > 0;\n } // Check if this should be an inline parentheses block\n // Examples are \"NOW()\", \"COUNT(*)\", \"int(10)\", key(`somecolumn`), DECIMAL(7,2)\n\n }, {\n key: \"isInlineBlock\",\n value: function isInlineBlock(tokens, index) {\n var length = 0;\n var level = 0;\n\n for (var i = index; i < tokens.length; i++) {\n var token = tokens[i];\n length += token.value.length; // Overran max length\n\n if (length > INLINE_MAX_LENGTH) {\n return false;\n }\n\n if (token.type === _tokenTypes[\"default\"].OPEN_PAREN) {\n level++;\n } else if (token.type === _tokenTypes[\"default\"].CLOSE_PAREN) {\n level--;\n\n if (level === 0) {\n return true;\n }\n }\n\n if (this.isForbiddenToken(token)) {\n return false;\n }\n }\n\n return false;\n } // Reserved words that cause newlines, comments and semicolons\n // are not allowed inside inline parentheses block\n\n }, {\n key: \"isForbiddenToken\",\n value: function isForbiddenToken(_ref) {\n var type = _ref.type,\n value = _ref.value;\n return type === _tokenTypes[\"default\"].RESERVED_TOP_LEVEL || type === _tokenTypes[\"default\"].RESERVED_NEWLINE || type === _tokenTypes[\"default\"].COMMENT || type === _tokenTypes[\"default\"].BLOCK_COMMENT || value === ';';\n }\n }]);\n\n return InlineBlock;\n}();\n\nexports[\"default\"] = InlineBlock;\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/**\n * Handles placeholder replacement with given params.\n */\nvar Params = /*#__PURE__*/function () {\n /**\n * @param {Object} params\n */\n function Params(params) {\n _classCallCheck(this, Params);\n\n this.params = params;\n this.index = 0;\n }\n /**\n * Returns param value that matches given placeholder with param key.\n * @param {Object} token\n * @param {String} token.key Placeholder key\n * @param {String} token.value Placeholder value\n * @return {String} param or token.value when params are missing\n */\n\n\n _createClass(Params, [{\n key: \"get\",\n value: function get(_ref) {\n var key = _ref.key,\n value = _ref.value;\n\n if (!this.params) {\n return value;\n }\n\n if (key) {\n return this.params[key];\n }\n\n return this.params[this.index++];\n }\n }]);\n\n return Params;\n}();\n\nexports[\"default\"] = Params;\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isEnd = exports.isWindow = exports.isBy = exports.isSet = exports.isLimit = exports.isBetween = exports.isAnd = void 0;\n\nvar _tokenTypes = _interopRequireDefault(require(\"./tokenTypes\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nvar isToken = function isToken(type, regex) {\n return function (token) {\n return (token === null || token === void 0 ? void 0 : token.type) === type && regex.test(token === null || token === void 0 ? void 0 : token.value);\n };\n};\n\nvar isAnd = isToken(_tokenTypes[\"default\"].RESERVED_NEWLINE, /^AND$/i);\nexports.isAnd = isAnd;\nvar isBetween = isToken(_tokenTypes[\"default\"].RESERVED, /^BETWEEN$/i);\nexports.isBetween = isBetween;\nvar isLimit = isToken(_tokenTypes[\"default\"].RESERVED_TOP_LEVEL, /^LIMIT$/i);\nexports.isLimit = isLimit;\nvar isSet = isToken(_tokenTypes[\"default\"].RESERVED_TOP_LEVEL, /^[S\\u017F]ET$/i);\nexports.isSet = isSet;\nvar isBy = isToken(_tokenTypes[\"default\"].RESERVED, /^BY$/i);\nexports.isBy = isBy;\nvar isWindow = isToken(_tokenTypes[\"default\"].RESERVED_TOP_LEVEL, /^WINDOW$/i);\nexports.isWindow = isWindow;\nvar isEnd = isToken(_tokenTypes[\"default\"].CLOSE_PAREN, /^END$/i);\nexports.isEnd = isEnd;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _tokenTypes = _interopRequireDefault(require(\"./tokenTypes\"));\n\nvar _Indentation = _interopRequireDefault(require(\"./Indentation\"));\n\nvar _InlineBlock = _interopRequireDefault(require(\"./InlineBlock\"));\n\nvar _Params = _interopRequireDefault(require(\"./Params\"));\n\nvar _utils = require(\"../utils\");\n\nvar _token = require(\"./token\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar Formatter = /*#__PURE__*/function () {\n /**\n * @param {Object} cfg\n * @param {String} cfg.language\n * @param {String} cfg.indent\n * @param {Boolean} cfg.uppercase\n * @param {Integer} cfg.linesBetweenQueries\n * @param {Object} cfg.params\n */\n function Formatter(cfg) {\n _classCallCheck(this, Formatter);\n\n this.cfg = cfg;\n this.indentation = new _Indentation[\"default\"](this.cfg.indent);\n this.inlineBlock = new _InlineBlock[\"default\"]();\n this.params = new _Params[\"default\"](this.cfg.params);\n this.previousReservedToken = {};\n this.tokens = [];\n this.index = 0;\n }\n /**\n * SQL Tokenizer for this formatter, provided by subclasses.\n */\n\n\n _createClass(Formatter, [{\n key: \"tokenizer\",\n value: function tokenizer() {\n throw new Error('tokenizer() not implemented by subclass');\n }\n /**\n * Reprocess and modify a token based on parsed context.\n *\n * @param {Object} token The token to modify\n * @param {String} token.type\n * @param {String} token.value\n * @return {Object} new token or the original\n * @return {String} token.type\n * @return {String} token.value\n */\n\n }, {\n key: \"tokenOverride\",\n value: function tokenOverride(token) {\n // subclasses can override this to modify tokens during formatting\n return token;\n }\n /**\n * Formats whitespace in a SQL string to make it easier to read.\n *\n * @param {String} query The SQL query string\n * @return {String} formatted query\n */\n\n }, {\n key: \"format\",\n value: function format(query) {\n this.tokens = this.tokenizer().tokenize(query);\n var formattedQuery = this.getFormattedQueryFromTokens();\n return formattedQuery.trim();\n }\n }, {\n key: \"getFormattedQueryFromTokens\",\n value: function getFormattedQueryFromTokens() {\n var _this = this;\n\n var formattedQuery = '';\n this.tokens.forEach(function (token, index) {\n _this.index = index;\n token = _this.tokenOverride(token);\n\n if (token.type === _tokenTypes[\"default\"].LINE_COMMENT) {\n formattedQuery = _this.formatLineComment(token, formattedQuery);\n } else if (token.type === _tokenTypes[\"default\"].BLOCK_COMMENT) {\n formattedQuery = _this.formatBlockComment(token, formattedQuery);\n } else if (token.type === _tokenTypes[\"default\"].RESERVED_TOP_LEVEL) {\n formattedQuery = _this.formatTopLevelReservedWord(token, formattedQuery);\n _this.previousReservedToken = token;\n } else if (token.type === _tokenTypes[\"default\"].RESERVED_TOP_LEVEL_NO_INDENT) {\n formattedQuery = _this.formatTopLevelReservedWordNoIndent(token, formattedQuery);\n _this.previousReservedToken = token;\n } else if (token.type === _tokenTypes[\"default\"].RESERVED_NEWLINE) {\n formattedQuery = _this.formatNewlineReservedWord(token, formattedQuery);\n _this.previousReservedToken = token;\n } else if (token.type === _tokenTypes[\"default\"].RESERVED) {\n formattedQuery = _this.formatWithSpaces(token, formattedQuery);\n _this.previousReservedToken = token;\n } else if (token.type === _tokenTypes[\"default\"].OPEN_PAREN) {\n formattedQuery = _this.formatOpeningParentheses(token, formattedQuery);\n } else if (token.type === _tokenTypes[\"default\"].CLOSE_PAREN) {\n formattedQuery = _this.formatClosingParentheses(token, formattedQuery);\n } else if (token.type === _tokenTypes[\"default\"].PLACEHOLDER) {\n formattedQuery = _this.formatPlaceholder(token, formattedQuery);\n } else if (token.value === ',') {\n formattedQuery = _this.formatComma(token, formattedQuery);\n } else if (token.value === ':') {\n formattedQuery = _this.formatWithSpaceAfter(token, formattedQuery);\n } else if (token.value === '.') {\n formattedQuery = _this.formatWithoutSpaces(token, formattedQuery);\n } else if (token.value === ';') {\n formattedQuery = _this.formatQuerySeparator(token, formattedQuery);\n } else {\n formattedQuery = _this.formatWithSpaces(token, formattedQuery);\n }\n });\n return formattedQuery;\n }\n }, {\n key: \"formatLineComment\",\n value: function formatLineComment(token, query) {\n return this.addNewline(query + this.show(token));\n }\n }, {\n key: \"formatBlockComment\",\n value: function formatBlockComment(token, query) {\n return this.addNewline(this.addNewline(query) + this.indentComment(token.value));\n }\n }, {\n key: \"indentComment\",\n value: function indentComment(comment) {\n return comment.replace(/\\n[\\t ]*/g, '\\n' + this.indentation.getIndent() + ' ');\n }\n }, {\n key: \"formatTopLevelReservedWordNoIndent\",\n value: function formatTopLevelReservedWordNoIndent(token, query) {\n this.indentation.decreaseTopLevel();\n query = this.addNewline(query) + this.equalizeWhitespace(this.show(token));\n return this.addNewline(query);\n }\n }, {\n key: \"formatTopLevelReservedWord\",\n value: function formatTopLevelReservedWord(token, query) {\n this.indentation.decreaseTopLevel();\n query = this.addNewline(query);\n this.indentation.increaseTopLevel();\n query += this.equalizeWhitespace(this.show(token));\n return this.addNewline(query);\n }\n }, {\n key: \"formatNewlineReservedWord\",\n value: function formatNewlineReservedWord(token, query) {\n if ((0, _token.isAnd)(token) && (0, _token.isBetween)(this.tokenLookBehind(2))) {\n return this.formatWithSpaces(token, query);\n }\n\n return this.addNewline(query) + this.equalizeWhitespace(this.show(token)) + ' ';\n } // Replace any sequence of whitespace characters with single space\n\n }, {\n key: \"equalizeWhitespace\",\n value: function equalizeWhitespace(string) {\n return string.replace(/[\\t-\\r \\xA0\\u1680\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000\\uFEFF]+/g, ' ');\n } // Opening parentheses increase the block indent level and start a new line\n\n }, {\n key: \"formatOpeningParentheses\",\n value: function formatOpeningParentheses(token, query) {\n var _preserveWhitespaceFo, _this$tokenLookBehind;\n\n // Take out the preceding space unless there was whitespace there in the original query\n // or another opening parens or line comment\n var preserveWhitespaceFor = (_preserveWhitespaceFo = {}, _defineProperty(_preserveWhitespaceFo, _tokenTypes[\"default\"].OPEN_PAREN, true), _defineProperty(_preserveWhitespaceFo, _tokenTypes[\"default\"].LINE_COMMENT, true), _defineProperty(_preserveWhitespaceFo, _tokenTypes[\"default\"].OPERATOR, true), _preserveWhitespaceFo);\n\n if (token.whitespaceBefore.length === 0 && !preserveWhitespaceFor[(_this$tokenLookBehind = this.tokenLookBehind()) === null || _this$tokenLookBehind === void 0 ? void 0 : _this$tokenLookBehind.type]) {\n query = (0, _utils.trimSpacesEnd)(query);\n }\n\n query += this.show(token);\n this.inlineBlock.beginIfPossible(this.tokens, this.index);\n\n if (!this.inlineBlock.isActive()) {\n this.indentation.increaseBlockLevel();\n query = this.addNewline(query);\n }\n\n return query;\n } // Closing parentheses decrease the block indent level\n\n }, {\n key: \"formatClosingParentheses\",\n value: function formatClosingParentheses(token, query) {\n if (this.inlineBlock.isActive()) {\n this.inlineBlock.end();\n return this.formatWithSpaceAfter(token, query);\n } else {\n this.indentation.decreaseBlockLevel();\n return this.formatWithSpaces(token, this.addNewline(query));\n }\n }\n }, {\n key: \"formatPlaceholder\",\n value: function formatPlaceholder(token, query) {\n return query + this.params.get(token) + ' ';\n } // Commas start a new line (unless within inline parentheses or SQL \"LIMIT\" clause)\n\n }, {\n key: \"formatComma\",\n value: function formatComma(token, query) {\n query = (0, _utils.trimSpacesEnd)(query) + this.show(token) + ' ';\n\n if (this.inlineBlock.isActive()) {\n return query;\n } else if ((0, _token.isLimit)(this.previousReservedToken)) {\n return query;\n } else {\n return this.addNewline(query);\n }\n }\n }, {\n key: \"formatWithSpaceAfter\",\n value: function formatWithSpaceAfter(token, query) {\n return (0, _utils.trimSpacesEnd)(query) + this.show(token) + ' ';\n }\n }, {\n key: \"formatWithoutSpaces\",\n value: function formatWithoutSpaces(token, query) {\n return (0, _utils.trimSpacesEnd)(query) + this.show(token);\n }\n }, {\n key: \"formatWithSpaces\",\n value: function formatWithSpaces(token, query) {\n return query + this.show(token) + ' ';\n }\n }, {\n key: \"formatQuerySeparator\",\n value: function formatQuerySeparator(token, query) {\n this.indentation.resetIndentation();\n return (0, _utils.trimSpacesEnd)(query) + this.show(token) + '\\n'.repeat(this.cfg.linesBetweenQueries || 1);\n } // Converts token to string (uppercasing it if needed)\n\n }, {\n key: \"show\",\n value: function show(_ref) {\n var type = _ref.type,\n value = _ref.value;\n\n if (this.cfg.uppercase && (type === _tokenTypes[\"default\"].RESERVED || type === _tokenTypes[\"default\"].RESERVED_TOP_LEVEL || type === _tokenTypes[\"default\"].RESERVED_TOP_LEVEL_NO_INDENT || type === _tokenTypes[\"default\"].RESERVED_NEWLINE || type === _tokenTypes[\"default\"].OPEN_PAREN || type === _tokenTypes[\"default\"].CLOSE_PAREN)) {\n return value.toUpperCase();\n } else {\n return value;\n }\n }\n }, {\n key: \"addNewline\",\n value: function addNewline(query) {\n query = (0, _utils.trimSpacesEnd)(query);\n\n if (!query.endsWith('\\n')) {\n query += '\\n';\n }\n\n return query + this.indentation.getIndent();\n }\n }, {\n key: \"tokenLookBehind\",\n value: function tokenLookBehind() {\n var n = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;\n return this.tokens[this.index - n];\n }\n }, {\n key: \"tokenLookAhead\",\n value: function tokenLookAhead() {\n var n = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;\n return this.tokens[this.index + n];\n }\n }]);\n\n return Formatter;\n}();\n\nexports[\"default\"] = Formatter;\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.createOperatorRegex = createOperatorRegex;\nexports.createLineCommentRegex = createLineCommentRegex;\nexports.createReservedWordRegex = createReservedWordRegex;\nexports.createWordRegex = createWordRegex;\nexports.createStringRegex = createStringRegex;\nexports.createStringPattern = createStringPattern;\nexports.createParenRegex = createParenRegex;\nexports.createPlaceholderRegex = createPlaceholderRegex;\n\nvar _utils = require(\"../utils\");\n\nfunction createOperatorRegex(multiLetterOperators) {\n return new RegExp(\"^(\".concat((0, _utils.sortByLengthDesc)(multiLetterOperators).map(_utils.escapeRegExp).join('|'), \"|.)\"), 'u');\n}\n\nfunction createLineCommentRegex(lineCommentTypes) {\n return new RegExp(\"^((?:\".concat(lineCommentTypes.map(function (c) {\n return (0, _utils.escapeRegExp)(c);\n }).join('|'), \").*?)(?:\\r\\n|\\r|\\n|$)\"), 'u');\n}\n\nfunction createReservedWordRegex(reservedWords) {\n if (reservedWords.length === 0) {\n return new RegExp(\"^\\b$\", 'u');\n }\n\n var reservedWordsPattern = (0, _utils.sortByLengthDesc)(reservedWords).join('|').replace(/ /g, '\\\\s+');\n return new RegExp(\"^(\".concat(reservedWordsPattern, \")\\\\b\"), 'iu');\n}\n\nfunction createWordRegex() {\n var specialChars = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n return new RegExp(\"^([\\\\p{Alphabetic}\\\\p{Mark}\\\\p{Decimal_Number}\\\\p{Connector_Punctuation}\\\\p{Join_Control}\".concat(specialChars.join(''), \"]+)\"), 'u');\n}\n\nfunction createStringRegex(stringTypes) {\n return new RegExp('^(' + createStringPattern(stringTypes) + ')', 'u');\n} // This enables the following string patterns:\n// 1. backtick quoted string using `` to escape\n// 2. square bracket quoted string (SQL Server) using ]] to escape\n// 3. double quoted string using \"\" or \\\" to escape\n// 4. single quoted string using '' or \\' to escape\n// 5. national character quoted string using N'' or N\\' to escape\n// 6. Unicode single-quoted string using \\' to escape\n// 7. Unicode double-quoted string using \\\" to escape\n// 8. PostgreSQL dollar-quoted strings\n\n\nfunction createStringPattern(stringTypes) {\n var patterns = {\n '``': '((`[^`]*($|`))+)',\n '{}': '((\\\\{[^\\\\}]*($|\\\\}))+)',\n '[]': '((\\\\[[^\\\\]]*($|\\\\]))(\\\\][^\\\\]]*($|\\\\]))*)',\n '\"\"': '((\"[^\"\\\\\\\\]*(?:\\\\\\\\.[^\"\\\\\\\\]*)*(\"|$))+)',\n \"''\": \"(('[^'\\\\\\\\]*(?:\\\\\\\\.[^'\\\\\\\\]*)*('|$))+)\",\n \"N''\": \"((N'[^'\\\\\\\\]*(?:\\\\\\\\.[^'\\\\\\\\]*)*('|$))+)\",\n \"U&''\": \"((U&'[^'\\\\\\\\]*(?:\\\\\\\\.[^'\\\\\\\\]*)*('|$))+)\",\n 'U&\"\"': '((U&\"[^\"\\\\\\\\]*(?:\\\\\\\\.[^\"\\\\\\\\]*)*(\"|$))+)',\n $$: '((?\\\\$\\\\w*\\\\$)[\\\\s\\\\S]*?(?:\\\\k|$))'\n };\n return stringTypes.map(function (t) {\n return patterns[t];\n }).join('|');\n}\n\nfunction createParenRegex(parens) {\n return new RegExp('^(' + parens.map(escapeParen).join('|') + ')', 'iu');\n}\n\nfunction escapeParen(paren) {\n if (paren.length === 1) {\n // A single punctuation character\n return (0, _utils.escapeRegExp)(paren);\n } else {\n // longer word\n return '\\\\b' + paren + '\\\\b';\n }\n}\n\nfunction createPlaceholderRegex(types, pattern) {\n if ((0, _utils.isEmpty)(types)) {\n return false;\n }\n\n var typesRegex = types.map(_utils.escapeRegExp).join('|');\n return new RegExp(\"^((?:\".concat(typesRegex, \")(?:\").concat(pattern, \"))\"), 'u');\n}","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _tokenTypes = _interopRequireDefault(require(\"./tokenTypes\"));\n\nvar regexFactory = _interopRequireWildcard(require(\"./regexFactory\"));\n\nvar _utils = require(\"../utils\");\n\nfunction _getRequireWildcardCache() { if (typeof WeakMap !== \"function\") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { \"default\": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj[\"default\"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar Tokenizer = /*#__PURE__*/function () {\n /**\n * @param {Object} cfg\n * @param {String[]} cfg.reservedWords Reserved words in SQL\n * @param {String[]} cfg.reservedTopLevelWords Words that are set to new line separately\n * @param {String[]} cfg.reservedNewlineWords Words that are set to newline\n * @param {String[]} cfg.reservedTopLevelWordsNoIndent Words that are top level but have no indentation\n * @param {String[]} cfg.stringTypes String types to enable: \"\", '', ``, [], N''\n * @param {String[]} cfg.openParens Opening parentheses to enable, like (, [\n * @param {String[]} cfg.closeParens Closing parentheses to enable, like ), ]\n * @param {String[]} cfg.indexedPlaceholderTypes Prefixes for indexed placeholders, like ?\n * @param {String[]} cfg.namedPlaceholderTypes Prefixes for named placeholders, like @ and :\n * @param {String[]} cfg.lineCommentTypes Line comments to enable, like # and --\n * @param {String[]} cfg.specialWordChars Special chars that can be found inside of words, like @ and #\n * @param {String[]} [cfg.operator] Additional operators to recognize\n */\n function Tokenizer(cfg) {\n _classCallCheck(this, Tokenizer);\n\n this.WHITESPACE_REGEX = /^([\\t-\\r \\xA0\\u1680\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000\\uFEFF]+)/;\n this.NUMBER_REGEX = /^((\\x2D[\\t-\\r \\xA0\\u1680\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000\\uFEFF]*)?[0-9]+(\\.[0-9]+)?([Ee]\\x2D?[0-9]+(\\.[0-9]+)?)?|0x[0-9A-Fa-f]+|0b[01]+)\\b/;\n this.OPERATOR_REGEX = regexFactory.createOperatorRegex(['<>', '<=', '>='].concat(_toConsumableArray(cfg.operators || [])));\n this.BLOCK_COMMENT_REGEX = /^(\\/\\*(?:(?![])[\\s\\S])*?(?:\\*\\/|$))/;\n this.LINE_COMMENT_REGEX = regexFactory.createLineCommentRegex(cfg.lineCommentTypes);\n this.RESERVED_TOP_LEVEL_REGEX = regexFactory.createReservedWordRegex(cfg.reservedTopLevelWords);\n this.RESERVED_TOP_LEVEL_NO_INDENT_REGEX = regexFactory.createReservedWordRegex(cfg.reservedTopLevelWordsNoIndent);\n this.RESERVED_NEWLINE_REGEX = regexFactory.createReservedWordRegex(cfg.reservedNewlineWords);\n this.RESERVED_PLAIN_REGEX = regexFactory.createReservedWordRegex(cfg.reservedWords);\n this.WORD_REGEX = regexFactory.createWordRegex(cfg.specialWordChars);\n this.STRING_REGEX = regexFactory.createStringRegex(cfg.stringTypes);\n this.OPEN_PAREN_REGEX = regexFactory.createParenRegex(cfg.openParens);\n this.CLOSE_PAREN_REGEX = regexFactory.createParenRegex(cfg.closeParens);\n this.INDEXED_PLACEHOLDER_REGEX = regexFactory.createPlaceholderRegex(cfg.indexedPlaceholderTypes, '[0-9]*');\n this.IDENT_NAMED_PLACEHOLDER_REGEX = regexFactory.createPlaceholderRegex(cfg.namedPlaceholderTypes, '[a-zA-Z0-9._$]+');\n this.STRING_NAMED_PLACEHOLDER_REGEX = regexFactory.createPlaceholderRegex(cfg.namedPlaceholderTypes, regexFactory.createStringPattern(cfg.stringTypes));\n }\n /**\n * Takes a SQL string and breaks it into tokens.\n * Each token is an object with type and value.\n *\n * @param {String} input The SQL string\n * @return {Object[]} tokens An array of tokens.\n * @return {String} token.type\n * @return {String} token.value\n * @return {String} token.whitespaceBefore Preceding whitespace\n */\n\n\n _createClass(Tokenizer, [{\n key: \"tokenize\",\n value: function tokenize(input) {\n var tokens = [];\n var token; // Keep processing the string until it is empty\n\n while (input.length) {\n // grab any preceding whitespace\n var whitespaceBefore = this.getWhitespace(input);\n input = input.substring(whitespaceBefore.length);\n\n if (input.length) {\n // Get the next token and the token type\n token = this.getNextToken(input, token); // Advance the string\n\n input = input.substring(token.value.length);\n tokens.push(_objectSpread(_objectSpread({}, token), {}, {\n whitespaceBefore: whitespaceBefore\n }));\n }\n }\n\n return tokens;\n }\n }, {\n key: \"getWhitespace\",\n value: function getWhitespace(input) {\n var matches = input.match(this.WHITESPACE_REGEX);\n return matches ? matches[1] : '';\n }\n }, {\n key: \"getNextToken\",\n value: function getNextToken(input, previousToken) {\n return this.getCommentToken(input) || this.getStringToken(input) || this.getOpenParenToken(input) || this.getCloseParenToken(input) || this.getPlaceholderToken(input) || this.getNumberToken(input) || this.getReservedWordToken(input, previousToken) || this.getWordToken(input) || this.getOperatorToken(input);\n }\n }, {\n key: \"getCommentToken\",\n value: function getCommentToken(input) {\n return this.getLineCommentToken(input) || this.getBlockCommentToken(input);\n }\n }, {\n key: \"getLineCommentToken\",\n value: function getLineCommentToken(input) {\n return this.getTokenOnFirstMatch({\n input: input,\n type: _tokenTypes[\"default\"].LINE_COMMENT,\n regex: this.LINE_COMMENT_REGEX\n });\n }\n }, {\n key: \"getBlockCommentToken\",\n value: function getBlockCommentToken(input) {\n return this.getTokenOnFirstMatch({\n input: input,\n type: _tokenTypes[\"default\"].BLOCK_COMMENT,\n regex: this.BLOCK_COMMENT_REGEX\n });\n }\n }, {\n key: \"getStringToken\",\n value: function getStringToken(input) {\n return this.getTokenOnFirstMatch({\n input: input,\n type: _tokenTypes[\"default\"].STRING,\n regex: this.STRING_REGEX\n });\n }\n }, {\n key: \"getOpenParenToken\",\n value: function getOpenParenToken(input) {\n return this.getTokenOnFirstMatch({\n input: input,\n type: _tokenTypes[\"default\"].OPEN_PAREN,\n regex: this.OPEN_PAREN_REGEX\n });\n }\n }, {\n key: \"getCloseParenToken\",\n value: function getCloseParenToken(input) {\n return this.getTokenOnFirstMatch({\n input: input,\n type: _tokenTypes[\"default\"].CLOSE_PAREN,\n regex: this.CLOSE_PAREN_REGEX\n });\n }\n }, {\n key: \"getPlaceholderToken\",\n value: function getPlaceholderToken(input) {\n return this.getIdentNamedPlaceholderToken(input) || this.getStringNamedPlaceholderToken(input) || this.getIndexedPlaceholderToken(input);\n }\n }, {\n key: \"getIdentNamedPlaceholderToken\",\n value: function getIdentNamedPlaceholderToken(input) {\n return this.getPlaceholderTokenWithKey({\n input: input,\n regex: this.IDENT_NAMED_PLACEHOLDER_REGEX,\n parseKey: function parseKey(v) {\n return v.slice(1);\n }\n });\n }\n }, {\n key: \"getStringNamedPlaceholderToken\",\n value: function getStringNamedPlaceholderToken(input) {\n var _this = this;\n\n return this.getPlaceholderTokenWithKey({\n input: input,\n regex: this.STRING_NAMED_PLACEHOLDER_REGEX,\n parseKey: function parseKey(v) {\n return _this.getEscapedPlaceholderKey({\n key: v.slice(2, -1),\n quoteChar: v.slice(-1)\n });\n }\n });\n }\n }, {\n key: \"getIndexedPlaceholderToken\",\n value: function getIndexedPlaceholderToken(input) {\n return this.getPlaceholderTokenWithKey({\n input: input,\n regex: this.INDEXED_PLACEHOLDER_REGEX,\n parseKey: function parseKey(v) {\n return v.slice(1);\n }\n });\n }\n }, {\n key: \"getPlaceholderTokenWithKey\",\n value: function getPlaceholderTokenWithKey(_ref) {\n var input = _ref.input,\n regex = _ref.regex,\n parseKey = _ref.parseKey;\n var token = this.getTokenOnFirstMatch({\n input: input,\n regex: regex,\n type: _tokenTypes[\"default\"].PLACEHOLDER\n });\n\n if (token) {\n token.key = parseKey(token.value);\n }\n\n return token;\n }\n }, {\n key: \"getEscapedPlaceholderKey\",\n value: function getEscapedPlaceholderKey(_ref2) {\n var key = _ref2.key,\n quoteChar = _ref2.quoteChar;\n return key.replace(new RegExp((0, _utils.escapeRegExp)('\\\\' + quoteChar), 'gu'), quoteChar);\n } // Decimal, binary, or hex numbers\n\n }, {\n key: \"getNumberToken\",\n value: function getNumberToken(input) {\n return this.getTokenOnFirstMatch({\n input: input,\n type: _tokenTypes[\"default\"].NUMBER,\n regex: this.NUMBER_REGEX\n });\n } // Punctuation and symbols\n\n }, {\n key: \"getOperatorToken\",\n value: function getOperatorToken(input) {\n return this.getTokenOnFirstMatch({\n input: input,\n type: _tokenTypes[\"default\"].OPERATOR,\n regex: this.OPERATOR_REGEX\n });\n }\n }, {\n key: \"getReservedWordToken\",\n value: function getReservedWordToken(input, previousToken) {\n // A reserved word cannot be preceded by a \".\"\n // this makes it so in \"mytable.from\", \"from\" is not considered a reserved word\n if (previousToken && previousToken.value && previousToken.value === '.') {\n return undefined;\n }\n\n return this.getTopLevelReservedToken(input) || this.getNewlineReservedToken(input) || this.getTopLevelReservedTokenNoIndent(input) || this.getPlainReservedToken(input);\n }\n }, {\n key: \"getTopLevelReservedToken\",\n value: function getTopLevelReservedToken(input) {\n return this.getTokenOnFirstMatch({\n input: input,\n type: _tokenTypes[\"default\"].RESERVED_TOP_LEVEL,\n regex: this.RESERVED_TOP_LEVEL_REGEX\n });\n }\n }, {\n key: \"getNewlineReservedToken\",\n value: function getNewlineReservedToken(input) {\n return this.getTokenOnFirstMatch({\n input: input,\n type: _tokenTypes[\"default\"].RESERVED_NEWLINE,\n regex: this.RESERVED_NEWLINE_REGEX\n });\n }\n }, {\n key: \"getTopLevelReservedTokenNoIndent\",\n value: function getTopLevelReservedTokenNoIndent(input) {\n return this.getTokenOnFirstMatch({\n input: input,\n type: _tokenTypes[\"default\"].RESERVED_TOP_LEVEL_NO_INDENT,\n regex: this.RESERVED_TOP_LEVEL_NO_INDENT_REGEX\n });\n }\n }, {\n key: \"getPlainReservedToken\",\n value: function getPlainReservedToken(input) {\n return this.getTokenOnFirstMatch({\n input: input,\n type: _tokenTypes[\"default\"].RESERVED,\n regex: this.RESERVED_PLAIN_REGEX\n });\n }\n }, {\n key: \"getWordToken\",\n value: function getWordToken(input) {\n return this.getTokenOnFirstMatch({\n input: input,\n type: _tokenTypes[\"default\"].WORD,\n regex: this.WORD_REGEX\n });\n }\n }, {\n key: \"getTokenOnFirstMatch\",\n value: function getTokenOnFirstMatch(_ref3) {\n var input = _ref3.input,\n type = _ref3.type,\n regex = _ref3.regex;\n var matches = input.match(regex);\n return matches ? {\n type: type,\n value: matches[1]\n } : undefined;\n }\n }]);\n\n return Tokenizer;\n}();\n\nexports[\"default\"] = Tokenizer;\nmodule.exports = exports.default;","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _Formatter2 = _interopRequireDefault(require(\"../core/Formatter\"));\n\nvar _Tokenizer = _interopRequireDefault(require(\"../core/Tokenizer\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar reservedWords = ['ABS', 'ACTIVATE', 'ALIAS', 'ALL', 'ALLOCATE', 'ALLOW', 'ALTER', 'ANY', 'ARE', 'ARRAY', 'AS', 'ASC', 'ASENSITIVE', 'ASSOCIATE', 'ASUTIME', 'ASYMMETRIC', 'AT', 'ATOMIC', 'ATTRIBUTES', 'AUDIT', 'AUTHORIZATION', 'AUX', 'AUXILIARY', 'AVG', 'BEFORE', 'BEGIN', 'BETWEEN', 'BIGINT', 'BINARY', 'BLOB', 'BOOLEAN', 'BOTH', 'BUFFERPOOL', 'BY', 'CACHE', 'CALL', 'CALLED', 'CAPTURE', 'CARDINALITY', 'CASCADED', 'CASE', 'CAST', 'CCSID', 'CEIL', 'CEILING', 'CHAR', 'CHARACTER', 'CHARACTER_LENGTH', 'CHAR_LENGTH', 'CHECK', 'CLOB', 'CLONE', 'CLOSE', 'CLUSTER', 'COALESCE', 'COLLATE', 'COLLECT', 'COLLECTION', 'COLLID', 'COLUMN', 'COMMENT', 'COMMIT', 'CONCAT', 'CONDITION', 'CONNECT', 'CONNECTION', 'CONSTRAINT', 'CONTAINS', 'CONTINUE', 'CONVERT', 'CORR', 'CORRESPONDING', 'COUNT', 'COUNT_BIG', 'COVAR_POP', 'COVAR_SAMP', 'CREATE', 'CROSS', 'CUBE', 'CUME_DIST', 'CURRENT', 'CURRENT_DATE', 'CURRENT_DEFAULT_TRANSFORM_GROUP', 'CURRENT_LC_CTYPE', 'CURRENT_PATH', 'CURRENT_ROLE', 'CURRENT_SCHEMA', 'CURRENT_SERVER', 'CURRENT_TIME', 'CURRENT_TIMESTAMP', 'CURRENT_TIMEZONE', 'CURRENT_TRANSFORM_GROUP_FOR_TYPE', 'CURRENT_USER', 'CURSOR', 'CYCLE', 'DATA', 'DATABASE', 'DATAPARTITIONNAME', 'DATAPARTITIONNUM', 'DATE', 'DAY', 'DAYS', 'DB2GENERAL', 'DB2GENRL', 'DB2SQL', 'DBINFO', 'DBPARTITIONNAME', 'DBPARTITIONNUM', 'DEALLOCATE', 'DEC', 'DECIMAL', 'DECLARE', 'DEFAULT', 'DEFAULTS', 'DEFINITION', 'DELETE', 'DENSERANK', 'DENSE_RANK', 'DEREF', 'DESCRIBE', 'DESCRIPTOR', 'DETERMINISTIC', 'DIAGNOSTICS', 'DISABLE', 'DISALLOW', 'DISCONNECT', 'DISTINCT', 'DO', 'DOCUMENT', 'DOUBLE', 'DROP', 'DSSIZE', 'DYNAMIC', 'EACH', 'EDITPROC', 'ELEMENT', 'ELSE', 'ELSEIF', 'ENABLE', 'ENCODING', 'ENCRYPTION', 'END', 'END-EXEC', 'ENDING', 'ERASE', 'ESCAPE', 'EVERY', 'EXCEPTION', 'EXCLUDING', 'EXCLUSIVE', 'EXEC', 'EXECUTE', 'EXISTS', 'EXIT', 'EXP', 'EXPLAIN', 'EXTENDED', 'EXTERNAL', 'EXTRACT', 'FALSE', 'FENCED', 'FETCH', 'FIELDPROC', 'FILE', 'FILTER', 'FINAL', 'FIRST', 'FLOAT', 'FLOOR', 'FOR', 'FOREIGN', 'FREE', 'FULL', 'FUNCTION', 'FUSION', 'GENERAL', 'GENERATED', 'GET', 'GLOBAL', 'GOTO', 'GRANT', 'GRAPHIC', 'GROUP', 'GROUPING', 'HANDLER', 'HASH', 'HASHED_VALUE', 'HINT', 'HOLD', 'HOUR', 'HOURS', 'IDENTITY', 'IF', 'IMMEDIATE', 'IN', 'INCLUDING', 'INCLUSIVE', 'INCREMENT', 'INDEX', 'INDICATOR', 'INDICATORS', 'INF', 'INFINITY', 'INHERIT', 'INNER', 'INOUT', 'INSENSITIVE', 'INSERT', 'INT', 'INTEGER', 'INTEGRITY', 'INTERSECTION', 'INTERVAL', 'INTO', 'IS', 'ISOBID', 'ISOLATION', 'ITERATE', 'JAR', 'JAVA', 'KEEP', 'KEY', 'LABEL', 'LANGUAGE', 'LARGE', 'LATERAL', 'LC_CTYPE', 'LEADING', 'LEAVE', 'LEFT', 'LIKE', 'LINKTYPE', 'LN', 'LOCAL', 'LOCALDATE', 'LOCALE', 'LOCALTIME', 'LOCALTIMESTAMP', 'LOCATOR', 'LOCATORS', 'LOCK', 'LOCKMAX', 'LOCKSIZE', 'LONG', 'LOOP', 'LOWER', 'MAINTAINED', 'MATCH', 'MATERIALIZED', 'MAX', 'MAXVALUE', 'MEMBER', 'MERGE', 'METHOD', 'MICROSECOND', 'MICROSECONDS', 'MIN', 'MINUTE', 'MINUTES', 'MINVALUE', 'MOD', 'MODE', 'MODIFIES', 'MODULE', 'MONTH', 'MONTHS', 'MULTISET', 'NAN', 'NATIONAL', 'NATURAL', 'NCHAR', 'NCLOB', 'NEW', 'NEW_TABLE', 'NEXTVAL', 'NO', 'NOCACHE', 'NOCYCLE', 'NODENAME', 'NODENUMBER', 'NOMAXVALUE', 'NOMINVALUE', 'NONE', 'NOORDER', 'NORMALIZE', 'NORMALIZED', 'NOT', 'NULL', 'NULLIF', 'NULLS', 'NUMERIC', 'NUMPARTS', 'OBID', 'OCTET_LENGTH', 'OF', 'OFFSET', 'OLD', 'OLD_TABLE', 'ON', 'ONLY', 'OPEN', 'OPTIMIZATION', 'OPTIMIZE', 'OPTION', 'ORDER', 'OUT', 'OUTER', 'OVER', 'OVERLAPS', 'OVERLAY', 'OVERRIDING', 'PACKAGE', 'PADDED', 'PAGESIZE', 'PARAMETER', 'PART', 'PARTITION', 'PARTITIONED', 'PARTITIONING', 'PARTITIONS', 'PASSWORD', 'PATH', 'PERCENTILE_CONT', 'PERCENTILE_DISC', 'PERCENT_RANK', 'PIECESIZE', 'PLAN', 'POSITION', 'POWER', 'PRECISION', 'PREPARE', 'PREVVAL', 'PRIMARY', 'PRIQTY', 'PRIVILEGES', 'PROCEDURE', 'PROGRAM', 'PSID', 'PUBLIC', 'QUERY', 'QUERYNO', 'RANGE', 'RANK', 'READ', 'READS', 'REAL', 'RECOVERY', 'RECURSIVE', 'REF', 'REFERENCES', 'REFERENCING', 'REFRESH', 'REGR_AVGX', 'REGR_AVGY', 'REGR_COUNT', 'REGR_INTERCEPT', 'REGR_R2', 'REGR_SLOPE', 'REGR_SXX', 'REGR_SXY', 'REGR_SYY', 'RELEASE', 'RENAME', 'REPEAT', 'RESET', 'RESIGNAL', 'RESTART', 'RESTRICT', 'RESULT', 'RESULT_SET_LOCATOR', 'RETURN', 'RETURNS', 'REVOKE', 'RIGHT', 'ROLE', 'ROLLBACK', 'ROLLUP', 'ROUND_CEILING', 'ROUND_DOWN', 'ROUND_FLOOR', 'ROUND_HALF_DOWN', 'ROUND_HALF_EVEN', 'ROUND_HALF_UP', 'ROUND_UP', 'ROUTINE', 'ROW', 'ROWNUMBER', 'ROWS', 'ROWSET', 'ROW_NUMBER', 'RRN', 'RUN', 'SAVEPOINT', 'SCHEMA', 'SCOPE', 'SCRATCHPAD', 'SCROLL', 'SEARCH', 'SECOND', 'SECONDS', 'SECQTY', 'SECURITY', 'SENSITIVE', 'SEQUENCE', 'SESSION', 'SESSION_USER', 'SIGNAL', 'SIMILAR', 'SIMPLE', 'SMALLINT', 'SNAN', 'SOME', 'SOURCE', 'SPECIFIC', 'SPECIFICTYPE', 'SQL', 'SQLEXCEPTION', 'SQLID', 'SQLSTATE', 'SQLWARNING', 'SQRT', 'STACKED', 'STANDARD', 'START', 'STARTING', 'STATEMENT', 'STATIC', 'STATMENT', 'STAY', 'STDDEV_POP', 'STDDEV_SAMP', 'STOGROUP', 'STORES', 'STYLE', 'SUBMULTISET', 'SUBSTRING', 'SUM', 'SUMMARY', 'SYMMETRIC', 'SYNONYM', 'SYSFUN', 'SYSIBM', 'SYSPROC', 'SYSTEM', 'SYSTEM_USER', 'TABLE', 'TABLESAMPLE', 'TABLESPACE', 'THEN', 'TIME', 'TIMESTAMP', 'TIMEZONE_HOUR', 'TIMEZONE_MINUTE', 'TO', 'TRAILING', 'TRANSACTION', 'TRANSLATE', 'TRANSLATION', 'TREAT', 'TRIGGER', 'TRIM', 'TRUE', 'TRUNCATE', 'TYPE', 'UESCAPE', 'UNDO', 'UNIQUE', 'UNKNOWN', 'UNNEST', 'UNTIL', 'UPPER', 'USAGE', 'USER', 'USING', 'VALIDPROC', 'VALUE', 'VARCHAR', 'VARIABLE', 'VARIANT', 'VARYING', 'VAR_POP', 'VAR_SAMP', 'VCAT', 'VERSION', 'VIEW', 'VOLATILE', 'VOLUMES', 'WHEN', 'WHENEVER', 'WHILE', 'WIDTH_BUCKET', 'WINDOW', 'WITH', 'WITHIN', 'WITHOUT', 'WLM', 'WRITE', 'XMLELEMENT', 'XMLEXISTS', 'XMLNAMESPACES', 'YEAR', 'YEARS'];\nvar reservedTopLevelWords = ['ADD', 'AFTER', 'ALTER COLUMN', 'ALTER TABLE', 'DELETE FROM', 'EXCEPT', 'FETCH FIRST', 'FROM', 'GROUP BY', 'GO', 'HAVING', 'INSERT INTO', 'INTERSECT', 'LIMIT', 'ORDER BY', 'SELECT', 'SET CURRENT SCHEMA', 'SET SCHEMA', 'SET', 'UPDATE', 'VALUES', 'WHERE'];\nvar reservedTopLevelWordsNoIndent = ['INTERSECT', 'INTERSECT ALL', 'MINUS', 'UNION', 'UNION ALL'];\nvar reservedNewlineWords = ['AND', 'OR', // joins\n'JOIN', 'INNER JOIN', 'LEFT JOIN', 'LEFT OUTER JOIN', 'RIGHT JOIN', 'RIGHT OUTER JOIN', 'FULL JOIN', 'FULL OUTER JOIN', 'CROSS JOIN', 'NATURAL JOIN']; // For reference: https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_72/db2/rbafzintro.htm\n\nvar Db2Formatter = /*#__PURE__*/function (_Formatter) {\n _inherits(Db2Formatter, _Formatter);\n\n var _super = _createSuper(Db2Formatter);\n\n function Db2Formatter() {\n _classCallCheck(this, Db2Formatter);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(Db2Formatter, [{\n key: \"tokenizer\",\n value: function tokenizer() {\n return new _Tokenizer[\"default\"]({\n reservedWords: reservedWords,\n reservedTopLevelWords: reservedTopLevelWords,\n reservedNewlineWords: reservedNewlineWords,\n reservedTopLevelWordsNoIndent: reservedTopLevelWordsNoIndent,\n stringTypes: [\"\\\"\\\"\", \"''\", '``', '[]'],\n openParens: ['('],\n closeParens: [')'],\n indexedPlaceholderTypes: ['?'],\n namedPlaceholderTypes: [':'],\n lineCommentTypes: ['--'],\n specialWordChars: ['#', '@'],\n operators: ['**', '!=', '!>', '!>', '||']\n });\n }\n }]);\n\n return Db2Formatter;\n}(_Formatter2[\"default\"]);\n\nexports[\"default\"] = Db2Formatter;\nmodule.exports = exports.default;","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _Formatter2 = _interopRequireDefault(require(\"../core/Formatter\"));\n\nvar _Tokenizer = _interopRequireDefault(require(\"../core/Tokenizer\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar reservedWords = ['ACCESSIBLE', 'ADD', 'ALL', 'ALTER', 'ANALYZE', 'AND', 'AS', 'ASC', 'ASENSITIVE', 'BEFORE', 'BETWEEN', 'BIGINT', 'BINARY', 'BLOB', 'BOTH', 'BY', 'CALL', 'CASCADE', 'CASE', 'CHANGE', 'CHAR', 'CHARACTER', 'CHECK', 'COLLATE', 'COLUMN', 'CONDITION', 'CONSTRAINT', 'CONTINUE', 'CONVERT', 'CREATE', 'CROSS', 'CURRENT_DATE', 'CURRENT_ROLE', 'CURRENT_TIME', 'CURRENT_TIMESTAMP', 'CURRENT_USER', 'CURSOR', 'DATABASE', 'DATABASES', 'DAY_HOUR', 'DAY_MICROSECOND', 'DAY_MINUTE', 'DAY_SECOND', 'DEC', 'DECIMAL', 'DECLARE', 'DEFAULT', 'DELAYED', 'DELETE', 'DESC', 'DESCRIBE', 'DETERMINISTIC', 'DISTINCT', 'DISTINCTROW', 'DIV', 'DO_DOMAIN_IDS', 'DOUBLE', 'DROP', 'DUAL', 'EACH', 'ELSE', 'ELSEIF', 'ENCLOSED', 'ESCAPED', 'EXCEPT', 'EXISTS', 'EXIT', 'EXPLAIN', 'FALSE', 'FETCH', 'FLOAT', 'FLOAT4', 'FLOAT8', 'FOR', 'FORCE', 'FOREIGN', 'FROM', 'FULLTEXT', 'GENERAL', 'GRANT', 'GROUP', 'HAVING', 'HIGH_PRIORITY', 'HOUR_MICROSECOND', 'HOUR_MINUTE', 'HOUR_SECOND', 'IF', 'IGNORE', 'IGNORE_DOMAIN_IDS', 'IGNORE_SERVER_IDS', 'IN', 'INDEX', 'INFILE', 'INNER', 'INOUT', 'INSENSITIVE', 'INSERT', 'INT', 'INT1', 'INT2', 'INT3', 'INT4', 'INT8', 'INTEGER', 'INTERSECT', 'INTERVAL', 'INTO', 'IS', 'ITERATE', 'JOIN', 'KEY', 'KEYS', 'KILL', 'LEADING', 'LEAVE', 'LEFT', 'LIKE', 'LIMIT', 'LINEAR', 'LINES', 'LOAD', 'LOCALTIME', 'LOCALTIMESTAMP', 'LOCK', 'LONG', 'LONGBLOB', 'LONGTEXT', 'LOOP', 'LOW_PRIORITY', 'MASTER_HEARTBEAT_PERIOD', 'MASTER_SSL_VERIFY_SERVER_CERT', 'MATCH', 'MAXVALUE', 'MEDIUMBLOB', 'MEDIUMINT', 'MEDIUMTEXT', 'MIDDLEINT', 'MINUTE_MICROSECOND', 'MINUTE_SECOND', 'MOD', 'MODIFIES', 'NATURAL', 'NOT', 'NO_WRITE_TO_BINLOG', 'NULL', 'NUMERIC', 'ON', 'OPTIMIZE', 'OPTION', 'OPTIONALLY', 'OR', 'ORDER', 'OUT', 'OUTER', 'OUTFILE', 'OVER', 'PAGE_CHECKSUM', 'PARSE_VCOL_EXPR', 'PARTITION', 'POSITION', 'PRECISION', 'PRIMARY', 'PROCEDURE', 'PURGE', 'RANGE', 'READ', 'READS', 'READ_WRITE', 'REAL', 'RECURSIVE', 'REF_SYSTEM_ID', 'REFERENCES', 'REGEXP', 'RELEASE', 'RENAME', 'REPEAT', 'REPLACE', 'REQUIRE', 'RESIGNAL', 'RESTRICT', 'RETURN', 'RETURNING', 'REVOKE', 'RIGHT', 'RLIKE', 'ROWS', 'SCHEMA', 'SCHEMAS', 'SECOND_MICROSECOND', 'SELECT', 'SENSITIVE', 'SEPARATOR', 'SET', 'SHOW', 'SIGNAL', 'SLOW', 'SMALLINT', 'SPATIAL', 'SPECIFIC', 'SQL', 'SQLEXCEPTION', 'SQLSTATE', 'SQLWARNING', 'SQL_BIG_RESULT', 'SQL_CALC_FOUND_ROWS', 'SQL_SMALL_RESULT', 'SSL', 'STARTING', 'STATS_AUTO_RECALC', 'STATS_PERSISTENT', 'STATS_SAMPLE_PAGES', 'STRAIGHT_JOIN', 'TABLE', 'TERMINATED', 'THEN', 'TINYBLOB', 'TINYINT', 'TINYTEXT', 'TO', 'TRAILING', 'TRIGGER', 'TRUE', 'UNDO', 'UNION', 'UNIQUE', 'UNLOCK', 'UNSIGNED', 'UPDATE', 'USAGE', 'USE', 'USING', 'UTC_DATE', 'UTC_TIME', 'UTC_TIMESTAMP', 'VALUES', 'VARBINARY', 'VARCHAR', 'VARCHARACTER', 'VARYING', 'WHEN', 'WHERE', 'WHILE', 'WINDOW', 'WITH', 'WRITE', 'XOR', 'YEAR_MONTH', 'ZEROFILL'];\nvar reservedTopLevelWords = ['ADD', 'ALTER COLUMN', 'ALTER TABLE', 'DELETE FROM', 'EXCEPT', 'FROM', 'GROUP BY', 'HAVING', 'INSERT INTO', 'INSERT', 'LIMIT', 'ORDER BY', 'SELECT', 'SET', 'UPDATE', 'VALUES', 'WHERE'];\nvar reservedTopLevelWordsNoIndent = ['INTERSECT', 'INTERSECT ALL', 'UNION', 'UNION ALL'];\nvar reservedNewlineWords = ['AND', 'ELSE', 'OR', 'WHEN', // joins\n'JOIN', 'INNER JOIN', 'LEFT JOIN', 'LEFT OUTER JOIN', 'RIGHT JOIN', 'RIGHT OUTER JOIN', 'CROSS JOIN', 'NATURAL JOIN', // non-standard joins\n'STRAIGHT_JOIN', 'NATURAL LEFT JOIN', 'NATURAL LEFT OUTER JOIN', 'NATURAL RIGHT JOIN', 'NATURAL RIGHT OUTER JOIN']; // For reference: https://mariadb.com/kb/en/sql-statements-structure/\n\nvar MariaDbFormatter = /*#__PURE__*/function (_Formatter) {\n _inherits(MariaDbFormatter, _Formatter);\n\n var _super = _createSuper(MariaDbFormatter);\n\n function MariaDbFormatter() {\n _classCallCheck(this, MariaDbFormatter);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(MariaDbFormatter, [{\n key: \"tokenizer\",\n value: function tokenizer() {\n return new _Tokenizer[\"default\"]({\n reservedWords: reservedWords,\n reservedTopLevelWords: reservedTopLevelWords,\n reservedNewlineWords: reservedNewlineWords,\n reservedTopLevelWordsNoIndent: reservedTopLevelWordsNoIndent,\n stringTypes: ['``', \"''\", '\"\"'],\n openParens: ['(', 'CASE'],\n closeParens: [')', 'END'],\n indexedPlaceholderTypes: ['?'],\n namedPlaceholderTypes: [],\n lineCommentTypes: ['--', '#'],\n specialWordChars: ['@'],\n operators: [':=', '<<', '>>', '!=', '<>', '<=>', '&&', '||']\n });\n }\n }]);\n\n return MariaDbFormatter;\n}(_Formatter2[\"default\"]);\n\nexports[\"default\"] = MariaDbFormatter;\nmodule.exports = exports.default;","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _Formatter2 = _interopRequireDefault(require(\"../core/Formatter\"));\n\nvar _Tokenizer = _interopRequireDefault(require(\"../core/Tokenizer\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar reservedWords = ['ACCESSIBLE', 'ADD', 'ALL', 'ALTER', 'ANALYZE', 'AND', 'AS', 'ASC', 'ASENSITIVE', 'BEFORE', 'BETWEEN', 'BIGINT', 'BINARY', 'BLOB', 'BOTH', 'BY', 'CALL', 'CASCADE', 'CASE', 'CHANGE', 'CHAR', 'CHARACTER', 'CHECK', 'COLLATE', 'COLUMN', 'CONDITION', 'CONSTRAINT', 'CONTINUE', 'CONVERT', 'CREATE', 'CROSS', 'CUBE', 'CUME_DIST', 'CURRENT_DATE', 'CURRENT_TIME', 'CURRENT_TIMESTAMP', 'CURRENT_USER', 'CURSOR', 'DATABASE', 'DATABASES', 'DAY_HOUR', 'DAY_MICROSECOND', 'DAY_MINUTE', 'DAY_SECOND', 'DEC', 'DECIMAL', 'DECLARE', 'DEFAULT', 'DELAYED', 'DELETE', 'DENSE_RANK', 'DESC', 'DESCRIBE', 'DETERMINISTIC', 'DISTINCT', 'DISTINCTROW', 'DIV', 'DOUBLE', 'DROP', 'DUAL', 'EACH', 'ELSE', 'ELSEIF', 'EMPTY', 'ENCLOSED', 'ESCAPED', 'EXCEPT', 'EXISTS', 'EXIT', 'EXPLAIN', 'FALSE', 'FETCH', 'FIRST_VALUE', 'FLOAT', 'FLOAT4', 'FLOAT8', 'FOR', 'FORCE', 'FOREIGN', 'FROM', 'FULLTEXT', 'FUNCTION', 'GENERATED', 'GET', 'GRANT', 'GROUP', 'GROUPING', 'GROUPS', 'HAVING', 'HIGH_PRIORITY', 'HOUR_MICROSECOND', 'HOUR_MINUTE', 'HOUR_SECOND', 'IF', 'IGNORE', 'IN', 'INDEX', 'INFILE', 'INNER', 'INOUT', 'INSENSITIVE', 'INSERT', 'INT', 'INT1', 'INT2', 'INT3', 'INT4', 'INT8', 'INTEGER', 'INTERVAL', 'INTO', 'IO_AFTER_GTIDS', 'IO_BEFORE_GTIDS', 'IS', 'ITERATE', 'JOIN', 'JSON_TABLE', 'KEY', 'KEYS', 'KILL', 'LAG', 'LAST_VALUE', 'LATERAL', 'LEAD', 'LEADING', 'LEAVE', 'LEFT', 'LIKE', 'LIMIT', 'LINEAR', 'LINES', 'LOAD', 'LOCALTIME', 'LOCALTIMESTAMP', 'LOCK', 'LONG', 'LONGBLOB', 'LONGTEXT', 'LOOP', 'LOW_PRIORITY', 'MASTER_BIND', 'MASTER_SSL_VERIFY_SERVER_CERT', 'MATCH', 'MAXVALUE', 'MEDIUMBLOB', 'MEDIUMINT', 'MEDIUMTEXT', 'MIDDLEINT', 'MINUTE_MICROSECOND', 'MINUTE_SECOND', 'MOD', 'MODIFIES', 'NATURAL', 'NOT', 'NO_WRITE_TO_BINLOG', 'NTH_VALUE', 'NTILE', 'NULL', 'NUMERIC', 'OF', 'ON', 'OPTIMIZE', 'OPTIMIZER_COSTS', 'OPTION', 'OPTIONALLY', 'OR', 'ORDER', 'OUT', 'OUTER', 'OUTFILE', 'OVER', 'PARTITION', 'PERCENT_RANK', 'PRECISION', 'PRIMARY', 'PROCEDURE', 'PURGE', 'RANGE', 'RANK', 'READ', 'READS', 'READ_WRITE', 'REAL', 'RECURSIVE', 'REFERENCES', 'REGEXP', 'RELEASE', 'RENAME', 'REPEAT', 'REPLACE', 'REQUIRE', 'RESIGNAL', 'RESTRICT', 'RETURN', 'REVOKE', 'RIGHT', 'RLIKE', 'ROW', 'ROWS', 'ROW_NUMBER', 'SCHEMA', 'SCHEMAS', 'SECOND_MICROSECOND', 'SELECT', 'SENSITIVE', 'SEPARATOR', 'SET', 'SHOW', 'SIGNAL', 'SMALLINT', 'SPATIAL', 'SPECIFIC', 'SQL', 'SQLEXCEPTION', 'SQLSTATE', 'SQLWARNING', 'SQL_BIG_RESULT', 'SQL_CALC_FOUND_ROWS', 'SQL_SMALL_RESULT', 'SSL', 'STARTING', 'STORED', 'STRAIGHT_JOIN', 'SYSTEM', 'TABLE', 'TERMINATED', 'THEN', 'TINYBLOB', 'TINYINT', 'TINYTEXT', 'TO', 'TRAILING', 'TRIGGER', 'TRUE', 'UNDO', 'UNION', 'UNIQUE', 'UNLOCK', 'UNSIGNED', 'UPDATE', 'USAGE', 'USE', 'USING', 'UTC_DATE', 'UTC_TIME', 'UTC_TIMESTAMP', 'VALUES', 'VARBINARY', 'VARCHAR', 'VARCHARACTER', 'VARYING', 'VIRTUAL', 'WHEN', 'WHERE', 'WHILE', 'WINDOW', 'WITH', 'WRITE', 'XOR', 'YEAR_MONTH', 'ZEROFILL'];\nvar reservedTopLevelWords = ['ADD', 'ALTER COLUMN', 'ALTER TABLE', 'DELETE FROM', 'EXCEPT', 'FROM', 'GROUP BY', 'HAVING', 'INSERT INTO', 'INSERT', 'LIMIT', 'ORDER BY', 'SELECT', 'SET', 'UPDATE', 'VALUES', 'WHERE'];\nvar reservedTopLevelWordsNoIndent = ['INTERSECT', 'INTERSECT ALL', 'UNION', 'UNION ALL'];\nvar reservedNewlineWords = ['AND', 'ELSE', 'OR', 'WHEN', // joins\n'JOIN', 'INNER JOIN', 'LEFT JOIN', 'LEFT OUTER JOIN', 'RIGHT JOIN', 'RIGHT OUTER JOIN', 'CROSS JOIN', 'NATURAL JOIN', // non-standard joins\n'STRAIGHT_JOIN', 'NATURAL LEFT JOIN', 'NATURAL LEFT OUTER JOIN', 'NATURAL RIGHT JOIN', 'NATURAL RIGHT OUTER JOIN'];\n\nvar MySqlFormatter = /*#__PURE__*/function (_Formatter) {\n _inherits(MySqlFormatter, _Formatter);\n\n var _super = _createSuper(MySqlFormatter);\n\n function MySqlFormatter() {\n _classCallCheck(this, MySqlFormatter);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(MySqlFormatter, [{\n key: \"tokenizer\",\n value: function tokenizer() {\n return new _Tokenizer[\"default\"]({\n reservedWords: reservedWords,\n reservedTopLevelWords: reservedTopLevelWords,\n reservedNewlineWords: reservedNewlineWords,\n reservedTopLevelWordsNoIndent: reservedTopLevelWordsNoIndent,\n stringTypes: ['``', \"''\", '\"\"'],\n openParens: ['(', 'CASE'],\n closeParens: [')', 'END'],\n indexedPlaceholderTypes: ['?'],\n namedPlaceholderTypes: [],\n lineCommentTypes: ['--', '#'],\n specialWordChars: ['@'],\n operators: [':=', '<<', '>>', '!=', '<>', '<=>', '&&', '||', '->', '->>']\n });\n }\n }]);\n\n return MySqlFormatter;\n}(_Formatter2[\"default\"]);\n\nexports[\"default\"] = MySqlFormatter;\nmodule.exports = exports.default;","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _Formatter2 = _interopRequireDefault(require(\"../core/Formatter\"));\n\nvar _Tokenizer = _interopRequireDefault(require(\"../core/Tokenizer\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar reservedWords = ['ALL', 'ALTER', 'ANALYZE', 'AND', 'ANY', 'ARRAY', 'AS', 'ASC', 'BEGIN', 'BETWEEN', 'BINARY', 'BOOLEAN', 'BREAK', 'BUCKET', 'BUILD', 'BY', 'CALL', 'CASE', 'CAST', 'CLUSTER', 'COLLATE', 'COLLECTION', 'COMMIT', 'CONNECT', 'CONTINUE', 'CORRELATE', 'COVER', 'CREATE', 'DATABASE', 'DATASET', 'DATASTORE', 'DECLARE', 'DECREMENT', 'DELETE', 'DERIVED', 'DESC', 'DESCRIBE', 'DISTINCT', 'DO', 'DROP', 'EACH', 'ELEMENT', 'ELSE', 'END', 'EVERY', 'EXCEPT', 'EXCLUDE', 'EXECUTE', 'EXISTS', 'EXPLAIN', 'FALSE', 'FETCH', 'FIRST', 'FLATTEN', 'FOR', 'FORCE', 'FROM', 'FUNCTION', 'GRANT', 'GROUP', 'GSI', 'HAVING', 'IF', 'IGNORE', 'ILIKE', 'IN', 'INCLUDE', 'INCREMENT', 'INDEX', 'INFER', 'INLINE', 'INNER', 'INSERT', 'INTERSECT', 'INTO', 'IS', 'JOIN', 'KEY', 'KEYS', 'KEYSPACE', 'KNOWN', 'LAST', 'LEFT', 'LET', 'LETTING', 'LIKE', 'LIMIT', 'LSM', 'MAP', 'MAPPING', 'MATCHED', 'MATERIALIZED', 'MERGE', 'MISSING', 'NAMESPACE', 'NEST', 'NOT', 'NULL', 'NUMBER', 'OBJECT', 'OFFSET', 'ON', 'OPTION', 'OR', 'ORDER', 'OUTER', 'OVER', 'PARSE', 'PARTITION', 'PASSWORD', 'PATH', 'POOL', 'PREPARE', 'PRIMARY', 'PRIVATE', 'PRIVILEGE', 'PROCEDURE', 'PUBLIC', 'RAW', 'REALM', 'REDUCE', 'RENAME', 'RETURN', 'RETURNING', 'REVOKE', 'RIGHT', 'ROLE', 'ROLLBACK', 'SATISFIES', 'SCHEMA', 'SELECT', 'SELF', 'SEMI', 'SET', 'SHOW', 'SOME', 'START', 'STATISTICS', 'STRING', 'SYSTEM', 'THEN', 'TO', 'TRANSACTION', 'TRIGGER', 'TRUE', 'TRUNCATE', 'UNDER', 'UNION', 'UNIQUE', 'UNKNOWN', 'UNNEST', 'UNSET', 'UPDATE', 'UPSERT', 'USE', 'USER', 'USING', 'VALIDATE', 'VALUE', 'VALUED', 'VALUES', 'VIA', 'VIEW', 'WHEN', 'WHERE', 'WHILE', 'WITH', 'WITHIN', 'WORK', 'XOR'];\nvar reservedTopLevelWords = ['DELETE FROM', 'EXCEPT ALL', 'EXCEPT', 'EXPLAIN DELETE FROM', 'EXPLAIN UPDATE', 'EXPLAIN UPSERT', 'FROM', 'GROUP BY', 'HAVING', 'INFER', 'INSERT INTO', 'LET', 'LIMIT', 'MERGE', 'NEST', 'ORDER BY', 'PREPARE', 'SELECT', 'SET CURRENT SCHEMA', 'SET SCHEMA', 'SET', 'UNNEST', 'UPDATE', 'UPSERT', 'USE KEYS', 'VALUES', 'WHERE'];\nvar reservedTopLevelWordsNoIndent = ['INTERSECT', 'INTERSECT ALL', 'MINUS', 'UNION', 'UNION ALL'];\nvar reservedNewlineWords = ['AND', 'OR', 'XOR', // joins\n'JOIN', 'INNER JOIN', 'LEFT JOIN', 'LEFT OUTER JOIN', 'RIGHT JOIN', 'RIGHT OUTER JOIN']; // For reference: http://docs.couchbase.com.s3-website-us-west-1.amazonaws.com/server/6.0/n1ql/n1ql-language-reference/index.html\n\nvar N1qlFormatter = /*#__PURE__*/function (_Formatter) {\n _inherits(N1qlFormatter, _Formatter);\n\n var _super = _createSuper(N1qlFormatter);\n\n function N1qlFormatter() {\n _classCallCheck(this, N1qlFormatter);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(N1qlFormatter, [{\n key: \"tokenizer\",\n value: function tokenizer() {\n return new _Tokenizer[\"default\"]({\n reservedWords: reservedWords,\n reservedTopLevelWords: reservedTopLevelWords,\n reservedNewlineWords: reservedNewlineWords,\n reservedTopLevelWordsNoIndent: reservedTopLevelWordsNoIndent,\n stringTypes: [\"\\\"\\\"\", \"''\", '``'],\n openParens: ['(', '[', '{'],\n closeParens: [')', ']', '}'],\n namedPlaceholderTypes: ['$'],\n lineCommentTypes: ['#', '--'],\n operators: ['==', '!=']\n });\n }\n }]);\n\n return N1qlFormatter;\n}(_Formatter2[\"default\"]);\n\nexports[\"default\"] = N1qlFormatter;\nmodule.exports = exports.default;","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _Formatter2 = _interopRequireDefault(require(\"../core/Formatter\"));\n\nvar _token = require(\"../core/token\");\n\nvar _Tokenizer = _interopRequireDefault(require(\"../core/Tokenizer\"));\n\nvar _tokenTypes = _interopRequireDefault(require(\"../core/tokenTypes\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar reservedWords = ['A', 'ACCESSIBLE', 'AGENT', 'AGGREGATE', 'ALL', 'ALTER', 'ANY', 'ARRAY', 'AS', 'ASC', 'AT', 'ATTRIBUTE', 'AUTHID', 'AVG', 'BETWEEN', 'BFILE_BASE', 'BINARY_INTEGER', 'BINARY', 'BLOB_BASE', 'BLOCK', 'BODY', 'BOOLEAN', 'BOTH', 'BOUND', 'BREADTH', 'BULK', 'BY', 'BYTE', 'C', 'CALL', 'CALLING', 'CASCADE', 'CASE', 'CHAR_BASE', 'CHAR', 'CHARACTER', 'CHARSET', 'CHARSETFORM', 'CHARSETID', 'CHECK', 'CLOB_BASE', 'CLONE', 'CLOSE', 'CLUSTER', 'CLUSTERS', 'COALESCE', 'COLAUTH', 'COLLECT', 'COLUMNS', 'COMMENT', 'COMMIT', 'COMMITTED', 'COMPILED', 'COMPRESS', 'CONNECT', 'CONSTANT', 'CONSTRUCTOR', 'CONTEXT', 'CONTINUE', 'CONVERT', 'COUNT', 'CRASH', 'CREATE', 'CREDENTIAL', 'CURRENT', 'CURRVAL', 'CURSOR', 'CUSTOMDATUM', 'DANGLING', 'DATA', 'DATE_BASE', 'DATE', 'DAY', 'DECIMAL', 'DEFAULT', 'DEFINE', 'DELETE', 'DEPTH', 'DESC', 'DETERMINISTIC', 'DIRECTORY', 'DISTINCT', 'DO', 'DOUBLE', 'DROP', 'DURATION', 'ELEMENT', 'ELSIF', 'EMPTY', 'END', 'ESCAPE', 'EXCEPTIONS', 'EXCLUSIVE', 'EXECUTE', 'EXISTS', 'EXIT', 'EXTENDS', 'EXTERNAL', 'EXTRACT', 'FALSE', 'FETCH', 'FINAL', 'FIRST', 'FIXED', 'FLOAT', 'FOR', 'FORALL', 'FORCE', 'FROM', 'FUNCTION', 'GENERAL', 'GOTO', 'GRANT', 'GROUP', 'HASH', 'HEAP', 'HIDDEN', 'HOUR', 'IDENTIFIED', 'IF', 'IMMEDIATE', 'IN', 'INCLUDING', 'INDEX', 'INDEXES', 'INDICATOR', 'INDICES', 'INFINITE', 'INSTANTIABLE', 'INT', 'INTEGER', 'INTERFACE', 'INTERVAL', 'INTO', 'INVALIDATE', 'IS', 'ISOLATION', 'JAVA', 'LANGUAGE', 'LARGE', 'LEADING', 'LENGTH', 'LEVEL', 'LIBRARY', 'LIKE', 'LIKE2', 'LIKE4', 'LIKEC', 'LIMITED', 'LOCAL', 'LOCK', 'LONG', 'MAP', 'MAX', 'MAXLEN', 'MEMBER', 'MERGE', 'MIN', 'MINUTE', 'MLSLABEL', 'MOD', 'MODE', 'MONTH', 'MULTISET', 'NAME', 'NAN', 'NATIONAL', 'NATIVE', 'NATURAL', 'NATURALN', 'NCHAR', 'NEW', 'NEXTVAL', 'NOCOMPRESS', 'NOCOPY', 'NOT', 'NOWAIT', 'NULL', 'NULLIF', 'NUMBER_BASE', 'NUMBER', 'OBJECT', 'OCICOLL', 'OCIDATE', 'OCIDATETIME', 'OCIDURATION', 'OCIINTERVAL', 'OCILOBLOCATOR', 'OCINUMBER', 'OCIRAW', 'OCIREF', 'OCIREFCURSOR', 'OCIROWID', 'OCISTRING', 'OCITYPE', 'OF', 'OLD', 'ON', 'ONLY', 'OPAQUE', 'OPEN', 'OPERATOR', 'OPTION', 'ORACLE', 'ORADATA', 'ORDER', 'ORGANIZATION', 'ORLANY', 'ORLVARY', 'OTHERS', 'OUT', 'OVERLAPS', 'OVERRIDING', 'PACKAGE', 'PARALLEL_ENABLE', 'PARAMETER', 'PARAMETERS', 'PARENT', 'PARTITION', 'PASCAL', 'PCTFREE', 'PIPE', 'PIPELINED', 'PLS_INTEGER', 'PLUGGABLE', 'POSITIVE', 'POSITIVEN', 'PRAGMA', 'PRECISION', 'PRIOR', 'PRIVATE', 'PROCEDURE', 'PUBLIC', 'RAISE', 'RANGE', 'RAW', 'READ', 'REAL', 'RECORD', 'REF', 'REFERENCE', 'RELEASE', 'RELIES_ON', 'REM', 'REMAINDER', 'RENAME', 'RESOURCE', 'RESULT_CACHE', 'RESULT', 'RETURN', 'RETURNING', 'REVERSE', 'REVOKE', 'ROLLBACK', 'ROW', 'ROWID', 'ROWNUM', 'ROWTYPE', 'SAMPLE', 'SAVE', 'SAVEPOINT', 'SB1', 'SB2', 'SB4', 'SEARCH', 'SECOND', 'SEGMENT', 'SELF', 'SEPARATE', 'SEQUENCE', 'SERIALIZABLE', 'SHARE', 'SHORT', 'SIZE_T', 'SIZE', 'SMALLINT', 'SOME', 'SPACE', 'SPARSE', 'SQL', 'SQLCODE', 'SQLDATA', 'SQLERRM', 'SQLNAME', 'SQLSTATE', 'STANDARD', 'START', 'STATIC', 'STDDEV', 'STORED', 'STRING', 'STRUCT', 'STYLE', 'SUBMULTISET', 'SUBPARTITION', 'SUBSTITUTABLE', 'SUBTYPE', 'SUCCESSFUL', 'SUM', 'SYNONYM', 'SYSDATE', 'TABAUTH', 'TABLE', 'TDO', 'THE', 'THEN', 'TIME', 'TIMESTAMP', 'TIMEZONE_ABBR', 'TIMEZONE_HOUR', 'TIMEZONE_MINUTE', 'TIMEZONE_REGION', 'TO', 'TRAILING', 'TRANSACTION', 'TRANSACTIONAL', 'TRIGGER', 'TRUE', 'TRUSTED', 'TYPE', 'UB1', 'UB2', 'UB4', 'UID', 'UNDER', 'UNIQUE', 'UNPLUG', 'UNSIGNED', 'UNTRUSTED', 'USE', 'USER', 'USING', 'VALIDATE', 'VALIST', 'VALUE', 'VARCHAR', 'VARCHAR2', 'VARIABLE', 'VARIANCE', 'VARRAY', 'VARYING', 'VIEW', 'VIEWS', 'VOID', 'WHENEVER', 'WHILE', 'WITH', 'WORK', 'WRAPPED', 'WRITE', 'YEAR', 'ZONE'];\nvar reservedTopLevelWords = ['ADD', 'ALTER COLUMN', 'ALTER TABLE', 'BEGIN', 'CONNECT BY', 'DECLARE', 'DELETE FROM', 'DELETE', 'END', 'EXCEPT', 'EXCEPTION', 'FETCH FIRST', 'FROM', 'GROUP BY', 'HAVING', 'INSERT INTO', 'INSERT', 'LIMIT', 'LOOP', 'MODIFY', 'ORDER BY', 'SELECT', 'SET CURRENT SCHEMA', 'SET SCHEMA', 'SET', 'START WITH', 'UPDATE', 'VALUES', 'WHERE'];\nvar reservedTopLevelWordsNoIndent = ['INTERSECT', 'INTERSECT ALL', 'MINUS', 'UNION', 'UNION ALL'];\nvar reservedNewlineWords = ['AND', 'CROSS APPLY', 'ELSE', 'END', 'OR', 'OUTER APPLY', 'WHEN', 'XOR', // joins\n'JOIN', 'INNER JOIN', 'LEFT JOIN', 'LEFT OUTER JOIN', 'RIGHT JOIN', 'RIGHT OUTER JOIN', 'FULL JOIN', 'FULL OUTER JOIN', 'CROSS JOIN', 'NATURAL JOIN'];\n\nvar PlSqlFormatter = /*#__PURE__*/function (_Formatter) {\n _inherits(PlSqlFormatter, _Formatter);\n\n var _super = _createSuper(PlSqlFormatter);\n\n function PlSqlFormatter() {\n _classCallCheck(this, PlSqlFormatter);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(PlSqlFormatter, [{\n key: \"tokenizer\",\n value: function tokenizer() {\n return new _Tokenizer[\"default\"]({\n reservedWords: reservedWords,\n reservedTopLevelWords: reservedTopLevelWords,\n reservedNewlineWords: reservedNewlineWords,\n reservedTopLevelWordsNoIndent: reservedTopLevelWordsNoIndent,\n stringTypes: [\"\\\"\\\"\", \"N''\", \"''\", '``'],\n openParens: ['(', 'CASE'],\n closeParens: [')', 'END'],\n indexedPlaceholderTypes: ['?'],\n namedPlaceholderTypes: [':'],\n lineCommentTypes: ['--'],\n specialWordChars: ['_', '$', '#', '.', '@'],\n operators: ['||', '**', '!=', ':=']\n });\n }\n }, {\n key: \"tokenOverride\",\n value: function tokenOverride(token) {\n if ((0, _token.isSet)(token) && (0, _token.isBy)(this.previousReservedToken)) {\n return {\n type: _tokenTypes[\"default\"].RESERVED,\n value: token.value\n };\n }\n\n return token;\n }\n }]);\n\n return PlSqlFormatter;\n}(_Formatter2[\"default\"]);\n\nexports[\"default\"] = PlSqlFormatter;\nmodule.exports = exports.default;","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _Formatter2 = _interopRequireDefault(require(\"../core/Formatter\"));\n\nvar _Tokenizer = _interopRequireDefault(require(\"../core/Tokenizer\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar reservedWords = ['ABORT', 'ABSOLUTE', 'ACCESS', 'ACTION', 'ADD', 'ADMIN', 'AFTER', 'AGGREGATE', 'ALL', 'ALSO', 'ALTER', 'ALWAYS', 'ANALYSE', 'ANALYZE', 'AND', 'ANY', 'ARRAY', 'AS', 'ASC', 'ASSERTION', 'ASSIGNMENT', 'ASYMMETRIC', 'AT', 'ATTACH', 'ATTRIBUTE', 'AUTHORIZATION', 'BACKWARD', 'BEFORE', 'BEGIN', 'BETWEEN', 'BIGINT', 'BINARY', 'BIT', 'BOOLEAN', 'BOTH', 'BY', 'CACHE', 'CALL', 'CALLED', 'CASCADE', 'CASCADED', 'CASE', 'CAST', 'CATALOG', 'CHAIN', 'CHAR', 'CHARACTER', 'CHARACTERISTICS', 'CHECK', 'CHECKPOINT', 'CLASS', 'CLOSE', 'CLUSTER', 'COALESCE', 'COLLATE', 'COLLATION', 'COLUMN', 'COLUMNS', 'COMMENT', 'COMMENTS', 'COMMIT', 'COMMITTED', 'CONCURRENTLY', 'CONFIGURATION', 'CONFLICT', 'CONNECTION', 'CONSTRAINT', 'CONSTRAINTS', 'CONTENT', 'CONTINUE', 'CONVERSION', 'COPY', 'COST', 'CREATE', 'CROSS', 'CSV', 'CUBE', 'CURRENT', 'CURRENT_CATALOG', 'CURRENT_DATE', 'CURRENT_ROLE', 'CURRENT_SCHEMA', 'CURRENT_TIME', 'CURRENT_TIMESTAMP', 'CURRENT_USER', 'CURSOR', 'CYCLE', 'DATA', 'DATABASE', 'DAY', 'DEALLOCATE', 'DEC', 'DECIMAL', 'DECLARE', 'DEFAULT', 'DEFAULTS', 'DEFERRABLE', 'DEFERRED', 'DEFINER', 'DELETE', 'DELIMITER', 'DELIMITERS', 'DEPENDS', 'DESC', 'DETACH', 'DICTIONARY', 'DISABLE', 'DISCARD', 'DISTINCT', 'DO', 'DOCUMENT', 'DOMAIN', 'DOUBLE', 'DROP', 'EACH', 'ELSE', 'ENABLE', 'ENCODING', 'ENCRYPTED', 'END', 'ENUM', 'ESCAPE', 'EVENT', 'EXCEPT', 'EXCLUDE', 'EXCLUDING', 'EXCLUSIVE', 'EXECUTE', 'EXISTS', 'EXPLAIN', 'EXPRESSION', 'EXTENSION', 'EXTERNAL', 'EXTRACT', 'FALSE', 'FAMILY', 'FETCH', 'FILTER', 'FIRST', 'FLOAT', 'FOLLOWING', 'FOR', 'FORCE', 'FOREIGN', 'FORWARD', 'FREEZE', 'FROM', 'FULL', 'FUNCTION', 'FUNCTIONS', 'GENERATED', 'GLOBAL', 'GRANT', 'GRANTED', 'GREATEST', 'GROUP', 'GROUPING', 'GROUPS', 'HANDLER', 'HAVING', 'HEADER', 'HOLD', 'HOUR', 'IDENTITY', 'IF', 'ILIKE', 'IMMEDIATE', 'IMMUTABLE', 'IMPLICIT', 'IMPORT', 'IN', 'INCLUDE', 'INCLUDING', 'INCREMENT', 'INDEX', 'INDEXES', 'INHERIT', 'INHERITS', 'INITIALLY', 'INLINE', 'INNER', 'INOUT', 'INPUT', 'INSENSITIVE', 'INSERT', 'INSTEAD', 'INT', 'INTEGER', 'INTERSECT', 'INTERVAL', 'INTO', 'INVOKER', 'IS', 'ISNULL', 'ISOLATION', 'JOIN', 'KEY', 'LABEL', 'LANGUAGE', 'LARGE', 'LAST', 'LATERAL', 'LEADING', 'LEAKPROOF', 'LEAST', 'LEFT', 'LEVEL', 'LIKE', 'LIMIT', 'LISTEN', 'LOAD', 'LOCAL', 'LOCALTIME', 'LOCALTIMESTAMP', 'LOCATION', 'LOCK', 'LOCKED', 'LOGGED', 'MAPPING', 'MATCH', 'MATERIALIZED', 'MAXVALUE', 'METHOD', 'MINUTE', 'MINVALUE', 'MODE', 'MONTH', 'MOVE', 'NAME', 'NAMES', 'NATIONAL', 'NATURAL', 'NCHAR', 'NEW', 'NEXT', 'NFC', 'NFD', 'NFKC', 'NFKD', 'NO', 'NONE', 'NORMALIZE', 'NORMALIZED', 'NOT', 'NOTHING', 'NOTIFY', 'NOTNULL', 'NOWAIT', 'NULL', 'NULLIF', 'NULLS', 'NUMERIC', 'OBJECT', 'OF', 'OFF', 'OFFSET', 'OIDS', 'OLD', 'ON', 'ONLY', 'OPERATOR', 'OPTION', 'OPTIONS', 'OR', 'ORDER', 'ORDINALITY', 'OTHERS', 'OUT', 'OUTER', 'OVER', 'OVERLAPS', 'OVERLAY', 'OVERRIDING', 'OWNED', 'OWNER', 'PARALLEL', 'PARSER', 'PARTIAL', 'PARTITION', 'PASSING', 'PASSWORD', 'PLACING', 'PLANS', 'POLICY', 'POSITION', 'PRECEDING', 'PRECISION', 'PREPARE', 'PREPARED', 'PRESERVE', 'PRIMARY', 'PRIOR', 'PRIVILEGES', 'PROCEDURAL', 'PROCEDURE', 'PROCEDURES', 'PROGRAM', 'PUBLICATION', 'QUOTE', 'RANGE', 'READ', 'REAL', 'REASSIGN', 'RECHECK', 'RECURSIVE', 'REF', 'REFERENCES', 'REFERENCING', 'REFRESH', 'REINDEX', 'RELATIVE', 'RELEASE', 'RENAME', 'REPEATABLE', 'REPLACE', 'REPLICA', 'RESET', 'RESTART', 'RESTRICT', 'RETURNING', 'RETURNS', 'REVOKE', 'RIGHT', 'ROLE', 'ROLLBACK', 'ROLLUP', 'ROUTINE', 'ROUTINES', 'ROW', 'ROWS', 'RULE', 'SAVEPOINT', 'SCHEMA', 'SCHEMAS', 'SCROLL', 'SEARCH', 'SECOND', 'SECURITY', 'SELECT', 'SEQUENCE', 'SEQUENCES', 'SERIALIZABLE', 'SERVER', 'SESSION', 'SESSION_USER', 'SET', 'SETOF', 'SETS', 'SHARE', 'SHOW', 'SIMILAR', 'SIMPLE', 'SKIP', 'SMALLINT', 'SNAPSHOT', 'SOME', 'SQL', 'STABLE', 'STANDALONE', 'START', 'STATEMENT', 'STATISTICS', 'STDIN', 'STDOUT', 'STORAGE', 'STORED', 'STRICT', 'STRIP', 'SUBSCRIPTION', 'SUBSTRING', 'SUPPORT', 'SYMMETRIC', 'SYSID', 'SYSTEM', 'TABLE', 'TABLES', 'TABLESAMPLE', 'TABLESPACE', 'TEMP', 'TEMPLATE', 'TEMPORARY', 'TEXT', 'THEN', 'TIES', 'TIME', 'TIMESTAMP', 'TO', 'TRAILING', 'TRANSACTION', 'TRANSFORM', 'TREAT', 'TRIGGER', 'TRIM', 'TRUE', 'TRUNCATE', 'TRUSTED', 'TYPE', 'TYPES', 'UESCAPE', 'UNBOUNDED', 'UNCOMMITTED', 'UNENCRYPTED', 'UNION', 'UNIQUE', 'UNKNOWN', 'UNLISTEN', 'UNLOGGED', 'UNTIL', 'UPDATE', 'USER', 'USING', 'VACUUM', 'VALID', 'VALIDATE', 'VALIDATOR', 'VALUE', 'VALUES', 'VARCHAR', 'VARIADIC', 'VARYING', 'VERBOSE', 'VERSION', 'VIEW', 'VIEWS', 'VOLATILE', 'WHEN', 'WHERE', 'WHITESPACE', 'WINDOW', 'WITH', 'WITHIN', 'WITHOUT', 'WORK', 'WRAPPER', 'WRITE', 'XML', 'XMLATTRIBUTES', 'XMLCONCAT', 'XMLELEMENT', 'XMLEXISTS', 'XMLFOREST', 'XMLNAMESPACES', 'XMLPARSE', 'XMLPI', 'XMLROOT', 'XMLSERIALIZE', 'XMLTABLE', 'YEAR', 'YES', 'ZONE'];\nvar reservedTopLevelWords = ['ADD', 'AFTER', 'ALTER COLUMN', 'ALTER TABLE', 'CASE', 'DELETE FROM', 'END', 'EXCEPT', 'FETCH FIRST', 'FROM', 'GROUP BY', 'HAVING', 'INSERT INTO', 'INSERT', 'LIMIT', 'ORDER BY', 'SELECT', 'SET CURRENT SCHEMA', 'SET SCHEMA', 'SET', 'UPDATE', 'VALUES', 'WHERE'];\nvar reservedTopLevelWordsNoIndent = ['INTERSECT', 'INTERSECT ALL', 'UNION', 'UNION ALL'];\nvar reservedNewlineWords = ['AND', 'ELSE', 'OR', 'WHEN', // joins\n'JOIN', 'INNER JOIN', 'LEFT JOIN', 'LEFT OUTER JOIN', 'RIGHT JOIN', 'RIGHT OUTER JOIN', 'FULL JOIN', 'FULL OUTER JOIN', 'CROSS JOIN', 'NATURAL JOIN'];\n\nvar PostgreSqlFormatter = /*#__PURE__*/function (_Formatter) {\n _inherits(PostgreSqlFormatter, _Formatter);\n\n var _super = _createSuper(PostgreSqlFormatter);\n\n function PostgreSqlFormatter() {\n _classCallCheck(this, PostgreSqlFormatter);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(PostgreSqlFormatter, [{\n key: \"tokenizer\",\n value: function tokenizer() {\n return new _Tokenizer[\"default\"]({\n reservedWords: reservedWords,\n reservedTopLevelWords: reservedTopLevelWords,\n reservedNewlineWords: reservedNewlineWords,\n reservedTopLevelWordsNoIndent: reservedTopLevelWordsNoIndent,\n stringTypes: [\"\\\"\\\"\", \"''\", \"U&''\", 'U&\"\"', '$$'],\n openParens: ['(', 'CASE'],\n closeParens: [')', 'END'],\n indexedPlaceholderTypes: ['$'],\n namedPlaceholderTypes: [':'],\n lineCommentTypes: ['--'],\n operators: ['!=', '<<', '>>', '||/', '|/', '::', '->>', '->', '~~*', '~~', '!~~*', '!~~', '~*', '!~*', '!~', '!!']\n });\n }\n }]);\n\n return PostgreSqlFormatter;\n}(_Formatter2[\"default\"]);\n\nexports[\"default\"] = PostgreSqlFormatter;\nmodule.exports = exports.default;","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _Formatter2 = _interopRequireDefault(require(\"../core/Formatter\"));\n\nvar _Tokenizer = _interopRequireDefault(require(\"../core/Tokenizer\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar reservedWords = ['AES128', 'AES256', 'ALLOWOVERWRITE', 'ANALYSE', 'ARRAY', 'AS', 'ASC', 'AUTHORIZATION', 'BACKUP', 'BINARY', 'BLANKSASNULL', 'BOTH', 'BYTEDICT', 'BZIP2', 'CAST', 'CHECK', 'COLLATE', 'COLUMN', 'CONSTRAINT', 'CREATE', 'CREDENTIALS', 'CURRENT_DATE', 'CURRENT_TIME', 'CURRENT_TIMESTAMP', 'CURRENT_USER', 'CURRENT_USER_ID', 'DEFAULT', 'DEFERRABLE', 'DEFLATE', 'DEFRAG', 'DELTA', 'DELTA32K', 'DESC', 'DISABLE', 'DISTINCT', 'DO', 'ELSE', 'EMPTYASNULL', 'ENABLE', 'ENCODE', 'ENCRYPT', 'ENCRYPTION', 'END', 'EXPLICIT', 'FALSE', 'FOR', 'FOREIGN', 'FREEZE', 'FULL', 'GLOBALDICT256', 'GLOBALDICT64K', 'GRANT', 'GZIP', 'IDENTITY', 'IGNORE', 'ILIKE', 'INITIALLY', 'INTO', 'LEADING', 'LOCALTIME', 'LOCALTIMESTAMP', 'LUN', 'LUNS', 'LZO', 'LZOP', 'MINUS', 'MOSTLY13', 'MOSTLY32', 'MOSTLY8', 'NATURAL', 'NEW', 'NULLS', 'OFF', 'OFFLINE', 'OFFSET', 'OLD', 'ON', 'ONLY', 'OPEN', 'ORDER', 'OVERLAPS', 'PARALLEL', 'PARTITION', 'PERCENT', 'PERMISSIONS', 'PLACING', 'PRIMARY', 'RAW', 'READRATIO', 'RECOVER', 'REFERENCES', 'REJECTLOG', 'RESORT', 'RESTORE', 'SESSION_USER', 'SIMILAR', 'SYSDATE', 'SYSTEM', 'TABLE', 'TAG', 'TDES', 'TEXT255', 'TEXT32K', 'THEN', 'TIMESTAMP', 'TO', 'TOP', 'TRAILING', 'TRUE', 'TRUNCATECOLUMNS', 'UNIQUE', 'USER', 'USING', 'VERBOSE', 'WALLET', 'WHEN', 'WITH', 'WITHOUT', 'PREDICATE', 'COLUMNS', 'COMPROWS', 'COMPRESSION', 'COPY', 'FORMAT', 'DELIMITER', 'FIXEDWIDTH', 'AVRO', 'JSON', 'ENCRYPTED', 'BZIP2', 'GZIP', 'LZOP', 'PARQUET', 'ORC', 'ACCEPTANYDATE', 'ACCEPTINVCHARS', 'BLANKSASNULL', 'DATEFORMAT', 'EMPTYASNULL', 'ENCODING', 'ESCAPE', 'EXPLICIT_IDS', 'FILLRECORD', 'IGNOREBLANKLINES', 'IGNOREHEADER', 'NULL AS', 'REMOVEQUOTES', 'ROUNDEC', 'TIMEFORMAT', 'TRIMBLANKS', 'TRUNCATECOLUMNS', 'COMPROWS', 'COMPUPDATE', 'MAXERROR', 'NOLOAD', 'STATUPDATE', 'MANIFEST', 'REGION', 'IAM_ROLE', 'MASTER_SYMMETRIC_KEY', 'SSH', 'ACCEPTANYDATE', 'ACCEPTINVCHARS', 'ACCESS_KEY_ID', 'SECRET_ACCESS_KEY', 'AVRO', 'BLANKSASNULL', 'BZIP2', 'COMPROWS', 'COMPUPDATE', 'CREDENTIALS', 'DATEFORMAT', 'DELIMITER', 'EMPTYASNULL', 'ENCODING', 'ENCRYPTED', 'ESCAPE', 'EXPLICIT_IDS', 'FILLRECORD', 'FIXEDWIDTH', 'FORMAT', 'IAM_ROLE', 'GZIP', 'IGNOREBLANKLINES', 'IGNOREHEADER', 'JSON', 'LZOP', 'MANIFEST', 'MASTER_SYMMETRIC_KEY', 'MAXERROR', 'NOLOAD', 'NULL AS', 'READRATIO', 'REGION', 'REMOVEQUOTES', 'ROUNDEC', 'SSH', 'STATUPDATE', 'TIMEFORMAT', 'SESSION_TOKEN', 'TRIMBLANKS', 'TRUNCATECOLUMNS', 'EXTERNAL', 'DATA CATALOG', 'HIVE METASTORE', 'CATALOG_ROLE', 'VACUUM', 'COPY', 'UNLOAD', 'EVEN', 'ALL'];\nvar reservedTopLevelWords = ['ADD', 'AFTER', 'ALTER COLUMN', 'ALTER TABLE', 'DELETE FROM', 'EXCEPT', 'FROM', 'GROUP BY', 'HAVING', 'INSERT INTO', 'INSERT', 'INTERSECT', 'TOP', 'LIMIT', 'MODIFY', 'ORDER BY', 'SELECT', 'SET CURRENT SCHEMA', 'SET SCHEMA', 'SET', 'UNION ALL', 'UNION', 'UPDATE', 'VALUES', 'WHERE', 'VACUUM', 'COPY', 'UNLOAD', 'ANALYZE', 'ANALYSE', 'DISTKEY', 'SORTKEY', 'COMPOUND', 'INTERLEAVED', 'FORMAT', 'DELIMITER', 'FIXEDWIDTH', 'AVRO', 'JSON', 'ENCRYPTED', 'BZIP2', 'GZIP', 'LZOP', 'PARQUET', 'ORC', 'ACCEPTANYDATE', 'ACCEPTINVCHARS', 'BLANKSASNULL', 'DATEFORMAT', 'EMPTYASNULL', 'ENCODING', 'ESCAPE', 'EXPLICIT_IDS', 'FILLRECORD', 'IGNOREBLANKLINES', 'IGNOREHEADER', 'NULL AS', 'REMOVEQUOTES', 'ROUNDEC', 'TIMEFORMAT', 'TRIMBLANKS', 'TRUNCATECOLUMNS', 'COMPROWS', 'COMPUPDATE', 'MAXERROR', 'NOLOAD', 'STATUPDATE', 'MANIFEST', 'REGION', 'IAM_ROLE', 'MASTER_SYMMETRIC_KEY', 'SSH', 'ACCEPTANYDATE', 'ACCEPTINVCHARS', 'ACCESS_KEY_ID', 'SECRET_ACCESS_KEY', 'AVRO', 'BLANKSASNULL', 'BZIP2', 'COMPROWS', 'COMPUPDATE', 'CREDENTIALS', 'DATEFORMAT', 'DELIMITER', 'EMPTYASNULL', 'ENCODING', 'ENCRYPTED', 'ESCAPE', 'EXPLICIT_IDS', 'FILLRECORD', 'FIXEDWIDTH', 'FORMAT', 'IAM_ROLE', 'GZIP', 'IGNOREBLANKLINES', 'IGNOREHEADER', 'JSON', 'LZOP', 'MANIFEST', 'MASTER_SYMMETRIC_KEY', 'MAXERROR', 'NOLOAD', 'NULL AS', 'READRATIO', 'REGION', 'REMOVEQUOTES', 'ROUNDEC', 'SSH', 'STATUPDATE', 'TIMEFORMAT', 'SESSION_TOKEN', 'TRIMBLANKS', 'TRUNCATECOLUMNS', 'EXTERNAL', 'DATA CATALOG', 'HIVE METASTORE', 'CATALOG_ROLE'];\nvar reservedTopLevelWordsNoIndent = [];\nvar reservedNewlineWords = ['AND', 'ELSE', 'OR', 'OUTER APPLY', 'WHEN', 'VACUUM', 'COPY', 'UNLOAD', 'ANALYZE', 'ANALYSE', 'DISTKEY', 'SORTKEY', 'COMPOUND', 'INTERLEAVED', // joins\n'JOIN', 'INNER JOIN', 'LEFT JOIN', 'LEFT OUTER JOIN', 'RIGHT JOIN', 'RIGHT OUTER JOIN', 'FULL JOIN', 'FULL OUTER JOIN', 'CROSS JOIN', 'NATURAL JOIN'];\n\nvar RedshiftFormatter = /*#__PURE__*/function (_Formatter) {\n _inherits(RedshiftFormatter, _Formatter);\n\n var _super = _createSuper(RedshiftFormatter);\n\n function RedshiftFormatter() {\n _classCallCheck(this, RedshiftFormatter);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(RedshiftFormatter, [{\n key: \"tokenizer\",\n value: function tokenizer() {\n return new _Tokenizer[\"default\"]({\n reservedWords: reservedWords,\n reservedTopLevelWords: reservedTopLevelWords,\n reservedNewlineWords: reservedNewlineWords,\n reservedTopLevelWordsNoIndent: reservedTopLevelWordsNoIndent,\n stringTypes: [\"\\\"\\\"\", \"''\", '``'],\n openParens: ['('],\n closeParens: [')'],\n indexedPlaceholderTypes: ['?'],\n namedPlaceholderTypes: ['@', '#', '$'],\n lineCommentTypes: ['--'],\n operators: ['|/', '||/', '<<', '>>', '!=', '||']\n });\n }\n }]);\n\n return RedshiftFormatter;\n}(_Formatter2[\"default\"]);\n\nexports[\"default\"] = RedshiftFormatter;\nmodule.exports = exports.default;","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _Formatter2 = _interopRequireDefault(require(\"../core/Formatter\"));\n\nvar _token = require(\"../core/token\");\n\nvar _Tokenizer = _interopRequireDefault(require(\"../core/Tokenizer\"));\n\nvar _tokenTypes = _interopRequireDefault(require(\"../core/tokenTypes\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar reservedWords = ['ALL', 'ALTER', 'ANALYSE', 'ANALYZE', 'ARRAY_ZIP', 'ARRAY', 'AS', 'ASC', 'AVG', 'BETWEEN', 'CASCADE', 'CASE', 'CAST', 'COALESCE', 'COLLECT_LIST', 'COLLECT_SET', 'COLUMN', 'COLUMNS', 'COMMENT', 'CONSTRAINT', 'CONTAINS', 'CONVERT', 'COUNT', 'CUME_DIST', 'CURRENT ROW', 'CURRENT_DATE', 'CURRENT_TIMESTAMP', 'DATABASE', 'DATABASES', 'DATE_ADD', 'DATE_SUB', 'DATE_TRUNC', 'DAY_HOUR', 'DAY_MINUTE', 'DAY_SECOND', 'DAY', 'DAYS', 'DECODE', 'DEFAULT', 'DELETE', 'DENSE_RANK', 'DESC', 'DESCRIBE', 'DISTINCT', 'DISTINCTROW', 'DIV', 'DROP', 'ELSE', 'ENCODE', 'END', 'EXISTS', 'EXPLAIN', 'EXPLODE_OUTER', 'EXPLODE', 'FILTER', 'FIRST_VALUE', 'FIRST', 'FIXED', 'FLATTEN', 'FOLLOWING', 'FROM_UNIXTIME', 'FULL', 'GREATEST', 'GROUP_CONCAT', 'HOUR_MINUTE', 'HOUR_SECOND', 'HOUR', 'HOURS', 'IF', 'IFNULL', 'IN', 'INSERT', 'INTERVAL', 'INTO', 'IS', 'LAG', 'LAST_VALUE', 'LAST', 'LEAD', 'LEADING', 'LEAST', 'LEVEL', 'LIKE', 'MAX', 'MERGE', 'MIN', 'MINUTE_SECOND', 'MINUTE', 'MONTH', 'NATURAL', 'NOT', 'NOW()', 'NTILE', 'NULL', 'NULLIF', 'OFFSET', 'ON DELETE', 'ON UPDATE', 'ON', 'ONLY', 'OPTIMIZE', 'OVER', 'PERCENT_RANK', 'PRECEDING', 'RANGE', 'RANK', 'REGEXP', 'RENAME', 'RLIKE', 'ROW', 'ROWS', 'SECOND', 'SEPARATOR', 'SEQUENCE', 'SIZE', 'STRING', 'STRUCT', 'SUM', 'TABLE', 'TABLES', 'TEMPORARY', 'THEN', 'TO_DATE', 'TO_JSON', 'TO', 'TRAILING', 'TRANSFORM', 'TRUE', 'TRUNCATE', 'TYPE', 'TYPES', 'UNBOUNDED', 'UNIQUE', 'UNIX_TIMESTAMP', 'UNLOCK', 'UNSIGNED', 'USING', 'VARIABLES', 'VIEW', 'WHEN', 'WITH', 'YEAR_MONTH'];\nvar reservedTopLevelWords = ['ADD', 'AFTER', 'ALTER COLUMN', 'ALTER DATABASE', 'ALTER SCHEMA', 'ALTER TABLE', 'CLUSTER BY', 'CLUSTERED BY', 'DELETE FROM', 'DISTRIBUTE BY', 'FROM', 'GROUP BY', 'HAVING', 'INSERT INTO', 'INSERT', 'LIMIT', 'OPTIONS', 'ORDER BY', 'PARTITION BY', 'PARTITIONED BY', 'RANGE', 'ROWS', 'SELECT', 'SET CURRENT SCHEMA', 'SET SCHEMA', 'SET', 'TBLPROPERTIES', 'UPDATE', 'USING', 'VALUES', 'WHERE', 'WINDOW'];\nvar reservedTopLevelWordsNoIndent = ['EXCEPT ALL', 'EXCEPT', 'INTERSECT ALL', 'INTERSECT', 'UNION ALL', 'UNION'];\nvar reservedNewlineWords = ['AND', 'CREATE OR', 'CREATE', 'ELSE', 'LATERAL VIEW', 'OR', 'OUTER APPLY', 'WHEN', 'XOR', // joins\n'JOIN', 'INNER JOIN', 'LEFT JOIN', 'LEFT OUTER JOIN', 'RIGHT JOIN', 'RIGHT OUTER JOIN', 'FULL JOIN', 'FULL OUTER JOIN', 'CROSS JOIN', 'NATURAL JOIN', // non-standard-joins\n'ANTI JOIN', 'SEMI JOIN', 'LEFT ANTI JOIN', 'LEFT SEMI JOIN', 'RIGHT OUTER JOIN', 'RIGHT SEMI JOIN', 'NATURAL ANTI JOIN', 'NATURAL FULL OUTER JOIN', 'NATURAL INNER JOIN', 'NATURAL LEFT ANTI JOIN', 'NATURAL LEFT OUTER JOIN', 'NATURAL LEFT SEMI JOIN', 'NATURAL OUTER JOIN', 'NATURAL RIGHT OUTER JOIN', 'NATURAL RIGHT SEMI JOIN', 'NATURAL SEMI JOIN'];\n\nvar SparkSqlFormatter = /*#__PURE__*/function (_Formatter) {\n _inherits(SparkSqlFormatter, _Formatter);\n\n var _super = _createSuper(SparkSqlFormatter);\n\n function SparkSqlFormatter() {\n _classCallCheck(this, SparkSqlFormatter);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(SparkSqlFormatter, [{\n key: \"tokenizer\",\n value: function tokenizer() {\n return new _Tokenizer[\"default\"]({\n reservedWords: reservedWords,\n reservedTopLevelWords: reservedTopLevelWords,\n reservedNewlineWords: reservedNewlineWords,\n reservedTopLevelWordsNoIndent: reservedTopLevelWordsNoIndent,\n stringTypes: [\"\\\"\\\"\", \"''\", '``', '{}'],\n openParens: ['(', 'CASE'],\n closeParens: [')', 'END'],\n indexedPlaceholderTypes: ['?'],\n namedPlaceholderTypes: ['$'],\n lineCommentTypes: ['--'],\n operators: ['!=', '<=>', '&&', '||', '==']\n });\n }\n }, {\n key: \"tokenOverride\",\n value: function tokenOverride(token) {\n // Fix cases where names are ambiguously keywords or functions\n if ((0, _token.isWindow)(token)) {\n var aheadToken = this.tokenLookAhead();\n\n if (aheadToken && aheadToken.type === _tokenTypes[\"default\"].OPEN_PAREN) {\n // This is a function call, treat it as a reserved word\n return {\n type: _tokenTypes[\"default\"].RESERVED,\n value: token.value\n };\n }\n } // Fix cases where names are ambiguously keywords or properties\n\n\n if ((0, _token.isEnd)(token)) {\n var backToken = this.tokenLookBehind();\n\n if (backToken && backToken.type === _tokenTypes[\"default\"].OPERATOR && backToken.value === '.') {\n // This is window().end (or similar) not CASE ... END\n return {\n type: _tokenTypes[\"default\"].WORD,\n value: token.value\n };\n }\n }\n\n return token;\n }\n }]);\n\n return SparkSqlFormatter;\n}(_Formatter2[\"default\"]);\n\nexports[\"default\"] = SparkSqlFormatter;\nmodule.exports = exports.default;","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _Formatter2 = _interopRequireDefault(require(\"../core/Formatter\"));\n\nvar _Tokenizer = _interopRequireDefault(require(\"../core/Tokenizer\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n// https://jakewheat.github.io/sql-overview/sql-2008-foundation-grammar.html#reserved-word\nvar reservedWords = ['ABS', 'ALL', 'ALLOCATE', 'ALTER', 'AND', 'ANY', 'ARE', 'ARRAY', 'AS', 'ASENSITIVE', 'ASYMMETRIC', 'AT', 'ATOMIC', 'AUTHORIZATION', 'AVG', 'BEGIN', 'BETWEEN', 'BIGINT', 'BINARY', 'BLOB', 'BOOLEAN', 'BOTH', 'BY', 'CALL', 'CALLED', 'CARDINALITY', 'CASCADED', 'CASE', 'CAST', 'CEIL', 'CEILING', 'CHAR', 'CHAR_LENGTH', 'CHARACTER', 'CHARACTER_LENGTH', 'CHECK', 'CLOB', 'CLOSE', 'COALESCE', 'COLLATE', 'COLLECT', 'COLUMN', 'COMMIT', 'CONDITION', 'CONNECT', 'CONSTRAINT', 'CONVERT', 'CORR', 'CORRESPONDING', 'COUNT', 'COVAR_POP', 'COVAR_SAMP', 'CREATE', 'CROSS', 'CUBE', 'CUME_DIST', 'CURRENT', 'CURRENT_CATALOG', 'CURRENT_DATE', 'CURRENT_DEFAULT_TRANSFORM_GROUP', 'CURRENT_PATH', 'CURRENT_ROLE', 'CURRENT_SCHEMA', 'CURRENT_TIME', 'CURRENT_TIMESTAMP', 'CURRENT_TRANSFORM_GROUP_FOR_TYPE', 'CURRENT_USER', 'CURSOR', 'CYCLE', 'DATE', 'DAY', 'DEALLOCATE', 'DEC', 'DECIMAL', 'DECLARE', 'DEFAULT', 'DELETE', 'DENSE_RANK', 'DEREF', 'DESCRIBE', 'DETERMINISTIC', 'DISCONNECT', 'DISTINCT', 'DOUBLE', 'DROP', 'DYNAMIC', 'EACH', 'ELEMENT', 'ELSE', 'END', 'END-EXEC', 'ESCAPE', 'EVERY', 'EXCEPT', 'EXEC', 'EXECUTE', 'EXISTS', 'EXP', 'EXTERNAL', 'EXTRACT', 'FALSE', 'FETCH', 'FILTER', 'FLOAT', 'FLOOR', 'FOR', 'FOREIGN', 'FREE', 'FROM', 'FULL', 'FUNCTION', 'FUSION', 'GET', 'GLOBAL', 'GRANT', 'GROUP', 'GROUPING', 'HAVING', 'HOLD', 'HOUR', 'IDENTITY', 'IN', 'INDICATOR', 'INNER', 'INOUT', 'INSENSITIVE', 'INSERT', 'INT', 'INTEGER', 'INTERSECT', 'INTERSECTION', 'INTERVAL', 'INTO', 'IS', 'JOIN', 'LANGUAGE', 'LARGE', 'LATERAL', 'LEADING', 'LEFT', 'LIKE', 'LIKE_REGEX', 'LN', 'LOCAL', 'LOCALTIME', 'LOCALTIMESTAMP', 'LOWER', 'MATCH', 'MAX', 'MEMBER', 'MERGE', 'METHOD', 'MIN', 'MINUTE', 'MOD', 'MODIFIES', 'MODULE', 'MONTH', 'MULTISET', 'NATIONAL', 'NATURAL', 'NCHAR', 'NCLOB', 'NEW', 'NO', 'NONE', 'NORMALIZE', 'NOT', 'NULL', 'NULLIF', 'NUMERIC', 'OCTET_LENGTH', 'OCCURRENCES_REGEX', 'OF', 'OLD', 'ON', 'ONLY', 'OPEN', 'OR', 'ORDER', 'OUT', 'OUTER', 'OVER', 'OVERLAPS', 'OVERLAY', 'PARAMETER', 'PARTITION', 'PERCENT_RANK', 'PERCENTILE_CONT', 'PERCENTILE_DISC', 'POSITION', 'POSITION_REGEX', 'POWER', 'PRECISION', 'PREPARE', 'PRIMARY', 'PROCEDURE', 'RANGE', 'RANK', 'READS', 'REAL', 'RECURSIVE', 'REF', 'REFERENCES', 'REFERENCING', 'REGR_AVGX', 'REGR_AVGY', 'REGR_COUNT', 'REGR_INTERCEPT', 'REGR_R2', 'REGR_SLOPE', 'REGR_SXX', 'REGR_SXY', 'REGR_SYY', 'RELEASE', 'RESULT', 'RETURN', 'RETURNS', 'REVOKE', 'RIGHT', 'ROLLBACK', 'ROLLUP', 'ROW', 'ROW_NUMBER', 'ROWS', 'SAVEPOINT', 'SCOPE', 'SCROLL', 'SEARCH', 'SECOND', 'SELECT', 'SENSITIVE', 'SESSION_USER', 'SET', 'SIMILAR', 'SMALLINT', 'SOME', 'SPECIFIC', 'SPECIFICTYPE', 'SQL', 'SQLEXCEPTION', 'SQLSTATE', 'SQLWARNING', 'SQRT', 'START', 'STATIC', 'STDDEV_POP', 'STDDEV_SAMP', 'SUBMULTISET', 'SUBSTRING', 'SUBSTRING_REGEX', 'SUM', 'SYMMETRIC', 'SYSTEM', 'SYSTEM_USER', 'TABLE', 'TABLESAMPLE', 'THEN', 'TIME', 'TIMESTAMP', 'TIMEZONE_HOUR', 'TIMEZONE_MINUTE', 'TO', 'TRAILING', 'TRANSLATE', 'TRANSLATE_REGEX', 'TRANSLATION', 'TREAT', 'TRIGGER', 'TRIM', 'TRUE', 'UESCAPE', 'UNION', 'UNIQUE', 'UNKNOWN', 'UNNEST', 'UPDATE', 'UPPER', 'USER', 'USING', 'VALUE', 'VALUES', 'VAR_POP', 'VAR_SAMP', 'VARBINARY', 'VARCHAR', 'VARYING', 'WHEN', 'WHENEVER', 'WHERE', 'WIDTH_BUCKET', 'WINDOW', 'WITH', 'WITHIN', 'WITHOUT', 'YEAR'];\nvar reservedTopLevelWords = ['ADD', 'ALTER COLUMN', 'ALTER TABLE', 'CASE', 'DELETE FROM', 'END', 'FETCH FIRST', 'FETCH NEXT', 'FETCH PRIOR', 'FETCH LAST', 'FETCH ABSOLUTE', 'FETCH RELATIVE', 'FROM', 'GROUP BY', 'HAVING', 'INSERT INTO', 'LIMIT', 'ORDER BY', 'SELECT', 'SET SCHEMA', 'SET', 'UPDATE', 'VALUES', 'WHERE'];\nvar reservedTopLevelWordsNoIndent = ['INTERSECT', 'INTERSECT ALL', 'INTERSECT DISTINCT', 'UNION', 'UNION ALL', 'UNION DISTINCT', 'EXCEPT', 'EXCEPT ALL', 'EXCEPT DISTINCT'];\nvar reservedNewlineWords = ['AND', 'ELSE', 'OR', 'WHEN', // joins\n'JOIN', 'INNER JOIN', 'LEFT JOIN', 'LEFT OUTER JOIN', 'RIGHT JOIN', 'RIGHT OUTER JOIN', 'FULL JOIN', 'FULL OUTER JOIN', 'CROSS JOIN', 'NATURAL JOIN'];\n\nvar StandardSqlFormatter = /*#__PURE__*/function (_Formatter) {\n _inherits(StandardSqlFormatter, _Formatter);\n\n var _super = _createSuper(StandardSqlFormatter);\n\n function StandardSqlFormatter() {\n _classCallCheck(this, StandardSqlFormatter);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(StandardSqlFormatter, [{\n key: \"tokenizer\",\n value: function tokenizer() {\n return new _Tokenizer[\"default\"]({\n reservedWords: reservedWords,\n reservedTopLevelWords: reservedTopLevelWords,\n reservedNewlineWords: reservedNewlineWords,\n reservedTopLevelWordsNoIndent: reservedTopLevelWordsNoIndent,\n stringTypes: [\"\\\"\\\"\", \"''\"],\n openParens: ['(', 'CASE'],\n closeParens: [')', 'END'],\n indexedPlaceholderTypes: ['?'],\n namedPlaceholderTypes: [],\n lineCommentTypes: ['--']\n });\n }\n }]);\n\n return StandardSqlFormatter;\n}(_Formatter2[\"default\"]);\n\nexports[\"default\"] = StandardSqlFormatter;\nmodule.exports = exports.default;","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _Formatter2 = _interopRequireDefault(require(\"../core/Formatter\"));\n\nvar _Tokenizer = _interopRequireDefault(require(\"../core/Tokenizer\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar reservedWords = ['ADD', 'EXTERNAL', 'PROCEDURE', 'ALL', 'FETCH', 'PUBLIC', 'ALTER', 'FILE', 'RAISERROR', 'AND', 'FILLFACTOR', 'READ', 'ANY', 'FOR', 'READTEXT', 'AS', 'FOREIGN', 'RECONFIGURE', 'ASC', 'FREETEXT', 'REFERENCES', 'AUTHORIZATION', 'FREETEXTTABLE', 'REPLICATION', 'BACKUP', 'FROM', 'RESTORE', 'BEGIN', 'FULL', 'RESTRICT', 'BETWEEN', 'FUNCTION', 'RETURN', 'BREAK', 'GOTO', 'REVERT', 'BROWSE', 'GRANT', 'REVOKE', 'BULK', 'GROUP', 'RIGHT', 'BY', 'HAVING', 'ROLLBACK', 'CASCADE', 'HOLDLOCK', 'ROWCOUNT', 'CASE', 'IDENTITY', 'ROWGUIDCOL', 'CHECK', 'IDENTITY_INSERT', 'RULE', 'CHECKPOINT', 'IDENTITYCOL', 'SAVE', 'CLOSE', 'IF', 'SCHEMA', 'CLUSTERED', 'IN', 'SECURITYAUDIT', 'COALESCE', 'INDEX', 'SELECT', 'COLLATE', 'INNER', 'SEMANTICKEYPHRASETABLE', 'COLUMN', 'INSERT', 'SEMANTICSIMILARITYDETAILSTABLE', 'COMMIT', 'INTERSECT', 'SEMANTICSIMILARITYTABLE', 'COMPUTE', 'INTO', 'SESSION_USER', 'CONSTRAINT', 'IS', 'SET', 'CONTAINS', 'JOIN', 'SETUSER', 'CONTAINSTABLE', 'KEY', 'SHUTDOWN', 'CONTINUE', 'KILL', 'SOME', 'CONVERT', 'LEFT', 'STATISTICS', 'CREATE', 'LIKE', 'SYSTEM_USER', 'CROSS', 'LINENO', 'TABLE', 'CURRENT', 'LOAD', 'TABLESAMPLE', 'CURRENT_DATE', 'MERGE', 'TEXTSIZE', 'CURRENT_TIME', 'NATIONAL', 'THEN', 'CURRENT_TIMESTAMP', 'NOCHECK', 'TO', 'CURRENT_USER', 'NONCLUSTERED', 'TOP', 'CURSOR', 'NOT', 'TRAN', 'DATABASE', 'NULL', 'TRANSACTION', 'DBCC', 'NULLIF', 'TRIGGER', 'DEALLOCATE', 'OF', 'TRUNCATE', 'DECLARE', 'OFF', 'TRY_CONVERT', 'DEFAULT', 'OFFSETS', 'TSEQUAL', 'DELETE', 'ON', 'UNION', 'DENY', 'OPEN', 'UNIQUE', 'DESC', 'OPENDATASOURCE', 'UNPIVOT', 'DISK', 'OPENQUERY', 'UPDATE', 'DISTINCT', 'OPENROWSET', 'UPDATETEXT', 'DISTRIBUTED', 'OPENXML', 'USE', 'DOUBLE', 'OPTION', 'USER', 'DROP', 'OR', 'VALUES', 'DUMP', 'ORDER', 'VARYING', 'ELSE', 'OUTER', 'VIEW', 'END', 'OVER', 'WAITFOR', 'ERRLVL', 'PERCENT', 'WHEN', 'ESCAPE', 'PIVOT', 'WHERE', 'EXCEPT', 'PLAN', 'WHILE', 'EXEC', 'PRECISION', 'WITH', 'EXECUTE', 'PRIMARY', 'WITHIN GROUP', 'EXISTS', 'PRINT', 'WRITETEXT', 'EXIT', 'PROC'];\nvar reservedTopLevelWords = ['ADD', 'ALTER COLUMN', 'ALTER TABLE', 'CASE', 'DELETE FROM', 'END', 'EXCEPT', 'FROM', 'GROUP BY', 'HAVING', 'INSERT INTO', 'INSERT', 'LIMIT', 'ORDER BY', 'SELECT', 'SET CURRENT SCHEMA', 'SET SCHEMA', 'SET', 'UPDATE', 'VALUES', 'WHERE'];\nvar reservedTopLevelWordsNoIndent = ['INTERSECT', 'INTERSECT ALL', 'MINUS', 'UNION', 'UNION ALL'];\nvar reservedNewlineWords = ['AND', 'ELSE', 'OR', 'WHEN', // joins\n'JOIN', 'INNER JOIN', 'LEFT JOIN', 'LEFT OUTER JOIN', 'RIGHT JOIN', 'RIGHT OUTER JOIN', 'FULL JOIN', 'FULL OUTER JOIN', 'CROSS JOIN'];\n\nvar TSqlFormatter = /*#__PURE__*/function (_Formatter) {\n _inherits(TSqlFormatter, _Formatter);\n\n var _super = _createSuper(TSqlFormatter);\n\n function TSqlFormatter() {\n _classCallCheck(this, TSqlFormatter);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(TSqlFormatter, [{\n key: \"tokenizer\",\n value: function tokenizer() {\n return new _Tokenizer[\"default\"]({\n reservedWords: reservedWords,\n reservedTopLevelWords: reservedTopLevelWords,\n reservedNewlineWords: reservedNewlineWords,\n reservedTopLevelWordsNoIndent: reservedTopLevelWordsNoIndent,\n stringTypes: [\"\\\"\\\"\", \"N''\", \"''\", '[]'],\n openParens: ['(', 'CASE'],\n closeParens: [')', 'END'],\n indexedPlaceholderTypes: [],\n namedPlaceholderTypes: ['@'],\n lineCommentTypes: ['--'],\n specialWordChars: ['#', '@'],\n operators: ['>=', '<=', '<>', '!=', '!<', '!>', '+=', '-=', '*=', '/=', '%=', '|=', '&=', '^=', '::'] // TODO: Support for money constants\n\n });\n }\n }]);\n\n return TSqlFormatter;\n}(_Formatter2[\"default\"]);\n\nexports[\"default\"] = TSqlFormatter;\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.supportedDialects = exports.format = void 0;\n\nvar _Db2Formatter = _interopRequireDefault(require(\"./languages/Db2Formatter\"));\n\nvar _MariaDbFormatter = _interopRequireDefault(require(\"./languages/MariaDbFormatter\"));\n\nvar _MySqlFormatter = _interopRequireDefault(require(\"./languages/MySqlFormatter\"));\n\nvar _N1qlFormatter = _interopRequireDefault(require(\"./languages/N1qlFormatter\"));\n\nvar _PlSqlFormatter = _interopRequireDefault(require(\"./languages/PlSqlFormatter\"));\n\nvar _PostgreSqlFormatter = _interopRequireDefault(require(\"./languages/PostgreSqlFormatter\"));\n\nvar _RedshiftFormatter = _interopRequireDefault(require(\"./languages/RedshiftFormatter\"));\n\nvar _SparkSqlFormatter = _interopRequireDefault(require(\"./languages/SparkSqlFormatter\"));\n\nvar _StandardSqlFormatter = _interopRequireDefault(require(\"./languages/StandardSqlFormatter\"));\n\nvar _TSqlFormatter = _interopRequireDefault(require(\"./languages/TSqlFormatter\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar formatters = {\n db2: _Db2Formatter[\"default\"],\n mariadb: _MariaDbFormatter[\"default\"],\n mysql: _MySqlFormatter[\"default\"],\n n1ql: _N1qlFormatter[\"default\"],\n plsql: _PlSqlFormatter[\"default\"],\n postgresql: _PostgreSqlFormatter[\"default\"],\n redshift: _RedshiftFormatter[\"default\"],\n spark: _SparkSqlFormatter[\"default\"],\n sql: _StandardSqlFormatter[\"default\"],\n tsql: _TSqlFormatter[\"default\"]\n};\n/**\n * Format whitespace in a query to make it easier to read.\n *\n * @param {String} query\n * @param {Object} cfg\n * @param {String} cfg.language Query language, default is Standard SQL\n * @param {String} cfg.indent Characters used for indentation, default is \" \" (2 spaces)\n * @param {Boolean} cfg.uppercase Converts keywords to uppercase\n * @param {Integer} cfg.linesBetweenQueries How many line breaks between queries\n * @param {Object} cfg.params Collection of params for placeholder replacement\n * @return {String}\n */\n\nvar format = function format(query) {\n var cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (typeof query !== 'string') {\n throw new Error('Invalid query argument. Extected string, instead got ' + _typeof(query));\n }\n\n var Formatter = _StandardSqlFormatter[\"default\"];\n\n if (cfg.language !== undefined) {\n Formatter = formatters[cfg.language];\n }\n\n if (Formatter === undefined) {\n throw Error(\"Unsupported SQL dialect: \".concat(cfg.language));\n }\n\n return new Formatter(cfg).format(query);\n};\n\nexports.format = format;\nvar supportedDialects = Object.keys(formatters);\nexports.supportedDialects = supportedDialects;","/* eslint-disable no-multi-assign */\n\nfunction deepFreeze(obj) {\n if (obj instanceof Map) {\n obj.clear =\n obj.delete =\n obj.set =\n function () {\n throw new Error('map is read-only');\n };\n } else if (obj instanceof Set) {\n obj.add =\n obj.clear =\n obj.delete =\n function () {\n throw new Error('set is read-only');\n };\n }\n\n // Freeze self\n Object.freeze(obj);\n\n Object.getOwnPropertyNames(obj).forEach((name) => {\n const prop = obj[name];\n const type = typeof prop;\n\n // Freeze prop if it is an object or function and also not already frozen\n if ((type === 'object' || type === 'function') && !Object.isFrozen(prop)) {\n deepFreeze(prop);\n }\n });\n\n return obj;\n}\n\n/** @typedef {import('highlight.js').CallbackResponse} CallbackResponse */\n/** @typedef {import('highlight.js').CompiledMode} CompiledMode */\n/** @implements CallbackResponse */\n\nclass Response {\n /**\n * @param {CompiledMode} mode\n */\n constructor(mode) {\n // eslint-disable-next-line no-undefined\n if (mode.data === undefined) mode.data = {};\n\n this.data = mode.data;\n this.isMatchIgnored = false;\n }\n\n ignoreMatch() {\n this.isMatchIgnored = true;\n }\n}\n\n/**\n * @param {string} value\n * @returns {string}\n */\nfunction escapeHTML(value) {\n return value\n .replace(/&/g, '&')\n .replace(//g, '>')\n .replace(/\"/g, '"')\n .replace(/'/g, ''');\n}\n\n/**\n * performs a shallow merge of multiple objects into one\n *\n * @template T\n * @param {T} original\n * @param {Record[]} objects\n * @returns {T} a single new object\n */\nfunction inherit$1(original, ...objects) {\n /** @type Record */\n const result = Object.create(null);\n\n for (const key in original) {\n result[key] = original[key];\n }\n objects.forEach(function(obj) {\n for (const key in obj) {\n result[key] = obj[key];\n }\n });\n return /** @type {T} */ (result);\n}\n\n/**\n * @typedef {object} Renderer\n * @property {(text: string) => void} addText\n * @property {(node: Node) => void} openNode\n * @property {(node: Node) => void} closeNode\n * @property {() => string} value\n */\n\n/** @typedef {{scope?: string, language?: string, sublanguage?: boolean}} Node */\n/** @typedef {{walk: (r: Renderer) => void}} Tree */\n/** */\n\nconst SPAN_CLOSE = '';\n\n/**\n * Determines if a node needs to be wrapped in \n *\n * @param {Node} node */\nconst emitsWrappingTags = (node) => {\n // rarely we can have a sublanguage where language is undefined\n // TODO: track down why\n return !!node.scope;\n};\n\n/**\n *\n * @param {string} name\n * @param {{prefix:string}} options\n */\nconst scopeToCSSClass = (name, { prefix }) => {\n // sub-language\n if (name.startsWith(\"language:\")) {\n return name.replace(\"language:\", \"language-\");\n }\n // tiered scope: comment.line\n if (name.includes(\".\")) {\n const pieces = name.split(\".\");\n return [\n `${prefix}${pieces.shift()}`,\n ...(pieces.map((x, i) => `${x}${\"_\".repeat(i + 1)}`))\n ].join(\" \");\n }\n // simple scope\n return `${prefix}${name}`;\n};\n\n/** @type {Renderer} */\nclass HTMLRenderer {\n /**\n * Creates a new HTMLRenderer\n *\n * @param {Tree} parseTree - the parse tree (must support `walk` API)\n * @param {{classPrefix: string}} options\n */\n constructor(parseTree, options) {\n this.buffer = \"\";\n this.classPrefix = options.classPrefix;\n parseTree.walk(this);\n }\n\n /**\n * Adds texts to the output stream\n *\n * @param {string} text */\n addText(text) {\n this.buffer += escapeHTML(text);\n }\n\n /**\n * Adds a node open to the output stream (if needed)\n *\n * @param {Node} node */\n openNode(node) {\n if (!emitsWrappingTags(node)) return;\n\n const className = scopeToCSSClass(node.scope,\n { prefix: this.classPrefix });\n this.span(className);\n }\n\n /**\n * Adds a node close to the output stream (if needed)\n *\n * @param {Node} node */\n closeNode(node) {\n if (!emitsWrappingTags(node)) return;\n\n this.buffer += SPAN_CLOSE;\n }\n\n /**\n * returns the accumulated buffer\n */\n value() {\n return this.buffer;\n }\n\n // helpers\n\n /**\n * Builds a span element\n *\n * @param {string} className */\n span(className) {\n this.buffer += ``;\n }\n}\n\n/** @typedef {{scope?: string, language?: string, children: Node[]} | string} Node */\n/** @typedef {{scope?: string, language?: string, children: Node[]} } DataNode */\n/** @typedef {import('highlight.js').Emitter} Emitter */\n/** */\n\n/** @returns {DataNode} */\nconst newNode = (opts = {}) => {\n /** @type DataNode */\n const result = { children: [] };\n Object.assign(result, opts);\n return result;\n};\n\nclass TokenTree {\n constructor() {\n /** @type DataNode */\n this.rootNode = newNode();\n this.stack = [this.rootNode];\n }\n\n get top() {\n return this.stack[this.stack.length - 1];\n }\n\n get root() { return this.rootNode; }\n\n /** @param {Node} node */\n add(node) {\n this.top.children.push(node);\n }\n\n /** @param {string} scope */\n openNode(scope) {\n /** @type Node */\n const node = newNode({ scope });\n this.add(node);\n this.stack.push(node);\n }\n\n closeNode() {\n if (this.stack.length > 1) {\n return this.stack.pop();\n }\n // eslint-disable-next-line no-undefined\n return undefined;\n }\n\n closeAllNodes() {\n while (this.closeNode());\n }\n\n toJSON() {\n return JSON.stringify(this.rootNode, null, 4);\n }\n\n /**\n * @typedef { import(\"./html_renderer\").Renderer } Renderer\n * @param {Renderer} builder\n */\n walk(builder) {\n // this does not\n return this.constructor._walk(builder, this.rootNode);\n // this works\n // return TokenTree._walk(builder, this.rootNode);\n }\n\n /**\n * @param {Renderer} builder\n * @param {Node} node\n */\n static _walk(builder, node) {\n if (typeof node === \"string\") {\n builder.addText(node);\n } else if (node.children) {\n builder.openNode(node);\n node.children.forEach((child) => this._walk(builder, child));\n builder.closeNode(node);\n }\n return builder;\n }\n\n /**\n * @param {Node} node\n */\n static _collapse(node) {\n if (typeof node === \"string\") return;\n if (!node.children) return;\n\n if (node.children.every(el => typeof el === \"string\")) {\n // node.text = node.children.join(\"\");\n // delete node.children;\n node.children = [node.children.join(\"\")];\n } else {\n node.children.forEach((child) => {\n TokenTree._collapse(child);\n });\n }\n }\n}\n\n/**\n Currently this is all private API, but this is the minimal API necessary\n that an Emitter must implement to fully support the parser.\n\n Minimal interface:\n\n - addText(text)\n - __addSublanguage(emitter, subLanguageName)\n - startScope(scope)\n - endScope()\n - finalize()\n - toHTML()\n\n*/\n\n/**\n * @implements {Emitter}\n */\nclass TokenTreeEmitter extends TokenTree {\n /**\n * @param {*} options\n */\n constructor(options) {\n super();\n this.options = options;\n }\n\n /**\n * @param {string} text\n */\n addText(text) {\n if (text === \"\") { return; }\n\n this.add(text);\n }\n\n /** @param {string} scope */\n startScope(scope) {\n this.openNode(scope);\n }\n\n endScope() {\n this.closeNode();\n }\n\n /**\n * @param {Emitter & {root: DataNode}} emitter\n * @param {string} name\n */\n __addSublanguage(emitter, name) {\n /** @type DataNode */\n const node = emitter.root;\n if (name) node.scope = `language:${name}`;\n\n this.add(node);\n }\n\n toHTML() {\n const renderer = new HTMLRenderer(this, this.options);\n return renderer.value();\n }\n\n finalize() {\n this.closeAllNodes();\n return true;\n }\n}\n\n/**\n * @param {string} value\n * @returns {RegExp}\n * */\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction source(re) {\n if (!re) return null;\n if (typeof re === \"string\") return re;\n\n return re.source;\n}\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction lookahead(re) {\n return concat('(?=', re, ')');\n}\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction anyNumberOfTimes(re) {\n return concat('(?:', re, ')*');\n}\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction optional(re) {\n return concat('(?:', re, ')?');\n}\n\n/**\n * @param {...(RegExp | string) } args\n * @returns {string}\n */\nfunction concat(...args) {\n const joined = args.map((x) => source(x)).join(\"\");\n return joined;\n}\n\n/**\n * @param { Array } args\n * @returns {object}\n */\nfunction stripOptionsFromArgs(args) {\n const opts = args[args.length - 1];\n\n if (typeof opts === 'object' && opts.constructor === Object) {\n args.splice(args.length - 1, 1);\n return opts;\n } else {\n return {};\n }\n}\n\n/** @typedef { {capture?: boolean} } RegexEitherOptions */\n\n/**\n * Any of the passed expresssions may match\n *\n * Creates a huge this | this | that | that match\n * @param {(RegExp | string)[] | [...(RegExp | string)[], RegexEitherOptions]} args\n * @returns {string}\n */\nfunction either(...args) {\n /** @type { object & {capture?: boolean} } */\n const opts = stripOptionsFromArgs(args);\n const joined = '('\n + (opts.capture ? \"\" : \"?:\")\n + args.map((x) => source(x)).join(\"|\") + \")\";\n return joined;\n}\n\n/**\n * @param {RegExp | string} re\n * @returns {number}\n */\nfunction countMatchGroups(re) {\n return (new RegExp(re.toString() + '|')).exec('').length - 1;\n}\n\n/**\n * Does lexeme start with a regular expression match at the beginning\n * @param {RegExp} re\n * @param {string} lexeme\n */\nfunction startsWith(re, lexeme) {\n const match = re && re.exec(lexeme);\n return match && match.index === 0;\n}\n\n// BACKREF_RE matches an open parenthesis or backreference. To avoid\n// an incorrect parse, it additionally matches the following:\n// - [...] elements, where the meaning of parentheses and escapes change\n// - other escape sequences, so we do not misparse escape sequences as\n// interesting elements\n// - non-matching or lookahead parentheses, which do not capture. These\n// follow the '(' with a '?'.\nconst BACKREF_RE = /\\[(?:[^\\\\\\]]|\\\\.)*\\]|\\(\\??|\\\\([1-9][0-9]*)|\\\\./;\n\n// **INTERNAL** Not intended for outside usage\n// join logically computes regexps.join(separator), but fixes the\n// backreferences so they continue to match.\n// it also places each individual regular expression into it's own\n// match group, keeping track of the sequencing of those match groups\n// is currently an exercise for the caller. :-)\n/**\n * @param {(string | RegExp)[]} regexps\n * @param {{joinWith: string}} opts\n * @returns {string}\n */\nfunction _rewriteBackreferences(regexps, { joinWith }) {\n let numCaptures = 0;\n\n return regexps.map((regex) => {\n numCaptures += 1;\n const offset = numCaptures;\n let re = source(regex);\n let out = '';\n\n while (re.length > 0) {\n const match = BACKREF_RE.exec(re);\n if (!match) {\n out += re;\n break;\n }\n out += re.substring(0, match.index);\n re = re.substring(match.index + match[0].length);\n if (match[0][0] === '\\\\' && match[1]) {\n // Adjust the backreference.\n out += '\\\\' + String(Number(match[1]) + offset);\n } else {\n out += match[0];\n if (match[0] === '(') {\n numCaptures++;\n }\n }\n }\n return out;\n }).map(re => `(${re})`).join(joinWith);\n}\n\n/** @typedef {import('highlight.js').Mode} Mode */\n/** @typedef {import('highlight.js').ModeCallback} ModeCallback */\n\n// Common regexps\nconst MATCH_NOTHING_RE = /\\b\\B/;\nconst IDENT_RE = '[a-zA-Z]\\\\w*';\nconst UNDERSCORE_IDENT_RE = '[a-zA-Z_]\\\\w*';\nconst NUMBER_RE = '\\\\b\\\\d+(\\\\.\\\\d+)?';\nconst C_NUMBER_RE = '(-?)(\\\\b0[xX][a-fA-F0-9]+|(\\\\b\\\\d+(\\\\.\\\\d*)?|\\\\.\\\\d+)([eE][-+]?\\\\d+)?)'; // 0x..., 0..., decimal, float\nconst BINARY_NUMBER_RE = '\\\\b(0b[01]+)'; // 0b...\nconst RE_STARTERS_RE = '!|!=|!==|%|%=|&|&&|&=|\\\\*|\\\\*=|\\\\+|\\\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\\\?|\\\\[|\\\\{|\\\\(|\\\\^|\\\\^=|\\\\||\\\\|=|\\\\|\\\\||~';\n\n/**\n* @param { Partial & {binary?: string | RegExp} } opts\n*/\nconst SHEBANG = (opts = {}) => {\n const beginShebang = /^#![ ]*\\//;\n if (opts.binary) {\n opts.begin = concat(\n beginShebang,\n /.*\\b/,\n opts.binary,\n /\\b.*/);\n }\n return inherit$1({\n scope: 'meta',\n begin: beginShebang,\n end: /$/,\n relevance: 0,\n /** @type {ModeCallback} */\n \"on:begin\": (m, resp) => {\n if (m.index !== 0) resp.ignoreMatch();\n }\n }, opts);\n};\n\n// Common modes\nconst BACKSLASH_ESCAPE = {\n begin: '\\\\\\\\[\\\\s\\\\S]', relevance: 0\n};\nconst APOS_STRING_MODE = {\n scope: 'string',\n begin: '\\'',\n end: '\\'',\n illegal: '\\\\n',\n contains: [BACKSLASH_ESCAPE]\n};\nconst QUOTE_STRING_MODE = {\n scope: 'string',\n begin: '\"',\n end: '\"',\n illegal: '\\\\n',\n contains: [BACKSLASH_ESCAPE]\n};\nconst PHRASAL_WORDS_MODE = {\n begin: /\\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\\b/\n};\n/**\n * Creates a comment mode\n *\n * @param {string | RegExp} begin\n * @param {string | RegExp} end\n * @param {Mode | {}} [modeOptions]\n * @returns {Partial}\n */\nconst COMMENT = function(begin, end, modeOptions = {}) {\n const mode = inherit$1(\n {\n scope: 'comment',\n begin,\n end,\n contains: []\n },\n modeOptions\n );\n mode.contains.push({\n scope: 'doctag',\n // hack to avoid the space from being included. the space is necessary to\n // match here to prevent the plain text rule below from gobbling up doctags\n begin: '[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)',\n end: /(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,\n excludeBegin: true,\n relevance: 0\n });\n const ENGLISH_WORD = either(\n // list of common 1 and 2 letter words in English\n \"I\",\n \"a\",\n \"is\",\n \"so\",\n \"us\",\n \"to\",\n \"at\",\n \"if\",\n \"in\",\n \"it\",\n \"on\",\n // note: this is not an exhaustive list of contractions, just popular ones\n /[A-Za-z]+['](d|ve|re|ll|t|s|n)/, // contractions - can't we'd they're let's, etc\n /[A-Za-z]+[-][a-z]+/, // `no-way`, etc.\n /[A-Za-z][a-z]{2,}/ // allow capitalized words at beginning of sentences\n );\n // looking like plain text, more likely to be a comment\n mode.contains.push(\n {\n // TODO: how to include \", (, ) without breaking grammars that use these for\n // comment delimiters?\n // begin: /[ ]+([()\"]?([A-Za-z'-]{3,}|is|a|I|so|us|[tT][oO]|at|if|in|it|on)[.]?[()\":]?([.][ ]|[ ]|\\))){3}/\n // ---\n\n // this tries to find sequences of 3 english words in a row (without any\n // \"programming\" type syntax) this gives us a strong signal that we've\n // TRULY found a comment - vs perhaps scanning with the wrong language.\n // It's possible to find something that LOOKS like the start of the\n // comment - but then if there is no readable text - good chance it is a\n // false match and not a comment.\n //\n // for a visual example please see:\n // https://github.com/highlightjs/highlight.js/issues/2827\n\n begin: concat(\n /[ ]+/, // necessary to prevent us gobbling up doctags like /* @author Bob Mcgill */\n '(',\n ENGLISH_WORD,\n /[.]?[:]?([.][ ]|[ ])/,\n '){3}') // look for 3 words in a row\n }\n );\n return mode;\n};\nconst C_LINE_COMMENT_MODE = COMMENT('//', '$');\nconst C_BLOCK_COMMENT_MODE = COMMENT('/\\\\*', '\\\\*/');\nconst HASH_COMMENT_MODE = COMMENT('#', '$');\nconst NUMBER_MODE = {\n scope: 'number',\n begin: NUMBER_RE,\n relevance: 0\n};\nconst C_NUMBER_MODE = {\n scope: 'number',\n begin: C_NUMBER_RE,\n relevance: 0\n};\nconst BINARY_NUMBER_MODE = {\n scope: 'number',\n begin: BINARY_NUMBER_RE,\n relevance: 0\n};\nconst REGEXP_MODE = {\n scope: \"regexp\",\n begin: /\\/(?=[^/\\n]*\\/)/,\n end: /\\/[gimuy]*/,\n contains: [\n BACKSLASH_ESCAPE,\n {\n begin: /\\[/,\n end: /\\]/,\n relevance: 0,\n contains: [BACKSLASH_ESCAPE]\n }\n ]\n};\nconst TITLE_MODE = {\n scope: 'title',\n begin: IDENT_RE,\n relevance: 0\n};\nconst UNDERSCORE_TITLE_MODE = {\n scope: 'title',\n begin: UNDERSCORE_IDENT_RE,\n relevance: 0\n};\nconst METHOD_GUARD = {\n // excludes method names from keyword processing\n begin: '\\\\.\\\\s*' + UNDERSCORE_IDENT_RE,\n relevance: 0\n};\n\n/**\n * Adds end same as begin mechanics to a mode\n *\n * Your mode must include at least a single () match group as that first match\n * group is what is used for comparison\n * @param {Partial} mode\n */\nconst END_SAME_AS_BEGIN = function(mode) {\n return Object.assign(mode,\n {\n /** @type {ModeCallback} */\n 'on:begin': (m, resp) => { resp.data._beginMatch = m[1]; },\n /** @type {ModeCallback} */\n 'on:end': (m, resp) => { if (resp.data._beginMatch !== m[1]) resp.ignoreMatch(); }\n });\n};\n\nvar MODES = /*#__PURE__*/Object.freeze({\n __proto__: null,\n APOS_STRING_MODE: APOS_STRING_MODE,\n BACKSLASH_ESCAPE: BACKSLASH_ESCAPE,\n BINARY_NUMBER_MODE: BINARY_NUMBER_MODE,\n BINARY_NUMBER_RE: BINARY_NUMBER_RE,\n COMMENT: COMMENT,\n C_BLOCK_COMMENT_MODE: C_BLOCK_COMMENT_MODE,\n C_LINE_COMMENT_MODE: C_LINE_COMMENT_MODE,\n C_NUMBER_MODE: C_NUMBER_MODE,\n C_NUMBER_RE: C_NUMBER_RE,\n END_SAME_AS_BEGIN: END_SAME_AS_BEGIN,\n HASH_COMMENT_MODE: HASH_COMMENT_MODE,\n IDENT_RE: IDENT_RE,\n MATCH_NOTHING_RE: MATCH_NOTHING_RE,\n METHOD_GUARD: METHOD_GUARD,\n NUMBER_MODE: NUMBER_MODE,\n NUMBER_RE: NUMBER_RE,\n PHRASAL_WORDS_MODE: PHRASAL_WORDS_MODE,\n QUOTE_STRING_MODE: QUOTE_STRING_MODE,\n REGEXP_MODE: REGEXP_MODE,\n RE_STARTERS_RE: RE_STARTERS_RE,\n SHEBANG: SHEBANG,\n TITLE_MODE: TITLE_MODE,\n UNDERSCORE_IDENT_RE: UNDERSCORE_IDENT_RE,\n UNDERSCORE_TITLE_MODE: UNDERSCORE_TITLE_MODE\n});\n\n/**\n@typedef {import('highlight.js').CallbackResponse} CallbackResponse\n@typedef {import('highlight.js').CompilerExt} CompilerExt\n*/\n\n// Grammar extensions / plugins\n// See: https://github.com/highlightjs/highlight.js/issues/2833\n\n// Grammar extensions allow \"syntactic sugar\" to be added to the grammar modes\n// without requiring any underlying changes to the compiler internals.\n\n// `compileMatch` being the perfect small example of now allowing a grammar\n// author to write `match` when they desire to match a single expression rather\n// than being forced to use `begin`. The extension then just moves `match` into\n// `begin` when it runs. Ie, no features have been added, but we've just made\n// the experience of writing (and reading grammars) a little bit nicer.\n\n// ------\n\n// TODO: We need negative look-behind support to do this properly\n/**\n * Skip a match if it has a preceding dot\n *\n * This is used for `beginKeywords` to prevent matching expressions such as\n * `bob.keyword.do()`. The mode compiler automatically wires this up as a\n * special _internal_ 'on:begin' callback for modes with `beginKeywords`\n * @param {RegExpMatchArray} match\n * @param {CallbackResponse} response\n */\nfunction skipIfHasPrecedingDot(match, response) {\n const before = match.input[match.index - 1];\n if (before === \".\") {\n response.ignoreMatch();\n }\n}\n\n/**\n *\n * @type {CompilerExt}\n */\nfunction scopeClassName(mode, _parent) {\n // eslint-disable-next-line no-undefined\n if (mode.className !== undefined) {\n mode.scope = mode.className;\n delete mode.className;\n }\n}\n\n/**\n * `beginKeywords` syntactic sugar\n * @type {CompilerExt}\n */\nfunction beginKeywords(mode, parent) {\n if (!parent) return;\n if (!mode.beginKeywords) return;\n\n // for languages with keywords that include non-word characters checking for\n // a word boundary is not sufficient, so instead we check for a word boundary\n // or whitespace - this does no harm in any case since our keyword engine\n // doesn't allow spaces in keywords anyways and we still check for the boundary\n // first\n mode.begin = '\\\\b(' + mode.beginKeywords.split(' ').join('|') + ')(?!\\\\.)(?=\\\\b|\\\\s)';\n mode.__beforeBegin = skipIfHasPrecedingDot;\n mode.keywords = mode.keywords || mode.beginKeywords;\n delete mode.beginKeywords;\n\n // prevents double relevance, the keywords themselves provide\n // relevance, the mode doesn't need to double it\n // eslint-disable-next-line no-undefined\n if (mode.relevance === undefined) mode.relevance = 0;\n}\n\n/**\n * Allow `illegal` to contain an array of illegal values\n * @type {CompilerExt}\n */\nfunction compileIllegal(mode, _parent) {\n if (!Array.isArray(mode.illegal)) return;\n\n mode.illegal = either(...mode.illegal);\n}\n\n/**\n * `match` to match a single expression for readability\n * @type {CompilerExt}\n */\nfunction compileMatch(mode, _parent) {\n if (!mode.match) return;\n if (mode.begin || mode.end) throw new Error(\"begin & end are not supported with match\");\n\n mode.begin = mode.match;\n delete mode.match;\n}\n\n/**\n * provides the default 1 relevance to all modes\n * @type {CompilerExt}\n */\nfunction compileRelevance(mode, _parent) {\n // eslint-disable-next-line no-undefined\n if (mode.relevance === undefined) mode.relevance = 1;\n}\n\n// allow beforeMatch to act as a \"qualifier\" for the match\n// the full match begin must be [beforeMatch][begin]\nconst beforeMatchExt = (mode, parent) => {\n if (!mode.beforeMatch) return;\n // starts conflicts with endsParent which we need to make sure the child\n // rule is not matched multiple times\n if (mode.starts) throw new Error(\"beforeMatch cannot be used with starts\");\n\n const originalMode = Object.assign({}, mode);\n Object.keys(mode).forEach((key) => { delete mode[key]; });\n\n mode.keywords = originalMode.keywords;\n mode.begin = concat(originalMode.beforeMatch, lookahead(originalMode.begin));\n mode.starts = {\n relevance: 0,\n contains: [\n Object.assign(originalMode, { endsParent: true })\n ]\n };\n mode.relevance = 0;\n\n delete originalMode.beforeMatch;\n};\n\n// keywords that should have no default relevance value\nconst COMMON_KEYWORDS = [\n 'of',\n 'and',\n 'for',\n 'in',\n 'not',\n 'or',\n 'if',\n 'then',\n 'parent', // common variable name\n 'list', // common variable name\n 'value' // common variable name\n];\n\nconst DEFAULT_KEYWORD_SCOPE = \"keyword\";\n\n/**\n * Given raw keywords from a language definition, compile them.\n *\n * @param {string | Record | Array} rawKeywords\n * @param {boolean} caseInsensitive\n */\nfunction compileKeywords(rawKeywords, caseInsensitive, scopeName = DEFAULT_KEYWORD_SCOPE) {\n /** @type {import(\"highlight.js/private\").KeywordDict} */\n const compiledKeywords = Object.create(null);\n\n // input can be a string of keywords, an array of keywords, or a object with\n // named keys representing scopeName (which can then point to a string or array)\n if (typeof rawKeywords === 'string') {\n compileList(scopeName, rawKeywords.split(\" \"));\n } else if (Array.isArray(rawKeywords)) {\n compileList(scopeName, rawKeywords);\n } else {\n Object.keys(rawKeywords).forEach(function(scopeName) {\n // collapse all our objects back into the parent object\n Object.assign(\n compiledKeywords,\n compileKeywords(rawKeywords[scopeName], caseInsensitive, scopeName)\n );\n });\n }\n return compiledKeywords;\n\n // ---\n\n /**\n * Compiles an individual list of keywords\n *\n * Ex: \"for if when while|5\"\n *\n * @param {string} scopeName\n * @param {Array} keywordList\n */\n function compileList(scopeName, keywordList) {\n if (caseInsensitive) {\n keywordList = keywordList.map(x => x.toLowerCase());\n }\n keywordList.forEach(function(keyword) {\n const pair = keyword.split('|');\n compiledKeywords[pair[0]] = [scopeName, scoreForKeyword(pair[0], pair[1])];\n });\n }\n}\n\n/**\n * Returns the proper score for a given keyword\n *\n * Also takes into account comment keywords, which will be scored 0 UNLESS\n * another score has been manually assigned.\n * @param {string} keyword\n * @param {string} [providedScore]\n */\nfunction scoreForKeyword(keyword, providedScore) {\n // manual scores always win over common keywords\n // so you can force a score of 1 if you really insist\n if (providedScore) {\n return Number(providedScore);\n }\n\n return commonKeyword(keyword) ? 0 : 1;\n}\n\n/**\n * Determines if a given keyword is common or not\n *\n * @param {string} keyword */\nfunction commonKeyword(keyword) {\n return COMMON_KEYWORDS.includes(keyword.toLowerCase());\n}\n\n/*\n\nFor the reasoning behind this please see:\nhttps://github.com/highlightjs/highlight.js/issues/2880#issuecomment-747275419\n\n*/\n\n/**\n * @type {Record}\n */\nconst seenDeprecations = {};\n\n/**\n * @param {string} message\n */\nconst error = (message) => {\n console.error(message);\n};\n\n/**\n * @param {string} message\n * @param {any} args\n */\nconst warn = (message, ...args) => {\n console.log(`WARN: ${message}`, ...args);\n};\n\n/**\n * @param {string} version\n * @param {string} message\n */\nconst deprecated = (version, message) => {\n if (seenDeprecations[`${version}/${message}`]) return;\n\n console.log(`Deprecated as of ${version}. ${message}`);\n seenDeprecations[`${version}/${message}`] = true;\n};\n\n/* eslint-disable no-throw-literal */\n\n/**\n@typedef {import('highlight.js').CompiledMode} CompiledMode\n*/\n\nconst MultiClassError = new Error();\n\n/**\n * Renumbers labeled scope names to account for additional inner match\n * groups that otherwise would break everything.\n *\n * Lets say we 3 match scopes:\n *\n * { 1 => ..., 2 => ..., 3 => ... }\n *\n * So what we need is a clean match like this:\n *\n * (a)(b)(c) => [ \"a\", \"b\", \"c\" ]\n *\n * But this falls apart with inner match groups:\n *\n * (a)(((b)))(c) => [\"a\", \"b\", \"b\", \"b\", \"c\" ]\n *\n * Our scopes are now \"out of alignment\" and we're repeating `b` 3 times.\n * What needs to happen is the numbers are remapped:\n *\n * { 1 => ..., 2 => ..., 5 => ... }\n *\n * We also need to know that the ONLY groups that should be output\n * are 1, 2, and 5. This function handles this behavior.\n *\n * @param {CompiledMode} mode\n * @param {Array} regexes\n * @param {{key: \"beginScope\"|\"endScope\"}} opts\n */\nfunction remapScopeNames(mode, regexes, { key }) {\n let offset = 0;\n const scopeNames = mode[key];\n /** @type Record */\n const emit = {};\n /** @type Record */\n const positions = {};\n\n for (let i = 1; i <= regexes.length; i++) {\n positions[i + offset] = scopeNames[i];\n emit[i + offset] = true;\n offset += countMatchGroups(regexes[i - 1]);\n }\n // we use _emit to keep track of which match groups are \"top-level\" to avoid double\n // output from inside match groups\n mode[key] = positions;\n mode[key]._emit = emit;\n mode[key]._multi = true;\n}\n\n/**\n * @param {CompiledMode} mode\n */\nfunction beginMultiClass(mode) {\n if (!Array.isArray(mode.begin)) return;\n\n if (mode.skip || mode.excludeBegin || mode.returnBegin) {\n error(\"skip, excludeBegin, returnBegin not compatible with beginScope: {}\");\n throw MultiClassError;\n }\n\n if (typeof mode.beginScope !== \"object\" || mode.beginScope === null) {\n error(\"beginScope must be object\");\n throw MultiClassError;\n }\n\n remapScopeNames(mode, mode.begin, { key: \"beginScope\" });\n mode.begin = _rewriteBackreferences(mode.begin, { joinWith: \"\" });\n}\n\n/**\n * @param {CompiledMode} mode\n */\nfunction endMultiClass(mode) {\n if (!Array.isArray(mode.end)) return;\n\n if (mode.skip || mode.excludeEnd || mode.returnEnd) {\n error(\"skip, excludeEnd, returnEnd not compatible with endScope: {}\");\n throw MultiClassError;\n }\n\n if (typeof mode.endScope !== \"object\" || mode.endScope === null) {\n error(\"endScope must be object\");\n throw MultiClassError;\n }\n\n remapScopeNames(mode, mode.end, { key: \"endScope\" });\n mode.end = _rewriteBackreferences(mode.end, { joinWith: \"\" });\n}\n\n/**\n * this exists only to allow `scope: {}` to be used beside `match:`\n * Otherwise `beginScope` would necessary and that would look weird\n\n {\n match: [ /def/, /\\w+/ ]\n scope: { 1: \"keyword\" , 2: \"title\" }\n }\n\n * @param {CompiledMode} mode\n */\nfunction scopeSugar(mode) {\n if (mode.scope && typeof mode.scope === \"object\" && mode.scope !== null) {\n mode.beginScope = mode.scope;\n delete mode.scope;\n }\n}\n\n/**\n * @param {CompiledMode} mode\n */\nfunction MultiClass(mode) {\n scopeSugar(mode);\n\n if (typeof mode.beginScope === \"string\") {\n mode.beginScope = { _wrap: mode.beginScope };\n }\n if (typeof mode.endScope === \"string\") {\n mode.endScope = { _wrap: mode.endScope };\n }\n\n beginMultiClass(mode);\n endMultiClass(mode);\n}\n\n/**\n@typedef {import('highlight.js').Mode} Mode\n@typedef {import('highlight.js').CompiledMode} CompiledMode\n@typedef {import('highlight.js').Language} Language\n@typedef {import('highlight.js').HLJSPlugin} HLJSPlugin\n@typedef {import('highlight.js').CompiledLanguage} CompiledLanguage\n*/\n\n// compilation\n\n/**\n * Compiles a language definition result\n *\n * Given the raw result of a language definition (Language), compiles this so\n * that it is ready for highlighting code.\n * @param {Language} language\n * @returns {CompiledLanguage}\n */\nfunction compileLanguage(language) {\n /**\n * Builds a regex with the case sensitivity of the current language\n *\n * @param {RegExp | string} value\n * @param {boolean} [global]\n */\n function langRe(value, global) {\n return new RegExp(\n source(value),\n 'm'\n + (language.case_insensitive ? 'i' : '')\n + (language.unicodeRegex ? 'u' : '')\n + (global ? 'g' : '')\n );\n }\n\n /**\n Stores multiple regular expressions and allows you to quickly search for\n them all in a string simultaneously - returning the first match. It does\n this by creating a huge (a|b|c) regex - each individual item wrapped with ()\n and joined by `|` - using match groups to track position. When a match is\n found checking which position in the array has content allows us to figure\n out which of the original regexes / match groups triggered the match.\n\n The match object itself (the result of `Regex.exec`) is returned but also\n enhanced by merging in any meta-data that was registered with the regex.\n This is how we keep track of which mode matched, and what type of rule\n (`illegal`, `begin`, end, etc).\n */\n class MultiRegex {\n constructor() {\n this.matchIndexes = {};\n // @ts-ignore\n this.regexes = [];\n this.matchAt = 1;\n this.position = 0;\n }\n\n // @ts-ignore\n addRule(re, opts) {\n opts.position = this.position++;\n // @ts-ignore\n this.matchIndexes[this.matchAt] = opts;\n this.regexes.push([opts, re]);\n this.matchAt += countMatchGroups(re) + 1;\n }\n\n compile() {\n if (this.regexes.length === 0) {\n // avoids the need to check length every time exec is called\n // @ts-ignore\n this.exec = () => null;\n }\n const terminators = this.regexes.map(el => el[1]);\n this.matcherRe = langRe(_rewriteBackreferences(terminators, { joinWith: '|' }), true);\n this.lastIndex = 0;\n }\n\n /** @param {string} s */\n exec(s) {\n this.matcherRe.lastIndex = this.lastIndex;\n const match = this.matcherRe.exec(s);\n if (!match) { return null; }\n\n // eslint-disable-next-line no-undefined\n const i = match.findIndex((el, i) => i > 0 && el !== undefined);\n // @ts-ignore\n const matchData = this.matchIndexes[i];\n // trim off any earlier non-relevant match groups (ie, the other regex\n // match groups that make up the multi-matcher)\n match.splice(0, i);\n\n return Object.assign(match, matchData);\n }\n }\n\n /*\n Created to solve the key deficiently with MultiRegex - there is no way to\n test for multiple matches at a single location. Why would we need to do\n that? In the future a more dynamic engine will allow certain matches to be\n ignored. An example: if we matched say the 3rd regex in a large group but\n decided to ignore it - we'd need to started testing again at the 4th\n regex... but MultiRegex itself gives us no real way to do that.\n\n So what this class creates MultiRegexs on the fly for whatever search\n position they are needed.\n\n NOTE: These additional MultiRegex objects are created dynamically. For most\n grammars most of the time we will never actually need anything more than the\n first MultiRegex - so this shouldn't have too much overhead.\n\n Say this is our search group, and we match regex3, but wish to ignore it.\n\n regex1 | regex2 | regex3 | regex4 | regex5 ' ie, startAt = 0\n\n What we need is a new MultiRegex that only includes the remaining\n possibilities:\n\n regex4 | regex5 ' ie, startAt = 3\n\n This class wraps all that complexity up in a simple API... `startAt` decides\n where in the array of expressions to start doing the matching. It\n auto-increments, so if a match is found at position 2, then startAt will be\n set to 3. If the end is reached startAt will return to 0.\n\n MOST of the time the parser will be setting startAt manually to 0.\n */\n class ResumableMultiRegex {\n constructor() {\n // @ts-ignore\n this.rules = [];\n // @ts-ignore\n this.multiRegexes = [];\n this.count = 0;\n\n this.lastIndex = 0;\n this.regexIndex = 0;\n }\n\n // @ts-ignore\n getMatcher(index) {\n if (this.multiRegexes[index]) return this.multiRegexes[index];\n\n const matcher = new MultiRegex();\n this.rules.slice(index).forEach(([re, opts]) => matcher.addRule(re, opts));\n matcher.compile();\n this.multiRegexes[index] = matcher;\n return matcher;\n }\n\n resumingScanAtSamePosition() {\n return this.regexIndex !== 0;\n }\n\n considerAll() {\n this.regexIndex = 0;\n }\n\n // @ts-ignore\n addRule(re, opts) {\n this.rules.push([re, opts]);\n if (opts.type === \"begin\") this.count++;\n }\n\n /** @param {string} s */\n exec(s) {\n const m = this.getMatcher(this.regexIndex);\n m.lastIndex = this.lastIndex;\n let result = m.exec(s);\n\n // The following is because we have no easy way to say \"resume scanning at the\n // existing position but also skip the current rule ONLY\". What happens is\n // all prior rules are also skipped which can result in matching the wrong\n // thing. Example of matching \"booger\":\n\n // our matcher is [string, \"booger\", number]\n //\n // ....booger....\n\n // if \"booger\" is ignored then we'd really need a regex to scan from the\n // SAME position for only: [string, number] but ignoring \"booger\" (if it\n // was the first match), a simple resume would scan ahead who knows how\n // far looking only for \"number\", ignoring potential string matches (or\n // future \"booger\" matches that might be valid.)\n\n // So what we do: We execute two matchers, one resuming at the same\n // position, but the second full matcher starting at the position after:\n\n // /--- resume first regex match here (for [number])\n // |/---- full match here for [string, \"booger\", number]\n // vv\n // ....booger....\n\n // Which ever results in a match first is then used. So this 3-4 step\n // process essentially allows us to say \"match at this position, excluding\n // a prior rule that was ignored\".\n //\n // 1. Match \"booger\" first, ignore. Also proves that [string] does non match.\n // 2. Resume matching for [number]\n // 3. Match at index + 1 for [string, \"booger\", number]\n // 4. If #2 and #3 result in matches, which came first?\n if (this.resumingScanAtSamePosition()) {\n if (result && result.index === this.lastIndex) ; else { // use the second matcher result\n const m2 = this.getMatcher(0);\n m2.lastIndex = this.lastIndex + 1;\n result = m2.exec(s);\n }\n }\n\n if (result) {\n this.regexIndex += result.position + 1;\n if (this.regexIndex === this.count) {\n // wrap-around to considering all matches again\n this.considerAll();\n }\n }\n\n return result;\n }\n }\n\n /**\n * Given a mode, builds a huge ResumableMultiRegex that can be used to walk\n * the content and find matches.\n *\n * @param {CompiledMode} mode\n * @returns {ResumableMultiRegex}\n */\n function buildModeRegex(mode) {\n const mm = new ResumableMultiRegex();\n\n mode.contains.forEach(term => mm.addRule(term.begin, { rule: term, type: \"begin\" }));\n\n if (mode.terminatorEnd) {\n mm.addRule(mode.terminatorEnd, { type: \"end\" });\n }\n if (mode.illegal) {\n mm.addRule(mode.illegal, { type: \"illegal\" });\n }\n\n return mm;\n }\n\n /** skip vs abort vs ignore\n *\n * @skip - The mode is still entered and exited normally (and contains rules apply),\n * but all content is held and added to the parent buffer rather than being\n * output when the mode ends. Mostly used with `sublanguage` to build up\n * a single large buffer than can be parsed by sublanguage.\n *\n * - The mode begin ands ends normally.\n * - Content matched is added to the parent mode buffer.\n * - The parser cursor is moved forward normally.\n *\n * @abort - A hack placeholder until we have ignore. Aborts the mode (as if it\n * never matched) but DOES NOT continue to match subsequent `contains`\n * modes. Abort is bad/suboptimal because it can result in modes\n * farther down not getting applied because an earlier rule eats the\n * content but then aborts.\n *\n * - The mode does not begin.\n * - Content matched by `begin` is added to the mode buffer.\n * - The parser cursor is moved forward accordingly.\n *\n * @ignore - Ignores the mode (as if it never matched) and continues to match any\n * subsequent `contains` modes. Ignore isn't technically possible with\n * the current parser implementation.\n *\n * - The mode does not begin.\n * - Content matched by `begin` is ignored.\n * - The parser cursor is not moved forward.\n */\n\n /**\n * Compiles an individual mode\n *\n * This can raise an error if the mode contains certain detectable known logic\n * issues.\n * @param {Mode} mode\n * @param {CompiledMode | null} [parent]\n * @returns {CompiledMode | never}\n */\n function compileMode(mode, parent) {\n const cmode = /** @type CompiledMode */ (mode);\n if (mode.isCompiled) return cmode;\n\n [\n scopeClassName,\n // do this early so compiler extensions generally don't have to worry about\n // the distinction between match/begin\n compileMatch,\n MultiClass,\n beforeMatchExt\n ].forEach(ext => ext(mode, parent));\n\n language.compilerExtensions.forEach(ext => ext(mode, parent));\n\n // __beforeBegin is considered private API, internal use only\n mode.__beforeBegin = null;\n\n [\n beginKeywords,\n // do this later so compiler extensions that come earlier have access to the\n // raw array if they wanted to perhaps manipulate it, etc.\n compileIllegal,\n // default to 1 relevance if not specified\n compileRelevance\n ].forEach(ext => ext(mode, parent));\n\n mode.isCompiled = true;\n\n let keywordPattern = null;\n if (typeof mode.keywords === \"object\" && mode.keywords.$pattern) {\n // we need a copy because keywords might be compiled multiple times\n // so we can't go deleting $pattern from the original on the first\n // pass\n mode.keywords = Object.assign({}, mode.keywords);\n keywordPattern = mode.keywords.$pattern;\n delete mode.keywords.$pattern;\n }\n keywordPattern = keywordPattern || /\\w+/;\n\n if (mode.keywords) {\n mode.keywords = compileKeywords(mode.keywords, language.case_insensitive);\n }\n\n cmode.keywordPatternRe = langRe(keywordPattern, true);\n\n if (parent) {\n if (!mode.begin) mode.begin = /\\B|\\b/;\n cmode.beginRe = langRe(cmode.begin);\n if (!mode.end && !mode.endsWithParent) mode.end = /\\B|\\b/;\n if (mode.end) cmode.endRe = langRe(cmode.end);\n cmode.terminatorEnd = source(cmode.end) || '';\n if (mode.endsWithParent && parent.terminatorEnd) {\n cmode.terminatorEnd += (mode.end ? '|' : '') + parent.terminatorEnd;\n }\n }\n if (mode.illegal) cmode.illegalRe = langRe(/** @type {RegExp | string} */ (mode.illegal));\n if (!mode.contains) mode.contains = [];\n\n mode.contains = [].concat(...mode.contains.map(function(c) {\n return expandOrCloneMode(c === 'self' ? mode : c);\n }));\n mode.contains.forEach(function(c) { compileMode(/** @type Mode */ (c), cmode); });\n\n if (mode.starts) {\n compileMode(mode.starts, parent);\n }\n\n cmode.matcher = buildModeRegex(cmode);\n return cmode;\n }\n\n if (!language.compilerExtensions) language.compilerExtensions = [];\n\n // self is not valid at the top-level\n if (language.contains && language.contains.includes('self')) {\n throw new Error(\"ERR: contains `self` is not supported at the top-level of a language. See documentation.\");\n }\n\n // we need a null object, which inherit will guarantee\n language.classNameAliases = inherit$1(language.classNameAliases || {});\n\n return compileMode(/** @type Mode */ (language));\n}\n\n/**\n * Determines if a mode has a dependency on it's parent or not\n *\n * If a mode does have a parent dependency then often we need to clone it if\n * it's used in multiple places so that each copy points to the correct parent,\n * where-as modes without a parent can often safely be re-used at the bottom of\n * a mode chain.\n *\n * @param {Mode | null} mode\n * @returns {boolean} - is there a dependency on the parent?\n * */\nfunction dependencyOnParent(mode) {\n if (!mode) return false;\n\n return mode.endsWithParent || dependencyOnParent(mode.starts);\n}\n\n/**\n * Expands a mode or clones it if necessary\n *\n * This is necessary for modes with parental dependenceis (see notes on\n * `dependencyOnParent`) and for nodes that have `variants` - which must then be\n * exploded into their own individual modes at compile time.\n *\n * @param {Mode} mode\n * @returns {Mode | Mode[]}\n * */\nfunction expandOrCloneMode(mode) {\n if (mode.variants && !mode.cachedVariants) {\n mode.cachedVariants = mode.variants.map(function(variant) {\n return inherit$1(mode, { variants: null }, variant);\n });\n }\n\n // EXPAND\n // if we have variants then essentially \"replace\" the mode with the variants\n // this happens in compileMode, where this function is called from\n if (mode.cachedVariants) {\n return mode.cachedVariants;\n }\n\n // CLONE\n // if we have dependencies on parents then we need a unique\n // instance of ourselves, so we can be reused with many\n // different parents without issue\n if (dependencyOnParent(mode)) {\n return inherit$1(mode, { starts: mode.starts ? inherit$1(mode.starts) : null });\n }\n\n if (Object.isFrozen(mode)) {\n return inherit$1(mode);\n }\n\n // no special dependency issues, just return ourselves\n return mode;\n}\n\nvar version = \"11.9.0\";\n\nclass HTMLInjectionError extends Error {\n constructor(reason, html) {\n super(reason);\n this.name = \"HTMLInjectionError\";\n this.html = html;\n }\n}\n\n/*\nSyntax highlighting with language autodetection.\nhttps://highlightjs.org/\n*/\n\n\n\n/**\n@typedef {import('highlight.js').Mode} Mode\n@typedef {import('highlight.js').CompiledMode} CompiledMode\n@typedef {import('highlight.js').CompiledScope} CompiledScope\n@typedef {import('highlight.js').Language} Language\n@typedef {import('highlight.js').HLJSApi} HLJSApi\n@typedef {import('highlight.js').HLJSPlugin} HLJSPlugin\n@typedef {import('highlight.js').PluginEvent} PluginEvent\n@typedef {import('highlight.js').HLJSOptions} HLJSOptions\n@typedef {import('highlight.js').LanguageFn} LanguageFn\n@typedef {import('highlight.js').HighlightedHTMLElement} HighlightedHTMLElement\n@typedef {import('highlight.js').BeforeHighlightContext} BeforeHighlightContext\n@typedef {import('highlight.js/private').MatchType} MatchType\n@typedef {import('highlight.js/private').KeywordData} KeywordData\n@typedef {import('highlight.js/private').EnhancedMatch} EnhancedMatch\n@typedef {import('highlight.js/private').AnnotatedError} AnnotatedError\n@typedef {import('highlight.js').AutoHighlightResult} AutoHighlightResult\n@typedef {import('highlight.js').HighlightOptions} HighlightOptions\n@typedef {import('highlight.js').HighlightResult} HighlightResult\n*/\n\n\nconst escape = escapeHTML;\nconst inherit = inherit$1;\nconst NO_MATCH = Symbol(\"nomatch\");\nconst MAX_KEYWORD_HITS = 7;\n\n/**\n * @param {any} hljs - object that is extended (legacy)\n * @returns {HLJSApi}\n */\nconst HLJS = function(hljs) {\n // Global internal variables used within the highlight.js library.\n /** @type {Record} */\n const languages = Object.create(null);\n /** @type {Record} */\n const aliases = Object.create(null);\n /** @type {HLJSPlugin[]} */\n const plugins = [];\n\n // safe/production mode - swallows more errors, tries to keep running\n // even if a single syntax or parse hits a fatal error\n let SAFE_MODE = true;\n const LANGUAGE_NOT_FOUND = \"Could not find the language '{}', did you forget to load/include a language module?\";\n /** @type {Language} */\n const PLAINTEXT_LANGUAGE = { disableAutodetect: true, name: 'Plain text', contains: [] };\n\n // Global options used when within external APIs. This is modified when\n // calling the `hljs.configure` function.\n /** @type HLJSOptions */\n let options = {\n ignoreUnescapedHTML: false,\n throwUnescapedHTML: false,\n noHighlightRe: /^(no-?highlight)$/i,\n languageDetectRe: /\\blang(?:uage)?-([\\w-]+)\\b/i,\n classPrefix: 'hljs-',\n cssSelector: 'pre code',\n languages: null,\n // beta configuration options, subject to change, welcome to discuss\n // https://github.com/highlightjs/highlight.js/issues/1086\n __emitter: TokenTreeEmitter\n };\n\n /* Utility functions */\n\n /**\n * Tests a language name to see if highlighting should be skipped\n * @param {string} languageName\n */\n function shouldNotHighlight(languageName) {\n return options.noHighlightRe.test(languageName);\n }\n\n /**\n * @param {HighlightedHTMLElement} block - the HTML element to determine language for\n */\n function blockLanguage(block) {\n let classes = block.className + ' ';\n\n classes += block.parentNode ? block.parentNode.className : '';\n\n // language-* takes precedence over non-prefixed class names.\n const match = options.languageDetectRe.exec(classes);\n if (match) {\n const language = getLanguage(match[1]);\n if (!language) {\n warn(LANGUAGE_NOT_FOUND.replace(\"{}\", match[1]));\n warn(\"Falling back to no-highlight mode for this block.\", block);\n }\n return language ? match[1] : 'no-highlight';\n }\n\n return classes\n .split(/\\s+/)\n .find((_class) => shouldNotHighlight(_class) || getLanguage(_class));\n }\n\n /**\n * Core highlighting function.\n *\n * OLD API\n * highlight(lang, code, ignoreIllegals, continuation)\n *\n * NEW API\n * highlight(code, {lang, ignoreIllegals})\n *\n * @param {string} codeOrLanguageName - the language to use for highlighting\n * @param {string | HighlightOptions} optionsOrCode - the code to highlight\n * @param {boolean} [ignoreIllegals] - whether to ignore illegal matches, default is to bail\n *\n * @returns {HighlightResult} Result - an object that represents the result\n * @property {string} language - the language name\n * @property {number} relevance - the relevance score\n * @property {string} value - the highlighted HTML code\n * @property {string} code - the original raw code\n * @property {CompiledMode} top - top of the current mode stack\n * @property {boolean} illegal - indicates whether any illegal matches were found\n */\n function highlight(codeOrLanguageName, optionsOrCode, ignoreIllegals) {\n let code = \"\";\n let languageName = \"\";\n if (typeof optionsOrCode === \"object\") {\n code = codeOrLanguageName;\n ignoreIllegals = optionsOrCode.ignoreIllegals;\n languageName = optionsOrCode.language;\n } else {\n // old API\n deprecated(\"10.7.0\", \"highlight(lang, code, ...args) has been deprecated.\");\n deprecated(\"10.7.0\", \"Please use highlight(code, options) instead.\\nhttps://github.com/highlightjs/highlight.js/issues/2277\");\n languageName = codeOrLanguageName;\n code = optionsOrCode;\n }\n\n // https://github.com/highlightjs/highlight.js/issues/3149\n // eslint-disable-next-line no-undefined\n if (ignoreIllegals === undefined) { ignoreIllegals = true; }\n\n /** @type {BeforeHighlightContext} */\n const context = {\n code,\n language: languageName\n };\n // the plugin can change the desired language or the code to be highlighted\n // just be changing the object it was passed\n fire(\"before:highlight\", context);\n\n // a before plugin can usurp the result completely by providing it's own\n // in which case we don't even need to call highlight\n const result = context.result\n ? context.result\n : _highlight(context.language, context.code, ignoreIllegals);\n\n result.code = context.code;\n // the plugin can change anything in result to suite it\n fire(\"after:highlight\", result);\n\n return result;\n }\n\n /**\n * private highlight that's used internally and does not fire callbacks\n *\n * @param {string} languageName - the language to use for highlighting\n * @param {string} codeToHighlight - the code to highlight\n * @param {boolean?} [ignoreIllegals] - whether to ignore illegal matches, default is to bail\n * @param {CompiledMode?} [continuation] - current continuation mode, if any\n * @returns {HighlightResult} - result of the highlight operation\n */\n function _highlight(languageName, codeToHighlight, ignoreIllegals, continuation) {\n const keywordHits = Object.create(null);\n\n /**\n * Return keyword data if a match is a keyword\n * @param {CompiledMode} mode - current mode\n * @param {string} matchText - the textual match\n * @returns {KeywordData | false}\n */\n function keywordData(mode, matchText) {\n return mode.keywords[matchText];\n }\n\n function processKeywords() {\n if (!top.keywords) {\n emitter.addText(modeBuffer);\n return;\n }\n\n let lastIndex = 0;\n top.keywordPatternRe.lastIndex = 0;\n let match = top.keywordPatternRe.exec(modeBuffer);\n let buf = \"\";\n\n while (match) {\n buf += modeBuffer.substring(lastIndex, match.index);\n const word = language.case_insensitive ? match[0].toLowerCase() : match[0];\n const data = keywordData(top, word);\n if (data) {\n const [kind, keywordRelevance] = data;\n emitter.addText(buf);\n buf = \"\";\n\n keywordHits[word] = (keywordHits[word] || 0) + 1;\n if (keywordHits[word] <= MAX_KEYWORD_HITS) relevance += keywordRelevance;\n if (kind.startsWith(\"_\")) {\n // _ implied for relevance only, do not highlight\n // by applying a class name\n buf += match[0];\n } else {\n const cssClass = language.classNameAliases[kind] || kind;\n emitKeyword(match[0], cssClass);\n }\n } else {\n buf += match[0];\n }\n lastIndex = top.keywordPatternRe.lastIndex;\n match = top.keywordPatternRe.exec(modeBuffer);\n }\n buf += modeBuffer.substring(lastIndex);\n emitter.addText(buf);\n }\n\n function processSubLanguage() {\n if (modeBuffer === \"\") return;\n /** @type HighlightResult */\n let result = null;\n\n if (typeof top.subLanguage === 'string') {\n if (!languages[top.subLanguage]) {\n emitter.addText(modeBuffer);\n return;\n }\n result = _highlight(top.subLanguage, modeBuffer, true, continuations[top.subLanguage]);\n continuations[top.subLanguage] = /** @type {CompiledMode} */ (result._top);\n } else {\n result = highlightAuto(modeBuffer, top.subLanguage.length ? top.subLanguage : null);\n }\n\n // Counting embedded language score towards the host language may be disabled\n // with zeroing the containing mode relevance. Use case in point is Markdown that\n // allows XML everywhere and makes every XML snippet to have a much larger Markdown\n // score.\n if (top.relevance > 0) {\n relevance += result.relevance;\n }\n emitter.__addSublanguage(result._emitter, result.language);\n }\n\n function processBuffer() {\n if (top.subLanguage != null) {\n processSubLanguage();\n } else {\n processKeywords();\n }\n modeBuffer = '';\n }\n\n /**\n * @param {string} text\n * @param {string} scope\n */\n function emitKeyword(keyword, scope) {\n if (keyword === \"\") return;\n\n emitter.startScope(scope);\n emitter.addText(keyword);\n emitter.endScope();\n }\n\n /**\n * @param {CompiledScope} scope\n * @param {RegExpMatchArray} match\n */\n function emitMultiClass(scope, match) {\n let i = 1;\n const max = match.length - 1;\n while (i <= max) {\n if (!scope._emit[i]) { i++; continue; }\n const klass = language.classNameAliases[scope[i]] || scope[i];\n const text = match[i];\n if (klass) {\n emitKeyword(text, klass);\n } else {\n modeBuffer = text;\n processKeywords();\n modeBuffer = \"\";\n }\n i++;\n }\n }\n\n /**\n * @param {CompiledMode} mode - new mode to start\n * @param {RegExpMatchArray} match\n */\n function startNewMode(mode, match) {\n if (mode.scope && typeof mode.scope === \"string\") {\n emitter.openNode(language.classNameAliases[mode.scope] || mode.scope);\n }\n if (mode.beginScope) {\n // beginScope just wraps the begin match itself in a scope\n if (mode.beginScope._wrap) {\n emitKeyword(modeBuffer, language.classNameAliases[mode.beginScope._wrap] || mode.beginScope._wrap);\n modeBuffer = \"\";\n } else if (mode.beginScope._multi) {\n // at this point modeBuffer should just be the match\n emitMultiClass(mode.beginScope, match);\n modeBuffer = \"\";\n }\n }\n\n top = Object.create(mode, { parent: { value: top } });\n return top;\n }\n\n /**\n * @param {CompiledMode } mode - the mode to potentially end\n * @param {RegExpMatchArray} match - the latest match\n * @param {string} matchPlusRemainder - match plus remainder of content\n * @returns {CompiledMode | void} - the next mode, or if void continue on in current mode\n */\n function endOfMode(mode, match, matchPlusRemainder) {\n let matched = startsWith(mode.endRe, matchPlusRemainder);\n\n if (matched) {\n if (mode[\"on:end\"]) {\n const resp = new Response(mode);\n mode[\"on:end\"](match, resp);\n if (resp.isMatchIgnored) matched = false;\n }\n\n if (matched) {\n while (mode.endsParent && mode.parent) {\n mode = mode.parent;\n }\n return mode;\n }\n }\n // even if on:end fires an `ignore` it's still possible\n // that we might trigger the end node because of a parent mode\n if (mode.endsWithParent) {\n return endOfMode(mode.parent, match, matchPlusRemainder);\n }\n }\n\n /**\n * Handle matching but then ignoring a sequence of text\n *\n * @param {string} lexeme - string containing full match text\n */\n function doIgnore(lexeme) {\n if (top.matcher.regexIndex === 0) {\n // no more regexes to potentially match here, so we move the cursor forward one\n // space\n modeBuffer += lexeme[0];\n return 1;\n } else {\n // no need to move the cursor, we still have additional regexes to try and\n // match at this very spot\n resumeScanAtSamePosition = true;\n return 0;\n }\n }\n\n /**\n * Handle the start of a new potential mode match\n *\n * @param {EnhancedMatch} match - the current match\n * @returns {number} how far to advance the parse cursor\n */\n function doBeginMatch(match) {\n const lexeme = match[0];\n const newMode = match.rule;\n\n const resp = new Response(newMode);\n // first internal before callbacks, then the public ones\n const beforeCallbacks = [newMode.__beforeBegin, newMode[\"on:begin\"]];\n for (const cb of beforeCallbacks) {\n if (!cb) continue;\n cb(match, resp);\n if (resp.isMatchIgnored) return doIgnore(lexeme);\n }\n\n if (newMode.skip) {\n modeBuffer += lexeme;\n } else {\n if (newMode.excludeBegin) {\n modeBuffer += lexeme;\n }\n processBuffer();\n if (!newMode.returnBegin && !newMode.excludeBegin) {\n modeBuffer = lexeme;\n }\n }\n startNewMode(newMode, match);\n return newMode.returnBegin ? 0 : lexeme.length;\n }\n\n /**\n * Handle the potential end of mode\n *\n * @param {RegExpMatchArray} match - the current match\n */\n function doEndMatch(match) {\n const lexeme = match[0];\n const matchPlusRemainder = codeToHighlight.substring(match.index);\n\n const endMode = endOfMode(top, match, matchPlusRemainder);\n if (!endMode) { return NO_MATCH; }\n\n const origin = top;\n if (top.endScope && top.endScope._wrap) {\n processBuffer();\n emitKeyword(lexeme, top.endScope._wrap);\n } else if (top.endScope && top.endScope._multi) {\n processBuffer();\n emitMultiClass(top.endScope, match);\n } else if (origin.skip) {\n modeBuffer += lexeme;\n } else {\n if (!(origin.returnEnd || origin.excludeEnd)) {\n modeBuffer += lexeme;\n }\n processBuffer();\n if (origin.excludeEnd) {\n modeBuffer = lexeme;\n }\n }\n do {\n if (top.scope) {\n emitter.closeNode();\n }\n if (!top.skip && !top.subLanguage) {\n relevance += top.relevance;\n }\n top = top.parent;\n } while (top !== endMode.parent);\n if (endMode.starts) {\n startNewMode(endMode.starts, match);\n }\n return origin.returnEnd ? 0 : lexeme.length;\n }\n\n function processContinuations() {\n const list = [];\n for (let current = top; current !== language; current = current.parent) {\n if (current.scope) {\n list.unshift(current.scope);\n }\n }\n list.forEach(item => emitter.openNode(item));\n }\n\n /** @type {{type?: MatchType, index?: number, rule?: Mode}}} */\n let lastMatch = {};\n\n /**\n * Process an individual match\n *\n * @param {string} textBeforeMatch - text preceding the match (since the last match)\n * @param {EnhancedMatch} [match] - the match itself\n */\n function processLexeme(textBeforeMatch, match) {\n const lexeme = match && match[0];\n\n // add non-matched text to the current mode buffer\n modeBuffer += textBeforeMatch;\n\n if (lexeme == null) {\n processBuffer();\n return 0;\n }\n\n // we've found a 0 width match and we're stuck, so we need to advance\n // this happens when we have badly behaved rules that have optional matchers to the degree that\n // sometimes they can end up matching nothing at all\n // Ref: https://github.com/highlightjs/highlight.js/issues/2140\n if (lastMatch.type === \"begin\" && match.type === \"end\" && lastMatch.index === match.index && lexeme === \"\") {\n // spit the \"skipped\" character that our regex choked on back into the output sequence\n modeBuffer += codeToHighlight.slice(match.index, match.index + 1);\n if (!SAFE_MODE) {\n /** @type {AnnotatedError} */\n const err = new Error(`0 width match regex (${languageName})`);\n err.languageName = languageName;\n err.badRule = lastMatch.rule;\n throw err;\n }\n return 1;\n }\n lastMatch = match;\n\n if (match.type === \"begin\") {\n return doBeginMatch(match);\n } else if (match.type === \"illegal\" && !ignoreIllegals) {\n // illegal match, we do not continue processing\n /** @type {AnnotatedError} */\n const err = new Error('Illegal lexeme \"' + lexeme + '\" for mode \"' + (top.scope || '') + '\"');\n err.mode = top;\n throw err;\n } else if (match.type === \"end\") {\n const processed = doEndMatch(match);\n if (processed !== NO_MATCH) {\n return processed;\n }\n }\n\n // edge case for when illegal matches $ (end of line) which is technically\n // a 0 width match but not a begin/end match so it's not caught by the\n // first handler (when ignoreIllegals is true)\n if (match.type === \"illegal\" && lexeme === \"\") {\n // advance so we aren't stuck in an infinite loop\n return 1;\n }\n\n // infinite loops are BAD, this is a last ditch catch all. if we have a\n // decent number of iterations yet our index (cursor position in our\n // parsing) still 3x behind our index then something is very wrong\n // so we bail\n if (iterations > 100000 && iterations > match.index * 3) {\n const err = new Error('potential infinite loop, way more iterations than matches');\n throw err;\n }\n\n /*\n Why might be find ourselves here? An potential end match that was\n triggered but could not be completed. IE, `doEndMatch` returned NO_MATCH.\n (this could be because a callback requests the match be ignored, etc)\n\n This causes no real harm other than stopping a few times too many.\n */\n\n modeBuffer += lexeme;\n return lexeme.length;\n }\n\n const language = getLanguage(languageName);\n if (!language) {\n error(LANGUAGE_NOT_FOUND.replace(\"{}\", languageName));\n throw new Error('Unknown language: \"' + languageName + '\"');\n }\n\n const md = compileLanguage(language);\n let result = '';\n /** @type {CompiledMode} */\n let top = continuation || md;\n /** @type Record */\n const continuations = {}; // keep continuations for sub-languages\n const emitter = new options.__emitter(options);\n processContinuations();\n let modeBuffer = '';\n let relevance = 0;\n let index = 0;\n let iterations = 0;\n let resumeScanAtSamePosition = false;\n\n try {\n if (!language.__emitTokens) {\n top.matcher.considerAll();\n\n for (;;) {\n iterations++;\n if (resumeScanAtSamePosition) {\n // only regexes not matched previously will now be\n // considered for a potential match\n resumeScanAtSamePosition = false;\n } else {\n top.matcher.considerAll();\n }\n top.matcher.lastIndex = index;\n\n const match = top.matcher.exec(codeToHighlight);\n // console.log(\"match\", match[0], match.rule && match.rule.begin)\n\n if (!match) break;\n\n const beforeMatch = codeToHighlight.substring(index, match.index);\n const processedCount = processLexeme(beforeMatch, match);\n index = match.index + processedCount;\n }\n processLexeme(codeToHighlight.substring(index));\n } else {\n language.__emitTokens(codeToHighlight, emitter);\n }\n\n emitter.finalize();\n result = emitter.toHTML();\n\n return {\n language: languageName,\n value: result,\n relevance,\n illegal: false,\n _emitter: emitter,\n _top: top\n };\n } catch (err) {\n if (err.message && err.message.includes('Illegal')) {\n return {\n language: languageName,\n value: escape(codeToHighlight),\n illegal: true,\n relevance: 0,\n _illegalBy: {\n message: err.message,\n index,\n context: codeToHighlight.slice(index - 100, index + 100),\n mode: err.mode,\n resultSoFar: result\n },\n _emitter: emitter\n };\n } else if (SAFE_MODE) {\n return {\n language: languageName,\n value: escape(codeToHighlight),\n illegal: false,\n relevance: 0,\n errorRaised: err,\n _emitter: emitter,\n _top: top\n };\n } else {\n throw err;\n }\n }\n }\n\n /**\n * returns a valid highlight result, without actually doing any actual work,\n * auto highlight starts with this and it's possible for small snippets that\n * auto-detection may not find a better match\n * @param {string} code\n * @returns {HighlightResult}\n */\n function justTextHighlightResult(code) {\n const result = {\n value: escape(code),\n illegal: false,\n relevance: 0,\n _top: PLAINTEXT_LANGUAGE,\n _emitter: new options.__emitter(options)\n };\n result._emitter.addText(code);\n return result;\n }\n\n /**\n Highlighting with language detection. Accepts a string with the code to\n highlight. Returns an object with the following properties:\n\n - language (detected language)\n - relevance (int)\n - value (an HTML string with highlighting markup)\n - secondBest (object with the same structure for second-best heuristically\n detected language, may be absent)\n\n @param {string} code\n @param {Array} [languageSubset]\n @returns {AutoHighlightResult}\n */\n function highlightAuto(code, languageSubset) {\n languageSubset = languageSubset || options.languages || Object.keys(languages);\n const plaintext = justTextHighlightResult(code);\n\n const results = languageSubset.filter(getLanguage).filter(autoDetection).map(name =>\n _highlight(name, code, false)\n );\n results.unshift(plaintext); // plaintext is always an option\n\n const sorted = results.sort((a, b) => {\n // sort base on relevance\n if (a.relevance !== b.relevance) return b.relevance - a.relevance;\n\n // always award the tie to the base language\n // ie if C++ and Arduino are tied, it's more likely to be C++\n if (a.language && b.language) {\n if (getLanguage(a.language).supersetOf === b.language) {\n return 1;\n } else if (getLanguage(b.language).supersetOf === a.language) {\n return -1;\n }\n }\n\n // otherwise say they are equal, which has the effect of sorting on\n // relevance while preserving the original ordering - which is how ties\n // have historically been settled, ie the language that comes first always\n // wins in the case of a tie\n return 0;\n });\n\n const [best, secondBest] = sorted;\n\n /** @type {AutoHighlightResult} */\n const result = best;\n result.secondBest = secondBest;\n\n return result;\n }\n\n /**\n * Builds new class name for block given the language name\n *\n * @param {HTMLElement} element\n * @param {string} [currentLang]\n * @param {string} [resultLang]\n */\n function updateClassName(element, currentLang, resultLang) {\n const language = (currentLang && aliases[currentLang]) || resultLang;\n\n element.classList.add(\"hljs\");\n element.classList.add(`language-${language}`);\n }\n\n /**\n * Applies highlighting to a DOM node containing code.\n *\n * @param {HighlightedHTMLElement} element - the HTML element to highlight\n */\n function highlightElement(element) {\n /** @type HTMLElement */\n let node = null;\n const language = blockLanguage(element);\n\n if (shouldNotHighlight(language)) return;\n\n fire(\"before:highlightElement\",\n { el: element, language });\n\n if (element.dataset.highlighted) {\n console.log(\"Element previously highlighted. To highlight again, first unset `dataset.highlighted`.\", element);\n return;\n }\n\n // we should be all text, no child nodes (unescaped HTML) - this is possibly\n // an HTML injection attack - it's likely too late if this is already in\n // production (the code has likely already done its damage by the time\n // we're seeing it)... but we yell loudly about this so that hopefully it's\n // more likely to be caught in development before making it to production\n if (element.children.length > 0) {\n if (!options.ignoreUnescapedHTML) {\n console.warn(\"One of your code blocks includes unescaped HTML. This is a potentially serious security risk.\");\n console.warn(\"https://github.com/highlightjs/highlight.js/wiki/security\");\n console.warn(\"The element with unescaped HTML:\");\n console.warn(element);\n }\n if (options.throwUnescapedHTML) {\n const err = new HTMLInjectionError(\n \"One of your code blocks includes unescaped HTML.\",\n element.innerHTML\n );\n throw err;\n }\n }\n\n node = element;\n const text = node.textContent;\n const result = language ? highlight(text, { language, ignoreIllegals: true }) : highlightAuto(text);\n\n element.innerHTML = result.value;\n element.dataset.highlighted = \"yes\";\n updateClassName(element, language, result.language);\n element.result = {\n language: result.language,\n // TODO: remove with version 11.0\n re: result.relevance,\n relevance: result.relevance\n };\n if (result.secondBest) {\n element.secondBest = {\n language: result.secondBest.language,\n relevance: result.secondBest.relevance\n };\n }\n\n fire(\"after:highlightElement\", { el: element, result, text });\n }\n\n /**\n * Updates highlight.js global options with the passed options\n *\n * @param {Partial} userOptions\n */\n function configure(userOptions) {\n options = inherit(options, userOptions);\n }\n\n // TODO: remove v12, deprecated\n const initHighlighting = () => {\n highlightAll();\n deprecated(\"10.6.0\", \"initHighlighting() deprecated. Use highlightAll() now.\");\n };\n\n // TODO: remove v12, deprecated\n function initHighlightingOnLoad() {\n highlightAll();\n deprecated(\"10.6.0\", \"initHighlightingOnLoad() deprecated. Use highlightAll() now.\");\n }\n\n let wantsHighlight = false;\n\n /**\n * auto-highlights all pre>code elements on the page\n */\n function highlightAll() {\n // if we are called too early in the loading process\n if (document.readyState === \"loading\") {\n wantsHighlight = true;\n return;\n }\n\n const blocks = document.querySelectorAll(options.cssSelector);\n blocks.forEach(highlightElement);\n }\n\n function boot() {\n // if a highlight was requested before DOM was loaded, do now\n if (wantsHighlight) highlightAll();\n }\n\n // make sure we are in the browser environment\n if (typeof window !== 'undefined' && window.addEventListener) {\n window.addEventListener('DOMContentLoaded', boot, false);\n }\n\n /**\n * Register a language grammar module\n *\n * @param {string} languageName\n * @param {LanguageFn} languageDefinition\n */\n function registerLanguage(languageName, languageDefinition) {\n let lang = null;\n try {\n lang = languageDefinition(hljs);\n } catch (error$1) {\n error(\"Language definition for '{}' could not be registered.\".replace(\"{}\", languageName));\n // hard or soft error\n if (!SAFE_MODE) { throw error$1; } else { error(error$1); }\n // languages that have serious errors are replaced with essentially a\n // \"plaintext\" stand-in so that the code blocks will still get normal\n // css classes applied to them - and one bad language won't break the\n // entire highlighter\n lang = PLAINTEXT_LANGUAGE;\n }\n // give it a temporary name if it doesn't have one in the meta-data\n if (!lang.name) lang.name = languageName;\n languages[languageName] = lang;\n lang.rawDefinition = languageDefinition.bind(null, hljs);\n\n if (lang.aliases) {\n registerAliases(lang.aliases, { languageName });\n }\n }\n\n /**\n * Remove a language grammar module\n *\n * @param {string} languageName\n */\n function unregisterLanguage(languageName) {\n delete languages[languageName];\n for (const alias of Object.keys(aliases)) {\n if (aliases[alias] === languageName) {\n delete aliases[alias];\n }\n }\n }\n\n /**\n * @returns {string[]} List of language internal names\n */\n function listLanguages() {\n return Object.keys(languages);\n }\n\n /**\n * @param {string} name - name of the language to retrieve\n * @returns {Language | undefined}\n */\n function getLanguage(name) {\n name = (name || '').toLowerCase();\n return languages[name] || languages[aliases[name]];\n }\n\n /**\n *\n * @param {string|string[]} aliasList - single alias or list of aliases\n * @param {{languageName: string}} opts\n */\n function registerAliases(aliasList, { languageName }) {\n if (typeof aliasList === 'string') {\n aliasList = [aliasList];\n }\n aliasList.forEach(alias => { aliases[alias.toLowerCase()] = languageName; });\n }\n\n /**\n * Determines if a given language has auto-detection enabled\n * @param {string} name - name of the language\n */\n function autoDetection(name) {\n const lang = getLanguage(name);\n return lang && !lang.disableAutodetect;\n }\n\n /**\n * Upgrades the old highlightBlock plugins to the new\n * highlightElement API\n * @param {HLJSPlugin} plugin\n */\n function upgradePluginAPI(plugin) {\n // TODO: remove with v12\n if (plugin[\"before:highlightBlock\"] && !plugin[\"before:highlightElement\"]) {\n plugin[\"before:highlightElement\"] = (data) => {\n plugin[\"before:highlightBlock\"](\n Object.assign({ block: data.el }, data)\n );\n };\n }\n if (plugin[\"after:highlightBlock\"] && !plugin[\"after:highlightElement\"]) {\n plugin[\"after:highlightElement\"] = (data) => {\n plugin[\"after:highlightBlock\"](\n Object.assign({ block: data.el }, data)\n );\n };\n }\n }\n\n /**\n * @param {HLJSPlugin} plugin\n */\n function addPlugin(plugin) {\n upgradePluginAPI(plugin);\n plugins.push(plugin);\n }\n\n /**\n * @param {HLJSPlugin} plugin\n */\n function removePlugin(plugin) {\n const index = plugins.indexOf(plugin);\n if (index !== -1) {\n plugins.splice(index, 1);\n }\n }\n\n /**\n *\n * @param {PluginEvent} event\n * @param {any} args\n */\n function fire(event, args) {\n const cb = event;\n plugins.forEach(function(plugin) {\n if (plugin[cb]) {\n plugin[cb](args);\n }\n });\n }\n\n /**\n * DEPRECATED\n * @param {HighlightedHTMLElement} el\n */\n function deprecateHighlightBlock(el) {\n deprecated(\"10.7.0\", \"highlightBlock will be removed entirely in v12.0\");\n deprecated(\"10.7.0\", \"Please use highlightElement now.\");\n\n return highlightElement(el);\n }\n\n /* Interface definition */\n Object.assign(hljs, {\n highlight,\n highlightAuto,\n highlightAll,\n highlightElement,\n // TODO: Remove with v12 API\n highlightBlock: deprecateHighlightBlock,\n configure,\n initHighlighting,\n initHighlightingOnLoad,\n registerLanguage,\n unregisterLanguage,\n listLanguages,\n getLanguage,\n registerAliases,\n autoDetection,\n inherit,\n addPlugin,\n removePlugin\n });\n\n hljs.debugMode = function() { SAFE_MODE = false; };\n hljs.safeMode = function() { SAFE_MODE = true; };\n hljs.versionString = version;\n\n hljs.regex = {\n concat: concat,\n lookahead: lookahead,\n either: either,\n optional: optional,\n anyNumberOfTimes: anyNumberOfTimes\n };\n\n for (const key in MODES) {\n // @ts-ignore\n if (typeof MODES[key] === \"object\") {\n // @ts-ignore\n deepFreeze(MODES[key]);\n }\n }\n\n // merge all the modes/regexes into our main object\n Object.assign(hljs, MODES);\n\n return hljs;\n};\n\n// Other names for the variable may break build script\nconst highlight = HLJS({});\n\n// returns a new instance of the highlighter to be used for extensions\n// check https://github.com/wooorm/lowlight/issues/47\nhighlight.newInstance = () => HLJS({});\n\nmodule.exports = highlight;\nhighlight.HighlightJS = highlight;\nhighlight.default = highlight;\n",null,null,null,null,null,null,null,null,"/*! https://mths.be/punycode v1.4.1 by @mathias */\n;(function(root) {\n\n\t/** Detect free variables */\n\tvar freeExports = typeof exports == 'object' && exports &&\n\t\t!exports.nodeType && exports;\n\tvar freeModule = typeof module == 'object' && module &&\n\t\t!module.nodeType && module;\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (\n\t\tfreeGlobal.global === freeGlobal ||\n\t\tfreeGlobal.window === freeGlobal ||\n\t\tfreeGlobal.self === freeGlobal\n\t) {\n\t\troot = freeGlobal;\n\t}\n\n\t/**\n\t * The `punycode` object.\n\t * @name punycode\n\t * @type Object\n\t */\n\tvar punycode,\n\n\t/** Highest positive signed 32-bit float value */\n\tmaxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1\n\n\t/** Bootstring parameters */\n\tbase = 36,\n\ttMin = 1,\n\ttMax = 26,\n\tskew = 38,\n\tdamp = 700,\n\tinitialBias = 72,\n\tinitialN = 128, // 0x80\n\tdelimiter = '-', // '\\x2D'\n\n\t/** Regular expressions */\n\tregexPunycode = /^xn--/,\n\tregexNonASCII = /[^\\x20-\\x7E]/, // unprintable ASCII chars + non-ASCII chars\n\tregexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g, // RFC 3490 separators\n\n\t/** Error messages */\n\terrors = {\n\t\t'overflow': 'Overflow: input needs wider integers to process',\n\t\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t\t'invalid-input': 'Invalid input'\n\t},\n\n\t/** Convenience shortcuts */\n\tbaseMinusTMin = base - tMin,\n\tfloor = Math.floor,\n\tstringFromCharCode = String.fromCharCode,\n\n\t/** Temporary variable */\n\tkey;\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/**\n\t * A generic error utility function.\n\t * @private\n\t * @param {String} type The error type.\n\t * @returns {Error} Throws a `RangeError` with the applicable error message.\n\t */\n\tfunction error(type) {\n\t\tthrow new RangeError(errors[type]);\n\t}\n\n\t/**\n\t * A generic `Array#map` utility function.\n\t * @private\n\t * @param {Array} array The array to iterate over.\n\t * @param {Function} callback The function that gets called for every array\n\t * item.\n\t * @returns {Array} A new array of values returned by the callback function.\n\t */\n\tfunction map(array, fn) {\n\t\tvar length = array.length;\n\t\tvar result = [];\n\t\twhile (length--) {\n\t\t\tresult[length] = fn(array[length]);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * A simple `Array#map`-like wrapper to work with domain name strings or email\n\t * addresses.\n\t * @private\n\t * @param {String} domain The domain name or email address.\n\t * @param {Function} callback The function that gets called for every\n\t * character.\n\t * @returns {Array} A new string of characters returned by the callback\n\t * function.\n\t */\n\tfunction mapDomain(string, fn) {\n\t\tvar parts = string.split('@');\n\t\tvar result = '';\n\t\tif (parts.length > 1) {\n\t\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t\t// the local part (i.e. everything up to `@`) intact.\n\t\t\tresult = parts[0] + '@';\n\t\t\tstring = parts[1];\n\t\t}\n\t\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\t\tstring = string.replace(regexSeparators, '\\x2E');\n\t\tvar labels = string.split('.');\n\t\tvar encoded = map(labels, fn).join('.');\n\t\treturn result + encoded;\n\t}\n\n\t/**\n\t * Creates an array containing the numeric code points of each Unicode\n\t * character in the string. While JavaScript uses UCS-2 internally,\n\t * this function will convert a pair of surrogate halves (each of which\n\t * UCS-2 exposes as separate characters) into a single code point,\n\t * matching UTF-16.\n\t * @see `punycode.ucs2.encode`\n\t * @see \n\t * @memberOf punycode.ucs2\n\t * @name decode\n\t * @param {String} string The Unicode input string (UCS-2).\n\t * @returns {Array} The new array of code points.\n\t */\n\tfunction ucs2decode(string) {\n\t\tvar output = [],\n\t\t counter = 0,\n\t\t length = string.length,\n\t\t value,\n\t\t extra;\n\t\twhile (counter < length) {\n\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\t// high surrogate, and there is a next character\n\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t} else {\n\t\t\t\t\t// unmatched surrogate; only append this code unit, in case the next\n\t\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\t\toutput.push(value);\n\t\t\t\t\tcounter--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toutput.push(value);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\n\t/**\n\t * Creates a string based on an array of numeric code points.\n\t * @see `punycode.ucs2.decode`\n\t * @memberOf punycode.ucs2\n\t * @name encode\n\t * @param {Array} codePoints The array of numeric code points.\n\t * @returns {String} The new Unicode string (UCS-2).\n\t */\n\tfunction ucs2encode(array) {\n\t\treturn map(array, function(value) {\n\t\t\tvar output = '';\n\t\t\tif (value > 0xFFFF) {\n\t\t\t\tvalue -= 0x10000;\n\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t}\n\t\t\toutput += stringFromCharCode(value);\n\t\t\treturn output;\n\t\t}).join('');\n\t}\n\n\t/**\n\t * Converts a basic code point into a digit/integer.\n\t * @see `digitToBasic()`\n\t * @private\n\t * @param {Number} codePoint The basic numeric code point value.\n\t * @returns {Number} The numeric value of a basic code point (for use in\n\t * representing integers) in the range `0` to `base - 1`, or `base` if\n\t * the code point does not represent a value.\n\t */\n\tfunction basicToDigit(codePoint) {\n\t\tif (codePoint - 48 < 10) {\n\t\t\treturn codePoint - 22;\n\t\t}\n\t\tif (codePoint - 65 < 26) {\n\t\t\treturn codePoint - 65;\n\t\t}\n\t\tif (codePoint - 97 < 26) {\n\t\t\treturn codePoint - 97;\n\t\t}\n\t\treturn base;\n\t}\n\n\t/**\n\t * Converts a digit/integer into a basic code point.\n\t * @see `basicToDigit()`\n\t * @private\n\t * @param {Number} digit The numeric value of a basic code point.\n\t * @returns {Number} The basic code point whose value (when used for\n\t * representing integers) is `digit`, which needs to be in the range\n\t * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n\t * used; else, the lowercase form is used. The behavior is undefined\n\t * if `flag` is non-zero and `digit` has no uppercase form.\n\t */\n\tfunction digitToBasic(digit, flag) {\n\t\t// 0..25 map to ASCII a..z or A..Z\n\t\t// 26..35 map to ASCII 0..9\n\t\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n\t}\n\n\t/**\n\t * Bias adaptation function as per section 3.4 of RFC 3492.\n\t * https://tools.ietf.org/html/rfc3492#section-3.4\n\t * @private\n\t */\n\tfunction adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}\n\n\t/**\n\t * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n\t * symbols.\n\t * @memberOf punycode\n\t * @param {String} input The Punycode string of ASCII-only symbols.\n\t * @returns {String} The resulting string of Unicode symbols.\n\t */\n\tfunction decode(input) {\n\t\t// Don't use UCS-2\n\t\tvar output = [],\n\t\t inputLength = input.length,\n\t\t out,\n\t\t i = 0,\n\t\t n = initialN,\n\t\t bias = initialBias,\n\t\t basic,\n\t\t j,\n\t\t index,\n\t\t oldi,\n\t\t w,\n\t\t k,\n\t\t digit,\n\t\t t,\n\t\t /** Cached calculation results */\n\t\t baseMinusT;\n\n\t\t// Handle the basic code points: let `basic` be the number of input code\n\t\t// points before the last delimiter, or `0` if there is none, then copy\n\t\t// the first basic code points to the output.\n\n\t\tbasic = input.lastIndexOf(delimiter);\n\t\tif (basic < 0) {\n\t\t\tbasic = 0;\n\t\t}\n\n\t\tfor (j = 0; j < basic; ++j) {\n\t\t\t// if it's not a basic code point\n\t\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\t\terror('not-basic');\n\t\t\t}\n\t\t\toutput.push(input.charCodeAt(j));\n\t\t}\n\n\t\t// Main decoding loop: start just after the last delimiter if any basic code\n\t\t// points were copied; start at the beginning otherwise.\n\n\t\tfor (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t\t// `index` is the index of the next character to be consumed.\n\t\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t\t// which gets added to `i`. The overflow checking is easier\n\t\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t\t// value at the end to obtain `delta`.\n\t\t\tfor (oldi = i, w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\t\tif (index >= inputLength) {\n\t\t\t\t\terror('invalid-input');\n\t\t\t\t}\n\n\t\t\t\tdigit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\ti += digit * w;\n\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\t\tif (digit < t) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tbaseMinusT = base - t;\n\t\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tw *= baseMinusT;\n\n\t\t\t}\n\n\t\t\tout = output.length + 1;\n\t\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t\t// incrementing `n` each time, so we'll fix that now:\n\t\t\tif (floor(i / out) > maxInt - n) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tn += floor(i / out);\n\t\t\ti %= out;\n\n\t\t\t// Insert `n` at position `i` of the output\n\t\t\toutput.splice(i++, 0, n);\n\n\t\t}\n\n\t\treturn ucs2encode(output);\n\t}\n\n\t/**\n\t * Converts a string of Unicode symbols (e.g. a domain name label) to a\n\t * Punycode string of ASCII-only symbols.\n\t * @memberOf punycode\n\t * @param {String} input The string of Unicode symbols.\n\t * @returns {String} The resulting Punycode string of ASCII-only symbols.\n\t */\n\tfunction encode(input) {\n\t\tvar n,\n\t\t delta,\n\t\t handledCPCount,\n\t\t basicLength,\n\t\t bias,\n\t\t j,\n\t\t m,\n\t\t q,\n\t\t k,\n\t\t t,\n\t\t currentValue,\n\t\t output = [],\n\t\t /** `inputLength` will hold the number of code points in `input`. */\n\t\t inputLength,\n\t\t /** Cached calculation results */\n\t\t handledCPCountPlusOne,\n\t\t baseMinusT,\n\t\t qMinusT;\n\n\t\t// Convert the input in UCS-2 to Unicode\n\t\tinput = ucs2decode(input);\n\n\t\t// Cache the length\n\t\tinputLength = input.length;\n\n\t\t// Initialize the state\n\t\tn = initialN;\n\t\tdelta = 0;\n\t\tbias = initialBias;\n\n\t\t// Handle the basic code points\n\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\tcurrentValue = input[j];\n\t\t\tif (currentValue < 0x80) {\n\t\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t\t}\n\t\t}\n\n\t\thandledCPCount = basicLength = output.length;\n\n\t\t// `handledCPCount` is the number of code points that have been handled;\n\t\t// `basicLength` is the number of basic code points.\n\n\t\t// Finish the basic string - if it is not empty - with a delimiter\n\t\tif (basicLength) {\n\t\t\toutput.push(delimiter);\n\t\t}\n\n\t\t// Main encoding loop:\n\t\twhile (handledCPCount < inputLength) {\n\n\t\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t\t// larger one:\n\t\t\tfor (m = maxInt, j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\t\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\t\tm = currentValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Increase `delta` enough to advance the decoder's state to ,\n\t\t\t// but guard against overflow\n\t\t\thandledCPCountPlusOne = handledCPCount + 1;\n\t\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\t\tn = m;\n\n\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\n\t\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tif (currentValue == n) {\n\t\t\t\t\t// Represent delta as a generalized variable-length integer\n\t\t\t\t\tfor (q = delta, k = base; /* no condition */; k += base) {\n\t\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tqMinusT = q - t;\n\t\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\t\toutput.push(\n\t\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t\t);\n\t\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t\t}\n\n\t\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\t\tdelta = 0;\n\t\t\t\t\t++handledCPCount;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t++delta;\n\t\t\t++n;\n\n\t\t}\n\t\treturn output.join('');\n\t}\n\n\t/**\n\t * Converts a Punycode string representing a domain name or an email address\n\t * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n\t * it doesn't matter if you call it on a string that has already been\n\t * converted to Unicode.\n\t * @memberOf punycode\n\t * @param {String} input The Punycoded domain name or email address to\n\t * convert to Unicode.\n\t * @returns {String} The Unicode representation of the given Punycode\n\t * string.\n\t */\n\tfunction toUnicode(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexPunycode.test(string)\n\t\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/**\n\t * Converts a Unicode string representing a domain name or an email address to\n\t * Punycode. Only the non-ASCII parts of the domain name will be converted,\n\t * i.e. it doesn't matter if you call it with a domain that's already in\n\t * ASCII.\n\t * @memberOf punycode\n\t * @param {String} input The domain name or email address to convert, as a\n\t * Unicode string.\n\t * @returns {String} The Punycode representation of the given domain name or\n\t * email address.\n\t */\n\tfunction toASCII(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexNonASCII.test(string)\n\t\t\t\t? 'xn--' + encode(string)\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/** Define the public API */\n\tpunycode = {\n\t\t/**\n\t\t * A string representing the current Punycode.js version number.\n\t\t * @memberOf punycode\n\t\t * @type String\n\t\t */\n\t\t'version': '1.4.1',\n\t\t/**\n\t\t * An object of methods to convert from JavaScript's internal character\n\t\t * representation (UCS-2) to Unicode code points, and back.\n\t\t * @see \n\t\t * @memberOf punycode\n\t\t * @type Object\n\t\t */\n\t\t'ucs2': {\n\t\t\t'decode': ucs2decode,\n\t\t\t'encode': ucs2encode\n\t\t},\n\t\t'decode': decode,\n\t\t'encode': encode,\n\t\t'toASCII': toASCII,\n\t\t'toUnicode': toUnicode\n\t};\n\n\t/** Expose `punycode` */\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttypeof define == 'function' &&\n\t\ttypeof define.amd == 'object' &&\n\t\tdefine.amd\n\t) {\n\t\tdefine('punycode', function() {\n\t\t\treturn punycode;\n\t\t});\n\t} else if (freeExports && freeModule) {\n\t\tif (module.exports == freeExports) {\n\t\t\t// in Node.js, io.js, or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = punycode;\n\t\t} else {\n\t\t\t// in Narwhal or RingoJS v0.7.0-\n\t\t\tfor (key in punycode) {\n\t\t\t\tpunycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// in Rhino or a web browser\n\t\troot.punycode = punycode;\n\t}\n\n}(this));\n","'use strict';\n\n/** @type {import('./range')} */\nmodule.exports = RangeError;\n","'use strict';\n\n/** @type {import('./syntax')} */\nmodule.exports = SyntaxError;\n","'use strict';\n\n/** @type {import('./type')} */\nmodule.exports = TypeError;\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar toStr = Object.prototype.toString;\nvar max = Math.max;\nvar funcType = '[object Function]';\n\nvar concatty = function concatty(a, b) {\n var arr = [];\n\n for (var i = 0; i < a.length; i += 1) {\n arr[i] = a[i];\n }\n for (var j = 0; j < b.length; j += 1) {\n arr[j + a.length] = b[j];\n }\n\n return arr;\n};\n\nvar slicy = function slicy(arrLike, offset) {\n var arr = [];\n for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {\n arr[j] = arrLike[i];\n }\n return arr;\n};\n\nvar joiny = function (arr, joiner) {\n var str = '';\n for (var i = 0; i < arr.length; i += 1) {\n str += arr[i];\n if (i + 1 < arr.length) {\n str += joiner;\n }\n }\n return str;\n};\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.apply(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slicy(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n concatty(args, arguments)\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n }\n return target.apply(\n that,\n concatty(args, arguments)\n );\n\n };\n\n var boundLength = max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs[i] = '$' + i;\n }\n\n bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar call = Function.prototype.call;\nvar $hasOwn = Object.prototype.hasOwnProperty;\nvar bind = require('function-bind');\n\n/** @type {(o: {}, p: PropertyKey) => p is keyof o} */\nmodule.exports = bind.call(call, $hasOwn);\n","'use strict';\n\nvar undefined;\n\nvar $RangeError = require('es-errors/range');\nvar $SyntaxError = require('es-errors/syntax');\nvar $TypeError = require('es-errors/type');\n\nvar $Function = Function;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t__proto__: null,\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': $RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t__proto__: null,\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('hasown');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = false;\n\t}\n}\n\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar gopd = require('gopd');\n\n/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar gOPD = require('gopd');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $floor = GetIntrinsic('%Math.floor%');\n\n/** @typedef {(...args: unknown[]) => unknown} Func */\n\n/** @type {(fn: T, length: number, loose?: boolean) => T} */\nmodule.exports = function setFunctionLength(fn, length) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tif (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) {\n\t\tthrow new $TypeError('`length` must be a positive 32-bit integer');\n\t}\n\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\n\tvar functionLengthIsConfigurable = true;\n\tvar functionLengthIsWritable = true;\n\tif ('length' in fn && gOPD) {\n\t\tvar desc = gOPD(fn, 'length');\n\t\tif (desc && !desc.configurable) {\n\t\t\tfunctionLengthIsConfigurable = false;\n\t\t}\n\t\tif (desc && !desc.writable) {\n\t\t\tfunctionLengthIsWritable = false;\n\t\t}\n\t}\n\n\tif (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(/** @type {Parameters[0]} */ (fn), 'length', length, true, true);\n\t\t} else {\n\t\t\tdefine(/** @type {Parameters[0]} */ (fn), 'length', length);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\nvar setFunctionLength = require('set-function-length');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tif (typeof originalFunction !== 'function') {\n\t\tthrow new $TypeError('a function is required');\n\t}\n\tvar func = $reflectApply(bind, $call, arguments);\n\treturn setFunctionLength(\n\t\tfunc,\n\t\t1 + $max(0, originalFunction.length - (arguments.length - 1)),\n\t\ttrue\n\t);\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n // note: in IE 8, sometimes `global !== window` but both are the prototypes of each other\n /* eslint-env browser */\n if (typeof window !== 'undefined' && obj === window) {\n return '{ [object Window] }';\n }\n if (obj === global) {\n return '{ [object globalThis] }';\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n * This function traverses the list returning the node corresponding to the\n * given key.\n *\n * That node is also moved to the head of the list, so that if it's accessed\n * again we don't need to traverse the whole list. By doing so, all the recently\n * used nodes can be accessed relatively quickly.\n */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\tfor (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tcurr.next = list.next;\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = { // eslint-disable-line no-param-reassign\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t};\n\t}\n};\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\nmodule.exports = function getSideChannel() {\n\tvar $wm;\n\tvar $m;\n\tvar $o;\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Initialize the linked list as an empty node, so that we don't have\n\t\t\t\t\t * to special-case handling of the first node: we can always refer to\n\t\t\t\t\t * it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t */\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","'use strict';\n\nvar replace = String.prototype.replace;\nvar percentTwenties = /%20/g;\n\nvar Format = {\n RFC1738: 'RFC1738',\n RFC3986: 'RFC3986'\n};\n\nmodule.exports = {\n 'default': Format.RFC3986,\n formatters: {\n RFC1738: function (value) {\n return replace.call(value, percentTwenties, '+');\n },\n RFC3986: function (value) {\n return String(value);\n }\n },\n RFC1738: Format.RFC1738,\n RFC3986: Format.RFC3986\n};\n","'use strict';\n\nvar formats = require('./formats');\n\nvar has = Object.prototype.hasOwnProperty;\nvar isArray = Array.isArray;\n\nvar hexTable = (function () {\n var array = [];\n for (var i = 0; i < 256; ++i) {\n array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());\n }\n\n return array;\n}());\n\nvar compactQueue = function compactQueue(queue) {\n while (queue.length > 1) {\n var item = queue.pop();\n var obj = item.obj[item.prop];\n\n if (isArray(obj)) {\n var compacted = [];\n\n for (var j = 0; j < obj.length; ++j) {\n if (typeof obj[j] !== 'undefined') {\n compacted.push(obj[j]);\n }\n }\n\n item.obj[item.prop] = compacted;\n }\n }\n};\n\nvar arrayToObject = function arrayToObject(source, options) {\n var obj = options && options.plainObjects ? Object.create(null) : {};\n for (var i = 0; i < source.length; ++i) {\n if (typeof source[i] !== 'undefined') {\n obj[i] = source[i];\n }\n }\n\n return obj;\n};\n\nvar merge = function merge(target, source, options) {\n /* eslint no-param-reassign: 0 */\n if (!source) {\n return target;\n }\n\n if (typeof source !== 'object') {\n if (isArray(target)) {\n target.push(source);\n } else if (target && typeof target === 'object') {\n if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) {\n target[source] = true;\n }\n } else {\n return [target, source];\n }\n\n return target;\n }\n\n if (!target || typeof target !== 'object') {\n return [target].concat(source);\n }\n\n var mergeTarget = target;\n if (isArray(target) && !isArray(source)) {\n mergeTarget = arrayToObject(target, options);\n }\n\n if (isArray(target) && isArray(source)) {\n source.forEach(function (item, i) {\n if (has.call(target, i)) {\n var targetItem = target[i];\n if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {\n target[i] = merge(targetItem, item, options);\n } else {\n target.push(item);\n }\n } else {\n target[i] = item;\n }\n });\n return target;\n }\n\n return Object.keys(source).reduce(function (acc, key) {\n var value = source[key];\n\n if (has.call(acc, key)) {\n acc[key] = merge(acc[key], value, options);\n } else {\n acc[key] = value;\n }\n return acc;\n }, mergeTarget);\n};\n\nvar assign = function assignSingleSource(target, source) {\n return Object.keys(source).reduce(function (acc, key) {\n acc[key] = source[key];\n return acc;\n }, target);\n};\n\nvar decode = function (str, decoder, charset) {\n var strWithoutPlus = str.replace(/\\+/g, ' ');\n if (charset === 'iso-8859-1') {\n // unescape never throws, no try...catch needed:\n return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);\n }\n // utf-8\n try {\n return decodeURIComponent(strWithoutPlus);\n } catch (e) {\n return strWithoutPlus;\n }\n};\n\nvar encode = function encode(str, defaultEncoder, charset, kind, format) {\n // This code was originally written by Brian White (mscdex) for the io.js core querystring library.\n // It has been adapted here for stricter adherence to RFC 3986\n if (str.length === 0) {\n return str;\n }\n\n var string = str;\n if (typeof str === 'symbol') {\n string = Symbol.prototype.toString.call(str);\n } else if (typeof str !== 'string') {\n string = String(str);\n }\n\n if (charset === 'iso-8859-1') {\n return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {\n return '%26%23' + parseInt($0.slice(2), 16) + '%3B';\n });\n }\n\n var out = '';\n for (var i = 0; i < string.length; ++i) {\n var c = string.charCodeAt(i);\n\n if (\n c === 0x2D // -\n || c === 0x2E // .\n || c === 0x5F // _\n || c === 0x7E // ~\n || (c >= 0x30 && c <= 0x39) // 0-9\n || (c >= 0x41 && c <= 0x5A) // a-z\n || (c >= 0x61 && c <= 0x7A) // A-Z\n || (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( )\n ) {\n out += string.charAt(i);\n continue;\n }\n\n if (c < 0x80) {\n out = out + hexTable[c];\n continue;\n }\n\n if (c < 0x800) {\n out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);\n continue;\n }\n\n if (c < 0xD800 || c >= 0xE000) {\n out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);\n continue;\n }\n\n i += 1;\n c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));\n /* eslint operator-linebreak: [2, \"before\"] */\n out += hexTable[0xF0 | (c >> 18)]\n + hexTable[0x80 | ((c >> 12) & 0x3F)]\n + hexTable[0x80 | ((c >> 6) & 0x3F)]\n + hexTable[0x80 | (c & 0x3F)];\n }\n\n return out;\n};\n\nvar compact = function compact(value) {\n var queue = [{ obj: { o: value }, prop: 'o' }];\n var refs = [];\n\n for (var i = 0; i < queue.length; ++i) {\n var item = queue[i];\n var obj = item.obj[item.prop];\n\n var keys = Object.keys(obj);\n for (var j = 0; j < keys.length; ++j) {\n var key = keys[j];\n var val = obj[key];\n if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {\n queue.push({ obj: obj, prop: key });\n refs.push(val);\n }\n }\n }\n\n compactQueue(queue);\n\n return value;\n};\n\nvar isRegExp = function isRegExp(obj) {\n return Object.prototype.toString.call(obj) === '[object RegExp]';\n};\n\nvar isBuffer = function isBuffer(obj) {\n if (!obj || typeof obj !== 'object') {\n return false;\n }\n\n return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));\n};\n\nvar combine = function combine(a, b) {\n return [].concat(a, b);\n};\n\nvar maybeMap = function maybeMap(val, fn) {\n if (isArray(val)) {\n var mapped = [];\n for (var i = 0; i < val.length; i += 1) {\n mapped.push(fn(val[i]));\n }\n return mapped;\n }\n return fn(val);\n};\n\nmodule.exports = {\n arrayToObject: arrayToObject,\n assign: assign,\n combine: combine,\n compact: compact,\n decode: decode,\n encode: encode,\n isBuffer: isBuffer,\n isRegExp: isRegExp,\n maybeMap: maybeMap,\n merge: merge\n};\n","'use strict';\n\nvar getSideChannel = require('side-channel');\nvar utils = require('./utils');\nvar formats = require('./formats');\nvar has = Object.prototype.hasOwnProperty;\n\nvar arrayPrefixGenerators = {\n brackets: function brackets(prefix) {\n return prefix + '[]';\n },\n comma: 'comma',\n indices: function indices(prefix, key) {\n return prefix + '[' + key + ']';\n },\n repeat: function repeat(prefix) {\n return prefix;\n }\n};\n\nvar isArray = Array.isArray;\nvar push = Array.prototype.push;\nvar pushToArray = function (arr, valueOrArray) {\n push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);\n};\n\nvar toISO = Date.prototype.toISOString;\n\nvar defaultFormat = formats['default'];\nvar defaults = {\n addQueryPrefix: false,\n allowDots: false,\n charset: 'utf-8',\n charsetSentinel: false,\n delimiter: '&',\n encode: true,\n encoder: utils.encode,\n encodeValuesOnly: false,\n format: defaultFormat,\n formatter: formats.formatters[defaultFormat],\n // deprecated\n indices: false,\n serializeDate: function serializeDate(date) {\n return toISO.call(date);\n },\n skipNulls: false,\n strictNullHandling: false\n};\n\nvar isNonNullishPrimitive = function isNonNullishPrimitive(v) {\n return typeof v === 'string'\n || typeof v === 'number'\n || typeof v === 'boolean'\n || typeof v === 'symbol'\n || typeof v === 'bigint';\n};\n\nvar sentinel = {};\n\nvar stringify = function stringify(\n object,\n prefix,\n generateArrayPrefix,\n commaRoundTrip,\n strictNullHandling,\n skipNulls,\n encoder,\n filter,\n sort,\n allowDots,\n serializeDate,\n format,\n formatter,\n encodeValuesOnly,\n charset,\n sideChannel\n) {\n var obj = object;\n\n var tmpSc = sideChannel;\n var step = 0;\n var findFlag = false;\n while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {\n // Where object last appeared in the ref tree\n var pos = tmpSc.get(object);\n step += 1;\n if (typeof pos !== 'undefined') {\n if (pos === step) {\n throw new RangeError('Cyclic object value');\n } else {\n findFlag = true; // Break while\n }\n }\n if (typeof tmpSc.get(sentinel) === 'undefined') {\n step = 0;\n }\n }\n\n if (typeof filter === 'function') {\n obj = filter(prefix, obj);\n } else if (obj instanceof Date) {\n obj = serializeDate(obj);\n } else if (generateArrayPrefix === 'comma' && isArray(obj)) {\n obj = utils.maybeMap(obj, function (value) {\n if (value instanceof Date) {\n return serializeDate(value);\n }\n return value;\n });\n }\n\n if (obj === null) {\n if (strictNullHandling) {\n return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix;\n }\n\n obj = '';\n }\n\n if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {\n if (encoder) {\n var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format);\n return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))];\n }\n return [formatter(prefix) + '=' + formatter(String(obj))];\n }\n\n var values = [];\n\n if (typeof obj === 'undefined') {\n return values;\n }\n\n var objKeys;\n if (generateArrayPrefix === 'comma' && isArray(obj)) {\n // we need to join elements in\n if (encodeValuesOnly && encoder) {\n obj = utils.maybeMap(obj, encoder);\n }\n objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];\n } else if (isArray(filter)) {\n objKeys = filter;\n } else {\n var keys = Object.keys(obj);\n objKeys = sort ? keys.sort(sort) : keys;\n }\n\n var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? prefix + '[]' : prefix;\n\n for (var j = 0; j < objKeys.length; ++j) {\n var key = objKeys[j];\n var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];\n\n if (skipNulls && value === null) {\n continue;\n }\n\n var keyPrefix = isArray(obj)\n ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix\n : adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']');\n\n sideChannel.set(object, step);\n var valueSideChannel = getSideChannel();\n valueSideChannel.set(sentinel, sideChannel);\n pushToArray(values, stringify(\n value,\n keyPrefix,\n generateArrayPrefix,\n commaRoundTrip,\n strictNullHandling,\n skipNulls,\n generateArrayPrefix === 'comma' && encodeValuesOnly && isArray(obj) ? null : encoder,\n filter,\n sort,\n allowDots,\n serializeDate,\n format,\n formatter,\n encodeValuesOnly,\n charset,\n valueSideChannel\n ));\n }\n\n return values;\n};\n\nvar normalizeStringifyOptions = function normalizeStringifyOptions(opts) {\n if (!opts) {\n return defaults;\n }\n\n if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {\n throw new TypeError('Encoder has to be a function.');\n }\n\n var charset = opts.charset || defaults.charset;\n if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {\n throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');\n }\n\n var format = formats['default'];\n if (typeof opts.format !== 'undefined') {\n if (!has.call(formats.formatters, opts.format)) {\n throw new TypeError('Unknown format option provided.');\n }\n format = opts.format;\n }\n var formatter = formats.formatters[format];\n\n var filter = defaults.filter;\n if (typeof opts.filter === 'function' || isArray(opts.filter)) {\n filter = opts.filter;\n }\n\n return {\n addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,\n allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,\n charset: charset,\n charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,\n delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,\n encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,\n encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,\n encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,\n filter: filter,\n format: format,\n formatter: formatter,\n serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,\n skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,\n sort: typeof opts.sort === 'function' ? opts.sort : null,\n strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling\n };\n};\n\nmodule.exports = function (object, opts) {\n var obj = object;\n var options = normalizeStringifyOptions(opts);\n\n var objKeys;\n var filter;\n\n if (typeof options.filter === 'function') {\n filter = options.filter;\n obj = filter('', obj);\n } else if (isArray(options.filter)) {\n filter = options.filter;\n objKeys = filter;\n }\n\n var keys = [];\n\n if (typeof obj !== 'object' || obj === null) {\n return '';\n }\n\n var arrayFormat;\n if (opts && opts.arrayFormat in arrayPrefixGenerators) {\n arrayFormat = opts.arrayFormat;\n } else if (opts && 'indices' in opts) {\n arrayFormat = opts.indices ? 'indices' : 'repeat';\n } else {\n arrayFormat = 'indices';\n }\n\n var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];\n if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {\n throw new TypeError('`commaRoundTrip` must be a boolean, or absent');\n }\n var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip;\n\n if (!objKeys) {\n objKeys = Object.keys(obj);\n }\n\n if (options.sort) {\n objKeys.sort(options.sort);\n }\n\n var sideChannel = getSideChannel();\n for (var i = 0; i < objKeys.length; ++i) {\n var key = objKeys[i];\n\n if (options.skipNulls && obj[key] === null) {\n continue;\n }\n pushToArray(keys, stringify(\n obj[key],\n key,\n generateArrayPrefix,\n commaRoundTrip,\n options.strictNullHandling,\n options.skipNulls,\n options.encode ? options.encoder : null,\n options.filter,\n options.sort,\n options.allowDots,\n options.serializeDate,\n options.format,\n options.formatter,\n options.encodeValuesOnly,\n options.charset,\n sideChannel\n ));\n }\n\n var joined = keys.join(options.delimiter);\n var prefix = options.addQueryPrefix === true ? '?' : '';\n\n if (options.charsetSentinel) {\n if (options.charset === 'iso-8859-1') {\n // encodeURIComponent('✓'), the \"numeric entity\" representation of a checkmark\n prefix += 'utf8=%26%2310003%3B&';\n } else {\n // encodeURIComponent('✓')\n prefix += 'utf8=%E2%9C%93&';\n }\n }\n\n return joined.length > 0 ? prefix + joined : '';\n};\n","'use strict';\n\nvar utils = require('./utils');\n\nvar has = Object.prototype.hasOwnProperty;\nvar isArray = Array.isArray;\n\nvar defaults = {\n allowDots: false,\n allowPrototypes: false,\n allowSparse: false,\n arrayLimit: 20,\n charset: 'utf-8',\n charsetSentinel: false,\n comma: false,\n decoder: utils.decode,\n delimiter: '&',\n depth: 5,\n ignoreQueryPrefix: false,\n interpretNumericEntities: false,\n parameterLimit: 1000,\n parseArrays: true,\n plainObjects: false,\n strictNullHandling: false\n};\n\nvar interpretNumericEntities = function (str) {\n return str.replace(/&#(\\d+);/g, function ($0, numberStr) {\n return String.fromCharCode(parseInt(numberStr, 10));\n });\n};\n\nvar parseArrayValue = function (val, options) {\n if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {\n return val.split(',');\n }\n\n return val;\n};\n\n// This is what browsers will submit when the ✓ character occurs in an\n// application/x-www-form-urlencoded body and the encoding of the page containing\n// the form is iso-8859-1, or when the submitted form has an accept-charset\n// attribute of iso-8859-1. Presumably also with other charsets that do not contain\n// the ✓ character, such as us-ascii.\nvar isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓')\n\n// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.\nvar charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')\n\nvar parseValues = function parseQueryStringValues(str, options) {\n var obj = { __proto__: null };\n\n var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\\?/, '') : str;\n var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;\n var parts = cleanStr.split(options.delimiter, limit);\n var skipIndex = -1; // Keep track of where the utf8 sentinel was found\n var i;\n\n var charset = options.charset;\n if (options.charsetSentinel) {\n for (i = 0; i < parts.length; ++i) {\n if (parts[i].indexOf('utf8=') === 0) {\n if (parts[i] === charsetSentinel) {\n charset = 'utf-8';\n } else if (parts[i] === isoSentinel) {\n charset = 'iso-8859-1';\n }\n skipIndex = i;\n i = parts.length; // The eslint settings do not allow break;\n }\n }\n }\n\n for (i = 0; i < parts.length; ++i) {\n if (i === skipIndex) {\n continue;\n }\n var part = parts[i];\n\n var bracketEqualsPos = part.indexOf(']=');\n var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;\n\n var key, val;\n if (pos === -1) {\n key = options.decoder(part, defaults.decoder, charset, 'key');\n val = options.strictNullHandling ? null : '';\n } else {\n key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');\n val = utils.maybeMap(\n parseArrayValue(part.slice(pos + 1), options),\n function (encodedVal) {\n return options.decoder(encodedVal, defaults.decoder, charset, 'value');\n }\n );\n }\n\n if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {\n val = interpretNumericEntities(val);\n }\n\n if (part.indexOf('[]=') > -1) {\n val = isArray(val) ? [val] : val;\n }\n\n if (has.call(obj, key)) {\n obj[key] = utils.combine(obj[key], val);\n } else {\n obj[key] = val;\n }\n }\n\n return obj;\n};\n\nvar parseObject = function (chain, val, options, valuesParsed) {\n var leaf = valuesParsed ? val : parseArrayValue(val, options);\n\n for (var i = chain.length - 1; i >= 0; --i) {\n var obj;\n var root = chain[i];\n\n if (root === '[]' && options.parseArrays) {\n obj = [].concat(leaf);\n } else {\n obj = options.plainObjects ? Object.create(null) : {};\n var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;\n var index = parseInt(cleanRoot, 10);\n if (!options.parseArrays && cleanRoot === '') {\n obj = { 0: leaf };\n } else if (\n !isNaN(index)\n && root !== cleanRoot\n && String(index) === cleanRoot\n && index >= 0\n && (options.parseArrays && index <= options.arrayLimit)\n ) {\n obj = [];\n obj[index] = leaf;\n } else if (cleanRoot !== '__proto__') {\n obj[cleanRoot] = leaf;\n }\n }\n\n leaf = obj;\n }\n\n return leaf;\n};\n\nvar parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {\n if (!givenKey) {\n return;\n }\n\n // Transform dot notation to bracket notation\n var key = options.allowDots ? givenKey.replace(/\\.([^.[]+)/g, '[$1]') : givenKey;\n\n // The regex chunks\n\n var brackets = /(\\[[^[\\]]*])/;\n var child = /(\\[[^[\\]]*])/g;\n\n // Get the parent\n\n var segment = options.depth > 0 && brackets.exec(key);\n var parent = segment ? key.slice(0, segment.index) : key;\n\n // Stash the parent if it exists\n\n var keys = [];\n if (parent) {\n // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties\n if (!options.plainObjects && has.call(Object.prototype, parent)) {\n if (!options.allowPrototypes) {\n return;\n }\n }\n\n keys.push(parent);\n }\n\n // Loop through children appending to the array until we hit depth\n\n var i = 0;\n while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {\n i += 1;\n if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {\n if (!options.allowPrototypes) {\n return;\n }\n }\n keys.push(segment[1]);\n }\n\n // If there's a remainder, just add whatever is left\n\n if (segment) {\n keys.push('[' + key.slice(segment.index) + ']');\n }\n\n return parseObject(keys, val, options, valuesParsed);\n};\n\nvar normalizeParseOptions = function normalizeParseOptions(opts) {\n if (!opts) {\n return defaults;\n }\n\n if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {\n throw new TypeError('Decoder has to be a function.');\n }\n\n if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {\n throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');\n }\n var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;\n\n return {\n allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,\n allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,\n allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,\n arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,\n charset: charset,\n charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,\n comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,\n decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,\n delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,\n // eslint-disable-next-line no-implicit-coercion, no-extra-parens\n depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,\n ignoreQueryPrefix: opts.ignoreQueryPrefix === true,\n interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,\n parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,\n parseArrays: opts.parseArrays !== false,\n plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,\n strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling\n };\n};\n\nmodule.exports = function (str, opts) {\n var options = normalizeParseOptions(opts);\n\n if (str === '' || str === null || typeof str === 'undefined') {\n return options.plainObjects ? Object.create(null) : {};\n }\n\n var tempObj = typeof str === 'string' ? parseValues(str, options) : str;\n var obj = options.plainObjects ? Object.create(null) : {};\n\n // Iterate over the keys and setup the new object\n\n var keys = Object.keys(tempObj);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');\n obj = utils.merge(obj, newObj, options);\n }\n\n if (options.allowSparse === true) {\n return obj;\n }\n\n return utils.compact(obj);\n};\n","'use strict';\n\nvar stringify = require('./stringify');\nvar parse = require('./parse');\nvar formats = require('./formats');\n\nmodule.exports = {\n formats: formats,\n parse: parse,\n stringify: stringify\n};\n","/*\n * Copyright Joyent, Inc. and other Node contributors.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to permit\n * persons to whom the Software is furnished to do so, subject to the\n * following conditions:\n *\n * The above copyright notice and this permission notice shall be included\n * in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n * USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n'use strict';\n\nvar punycode = require('punycode');\n\nfunction Url() {\n this.protocol = null;\n this.slashes = null;\n this.auth = null;\n this.host = null;\n this.port = null;\n this.hostname = null;\n this.hash = null;\n this.search = null;\n this.query = null;\n this.pathname = null;\n this.path = null;\n this.href = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n/*\n * define these here so at least they only have to be\n * compiled once on the first module load.\n */\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n portPattern = /:[0-9]*$/,\n\n // Special case for a simple path URL\n simplePathPattern = /^(\\/\\/?(?!\\/)[^?\\s]*)(\\?[^\\s]*)?$/,\n\n /*\n * RFC 2396: characters reserved for delimiting URLs.\n * We actually just auto-escape these.\n */\n delims = [\n '<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'\n ],\n\n // RFC 2396: characters not allowed for various reasons.\n unwise = [\n '{', '}', '|', '\\\\', '^', '`'\n ].concat(delims),\n\n // Allowed by RFCs, but cause of XSS attacks. Always escape these.\n autoEscape = ['\\''].concat(unwise),\n /*\n * Characters that are never ever allowed in a hostname.\n * Note that any invalid chars are also handled, but these\n * are the ones that are *expected* to be seen, so we fast-path\n * them.\n */\n nonHostChars = [\n '%', '/', '?', ';', '#'\n ].concat(autoEscape),\n hostEndingChars = [\n '/', '?', '#'\n ],\n hostnameMaxLen = 255,\n hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n // protocols that can allow \"unsafe\" and \"unwise\" chars.\n unsafeProtocol = {\n javascript: true,\n 'javascript:': true\n },\n // protocols that never have a hostname.\n hostlessProtocol = {\n javascript: true,\n 'javascript:': true\n },\n // protocols that always contain a // bit.\n slashedProtocol = {\n http: true,\n https: true,\n ftp: true,\n gopher: true,\n file: true,\n 'http:': true,\n 'https:': true,\n 'ftp:': true,\n 'gopher:': true,\n 'file:': true\n },\n querystring = require('qs');\n\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n if (url && typeof url === 'object' && url instanceof Url) { return url; }\n\n var u = new Url();\n u.parse(url, parseQueryString, slashesDenoteHost);\n return u;\n}\n\nUrl.prototype.parse = function (url, parseQueryString, slashesDenoteHost) {\n if (typeof url !== 'string') {\n throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n }\n\n /*\n * Copy chrome, IE, opera backslash-handling behavior.\n * Back slashes before the query string get converted to forward slashes\n * See: https://code.google.com/p/chromium/issues/detail?id=25916\n */\n var queryIndex = url.indexOf('?'),\n splitter = queryIndex !== -1 && queryIndex < url.indexOf('#') ? '?' : '#',\n uSplit = url.split(splitter),\n slashRegex = /\\\\/g;\n uSplit[0] = uSplit[0].replace(slashRegex, '/');\n url = uSplit.join(splitter);\n\n var rest = url;\n\n /*\n * trim before proceeding.\n * This is to support parse stuff like \" http://foo.com \\n\"\n */\n rest = rest.trim();\n\n if (!slashesDenoteHost && url.split('#').length === 1) {\n // Try fast path regexp\n var simplePath = simplePathPattern.exec(rest);\n if (simplePath) {\n this.path = rest;\n this.href = rest;\n this.pathname = simplePath[1];\n if (simplePath[2]) {\n this.search = simplePath[2];\n if (parseQueryString) {\n this.query = querystring.parse(this.search.substr(1));\n } else {\n this.query = this.search.substr(1);\n }\n } else if (parseQueryString) {\n this.search = '';\n this.query = {};\n }\n return this;\n }\n }\n\n var proto = protocolPattern.exec(rest);\n if (proto) {\n proto = proto[0];\n var lowerProto = proto.toLowerCase();\n this.protocol = lowerProto;\n rest = rest.substr(proto.length);\n }\n\n /*\n * figure out if it's got a host\n * user@server is *always* interpreted as a hostname, and url\n * resolution will treat //foo/bar as host=foo,path=bar because that's\n * how the browser resolves relative URLs.\n */\n if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@/]+@[^@/]+/)) {\n var slashes = rest.substr(0, 2) === '//';\n if (slashes && !(proto && hostlessProtocol[proto])) {\n rest = rest.substr(2);\n this.slashes = true;\n }\n }\n\n if (!hostlessProtocol[proto] && (slashes || (proto && !slashedProtocol[proto]))) {\n\n /*\n * there's a hostname.\n * the first instance of /, ?, ;, or # ends the host.\n *\n * If there is an @ in the hostname, then non-host chars *are* allowed\n * to the left of the last @ sign, unless some host-ending character\n * comes *before* the @-sign.\n * URLs are obnoxious.\n *\n * ex:\n * http://a@b@c/ => user:a@b host:c\n * http://a@b?@c => user:a host:c path:/?@c\n */\n\n /*\n * v0.12 TODO(isaacs): This is not quite how Chrome does things.\n * Review our test case against browsers more comprehensively.\n */\n\n // find the first instance of any hostEndingChars\n var hostEnd = -1;\n for (var i = 0; i < hostEndingChars.length; i++) {\n var hec = rest.indexOf(hostEndingChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) { hostEnd = hec; }\n }\n\n /*\n * at this point, either we have an explicit point where the\n * auth portion cannot go past, or the last @ char is the decider.\n */\n var auth, atSign;\n if (hostEnd === -1) {\n // atSign can be anywhere.\n atSign = rest.lastIndexOf('@');\n } else {\n /*\n * atSign must be in auth portion.\n * http://a@b/c@d => host:b auth:a path:/c@d\n */\n atSign = rest.lastIndexOf('@', hostEnd);\n }\n\n /*\n * Now we have a portion which is definitely the auth.\n * Pull that off.\n */\n if (atSign !== -1) {\n auth = rest.slice(0, atSign);\n rest = rest.slice(atSign + 1);\n this.auth = decodeURIComponent(auth);\n }\n\n // the host is the remaining to the left of the first non-host char\n hostEnd = -1;\n for (var i = 0; i < nonHostChars.length; i++) {\n var hec = rest.indexOf(nonHostChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) { hostEnd = hec; }\n }\n // if we still have not hit it, then the entire thing is a host.\n if (hostEnd === -1) { hostEnd = rest.length; }\n\n this.host = rest.slice(0, hostEnd);\n rest = rest.slice(hostEnd);\n\n // pull out port.\n this.parseHost();\n\n /*\n * we've indicated that there is a hostname,\n * so even if it's empty, it has to be present.\n */\n this.hostname = this.hostname || '';\n\n /*\n * if hostname begins with [ and ends with ]\n * assume that it's an IPv6 address.\n */\n var ipv6Hostname = this.hostname[0] === '[' && this.hostname[this.hostname.length - 1] === ']';\n\n // validate a little.\n if (!ipv6Hostname) {\n var hostparts = this.hostname.split(/\\./);\n for (var i = 0, l = hostparts.length; i < l; i++) {\n var part = hostparts[i];\n if (!part) { continue; }\n if (!part.match(hostnamePartPattern)) {\n var newpart = '';\n for (var j = 0, k = part.length; j < k; j++) {\n if (part.charCodeAt(j) > 127) {\n /*\n * we replace non-ASCII char with a temporary placeholder\n * we need this to make sure size of hostname is not\n * broken by replacing non-ASCII by nothing\n */\n newpart += 'x';\n } else {\n newpart += part[j];\n }\n }\n // we test again with ASCII char only\n if (!newpart.match(hostnamePartPattern)) {\n var validParts = hostparts.slice(0, i);\n var notHost = hostparts.slice(i + 1);\n var bit = part.match(hostnamePartStart);\n if (bit) {\n validParts.push(bit[1]);\n notHost.unshift(bit[2]);\n }\n if (notHost.length) {\n rest = '/' + notHost.join('.') + rest;\n }\n this.hostname = validParts.join('.');\n break;\n }\n }\n }\n }\n\n if (this.hostname.length > hostnameMaxLen) {\n this.hostname = '';\n } else {\n // hostnames are always lower case.\n this.hostname = this.hostname.toLowerCase();\n }\n\n if (!ipv6Hostname) {\n /*\n * IDNA Support: Returns a punycoded representation of \"domain\".\n * It only converts parts of the domain name that\n * have non-ASCII characters, i.e. it doesn't matter if\n * you call it with a domain that already is ASCII-only.\n */\n this.hostname = punycode.toASCII(this.hostname);\n }\n\n var p = this.port ? ':' + this.port : '';\n var h = this.hostname || '';\n this.host = h + p;\n this.href += this.host;\n\n /*\n * strip [ and ] from the hostname\n * the host field still retains them, though\n */\n if (ipv6Hostname) {\n this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n if (rest[0] !== '/') {\n rest = '/' + rest;\n }\n }\n }\n\n /*\n * now rest is set to the post-host stuff.\n * chop off any delim chars.\n */\n if (!unsafeProtocol[lowerProto]) {\n\n /*\n * First, make 100% sure that any \"autoEscape\" chars get\n * escaped, even if encodeURIComponent doesn't think they\n * need to be.\n */\n for (var i = 0, l = autoEscape.length; i < l; i++) {\n var ae = autoEscape[i];\n if (rest.indexOf(ae) === -1) { continue; }\n var esc = encodeURIComponent(ae);\n if (esc === ae) {\n esc = escape(ae);\n }\n rest = rest.split(ae).join(esc);\n }\n }\n\n // chop off from the tail first.\n var hash = rest.indexOf('#');\n if (hash !== -1) {\n // got a fragment string.\n this.hash = rest.substr(hash);\n rest = rest.slice(0, hash);\n }\n var qm = rest.indexOf('?');\n if (qm !== -1) {\n this.search = rest.substr(qm);\n this.query = rest.substr(qm + 1);\n if (parseQueryString) {\n this.query = querystring.parse(this.query);\n }\n rest = rest.slice(0, qm);\n } else if (parseQueryString) {\n // no query string, but parseQueryString still requested\n this.search = '';\n this.query = {};\n }\n if (rest) { this.pathname = rest; }\n if (slashedProtocol[lowerProto] && this.hostname && !this.pathname) {\n this.pathname = '/';\n }\n\n // to support http.request\n if (this.pathname || this.search) {\n var p = this.pathname || '';\n var s = this.search || '';\n this.path = p + s;\n }\n\n // finally, reconstruct the href based on what has been validated.\n this.href = this.format();\n return this;\n};\n\n// format a parsed object into a url string\nfunction urlFormat(obj) {\n /*\n * ensure it's an object, and not a string url.\n * If it's an obj, this is a no-op.\n * this way, you can call url_format() on strings\n * to clean up potentially wonky urls.\n */\n if (typeof obj === 'string') { obj = urlParse(obj); }\n if (!(obj instanceof Url)) { return Url.prototype.format.call(obj); }\n return obj.format();\n}\n\nUrl.prototype.format = function () {\n var auth = this.auth || '';\n if (auth) {\n auth = encodeURIComponent(auth);\n auth = auth.replace(/%3A/i, ':');\n auth += '@';\n }\n\n var protocol = this.protocol || '',\n pathname = this.pathname || '',\n hash = this.hash || '',\n host = false,\n query = '';\n\n if (this.host) {\n host = auth + this.host;\n } else if (this.hostname) {\n host = auth + (this.hostname.indexOf(':') === -1 ? this.hostname : '[' + this.hostname + ']');\n if (this.port) {\n host += ':' + this.port;\n }\n }\n\n if (this.query && typeof this.query === 'object' && Object.keys(this.query).length) {\n query = querystring.stringify(this.query, {\n arrayFormat: 'repeat',\n addQueryPrefix: false\n });\n }\n\n var search = this.search || (query && ('?' + query)) || '';\n\n if (protocol && protocol.substr(-1) !== ':') { protocol += ':'; }\n\n /*\n * only the slashedProtocols get the //. Not mailto:, xmpp:, etc.\n * unless they had them to begin with.\n */\n if (this.slashes || (!protocol || slashedProtocol[protocol]) && host !== false) {\n host = '//' + (host || '');\n if (pathname && pathname.charAt(0) !== '/') { pathname = '/' + pathname; }\n } else if (!host) {\n host = '';\n }\n\n if (hash && hash.charAt(0) !== '#') { hash = '#' + hash; }\n if (search && search.charAt(0) !== '?') { search = '?' + search; }\n\n pathname = pathname.replace(/[?#]/g, function (match) {\n return encodeURIComponent(match);\n });\n search = search.replace('#', '%23');\n\n return protocol + host + pathname + search + hash;\n};\n\nfunction urlResolve(source, relative) {\n return urlParse(source, false, true).resolve(relative);\n}\n\nUrl.prototype.resolve = function (relative) {\n return this.resolveObject(urlParse(relative, false, true)).format();\n};\n\nfunction urlResolveObject(source, relative) {\n if (!source) { return relative; }\n return urlParse(source, false, true).resolveObject(relative);\n}\n\nUrl.prototype.resolveObject = function (relative) {\n if (typeof relative === 'string') {\n var rel = new Url();\n rel.parse(relative, false, true);\n relative = rel;\n }\n\n var result = new Url();\n var tkeys = Object.keys(this);\n for (var tk = 0; tk < tkeys.length; tk++) {\n var tkey = tkeys[tk];\n result[tkey] = this[tkey];\n }\n\n /*\n * hash is always overridden, no matter what.\n * even href=\"\" will remove it.\n */\n result.hash = relative.hash;\n\n // if the relative url is empty, then there's nothing left to do here.\n if (relative.href === '') {\n result.href = result.format();\n return result;\n }\n\n // hrefs like //foo/bar always cut to the protocol.\n if (relative.slashes && !relative.protocol) {\n // take everything except the protocol from relative\n var rkeys = Object.keys(relative);\n for (var rk = 0; rk < rkeys.length; rk++) {\n var rkey = rkeys[rk];\n if (rkey !== 'protocol') { result[rkey] = relative[rkey]; }\n }\n\n // urlParse appends trailing / to urls like http://www.example.com\n if (slashedProtocol[result.protocol] && result.hostname && !result.pathname) {\n result.pathname = '/';\n result.path = result.pathname;\n }\n\n result.href = result.format();\n return result;\n }\n\n if (relative.protocol && relative.protocol !== result.protocol) {\n /*\n * if it's a known url protocol, then changing\n * the protocol does weird things\n * first, if it's not file:, then we MUST have a host,\n * and if there was a path\n * to begin with, then we MUST have a path.\n * if it is file:, then the host is dropped,\n * because that's known to be hostless.\n * anything else is assumed to be absolute.\n */\n if (!slashedProtocol[relative.protocol]) {\n var keys = Object.keys(relative);\n for (var v = 0; v < keys.length; v++) {\n var k = keys[v];\n result[k] = relative[k];\n }\n result.href = result.format();\n return result;\n }\n\n result.protocol = relative.protocol;\n if (!relative.host && !hostlessProtocol[relative.protocol]) {\n var relPath = (relative.pathname || '').split('/');\n while (relPath.length && !(relative.host = relPath.shift())) { }\n if (!relative.host) { relative.host = ''; }\n if (!relative.hostname) { relative.hostname = ''; }\n if (relPath[0] !== '') { relPath.unshift(''); }\n if (relPath.length < 2) { relPath.unshift(''); }\n result.pathname = relPath.join('/');\n } else {\n result.pathname = relative.pathname;\n }\n result.search = relative.search;\n result.query = relative.query;\n result.host = relative.host || '';\n result.auth = relative.auth;\n result.hostname = relative.hostname || relative.host;\n result.port = relative.port;\n // to support http.request\n if (result.pathname || result.search) {\n var p = result.pathname || '';\n var s = result.search || '';\n result.path = p + s;\n }\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n }\n\n var isSourceAbs = result.pathname && result.pathname.charAt(0) === '/',\n isRelAbs = relative.host || relative.pathname && relative.pathname.charAt(0) === '/',\n mustEndAbs = isRelAbs || isSourceAbs || (result.host && relative.pathname),\n removeAllDots = mustEndAbs,\n srcPath = result.pathname && result.pathname.split('/') || [],\n relPath = relative.pathname && relative.pathname.split('/') || [],\n psychotic = result.protocol && !slashedProtocol[result.protocol];\n\n /*\n * if the url is a non-slashed url, then relative\n * links like ../.. should be able\n * to crawl up to the hostname, as well. This is strange.\n * result.protocol has already been set by now.\n * Later on, put the first path part into the host field.\n */\n if (psychotic) {\n result.hostname = '';\n result.port = null;\n if (result.host) {\n if (srcPath[0] === '') { srcPath[0] = result.host; } else { srcPath.unshift(result.host); }\n }\n result.host = '';\n if (relative.protocol) {\n relative.hostname = null;\n relative.port = null;\n if (relative.host) {\n if (relPath[0] === '') { relPath[0] = relative.host; } else { relPath.unshift(relative.host); }\n }\n relative.host = null;\n }\n mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n }\n\n if (isRelAbs) {\n // it's absolute.\n result.host = relative.host || relative.host === '' ? relative.host : result.host;\n result.hostname = relative.hostname || relative.hostname === '' ? relative.hostname : result.hostname;\n result.search = relative.search;\n result.query = relative.query;\n srcPath = relPath;\n // fall through to the dot-handling below.\n } else if (relPath.length) {\n /*\n * it's relative\n * throw away the existing file, and take the new path instead.\n */\n if (!srcPath) { srcPath = []; }\n srcPath.pop();\n srcPath = srcPath.concat(relPath);\n result.search = relative.search;\n result.query = relative.query;\n } else if (relative.search != null) {\n /*\n * just pull out the search.\n * like href='?foo'.\n * Put this after the other two cases because it simplifies the booleans\n */\n if (psychotic) {\n result.host = srcPath.shift();\n result.hostname = result.host;\n /*\n * occationaly the auth can get stuck only in host\n * this especially happens in cases like\n * url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n */\n var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.hostname = authInHost.shift();\n result.host = result.hostname;\n }\n }\n result.search = relative.search;\n result.query = relative.query;\n // to support http.request\n if (result.pathname !== null || result.search !== null) {\n result.path = (result.pathname ? result.pathname : '') + (result.search ? result.search : '');\n }\n result.href = result.format();\n return result;\n }\n\n if (!srcPath.length) {\n /*\n * no path at all. easy.\n * we've already handled the other stuff above.\n */\n result.pathname = null;\n // to support http.request\n if (result.search) {\n result.path = '/' + result.search;\n } else {\n result.path = null;\n }\n result.href = result.format();\n return result;\n }\n\n /*\n * if a url ENDs in . or .., then it must get a trailing slash.\n * however, if it ends in anything else non-slashy,\n * then it must NOT get a trailing slash.\n */\n var last = srcPath.slice(-1)[0];\n var hasTrailingSlash = (result.host || relative.host || srcPath.length > 1) && (last === '.' || last === '..') || last === '';\n\n /*\n * strip single dots, resolve double dots to parent dir\n * if the path tries to go above the root, `up` ends up > 0\n */\n var up = 0;\n for (var i = srcPath.length; i >= 0; i--) {\n last = srcPath[i];\n if (last === '.') {\n srcPath.splice(i, 1);\n } else if (last === '..') {\n srcPath.splice(i, 1);\n up++;\n } else if (up) {\n srcPath.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (!mustEndAbs && !removeAllDots) {\n for (; up--; up) {\n srcPath.unshift('..');\n }\n }\n\n if (mustEndAbs && srcPath[0] !== '' && (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n srcPath.unshift('');\n }\n\n if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {\n srcPath.push('');\n }\n\n var isAbsolute = srcPath[0] === '' || (srcPath[0] && srcPath[0].charAt(0) === '/');\n\n // put the host back\n if (psychotic) {\n result.hostname = isAbsolute ? '' : srcPath.length ? srcPath.shift() : '';\n result.host = result.hostname;\n /*\n * occationaly the auth can get stuck only in host\n * this especially happens in cases like\n * url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n */\n var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.hostname = authInHost.shift();\n result.host = result.hostname;\n }\n }\n\n mustEndAbs = mustEndAbs || (result.host && srcPath.length);\n\n if (mustEndAbs && !isAbsolute) {\n srcPath.unshift('');\n }\n\n if (srcPath.length > 0) {\n result.pathname = srcPath.join('/');\n } else {\n result.pathname = null;\n result.path = null;\n }\n\n // to support request.http\n if (result.pathname !== null || result.search !== null) {\n result.path = (result.pathname ? result.pathname : '') + (result.search ? result.search : '');\n }\n result.auth = relative.auth || result.auth;\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n};\n\nUrl.prototype.parseHost = function () {\n var host = this.host;\n var port = portPattern.exec(host);\n if (port) {\n port = port[0];\n if (port !== ':') {\n this.port = port.substr(1);\n }\n host = host.substr(0, host.length - port.length);\n }\n if (host) { this.hostname = host; }\n};\n\nexports.parse = urlParse;\nexports.resolve = urlResolve;\nexports.resolveObject = urlResolveObject;\nexports.format = urlFormat;\n\nexports.Url = Url;\n",null,null,null,null,null,null,"// eslint-disable-next-line import/prefer-default-export\nexport const CodeObjectType = {\n ANALYSIS_FINDING: 'analysis-finding',\n DATABASE: 'database',\n QUERY: 'query',\n HTTP: 'http',\n EXTERNAL_ROUTE: 'external-route',\n EXTERNAL_SERVICE: 'external-service',\n ROUTE: 'route',\n PACKAGE: 'package',\n CLASS: 'class',\n FUNCTION: 'function',\n};\n","import { CodeObjectType } from './codeObjectType';\n\nfunction isExcludedParentType(type) {\n return [CodeObjectType.HTTP, CodeObjectType.DATABASE, CodeObjectType.EXTERNAL_SERVICE].includes(\n type\n );\n}\n\nexport default function codeObjectId(codeObject, tokens = []) {\n const { parent } = codeObject;\n\n // If it's a route, query, or external service we don't need to include the parent name\n // because it's always the same ('HTTP server requests' for route and 'Database' for queries).\n // This mirrors the VS Code implementation.\n if (parent && !isExcludedParentType(parent.type)) {\n codeObjectId(parent, tokens);\n\n let separator;\n switch (codeObject.parent.type) {\n case CodeObjectType.PACKAGE:\n separator = '/';\n break;\n case CodeObjectType.CLASS:\n separator = '::';\n break;\n default:\n separator = '->';\n }\n\n if (codeObject.type === CodeObjectType.FUNCTION) {\n separator = 'static' in codeObject && codeObject.static ? '.' : '#';\n }\n\n tokens.push(separator);\n }\n\n tokens.push(codeObject.name);\n\n return tokens;\n}\n","// eslint-disable-next-line import/extensions\nimport sha256 from 'crypto-js/sha256.js';\nimport analyze from './sql/analyze';\nimport { Buffer } from 'buffer';\n\nfunction isLogPathsEnabled() {\n try {\n return process.env.APPMAP_LOG_EXTERNAL_PATH === 'true';\n } catch (e) {\n if (e instanceof ReferenceError) return false;\n\n console.warn(e);\n }\n}\n\nconst LogPaths = isLogPathsEnabled();\nexport const hasProp = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\n\nexport function isFalsey(valueObj) {\n if (!valueObj) {\n return true;\n }\n if (valueObj.class === 'FalseClass') {\n return true;\n }\n if (valueObj.class === 'Array' && valueObj.value === '[]') {\n return true;\n }\n if (valueObj.value === '') {\n return true;\n }\n\n return false;\n}\n\nexport function isCommand(event) {\n if (event.http_server_request) {\n return true;\n }\n if (event.codeObject.labels.has('command')) {\n return true;\n }\n return false;\n}\n\nexport function capitalizeString(str) {\n if (typeof str !== 'string') {\n return '';\n }\n\n return str.slice(0, 1).toUpperCase() + str.slice(1).toLowerCase();\n}\n\nexport function getHttpLabel(event) {\n if (hasProp(event, 'http_server_request') === false) {\n return null;\n }\n\n const requestMethod = event.http_server_request.request_method;\n const pathInfo = event.http_server_request.path_info;\n let label;\n\n try {\n // the url is fake, we only care about the path info anyway\n const url = new URL(pathInfo, 'http://hostname');\n label = `${requestMethod} ${url.pathname}`;\n } catch (ex) {\n label = 'HTTP Request';\n }\n\n return label;\n}\n\nconst sqlLabels = new Set([\n 'insert',\n 'update',\n 'select',\n 'delete',\n 'alter',\n 'create',\n 'drop',\n 'rename',\n 'truncate',\n 'replace',\n 'savepoint',\n 'release',\n 'rollback',\n 'lock',\n 'unlock',\n 'set',\n 'start',\n 'call',\n 'delete',\n 'do',\n 'perform',\n 'handler',\n 'load',\n 'purge',\n 'reset',\n 'prepare',\n 'execute',\n 'deallocate',\n 'xa',\n]);\n\nexport function getSqlLabelFromString(sqlString) {\n const sqlChars = [...sqlString.trimLeft()];\n if (sqlChars.length > 0 && sqlChars[0] === '(') {\n // if the query is wrapped in parenthesis, drop the opening parenthesis\n // it doesn't matter if we leave a hanging closing parenthesis.\n // e.g. (SELECT 1);\n\n sqlChars.shift();\n }\n\n // drop sub-queries and parenthesized expressions\n let depth = 0;\n const topLevelSql = sqlChars\n .reduce((arr, c) => {\n if (c === '(') {\n depth += 1;\n }\n\n if (depth === 0) {\n arr.push(c);\n }\n\n if (c === ')') {\n depth -= 1;\n }\n\n return arr;\n }, [])\n .join('');\n\n let queryType = null;\n if (topLevelSql.search(/\\s/) === -1) {\n // There's only a single token\n // e.g. BEGIN, COMMIT, CHECKPOINT\n queryType = topLevelSql;\n } else {\n // convert non-word sequences to spaces and split by space\n // find the first known token\n queryType = topLevelSql\n .replace(/[^\\w]+/g, ' ')\n .toLowerCase()\n .split(' ')\n .find((t) => sqlLabels.has(t));\n }\n\n return ['SQL', capitalizeString(queryType) || null].join(' ');\n}\n\nexport function getSqlLabel(event) {\n if (hasProp(event, 'sql_query') === false) {\n return null;\n }\n\n return getSqlLabelFromString(event.sql_query.normalized_sql || event.sql_query.sql || '');\n}\n\nexport function getLabel(event) {\n let label = getHttpLabel(event);\n if (!label) {\n label = getSqlLabel(event);\n }\n return label;\n}\n\nexport function hashify(obj) {\n const clone = { ...obj };\n Object.keys(obj).forEach((key) => {\n const val = obj[key];\n if (Array.isArray(val)) {\n clone[key] = new Set(val);\n } else if (val instanceof Set) {\n clone[key] = val;\n } else if (val && typeof val === 'object') {\n clone[key] = hashify(val);\n } else {\n clone[key] = val;\n }\n });\n return clone;\n}\n\nconst REPOSITORY_RESOLVERS = {\n github: (d) => {\n const match = d.url.match(/github.com[:|/]?(.*).git/);\n if (!match || match.length <= 1) {\n return null;\n }\n\n const hash = typeof d.lineNumber === 'number' ? `#L${d.lineNumber}` : '';\n return `https://github.com/${match[1]}/blob/${d.commit}/${d.path}${hash}`;\n },\n};\n\nexport function getRepositoryUrl(url, path, commit = 'master', lineNumber = null) {\n if (url && path) {\n const d = { url, path, lineNumber, commit };\n const resolvers = Object.values(REPOSITORY_RESOLVERS);\n for (let i = 0; i < resolvers.length; i += 1) {\n const repositoryUrl = resolvers[i](d);\n if (repositoryUrl) {\n return repositoryUrl;\n }\n }\n }\n\n return null;\n}\n\nconst UPPER = 0x1;\nconst LOWER = 0x10;\nconst getCase = (char) => (/[A-Z]/.exec(char) === null ? LOWER : UPPER);\nconst getCasePattern = (str) => {\n if (str.length <= 2) {\n return null;\n }\n\n return {\n firstCase: getCase(str[0]),\n secondCase: getCase(str[1]),\n };\n};\n\nconst splitCamelCase = (str) => {\n const strLen = str.length;\n if (strLen < 1) {\n return [];\n }\n\n const casePattern = getCasePattern(str);\n if (!casePattern) {\n return [str];\n }\n\n const { firstCase, secondCase } = casePattern;\n const ret = [];\n let matched = false;\n for (let i = 2; i < strLen; i += 1) {\n const charCase = getCase(str[i]);\n if (charCase === UPPER) {\n if (firstCase === LOWER || secondCase === LOWER) {\n const token = str.slice(0, i);\n ret.push(token);\n ret.push(...splitCamelCase(str.slice(i)));\n matched = true;\n break;\n }\n } else if (charCase === LOWER && firstCase === UPPER && secondCase === UPPER) {\n const token = str.slice(0, i - 1);\n ret.push(token);\n ret.push(...splitCamelCase(str.slice(i - 1)));\n matched = true;\n break;\n }\n }\n\n if (!matched) {\n ret.push(str);\n }\n\n return ret;\n};\n\n// Builds the fully qualified function name of a function (static or instance) within a\n// fully qualified class name.\nexport function fullyQualifiedFunctionName(event) {\n const label = getLabel(event);\n if (label) {\n return label;\n }\n\n return event.toString();\n}\n\n// tokenizeIdentifier returns tokens of an identifier split by non-alphanumeric and camel casing\n// example:\n// someMethodName -> [ 'some', 'method', 'name' ]\n// some_method_name -> [ 'some', 'method', 'name' ]\n// org.company.MyPackage.MyClass -> [ 'org', 'company', 'My', 'Package', 'My', 'Class']\nexport function tokenizeIdentifier(id) {\n const ret = [];\n\n // Split first by non-alphanumeric tokens\n const tokens = (id || '').split(/[$.:#\\-_]/);\n\n // Split remaining tokens by camel case\n tokens.forEach((token) => {\n ret.push(...splitCamelCase(token));\n });\n\n return ret;\n}\n\nexport function addHiddenProperty(obj, property, opts) {\n if (!Object.hasOwnProperty.call(obj, '$hidden')) {\n Object.defineProperty(obj, '$hidden', {\n enumerable: false,\n writable: false,\n value: {},\n });\n }\n\n Object.defineProperty(obj.$hidden, property, {\n enumerable: false,\n writable: true,\n ...opts,\n });\n}\n\nexport function buildLabels(classMap, events) {\n const result = {};\n\n function addLabel(label, obj, type, target) {\n /* eslint-disable no-param-reassign */\n if (!obj[label]) {\n obj[label] = {};\n }\n\n if (!obj[label][type]) {\n obj[label][type] = [];\n }\n\n obj[label][type].push(target);\n /* eslint-enable no-param-reassign */\n }\n\n classMap.codeObjects\n .filter((obj) => obj.labels.size)\n .forEach((codeObject) => {\n Array.from(codeObject.labels).forEach((label) => {\n addLabel(label, result, codeObject.type, codeObject);\n });\n });\n\n events\n .filter((event) => event.isCall() && event.labels.size)\n .forEach((event) => {\n Array.from(event.labels).forEach((label) => {\n addLabel(label, result, 'event', event);\n });\n });\n\n return result;\n}\n\n// sizeof returns a naive byte count for an object when serialized.\n// I was using an external library for this (object-sizeof), but getting results off by a factor of\n// ~2. This is awfully wasteful, slow and inaccurate but it works for now. -DB\nexport const sizeof = (obj) => JSON.stringify(obj).length;\n\n// Returns a unique 'hash' (or really, a key) tied to the event's core identity: SQL, HTTP, or a\n// specific method on a specific class. This is _really_ naive. The idea is that this better finds\n// a singular change versus an existing object that has been removed and a new object added in its\n// place.\nexport function identityHashEvent(e) {\n if (e.httpServerRequest) {\n return 'http';\n }\n\n const { sqlQuery } = e;\n if (sqlQuery) {\n const queryOps = analyze(sqlQuery);\n const content = ['sql', queryOps.action, ...queryOps.tables].filter(Boolean).join('');\n return sha256(content).toString();\n }\n\n return e.toString();\n}\n\nexport function resolveDifferences(arr1, arr2) {\n let arr1Index = 0;\n let arr2Index = 0;\n\n for (;;) {\n const a = arr1[arr1Index];\n const b = arr2[arr2Index];\n if (!a && !b) {\n return;\n }\n\n if (typeof a === 'undefined') {\n arr1.push(null);\n arr1Index += 1;\n arr2Index += 1;\n continue; // eslint-disable-line no-continue\n }\n\n if (typeof b === 'undefined') {\n arr2.push(null);\n arr1Index += 1;\n arr2Index += 1;\n continue; // eslint-disable-line no-continue\n }\n\n const hashA = a.identityHash;\n const hashB = b.identityHash;\n if (hashA !== hashB) {\n let instancesA = 0;\n for (let i = arr1Index + 1; i < arr1.length; i += 1) {\n instancesA += arr1[i].identityHash === hashA ? 1 : 0;\n }\n\n let instancesB = 0;\n for (let i = arr2Index + 1; i < arr2.length; i += 1) {\n instancesB += arr2[i].identityHash === hashA ? 1 : 0;\n }\n\n if (instancesA >= instancesB) {\n arr2.splice(arr2Index, 0, null);\n } else if (instancesA < instancesB) {\n arr1.splice(arr1Index, 0, null);\n } // eslint-disable-line no-continue\n }\n\n arr1Index += 1;\n arr2Index += 1;\n }\n}\n\nexport function getRootEvents(eventArray) {\n return eventArray.filter((e) => e.isCall() && !e.parent);\n}\n\nfunction isEmpty(value) {\n if (value === undefined || value === null) {\n return true;\n }\n\n if (Array.isArray(value) || typeof value === 'string') {\n return value.length === 0;\n }\n\n if (value instanceof Set || value instanceof Map) {\n return value.size === 0;\n }\n\n if (typeof value === 'object') {\n return Object.values(value).every(isEmpty);\n }\n\n return false;\n}\n\nexport function transformToJSON(dataKeys, obj) {\n return dataKeys.reduce((memo, key) => {\n const value = obj[key];\n if (isEmpty(value)) {\n // nop\n } else if (value instanceof Set) {\n memo[key] = [...value];\n } else {\n memo[key] = value;\n }\n return memo;\n }, {});\n}\n\nexport function base64UrlDecode(encodedText) {\n const buffer = Buffer.from(encodedText, 'base64');\n return buffer.toString('utf-8');\n}\n\nexport function base64UrlEncode(text) {\n const buffer = Buffer.from(text, 'utf-8');\n return buffer.toString('base64').replace(/=/g, '').replace(/_/g, '/').replace(/-/g, '+');\n}\n\nconst SeenPaths = new Set();\nfunction logPath(path, status, reason) {\n if (!LogPaths) return;\n\n if (!SeenPaths.has(path)) {\n SeenPaths.add(path);\n process.stderr.write(`${status}: ${path}`);\n if (reason) process.stderr.write(` (${reason})`);\n process.stderr.write('\\n');\n }\n}\n\n// Use heuristic methods to determine if the code location is part of the project.\n// There are a lot of weird edge cases here. It would be better if the AppMap itself would\n// definitively report local (project) vs non-project code, but that isn't yet the case.\nexport function isLocalPath(location, disallowedFolders = []) {\n if (!location) return { isLocal: false };\n\n // Remove drive letter\n if (/^[a-zA-Z]:[\\\\/]/.test(location)) location = location.slice(2);\n\n // Split into path and line number\n let [path, lineno] = location.split(':');\n\n // :308\n if (location.includes('<')) {\n logPath(location, 'remote', `includes <`);\n }\n\n if ((!lineno || isNaN(parseInt(lineno, 10))) && path.split(/[\\\\/]/).length === 1) {\n logPath(location, 'remote', `no line number and no path separator chars`);\n return { isLocal: false };\n }\n\n if (path.length === 0) {\n logPath(location, 'remote', `zero-length`);\n return { isLocal: false };\n }\n\n // Example: :308\n if (path.charAt(0) === '<') {\n logPath(location, 'remote', `starts with <`);\n return { isLocal: false };\n }\n\n if (['/', '\\\\'].includes(path.charAt(0))) {\n logPath(location, 'remote', `starts with ${path.charAt(0)}`);\n return { isLocal: false };\n }\n\n if (/^\\.[/\\\\]/.test(path)) path = path.substring(2);\n\n for (let folder of disallowedFolders) {\n if (path.startsWith(`${folder}/`) || path.startsWith(`${folder}\\\\`)) {\n logPath(location, 'remote', `starts with ${folder}`);\n return { isLocal: false };\n }\n }\n\n logPath(location, 'local ');\n return { isLocal: true, path };\n}\n","// @ts-ignore\n\n// https://github.com/newrelic/newrelic-ruby-agent/blob/dev/lib/new_relic/agent/database/obfuscation_helpers.rb\n// License: https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE\n// Apache License 2.0\n\nconst COMMENTS_REGEXP = /(?:(?:#|--).*?(?=\\r|\\n|$))|(?:\\/\\*(?:[^/]|\\/[^*])*?(?:\\*\\/|\\/\\*.*))/gi;\n\nconst COMPONENTS_REGEXP_MAP = {\n single_quotes: /'(?:[^']|'')*?(?:'(?!'))/g,\n double_quotes: /\"(?:[^\"]|\"\")*?(?:\\\\\".*|\"(?!\"))/g,\n dollar_quotes: /(\\$(?!\\d)[^$]*?\\$).*?(?:\\1|$)/g,\n uuids: /\\{?(?:[0-9a-fA-F]-*){32}\\}?/g,\n numeric_literals: /-?\\b(?:[0-9]+\\.)?[0-9]+([eE][+-]?[0-9]+)?\\b/g,\n boolean_literals: /\\b(?:true|false|null)\\b/gi,\n hexadecimal_literals: /0x[0-9a-fA-F]+/g,\n oracle_quoted_strings: /q'\\[.*?(?:\\]'|$)|q'\\{.*?(?:\\}'|$)|q'<.*?(?:>'|$)|q'\\(.*?(?:\\)'|$)/g,\n};\n\n// We use these to check whether the query contains any quote characters\n// after obfuscation. If so, that's a good indication that the original\n// query was malformed, and so our obfuscation can't reliably find\n// literals. In such a case, we'll replace the entire query with a\n// placeholder.\nconst CLEANUP_REGEXP = {\n mysql: /'|\"|\\/\\*|\\*\\//,\n mysql2: /'|\"|\\/\\*|\\*\\//,\n postgres: /'|\\/\\*|\\*\\/|\\$(?!\\?)/,\n sqlite: /'|\\/\\*|\\*\\//,\n cassandra: /'|\\/\\*|\\*\\//,\n oracle: /'|\\/\\*|\\*\\//,\n oracle_enhanced: /'|\\/\\*|\\*\\//,\n};\n\n/**\n * @type {{string: string[]}}\n */\nconst DIALECT_COMPONENTS = {\n // @ts-ignore\n fallback: Object.keys(COMPONENTS_REGEXP_MAP),\n mysql: [\n 'single_quotes',\n 'double_quotes',\n 'numeric_literals',\n 'boolean_literals',\n 'hexadecimal_literals',\n ],\n postgres: ['single_quotes', 'dollar_quotes', 'uuids', 'numeric_literals', 'boolean_literals'],\n sqlite: ['single_quotes', 'numeric_literals', 'boolean_literals', 'hexadecimal_literals'],\n oracle: ['single_quotes', 'oracle_quoted_strings', 'numeric_literals'],\n cassandra: [\n 'single_quotes',\n 'uuids',\n 'numeric_literals',\n 'boolean_literals',\n 'hexadecimal_literals',\n ],\n};\n\nconst PLACEHOLDER = '?';\n\n/**\n * @param {string} dialect\n * @returns {RegExp}\n */\nfunction generateRegexp(dialect) {\n const components = DIALECT_COMPONENTS[dialect];\n const regexData = components.map((component) => COMPONENTS_REGEXP_MAP[component].source);\n const union = `(?:${regexData.flat().join(')|(?:')})`;\n return new RegExp(union, 'gi');\n}\n\nconst MYSQL_COMPONENTS_REGEXP = generateRegexp('mysql');\nconst POSTGRES_COMPONENTS_REGEXP = generateRegexp('postgres');\nconst SQLITE_COMPONENTS_REGEXP = generateRegexp('sqlite');\nconst ORACLE_COMPONENTS_REGEXP = generateRegexp('oracle');\nconst CASSANDRA_COMPONENTS_REGEXP = generateRegexp('cassandra');\nconst FALLBACK_REGEXP = generateRegexp('fallback');\n\nfunction detectUnmatchedPairs(obfuscated, adapter) {\n if (CLEANUP_REGEXP[adapter]) {\n return CLEANUP_REGEXP[adapter].test(obfuscated);\n }\n return CLEANUP_REGEXP.mysql.test(obfuscated);\n}\n\n/**\n * Replaces literal query parameters with parameter symbols (e.g. '?');\n *\n * @param {string} sql\n * @param {string} adapter\n * @returns {string}\n */\nexport default function normalize(sql, adapter) {\n /** @type {RegExp[]} */ let regexp;\n switch (adapter) {\n case 'mysql':\n case 'mysql2':\n regexp = MYSQL_COMPONENTS_REGEXP;\n break;\n case 'postgres':\n regexp = POSTGRES_COMPONENTS_REGEXP;\n break;\n case 'sqlite':\n regexp = SQLITE_COMPONENTS_REGEXP;\n break;\n case 'oracle':\n case 'oracle_enhanced':\n regexp = ORACLE_COMPONENTS_REGEXP;\n break;\n case 'cassandra':\n regexp = CASSANDRA_COMPONENTS_REGEXP;\n break;\n default:\n regexp = FALLBACK_REGEXP;\n }\n\n let obfuscated = sql.replace(regexp, PLACEHOLDER).replace(COMMENTS_REGEXP, '');\n if (detectUnmatchedPairs(obfuscated, adapter)) {\n obfuscated = sql;\n }\n return obfuscated;\n}\n","import sqliteParser from '@appland/sql-parser';\nimport ParseError from './parseError';\nimport reportParseError from './sqlErrorHandler';\n\nexport default function parse(sql) {\n const parseSQL = sql.replace(/\\s+returning\\s+\\*/i, '');\n try {\n return sqliteParser(parseSQL);\n } catch (e) {\n reportParseError(new ParseError(e.message, parseSQL));\n return null;\n }\n}\n","export default class ParseError extends Error {\n constructor(message, sql) {\n super(message);\n\n this.sql = sql;\n }\n\n toString() {\n return `${this.message}: ${this.sql}`;\n }\n}\n","let warnedAboutSqlErrorHandler = false;\nlet sqlErrorHandler;\n\nexport function getSQLErrorHandler() {\n return sqlErrorHandler;\n}\n\nexport function setSQLErrorHandler(handler) {\n if (sqlErrorHandler)\n console.warn(`Replacing existing sqlErrorHandler ${sqlErrorHandler} with ${handler}`);\n\n sqlErrorHandler = handler;\n}\n\nexport default function reportParseError(parseError) {\n if (sqlErrorHandler) {\n sqlErrorHandler(parseError);\n return;\n }\n\n if (!warnedAboutSqlErrorHandler) {\n console.debug('No SQL error handler was set. SQL errors will be logged to the console.');\n console.debug('Set a SQL error handling by calling setSQLErrorHandler(handler).');\n warnedAboutSqlErrorHandler = true;\n }\n\n console.debug(parseError);\n}\n","/* eslint-disable no-inner-declarations */\nimport normalize from './normalize';\nimport parseAST from './parse';\n\nexport default function analyze(sql) {\n const ast = parseAST(sql);\n if (!ast) {\n return null;\n }\n\n const actions = [];\n const columns = [];\n const tables = [];\n let joins = 0;\n\n function parseQuery(statement) {\n if (statement === null) return;\n\n const tokens = ['type', 'variant']\n .map((propertyName) => statement[propertyName])\n .filter(Boolean);\n\n const key = tokens.join('.');\n // eslint-disable-next-line no-use-before-define\n let parser = parsers[key];\n if (!parser) {\n // eslint-disable-next-line no-use-before-define\n parser = parseStatement;\n }\n\n const parserList = Array.isArray(parser) ? parser : [parser];\n parserList.forEach((prs) => prs(statement));\n }\n\n function parseStatement(statement) {\n if (statement === null) {\n console.warn(`Ignoring request to parse null statement in query ${sql}`);\n return;\n }\n\n const reservedWords = ['type', 'variant', 'name', 'value'];\n Object.keys(statement)\n .filter((property) => !reservedWords.includes(property))\n .map((propertyName) => statement[propertyName])\n .forEach((property) => {\n if (Array.isArray(property)) {\n property.forEach(parseQuery);\n } else if (typeof property === 'object') {\n parseQuery(property);\n } else if (typeof property === 'string' || typeof property === 'boolean') {\n // pass\n } else {\n console.warn(`Unrecognized subexpression: ${typeof property} ${property}`);\n }\n });\n }\n\n function parseList(listElements, statement) {\n listElements.forEach((listElement) => {\n const subExpression = statement[listElement];\n if (Array.isArray(subExpression)) {\n subExpression.forEach(parseQuery);\n } else if (typeof subExpression === 'object') {\n parseQuery(subExpression);\n } else {\n console.warn(`Unrecognized subexpression: ${subExpression}`);\n }\n });\n }\n\n const nop = () => {};\n\n function parseIdentifierExpression(statement) {\n if (statement.format === 'table') {\n tables.push(statement.name);\n }\n parseList(['columns'], statement);\n }\n\n function recordAction(action) {\n return () => {\n actions.push(action);\n };\n }\n\n const parsers = {\n 'literal.text': nop,\n 'literal.decimal': nop,\n 'identifier.star': (statement) => columns.push(statement.name),\n 'identifier.column': (statement) => columns.push(statement.name),\n 'identifier.table': (statement) => tables.push(statement.name),\n 'identifier.expression': parseIdentifierExpression,\n 'statement.select': [recordAction('select'), parseStatement],\n 'statement.insert': [recordAction('insert'), parseStatement],\n 'statement.update': [recordAction('update'), parseStatement],\n 'statement.delete': [recordAction('delete'), parseStatement],\n 'statement.pragma': nop,\n 'map.join': [\n (statement) => {\n joins += statement.map.length;\n },\n parseStatement,\n ],\n };\n\n parseQuery(ast);\n\n function unique(list) {\n return [...new Set(list)];\n }\n const uniqueActions = unique(actions).sort();\n\n return {\n actions: uniqueActions,\n tables: unique(tables).sort(),\n columns: unique(columns).sort(),\n joinCount: joins,\n };\n}\n\n// returns a JSON of SQL query AST with all literals replaced by variables and all variable names\n// removed. If the query cannot be parsed, returns a best-effort normalized SQL string.\nexport function abstractSqlAstJSON(query, databaseType) {\n const ast = parseAST(query);\n if (!ast) return normalize(query, databaseType);\n\n return JSON.stringify(ast, (_, value) => {\n if (value === null) return null;\n\n switch (value.type) {\n case 'variable':\n case 'literal':\n return { type: 'variable' };\n default:\n return value;\n }\n });\n}\n","import codeObjectId from './codeObjectId';\nimport { CodeObjectType } from './codeObjectType';\nimport { addHiddenProperty, getSqlLabelFromString, transformToJSON } from './util';\n\nexport default class CodeObject {\n constructor(data, parent) {\n this.data = { ...data };\n\n // Include all raw data by default, and selectively remove some fields\n // that aren't appropriate to all types. This way, any mistakes in JSON stringification\n // will be extra data rather than missing data.\n this.dataKeys = Object.keys(data).filter(\n (item) => !['dynamic', 'static', 'location', 'database_type'].includes(item)\n );\n this.dataKeys.push('children');\n if (data.type === CodeObjectType.FUNCTION) {\n this.dataKeys.push('static');\n this.dataKeys.push('location');\n }\n if (data.type === CodeObjectType.QUERY) {\n this.dataKeys.push('database_type');\n }\n\n if (!(this.data.labels instanceof Set)) {\n this.data.labels = new Set(this.data.labels);\n }\n\n this.children = [];\n if (parent) {\n parent.children.push(this);\n }\n\n addHiddenProperty(this, 'parent', { value: parent });\n addHiddenProperty(this, 'events', { writable: false, value: [] });\n addHiddenProperty(this, 'id');\n addHiddenProperty(this, 'fqid');\n }\n\n get id() {\n if (!this.$hidden.id) {\n this.$hidden.id = this.buildId().join('');\n }\n return this.$hidden.id;\n }\n\n get name() {\n return this.data.name;\n }\n\n get type() {\n return this.data.type;\n }\n\n get static() {\n return this.data.static;\n }\n\n get location() {\n return this.data.location;\n }\n\n get labels() {\n return this.data.labels;\n }\n\n get events() {\n return this.$hidden.events;\n }\n\n get parent() {\n return this.$hidden.parent;\n }\n\n set parent(val) {\n this.$hidden.parent = val;\n }\n\n // Gets the source locations for this code object. For a package, no source locations are returned\n // (there would be too many to be useful). For a class, the paths to all files which add methods to the class are\n // returned. For a function, the path and line number is returned.\n get locations() {\n switch (this.type) {\n case CodeObjectType.CLASS:\n return Array.from(this.classLocations()).sort();\n case CodeObjectType.FUNCTION:\n return [this.location];\n default:\n return [];\n }\n }\n\n get packageOf() {\n return [this, ...this.ancestors()]\n .filter((obj) => obj.type === CodeObjectType.PACKAGE)\n .map((obj) => obj.name)\n .reverse()\n .join('/');\n }\n\n get classOf() {\n return [this, ...this.ancestors()]\n .filter((obj) => obj.type === CodeObjectType.CLASS)\n .map((obj) => obj.name)\n .reverse()\n .join('::');\n }\n\n get classObject() {\n return [this, ...this.ancestors()].find((obj) => obj.type === CodeObjectType.CLASS);\n }\n\n get packageObject() {\n return [this, ...this.ancestors()].find((obj) => obj.type === CodeObjectType.PACKAGE);\n }\n\n get functions() {\n if (this.type === CodeObjectType.CLASS) {\n // getting the functions of a class should not return functions of nested classes\n return this.children.filter((obj) => obj.type === CodeObjectType.FUNCTION);\n }\n\n return this.descendants().filter((obj) => obj.type === CodeObjectType.FUNCTION);\n }\n\n get classes() {\n return [this, ...this.descendants()].filter(\n (obj) => obj.type === CodeObjectType.CLASS && obj.functions.length\n );\n }\n\n // Enumerate this code object and all its descendants, calling a function for each one. The\n // traversal is depth-first.\n visit(fn, stack = []) {\n stack.push(this);\n fn(this, stack);\n this.children.forEach((child) => child.visit(fn, stack));\n stack.pop();\n }\n\n // Enumerate this code object and all its ancestors, calling a function for each one.\n visitAncestors(fn) {\n let ancestor = this;\n while (ancestor) {\n fn(ancestor);\n ancestor = ancestor.parent;\n }\n }\n\n /**\n * Finds the most specific descendants of a code object that have the same type.\n * The traversal stops when encountering a child of any other type.\n * This method is useful for retrieving children without worrying about types or deeply nested objects.\n *\n * For example, the 'leafs' of the package `com` may be:\n * - com.myorg.myapp\n * - com.myorg.myapp.api\n *\n * Whereas its children would only contain \"myorg\", and its descendants would include functions\n * and classes from any other nested package.\n *\n */\n leafs() {\n const { type } = this;\n const queue = [this];\n const leafArray = [];\n\n while (queue.length) {\n const obj = queue.pop();\n const childrenOfType = obj.children.filter((child) => child.type === type);\n\n // If this object has children of another type, consider it the most specific of the type.\n // For example, a package containing a class.\n if (childrenOfType.length) {\n queue.push(...childrenOfType);\n }\n\n // If, however, this object has a variety of child types, it's both a leaf and a parent\n if (\n (!obj.children.length && obj.type === type) ||\n childrenOfType.length !== obj.children.length\n ) {\n leafArray.push(obj);\n }\n }\n\n return leafArray;\n }\n\n /**\n * Returns leafs of all children. Similar to the `classes` accessor, but returns children of any\n * type.\n *\n * @see leafs\n */\n childLeafs() {\n return this.children.map((child) => child.leafs()).flat();\n }\n\n buildId(tokens = []) {\n return codeObjectId(this, tokens);\n }\n\n classLocations(paths = new Set()) {\n this.children.forEach((child) => child.classLocations(paths));\n\n if (this.type === CodeObjectType.FUNCTION && this.location) {\n const tokens = this.location.split(':', 2);\n paths.add(tokens[0]);\n }\n return paths;\n }\n\n toJSON() {\n return transformToJSON(this.dataKeys, this);\n }\n\n static constructDataChainFromEvent(event) {\n let elements;\n if (event.httpServerRequest) {\n elements = [\n {\n type: CodeObjectType.HTTP,\n name: 'HTTP server requests',\n },\n {\n type: CodeObjectType.ROUTE,\n name: event.route,\n },\n ];\n } else if (event.httpClientRequest) {\n let serviceName;\n\n try {\n const url = new URL(event.httpClientRequest.url);\n serviceName = url.host;\n } catch {\n serviceName = 'External service';\n }\n\n elements = [\n {\n type: CodeObjectType.EXTERNAL_SERVICE,\n name: serviceName,\n },\n {\n type: CodeObjectType.EXTERNAL_ROUTE,\n name: event.route,\n },\n ];\n } else if (event.sqlQuery) {\n elements = [\n {\n type: CodeObjectType.DATABASE,\n name: 'Database',\n },\n {\n type: CodeObjectType.QUERY,\n name: event.sqlQuery,\n database_type: event.sql.database_type,\n },\n ];\n } else {\n elements = [\n {\n type: CodeObjectType.CLASS,\n name: event.definedClass,\n },\n {\n type: CodeObjectType.FUNCTION,\n name: event.methodId,\n static: event.isStatic,\n location: '',\n },\n ];\n }\n\n // Flag this object as having been created dynamically\n const queue = [...elements];\n while (queue.length) {\n const obj = queue.pop();\n obj.dynamic = true;\n if (obj.children) {\n obj.children.forEach((child) => queue.push(child));\n }\n }\n\n return elements;\n }\n\n get inboundConnections() {\n return this.allEvents.filter((e) => e.parent).map((e) => e.parent.codeObject);\n }\n\n get outboundConnections() {\n return this.allEvents\n .map((e) => e.children)\n .flat()\n .map((e) => e.codeObject);\n }\n\n get sqlQueries() {\n return this.allEvents\n .map((e) => e.children)\n .flat()\n .filter((e) => e.sql)\n .map((e) => e.codeObject);\n }\n\n get prettyName() {\n switch (this.type) {\n case CodeObjectType.FUNCTION:\n return `${this.classOf}${this.static ? '.' : '#'}${this.name}`;\n case CodeObjectType.CLASS:\n return this.classOf;\n case CodeObjectType.PACKAGE:\n return this.packageOf;\n case CodeObjectType.QUERY:\n return getSqlLabelFromString(this.name);\n default:\n return this.name;\n }\n }\n\n get fqid() {\n if (!this.$hidden.fqid) {\n this.$hidden.fqid = `${this.type}:${this.id}`;\n }\n return this.$hidden.fqid;\n }\n\n // The zone of deprecation.\n // ------------------------\n\n // This function is deprecated, because it allocates all events of all descendants into a new\n // array for each invocation.\n // Use `CodeObject.visit()` and `CodeObject.events` instead. A functional style is both more\n // idiomatic and more efficient.\n get allEvents() {\n return [this, ...this.descendants()].map((obj) => obj.events).flat();\n }\n\n // This function is deprecated, because it allocates all descendants into a new array for each invocation.\n // Use `CodeObject.visit()` instead. A functional style is both more idiomatic and more efficient.\n descendants() {\n const queue = [...this.children];\n const children = [];\n\n while (queue.length) {\n const child = queue.pop();\n children.push(child);\n queue.push(...child.children);\n }\n\n return children;\n }\n\n // This function is deprecated, because it allocates all descendants into a new array for each invocation.\n // Use `CodeObject.visitAncestors()` instead. A functional style is both more idiomatic and more efficient.\n ancestors() {\n let currentObject = this.parent;\n const parents = [];\n\n while (currentObject) {\n parents.push(currentObject);\n currentObject = currentObject.parent;\n }\n\n return parents;\n }\n}\n","import CodeObject from './codeObject';\nimport { CodeObjectType } from './codeObjectType';\n\nfunction indexCodeObject(co, codeObjects, codeObjectsById) {\n codeObjects.push(co);\n codeObjectsById[co.id] = co;\n}\n\nexport default class ClassMap {\n constructor(classMap) {\n this.codeObjectsByLocation = {};\n this.codeObjects = [];\n this.codeObjectsById = {};\n\n const buildCodeObject = (data, parent = null) => {\n const co = new CodeObject(data, parent);\n indexCodeObject(co, this.codeObjects, this.codeObjectsById);\n\n (data.children || []).forEach((child) => {\n buildCodeObject(child, co);\n });\n\n if (co.type !== 'package') {\n co.locations.forEach((location) => {\n let codeObjects = this.codeObjectsByLocation[location];\n if (!codeObjects) {\n codeObjects = [];\n this.codeObjectsByLocation[location] = codeObjects;\n }\n codeObjects.push(co);\n });\n }\n\n return co;\n };\n\n this.roots = classMap.map((root) => buildCodeObject(root));\n }\n\n visit(fn) {\n this.roots.forEach((co) => co.visit(fn));\n }\n\n search(query) {\n const queryLower = query.toLowerCase();\n return this.codeObjects.filter((co) => co.id.toLowerCase().indexOf(queryLower) !== -1);\n }\n\n codeObjectFromId(id) {\n return this.codeObjectsById[id];\n }\n\n codeObjectsAtLocation(location) {\n return this.codeObjectsByLocation[location] || [];\n }\n\n codeObjectFromEvent(event) {\n let codeObject;\n // These types of events should not be reporting path and lineno, but sometimes\n // they do.\n if (!(event.httpServerRequest || event.httpClientRequest || event.sql)) {\n const { path, lineno } = event;\n const location = [path, lineno].filter((e) => e).join(':');\n if (location !== '') {\n const codeObjects = this.codeObjectsAtLocation(location);\n codeObject = codeObjects.find((o) => o.name === event.methodId);\n if (codeObject) {\n return codeObject;\n }\n }\n }\n\n return null;\n }\n\n // Returns the first root code object of a given type or null if it doesn't exist\n root(type) {\n return this.roots.find((obj) => obj.type === type);\n }\n\n // Returns the root HTTP code object if it exists\n get httpObject() {\n return this.root(CodeObjectType.HTTP);\n }\n\n // Returns the root SQL code object if it exists\n get sqlObject() {\n return this.root(CodeObjectType.DATABASE);\n }\n\n // Binds an event array to code objects and vice versa. This allows use of\n // direct accessors: `Event.codeObject` and `CodeObject.events`. Additionally,\n // it guarantees non-null accessors, meaning it will construct a code object\n // for an event if it previously did not exist.\n bindEvents(events) {\n if (!events || !Array.isArray(events) || !events.length) {\n return;\n }\n\n const validCodeObjects = new Set();\n events\n .filter((e) => e.isCall())\n .forEach((e) => {\n let codeObject = this.codeObjectFromEvent(e);\n if (!codeObject) {\n const findOrCreateCodeObject = (data, codeObjectArray, parent) => {\n // TODO: This ignores static/non-static function collisions and function overloads, though this method\n // is never currently called in a context where those edge cases exist.\n let newCodeObject = codeObjectArray.find(\n (obj) => obj.type === data.type && obj.name === data.name\n );\n\n if (!newCodeObject) {\n newCodeObject = new CodeObject(data, parent);\n if (!parent) {\n this.roots.push(newCodeObject);\n }\n indexCodeObject(newCodeObject, this.codeObjects, this.codeObjectsById);\n }\n\n return newCodeObject;\n };\n\n const dataElements = CodeObject.constructDataChainFromEvent(e);\n let parent = null;\n dataElements.forEach((dataElement) => {\n parent = findOrCreateCodeObject(\n dataElement,\n parent ? parent.children : this.roots,\n parent\n );\n });\n codeObject = parent;\n }\n\n e.codeObject = codeObject;\n codeObject.events.push(e);\n\n codeObject.visitAncestors((obj) => validCodeObjects.add(obj));\n });\n\n this.codeObjects = this.codeObjects.filter((obj) => validCodeObjects.has(obj));\n\n function filterCodeObjects(objectsList, allObjects) {\n return objectsList.filter((obj) => {\n if (allObjects.has(obj)) {\n obj.children = filterCodeObjects(obj.children, allObjects);\n return true;\n }\n return false;\n });\n }\n\n this.roots = filterCodeObjects(this.roots, validCodeObjects);\n\n Object.keys(this.codeObjectsByLocation).forEach((obj) => {\n if (!validCodeObjects.has(obj)) {\n delete this.codeObjectsByLocation[obj];\n }\n });\n\n Object.entries(this.codeObjectsById).forEach(([id, obj]) => {\n if (!validCodeObjects.has(obj)) {\n delete this.codeObjectsById[id];\n }\n });\n }\n\n toJSON() {\n return this.roots;\n }\n}\n","import { addHiddenProperty } from '../util';\n\n// Deprecated. Prefer `Event` instead.\nclass CallNode {\n constructor(input = {}, output = {}, caller = null, labels = []) {\n this.input = input;\n this.output = output;\n this.children = [];\n this.labels = labels;\n\n // Cyclic references shall not be enumerable\n addHiddenProperty(this, 'caller', { value: caller });\n }\n\n get caller() {\n return this.$hidden.caller;\n }\n\n set caller(value) {\n this.$hidden.$hiddencaller = value;\n }\n\n clone() {\n const input = { ...this.input };\n const output = { ...this.output };\n const labels = [...this.labels];\n const newNode = new CallNode(input, output, null, labels);\n\n if (this.displayName) {\n newNode.displayName = this.displayName;\n }\n\n this.children.forEach((child) => {\n const newChild = child.clone();\n newNode.addChild(newChild);\n newChild.caller = newNode;\n });\n\n return newNode;\n }\n\n addChild(node) {\n this.children.push(node);\n }\n\n // Replace a given child with a different set of children.\n replaceChild(child, children) {\n const idx = this.children.indexOf(child);\n if (idx === -1) {\n throw new Error(`${child} not found in call tree`);\n }\n\n this.children.splice(idx, 1, ...children);\n /* eslint-disable no-param-reassign */\n children.forEach((c) => {\n c.caller = this;\n });\n child.caller = null;\n /* eslint-enable no-param-reassign */\n }\n\n removeChild(child) {\n const childIndex = this.children.indexOf(child);\n if (childIndex < 0) {\n throw new Error(`${child} found orphaned by ${this} !`);\n }\n this.children.splice(childIndex, 1);\n }\n\n postOrderForEach(fn, stack = []) {\n stack.push(this);\n const children = [...this.children];\n children.forEach((child) => child.postOrderForEach(fn, stack));\n fn(this, stack);\n stack.pop(this);\n }\n\n preOrderForEach(fn, stack = []) {\n stack.push(this);\n fn(this, stack);\n const children = [...this.children];\n children.forEach((child) => child.preOrderForEach(fn, stack));\n stack.pop(this);\n }\n\n forEach(fn) {\n this.postOrderForEach(fn);\n }\n\n // filter returns a tree in which all nodes match a condition. If a node fails the\n // condition, its children are adopted by it's parent.\n filter(conditionFn) {\n const root = this.clone();\n root.forEach((node, stack) => {\n if (node.isRoot()) {\n return;\n }\n\n if (!conditionFn(node, stack)) {\n const parent = node.caller;\n parent.replaceChild(node, node.children);\n }\n });\n\n return root;\n }\n\n // include returns a tree in which all leaf nodes match a condition.\n // If a node passes the condition, the node and all of its parents are retained\n // in the tree. If it fails, the node and its children are removed from the tree.\n // Note that if a node passes the condition, the condition will not be evaluated\n // for that node's parent nodes, since they are already marked as retained.\n include(conditionFn) {\n /* eslint-disable no-param-reassign */\n const root = this.clone();\n root.postOrderForEach((node, stack) => {\n if (node.isRoot()) {\n return;\n }\n\n if (node.marked_include && node.caller) {\n node.caller.marked_include = true;\n return;\n }\n\n node.marked_include = conditionFn(node, stack);\n if (node.marked_include) {\n if (node.caller) {\n node.caller.marked_include = true;\n }\n return;\n }\n\n if (node.caller) {\n node.caller.removeChild(node);\n }\n });\n\n root.postOrderForEach((node) => {\n delete node.marked_include;\n });\n\n return root;\n /* eslint-enable no-param-reassign */\n }\n\n // exclude returns a tree in which all nodes that match a condition are removed, along\n // with their child nodes.\n exclude(conditionFn) {\n const root = this.clone();\n root.forEach((node, stack) => {\n if (node.isRoot()) {\n return;\n }\n\n if (conditionFn(node, stack)) {\n const parent = node.caller;\n parent.removeChild(node);\n }\n });\n\n return root;\n }\n\n // toArray returns this tree as a one dimensional array\n toArray() {\n const childEvents = this.children.map((child) => child.toArray()).flat();\n\n if (this.isRoot()) {\n return childEvents;\n }\n\n return [this, ...childEvents];\n }\n\n // find calls find recursively on all children\n // iterates in pre-order\n find(fn) {\n if (fn(this)) {\n return this;\n }\n\n for (let i = 0; i < this.children.length; i += 1) {\n const match = this.children[i].find(fn);\n if (match) {\n return match;\n }\n }\n\n return null;\n }\n\n // depth returns the depth of this node\n depth() {\n return this.ancestors().length;\n }\n\n // ancestors returns an array of this nodes ancestors\n ancestors() {\n const nodes = [];\n\n let parent = this.caller;\n while (parent) {\n nodes.push(parent);\n parent = parent.caller;\n }\n\n return nodes;\n }\n\n // returns whether or not a node has a particular node in its ancestry\n hasAncestor(ancestor) {\n let node = this;\n while (node) {\n if (node === ancestor) {\n return true;\n }\n node = node.caller;\n }\n return false;\n }\n\n descendants() {\n return [this, ...this.children.map((x) => x.descendants()).flat()];\n }\n\n next() {\n if (this.children.length > 0) {\n return this.children[0];\n }\n\n let child = this;\n let parent = this.caller;\n const fnChildIndex = (n) => n === child;\n while (parent) {\n const myIndex = parent.children.findIndex(fnChildIndex);\n if (myIndex < 0) {\n throw new Error(`${this} found orphaned by ${parent}!`);\n }\n\n if (myIndex < parent.children.length - 1) {\n return parent.children[myIndex + 1];\n }\n\n child = parent;\n parent = parent.caller;\n }\n\n return null;\n }\n\n previous() {\n const parent = this.caller;\n if (!parent) {\n return null;\n }\n\n if (parent.children.length === 1) {\n return parent;\n }\n\n const myIndex = parent.children.findIndex((n) => n === this);\n if (myIndex < 0) {\n throw new Error(`${this.input.id} found orphaned by ${parent.input.id}!`);\n }\n\n if (myIndex > 0) {\n // this branch will yield our previous node\n let candidate = parent.children[myIndex - 1];\n\n // iterate until we find a leaf node\n while (candidate.children.length > 0) {\n candidate = candidate.children[candidate.children.length - 1];\n }\n\n return candidate;\n }\n\n return parent;\n }\n\n // return the node to the left, at given max depth\n left(depth) {\n const target = depth || this.depth();\n\n // find the target or the nearest descendant\n let current = this;\n for (;;) {\n const parent = current.caller;\n if (!parent) return this;\n\n const siblings = parent.children;\n const i = siblings.indexOf(current);\n if (i !== 0) {\n current = parent.children[i - 1];\n break;\n } else {\n current = parent;\n }\n }\n\n // find rightmost child closest to the right depth\n while (current.depth() !== target) {\n const { children } = current;\n if (children.length === 0) break;\n current = children[children.length - 1];\n }\n\n return current;\n }\n\n // return the node to the right, at given max depth\n right(depth) {\n const target = depth || this.depth();\n\n // find the target or the nearest descendant\n let current = this;\n for (;;) {\n const parent = current.caller;\n if (!parent) return this;\n\n const siblings = parent.children;\n const i = siblings.indexOf(current);\n if (i !== siblings.length - 1) {\n current = parent.children[i + 1];\n break;\n } else {\n current = parent;\n }\n }\n\n // find leftmost child closest to the right depth\n while (current.depth() !== target) {\n const { children } = current;\n if (children.length === 0) break;\n [current] = children;\n }\n\n return current;\n }\n\n isRoot() {\n return this.caller === null;\n }\n\n count() {\n let numNodes = 0;\n this.forEach(() => {\n numNodes += 1;\n });\n return numNodes;\n }\n\n get id() {\n if (this.input && this.input.id) {\n return this.input.id;\n }\n return null;\n }\n}\n\nexport default CallNode;\n","function getListenerArray(eventSource, eventType) {\n /* eslint-disable no-param-reassign */\n let listeners = eventSource.listeners[eventType];\n if (!listeners) {\n listeners = [];\n eventSource.listeners[eventType] = listeners;\n }\n return listeners;\n /* eslint-enable no-param-reassign */\n}\n\nexport default class EventSource {\n constructor() {\n this.listeners = {};\n this.anyListeners = [];\n }\n\n once(eventType, fn) {\n const handlers = getListenerArray(this, eventType);\n handlers.push({ fn, once: true });\n return this;\n }\n\n on(eventType, fn) {\n const handlers = getListenerArray(this, eventType);\n handlers.push({ fn });\n return this;\n }\n\n off(eventType, fn) {\n const handlers = this.listeners[eventType];\n\n if (handlers) {\n const updatedHandlers = handlers.filter((h) => h.fn && h.fn !== fn);\n if (updatedHandlers.length === 0) {\n delete this.listeners[eventType];\n } else if (updatedHandlers.length !== handlers.length) {\n this.listeners[eventType] = updatedHandlers;\n }\n }\n\n return this;\n }\n\n emit(eventType, data = undefined) {\n const handlers = this.listeners[eventType];\n\n if (handlers) {\n let includesOnce = false;\n handlers.forEach((handler) => {\n if (handler.once) {\n includesOnce = true;\n }\n\n try {\n handler.fn(data);\n } catch (e) {\n console.error(`error occurred while executing event ${eventType}`);\n console.error(e);\n }\n });\n\n if (includesOnce) {\n // Only reassign this value if we've encountered a handler that's run once\n this.listeners[eventType] = this.listeners[eventType].filter((h) => !h.once);\n }\n }\n\n this.anyListeners.forEach((eventSource) => eventSource.emit(eventType, data));\n\n return this;\n }\n\n // Pipe events from EventSource A to EventSource B. If `eventTypes` are\n // provided, bind only those types. Otherwise, pipe any event.\n pipe(eventSource, ...eventTypes) {\n if (eventTypes.length) {\n eventTypes.forEach((type) => eventSource.on(type, (data) => this.emit(data)));\n return this;\n }\n\n eventSource.any(this);\n return this;\n }\n\n // Bind `eventSource` to recieve any event sent from `this`.\n any(eventSource) {\n this.anyListeners.push(eventSource);\n return this;\n }\n}\n","import CallNode from './callNode';\nimport EventSource from '../eventSource';\n\nexport default class CallTree extends EventSource {\n constructor(events, functionLabels = () => []) {\n super();\n\n this.dataStore = {\n rootEvent: this.rootNode,\n selectedEvent: this.rootNode,\n };\n\n this.rootEvent = new CallNode();\n const stack = [this.rootEvent];\n events.forEach((e) => {\n if (e.event !== 'call') {\n if (stack.length > 1) {\n stack.pop();\n }\n return;\n }\n\n const parent = stack[stack.length - 1];\n const callNode = new CallNode(e, e.returnEvent, parent, functionLabels(e));\n parent.addChild(callNode);\n stack.push(callNode);\n });\n\n return this;\n }\n\n get rootEvent() {\n return this.dataStore.rootEvent;\n }\n\n set rootEvent(event) {\n this.dataStore.rootEvent = event;\n this.emit('rootEvent', event);\n }\n\n get selectedEvent() {\n return this.dataStore.selectedEvent;\n }\n\n set selectedEvent(event) {\n this.dataStore.selectedEvent = event;\n this.emit('selectedEvent', event);\n }\n}\n","import ClassMap from './classMap';\nimport CallTree from './callTree/callTree';\nimport { buildLabels, resolveDifferences, getRootEvents } from './util';\n\n// merge contiguous changes into a single element (as an array)\nfunction groupChanges(eventArray) {\n const events = new Set(eventArray);\n const seen = new Set();\n const result = [];\n\n eventArray.forEach((e) => {\n if (seen.has(e)) {\n return;\n }\n\n seen.add(e);\n\n const group = [e];\n let currentEvent = e;\n for (;;) {\n const { nextSibling } = currentEvent;\n if (nextSibling && events.has(nextSibling)) {\n group.push(nextSibling);\n seen.add(nextSibling);\n currentEvent = nextSibling;\n } else {\n break;\n }\n }\n\n result.push(group);\n });\n\n return result;\n}\n\nexport default class AppMap {\n constructor(data) {\n this.data = {\n events: [],\n classMap: [],\n ...data,\n };\n\n this.classMap = new ClassMap(this.data.classMap);\n this.callTree = new CallTree(this.events);\n this.classMap.bindEvents(this.events);\n this.labels = buildLabels(this.classMap, this.events);\n\n // Establish event linked list references\n let previousEvent;\n this.events.forEach((e) => {\n if (previousEvent) {\n e.previous = previousEvent;\n previousEvent.next = e;\n }\n\n previousEvent = e;\n });\n\n this.eventsById = this.events.reduce((acc, event) => {\n acc[event.id] = event;\n return acc;\n }, {});\n\n // Keep these fields seperate for serialization\n delete this.data.classMap;\n }\n\n get version() {\n return this.data.version;\n }\n\n get metadata() {\n return this.data.metadata || {};\n }\n\n get name() {\n return this.metadata.name;\n }\n\n get rootEvent() {\n return this.callTree.rootEvent;\n }\n\n get events() {\n return this.data.events;\n }\n\n getEvent(eventId) {\n return this.eventsById[eventId];\n }\n\n shallowCopy() {\n const copy = new AppMap({});\n copy.data.events = this.data.events;\n copy.data.metadata = this.data.metadata;\n copy.classMap = this.classMap;\n copy.callTree = this.callTree;\n return copy;\n }\n\n // Gets an array of root events, which is all events whose parent is undefined.\n rootEvents() {\n return getRootEvents(this.events);\n }\n\n // Iterate many AppMaps at once as an event tree. This method will follow the deepest branch\n // available, and yield the nodes at that position. Given that the tree structure may differ\n // across AppMaps, it's possible that some nodes will be null.\n static *multiTreeIterator(baseAppMap, workingAppMap) {\n let baseEvent;\n let workingEvent;\n const baseQueue = baseAppMap.rootEvents();\n const workingQueue = workingAppMap.rootEvents();\n\n resolveDifferences(baseQueue, workingQueue);\n\n for (;;) {\n baseEvent = baseQueue.shift();\n workingEvent = workingQueue.shift();\n\n // If both are null, every path has been exhausted. We're done.\n if (!baseEvent && !workingEvent) {\n return;\n }\n\n // Don't bother continuing to iterate through a branch that doesn't exist in the other tree.\n if (baseEvent && workingEvent) {\n const baseChildren = baseEvent ? [...baseEvent.children] : [];\n const workingChildren = workingEvent ? [...workingEvent.children] : [];\n\n resolveDifferences(baseChildren, workingChildren);\n baseChildren.forEach((e) => baseQueue.push(e));\n workingChildren.forEach((e) => workingQueue.push(e));\n }\n\n yield [baseEvent, workingEvent];\n }\n }\n\n static getDiff(baseAppMap, workingAppMap) {\n const changeSummary = {\n changed: [],\n added: [],\n removed: [],\n };\n\n const iter = AppMap.multiTreeIterator(baseAppMap, workingAppMap);\n let result = iter.next();\n while (!result.done) {\n const [nodeBase, nodeWorking] = result.value;\n\n if (!nodeBase) {\n changeSummary.added.push(nodeWorking);\n } else if (!nodeWorking) {\n changeSummary.removed.push(nodeBase);\n } else if (nodeBase.hash !== nodeWorking.hash) {\n changeSummary.changed.push([nodeBase, nodeWorking]);\n }\n\n result = iter.next();\n }\n\n changeSummary.added = groupChanges(changeSummary.added);\n changeSummary.removed = groupChanges(changeSummary.removed);\n\n return changeSummary;\n }\n\n toJSON() {\n return {\n ...this.data,\n classMap: this.classMap,\n };\n }\n}\n","import sha256 from 'crypto-js/sha256.js';\n\nexport default class HashBuilder {\n constructor(algorithmVersion) {\n this.hashEntries = [['algorithmVersion', algorithmVersion]];\n }\n\n addProperty(key, value) {\n this.hashEntries.push([key, value]);\n }\n\n get canonicalString() {\n return this.hashEntries.map((row) => row.join('=')).join('\\n');\n }\n\n digest() {\n return sha256(this.hashEntries.map((r) => r.join('=')).join('')).toString();\n }\n\n static buildHash(algorithmName, properties) {\n const hash = new HashBuilder(algorithmName);\n\n Object.keys(properties)\n .sort()\n .forEach((key) => hash.addProperty(key, properties[key]));\n\n return hash;\n }\n}\n","import { addHiddenProperty, hasProp, transformToJSON } from './util';\nimport analyzeSQL, { abstractSqlAstJSON } from './sql/analyze';\nimport normalizeSQL from './sql/normalize';\nimport HashBuilder from './hashBuilder';\n\nfunction alias(obj, prop, alias) {\n if (!obj || typeof obj[prop] === 'undefined' || typeof obj[alias] !== 'undefined') {\n return;\n }\n\n Object.defineProperty(obj, alias, {\n get() {\n return this[prop];\n },\n enumerable: false,\n });\n}\n\n// This class supercedes `CallTree` and `CallNode`. Events are stored in a flat\n// array and can also be traversed like a tree via `parent` and `children`.\nexport default class Event {\n static contentType(...messages) {\n const msg = messages.find((message) => (message?.headers || {})['Content-Type']);\n if (!msg) {\n return null;\n }\n\n return msg.headers['Content-Type'];\n }\n\n constructor(obj) {\n let data = obj;\n\n if (obj instanceof Event) {\n data = { ...obj };\n\n if (obj.$hidden.parameters) {\n data.parameters = obj.$hidden.parameters.map((p) => ({ ...p }));\n }\n\n if (Array.isArray(obj.$hidden.message)) {\n data.message = obj.$hidden.message.map((m) => ({ ...m }));\n }\n\n if (obj.$hidden.labels) {\n data.labels = [...obj.$hidden.labels];\n }\n\n if (obj.$hidden.exceptions) {\n data.exceptions = [...obj.$hidden.exceptions];\n }\n }\n\n this.dataKeys = Object.keys(data);\n\n // Cyclic references shall not be enumerable\n if (data.event === 'call') {\n addHiddenProperty(this, 'parent');\n addHiddenProperty(this, 'children', { writable: false, value: [] });\n addHiddenProperty(this, 'dataReferences', { writable: false, value: [] });\n addHiddenProperty(this, 'codeObject');\n addHiddenProperty(this, 'parameters');\n addHiddenProperty(this, 'message');\n }\n\n addHiddenProperty(this, 'linkedEvent');\n addHiddenProperty(this, 'labels');\n addHiddenProperty(this, 'exceptions');\n addHiddenProperty(this, 'next');\n addHiddenProperty(this, 'previous');\n addHiddenProperty(this, 'hash');\n addHiddenProperty(this, 'identityHash');\n addHiddenProperty(this, 'depth');\n addHiddenProperty(this, 'sqlQuery');\n\n // Backward compatibility\n // `status_code` used to be normalized to `status` during normalization. They can now be used\n // interchangeably.\n alias(data.http_server_response, 'status_code', 'status');\n alias(data.http_server_response, 'status', 'status_code');\n alias(data.http_client_response, 'status_code', 'status');\n alias(data.http_client_response, 'status', 'status_code');\n\n // Data must be written last, after our properties are configured.\n Object.assign(this, data);\n }\n\n get depth() {\n if (this.$hidden.depth === undefined) {\n let result = 0;\n let { parent } = this;\n while (parent) {\n result += 1;\n parent = parent.parent;\n }\n this.$hidden.depth = result;\n }\n return this.$hidden.depth;\n }\n\n get methodId() {\n return this.method_id;\n }\n\n get isFunction() {\n return this.definedClass && this.methodId;\n }\n\n get isStatic() {\n return this.static;\n }\n\n get sql() {\n return this.callEvent.sql_query;\n }\n\n get returnValue() {\n return this.returnEvent ? this.returnEvent.return_value : undefined;\n }\n\n get elapsedTime() {\n return this.returnEvent ? this.returnEvent.elapsed : undefined;\n }\n\n get elapsedInstrumentationTime() {\n return this.returnEvent ? this.returnEvent.elapsed_instrumentation : undefined;\n }\n\n get linkedEvent() {\n return this.$hidden.linkedEvent;\n }\n\n get next() {\n return this.$hidden.next;\n }\n\n get previous() {\n return this.$hidden.previous;\n }\n\n get parent() {\n return this.$hidden.parent;\n }\n\n get children() {\n return this.$hidden.children || [];\n }\n\n get codeObject() {\n return this.callEvent.$hidden.codeObject;\n }\n\n get parameters() {\n return this.callEvent.$hidden.parameters;\n }\n\n get labels() {\n const eventLabels = this.callEvent.$hidden.labels || [];\n return new Set([...eventLabels, ...this.callEvent.codeObject.labels]);\n }\n\n get exceptions() {\n return this.returnEvent ? this.returnEvent.$hidden.exceptions || [] : [];\n }\n\n get message() {\n return this.callEvent.$hidden.message;\n }\n\n get httpServerRequest() {\n return this.callEvent.http_server_request;\n }\n\n get httpServerResponse() {\n return this.returnEvent ? this.returnEvent.http_server_response : undefined;\n }\n\n get httpClientRequest() {\n return this.callEvent.http_client_request;\n }\n\n get httpClientResponse() {\n return this.returnEvent ? this.returnEvent.http_client_response : undefined;\n }\n\n get definedClass() {\n return this.defined_class ? this.defined_class.replace(/\\./g, '/') : null;\n }\n\n get requestPath() {\n if (this.httpServerRequest) {\n return this.httpServerRequest.normalized_path_info || this.httpServerRequest.path_info;\n }\n if (this.httpClientRequest) {\n return this.httpClientRequest.url;\n }\n return null;\n }\n\n get requestMethod() {\n if (this.httpServerRequest) {\n return this.httpServerRequest.request_method;\n }\n if (this.httpClientRequest) {\n return this.httpClientRequest.request_method;\n }\n return null;\n }\n\n get requestContentType() {\n return Event.contentType(this.httpServerRequest, this.httpClientRequest);\n }\n\n get responseContentType() {\n return Event.contentType(this.httpServerResponse, this.httpClientResponse);\n }\n\n get route() {\n const { requestMethod, requestPath } = this;\n if (!requestMethod || !requestPath) {\n return null;\n }\n\n return `${requestMethod} ${requestPath}`;\n }\n\n get sqlQuery() {\n if (!this.$hidden.sqlQuery) {\n const { sql } = this;\n this.$hidden.sqlQuery = sql ? sql.normalized_sql || sql.sql : null;\n }\n return this.$hidden.sqlQuery;\n }\n\n get fqid() {\n return `event:${this.id}`;\n }\n\n get previousSibling() {\n const { parent } = this;\n if (!parent) {\n return null;\n }\n\n const myIndex = parent.children.findIndex((e) => e === this);\n console.assert(myIndex !== -1, 'attempted to locate index of an orphaned event');\n\n if (myIndex === 0) {\n return null;\n }\n\n return parent.children[myIndex - 1];\n }\n\n get nextSibling() {\n const { parent } = this;\n\n if (!parent) {\n let event = this.next;\n\n // Get the next root level event\n while (event) {\n if (event.isCall() && !event.parent) {\n return event;\n }\n\n event = event.next;\n }\n\n return null;\n }\n\n const myIndex = this.parent.children.findIndex((e) => e === this);\n console.assert(myIndex !== -1, 'attempted to locate index of an orphaned event');\n\n if (myIndex === parent.children.length - 1) {\n return null;\n }\n\n return parent.children[myIndex + 1];\n }\n\n set codeObject(value) {\n if (hasProp(this.$hidden, 'codeObject')) {\n this.$hidden.codeObject = value;\n }\n }\n\n set parameters(value) {\n if (hasProp(this.$hidden, 'parameters')) {\n this.$hidden.parameters = value;\n }\n }\n\n set labels(value) {\n if (hasProp(this.$hidden, 'labels')) {\n this.$hidden.labels = value;\n }\n }\n\n set exceptions(value) {\n if (hasProp(this.$hidden, 'exceptions')) {\n this.$hidden.exceptions = value;\n }\n }\n\n set message(value) {\n if (hasProp(this.$hidden, 'message')) {\n this.$hidden.message = value;\n }\n }\n\n set linkedEvent(value) {\n this.$hidden.linkedEvent = value;\n }\n\n set next(value) {\n this.$hidden.next = value;\n }\n\n set previous(value) {\n this.$hidden.previous = value;\n }\n\n set parent(value) {\n this.$hidden.parent = value;\n }\n\n link(event) {\n /* eslint-disable no-param-reassign */\n if (event.linkedEvent || this.linkedEvent) {\n return;\n }\n\n event.linkedEvent = this;\n this.linkedEvent = event;\n /* eslint-enable no-param-reassign */\n }\n\n isCall() {\n return this.event === 'call';\n }\n\n isReturn() {\n return this.event === 'return';\n }\n\n get threadId() {\n return this.thread_id;\n }\n\n get parentId() {\n return this.returnEvent ? this.returnEvent.parent_id : undefined;\n }\n\n get callEvent() {\n return this.isCall() ? this : this.$hidden.linkedEvent;\n }\n\n get returnEvent() {\n return this.isReturn() ? this : this.$hidden.linkedEvent;\n }\n\n get identityHash() {\n if (!this.$hidden.identityHash) {\n this.$hidden.identityHash = this.buildIdentityHash().digest();\n }\n return this.$hidden.identityHash;\n }\n\n get hash() {\n if (!this.$hidden.hash) {\n this.$hidden.hash = this.buildStableHash().digest();\n }\n return this.$hidden.hash;\n }\n\n get stableProperties() {\n if (!this.$hidden.stableProperties) {\n this.$hidden.stableProperties = this.gatherStableProperties();\n }\n return this.$hidden.stableProperties;\n }\n\n callStack() {\n const stack = this.ancestors().reverse();\n stack.push(this.callEvent);\n return stack;\n }\n\n ancestors() {\n const ancestorArray = [];\n let event = this.callEvent.parent;\n\n while (event) {\n ancestorArray.push(event);\n event = event.parent;\n }\n\n return ancestorArray;\n }\n\n descendants() {\n const descendantArray = [];\n const queue = [...this.children];\n\n while (queue.length) {\n const event = queue.pop();\n event.children.forEach((child) => queue.push(child));\n descendantArray.push(event);\n }\n\n return descendantArray;\n }\n\n traverse(fn) {\n let event = this;\n const boundaryEvent = this.nextSibling;\n let { onEnter } = fn;\n let { onExit } = fn;\n\n if (typeof fn === 'function') {\n onEnter = fn;\n onExit = fn;\n }\n\n while (event) {\n if (event.isCall() && onEnter) {\n onEnter(event);\n } else if (event.isReturn() && onExit) {\n onExit(event);\n }\n\n event = event.next;\n if (!event || event === boundaryEvent) {\n break;\n }\n }\n }\n\n dataObjects() {\n return [this.parameters, this.message, this.returnValue].flat().filter(Boolean);\n }\n\n get qualifiedMethodId() {\n const { definedClass, isStatic, methodId } = this;\n if (!definedClass) return undefined;\n return `${definedClass}${isStatic ? '.' : '#'}${methodId}`;\n }\n\n toJSON() {\n return transformToJSON(this.dataKeys, this);\n }\n\n toString() {\n const { sqlQuery } = this;\n if (sqlQuery) {\n return sqlQuery;\n }\n\n const { route } = this;\n if (route) {\n return route;\n }\n\n return this.qualifiedMethodId;\n }\n\n // Returns canonical properties tied to the event's core identity: SQL, HTTP, or a\n // specific method on a specific class. Identity properties are used to identify events that are\n // added/removed between two AppMaps, as opposed to changes. If two events share the same\n // identity properties, they won't be reported as an add/remove, but may be reported as a change.\n gatherIdentityProperties() {\n if (this.httpServerRequest) {\n return { event_type: 'http_server_request', route: this.route };\n }\n if (this.httpClientRequest) {\n return { event_type: 'http_client_request', route: this.route };\n }\n\n const { sqlQuery } = this;\n if (sqlQuery) {\n const queryOps = analyzeSQL(sqlQuery);\n if (!queryOps)\n return {\n event_type: 'sql',\n sql_normalized: normalizeSQL(sqlQuery, this.sql.database_type),\n }; // Best we can do\n\n return {\n event_type: 'sql',\n actions: [...new Set(queryOps.actions)].sort(),\n tables: [...new Set(queryOps.tables)].sort(),\n };\n }\n\n return {\n event_type: 'function',\n id: this.codeObject.id,\n };\n }\n\n // Collects properties of an event which are not dependent on the specifics\n // of invocation.\n gatherStableProperties(parsedSqlCache) {\n const { sqlQuery } = this;\n\n // Convert null and undefined values to empty strings\n const normalizeProperties = (/** @type{Record} */ properties) =>\n Object.fromEntries(\n Object.entries(properties).map(([key, value]) => [\n key,\n value === undefined || value === null ? '' : value,\n ])\n );\n\n // Augment a set of base properties with HTTP client/server request properties.\n const requestProperties = (/** @type{Record} */ baseProperties) =>\n Object.assign(baseProperties, {\n route: this.route,\n status_code:\n this.httpServerResponse?.status ||\n this.httpServerResponse?.status_code ||\n this.httpClientResponse?.status ||\n this.httpServerResponse?.status_code,\n });\n\n let properties;\n if (sqlQuery) {\n let sqlNormalized;\n const cacheKey = `${this.sql.database_type}:${sqlQuery}`;\n if (parsedSqlCache) sqlNormalized = parsedSqlCache.get(cacheKey);\n if (!sqlNormalized) {\n sqlNormalized = abstractSqlAstJSON(sqlQuery, this.sql.database_type)\n // Collapse repeated variable literals and parameter tokens (e.g. '?, ?' in an IN clause)\n .split(/{\"type\":\"variable\"}(?:,{\"type\":\"variable\"})*/g)\n .join(`{\"type\":\"variable\"}`);\n\n if (parsedSqlCache) parsedSqlCache.set(cacheKey, sqlNormalized);\n }\n\n properties = {\n event_type: 'sql',\n sql_normalized: sqlNormalized,\n };\n } else if (this.httpServerRequest) {\n properties = requestProperties({ event_type: 'http_server_request' });\n } else if (this.httpClientRequest) {\n properties = requestProperties({\n event_type: 'http_client_request',\n });\n } else {\n properties = {\n event_type: 'function',\n id: this.codeObject.id,\n raises_exception: this.exceptions.length > 0,\n };\n }\n return normalizeProperties(properties);\n }\n\n buildIdentityHash() {\n return HashBuilder.buildHash('event-identity-v2', this.gatherIdentityProperties());\n }\n\n buildStableHash(parsedSqlCache) {\n return HashBuilder.buildHash(\n 'event-stable-properties-v2',\n this.gatherStableProperties(parsedSqlCache)\n );\n }\n}\n","export default class EventStack {\n constructor(id) {\n this.events = [];\n this.stack = [];\n this.id = id;\n this.eventMap = {};\n }\n\n add(event) {\n // Don't begin a stack with a return, we likely started recording in the\n // middle of thread execution.\n if (event.isReturn() && this.events.length === 0) {\n return;\n }\n\n if (event.isCall()) {\n this.stack.push(event);\n this.eventMap[event.id] = event;\n } else {\n if (typeof event.parent_id === 'undefined') {\n const lastEvent = this.stack[this.stack.length - 1];\n if (\n lastEvent &&\n lastEvent.defined_class === event.defined_class &&\n lastEvent.method_id === event.method_id &&\n lastEvent.path === event.path &&\n lastEvent.static === event.static\n ) {\n event.parent_id = lastEvent.id; // eslint-disable-line no-param-reassign\n } else {\n // An event has returned but the last call in the stack was not its\n // caller. There's not really anything we can do to rectify this, so\n // the event will be discarded.\n return;\n }\n }\n\n const call = this.eventMap[event.parent_id];\n if (call) {\n call.link(event);\n this.stack.pop();\n\n const parent = this.stack[this.stack.length - 1];\n if (parent) {\n parent.children.push(call);\n call.parent = parent;\n }\n } else {\n throw new Error(`return #${event.id} is missing call #${event.parent_id}`);\n }\n }\n\n this.events.push(event);\n }\n\n unwound() {\n return this.events.length > 0 && this.stack.length === 0;\n }\n}\n","import EventStack from './eventStack';\nimport { sizeof } from '../util';\n\nfunction getStackId(collection) {\n return Object.keys(collection.activeStacks).length + collection.finalizedStacks.length;\n}\n\n// EventSorter is responsible for untangling an event array. It sorts events by\n// thread execution order and drops leading return statements.\nexport default class EventSorter {\n constructor() {\n this.activeStacks = {};\n this.finalizedStacks = [];\n }\n\n // Add an event to be sorted. An event must be added through this method to\n // be collected.\n add(event) {\n let stack = this.activeStacks[event.thread_id];\n if (!stack) {\n const id = getStackId(this);\n stack = new EventStack(id);\n this.activeStacks[event.thread_id] = stack;\n }\n\n stack.add(event);\n\n if (stack.unwound()) {\n this.finalizedStacks.splice(stack.id, 0, stack.events);\n delete this.activeStacks[event.thread_id];\n }\n }\n\n // Calculate the serialized size of all events. This is more of an\n // approximation than an exact number.\n size() {\n let size = sizeof(Object.values(this.activeStacks));\n size += sizeof(this.finalizedStacks);\n return size;\n }\n\n // Returns an array of \"chunks\". A chunk is an array consisting of many\n // stacks. A stack is an array consisting of many events.\n collect() {\n // Join active and finalized stacks. We want to make sure we iterate over\n // every event.\n const stacks = [...this.finalizedStacks];\n Object.values(this.activeStacks).forEach((s) => stacks.splice(s.id, 0, s.events));\n\n return stacks.reduce((chunks, stack) => {\n if (stack.length === 0) {\n return chunks;\n }\n\n // We're the first chunk in, meaning we don't need to worry about any\n // chunks behind us. Just push it.\n if (chunks.length === 0) {\n chunks.push([stack]);\n return chunks;\n }\n\n // If the root event is an HTTP request, this a complete chunk. Push it.\n if (stack[0].http_server_request) {\n chunks.push([stack]);\n return chunks;\n }\n\n if (stack[0].http_client_request) {\n chunks.push([stack]);\n return chunks;\n }\n\n // Check to see if the previous chunk began with an HTTP request. If it\n // does, push a new chunk. Otherwise, append to the last chunk.\n const prevChunk = chunks[chunks.length - 1];\n const prevStack = prevChunk[prevChunk.length - 1];\n if (prevStack[0].http_server_request || prevStack[0].http_client_request) {\n chunks.push([stack]);\n } else {\n prevChunk.push(stack);\n }\n\n return chunks;\n }, []);\n }\n}\n","import EventSource from '../eventSource';\nimport AppMap from '../appMap';\nimport ClassMap from '../classMap';\nimport Event from '../event';\nimport EventSorter from './eventSorter';\nimport { sizeof } from '../util';\n\n// Performs an array of transform functions on an object. The transform function\n// is expected to return the transformed object.\nconst transform = (transforms, obj, ...args) => transforms.reduce((x, fn) => fn(x, ...args), obj);\n\n// AppMapBuilder is responsible for transforming appmap data before returning\n// an AppMap model.\nclass AppMapBuilder extends EventSource {\n constructor(data) {\n super();\n\n this.sorter = new EventSorter();\n this.transforms = {\n event: [],\n stack: [],\n chunk: [],\n };\n this.allEvents = [];\n\n if (data) {\n this.source(data);\n }\n }\n\n // Provide a source of data - i.e. an appmap JSON object\n source(data) {\n const dataType = typeof data;\n if (dataType === 'object') {\n this.data = { ...data };\n } else if (dataType === 'string') {\n this.data = JSON.parse(data);\n } else {\n throw new Error(`got invalid type ${dataType}, expected object or string`);\n }\n\n this.exclusions = new Set();\n\n (this.data.events || []).forEach((e) => {\n if (this.data.eventUpdates && this.data.eventUpdates[e.id]) {\n // eslint-disable-next-line no-param-reassign\n e = this.data.eventUpdates[e.id];\n }\n const event = new Event(e);\n this.allEvents.push(event);\n this.sorter.add(event);\n });\n\n delete this.data.events;\n delete this.data.eventUpdates;\n\n return this;\n }\n\n // register an optional event transform\n event(fn) {\n console.assert(typeof fn === 'function');\n this.transforms.event.push(fn);\n return this;\n }\n\n // register a optional stack transform\n stack(fn) {\n console.assert(typeof fn === 'function');\n this.transforms.stack.push(fn);\n return this;\n }\n\n // register a optional chunk transform\n chunk(fn) {\n console.assert(typeof fn === 'function');\n this.transforms.chunk.push(fn);\n return this;\n }\n\n // normalize the appmap data before returning an Appmap model\n normalize() {\n // Remove credentials from git repository url\n if (/^https?/.test(this.data.metadata?.git?.repository)) {\n const url = new URL(this.data.metadata.git.repository);\n url.username = '';\n url.password = '';\n this.data.metadata.git.repository = url.toString();\n }\n\n // Re-index events\n let eventId = 1;\n this.event((event) => {\n /* eslint-disable no-param-reassign */\n event.id = eventId;\n eventId += 1;\n\n if (event.isCall() && event.returnEvent) {\n event.returnEvent.parent_id = event.id;\n }\n\n // Normalize path info\n const { httpServerRequest } = event;\n if (httpServerRequest && httpServerRequest.normalized_path_info) {\n httpServerRequest.normalized_path_info = httpServerRequest.normalized_path_info.toString();\n }\n if (httpServerRequest && httpServerRequest.path_info) {\n httpServerRequest.path_info = httpServerRequest.path_info.toString();\n }\n\n return event;\n /* eslint-enable no-param-reassign */\n });\n\n // Balance the stack by adding dummy returns to calls which never return\n return this.stack((events) => {\n events\n .filter((e) => e.isCall() && !e.returnEvent)\n .reverse()\n .map((e) => {\n const returnEvent = new Event({\n event: 'return',\n thread_id: e.thread_id,\n parent_id: e.id,\n });\n returnEvent.link(e);\n return returnEvent;\n })\n .forEach((e) => events.push(e));\n\n return events;\n });\n }\n\n // Cut down the size of the event array before creating the Appmap model\n prune(sizeBytes) {\n console.assert(typeof sizeBytes === 'number');\n\n let classMap;\n let pruneRatio = 0;\n\n return this.on('preprocess', (d) => {\n const size = this.sorter.size();\n classMap = new ClassMap(d.data.classMap);\n pruneRatio = Math.min(sizeBytes / size, 1);\n\n // We're storing size/count state in the global class map. This isn't\n // great but it works for now.\n classMap.visit((obj) => {\n /* eslint-disable no-param-reassign */\n obj.size = 0;\n obj.count = 0;\n /* eslint-enable no-param-reassign */\n });\n\n this.allEvents.forEach((e) => {\n if (e.event !== 'call' || e.sql_query || e.http_server_request || e.http_client_request) {\n return;\n }\n\n const obj = classMap.codeObjectFromEvent(e);\n if (obj) {\n const objSize = sizeof(e);\n obj.size = obj.size + objSize || objSize;\n obj.count = obj.count + 1 || 1;\n }\n });\n\n // Build an array of code objects sorted by size. The largest object\n // will always be index 0.\n let totalBytes = 0;\n const eventAggregates = classMap.codeObjects\n .filter((obj) => obj.size)\n .sort((a, b) => a.size - b.size)\n .map((obj) => {\n totalBytes += obj.size;\n return {\n fqid: obj.fqid,\n count: obj.count,\n size: obj.size,\n totalBytes,\n };\n })\n .reverse();\n\n // Build a list of unique exclusions, starting with the largest event\n // type. Iterate until the estimated event array size is under our\n // threshold.\n for (let i = 0; i < eventAggregates.length; i += 1) {\n const eventInfo = eventAggregates[i];\n if (eventInfo.totalBytes <= totalBytes * pruneRatio) {\n break;\n }\n this.exclusions.add(eventInfo.fqid);\n }\n this.updatePruneFilter();\n }).chunk((stacks) => this.excludeEvents(stacks, classMap, this.exclusions));\n }\n\n updatePruneFilter() {\n const currentHideName = Array.from(this.exclusions.values());\n\n if (!this.data.pruneFilter) {\n this.data.pruneFilter = { hideName: currentHideName };\n } else if (!this.data.pruneFilter.hideName) {\n this.data.pruneFilter.hideName = currentHideName;\n } else {\n currentHideName.forEach((pruned) => this.data.pruneFilter.hideName.push(pruned));\n }\n }\n\n // expects exclusions to be a Set\n excludeEvents(stacks, classMap, exclusions) {\n return stacks.map((events) =>\n events.filter((e) => {\n const { callEvent } = e;\n\n // If there's no call event, there's no need to retain this event\n if (!callEvent) return false;\n\n if (callEvent.http_server_request || callEvent.http_client_request || callEvent.sql_query)\n return true;\n\n const codeObj = classMap.codeObjectFromEvent(callEvent);\n\n // keep events where the code object cannot be found\n if (!codeObj || !codeObj.fqid) return true;\n\n return !exclusions.has(codeObj.fqid);\n })\n );\n }\n\n removeNoise() {\n if (!this.data.events) {\n return this;\n }\n\n const hasHttp = Boolean(\n this.data.events.find((e) => e.httpServerRequest || e.httpClientRequest)\n );\n if (!hasHttp) {\n // the entire file is noise - do nothing\n return this;\n }\n\n return this.chunk((stacks) =>\n stacks.filter((stack) => {\n if (!stack.length) {\n return false;\n }\n\n return Boolean(stack[0].httpServerRequest) || Boolean(stack[0].httpClientRequest);\n })\n );\n }\n\n collectEvents() {\n return this.sorter\n .collect()\n .map((chunk) => {\n const transformedChunk = transform(this.transforms.chunk, chunk);\n return transformedChunk.map((stack) => {\n const transformedStack = transform(this.transforms.stack, stack);\n return transformedStack.map((event) => transform(this.transforms.event, event));\n });\n })\n .flat(2);\n }\n\n // Returns an Appmap model after running transforms such as normalize, prune,\n // etc.\n build() {\n this.emit('preprocess', { data: this.data });\n const events = this.collectEvents();\n return new AppMap({ ...this.data, events });\n }\n}\n\nexport default function buildAppMap(data = null) {\n return new AppMapBuilder(data);\n}\n","/* eslint-disable no-restricted-syntax */\nexport default class EventNavigator {\n constructor(event) {\n this.event = event;\n }\n\n get callEvent() {\n return this.event.callEvent;\n }\n\n get labels() {\n const { codeObject } = this.event;\n if (codeObject && codeObject.labels) {\n return codeObject.labels;\n }\n return null;\n }\n\n *self() {\n yield this;\n }\n\n *ancestors() {\n let event = this.callEvent.parent;\n\n while (event) {\n yield new EventNavigator(event);\n event = event.parent;\n }\n }\n\n /**\n * Generates all events which precede this event in the scenario.\n */\n *preceding() {\n for (const node of [this, ...this.ancestors()]) {\n if (node !== this) yield node;\n for (const sibling of node.precedingSiblings()) {\n for (const descendant of [...sibling.descendants()].reverse()) yield descendant;\n yield sibling;\n }\n }\n }\n\n *following() {\n for (const descendant of this.descendants()) yield descendant;\n for (const node of [this, ...this.ancestors()]) {\n for (const sibling of node.followingSiblings()) {\n yield sibling;\n for (const descendant of sibling.descendants()) yield descendant;\n }\n }\n }\n\n *precedingSiblings() {\n const { parent } = this.callEvent;\n if (!parent) {\n return;\n }\n\n const index = parent.children.indexOf(this.callEvent);\n for (let i = index - 1; i >= 0; i -= 1) {\n yield new EventNavigator(parent.children[i]);\n }\n }\n\n *followingSiblings() {\n const { parent } = this.callEvent;\n if (!parent) {\n return;\n }\n\n const index = parent.children.indexOf(this.callEvent);\n for (let i = index + 1; i < parent.children.length; i += 1) {\n yield new EventNavigator(parent.children[i]);\n }\n }\n\n *descendants(filterFn = () => true) {\n const queue = [...this.event.children];\n while (queue.length) {\n const event = queue.shift();\n if (filterFn(event)) {\n yield new EventNavigator(event);\n if (event.children) queue.unshift(...event.children);\n }\n }\n }\n\n hasLabel(label) {\n return this.hasLabels([label]);\n }\n\n hasLabels(...searchLabels) {\n if (!this.labels) {\n return false;\n }\n\n if (!searchLabels || !searchLabels.length) {\n return this.labels.size > 0;\n }\n\n return searchLabels.filter((l) => this.labels.has(l)).length === searchLabels.length;\n }\n}\n","import { getLabel } from './util';\n\nfunction mapFunctionLocations(memo, obj) {\n /* eslint-disable no-param-reassign */\n if (obj.type === 'function') {\n memo[obj.location] = obj;\n }\n\n if (obj.children) {\n obj.children.reduce(mapFunctionLocations, memo);\n }\n\n return memo;\n /* eslint-enable no-param-reassign */\n}\n\nexport default class EventInfo {\n constructor(classMap) {\n this.functionObjects = classMap.reduce(mapFunctionLocations, {});\n }\n\n getName(event) {\n const label = getLabel(event);\n if (label) {\n return label;\n }\n\n const codeObj = this.getCodeObject(event);\n if (codeObj) {\n return codeObj.display_name;\n }\n\n // Fallback algorithm\n const separator = event.static ? '.' : '#';\n return [event.defined_class, separator, event.method_id].join('');\n }\n\n getLabels(event) {\n const labels = [];\n\n if (event.labels) {\n labels.push(...event.labels);\n }\n\n const codeObj = this.getCodeObject(event);\n if (codeObj && codeObj.labels.length) {\n labels.push(...codeObj.labels);\n }\n\n return labels;\n }\n\n getCodeObject(event) {\n return this.functionObjects[`${event.path}:${event.lineno}`];\n }\n}\n","import buildAppMap from './appMapBuilder';\nimport AppMap from './appMap';\nimport CodeObject from './codeObject';\nimport { isLocalPath } from './util';\n\nexport const DEFAULT_CONTEXT_DEPTH = 1;\n\nclass DeclutterProperty {\n on = true;\n default = true;\n\n constructor(on = true, defaultValue = true) {\n this.on = on;\n this.default = defaultValue;\n }\n}\n\nclass DeclutterTimeProperty extends DeclutterProperty {\n DEFAULT_TIME = 100;\n\n time = this.DEFAULT_TIME;\n\n constructor(on = true, defaultValue = true, time = DeclutterTimeProperty.DEFAULT_TIME) {\n super(on, defaultValue);\n\n this.time = time;\n }\n}\n\nclass DeclutterNamesProperty extends DeclutterProperty {\n names = [];\n\n constructor(on = true, defaultValue = true, names = []) {\n super(on, defaultValue);\n\n this.names = names;\n }\n}\n\nclass DeclutterContextNamesProperty extends DeclutterNamesProperty {\n depth = DEFAULT_CONTEXT_DEPTH;\n\n constructor(on = true, defaultValue = true, names = [], depth = undefined) {\n super(on, defaultValue, names);\n\n if (depth !== undefined) this.depth = depth;\n }\n}\n\n// Directories inside the project tree that may contain bundled dependencies.\nconst DependencyFolders = ['vendor', 'node_modules'];\n\nclass DeclutterExternalPathsProperty extends DeclutterProperty {\n dependencyFolders = DependencyFolders;\n\n constructor(on = false, defaultValue = false, dependencyFolders = DependencyFolders) {\n super(on, defaultValue);\n\n this.dependencyFolders = dependencyFolders || DependencyFolders;\n }\n}\n\nconst ROOT_EVENT_LABELS = ['cli.command', 'job.perform', 'message.handle'];\n\nclass Declutter {\n limitRootEvents = new DeclutterProperty();\n hideMediaRequests = new DeclutterProperty();\n hideExternalPaths = new DeclutterExternalPathsProperty();\n hideUnlabeled = new DeclutterProperty(false, false);\n hideElapsedTimeUnder = new DeclutterTimeProperty(false, false, 1);\n hideName = new DeclutterNamesProperty(false, false, []);\n hideTree = new DeclutterNamesProperty(false, false, []);\n context = new DeclutterContextNamesProperty(false, false, []);\n}\n\nconst FilterRegExps = {};\nfunction filterRegExp(filterExpression, regexpConstructorArgs) {\n if (!FilterRegExps[filterExpression])\n FilterRegExps[filterExpression] = new RegExp(...regexpConstructorArgs());\n\n return FilterRegExps[filterExpression];\n}\n\n// events: Array of events to process.\n// filterFn: A test function to apply to each event. If the function returns true, the event is\n// included in the result. If an ancestor of a descendant event has matched the filterFn, and distance to the\n// ancestor is within the maxDepth, then the descendant is included as well.\n// maxDepth: The maximum depth of a descendant event to include. If undefined, all descendants are included.\n// Returns: A set of events that matched the filterFn.\nfunction markSubtrees(events, filterFn, maxDepth) {\n const matchingEvents = new Set();\n\n // Collect all 'call' events that match explicitly.\n events.filter((e) => e.isCall() && filterFn(e)).forEach((e) => matchingEvents.add(e));\n\n // Match all descendants of matching events, down to maxDepth.\n const matchDescendant = (e, depth) => {\n // Already marked before by some other traversal.\n if (matchingEvents.has(e)) return;\n\n // Below the maxDepth.\n if (maxDepth !== undefined && depth > maxDepth) return;\n\n matchingEvents.add(e);\n if (e.children) e.children.forEach((child) => matchDescendant(child, depth + 1));\n };\n\n [...matchingEvents]\n .filter((e) => e.children)\n .forEach((e) => e.children.forEach((child) => matchDescendant(child, 1)));\n\n [...matchingEvents].forEach((e) => matchingEvents.add(e.returnEvent));\n\n return matchingEvents;\n}\n\n// Collect all code objects that match a filter expressions.\n// Mark all events that are in a subtree whose root is one of the matched code objects.\n// Collect all marked events.\n// This filter should run in O(n), assuming set insertion and lookup is constant time.\nfunction includeSubtrees(events, filterFn, applyIfEmpty) {\n const includedEvents = markSubtrees(events, filterFn);\n\n if (applyIfEmpty || includedEvents.size) return events.filter((e) => includedEvents.has(e));\n else return events;\n}\n\n// Collect all code objects that match a filter expressions.\n// Mark all events that are in a subtree whose root is one of the matched code objects.\n// Collect all unmarked events.\n// This filter should run in O(n), assuming set insertion and lookup is constant time.\nfunction excludeSubtrees(events, filterFn) {\n const excludedEvents = markSubtrees(events, filterFn);\n\n return events.filter((e) => !excludedEvents.has(e));\n}\n\nexport default class AppMapFilter {\n rootObjects = [];\n declutter = new Declutter();\n\n /**\n *\n * @param {AppMap} appMap\n * @param {any[]} findings\n * @returns {AppMap}\n */\n filter(appMap, findings) {\n const { classMap } = appMap;\n let { events } = appMap;\n\n // Collect all code objects that match a filter expression. When a code object matches an\n // expression, the entire subtree rooted at that code object is included as well.\n function matchCodeObjects(expressions, matchSelf) {\n return classMap.codeObjects.reduce((memo, codeObject) => {\n if (expressions.some((expr) => AppMapFilter.codeObjectIsMatched(codeObject, expr))) {\n codeObject.visit((co) => {\n if (co !== codeObject || matchSelf) memo.add(co);\n });\n }\n\n return memo;\n }, new Set());\n }\n\n // Include only subtrees of \"command\"-type events, unless there are no commands.\n if (this.declutter.limitRootEvents.on) {\n // Return true if the event is a \"command\". Types of commands recognized by this test include:\n // - HTTP server request - the event has http_server_request data\n // - cli.command - command of a CLI application\n // - job.perform - a background job\n // - message.handle - a handler for a message queue\n //\n // @param {Event} e\n const isCommand = (e) => {\n if (e.httpServerRequest) return true;\n\n const { labels } = e.codeObject;\n\n return ROOT_EVENT_LABELS.find((label) => labels.has(label));\n };\n\n events = includeSubtrees(events, isCommand, false);\n }\n\n // Include only subtrees of a specified root object. This could also be stored and managed\n // as a declutter filter, but it isn't, for some reason. It works the same way.\n if (this.rootObjects.length) {\n const includeCodeObjects = matchCodeObjects(this.rootObjects, true);\n const filterFn = (e) => includeCodeObjects.has(e.codeObject);\n\n events = includeSubtrees(events, filterFn, true);\n }\n\n if (this.declutter.context.on && this.declutter.context.names.length) {\n const includeCodeObjects = matchCodeObjects(this.declutter.context.names, true);\n const filterFn = (e) => includeCodeObjects.has(e.codeObject);\n\n const subtreeEvents = markSubtrees(events, filterFn, this.declutter.context.depth);\n const ancestorEvents = new Set();\n const includeAncestors = (e, distance = 1) => {\n if (!e) return;\n\n if (ancestorEvents.has(e)) return;\n\n if (distance <= this.declutter.context.depth || !e.parent) {\n ancestorEvents.add(e);\n ancestorEvents.add(e.returnEvent);\n }\n\n if (e.parent) includeAncestors(e.parent, distance + 1);\n };\n events.filter((e) => filterFn(e)).forEach((e) => includeAncestors(e.parent));\n events = events.filter((e) => subtreeEvents.has(e) || ancestorEvents.has(e));\n }\n\n // Hide descendent events from named, pattern-matched or labeled code objects. The matching\n // event itself is not hidden. To accomplish that, add the same filter to `hideName`.\n if (this.declutter.hideTree.on && this.declutter.hideTree.names.length) {\n const excludeCodeObjects = matchCodeObjects(this.declutter.hideTree.names, false);\n events = excludeSubtrees(events, (e) => excludeCodeObjects.has(e.codeObject));\n }\n\n // Hide HTTP server requests that fetch a known media type.\n if (this.declutter.hideMediaRequests.on) {\n events = AppMapFilter.filterMediaRequests(events);\n }\n\n // Hide any unlabeled code object. This is rarely useful.\n if (this.declutter.hideUnlabeled.on) {\n events = events.filter((e) => e.labels.size > 0 || e.codeObject.type !== 'function');\n }\n\n // Hide code that appears to be sourced from outside the local source tree.\n // This isn't super reliable, because the location path may be inside the project tree\n // even for external code; and the location may be outside the project tree even for code\n // that the user considers to be part of the project.\n if (this.declutter.hideExternalPaths.on) {\n events = events.filter(\n (e) =>\n e.codeObject.type !== 'function' ||\n isLocalPath(e.codeObject.location, this.declutter.hideExternalPaths.dependencyFolders)\n .isLocal\n );\n }\n\n // Hide code whose elapsed time is less than a specified threshold.\n // This is useful for navigating down a call tree looking for expensive code.\n if (this.declutter.hideElapsedTimeUnder.on && this.declutter.hideElapsedTimeUnder.time > 0) {\n events = events.filter(\n (e) => e.elapsedTime && e.elapsedTime >= this.declutter.hideElapsedTimeUnder.time / 1000\n );\n }\n\n // Hide events from named, pattern-matched or labeled code objects. Hiding does not apply to\n // sub-events of matching events.\n if (this.declutter.hideName.on && this.declutter.hideName.names.length) {\n const excludeCodeObjects = matchCodeObjects(this.declutter.hideName.names, true);\n events = events.filter((e) => !excludeCodeObjects.has(e.codeObject));\n }\n\n const eventIds = new Set(events.filter((e) => e.isCall()).map((e) => e.id));\n\n if (findings && findings.length > 0) {\n findings.forEach((finding) => {\n if (\n finding.appMapUri &&\n finding.appMapUri.fragment &&\n typeof finding.appMapUri.fragment === 'string'\n ) {\n finding.appMapUri.fragment = JSON.parse(finding.appMapUri.fragment);\n }\n });\n\n events = AppMapFilter.attachFindingsToEvents(events, findings);\n }\n\n return buildAppMap({\n events: events.filter((e) => eventIds.has(e.id) || (e.parentId && eventIds.has(e.parentId))),\n classMap: classMap.roots.map((c) => ({ ...c.data })),\n metadata: appMap.metadata,\n }).build();\n }\n\n /**\n *\n * @param {Event[]} events\n * @returns Event[]\n */\n static filterMediaRequests(events) {\n const excludedEvents = [];\n const mediaRegex = [\n 'application/javascript',\n 'application/ecmascript',\n 'audio/.+',\n 'font/.+',\n 'image/.+',\n 'text/javascript',\n 'text/ecmascript',\n 'text/css',\n 'video/.+',\n ].map((t) => new RegExp(t, 'i'));\n const mediaFileExtensions = new Set([\n 'aac',\n 'avi',\n 'bmp',\n 'css',\n 'flv',\n 'gif',\n 'htm',\n 'html',\n 'ico',\n 'jpeg',\n 'jpg',\n 'js',\n 'json',\n 'jsonld',\n 'mid',\n 'midi',\n 'mjs',\n 'mov',\n 'mp3',\n 'mp4',\n 'mpeg',\n 'oga',\n 'ogg',\n 'ogv',\n 'ogx',\n 'opus',\n 'otf',\n 'png',\n 'svg',\n 'tif',\n 'tiff',\n 'ts',\n 'ttf',\n 'wav',\n 'weba',\n 'webm',\n 'webp',\n 'woff',\n 'woff2',\n 'xhtml',\n '3gp',\n '3g2',\n ]);\n\n events.forEach((e) => {\n const { httpServerResponse } = e;\n if (e.requestMethod === 'GET' && e.requestPath) {\n const pathExt = e.requestPath.match(/.*\\.([\\S]*)$/);\n if (pathExt && mediaFileExtensions.has(pathExt[1])) {\n excludedEvents.push(e.id);\n }\n } else if (httpServerResponse) {\n let mimeType;\n const { headers } = httpServerResponse;\n\n if (headers) {\n const contentTypeKey = Object.keys(headers).filter(\n (k) => k.toLowerCase() === 'content-type'\n )[0];\n\n mimeType = headers[contentTypeKey];\n } else {\n mimeType = httpServerResponse.mime_type; // 'mime_type' is no longer supported in the AppMap data standard, but we should keep this code for backward compatibility\n }\n\n if (mimeType && e.parentId && mediaRegex.some((regex) => regex.test(mimeType))) {\n excludedEvents.push(e.parentId);\n }\n }\n });\n\n // TODO It would be even better to exclude the whole subtree, in case the media request is handled by user code.\n return events.filter((e) => !excludedEvents.includes(e.id));\n }\n\n /**\n *\n * @param {CodeObject} object\n * @param {string} query\n * @returns boolean\n */\n static codeObjectIsMatched(object, query) {\n if (query === object.fqid) {\n return true;\n } else if (query.startsWith('label:')) {\n const pattern = filterRegExp(query, () => [\n `^${query.replace('label:', '').replace('*', '.*')}$`,\n 'ig',\n ]);\n return Array.from(object.labels).some((label) => pattern.test(label));\n }\n if (query.length > 2 && query.charAt(0) === '/' && query.charAt(query.length - 1) === '/') {\n const pattern = filterRegExp(query, () => [query.substring(1, query.length - 1), 'ig']);\n if (pattern.test(object.fqid)) {\n return true;\n }\n } else if (query.endsWith('*')) {\n const pattern = filterRegExp(query, () => [`^${query.slice(0, query.length - 1)}.*`, 'ig']);\n if (pattern.test(object.fqid)) {\n return true;\n }\n }\n\n return false;\n }\n\n // Regarding untyped 'findings' - Finding is declared in @appland/scanner, but I'm not going to\n // add a dependency on that package just yet. All the code in this file was originally located\n // in VsCodeExtension, and as a first step I'm just refactoring it out.\n static attachFindingsToEvents(events, findings) {\n const eventsById = events.reduce((map, e) => {\n map[e.id] = e.callEvent;\n return map;\n }, {});\n\n findings.forEach((finding) => {\n const traceFilter =\n finding.appMapUri && finding.appMapUri.fragment && finding.appMapUri.fragment.traceFilter;\n\n if (traceFilter) {\n const ids = traceFilter.split(' ').map((idStr) => Number(idStr.split(':')[1]));\n\n ids.forEach((id) => {\n const event = eventsById[id];\n\n if (event && !AppMapFilter.eventAlreadyHasFinding(event, finding)) {\n if (event.findings) {\n event.findings.push(finding);\n } else {\n event.findings = [finding];\n }\n }\n });\n }\n });\n\n return events;\n }\n\n static eventAlreadyHasFinding(event, finding) {\n return (\n event.findings &&\n !!event.findings.find(\n (attachedFinding) => attachedFinding.finding.hash_v2 === finding.finding.hash_v2\n )\n );\n }\n}\n","import AppMapFilter, { DEFAULT_CONTEXT_DEPTH } from './appMapFilter';\nimport { base64UrlDecode } from './util';\n\nfunction mergeLists(a, b) {\n if (a === false && b === false) return false;\n\n const result = [...new Set([...(a || []), ...(b || [])])].sort();\n return result.length > 0 ? result : false;\n}\n\nfunction lowestNumber(...sequence) {\n sequence = sequence.filter((t) => t !== undefined && t !== null && t !== false);\n\n if (sequence.length === 0) return false;\n\n return Math.min(\n ...sequence\n .map((t) => (typeof t === 'number' ? t : parseInt(t.toString(), 10)))\n .filter((t) => !isNaN(t))\n );\n}\n\nfunction coalesce(...sequence) {\n return sequence.find((t) => t !== undefined && t !== null && t !== false);\n}\n\nexport function mergeFilterState(first, second) {\n return {\n rootObjects: mergeLists(first.rootObjects, second.rootObjects),\n limitRootEvents: coalesce(first.limitRootEvents, second.limitRootEvents),\n hideMediaRequests: coalesce(first.hideMediaRequests, second.hideMediaRequests),\n hideUnlabeled: coalesce(first.hideUnlabeled, second.hideUnlabeled),\n hideExternal: coalesce(first.hideExternal, second.hideExternal),\n dependencyFolders: mergeLists(first.dependencyFolders, second.dependencyFolders),\n hideElapsedTimeUnder: lowestNumber(first.hideElapsedTimeUnder, second.hideElapsedTimeUnder),\n hideName: mergeLists(first.hideName, second.hideName),\n };\n}\n\n// Serialize the AppMapFilter to an object.\nexport function serializeFilter(filter) {\n if (!filter) return {};\n\n let declutter = filter;\n const rootObjects = filter.rootObjects;\n if ('declutter' in filter) declutter = filter.declutter;\n\n return Object.entries({\n rootObjects: rootObjects,\n limitRootEvents: declutter.limitRootEvents.on,\n hideMediaRequests: declutter.hideMediaRequests.on,\n hideUnlabeled: declutter.hideUnlabeled.on,\n hideExternalPaths: declutter.hideExternalPaths.on\n ? declutter.hideExternalPaths.dependencyFolders\n : false,\n hideElapsedTimeUnder: declutter.hideElapsedTimeUnder.on\n ? declutter.hideElapsedTimeUnder.time\n : false,\n context: declutter.context.on ? declutter.context.names : false,\n contextDepth:\n declutter.context.on && declutter.context.depth !== DEFAULT_CONTEXT_DEPTH\n ? declutter.context.depth\n : false,\n hideName: declutter.hideName.on ? declutter.hideName.names : false,\n }).reduce((memo, [k, v]) => {\n const filter = declutter[k];\n if (Array.isArray(v) && v.length !== 0) {\n memo[k] = v;\n } else if (typeof v === 'number') {\n memo[k] = v;\n } else if (filter && filter.default !== v) {\n memo[k] = v;\n }\n return memo;\n }, {});\n}\n\n// If stringInput is a base64 URL encoded string, decode it. Parse as JSON into a FilterState object.\nexport function filterStringToFilterState(stringInput) {\n if (!stringInput) return;\n\n let json;\n const isStringifiedJson = stringInput.trimStart().startsWith('{');\n if (isStringifiedJson) {\n // The old style of deserialization expected a raw stringified JSON object.\n // To avoid introducing a breaking change, we'll support both for now.\n json = stringInput;\n } else {\n json = base64UrlDecode(stringInput);\n }\n\n return JSON.parse(json);\n}\n\n// Convert a filter string to AppMapFilter. The filter string may optionally be\n// base64 URL encoded.\nexport function deserializeFilter(filterState) {\n if (typeof filterState === 'string') filterState = filterStringToFilterState(filterState);\n\n const filter = new AppMapFilter();\n if (!filterState) return filter;\n\n for (const property in filterState) {\n if (\n Object.prototype.hasOwnProperty.call(filterState, property) &&\n filterState[property] === undefined\n )\n delete filterState[property];\n }\n\n if ('rootObjects' in filterState && filterState.rootObjects !== false) {\n filter.rootObjects = filterState.rootObjects;\n }\n if ('limitRootEvents' in filterState) {\n filter.declutter.limitRootEvents.on = filterState.limitRootEvents;\n }\n if ('hideMediaRequests' in filterState) {\n filter.declutter.hideMediaRequests.on = filterState.hideMediaRequests;\n }\n if ('hideUnlabeled' in filterState) {\n filter.declutter.hideUnlabeled.on = filterState.hideUnlabeled;\n }\n ['hideExternal', 'hideExternalPaths'].forEach((key) => {\n if (key in filterState) {\n const value = filterState[key];\n\n if (value && Array.isArray(value)) {\n filter.declutter.hideExternalPaths.on = true;\n filter.declutter.hideExternalPaths.dependencyFolders = filterState[key];\n } else {\n filter.declutter.hideExternalPaths.on = filterState[key];\n }\n }\n });\n if ('dependencyFolders' in filterState && filterState.dependencyFolders !== false) {\n filter.declutter.hideExternalPaths.dependencyFolders = filterState.dependencyFolders;\n }\n if ('hideElapsedTimeUnder' in filterState && filterState.hideElapsedTimeUnder !== false) {\n filter.declutter.hideElapsedTimeUnder.on = true;\n filter.declutter.hideElapsedTimeUnder.time = filterState.hideElapsedTimeUnder;\n }\n ['hideName', 'hideNames'].forEach((key) => {\n if (key in filterState && filterState[key] !== false) {\n filter.declutter.hideName.on = true;\n filter.declutter.hideName.names = filterState[key];\n }\n });\n if ('context' in filterState && filterState.context !== false) {\n filter.declutter.context.on = true;\n filter.declutter.context.names = filterState.context;\n if ('contextDepth' in filterState && filterState.contextDepth !== false) {\n filter.declutter.context.depth = filterState.contextDepth;\n }\n }\n if ('hideTree' in filterState && filterState.hideTree !== false) {\n filter.declutter.hideTree.on = true;\n filter.declutter.hideTree.names = filterState.hideTree;\n }\n\n return filter;\n}\n",null,null,"'use strict'\nmodule.exports = function (Yallist) {\n Yallist.prototype[Symbol.iterator] = function* () {\n for (let walker = this.head; walker; walker = walker.next) {\n yield walker.value\n }\n }\n}\n","'use strict'\nmodule.exports = Yallist\n\nYallist.Node = Node\nYallist.create = Yallist\n\nfunction Yallist (list) {\n var self = this\n if (!(self instanceof Yallist)) {\n self = new Yallist()\n }\n\n self.tail = null\n self.head = null\n self.length = 0\n\n if (list && typeof list.forEach === 'function') {\n list.forEach(function (item) {\n self.push(item)\n })\n } else if (arguments.length > 0) {\n for (var i = 0, l = arguments.length; i < l; i++) {\n self.push(arguments[i])\n }\n }\n\n return self\n}\n\nYallist.prototype.removeNode = function (node) {\n if (node.list !== this) {\n throw new Error('removing node which does not belong to this list')\n }\n\n var next = node.next\n var prev = node.prev\n\n if (next) {\n next.prev = prev\n }\n\n if (prev) {\n prev.next = next\n }\n\n if (node === this.head) {\n this.head = next\n }\n if (node === this.tail) {\n this.tail = prev\n }\n\n node.list.length--\n node.next = null\n node.prev = null\n node.list = null\n\n return next\n}\n\nYallist.prototype.unshiftNode = function (node) {\n if (node === this.head) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n var head = this.head\n node.list = this\n node.next = head\n if (head) {\n head.prev = node\n }\n\n this.head = node\n if (!this.tail) {\n this.tail = node\n }\n this.length++\n}\n\nYallist.prototype.pushNode = function (node) {\n if (node === this.tail) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n var tail = this.tail\n node.list = this\n node.prev = tail\n if (tail) {\n tail.next = node\n }\n\n this.tail = node\n if (!this.head) {\n this.head = node\n }\n this.length++\n}\n\nYallist.prototype.push = function () {\n for (var i = 0, l = arguments.length; i < l; i++) {\n push(this, arguments[i])\n }\n return this.length\n}\n\nYallist.prototype.unshift = function () {\n for (var i = 0, l = arguments.length; i < l; i++) {\n unshift(this, arguments[i])\n }\n return this.length\n}\n\nYallist.prototype.pop = function () {\n if (!this.tail) {\n return undefined\n }\n\n var res = this.tail.value\n this.tail = this.tail.prev\n if (this.tail) {\n this.tail.next = null\n } else {\n this.head = null\n }\n this.length--\n return res\n}\n\nYallist.prototype.shift = function () {\n if (!this.head) {\n return undefined\n }\n\n var res = this.head.value\n this.head = this.head.next\n if (this.head) {\n this.head.prev = null\n } else {\n this.tail = null\n }\n this.length--\n return res\n}\n\nYallist.prototype.forEach = function (fn, thisp) {\n thisp = thisp || this\n for (var walker = this.head, i = 0; walker !== null; i++) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.next\n }\n}\n\nYallist.prototype.forEachReverse = function (fn, thisp) {\n thisp = thisp || this\n for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.prev\n }\n}\n\nYallist.prototype.get = function (n) {\n for (var i = 0, walker = this.head; walker !== null && i < n; i++) {\n // abort out of the list early if we hit a cycle\n walker = walker.next\n }\n if (i === n && walker !== null) {\n return walker.value\n }\n}\n\nYallist.prototype.getReverse = function (n) {\n for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {\n // abort out of the list early if we hit a cycle\n walker = walker.prev\n }\n if (i === n && walker !== null) {\n return walker.value\n }\n}\n\nYallist.prototype.map = function (fn, thisp) {\n thisp = thisp || this\n var res = new Yallist()\n for (var walker = this.head; walker !== null;) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.next\n }\n return res\n}\n\nYallist.prototype.mapReverse = function (fn, thisp) {\n thisp = thisp || this\n var res = new Yallist()\n for (var walker = this.tail; walker !== null;) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.prev\n }\n return res\n}\n\nYallist.prototype.reduce = function (fn, initial) {\n var acc\n var walker = this.head\n if (arguments.length > 1) {\n acc = initial\n } else if (this.head) {\n walker = this.head.next\n acc = this.head.value\n } else {\n throw new TypeError('Reduce of empty list with no initial value')\n }\n\n for (var i = 0; walker !== null; i++) {\n acc = fn(acc, walker.value, i)\n walker = walker.next\n }\n\n return acc\n}\n\nYallist.prototype.reduceReverse = function (fn, initial) {\n var acc\n var walker = this.tail\n if (arguments.length > 1) {\n acc = initial\n } else if (this.tail) {\n walker = this.tail.prev\n acc = this.tail.value\n } else {\n throw new TypeError('Reduce of empty list with no initial value')\n }\n\n for (var i = this.length - 1; walker !== null; i--) {\n acc = fn(acc, walker.value, i)\n walker = walker.prev\n }\n\n return acc\n}\n\nYallist.prototype.toArray = function () {\n var arr = new Array(this.length)\n for (var i = 0, walker = this.head; walker !== null; i++) {\n arr[i] = walker.value\n walker = walker.next\n }\n return arr\n}\n\nYallist.prototype.toArrayReverse = function () {\n var arr = new Array(this.length)\n for (var i = 0, walker = this.tail; walker !== null; i++) {\n arr[i] = walker.value\n walker = walker.prev\n }\n return arr\n}\n\nYallist.prototype.slice = function (from, to) {\n to = to || this.length\n if (to < 0) {\n to += this.length\n }\n from = from || 0\n if (from < 0) {\n from += this.length\n }\n var ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n for (var i = 0, walker = this.head; walker !== null && i < from; i++) {\n walker = walker.next\n }\n for (; walker !== null && i < to; i++, walker = walker.next) {\n ret.push(walker.value)\n }\n return ret\n}\n\nYallist.prototype.sliceReverse = function (from, to) {\n to = to || this.length\n if (to < 0) {\n to += this.length\n }\n from = from || 0\n if (from < 0) {\n from += this.length\n }\n var ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {\n walker = walker.prev\n }\n for (; walker !== null && i > from; i--, walker = walker.prev) {\n ret.push(walker.value)\n }\n return ret\n}\n\nYallist.prototype.splice = function (start, deleteCount, ...nodes) {\n if (start > this.length) {\n start = this.length - 1\n }\n if (start < 0) {\n start = this.length + start;\n }\n\n for (var i = 0, walker = this.head; walker !== null && i < start; i++) {\n walker = walker.next\n }\n\n var ret = []\n for (var i = 0; walker && i < deleteCount; i++) {\n ret.push(walker.value)\n walker = this.removeNode(walker)\n }\n if (walker === null) {\n walker = this.tail\n }\n\n if (walker !== this.head && walker !== this.tail) {\n walker = walker.prev\n }\n\n for (var i = 0; i < nodes.length; i++) {\n walker = insert(this, walker, nodes[i])\n }\n return ret;\n}\n\nYallist.prototype.reverse = function () {\n var head = this.head\n var tail = this.tail\n for (var walker = head; walker !== null; walker = walker.prev) {\n var p = walker.prev\n walker.prev = walker.next\n walker.next = p\n }\n this.head = tail\n this.tail = head\n return this\n}\n\nfunction insert (self, node, value) {\n var inserted = node === self.head ?\n new Node(value, null, node, self) :\n new Node(value, node, node.next, self)\n\n if (inserted.next === null) {\n self.tail = inserted\n }\n if (inserted.prev === null) {\n self.head = inserted\n }\n\n self.length++\n\n return inserted\n}\n\nfunction push (self, item) {\n self.tail = new Node(item, self.tail, null, self)\n if (!self.head) {\n self.head = self.tail\n }\n self.length++\n}\n\nfunction unshift (self, item) {\n self.head = new Node(item, null, self.head, self)\n if (!self.tail) {\n self.tail = self.head\n }\n self.length++\n}\n\nfunction Node (value, prev, next, list) {\n if (!(this instanceof Node)) {\n return new Node(value, prev, next, list)\n }\n\n this.list = list\n this.value = value\n\n if (prev) {\n prev.next = this\n this.prev = prev\n } else {\n this.prev = null\n }\n\n if (next) {\n next.prev = this\n this.next = next\n } else {\n this.next = null\n }\n}\n\ntry {\n // add if support for Symbol.iterator is present\n require('./iterator.js')(Yallist)\n} catch (er) {}\n","'use strict'\n\n// A linked list to keep track of recently-used-ness\nconst Yallist = require('yallist')\n\nconst MAX = Symbol('max')\nconst LENGTH = Symbol('length')\nconst LENGTH_CALCULATOR = Symbol('lengthCalculator')\nconst ALLOW_STALE = Symbol('allowStale')\nconst MAX_AGE = Symbol('maxAge')\nconst DISPOSE = Symbol('dispose')\nconst NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet')\nconst LRU_LIST = Symbol('lruList')\nconst CACHE = Symbol('cache')\nconst UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet')\n\nconst naiveLength = () => 1\n\n// lruList is a yallist where the head is the youngest\n// item, and the tail is the oldest. the list contains the Hit\n// objects as the entries.\n// Each Hit object has a reference to its Yallist.Node. This\n// never changes.\n//\n// cache is a Map (or PseudoMap) that matches the keys to\n// the Yallist.Node object.\nclass LRUCache {\n constructor (options) {\n if (typeof options === 'number')\n options = { max: options }\n\n if (!options)\n options = {}\n\n if (options.max && (typeof options.max !== 'number' || options.max < 0))\n throw new TypeError('max must be a non-negative number')\n // Kind of weird to have a default max of Infinity, but oh well.\n const max = this[MAX] = options.max || Infinity\n\n const lc = options.length || naiveLength\n this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc\n this[ALLOW_STALE] = options.stale || false\n if (options.maxAge && typeof options.maxAge !== 'number')\n throw new TypeError('maxAge must be a number')\n this[MAX_AGE] = options.maxAge || 0\n this[DISPOSE] = options.dispose\n this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false\n this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false\n this.reset()\n }\n\n // resize the cache when the max changes.\n set max (mL) {\n if (typeof mL !== 'number' || mL < 0)\n throw new TypeError('max must be a non-negative number')\n\n this[MAX] = mL || Infinity\n trim(this)\n }\n get max () {\n return this[MAX]\n }\n\n set allowStale (allowStale) {\n this[ALLOW_STALE] = !!allowStale\n }\n get allowStale () {\n return this[ALLOW_STALE]\n }\n\n set maxAge (mA) {\n if (typeof mA !== 'number')\n throw new TypeError('maxAge must be a non-negative number')\n\n this[MAX_AGE] = mA\n trim(this)\n }\n get maxAge () {\n return this[MAX_AGE]\n }\n\n // resize the cache when the lengthCalculator changes.\n set lengthCalculator (lC) {\n if (typeof lC !== 'function')\n lC = naiveLength\n\n if (lC !== this[LENGTH_CALCULATOR]) {\n this[LENGTH_CALCULATOR] = lC\n this[LENGTH] = 0\n this[LRU_LIST].forEach(hit => {\n hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key)\n this[LENGTH] += hit.length\n })\n }\n trim(this)\n }\n get lengthCalculator () { return this[LENGTH_CALCULATOR] }\n\n get length () { return this[LENGTH] }\n get itemCount () { return this[LRU_LIST].length }\n\n rforEach (fn, thisp) {\n thisp = thisp || this\n for (let walker = this[LRU_LIST].tail; walker !== null;) {\n const prev = walker.prev\n forEachStep(this, fn, walker, thisp)\n walker = prev\n }\n }\n\n forEach (fn, thisp) {\n thisp = thisp || this\n for (let walker = this[LRU_LIST].head; walker !== null;) {\n const next = walker.next\n forEachStep(this, fn, walker, thisp)\n walker = next\n }\n }\n\n keys () {\n return this[LRU_LIST].toArray().map(k => k.key)\n }\n\n values () {\n return this[LRU_LIST].toArray().map(k => k.value)\n }\n\n reset () {\n if (this[DISPOSE] &&\n this[LRU_LIST] &&\n this[LRU_LIST].length) {\n this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value))\n }\n\n this[CACHE] = new Map() // hash of items by key\n this[LRU_LIST] = new Yallist() // list of items in order of use recency\n this[LENGTH] = 0 // length of items in the list\n }\n\n dump () {\n return this[LRU_LIST].map(hit =>\n isStale(this, hit) ? false : {\n k: hit.key,\n v: hit.value,\n e: hit.now + (hit.maxAge || 0)\n }).toArray().filter(h => h)\n }\n\n dumpLru () {\n return this[LRU_LIST]\n }\n\n set (key, value, maxAge) {\n maxAge = maxAge || this[MAX_AGE]\n\n if (maxAge && typeof maxAge !== 'number')\n throw new TypeError('maxAge must be a number')\n\n const now = maxAge ? Date.now() : 0\n const len = this[LENGTH_CALCULATOR](value, key)\n\n if (this[CACHE].has(key)) {\n if (len > this[MAX]) {\n del(this, this[CACHE].get(key))\n return false\n }\n\n const node = this[CACHE].get(key)\n const item = node.value\n\n // dispose of the old one before overwriting\n // split out into 2 ifs for better coverage tracking\n if (this[DISPOSE]) {\n if (!this[NO_DISPOSE_ON_SET])\n this[DISPOSE](key, item.value)\n }\n\n item.now = now\n item.maxAge = maxAge\n item.value = value\n this[LENGTH] += len - item.length\n item.length = len\n this.get(key)\n trim(this)\n return true\n }\n\n const hit = new Entry(key, value, len, now, maxAge)\n\n // oversized objects fall out of cache automatically.\n if (hit.length > this[MAX]) {\n if (this[DISPOSE])\n this[DISPOSE](key, value)\n\n return false\n }\n\n this[LENGTH] += hit.length\n this[LRU_LIST].unshift(hit)\n this[CACHE].set(key, this[LRU_LIST].head)\n trim(this)\n return true\n }\n\n has (key) {\n if (!this[CACHE].has(key)) return false\n const hit = this[CACHE].get(key).value\n return !isStale(this, hit)\n }\n\n get (key) {\n return get(this, key, true)\n }\n\n peek (key) {\n return get(this, key, false)\n }\n\n pop () {\n const node = this[LRU_LIST].tail\n if (!node)\n return null\n\n del(this, node)\n return node.value\n }\n\n del (key) {\n del(this, this[CACHE].get(key))\n }\n\n load (arr) {\n // reset the cache\n this.reset()\n\n const now = Date.now()\n // A previous serialized cache has the most recent items first\n for (let l = arr.length - 1; l >= 0; l--) {\n const hit = arr[l]\n const expiresAt = hit.e || 0\n if (expiresAt === 0)\n // the item was created without expiration in a non aged cache\n this.set(hit.k, hit.v)\n else {\n const maxAge = expiresAt - now\n // dont add already expired items\n if (maxAge > 0) {\n this.set(hit.k, hit.v, maxAge)\n }\n }\n }\n }\n\n prune () {\n this[CACHE].forEach((value, key) => get(this, key, false))\n }\n}\n\nconst get = (self, key, doUse) => {\n const node = self[CACHE].get(key)\n if (node) {\n const hit = node.value\n if (isStale(self, hit)) {\n del(self, node)\n if (!self[ALLOW_STALE])\n return undefined\n } else {\n if (doUse) {\n if (self[UPDATE_AGE_ON_GET])\n node.value.now = Date.now()\n self[LRU_LIST].unshiftNode(node)\n }\n }\n return hit.value\n }\n}\n\nconst isStale = (self, hit) => {\n if (!hit || (!hit.maxAge && !self[MAX_AGE]))\n return false\n\n const diff = Date.now() - hit.now\n return hit.maxAge ? diff > hit.maxAge\n : self[MAX_AGE] && (diff > self[MAX_AGE])\n}\n\nconst trim = self => {\n if (self[LENGTH] > self[MAX]) {\n for (let walker = self[LRU_LIST].tail;\n self[LENGTH] > self[MAX] && walker !== null;) {\n // We know that we're about to delete this one, and also\n // what the next least recently used key will be, so just\n // go ahead and set it now.\n const prev = walker.prev\n del(self, walker)\n walker = prev\n }\n }\n}\n\nconst del = (self, node) => {\n if (node) {\n const hit = node.value\n if (self[DISPOSE])\n self[DISPOSE](hit.key, hit.value)\n\n self[LENGTH] -= hit.length\n self[CACHE].delete(hit.key)\n self[LRU_LIST].removeNode(node)\n }\n}\n\nclass Entry {\n constructor (key, value, length, now, maxAge) {\n this.key = key\n this.value = value\n this.length = length\n this.now = now\n this.maxAge = maxAge || 0\n }\n}\n\nconst forEachStep = (self, fn, node, thisp) => {\n let hit = node.value\n if (isStale(self, hit)) {\n del(self, node)\n if (!self[ALLOW_STALE])\n hit = undefined\n }\n if (hit)\n fn.call(thisp, hit.value, hit.key, self)\n}\n\nmodule.exports = LRUCache\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.merge = void 0;\nconst sha256_js_1 = __importDefault(require(\"crypto-js/sha256.js\"));\nconst lru_cache_1 = __importDefault(require(\"lru-cache\"));\nconst types_1 = require(\"./types\");\nconst sha256Cache = new lru_cache_1.default({ max: 3000 });\nfunction buildDigest(actions) {\n const sha256Input = actions.map((action) => action.subtreeDigest).join('\\n');\n let result = sha256Cache.get(sha256Input);\n if (!result) {\n result = (0, sha256_js_1.default)(sha256Input).toString();\n sha256Cache.set(sha256Input, result);\n }\n return result;\n}\nfunction countDigests(actions, windowSize) {\n const digestCount = new Map();\n for (let index = 0; index + windowSize <= actions.length; index++) {\n const range = actions.slice(index, index + windowSize);\n const digest = buildDigest(range);\n const count = digestCount.get(digest);\n if (count !== undefined)\n digestCount.set(digest, count + 1);\n else\n digestCount.set(digest, 1);\n }\n return digestCount;\n}\nconst isMerge = (item) => item.constructor === Array;\nconst buildLoop = (merge) => {\n const digest = buildDigest(merge[0]);\n // Since we are going to use merge[0] as the children of the loop, the event ids and elapsed time from the\n // loop actions that will be discarded need to be merged into merge[0]. This needs to happen\n // recursively in order to avoid losing event ids and elapsed time data from nested loops.\n const aggregateLoopMemberData = (action, duplicates) => {\n action.eventIds = [...action.eventIds, ...duplicates.map((d) => d.eventIds).flat()].sort((a, b) => a - b);\n action.elapsed =\n (action.elapsed || 0) + duplicates.reduce((sum, d) => sum + (d.elapsed || 0), 0);\n action.children.forEach((child, index) => {\n aggregateLoopMemberData(child, duplicates.map((d) => d.children[index]));\n });\n };\n merge[0].forEach((member, index) => {\n aggregateLoopMemberData(member, merge.slice(1).map((m) => m[index]));\n });\n return {\n nodeType: types_1.NodeType.Loop,\n count: merge.length,\n digest: 'loop',\n subtreeDigest: ['loop', digest].join(':'),\n children: merge[0],\n elapsed: merge[0].reduce((sum, action) => sum + (action.elapsed || 0), 0),\n eventIds: [],\n };\n};\nconst unroll = (items) => {\n const result = [];\n items.forEach((item) => {\n if (isMerge(item)) {\n if (item.length > 1)\n result.push(buildLoop(item));\n else\n result.push(...item[0]);\n }\n else\n result.push(item);\n });\n return result;\n};\nfunction merge(actions, windowSize) {\n const digestCount = countDigests(actions, windowSize);\n const digestsSorted = [...digestCount.keys()]\n .filter((key) => digestCount.get(key) > 1)\n .sort((a, b) => digestCount.get(b) - digestCount.get(a));\n if (digestsSorted.length === 0)\n return;\n for (let digestIndex = 0; digestIndex < digestsSorted.length; digestIndex++) {\n const referenceDigest = digestsSorted[digestIndex];\n const result = [];\n let merge = undefined;\n for (let actionIndex = 0; actionIndex + windowSize <= actions.length;) {\n const window = actions.slice(actionIndex, actionIndex + windowSize);\n const windowDigest = buildDigest(window);\n if (windowDigest === referenceDigest) {\n if (merge) {\n merge.push(window);\n }\n else {\n merge = [window];\n result.push(merge);\n }\n actionIndex += windowSize;\n }\n else {\n merge = undefined;\n result.push(window[0]);\n actionIndex += 1;\n }\n }\n const hasLoop = result.filter((item) => isMerge(item) && item.length > 1).length > 0;\n if (hasLoop)\n return unroll(result);\n }\n}\nexports.merge = merge;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.selectEvents = void 0;\nfunction selectEvents(appmap, specification) {\n const isIncludedCodeObject = (event) => !!specification.isIncludedCodeObject(event.codeObject);\n const hasRequiredCodeObjectAncestor = () => {\n if (!specification.hasRequiredCodeObjects)\n throw Error('Expecting at least one required code object id');\n const stack = [];\n let numberOfRequiredCodeObjectsInStack = 0;\n const includedStackEvents = new Set();\n appmap.events.forEach((event) => {\n if (event.isCall()) {\n if (specification.isRequiredCodeObject(event.codeObject)) {\n if (numberOfRequiredCodeObjectsInStack === 0) {\n // Mark ancestors as included\n stack.forEach((event) => includedStackEvents.add(event));\n }\n numberOfRequiredCodeObjectsInStack += 1;\n }\n if (numberOfRequiredCodeObjectsInStack > 0) {\n includedStackEvents.add(event);\n }\n stack.push(event);\n }\n else {\n stack.pop();\n if (specification.isRequiredCodeObject(event.codeObject)) {\n numberOfRequiredCodeObjectsInStack -= 1;\n }\n }\n });\n return (event) => includedStackEvents.has(event.callEvent);\n };\n // Event code object id must be in the user-requested set.\n let includedEvents = appmap.events.filter(isIncludedCodeObject);\n // Event stack must include at least one required code object id, unless\n // none are required.\n if (specification.hasRequiredCodeObjects) {\n includedEvents = includedEvents.filter(hasRequiredCodeObjectAncestor());\n }\n return includedEvents;\n}\nexports.selectEvents = selectEvents;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getActors = void 0;\nconst openapi_1 = require(\"@appland/openapi\");\nconst sha256_js_1 = __importDefault(require(\"crypto-js/sha256.js\"));\nconst lru_cache_1 = __importDefault(require(\"lru-cache\"));\nconst mergeWindow_1 = require(\"./mergeWindow\");\nconst selectEvents_1 = require(\"./selectEvents\");\nconst types_1 = require(\"./types\");\nconst MAX_WINDOW_SIZE = 5;\nconst parsedSqlCache = new lru_cache_1.default({ max: 1000 });\nconst sha256Cache = new lru_cache_1.default({ max: 1000 });\nclass ActorManager {\n constructor(specification) {\n this.specification = specification;\n this._actorsByCodeObjectId = new Map();\n this._actors = [];\n }\n findOrCreateActor(event) {\n const actorCodeObject = this.specification.isIncludedCodeObject(event.codeObject);\n if (!actorCodeObject)\n throw Error('actor code object not found');\n const order = this.specification.priorityOf(actorCodeObject);\n const actorKey = actorCodeObject.fqid;\n let actor = this._actorsByCodeObjectId.get(actorKey);\n if (actor)\n return actor;\n actor = {\n id: actorCodeObject.fqid,\n name: actorCodeObject.name,\n order,\n };\n this._actors.push(actor);\n this._actorsByCodeObjectId.set(actorKey, actor);\n return actor;\n }\n getSortedActors() {\n return this._actors.sort((a, b) => a.order - b.order);\n }\n}\nfunction buildDiagram(_appmapFile, appmap, specification) {\n const events = (0, selectEvents_1.selectEvents)(appmap, specification);\n const actorManager = new ActorManager(specification);\n function buildRequest(caller, callee) {\n if ((callee === null || callee === void 0 ? void 0 : callee.httpServerRequest) && (callee === null || callee === void 0 ? void 0 : callee.httpServerResponse)) {\n if (!callee.route)\n throw Error('callee.route not found');\n const response = callee.httpServerResponse;\n return {\n nodeType: types_1.NodeType.ServerRPC,\n callee: actorManager.findOrCreateActor(callee),\n route: callee.route,\n status: response.status || response.status_code,\n digest: callee.buildStableHash(parsedSqlCache).digest(),\n subtreeDigest: 'undefined',\n children: [],\n elapsed: callee.elapsedTime,\n eventIds: [callee.id],\n };\n }\n else if ((callee === null || callee === void 0 ? void 0 : callee.httpClientRequest) && (callee === null || callee === void 0 ? void 0 : callee.httpClientResponse)) {\n if (!callee.route)\n throw Error('callee.route not found');\n const response = callee.httpClientResponse;\n return {\n nodeType: types_1.NodeType.ClientRPC,\n caller: caller ? actorManager.findOrCreateActor(caller) : undefined,\n callee: actorManager.findOrCreateActor(callee),\n route: callee.route,\n status: response.status || response.status_code,\n digest: callee.buildStableHash(parsedSqlCache).digest(),\n subtreeDigest: 'undefined',\n children: [],\n elapsed: callee.elapsedTime,\n eventIds: [callee.id],\n };\n }\n else if (callee === null || callee === void 0 ? void 0 : callee.sqlQuery) {\n const truncatedQuery = callee.sqlQuery.endsWith('...');\n return {\n nodeType: types_1.NodeType.Query,\n caller: caller ? actorManager.findOrCreateActor(caller) : undefined,\n callee: actorManager.findOrCreateActor(callee),\n query: callee.sqlQuery,\n digest: truncatedQuery ? 'truncatedQuery' : callee.buildStableHash(parsedSqlCache).digest(),\n subtreeDigest: 'undefined',\n children: [],\n elapsed: callee.elapsedTime,\n eventIds: [callee.id],\n };\n }\n else if (callee) {\n return {\n nodeType: types_1.NodeType.Function,\n caller: caller ? actorManager.findOrCreateActor(caller) : undefined,\n callee: actorManager.findOrCreateActor(callee),\n name: callee.codeObject.name,\n static: callee.codeObject.static,\n digest: callee.buildStableHash(parsedSqlCache).digest(),\n subtreeDigest: 'undefined',\n stableProperties: Object.assign({}, callee.stableProperties),\n returnValue: buildReturnValue(callee),\n children: [],\n elapsed: callee.elapsedTime,\n eventIds: [callee.id],\n };\n }\n }\n function buildReturnValue(callee) {\n var _a;\n const { returnEvent } = callee;\n if (!returnEvent)\n return;\n const voidReturn = {\n returnValueType: {\n name: 'void',\n },\n raisesException: false,\n };\n let returnValueType;\n const raisesException = ((_a = returnEvent.exceptions) === null || _a === void 0 ? void 0 : _a.length) > 0;\n if (!returnEvent.returnValue && !raisesException)\n return voidReturn;\n if (returnEvent.returnValue) {\n let propertyNames;\n if (returnEvent.returnValue.properties) {\n propertyNames = returnEvent.returnValue.properties\n .map((p) => [p.name, p.class].join(':'))\n .sort();\n }\n const typeName = (0, openapi_1.classNameToOpenAPIType)(returnEvent.returnValue.class, { strict: true }) ||\n returnEvent.returnValue.class;\n returnValueType = {\n name: typeName,\n properties: propertyNames,\n };\n }\n return {\n returnValueType,\n raisesException,\n };\n }\n const codeObjectIds = new Set();\n const codeObjectSequence = new Map();\n const requestStack = [];\n const rootActions = [];\n const eventStack = [];\n const allMessages = new Array();\n events.forEach((event) => {\n if (!codeObjectIds.has(event.codeObject.fqid)) {\n codeObjectSequence.set(event.codeObject.fqid, codeObjectSequence.size);\n codeObjectIds.add(event.codeObject.fqid);\n }\n if (event.isCall()) {\n eventStack.push(event);\n const caller = eventStack[eventStack.length - 2];\n const request = buildRequest(caller, event);\n if (request) {\n const parent = requestStack[requestStack.length - 1];\n if (parent) {\n parent.children.push(request);\n }\n else {\n rootActions.push(request);\n }\n allMessages.push(request);\n }\n requestStack.push(request);\n }\n else {\n requestStack.pop();\n eventStack.pop();\n }\n });\n // Combine the digests of children into the parent digest.\n // Do this recursively.\n const buildSubtreeDigests = (node) => {\n const hashEntries = [node.digest];\n node.children.forEach((child) => {\n buildSubtreeDigests(child);\n hashEntries.push(child.subtreeDigest);\n });\n const hashInput = hashEntries.join('\\n');\n let sha256Digest = sha256Cache.get(hashInput);\n if (!sha256Digest) {\n sha256Digest = (0, sha256_js_1.default)(hashInput).toString();\n sha256Cache.set(hashInput, sha256Digest);\n }\n node.subtreeDigest = sha256Digest;\n };\n const detectLoops = (node) => {\n node.children.forEach((child) => detectLoops(child));\n if (node.children.length < 2)\n return;\n let windowSize = 1;\n while (windowSize <= MAX_WINDOW_SIZE) {\n const mergedChildren = (0, mergeWindow_1.merge)(node.children, windowSize);\n if (mergedChildren) {\n node.children = mergedChildren;\n }\n else {\n windowSize += 1;\n }\n }\n };\n rootActions.forEach((root) => buildSubtreeDigests(root));\n if (specification.loops)\n rootActions.forEach((root) => detectLoops(root));\n rootActions.forEach((root) => (0, types_1.setParent)(root));\n return {\n actors: actorManager.getSortedActors(),\n rootActions,\n };\n}\nexports.default = buildDiagram;\nfunction getActors(appmap, specification) {\n const actorManager = new ActorManager(specification);\n const events = (0, selectEvents_1.selectEvents)(appmap, specification);\n events.forEach((event) => actorManager.findOrCreateActor(event));\n return actorManager.getSortedActors();\n}\nexports.getActors = getActors;\n","/**\n * @license MIT\n * @copyright 2020 Eyas Ranjous \n *\n * @class\n */\nclass Heap {\n /**\n * @param {function} compare\n * @param {array} [_values]\n * @param {number|string|object} [_leaf]\n */\n constructor(compare, _values, _leaf) {\n if (typeof compare !== 'function') {\n throw new Error('Heap constructor expects a compare function');\n }\n this._compare = compare;\n this._nodes = Array.isArray(_values) ? _values : [];\n this._leaf = _leaf || null;\n }\n\n /**\n * Converts the heap to a cloned array without sorting.\n * @public\n * @returns {Array}\n */\n toArray() {\n return Array.from(this._nodes);\n }\n\n /**\n * Checks if a parent has a left child\n * @private\n */\n _hasLeftChild(parentIndex) {\n const leftChildIndex = (parentIndex * 2) + 1;\n return leftChildIndex < this.size();\n }\n\n /**\n * Checks if a parent has a right child\n * @private\n */\n _hasRightChild(parentIndex) {\n const rightChildIndex = (parentIndex * 2) + 2;\n return rightChildIndex < this.size();\n }\n\n /**\n * Compares two nodes\n * @private\n */\n _compareAt(i, j) {\n return this._compare(this._nodes[i], this._nodes[j]);\n }\n\n /**\n * Swaps two nodes in the heap\n * @private\n */\n _swap(i, j) {\n const temp = this._nodes[i];\n this._nodes[i] = this._nodes[j];\n this._nodes[j] = temp;\n }\n\n /**\n * Checks if parent and child should be swapped\n * @private\n */\n _shouldSwap(parentIndex, childIndex) {\n if (parentIndex < 0 || parentIndex >= this.size()) {\n return false;\n }\n\n if (childIndex < 0 || childIndex >= this.size()) {\n return false;\n }\n\n return this._compareAt(parentIndex, childIndex) > 0;\n }\n\n /**\n * Compares children of a parent\n * @private\n */\n _compareChildrenOf(parentIndex) {\n if (!this._hasLeftChild(parentIndex) && !this._hasRightChild(parentIndex)) {\n return -1;\n }\n\n const leftChildIndex = (parentIndex * 2) + 1;\n const rightChildIndex = (parentIndex * 2) + 2;\n\n if (!this._hasLeftChild(parentIndex)) {\n return rightChildIndex;\n }\n\n if (!this._hasRightChild(parentIndex)) {\n return leftChildIndex;\n }\n\n const compare = this._compareAt(leftChildIndex, rightChildIndex);\n return compare > 0 ? rightChildIndex : leftChildIndex;\n }\n\n /**\n * Compares two children before a position\n * @private\n */\n _compareChildrenBefore(index, leftChildIndex, rightChildIndex) {\n const compare = this._compareAt(rightChildIndex, leftChildIndex);\n\n if (compare <= 0 && rightChildIndex < index) {\n return rightChildIndex;\n }\n\n return leftChildIndex;\n }\n\n /**\n * Recursively bubbles up a node if it's in a wrong position\n * @private\n */\n _heapifyUp(startIndex) {\n let childIndex = startIndex;\n let parentIndex = Math.floor((childIndex - 1) / 2);\n\n while (this._shouldSwap(parentIndex, childIndex)) {\n this._swap(parentIndex, childIndex);\n childIndex = parentIndex;\n parentIndex = Math.floor((childIndex - 1) / 2);\n }\n }\n\n /**\n * Recursively bubbles down a node if it's in a wrong position\n * @private\n */\n _heapifyDown(startIndex) {\n let parentIndex = startIndex;\n let childIndex = this._compareChildrenOf(parentIndex);\n\n while (this._shouldSwap(parentIndex, childIndex)) {\n this._swap(parentIndex, childIndex);\n parentIndex = childIndex;\n childIndex = this._compareChildrenOf(parentIndex);\n }\n }\n\n /**\n * Recursively bubbles down a node before a given index\n * @private\n */\n _heapifyDownUntil(index) {\n let parentIndex = 0;\n let leftChildIndex = 1;\n let rightChildIndex = 2;\n let childIndex;\n\n while (leftChildIndex < index) {\n childIndex = this._compareChildrenBefore(\n index,\n leftChildIndex,\n rightChildIndex\n );\n\n if (this._shouldSwap(parentIndex, childIndex)) {\n this._swap(parentIndex, childIndex);\n }\n\n parentIndex = childIndex;\n leftChildIndex = (parentIndex * 2) + 1;\n rightChildIndex = (parentIndex * 2) + 2;\n }\n }\n\n /**\n * Inserts a new value into the heap\n * @public\n * @param {number|string|object} value\n * @returns {Heap}\n */\n insert(value) {\n this._nodes.push(value);\n this._heapifyUp(this.size() - 1);\n if (this._leaf === null || this._compare(value, this._leaf) > 0) {\n this._leaf = value;\n }\n return this;\n }\n\n /**\n * Inserts a new value into the heap\n * @public\n * @param {number|string|object} value\n * @returns {Heap}\n */\n push(value) {\n return this.insert(value);\n }\n\n /**\n * Removes and returns the root node in the heap\n * @public\n * @returns {number|string|object}\n */\n extractRoot() {\n if (this.isEmpty()) {\n return null;\n }\n\n const root = this.root();\n this._nodes[0] = this._nodes[this.size() - 1];\n this._nodes.pop();\n this._heapifyDown(0);\n\n if (root === this._leaf) {\n this._leaf = this.root();\n }\n\n return root;\n }\n\n /**\n * Removes and returns the root node in the heap\n * @public\n * @returns {number|string|object}\n */\n pop() {\n return this.extractRoot();\n }\n\n /**\n * Applies heap sort and return the values sorted by priority\n * @public\n * @returns {array}\n */\n sort() {\n for (let i = this.size() - 1; i > 0; i -= 1) {\n this._swap(0, i);\n this._heapifyDownUntil(i);\n }\n return this._nodes;\n }\n\n /**\n * Fixes node positions in the heap\n * @public\n * @returns {Heap}\n */\n fix() {\n // fix node positions\n for (let i = Math.floor(this.size() / 2) - 1; i >= 0; i -= 1) {\n this._heapifyDown(i);\n }\n\n // fix leaf value\n for (let i = Math.floor(this.size() / 2); i < this.size(); i += 1) {\n const value = this._nodes[i];\n if (this._leaf === null || this._compare(value, this._leaf) > 0) {\n this._leaf = value;\n }\n }\n\n return this;\n }\n\n /**\n * Verifies that all heap nodes are in the right position\n * @public\n * @returns {boolean}\n */\n isValid() {\n const isValidRecursive = (parentIndex) => {\n let isValidLeft = true;\n let isValidRight = true;\n\n if (this._hasLeftChild(parentIndex)) {\n const leftChildIndex = (parentIndex * 2) + 1;\n if (this._compareAt(parentIndex, leftChildIndex) > 0) {\n return false;\n }\n isValidLeft = isValidRecursive(leftChildIndex);\n }\n\n if (this._hasRightChild(parentIndex)) {\n const rightChildIndex = (parentIndex * 2) + 2;\n if (this._compareAt(parentIndex, rightChildIndex) > 0) {\n return false;\n }\n isValidRight = isValidRecursive(rightChildIndex);\n }\n\n return isValidLeft && isValidRight;\n };\n\n return isValidRecursive(0);\n }\n\n /**\n * Returns a shallow copy of the heap\n * @public\n * @returns {Heap}\n */\n clone() {\n return new Heap(this._compare, this._nodes.slice(), this._leaf);\n }\n\n /**\n * Returns the root node in the heap\n * @public\n * @returns {number|string|object}\n */\n root() {\n if (this.isEmpty()) {\n return null;\n }\n\n return this._nodes[0];\n }\n\n /**\n * Returns the root node in the heap\n * @public\n * @returns {number|string|object}\n */\n top() {\n return this.root();\n }\n\n /**\n * Returns a leaf node in the heap\n * @public\n * @returns {number|string|object}\n */\n leaf() {\n return this._leaf;\n }\n\n /**\n * Returns the number of nodes in the heap\n * @public\n * @returns {number}\n */\n size() {\n return this._nodes.length;\n }\n\n /**\n * Checks if the heap is empty\n * @public\n * @returns {boolean}\n */\n isEmpty() {\n return this.size() === 0;\n }\n\n /**\n * Clears the heap\n * @public\n */\n clear() {\n this._nodes = [];\n this._leaf = null;\n }\n\n /**\n * Implements an iterable on the heap\n * @public\n */\n [Symbol.iterator]() {\n let size = this.size();\n return {\n next: () => {\n size -= 1;\n return {\n value: this.pop(),\n done: size === -1\n };\n }\n };\n }\n\n /**\n * Builds a heap from a array of values\n * @public\n * @static\n * @param {array} values\n * @param {function} compare\n * @returns {Heap}\n */\n static heapify(values, compare) {\n if (!Array.isArray(values)) {\n throw new Error('Heap.heapify expects an array of values');\n }\n\n if (typeof compare !== 'function') {\n throw new Error('Heap.heapify expects a compare function');\n }\n\n return new Heap(compare, values).fix();\n }\n\n /**\n * Checks if a list of values is a valid heap\n * @public\n * @static\n * @param {array} values\n * @param {function} compare\n * @returns {boolean}\n */\n static isHeapified(values, compare) {\n return new Heap(compare, values).isValid();\n }\n}\n\nexports.Heap = Heap;\n","/**\n * @license MIT\n * @copyright 2020 Eyas Ranjous \n */\n\nconst { Heap } = require('./heap');\n\nconst getMinCompare = (getCompareValue) => (a, b) => {\n const aVal = typeof getCompareValue === 'function' ? getCompareValue(a) : a;\n const bVal = typeof getCompareValue === 'function' ? getCompareValue(b) : b;\n return aVal <= bVal ? -1 : 1;\n};\n\n/**\n * @class MinHeap\n * @extends Heap\n */\nclass MinHeap {\n /**\n * @param {function} [getCompareValue]\n * @param {Heap} [_heap]\n */\n constructor(getCompareValue, _heap) {\n this._getCompareValue = getCompareValue;\n this._heap = _heap || new Heap(getMinCompare(getCompareValue));\n }\n\n /**\n * Converts the heap to a cloned array without sorting.\n * @public\n * @returns {Array}\n */\n toArray() {\n return Array.from(this._heap._nodes);\n }\n\n /**\n * Inserts a new value into the heap\n * @public\n * @param {number|string|object} value\n * @returns {MinHeap}\n */\n insert(value) {\n return this._heap.insert(value);\n }\n\n /**\n * Inserts a new value into the heap\n * @public\n * @param {number|string|object} value\n * @returns {Heap}\n */\n push(value) {\n return this.insert(value);\n }\n\n /**\n * Removes and returns the root node in the heap\n * @public\n * @returns {number|string|object}\n */\n extractRoot() {\n return this._heap.extractRoot();\n }\n\n /**\n * Removes and returns the root node in the heap\n * @public\n * @returns {number|string|object}\n */\n pop() {\n return this.extractRoot();\n }\n\n /**\n * Applies heap sort and return the values sorted by priority\n * @public\n * @returns {array}\n */\n sort() {\n return this._heap.sort();\n }\n\n /**\n * Fixes node positions in the heap\n * @public\n * @returns {MinHeap}\n */\n fix() {\n return this._heap.fix();\n }\n\n /**\n * Verifies that all heap nodes are in the right position\n * @public\n * @returns {boolean}\n */\n isValid() {\n return this._heap.isValid();\n }\n\n /**\n * Returns the root node in the heap\n * @public\n * @returns {number|string|object}\n */\n root() {\n return this._heap.root();\n }\n\n /**\n * Returns the root node in the heap\n * @public\n * @returns {number|string|object}\n */\n top() {\n return this.root();\n }\n\n /**\n * Returns a leaf node in the heap\n * @public\n * @returns {number|string|object}\n */\n leaf() {\n return this._heap.leaf();\n }\n\n /**\n * Returns the number of nodes in the heap\n * @public\n * @returns {number}\n */\n size() {\n return this._heap.size();\n }\n\n /**\n * Checks if the heap is empty\n * @public\n * @returns {boolean}\n */\n isEmpty() {\n return this._heap.isEmpty();\n }\n\n /**\n * Clears the heap\n * @public\n */\n clear() {\n this._heap.clear();\n }\n\n /**\n * Returns a shallow copy of the MinHeap\n * @public\n * @returns {MinHeap}\n */\n clone() {\n return new MinHeap(this._getCompareValue, this._heap.clone());\n }\n\n /**\n * Implements an iterable on the heap\n * @public\n */\n [Symbol.iterator]() {\n let size = this.size();\n return {\n next: () => {\n size -= 1;\n return {\n value: this.pop(),\n done: size === -1\n };\n }\n };\n }\n\n /**\n * Builds a MinHeap from an array\n * @public\n * @static\n * @param {array} values\n * @param {function} [getCompareValue]\n * @returns {MinHeap}\n */\n static heapify(values, getCompareValue) {\n if (!Array.isArray(values)) {\n throw new Error('MinHeap.heapify expects an array');\n }\n const heap = new Heap(getMinCompare(getCompareValue), values);\n return new MinHeap(getCompareValue, heap).fix();\n }\n\n /**\n * Checks if a list of values is a valid min heap\n * @public\n * @static\n * @param {array} values\n * @param {function} [getCompareValue]\n * @returns {boolean}\n */\n static isHeapified(values, getCompareValue) {\n const heap = new Heap(getMinCompare(getCompareValue), values);\n return new MinHeap(getCompareValue, heap).isValid();\n }\n}\n\nexports.MinHeap = MinHeap;\n","/**\n * @license MIT\n * @copyright 2020 Eyas Ranjous \n */\n\nconst { Heap } = require('./heap');\n\nconst getMaxCompare = (getCompareValue) => (a, b) => {\n const aVal = typeof getCompareValue === 'function' ? getCompareValue(a) : a;\n const bVal = typeof getCompareValue === 'function' ? getCompareValue(b) : b;\n return aVal < bVal ? 1 : -1;\n};\n\n/**\n * @class MaxHeap\n * @extends Heap\n */\nclass MaxHeap {\n /**\n * @param {function} [getCompareValue]\n * @param {Heap} [_heap]\n */\n constructor(getCompareValue, _heap) {\n this._getCompareValue = getCompareValue;\n this._heap = _heap || new Heap(getMaxCompare(getCompareValue));\n }\n\n /**\n * Inserts a new value into the heap\n * @public\n * @param {number|string|object} value\n * @returns {MaxHeap}\n */\n insert(value) {\n return this._heap.insert(value);\n }\n\n /**\n * Inserts a new value into the heap\n * @public\n * @param {number|string|object} value\n * @returns {Heap}\n */\n push(value) {\n return this.insert(value);\n }\n\n /**\n * Removes and returns the root node in the heap\n * @public\n * @returns {number|string|object}\n */\n extractRoot() {\n return this._heap.extractRoot();\n }\n\n /**\n * Removes and returns the root node in the heap\n * @public\n * @returns {number|string|object}\n */\n pop() {\n return this.extractRoot();\n }\n\n /**\n * Applies heap sort and return the values sorted by priority\n * @public\n * @returns {array}\n */\n sort() {\n return this._heap.sort();\n }\n\n /**\n * Converts the heap to a cloned array without sorting.\n * @public\n * @returns {Array}\n */\n toArray() {\n return Array.from(this._heap._nodes);\n }\n\n /**\n * Fixes node positions in the heap\n * @public\n * @returns {MaxHeap}\n */\n fix() {\n return this._heap.fix();\n }\n\n /**\n * Verifies that all heap nodes are in the right position\n * @public\n * @returns {boolean}\n */\n isValid() {\n return this._heap.isValid();\n }\n\n /**\n * Returns the root node in the heap\n * @public\n * @returns {number|string|object}\n */\n root() {\n return this._heap.root();\n }\n\n /**\n * Returns the root node in the heap\n * @public\n * @returns {number|string|object}\n */\n top() {\n return this.root();\n }\n\n /**\n * Returns a leaf node in the heap\n * @public\n * @returns {number|string|object}\n */\n leaf() {\n return this._heap.leaf();\n }\n\n /**\n * Returns the number of nodes in the heap\n * @public\n * @returns {number}\n */\n size() {\n return this._heap.size();\n }\n\n /**\n * Checks if the heap is empty\n * @public\n * @returns {boolean}\n */\n isEmpty() {\n return this._heap.isEmpty();\n }\n\n /**\n * Clears the heap\n * @public\n */\n clear() {\n this._heap.clear();\n }\n\n /**\n * Returns a shallow copy of the MaxHeap\n * @public\n * @returns {MaxHeap}\n */\n clone() {\n return new MaxHeap(this._getCompareValue, this._heap.clone());\n }\n\n /**\n * Implements an iterable on the heap\n * @public\n */\n [Symbol.iterator]() {\n let size = this.size();\n return {\n next: () => {\n size -= 1;\n return {\n value: this.pop(),\n done: size === -1\n };\n }\n };\n }\n\n /**\n * Builds a MaxHeap from an array\n * @public\n * @static\n * @param {array} values\n * @param {function} [getCompareValue]\n * @returns {MaxHeap}\n */\n static heapify(values, getCompareValue) {\n if (!Array.isArray(values)) {\n throw new Error('MaxHeap.heapify expects an array');\n }\n const heap = new Heap(getMaxCompare(getCompareValue), values);\n return new MaxHeap(getCompareValue, heap).fix();\n }\n\n /**\n * Checks if a list of values is a valid max heap\n * @public\n * @static\n * @param {array} values\n * @param {function} [getCompareValue]\n * @returns {boolean}\n */\n static isHeapified(values, getCompareValue) {\n const heap = new Heap(getMaxCompare(getCompareValue), values);\n return new MaxHeap(getCompareValue, heap).isValid();\n }\n}\n\nexports.MaxHeap = MaxHeap;\n","const { Heap } = require('./src/heap');\nconst { MinHeap } = require('./src/minHeap');\nconst { MaxHeap } = require('./src/maxHeap');\n\nexports.Heap = Heap;\nexports.MinHeap = MinHeap;\nexports.MaxHeap = MaxHeap;\n","/**\n * @copyright 2020 Eyas Ranjous \n * @license MIT\n */\n\nconst { Heap, MinHeap } = require('@datastructures-js/heap');\n\nconst getMinCompare = (getCompareValue) => (a, b) => {\n const aVal = typeof getCompareValue === 'function' ? getCompareValue(a) : a;\n const bVal = typeof getCompareValue === 'function' ? getCompareValue(b) : b;\n return aVal <= bVal ? -1 : 1;\n};\n\n/**\n * @class MinPriorityQueue\n */\nclass MinPriorityQueue {\n constructor(getCompareValue, _heap) {\n if (getCompareValue && typeof getCompareValue !== 'function') {\n throw new Error('MinPriorityQueue constructor requires a callback for object values');\n }\n this._heap = _heap || new MinHeap(getCompareValue);\n }\n\n /**\n * Returns an element with highest priority in the queue\n * @public\n * @returns {number|string|object}\n */\n front() {\n return this._heap.root();\n }\n\n /**\n * Returns an element with lowest priority in the queue\n * @public\n * @returns {number|string|object}\n */\n back() {\n return this._heap.leaf();\n }\n\n /**\n * Adds a value to the queue\n * @public\n * @param {number|string|object} value\n * @returns {MinPriorityQueue}\n */\n enqueue(value) {\n return this._heap.insert(value);\n }\n\n /**\n * Adds a value to the queue\n * @public\n * @param {number|string|object} value\n * @returns {MinPriorityQueue}\n */\n push(value) {\n return this.enqueue(value);\n }\n\n /**\n * Removes and returns an element with highest priority in the queue\n * @public\n * @returns {number|string|object}\n */\n dequeue() {\n return this._heap.extractRoot();\n }\n\n /**\n * Removes and returns an element with highest priority in the queue\n * @public\n * @returns {number|string|object}\n */\n pop() {\n return this.dequeue();\n }\n\n /**\n * Removes all elements that match a criteria in the callback\n * @public\n * @param {function} cb\n * @returns {array}\n */\n remove(cb) {\n if (typeof cb !== 'function') {\n throw new Error('MinPriorityQueue remove expects a callback');\n }\n\n const removed = [];\n const dequeued = [];\n while (!this.isEmpty()) {\n const popped = this.pop();\n if (cb(popped)) {\n removed.push(popped);\n } else {\n dequeued.push(popped);\n }\n }\n\n dequeued.forEach((val) => this.push(val));\n return removed;\n }\n\n /**\n * Returns the number of elements in the queue\n * @public\n * @returns {number}\n */\n size() {\n return this._heap.size();\n }\n\n /**\n * Checks if the queue is empty\n * @public\n * @returns {boolean}\n */\n isEmpty() {\n return this._heap.isEmpty();\n }\n\n /**\n * Clears the queue\n * @public\n */\n clear() {\n this._heap.clear();\n }\n\n /**\n * Returns a sorted list of elements from highest to lowest priority\n * @public\n * @returns {array}\n */\n toArray() {\n return this._heap.clone().sort().reverse();\n }\n\n /**\n * Implements an iterable on the min priority queue\n * @public\n */\n [Symbol.iterator]() {\n let size = this.size();\n return {\n next: () => {\n size -= 1;\n return {\n value: this.pop(),\n done: size === -1\n };\n }\n };\n }\n\n /**\n * Creates a priority queue from an existing array\n * @public\n * @static\n * @returns {MinPriorityQueue}\n */\n static fromArray(values, getCompareValue) {\n const heap = new Heap(getMinCompare(getCompareValue), values);\n return new MinPriorityQueue(\n getCompareValue,\n new MinHeap(getCompareValue, heap).fix()\n );\n }\n}\n\nexports.MinPriorityQueue = MinPriorityQueue;\n","/**\n * @copyright 2020 Eyas Ranjous \n * @license MIT\n */\n\nconst { Heap, MaxHeap } = require('@datastructures-js/heap');\n\nconst getMaxCompare = (getCompareValue) => (a, b) => {\n const aVal = typeof getCompareValue === 'function' ? getCompareValue(a) : a;\n const bVal = typeof getCompareValue === 'function' ? getCompareValue(b) : b;\n return aVal < bVal ? 1 : -1;\n};\n\n/**\n * @class MaxPriorityQueue\n * @extends MaxHeap\n */\nclass MaxPriorityQueue {\n constructor(getCompareValue, _heap) {\n if (getCompareValue && typeof getCompareValue !== 'function') {\n throw new Error('MaxPriorityQueue constructor requires a callback for object values');\n }\n this._heap = _heap || new MaxHeap(getCompareValue);\n }\n\n /**\n * Returns an element with highest priority in the queue\n * @public\n * @returns {number|string|object}\n */\n front() {\n return this._heap.root();\n }\n\n /**\n * Returns an element with lowest priority in the queue\n * @public\n * @returns {number|string|object}\n */\n back() {\n return this._heap.leaf();\n }\n\n /**\n * Adds a value to the queue\n * @public\n * @param {number|string|object} value\n * @returns {MaxPriorityQueue}\n */\n enqueue(value) {\n return this._heap.insert(value);\n }\n\n /**\n * Adds a value to the queue\n * @public\n * @param {number|string|object} value\n * @returns {MaxPriorityQueue}\n */\n push(value) {\n return this.enqueue(value);\n }\n\n /**\n * Removes and returns an element with highest priority in the queue\n * @public\n * @returns {number|string|object}\n */\n dequeue() {\n return this._heap.extractRoot();\n }\n\n /**\n * Removes and returns an element with highest priority in the queue\n * @public\n * @returns {number|string|object}\n */\n pop() {\n return this.dequeue();\n }\n\n /**\n * Removes all elements that match a criteria in the callback\n * @public\n * @param {function} cb\n * @returns {array}\n */\n remove(cb) {\n if (typeof cb !== 'function') {\n throw new Error('MaxPriorityQueue remove expects a callback');\n }\n\n const removed = [];\n const dequeued = [];\n while (!this.isEmpty()) {\n const popped = this.pop();\n if (cb(popped)) {\n removed.push(popped);\n } else {\n dequeued.push(popped);\n }\n }\n\n dequeued.forEach((val) => this.push(val));\n return removed;\n }\n\n /**\n * Returns the number of elements in the queue\n * @public\n * @returns {number}\n */\n size() {\n return this._heap.size();\n }\n\n /**\n * Checks if the queue is empty\n * @public\n * @returns {boolean}\n */\n isEmpty() {\n return this._heap.isEmpty();\n }\n\n /**\n * Clears the queue\n * @public\n */\n clear() {\n this._heap.clear();\n }\n\n /**\n * Returns a sorted list of elements from highest to lowest priority\n * @public\n * @returns {array}\n */\n toArray() {\n return this._heap.clone().sort().reverse();\n }\n\n /**\n * Implements an iterable on the min priority queue\n * @public\n */\n [Symbol.iterator]() {\n let size = this.size();\n return {\n next: () => {\n size -= 1;\n return {\n value: this.pop(),\n done: size === -1\n };\n }\n };\n }\n\n /**\n * Creates a priority queue from an existing array\n * @public\n * @static\n * @returns {MaxPriorityQueue}\n */\n static fromArray(values, getCompareValue) {\n const heap = new Heap(getMaxCompare(getCompareValue), values);\n return new MaxPriorityQueue(\n getCompareValue,\n new MaxHeap(getCompareValue, heap).fix()\n );\n }\n}\n\nexports.MaxPriorityQueue = MaxPriorityQueue;\n","/**\n * @copyright 2020 Eyas Ranjous \n * @license MIT\n */\n\nconst { Heap } = require('@datastructures-js/heap');\n\n/**\n * @class PriorityQueue\n */\nclass PriorityQueue {\n /**\n * Creates a priority queue\n * @params {function} compare\n */\n constructor(compare, _values) {\n if (typeof compare !== 'function') {\n throw new Error('PriorityQueue constructor expects a compare function');\n }\n this._heap = new Heap(compare, _values);\n if (_values) {\n this._heap.fix();\n }\n }\n\n /**\n * Returns an element with highest priority in the queue\n * @public\n * @returns {number|string|object}\n */\n front() {\n return this._heap.root();\n }\n\n /**\n * Returns an element with lowest priority in the queue\n * @public\n * @returns {number|string|object}\n */\n back() {\n return this._heap.leaf();\n }\n\n /**\n * Adds a value to the queue\n * @public\n * @param {number|string|object} value\n * @returns {PriorityQueue}\n */\n enqueue(value) {\n return this._heap.insert(value);\n }\n\n /**\n * Adds a value to the queue\n * @public\n * @param {number|string|object} value\n * @returns {PriorityQueue}\n */\n push(value) {\n return this.enqueue(value);\n }\n\n /**\n * Removes and returns an element with highest priority in the queue\n * @public\n * @returns {number|string|object}\n */\n dequeue() {\n return this._heap.extractRoot();\n }\n\n /**\n * Removes and returns an element with highest priority in the queue\n * @public\n * @returns {number|string|object}\n */\n pop() {\n return this.dequeue();\n }\n\n /**\n * Removes all elements that match a criteria in the callback\n * @public\n * @param {function} cb\n * @returns {array}\n */\n remove(cb) {\n if (typeof cb !== 'function') {\n throw new Error('PriorityQueue remove expects a callback');\n }\n\n const removed = [];\n const dequeued = [];\n while (!this.isEmpty()) {\n const popped = this.pop();\n if (cb(popped)) {\n removed.push(popped);\n } else {\n dequeued.push(popped);\n }\n }\n\n dequeued.forEach((val) => this.push(val));\n return removed;\n }\n\n /**\n * Returns the number of elements in the queue\n * @public\n * @returns {number}\n */\n size() {\n return this._heap.size();\n }\n\n /**\n * Checks if the queue is empty\n * @public\n * @returns {boolean}\n */\n isEmpty() {\n return this._heap.isEmpty();\n }\n\n /**\n * Clears the queue\n * @public\n */\n clear() {\n this._heap.clear();\n }\n\n /**\n * Returns a sorted list of elements from highest to lowest priority\n * @public\n * @returns {array}\n */\n toArray() {\n return this._heap.clone().sort().reverse();\n }\n\n /**\n * Implements an iterable on the priority queue\n * @public\n */\n [Symbol.iterator]() {\n let size = this.size();\n return {\n next: () => {\n size -= 1;\n return {\n value: this.pop(),\n done: size === -1\n };\n }\n };\n }\n\n /**\n * Creates a priority queue from an existing array\n * @public\n * @static\n * @returns {PriorityQueue}\n */\n static fromArray(values, compare) {\n return new PriorityQueue(compare, values);\n }\n}\n\nexports.PriorityQueue = PriorityQueue;\n","const { MinPriorityQueue } = require('./src/minPriorityQueue');\nconst { MaxPriorityQueue } = require('./src/maxPriorityQueue');\nconst { PriorityQueue } = require('./src/priorityQueue')\n\nmodule.exports = { MinPriorityQueue, MaxPriorityQueue, PriorityQueue };\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Move = exports.MoveType = void 0;\nconst priority_queue_1 = require(\"@datastructures-js/priority-queue\");\nconst types_1 = require(\"./types\");\nvar MoveType;\n(function (MoveType) {\n MoveType[MoveType[\"AdvanceBoth\"] = 1] = \"AdvanceBoth\";\n MoveType[MoveType[\"DeleteLeft\"] = 2] = \"DeleteLeft\";\n MoveType[MoveType[\"InsertRight\"] = 3] = \"InsertRight\";\n MoveType[MoveType[\"Change\"] = 4] = \"Change\";\n})(MoveType = exports.MoveType || (exports.MoveType = {}));\nconst Costs = new Map();\nCosts.set(MoveType.AdvanceBoth, 0);\nCosts.set(MoveType.Change, 1.0);\nCosts.set(MoveType.InsertRight, 2.0);\nCosts.set(MoveType.DeleteLeft, 2.0);\nclass Move {\n constructor(position, moveType) {\n this.moveType = moveType;\n this.lNode = position.lNode;\n this.rNode = position.rNode;\n const cost = Costs.get(moveType);\n if (cost === undefined)\n throw Error(`No cost for ${moveType}`);\n this.cost = cost;\n }\n}\nexports.Move = Move;\nfunction positionKey(position) {\n return `${position.lNode},${position.rNode}`;\n}\nfunction moveTypeName(moveType) {\n switch (moveType) {\n case MoveType.AdvanceBoth:\n return 'advance both';\n case MoveType.DeleteLeft:\n return 'delete left';\n case MoveType.InsertRight:\n return 'insert right';\n case MoveType.Change:\n return 'change';\n }\n}\n/**\n * Start with the graph state (-1, -1) of each Diagram.\n * Enqueue moves from the inital state.\n * Pull the lowest cost move from the queue\n * If the known cost to the new location is undefined, or if the cost via this move is less than the known cost\n * Store the step to the new state\n * Store the total cost as the minimum cost\n * Enqueue the possible next moves\n */\nfunction diff(baseDiagram, headDiagram, diffOptions = {}) {\n var _a, _b;\n const buildActions = (diagram) => {\n const result = [];\n const collectAction = (action) => {\n result.push(action);\n action.children.forEach((child) => collectAction(child));\n };\n diagram.rootActions.forEach((action) => collectAction(action));\n return result;\n };\n const lActions = buildActions(baseDiagram);\n const rActions = buildActions(headDiagram);\n const advance = (diagram, action) => {\n if (action < diagram.length)\n return action + 1;\n };\n const advanceBoth = (move) => {\n const [lNode, rNode] = [advance(lActions, move.lNode), advance(rActions, move.rNode)];\n if (lNode === undefined || rNode === undefined)\n return;\n const lDigest = digestOf(lActions, lNode);\n const rDigest = digestOf(rActions, rNode);\n // Advancing both is only a legal move if both resulting actions have the same digest.\n if (lDigest !== rDigest)\n return;\n return new Move({\n lNode: lNode,\n rNode: rNode,\n }, MoveType.AdvanceBoth);\n };\n const change = (move) => {\n var _a, _b, _c, _d;\n const [lNode, rNode] = [advance(lActions, move.lNode), advance(rActions, move.rNode)];\n // The change can't move beyond the bounds of the graph.\n if (lNode === undefined || rNode === undefined)\n return;\n // The change needs to originate from the same actor.\n if (((_a = (0, types_1.actionActors)(lActions[move.lNode])[0]) === null || _a === void 0 ? void 0 : _a.id) !== ((_b = (0, types_1.actionActors)(rActions[move.rNode])[0]) === null || _b === void 0 ? void 0 : _b.id))\n return;\n // The change cannot change the type of the node.\n if (((_c = lActions[lNode]) === null || _c === void 0 ? void 0 : _c.nodeType) !== ((_d = rActions[rNode]) === null || _d === void 0 ? void 0 : _d.nodeType))\n return;\n return new Move({\n lNode: lNode,\n rNode: rNode,\n }, MoveType.Change);\n };\n const deleteLeft = (move) => {\n const lNode = advance(lActions, move.lNode);\n if (lNode === undefined)\n return;\n return new Move({ lNode: lNode, rNode: move.rNode }, MoveType.DeleteLeft);\n };\n const insertRight = (move) => {\n const rNode = advance(rActions, move.rNode);\n if (rNode === undefined)\n return;\n return new Move({\n lNode: move.lNode,\n rNode: rNode,\n }, MoveType.InsertRight);\n };\n const digestOf = (actions, action) => {\n if (action === -1)\n return 'head';\n else if (action === actions.length)\n return 'tail';\n else\n return actions[action].digest;\n };\n /**\n * Possible moves are:\n * - If both nodes have the same digest, advance both nodes.\n * - If nodes have non-equal digest\n * The left node is a removal\n * The right node is an insertion\n */\n const possibleMoves = (move) => {\n return [advanceBoth(move), change(move), deleteLeft(move), insertRight(move)].filter(Boolean);\n };\n const pq = new priority_queue_1.MinPriorityQueue((entry) => entry.cost);\n const distances = new Map();\n const stateMoves = new Map();\n const statePreceding = new Map();\n const initialState = { lNode: -1, rNode: -1, moveType: MoveType.AdvanceBoth };\n possibleMoves(initialState).forEach((position) => pq.enqueue({ position, preceding: initialState, cost: position.cost }));\n while (!pq.isEmpty()) {\n const { position, preceding, cost: totalCost } = pq.dequeue();\n if (!position)\n throw Error('next position not found');\n if (position.lNode === lActions.length && position.rNode === rActions.length)\n break;\n if (distances.get(positionKey(position)) === undefined ||\n totalCost < distances.get(positionKey(position))) {\n if (diffOptions.verbose) {\n console.log(moveTypeName(position.moveType) +\n ` from ${(0, types_1.nodeName)(lActions[preceding.lNode])}, ${(_a = rActions[preceding.rNode]) === null || _a === void 0 ? void 0 : _a.name} to ${(0, types_1.nodeName)(lActions[position.lNode])}, ${(_b = rActions[position.rNode]) === null || _b === void 0 ? void 0 : _b.name}`);\n console.log(`Min cost to ${positionKey(position)} is ${totalCost} via ${moveTypeName(position.moveType)} from ${positionKey(preceding)}`);\n }\n distances.set(positionKey(position), totalCost);\n stateMoves.set(positionKey(position), position.moveType);\n if (preceding)\n statePreceding.set(positionKey(position), positionKey(preceding));\n possibleMoves(position).forEach((newPosition) => pq.enqueue({\n position: newPosition,\n preceding: position,\n cost: totalCost + newPosition.cost,\n }));\n }\n }\n const moves = [];\n {\n let reachedState = [lActions.length - 1, rActions.length - 1].join(',');\n while (reachedState !== '-1,-1') {\n if (!reachedState)\n throw Error('reachedState not found');\n const [lNode, rNode] = reachedState.split(',').map(Number);\n const move = stateMoves.get(reachedState);\n const state = { lNode: lNode, rNode: rNode, moveType: move };\n moves.push(state);\n reachedState = statePreceding.get(reachedState);\n }\n }\n return { baseActions: lActions, headActions: rActions, moves: moves.reverse() };\n}\nexports.default = diff;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst diff_1 = require(\"./diff\");\nconst types_1 = require(\"./types\");\nfunction cloneAction(action) {\n const parent = action.parent;\n const children = action.children;\n const subtreeDigest = action.subtreeDigest;\n action.parent = undefined;\n action.children = [];\n action.subtreeDigest = 'unknown';\n const result = JSON.parse(JSON.stringify(action));\n action.parent = parent;\n action.children = children;\n action.subtreeDigest = subtreeDigest;\n return result;\n}\nfunction buildDiffDiagram(diff) {\n const diffActionsByAction = new Map();\n const buildActions = (state) => {\n const lAction = diff.baseActions[state.lNode];\n const rAction = diff.headActions[state.rNode];\n switch (state.moveType) {\n case diff_1.MoveType.AdvanceBoth: {\n const action = cloneAction(rAction);\n if (rAction.parent) {\n const parent = diffActionsByAction.get(rAction.parent);\n parent === null || parent === void 0 ? void 0 : parent.children.push(action);\n action.parent = parent;\n }\n diffActionsByAction.set(rAction, action);\n diffActionsByAction.set(lAction, action);\n return action;\n }\n case diff_1.MoveType.Change: {\n const action = cloneAction(rAction);\n action.diffMode = types_1.DiffMode.Change;\n action.formerName = (0, types_1.nodeName)(lAction);\n action.formerResult = (0, types_1.nodeResult)(lAction);\n if (rAction.parent) {\n const parent = diffActionsByAction.get(rAction.parent);\n parent === null || parent === void 0 ? void 0 : parent.children.push(action);\n action.parent = parent;\n }\n diffActionsByAction.set(rAction, action);\n diffActionsByAction.set(lAction, action);\n return action;\n }\n case diff_1.MoveType.DeleteLeft: {\n const action = cloneAction(lAction);\n action.diffMode = types_1.DiffMode.Delete;\n action.digest = ['delete', action.digest].join(':');\n // The parent of a deleted action is the cloned action of:\n //\n // a) If the deleted action is a child of a deleted action, the deleted action's parent.\n // Append to the children.\n // b) If the deleted action is not a child of a deleted action, the Head equivalent of the\n // deleted action's parent.\n // Case a)\n const deletedActionsParent = () => {\n if (!lAction.parent)\n return undefined;\n return diffActionsByAction.get(lAction.parent);\n };\n // Case b)\n const headEquivalentOfDeletedActionsParent = () => {\n if (!(rAction === null || rAction === void 0 ? void 0 : rAction.parent))\n return undefined;\n return diffActionsByAction.get(rAction.parent);\n };\n const parent = deletedActionsParent() || headEquivalentOfDeletedActionsParent();\n if (parent) {\n parent.children.splice(parent.children.length, 0, action);\n action.parent = parent;\n }\n diffActionsByAction.set(lAction, action);\n return action;\n }\n case diff_1.MoveType.InsertRight: {\n const action = cloneAction(rAction);\n action.diffMode = types_1.DiffMode.Insert;\n if (rAction.parent) {\n const parent = diffActionsByAction.get(rAction.parent);\n parent === null || parent === void 0 ? void 0 : parent.children.push(action);\n action.parent = parent;\n }\n diffActionsByAction.set(rAction, action);\n return action;\n }\n }\n };\n const actions = diff.moves.map((state) => buildActions(state));\n const uniqueActorIds = new Set();\n const actors = [];\n actions\n .map((action) => (0, types_1.actionActors)(action))\n .flat()\n .filter(Boolean)\n .forEach((actor) => {\n if (!actor)\n throw Error('actor not found');\n if (!uniqueActorIds.has(actor.id)) {\n uniqueActorIds.add(actor.id);\n actors.push(actor);\n }\n });\n actors.sort((a, b) => a.order - b.order);\n const rootActions = actions.filter((action) => !action.parent);\n return {\n actors,\n rootActions,\n };\n}\nexports.default = buildDiffDiagram;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst types_1 = require(\"./types\");\nfunction unparseDiagram(diagramData) {\n const diagram = diagramData;\n const actors = new Map();\n diagram.actors.forEach((actor) => actors.set(actor.id, actor));\n const resolveActors = (action) => {\n if (action.caller)\n action.caller = actors.get(action.caller);\n if (action.callee)\n action.callee = actors.get(action.callee);\n if (action.children)\n action.children.forEach((child) => resolveActors(child));\n };\n diagram.rootActions.forEach((action) => (0, types_1.setParent)(action));\n diagram.rootActions.forEach((action) => resolveActors(action));\n return diagram;\n}\nexports.default = unparseDiagram;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst types_1 = require(\"./types\");\nfunction validateDiagram(diagramData) {\n return __awaiter(this, void 0, void 0, function* () {\n // Check if it's likely an AppMap object\n if (diagramData &&\n Object.prototype.hasOwnProperty.call(diagramData, 'metadata') &&\n Object.prototype.hasOwnProperty.call(diagramData, 'classMap') &&\n Object.prototype.hasOwnProperty.call(diagramData, 'events')) {\n return types_1.ValidationResult.AppMap;\n }\n if (!Array.isArray(diagramData.actors) || !Array.isArray(diagramData.rootActions)) {\n console.error('Invalid Diagram: actors and rootActions must be arrays.');\n return types_1.ValidationResult.Invalid;\n }\n const validateActor = (actor) => {\n if (typeof actor.id !== 'string' ||\n typeof actor.name !== 'string' ||\n typeof actor.order !== 'number') {\n console.error('Invalid Actor:', actor);\n return false;\n }\n return true;\n };\n const validateAction = (action) => {\n if (!action ||\n !Object.values(types_1.NodeType).includes(action.nodeType) ||\n typeof action.digest !== 'string' ||\n typeof action.subtreeDigest !== 'string' ||\n !Array.isArray(action.children) ||\n !Array.isArray(action.eventIds)) {\n console.error('Invalid Action:', action);\n return false;\n }\n // Validate children recursively\n for (const child of action.children) {\n if (!validateAction(child)) {\n return false;\n }\n }\n // Validate specific nodeType cases\n if ((0, types_1.isLoop)(action) && typeof action.count !== 'number') {\n console.error('Invalid Loop:', action);\n return false;\n }\n if (((0, types_1.isFunction)(action) || (0, types_1.isServerRPC)(action) || (0, types_1.isClientRPC)(action) || (0, types_1.isQuery)(action)) &&\n typeof action.callee !== 'string') {\n console.error(`Invalid ${types_1.NodeType[action.nodeType]}:`, action);\n return false;\n }\n return true;\n };\n for (const actor of diagramData.actors) {\n if (!validateActor(actor)) {\n return types_1.ValidationResult.Invalid;\n }\n }\n for (const action of diagramData.rootActions) {\n if (!validateAction(action)) {\n return types_1.ValidationResult.Invalid;\n }\n }\n return types_1.ValidationResult.Valid;\n });\n}\nexports.default = validateDiagram;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.format = exports.extension = void 0;\nexports.extension = '.json';\nfunction filterFields(key, value) {\n if (key === 'parent')\n return;\n if (value === undefined)\n return;\n if (['caller', 'callee'].includes(key))\n return value.id;\n return value;\n}\nfunction format(diagram) {\n return JSON.stringify(diagram, filterFields, 2);\n}\nexports.format = format;\n","export default function Diff() {}\n\nDiff.prototype = {\n diff(oldString, newString, options = {}) {\n let callback = options.callback;\n if (typeof options === 'function') {\n callback = options;\n options = {};\n }\n this.options = options;\n\n let self = this;\n\n function done(value) {\n if (callback) {\n setTimeout(function() { callback(undefined, value); }, 0);\n return true;\n } else {\n return value;\n }\n }\n\n // Allow subclasses to massage the input prior to running\n oldString = this.castInput(oldString);\n newString = this.castInput(newString);\n\n oldString = this.removeEmpty(this.tokenize(oldString));\n newString = this.removeEmpty(this.tokenize(newString));\n\n let newLen = newString.length, oldLen = oldString.length;\n let editLength = 1;\n let maxEditLength = newLen + oldLen;\n if(options.maxEditLength) {\n maxEditLength = Math.min(maxEditLength, options.maxEditLength);\n }\n\n let bestPath = [{ newPos: -1, components: [] }];\n\n // Seed editLength = 0, i.e. the content starts with the same values\n let oldPos = this.extractCommon(bestPath[0], newString, oldString, 0);\n if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) {\n // Identity per the equality and tokenizer\n return done([{value: this.join(newString), count: newString.length}]);\n }\n\n // Main worker method. checks all permutations of a given edit length for acceptance.\n function execEditLength() {\n for (let diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) {\n let basePath;\n let addPath = bestPath[diagonalPath - 1],\n removePath = bestPath[diagonalPath + 1],\n oldPos = (removePath ? removePath.newPos : 0) - diagonalPath;\n if (addPath) {\n // No one else is going to attempt to use this value, clear it\n bestPath[diagonalPath - 1] = undefined;\n }\n\n let canAdd = addPath && addPath.newPos + 1 < newLen,\n canRemove = removePath && 0 <= oldPos && oldPos < oldLen;\n if (!canAdd && !canRemove) {\n // If this path is a terminal then prune\n bestPath[diagonalPath] = undefined;\n continue;\n }\n\n // Select the diagonal that we want to branch from. We select the prior\n // path whose position in the new string is the farthest from the origin\n // and does not pass the bounds of the diff graph\n if (!canAdd || (canRemove && addPath.newPos < removePath.newPos)) {\n basePath = clonePath(removePath);\n self.pushComponent(basePath.components, undefined, true);\n } else {\n basePath = addPath; // No need to clone, we've pulled it from the list\n basePath.newPos++;\n self.pushComponent(basePath.components, true, undefined);\n }\n\n oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath);\n\n // If we have hit the end of both strings, then we are done\n if (basePath.newPos + 1 >= newLen && oldPos + 1 >= oldLen) {\n return done(buildValues(self, basePath.components, newString, oldString, self.useLongestToken));\n } else {\n // Otherwise track this path as a potential candidate and continue.\n bestPath[diagonalPath] = basePath;\n }\n }\n\n editLength++;\n }\n\n // Performs the length of edit iteration. Is a bit fugly as this has to support the\n // sync and async mode which is never fun. Loops over execEditLength until a value\n // is produced, or until the edit length exceeds options.maxEditLength (if given),\n // in which case it will return undefined.\n if (callback) {\n (function exec() {\n setTimeout(function() {\n if (editLength > maxEditLength) {\n return callback();\n }\n\n if (!execEditLength()) {\n exec();\n }\n }, 0);\n }());\n } else {\n while (editLength <= maxEditLength) {\n let ret = execEditLength();\n if (ret) {\n return ret;\n }\n }\n }\n },\n\n pushComponent(components, added, removed) {\n let last = components[components.length - 1];\n if (last && last.added === added && last.removed === removed) {\n // We need to clone here as the component clone operation is just\n // as shallow array clone\n components[components.length - 1] = {count: last.count + 1, added: added, removed: removed };\n } else {\n components.push({count: 1, added: added, removed: removed });\n }\n },\n extractCommon(basePath, newString, oldString, diagonalPath) {\n let newLen = newString.length,\n oldLen = oldString.length,\n newPos = basePath.newPos,\n oldPos = newPos - diagonalPath,\n\n commonCount = 0;\n while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) {\n newPos++;\n oldPos++;\n commonCount++;\n }\n\n if (commonCount) {\n basePath.components.push({count: commonCount});\n }\n\n basePath.newPos = newPos;\n return oldPos;\n },\n\n equals(left, right) {\n if (this.options.comparator) {\n return this.options.comparator(left, right);\n } else {\n return left === right\n || (this.options.ignoreCase && left.toLowerCase() === right.toLowerCase());\n }\n },\n removeEmpty(array) {\n let ret = [];\n for (let i = 0; i < array.length; i++) {\n if (array[i]) {\n ret.push(array[i]);\n }\n }\n return ret;\n },\n castInput(value) {\n return value;\n },\n tokenize(value) {\n return value.split('');\n },\n join(chars) {\n return chars.join('');\n }\n};\n\nfunction buildValues(diff, components, newString, oldString, useLongestToken) {\n let componentPos = 0,\n componentLen = components.length,\n newPos = 0,\n oldPos = 0;\n\n for (; componentPos < componentLen; componentPos++) {\n let component = components[componentPos];\n if (!component.removed) {\n if (!component.added && useLongestToken) {\n let value = newString.slice(newPos, newPos + component.count);\n value = value.map(function(value, i) {\n let oldValue = oldString[oldPos + i];\n return oldValue.length > value.length ? oldValue : value;\n });\n\n component.value = diff.join(value);\n } else {\n component.value = diff.join(newString.slice(newPos, newPos + component.count));\n }\n newPos += component.count;\n\n // Common case\n if (!component.added) {\n oldPos += component.count;\n }\n } else {\n component.value = diff.join(oldString.slice(oldPos, oldPos + component.count));\n oldPos += component.count;\n\n // Reverse add and remove so removes are output first to match common convention\n // The diffing algorithm is tied to add then remove output and this is the simplest\n // route to get the desired output with minimal overhead.\n if (componentPos && components[componentPos - 1].added) {\n let tmp = components[componentPos - 1];\n components[componentPos - 1] = components[componentPos];\n components[componentPos] = tmp;\n }\n }\n }\n\n // Special case handle for when one terminal is ignored (i.e. whitespace).\n // For this case we merge the terminal into the prior string and drop the change.\n // This is only available for string mode.\n let lastComponent = components[componentLen - 1];\n if (componentLen > 1\n && typeof lastComponent.value === 'string'\n && (lastComponent.added || lastComponent.removed)\n && diff.equals('', lastComponent.value)) {\n components[componentLen - 2].value += lastComponent.value;\n components.pop();\n }\n\n return components;\n}\n\nfunction clonePath(path) {\n return { newPos: path.newPos, components: path.components.slice(0) };\n}\n","import Diff from './base';\n\nexport const characterDiff = new Diff();\nexport function diffChars(oldStr, newStr, options) { return characterDiff.diff(oldStr, newStr, options); }\n","export function generateOptions(options, defaults) {\n if (typeof options === 'function') {\n defaults.callback = options;\n } else if (options) {\n for (let name in options) {\n /* istanbul ignore else */\n if (options.hasOwnProperty(name)) {\n defaults[name] = options[name];\n }\n }\n }\n return defaults;\n}\n","import Diff from './base';\nimport {generateOptions} from '../util/params';\n\n// Based on https://en.wikipedia.org/wiki/Latin_script_in_Unicode\n//\n// Ranges and exceptions:\n// Latin-1 Supplement, 0080–00FF\n// - U+00D7 × Multiplication sign\n// - U+00F7 ÷ Division sign\n// Latin Extended-A, 0100–017F\n// Latin Extended-B, 0180–024F\n// IPA Extensions, 0250–02AF\n// Spacing Modifier Letters, 02B0–02FF\n// - U+02C7 ˇ ˇ Caron\n// - U+02D8 ˘ ˘ Breve\n// - U+02D9 ˙ ˙ Dot Above\n// - U+02DA ˚ ˚ Ring Above\n// - U+02DB ˛ ˛ Ogonek\n// - U+02DC ˜ ˜ Small Tilde\n// - U+02DD ˝ ˝ Double Acute Accent\n// Latin Extended Additional, 1E00–1EFF\nconst extendedWordChars = /^[a-zA-Z\\u{C0}-\\u{FF}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}]+$/u;\n\nconst reWhitespace = /\\S/;\n\nexport const wordDiff = new Diff();\nwordDiff.equals = function(left, right) {\n if (this.options.ignoreCase) {\n left = left.toLowerCase();\n right = right.toLowerCase();\n }\n return left === right || (this.options.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right));\n};\nwordDiff.tokenize = function(value) {\n // All whitespace symbols except newline group into one token, each newline - in separate token\n let tokens = value.split(/([^\\S\\r\\n]+|[()[\\]{}'\"\\r\\n]|\\b)/);\n\n // Join the boundary splits that we do not consider to be boundaries. This is primarily the extended Latin character set.\n for (let i = 0; i < tokens.length - 1; i++) {\n // If we have an empty string in the next field and we have only word chars before and after, merge\n if (!tokens[i + 1] && tokens[i + 2]\n && extendedWordChars.test(tokens[i])\n && extendedWordChars.test(tokens[i + 2])) {\n tokens[i] += tokens[i + 2];\n tokens.splice(i + 1, 2);\n i--;\n }\n }\n\n return tokens;\n};\n\nexport function diffWords(oldStr, newStr, options) {\n options = generateOptions(options, {ignoreWhitespace: true});\n return wordDiff.diff(oldStr, newStr, options);\n}\n\nexport function diffWordsWithSpace(oldStr, newStr, options) {\n return wordDiff.diff(oldStr, newStr, options);\n}\n","import Diff from './base';\nimport {generateOptions} from '../util/params';\n\nexport const lineDiff = new Diff();\nlineDiff.tokenize = function(value) {\n let retLines = [],\n linesAndNewlines = value.split(/(\\n|\\r\\n)/);\n\n // Ignore the final empty token that occurs if the string ends with a new line\n if (!linesAndNewlines[linesAndNewlines.length - 1]) {\n linesAndNewlines.pop();\n }\n\n // Merge the content and line separators into single tokens\n for (let i = 0; i < linesAndNewlines.length; i++) {\n let line = linesAndNewlines[i];\n\n if (i % 2 && !this.options.newlineIsToken) {\n retLines[retLines.length - 1] += line;\n } else {\n if (this.options.ignoreWhitespace) {\n line = line.trim();\n }\n retLines.push(line);\n }\n }\n\n return retLines;\n};\n\nexport function diffLines(oldStr, newStr, callback) { return lineDiff.diff(oldStr, newStr, callback); }\nexport function diffTrimmedLines(oldStr, newStr, callback) {\n let options = generateOptions(callback, {ignoreWhitespace: true});\n return lineDiff.diff(oldStr, newStr, options);\n}\n","import Diff from './base';\n\n\nexport const sentenceDiff = new Diff();\nsentenceDiff.tokenize = function(value) {\n return value.split(/(\\S.+?[.!?])(?=\\s+|$)/);\n};\n\nexport function diffSentences(oldStr, newStr, callback) { return sentenceDiff.diff(oldStr, newStr, callback); }\n","import Diff from './base';\n\nexport const cssDiff = new Diff();\ncssDiff.tokenize = function(value) {\n return value.split(/([{}:;,]|\\s+)/);\n};\n\nexport function diffCss(oldStr, newStr, callback) { return cssDiff.diff(oldStr, newStr, callback); }\n","import Diff from './base';\nimport {lineDiff} from './line';\n\nconst objectPrototypeToString = Object.prototype.toString;\n\n\nexport const jsonDiff = new Diff();\n// Discriminate between two lines of pretty-printed, serialized JSON where one of them has a\n// dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output:\njsonDiff.useLongestToken = true;\n\njsonDiff.tokenize = lineDiff.tokenize;\njsonDiff.castInput = function(value) {\n const {undefinedReplacement, stringifyReplacer = (k, v) => typeof v === 'undefined' ? undefinedReplacement : v} = this.options;\n\n return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, ' ');\n};\njsonDiff.equals = function(left, right) {\n return Diff.prototype.equals.call(jsonDiff, left.replace(/,([\\r\\n])/g, '$1'), right.replace(/,([\\r\\n])/g, '$1'));\n};\n\nexport function diffJson(oldObj, newObj, options) { return jsonDiff.diff(oldObj, newObj, options); }\n\n// This function handles the presence of circular references by bailing out when encountering an\n// object that is already on the \"stack\" of items being processed. Accepts an optional replacer\nexport function canonicalize(obj, stack, replacementStack, replacer, key) {\n stack = stack || [];\n replacementStack = replacementStack || [];\n\n if (replacer) {\n obj = replacer(key, obj);\n }\n\n let i;\n\n for (i = 0; i < stack.length; i += 1) {\n if (stack[i] === obj) {\n return replacementStack[i];\n }\n }\n\n let canonicalizedObj;\n\n if ('[object Array]' === objectPrototypeToString.call(obj)) {\n stack.push(obj);\n canonicalizedObj = new Array(obj.length);\n replacementStack.push(canonicalizedObj);\n for (i = 0; i < obj.length; i += 1) {\n canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key);\n }\n stack.pop();\n replacementStack.pop();\n return canonicalizedObj;\n }\n\n if (obj && obj.toJSON) {\n obj = obj.toJSON();\n }\n\n if (typeof obj === 'object' && obj !== null) {\n stack.push(obj);\n canonicalizedObj = {};\n replacementStack.push(canonicalizedObj);\n let sortedKeys = [],\n key;\n for (key in obj) {\n /* istanbul ignore else */\n if (obj.hasOwnProperty(key)) {\n sortedKeys.push(key);\n }\n }\n sortedKeys.sort();\n for (i = 0; i < sortedKeys.length; i += 1) {\n key = sortedKeys[i];\n canonicalizedObj[key] = canonicalize(obj[key], stack, replacementStack, replacer, key);\n }\n stack.pop();\n replacementStack.pop();\n } else {\n canonicalizedObj = obj;\n }\n return canonicalizedObj;\n}\n","import Diff from './base';\n\nexport const arrayDiff = new Diff();\narrayDiff.tokenize = function(value) {\n return value.slice();\n};\narrayDiff.join = arrayDiff.removeEmpty = function(value) {\n return value;\n};\n\nexport function diffArrays(oldArr, newArr, callback) { return arrayDiff.diff(oldArr, newArr, callback); }\n","export function parsePatch(uniDiff, options = {}) {\n let diffstr = uniDiff.split(/\\r\\n|[\\n\\v\\f\\r\\x85]/),\n delimiters = uniDiff.match(/\\r\\n|[\\n\\v\\f\\r\\x85]/g) || [],\n list = [],\n i = 0;\n\n function parseIndex() {\n let index = {};\n list.push(index);\n\n // Parse diff metadata\n while (i < diffstr.length) {\n let line = diffstr[i];\n\n // File header found, end parsing diff metadata\n if ((/^(\\-\\-\\-|\\+\\+\\+|@@)\\s/).test(line)) {\n break;\n }\n\n // Diff index\n let header = (/^(?:Index:|diff(?: -r \\w+)+)\\s+(.+?)\\s*$/).exec(line);\n if (header) {\n index.index = header[1];\n }\n\n i++;\n }\n\n // Parse file headers if they are defined. Unified diff requires them, but\n // there's no technical issues to have an isolated hunk without file header\n parseFileHeader(index);\n parseFileHeader(index);\n\n // Parse hunks\n index.hunks = [];\n\n while (i < diffstr.length) {\n let line = diffstr[i];\n\n if ((/^(Index:|diff|\\-\\-\\-|\\+\\+\\+)\\s/).test(line)) {\n break;\n } else if ((/^@@/).test(line)) {\n index.hunks.push(parseHunk());\n } else if (line && options.strict) {\n // Ignore unexpected content unless in strict mode\n throw new Error('Unknown line ' + (i + 1) + ' ' + JSON.stringify(line));\n } else {\n i++;\n }\n }\n }\n\n // Parses the --- and +++ headers, if none are found, no lines\n // are consumed.\n function parseFileHeader(index) {\n const fileHeader = (/^(---|\\+\\+\\+)\\s+(.*)$/).exec(diffstr[i]);\n if (fileHeader) {\n let keyPrefix = fileHeader[1] === '---' ? 'old' : 'new';\n const data = fileHeader[2].split('\\t', 2);\n let fileName = data[0].replace(/\\\\\\\\/g, '\\\\');\n if ((/^\".*\"$/).test(fileName)) {\n fileName = fileName.substr(1, fileName.length - 2);\n }\n index[keyPrefix + 'FileName'] = fileName;\n index[keyPrefix + 'Header'] = (data[1] || '').trim();\n\n i++;\n }\n }\n\n // Parses a hunk\n // This assumes that we are at the start of a hunk.\n function parseHunk() {\n let chunkHeaderIndex = i,\n chunkHeaderLine = diffstr[i++],\n chunkHeader = chunkHeaderLine.split(/@@ -(\\d+)(?:,(\\d+))? \\+(\\d+)(?:,(\\d+))? @@/);\n\n let hunk = {\n oldStart: +chunkHeader[1],\n oldLines: typeof chunkHeader[2] === 'undefined' ? 1 : +chunkHeader[2],\n newStart: +chunkHeader[3],\n newLines: typeof chunkHeader[4] === 'undefined' ? 1 : +chunkHeader[4],\n lines: [],\n linedelimiters: []\n };\n\n // Unified Diff Format quirk: If the chunk size is 0,\n // the first number is one lower than one would expect.\n // https://www.artima.com/weblogs/viewpost.jsp?thread=164293\n if (hunk.oldLines === 0) {\n hunk.oldStart += 1;\n }\n if (hunk.newLines === 0) {\n hunk.newStart += 1;\n }\n\n let addCount = 0,\n removeCount = 0;\n for (; i < diffstr.length; i++) {\n // Lines starting with '---' could be mistaken for the \"remove line\" operation\n // But they could be the header for the next file. Therefore prune such cases out.\n if (diffstr[i].indexOf('--- ') === 0\n && (i + 2 < diffstr.length)\n && diffstr[i + 1].indexOf('+++ ') === 0\n && diffstr[i + 2].indexOf('@@') === 0) {\n break;\n }\n let operation = (diffstr[i].length == 0 && i != (diffstr.length - 1)) ? ' ' : diffstr[i][0];\n\n if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\\\') {\n hunk.lines.push(diffstr[i]);\n hunk.linedelimiters.push(delimiters[i] || '\\n');\n\n if (operation === '+') {\n addCount++;\n } else if (operation === '-') {\n removeCount++;\n } else if (operation === ' ') {\n addCount++;\n removeCount++;\n }\n } else {\n break;\n }\n }\n\n // Handle the empty block count case\n if (!addCount && hunk.newLines === 1) {\n hunk.newLines = 0;\n }\n if (!removeCount && hunk.oldLines === 1) {\n hunk.oldLines = 0;\n }\n\n // Perform optional sanity checking\n if (options.strict) {\n if (addCount !== hunk.newLines) {\n throw new Error('Added line count did not match for hunk at line ' + (chunkHeaderIndex + 1));\n }\n if (removeCount !== hunk.oldLines) {\n throw new Error('Removed line count did not match for hunk at line ' + (chunkHeaderIndex + 1));\n }\n }\n\n return hunk;\n }\n\n while (i < diffstr.length) {\n parseIndex();\n }\n\n return list;\n}\n","// Iterator that traverses in the range of [min, max], stepping\n// by distance from a given start position. I.e. for [0, 4], with\n// start of 2, this will iterate 2, 3, 1, 4, 0.\nexport default function(start, minLine, maxLine) {\n let wantForward = true,\n backwardExhausted = false,\n forwardExhausted = false,\n localOffset = 1;\n\n return function iterator() {\n if (wantForward && !forwardExhausted) {\n if (backwardExhausted) {\n localOffset++;\n } else {\n wantForward = false;\n }\n\n // Check if trying to fit beyond text length, and if not, check it fits\n // after offset location (or desired location on first iteration)\n if (start + localOffset <= maxLine) {\n return localOffset;\n }\n\n forwardExhausted = true;\n }\n\n if (!backwardExhausted) {\n if (!forwardExhausted) {\n wantForward = true;\n }\n\n // Check if trying to fit before text beginning, and if not, check it fits\n // before offset location\n if (minLine <= start - localOffset) {\n return -localOffset++;\n }\n\n backwardExhausted = true;\n return iterator();\n }\n\n // We tried to fit hunk before text beginning and beyond text length, then\n // hunk can't fit on the text. Return undefined\n };\n}\n","import {parsePatch} from './parse';\nimport distanceIterator from '../util/distance-iterator';\n\nexport function applyPatch(source, uniDiff, options = {}) {\n if (typeof uniDiff === 'string') {\n uniDiff = parsePatch(uniDiff);\n }\n\n if (Array.isArray(uniDiff)) {\n if (uniDiff.length > 1) {\n throw new Error('applyPatch only works with a single input.');\n }\n\n uniDiff = uniDiff[0];\n }\n\n // Apply the diff to the input\n let lines = source.split(/\\r\\n|[\\n\\v\\f\\r\\x85]/),\n delimiters = source.match(/\\r\\n|[\\n\\v\\f\\r\\x85]/g) || [],\n hunks = uniDiff.hunks,\n\n compareLine = options.compareLine || ((lineNumber, line, operation, patchContent) => line === patchContent),\n errorCount = 0,\n fuzzFactor = options.fuzzFactor || 0,\n minLine = 0,\n offset = 0,\n\n removeEOFNL,\n addEOFNL;\n\n /**\n * Checks if the hunk exactly fits on the provided location\n */\n function hunkFits(hunk, toPos) {\n for (let j = 0; j < hunk.lines.length; j++) {\n let line = hunk.lines[j],\n operation = (line.length > 0 ? line[0] : ' '),\n content = (line.length > 0 ? line.substr(1) : line);\n\n if (operation === ' ' || operation === '-') {\n // Context sanity check\n if (!compareLine(toPos + 1, lines[toPos], operation, content)) {\n errorCount++;\n\n if (errorCount > fuzzFactor) {\n return false;\n }\n }\n toPos++;\n }\n }\n\n return true;\n }\n\n // Search best fit offsets for each hunk based on the previous ones\n for (let i = 0; i < hunks.length; i++) {\n let hunk = hunks[i],\n maxLine = lines.length - hunk.oldLines,\n localOffset = 0,\n toPos = offset + hunk.oldStart - 1;\n\n let iterator = distanceIterator(toPos, minLine, maxLine);\n\n for (; localOffset !== undefined; localOffset = iterator()) {\n if (hunkFits(hunk, toPos + localOffset)) {\n hunk.offset = offset += localOffset;\n break;\n }\n }\n\n if (localOffset === undefined) {\n return false;\n }\n\n // Set lower text limit to end of the current hunk, so next ones don't try\n // to fit over already patched text\n minLine = hunk.offset + hunk.oldStart + hunk.oldLines;\n }\n\n // Apply patch hunks\n let diffOffset = 0;\n for (let i = 0; i < hunks.length; i++) {\n let hunk = hunks[i],\n toPos = hunk.oldStart + hunk.offset + diffOffset - 1;\n diffOffset += hunk.newLines - hunk.oldLines;\n\n for (let j = 0; j < hunk.lines.length; j++) {\n let line = hunk.lines[j],\n operation = (line.length > 0 ? line[0] : ' '),\n content = (line.length > 0 ? line.substr(1) : line),\n delimiter = hunk.linedelimiters[j];\n\n if (operation === ' ') {\n toPos++;\n } else if (operation === '-') {\n lines.splice(toPos, 1);\n delimiters.splice(toPos, 1);\n /* istanbul ignore else */\n } else if (operation === '+') {\n lines.splice(toPos, 0, content);\n delimiters.splice(toPos, 0, delimiter);\n toPos++;\n } else if (operation === '\\\\') {\n let previousOperation = hunk.lines[j - 1] ? hunk.lines[j - 1][0] : null;\n if (previousOperation === '+') {\n removeEOFNL = true;\n } else if (previousOperation === '-') {\n addEOFNL = true;\n }\n }\n }\n }\n\n // Handle EOFNL insertion/removal\n if (removeEOFNL) {\n while (!lines[lines.length - 1]) {\n lines.pop();\n delimiters.pop();\n }\n } else if (addEOFNL) {\n lines.push('');\n delimiters.push('\\n');\n }\n for (let _k = 0; _k < lines.length - 1; _k++) {\n lines[_k] = lines[_k] + delimiters[_k];\n }\n return lines.join('');\n}\n\n// Wrapper that supports multiple file patches via callbacks.\nexport function applyPatches(uniDiff, options) {\n if (typeof uniDiff === 'string') {\n uniDiff = parsePatch(uniDiff);\n }\n\n let currentIndex = 0;\n function processIndex() {\n let index = uniDiff[currentIndex++];\n if (!index) {\n return options.complete();\n }\n\n options.loadFile(index, function(err, data) {\n if (err) {\n return options.complete(err);\n }\n\n let updatedContent = applyPatch(data, index, options);\n options.patched(index, updatedContent, function(err) {\n if (err) {\n return options.complete(err);\n }\n\n processIndex();\n });\n });\n }\n processIndex();\n}\n","import {diffLines} from '../diff/line';\n\nexport function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {\n if (!options) {\n options = {};\n }\n if (typeof options.context === 'undefined') {\n options.context = 4;\n }\n\n const diff = diffLines(oldStr, newStr, options);\n if(!diff) {\n return;\n }\n\n diff.push({value: '', lines: []}); // Append an empty value to make cleanup easier\n\n function contextLines(lines) {\n return lines.map(function(entry) { return ' ' + entry; });\n }\n\n let hunks = [];\n let oldRangeStart = 0, newRangeStart = 0, curRange = [],\n oldLine = 1, newLine = 1;\n for (let i = 0; i < diff.length; i++) {\n const current = diff[i],\n lines = current.lines || current.value.replace(/\\n$/, '').split('\\n');\n current.lines = lines;\n\n if (current.added || current.removed) {\n // If we have previous context, start with that\n if (!oldRangeStart) {\n const prev = diff[i - 1];\n oldRangeStart = oldLine;\n newRangeStart = newLine;\n\n if (prev) {\n curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : [];\n oldRangeStart -= curRange.length;\n newRangeStart -= curRange.length;\n }\n }\n\n // Output our changes\n curRange.push(... lines.map(function(entry) {\n return (current.added ? '+' : '-') + entry;\n }));\n\n // Track the updated file position\n if (current.added) {\n newLine += lines.length;\n } else {\n oldLine += lines.length;\n }\n } else {\n // Identical context lines. Track line changes\n if (oldRangeStart) {\n // Close out any changes that have been output (or join overlapping)\n if (lines.length <= options.context * 2 && i < diff.length - 2) {\n // Overlapping\n curRange.push(... contextLines(lines));\n } else {\n // end the range and output\n let contextSize = Math.min(lines.length, options.context);\n curRange.push(... contextLines(lines.slice(0, contextSize)));\n\n let hunk = {\n oldStart: oldRangeStart,\n oldLines: (oldLine - oldRangeStart + contextSize),\n newStart: newRangeStart,\n newLines: (newLine - newRangeStart + contextSize),\n lines: curRange\n };\n if (i >= diff.length - 2 && lines.length <= options.context) {\n // EOF is inside this hunk\n let oldEOFNewline = ((/\\n$/).test(oldStr));\n let newEOFNewline = ((/\\n$/).test(newStr));\n let noNlBeforeAdds = lines.length == 0 && curRange.length > hunk.oldLines;\n if (!oldEOFNewline && noNlBeforeAdds && oldStr.length > 0) {\n // special case: old has no eol and no trailing context; no-nl can end up before adds\n // however, if the old file is empty, do not output the no-nl line\n curRange.splice(hunk.oldLines, 0, '\\\\ No newline at end of file');\n }\n if ((!oldEOFNewline && !noNlBeforeAdds) || !newEOFNewline) {\n curRange.push('\\\\ No newline at end of file');\n }\n }\n hunks.push(hunk);\n\n oldRangeStart = 0;\n newRangeStart = 0;\n curRange = [];\n }\n }\n oldLine += lines.length;\n newLine += lines.length;\n }\n }\n\n return {\n oldFileName: oldFileName, newFileName: newFileName,\n oldHeader: oldHeader, newHeader: newHeader,\n hunks: hunks\n };\n}\n\nexport function formatPatch(diff) {\n const ret = [];\n if (diff.oldFileName == diff.newFileName) {\n ret.push('Index: ' + diff.oldFileName);\n }\n ret.push('===================================================================');\n ret.push('--- ' + diff.oldFileName + (typeof diff.oldHeader === 'undefined' ? '' : '\\t' + diff.oldHeader));\n ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\\t' + diff.newHeader));\n\n for (let i = 0; i < diff.hunks.length; i++) {\n const hunk = diff.hunks[i];\n // Unified Diff Format quirk: If the chunk size is 0,\n // the first number is one lower than one would expect.\n // https://www.artima.com/weblogs/viewpost.jsp?thread=164293\n if (hunk.oldLines === 0) {\n hunk.oldStart -= 1;\n }\n if (hunk.newLines === 0) {\n hunk.newStart -= 1;\n }\n ret.push(\n '@@ -' + hunk.oldStart + ',' + hunk.oldLines\n + ' +' + hunk.newStart + ',' + hunk.newLines\n + ' @@'\n );\n ret.push.apply(ret, hunk.lines);\n }\n\n return ret.join('\\n') + '\\n';\n}\n\nexport function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {\n return formatPatch(structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options));\n}\n\nexport function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) {\n return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options);\n}\n","export function arrayEqual(a, b) {\n if (a.length !== b.length) {\n return false;\n }\n\n return arrayStartsWith(a, b);\n}\n\nexport function arrayStartsWith(array, start) {\n if (start.length > array.length) {\n return false;\n }\n\n for (let i = 0; i < start.length; i++) {\n if (start[i] !== array[i]) {\n return false;\n }\n }\n\n return true;\n}\n","import {structuredPatch} from './create';\nimport {parsePatch} from './parse';\n\nimport {arrayEqual, arrayStartsWith} from '../util/array';\n\nexport function calcLineCount(hunk) {\n const {oldLines, newLines} = calcOldNewLineCount(hunk.lines);\n\n if (oldLines !== undefined) {\n hunk.oldLines = oldLines;\n } else {\n delete hunk.oldLines;\n }\n\n if (newLines !== undefined) {\n hunk.newLines = newLines;\n } else {\n delete hunk.newLines;\n }\n}\n\nexport function merge(mine, theirs, base) {\n mine = loadPatch(mine, base);\n theirs = loadPatch(theirs, base);\n\n let ret = {};\n\n // For index we just let it pass through as it doesn't have any necessary meaning.\n // Leaving sanity checks on this to the API consumer that may know more about the\n // meaning in their own context.\n if (mine.index || theirs.index) {\n ret.index = mine.index || theirs.index;\n }\n\n if (mine.newFileName || theirs.newFileName) {\n if (!fileNameChanged(mine)) {\n // No header or no change in ours, use theirs (and ours if theirs does not exist)\n ret.oldFileName = theirs.oldFileName || mine.oldFileName;\n ret.newFileName = theirs.newFileName || mine.newFileName;\n ret.oldHeader = theirs.oldHeader || mine.oldHeader;\n ret.newHeader = theirs.newHeader || mine.newHeader;\n } else if (!fileNameChanged(theirs)) {\n // No header or no change in theirs, use ours\n ret.oldFileName = mine.oldFileName;\n ret.newFileName = mine.newFileName;\n ret.oldHeader = mine.oldHeader;\n ret.newHeader = mine.newHeader;\n } else {\n // Both changed... figure it out\n ret.oldFileName = selectField(ret, mine.oldFileName, theirs.oldFileName);\n ret.newFileName = selectField(ret, mine.newFileName, theirs.newFileName);\n ret.oldHeader = selectField(ret, mine.oldHeader, theirs.oldHeader);\n ret.newHeader = selectField(ret, mine.newHeader, theirs.newHeader);\n }\n }\n\n ret.hunks = [];\n\n let mineIndex = 0,\n theirsIndex = 0,\n mineOffset = 0,\n theirsOffset = 0;\n\n while (mineIndex < mine.hunks.length || theirsIndex < theirs.hunks.length) {\n let mineCurrent = mine.hunks[mineIndex] || {oldStart: Infinity},\n theirsCurrent = theirs.hunks[theirsIndex] || {oldStart: Infinity};\n\n if (hunkBefore(mineCurrent, theirsCurrent)) {\n // This patch does not overlap with any of the others, yay.\n ret.hunks.push(cloneHunk(mineCurrent, mineOffset));\n mineIndex++;\n theirsOffset += mineCurrent.newLines - mineCurrent.oldLines;\n } else if (hunkBefore(theirsCurrent, mineCurrent)) {\n // This patch does not overlap with any of the others, yay.\n ret.hunks.push(cloneHunk(theirsCurrent, theirsOffset));\n theirsIndex++;\n mineOffset += theirsCurrent.newLines - theirsCurrent.oldLines;\n } else {\n // Overlap, merge as best we can\n let mergedHunk = {\n oldStart: Math.min(mineCurrent.oldStart, theirsCurrent.oldStart),\n oldLines: 0,\n newStart: Math.min(mineCurrent.newStart + mineOffset, theirsCurrent.oldStart + theirsOffset),\n newLines: 0,\n lines: []\n };\n mergeLines(mergedHunk, mineCurrent.oldStart, mineCurrent.lines, theirsCurrent.oldStart, theirsCurrent.lines);\n theirsIndex++;\n mineIndex++;\n\n ret.hunks.push(mergedHunk);\n }\n }\n\n return ret;\n}\n\nfunction loadPatch(param, base) {\n if (typeof param === 'string') {\n if ((/^@@/m).test(param) || ((/^Index:/m).test(param))) {\n return parsePatch(param)[0];\n }\n\n if (!base) {\n throw new Error('Must provide a base reference or pass in a patch');\n }\n return structuredPatch(undefined, undefined, base, param);\n }\n\n return param;\n}\n\nfunction fileNameChanged(patch) {\n return patch.newFileName && patch.newFileName !== patch.oldFileName;\n}\n\nfunction selectField(index, mine, theirs) {\n if (mine === theirs) {\n return mine;\n } else {\n index.conflict = true;\n return {mine, theirs};\n }\n}\n\nfunction hunkBefore(test, check) {\n return test.oldStart < check.oldStart\n && (test.oldStart + test.oldLines) < check.oldStart;\n}\n\nfunction cloneHunk(hunk, offset) {\n return {\n oldStart: hunk.oldStart, oldLines: hunk.oldLines,\n newStart: hunk.newStart + offset, newLines: hunk.newLines,\n lines: hunk.lines\n };\n}\n\nfunction mergeLines(hunk, mineOffset, mineLines, theirOffset, theirLines) {\n // This will generally result in a conflicted hunk, but there are cases where the context\n // is the only overlap where we can successfully merge the content here.\n let mine = {offset: mineOffset, lines: mineLines, index: 0},\n their = {offset: theirOffset, lines: theirLines, index: 0};\n\n // Handle any leading content\n insertLeading(hunk, mine, their);\n insertLeading(hunk, their, mine);\n\n // Now in the overlap content. Scan through and select the best changes from each.\n while (mine.index < mine.lines.length && their.index < their.lines.length) {\n let mineCurrent = mine.lines[mine.index],\n theirCurrent = their.lines[their.index];\n\n if ((mineCurrent[0] === '-' || mineCurrent[0] === '+')\n && (theirCurrent[0] === '-' || theirCurrent[0] === '+')) {\n // Both modified ...\n mutualChange(hunk, mine, their);\n } else if (mineCurrent[0] === '+' && theirCurrent[0] === ' ') {\n // Mine inserted\n hunk.lines.push(... collectChange(mine));\n } else if (theirCurrent[0] === '+' && mineCurrent[0] === ' ') {\n // Theirs inserted\n hunk.lines.push(... collectChange(their));\n } else if (mineCurrent[0] === '-' && theirCurrent[0] === ' ') {\n // Mine removed or edited\n removal(hunk, mine, their);\n } else if (theirCurrent[0] === '-' && mineCurrent[0] === ' ') {\n // Their removed or edited\n removal(hunk, their, mine, true);\n } else if (mineCurrent === theirCurrent) {\n // Context identity\n hunk.lines.push(mineCurrent);\n mine.index++;\n their.index++;\n } else {\n // Context mismatch\n conflict(hunk, collectChange(mine), collectChange(their));\n }\n }\n\n // Now push anything that may be remaining\n insertTrailing(hunk, mine);\n insertTrailing(hunk, their);\n\n calcLineCount(hunk);\n}\n\nfunction mutualChange(hunk, mine, their) {\n let myChanges = collectChange(mine),\n theirChanges = collectChange(their);\n\n if (allRemoves(myChanges) && allRemoves(theirChanges)) {\n // Special case for remove changes that are supersets of one another\n if (arrayStartsWith(myChanges, theirChanges)\n && skipRemoveSuperset(their, myChanges, myChanges.length - theirChanges.length)) {\n hunk.lines.push(... myChanges);\n return;\n } else if (arrayStartsWith(theirChanges, myChanges)\n && skipRemoveSuperset(mine, theirChanges, theirChanges.length - myChanges.length)) {\n hunk.lines.push(... theirChanges);\n return;\n }\n } else if (arrayEqual(myChanges, theirChanges)) {\n hunk.lines.push(... myChanges);\n return;\n }\n\n conflict(hunk, myChanges, theirChanges);\n}\n\nfunction removal(hunk, mine, their, swap) {\n let myChanges = collectChange(mine),\n theirChanges = collectContext(their, myChanges);\n if (theirChanges.merged) {\n hunk.lines.push(... theirChanges.merged);\n } else {\n conflict(hunk, swap ? theirChanges : myChanges, swap ? myChanges : theirChanges);\n }\n}\n\nfunction conflict(hunk, mine, their) {\n hunk.conflict = true;\n hunk.lines.push({\n conflict: true,\n mine: mine,\n theirs: their\n });\n}\n\nfunction insertLeading(hunk, insert, their) {\n while (insert.offset < their.offset && insert.index < insert.lines.length) {\n let line = insert.lines[insert.index++];\n hunk.lines.push(line);\n insert.offset++;\n }\n}\nfunction insertTrailing(hunk, insert) {\n while (insert.index < insert.lines.length) {\n let line = insert.lines[insert.index++];\n hunk.lines.push(line);\n }\n}\n\nfunction collectChange(state) {\n let ret = [],\n operation = state.lines[state.index][0];\n while (state.index < state.lines.length) {\n let line = state.lines[state.index];\n\n // Group additions that are immediately after subtractions and treat them as one \"atomic\" modify change.\n if (operation === '-' && line[0] === '+') {\n operation = '+';\n }\n\n if (operation === line[0]) {\n ret.push(line);\n state.index++;\n } else {\n break;\n }\n }\n\n return ret;\n}\nfunction collectContext(state, matchChanges) {\n let changes = [],\n merged = [],\n matchIndex = 0,\n contextChanges = false,\n conflicted = false;\n while (matchIndex < matchChanges.length\n && state.index < state.lines.length) {\n let change = state.lines[state.index],\n match = matchChanges[matchIndex];\n\n // Once we've hit our add, then we are done\n if (match[0] === '+') {\n break;\n }\n\n contextChanges = contextChanges || change[0] !== ' ';\n\n merged.push(match);\n matchIndex++;\n\n // Consume any additions in the other block as a conflict to attempt\n // to pull in the remaining context after this\n if (change[0] === '+') {\n conflicted = true;\n\n while (change[0] === '+') {\n changes.push(change);\n change = state.lines[++state.index];\n }\n }\n\n if (match.substr(1) === change.substr(1)) {\n changes.push(change);\n state.index++;\n } else {\n conflicted = true;\n }\n }\n\n if ((matchChanges[matchIndex] || '')[0] === '+'\n && contextChanges) {\n conflicted = true;\n }\n\n if (conflicted) {\n return changes;\n }\n\n while (matchIndex < matchChanges.length) {\n merged.push(matchChanges[matchIndex++]);\n }\n\n return {\n merged,\n changes\n };\n}\n\nfunction allRemoves(changes) {\n return changes.reduce(function(prev, change) {\n return prev && change[0] === '-';\n }, true);\n}\nfunction skipRemoveSuperset(state, removeChanges, delta) {\n for (let i = 0; i < delta; i++) {\n let changeContent = removeChanges[removeChanges.length - delta + i].substr(1);\n if (state.lines[state.index + i] !== ' ' + changeContent) {\n return false;\n }\n }\n\n state.index += delta;\n return true;\n}\n\nfunction calcOldNewLineCount(lines) {\n let oldLines = 0;\n let newLines = 0;\n\n lines.forEach(function(line) {\n if (typeof line !== 'string') {\n let myCount = calcOldNewLineCount(line.mine);\n let theirCount = calcOldNewLineCount(line.theirs);\n\n if (oldLines !== undefined) {\n if (myCount.oldLines === theirCount.oldLines) {\n oldLines += myCount.oldLines;\n } else {\n oldLines = undefined;\n }\n }\n\n if (newLines !== undefined) {\n if (myCount.newLines === theirCount.newLines) {\n newLines += myCount.newLines;\n } else {\n newLines = undefined;\n }\n }\n } else {\n if (newLines !== undefined && (line[0] === '+' || line[0] === ' ')) {\n newLines++;\n }\n if (oldLines !== undefined && (line[0] === '-' || line[0] === ' ')) {\n oldLines++;\n }\n }\n });\n\n return {oldLines, newLines};\n}\n","// See: http://code.google.com/p/google-diff-match-patch/wiki/API\nexport function convertChangesToDMP(changes) {\n let ret = [],\n change,\n operation;\n for (let i = 0; i < changes.length; i++) {\n change = changes[i];\n if (change.added) {\n operation = 1;\n } else if (change.removed) {\n operation = -1;\n } else {\n operation = 0;\n }\n\n ret.push([operation, change.value]);\n }\n return ret;\n}\n","export function convertChangesToXML(changes) {\n let ret = [];\n for (let i = 0; i < changes.length; i++) {\n let change = changes[i];\n if (change.added) {\n ret.push('');\n } else if (change.removed) {\n ret.push('');\n }\n\n ret.push(escapeHTML(change.value));\n\n if (change.added) {\n ret.push('');\n } else if (change.removed) {\n ret.push('');\n }\n }\n return ret.join('');\n}\n\nfunction escapeHTML(s) {\n let n = s;\n n = n.replace(/&/g, '&');\n n = n.replace(//g, '>');\n n = n.replace(/\"/g, '"');\n\n return n;\n}\n","/* See LICENSE file for terms of use */\n\n/*\n * Text diff implementation.\n *\n * This library supports the following APIS:\n * JsDiff.diffChars: Character by character diff\n * JsDiff.diffWords: Word (as defined by \\b regex) diff which ignores whitespace\n * JsDiff.diffLines: Line based diff\n *\n * JsDiff.diffCss: Diff targeted at CSS content\n *\n * These methods are based on the implementation proposed in\n * \"An O(ND) Difference Algorithm and its Variations\" (Myers, 1986).\n * http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.6927\n */\nimport Diff from './diff/base';\nimport {diffChars} from './diff/character';\nimport {diffWords, diffWordsWithSpace} from './diff/word';\nimport {diffLines, diffTrimmedLines} from './diff/line';\nimport {diffSentences} from './diff/sentence';\n\nimport {diffCss} from './diff/css';\nimport {diffJson, canonicalize} from './diff/json';\n\nimport {diffArrays} from './diff/array';\n\nimport {applyPatch, applyPatches} from './patch/apply';\nimport {parsePatch} from './patch/parse';\nimport {merge} from './patch/merge';\nimport {structuredPatch, createTwoFilesPatch, createPatch} from './patch/create';\n\nimport {convertChangesToDMP} from './convert/dmp';\nimport {convertChangesToXML} from './convert/xml';\n\nexport {\n Diff,\n\n diffChars,\n diffWords,\n diffWordsWithSpace,\n diffLines,\n diffTrimmedLines,\n diffSentences,\n\n diffCss,\n diffJson,\n\n diffArrays,\n\n structuredPatch,\n createTwoFilesPatch,\n createPatch,\n applyPatch,\n applyPatches,\n parsePatch,\n merge,\n convertChangesToDMP,\n convertChangesToXML,\n canonicalize\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.format = exports.extension = void 0;\nconst diff_1 = require(\"diff\");\nconst types_1 = require(\"../types\");\nconst DisplayCharLimit = 50;\nexports.extension = '.uml';\nfunction formatElapsed(elapsed, markupEnabled) {\n const timeStr = () => {\n return `${+(elapsed * 1000).toPrecision(3)} ms`;\n };\n if (markupEnabled)\n return ` ${timeStr()}`;\n else\n return `(${timeStr()})`;\n}\nfunction singleLine(str) {\n return str.replace(/\\n/g, '\\\\n').replace(/\\s{2,}/g, ' ');\n}\nclass Label {\n constructor(action) {\n this.action = action;\n }\n get actionNameIsTrimmed() {\n return (0, types_1.nodeName)(this.action).length > DisplayCharLimit;\n }\n requestLabel(markupEnabled) {\n const { action } = this;\n const label = singleLine((0, types_1.nodeName)(this.action)).slice(0, DisplayCharLimit);\n let formerLabel;\n if (action.formerName)\n formerLabel = singleLine(action.formerName).slice(0, DisplayCharLimit);\n const formattedLabel = this.formatDiffLabel(label, formerLabel);\n const tokens = [];\n // PlantUML / Creole doesn't successfully combine strikethrough with underline.\n // Only the underline ends up being rendered.\n if (markupEnabled && (0, types_1.isFunction)(action) && action.static && action.diffMode !== types_1.DiffMode.Delete)\n tokens.push('');\n tokens.push(formattedLabel);\n if (markupEnabled && (0, types_1.isFunction)(action) && action.static && action.diffMode !== types_1.DiffMode.Delete)\n tokens.push('');\n if (action.elapsed && action.diffMode !== types_1.DiffMode.Delete) {\n tokens.push(' ');\n tokens.push(formatElapsed(action.elapsed, markupEnabled));\n }\n return tokens.join('');\n }\n responseLabel(markupEnabled) {\n const response = actionResponse(this.action);\n if (!response)\n return;\n let label = (0, types_1.nodeResult)(this.action);\n if (!label)\n return;\n label = singleLine(label).slice(0, DisplayCharLimit);\n let formerLabel;\n if (this.action.formerResult)\n formerLabel = singleLine(this.action.formerResult).slice(0, DisplayCharLimit);\n const formattedLabel = this.formatDiffLabel(label, formerLabel);\n const tokens = [];\n if (markupEnabled && response.raisesException)\n tokens.push('');\n tokens.push(formattedLabel);\n if (markupEnabled && response.raisesException)\n tokens.push('');\n return tokens.join('');\n }\n note(foldLimit = 80) {\n const { action } = this;\n const label = fold((0, types_1.nodeName)(this.action), foldLimit);\n let formerLabel = [];\n if (action.formerName)\n formerLabel = fold(action.formerName, foldLimit);\n const result = [];\n for (let i = 0; i < Math.max(label.length, formerLabel.length); i += 1) {\n const line = this.formatDiffLabel(label[i], formerLabel[i]);\n result.push(line);\n }\n return result.join('\\n');\n }\n formatDiffLabel(label, formerLabel) {\n const tokens = [];\n const addedSegment = (text) => {\n tokens.push(``);\n tokens.push(text);\n tokens.push('');\n };\n const removedSegment = (text) => {\n tokens.push(`--`);\n tokens.push(text);\n tokens.push('--');\n };\n if (this.action.diffMode === types_1.DiffMode.Change && label && formerLabel && label !== formerLabel) {\n const diff = (0, diff_1.diffChars)(formerLabel, label);\n const changeCharsCount = diff.reduce((memo, change) => (change.added || change.removed ? memo + (change.count || 0) : memo), 0);\n if (changeCharsCount / Math.max(formerLabel.length, label.length) <\n Label.ChangedCharsThreshod) {\n for (const change of diff) {\n if (change.removed) {\n removedSegment(change.value);\n }\n else if (change.added) {\n addedSegment(change.value);\n }\n else {\n tokens.push(change.value);\n }\n }\n }\n else {\n removedSegment(formerLabel);\n tokens.push(' ');\n addedSegment(label);\n }\n }\n else if (this.action.diffMode && label && formerLabel && label === formerLabel) {\n tokens.push(label);\n }\n else if (label) {\n if (this.action.diffMode) {\n this.action.diffMode === types_1.DiffMode.Delete ? removedSegment(label) : addedSegment(label);\n }\n else {\n tokens.push(label);\n }\n }\n return tokens.join('');\n }\n}\nLabel.ChangedCharsThreshod = 0.25;\nLabel.GitHubDiffLightThemeRemovedColorBackground = '#FCECEA'; // [ 252, 236, 234 ];\nLabel.GitHubDiffLightThemeAddedColorBackground = '#EBFEEE'; // [ 235, 254, 238 ];\nLabel.GitHubDiffDarkThemeRemovedColorBackground = '#29201A'; // [ 41, 32, 26 ];\nLabel.GitHubDiffDarkThemeAddedColorBackground = '#172238'; // [ 23, 34, 56 ];\nLabel.RemovedColor = 'lightgray';\nLabel.AddedColor = 'lightgray';\nLabel.RemovedColorBackground = Label.GitHubDiffDarkThemeRemovedColorBackground;\nLabel.AddedColorBackground = Label.GitHubDiffDarkThemeAddedColorBackground;\nfunction actionResponse(action) {\n return (0, types_1.isFunction)(action)\n ? action.returnValue\n : (0, types_1.isServerRPC)(action) || (0, types_1.isClientRPC)(action)\n ? { status: action.status, raisesException: action.status >= 400 }\n : undefined;\n}\nfunction alias(id) {\n return id.replace(/[^a-zA-Z0-9]/g, '_');\n}\nfunction color(action, markupEnabled) {\n if (!markupEnabled)\n return;\n switch (action.diffMode) {\n case types_1.DiffMode.Delete:\n return 'red';\n case types_1.DiffMode.Insert:\n return 'green';\n case types_1.DiffMode.Change:\n return 'CA9C3F';\n }\n}\nfunction arrowColor(tail, head, action, markupEnabled) {\n let c = color(action, markupEnabled);\n if (c) {\n c = ['[#', c, ']'].join('');\n }\n return [tail, c, head].filter(Boolean).join('');\n}\nfunction fold(line, limit) {\n const output = [];\n let buffer = '';\n line\n .split('\\n')\n .map((line) => line.split(/\\s+/))\n .flat()\n .forEach((word) => {\n if (buffer.length === 0) {\n buffer += word;\n }\n else if (buffer.length + word.length < limit) {\n buffer += ' ';\n buffer += word;\n }\n else {\n output.push(buffer);\n buffer = word;\n }\n });\n output.push(buffer);\n return output;\n}\nconst requestArrow = (action, markupEnabled) => {\n const [caller, callee] = (0, types_1.actionActors)(action);\n let arrowTokens;\n if (caller && callee) {\n arrowTokens = { tail: '-', head: '>' };\n }\n else if (caller) {\n arrowTokens = { tail: '-', head: '>]' };\n }\n else {\n arrowTokens = { tail: '[-', head: '>' };\n }\n return arrowColor(arrowTokens.tail, arrowTokens.head, action, markupEnabled);\n};\nconst responseArrow = (action, markupEnabled) => {\n const [caller, callee] = (0, types_1.actionActors)(action);\n let arrowTokens;\n if (caller && callee) {\n arrowTokens = { head: '<', tail: '--' };\n }\n else if (caller) {\n arrowTokens = { head: '<', tail: '--]' };\n }\n else {\n arrowTokens = { head: '[<', tail: '--' };\n }\n return arrowColor(arrowTokens.head, arrowTokens.tail, action, markupEnabled);\n};\nclass EventLines {\n constructor() {\n this._indent = 1;\n this.lines = [];\n }\n indent() {\n this._indent += 1;\n }\n outdent() {\n this._indent -= 1;\n }\n printLeftAligned(...lines) {\n lines.forEach((line) => this.lines.push(line));\n }\n print(...lines) {\n lines.forEach((line) => this.lines.push([Array(this._indent).join(' '), line].join('')));\n }\n}\nfunction format(diagram, _source, options = {}) {\n const markupEnabled = options.disableMarkup !== true;\n const notesEnabled = options.disableNotes !== true;\n const events = new EventLines();\n const renderChildren = (action) => action.children.forEach((child) => renderAction(child));\n const renderAction = (action) => {\n events.indent();\n if ((0, types_1.isLoop)(action)) {\n const colorTag = color(action, markupEnabled) ? `#${color(action, markupEnabled)}` : '';\n let countStr = action.count.toString();\n if ((0, types_1.hasAncestor)(action, (action) => (0, types_1.isLoop)(action)))\n countStr = `~${countStr}`;\n const tokens = [`${countStr} times`];\n if (action.elapsed) {\n tokens.push(` ${formatElapsed(action.elapsed, markupEnabled)}`);\n }\n events.print(`Loop${colorTag} ${tokens.join('')}`);\n renderChildren(action);\n events.print(`End`);\n }\n else {\n const label = new Label(action);\n const actors = (0, types_1.actionActors)(action);\n {\n const incomingTokens = actors.map((actor) => (actor ? alias(actor.name) : ''));\n const arrow = requestArrow(action, markupEnabled);\n events.print([incomingTokens.join(arrow), label.requestLabel(markupEnabled)].join(': '));\n }\n {\n if (label.actionNameIsTrimmed && notesEnabled) {\n events.print('Note right');\n events.indent();\n events.printLeftAligned(label.note(80));\n events.outdent();\n events.print('End note');\n }\n }\n const response = actionResponse(action);\n const doActivate = response && actors[1];\n if (doActivate) {\n if (!actors[1])\n throw Error();\n events.print(`activate ${alias(actors[1].name)}`);\n }\n renderChildren(action);\n if (response) {\n const outgoingTokens = actors.map((actor) => (actor ? alias(actor.name) : ''));\n const arrow = responseArrow(action, markupEnabled);\n const responseLabel = label.responseLabel(markupEnabled);\n const tokens = [outgoingTokens.join(arrow)];\n if (responseLabel)\n tokens.push(responseLabel);\n events.print(tokens.join(': '));\n }\n if (doActivate) {\n if (!actors[1])\n throw Error();\n events.print(`deactivate ${alias(actors[1].name)}`);\n }\n }\n events.outdent();\n };\n diagram.rootActions.forEach((action) => renderAction(action));\n return `@startuml\n!includeurl https://raw.githubusercontent.com/getappmap/plantuml-theme/main/appmap-theme.puml\n${diagram.actors\n .map((actor) => `participant ${alias(actor.name)} as \"${singleLine(actor.name)}\"`)\n .join('\\n')}\n${events.lines.join('\\n')}\n@enduml`;\n}\nexports.format = format;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.format = exports.extension = void 0;\nconst types_1 = require(\"../types\");\nexports.extension = '.txt';\nfunction diffModeName(diffMode) {\n switch (diffMode) {\n case types_1.DiffMode.Change:\n return 'changed to';\n case types_1.DiffMode.Insert:\n return 'added';\n case types_1.DiffMode.Delete:\n return 'removed';\n }\n}\nfunction format(diagram, maxDepth = 4) {\n const lineCount = new Map();\n const lines = [];\n const describeChange = (action, depth = 1) => {\n if (depth > maxDepth)\n return;\n if (action.diffMode !== undefined) {\n const tokens = [];\n const actor = (0, types_1.actionActors)(action)[1];\n const normalizeName = (str) => {\n return str.replace(/\\n/g, ' ');\n };\n const qualifyAction = (str) => {\n if (!actor)\n return str;\n if ((0, types_1.isQuery)(action)) {\n return ['SQL', ['', str, ''].join('`')].join(' ');\n }\n else if ((0, types_1.isClientRPC)(action)) {\n return ['HTTP client request', ['', str, ''].join('`')].join(' ');\n }\n else if ((0, types_1.isServerRPC)(action)) {\n return ['HTTP server request', ['', str, ''].join('`')].join(' ');\n }\n else {\n const separator = (0, types_1.isFunction)(action) ? (action.static ? '.' : '#') : '#';\n return ['function call', ['', [actor.name, str].join(separator), ''].join('`')].join(' ');\n }\n };\n if (action.diffMode === types_1.DiffMode.Change) {\n const formerName = action.formerName\n ? qualifyAction(normalizeName(action.formerName))\n : undefined;\n const currentName = (0, types_1.nodeName)(action)\n ? qualifyAction(normalizeName((0, types_1.nodeName)(action)))\n : undefined;\n const formerResult = action.formerResult ? normalizeName(action.formerResult) : undefined;\n const currentResult = (0, types_1.nodeResult)(action) ? normalizeName((0, types_1.nodeResult)(action)) : undefined;\n if (formerName !== currentName) {\n tokens.push('changed');\n tokens.push(formerName || 'undefined');\n tokens.push('to');\n tokens.push(currentName || 'undefined');\n }\n if (formerResult !== currentResult) {\n if (tokens.length === 0) {\n tokens.push('changed');\n tokens.push(currentName || 'undefined');\n }\n else {\n tokens.push('and');\n tokens.push('changed');\n }\n tokens.push('to return');\n tokens.push(currentResult || 'undefined');\n tokens.push('instead of');\n tokens.push(formerResult || 'undefined');\n }\n }\n else {\n tokens.push(diffModeName(action.diffMode));\n tokens.push(qualifyAction(normalizeName((0, types_1.nodeName)(action))));\n }\n if (tokens.length > 0) {\n const message = [new Array(depth).join(' '), tokens.join(' ')].join('');\n if (lineCount.has(message)) {\n lineCount.set(message, lineCount.get(message) + 1);\n }\n else {\n lineCount.set(message, 1);\n lines.push(message);\n }\n }\n depth += 1;\n }\n action.children.forEach((child) => describeChange(child, depth));\n };\n diagram.rootActions.forEach((action) => describeChange(action));\n return lines\n .map((line) => {\n const count = lineCount.get(line);\n return count === 1 ? line : [`${count} times`, line].join(': ');\n })\n .join('\\n');\n}\nexports.format = format;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst types_1 = require(\"./types\");\nconst json = __importStar(require(\"./formatter/json\"));\nconst plantUML = __importStar(require(\"./formatter/plantUML\"));\nconst text = __importStar(require(\"./formatter/text\"));\nfunction format(formatType, diagram, source, options = {}) {\n switch (formatType) {\n case types_1.FormatType.JSON:\n return { extension: json.extension, diagram: json.format(diagram) };\n case types_1.FormatType.PlantUML:\n return { extension: plantUML.extension, diagram: plantUML.format(diagram, source, options) };\n case types_1.FormatType.Text:\n return { extension: text.extension, diagram: text.format(diagram) };\n }\n}\nexports.default = format;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nclass Priority {\n constructor() {\n this.patterns = [];\n this.priorityByCodeObjectGroupId = new Map();\n this.sequenceByCodeObjectGroupId = new Map();\n this.priorityByCodeObjectId = new Map();\n this.basePriority = 1;\n }\n enrollPattern(pattern) {\n this.patterns.push(pattern);\n this.priorityByCodeObjectGroupId.set(pattern, this.patterns.length * 1000);\n this.sequenceByCodeObjectGroupId.set(pattern, 0);\n }\n expandPattern(pattern, codeObjectIds) {\n const priority = this.priorityByCodeObjectGroupId.get(pattern);\n if (priority === undefined) {\n console.log(`No priority for pattern ${pattern}`);\n return;\n }\n codeObjectIds.forEach((id) => this.priorityByCodeObjectGroupId.set(id, priority));\n }\n setPriority(codeObjectId, priority) {\n this.priorityByCodeObjectGroupId.set(codeObjectId, priority);\n }\n priorityOf(codeObject) {\n let priority = this.priorityByCodeObjectId.get(codeObject.fqid);\n if (priority)\n return priority;\n const groupPriority = this.groupPriority(codeObject);\n let sequence = this.sequenceByCodeObjectGroupId.get(codeObject.fqid);\n if (sequence === undefined) {\n sequence = 0;\n this.sequenceByCodeObjectGroupId.set(codeObject.fqid, sequence);\n }\n else {\n sequence += 1;\n }\n priority = groupPriority.basePriority + sequence;\n this.priorityByCodeObjectId.set(codeObject.fqid, priority);\n return priority;\n }\n groupPriority(codeObject) {\n let co = codeObject;\n while (co) {\n const priority = this.priorityByCodeObjectGroupId.get(co.fqid);\n if (priority !== undefined)\n return { groupId: co.fqid, basePriority: priority };\n co = co.parent;\n }\n const basePriority = this.basePriority * 1000;\n this.basePriority += 1;\n this.priorityByCodeObjectGroupId.set(codeObject.fqid, basePriority);\n return { groupId: codeObject.fqid, basePriority: basePriority };\n }\n}\nexports.default = Priority;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst priority_1 = __importDefault(require(\"./priority\"));\nclass Specification {\n constructor(priority, includedCodeObjectIds, requiredCodeObjectIds) {\n this.priority = priority;\n this.includedCodeObjectIds = includedCodeObjectIds;\n this.requiredCodeObjectIds = requiredCodeObjectIds;\n this.loops = true;\n }\n get hasRequiredCodeObjects() {\n return this.requiredCodeObjectIds.size > 0;\n }\n priorityOf(codeObject) {\n return this.priority.priorityOf(codeObject);\n }\n isIncludedCodeObject(codeObject) {\n return Specification.matchCodeObject(this.includedCodeObjectIds, codeObject);\n }\n isRequiredCodeObject(codeObject) {\n return Specification.matchCodeObject(this.requiredCodeObjectIds, codeObject);\n }\n static build(appmap, options) {\n const excludeSet = new Set(options.exclude || []);\n const expandSet = new Set(options.expand || []);\n const includedCodeObjectIds = new Set();\n const hasNonPackageChildren = (co) => {\n if (co.type !== 'package')\n return true;\n return co.children.some((child) => child.type !== 'package');\n };\n const includeCodeObjects = (co) => {\n if (co.type === 'class' && co.packageObject && expandSet.has(co.packageObject.fqid)) {\n includedCodeObjectIds.add(co.fqid);\n co.children.forEach((child) => includeCodeObjects(child));\n }\n if (!this.DefaultActorTypes.includes(co.type))\n return;\n if (excludeSet.has(co.fqid))\n return;\n if (!expandSet.has(co.fqid) && hasNonPackageChildren(co))\n includedCodeObjectIds.add(co.fqid);\n co.children.forEach((child) => includeCodeObjects(child));\n };\n appmap.classMap.roots.forEach((root) => includeCodeObjects(root));\n const requiredCodeObjectIds = new Set(options.require || []);\n for (const coid of requiredCodeObjectIds) {\n includedCodeObjectIds.add(coid);\n }\n const priorityArg = options.priority || {};\n const priority = new priority_1.default();\n if (!Object.keys(priorityArg).includes('http:HTTP server requests'))\n priorityArg['http:HTTP server requests'] = 0;\n {\n const externalServices = [...includedCodeObjectIds]\n .filter((coid) => coid.split(':')[0] === 'external-service')\n .sort();\n externalServices.push('database:Database');\n for (let index = 0; index < externalServices.length; index++) {\n const service = externalServices[index];\n if (!Object.keys(priorityArg).includes(service))\n priorityArg[service] = (includedCodeObjectIds.size + index + 1) * 1000;\n }\n }\n Object.entries(priorityArg || {}).forEach((entry) => priority.setPriority(entry[0], entry[1]));\n const spec = new Specification(priority, includedCodeObjectIds, requiredCodeObjectIds);\n spec.loops = !!options.loops;\n return spec;\n }\n static matchCodeObject(codeObjectIds, codeObject) {\n let co = codeObject;\n while (co) {\n if (codeObjectIds.has(co.fqid)) {\n return co;\n }\n co = co.parent;\n }\n }\n}\nexports.default = Specification;\nSpecification.DefaultActorTypes = [\n 'package',\n 'database',\n 'http',\n 'external-service',\n];\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MoveType = exports.Move = exports.Specification = exports.format = exports.Formatters = exports.FormatType = exports.getActors = exports.validateDiagram = exports.unparseDiagram = exports.diff = exports.buildDiffDiagram = exports.buildDiagram = exports.ValidationResult = exports.hasAncestor = exports.findAncestor = exports.setParent = exports.parseRoute = exports.nodeResult = exports.nodeName = exports.actionActors = exports.isQuery = exports.isClientRPC = exports.isServerRPC = exports.isFunction = exports.isLoop = exports.DiffMode = exports.NodeType = void 0;\nvar NodeType;\n(function (NodeType) {\n NodeType[NodeType[\"Loop\"] = 1] = \"Loop\";\n NodeType[NodeType[\"Conditional\"] = 2] = \"Conditional\";\n NodeType[NodeType[\"Function\"] = 3] = \"Function\";\n NodeType[NodeType[\"ServerRPC\"] = 4] = \"ServerRPC\";\n NodeType[NodeType[\"ClientRPC\"] = 5] = \"ClientRPC\";\n NodeType[NodeType[\"Query\"] = 6] = \"Query\";\n})(NodeType = exports.NodeType || (exports.NodeType = {}));\nvar DiffMode;\n(function (DiffMode) {\n DiffMode[DiffMode[\"Insert\"] = 1] = \"Insert\";\n DiffMode[DiffMode[\"Delete\"] = 2] = \"Delete\";\n DiffMode[DiffMode[\"Change\"] = 3] = \"Change\";\n})(DiffMode = exports.DiffMode || (exports.DiffMode = {}));\nconst isLoop = (action) => action.nodeType === NodeType.Loop;\nexports.isLoop = isLoop;\nconst isFunction = (action) => action.nodeType === NodeType.Function;\nexports.isFunction = isFunction;\nconst isServerRPC = (action) => action.nodeType === NodeType.ServerRPC;\nexports.isServerRPC = isServerRPC;\nconst isClientRPC = (action) => action.nodeType === NodeType.ClientRPC;\nexports.isClientRPC = isClientRPC;\nconst isQuery = (action) => action.nodeType === NodeType.Query;\nexports.isQuery = isQuery;\nconst actionActors = (action) => {\n if (!action)\n return [];\n if ((0, exports.isFunction)(action) || (0, exports.isClientRPC)(action) || (0, exports.isQuery)(action))\n return [action.caller, action.callee];\n if ((0, exports.isServerRPC)(action))\n return [undefined, action.callee];\n return [];\n};\nexports.actionActors = actionActors;\nconst nodeName = (action) => {\n if (!action)\n return 'undefined';\n switch (action.nodeType) {\n case NodeType.Function:\n return action.name;\n case NodeType.ServerRPC:\n case NodeType.ClientRPC:\n return action.route;\n case NodeType.Query:\n return action.query;\n case NodeType.Loop:\n return 'loop';\n }\n};\nexports.nodeName = nodeName;\nconst nodeResult = (action) => {\n if (!action)\n return undefined;\n switch (action.nodeType) {\n case NodeType.Function:\n if (!action.returnValue)\n return;\n if (action.returnValue.returnValueType)\n return action.returnValue.returnValueType.name;\n if (action.returnValue.raisesException)\n return 'exception!';\n break;\n case NodeType.ServerRPC:\n return action.status ? action.status.toString() : '';\n case NodeType.ClientRPC:\n return action.status ? action.status.toString() : '';\n case NodeType.Query:\n return 'void';\n }\n};\nexports.nodeResult = nodeResult;\nfunction parseRoute(route) {\n const tokens = route.split(/\\s+/);\n return {\n method: tokens[0],\n path: tokens.slice(1).join(' '),\n };\n}\nexports.parseRoute = parseRoute;\nfunction setParent(action, parent) {\n if (parent)\n action.parent = parent;\n action.children.forEach((child) => setParent(child, action));\n}\nexports.setParent = setParent;\nfunction findAncestor(action, test) {\n let parent = action.parent;\n while (parent) {\n if (test(parent))\n return parent;\n parent = parent.parent;\n }\n}\nexports.findAncestor = findAncestor;\nfunction hasAncestor(action, test) {\n return findAncestor(action, test) !== undefined;\n}\nexports.hasAncestor = hasAncestor;\nvar ValidationResult;\n(function (ValidationResult) {\n ValidationResult[ValidationResult[\"Invalid\"] = 0] = \"Invalid\";\n ValidationResult[ValidationResult[\"Valid\"] = 1] = \"Valid\";\n ValidationResult[ValidationResult[\"AppMap\"] = 2] = \"AppMap\";\n})(ValidationResult = exports.ValidationResult || (exports.ValidationResult = {}));\nconst buildDiagram_1 = __importStar(require(\"./buildDiagram\"));\nexports.buildDiagram = buildDiagram_1.default;\nObject.defineProperty(exports, \"getActors\", { enumerable: true, get: function () { return buildDiagram_1.getActors; } });\nconst buildDiffDiagram_1 = __importDefault(require(\"./buildDiffDiagram\"));\nexports.buildDiffDiagram = buildDiffDiagram_1.default;\nconst diff_1 = __importDefault(require(\"./diff\"));\nexports.diff = diff_1.default;\nconst unparseDiagram_1 = __importDefault(require(\"./unparseDiagram\"));\nexports.unparseDiagram = unparseDiagram_1.default;\nconst validateDiagram_1 = __importDefault(require(\"./validateDiagram\"));\nexports.validateDiagram = validateDiagram_1.default;\nvar FormatType;\n(function (FormatType) {\n FormatType[\"JSON\"] = \"json\";\n FormatType[\"PlantUML\"] = \"plantuml\";\n FormatType[\"Text\"] = \"text\";\n})(FormatType = exports.FormatType || (exports.FormatType = {}));\nexports.Formatters = [FormatType.JSON, FormatType.PlantUML, FormatType.Text];\nconst formatter_1 = __importDefault(require(\"./formatter\"));\nexports.format = formatter_1.default;\nconst specification_1 = __importDefault(require(\"./specification\"));\nObject.defineProperty(exports, \"Specification\", { enumerable: true, get: function () { return specification_1.default; } });\nconst diff_2 = require(\"./diff\");\nObject.defineProperty(exports, \"Move\", { enumerable: true, get: function () { return diff_2.Move; } });\nObject.defineProperty(exports, \"MoveType\", { enumerable: true, get: function () { return diff_2.MoveType; } });\n","export var xhtml = \"http://www.w3.org/1999/xhtml\";\n\nexport default {\n svg: \"http://www.w3.org/2000/svg\",\n xhtml: xhtml,\n xlink: \"http://www.w3.org/1999/xlink\",\n xml: \"http://www.w3.org/XML/1998/namespace\",\n xmlns: \"http://www.w3.org/2000/xmlns/\"\n};\n","import namespaces from \"./namespaces.js\";\n\nexport default function(name) {\n var prefix = name += \"\", i = prefix.indexOf(\":\");\n if (i >= 0 && (prefix = name.slice(0, i)) !== \"xmlns\") name = name.slice(i + 1);\n return namespaces.hasOwnProperty(prefix) ? {space: namespaces[prefix], local: name} : name; // eslint-disable-line no-prototype-builtins\n}\n","import namespace from \"./namespace.js\";\nimport {xhtml} from \"./namespaces.js\";\n\nfunction creatorInherit(name) {\n return function() {\n var document = this.ownerDocument,\n uri = this.namespaceURI;\n return uri === xhtml && document.documentElement.namespaceURI === xhtml\n ? document.createElement(name)\n : document.createElementNS(uri, name);\n };\n}\n\nfunction creatorFixed(fullname) {\n return function() {\n return this.ownerDocument.createElementNS(fullname.space, fullname.local);\n };\n}\n\nexport default function(name) {\n var fullname = namespace(name);\n return (fullname.local\n ? creatorFixed\n : creatorInherit)(fullname);\n}\n","function none() {}\n\nexport default function(selector) {\n return selector == null ? none : function() {\n return this.querySelector(selector);\n };\n}\n","import {Selection} from \"./index.js\";\nimport selector from \"../selector.js\";\n\nexport default function(select) {\n if (typeof select !== \"function\") select = selector(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n if (\"__data__\" in node) subnode.__data__ = node.__data__;\n subgroup[i] = subnode;\n }\n }\n }\n\n return new Selection(subgroups, this._parents);\n}\n","// Given something array like (or null), returns something that is strictly an\n// array. This is used to ensure that array-like objects passed to d3.selectAll\n// or selection.selectAll are converted into proper arrays when creating a\n// selection; we don’t ever want to create a selection backed by a live\n// HTMLCollection or NodeList. However, note that selection.selectAll will use a\n// static NodeList as a group, since it safely derived from querySelectorAll.\nexport default function array(x) {\n return x == null ? [] : Array.isArray(x) ? x : Array.from(x);\n}\n","function empty() {\n return [];\n}\n\nexport default function(selector) {\n return selector == null ? empty : function() {\n return this.querySelectorAll(selector);\n };\n}\n","import {Selection} from \"./index.js\";\nimport array from \"../array.js\";\nimport selectorAll from \"../selectorAll.js\";\n\nfunction arrayAll(select) {\n return function() {\n return array(select.apply(this, arguments));\n };\n}\n\nexport default function(select) {\n if (typeof select === \"function\") select = arrayAll(select);\n else select = selectorAll(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n subgroups.push(select.call(node, node.__data__, i, group));\n parents.push(node);\n }\n }\n }\n\n return new Selection(subgroups, parents);\n}\n","export default function(selector) {\n return function() {\n return this.matches(selector);\n };\n}\n\nexport function childMatcher(selector) {\n return function(node) {\n return node.matches(selector);\n };\n}\n\n","import {childMatcher} from \"../matcher.js\";\n\nvar find = Array.prototype.find;\n\nfunction childFind(match) {\n return function() {\n return find.call(this.children, match);\n };\n}\n\nfunction childFirst() {\n return this.firstElementChild;\n}\n\nexport default function(match) {\n return this.select(match == null ? childFirst\n : childFind(typeof match === \"function\" ? match : childMatcher(match)));\n}\n","import {childMatcher} from \"../matcher.js\";\n\nvar filter = Array.prototype.filter;\n\nfunction children() {\n return Array.from(this.children);\n}\n\nfunction childrenFilter(match) {\n return function() {\n return filter.call(this.children, match);\n };\n}\n\nexport default function(match) {\n return this.selectAll(match == null ? children\n : childrenFilter(typeof match === \"function\" ? match : childMatcher(match)));\n}\n","import {Selection} from \"./index.js\";\nimport matcher from \"../matcher.js\";\n\nexport default function(match) {\n if (typeof match !== \"function\") match = matcher(match);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n subgroup.push(node);\n }\n }\n }\n\n return new Selection(subgroups, this._parents);\n}\n","export default function(update) {\n return new Array(update.length);\n}\n","import sparse from \"./sparse.js\";\nimport {Selection} from \"./index.js\";\n\nexport default function() {\n return new Selection(this._enter || this._groups.map(sparse), this._parents);\n}\n\nexport function EnterNode(parent, datum) {\n this.ownerDocument = parent.ownerDocument;\n this.namespaceURI = parent.namespaceURI;\n this._next = null;\n this._parent = parent;\n this.__data__ = datum;\n}\n\nEnterNode.prototype = {\n constructor: EnterNode,\n appendChild: function(child) { return this._parent.insertBefore(child, this._next); },\n insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },\n querySelector: function(selector) { return this._parent.querySelector(selector); },\n querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }\n};\n","export default function(x) {\n return function() {\n return x;\n };\n}\n","import {Selection} from \"./index.js\";\nimport {EnterNode} from \"./enter.js\";\nimport constant from \"../constant.js\";\n\nfunction bindIndex(parent, group, enter, update, exit, data) {\n var i = 0,\n node,\n groupLength = group.length,\n dataLength = data.length;\n\n // Put any non-null nodes that fit into update.\n // Put any null nodes into enter.\n // Put any remaining data into enter.\n for (; i < dataLength; ++i) {\n if (node = group[i]) {\n node.__data__ = data[i];\n update[i] = node;\n } else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n }\n\n // Put any non-null nodes that don’t fit into exit.\n for (; i < groupLength; ++i) {\n if (node = group[i]) {\n exit[i] = node;\n }\n }\n}\n\nfunction bindKey(parent, group, enter, update, exit, data, key) {\n var i,\n node,\n nodeByKeyValue = new Map,\n groupLength = group.length,\n dataLength = data.length,\n keyValues = new Array(groupLength),\n keyValue;\n\n // Compute the key for each node.\n // If multiple nodes have the same key, the duplicates are added to exit.\n for (i = 0; i < groupLength; ++i) {\n if (node = group[i]) {\n keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + \"\";\n if (nodeByKeyValue.has(keyValue)) {\n exit[i] = node;\n } else {\n nodeByKeyValue.set(keyValue, node);\n }\n }\n }\n\n // Compute the key for each datum.\n // If there a node associated with this key, join and add it to update.\n // If there is not (or the key is a duplicate), add it to enter.\n for (i = 0; i < dataLength; ++i) {\n keyValue = key.call(parent, data[i], i, data) + \"\";\n if (node = nodeByKeyValue.get(keyValue)) {\n update[i] = node;\n node.__data__ = data[i];\n nodeByKeyValue.delete(keyValue);\n } else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n }\n\n // Add any remaining nodes that were not bound to data to exit.\n for (i = 0; i < groupLength; ++i) {\n if ((node = group[i]) && (nodeByKeyValue.get(keyValues[i]) === node)) {\n exit[i] = node;\n }\n }\n}\n\nfunction datum(node) {\n return node.__data__;\n}\n\nexport default function(value, key) {\n if (!arguments.length) return Array.from(this, datum);\n\n var bind = key ? bindKey : bindIndex,\n parents = this._parents,\n groups = this._groups;\n\n if (typeof value !== \"function\") value = constant(value);\n\n for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {\n var parent = parents[j],\n group = groups[j],\n groupLength = group.length,\n data = arraylike(value.call(parent, parent && parent.__data__, j, parents)),\n dataLength = data.length,\n enterGroup = enter[j] = new Array(dataLength),\n updateGroup = update[j] = new Array(dataLength),\n exitGroup = exit[j] = new Array(groupLength);\n\n bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);\n\n // Now connect the enter nodes to their following update node, such that\n // appendChild can insert the materialized enter node before this node,\n // rather than at the end of the parent node.\n for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {\n if (previous = enterGroup[i0]) {\n if (i0 >= i1) i1 = i0 + 1;\n while (!(next = updateGroup[i1]) && ++i1 < dataLength);\n previous._next = next || null;\n }\n }\n }\n\n update = new Selection(update, parents);\n update._enter = enter;\n update._exit = exit;\n return update;\n}\n\n// Given some data, this returns an array-like view of it: an object that\n// exposes a length property and allows numeric indexing. Note that unlike\n// selectAll, this isn’t worried about “live” collections because the resulting\n// array will only be used briefly while data is being bound. (It is possible to\n// cause the data to change while iterating by using a key function, but please\n// don’t; we’d rather avoid a gratuitous copy.)\nfunction arraylike(data) {\n return typeof data === \"object\" && \"length\" in data\n ? data // Array, TypedArray, NodeList, array-like\n : Array.from(data); // Map, Set, iterable, string, or anything else\n}\n","import sparse from \"./sparse.js\";\nimport {Selection} from \"./index.js\";\n\nexport default function() {\n return new Selection(this._exit || this._groups.map(sparse), this._parents);\n}\n","export default function(onenter, onupdate, onexit) {\n var enter = this.enter(), update = this, exit = this.exit();\n if (typeof onenter === \"function\") {\n enter = onenter(enter);\n if (enter) enter = enter.selection();\n } else {\n enter = enter.append(onenter + \"\");\n }\n if (onupdate != null) {\n update = onupdate(update);\n if (update) update = update.selection();\n }\n if (onexit == null) exit.remove(); else onexit(exit);\n return enter && update ? enter.merge(update).order() : update;\n}\n","import {Selection} from \"./index.js\";\n\nexport default function(context) {\n var selection = context.selection ? context.selection() : context;\n\n for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group0[i] || group1[i]) {\n merge[i] = node;\n }\n }\n }\n\n for (; j < m0; ++j) {\n merges[j] = groups0[j];\n }\n\n return new Selection(merges, this._parents);\n}\n","export default function() {\n\n for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {\n for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {\n if (node = group[i]) {\n if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);\n next = node;\n }\n }\n }\n\n return this;\n}\n","import {Selection} from \"./index.js\";\n\nexport default function(compare) {\n if (!compare) compare = ascending;\n\n function compareNode(a, b) {\n return a && b ? compare(a.__data__, b.__data__) : !a - !b;\n }\n\n for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n sortgroup[i] = node;\n }\n }\n sortgroup.sort(compareNode);\n }\n\n return new Selection(sortgroups, this._parents).order();\n}\n\nfunction ascending(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n","export default function() {\n var callback = arguments[0];\n arguments[0] = this;\n callback.apply(null, arguments);\n return this;\n}\n","export default function() {\n return Array.from(this);\n}\n","export default function() {\n\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {\n var node = group[i];\n if (node) return node;\n }\n }\n\n return null;\n}\n","export default function() {\n let size = 0;\n for (const node of this) ++size; // eslint-disable-line no-unused-vars\n return size;\n}\n","export default function() {\n return !this.node();\n}\n","export default function(callback) {\n\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n if (node = group[i]) callback.call(node, node.__data__, i, group);\n }\n }\n\n return this;\n}\n","import namespace from \"../namespace.js\";\n\nfunction attrRemove(name) {\n return function() {\n this.removeAttribute(name);\n };\n}\n\nfunction attrRemoveNS(fullname) {\n return function() {\n this.removeAttributeNS(fullname.space, fullname.local);\n };\n}\n\nfunction attrConstant(name, value) {\n return function() {\n this.setAttribute(name, value);\n };\n}\n\nfunction attrConstantNS(fullname, value) {\n return function() {\n this.setAttributeNS(fullname.space, fullname.local, value);\n };\n}\n\nfunction attrFunction(name, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.removeAttribute(name);\n else this.setAttribute(name, v);\n };\n}\n\nfunction attrFunctionNS(fullname, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.removeAttributeNS(fullname.space, fullname.local);\n else this.setAttributeNS(fullname.space, fullname.local, v);\n };\n}\n\nexport default function(name, value) {\n var fullname = namespace(name);\n\n if (arguments.length < 2) {\n var node = this.node();\n return fullname.local\n ? node.getAttributeNS(fullname.space, fullname.local)\n : node.getAttribute(fullname);\n }\n\n return this.each((value == null\n ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === \"function\"\n ? (fullname.local ? attrFunctionNS : attrFunction)\n : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value));\n}\n","export default function(node) {\n return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node\n || (node.document && node) // node is a Window\n || node.defaultView; // node is a Document\n}\n","import defaultView from \"../window.js\";\n\nfunction styleRemove(name) {\n return function() {\n this.style.removeProperty(name);\n };\n}\n\nfunction styleConstant(name, value, priority) {\n return function() {\n this.style.setProperty(name, value, priority);\n };\n}\n\nfunction styleFunction(name, value, priority) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.style.removeProperty(name);\n else this.style.setProperty(name, v, priority);\n };\n}\n\nexport default function(name, value, priority) {\n return arguments.length > 1\n ? this.each((value == null\n ? styleRemove : typeof value === \"function\"\n ? styleFunction\n : styleConstant)(name, value, priority == null ? \"\" : priority))\n : styleValue(this.node(), name);\n}\n\nexport function styleValue(node, name) {\n return node.style.getPropertyValue(name)\n || defaultView(node).getComputedStyle(node, null).getPropertyValue(name);\n}\n","function propertyRemove(name) {\n return function() {\n delete this[name];\n };\n}\n\nfunction propertyConstant(name, value) {\n return function() {\n this[name] = value;\n };\n}\n\nfunction propertyFunction(name, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) delete this[name];\n else this[name] = v;\n };\n}\n\nexport default function(name, value) {\n return arguments.length > 1\n ? this.each((value == null\n ? propertyRemove : typeof value === \"function\"\n ? propertyFunction\n : propertyConstant)(name, value))\n : this.node()[name];\n}\n","function classArray(string) {\n return string.trim().split(/^|\\s+/);\n}\n\nfunction classList(node) {\n return node.classList || new ClassList(node);\n}\n\nfunction ClassList(node) {\n this._node = node;\n this._names = classArray(node.getAttribute(\"class\") || \"\");\n}\n\nClassList.prototype = {\n add: function(name) {\n var i = this._names.indexOf(name);\n if (i < 0) {\n this._names.push(name);\n this._node.setAttribute(\"class\", this._names.join(\" \"));\n }\n },\n remove: function(name) {\n var i = this._names.indexOf(name);\n if (i >= 0) {\n this._names.splice(i, 1);\n this._node.setAttribute(\"class\", this._names.join(\" \"));\n }\n },\n contains: function(name) {\n return this._names.indexOf(name) >= 0;\n }\n};\n\nfunction classedAdd(node, names) {\n var list = classList(node), i = -1, n = names.length;\n while (++i < n) list.add(names[i]);\n}\n\nfunction classedRemove(node, names) {\n var list = classList(node), i = -1, n = names.length;\n while (++i < n) list.remove(names[i]);\n}\n\nfunction classedTrue(names) {\n return function() {\n classedAdd(this, names);\n };\n}\n\nfunction classedFalse(names) {\n return function() {\n classedRemove(this, names);\n };\n}\n\nfunction classedFunction(names, value) {\n return function() {\n (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);\n };\n}\n\nexport default function(name, value) {\n var names = classArray(name + \"\");\n\n if (arguments.length < 2) {\n var list = classList(this.node()), i = -1, n = names.length;\n while (++i < n) if (!list.contains(names[i])) return false;\n return true;\n }\n\n return this.each((typeof value === \"function\"\n ? classedFunction : value\n ? classedTrue\n : classedFalse)(names, value));\n}\n","function textRemove() {\n this.textContent = \"\";\n}\n\nfunction textConstant(value) {\n return function() {\n this.textContent = value;\n };\n}\n\nfunction textFunction(value) {\n return function() {\n var v = value.apply(this, arguments);\n this.textContent = v == null ? \"\" : v;\n };\n}\n\nexport default function(value) {\n return arguments.length\n ? this.each(value == null\n ? textRemove : (typeof value === \"function\"\n ? textFunction\n : textConstant)(value))\n : this.node().textContent;\n}\n","function htmlRemove() {\n this.innerHTML = \"\";\n}\n\nfunction htmlConstant(value) {\n return function() {\n this.innerHTML = value;\n };\n}\n\nfunction htmlFunction(value) {\n return function() {\n var v = value.apply(this, arguments);\n this.innerHTML = v == null ? \"\" : v;\n };\n}\n\nexport default function(value) {\n return arguments.length\n ? this.each(value == null\n ? htmlRemove : (typeof value === \"function\"\n ? htmlFunction\n : htmlConstant)(value))\n : this.node().innerHTML;\n}\n","function raise() {\n if (this.nextSibling) this.parentNode.appendChild(this);\n}\n\nexport default function() {\n return this.each(raise);\n}\n","function lower() {\n if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\n\nexport default function() {\n return this.each(lower);\n}\n","import creator from \"../creator.js\";\n\nexport default function(name) {\n var create = typeof name === \"function\" ? name : creator(name);\n return this.select(function() {\n return this.appendChild(create.apply(this, arguments));\n });\n}\n","import creator from \"../creator.js\";\nimport selector from \"../selector.js\";\n\nfunction constantNull() {\n return null;\n}\n\nexport default function(name, before) {\n var create = typeof name === \"function\" ? name : creator(name),\n select = before == null ? constantNull : typeof before === \"function\" ? before : selector(before);\n return this.select(function() {\n return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);\n });\n}\n","function remove() {\n var parent = this.parentNode;\n if (parent) parent.removeChild(this);\n}\n\nexport default function() {\n return this.each(remove);\n}\n","function selection_cloneShallow() {\n var clone = this.cloneNode(false), parent = this.parentNode;\n return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nfunction selection_cloneDeep() {\n var clone = this.cloneNode(true), parent = this.parentNode;\n return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nexport default function(deep) {\n return this.select(deep ? selection_cloneDeep : selection_cloneShallow);\n}\n","export default function(value) {\n return arguments.length\n ? this.property(\"__data__\", value)\n : this.node().__data__;\n}\n","function contextListener(listener) {\n return function(event) {\n listener.call(this, event, this.__data__);\n };\n}\n\nfunction parseTypenames(typenames) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n return {type: t, name: name};\n });\n}\n\nfunction onRemove(typename) {\n return function() {\n var on = this.__on;\n if (!on) return;\n for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {\n if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {\n this.removeEventListener(o.type, o.listener, o.options);\n } else {\n on[++i] = o;\n }\n }\n if (++i) on.length = i;\n else delete this.__on;\n };\n}\n\nfunction onAdd(typename, value, options) {\n return function() {\n var on = this.__on, o, listener = contextListener(value);\n if (on) for (var j = 0, m = on.length; j < m; ++j) {\n if ((o = on[j]).type === typename.type && o.name === typename.name) {\n this.removeEventListener(o.type, o.listener, o.options);\n this.addEventListener(o.type, o.listener = listener, o.options = options);\n o.value = value;\n return;\n }\n }\n this.addEventListener(typename.type, listener, options);\n o = {type: typename.type, name: typename.name, value: value, listener: listener, options: options};\n if (!on) this.__on = [o];\n else on.push(o);\n };\n}\n\nexport default function(typename, value, options) {\n var typenames = parseTypenames(typename + \"\"), i, n = typenames.length, t;\n\n if (arguments.length < 2) {\n var on = this.node().__on;\n if (on) for (var j = 0, m = on.length, o; j < m; ++j) {\n for (i = 0, o = on[j]; i < n; ++i) {\n if ((t = typenames[i]).type === o.type && t.name === o.name) {\n return o.value;\n }\n }\n }\n return;\n }\n\n on = value ? onAdd : onRemove;\n for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options));\n return this;\n}\n","import defaultView from \"../window.js\";\n\nfunction dispatchEvent(node, type, params) {\n var window = defaultView(node),\n event = window.CustomEvent;\n\n if (typeof event === \"function\") {\n event = new event(type, params);\n } else {\n event = window.document.createEvent(\"Event\");\n if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;\n else event.initEvent(type, false, false);\n }\n\n node.dispatchEvent(event);\n}\n\nfunction dispatchConstant(type, params) {\n return function() {\n return dispatchEvent(this, type, params);\n };\n}\n\nfunction dispatchFunction(type, params) {\n return function() {\n return dispatchEvent(this, type, params.apply(this, arguments));\n };\n}\n\nexport default function(type, params) {\n return this.each((typeof params === \"function\"\n ? dispatchFunction\n : dispatchConstant)(type, params));\n}\n","export default function*() {\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n if (node = group[i]) yield node;\n }\n }\n}\n","import selection_select from \"./select.js\";\nimport selection_selectAll from \"./selectAll.js\";\nimport selection_selectChild from \"./selectChild.js\";\nimport selection_selectChildren from \"./selectChildren.js\";\nimport selection_filter from \"./filter.js\";\nimport selection_data from \"./data.js\";\nimport selection_enter from \"./enter.js\";\nimport selection_exit from \"./exit.js\";\nimport selection_join from \"./join.js\";\nimport selection_merge from \"./merge.js\";\nimport selection_order from \"./order.js\";\nimport selection_sort from \"./sort.js\";\nimport selection_call from \"./call.js\";\nimport selection_nodes from \"./nodes.js\";\nimport selection_node from \"./node.js\";\nimport selection_size from \"./size.js\";\nimport selection_empty from \"./empty.js\";\nimport selection_each from \"./each.js\";\nimport selection_attr from \"./attr.js\";\nimport selection_style from \"./style.js\";\nimport selection_property from \"./property.js\";\nimport selection_classed from \"./classed.js\";\nimport selection_text from \"./text.js\";\nimport selection_html from \"./html.js\";\nimport selection_raise from \"./raise.js\";\nimport selection_lower from \"./lower.js\";\nimport selection_append from \"./append.js\";\nimport selection_insert from \"./insert.js\";\nimport selection_remove from \"./remove.js\";\nimport selection_clone from \"./clone.js\";\nimport selection_datum from \"./datum.js\";\nimport selection_on from \"./on.js\";\nimport selection_dispatch from \"./dispatch.js\";\nimport selection_iterator from \"./iterator.js\";\n\nexport var root = [null];\n\nexport function Selection(groups, parents) {\n this._groups = groups;\n this._parents = parents;\n}\n\nfunction selection() {\n return new Selection([[document.documentElement]], root);\n}\n\nfunction selection_selection() {\n return this;\n}\n\nSelection.prototype = selection.prototype = {\n constructor: Selection,\n select: selection_select,\n selectAll: selection_selectAll,\n selectChild: selection_selectChild,\n selectChildren: selection_selectChildren,\n filter: selection_filter,\n data: selection_data,\n enter: selection_enter,\n exit: selection_exit,\n join: selection_join,\n merge: selection_merge,\n selection: selection_selection,\n order: selection_order,\n sort: selection_sort,\n call: selection_call,\n nodes: selection_nodes,\n node: selection_node,\n size: selection_size,\n empty: selection_empty,\n each: selection_each,\n attr: selection_attr,\n style: selection_style,\n property: selection_property,\n classed: selection_classed,\n text: selection_text,\n html: selection_html,\n raise: selection_raise,\n lower: selection_lower,\n append: selection_append,\n insert: selection_insert,\n remove: selection_remove,\n clone: selection_clone,\n datum: selection_datum,\n on: selection_on,\n dispatch: selection_dispatch,\n [Symbol.iterator]: selection_iterator\n};\n\nexport default selection;\n","import {Selection, root} from \"./selection/index.js\";\n\nexport default function(selector) {\n return typeof selector === \"string\"\n ? new Selection([[document.querySelector(selector)]], [document.documentElement])\n : new Selection([[selector]], root);\n}\n","export default function(event) {\n let sourceEvent;\n while (sourceEvent = event.sourceEvent) event = sourceEvent;\n return event;\n}\n","import sourceEvent from \"./sourceEvent.js\";\n\nexport default function(event, node) {\n event = sourceEvent(event);\n if (node === undefined) node = event.currentTarget;\n if (node) {\n var svg = node.ownerSVGElement || node;\n if (svg.createSVGPoint) {\n var point = svg.createSVGPoint();\n point.x = event.clientX, point.y = event.clientY;\n point = point.matrixTransform(node.getScreenCTM().inverse());\n return [point.x, point.y];\n }\n if (node.getBoundingClientRect) {\n var rect = node.getBoundingClientRect();\n return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];\n }\n }\n return [event.pageX, event.pageY];\n}\n","import array from \"./array.js\";\nimport {Selection, root} from \"./selection/index.js\";\n\nexport default function(selector) {\n return typeof selector === \"string\"\n ? new Selection([document.querySelectorAll(selector)], [document.documentElement])\n : new Selection([array(selector)], root);\n}\n","export {default as create} from \"./create.js\";\nexport {default as creator} from \"./creator.js\";\nexport {default as local} from \"./local.js\";\nexport {default as matcher} from \"./matcher.js\";\nexport {default as namespace} from \"./namespace.js\";\nexport {default as namespaces} from \"./namespaces.js\";\nexport {default as pointer} from \"./pointer.js\";\nexport {default as pointers} from \"./pointers.js\";\nexport {default as select} from \"./select.js\";\nexport {default as selectAll} from \"./selectAll.js\";\nexport {default as selection} from \"./selection/index.js\";\nexport {default as selector} from \"./selector.js\";\nexport {default as selectorAll} from \"./selectorAll.js\";\nexport {styleValue as style} from \"./selection/style.js\";\nexport {default as window} from \"./window.js\";\n","'use strict';\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn Object.propertyIsEnumerable.call(target, symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\nfunction propertyIsOnObject(object, property) {\n\ttry {\n\t\treturn property in object\n\t} catch(_) {\n\t\treturn false\n\t}\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\treturn propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n","var noop = {value: () => {}};\n\nfunction dispatch() {\n for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n if (!(t = arguments[i] + \"\") || (t in _) || /[\\s.]/.test(t)) throw new Error(\"illegal type: \" + t);\n _[t] = [];\n }\n return new Dispatch(_);\n}\n\nfunction Dispatch(_) {\n this._ = _;\n}\n\nfunction parseTypenames(typenames, types) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n return {type: t, name: name};\n });\n}\n\nDispatch.prototype = dispatch.prototype = {\n constructor: Dispatch,\n on: function(typename, callback) {\n var _ = this._,\n T = parseTypenames(typename + \"\", _),\n t,\n i = -1,\n n = T.length;\n\n // If no callback was specified, return the callback of the given type and name.\n if (arguments.length < 2) {\n while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n return;\n }\n\n // If a type was specified, set the callback for the given type and name.\n // Otherwise, if a null callback was specified, remove callbacks of the given name.\n if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n while (++i < n) {\n if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);\n else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);\n }\n\n return this;\n },\n copy: function() {\n var copy = {}, _ = this._;\n for (var t in _) copy[t] = _[t].slice();\n return new Dispatch(copy);\n },\n call: function(type, that) {\n if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n },\n apply: function(type, that, args) {\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n }\n};\n\nfunction get(type, name) {\n for (var i = 0, n = type.length, c; i < n; ++i) {\n if ((c = type[i]).name === name) {\n return c.value;\n }\n }\n}\n\nfunction set(type, name, callback) {\n for (var i = 0, n = type.length; i < n; ++i) {\n if (type[i].name === name) {\n type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n break;\n }\n }\n if (callback != null) type.push({name: name, value: callback});\n return type;\n}\n\nexport default dispatch;\n","export {default as dispatch} from \"./dispatch.js\";\n","// These are typically used in conjunction with noevent to ensure that we can\n// preventDefault on the event.\nexport const nonpassive = {passive: false};\nexport const nonpassivecapture = {capture: true, passive: false};\n\nexport function nopropagation(event) {\n event.stopImmediatePropagation();\n}\n\nexport default function(event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n}\n","import {select} from \"d3-selection\";\nimport noevent, {nonpassivecapture} from \"./noevent.js\";\n\nexport default function(view) {\n var root = view.document.documentElement,\n selection = select(view).on(\"dragstart.drag\", noevent, nonpassivecapture);\n if (\"onselectstart\" in root) {\n selection.on(\"selectstart.drag\", noevent, nonpassivecapture);\n } else {\n root.__noselect = root.style.MozUserSelect;\n root.style.MozUserSelect = \"none\";\n }\n}\n\nexport function yesdrag(view, noclick) {\n var root = view.document.documentElement,\n selection = select(view).on(\"dragstart.drag\", null);\n if (noclick) {\n selection.on(\"click.drag\", noevent, nonpassivecapture);\n setTimeout(function() { selection.on(\"click.drag\", null); }, 0);\n }\n if (\"onselectstart\" in root) {\n selection.on(\"selectstart.drag\", null);\n } else {\n root.style.MozUserSelect = root.__noselect;\n delete root.__noselect;\n }\n}\n","export {default as drag} from \"./drag.js\";\nexport {default as dragDisable, yesdrag as dragEnable} from \"./nodrag.js\";\n","export default function(constructor, factory, prototype) {\n constructor.prototype = factory.prototype = prototype;\n prototype.constructor = constructor;\n}\n\nexport function extend(parent, definition) {\n var prototype = Object.create(parent.prototype);\n for (var key in definition) prototype[key] = definition[key];\n return prototype;\n}\n","import define, {extend} from \"./define.js\";\n\nexport function Color() {}\n\nexport var darker = 0.7;\nexport var brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n reN = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n reP = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n reHex = /^#([0-9a-f]{3,8})$/,\n reRgbInteger = new RegExp(`^rgb\\\\(${reI},${reI},${reI}\\\\)$`),\n reRgbPercent = new RegExp(`^rgb\\\\(${reP},${reP},${reP}\\\\)$`),\n reRgbaInteger = new RegExp(`^rgba\\\\(${reI},${reI},${reI},${reN}\\\\)$`),\n reRgbaPercent = new RegExp(`^rgba\\\\(${reP},${reP},${reP},${reN}\\\\)$`),\n reHslPercent = new RegExp(`^hsl\\\\(${reN},${reP},${reP}\\\\)$`),\n reHslaPercent = new RegExp(`^hsla\\\\(${reN},${reP},${reP},${reN}\\\\)$`);\n\nvar named = {\n aliceblue: 0xf0f8ff,\n antiquewhite: 0xfaebd7,\n aqua: 0x00ffff,\n aquamarine: 0x7fffd4,\n azure: 0xf0ffff,\n beige: 0xf5f5dc,\n bisque: 0xffe4c4,\n black: 0x000000,\n blanchedalmond: 0xffebcd,\n blue: 0x0000ff,\n blueviolet: 0x8a2be2,\n brown: 0xa52a2a,\n burlywood: 0xdeb887,\n cadetblue: 0x5f9ea0,\n chartreuse: 0x7fff00,\n chocolate: 0xd2691e,\n coral: 0xff7f50,\n cornflowerblue: 0x6495ed,\n cornsilk: 0xfff8dc,\n crimson: 0xdc143c,\n cyan: 0x00ffff,\n darkblue: 0x00008b,\n darkcyan: 0x008b8b,\n darkgoldenrod: 0xb8860b,\n darkgray: 0xa9a9a9,\n darkgreen: 0x006400,\n darkgrey: 0xa9a9a9,\n darkkhaki: 0xbdb76b,\n darkmagenta: 0x8b008b,\n darkolivegreen: 0x556b2f,\n darkorange: 0xff8c00,\n darkorchid: 0x9932cc,\n darkred: 0x8b0000,\n darksalmon: 0xe9967a,\n darkseagreen: 0x8fbc8f,\n darkslateblue: 0x483d8b,\n darkslategray: 0x2f4f4f,\n darkslategrey: 0x2f4f4f,\n darkturquoise: 0x00ced1,\n darkviolet: 0x9400d3,\n deeppink: 0xff1493,\n deepskyblue: 0x00bfff,\n dimgray: 0x696969,\n dimgrey: 0x696969,\n dodgerblue: 0x1e90ff,\n firebrick: 0xb22222,\n floralwhite: 0xfffaf0,\n forestgreen: 0x228b22,\n fuchsia: 0xff00ff,\n gainsboro: 0xdcdcdc,\n ghostwhite: 0xf8f8ff,\n gold: 0xffd700,\n goldenrod: 0xdaa520,\n gray: 0x808080,\n green: 0x008000,\n greenyellow: 0xadff2f,\n grey: 0x808080,\n honeydew: 0xf0fff0,\n hotpink: 0xff69b4,\n indianred: 0xcd5c5c,\n indigo: 0x4b0082,\n ivory: 0xfffff0,\n khaki: 0xf0e68c,\n lavender: 0xe6e6fa,\n lavenderblush: 0xfff0f5,\n lawngreen: 0x7cfc00,\n lemonchiffon: 0xfffacd,\n lightblue: 0xadd8e6,\n lightcoral: 0xf08080,\n lightcyan: 0xe0ffff,\n lightgoldenrodyellow: 0xfafad2,\n lightgray: 0xd3d3d3,\n lightgreen: 0x90ee90,\n lightgrey: 0xd3d3d3,\n lightpink: 0xffb6c1,\n lightsalmon: 0xffa07a,\n lightseagreen: 0x20b2aa,\n lightskyblue: 0x87cefa,\n lightslategray: 0x778899,\n lightslategrey: 0x778899,\n lightsteelblue: 0xb0c4de,\n lightyellow: 0xffffe0,\n lime: 0x00ff00,\n limegreen: 0x32cd32,\n linen: 0xfaf0e6,\n magenta: 0xff00ff,\n maroon: 0x800000,\n mediumaquamarine: 0x66cdaa,\n mediumblue: 0x0000cd,\n mediumorchid: 0xba55d3,\n mediumpurple: 0x9370db,\n mediumseagreen: 0x3cb371,\n mediumslateblue: 0x7b68ee,\n mediumspringgreen: 0x00fa9a,\n mediumturquoise: 0x48d1cc,\n mediumvioletred: 0xc71585,\n midnightblue: 0x191970,\n mintcream: 0xf5fffa,\n mistyrose: 0xffe4e1,\n moccasin: 0xffe4b5,\n navajowhite: 0xffdead,\n navy: 0x000080,\n oldlace: 0xfdf5e6,\n olive: 0x808000,\n olivedrab: 0x6b8e23,\n orange: 0xffa500,\n orangered: 0xff4500,\n orchid: 0xda70d6,\n palegoldenrod: 0xeee8aa,\n palegreen: 0x98fb98,\n paleturquoise: 0xafeeee,\n palevioletred: 0xdb7093,\n papayawhip: 0xffefd5,\n peachpuff: 0xffdab9,\n peru: 0xcd853f,\n pink: 0xffc0cb,\n plum: 0xdda0dd,\n powderblue: 0xb0e0e6,\n purple: 0x800080,\n rebeccapurple: 0x663399,\n red: 0xff0000,\n rosybrown: 0xbc8f8f,\n royalblue: 0x4169e1,\n saddlebrown: 0x8b4513,\n salmon: 0xfa8072,\n sandybrown: 0xf4a460,\n seagreen: 0x2e8b57,\n seashell: 0xfff5ee,\n sienna: 0xa0522d,\n silver: 0xc0c0c0,\n skyblue: 0x87ceeb,\n slateblue: 0x6a5acd,\n slategray: 0x708090,\n slategrey: 0x708090,\n snow: 0xfffafa,\n springgreen: 0x00ff7f,\n steelblue: 0x4682b4,\n tan: 0xd2b48c,\n teal: 0x008080,\n thistle: 0xd8bfd8,\n tomato: 0xff6347,\n turquoise: 0x40e0d0,\n violet: 0xee82ee,\n wheat: 0xf5deb3,\n white: 0xffffff,\n whitesmoke: 0xf5f5f5,\n yellow: 0xffff00,\n yellowgreen: 0x9acd32\n};\n\ndefine(Color, color, {\n copy(channels) {\n return Object.assign(new this.constructor, this, channels);\n },\n displayable() {\n return this.rgb().displayable();\n },\n hex: color_formatHex, // Deprecated! Use color.formatHex.\n formatHex: color_formatHex,\n formatHex8: color_formatHex8,\n formatHsl: color_formatHsl,\n formatRgb: color_formatRgb,\n toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n return this.rgb().formatHex();\n}\n\nfunction color_formatHex8() {\n return this.rgb().formatHex8();\n}\n\nfunction color_formatHsl() {\n return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n return this.rgb().formatRgb();\n}\n\nexport default function color(format) {\n var m, l;\n format = (format + \"\").trim().toLowerCase();\n return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n : null) // invalid hex\n : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n : null;\n}\n\nfunction rgbn(n) {\n return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n if (a <= 0) r = g = b = NaN;\n return new Rgb(r, g, b, a);\n}\n\nexport function rgbConvert(o) {\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Rgb;\n o = o.rgb();\n return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nexport function rgb(r, g, b, opacity) {\n return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nexport function Rgb(r, g, b, opacity) {\n this.r = +r;\n this.g = +g;\n this.b = +b;\n this.opacity = +opacity;\n}\n\ndefine(Rgb, rgb, extend(Color, {\n brighter(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n darker(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n rgb() {\n return this;\n },\n clamp() {\n return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));\n },\n displayable() {\n return (-0.5 <= this.r && this.r < 255.5)\n && (-0.5 <= this.g && this.g < 255.5)\n && (-0.5 <= this.b && this.b < 255.5)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n hex: rgb_formatHex, // Deprecated! Use color.formatHex.\n formatHex: rgb_formatHex,\n formatHex8: rgb_formatHex8,\n formatRgb: rgb_formatRgb,\n toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;\n}\n\nfunction rgb_formatHex8() {\n return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;\n}\n\nfunction rgb_formatRgb() {\n const a = clampa(this.opacity);\n return `${a === 1 ? \"rgb(\" : \"rgba(\"}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? \")\" : `, ${a})`}`;\n}\n\nfunction clampa(opacity) {\n return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));\n}\n\nfunction clampi(value) {\n return Math.max(0, Math.min(255, Math.round(value) || 0));\n}\n\nfunction hex(value) {\n value = clampi(value);\n return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n if (a <= 0) h = s = l = NaN;\n else if (l <= 0 || l >= 1) h = s = NaN;\n else if (s <= 0) h = NaN;\n return new Hsl(h, s, l, a);\n}\n\nexport function hslConvert(o) {\n if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Hsl;\n if (o instanceof Hsl) return o;\n o = o.rgb();\n var r = o.r / 255,\n g = o.g / 255,\n b = o.b / 255,\n min = Math.min(r, g, b),\n max = Math.max(r, g, b),\n h = NaN,\n s = max - min,\n l = (max + min) / 2;\n if (s) {\n if (r === max) h = (g - b) / s + (g < b) * 6;\n else if (g === max) h = (b - r) / s + 2;\n else h = (r - g) / s + 4;\n s /= l < 0.5 ? max + min : 2 - max - min;\n h *= 60;\n } else {\n s = l > 0 && l < 1 ? 0 : h;\n }\n return new Hsl(h, s, l, o.opacity);\n}\n\nexport function hsl(h, s, l, opacity) {\n return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n this.opacity = +opacity;\n}\n\ndefine(Hsl, hsl, extend(Color, {\n brighter(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n darker(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n rgb() {\n var h = this.h % 360 + (this.h < 0) * 360,\n s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n l = this.l,\n m2 = l + (l < 0.5 ? l : 1 - l) * s,\n m1 = 2 * l - m2;\n return new Rgb(\n hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n hsl2rgb(h, m1, m2),\n hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n this.opacity\n );\n },\n clamp() {\n return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));\n },\n displayable() {\n return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n && (0 <= this.l && this.l <= 1)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n formatHsl() {\n const a = clampa(this.opacity);\n return `${a === 1 ? \"hsl(\" : \"hsla(\"}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? \")\" : `, ${a})`}`;\n }\n}));\n\nfunction clamph(value) {\n value = (value || 0) % 360;\n return value < 0 ? value + 360 : value;\n}\n\nfunction clampt(value) {\n return Math.max(0, Math.min(1, value || 0));\n}\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n return (h < 60 ? m1 + (m2 - m1) * h / 60\n : h < 180 ? m2\n : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n : m1) * 255;\n}\n","export const radians = Math.PI / 180;\nexport const degrees = 180 / Math.PI;\n","import define, {extend} from \"./define.js\";\nimport {Color, rgbConvert, Rgb} from \"./color.js\";\nimport {degrees, radians} from \"./math.js\";\n\n// https://observablehq.com/@mbostock/lab-and-rgb\nconst K = 18,\n Xn = 0.96422,\n Yn = 1,\n Zn = 0.82521,\n t0 = 4 / 29,\n t1 = 6 / 29,\n t2 = 3 * t1 * t1,\n t3 = t1 * t1 * t1;\n\nfunction labConvert(o) {\n if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);\n if (o instanceof Hcl) return hcl2lab(o);\n if (!(o instanceof Rgb)) o = rgbConvert(o);\n var r = rgb2lrgb(o.r),\n g = rgb2lrgb(o.g),\n b = rgb2lrgb(o.b),\n y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;\n if (r === g && g === b) x = z = y; else {\n x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);\n z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);\n }\n return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);\n}\n\nexport function gray(l, opacity) {\n return new Lab(l, 0, 0, opacity == null ? 1 : opacity);\n}\n\nexport default function lab(l, a, b, opacity) {\n return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);\n}\n\nexport function Lab(l, a, b, opacity) {\n this.l = +l;\n this.a = +a;\n this.b = +b;\n this.opacity = +opacity;\n}\n\ndefine(Lab, lab, extend(Color, {\n brighter(k) {\n return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n },\n darker(k) {\n return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n },\n rgb() {\n var y = (this.l + 16) / 116,\n x = isNaN(this.a) ? y : y + this.a / 500,\n z = isNaN(this.b) ? y : y - this.b / 200;\n x = Xn * lab2xyz(x);\n y = Yn * lab2xyz(y);\n z = Zn * lab2xyz(z);\n return new Rgb(\n lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),\n lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),\n lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),\n this.opacity\n );\n }\n}));\n\nfunction xyz2lab(t) {\n return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\n\nfunction lab2xyz(t) {\n return t > t1 ? t * t * t : t2 * (t - t0);\n}\n\nfunction lrgb2rgb(x) {\n return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\n\nfunction rgb2lrgb(x) {\n return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\n\nfunction hclConvert(o) {\n if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);\n if (!(o instanceof Lab)) o = labConvert(o);\n if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);\n var h = Math.atan2(o.b, o.a) * degrees;\n return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);\n}\n\nexport function lch(l, c, h, opacity) {\n return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nexport function hcl(h, c, l, opacity) {\n return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nexport function Hcl(h, c, l, opacity) {\n this.h = +h;\n this.c = +c;\n this.l = +l;\n this.opacity = +opacity;\n}\n\nfunction hcl2lab(o) {\n if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);\n var h = o.h * radians;\n return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);\n}\n\ndefine(Hcl, hcl, extend(Color, {\n brighter(k) {\n return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);\n },\n darker(k) {\n return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);\n },\n rgb() {\n return hcl2lab(this).rgb();\n }\n}));\n","export {default as color, rgb, hsl} from \"./color.js\";\nexport {default as lab, hcl, lch, gray} from \"./lab.js\";\nexport {default as cubehelix} from \"./cubehelix.js\";\n","export function basis(t1, v0, v1, v2, v3) {\n var t2 = t1 * t1, t3 = t2 * t1;\n return ((1 - 3 * t1 + 3 * t2 - t3) * v0\n + (4 - 6 * t2 + 3 * t3) * v1\n + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2\n + t3 * v3) / 6;\n}\n\nexport default function(values) {\n var n = values.length - 1;\n return function(t) {\n var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n v1 = values[i],\n v2 = values[i + 1],\n v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}\n","import {basis} from \"./basis.js\";\n\nexport default function(values) {\n var n = values.length;\n return function(t) {\n var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n v0 = values[(i + n - 1) % n],\n v1 = values[i % n],\n v2 = values[(i + 1) % n],\n v3 = values[(i + 2) % n];\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}\n","export default x => () => x;\n","import constant from \"./constant.js\";\n\nfunction linear(a, d) {\n return function(t) {\n return a + t * d;\n };\n}\n\nfunction exponential(a, b, y) {\n return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n return Math.pow(a + t * b, y);\n };\n}\n\nexport function hue(a, b) {\n var d = b - a;\n return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);\n}\n\nexport function gamma(y) {\n return (y = +y) === 1 ? nogamma : function(a, b) {\n return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);\n };\n}\n\nexport default function nogamma(a, b) {\n var d = b - a;\n return d ? linear(a, d) : constant(isNaN(a) ? b : a);\n}\n","import {rgb as colorRgb} from \"d3-color\";\nimport basis from \"./basis.js\";\nimport basisClosed from \"./basisClosed.js\";\nimport nogamma, {gamma} from \"./color.js\";\n\nexport default (function rgbGamma(y) {\n var color = gamma(y);\n\n function rgb(start, end) {\n var r = color((start = colorRgb(start)).r, (end = colorRgb(end)).r),\n g = color(start.g, end.g),\n b = color(start.b, end.b),\n opacity = nogamma(start.opacity, end.opacity);\n return function(t) {\n start.r = r(t);\n start.g = g(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n rgb.gamma = rgbGamma;\n\n return rgb;\n})(1);\n\nfunction rgbSpline(spline) {\n return function(colors) {\n var n = colors.length,\n r = new Array(n),\n g = new Array(n),\n b = new Array(n),\n i, color;\n for (i = 0; i < n; ++i) {\n color = colorRgb(colors[i]);\n r[i] = color.r || 0;\n g[i] = color.g || 0;\n b[i] = color.b || 0;\n }\n r = spline(r);\n g = spline(g);\n b = spline(b);\n color.opacity = 1;\n return function(t) {\n color.r = r(t);\n color.g = g(t);\n color.b = b(t);\n return color + \"\";\n };\n };\n}\n\nexport var rgbBasis = rgbSpline(basis);\nexport var rgbBasisClosed = rgbSpline(basisClosed);\n","export default function(a, b) {\n if (!b) b = [];\n var n = a ? Math.min(b.length, a.length) : 0,\n c = b.slice(),\n i;\n return function(t) {\n for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;\n return c;\n };\n}\n\nexport function isNumberArray(x) {\n return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\n","import value from \"./value.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n return (isNumberArray(b) ? numberArray : genericArray)(a, b);\n}\n\nexport function genericArray(a, b) {\n var nb = b ? b.length : 0,\n na = a ? Math.min(nb, a.length) : 0,\n x = new Array(na),\n c = new Array(nb),\n i;\n\n for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]);\n for (; i < nb; ++i) c[i] = b[i];\n\n return function(t) {\n for (i = 0; i < na; ++i) c[i] = x[i](t);\n return c;\n };\n}\n","export default function(a, b) {\n var d = new Date;\n return a = +a, b = +b, function(t) {\n return d.setTime(a * (1 - t) + b * t), d;\n };\n}\n","export default function(a, b) {\n return a = +a, b = +b, function(t) {\n return a * (1 - t) + b * t;\n };\n}\n","import value from \"./value.js\";\n\nexport default function(a, b) {\n var i = {},\n c = {},\n k;\n\n if (a === null || typeof a !== \"object\") a = {};\n if (b === null || typeof b !== \"object\") b = {};\n\n for (k in b) {\n if (k in a) {\n i[k] = value(a[k], b[k]);\n } else {\n c[k] = b[k];\n }\n }\n\n return function(t) {\n for (k in i) c[k] = i[k](t);\n return c;\n };\n}\n","import number from \"./number.js\";\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n return function() {\n return b;\n };\n}\n\nfunction one(b) {\n return function(t) {\n return b(t) + \"\";\n };\n}\n\nexport default function(a, b) {\n var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n am, // current match in a\n bm, // current match in b\n bs, // string preceding current number in b, if any\n i = -1, // index in s\n s = [], // string constants and placeholders\n q = []; // number interpolators\n\n // Coerce inputs to strings.\n a = a + \"\", b = b + \"\";\n\n // Interpolate pairs of numbers in a & b.\n while ((am = reA.exec(a))\n && (bm = reB.exec(b))) {\n if ((bs = bm.index) > bi) { // a string precedes the next number in b\n bs = b.slice(bi, bs);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n if (s[i]) s[i] += bm; // coalesce with previous string\n else s[++i] = bm;\n } else { // interpolate non-matching numbers\n s[++i] = null;\n q.push({i: i, x: number(am, bm)});\n }\n bi = reB.lastIndex;\n }\n\n // Add remains of b.\n if (bi < b.length) {\n bs = b.slice(bi);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n\n // Special optimization for only a single match.\n // Otherwise, interpolate each of the numbers and rejoin the string.\n return s.length < 2 ? (q[0]\n ? one(q[0].x)\n : zero(b))\n : (b = q.length, function(t) {\n for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n });\n}\n","import {color} from \"d3-color\";\nimport rgb from \"./rgb.js\";\nimport {genericArray} from \"./array.js\";\nimport date from \"./date.js\";\nimport number from \"./number.js\";\nimport object from \"./object.js\";\nimport string from \"./string.js\";\nimport constant from \"./constant.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n var t = typeof b, c;\n return b == null || t === \"boolean\" ? constant(b)\n : (t === \"number\" ? number\n : t === \"string\" ? ((c = color(b)) ? (b = c, rgb) : string)\n : b instanceof color ? rgb\n : b instanceof Date ? date\n : isNumberArray(b) ? numberArray\n : Array.isArray(b) ? genericArray\n : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? object\n : number)(a, b);\n}\n","export default function(a, b) {\n return a = +a, b = +b, function(t) {\n return Math.round(a * (1 - t) + b * t);\n };\n}\n","var degrees = 180 / Math.PI;\n\nexport var identity = {\n translateX: 0,\n translateY: 0,\n rotate: 0,\n skewX: 0,\n scaleX: 1,\n scaleY: 1\n};\n\nexport default function(a, b, c, d, e, f) {\n var scaleX, scaleY, skewX;\n if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;\n if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;\n if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;\n if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;\n return {\n translateX: e,\n translateY: f,\n rotate: Math.atan2(b, a) * degrees,\n skewX: Math.atan(skewX) * degrees,\n scaleX: scaleX,\n scaleY: scaleY\n };\n}\n","import decompose, {identity} from \"./decompose.js\";\n\nvar svgNode;\n\n/* eslint-disable no-undef */\nexport function parseCss(value) {\n const m = new (typeof DOMMatrix === \"function\" ? DOMMatrix : WebKitCSSMatrix)(value + \"\");\n return m.isIdentity ? identity : decompose(m.a, m.b, m.c, m.d, m.e, m.f);\n}\n\nexport function parseSvg(value) {\n if (value == null) return identity;\n if (!svgNode) svgNode = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n svgNode.setAttribute(\"transform\", value);\n if (!(value = svgNode.transform.baseVal.consolidate())) return identity;\n value = value.matrix;\n return decompose(value.a, value.b, value.c, value.d, value.e, value.f);\n}\n","import number from \"../number.js\";\nimport {parseCss, parseSvg} from \"./parse.js\";\n\nfunction interpolateTransform(parse, pxComma, pxParen, degParen) {\n\n function pop(s) {\n return s.length ? s.pop() + \" \" : \"\";\n }\n\n function translate(xa, ya, xb, yb, s, q) {\n if (xa !== xb || ya !== yb) {\n var i = s.push(\"translate(\", null, pxComma, null, pxParen);\n q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n } else if (xb || yb) {\n s.push(\"translate(\" + xb + pxComma + yb + pxParen);\n }\n }\n\n function rotate(a, b, s, q) {\n if (a !== b) {\n if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path\n q.push({i: s.push(pop(s) + \"rotate(\", null, degParen) - 2, x: number(a, b)});\n } else if (b) {\n s.push(pop(s) + \"rotate(\" + b + degParen);\n }\n }\n\n function skewX(a, b, s, q) {\n if (a !== b) {\n q.push({i: s.push(pop(s) + \"skewX(\", null, degParen) - 2, x: number(a, b)});\n } else if (b) {\n s.push(pop(s) + \"skewX(\" + b + degParen);\n }\n }\n\n function scale(xa, ya, xb, yb, s, q) {\n if (xa !== xb || ya !== yb) {\n var i = s.push(pop(s) + \"scale(\", null, \",\", null, \")\");\n q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n } else if (xb !== 1 || yb !== 1) {\n s.push(pop(s) + \"scale(\" + xb + \",\" + yb + \")\");\n }\n }\n\n return function(a, b) {\n var s = [], // string constants and placeholders\n q = []; // number interpolators\n a = parse(a), b = parse(b);\n translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);\n rotate(a.rotate, b.rotate, s, q);\n skewX(a.skewX, b.skewX, s, q);\n scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);\n a = b = null; // gc\n return function(t) {\n var i = -1, n = q.length, o;\n while (++i < n) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n };\n };\n}\n\nexport var interpolateTransformCss = interpolateTransform(parseCss, \"px, \", \"px)\", \"deg)\");\nexport var interpolateTransformSvg = interpolateTransform(parseSvg, \", \", \")\", \")\");\n","var epsilon2 = 1e-12;\n\nfunction cosh(x) {\n return ((x = Math.exp(x)) + 1 / x) / 2;\n}\n\nfunction sinh(x) {\n return ((x = Math.exp(x)) - 1 / x) / 2;\n}\n\nfunction tanh(x) {\n return ((x = Math.exp(2 * x)) - 1) / (x + 1);\n}\n\nexport default (function zoomRho(rho, rho2, rho4) {\n\n // p0 = [ux0, uy0, w0]\n // p1 = [ux1, uy1, w1]\n function zoom(p0, p1) {\n var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],\n ux1 = p1[0], uy1 = p1[1], w1 = p1[2],\n dx = ux1 - ux0,\n dy = uy1 - uy0,\n d2 = dx * dx + dy * dy,\n i,\n S;\n\n // Special case for u0 ≅ u1.\n if (d2 < epsilon2) {\n S = Math.log(w1 / w0) / rho;\n i = function(t) {\n return [\n ux0 + t * dx,\n uy0 + t * dy,\n w0 * Math.exp(rho * t * S)\n ];\n }\n }\n\n // General case.\n else {\n var d1 = Math.sqrt(d2),\n b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),\n b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),\n r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),\n r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n S = (r1 - r0) / rho;\n i = function(t) {\n var s = t * S,\n coshr0 = cosh(r0),\n u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n return [\n ux0 + u * dx,\n uy0 + u * dy,\n w0 * coshr0 / cosh(rho * s + r0)\n ];\n }\n }\n\n i.duration = S * 1000 * rho / Math.SQRT2;\n\n return i;\n }\n\n zoom.rho = function(_) {\n var _1 = Math.max(1e-3, +_), _2 = _1 * _1, _4 = _2 * _2;\n return zoomRho(_1, _2, _4);\n };\n\n return zoom;\n})(Math.SQRT2, 2, 4);\n","import {hcl as colorHcl} from \"d3-color\";\nimport color, {hue} from \"./color.js\";\n\nfunction hcl(hue) {\n return function(start, end) {\n var h = hue((start = colorHcl(start)).h, (end = colorHcl(end)).h),\n c = color(start.c, end.c),\n l = color(start.l, end.l),\n opacity = color(start.opacity, end.opacity);\n return function(t) {\n start.h = h(t);\n start.c = c(t);\n start.l = l(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n}\n\nexport default hcl(hue);\nexport var hclLong = hcl(color);\n","export {default as interpolate} from \"./value.js\";\nexport {default as interpolateArray} from \"./array.js\";\nexport {default as interpolateBasis} from \"./basis.js\";\nexport {default as interpolateBasisClosed} from \"./basisClosed.js\";\nexport {default as interpolateDate} from \"./date.js\";\nexport {default as interpolateDiscrete} from \"./discrete.js\";\nexport {default as interpolateHue} from \"./hue.js\";\nexport {default as interpolateNumber} from \"./number.js\";\nexport {default as interpolateNumberArray} from \"./numberArray.js\";\nexport {default as interpolateObject} from \"./object.js\";\nexport {default as interpolateRound} from \"./round.js\";\nexport {default as interpolateString} from \"./string.js\";\nexport {interpolateTransformCss, interpolateTransformSvg} from \"./transform/index.js\";\nexport {default as interpolateZoom} from \"./zoom.js\";\nexport {default as interpolateRgb, rgbBasis as interpolateRgbBasis, rgbBasisClosed as interpolateRgbBasisClosed} from \"./rgb.js\";\nexport {default as interpolateHsl, hslLong as interpolateHslLong} from \"./hsl.js\";\nexport {default as interpolateLab} from \"./lab.js\";\nexport {default as interpolateHcl, hclLong as interpolateHclLong} from \"./hcl.js\";\nexport {default as interpolateCubehelix, cubehelixLong as interpolateCubehelixLong} from \"./cubehelix.js\";\nexport {default as piecewise} from \"./piecewise.js\";\nexport {default as quantize} from \"./quantize.js\";\n","var frame = 0, // is an animation frame pending?\n timeout = 0, // is a timeout pending?\n interval = 0, // are any timers active?\n pokeDelay = 1000, // how frequently we check for clock skew\n taskHead,\n taskTail,\n clockLast = 0,\n clockNow = 0,\n clockSkew = 0,\n clock = typeof performance === \"object\" && performance.now ? performance : Date,\n setFrame = typeof window === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };\n\nexport function now() {\n return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\n\nfunction clearNow() {\n clockNow = 0;\n}\n\nexport function Timer() {\n this._call =\n this._time =\n this._next = null;\n}\n\nTimer.prototype = timer.prototype = {\n constructor: Timer,\n restart: function(callback, delay, time) {\n if (typeof callback !== \"function\") throw new TypeError(\"callback is not a function\");\n time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n if (!this._next && taskTail !== this) {\n if (taskTail) taskTail._next = this;\n else taskHead = this;\n taskTail = this;\n }\n this._call = callback;\n this._time = time;\n sleep();\n },\n stop: function() {\n if (this._call) {\n this._call = null;\n this._time = Infinity;\n sleep();\n }\n }\n};\n\nexport function timer(callback, delay, time) {\n var t = new Timer;\n t.restart(callback, delay, time);\n return t;\n}\n\nexport function timerFlush() {\n now(); // Get the current time, if not already set.\n ++frame; // Pretend we’ve set an alarm, if we haven’t already.\n var t = taskHead, e;\n while (t) {\n if ((e = clockNow - t._time) >= 0) t._call.call(undefined, e);\n t = t._next;\n }\n --frame;\n}\n\nfunction wake() {\n clockNow = (clockLast = clock.now()) + clockSkew;\n frame = timeout = 0;\n try {\n timerFlush();\n } finally {\n frame = 0;\n nap();\n clockNow = 0;\n }\n}\n\nfunction poke() {\n var now = clock.now(), delay = now - clockLast;\n if (delay > pokeDelay) clockSkew -= delay, clockLast = now;\n}\n\nfunction nap() {\n var t0, t1 = taskHead, t2, time = Infinity;\n while (t1) {\n if (t1._call) {\n if (time > t1._time) time = t1._time;\n t0 = t1, t1 = t1._next;\n } else {\n t2 = t1._next, t1._next = null;\n t1 = t0 ? t0._next = t2 : taskHead = t2;\n }\n }\n taskTail = t0;\n sleep(time);\n}\n\nfunction sleep(time) {\n if (frame) return; // Soonest alarm already set, or will be.\n if (timeout) timeout = clearTimeout(timeout);\n var delay = time - clockNow; // Strictly less than if we recomputed clockNow.\n if (delay > 24) {\n if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);\n if (interval) interval = clearInterval(interval);\n } else {\n if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n frame = 1, setFrame(wake);\n }\n}\n","import {Timer} from \"./timer.js\";\n\nexport default function(callback, delay, time) {\n var t = new Timer;\n delay = delay == null ? 0 : +delay;\n t.restart(elapsed => {\n t.stop();\n callback(elapsed + delay);\n }, delay, time);\n return t;\n}\n","export {\n now,\n timer,\n timerFlush\n} from \"./timer.js\";\n\nexport {\n default as timeout\n} from \"./timeout.js\";\n\nexport {\n default as interval\n} from \"./interval.js\";\n","import {dispatch} from \"d3-dispatch\";\nimport {timer, timeout} from \"d3-timer\";\n\nvar emptyOn = dispatch(\"start\", \"end\", \"cancel\", \"interrupt\");\nvar emptyTween = [];\n\nexport var CREATED = 0;\nexport var SCHEDULED = 1;\nexport var STARTING = 2;\nexport var STARTED = 3;\nexport var RUNNING = 4;\nexport var ENDING = 5;\nexport var ENDED = 6;\n\nexport default function(node, name, id, index, group, timing) {\n var schedules = node.__transition;\n if (!schedules) node.__transition = {};\n else if (id in schedules) return;\n create(node, id, {\n name: name,\n index: index, // For context during callback.\n group: group, // For context during callback.\n on: emptyOn,\n tween: emptyTween,\n time: timing.time,\n delay: timing.delay,\n duration: timing.duration,\n ease: timing.ease,\n timer: null,\n state: CREATED\n });\n}\n\nexport function init(node, id) {\n var schedule = get(node, id);\n if (schedule.state > CREATED) throw new Error(\"too late; already scheduled\");\n return schedule;\n}\n\nexport function set(node, id) {\n var schedule = get(node, id);\n if (schedule.state > STARTED) throw new Error(\"too late; already running\");\n return schedule;\n}\n\nexport function get(node, id) {\n var schedule = node.__transition;\n if (!schedule || !(schedule = schedule[id])) throw new Error(\"transition not found\");\n return schedule;\n}\n\nfunction create(node, id, self) {\n var schedules = node.__transition,\n tween;\n\n // Initialize the self timer when the transition is created.\n // Note the actual delay is not known until the first callback!\n schedules[id] = self;\n self.timer = timer(schedule, 0, self.time);\n\n function schedule(elapsed) {\n self.state = SCHEDULED;\n self.timer.restart(start, self.delay, self.time);\n\n // If the elapsed delay is less than our first sleep, start immediately.\n if (self.delay <= elapsed) start(elapsed - self.delay);\n }\n\n function start(elapsed) {\n var i, j, n, o;\n\n // If the state is not SCHEDULED, then we previously errored on start.\n if (self.state !== SCHEDULED) return stop();\n\n for (i in schedules) {\n o = schedules[i];\n if (o.name !== self.name) continue;\n\n // While this element already has a starting transition during this frame,\n // defer starting an interrupting transition until that transition has a\n // chance to tick (and possibly end); see d3/d3-transition#54!\n if (o.state === STARTED) return timeout(start);\n\n // Interrupt the active transition, if any.\n if (o.state === RUNNING) {\n o.state = ENDED;\n o.timer.stop();\n o.on.call(\"interrupt\", node, node.__data__, o.index, o.group);\n delete schedules[i];\n }\n\n // Cancel any pre-empted transitions.\n else if (+i < id) {\n o.state = ENDED;\n o.timer.stop();\n o.on.call(\"cancel\", node, node.__data__, o.index, o.group);\n delete schedules[i];\n }\n }\n\n // Defer the first tick to end of the current frame; see d3/d3#1576.\n // Note the transition may be canceled after start and before the first tick!\n // Note this must be scheduled before the start event; see d3/d3-transition#16!\n // Assuming this is successful, subsequent callbacks go straight to tick.\n timeout(function() {\n if (self.state === STARTED) {\n self.state = RUNNING;\n self.timer.restart(tick, self.delay, self.time);\n tick(elapsed);\n }\n });\n\n // Dispatch the start event.\n // Note this must be done before the tween are initialized.\n self.state = STARTING;\n self.on.call(\"start\", node, node.__data__, self.index, self.group);\n if (self.state !== STARTING) return; // interrupted\n self.state = STARTED;\n\n // Initialize the tween, deleting null tween.\n tween = new Array(n = self.tween.length);\n for (i = 0, j = -1; i < n; ++i) {\n if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {\n tween[++j] = o;\n }\n }\n tween.length = j + 1;\n }\n\n function tick(elapsed) {\n var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1),\n i = -1,\n n = tween.length;\n\n while (++i < n) {\n tween[i].call(node, t);\n }\n\n // Dispatch the end event.\n if (self.state === ENDING) {\n self.on.call(\"end\", node, node.__data__, self.index, self.group);\n stop();\n }\n }\n\n function stop() {\n self.state = ENDED;\n self.timer.stop();\n delete schedules[id];\n for (var i in schedules) return; // eslint-disable-line no-unused-vars\n delete node.__transition;\n }\n}\n","import {STARTING, ENDING, ENDED} from \"./transition/schedule.js\";\n\nexport default function(node, name) {\n var schedules = node.__transition,\n schedule,\n active,\n empty = true,\n i;\n\n if (!schedules) return;\n\n name = name == null ? null : name + \"\";\n\n for (i in schedules) {\n if ((schedule = schedules[i]).name !== name) { empty = false; continue; }\n active = schedule.state > STARTING && schedule.state < ENDING;\n schedule.state = ENDED;\n schedule.timer.stop();\n schedule.on.call(active ? \"interrupt\" : \"cancel\", node, node.__data__, schedule.index, schedule.group);\n delete schedules[i];\n }\n\n if (empty) delete node.__transition;\n}\n","import interrupt from \"../interrupt.js\";\n\nexport default function(name) {\n return this.each(function() {\n interrupt(this, name);\n });\n}\n","import {get, set} from \"./schedule.js\";\n\nfunction tweenRemove(id, name) {\n var tween0, tween1;\n return function() {\n var schedule = set(this, id),\n tween = schedule.tween;\n\n // If this node shared tween with the previous node,\n // just assign the updated shared tween and we’re done!\n // Otherwise, copy-on-write.\n if (tween !== tween0) {\n tween1 = tween0 = tween;\n for (var i = 0, n = tween1.length; i < n; ++i) {\n if (tween1[i].name === name) {\n tween1 = tween1.slice();\n tween1.splice(i, 1);\n break;\n }\n }\n }\n\n schedule.tween = tween1;\n };\n}\n\nfunction tweenFunction(id, name, value) {\n var tween0, tween1;\n if (typeof value !== \"function\") throw new Error;\n return function() {\n var schedule = set(this, id),\n tween = schedule.tween;\n\n // If this node shared tween with the previous node,\n // just assign the updated shared tween and we’re done!\n // Otherwise, copy-on-write.\n if (tween !== tween0) {\n tween1 = (tween0 = tween).slice();\n for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) {\n if (tween1[i].name === name) {\n tween1[i] = t;\n break;\n }\n }\n if (i === n) tween1.push(t);\n }\n\n schedule.tween = tween1;\n };\n}\n\nexport default function(name, value) {\n var id = this._id;\n\n name += \"\";\n\n if (arguments.length < 2) {\n var tween = get(this.node(), id).tween;\n for (var i = 0, n = tween.length, t; i < n; ++i) {\n if ((t = tween[i]).name === name) {\n return t.value;\n }\n }\n return null;\n }\n\n return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));\n}\n\nexport function tweenValue(transition, name, value) {\n var id = transition._id;\n\n transition.each(function() {\n var schedule = set(this, id);\n (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments);\n });\n\n return function(node) {\n return get(node, id).value[name];\n };\n}\n","import {color} from \"d3-color\";\nimport {interpolateNumber, interpolateRgb, interpolateString} from \"d3-interpolate\";\n\nexport default function(a, b) {\n var c;\n return (typeof b === \"number\" ? interpolateNumber\n : b instanceof color ? interpolateRgb\n : (c = color(b)) ? (b = c, interpolateRgb)\n : interpolateString)(a, b);\n}\n","import {interpolateTransformSvg as interpolateTransform} from \"d3-interpolate\";\nimport {namespace} from \"d3-selection\";\nimport {tweenValue} from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\n\nfunction attrRemove(name) {\n return function() {\n this.removeAttribute(name);\n };\n}\n\nfunction attrRemoveNS(fullname) {\n return function() {\n this.removeAttributeNS(fullname.space, fullname.local);\n };\n}\n\nfunction attrConstant(name, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function() {\n var string0 = this.getAttribute(name);\n return string0 === string1 ? null\n : string0 === string00 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction attrConstantNS(fullname, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function() {\n var string0 = this.getAttributeNS(fullname.space, fullname.local);\n return string0 === string1 ? null\n : string0 === string00 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction attrFunction(name, interpolate, value) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0, value1 = value(this), string1;\n if (value1 == null) return void this.removeAttribute(name);\n string0 = this.getAttribute(name);\n string1 = value1 + \"\";\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nfunction attrFunctionNS(fullname, interpolate, value) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0, value1 = value(this), string1;\n if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);\n string0 = this.getAttributeNS(fullname.space, fullname.local);\n string1 = value1 + \"\";\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nexport default function(name, value) {\n var fullname = namespace(name), i = fullname === \"transform\" ? interpolateTransform : interpolate;\n return this.attrTween(name, typeof value === \"function\"\n ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, tweenValue(this, \"attr.\" + name, value))\n : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname)\n : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));\n}\n","import {namespace} from \"d3-selection\";\n\nfunction attrInterpolate(name, i) {\n return function(t) {\n this.setAttribute(name, i.call(this, t));\n };\n}\n\nfunction attrInterpolateNS(fullname, i) {\n return function(t) {\n this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));\n };\n}\n\nfunction attrTweenNS(fullname, value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\n\nfunction attrTween(name, value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\n\nexport default function(name, value) {\n var key = \"attr.\" + name;\n if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error;\n var fullname = namespace(name);\n return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));\n}\n","import {get, init} from \"./schedule.js\";\n\nfunction delayFunction(id, value) {\n return function() {\n init(this, id).delay = +value.apply(this, arguments);\n };\n}\n\nfunction delayConstant(id, value) {\n return value = +value, function() {\n init(this, id).delay = value;\n };\n}\n\nexport default function(value) {\n var id = this._id;\n\n return arguments.length\n ? this.each((typeof value === \"function\"\n ? delayFunction\n : delayConstant)(id, value))\n : get(this.node(), id).delay;\n}\n","import {get, set} from \"./schedule.js\";\n\nfunction durationFunction(id, value) {\n return function() {\n set(this, id).duration = +value.apply(this, arguments);\n };\n}\n\nfunction durationConstant(id, value) {\n return value = +value, function() {\n set(this, id).duration = value;\n };\n}\n\nexport default function(value) {\n var id = this._id;\n\n return arguments.length\n ? this.each((typeof value === \"function\"\n ? durationFunction\n : durationConstant)(id, value))\n : get(this.node(), id).duration;\n}\n","import {get, set} from \"./schedule.js\";\n\nfunction easeConstant(id, value) {\n if (typeof value !== \"function\") throw new Error;\n return function() {\n set(this, id).ease = value;\n };\n}\n\nexport default function(value) {\n var id = this._id;\n\n return arguments.length\n ? this.each(easeConstant(id, value))\n : get(this.node(), id).ease;\n}\n","import {set} from \"./schedule.js\";\n\nfunction easeVarying(id, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (typeof v !== \"function\") throw new Error;\n set(this, id).ease = v;\n };\n}\n\nexport default function(value) {\n if (typeof value !== \"function\") throw new Error;\n return this.each(easeVarying(this._id, value));\n}\n","import {matcher} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\n\nexport default function(match) {\n if (typeof match !== \"function\") match = matcher(match);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n subgroup.push(node);\n }\n }\n }\n\n return new Transition(subgroups, this._parents, this._name, this._id);\n}\n","import {Transition} from \"./index.js\";\n\nexport default function(transition) {\n if (transition._id !== this._id) throw new Error;\n\n for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group0[i] || group1[i]) {\n merge[i] = node;\n }\n }\n }\n\n for (; j < m0; ++j) {\n merges[j] = groups0[j];\n }\n\n return new Transition(merges, this._parents, this._name, this._id);\n}\n","import {get, set, init} from \"./schedule.js\";\n\nfunction start(name) {\n return (name + \"\").trim().split(/^|\\s+/).every(function(t) {\n var i = t.indexOf(\".\");\n if (i >= 0) t = t.slice(0, i);\n return !t || t === \"start\";\n });\n}\n\nfunction onFunction(id, name, listener) {\n var on0, on1, sit = start(name) ? init : set;\n return function() {\n var schedule = sit(this, id),\n on = schedule.on;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we’re done!\n // Otherwise, copy-on-write.\n if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);\n\n schedule.on = on1;\n };\n}\n\nexport default function(name, listener) {\n var id = this._id;\n\n return arguments.length < 2\n ? get(this.node(), id).on.on(name)\n : this.each(onFunction(id, name, listener));\n}\n","function removeFunction(id) {\n return function() {\n var parent = this.parentNode;\n for (var i in this.__transition) if (+i !== id) return;\n if (parent) parent.removeChild(this);\n };\n}\n\nexport default function() {\n return this.on(\"end.remove\", removeFunction(this._id));\n}\n","import {selector} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function(select) {\n var name = this._name,\n id = this._id;\n\n if (typeof select !== \"function\") select = selector(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n if (\"__data__\" in node) subnode.__data__ = node.__data__;\n subgroup[i] = subnode;\n schedule(subgroup[i], name, id, i, subgroup, get(node, id));\n }\n }\n }\n\n return new Transition(subgroups, this._parents, name, id);\n}\n","import {selectorAll} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function(select) {\n var name = this._name,\n id = this._id;\n\n if (typeof select !== \"function\") select = selectorAll(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n for (var children = select.call(node, node.__data__, i, group), child, inherit = get(node, id), k = 0, l = children.length; k < l; ++k) {\n if (child = children[k]) {\n schedule(child, name, id, k, children, inherit);\n }\n }\n subgroups.push(children);\n parents.push(node);\n }\n }\n }\n\n return new Transition(subgroups, parents, name, id);\n}\n","import {selection} from \"d3-selection\";\n\nvar Selection = selection.prototype.constructor;\n\nexport default function() {\n return new Selection(this._groups, this._parents);\n}\n","import {interpolateTransformCss as interpolateTransform} from \"d3-interpolate\";\nimport {style} from \"d3-selection\";\nimport {set} from \"./schedule.js\";\nimport {tweenValue} from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\n\nfunction styleNull(name, interpolate) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0 = style(this, name),\n string1 = (this.style.removeProperty(name), style(this, name));\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, string10 = string1);\n };\n}\n\nfunction styleRemove(name) {\n return function() {\n this.style.removeProperty(name);\n };\n}\n\nfunction styleConstant(name, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function() {\n var string0 = style(this, name);\n return string0 === string1 ? null\n : string0 === string00 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction styleFunction(name, interpolate, value) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0 = style(this, name),\n value1 = value(this),\n string1 = value1 + \"\";\n if (value1 == null) string1 = value1 = (this.style.removeProperty(name), style(this, name));\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nfunction styleMaybeRemove(id, name) {\n var on0, on1, listener0, key = \"style.\" + name, event = \"end.\" + key, remove;\n return function() {\n var schedule = set(this, id),\n on = schedule.on,\n listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we’re done!\n // Otherwise, copy-on-write.\n if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);\n\n schedule.on = on1;\n };\n}\n\nexport default function(name, value, priority) {\n var i = (name += \"\") === \"transform\" ? interpolateTransform : interpolate;\n return value == null ? this\n .styleTween(name, styleNull(name, i))\n .on(\"end.style.\" + name, styleRemove(name))\n : typeof value === \"function\" ? this\n .styleTween(name, styleFunction(name, i, tweenValue(this, \"style.\" + name, value)))\n .each(styleMaybeRemove(this._id, name))\n : this\n .styleTween(name, styleConstant(name, i, value), priority)\n .on(\"end.style.\" + name, null);\n}\n","function styleInterpolate(name, i, priority) {\n return function(t) {\n this.style.setProperty(name, i.call(this, t), priority);\n };\n}\n\nfunction styleTween(name, value, priority) {\n var t, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);\n return t;\n }\n tween._value = value;\n return tween;\n}\n\nexport default function(name, value, priority) {\n var key = \"style.\" + (name += \"\");\n if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error;\n return this.tween(key, styleTween(name, value, priority == null ? \"\" : priority));\n}\n","import {tweenValue} from \"./tween.js\";\n\nfunction textConstant(value) {\n return function() {\n this.textContent = value;\n };\n}\n\nfunction textFunction(value) {\n return function() {\n var value1 = value(this);\n this.textContent = value1 == null ? \"\" : value1;\n };\n}\n\nexport default function(value) {\n return this.tween(\"text\", typeof value === \"function\"\n ? textFunction(tweenValue(this, \"text\", value))\n : textConstant(value == null ? \"\" : value + \"\"));\n}\n","function textInterpolate(i) {\n return function(t) {\n this.textContent = i.call(this, t);\n };\n}\n\nfunction textTween(value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && textInterpolate(i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\n\nexport default function(value) {\n var key = \"text\";\n if (arguments.length < 1) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error;\n return this.tween(key, textTween(value));\n}\n","import {Transition, newId} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function() {\n var name = this._name,\n id0 = this._id,\n id1 = newId();\n\n for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n var inherit = get(node, id0);\n schedule(node, name, id1, i, group, {\n time: inherit.time + inherit.delay + inherit.duration,\n delay: 0,\n duration: inherit.duration,\n ease: inherit.ease\n });\n }\n }\n }\n\n return new Transition(groups, this._parents, name, id1);\n}\n","import {set} from \"./schedule.js\";\n\nexport default function() {\n var on0, on1, that = this, id = that._id, size = that.size();\n return new Promise(function(resolve, reject) {\n var cancel = {value: reject},\n end = {value: function() { if (--size === 0) resolve(); }};\n\n that.each(function() {\n var schedule = set(this, id),\n on = schedule.on;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we’re done!\n // Otherwise, copy-on-write.\n if (on !== on0) {\n on1 = (on0 = on).copy();\n on1._.cancel.push(cancel);\n on1._.interrupt.push(cancel);\n on1._.end.push(end);\n }\n\n schedule.on = on1;\n });\n\n // The selection was empty, resolve end immediately\n if (size === 0) resolve();\n });\n}\n","import {selection} from \"d3-selection\";\nimport transition_attr from \"./attr.js\";\nimport transition_attrTween from \"./attrTween.js\";\nimport transition_delay from \"./delay.js\";\nimport transition_duration from \"./duration.js\";\nimport transition_ease from \"./ease.js\";\nimport transition_easeVarying from \"./easeVarying.js\";\nimport transition_filter from \"./filter.js\";\nimport transition_merge from \"./merge.js\";\nimport transition_on from \"./on.js\";\nimport transition_remove from \"./remove.js\";\nimport transition_select from \"./select.js\";\nimport transition_selectAll from \"./selectAll.js\";\nimport transition_selection from \"./selection.js\";\nimport transition_style from \"./style.js\";\nimport transition_styleTween from \"./styleTween.js\";\nimport transition_text from \"./text.js\";\nimport transition_textTween from \"./textTween.js\";\nimport transition_transition from \"./transition.js\";\nimport transition_tween from \"./tween.js\";\nimport transition_end from \"./end.js\";\n\nvar id = 0;\n\nexport function Transition(groups, parents, name, id) {\n this._groups = groups;\n this._parents = parents;\n this._name = name;\n this._id = id;\n}\n\nexport default function transition(name) {\n return selection().transition(name);\n}\n\nexport function newId() {\n return ++id;\n}\n\nvar selection_prototype = selection.prototype;\n\nTransition.prototype = transition.prototype = {\n constructor: Transition,\n select: transition_select,\n selectAll: transition_selectAll,\n selectChild: selection_prototype.selectChild,\n selectChildren: selection_prototype.selectChildren,\n filter: transition_filter,\n merge: transition_merge,\n selection: transition_selection,\n transition: transition_transition,\n call: selection_prototype.call,\n nodes: selection_prototype.nodes,\n node: selection_prototype.node,\n size: selection_prototype.size,\n empty: selection_prototype.empty,\n each: selection_prototype.each,\n on: transition_on,\n attr: transition_attr,\n attrTween: transition_attrTween,\n style: transition_style,\n styleTween: transition_styleTween,\n text: transition_text,\n textTween: transition_textTween,\n remove: transition_remove,\n tween: transition_tween,\n delay: transition_delay,\n duration: transition_duration,\n ease: transition_ease,\n easeVarying: transition_easeVarying,\n end: transition_end,\n [Symbol.iterator]: selection_prototype[Symbol.iterator]\n};\n","export function cubicIn(t) {\n return t * t * t;\n}\n\nexport function cubicOut(t) {\n return --t * t * t + 1;\n}\n\nexport function cubicInOut(t) {\n return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;\n}\n","export {\n linear as easeLinear\n} from \"./linear.js\";\n\nexport {\n quadInOut as easeQuad,\n quadIn as easeQuadIn,\n quadOut as easeQuadOut,\n quadInOut as easeQuadInOut\n} from \"./quad.js\";\n\nexport {\n cubicInOut as easeCubic,\n cubicIn as easeCubicIn,\n cubicOut as easeCubicOut,\n cubicInOut as easeCubicInOut\n} from \"./cubic.js\";\n\nexport {\n polyInOut as easePoly,\n polyIn as easePolyIn,\n polyOut as easePolyOut,\n polyInOut as easePolyInOut\n} from \"./poly.js\";\n\nexport {\n sinInOut as easeSin,\n sinIn as easeSinIn,\n sinOut as easeSinOut,\n sinInOut as easeSinInOut\n} from \"./sin.js\";\n\nexport {\n expInOut as easeExp,\n expIn as easeExpIn,\n expOut as easeExpOut,\n expInOut as easeExpInOut\n} from \"./exp.js\";\n\nexport {\n circleInOut as easeCircle,\n circleIn as easeCircleIn,\n circleOut as easeCircleOut,\n circleInOut as easeCircleInOut\n} from \"./circle.js\";\n\nexport {\n bounceOut as easeBounce,\n bounceIn as easeBounceIn,\n bounceOut as easeBounceOut,\n bounceInOut as easeBounceInOut\n} from \"./bounce.js\";\n\nexport {\n backInOut as easeBack,\n backIn as easeBackIn,\n backOut as easeBackOut,\n backInOut as easeBackInOut\n} from \"./back.js\";\n\nexport {\n elasticOut as easeElastic,\n elasticIn as easeElasticIn,\n elasticOut as easeElasticOut,\n elasticInOut as easeElasticInOut\n} from \"./elastic.js\";\n","import {Transition, newId} from \"../transition/index.js\";\nimport schedule from \"../transition/schedule.js\";\nimport {easeCubicInOut} from \"d3-ease\";\nimport {now} from \"d3-timer\";\n\nvar defaultTiming = {\n time: null, // Set on use.\n delay: 0,\n duration: 250,\n ease: easeCubicInOut\n};\n\nfunction inherit(node, id) {\n var timing;\n while (!(timing = node.__transition) || !(timing = timing[id])) {\n if (!(node = node.parentNode)) {\n throw new Error(`transition ${id} not found`);\n }\n }\n return timing;\n}\n\nexport default function(name) {\n var id,\n timing;\n\n if (name instanceof Transition) {\n id = name._id, name = name._name;\n } else {\n id = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + \"\";\n }\n\n for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n schedule(node, name, id, i, group, timing || inherit(node, id));\n }\n }\n }\n\n return new Transition(groups, this._parents, name, id);\n}\n","import {selection} from \"d3-selection\";\nimport selection_interrupt from \"./interrupt.js\";\nimport selection_transition from \"./transition.js\";\n\nselection.prototype.interrupt = selection_interrupt;\nselection.prototype.transition = selection_transition;\n","import \"./selection/index.js\";\nexport {default as transition} from \"./transition/index.js\";\nexport {default as active} from \"./active.js\";\nexport {default as interrupt} from \"./interrupt.js\";\n","export default x => () => x;\n","export default function ZoomEvent(type, {\n sourceEvent,\n target,\n transform,\n dispatch\n}) {\n Object.defineProperties(this, {\n type: {value: type, enumerable: true, configurable: true},\n sourceEvent: {value: sourceEvent, enumerable: true, configurable: true},\n target: {value: target, enumerable: true, configurable: true},\n transform: {value: transform, enumerable: true, configurable: true},\n _: {value: dispatch}\n });\n}\n","export function Transform(k, x, y) {\n this.k = k;\n this.x = x;\n this.y = y;\n}\n\nTransform.prototype = {\n constructor: Transform,\n scale: function(k) {\n return k === 1 ? this : new Transform(this.k * k, this.x, this.y);\n },\n translate: function(x, y) {\n return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y);\n },\n apply: function(point) {\n return [point[0] * this.k + this.x, point[1] * this.k + this.y];\n },\n applyX: function(x) {\n return x * this.k + this.x;\n },\n applyY: function(y) {\n return y * this.k + this.y;\n },\n invert: function(location) {\n return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k];\n },\n invertX: function(x) {\n return (x - this.x) / this.k;\n },\n invertY: function(y) {\n return (y - this.y) / this.k;\n },\n rescaleX: function(x) {\n return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x));\n },\n rescaleY: function(y) {\n return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y));\n },\n toString: function() {\n return \"translate(\" + this.x + \",\" + this.y + \") scale(\" + this.k + \")\";\n }\n};\n\nexport var identity = new Transform(1, 0, 0);\n\ntransform.prototype = Transform.prototype;\n\nexport default function transform(node) {\n while (!node.__zoom) if (!(node = node.parentNode)) return identity;\n return node.__zoom;\n}\n","export function nopropagation(event) {\n event.stopImmediatePropagation();\n}\n\nexport default function(event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n}\n","import {dispatch} from \"d3-dispatch\";\nimport {dragDisable, dragEnable} from \"d3-drag\";\nimport {interpolateZoom} from \"d3-interpolate\";\nimport {select, pointer} from \"d3-selection\";\nimport {interrupt} from \"d3-transition\";\nimport constant from \"./constant.js\";\nimport ZoomEvent from \"./event.js\";\nimport {Transform, identity} from \"./transform.js\";\nimport noevent, {nopropagation} from \"./noevent.js\";\n\n// Ignore right-click, since that should open the context menu.\n// except for pinch-to-zoom, which is sent as a wheel+ctrlKey event\nfunction defaultFilter(event) {\n return (!event.ctrlKey || event.type === 'wheel') && !event.button;\n}\n\nfunction defaultExtent() {\n var e = this;\n if (e instanceof SVGElement) {\n e = e.ownerSVGElement || e;\n if (e.hasAttribute(\"viewBox\")) {\n e = e.viewBox.baseVal;\n return [[e.x, e.y], [e.x + e.width, e.y + e.height]];\n }\n return [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]];\n }\n return [[0, 0], [e.clientWidth, e.clientHeight]];\n}\n\nfunction defaultTransform() {\n return this.__zoom || identity;\n}\n\nfunction defaultWheelDelta(event) {\n return -event.deltaY * (event.deltaMode === 1 ? 0.05 : event.deltaMode ? 1 : 0.002) * (event.ctrlKey ? 10 : 1);\n}\n\nfunction defaultTouchable() {\n return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n}\n\nfunction defaultConstrain(transform, extent, translateExtent) {\n var dx0 = transform.invertX(extent[0][0]) - translateExtent[0][0],\n dx1 = transform.invertX(extent[1][0]) - translateExtent[1][0],\n dy0 = transform.invertY(extent[0][1]) - translateExtent[0][1],\n dy1 = transform.invertY(extent[1][1]) - translateExtent[1][1];\n return transform.translate(\n dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1),\n dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1)\n );\n}\n\nexport default function() {\n var filter = defaultFilter,\n extent = defaultExtent,\n constrain = defaultConstrain,\n wheelDelta = defaultWheelDelta,\n touchable = defaultTouchable,\n scaleExtent = [0, Infinity],\n translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]],\n duration = 250,\n interpolate = interpolateZoom,\n listeners = dispatch(\"start\", \"zoom\", \"end\"),\n touchstarting,\n touchfirst,\n touchending,\n touchDelay = 500,\n wheelDelay = 150,\n clickDistance2 = 0,\n tapDistance = 10;\n\n function zoom(selection) {\n selection\n .property(\"__zoom\", defaultTransform)\n .on(\"wheel.zoom\", wheeled, {passive: false})\n .on(\"mousedown.zoom\", mousedowned)\n .on(\"dblclick.zoom\", dblclicked)\n .filter(touchable)\n .on(\"touchstart.zoom\", touchstarted)\n .on(\"touchmove.zoom\", touchmoved)\n .on(\"touchend.zoom touchcancel.zoom\", touchended)\n .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n\n zoom.transform = function(collection, transform, point, event) {\n var selection = collection.selection ? collection.selection() : collection;\n selection.property(\"__zoom\", defaultTransform);\n if (collection !== selection) {\n schedule(collection, transform, point, event);\n } else {\n selection.interrupt().each(function() {\n gesture(this, arguments)\n .event(event)\n .start()\n .zoom(null, typeof transform === \"function\" ? transform.apply(this, arguments) : transform)\n .end();\n });\n }\n };\n\n zoom.scaleBy = function(selection, k, p, event) {\n zoom.scaleTo(selection, function() {\n var k0 = this.__zoom.k,\n k1 = typeof k === \"function\" ? k.apply(this, arguments) : k;\n return k0 * k1;\n }, p, event);\n };\n\n zoom.scaleTo = function(selection, k, p, event) {\n zoom.transform(selection, function() {\n var e = extent.apply(this, arguments),\n t0 = this.__zoom,\n p0 = p == null ? centroid(e) : typeof p === \"function\" ? p.apply(this, arguments) : p,\n p1 = t0.invert(p0),\n k1 = typeof k === \"function\" ? k.apply(this, arguments) : k;\n return constrain(translate(scale(t0, k1), p0, p1), e, translateExtent);\n }, p, event);\n };\n\n zoom.translateBy = function(selection, x, y, event) {\n zoom.transform(selection, function() {\n return constrain(this.__zoom.translate(\n typeof x === \"function\" ? x.apply(this, arguments) : x,\n typeof y === \"function\" ? y.apply(this, arguments) : y\n ), extent.apply(this, arguments), translateExtent);\n }, null, event);\n };\n\n zoom.translateTo = function(selection, x, y, p, event) {\n zoom.transform(selection, function() {\n var e = extent.apply(this, arguments),\n t = this.__zoom,\n p0 = p == null ? centroid(e) : typeof p === \"function\" ? p.apply(this, arguments) : p;\n return constrain(identity.translate(p0[0], p0[1]).scale(t.k).translate(\n typeof x === \"function\" ? -x.apply(this, arguments) : -x,\n typeof y === \"function\" ? -y.apply(this, arguments) : -y\n ), e, translateExtent);\n }, p, event);\n };\n\n function scale(transform, k) {\n k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k));\n return k === transform.k ? transform : new Transform(k, transform.x, transform.y);\n }\n\n function translate(transform, p0, p1) {\n var x = p0[0] - p1[0] * transform.k, y = p0[1] - p1[1] * transform.k;\n return x === transform.x && y === transform.y ? transform : new Transform(transform.k, x, y);\n }\n\n function centroid(extent) {\n return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2];\n }\n\n function schedule(transition, transform, point, event) {\n transition\n .on(\"start.zoom\", function() { gesture(this, arguments).event(event).start(); })\n .on(\"interrupt.zoom end.zoom\", function() { gesture(this, arguments).event(event).end(); })\n .tween(\"zoom\", function() {\n var that = this,\n args = arguments,\n g = gesture(that, args).event(event),\n e = extent.apply(that, args),\n p = point == null ? centroid(e) : typeof point === \"function\" ? point.apply(that, args) : point,\n w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]),\n a = that.__zoom,\n b = typeof transform === \"function\" ? transform.apply(that, args) : transform,\n i = interpolate(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k));\n return function(t) {\n if (t === 1) t = b; // Avoid rounding error on end.\n else { var l = i(t), k = w / l[2]; t = new Transform(k, p[0] - l[0] * k, p[1] - l[1] * k); }\n g.zoom(null, t);\n };\n });\n }\n\n function gesture(that, args, clean) {\n return (!clean && that.__zooming) || new Gesture(that, args);\n }\n\n function Gesture(that, args) {\n this.that = that;\n this.args = args;\n this.active = 0;\n this.sourceEvent = null;\n this.extent = extent.apply(that, args);\n this.taps = 0;\n }\n\n Gesture.prototype = {\n event: function(event) {\n if (event) this.sourceEvent = event;\n return this;\n },\n start: function() {\n if (++this.active === 1) {\n this.that.__zooming = this;\n this.emit(\"start\");\n }\n return this;\n },\n zoom: function(key, transform) {\n if (this.mouse && key !== \"mouse\") this.mouse[1] = transform.invert(this.mouse[0]);\n if (this.touch0 && key !== \"touch\") this.touch0[1] = transform.invert(this.touch0[0]);\n if (this.touch1 && key !== \"touch\") this.touch1[1] = transform.invert(this.touch1[0]);\n this.that.__zoom = transform;\n this.emit(\"zoom\");\n return this;\n },\n end: function() {\n if (--this.active === 0) {\n delete this.that.__zooming;\n this.emit(\"end\");\n }\n return this;\n },\n emit: function(type) {\n var d = select(this.that).datum();\n listeners.call(\n type,\n this.that,\n new ZoomEvent(type, {\n sourceEvent: this.sourceEvent,\n target: zoom,\n type,\n transform: this.that.__zoom,\n dispatch: listeners\n }),\n d\n );\n }\n };\n\n function wheeled(event, ...args) {\n if (!filter.apply(this, arguments)) return;\n var g = gesture(this, args).event(event),\n t = this.__zoom,\n k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments)))),\n p = pointer(event);\n\n // If the mouse is in the same location as before, reuse it.\n // If there were recent wheel events, reset the wheel idle timeout.\n if (g.wheel) {\n if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) {\n g.mouse[1] = t.invert(g.mouse[0] = p);\n }\n clearTimeout(g.wheel);\n }\n\n // If this wheel event won’t trigger a transform change, ignore it.\n else if (t.k === k) return;\n\n // Otherwise, capture the mouse point and location at the start.\n else {\n g.mouse = [p, t.invert(p)];\n interrupt(this);\n g.start();\n }\n\n noevent(event);\n g.wheel = setTimeout(wheelidled, wheelDelay);\n g.zoom(\"mouse\", constrain(translate(scale(t, k), g.mouse[0], g.mouse[1]), g.extent, translateExtent));\n\n function wheelidled() {\n g.wheel = null;\n g.end();\n }\n }\n\n function mousedowned(event, ...args) {\n if (touchending || !filter.apply(this, arguments)) return;\n var currentTarget = event.currentTarget,\n g = gesture(this, args, true).event(event),\n v = select(event.view).on(\"mousemove.zoom\", mousemoved, true).on(\"mouseup.zoom\", mouseupped, true),\n p = pointer(event, currentTarget),\n x0 = event.clientX,\n y0 = event.clientY;\n\n dragDisable(event.view);\n nopropagation(event);\n g.mouse = [p, this.__zoom.invert(p)];\n interrupt(this);\n g.start();\n\n function mousemoved(event) {\n noevent(event);\n if (!g.moved) {\n var dx = event.clientX - x0, dy = event.clientY - y0;\n g.moved = dx * dx + dy * dy > clickDistance2;\n }\n g.event(event)\n .zoom(\"mouse\", constrain(translate(g.that.__zoom, g.mouse[0] = pointer(event, currentTarget), g.mouse[1]), g.extent, translateExtent));\n }\n\n function mouseupped(event) {\n v.on(\"mousemove.zoom mouseup.zoom\", null);\n dragEnable(event.view, g.moved);\n noevent(event);\n g.event(event).end();\n }\n }\n\n function dblclicked(event, ...args) {\n if (!filter.apply(this, arguments)) return;\n var t0 = this.__zoom,\n p0 = pointer(event.changedTouches ? event.changedTouches[0] : event, this),\n p1 = t0.invert(p0),\n k1 = t0.k * (event.shiftKey ? 0.5 : 2),\n t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, args), translateExtent);\n\n noevent(event);\n if (duration > 0) select(this).transition().duration(duration).call(schedule, t1, p0, event);\n else select(this).call(zoom.transform, t1, p0, event);\n }\n\n function touchstarted(event, ...args) {\n if (!filter.apply(this, arguments)) return;\n var touches = event.touches,\n n = touches.length,\n g = gesture(this, args, event.changedTouches.length === n).event(event),\n started, i, t, p;\n\n nopropagation(event);\n for (i = 0; i < n; ++i) {\n t = touches[i], p = pointer(t, this);\n p = [p, this.__zoom.invert(p), t.identifier];\n if (!g.touch0) g.touch0 = p, started = true, g.taps = 1 + !!touchstarting;\n else if (!g.touch1 && g.touch0[2] !== p[2]) g.touch1 = p, g.taps = 0;\n }\n\n if (touchstarting) touchstarting = clearTimeout(touchstarting);\n\n if (started) {\n if (g.taps < 2) touchfirst = p[0], touchstarting = setTimeout(function() { touchstarting = null; }, touchDelay);\n interrupt(this);\n g.start();\n }\n }\n\n function touchmoved(event, ...args) {\n if (!this.__zooming) return;\n var g = gesture(this, args).event(event),\n touches = event.changedTouches,\n n = touches.length, i, t, p, l;\n\n noevent(event);\n for (i = 0; i < n; ++i) {\n t = touches[i], p = pointer(t, this);\n if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p;\n else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p;\n }\n t = g.that.__zoom;\n if (g.touch1) {\n var p0 = g.touch0[0], l0 = g.touch0[1],\n p1 = g.touch1[0], l1 = g.touch1[1],\n dp = (dp = p1[0] - p0[0]) * dp + (dp = p1[1] - p0[1]) * dp,\n dl = (dl = l1[0] - l0[0]) * dl + (dl = l1[1] - l0[1]) * dl;\n t = scale(t, Math.sqrt(dp / dl));\n p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2];\n l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2];\n }\n else if (g.touch0) p = g.touch0[0], l = g.touch0[1];\n else return;\n\n g.zoom(\"touch\", constrain(translate(t, p, l), g.extent, translateExtent));\n }\n\n function touchended(event, ...args) {\n if (!this.__zooming) return;\n var g = gesture(this, args).event(event),\n touches = event.changedTouches,\n n = touches.length, i, t;\n\n nopropagation(event);\n if (touchending) clearTimeout(touchending);\n touchending = setTimeout(function() { touchending = null; }, touchDelay);\n for (i = 0; i < n; ++i) {\n t = touches[i];\n if (g.touch0 && g.touch0[2] === t.identifier) delete g.touch0;\n else if (g.touch1 && g.touch1[2] === t.identifier) delete g.touch1;\n }\n if (g.touch1 && !g.touch0) g.touch0 = g.touch1, delete g.touch1;\n if (g.touch0) g.touch0[1] = this.__zoom.invert(g.touch0[0]);\n else {\n g.end();\n // If this was a dbltap, reroute to the (optional) dblclick.zoom handler.\n if (g.taps === 2) {\n t = pointer(t, this);\n if (Math.hypot(touchfirst[0] - t[0], touchfirst[1] - t[1]) < tapDistance) {\n var p = select(this).on(\"dblclick.zoom\");\n if (p) p.apply(this, arguments);\n }\n }\n }\n }\n\n zoom.wheelDelta = function(_) {\n return arguments.length ? (wheelDelta = typeof _ === \"function\" ? _ : constant(+_), zoom) : wheelDelta;\n };\n\n zoom.filter = function(_) {\n return arguments.length ? (filter = typeof _ === \"function\" ? _ : constant(!!_), zoom) : filter;\n };\n\n zoom.touchable = function(_) {\n return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant(!!_), zoom) : touchable;\n };\n\n zoom.extent = function(_) {\n return arguments.length ? (extent = typeof _ === \"function\" ? _ : constant([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom) : extent;\n };\n\n zoom.scaleExtent = function(_) {\n return arguments.length ? (scaleExtent[0] = +_[0], scaleExtent[1] = +_[1], zoom) : [scaleExtent[0], scaleExtent[1]];\n };\n\n zoom.translateExtent = function(_) {\n return arguments.length ? (translateExtent[0][0] = +_[0][0], translateExtent[1][0] = +_[1][0], translateExtent[0][1] = +_[0][1], translateExtent[1][1] = +_[1][1], zoom) : [[translateExtent[0][0], translateExtent[0][1]], [translateExtent[1][0], translateExtent[1][1]]];\n };\n\n zoom.constrain = function(_) {\n return arguments.length ? (constrain = _, zoom) : constrain;\n };\n\n zoom.duration = function(_) {\n return arguments.length ? (duration = +_, zoom) : duration;\n };\n\n zoom.interpolate = function(_) {\n return arguments.length ? (interpolate = _, zoom) : interpolate;\n };\n\n zoom.on = function() {\n var value = listeners.on.apply(listeners, arguments);\n return value === listeners ? zoom : value;\n };\n\n zoom.clickDistance = function(_) {\n return arguments.length ? (clickDistance2 = (_ = +_) * _, zoom) : Math.sqrt(clickDistance2);\n };\n\n zoom.tapDistance = function(_) {\n return arguments.length ? (tapDistance = +_, zoom) : tapDistance;\n };\n\n return zoom;\n}\n","export {default as zoom} from \"./zoom.js\";\nexport {default as zoomTransform, identity as zoomIdentity, Transform as ZoomTransform} from \"./transform.js\";\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 this.size = 0;\n}\n\nmodule.exports = listCacheClear;\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\nmodule.exports = eq;\n","var eq = require('./eq');\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\nmodule.exports = assocIndexOf;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\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 --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\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\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\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\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\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 ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\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 == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\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\nmodule.exports = ListCache;\n","var ListCache = require('./_ListCache');\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 this.size = 0;\n}\n\nmodule.exports = stackClear;\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 var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\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\nmodule.exports = stackGet;\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\nmodule.exports = stackHas;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\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\nmodule.exports = root;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\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 nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\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 nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\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 != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\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 if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var coreJsData = require('./_coreJsData');\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/**\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\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\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\nmodule.exports = toSource;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\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/** 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 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/**\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) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\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\nmodule.exports = getValue;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\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\nmodule.exports = getNative;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var nativeCreate = require('./_nativeCreate');\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 this.size = 0;\n}\n\nmodule.exports = hashClear;\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 var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\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 * 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\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\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 * 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\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\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 this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\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 == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\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\nmodule.exports = Hash;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\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.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\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\nmodule.exports = isKeyable;\n","var isKeyable = require('./_isKeyable');\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\nmodule.exports = getMapData;\n","var getMapData = require('./_getMapData');\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 var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\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\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\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\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\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 var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\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 == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\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\nmodule.exports = MapCache;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\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 data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\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 var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\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\nmodule.exports = Stack;\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 == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\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 * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\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\nmodule.exports = baseTimes;\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 != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\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/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\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 */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\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\nmodule.exports = isArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\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/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\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 var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\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\nmodule.exports = isLength;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\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 mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\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 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/**\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[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\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\nmodule.exports = baseUnary;\n","var freeGlobal = require('./_freeGlobal');\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 // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\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\nmodule.exports = isTypedArray;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\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 * 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 var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\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\nmodule.exports = isPrototype;\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\nmodule.exports = overArg;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\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 * 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\nmodule.exports = baseKeys;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\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\nmodule.exports = isArrayLike;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\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\nmodule.exports = keys;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\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 * The base implementation of `_.keysIn` 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 baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\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 * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var root = require('./_root');\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/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\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 nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\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/**\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 and promises in Node.js < 6.\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 = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\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\nmodule.exports = getTag;\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 * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\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/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\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 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 identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\nfunction clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = clone;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\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\nmodule.exports = createBaseFor;\n","var createBaseFor = require('./_createBaseFor');\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\nmodule.exports = baseFor;\n","var baseFor = require('./_baseFor'),\n keys = require('./keys');\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\nmodule.exports = baseForOwn;\n","var isArrayLike = require('./isArrayLike');\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nmodule.exports = createBaseEach;\n","var baseForOwn = require('./_baseForOwn'),\n createBaseEach = require('./_createBaseEach');\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nmodule.exports = baseEach;\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\nmodule.exports = identity;\n","var identity = require('./identity');\n\n/**\n * Casts `value` to `identity` if it's not a function.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Function} Returns cast function.\n */\nfunction castFunction(value) {\n return typeof value == 'function' ? value : identity;\n}\n\nmodule.exports = castFunction;\n","var arrayEach = require('./_arrayEach'),\n baseEach = require('./_baseEach'),\n castFunction = require('./_castFunction'),\n isArray = require('./isArray');\n\n/**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _.forEach([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\nfunction forEach(collection, iteratee) {\n var func = isArray(collection) ? arrayEach : baseEach;\n return func(collection, castFunction(iteratee));\n}\n\nmodule.exports = forEach;\n","module.exports = require('./forEach');\n","var baseEach = require('./_baseEach');\n\n/**\n * The base implementation of `_.filter` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction baseFilter(collection, predicate) {\n var result = [];\n baseEach(collection, function(value, index, collection) {\n if (predicate(value, index, collection)) {\n result.push(value);\n }\n });\n return result;\n}\n\nmodule.exports = baseFilter;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\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\nmodule.exports = setCacheAdd;\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\nmodule.exports = setCacheHas;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\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 == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\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 == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\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 cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\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 {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\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, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_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 (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\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\nmodule.exports = mapToArray;\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\nmodule.exports = setToArray;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\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 {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\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, bitmask, customizer, equalFunc, 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 & COMPARE_PARTIAL_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 |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, 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\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\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 * 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 {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\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, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(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 // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\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, bitmask, customizer, 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\nmodule.exports = equalObjects;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\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 * 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 {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\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, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_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, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\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 {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\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, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n baseIsEqual = require('./_baseIsEqual');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\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, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n}\n\nmodule.exports = baseIsMatch;\n","var isObject = require('./isObject');\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\nmodule.exports = isStrictComparable;\n","var isStrictComparable = require('./_isStrictComparable'),\n keys = require('./keys');\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\nmodule.exports = getMatchData;\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\nmodule.exports = matchesStrictComparable;\n","var baseIsMatch = require('./_baseIsMatch'),\n getMatchData = require('./_getMatchData'),\n matchesStrictComparable = require('./_matchesStrictComparable');\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\nmodule.exports = baseMatches;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\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) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\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\nmodule.exports = isKey;\n","var MapCache = require('./_MapCache');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\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 `clear`, `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 != null && 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) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n","var memoize = require('./memoize');\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nmodule.exports = memoizeCapped;\n","var memoizeCapped = require('./_memoizeCapped');\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\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 = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nmodule.exports = stringToPath;\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 == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n","var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\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 (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\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\nmodule.exports = baseToString;\n","var baseToString = require('./_baseToString');\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 convert.\n * @returns {string} Returns the converted 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\nmodule.exports = toString;\n","var isArray = require('./isArray'),\n isKey = require('./_isKey'),\n stringToPath = require('./_stringToPath'),\n toString = require('./toString');\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 * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n","var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\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\nmodule.exports = toKey;\n","var castPath = require('./_castPath'),\n toKey = require('./_toKey');\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 = castPath(path, object);\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\nmodule.exports = baseGet;\n","var baseGet = require('./_baseGet');\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\nmodule.exports = get;\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\nmodule.exports = baseHasIn;\n","var castPath = require('./_castPath'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isIndex = require('./_isIndex'),\n isLength = require('./isLength'),\n toKey = require('./_toKey');\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 = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\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 || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;\n","var baseHasIn = require('./_baseHasIn'),\n hasPath = require('./_hasPath');\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\nmodule.exports = hasIn;\n","var baseIsEqual = require('./_baseIsEqual'),\n get = require('./get'),\n hasIn = require('./hasIn'),\n isKey = require('./_isKey'),\n isStrictComparable = require('./_isStrictComparable'),\n matchesStrictComparable = require('./_matchesStrictComparable'),\n toKey = require('./_toKey');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\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, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n}\n\nmodule.exports = baseMatchesProperty;\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\nmodule.exports = baseProperty;\n","var baseGet = require('./_baseGet');\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\nmodule.exports = basePropertyDeep;\n","var baseProperty = require('./_baseProperty'),\n basePropertyDeep = require('./_basePropertyDeep'),\n isKey = require('./_isKey'),\n toKey = require('./_toKey');\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 = property;\n","var baseMatches = require('./_baseMatches'),\n baseMatchesProperty = require('./_baseMatchesProperty'),\n identity = require('./identity'),\n isArray = require('./isArray'),\n property = require('./property');\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\nmodule.exports = baseIteratee;\n","var arrayFilter = require('./_arrayFilter'),\n baseFilter = require('./_baseFilter'),\n baseIteratee = require('./_baseIteratee'),\n isArray = require('./isArray');\n\n/**\n * Iterates over elements of `collection`, returning an array of all elements\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * **Note:** Unlike `_.remove`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.reject\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * _.filter(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, { 'age': 36, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.filter(users, 'active');\n * // => objects for ['barney']\n *\n * // Combining several predicates using `_.overEvery` or `_.overSome`.\n * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));\n * // => objects for ['fred', 'barney']\n */\nfunction filter(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, baseIteratee(predicate, 3));\n}\n\nmodule.exports = filter;\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 * The base implementation of `_.has` 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 baseHas(object, key) {\n return object != null && hasOwnProperty.call(object, key);\n}\n\nmodule.exports = baseHas;\n","var baseHas = require('./_baseHas'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\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 = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\nfunction has(object, path) {\n return object != null && hasPath(object, path, baseHas);\n}\n\nmodule.exports = has;\n","var baseKeys = require('./_baseKeys'),\n getTag = require('./_getTag'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isArrayLike = require('./isArrayLike'),\n isBuffer = require('./isBuffer'),\n isPrototype = require('./_isPrototype'),\n isTypedArray = require('./isTypedArray');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n setTag = '[object Set]';\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 * Checks if `value` is an empty object, collection, map, or set.\n *\n * Objects are considered empty if they have no own enumerable string keyed\n * properties.\n *\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n * jQuery-like collections are considered empty if they have a `length` of `0`.\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\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 empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */\nfunction isEmpty(value) {\n if (value == null) {\n return true;\n }\n if (isArrayLike(value) &&\n (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n return !value.length;\n }\n var tag = getTag(value);\n if (tag == mapTag || tag == setTag) {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !baseKeys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n}\n\nmodule.exports = isEmpty;\n","/**\n * Checks if `value` is `undefined`.\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 `undefined`, else `false`.\n * @example\n *\n * _.isUndefined(void 0);\n * // => true\n *\n * _.isUndefined(null);\n * // => false\n */\nfunction isUndefined(value) {\n return value === undefined;\n}\n\nmodule.exports = isUndefined;\n","var baseEach = require('./_baseEach'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n}\n\nmodule.exports = baseMap;\n","var arrayMap = require('./_arrayMap'),\n baseIteratee = require('./_baseIteratee'),\n baseMap = require('./_baseMap'),\n isArray = require('./isArray');\n\n/**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\nfunction map(collection, iteratee) {\n var func = isArray(collection) ? arrayMap : baseMap;\n return func(collection, baseIteratee(iteratee, 3));\n}\n\nmodule.exports = map;\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 == null ? 0 : array.length;\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\nmodule.exports = arrayReduce;\n","/**\n * The base implementation of `_.reduce` and `_.reduceRight`, without support\n * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection 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 or last element of\n * `collection` as the initial value.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the accumulated value.\n */\nfunction baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n eachFunc(collection, function(value, index, collection) {\n accumulator = initAccum\n ? (initAccum = false, value)\n : iteratee(accumulator, value, index, collection);\n });\n return accumulator;\n}\n\nmodule.exports = baseReduce;\n","var arrayReduce = require('./_arrayReduce'),\n baseEach = require('./_baseEach'),\n baseIteratee = require('./_baseIteratee'),\n baseReduce = require('./_baseReduce'),\n isArray = require('./isArray');\n\n/**\n * Reduces `collection` to a value which is the accumulated result of running\n * each element in `collection` thru `iteratee`, where each successive\n * invocation is supplied the return value of the previous. If `accumulator`\n * is not given, the first element of `collection` is used as the initial\n * value. The iteratee is invoked with four arguments:\n * (accumulator, value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\n *\n * The guarded methods are:\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n * and `sortBy`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduceRight\n * @example\n *\n * _.reduce([1, 2], function(sum, n) {\n * return sum + n;\n * }, 0);\n * // => 3\n *\n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * return result;\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n */\nfunction reduce(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduce : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n}\n\nmodule.exports = reduce;\n","var baseGetTag = require('./_baseGetTag'),\n isArray = require('./isArray'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\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) && baseGetTag(value) == stringTag);\n}\n\nmodule.exports = isString;\n","var baseProperty = require('./_baseProperty');\n\n/**\n * Gets the size of an ASCII `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\nvar asciiSize = baseProperty('length');\n\nmodule.exports = asciiSize;\n","/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsZWJ = '\\\\u200d';\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 + rsComboRange + rsVarRange + ']');\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\nmodule.exports = hasUnicode;\n","/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsAstral = '[' + rsAstralRange + ']',\n rsCombo = '[' + rsComboRange + ']',\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 rsZWJ = '\\\\u200d';\n\n/** Used to compose unicode regexes. */\nvar reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\nvar reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n/**\n * Gets the size of a Unicode `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\nfunction unicodeSize(string) {\n var result = reUnicode.lastIndex = 0;\n while (reUnicode.test(string)) {\n ++result;\n }\n return result;\n}\n\nmodule.exports = unicodeSize;\n","var asciiSize = require('./_asciiSize'),\n hasUnicode = require('./_hasUnicode'),\n unicodeSize = require('./_unicodeSize');\n\n/**\n * Gets the number of symbols in `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the string size.\n */\nfunction stringSize(string) {\n return hasUnicode(string)\n ? unicodeSize(string)\n : asciiSize(string);\n}\n\nmodule.exports = stringSize;\n","var baseKeys = require('./_baseKeys'),\n getTag = require('./_getTag'),\n isArrayLike = require('./isArrayLike'),\n isString = require('./isString'),\n stringSize = require('./_stringSize');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n setTag = '[object Set]';\n\n/**\n * Gets the size of `collection` by returning its length for array-like\n * values or the number of own enumerable string keyed properties for objects.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @returns {number} Returns the collection size.\n * @example\n *\n * _.size([1, 2, 3]);\n * // => 3\n *\n * _.size({ 'a': 1, 'b': 2 });\n * // => 2\n *\n * _.size('pebbles');\n * // => 7\n */\nfunction size(collection) {\n if (collection == null) {\n return 0;\n }\n if (isArrayLike(collection)) {\n return isString(collection) ? stringSize(collection) : collection.length;\n }\n var tag = getTag(collection);\n if (tag == mapTag || tag == setTag) {\n return collection.size;\n }\n return baseKeys(collection).length;\n}\n\nmodule.exports = size;\n","var arrayEach = require('./_arrayEach'),\n baseCreate = require('./_baseCreate'),\n baseForOwn = require('./_baseForOwn'),\n baseIteratee = require('./_baseIteratee'),\n getPrototype = require('./_getPrototype'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isFunction = require('./isFunction'),\n isObject = require('./isObject'),\n isTypedArray = require('./isTypedArray');\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),\n isArrLike = isArr || isBuffer(object) || isTypedArray(object);\n\n iteratee = baseIteratee(iteratee, 4);\n if (accumulator == null) {\n var Ctor = object && object.constructor;\n if (isArrLike) {\n accumulator = isArr ? new Ctor : [];\n }\n else if (isObject(object)) {\n accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};\n }\n else {\n accumulator = {};\n }\n }\n (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {\n return iteratee(accumulator, value, index, object);\n });\n return accumulator;\n}\n\nmodule.exports = transform;\n","var Symbol = require('./_Symbol'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray');\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nmodule.exports = isFlattenable;\n","var arrayPush = require('./_arrayPush'),\n isFlattenable = require('./_isFlattenable');\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\nmodule.exports = baseFlatten;\n","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n","var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;\n","var constant = require('./constant'),\n defineProperty = require('./_defineProperty'),\n identity = require('./identity');\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nmodule.exports = baseSetToString;\n","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nmodule.exports = shortOut;\n","var baseSetToString = require('./_baseSetToString'),\n shortOut = require('./_shortOut');\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n","var identity = require('./identity'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nmodule.exports = baseRest;\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\nmodule.exports = baseFindIndex;\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\nmodule.exports = baseIsNaN;\n","/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\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 strictIndexOf(array, value, fromIndex) {\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\nmodule.exports = strictIndexOf;\n","var baseFindIndex = require('./_baseFindIndex'),\n baseIsNaN = require('./_baseIsNaN'),\n strictIndexOf = require('./_strictIndexOf');\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 return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nmodule.exports = baseIndexOf;\n","var baseIndexOf = require('./_baseIndexOf');\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nmodule.exports = arrayIncludes;\n","/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arrayIncludesWith;\n","/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n","var Set = require('./_Set'),\n noop = require('./noop'),\n setToArray = require('./_setToArray');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\nvar createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n};\n\nmodule.exports = createSet;\n","var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n cacheHas = require('./_cacheHas'),\n createSet = require('./_createSet'),\n setToArray = require('./_setToArray');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\nfunction baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseUniq;\n","var isArrayLike = require('./isArrayLike'),\n isObjectLike = require('./isObjectLike');\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\nmodule.exports = isArrayLikeObject;\n","var baseFlatten = require('./_baseFlatten'),\n baseRest = require('./_baseRest'),\n baseUniq = require('./_baseUniq'),\n isArrayLikeObject = require('./isArrayLikeObject');\n\n/**\n * Creates an array of unique values, in order, from all given arrays using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.union([2], [1, 2]);\n * // => [2, 1]\n */\nvar union = baseRest(function(arrays) {\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n});\n\nmodule.exports = union;\n","var arrayMap = require('./_arrayMap');\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\nmodule.exports = baseValues;\n","var baseValues = require('./_baseValues'),\n keys = require('./keys');\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 == null ? [] : baseValues(object, keys(object));\n}\n\nmodule.exports = values;\n","/* global window */\n\nvar lodash;\n\nif (typeof require === \"function\") {\n try {\n lodash = {\n clone: require(\"lodash/clone\"),\n constant: require(\"lodash/constant\"),\n each: require(\"lodash/each\"),\n filter: require(\"lodash/filter\"),\n has: require(\"lodash/has\"),\n isArray: require(\"lodash/isArray\"),\n isEmpty: require(\"lodash/isEmpty\"),\n isFunction: require(\"lodash/isFunction\"),\n isUndefined: require(\"lodash/isUndefined\"),\n keys: require(\"lodash/keys\"),\n map: require(\"lodash/map\"),\n reduce: require(\"lodash/reduce\"),\n size: require(\"lodash/size\"),\n transform: require(\"lodash/transform\"),\n union: require(\"lodash/union\"),\n values: require(\"lodash/values\")\n };\n } catch (e) {\n // continue regardless of error\n }\n}\n\nif (!lodash) {\n lodash = window._;\n}\n\nmodule.exports = lodash;\n","\"use strict\";\n\nvar _ = require(\"./lodash\");\n\nmodule.exports = Graph;\n\nvar DEFAULT_EDGE_NAME = \"\\x00\";\nvar GRAPH_NODE = \"\\x00\";\nvar EDGE_KEY_DELIM = \"\\x01\";\n\n// Implementation notes:\n//\n// * Node id query functions should return string ids for the nodes\n// * Edge id query functions should return an \"edgeObj\", edge object, that is\n// composed of enough information to uniquely identify an edge: {v, w, name}.\n// * Internally we use an \"edgeId\", a stringified form of the edgeObj, to\n// reference edges. This is because we need a performant way to look these\n// edges up and, object properties, which have string keys, are the closest\n// we're going to get to a performant hashtable in JavaScript.\n\nfunction Graph(opts) {\n this._isDirected = _.has(opts, \"directed\") ? opts.directed : true;\n this._isMultigraph = _.has(opts, \"multigraph\") ? opts.multigraph : false;\n this._isCompound = _.has(opts, \"compound\") ? opts.compound : false;\n\n // Label for the graph itself\n this._label = undefined;\n\n // Defaults to be set when creating a new node\n this._defaultNodeLabelFn = _.constant(undefined);\n\n // Defaults to be set when creating a new edge\n this._defaultEdgeLabelFn = _.constant(undefined);\n\n // v -> label\n this._nodes = {};\n\n if (this._isCompound) {\n // v -> parent\n this._parent = {};\n\n // v -> children\n this._children = {};\n this._children[GRAPH_NODE] = {};\n }\n\n // v -> edgeObj\n this._in = {};\n\n // u -> v -> Number\n this._preds = {};\n\n // v -> edgeObj\n this._out = {};\n\n // v -> w -> Number\n this._sucs = {};\n\n // e -> edgeObj\n this._edgeObjs = {};\n\n // e -> label\n this._edgeLabels = {};\n}\n\n/* Number of nodes in the graph. Should only be changed by the implementation. */\nGraph.prototype._nodeCount = 0;\n\n/* Number of edges in the graph. Should only be changed by the implementation. */\nGraph.prototype._edgeCount = 0;\n\n\n/* === Graph functions ========= */\n\nGraph.prototype.isDirected = function() {\n return this._isDirected;\n};\n\nGraph.prototype.isMultigraph = function() {\n return this._isMultigraph;\n};\n\nGraph.prototype.isCompound = function() {\n return this._isCompound;\n};\n\nGraph.prototype.setGraph = function(label) {\n this._label = label;\n return this;\n};\n\nGraph.prototype.graph = function() {\n return this._label;\n};\n\n\n/* === Node functions ========== */\n\nGraph.prototype.setDefaultNodeLabel = function(newDefault) {\n if (!_.isFunction(newDefault)) {\n newDefault = _.constant(newDefault);\n }\n this._defaultNodeLabelFn = newDefault;\n return this;\n};\n\nGraph.prototype.nodeCount = function() {\n return this._nodeCount;\n};\n\nGraph.prototype.nodes = function() {\n return _.keys(this._nodes);\n};\n\nGraph.prototype.sources = function() {\n var self = this;\n return _.filter(this.nodes(), function(v) {\n return _.isEmpty(self._in[v]);\n });\n};\n\nGraph.prototype.sinks = function() {\n var self = this;\n return _.filter(this.nodes(), function(v) {\n return _.isEmpty(self._out[v]);\n });\n};\n\nGraph.prototype.setNodes = function(vs, value) {\n var args = arguments;\n var self = this;\n _.each(vs, function(v) {\n if (args.length > 1) {\n self.setNode(v, value);\n } else {\n self.setNode(v);\n }\n });\n return this;\n};\n\nGraph.prototype.setNode = function(v, value) {\n if (_.has(this._nodes, v)) {\n if (arguments.length > 1) {\n this._nodes[v] = value;\n }\n return this;\n }\n\n this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v);\n if (this._isCompound) {\n this._parent[v] = GRAPH_NODE;\n this._children[v] = {};\n this._children[GRAPH_NODE][v] = true;\n }\n this._in[v] = {};\n this._preds[v] = {};\n this._out[v] = {};\n this._sucs[v] = {};\n ++this._nodeCount;\n return this;\n};\n\nGraph.prototype.node = function(v) {\n return this._nodes[v];\n};\n\nGraph.prototype.hasNode = function(v) {\n return _.has(this._nodes, v);\n};\n\nGraph.prototype.removeNode = function(v) {\n var self = this;\n if (_.has(this._nodes, v)) {\n var removeEdge = function(e) { self.removeEdge(self._edgeObjs[e]); };\n delete this._nodes[v];\n if (this._isCompound) {\n this._removeFromParentsChildList(v);\n delete this._parent[v];\n _.each(this.children(v), function(child) {\n self.setParent(child);\n });\n delete this._children[v];\n }\n _.each(_.keys(this._in[v]), removeEdge);\n delete this._in[v];\n delete this._preds[v];\n _.each(_.keys(this._out[v]), removeEdge);\n delete this._out[v];\n delete this._sucs[v];\n --this._nodeCount;\n }\n return this;\n};\n\nGraph.prototype.setParent = function(v, parent) {\n if (!this._isCompound) {\n throw new Error(\"Cannot set parent in a non-compound graph\");\n }\n\n if (_.isUndefined(parent)) {\n parent = GRAPH_NODE;\n } else {\n // Coerce parent to string\n parent += \"\";\n for (var ancestor = parent;\n !_.isUndefined(ancestor);\n ancestor = this.parent(ancestor)) {\n if (ancestor === v) {\n throw new Error(\"Setting \" + parent+ \" as parent of \" + v +\n \" would create a cycle\");\n }\n }\n\n this.setNode(parent);\n }\n\n this.setNode(v);\n this._removeFromParentsChildList(v);\n this._parent[v] = parent;\n this._children[parent][v] = true;\n return this;\n};\n\nGraph.prototype._removeFromParentsChildList = function(v) {\n delete this._children[this._parent[v]][v];\n};\n\nGraph.prototype.parent = function(v) {\n if (this._isCompound) {\n var parent = this._parent[v];\n if (parent !== GRAPH_NODE) {\n return parent;\n }\n }\n};\n\nGraph.prototype.children = function(v) {\n if (_.isUndefined(v)) {\n v = GRAPH_NODE;\n }\n\n if (this._isCompound) {\n var children = this._children[v];\n if (children) {\n return _.keys(children);\n }\n } else if (v === GRAPH_NODE) {\n return this.nodes();\n } else if (this.hasNode(v)) {\n return [];\n }\n};\n\nGraph.prototype.predecessors = function(v) {\n var predsV = this._preds[v];\n if (predsV) {\n return _.keys(predsV);\n }\n};\n\nGraph.prototype.successors = function(v) {\n var sucsV = this._sucs[v];\n if (sucsV) {\n return _.keys(sucsV);\n }\n};\n\nGraph.prototype.neighbors = function(v) {\n var preds = this.predecessors(v);\n if (preds) {\n return _.union(preds, this.successors(v));\n }\n};\n\nGraph.prototype.isLeaf = function (v) {\n var neighbors;\n if (this.isDirected()) {\n neighbors = this.successors(v);\n } else {\n neighbors = this.neighbors(v);\n }\n return neighbors.length === 0;\n};\n\nGraph.prototype.filterNodes = function(filter) {\n var copy = new this.constructor({\n directed: this._isDirected,\n multigraph: this._isMultigraph,\n compound: this._isCompound\n });\n\n copy.setGraph(this.graph());\n\n var self = this;\n _.each(this._nodes, function(value, v) {\n if (filter(v)) {\n copy.setNode(v, value);\n }\n });\n\n _.each(this._edgeObjs, function(e) {\n if (copy.hasNode(e.v) && copy.hasNode(e.w)) {\n copy.setEdge(e, self.edge(e));\n }\n });\n\n var parents = {};\n function findParent(v) {\n var parent = self.parent(v);\n if (parent === undefined || copy.hasNode(parent)) {\n parents[v] = parent;\n return parent;\n } else if (parent in parents) {\n return parents[parent];\n } else {\n return findParent(parent);\n }\n }\n\n if (this._isCompound) {\n _.each(copy.nodes(), function(v) {\n copy.setParent(v, findParent(v));\n });\n }\n\n return copy;\n};\n\n/* === Edge functions ========== */\n\nGraph.prototype.setDefaultEdgeLabel = function(newDefault) {\n if (!_.isFunction(newDefault)) {\n newDefault = _.constant(newDefault);\n }\n this._defaultEdgeLabelFn = newDefault;\n return this;\n};\n\nGraph.prototype.edgeCount = function() {\n return this._edgeCount;\n};\n\nGraph.prototype.edges = function() {\n return _.values(this._edgeObjs);\n};\n\nGraph.prototype.setPath = function(vs, value) {\n var self = this;\n var args = arguments;\n _.reduce(vs, function(v, w) {\n if (args.length > 1) {\n self.setEdge(v, w, value);\n } else {\n self.setEdge(v, w);\n }\n return w;\n });\n return this;\n};\n\n/*\n * setEdge(v, w, [value, [name]])\n * setEdge({ v, w, [name] }, [value])\n */\nGraph.prototype.setEdge = function() {\n var v, w, name, value;\n var valueSpecified = false;\n var arg0 = arguments[0];\n\n if (typeof arg0 === \"object\" && arg0 !== null && \"v\" in arg0) {\n v = arg0.v;\n w = arg0.w;\n name = arg0.name;\n if (arguments.length === 2) {\n value = arguments[1];\n valueSpecified = true;\n }\n } else {\n v = arg0;\n w = arguments[1];\n name = arguments[3];\n if (arguments.length > 2) {\n value = arguments[2];\n valueSpecified = true;\n }\n }\n\n v = \"\" + v;\n w = \"\" + w;\n if (!_.isUndefined(name)) {\n name = \"\" + name;\n }\n\n var e = edgeArgsToId(this._isDirected, v, w, name);\n if (_.has(this._edgeLabels, e)) {\n if (valueSpecified) {\n this._edgeLabels[e] = value;\n }\n return this;\n }\n\n if (!_.isUndefined(name) && !this._isMultigraph) {\n throw new Error(\"Cannot set a named edge when isMultigraph = false\");\n }\n\n // It didn't exist, so we need to create it.\n // First ensure the nodes exist.\n this.setNode(v);\n this.setNode(w);\n\n this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name);\n\n var edgeObj = edgeArgsToObj(this._isDirected, v, w, name);\n // Ensure we add undirected edges in a consistent way.\n v = edgeObj.v;\n w = edgeObj.w;\n\n Object.freeze(edgeObj);\n this._edgeObjs[e] = edgeObj;\n incrementOrInitEntry(this._preds[w], v);\n incrementOrInitEntry(this._sucs[v], w);\n this._in[w][e] = edgeObj;\n this._out[v][e] = edgeObj;\n this._edgeCount++;\n return this;\n};\n\nGraph.prototype.edge = function(v, w, name) {\n var e = (arguments.length === 1\n ? edgeObjToId(this._isDirected, arguments[0])\n : edgeArgsToId(this._isDirected, v, w, name));\n return this._edgeLabels[e];\n};\n\nGraph.prototype.hasEdge = function(v, w, name) {\n var e = (arguments.length === 1\n ? edgeObjToId(this._isDirected, arguments[0])\n : edgeArgsToId(this._isDirected, v, w, name));\n return _.has(this._edgeLabels, e);\n};\n\nGraph.prototype.removeEdge = function(v, w, name) {\n var e = (arguments.length === 1\n ? edgeObjToId(this._isDirected, arguments[0])\n : edgeArgsToId(this._isDirected, v, w, name));\n var edge = this._edgeObjs[e];\n if (edge) {\n v = edge.v;\n w = edge.w;\n delete this._edgeLabels[e];\n delete this._edgeObjs[e];\n decrementOrRemoveEntry(this._preds[w], v);\n decrementOrRemoveEntry(this._sucs[v], w);\n delete this._in[w][e];\n delete this._out[v][e];\n this._edgeCount--;\n }\n return this;\n};\n\nGraph.prototype.inEdges = function(v, u) {\n var inV = this._in[v];\n if (inV) {\n var edges = _.values(inV);\n if (!u) {\n return edges;\n }\n return _.filter(edges, function(edge) { return edge.v === u; });\n }\n};\n\nGraph.prototype.outEdges = function(v, w) {\n var outV = this._out[v];\n if (outV) {\n var edges = _.values(outV);\n if (!w) {\n return edges;\n }\n return _.filter(edges, function(edge) { return edge.w === w; });\n }\n};\n\nGraph.prototype.nodeEdges = function(v, w) {\n var inEdges = this.inEdges(v, w);\n if (inEdges) {\n return inEdges.concat(this.outEdges(v, w));\n }\n};\n\nfunction incrementOrInitEntry(map, k) {\n if (map[k]) {\n map[k]++;\n } else {\n map[k] = 1;\n }\n}\n\nfunction decrementOrRemoveEntry(map, k) {\n if (!--map[k]) { delete map[k]; }\n}\n\nfunction edgeArgsToId(isDirected, v_, w_, name) {\n var v = \"\" + v_;\n var w = \"\" + w_;\n if (!isDirected && v > w) {\n var tmp = v;\n v = w;\n w = tmp;\n }\n return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM +\n (_.isUndefined(name) ? DEFAULT_EDGE_NAME : name);\n}\n\nfunction edgeArgsToObj(isDirected, v_, w_, name) {\n var v = \"\" + v_;\n var w = \"\" + w_;\n if (!isDirected && v > w) {\n var tmp = v;\n v = w;\n w = tmp;\n }\n var edgeObj = { v: v, w: w };\n if (name) {\n edgeObj.name = name;\n }\n return edgeObj;\n}\n\nfunction edgeObjToId(isDirected, edgeObj) {\n return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name);\n}\n","module.exports = '2.1.8';\n","// Includes only the \"core\" of graphlib\nmodule.exports = {\n Graph: require(\"./graph\"),\n version: require(\"./version\")\n};\n","var _ = require(\"./lodash\");\nvar Graph = require(\"./graph\");\n\nmodule.exports = {\n write: write,\n read: read\n};\n\nfunction write(g) {\n var json = {\n options: {\n directed: g.isDirected(),\n multigraph: g.isMultigraph(),\n compound: g.isCompound()\n },\n nodes: writeNodes(g),\n edges: writeEdges(g)\n };\n if (!_.isUndefined(g.graph())) {\n json.value = _.clone(g.graph());\n }\n return json;\n}\n\nfunction writeNodes(g) {\n return _.map(g.nodes(), function(v) {\n var nodeValue = g.node(v);\n var parent = g.parent(v);\n var node = { v: v };\n if (!_.isUndefined(nodeValue)) {\n node.value = nodeValue;\n }\n if (!_.isUndefined(parent)) {\n node.parent = parent;\n }\n return node;\n });\n}\n\nfunction writeEdges(g) {\n return _.map(g.edges(), function(e) {\n var edgeValue = g.edge(e);\n var edge = { v: e.v, w: e.w };\n if (!_.isUndefined(e.name)) {\n edge.name = e.name;\n }\n if (!_.isUndefined(edgeValue)) {\n edge.value = edgeValue;\n }\n return edge;\n });\n}\n\nfunction read(json) {\n var g = new Graph(json.options).setGraph(json.value);\n _.each(json.nodes, function(entry) {\n g.setNode(entry.v, entry.value);\n if (entry.parent) {\n g.setParent(entry.v, entry.parent);\n }\n });\n _.each(json.edges, function(entry) {\n g.setEdge({ v: entry.v, w: entry.w, name: entry.name }, entry.value);\n });\n return g;\n}\n","var _ = require(\"../lodash\");\n\nmodule.exports = components;\n\nfunction components(g) {\n var visited = {};\n var cmpts = [];\n var cmpt;\n\n function dfs(v) {\n if (_.has(visited, v)) return;\n visited[v] = true;\n cmpt.push(v);\n _.each(g.successors(v), dfs);\n _.each(g.predecessors(v), dfs);\n }\n\n _.each(g.nodes(), function(v) {\n cmpt = [];\n dfs(v);\n if (cmpt.length) {\n cmpts.push(cmpt);\n }\n });\n\n return cmpts;\n}\n","var _ = require(\"../lodash\");\n\nmodule.exports = PriorityQueue;\n\n/**\n * A min-priority queue data structure. This algorithm is derived from Cormen,\n * et al., \"Introduction to Algorithms\". The basic idea of a min-priority\n * queue is that you can efficiently (in O(1) time) get the smallest key in\n * the queue. Adding and removing elements takes O(log n) time. A key can\n * have its priority decreased in O(log n) time.\n */\nfunction PriorityQueue() {\n this._arr = [];\n this._keyIndices = {};\n}\n\n/**\n * Returns the number of elements in the queue. Takes `O(1)` time.\n */\nPriorityQueue.prototype.size = function() {\n return this._arr.length;\n};\n\n/**\n * Returns the keys that are in the queue. Takes `O(n)` time.\n */\nPriorityQueue.prototype.keys = function() {\n return this._arr.map(function(x) { return x.key; });\n};\n\n/**\n * Returns `true` if **key** is in the queue and `false` if not.\n */\nPriorityQueue.prototype.has = function(key) {\n return _.has(this._keyIndices, key);\n};\n\n/**\n * Returns the priority for **key**. If **key** is not present in the queue\n * then this function returns `undefined`. Takes `O(1)` time.\n *\n * @param {Object} key\n */\nPriorityQueue.prototype.priority = function(key) {\n var index = this._keyIndices[key];\n if (index !== undefined) {\n return this._arr[index].priority;\n }\n};\n\n/**\n * Returns the key for the minimum element in this queue. If the queue is\n * empty this function throws an Error. Takes `O(1)` time.\n */\nPriorityQueue.prototype.min = function() {\n if (this.size() === 0) {\n throw new Error(\"Queue underflow\");\n }\n return this._arr[0].key;\n};\n\n/**\n * Inserts a new key into the priority queue. If the key already exists in\n * the queue this function returns `false`; otherwise it will return `true`.\n * Takes `O(n)` time.\n *\n * @param {Object} key the key to add\n * @param {Number} priority the initial priority for the key\n */\nPriorityQueue.prototype.add = function(key, priority) {\n var keyIndices = this._keyIndices;\n key = String(key);\n if (!_.has(keyIndices, key)) {\n var arr = this._arr;\n var index = arr.length;\n keyIndices[key] = index;\n arr.push({key: key, priority: priority});\n this._decrease(index);\n return true;\n }\n return false;\n};\n\n/**\n * Removes and returns the smallest key in the queue. Takes `O(log n)` time.\n */\nPriorityQueue.prototype.removeMin = function() {\n this._swap(0, this._arr.length - 1);\n var min = this._arr.pop();\n delete this._keyIndices[min.key];\n this._heapify(0);\n return min.key;\n};\n\n/**\n * Decreases the priority for **key** to **priority**. If the new priority is\n * greater than the previous priority, this function will throw an Error.\n *\n * @param {Object} key the key for which to raise priority\n * @param {Number} priority the new priority for the key\n */\nPriorityQueue.prototype.decrease = function(key, priority) {\n var index = this._keyIndices[key];\n if (priority > this._arr[index].priority) {\n throw new Error(\"New priority is greater than current priority. \" +\n \"Key: \" + key + \" Old: \" + this._arr[index].priority + \" New: \" + priority);\n }\n this._arr[index].priority = priority;\n this._decrease(index);\n};\n\nPriorityQueue.prototype._heapify = function(i) {\n var arr = this._arr;\n var l = 2 * i;\n var r = l + 1;\n var largest = i;\n if (l < arr.length) {\n largest = arr[l].priority < arr[largest].priority ? l : largest;\n if (r < arr.length) {\n largest = arr[r].priority < arr[largest].priority ? r : largest;\n }\n if (largest !== i) {\n this._swap(i, largest);\n this._heapify(largest);\n }\n }\n};\n\nPriorityQueue.prototype._decrease = function(index) {\n var arr = this._arr;\n var priority = arr[index].priority;\n var parent;\n while (index !== 0) {\n parent = index >> 1;\n if (arr[parent].priority < priority) {\n break;\n }\n this._swap(index, parent);\n index = parent;\n }\n};\n\nPriorityQueue.prototype._swap = function(i, j) {\n var arr = this._arr;\n var keyIndices = this._keyIndices;\n var origArrI = arr[i];\n var origArrJ = arr[j];\n arr[i] = origArrJ;\n arr[j] = origArrI;\n keyIndices[origArrJ.key] = i;\n keyIndices[origArrI.key] = j;\n};\n","var _ = require(\"../lodash\");\nvar PriorityQueue = require(\"../data/priority-queue\");\n\nmodule.exports = dijkstra;\n\nvar DEFAULT_WEIGHT_FUNC = _.constant(1);\n\nfunction dijkstra(g, source, weightFn, edgeFn) {\n return runDijkstra(g, String(source),\n weightFn || DEFAULT_WEIGHT_FUNC,\n edgeFn || function(v) { return g.outEdges(v); });\n}\n\nfunction runDijkstra(g, source, weightFn, edgeFn) {\n var results = {};\n var pq = new PriorityQueue();\n var v, vEntry;\n\n var updateNeighbors = function(edge) {\n var w = edge.v !== v ? edge.v : edge.w;\n var wEntry = results[w];\n var weight = weightFn(edge);\n var distance = vEntry.distance + weight;\n\n if (weight < 0) {\n throw new Error(\"dijkstra does not allow negative edge weights. \" +\n \"Bad edge: \" + edge + \" Weight: \" + weight);\n }\n\n if (distance < wEntry.distance) {\n wEntry.distance = distance;\n wEntry.predecessor = v;\n pq.decrease(w, distance);\n }\n };\n\n g.nodes().forEach(function(v) {\n var distance = v === source ? 0 : Number.POSITIVE_INFINITY;\n results[v] = { distance: distance };\n pq.add(v, distance);\n });\n\n while (pq.size() > 0) {\n v = pq.removeMin();\n vEntry = results[v];\n if (vEntry.distance === Number.POSITIVE_INFINITY) {\n break;\n }\n\n edgeFn(v).forEach(updateNeighbors);\n }\n\n return results;\n}\n","var dijkstra = require(\"./dijkstra\");\nvar _ = require(\"../lodash\");\n\nmodule.exports = dijkstraAll;\n\nfunction dijkstraAll(g, weightFunc, edgeFunc) {\n return _.transform(g.nodes(), function(acc, v) {\n acc[v] = dijkstra(g, v, weightFunc, edgeFunc);\n }, {});\n}\n","var _ = require(\"../lodash\");\n\nmodule.exports = tarjan;\n\nfunction tarjan(g) {\n var index = 0;\n var stack = [];\n var visited = {}; // node id -> { onStack, lowlink, index }\n var results = [];\n\n function dfs(v) {\n var entry = visited[v] = {\n onStack: true,\n lowlink: index,\n index: index++\n };\n stack.push(v);\n\n g.successors(v).forEach(function(w) {\n if (!_.has(visited, w)) {\n dfs(w);\n entry.lowlink = Math.min(entry.lowlink, visited[w].lowlink);\n } else if (visited[w].onStack) {\n entry.lowlink = Math.min(entry.lowlink, visited[w].index);\n }\n });\n\n if (entry.lowlink === entry.index) {\n var cmpt = [];\n var w;\n do {\n w = stack.pop();\n visited[w].onStack = false;\n cmpt.push(w);\n } while (v !== w);\n results.push(cmpt);\n }\n }\n\n g.nodes().forEach(function(v) {\n if (!_.has(visited, v)) {\n dfs(v);\n }\n });\n\n return results;\n}\n","var _ = require(\"../lodash\");\nvar tarjan = require(\"./tarjan\");\n\nmodule.exports = findCycles;\n\nfunction findCycles(g) {\n return _.filter(tarjan(g), function(cmpt) {\n return cmpt.length > 1 || (cmpt.length === 1 && g.hasEdge(cmpt[0], cmpt[0]));\n });\n}\n","var _ = require(\"../lodash\");\n\nmodule.exports = floydWarshall;\n\nvar DEFAULT_WEIGHT_FUNC = _.constant(1);\n\nfunction floydWarshall(g, weightFn, edgeFn) {\n return runFloydWarshall(g,\n weightFn || DEFAULT_WEIGHT_FUNC,\n edgeFn || function(v) { return g.outEdges(v); });\n}\n\nfunction runFloydWarshall(g, weightFn, edgeFn) {\n var results = {};\n var nodes = g.nodes();\n\n nodes.forEach(function(v) {\n results[v] = {};\n results[v][v] = { distance: 0 };\n nodes.forEach(function(w) {\n if (v !== w) {\n results[v][w] = { distance: Number.POSITIVE_INFINITY };\n }\n });\n edgeFn(v).forEach(function(edge) {\n var w = edge.v === v ? edge.w : edge.v;\n var d = weightFn(edge);\n results[v][w] = { distance: d, predecessor: v };\n });\n });\n\n nodes.forEach(function(k) {\n var rowK = results[k];\n nodes.forEach(function(i) {\n var rowI = results[i];\n nodes.forEach(function(j) {\n var ik = rowI[k];\n var kj = rowK[j];\n var ij = rowI[j];\n var altDistance = ik.distance + kj.distance;\n if (altDistance < ij.distance) {\n ij.distance = altDistance;\n ij.predecessor = kj.predecessor;\n }\n });\n });\n });\n\n return results;\n}\n","var _ = require(\"../lodash\");\n\nmodule.exports = topsort;\ntopsort.CycleException = CycleException;\n\nfunction topsort(g) {\n var visited = {};\n var stack = {};\n var results = [];\n\n function visit(node) {\n if (_.has(stack, node)) {\n throw new CycleException();\n }\n\n if (!_.has(visited, node)) {\n stack[node] = true;\n visited[node] = true;\n _.each(g.predecessors(node), visit);\n delete stack[node];\n results.push(node);\n }\n }\n\n _.each(g.sinks(), visit);\n\n if (_.size(visited) !== g.nodeCount()) {\n throw new CycleException();\n }\n\n return results;\n}\n\nfunction CycleException() {}\nCycleException.prototype = new Error(); // must be an instance of Error to pass testing","var topsort = require(\"./topsort\");\n\nmodule.exports = isAcyclic;\n\nfunction isAcyclic(g) {\n try {\n topsort(g);\n } catch (e) {\n if (e instanceof topsort.CycleException) {\n return false;\n }\n throw e;\n }\n return true;\n}\n","var _ = require(\"../lodash\");\n\nmodule.exports = dfs;\n\n/*\n * A helper that preforms a pre- or post-order traversal on the input graph\n * and returns the nodes in the order they were visited. If the graph is\n * undirected then this algorithm will navigate using neighbors. If the graph\n * is directed then this algorithm will navigate using successors.\n *\n * Order must be one of \"pre\" or \"post\".\n */\nfunction dfs(g, vs, order) {\n if (!_.isArray(vs)) {\n vs = [vs];\n }\n\n var navigation = (g.isDirected() ? g.successors : g.neighbors).bind(g);\n\n var acc = [];\n var visited = {};\n _.each(vs, function(v) {\n if (!g.hasNode(v)) {\n throw new Error(\"Graph does not have node: \" + v);\n }\n\n doDfs(g, v, order === \"post\", visited, navigation, acc);\n });\n return acc;\n}\n\nfunction doDfs(g, v, postorder, visited, navigation, acc) {\n if (!_.has(visited, v)) {\n visited[v] = true;\n\n if (!postorder) { acc.push(v); }\n _.each(navigation(v), function(w) {\n doDfs(g, w, postorder, visited, navigation, acc);\n });\n if (postorder) { acc.push(v); }\n }\n}\n","var dfs = require(\"./dfs\");\n\nmodule.exports = postorder;\n\nfunction postorder(g, vs) {\n return dfs(g, vs, \"post\");\n}\n","var dfs = require(\"./dfs\");\n\nmodule.exports = preorder;\n\nfunction preorder(g, vs) {\n return dfs(g, vs, \"pre\");\n}\n","var _ = require(\"../lodash\");\nvar Graph = require(\"../graph\");\nvar PriorityQueue = require(\"../data/priority-queue\");\n\nmodule.exports = prim;\n\nfunction prim(g, weightFunc) {\n var result = new Graph();\n var parents = {};\n var pq = new PriorityQueue();\n var v;\n\n function updateNeighbors(edge) {\n var w = edge.v === v ? edge.w : edge.v;\n var pri = pq.priority(w);\n if (pri !== undefined) {\n var edgeWeight = weightFunc(edge);\n if (edgeWeight < pri) {\n parents[w] = v;\n pq.decrease(w, edgeWeight);\n }\n }\n }\n\n if (g.nodeCount() === 0) {\n return result;\n }\n\n _.each(g.nodes(), function(v) {\n pq.add(v, Number.POSITIVE_INFINITY);\n result.setNode(v);\n });\n\n // Start from an arbitrary node\n pq.decrease(g.nodes()[0], 0);\n\n var init = false;\n while (pq.size() > 0) {\n v = pq.removeMin();\n if (_.has(parents, v)) {\n result.setEdge(v, parents[v]);\n } else if (init) {\n throw new Error(\"Input graph is not connected: \" + g);\n } else {\n init = true;\n }\n\n g.nodeEdges(v).forEach(updateNeighbors);\n }\n\n return result;\n}\n","module.exports = {\n components: require(\"./components\"),\n dijkstra: require(\"./dijkstra\"),\n dijkstraAll: require(\"./dijkstra-all\"),\n findCycles: require(\"./find-cycles\"),\n floydWarshall: require(\"./floyd-warshall\"),\n isAcyclic: require(\"./is-acyclic\"),\n postorder: require(\"./postorder\"),\n preorder: require(\"./preorder\"),\n prim: require(\"./prim\"),\n tarjan: require(\"./tarjan\"),\n topsort: require(\"./topsort\")\n};\n","/**\n * Copyright (c) 2014, Chris Pettitt\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its contributors\n * may be used to endorse or promote products derived from this software without\n * specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nvar lib = require(\"./lib\");\n\nmodule.exports = {\n Graph: lib.Graph,\n json: require(\"./lib/json\"),\n alg: require(\"./lib/alg\"),\n version: lib.version\n};\n","/* global window */\n\nvar graphlib;\n\nif (typeof require === \"function\") {\n try {\n graphlib = require(\"graphlib\");\n } catch (e) {\n // continue regardless of error\n }\n}\n\nif (!graphlib) {\n graphlib = window.graphlib;\n}\n\nmodule.exports = graphlib;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","var eq = require('./eq'),\n isArrayLike = require('./isArrayLike'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject');\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\nmodule.exports = isIterateeCall;\n","var baseRest = require('./_baseRest'),\n eq = require('./eq'),\n isIterateeCall = require('./_isIterateeCall'),\n keysIn = require('./keysIn');\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 * Assigns own and inherited enumerable string keyed properties of source\n * objects to the destination object for all destination properties that\n * resolve to `undefined`. Source objects are applied from left to right.\n * Once a property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaultsDeep\n * @example\n *\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\nvar defaults = baseRest(function(object, sources) {\n object = Object(object);\n\n var index = -1;\n var length = sources.length;\n var guard = length > 2 ? sources[2] : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n length = 1;\n }\n\n while (++index < length) {\n var source = sources[index];\n var props = keysIn(source);\n var propsIndex = -1;\n var propsLength = props.length;\n\n while (++propsIndex < propsLength) {\n var key = props[propsIndex];\n var value = object[key];\n\n if (value === undefined ||\n (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n object[key] = source[key];\n }\n }\n }\n\n return object;\n});\n\nmodule.exports = defaults;\n","var baseIteratee = require('./_baseIteratee'),\n isArrayLike = require('./isArrayLike'),\n keys = require('./keys');\n\n/**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\nfunction createFind(findIndexFunc) {\n return function(collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = baseIteratee(predicate, 3);\n collection = keys(collection);\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n }\n var index = findIndexFunc(collection, predicate, fromIndex);\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n };\n}\n\nmodule.exports = createFind;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\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/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\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 = baseTrim(value);\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\nmodule.exports = toNumber;\n","var toNumber = require('./toNumber');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\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\nmodule.exports = toFinite;\n","var toFinite = require('./toFinite');\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\nmodule.exports = toInteger;\n","var baseFindIndex = require('./_baseFindIndex'),\n baseIteratee = require('./_baseIteratee'),\n toInteger = require('./toInteger');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\nfunction findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, baseIteratee(predicate, 3), index);\n}\n\nmodule.exports = findIndex;\n","var createFind = require('./_createFind'),\n findIndex = require('./findIndex');\n\n/**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */\nvar find = createFind(findIndex);\n\nmodule.exports = find;\n","var baseFlatten = require('./_baseFlatten');\n\n/**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\nfunction flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n}\n\nmodule.exports = flatten;\n","var baseFor = require('./_baseFor'),\n castFunction = require('./_castFunction'),\n keysIn = require('./keysIn');\n\n/**\n * Iterates over own and inherited enumerable string keyed properties of an\n * object and invokes `iteratee` for each property. The iteratee is invoked\n * with three arguments: (value, key, object). Iteratee functions may exit\n * iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.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 * @returns {Object} Returns `object`.\n * @see _.forInRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forIn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n */\nfunction forIn(object, iteratee) {\n return object == null\n ? object\n : baseFor(object, castFunction(iteratee), keysIn);\n}\n\nmodule.exports = forIn;\n","/**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\nfunction last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n}\n\nmodule.exports = last;\n","var baseAssignValue = require('./_baseAssignValue'),\n baseForOwn = require('./_baseForOwn'),\n baseIteratee = require('./_baseIteratee');\n\n/**\n * Creates an object with the same keys as `object` and values generated\n * by running each own enumerable string keyed property of `object` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapKeys\n * @example\n *\n * var users = {\n * 'fred': { 'user': 'fred', 'age': 40 },\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * _.mapValues(users, function(o) { return o.age; });\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n *\n * // The `_.property` iteratee shorthand.\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */\nfunction mapValues(object, iteratee) {\n var result = {};\n iteratee = baseIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, key, iteratee(value, key, object));\n });\n return result;\n}\n\nmodule.exports = mapValues;\n","var isSymbol = require('./isSymbol');\n\n/**\n * The base implementation of methods like `_.max` and `_.min` which accepts a\n * `comparator` to determine the extremum value.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The iteratee invoked per iteration.\n * @param {Function} comparator The comparator used to compare values.\n * @returns {*} Returns the extremum value.\n */\nfunction baseExtremum(array, iteratee, comparator) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n var value = array[index],\n current = iteratee(value);\n\n if (current != null && (computed === undefined\n ? (current === current && !isSymbol(current))\n : comparator(current, computed)\n )) {\n var computed = current,\n result = value;\n }\n }\n return result;\n}\n\nmodule.exports = baseExtremum;\n","/**\n * The base implementation of `_.gt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n */\nfunction baseGt(value, other) {\n return value > other;\n}\n\nmodule.exports = baseGt;\n","var baseExtremum = require('./_baseExtremum'),\n baseGt = require('./_baseGt'),\n identity = require('./identity');\n\n/**\n * Computes the maximum value of `array`. If `array` is empty or falsey,\n * `undefined` is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {*} Returns the maximum value.\n * @example\n *\n * _.max([4, 2, 8, 6]);\n * // => 8\n *\n * _.max([]);\n * // => undefined\n */\nfunction max(array) {\n return (array && array.length)\n ? baseExtremum(array, identity, baseGt)\n : undefined;\n}\n\nmodule.exports = max;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignMergeValue;\n","var baseGetTag = require('./_baseGetTag'),\n getPrototype = require('./_getPrototype'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\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 * 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) || baseGetTag(value) != objectTag) {\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' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nmodule.exports = isPlainObject;\n","/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\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 safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n}\n\nmodule.exports = safeGet;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return copyObject(value, keysIn(value));\n}\n\nmodule.exports = toPlainObject;\n","var assignMergeValue = require('./_assignMergeValue'),\n cloneBuffer = require('./_cloneBuffer'),\n cloneTypedArray = require('./_cloneTypedArray'),\n copyArray = require('./_copyArray'),\n initCloneObject = require('./_initCloneObject'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isArrayLikeObject = require('./isArrayLikeObject'),\n isBuffer = require('./isBuffer'),\n isFunction = require('./isFunction'),\n isObject = require('./isObject'),\n isPlainObject = require('./isPlainObject'),\n isTypedArray = require('./isTypedArray'),\n safeGet = require('./_safeGet'),\n toPlainObject = require('./toPlainObject');\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n}\n\nmodule.exports = baseMergeDeep;\n","var Stack = require('./_Stack'),\n assignMergeValue = require('./_assignMergeValue'),\n baseFor = require('./_baseFor'),\n baseMergeDeep = require('./_baseMergeDeep'),\n isObject = require('./isObject'),\n keysIn = require('./keysIn'),\n safeGet = require('./_safeGet');\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n}\n\nmodule.exports = baseMerge;\n","var baseRest = require('./_baseRest'),\n isIterateeCall = require('./_isIterateeCall');\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\nmodule.exports = createAssigner;\n","var baseMerge = require('./_baseMerge'),\n createAssigner = require('./_createAssigner');\n\n/**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\nvar merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n});\n\nmodule.exports = merge;\n","/**\n * The base implementation of `_.lt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n */\nfunction baseLt(value, other) {\n return value < other;\n}\n\nmodule.exports = baseLt;\n","var baseExtremum = require('./_baseExtremum'),\n baseLt = require('./_baseLt'),\n identity = require('./identity');\n\n/**\n * Computes the minimum value of `array`. If `array` is empty or falsey,\n * `undefined` is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {*} Returns the minimum value.\n * @example\n *\n * _.min([4, 2, 8, 6]);\n * // => 2\n *\n * _.min([]);\n * // => undefined\n */\nfunction min(array) {\n return (array && array.length)\n ? baseExtremum(array, identity, baseLt)\n : undefined;\n}\n\nmodule.exports = min;\n","var baseExtremum = require('./_baseExtremum'),\n baseIteratee = require('./_baseIteratee'),\n baseLt = require('./_baseLt');\n\n/**\n * This method is like `_.min` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * the value is ranked. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {*} Returns the minimum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * _.minBy(objects, function(o) { return o.n; });\n * // => { 'n': 1 }\n *\n * // The `_.property` iteratee shorthand.\n * _.minBy(objects, 'n');\n * // => { 'n': 1 }\n */\nfunction minBy(array, iteratee) {\n return (array && array.length)\n ? baseExtremum(array, baseIteratee(iteratee, 2), baseLt)\n : undefined;\n}\n\nmodule.exports = minBy;\n","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","var assignValue = require('./_assignValue'),\n castPath = require('./_castPath'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\nfunction baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n}\n\nmodule.exports = baseSet;\n","var baseGet = require('./_baseGet'),\n baseSet = require('./_baseSet'),\n castPath = require('./_castPath');\n\n/**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\nfunction basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n}\n\nmodule.exports = basePickBy;\n","var basePickBy = require('./_basePickBy'),\n hasIn = require('./hasIn');\n\n/**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\nfunction basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n}\n\nmodule.exports = basePick;\n","var flatten = require('./flatten'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\nfunction flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n}\n\nmodule.exports = flatRest;\n","var basePick = require('./_basePick'),\n flatRest = require('./_flatRest');\n\n/**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\nvar pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n});\n\nmodule.exports = pick;\n","/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeCeil = Math.ceil,\n nativeMax = Math.max;\n\n/**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\nfunction baseRange(start, end, step, fromRight) {\n var index = -1,\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n result = Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n}\n\nmodule.exports = baseRange;\n","var baseRange = require('./_baseRange'),\n isIterateeCall = require('./_isIterateeCall'),\n toFinite = require('./toFinite');\n\n/**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */\nfunction createRange(fromRight) {\n return function(start, end, step) {\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n end = step = undefined;\n }\n // Ensure the sign of `-0` is preserved.\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n return baseRange(start, end, step, fromRight);\n };\n}\n\nmodule.exports = createRange;\n","var createRange = require('./_createRange');\n\n/**\n * Creates an array of numbers (positive and/or negative) progressing from\n * `start` up to, but not including, `end`. A step of `-1` is used if a negative\n * `start` is specified without an `end` or `step`. If `end` is not specified,\n * it's set to `start` with `start` then set to `0`.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @param {number} [step=1] The value to increment or decrement by.\n * @returns {Array} Returns the range of numbers.\n * @see _.inRange, _.rangeRight\n * @example\n *\n * _.range(4);\n * // => [0, 1, 2, 3]\n *\n * _.range(-4);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 5);\n * // => [1, 2, 3, 4]\n *\n * _.range(0, 20, 5);\n * // => [0, 5, 10, 15]\n *\n * _.range(0, -4, -1);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 4, 0);\n * // => [1, 1, 1]\n *\n * _.range(0);\n * // => []\n */\nvar range = createRange();\n\nmodule.exports = range;\n","/**\n * The base implementation of `_.sortBy` which uses `comparer` to define the\n * sort order of `array` and replaces criteria objects with their corresponding\n * values.\n *\n * @private\n * @param {Array} array The array to sort.\n * @param {Function} comparer The function to define sort order.\n * @returns {Array} Returns `array`.\n */\nfunction baseSortBy(array, comparer) {\n var length = array.length;\n\n array.sort(comparer);\n while (length--) {\n array[length] = array[length].value;\n }\n return array;\n}\n\nmodule.exports = baseSortBy;\n","var isSymbol = require('./isSymbol');\n\n/**\n * Compares values to sort them in ascending order.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */\nfunction compareAscending(value, other) {\n if (value !== other) {\n var valIsDefined = value !== undefined,\n valIsNull = value === null,\n valIsReflexive = value === value,\n valIsSymbol = isSymbol(value);\n\n var othIsDefined = other !== undefined,\n othIsNull = other === null,\n othIsReflexive = other === other,\n othIsSymbol = isSymbol(other);\n\n if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n (valIsNull && othIsDefined && othIsReflexive) ||\n (!valIsDefined && othIsReflexive) ||\n !valIsReflexive) {\n return 1;\n }\n if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n (othIsNull && valIsDefined && valIsReflexive) ||\n (!othIsDefined && valIsReflexive) ||\n !othIsReflexive) {\n return -1;\n }\n }\n return 0;\n}\n\nmodule.exports = compareAscending;\n","var compareAscending = require('./_compareAscending');\n\n/**\n * Used by `_.orderBy` to compare multiple properties of a value to another\n * and stable sort them.\n *\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n * of corresponding values.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {boolean[]|string[]} orders The order to sort by for each property.\n * @returns {number} Returns the sort order indicator for `object`.\n */\nfunction compareMultiple(object, other, orders) {\n var index = -1,\n objCriteria = object.criteria,\n othCriteria = other.criteria,\n length = objCriteria.length,\n ordersLength = orders.length;\n\n while (++index < length) {\n var result = compareAscending(objCriteria[index], othCriteria[index]);\n if (result) {\n if (index >= ordersLength) {\n return result;\n }\n var order = orders[index];\n return result * (order == 'desc' ? -1 : 1);\n }\n }\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n // that causes it, under certain circumstances, to provide the same value for\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n // for more details.\n //\n // This also ensures a stable sort in V8 and other engines.\n // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n return object.index - other.index;\n}\n\nmodule.exports = compareMultiple;\n","var arrayMap = require('./_arrayMap'),\n baseGet = require('./_baseGet'),\n baseIteratee = require('./_baseIteratee'),\n baseMap = require('./_baseMap'),\n baseSortBy = require('./_baseSortBy'),\n baseUnary = require('./_baseUnary'),\n compareMultiple = require('./_compareMultiple'),\n identity = require('./identity'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `_.orderBy` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n * @param {string[]} orders The sort orders of `iteratees`.\n * @returns {Array} Returns the new sorted array.\n */\nfunction baseOrderBy(collection, iteratees, orders) {\n if (iteratees.length) {\n iteratees = arrayMap(iteratees, function(iteratee) {\n if (isArray(iteratee)) {\n return function(value) {\n return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);\n }\n }\n return iteratee;\n });\n } else {\n iteratees = [identity];\n }\n\n var index = -1;\n iteratees = arrayMap(iteratees, baseUnary(baseIteratee));\n\n var result = baseMap(collection, function(value, key, collection) {\n var criteria = arrayMap(iteratees, function(iteratee) {\n return iteratee(value);\n });\n return { 'criteria': criteria, 'index': ++index, 'value': value };\n });\n\n return baseSortBy(result, function(object, other) {\n return compareMultiple(object, other, orders);\n });\n}\n\nmodule.exports = baseOrderBy;\n","var baseFlatten = require('./_baseFlatten'),\n baseOrderBy = require('./_baseOrderBy'),\n baseRest = require('./_baseRest'),\n isIterateeCall = require('./_isIterateeCall');\n\n/**\n * Creates an array of elements, sorted in ascending order by the results of\n * running each element in a collection thru each iteratee. This method\n * performs a stable sort, that is, it preserves the original sort order of\n * equal elements. The iteratees are invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 30 },\n * { 'user': 'barney', 'age': 34 }\n * ];\n *\n * _.sortBy(users, [function(o) { return o.user; }]);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]\n *\n * _.sortBy(users, ['user', 'age']);\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]\n */\nvar sortBy = baseRest(function(collection, iteratees) {\n if (collection == null) {\n return [];\n }\n var length = iteratees.length;\n if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n iteratees = [];\n } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n iteratees = [iteratees[0]];\n }\n return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n});\n\nmodule.exports = sortBy;\n","var toString = require('./toString');\n\n/** Used to generate unique IDs. */\nvar idCounter = 0;\n\n/**\n * Generates a unique ID. If `prefix` is given, the ID is appended to it.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {string} [prefix=''] The value to prefix the ID with.\n * @returns {string} Returns the unique ID.\n * @example\n *\n * _.uniqueId('contact_');\n * // => 'contact_104'\n *\n * _.uniqueId();\n * // => '105'\n */\nfunction uniqueId(prefix) {\n var id = ++idCounter;\n return toString(prefix) + id;\n}\n\nmodule.exports = uniqueId;\n","/**\n * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\n *\n * @private\n * @param {Array} props The property identifiers.\n * @param {Array} values The property values.\n * @param {Function} assignFunc The function to assign values.\n * @returns {Object} Returns the new object.\n */\nfunction baseZipObject(props, values, assignFunc) {\n var index = -1,\n length = props.length,\n valsLength = values.length,\n result = {};\n\n while (++index < length) {\n var value = index < valsLength ? values[index] : undefined;\n assignFunc(result, props[index], value);\n }\n return result;\n}\n\nmodule.exports = baseZipObject;\n","var assignValue = require('./_assignValue'),\n baseZipObject = require('./_baseZipObject');\n\n/**\n * This method is like `_.fromPairs` except that it accepts two arrays,\n * one of property identifiers and one of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 0.4.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\nfunction zipObject(props, values) {\n return baseZipObject(props || [], values || [], assignValue);\n}\n\nmodule.exports = zipObject;\n","/* global window */\n\nvar lodash;\n\nif (typeof require === \"function\") {\n try {\n lodash = {\n cloneDeep: require(\"lodash/cloneDeep\"),\n constant: require(\"lodash/constant\"),\n defaults: require(\"lodash/defaults\"),\n each: require(\"lodash/each\"),\n filter: require(\"lodash/filter\"),\n find: require(\"lodash/find\"),\n flatten: require(\"lodash/flatten\"),\n forEach: require(\"lodash/forEach\"),\n forIn: require(\"lodash/forIn\"),\n has: require(\"lodash/has\"),\n isUndefined: require(\"lodash/isUndefined\"),\n last: require(\"lodash/last\"),\n map: require(\"lodash/map\"),\n mapValues: require(\"lodash/mapValues\"),\n max: require(\"lodash/max\"),\n merge: require(\"lodash/merge\"),\n min: require(\"lodash/min\"),\n minBy: require(\"lodash/minBy\"),\n now: require(\"lodash/now\"),\n pick: require(\"lodash/pick\"),\n range: require(\"lodash/range\"),\n reduce: require(\"lodash/reduce\"),\n sortBy: require(\"lodash/sortBy\"),\n uniqueId: require(\"lodash/uniqueId\"),\n values: require(\"lodash/values\"),\n zipObject: require(\"lodash/zipObject\"),\n };\n } catch (e) {\n // continue regardless of error\n }\n}\n\nif (!lodash) {\n lodash = window._;\n}\n\nmodule.exports = lodash;\n","/*\n * Simple doubly linked list implementation derived from Cormen, et al.,\n * \"Introduction to Algorithms\".\n */\n\nmodule.exports = List;\n\nfunction List() {\n var sentinel = {};\n sentinel._next = sentinel._prev = sentinel;\n this._sentinel = sentinel;\n}\n\nList.prototype.dequeue = function() {\n var sentinel = this._sentinel;\n var entry = sentinel._prev;\n if (entry !== sentinel) {\n unlink(entry);\n return entry;\n }\n};\n\nList.prototype.enqueue = function(entry) {\n var sentinel = this._sentinel;\n if (entry._prev && entry._next) {\n unlink(entry);\n }\n entry._next = sentinel._next;\n sentinel._next._prev = entry;\n sentinel._next = entry;\n entry._prev = sentinel;\n};\n\nList.prototype.toString = function() {\n var strs = [];\n var sentinel = this._sentinel;\n var curr = sentinel._prev;\n while (curr !== sentinel) {\n strs.push(JSON.stringify(curr, filterOutLinks));\n curr = curr._prev;\n }\n return \"[\" + strs.join(\", \") + \"]\";\n};\n\nfunction unlink(entry) {\n entry._prev._next = entry._next;\n entry._next._prev = entry._prev;\n delete entry._next;\n delete entry._prev;\n}\n\nfunction filterOutLinks(k, v) {\n if (k !== \"_next\" && k !== \"_prev\") {\n return v;\n }\n}\n","var _ = require(\"./lodash\");\nvar Graph = require(\"./graphlib\").Graph;\nvar List = require(\"./data/list\");\n\n/*\n * A greedy heuristic for finding a feedback arc set for a graph. A feedback\n * arc set is a set of edges that can be removed to make a graph acyclic.\n * The algorithm comes from: P. Eades, X. Lin, and W. F. Smyth, \"A fast and\n * effective heuristic for the feedback arc set problem.\" This implementation\n * adjusts that from the paper to allow for weighted edges.\n */\nmodule.exports = greedyFAS;\n\nvar DEFAULT_WEIGHT_FN = _.constant(1);\n\nfunction greedyFAS(g, weightFn) {\n if (g.nodeCount() <= 1) {\n return [];\n }\n var state = buildState(g, weightFn || DEFAULT_WEIGHT_FN);\n var results = doGreedyFAS(state.graph, state.buckets, state.zeroIdx);\n\n // Expand multi-edges\n return _.flatten(_.map(results, function(e) {\n return g.outEdges(e.v, e.w);\n }), true);\n}\n\nfunction doGreedyFAS(g, buckets, zeroIdx) {\n var results = [];\n var sources = buckets[buckets.length - 1];\n var sinks = buckets[0];\n\n var entry;\n while (g.nodeCount()) {\n while ((entry = sinks.dequeue())) { removeNode(g, buckets, zeroIdx, entry); }\n while ((entry = sources.dequeue())) { removeNode(g, buckets, zeroIdx, entry); }\n if (g.nodeCount()) {\n for (var i = buckets.length - 2; i > 0; --i) {\n entry = buckets[i].dequeue();\n if (entry) {\n results = results.concat(removeNode(g, buckets, zeroIdx, entry, true));\n break;\n }\n }\n }\n }\n\n return results;\n}\n\nfunction removeNode(g, buckets, zeroIdx, entry, collectPredecessors) {\n var results = collectPredecessors ? [] : undefined;\n\n _.forEach(g.inEdges(entry.v), function(edge) {\n var weight = g.edge(edge);\n var uEntry = g.node(edge.v);\n\n if (collectPredecessors) {\n results.push({ v: edge.v, w: edge.w });\n }\n\n uEntry.out -= weight;\n assignBucket(buckets, zeroIdx, uEntry);\n });\n\n _.forEach(g.outEdges(entry.v), function(edge) {\n var weight = g.edge(edge);\n var w = edge.w;\n var wEntry = g.node(w);\n wEntry[\"in\"] -= weight;\n assignBucket(buckets, zeroIdx, wEntry);\n });\n\n g.removeNode(entry.v);\n\n return results;\n}\n\nfunction buildState(g, weightFn) {\n var fasGraph = new Graph();\n var maxIn = 0;\n var maxOut = 0;\n\n _.forEach(g.nodes(), function(v) {\n fasGraph.setNode(v, { v: v, \"in\": 0, out: 0 });\n });\n\n // Aggregate weights on nodes, but also sum the weights across multi-edges\n // into a single edge for the fasGraph.\n _.forEach(g.edges(), function(e) {\n var prevWeight = fasGraph.edge(e.v, e.w) || 0;\n var weight = weightFn(e);\n var edgeWeight = prevWeight + weight;\n fasGraph.setEdge(e.v, e.w, edgeWeight);\n maxOut = Math.max(maxOut, fasGraph.node(e.v).out += weight);\n maxIn = Math.max(maxIn, fasGraph.node(e.w)[\"in\"] += weight);\n });\n\n var buckets = _.range(maxOut + maxIn + 3).map(function() { return new List(); });\n var zeroIdx = maxIn + 1;\n\n _.forEach(fasGraph.nodes(), function(v) {\n assignBucket(buckets, zeroIdx, fasGraph.node(v));\n });\n\n return { graph: fasGraph, buckets: buckets, zeroIdx: zeroIdx };\n}\n\nfunction assignBucket(buckets, zeroIdx, entry) {\n if (!entry.out) {\n buckets[0].enqueue(entry);\n } else if (!entry[\"in\"]) {\n buckets[buckets.length - 1].enqueue(entry);\n } else {\n buckets[entry.out - entry[\"in\"] + zeroIdx].enqueue(entry);\n }\n}\n","\"use strict\";\n\nvar _ = require(\"./lodash\");\nvar greedyFAS = require(\"./greedy-fas\");\n\nmodule.exports = {\n run: run,\n undo: undo\n};\n\nfunction run(g) {\n var fas = (g.graph().acyclicer === \"greedy\"\n ? greedyFAS(g, weightFn(g))\n : dfsFAS(g));\n _.forEach(fas, function(e) {\n var label = g.edge(e);\n g.removeEdge(e);\n label.forwardName = e.name;\n label.reversed = true;\n g.setEdge(e.w, e.v, label, _.uniqueId(\"rev\"));\n });\n\n function weightFn(g) {\n return function(e) {\n return g.edge(e).weight;\n };\n }\n}\n\nfunction dfsFAS(g) {\n var fas = [];\n var stack = {};\n var visited = {};\n\n function dfs(v) {\n if (_.has(visited, v)) {\n return;\n }\n visited[v] = true;\n stack[v] = true;\n _.forEach(g.outEdges(v), function(e) {\n if (_.has(stack, e.w)) {\n fas.push(e);\n } else {\n dfs(e.w);\n }\n });\n delete stack[v];\n }\n\n _.forEach(g.nodes(), dfs);\n return fas;\n}\n\nfunction undo(g) {\n _.forEach(g.edges(), function(e) {\n var label = g.edge(e);\n if (label.reversed) {\n g.removeEdge(e);\n\n var forwardName = label.forwardName;\n delete label.reversed;\n delete label.forwardName;\n g.setEdge(e.w, e.v, label, forwardName);\n }\n });\n}\n","/* eslint \"no-console\": off */\n\n\"use strict\";\n\nvar _ = require(\"./lodash\");\nvar Graph = require(\"./graphlib\").Graph;\n\nmodule.exports = {\n addDummyNode: addDummyNode,\n simplify: simplify,\n asNonCompoundGraph: asNonCompoundGraph,\n successorWeights: successorWeights,\n predecessorWeights: predecessorWeights,\n intersectRect: intersectRect,\n buildLayerMatrix: buildLayerMatrix,\n normalizeRanks: normalizeRanks,\n removeEmptyRanks: removeEmptyRanks,\n addBorderNode: addBorderNode,\n maxRank: maxRank,\n partition: partition,\n time: time,\n notime: notime\n};\n\n/*\n * Adds a dummy node to the graph and return v.\n */\nfunction addDummyNode(g, type, attrs, name) {\n var v;\n do {\n v = _.uniqueId(name);\n } while (g.hasNode(v));\n\n attrs.dummy = type;\n g.setNode(v, attrs);\n return v;\n}\n\n/*\n * Returns a new graph with only simple edges. Handles aggregation of data\n * associated with multi-edges.\n */\nfunction simplify(g) {\n var simplified = new Graph().setGraph(g.graph());\n _.forEach(g.nodes(), function(v) { simplified.setNode(v, g.node(v)); });\n _.forEach(g.edges(), function(e) {\n var simpleLabel = simplified.edge(e.v, e.w) || { weight: 0, minlen: 1 };\n var label = g.edge(e);\n simplified.setEdge(e.v, e.w, {\n weight: simpleLabel.weight + label.weight,\n minlen: Math.max(simpleLabel.minlen, label.minlen)\n });\n });\n return simplified;\n}\n\nfunction asNonCompoundGraph(g) {\n var simplified = new Graph({ multigraph: g.isMultigraph() }).setGraph(g.graph());\n _.forEach(g.nodes(), function(v) {\n if (!g.children(v).length) {\n simplified.setNode(v, g.node(v));\n }\n });\n _.forEach(g.edges(), function(e) {\n simplified.setEdge(e, g.edge(e));\n });\n return simplified;\n}\n\nfunction successorWeights(g) {\n var weightMap = _.map(g.nodes(), function(v) {\n var sucs = {};\n _.forEach(g.outEdges(v), function(e) {\n sucs[e.w] = (sucs[e.w] || 0) + g.edge(e).weight;\n });\n return sucs;\n });\n return _.zipObject(g.nodes(), weightMap);\n}\n\nfunction predecessorWeights(g) {\n var weightMap = _.map(g.nodes(), function(v) {\n var preds = {};\n _.forEach(g.inEdges(v), function(e) {\n preds[e.v] = (preds[e.v] || 0) + g.edge(e).weight;\n });\n return preds;\n });\n return _.zipObject(g.nodes(), weightMap);\n}\n\n/*\n * Finds where a line starting at point ({x, y}) would intersect a rectangle\n * ({x, y, width, height}) if it were pointing at the rectangle's center.\n */\nfunction intersectRect(rect, point) {\n var x = rect.x;\n var y = rect.y;\n\n // Rectangle intersection algorithm from:\n // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes\n var dx = point.x - x;\n var dy = point.y - y;\n var w = rect.width / 2;\n var h = rect.height / 2;\n\n if (!dx && !dy) {\n throw new Error(\"Not possible to find intersection inside of the rectangle\");\n }\n\n var sx, sy;\n if (Math.abs(dy) * w > Math.abs(dx) * h) {\n // Intersection is top or bottom of rect.\n if (dy < 0) {\n h = -h;\n }\n sx = h * dx / dy;\n sy = h;\n } else {\n // Intersection is left or right of rect.\n if (dx < 0) {\n w = -w;\n }\n sx = w;\n sy = w * dy / dx;\n }\n\n return { x: x + sx, y: y + sy };\n}\n\n/*\n * Given a DAG with each node assigned \"rank\" and \"order\" properties, this\n * function will produce a matrix with the ids of each node.\n */\nfunction buildLayerMatrix(g) {\n var layering = _.map(_.range(maxRank(g) + 1), function() { return []; });\n _.forEach(g.nodes(), function(v) {\n var node = g.node(v);\n var rank = node.rank;\n if (!_.isUndefined(rank)) {\n layering[rank][node.order] = v;\n }\n });\n return layering;\n}\n\n/*\n * Adjusts the ranks for all nodes in the graph such that all nodes v have\n * rank(v) >= 0 and at least one node w has rank(w) = 0.\n */\nfunction normalizeRanks(g) {\n var min = _.min(_.map(g.nodes(), function(v) { return g.node(v).rank; }));\n _.forEach(g.nodes(), function(v) {\n var node = g.node(v);\n if (_.has(node, \"rank\")) {\n node.rank -= min;\n }\n });\n}\n\nfunction removeEmptyRanks(g) {\n // Ranks may not start at 0, so we need to offset them\n var offset = _.min(_.map(g.nodes(), function(v) { return g.node(v).rank; }));\n\n var layers = [];\n _.forEach(g.nodes(), function(v) {\n var rank = g.node(v).rank - offset;\n if (!layers[rank]) {\n layers[rank] = [];\n }\n layers[rank].push(v);\n });\n\n var delta = 0;\n var nodeRankFactor = g.graph().nodeRankFactor;\n _.forEach(layers, function(vs, i) {\n if (_.isUndefined(vs) && i % nodeRankFactor !== 0) {\n --delta;\n } else if (delta) {\n _.forEach(vs, function(v) { g.node(v).rank += delta; });\n }\n });\n}\n\nfunction addBorderNode(g, prefix, rank, order) {\n var node = {\n width: 0,\n height: 0\n };\n if (arguments.length >= 4) {\n node.rank = rank;\n node.order = order;\n }\n return addDummyNode(g, \"border\", node, prefix);\n}\n\nfunction maxRank(g) {\n return _.max(_.map(g.nodes(), function(v) {\n var rank = g.node(v).rank;\n if (!_.isUndefined(rank)) {\n return rank;\n }\n }));\n}\n\n/*\n * Partition a collection into two groups: `lhs` and `rhs`. If the supplied\n * function returns true for an entry it goes into `lhs`. Otherwise it goes\n * into `rhs.\n */\nfunction partition(collection, fn) {\n var result = { lhs: [], rhs: [] };\n _.forEach(collection, function(value) {\n if (fn(value)) {\n result.lhs.push(value);\n } else {\n result.rhs.push(value);\n }\n });\n return result;\n}\n\n/*\n * Returns a new function that wraps `fn` with a timer. The wrapper logs the\n * time it takes to execute the function.\n */\nfunction time(name, fn) {\n var start = _.now();\n try {\n return fn();\n } finally {\n console.log(name + \" time: \" + (_.now() - start) + \"ms\");\n }\n}\n\nfunction notime(name, fn) {\n return fn();\n}\n","\"use strict\";\n\nvar _ = require(\"./lodash\");\nvar util = require(\"./util\");\n\nmodule.exports = {\n run: run,\n undo: undo\n};\n\n/*\n * Breaks any long edges in the graph into short segments that span 1 layer\n * each. This operation is undoable with the denormalize function.\n *\n * Pre-conditions:\n *\n * 1. The input graph is a DAG.\n * 2. Each node in the graph has a \"rank\" property.\n *\n * Post-condition:\n *\n * 1. All edges in the graph have a length of 1.\n * 2. Dummy nodes are added where edges have been split into segments.\n * 3. The graph is augmented with a \"dummyChains\" attribute which contains\n * the first dummy in each chain of dummy nodes produced.\n */\nfunction run(g) {\n g.graph().dummyChains = [];\n _.forEach(g.edges(), function(edge) { normalizeEdge(g, edge); });\n}\n\nfunction normalizeEdge(g, e) {\n var v = e.v;\n var vRank = g.node(v).rank;\n var w = e.w;\n var wRank = g.node(w).rank;\n var name = e.name;\n var edgeLabel = g.edge(e);\n var labelRank = edgeLabel.labelRank;\n\n if (wRank === vRank + 1) return;\n\n g.removeEdge(e);\n\n var dummy, attrs, i;\n for (i = 0, ++vRank; vRank < wRank; ++i, ++vRank) {\n edgeLabel.points = [];\n attrs = {\n width: 0, height: 0,\n edgeLabel: edgeLabel, edgeObj: e,\n rank: vRank\n };\n dummy = util.addDummyNode(g, \"edge\", attrs, \"_d\");\n if (vRank === labelRank) {\n attrs.width = edgeLabel.width;\n attrs.height = edgeLabel.height;\n attrs.dummy = \"edge-label\";\n attrs.labelpos = edgeLabel.labelpos;\n }\n g.setEdge(v, dummy, { weight: edgeLabel.weight }, name);\n if (i === 0) {\n g.graph().dummyChains.push(dummy);\n }\n v = dummy;\n }\n\n g.setEdge(v, w, { weight: edgeLabel.weight }, name);\n}\n\nfunction undo(g) {\n _.forEach(g.graph().dummyChains, function(v) {\n var node = g.node(v);\n var origLabel = node.edgeLabel;\n var w;\n g.setEdge(node.edgeObj, origLabel);\n while (node.dummy) {\n w = g.successors(v)[0];\n g.removeNode(v);\n origLabel.points.push({ x: node.x, y: node.y });\n if (node.dummy === \"edge-label\") {\n origLabel.x = node.x;\n origLabel.y = node.y;\n origLabel.width = node.width;\n origLabel.height = node.height;\n }\n v = w;\n node = g.node(v);\n }\n });\n}\n","\"use strict\";\n\nvar _ = require(\"../lodash\");\n\nmodule.exports = {\n longestPath: longestPath,\n slack: slack\n};\n\n/*\n * Initializes ranks for the input graph using the longest path algorithm. This\n * algorithm scales well and is fast in practice, it yields rather poor\n * solutions. Nodes are pushed to the lowest layer possible, leaving the bottom\n * ranks wide and leaving edges longer than necessary. However, due to its\n * speed, this algorithm is good for getting an initial ranking that can be fed\n * into other algorithms.\n *\n * This algorithm does not normalize layers because it will be used by other\n * algorithms in most cases. If using this algorithm directly, be sure to\n * run normalize at the end.\n *\n * Pre-conditions:\n *\n * 1. Input graph is a DAG.\n * 2. Input graph node labels can be assigned properties.\n *\n * Post-conditions:\n *\n * 1. Each node will be assign an (unnormalized) \"rank\" property.\n */\nfunction longestPath(g) {\n var visited = {};\n\n function dfs(v) {\n var label = g.node(v);\n if (_.has(visited, v)) {\n return label.rank;\n }\n visited[v] = true;\n\n var rank = _.min(_.map(g.outEdges(v), function(e) {\n return dfs(e.w) - g.edge(e).minlen;\n }));\n\n if (rank === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3\n rank === undefined || // return value of _.map([]) for Lodash 4\n rank === null) { // return value of _.map([null])\n rank = 0;\n }\n\n return (label.rank = rank);\n }\n\n _.forEach(g.sources(), dfs);\n}\n\n/*\n * Returns the amount of slack for the given edge. The slack is defined as the\n * difference between the length of the edge and its minimum length.\n */\nfunction slack(g, e) {\n return g.node(e.w).rank - g.node(e.v).rank - g.edge(e).minlen;\n}\n","\"use strict\";\n\nvar _ = require(\"../lodash\");\nvar Graph = require(\"../graphlib\").Graph;\nvar slack = require(\"./util\").slack;\n\nmodule.exports = feasibleTree;\n\n/*\n * Constructs a spanning tree with tight edges and adjusted the input node's\n * ranks to achieve this. A tight edge is one that is has a length that matches\n * its \"minlen\" attribute.\n *\n * The basic structure for this function is derived from Gansner, et al., \"A\n * Technique for Drawing Directed Graphs.\"\n *\n * Pre-conditions:\n *\n * 1. Graph must be a DAG.\n * 2. Graph must be connected.\n * 3. Graph must have at least one node.\n * 5. Graph nodes must have been previously assigned a \"rank\" property that\n * respects the \"minlen\" property of incident edges.\n * 6. Graph edges must have a \"minlen\" property.\n *\n * Post-conditions:\n *\n * - Graph nodes will have their rank adjusted to ensure that all edges are\n * tight.\n *\n * Returns a tree (undirected graph) that is constructed using only \"tight\"\n * edges.\n */\nfunction feasibleTree(g) {\n var t = new Graph({ directed: false });\n\n // Choose arbitrary node from which to start our tree\n var start = g.nodes()[0];\n var size = g.nodeCount();\n t.setNode(start, {});\n\n var edge, delta;\n while (tightTree(t, g) < size) {\n edge = findMinSlackEdge(t, g);\n delta = t.hasNode(edge.v) ? slack(g, edge) : -slack(g, edge);\n shiftRanks(t, g, delta);\n }\n\n return t;\n}\n\n/*\n * Finds a maximal tree of tight edges and returns the number of nodes in the\n * tree.\n */\nfunction tightTree(t, g) {\n function dfs(v) {\n _.forEach(g.nodeEdges(v), function(e) {\n var edgeV = e.v,\n w = (v === edgeV) ? e.w : edgeV;\n if (!t.hasNode(w) && !slack(g, e)) {\n t.setNode(w, {});\n t.setEdge(v, w, {});\n dfs(w);\n }\n });\n }\n\n _.forEach(t.nodes(), dfs);\n return t.nodeCount();\n}\n\n/*\n * Finds the edge with the smallest slack that is incident on tree and returns\n * it.\n */\nfunction findMinSlackEdge(t, g) {\n return _.minBy(g.edges(), function(e) {\n if (t.hasNode(e.v) !== t.hasNode(e.w)) {\n return slack(g, e);\n }\n });\n}\n\nfunction shiftRanks(t, g, delta) {\n _.forEach(t.nodes(), function(v) {\n g.node(v).rank += delta;\n });\n}\n","\"use strict\";\n\nvar _ = require(\"../lodash\");\nvar feasibleTree = require(\"./feasible-tree\");\nvar slack = require(\"./util\").slack;\nvar initRank = require(\"./util\").longestPath;\nvar preorder = require(\"../graphlib\").alg.preorder;\nvar postorder = require(\"../graphlib\").alg.postorder;\nvar simplify = require(\"../util\").simplify;\n\nmodule.exports = networkSimplex;\n\n// Expose some internals for testing purposes\nnetworkSimplex.initLowLimValues = initLowLimValues;\nnetworkSimplex.initCutValues = initCutValues;\nnetworkSimplex.calcCutValue = calcCutValue;\nnetworkSimplex.leaveEdge = leaveEdge;\nnetworkSimplex.enterEdge = enterEdge;\nnetworkSimplex.exchangeEdges = exchangeEdges;\n\n/*\n * The network simplex algorithm assigns ranks to each node in the input graph\n * and iteratively improves the ranking to reduce the length of edges.\n *\n * Preconditions:\n *\n * 1. The input graph must be a DAG.\n * 2. All nodes in the graph must have an object value.\n * 3. All edges in the graph must have \"minlen\" and \"weight\" attributes.\n *\n * Postconditions:\n *\n * 1. All nodes in the graph will have an assigned \"rank\" attribute that has\n * been optimized by the network simplex algorithm. Ranks start at 0.\n *\n *\n * A rough sketch of the algorithm is as follows:\n *\n * 1. Assign initial ranks to each node. We use the longest path algorithm,\n * which assigns ranks to the lowest position possible. In general this\n * leads to very wide bottom ranks and unnecessarily long edges.\n * 2. Construct a feasible tight tree. A tight tree is one such that all\n * edges in the tree have no slack (difference between length of edge\n * and minlen for the edge). This by itself greatly improves the assigned\n * rankings by shorting edges.\n * 3. Iteratively find edges that have negative cut values. Generally a\n * negative cut value indicates that the edge could be removed and a new\n * tree edge could be added to produce a more compact graph.\n *\n * Much of the algorithms here are derived from Gansner, et al., \"A Technique\n * for Drawing Directed Graphs.\" The structure of the file roughly follows the\n * structure of the overall algorithm.\n */\nfunction networkSimplex(g) {\n g = simplify(g);\n initRank(g);\n var t = feasibleTree(g);\n initLowLimValues(t);\n initCutValues(t, g);\n\n var e, f;\n while ((e = leaveEdge(t))) {\n f = enterEdge(t, g, e);\n exchangeEdges(t, g, e, f);\n }\n}\n\n/*\n * Initializes cut values for all edges in the tree.\n */\nfunction initCutValues(t, g) {\n var vs = postorder(t, t.nodes());\n vs = vs.slice(0, vs.length - 1);\n _.forEach(vs, function(v) {\n assignCutValue(t, g, v);\n });\n}\n\nfunction assignCutValue(t, g, child) {\n var childLab = t.node(child);\n var parent = childLab.parent;\n t.edge(child, parent).cutvalue = calcCutValue(t, g, child);\n}\n\n/*\n * Given the tight tree, its graph, and a child in the graph calculate and\n * return the cut value for the edge between the child and its parent.\n */\nfunction calcCutValue(t, g, child) {\n var childLab = t.node(child);\n var parent = childLab.parent;\n // True if the child is on the tail end of the edge in the directed graph\n var childIsTail = true;\n // The graph's view of the tree edge we're inspecting\n var graphEdge = g.edge(child, parent);\n // The accumulated cut value for the edge between this node and its parent\n var cutValue = 0;\n\n if (!graphEdge) {\n childIsTail = false;\n graphEdge = g.edge(parent, child);\n }\n\n cutValue = graphEdge.weight;\n\n _.forEach(g.nodeEdges(child), function(e) {\n var isOutEdge = e.v === child,\n other = isOutEdge ? e.w : e.v;\n\n if (other !== parent) {\n var pointsToHead = isOutEdge === childIsTail,\n otherWeight = g.edge(e).weight;\n\n cutValue += pointsToHead ? otherWeight : -otherWeight;\n if (isTreeEdge(t, child, other)) {\n var otherCutValue = t.edge(child, other).cutvalue;\n cutValue += pointsToHead ? -otherCutValue : otherCutValue;\n }\n }\n });\n\n return cutValue;\n}\n\nfunction initLowLimValues(tree, root) {\n if (arguments.length < 2) {\n root = tree.nodes()[0];\n }\n dfsAssignLowLim(tree, {}, 1, root);\n}\n\nfunction dfsAssignLowLim(tree, visited, nextLim, v, parent) {\n var low = nextLim;\n var label = tree.node(v);\n\n visited[v] = true;\n _.forEach(tree.neighbors(v), function(w) {\n if (!_.has(visited, w)) {\n nextLim = dfsAssignLowLim(tree, visited, nextLim, w, v);\n }\n });\n\n label.low = low;\n label.lim = nextLim++;\n if (parent) {\n label.parent = parent;\n } else {\n // TODO should be able to remove this when we incrementally update low lim\n delete label.parent;\n }\n\n return nextLim;\n}\n\nfunction leaveEdge(tree) {\n return _.find(tree.edges(), function(e) {\n return tree.edge(e).cutvalue < 0;\n });\n}\n\nfunction enterEdge(t, g, edge) {\n var v = edge.v;\n var w = edge.w;\n\n // For the rest of this function we assume that v is the tail and w is the\n // head, so if we don't have this edge in the graph we should flip it to\n // match the correct orientation.\n if (!g.hasEdge(v, w)) {\n v = edge.w;\n w = edge.v;\n }\n\n var vLabel = t.node(v);\n var wLabel = t.node(w);\n var tailLabel = vLabel;\n var flip = false;\n\n // If the root is in the tail of the edge then we need to flip the logic that\n // checks for the head and tail nodes in the candidates function below.\n if (vLabel.lim > wLabel.lim) {\n tailLabel = wLabel;\n flip = true;\n }\n\n var candidates = _.filter(g.edges(), function(edge) {\n return flip === isDescendant(t, t.node(edge.v), tailLabel) &&\n flip !== isDescendant(t, t.node(edge.w), tailLabel);\n });\n\n return _.minBy(candidates, function(edge) { return slack(g, edge); });\n}\n\nfunction exchangeEdges(t, g, e, f) {\n var v = e.v;\n var w = e.w;\n t.removeEdge(v, w);\n t.setEdge(f.v, f.w, {});\n initLowLimValues(t);\n initCutValues(t, g);\n updateRanks(t, g);\n}\n\nfunction updateRanks(t, g) {\n var root = _.find(t.nodes(), function(v) { return !g.node(v).parent; });\n var vs = preorder(t, root);\n vs = vs.slice(1);\n _.forEach(vs, function(v) {\n var parent = t.node(v).parent,\n edge = g.edge(v, parent),\n flipped = false;\n\n if (!edge) {\n edge = g.edge(parent, v);\n flipped = true;\n }\n\n g.node(v).rank = g.node(parent).rank + (flipped ? edge.minlen : -edge.minlen);\n });\n}\n\n/*\n * Returns true if the edge is in the tree.\n */\nfunction isTreeEdge(tree, u, v) {\n return tree.hasEdge(u, v);\n}\n\n/*\n * Returns true if the specified node is descendant of the root node per the\n * assigned low and lim attributes in the tree.\n */\nfunction isDescendant(tree, vLabel, rootLabel) {\n return rootLabel.low <= vLabel.lim && vLabel.lim <= rootLabel.lim;\n}\n","\"use strict\";\n\nvar rankUtil = require(\"./util\");\nvar longestPath = rankUtil.longestPath;\nvar feasibleTree = require(\"./feasible-tree\");\nvar networkSimplex = require(\"./network-simplex\");\n\nmodule.exports = rank;\n\n/*\n * Assigns a rank to each node in the input graph that respects the \"minlen\"\n * constraint specified on edges between nodes.\n *\n * This basic structure is derived from Gansner, et al., \"A Technique for\n * Drawing Directed Graphs.\"\n *\n * Pre-conditions:\n *\n * 1. Graph must be a connected DAG\n * 2. Graph nodes must be objects\n * 3. Graph edges must have \"weight\" and \"minlen\" attributes\n *\n * Post-conditions:\n *\n * 1. Graph nodes will have a \"rank\" attribute based on the results of the\n * algorithm. Ranks can start at any index (including negative), we'll\n * fix them up later.\n */\nfunction rank(g) {\n switch(g.graph().ranker) {\n case \"network-simplex\": networkSimplexRanker(g); break;\n case \"tight-tree\": tightTreeRanker(g); break;\n case \"longest-path\": longestPathRanker(g); break;\n default: networkSimplexRanker(g);\n }\n}\n\n// A fast and simple ranker, but results are far from optimal.\nvar longestPathRanker = longestPath;\n\nfunction tightTreeRanker(g) {\n longestPath(g);\n feasibleTree(g);\n}\n\nfunction networkSimplexRanker(g) {\n networkSimplex(g);\n}\n","var _ = require(\"./lodash\");\n\nmodule.exports = parentDummyChains;\n\nfunction parentDummyChains(g) {\n var postorderNums = postorder(g);\n\n _.forEach(g.graph().dummyChains, function(v) {\n var node = g.node(v);\n var edgeObj = node.edgeObj;\n var pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w);\n var path = pathData.path;\n var lca = pathData.lca;\n var pathIdx = 0;\n var pathV = path[pathIdx];\n var ascending = true;\n\n while (v !== edgeObj.w) {\n node = g.node(v);\n\n if (ascending) {\n while ((pathV = path[pathIdx]) !== lca &&\n g.node(pathV).maxRank < node.rank) {\n pathIdx++;\n }\n\n if (pathV === lca) {\n ascending = false;\n }\n }\n\n if (!ascending) {\n while (pathIdx < path.length - 1 &&\n g.node(pathV = path[pathIdx + 1]).minRank <= node.rank) {\n pathIdx++;\n }\n pathV = path[pathIdx];\n }\n\n g.setParent(v, pathV);\n v = g.successors(v)[0];\n }\n });\n}\n\n// Find a path from v to w through the lowest common ancestor (LCA). Return the\n// full path and the LCA.\nfunction findPath(g, postorderNums, v, w) {\n var vPath = [];\n var wPath = [];\n var low = Math.min(postorderNums[v].low, postorderNums[w].low);\n var lim = Math.max(postorderNums[v].lim, postorderNums[w].lim);\n var parent;\n var lca;\n\n // Traverse up from v to find the LCA\n parent = v;\n do {\n parent = g.parent(parent);\n vPath.push(parent);\n } while (parent &&\n (postorderNums[parent].low > low || lim > postorderNums[parent].lim));\n lca = parent;\n\n // Traverse from w to LCA\n parent = w;\n while ((parent = g.parent(parent)) !== lca) {\n wPath.push(parent);\n }\n\n return { path: vPath.concat(wPath.reverse()), lca: lca };\n}\n\nfunction postorder(g) {\n var result = {};\n var lim = 0;\n\n function dfs(v) {\n var low = lim;\n _.forEach(g.children(v), dfs);\n result[v] = { low: low, lim: lim++ };\n }\n _.forEach(g.children(), dfs);\n\n return result;\n}\n","var _ = require(\"./lodash\");\nvar util = require(\"./util\");\n\nmodule.exports = {\n run: run,\n cleanup: cleanup\n};\n\n/*\n * A nesting graph creates dummy nodes for the tops and bottoms of subgraphs,\n * adds appropriate edges to ensure that all cluster nodes are placed between\n * these boundries, and ensures that the graph is connected.\n *\n * In addition we ensure, through the use of the minlen property, that nodes\n * and subgraph border nodes to not end up on the same rank.\n *\n * Preconditions:\n *\n * 1. Input graph is a DAG\n * 2. Nodes in the input graph has a minlen attribute\n *\n * Postconditions:\n *\n * 1. Input graph is connected.\n * 2. Dummy nodes are added for the tops and bottoms of subgraphs.\n * 3. The minlen attribute for nodes is adjusted to ensure nodes do not\n * get placed on the same rank as subgraph border nodes.\n *\n * The nesting graph idea comes from Sander, \"Layout of Compound Directed\n * Graphs.\"\n */\nfunction run(g) {\n var root = util.addDummyNode(g, \"root\", {}, \"_root\");\n var depths = treeDepths(g);\n var height = _.max(_.values(depths)) - 1; // Note: depths is an Object not an array\n var nodeSep = 2 * height + 1;\n\n g.graph().nestingRoot = root;\n\n // Multiply minlen by nodeSep to align nodes on non-border ranks.\n _.forEach(g.edges(), function(e) { g.edge(e).minlen *= nodeSep; });\n\n // Calculate a weight that is sufficient to keep subgraphs vertically compact\n var weight = sumWeights(g) + 1;\n\n // Create border nodes and link them up\n _.forEach(g.children(), function(child) {\n dfs(g, root, nodeSep, weight, height, depths, child);\n });\n\n // Save the multiplier for node layers for later removal of empty border\n // layers.\n g.graph().nodeRankFactor = nodeSep;\n}\n\nfunction dfs(g, root, nodeSep, weight, height, depths, v) {\n var children = g.children(v);\n if (!children.length) {\n if (v !== root) {\n g.setEdge(root, v, { weight: 0, minlen: nodeSep });\n }\n return;\n }\n\n var top = util.addBorderNode(g, \"_bt\");\n var bottom = util.addBorderNode(g, \"_bb\");\n var label = g.node(v);\n\n g.setParent(top, v);\n label.borderTop = top;\n g.setParent(bottom, v);\n label.borderBottom = bottom;\n\n _.forEach(children, function(child) {\n dfs(g, root, nodeSep, weight, height, depths, child);\n\n var childNode = g.node(child);\n var childTop = childNode.borderTop ? childNode.borderTop : child;\n var childBottom = childNode.borderBottom ? childNode.borderBottom : child;\n var thisWeight = childNode.borderTop ? weight : 2 * weight;\n var minlen = childTop !== childBottom ? 1 : height - depths[v] + 1;\n\n g.setEdge(top, childTop, {\n weight: thisWeight,\n minlen: minlen,\n nestingEdge: true\n });\n\n g.setEdge(childBottom, bottom, {\n weight: thisWeight,\n minlen: minlen,\n nestingEdge: true\n });\n });\n\n if (!g.parent(v)) {\n g.setEdge(root, top, { weight: 0, minlen: height + depths[v] });\n }\n}\n\nfunction treeDepths(g) {\n var depths = {};\n function dfs(v, depth) {\n var children = g.children(v);\n if (children && children.length) {\n _.forEach(children, function(child) {\n dfs(child, depth + 1);\n });\n }\n depths[v] = depth;\n }\n _.forEach(g.children(), function(v) { dfs(v, 1); });\n return depths;\n}\n\nfunction sumWeights(g) {\n return _.reduce(g.edges(), function(acc, e) {\n return acc + g.edge(e).weight;\n }, 0);\n}\n\nfunction cleanup(g) {\n var graphLabel = g.graph();\n g.removeNode(graphLabel.nestingRoot);\n delete graphLabel.nestingRoot;\n _.forEach(g.edges(), function(e) {\n var edge = g.edge(e);\n if (edge.nestingEdge) {\n g.removeEdge(e);\n }\n });\n}\n","var _ = require(\"./lodash\");\nvar util = require(\"./util\");\n\nmodule.exports = addBorderSegments;\n\nfunction addBorderSegments(g) {\n function dfs(v) {\n var children = g.children(v);\n var node = g.node(v);\n if (children.length) {\n _.forEach(children, dfs);\n }\n\n if (_.has(node, \"minRank\")) {\n node.borderLeft = [];\n node.borderRight = [];\n for (var rank = node.minRank, maxRank = node.maxRank + 1;\n rank < maxRank;\n ++rank) {\n addBorderNode(g, \"borderLeft\", \"_bl\", v, node, rank);\n addBorderNode(g, \"borderRight\", \"_br\", v, node, rank);\n }\n }\n }\n\n _.forEach(g.children(), dfs);\n}\n\nfunction addBorderNode(g, prop, prefix, sg, sgNode, rank) {\n var label = { width: 0, height: 0, rank: rank, borderType: prop };\n var prev = sgNode[prop][rank - 1];\n var curr = util.addDummyNode(g, \"border\", label, prefix);\n sgNode[prop][rank] = curr;\n g.setParent(curr, sg);\n if (prev) {\n g.setEdge(prev, curr, { weight: 1 });\n }\n}\n","\"use strict\";\n\nvar _ = require(\"./lodash\");\n\nmodule.exports = {\n adjust: adjust,\n undo: undo\n};\n\nfunction adjust(g) {\n var rankDir = g.graph().rankdir.toLowerCase();\n if (rankDir === \"lr\" || rankDir === \"rl\") {\n swapWidthHeight(g);\n }\n}\n\nfunction undo(g) {\n var rankDir = g.graph().rankdir.toLowerCase();\n if (rankDir === \"bt\" || rankDir === \"rl\") {\n reverseY(g);\n }\n\n if (rankDir === \"lr\" || rankDir === \"rl\") {\n swapXY(g);\n swapWidthHeight(g);\n }\n}\n\nfunction swapWidthHeight(g) {\n _.forEach(g.nodes(), function(v) { swapWidthHeightOne(g.node(v)); });\n _.forEach(g.edges(), function(e) { swapWidthHeightOne(g.edge(e)); });\n}\n\nfunction swapWidthHeightOne(attrs) {\n var w = attrs.width;\n attrs.width = attrs.height;\n attrs.height = w;\n}\n\nfunction reverseY(g) {\n _.forEach(g.nodes(), function(v) { reverseYOne(g.node(v)); });\n\n _.forEach(g.edges(), function(e) {\n var edge = g.edge(e);\n _.forEach(edge.points, reverseYOne);\n if (_.has(edge, \"y\")) {\n reverseYOne(edge);\n }\n });\n}\n\nfunction reverseYOne(attrs) {\n attrs.y = -attrs.y;\n}\n\nfunction swapXY(g) {\n _.forEach(g.nodes(), function(v) { swapXYOne(g.node(v)); });\n\n _.forEach(g.edges(), function(e) {\n var edge = g.edge(e);\n _.forEach(edge.points, swapXYOne);\n if (_.has(edge, \"x\")) {\n swapXYOne(edge);\n }\n });\n}\n\nfunction swapXYOne(attrs) {\n var x = attrs.x;\n attrs.x = attrs.y;\n attrs.y = x;\n}\n","\"use strict\";\n\nvar _ = require(\"../lodash\");\n\nmodule.exports = initOrder;\n\n/*\n * Assigns an initial order value for each node by performing a DFS search\n * starting from nodes in the first rank. Nodes are assigned an order in their\n * rank as they are first visited.\n *\n * This approach comes from Gansner, et al., \"A Technique for Drawing Directed\n * Graphs.\"\n *\n * Returns a layering matrix with an array per layer and each layer sorted by\n * the order of its nodes.\n */\nfunction initOrder(g) {\n var visited = {};\n var simpleNodes = _.filter(g.nodes(), function(v) {\n return !g.children(v).length;\n });\n var maxRank = _.max(_.map(simpleNodes, function(v) { return g.node(v).rank; }));\n var layers = _.map(_.range(maxRank + 1), function() { return []; });\n\n function dfs(v) {\n if (_.has(visited, v)) return;\n visited[v] = true;\n var node = g.node(v);\n layers[node.rank].push(v);\n _.forEach(g.successors(v), dfs);\n }\n\n var orderedVs = _.sortBy(simpleNodes, function(v) { return g.node(v).rank; });\n _.forEach(orderedVs, dfs);\n\n return layers;\n}\n","\"use strict\";\n\nvar _ = require(\"../lodash\");\n\nmodule.exports = crossCount;\n\n/*\n * A function that takes a layering (an array of layers, each with an array of\n * ordererd nodes) and a graph and returns a weighted crossing count.\n *\n * Pre-conditions:\n *\n * 1. Input graph must be simple (not a multigraph), directed, and include\n * only simple edges.\n * 2. Edges in the input graph must have assigned weights.\n *\n * Post-conditions:\n *\n * 1. The graph and layering matrix are left unchanged.\n *\n * This algorithm is derived from Barth, et al., \"Bilayer Cross Counting.\"\n */\nfunction crossCount(g, layering) {\n var cc = 0;\n for (var i = 1; i < layering.length; ++i) {\n cc += twoLayerCrossCount(g, layering[i-1], layering[i]);\n }\n return cc;\n}\n\nfunction twoLayerCrossCount(g, northLayer, southLayer) {\n // Sort all of the edges between the north and south layers by their position\n // in the north layer and then the south. Map these edges to the position of\n // their head in the south layer.\n var southPos = _.zipObject(southLayer,\n _.map(southLayer, function (v, i) { return i; }));\n var southEntries = _.flatten(_.map(northLayer, function(v) {\n return _.sortBy(_.map(g.outEdges(v), function(e) {\n return { pos: southPos[e.w], weight: g.edge(e).weight };\n }), \"pos\");\n }), true);\n\n // Build the accumulator tree\n var firstIndex = 1;\n while (firstIndex < southLayer.length) firstIndex <<= 1;\n var treeSize = 2 * firstIndex - 1;\n firstIndex -= 1;\n var tree = _.map(new Array(treeSize), function() { return 0; });\n\n // Calculate the weighted crossings\n var cc = 0;\n _.forEach(southEntries.forEach(function(entry) {\n var index = entry.pos + firstIndex;\n tree[index] += entry.weight;\n var weightSum = 0;\n while (index > 0) {\n if (index % 2) {\n weightSum += tree[index + 1];\n }\n index = (index - 1) >> 1;\n tree[index] += entry.weight;\n }\n cc += entry.weight * weightSum;\n }));\n\n return cc;\n}\n","var _ = require(\"../lodash\");\n\nmodule.exports = barycenter;\n\nfunction barycenter(g, movable) {\n return _.map(movable, function(v) {\n var inV = g.inEdges(v);\n if (!inV.length) {\n return { v: v };\n } else {\n var result = _.reduce(inV, function(acc, e) {\n var edge = g.edge(e),\n nodeU = g.node(e.v);\n return {\n sum: acc.sum + (edge.weight * nodeU.order),\n weight: acc.weight + edge.weight\n };\n }, { sum: 0, weight: 0 });\n\n return {\n v: v,\n barycenter: result.sum / result.weight,\n weight: result.weight\n };\n }\n });\n}\n\n","\"use strict\";\n\nvar _ = require(\"../lodash\");\n\nmodule.exports = resolveConflicts;\n\n/*\n * Given a list of entries of the form {v, barycenter, weight} and a\n * constraint graph this function will resolve any conflicts between the\n * constraint graph and the barycenters for the entries. If the barycenters for\n * an entry would violate a constraint in the constraint graph then we coalesce\n * the nodes in the conflict into a new node that respects the contraint and\n * aggregates barycenter and weight information.\n *\n * This implementation is based on the description in Forster, \"A Fast and\n * Simple Hueristic for Constrained Two-Level Crossing Reduction,\" thought it\n * differs in some specific details.\n *\n * Pre-conditions:\n *\n * 1. Each entry has the form {v, barycenter, weight}, or if the node has\n * no barycenter, then {v}.\n *\n * Returns:\n *\n * A new list of entries of the form {vs, i, barycenter, weight}. The list\n * `vs` may either be a singleton or it may be an aggregation of nodes\n * ordered such that they do not violate constraints from the constraint\n * graph. The property `i` is the lowest original index of any of the\n * elements in `vs`.\n */\nfunction resolveConflicts(entries, cg) {\n var mappedEntries = {};\n _.forEach(entries, function(entry, i) {\n var tmp = mappedEntries[entry.v] = {\n indegree: 0,\n \"in\": [],\n out: [],\n vs: [entry.v],\n i: i\n };\n if (!_.isUndefined(entry.barycenter)) {\n tmp.barycenter = entry.barycenter;\n tmp.weight = entry.weight;\n }\n });\n\n _.forEach(cg.edges(), function(e) {\n var entryV = mappedEntries[e.v];\n var entryW = mappedEntries[e.w];\n if (!_.isUndefined(entryV) && !_.isUndefined(entryW)) {\n entryW.indegree++;\n entryV.out.push(mappedEntries[e.w]);\n }\n });\n\n var sourceSet = _.filter(mappedEntries, function(entry) {\n return !entry.indegree;\n });\n\n return doResolveConflicts(sourceSet);\n}\n\nfunction doResolveConflicts(sourceSet) {\n var entries = [];\n\n function handleIn(vEntry) {\n return function(uEntry) {\n if (uEntry.merged) {\n return;\n }\n if (_.isUndefined(uEntry.barycenter) ||\n _.isUndefined(vEntry.barycenter) ||\n uEntry.barycenter >= vEntry.barycenter) {\n mergeEntries(vEntry, uEntry);\n }\n };\n }\n\n function handleOut(vEntry) {\n return function(wEntry) {\n wEntry[\"in\"].push(vEntry);\n if (--wEntry.indegree === 0) {\n sourceSet.push(wEntry);\n }\n };\n }\n\n while (sourceSet.length) {\n var entry = sourceSet.pop();\n entries.push(entry);\n _.forEach(entry[\"in\"].reverse(), handleIn(entry));\n _.forEach(entry.out, handleOut(entry));\n }\n\n return _.map(_.filter(entries, function(entry) { return !entry.merged; }),\n function(entry) {\n return _.pick(entry, [\"vs\", \"i\", \"barycenter\", \"weight\"]);\n });\n\n}\n\nfunction mergeEntries(target, source) {\n var sum = 0;\n var weight = 0;\n\n if (target.weight) {\n sum += target.barycenter * target.weight;\n weight += target.weight;\n }\n\n if (source.weight) {\n sum += source.barycenter * source.weight;\n weight += source.weight;\n }\n\n target.vs = source.vs.concat(target.vs);\n target.barycenter = sum / weight;\n target.weight = weight;\n target.i = Math.min(source.i, target.i);\n source.merged = true;\n}\n","var _ = require(\"../lodash\");\nvar util = require(\"../util\");\n\nmodule.exports = sort;\n\nfunction sort(entries, biasRight) {\n var parts = util.partition(entries, function(entry) {\n return _.has(entry, \"barycenter\");\n });\n var sortable = parts.lhs,\n unsortable = _.sortBy(parts.rhs, function(entry) { return -entry.i; }),\n vs = [],\n sum = 0,\n weight = 0,\n vsIndex = 0;\n\n sortable.sort(compareWithBias(!!biasRight));\n\n vsIndex = consumeUnsortable(vs, unsortable, vsIndex);\n\n _.forEach(sortable, function (entry) {\n vsIndex += entry.vs.length;\n vs.push(entry.vs);\n sum += entry.barycenter * entry.weight;\n weight += entry.weight;\n vsIndex = consumeUnsortable(vs, unsortable, vsIndex);\n });\n\n var result = { vs: _.flatten(vs, true) };\n if (weight) {\n result.barycenter = sum / weight;\n result.weight = weight;\n }\n return result;\n}\n\nfunction consumeUnsortable(vs, unsortable, index) {\n var last;\n while (unsortable.length && (last = _.last(unsortable)).i <= index) {\n unsortable.pop();\n vs.push(last.vs);\n index++;\n }\n return index;\n}\n\nfunction compareWithBias(bias) {\n return function(entryV, entryW) {\n if (entryV.barycenter < entryW.barycenter) {\n return -1;\n } else if (entryV.barycenter > entryW.barycenter) {\n return 1;\n }\n\n return !bias ? entryV.i - entryW.i : entryW.i - entryV.i;\n };\n}\n","var _ = require(\"../lodash\");\nvar barycenter = require(\"./barycenter\");\nvar resolveConflicts = require(\"./resolve-conflicts\");\nvar sort = require(\"./sort\");\n\nmodule.exports = sortSubgraph;\n\nfunction sortSubgraph(g, v, cg, biasRight) {\n var movable = g.children(v);\n var node = g.node(v);\n var bl = node ? node.borderLeft : undefined;\n var br = node ? node.borderRight: undefined;\n var subgraphs = {};\n\n if (bl) {\n movable = _.filter(movable, function(w) {\n return w !== bl && w !== br;\n });\n }\n\n var barycenters = barycenter(g, movable);\n _.forEach(barycenters, function(entry) {\n if (g.children(entry.v).length) {\n var subgraphResult = sortSubgraph(g, entry.v, cg, biasRight);\n subgraphs[entry.v] = subgraphResult;\n if (_.has(subgraphResult, \"barycenter\")) {\n mergeBarycenters(entry, subgraphResult);\n }\n }\n });\n\n var entries = resolveConflicts(barycenters, cg);\n expandSubgraphs(entries, subgraphs);\n\n var result = sort(entries, biasRight);\n\n if (bl) {\n result.vs = _.flatten([bl, result.vs, br], true);\n if (g.predecessors(bl).length) {\n var blPred = g.node(g.predecessors(bl)[0]),\n brPred = g.node(g.predecessors(br)[0]);\n if (!_.has(result, \"barycenter\")) {\n result.barycenter = 0;\n result.weight = 0;\n }\n result.barycenter = (result.barycenter * result.weight +\n blPred.order + brPred.order) / (result.weight + 2);\n result.weight += 2;\n }\n }\n\n return result;\n}\n\nfunction expandSubgraphs(entries, subgraphs) {\n _.forEach(entries, function(entry) {\n entry.vs = _.flatten(entry.vs.map(function(v) {\n if (subgraphs[v]) {\n return subgraphs[v].vs;\n }\n return v;\n }), true);\n });\n}\n\nfunction mergeBarycenters(target, other) {\n if (!_.isUndefined(target.barycenter)) {\n target.barycenter = (target.barycenter * target.weight +\n other.barycenter * other.weight) /\n (target.weight + other.weight);\n target.weight += other.weight;\n } else {\n target.barycenter = other.barycenter;\n target.weight = other.weight;\n }\n}\n","var _ = require(\"../lodash\");\nvar Graph = require(\"../graphlib\").Graph;\n\nmodule.exports = buildLayerGraph;\n\n/*\n * Constructs a graph that can be used to sort a layer of nodes. The graph will\n * contain all base and subgraph nodes from the request layer in their original\n * hierarchy and any edges that are incident on these nodes and are of the type\n * requested by the \"relationship\" parameter.\n *\n * Nodes from the requested rank that do not have parents are assigned a root\n * node in the output graph, which is set in the root graph attribute. This\n * makes it easy to walk the hierarchy of movable nodes during ordering.\n *\n * Pre-conditions:\n *\n * 1. Input graph is a DAG\n * 2. Base nodes in the input graph have a rank attribute\n * 3. Subgraph nodes in the input graph has minRank and maxRank attributes\n * 4. Edges have an assigned weight\n *\n * Post-conditions:\n *\n * 1. Output graph has all nodes in the movable rank with preserved\n * hierarchy.\n * 2. Root nodes in the movable layer are made children of the node\n * indicated by the root attribute of the graph.\n * 3. Non-movable nodes incident on movable nodes, selected by the\n * relationship parameter, are included in the graph (without hierarchy).\n * 4. Edges incident on movable nodes, selected by the relationship\n * parameter, are added to the output graph.\n * 5. The weights for copied edges are aggregated as need, since the output\n * graph is not a multi-graph.\n */\nfunction buildLayerGraph(g, rank, relationship) {\n var root = createRootNode(g),\n result = new Graph({ compound: true }).setGraph({ root: root })\n .setDefaultNodeLabel(function(v) { return g.node(v); });\n\n _.forEach(g.nodes(), function(v) {\n var node = g.node(v),\n parent = g.parent(v);\n\n if (node.rank === rank || node.minRank <= rank && rank <= node.maxRank) {\n result.setNode(v);\n result.setParent(v, parent || root);\n\n // This assumes we have only short edges!\n _.forEach(g[relationship](v), function(e) {\n var u = e.v === v ? e.w : e.v,\n edge = result.edge(u, v),\n weight = !_.isUndefined(edge) ? edge.weight : 0;\n result.setEdge(u, v, { weight: g.edge(e).weight + weight });\n });\n\n if (_.has(node, \"minRank\")) {\n result.setNode(v, {\n borderLeft: node.borderLeft[rank],\n borderRight: node.borderRight[rank]\n });\n }\n }\n });\n\n return result;\n}\n\nfunction createRootNode(g) {\n var v;\n while (g.hasNode((v = _.uniqueId(\"_root\"))));\n return v;\n}\n","var _ = require(\"../lodash\");\n\nmodule.exports = addSubgraphConstraints;\n\nfunction addSubgraphConstraints(g, cg, vs) {\n var prev = {},\n rootPrev;\n\n _.forEach(vs, function(v) {\n var child = g.parent(v),\n parent,\n prevChild;\n while (child) {\n parent = g.parent(child);\n if (parent) {\n prevChild = prev[parent];\n prev[parent] = child;\n } else {\n prevChild = rootPrev;\n rootPrev = child;\n }\n if (prevChild && prevChild !== child) {\n cg.setEdge(prevChild, child);\n return;\n }\n child = parent;\n }\n });\n\n /*\n function dfs(v) {\n var children = v ? g.children(v) : g.children();\n if (children.length) {\n var min = Number.POSITIVE_INFINITY,\n subgraphs = [];\n _.each(children, function(child) {\n var childMin = dfs(child);\n if (g.children(child).length) {\n subgraphs.push({ v: child, order: childMin });\n }\n min = Math.min(min, childMin);\n });\n _.reduce(_.sortBy(subgraphs, \"order\"), function(prev, curr) {\n cg.setEdge(prev.v, curr.v);\n return curr;\n });\n return min;\n }\n return g.node(v).order;\n }\n dfs(undefined);\n */\n}\n","\"use strict\";\n\nvar _ = require(\"../lodash\");\nvar initOrder = require(\"./init-order\");\nvar crossCount = require(\"./cross-count\");\nvar sortSubgraph = require(\"./sort-subgraph\");\nvar buildLayerGraph = require(\"./build-layer-graph\");\nvar addSubgraphConstraints = require(\"./add-subgraph-constraints\");\nvar Graph = require(\"../graphlib\").Graph;\nvar util = require(\"../util\");\n\nmodule.exports = order;\n\n/*\n * Applies heuristics to minimize edge crossings in the graph and sets the best\n * order solution as an order attribute on each node.\n *\n * Pre-conditions:\n *\n * 1. Graph must be DAG\n * 2. Graph nodes must be objects with a \"rank\" attribute\n * 3. Graph edges must have the \"weight\" attribute\n *\n * Post-conditions:\n *\n * 1. Graph nodes will have an \"order\" attribute based on the results of the\n * algorithm.\n */\nfunction order(g) {\n var maxRank = util.maxRank(g),\n downLayerGraphs = buildLayerGraphs(g, _.range(1, maxRank + 1), \"inEdges\"),\n upLayerGraphs = buildLayerGraphs(g, _.range(maxRank - 1, -1, -1), \"outEdges\");\n\n var layering = initOrder(g);\n assignOrder(g, layering);\n\n var bestCC = Number.POSITIVE_INFINITY,\n best;\n\n for (var i = 0, lastBest = 0; lastBest < 4; ++i, ++lastBest) {\n sweepLayerGraphs(i % 2 ? downLayerGraphs : upLayerGraphs, i % 4 >= 2);\n\n layering = util.buildLayerMatrix(g);\n var cc = crossCount(g, layering);\n if (cc < bestCC) {\n lastBest = 0;\n best = _.cloneDeep(layering);\n bestCC = cc;\n }\n }\n\n assignOrder(g, best);\n}\n\nfunction buildLayerGraphs(g, ranks, relationship) {\n return _.map(ranks, function(rank) {\n return buildLayerGraph(g, rank, relationship);\n });\n}\n\nfunction sweepLayerGraphs(layerGraphs, biasRight) {\n var cg = new Graph();\n _.forEach(layerGraphs, function(lg) {\n var root = lg.graph().root;\n var sorted = sortSubgraph(lg, root, cg, biasRight);\n _.forEach(sorted.vs, function(v, i) {\n lg.node(v).order = i;\n });\n addSubgraphConstraints(lg, cg, sorted.vs);\n });\n}\n\nfunction assignOrder(g, layering) {\n _.forEach(layering, function(layer) {\n _.forEach(layer, function(v, i) {\n g.node(v).order = i;\n });\n });\n}\n","\"use strict\";\n\nvar _ = require(\"../lodash\");\nvar Graph = require(\"../graphlib\").Graph;\nvar util = require(\"../util\");\n\n/*\n * This module provides coordinate assignment based on Brandes and Köpf, \"Fast\n * and Simple Horizontal Coordinate Assignment.\"\n */\n\nmodule.exports = {\n positionX: positionX,\n findType1Conflicts: findType1Conflicts,\n findType2Conflicts: findType2Conflicts,\n addConflict: addConflict,\n hasConflict: hasConflict,\n verticalAlignment: verticalAlignment,\n horizontalCompaction: horizontalCompaction,\n alignCoordinates: alignCoordinates,\n findSmallestWidthAlignment: findSmallestWidthAlignment,\n balance: balance\n};\n\n/*\n * Marks all edges in the graph with a type-1 conflict with the \"type1Conflict\"\n * property. A type-1 conflict is one where a non-inner segment crosses an\n * inner segment. An inner segment is an edge with both incident nodes marked\n * with the \"dummy\" property.\n *\n * This algorithm scans layer by layer, starting with the second, for type-1\n * conflicts between the current layer and the previous layer. For each layer\n * it scans the nodes from left to right until it reaches one that is incident\n * on an inner segment. It then scans predecessors to determine if they have\n * edges that cross that inner segment. At the end a final scan is done for all\n * nodes on the current rank to see if they cross the last visited inner\n * segment.\n *\n * This algorithm (safely) assumes that a dummy node will only be incident on a\n * single node in the layers being scanned.\n */\nfunction findType1Conflicts(g, layering) {\n var conflicts = {};\n\n function visitLayer(prevLayer, layer) {\n var\n // last visited node in the previous layer that is incident on an inner\n // segment.\n k0 = 0,\n // Tracks the last node in this layer scanned for crossings with a type-1\n // segment.\n scanPos = 0,\n prevLayerLength = prevLayer.length,\n lastNode = _.last(layer);\n\n _.forEach(layer, function(v, i) {\n var w = findOtherInnerSegmentNode(g, v),\n k1 = w ? g.node(w).order : prevLayerLength;\n\n if (w || v === lastNode) {\n _.forEach(layer.slice(scanPos, i +1), function(scanNode) {\n _.forEach(g.predecessors(scanNode), function(u) {\n var uLabel = g.node(u),\n uPos = uLabel.order;\n if ((uPos < k0 || k1 < uPos) &&\n !(uLabel.dummy && g.node(scanNode).dummy)) {\n addConflict(conflicts, u, scanNode);\n }\n });\n });\n scanPos = i + 1;\n k0 = k1;\n }\n });\n\n return layer;\n }\n\n _.reduce(layering, visitLayer);\n return conflicts;\n}\n\nfunction findType2Conflicts(g, layering) {\n var conflicts = {};\n\n function scan(south, southPos, southEnd, prevNorthBorder, nextNorthBorder) {\n var v;\n _.forEach(_.range(southPos, southEnd), function(i) {\n v = south[i];\n if (g.node(v).dummy) {\n _.forEach(g.predecessors(v), function(u) {\n var uNode = g.node(u);\n if (uNode.dummy &&\n (uNode.order < prevNorthBorder || uNode.order > nextNorthBorder)) {\n addConflict(conflicts, u, v);\n }\n });\n }\n });\n }\n\n\n function visitLayer(north, south) {\n var prevNorthPos = -1,\n nextNorthPos,\n southPos = 0;\n\n _.forEach(south, function(v, southLookahead) {\n if (g.node(v).dummy === \"border\") {\n var predecessors = g.predecessors(v);\n if (predecessors.length) {\n nextNorthPos = g.node(predecessors[0]).order;\n scan(south, southPos, southLookahead, prevNorthPos, nextNorthPos);\n southPos = southLookahead;\n prevNorthPos = nextNorthPos;\n }\n }\n scan(south, southPos, south.length, nextNorthPos, north.length);\n });\n\n return south;\n }\n\n _.reduce(layering, visitLayer);\n return conflicts;\n}\n\nfunction findOtherInnerSegmentNode(g, v) {\n if (g.node(v).dummy) {\n return _.find(g.predecessors(v), function(u) {\n return g.node(u).dummy;\n });\n }\n}\n\nfunction addConflict(conflicts, v, w) {\n if (v > w) {\n var tmp = v;\n v = w;\n w = tmp;\n }\n\n var conflictsV = conflicts[v];\n if (!conflictsV) {\n conflicts[v] = conflictsV = {};\n }\n conflictsV[w] = true;\n}\n\nfunction hasConflict(conflicts, v, w) {\n if (v > w) {\n var tmp = v;\n v = w;\n w = tmp;\n }\n return _.has(conflicts[v], w);\n}\n\n/*\n * Try to align nodes into vertical \"blocks\" where possible. This algorithm\n * attempts to align a node with one of its median neighbors. If the edge\n * connecting a neighbor is a type-1 conflict then we ignore that possibility.\n * If a previous node has already formed a block with a node after the node\n * we're trying to form a block with, we also ignore that possibility - our\n * blocks would be split in that scenario.\n */\nfunction verticalAlignment(g, layering, conflicts, neighborFn) {\n var root = {},\n align = {},\n pos = {};\n\n // We cache the position here based on the layering because the graph and\n // layering may be out of sync. The layering matrix is manipulated to\n // generate different extreme alignments.\n _.forEach(layering, function(layer) {\n _.forEach(layer, function(v, order) {\n root[v] = v;\n align[v] = v;\n pos[v] = order;\n });\n });\n\n _.forEach(layering, function(layer) {\n var prevIdx = -1;\n _.forEach(layer, function(v) {\n var ws = neighborFn(v);\n if (ws.length) {\n ws = _.sortBy(ws, function(w) { return pos[w]; });\n var mp = (ws.length - 1) / 2;\n for (var i = Math.floor(mp), il = Math.ceil(mp); i <= il; ++i) {\n var w = ws[i];\n if (align[v] === v &&\n prevIdx < pos[w] &&\n !hasConflict(conflicts, v, w)) {\n align[w] = v;\n align[v] = root[v] = root[w];\n prevIdx = pos[w];\n }\n }\n }\n });\n });\n\n return { root: root, align: align };\n}\n\nfunction horizontalCompaction(g, layering, root, align, reverseSep) {\n // This portion of the algorithm differs from BK due to a number of problems.\n // Instead of their algorithm we construct a new block graph and do two\n // sweeps. The first sweep places blocks with the smallest possible\n // coordinates. The second sweep removes unused space by moving blocks to the\n // greatest coordinates without violating separation.\n var xs = {},\n blockG = buildBlockGraph(g, layering, root, reverseSep),\n borderType = reverseSep ? \"borderLeft\" : \"borderRight\";\n\n function iterate(setXsFunc, nextNodesFunc) {\n var stack = blockG.nodes();\n var elem = stack.pop();\n var visited = {};\n while (elem) {\n if (visited[elem]) {\n setXsFunc(elem);\n } else {\n visited[elem] = true;\n stack.push(elem);\n stack = stack.concat(nextNodesFunc(elem));\n }\n\n elem = stack.pop();\n }\n }\n\n // First pass, assign smallest coordinates\n function pass1(elem) {\n xs[elem] = blockG.inEdges(elem).reduce(function(acc, e) {\n return Math.max(acc, xs[e.v] + blockG.edge(e));\n }, 0);\n }\n\n // Second pass, assign greatest coordinates\n function pass2(elem) {\n var min = blockG.outEdges(elem).reduce(function(acc, e) {\n return Math.min(acc, xs[e.w] - blockG.edge(e));\n }, Number.POSITIVE_INFINITY);\n\n var node = g.node(elem);\n if (min !== Number.POSITIVE_INFINITY && node.borderType !== borderType) {\n xs[elem] = Math.max(xs[elem], min);\n }\n }\n\n iterate(pass1, blockG.predecessors.bind(blockG));\n iterate(pass2, blockG.successors.bind(blockG));\n\n // Assign x coordinates to all nodes\n _.forEach(align, function(v) {\n xs[v] = xs[root[v]];\n });\n\n return xs;\n}\n\n\nfunction buildBlockGraph(g, layering, root, reverseSep) {\n var blockGraph = new Graph(),\n graphLabel = g.graph(),\n sepFn = sep(graphLabel.nodesep, graphLabel.edgesep, reverseSep);\n\n _.forEach(layering, function(layer) {\n var u;\n _.forEach(layer, function(v) {\n var vRoot = root[v];\n blockGraph.setNode(vRoot);\n if (u) {\n var uRoot = root[u],\n prevMax = blockGraph.edge(uRoot, vRoot);\n blockGraph.setEdge(uRoot, vRoot, Math.max(sepFn(g, v, u), prevMax || 0));\n }\n u = v;\n });\n });\n\n return blockGraph;\n}\n\n/*\n * Returns the alignment that has the smallest width of the given alignments.\n */\nfunction findSmallestWidthAlignment(g, xss) {\n return _.minBy(_.values(xss), function (xs) {\n var max = Number.NEGATIVE_INFINITY;\n var min = Number.POSITIVE_INFINITY;\n\n _.forIn(xs, function (x, v) {\n var halfWidth = width(g, v) / 2;\n\n max = Math.max(x + halfWidth, max);\n min = Math.min(x - halfWidth, min);\n });\n\n return max - min;\n });\n}\n\n/*\n * Align the coordinates of each of the layout alignments such that\n * left-biased alignments have their minimum coordinate at the same point as\n * the minimum coordinate of the smallest width alignment and right-biased\n * alignments have their maximum coordinate at the same point as the maximum\n * coordinate of the smallest width alignment.\n */\nfunction alignCoordinates(xss, alignTo) {\n var alignToVals = _.values(alignTo),\n alignToMin = _.min(alignToVals),\n alignToMax = _.max(alignToVals);\n\n _.forEach([\"u\", \"d\"], function(vert) {\n _.forEach([\"l\", \"r\"], function(horiz) {\n var alignment = vert + horiz,\n xs = xss[alignment],\n delta;\n if (xs === alignTo) return;\n\n var xsVals = _.values(xs);\n delta = horiz === \"l\" ? alignToMin - _.min(xsVals) : alignToMax - _.max(xsVals);\n\n if (delta) {\n xss[alignment] = _.mapValues(xs, function(x) { return x + delta; });\n }\n });\n });\n}\n\nfunction balance(xss, align) {\n return _.mapValues(xss.ul, function(ignore, v) {\n if (align) {\n return xss[align.toLowerCase()][v];\n } else {\n var xs = _.sortBy(_.map(xss, v));\n return (xs[1] + xs[2]) / 2;\n }\n });\n}\n\nfunction positionX(g) {\n var layering = util.buildLayerMatrix(g);\n var conflicts = _.merge(\n findType1Conflicts(g, layering),\n findType2Conflicts(g, layering));\n\n var xss = {};\n var adjustedLayering;\n _.forEach([\"u\", \"d\"], function(vert) {\n adjustedLayering = vert === \"u\" ? layering : _.values(layering).reverse();\n _.forEach([\"l\", \"r\"], function(horiz) {\n if (horiz === \"r\") {\n adjustedLayering = _.map(adjustedLayering, function(inner) {\n return _.values(inner).reverse();\n });\n }\n\n var neighborFn = (vert === \"u\" ? g.predecessors : g.successors).bind(g);\n var align = verticalAlignment(g, adjustedLayering, conflicts, neighborFn);\n var xs = horizontalCompaction(g, adjustedLayering,\n align.root, align.align, horiz === \"r\");\n if (horiz === \"r\") {\n xs = _.mapValues(xs, function(x) { return -x; });\n }\n xss[vert + horiz] = xs;\n });\n });\n\n var smallestWidth = findSmallestWidthAlignment(g, xss);\n alignCoordinates(xss, smallestWidth);\n return balance(xss, g.graph().align);\n}\n\nfunction sep(nodeSep, edgeSep, reverseSep) {\n return function(g, v, w) {\n var vLabel = g.node(v);\n var wLabel = g.node(w);\n var sum = 0;\n var delta;\n\n sum += vLabel.width / 2;\n if (_.has(vLabel, \"labelpos\")) {\n switch (vLabel.labelpos.toLowerCase()) {\n case \"l\": delta = -vLabel.width / 2; break;\n case \"r\": delta = vLabel.width / 2; break;\n }\n }\n if (delta) {\n sum += reverseSep ? delta : -delta;\n }\n delta = 0;\n\n sum += (vLabel.dummy ? edgeSep : nodeSep) / 2;\n sum += (wLabel.dummy ? edgeSep : nodeSep) / 2;\n\n sum += wLabel.width / 2;\n if (_.has(wLabel, \"labelpos\")) {\n switch (wLabel.labelpos.toLowerCase()) {\n case \"l\": delta = wLabel.width / 2; break;\n case \"r\": delta = -wLabel.width / 2; break;\n }\n }\n if (delta) {\n sum += reverseSep ? delta : -delta;\n }\n delta = 0;\n\n return sum;\n };\n}\n\nfunction width(g, v) {\n return g.node(v).width;\n}\n","\"use strict\";\n\nvar _ = require(\"../lodash\");\nvar util = require(\"../util\");\nvar positionX = require(\"./bk\").positionX;\n\nmodule.exports = position;\n\nfunction position(g) {\n g = util.asNonCompoundGraph(g);\n\n positionY(g);\n _.forEach(positionX(g), function(x, v) {\n g.node(v).x = x;\n });\n}\n\nfunction positionY(g) {\n var layering = util.buildLayerMatrix(g);\n var rankSep = g.graph().ranksep;\n var prevY = 0;\n _.forEach(layering, function(layer) {\n var maxHeight = _.max(_.map(layer, function(v) { return g.node(v).height; }));\n _.forEach(layer, function(v) {\n g.node(v).y = prevY + maxHeight / 2;\n });\n prevY += maxHeight + rankSep;\n });\n}\n\n","\"use strict\";\n\nvar _ = require(\"./lodash\");\nvar acyclic = require(\"./acyclic\");\nvar normalize = require(\"./normalize\");\nvar rank = require(\"./rank\");\nvar normalizeRanks = require(\"./util\").normalizeRanks;\nvar parentDummyChains = require(\"./parent-dummy-chains\");\nvar removeEmptyRanks = require(\"./util\").removeEmptyRanks;\nvar nestingGraph = require(\"./nesting-graph\");\nvar addBorderSegments = require(\"./add-border-segments\");\nvar coordinateSystem = require(\"./coordinate-system\");\nvar order = require(\"./order\");\nvar position = require(\"./position\");\nvar util = require(\"./util\");\nvar Graph = require(\"./graphlib\").Graph;\n\nmodule.exports = layout;\n\nfunction layout(g, opts) {\n var time = opts && opts.debugTiming ? util.time : util.notime;\n time(\"layout\", function() {\n var layoutGraph = \n time(\" buildLayoutGraph\", function() { return buildLayoutGraph(g); });\n time(\" runLayout\", function() { runLayout(layoutGraph, time); });\n time(\" updateInputGraph\", function() { updateInputGraph(g, layoutGraph); });\n });\n}\n\nfunction runLayout(g, time) {\n time(\" makeSpaceForEdgeLabels\", function() { makeSpaceForEdgeLabels(g); });\n time(\" removeSelfEdges\", function() { removeSelfEdges(g); });\n time(\" acyclic\", function() { acyclic.run(g); });\n time(\" nestingGraph.run\", function() { nestingGraph.run(g); });\n time(\" rank\", function() { rank(util.asNonCompoundGraph(g)); });\n time(\" injectEdgeLabelProxies\", function() { injectEdgeLabelProxies(g); });\n time(\" removeEmptyRanks\", function() { removeEmptyRanks(g); });\n time(\" nestingGraph.cleanup\", function() { nestingGraph.cleanup(g); });\n time(\" normalizeRanks\", function() { normalizeRanks(g); });\n time(\" assignRankMinMax\", function() { assignRankMinMax(g); });\n time(\" removeEdgeLabelProxies\", function() { removeEdgeLabelProxies(g); });\n time(\" normalize.run\", function() { normalize.run(g); });\n time(\" parentDummyChains\", function() { parentDummyChains(g); });\n time(\" addBorderSegments\", function() { addBorderSegments(g); });\n time(\" order\", function() { order(g); });\n time(\" insertSelfEdges\", function() { insertSelfEdges(g); });\n time(\" adjustCoordinateSystem\", function() { coordinateSystem.adjust(g); });\n time(\" position\", function() { position(g); });\n time(\" positionSelfEdges\", function() { positionSelfEdges(g); });\n time(\" removeBorderNodes\", function() { removeBorderNodes(g); });\n time(\" normalize.undo\", function() { normalize.undo(g); });\n time(\" fixupEdgeLabelCoords\", function() { fixupEdgeLabelCoords(g); });\n time(\" undoCoordinateSystem\", function() { coordinateSystem.undo(g); });\n time(\" translateGraph\", function() { translateGraph(g); });\n time(\" assignNodeIntersects\", function() { assignNodeIntersects(g); });\n time(\" reversePoints\", function() { reversePointsForReversedEdges(g); });\n time(\" acyclic.undo\", function() { acyclic.undo(g); });\n}\n\n/*\n * Copies final layout information from the layout graph back to the input\n * graph. This process only copies whitelisted attributes from the layout graph\n * to the input graph, so it serves as a good place to determine what\n * attributes can influence layout.\n */\nfunction updateInputGraph(inputGraph, layoutGraph) {\n _.forEach(inputGraph.nodes(), function(v) {\n var inputLabel = inputGraph.node(v);\n var layoutLabel = layoutGraph.node(v);\n\n if (inputLabel) {\n inputLabel.x = layoutLabel.x;\n inputLabel.y = layoutLabel.y;\n\n if (layoutGraph.children(v).length) {\n inputLabel.width = layoutLabel.width;\n inputLabel.height = layoutLabel.height;\n }\n }\n });\n\n _.forEach(inputGraph.edges(), function(e) {\n var inputLabel = inputGraph.edge(e);\n var layoutLabel = layoutGraph.edge(e);\n\n inputLabel.points = layoutLabel.points;\n if (_.has(layoutLabel, \"x\")) {\n inputLabel.x = layoutLabel.x;\n inputLabel.y = layoutLabel.y;\n }\n });\n\n inputGraph.graph().width = layoutGraph.graph().width;\n inputGraph.graph().height = layoutGraph.graph().height;\n}\n\nvar graphNumAttrs = [\"nodesep\", \"edgesep\", \"ranksep\", \"marginx\", \"marginy\"];\nvar graphDefaults = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: \"tb\" };\nvar graphAttrs = [\"acyclicer\", \"ranker\", \"rankdir\", \"align\"];\nvar nodeNumAttrs = [\"width\", \"height\"];\nvar nodeDefaults = { width: 0, height: 0 };\nvar edgeNumAttrs = [\"minlen\", \"weight\", \"width\", \"height\", \"labeloffset\"];\nvar edgeDefaults = {\n minlen: 1, weight: 1, width: 0, height: 0,\n labeloffset: 10, labelpos: \"r\"\n};\nvar edgeAttrs = [\"labelpos\"];\n\n/*\n * Constructs a new graph from the input graph, which can be used for layout.\n * This process copies only whitelisted attributes from the input graph to the\n * layout graph. Thus this function serves as a good place to determine what\n * attributes can influence layout.\n */\nfunction buildLayoutGraph(inputGraph) {\n var g = new Graph({ multigraph: true, compound: true });\n var graph = canonicalize(inputGraph.graph());\n\n g.setGraph(_.merge({},\n graphDefaults,\n selectNumberAttrs(graph, graphNumAttrs),\n _.pick(graph, graphAttrs)));\n\n _.forEach(inputGraph.nodes(), function(v) {\n var node = canonicalize(inputGraph.node(v));\n g.setNode(v, _.defaults(selectNumberAttrs(node, nodeNumAttrs), nodeDefaults));\n g.setParent(v, inputGraph.parent(v));\n });\n\n _.forEach(inputGraph.edges(), function(e) {\n var edge = canonicalize(inputGraph.edge(e));\n g.setEdge(e, _.merge({},\n edgeDefaults,\n selectNumberAttrs(edge, edgeNumAttrs),\n _.pick(edge, edgeAttrs)));\n });\n\n return g;\n}\n\n/*\n * This idea comes from the Gansner paper: to account for edge labels in our\n * layout we split each rank in half by doubling minlen and halving ranksep.\n * Then we can place labels at these mid-points between nodes.\n *\n * We also add some minimal padding to the width to push the label for the edge\n * away from the edge itself a bit.\n */\nfunction makeSpaceForEdgeLabels(g) {\n var graph = g.graph();\n graph.ranksep /= 2;\n _.forEach(g.edges(), function(e) {\n var edge = g.edge(e);\n edge.minlen *= 2;\n if (edge.labelpos.toLowerCase() !== \"c\") {\n if (graph.rankdir === \"TB\" || graph.rankdir === \"BT\") {\n edge.width += edge.labeloffset;\n } else {\n edge.height += edge.labeloffset;\n }\n }\n });\n}\n\n/*\n * Creates temporary dummy nodes that capture the rank in which each edge's\n * label is going to, if it has one of non-zero width and height. We do this\n * so that we can safely remove empty ranks while preserving balance for the\n * label's position.\n */\nfunction injectEdgeLabelProxies(g) {\n _.forEach(g.edges(), function(e) {\n var edge = g.edge(e);\n if (edge.width && edge.height) {\n var v = g.node(e.v);\n var w = g.node(e.w);\n var label = { rank: (w.rank - v.rank) / 2 + v.rank, e: e };\n util.addDummyNode(g, \"edge-proxy\", label, \"_ep\");\n }\n });\n}\n\nfunction assignRankMinMax(g) {\n var maxRank = 0;\n _.forEach(g.nodes(), function(v) {\n var node = g.node(v);\n if (node.borderTop) {\n node.minRank = g.node(node.borderTop).rank;\n node.maxRank = g.node(node.borderBottom).rank;\n maxRank = _.max(maxRank, node.maxRank);\n }\n });\n g.graph().maxRank = maxRank;\n}\n\nfunction removeEdgeLabelProxies(g) {\n _.forEach(g.nodes(), function(v) {\n var node = g.node(v);\n if (node.dummy === \"edge-proxy\") {\n g.edge(node.e).labelRank = node.rank;\n g.removeNode(v);\n }\n });\n}\n\nfunction translateGraph(g) {\n var minX = Number.POSITIVE_INFINITY;\n var maxX = 0;\n var minY = Number.POSITIVE_INFINITY;\n var maxY = 0;\n var graphLabel = g.graph();\n var marginX = graphLabel.marginx || 0;\n var marginY = graphLabel.marginy || 0;\n\n function getExtremes(attrs) {\n var x = attrs.x;\n var y = attrs.y;\n var w = attrs.width;\n var h = attrs.height;\n minX = Math.min(minX, x - w / 2);\n maxX = Math.max(maxX, x + w / 2);\n minY = Math.min(minY, y - h / 2);\n maxY = Math.max(maxY, y + h / 2);\n }\n\n _.forEach(g.nodes(), function(v) { getExtremes(g.node(v)); });\n _.forEach(g.edges(), function(e) {\n var edge = g.edge(e);\n if (_.has(edge, \"x\")) {\n getExtremes(edge);\n }\n });\n\n minX -= marginX;\n minY -= marginY;\n\n _.forEach(g.nodes(), function(v) {\n var node = g.node(v);\n node.x -= minX;\n node.y -= minY;\n });\n\n _.forEach(g.edges(), function(e) {\n var edge = g.edge(e);\n _.forEach(edge.points, function(p) {\n p.x -= minX;\n p.y -= minY;\n });\n if (_.has(edge, \"x\")) { edge.x -= minX; }\n if (_.has(edge, \"y\")) { edge.y -= minY; }\n });\n\n graphLabel.width = maxX - minX + marginX;\n graphLabel.height = maxY - minY + marginY;\n}\n\nfunction assignNodeIntersects(g) {\n _.forEach(g.edges(), function(e) {\n var edge = g.edge(e);\n var nodeV = g.node(e.v);\n var nodeW = g.node(e.w);\n var p1, p2;\n if (!edge.points) {\n edge.points = [];\n p1 = nodeW;\n p2 = nodeV;\n } else {\n p1 = edge.points[0];\n p2 = edge.points[edge.points.length - 1];\n }\n edge.points.unshift(util.intersectRect(nodeV, p1));\n edge.points.push(util.intersectRect(nodeW, p2));\n });\n}\n\nfunction fixupEdgeLabelCoords(g) {\n _.forEach(g.edges(), function(e) {\n var edge = g.edge(e);\n if (_.has(edge, \"x\")) {\n if (edge.labelpos === \"l\" || edge.labelpos === \"r\") {\n edge.width -= edge.labeloffset;\n }\n switch (edge.labelpos) {\n case \"l\": edge.x -= edge.width / 2 + edge.labeloffset; break;\n case \"r\": edge.x += edge.width / 2 + edge.labeloffset; break;\n }\n }\n });\n}\n\nfunction reversePointsForReversedEdges(g) {\n _.forEach(g.edges(), function(e) {\n var edge = g.edge(e);\n if (edge.reversed) {\n edge.points.reverse();\n }\n });\n}\n\nfunction removeBorderNodes(g) {\n _.forEach(g.nodes(), function(v) {\n if (g.children(v).length) {\n var node = g.node(v);\n var t = g.node(node.borderTop);\n var b = g.node(node.borderBottom);\n var l = g.node(_.last(node.borderLeft));\n var r = g.node(_.last(node.borderRight));\n\n node.width = Math.abs(r.x - l.x);\n node.height = Math.abs(b.y - t.y);\n node.x = l.x + node.width / 2;\n node.y = t.y + node.height / 2;\n }\n });\n\n _.forEach(g.nodes(), function(v) {\n if (g.node(v).dummy === \"border\") {\n g.removeNode(v);\n }\n });\n}\n\nfunction removeSelfEdges(g) {\n _.forEach(g.edges(), function(e) {\n if (e.v === e.w) {\n var node = g.node(e.v);\n if (!node.selfEdges) {\n node.selfEdges = [];\n }\n node.selfEdges.push({ e: e, label: g.edge(e) });\n g.removeEdge(e);\n }\n });\n}\n\nfunction insertSelfEdges(g) {\n var layers = util.buildLayerMatrix(g);\n _.forEach(layers, function(layer) {\n var orderShift = 0;\n _.forEach(layer, function(v, i) {\n var node = g.node(v);\n node.order = i + orderShift;\n _.forEach(node.selfEdges, function(selfEdge) {\n util.addDummyNode(g, \"selfedge\", {\n width: selfEdge.label.width,\n height: selfEdge.label.height,\n rank: node.rank,\n order: i + (++orderShift),\n e: selfEdge.e,\n label: selfEdge.label\n }, \"_se\");\n });\n delete node.selfEdges;\n });\n });\n}\n\nfunction positionSelfEdges(g) {\n _.forEach(g.nodes(), function(v) {\n var node = g.node(v);\n if (node.dummy === \"selfedge\") {\n var selfNode = g.node(node.e.v);\n var x = selfNode.x + selfNode.width / 2;\n var y = selfNode.y;\n var dx = node.x - x;\n var dy = selfNode.height / 2;\n g.setEdge(node.e, node.label);\n g.removeNode(v);\n node.label.points = [\n { x: x + 2 * dx / 3, y: y - dy },\n { x: x + 5 * dx / 6, y: y - dy },\n { x: x + dx , y: y },\n { x: x + 5 * dx / 6, y: y + dy },\n { x: x + 2 * dx / 3, y: y + dy }\n ];\n node.label.x = node.x;\n node.label.y = node.y;\n }\n });\n}\n\nfunction selectNumberAttrs(obj, attrs) {\n return _.mapValues(_.pick(obj, attrs), Number);\n}\n\nfunction canonicalize(attrs) {\n var newAttrs = {};\n _.forEach(attrs, function(v, k) {\n newAttrs[k.toLowerCase()] = v;\n });\n return newAttrs;\n}\n","var _ = require(\"./lodash\");\nvar util = require(\"./util\");\nvar Graph = require(\"./graphlib\").Graph;\n\nmodule.exports = {\n debugOrdering: debugOrdering\n};\n\n/* istanbul ignore next */\nfunction debugOrdering(g) {\n var layerMatrix = util.buildLayerMatrix(g);\n\n var h = new Graph({ compound: true, multigraph: true }).setGraph({});\n\n _.forEach(g.nodes(), function(v) {\n h.setNode(v, { label: v });\n h.setParent(v, \"layer\" + g.node(v).rank);\n });\n\n _.forEach(g.edges(), function(e) {\n h.setEdge(e.v, e.w, {}, e.name);\n });\n\n _.forEach(layerMatrix, function(layer, i) {\n var layerV = \"layer\" + i;\n h.setNode(layerV, { rank: \"same\" });\n _.reduce(layer, function(u, v) {\n h.setEdge(u, v, { style: \"invis\" });\n return v;\n });\n });\n\n return h;\n}\n","module.exports = \"0.8.5\";\n","/*\nCopyright (c) 2012-2014 Chris Pettitt\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n*/\n\nmodule.exports = {\n graphlib: require(\"./lib/graphlib\"),\n\n layout: require(\"./lib/layout\"),\n debug: require(\"./lib/debug\"),\n util: {\n time: require(\"./lib/util\").time,\n notime: require(\"./lib/util\").notime\n },\n version: require(\"./lib/version\")\n};\n","export default function(x) {\n return function constant() {\n return x;\n };\n}\n","export const abs = Math.abs;\nexport const atan2 = Math.atan2;\nexport const cos = Math.cos;\nexport const max = Math.max;\nexport const min = Math.min;\nexport const sin = Math.sin;\nexport const sqrt = Math.sqrt;\n\nexport const epsilon = 1e-12;\nexport const pi = Math.PI;\nexport const halfPi = pi / 2;\nexport const tau = 2 * pi;\n\nexport function acos(x) {\n return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);\n}\n","const pi = Math.PI,\n tau = 2 * pi,\n epsilon = 1e-6,\n tauEpsilon = tau - epsilon;\n\nfunction append(strings) {\n this._ += strings[0];\n for (let i = 1, n = strings.length; i < n; ++i) {\n this._ += arguments[i] + strings[i];\n }\n}\n\nfunction appendRound(digits) {\n let d = Math.floor(digits);\n if (!(d >= 0)) throw new Error(`invalid digits: ${digits}`);\n if (d > 15) return append;\n const k = 10 ** d;\n return function(strings) {\n this._ += strings[0];\n for (let i = 1, n = strings.length; i < n; ++i) {\n this._ += Math.round(arguments[i] * k) / k + strings[i];\n }\n };\n}\n\nexport class Path {\n constructor(digits) {\n this._x0 = this._y0 = // start of current subpath\n this._x1 = this._y1 = null; // end of current subpath\n this._ = \"\";\n this._append = digits == null ? append : appendRound(digits);\n }\n moveTo(x, y) {\n this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`;\n }\n closePath() {\n if (this._x1 !== null) {\n this._x1 = this._x0, this._y1 = this._y0;\n this._append`Z`;\n }\n }\n lineTo(x, y) {\n this._append`L${this._x1 = +x},${this._y1 = +y}`;\n }\n quadraticCurveTo(x1, y1, x, y) {\n this._append`Q${+x1},${+y1},${this._x1 = +x},${this._y1 = +y}`;\n }\n bezierCurveTo(x1, y1, x2, y2, x, y) {\n this._append`C${+x1},${+y1},${+x2},${+y2},${this._x1 = +x},${this._y1 = +y}`;\n }\n arcTo(x1, y1, x2, y2, r) {\n x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(`negative radius: ${r}`);\n\n let x0 = this._x1,\n y0 = this._y1,\n x21 = x2 - x1,\n y21 = y2 - y1,\n x01 = x0 - x1,\n y01 = y0 - y1,\n l01_2 = x01 * x01 + y01 * y01;\n\n // Is this path empty? Move to (x1,y1).\n if (this._x1 === null) {\n this._append`M${this._x1 = x1},${this._y1 = y1}`;\n }\n\n // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n else if (!(l01_2 > epsilon));\n\n // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n // Equivalently, is (x1,y1) coincident with (x2,y2)?\n // Or, is the radius zero? Line to (x1,y1).\n else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n this._append`L${this._x1 = x1},${this._y1 = y1}`;\n }\n\n // Otherwise, draw an arc!\n else {\n let x20 = x2 - x0,\n y20 = y2 - y0,\n l21_2 = x21 * x21 + y21 * y21,\n l20_2 = x20 * x20 + y20 * y20,\n l21 = Math.sqrt(l21_2),\n l01 = Math.sqrt(l01_2),\n l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n t01 = l / l01,\n t21 = l / l21;\n\n // If the start tangent is not coincident with (x0,y0), line to.\n if (Math.abs(t01 - 1) > epsilon) {\n this._append`L${x1 + t01 * x01},${y1 + t01 * y01}`;\n }\n\n this._append`A${r},${r},0,0,${+(y01 * x20 > x01 * y20)},${this._x1 = x1 + t21 * x21},${this._y1 = y1 + t21 * y21}`;\n }\n }\n arc(x, y, r, a0, a1, ccw) {\n x = +x, y = +y, r = +r, ccw = !!ccw;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(`negative radius: ${r}`);\n\n let dx = r * Math.cos(a0),\n dy = r * Math.sin(a0),\n x0 = x + dx,\n y0 = y + dy,\n cw = 1 ^ ccw,\n da = ccw ? a0 - a1 : a1 - a0;\n\n // Is this path empty? Move to (x0,y0).\n if (this._x1 === null) {\n this._append`M${x0},${y0}`;\n }\n\n // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n this._append`L${x0},${y0}`;\n }\n\n // Is this arc empty? We’re done.\n if (!r) return;\n\n // Does the angle go the wrong way? Flip the direction.\n if (da < 0) da = da % tau + tau;\n\n // Is this a complete circle? Draw two arcs to complete the circle.\n if (da > tauEpsilon) {\n this._append`A${r},${r},0,1,${cw},${x - dx},${y - dy}A${r},${r},0,1,${cw},${this._x1 = x0},${this._y1 = y0}`;\n }\n\n // Is this arc non-empty? Draw an arc!\n else if (da > epsilon) {\n this._append`A${r},${r},0,${+(da >= pi)},${cw},${this._x1 = x + r * Math.cos(a1)},${this._y1 = y + r * Math.sin(a1)}`;\n }\n }\n rect(x, y, w, h) {\n this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${w = +w}v${+h}h${-w}Z`;\n }\n toString() {\n return this._;\n }\n}\n\nexport function path() {\n return new Path;\n}\n\n// Allow instanceof d3.path\npath.prototype = Path.prototype;\n\nexport function pathRound(digits = 3) {\n return new Path(+digits);\n}\n","export {Path, path, pathRound} from \"./path.js\";\n","import {Path} from \"d3-path\";\n\nexport function withPath(shape) {\n let digits = 3;\n\n shape.digits = function(_) {\n if (!arguments.length) return digits;\n if (_ == null) {\n digits = null;\n } else {\n const d = Math.floor(_);\n if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);\n digits = d;\n }\n return shape;\n };\n\n return () => new Path(digits);\n}\n","import constant from \"./constant.js\";\nimport {abs, acos, asin, atan2, cos, epsilon, halfPi, max, min, pi, sin, sqrt, tau} from \"./math.js\";\nimport {withPath} from \"./path.js\";\n\nfunction arcInnerRadius(d) {\n return d.innerRadius;\n}\n\nfunction arcOuterRadius(d) {\n return d.outerRadius;\n}\n\nfunction arcStartAngle(d) {\n return d.startAngle;\n}\n\nfunction arcEndAngle(d) {\n return d.endAngle;\n}\n\nfunction arcPadAngle(d) {\n return d && d.padAngle; // Note: optional!\n}\n\nfunction intersect(x0, y0, x1, y1, x2, y2, x3, y3) {\n var x10 = x1 - x0, y10 = y1 - y0,\n x32 = x3 - x2, y32 = y3 - y2,\n t = y32 * x10 - x32 * y10;\n if (t * t < epsilon) return;\n t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;\n return [x0 + t * x10, y0 + t * y10];\n}\n\n// Compute perpendicular offset line of length rc.\n// http://mathworld.wolfram.com/Circle-LineIntersection.html\nfunction cornerTangents(x0, y0, x1, y1, r1, rc, cw) {\n var x01 = x0 - x1,\n y01 = y0 - y1,\n lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01),\n ox = lo * y01,\n oy = -lo * x01,\n x11 = x0 + ox,\n y11 = y0 + oy,\n x10 = x1 + ox,\n y10 = y1 + oy,\n x00 = (x11 + x10) / 2,\n y00 = (y11 + y10) / 2,\n dx = x10 - x11,\n dy = y10 - y11,\n d2 = dx * dx + dy * dy,\n r = r1 - rc,\n D = x11 * y10 - x10 * y11,\n d = (dy < 0 ? -1 : 1) * sqrt(max(0, r * r * d2 - D * D)),\n cx0 = (D * dy - dx * d) / d2,\n cy0 = (-D * dx - dy * d) / d2,\n cx1 = (D * dy + dx * d) / d2,\n cy1 = (-D * dx + dy * d) / d2,\n dx0 = cx0 - x00,\n dy0 = cy0 - y00,\n dx1 = cx1 - x00,\n dy1 = cy1 - y00;\n\n // Pick the closer of the two intersection points.\n // TODO Is there a faster way to determine which intersection to use?\n if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;\n\n return {\n cx: cx0,\n cy: cy0,\n x01: -ox,\n y01: -oy,\n x11: cx0 * (r1 / r - 1),\n y11: cy0 * (r1 / r - 1)\n };\n}\n\nexport default function() {\n var innerRadius = arcInnerRadius,\n outerRadius = arcOuterRadius,\n cornerRadius = constant(0),\n padRadius = null,\n startAngle = arcStartAngle,\n endAngle = arcEndAngle,\n padAngle = arcPadAngle,\n context = null,\n path = withPath(arc);\n\n function arc() {\n var buffer,\n r,\n r0 = +innerRadius.apply(this, arguments),\n r1 = +outerRadius.apply(this, arguments),\n a0 = startAngle.apply(this, arguments) - halfPi,\n a1 = endAngle.apply(this, arguments) - halfPi,\n da = abs(a1 - a0),\n cw = a1 > a0;\n\n if (!context) context = buffer = path();\n\n // Ensure that the outer radius is always larger than the inner radius.\n if (r1 < r0) r = r1, r1 = r0, r0 = r;\n\n // Is it a point?\n if (!(r1 > epsilon)) context.moveTo(0, 0);\n\n // Or is it a circle or annulus?\n else if (da > tau - epsilon) {\n context.moveTo(r1 * cos(a0), r1 * sin(a0));\n context.arc(0, 0, r1, a0, a1, !cw);\n if (r0 > epsilon) {\n context.moveTo(r0 * cos(a1), r0 * sin(a1));\n context.arc(0, 0, r0, a1, a0, cw);\n }\n }\n\n // Or is it a circular or annular sector?\n else {\n var a01 = a0,\n a11 = a1,\n a00 = a0,\n a10 = a1,\n da0 = da,\n da1 = da,\n ap = padAngle.apply(this, arguments) / 2,\n rp = (ap > epsilon) && (padRadius ? +padRadius.apply(this, arguments) : sqrt(r0 * r0 + r1 * r1)),\n rc = min(abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),\n rc0 = rc,\n rc1 = rc,\n t0,\n t1;\n\n // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0.\n if (rp > epsilon) {\n var p0 = asin(rp / r0 * sin(ap)),\n p1 = asin(rp / r1 * sin(ap));\n if ((da0 -= p0 * 2) > epsilon) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0;\n else da0 = 0, a00 = a10 = (a0 + a1) / 2;\n if ((da1 -= p1 * 2) > epsilon) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1;\n else da1 = 0, a01 = a11 = (a0 + a1) / 2;\n }\n\n var x01 = r1 * cos(a01),\n y01 = r1 * sin(a01),\n x10 = r0 * cos(a10),\n y10 = r0 * sin(a10);\n\n // Apply rounded corners?\n if (rc > epsilon) {\n var x11 = r1 * cos(a11),\n y11 = r1 * sin(a11),\n x00 = r0 * cos(a00),\n y00 = r0 * sin(a00),\n oc;\n\n // Restrict the corner radius according to the sector angle. If this\n // intersection fails, it’s probably because the arc is too small, so\n // disable the corner radius entirely.\n if (da < pi) {\n if (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10)) {\n var ax = x01 - oc[0],\n ay = y01 - oc[1],\n bx = x11 - oc[0],\n by = y11 - oc[1],\n kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2),\n lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]);\n rc0 = min(rc, (r0 - lc) / (kc - 1));\n rc1 = min(rc, (r1 - lc) / (kc + 1));\n } else {\n rc0 = rc1 = 0;\n }\n }\n }\n\n // Is the sector collapsed to a line?\n if (!(da1 > epsilon)) context.moveTo(x01, y01);\n\n // Does the sector’s outer ring have rounded corners?\n else if (rc1 > epsilon) {\n t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);\n t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);\n\n context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n // Have the corners merged?\n if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);\n\n // Otherwise, draw the two corners and the ring.\n else {\n context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);\n context.arc(0, 0, r1, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), !cw);\n context.arc(t1.cx, t1.cy, rc1, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);\n }\n }\n\n // Or is the outer ring just a circular arc?\n else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);\n\n // Is there no inner ring, and it’s a circular sector?\n // Or perhaps it’s an annular sector collapsed due to padding?\n if (!(r0 > epsilon) || !(da0 > epsilon)) context.lineTo(x10, y10);\n\n // Does the sector’s inner ring (or point) have rounded corners?\n else if (rc0 > epsilon) {\n t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);\n t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);\n\n context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n // Have the corners merged?\n if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);\n\n // Otherwise, draw the two corners and the ring.\n else {\n context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);\n context.arc(0, 0, r0, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), cw);\n context.arc(t1.cx, t1.cy, rc0, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);\n }\n }\n\n // Or is the inner ring just a circular arc?\n else context.arc(0, 0, r0, a10, a00, cw);\n }\n\n context.closePath();\n\n if (buffer) return context = null, buffer + \"\" || null;\n }\n\n arc.centroid = function() {\n var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2,\n a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2;\n return [cos(a) * r, sin(a) * r];\n };\n\n arc.innerRadius = function(_) {\n return arguments.length ? (innerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : innerRadius;\n };\n\n arc.outerRadius = function(_) {\n return arguments.length ? (outerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : outerRadius;\n };\n\n arc.cornerRadius = function(_) {\n return arguments.length ? (cornerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : cornerRadius;\n };\n\n arc.padRadius = function(_) {\n return arguments.length ? (padRadius = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), arc) : padRadius;\n };\n\n arc.startAngle = function(_) {\n return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : startAngle;\n };\n\n arc.endAngle = function(_) {\n return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : endAngle;\n };\n\n arc.padAngle = function(_) {\n return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : padAngle;\n };\n\n arc.context = function(_) {\n return arguments.length ? ((context = _ == null ? null : _), arc) : context;\n };\n\n return arc;\n}\n","export var slice = Array.prototype.slice;\n\nexport default function(x) {\n return typeof x === \"object\" && \"length\" in x\n ? x // Array, TypedArray, NodeList, array-like\n : Array.from(x); // Map, Set, iterable, string, or anything else\n}\n","function Linear(context) {\n this._context = context;\n}\n\nLinear.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; // falls through\n default: this._context.lineTo(x, y); break;\n }\n }\n};\n\nexport default function(context) {\n return new Linear(context);\n}\n","export function x(p) {\n return p[0];\n}\n\nexport function y(p) {\n return p[1];\n}\n","import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport {withPath} from \"./path.js\";\nimport {x as pointX, y as pointY} from \"./point.js\";\n\nexport default function(x, y) {\n var defined = constant(true),\n context = null,\n curve = curveLinear,\n output = null,\n path = withPath(line);\n\n x = typeof x === \"function\" ? x : (x === undefined) ? pointX : constant(x);\n y = typeof y === \"function\" ? y : (y === undefined) ? pointY : constant(y);\n\n function line(data) {\n var i,\n n = (data = array(data)).length,\n d,\n defined0 = false,\n buffer;\n\n if (context == null) output = curve(buffer = path());\n\n for (i = 0; i <= n; ++i) {\n if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n if (defined0 = !defined0) output.lineStart();\n else output.lineEnd();\n }\n if (defined0) output.point(+x(d, i, data), +y(d, i, data));\n }\n\n if (buffer) return output = null, buffer + \"\" || null;\n }\n\n line.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), line) : x;\n };\n\n line.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), line) : y;\n };\n\n line.defined = function(_) {\n return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), line) : defined;\n };\n\n line.curve = function(_) {\n return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;\n };\n\n line.context = function(_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;\n };\n\n return line;\n}\n","export default function(a, b) {\n return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n}\n","export default function(d) {\n return d;\n}\n","import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport descending from \"./descending.js\";\nimport identity from \"./identity.js\";\nimport {tau} from \"./math.js\";\n\nexport default function() {\n var value = identity,\n sortValues = descending,\n sort = null,\n startAngle = constant(0),\n endAngle = constant(tau),\n padAngle = constant(0);\n\n function pie(data) {\n var i,\n n = (data = array(data)).length,\n j,\n k,\n sum = 0,\n index = new Array(n),\n arcs = new Array(n),\n a0 = +startAngle.apply(this, arguments),\n da = Math.min(tau, Math.max(-tau, endAngle.apply(this, arguments) - a0)),\n a1,\n p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)),\n pa = p * (da < 0 ? -1 : 1),\n v;\n\n for (i = 0; i < n; ++i) {\n if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) {\n sum += v;\n }\n }\n\n // Optionally sort the arcs by previously-computed values or by data.\n if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); });\n else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); });\n\n // Compute the arcs! They are stored in the original data's order.\n for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) {\n j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = {\n data: data[j],\n index: i,\n value: v,\n startAngle: a0,\n endAngle: a1,\n padAngle: p\n };\n }\n\n return arcs;\n }\n\n pie.value = function(_) {\n return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(+_), pie) : value;\n };\n\n pie.sortValues = function(_) {\n return arguments.length ? (sortValues = _, sort = null, pie) : sortValues;\n };\n\n pie.sort = function(_) {\n return arguments.length ? (sort = _, sortValues = null, pie) : sort;\n };\n\n pie.startAngle = function(_) {\n return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : startAngle;\n };\n\n pie.endAngle = function(_) {\n return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : endAngle;\n };\n\n pie.padAngle = function(_) {\n return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : padAngle;\n };\n\n return pie;\n}\n","import pointRadial from \"../pointRadial.js\";\n\nclass Bump {\n constructor(context, x) {\n this._context = context;\n this._x = x;\n }\n areaStart() {\n this._line = 0;\n }\n areaEnd() {\n this._line = NaN;\n }\n lineStart() {\n this._point = 0;\n }\n lineEnd() {\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n }\n point(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: {\n this._point = 1;\n if (this._line) this._context.lineTo(x, y);\n else this._context.moveTo(x, y);\n break;\n }\n case 1: this._point = 2; // falls through\n default: {\n if (this._x) this._context.bezierCurveTo(this._x0 = (this._x0 + x) / 2, this._y0, this._x0, y, x, y);\n else this._context.bezierCurveTo(this._x0, this._y0 = (this._y0 + y) / 2, x, this._y0, x, y);\n break;\n }\n }\n this._x0 = x, this._y0 = y;\n }\n}\n\nclass BumpRadial {\n constructor(context) {\n this._context = context;\n }\n lineStart() {\n this._point = 0;\n }\n lineEnd() {}\n point(x, y) {\n x = +x, y = +y;\n if (this._point === 0) {\n this._point = 1;\n } else {\n const p0 = pointRadial(this._x0, this._y0);\n const p1 = pointRadial(this._x0, this._y0 = (this._y0 + y) / 2);\n const p2 = pointRadial(x, this._y0);\n const p3 = pointRadial(x, y);\n this._context.moveTo(...p0);\n this._context.bezierCurveTo(...p1, ...p2, ...p3);\n }\n this._x0 = x, this._y0 = y;\n }\n}\n\nexport function bumpX(context) {\n return new Bump(context, true);\n}\n\nexport function bumpY(context) {\n return new Bump(context, false);\n}\n\nexport function bumpRadial(context) {\n return new BumpRadial(context);\n}\n","export default function() {}\n","export function point(that, x, y) {\n that._context.bezierCurveTo(\n (2 * that._x0 + that._x1) / 3,\n (2 * that._y0 + that._y1) / 3,\n (that._x0 + 2 * that._x1) / 3,\n (that._y0 + 2 * that._y1) / 3,\n (that._x0 + 4 * that._x1 + x) / 6,\n (that._y0 + 4 * that._y1 + y) / 6\n );\n}\n\nexport function Basis(context) {\n this._context = context;\n}\n\nBasis.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 3: point(this, this._x1, this._y1); // falls through\n case 2: this._context.lineTo(this._x1, this._y1); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // falls through\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\n\nexport default function(context) {\n return new Basis(context);\n}\n","import noop from \"../noop.js\";\nimport {point} from \"./basis.js\";\n\nfunction BasisClosed(context) {\n this._context = context;\n}\n\nBasisClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 =\n this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 1: {\n this._context.moveTo(this._x2, this._y2);\n this._context.closePath();\n break;\n }\n case 2: {\n this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3);\n this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3);\n this._context.closePath();\n break;\n }\n case 3: {\n this.point(this._x2, this._y2);\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n break;\n }\n }\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._x2 = x, this._y2 = y; break;\n case 1: this._point = 2; this._x3 = x, this._y3 = y; break;\n case 2: this._point = 3; this._x4 = x, this._y4 = y; this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6); break;\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\n\nexport default function(context) {\n return new BasisClosed(context);\n}\n","import {point} from \"./basis.js\";\n\nfunction BasisOpen(context) {\n this._context = context;\n}\n\nBasisOpen.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6; this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0); break;\n case 3: this._point = 4; // falls through\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\n\nexport default function(context) {\n return new BasisOpen(context);\n}\n","import {Basis} from \"./basis.js\";\n\nfunction Bundle(context, beta) {\n this._basis = new Basis(context);\n this._beta = beta;\n}\n\nBundle.prototype = {\n lineStart: function() {\n this._x = [];\n this._y = [];\n this._basis.lineStart();\n },\n lineEnd: function() {\n var x = this._x,\n y = this._y,\n j = x.length - 1;\n\n if (j > 0) {\n var x0 = x[0],\n y0 = y[0],\n dx = x[j] - x0,\n dy = y[j] - y0,\n i = -1,\n t;\n\n while (++i <= j) {\n t = i / j;\n this._basis.point(\n this._beta * x[i] + (1 - this._beta) * (x0 + t * dx),\n this._beta * y[i] + (1 - this._beta) * (y0 + t * dy)\n );\n }\n }\n\n this._x = this._y = null;\n this._basis.lineEnd();\n },\n point: function(x, y) {\n this._x.push(+x);\n this._y.push(+y);\n }\n};\n\nexport default (function custom(beta) {\n\n function bundle(context) {\n return beta === 1 ? new Basis(context) : new Bundle(context, beta);\n }\n\n bundle.beta = function(beta) {\n return custom(+beta);\n };\n\n return bundle;\n})(0.85);\n","export function point(that, x, y) {\n that._context.bezierCurveTo(\n that._x1 + that._k * (that._x2 - that._x0),\n that._y1 + that._k * (that._y2 - that._y0),\n that._x2 + that._k * (that._x1 - x),\n that._y2 + that._k * (that._y1 - y),\n that._x2,\n that._y2\n );\n}\n\nexport function Cardinal(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinal.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x2, this._y2); break;\n case 3: point(this, this._x1, this._y1); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; this._x1 = x, this._y1 = y; break;\n case 2: this._point = 3; // falls through\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new Cardinal(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n","import noop from \"../noop.js\";\nimport {point} from \"./cardinal.js\";\n\nexport function CardinalClosed(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinalClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 1: {\n this._context.moveTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 2: {\n this._context.lineTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 3: {\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n this.point(this._x5, this._y5);\n break;\n }\n }\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new CardinalClosed(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n","import {point} from \"./cardinal.js\";\n\nexport function CardinalOpen(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinalOpen.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;\n case 3: this._point = 4; // falls through\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new CardinalOpen(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n","import {epsilon} from \"../math.js\";\nimport {Cardinal} from \"./cardinal.js\";\n\nexport function point(that, x, y) {\n var x1 = that._x1,\n y1 = that._y1,\n x2 = that._x2,\n y2 = that._y2;\n\n if (that._l01_a > epsilon) {\n var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a,\n n = 3 * that._l01_a * (that._l01_a + that._l12_a);\n x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n;\n y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n;\n }\n\n if (that._l23_a > epsilon) {\n var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a,\n m = 3 * that._l23_a * (that._l23_a + that._l12_a);\n x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m;\n y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m;\n }\n\n that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2);\n}\n\nfunction CatmullRom(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRom.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x2, this._y2); break;\n case 3: this.point(this._x2, this._y2); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; // falls through\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\n","import {CardinalClosed} from \"./cardinalClosed.js\";\nimport noop from \"../noop.js\";\nimport {point} from \"./catmullRom.js\";\n\nfunction CatmullRomClosed(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRomClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 1: {\n this._context.moveTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 2: {\n this._context.lineTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 3: {\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n this.point(this._x5, this._y5);\n break;\n }\n }\n },\n point: function(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRomClosed(context, alpha) : new CardinalClosed(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\n","import {CardinalOpen} from \"./cardinalOpen.js\";\nimport {point} from \"./catmullRom.js\";\n\nfunction CatmullRomOpen(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRomOpen.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0: this._point = 1; break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;\n case 3: this._point = 4; // falls through\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRomOpen(context, alpha) : new CardinalOpen(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\n","import noop from \"../noop.js\";\n\nfunction LinearClosed(context) {\n this._context = context;\n}\n\nLinearClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._point) this._context.closePath();\n },\n point: function(x, y) {\n x = +x, y = +y;\n if (this._point) this._context.lineTo(x, y);\n else this._point = 1, this._context.moveTo(x, y);\n }\n};\n\nexport default function(context) {\n return new LinearClosed(context);\n}\n","function sign(x) {\n return x < 0 ? -1 : 1;\n}\n\n// Calculate the slopes of the tangents (Hermite-type interpolation) based on\n// the following paper: Steffen, M. 1990. A Simple Method for Monotonic\n// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO.\n// NOV(II), P. 443, 1990.\nfunction slope3(that, x2, y2) {\n var h0 = that._x1 - that._x0,\n h1 = x2 - that._x1,\n s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),\n s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),\n p = (s0 * h1 + s1 * h0) / (h0 + h1);\n return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;\n}\n\n// Calculate a one-sided slope.\nfunction slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}\n\n// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations\n// \"you can express cubic Hermite interpolation in terms of cubic Bézier curves\n// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1\".\nfunction point(that, t0, t1) {\n var x0 = that._x0,\n y0 = that._y0,\n x1 = that._x1,\n y1 = that._y1,\n dx = (x1 - x0) / 3;\n that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);\n}\n\nfunction MonotoneX(context) {\n this._context = context;\n}\n\nMonotoneX.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 =\n this._t0 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x1, this._y1); break;\n case 3: point(this, this._t0, slope2(this, this._t0)); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n var t1 = NaN;\n\n x = +x, y = +y;\n if (x === this._x1 && y === this._y1) return; // Ignore coincident points.\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; point(this, slope2(this, t1 = slope3(this, x, y)), t1); break;\n default: point(this, this._t0, t1 = slope3(this, x, y)); break;\n }\n\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n this._t0 = t1;\n }\n}\n\nfunction MonotoneY(context) {\n this._context = new ReflectContext(context);\n}\n\n(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) {\n MonotoneX.prototype.point.call(this, y, x);\n};\n\nfunction ReflectContext(context) {\n this._context = context;\n}\n\nReflectContext.prototype = {\n moveTo: function(x, y) { this._context.moveTo(y, x); },\n closePath: function() { this._context.closePath(); },\n lineTo: function(x, y) { this._context.lineTo(y, x); },\n bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); }\n};\n\nexport function monotoneX(context) {\n return new MonotoneX(context);\n}\n\nexport function monotoneY(context) {\n return new MonotoneY(context);\n}\n","function Natural(context) {\n this._context = context;\n}\n\nNatural.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x = [];\n this._y = [];\n },\n lineEnd: function() {\n var x = this._x,\n y = this._y,\n n = x.length;\n\n if (n) {\n this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]);\n if (n === 2) {\n this._context.lineTo(x[1], y[1]);\n } else {\n var px = controlPoints(x),\n py = controlPoints(y);\n for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) {\n this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]);\n }\n }\n }\n\n if (this._line || (this._line !== 0 && n === 1)) this._context.closePath();\n this._line = 1 - this._line;\n this._x = this._y = null;\n },\n point: function(x, y) {\n this._x.push(+x);\n this._y.push(+y);\n }\n};\n\n// See https://www.particleincell.com/2012/bezier-splines/ for derivation.\nfunction controlPoints(x) {\n var i,\n n = x.length - 1,\n m,\n a = new Array(n),\n b = new Array(n),\n r = new Array(n);\n a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1];\n for (i = 1; i < n - 1; ++i) a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1];\n a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n];\n for (i = 1; i < n; ++i) m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1];\n a[n - 1] = r[n - 1] / b[n - 1];\n for (i = n - 2; i >= 0; --i) a[i] = (r[i] - a[i + 1]) / b[i];\n b[n - 1] = (x[n] + a[n - 1]) / 2;\n for (i = 0; i < n - 1; ++i) b[i] = 2 * x[i + 1] - a[i + 1];\n return [a, b];\n}\n\nexport default function(context) {\n return new Natural(context);\n}\n","function Step(context, t) {\n this._context = context;\n this._t = t;\n}\n\nStep.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x = this._y = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y);\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; // falls through\n default: {\n if (this._t <= 0) {\n this._context.lineTo(this._x, y);\n this._context.lineTo(x, y);\n } else {\n var x1 = this._x * (1 - this._t) + x * this._t;\n this._context.lineTo(x1, this._y);\n this._context.lineTo(x1, y);\n }\n break;\n }\n }\n this._x = x, this._y = y;\n }\n};\n\nexport default function(context) {\n return new Step(context, 0.5);\n}\n\nexport function stepBefore(context) {\n return new Step(context, 0);\n}\n\nexport function stepAfter(context) {\n return new Step(context, 1);\n}\n","export {default as arc} from \"./arc.js\";\nexport {default as area} from \"./area.js\";\nexport {default as line} from \"./line.js\";\nexport {default as pie} from \"./pie.js\";\nexport {default as areaRadial, default as radialArea} from \"./areaRadial.js\"; // Note: radialArea is deprecated!\nexport {default as lineRadial, default as radialLine} from \"./lineRadial.js\"; // Note: radialLine is deprecated!\nexport {default as pointRadial} from \"./pointRadial.js\";\nexport {link, linkHorizontal, linkVertical, linkRadial} from \"./link.js\";\n\nexport {default as symbol, symbolsStroke, symbolsFill, symbolsFill as symbols} from \"./symbol.js\";\nexport {default as symbolAsterisk} from \"./symbol/asterisk.js\";\nexport {default as symbolCircle} from \"./symbol/circle.js\";\nexport {default as symbolCross} from \"./symbol/cross.js\";\nexport {default as symbolDiamond} from \"./symbol/diamond.js\";\nexport {default as symbolDiamond2} from \"./symbol/diamond2.js\";\nexport {default as symbolPlus} from \"./symbol/plus.js\";\nexport {default as symbolSquare} from \"./symbol/square.js\";\nexport {default as symbolSquare2} from \"./symbol/square2.js\";\nexport {default as symbolStar} from \"./symbol/star.js\";\nexport {default as symbolTriangle} from \"./symbol/triangle.js\";\nexport {default as symbolTriangle2} from \"./symbol/triangle2.js\";\nexport {default as symbolWye} from \"./symbol/wye.js\";\nexport {default as symbolTimes, default as symbolX} from \"./symbol/times.js\";\n\nexport {default as curveBasisClosed} from \"./curve/basisClosed.js\";\nexport {default as curveBasisOpen} from \"./curve/basisOpen.js\";\nexport {default as curveBasis} from \"./curve/basis.js\";\nexport {bumpX as curveBumpX, bumpY as curveBumpY} from \"./curve/bump.js\";\nexport {default as curveBundle} from \"./curve/bundle.js\";\nexport {default as curveCardinalClosed} from \"./curve/cardinalClosed.js\";\nexport {default as curveCardinalOpen} from \"./curve/cardinalOpen.js\";\nexport {default as curveCardinal} from \"./curve/cardinal.js\";\nexport {default as curveCatmullRomClosed} from \"./curve/catmullRomClosed.js\";\nexport {default as curveCatmullRomOpen} from \"./curve/catmullRomOpen.js\";\nexport {default as curveCatmullRom} from \"./curve/catmullRom.js\";\nexport {default as curveLinearClosed} from \"./curve/linearClosed.js\";\nexport {default as curveLinear} from \"./curve/linear.js\";\nexport {monotoneX as curveMonotoneX, monotoneY as curveMonotoneY} from \"./curve/monotone.js\";\nexport {default as curveNatural} from \"./curve/natural.js\";\nexport {default as curveStep, stepAfter as curveStepAfter, stepBefore as curveStepBefore} from \"./curve/step.js\";\n\nexport {default as stack} from \"./stack.js\";\nexport {default as stackOffsetExpand} from \"./offset/expand.js\";\nexport {default as stackOffsetDiverging} from \"./offset/diverging.js\";\nexport {default as stackOffsetNone} from \"./offset/none.js\";\nexport {default as stackOffsetSilhouette} from \"./offset/silhouette.js\";\nexport {default as stackOffsetWiggle} from \"./offset/wiggle.js\";\nexport {default as stackOrderAppearance} from \"./order/appearance.js\";\nexport {default as stackOrderAscending} from \"./order/ascending.js\";\nexport {default as stackOrderDescending} from \"./order/descending.js\";\nexport {default as stackOrderInsideOut} from \"./order/insideOut.js\";\nexport {default as stackOrderNone} from \"./order/none.js\";\nexport {default as stackOrderReverse} from \"./order/reverse.js\";\n","var x=String;\nvar create=function() {return {isColorSupported:false,reset:x,bold:x,dim:x,italic:x,underline:x,inverse:x,hidden:x,strikethrough:x,black:x,red:x,green:x,yellow:x,blue:x,magenta:x,cyan:x,white:x,gray:x,bgBlack:x,bgRed:x,bgGreen:x,bgYellow:x,bgBlue:x,bgMagenta:x,bgCyan:x,bgWhite:x}};\nmodule.exports=create();\nmodule.exports.createColors = create;\n","'use strict'\n\nlet pico = require('picocolors')\n\nlet terminalHighlight = require('./terminal-highlight')\n\nclass CssSyntaxError extends Error {\n constructor(message, line, column, source, file, plugin) {\n super(message)\n this.name = 'CssSyntaxError'\n this.reason = message\n\n if (file) {\n this.file = file\n }\n if (source) {\n this.source = source\n }\n if (plugin) {\n this.plugin = plugin\n }\n if (typeof line !== 'undefined' && typeof column !== 'undefined') {\n if (typeof line === 'number') {\n this.line = line\n this.column = column\n } else {\n this.line = line.line\n this.column = line.column\n this.endLine = column.line\n this.endColumn = column.column\n }\n }\n\n this.setMessage()\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, CssSyntaxError)\n }\n }\n\n setMessage() {\n this.message = this.plugin ? this.plugin + ': ' : ''\n this.message += this.file ? this.file : ''\n if (typeof this.line !== 'undefined') {\n this.message += ':' + this.line + ':' + this.column\n }\n this.message += ': ' + this.reason\n }\n\n showSourceCode(color) {\n if (!this.source) return ''\n\n let css = this.source\n if (color == null) color = pico.isColorSupported\n if (terminalHighlight) {\n if (color) css = terminalHighlight(css)\n }\n\n let lines = css.split(/\\r?\\n/)\n let start = Math.max(this.line - 3, 0)\n let end = Math.min(this.line + 2, lines.length)\n\n let maxWidth = String(end).length\n\n let mark, aside\n if (color) {\n let { bold, gray, red } = pico.createColors(true)\n mark = text => bold(red(text))\n aside = text => gray(text)\n } else {\n mark = aside = str => str\n }\n\n return lines\n .slice(start, end)\n .map((line, index) => {\n let number = start + 1 + index\n let gutter = ' ' + (' ' + number).slice(-maxWidth) + ' | '\n if (number === this.line) {\n let spacing =\n aside(gutter.replace(/\\d/g, ' ')) +\n line.slice(0, this.column - 1).replace(/[^\\t]/g, ' ')\n return mark('>') + aside(gutter) + line + '\\n ' + spacing + mark('^')\n }\n return ' ' + aside(gutter) + line\n })\n .join('\\n')\n }\n\n toString() {\n let code = this.showSourceCode()\n if (code) {\n code = '\\n\\n' + code + '\\n'\n }\n return this.name + ': ' + this.message + code\n }\n}\n\nmodule.exports = CssSyntaxError\nCssSyntaxError.default = CssSyntaxError\n","'use strict'\n\nmodule.exports.isClean = Symbol('isClean')\n\nmodule.exports.my = Symbol('my')\n","'use strict'\n\nconst DEFAULT_RAW = {\n after: '\\n',\n beforeClose: '\\n',\n beforeComment: '\\n',\n beforeDecl: '\\n',\n beforeOpen: ' ',\n beforeRule: '\\n',\n colon: ': ',\n commentLeft: ' ',\n commentRight: ' ',\n emptyBody: '',\n indent: ' ',\n semicolon: false\n}\n\nfunction capitalize(str) {\n return str[0].toUpperCase() + str.slice(1)\n}\n\nclass Stringifier {\n constructor(builder) {\n this.builder = builder\n }\n\n atrule(node, semicolon) {\n let name = '@' + node.name\n let params = node.params ? this.rawValue(node, 'params') : ''\n\n if (typeof node.raws.afterName !== 'undefined') {\n name += node.raws.afterName\n } else if (params) {\n name += ' '\n }\n\n if (node.nodes) {\n this.block(node, name + params)\n } else {\n let end = (node.raws.between || '') + (semicolon ? ';' : '')\n this.builder(name + params + end, node)\n }\n }\n\n beforeAfter(node, detect) {\n let value\n if (node.type === 'decl') {\n value = this.raw(node, null, 'beforeDecl')\n } else if (node.type === 'comment') {\n value = this.raw(node, null, 'beforeComment')\n } else if (detect === 'before') {\n value = this.raw(node, null, 'beforeRule')\n } else {\n value = this.raw(node, null, 'beforeClose')\n }\n\n let buf = node.parent\n let depth = 0\n while (buf && buf.type !== 'root') {\n depth += 1\n buf = buf.parent\n }\n\n if (value.includes('\\n')) {\n let indent = this.raw(node, null, 'indent')\n if (indent.length) {\n for (let step = 0; step < depth; step++) value += indent\n }\n }\n\n return value\n }\n\n block(node, start) {\n let between = this.raw(node, 'between', 'beforeOpen')\n this.builder(start + between + '{', node, 'start')\n\n let after\n if (node.nodes && node.nodes.length) {\n this.body(node)\n after = this.raw(node, 'after')\n } else {\n after = this.raw(node, 'after', 'emptyBody')\n }\n\n if (after) this.builder(after)\n this.builder('}', node, 'end')\n }\n\n body(node) {\n let last = node.nodes.length - 1\n while (last > 0) {\n if (node.nodes[last].type !== 'comment') break\n last -= 1\n }\n\n let semicolon = this.raw(node, 'semicolon')\n for (let i = 0; i < node.nodes.length; i++) {\n let child = node.nodes[i]\n let before = this.raw(child, 'before')\n if (before) this.builder(before)\n this.stringify(child, last !== i || semicolon)\n }\n }\n\n comment(node) {\n let left = this.raw(node, 'left', 'commentLeft')\n let right = this.raw(node, 'right', 'commentRight')\n this.builder('/*' + left + node.text + right + '*/', node)\n }\n\n decl(node, semicolon) {\n let between = this.raw(node, 'between', 'colon')\n let string = node.prop + between + this.rawValue(node, 'value')\n\n if (node.important) {\n string += node.raws.important || ' !important'\n }\n\n if (semicolon) string += ';'\n this.builder(string, node)\n }\n\n document(node) {\n this.body(node)\n }\n\n raw(node, own, detect) {\n let value\n if (!detect) detect = own\n\n // Already had\n if (own) {\n value = node.raws[own]\n if (typeof value !== 'undefined') return value\n }\n\n let parent = node.parent\n\n if (detect === 'before') {\n // Hack for first rule in CSS\n if (!parent || (parent.type === 'root' && parent.first === node)) {\n return ''\n }\n\n // `root` nodes in `document` should use only their own raws\n if (parent && parent.type === 'document') {\n return ''\n }\n }\n\n // Floating child without parent\n if (!parent) return DEFAULT_RAW[detect]\n\n // Detect style by other nodes\n let root = node.root()\n if (!root.rawCache) root.rawCache = {}\n if (typeof root.rawCache[detect] !== 'undefined') {\n return root.rawCache[detect]\n }\n\n if (detect === 'before' || detect === 'after') {\n return this.beforeAfter(node, detect)\n } else {\n let method = 'raw' + capitalize(detect)\n if (this[method]) {\n value = this[method](root, node)\n } else {\n root.walk(i => {\n value = i.raws[own]\n if (typeof value !== 'undefined') return false\n })\n }\n }\n\n if (typeof value === 'undefined') value = DEFAULT_RAW[detect]\n\n root.rawCache[detect] = value\n return value\n }\n\n rawBeforeClose(root) {\n let value\n root.walk(i => {\n if (i.nodes && i.nodes.length > 0) {\n if (typeof i.raws.after !== 'undefined') {\n value = i.raws.after\n if (value.includes('\\n')) {\n value = value.replace(/[^\\n]+$/, '')\n }\n return false\n }\n }\n })\n if (value) value = value.replace(/\\S/g, '')\n return value\n }\n\n rawBeforeComment(root, node) {\n let value\n root.walkComments(i => {\n if (typeof i.raws.before !== 'undefined') {\n value = i.raws.before\n if (value.includes('\\n')) {\n value = value.replace(/[^\\n]+$/, '')\n }\n return false\n }\n })\n if (typeof value === 'undefined') {\n value = this.raw(node, null, 'beforeDecl')\n } else if (value) {\n value = value.replace(/\\S/g, '')\n }\n return value\n }\n\n rawBeforeDecl(root, node) {\n let value\n root.walkDecls(i => {\n if (typeof i.raws.before !== 'undefined') {\n value = i.raws.before\n if (value.includes('\\n')) {\n value = value.replace(/[^\\n]+$/, '')\n }\n return false\n }\n })\n if (typeof value === 'undefined') {\n value = this.raw(node, null, 'beforeRule')\n } else if (value) {\n value = value.replace(/\\S/g, '')\n }\n return value\n }\n\n rawBeforeOpen(root) {\n let value\n root.walk(i => {\n if (i.type !== 'decl') {\n value = i.raws.between\n if (typeof value !== 'undefined') return false\n }\n })\n return value\n }\n\n rawBeforeRule(root) {\n let value\n root.walk(i => {\n if (i.nodes && (i.parent !== root || root.first !== i)) {\n if (typeof i.raws.before !== 'undefined') {\n value = i.raws.before\n if (value.includes('\\n')) {\n value = value.replace(/[^\\n]+$/, '')\n }\n return false\n }\n }\n })\n if (value) value = value.replace(/\\S/g, '')\n return value\n }\n\n rawColon(root) {\n let value\n root.walkDecls(i => {\n if (typeof i.raws.between !== 'undefined') {\n value = i.raws.between.replace(/[^\\s:]/g, '')\n return false\n }\n })\n return value\n }\n\n rawEmptyBody(root) {\n let value\n root.walk(i => {\n if (i.nodes && i.nodes.length === 0) {\n value = i.raws.after\n if (typeof value !== 'undefined') return false\n }\n })\n return value\n }\n\n rawIndent(root) {\n if (root.raws.indent) return root.raws.indent\n let value\n root.walk(i => {\n let p = i.parent\n if (p && p !== root && p.parent && p.parent === root) {\n if (typeof i.raws.before !== 'undefined') {\n let parts = i.raws.before.split('\\n')\n value = parts[parts.length - 1]\n value = value.replace(/\\S/g, '')\n return false\n }\n }\n })\n return value\n }\n\n rawSemicolon(root) {\n let value\n root.walk(i => {\n if (i.nodes && i.nodes.length && i.last.type === 'decl') {\n value = i.raws.semicolon\n if (typeof value !== 'undefined') return false\n }\n })\n return value\n }\n\n rawValue(node, prop) {\n let value = node[prop]\n let raw = node.raws[prop]\n if (raw && raw.value === value) {\n return raw.raw\n }\n\n return value\n }\n\n root(node) {\n this.body(node)\n if (node.raws.after) this.builder(node.raws.after)\n }\n\n rule(node) {\n this.block(node, this.rawValue(node, 'selector'))\n if (node.raws.ownSemicolon) {\n this.builder(node.raws.ownSemicolon, node, 'end')\n }\n }\n\n stringify(node, semicolon) {\n /* c8 ignore start */\n if (!this[node.type]) {\n throw new Error(\n 'Unknown AST node type ' +\n node.type +\n '. ' +\n 'Maybe you need to change PostCSS stringifier.'\n )\n }\n /* c8 ignore stop */\n this[node.type](node, semicolon)\n }\n}\n\nmodule.exports = Stringifier\nStringifier.default = Stringifier\n","'use strict'\n\nlet Stringifier = require('./stringifier')\n\nfunction stringify(node, builder) {\n let str = new Stringifier(builder)\n str.stringify(node)\n}\n\nmodule.exports = stringify\nstringify.default = stringify\n","'use strict'\n\nlet { isClean, my } = require('./symbols')\nlet CssSyntaxError = require('./css-syntax-error')\nlet Stringifier = require('./stringifier')\nlet stringify = require('./stringify')\n\nfunction cloneNode(obj, parent) {\n let cloned = new obj.constructor()\n\n for (let i in obj) {\n if (!Object.prototype.hasOwnProperty.call(obj, i)) {\n /* c8 ignore next 2 */\n continue\n }\n if (i === 'proxyCache') continue\n let value = obj[i]\n let type = typeof value\n\n if (i === 'parent' && type === 'object') {\n if (parent) cloned[i] = parent\n } else if (i === 'source') {\n cloned[i] = value\n } else if (Array.isArray(value)) {\n cloned[i] = value.map(j => cloneNode(j, cloned))\n } else {\n if (type === 'object' && value !== null) value = cloneNode(value)\n cloned[i] = value\n }\n }\n\n return cloned\n}\n\nclass Node {\n constructor(defaults = {}) {\n this.raws = {}\n this[isClean] = false\n this[my] = true\n\n for (let name in defaults) {\n if (name === 'nodes') {\n this.nodes = []\n for (let node of defaults[name]) {\n if (typeof node.clone === 'function') {\n this.append(node.clone())\n } else {\n this.append(node)\n }\n }\n } else {\n this[name] = defaults[name]\n }\n }\n }\n\n addToError(error) {\n error.postcssNode = this\n if (error.stack && this.source && /\\n\\s{4}at /.test(error.stack)) {\n let s = this.source\n error.stack = error.stack.replace(\n /\\n\\s{4}at /,\n `$&${s.input.from}:${s.start.line}:${s.start.column}$&`\n )\n }\n return error\n }\n\n after(add) {\n this.parent.insertAfter(this, add)\n return this\n }\n\n assign(overrides = {}) {\n for (let name in overrides) {\n this[name] = overrides[name]\n }\n return this\n }\n\n before(add) {\n this.parent.insertBefore(this, add)\n return this\n }\n\n cleanRaws(keepBetween) {\n delete this.raws.before\n delete this.raws.after\n if (!keepBetween) delete this.raws.between\n }\n\n clone(overrides = {}) {\n let cloned = cloneNode(this)\n for (let name in overrides) {\n cloned[name] = overrides[name]\n }\n return cloned\n }\n\n cloneAfter(overrides = {}) {\n let cloned = this.clone(overrides)\n this.parent.insertAfter(this, cloned)\n return cloned\n }\n\n cloneBefore(overrides = {}) {\n let cloned = this.clone(overrides)\n this.parent.insertBefore(this, cloned)\n return cloned\n }\n\n error(message, opts = {}) {\n if (this.source) {\n let { end, start } = this.rangeBy(opts)\n return this.source.input.error(\n message,\n { column: start.column, line: start.line },\n { column: end.column, line: end.line },\n opts\n )\n }\n return new CssSyntaxError(message)\n }\n\n getProxyProcessor() {\n return {\n get(node, prop) {\n if (prop === 'proxyOf') {\n return node\n } else if (prop === 'root') {\n return () => node.root().toProxy()\n } else {\n return node[prop]\n }\n },\n\n set(node, prop, value) {\n if (node[prop] === value) return true\n node[prop] = value\n if (\n prop === 'prop' ||\n prop === 'value' ||\n prop === 'name' ||\n prop === 'params' ||\n prop === 'important' ||\n /* c8 ignore next */\n prop === 'text'\n ) {\n node.markDirty()\n }\n return true\n }\n }\n }\n\n markDirty() {\n if (this[isClean]) {\n this[isClean] = false\n let next = this\n while ((next = next.parent)) {\n next[isClean] = false\n }\n }\n }\n\n next() {\n if (!this.parent) return undefined\n let index = this.parent.index(this)\n return this.parent.nodes[index + 1]\n }\n\n positionBy(opts, stringRepresentation) {\n let pos = this.source.start\n if (opts.index) {\n pos = this.positionInside(opts.index, stringRepresentation)\n } else if (opts.word) {\n stringRepresentation = this.toString()\n let index = stringRepresentation.indexOf(opts.word)\n if (index !== -1) pos = this.positionInside(index, stringRepresentation)\n }\n return pos\n }\n\n positionInside(index, stringRepresentation) {\n let string = stringRepresentation || this.toString()\n let column = this.source.start.column\n let line = this.source.start.line\n\n for (let i = 0; i < index; i++) {\n if (string[i] === '\\n') {\n column = 1\n line += 1\n } else {\n column += 1\n }\n }\n\n return { column, line }\n }\n\n prev() {\n if (!this.parent) return undefined\n let index = this.parent.index(this)\n return this.parent.nodes[index - 1]\n }\n\n rangeBy(opts) {\n let start = {\n column: this.source.start.column,\n line: this.source.start.line\n }\n let end = this.source.end\n ? {\n column: this.source.end.column + 1,\n line: this.source.end.line\n }\n : {\n column: start.column + 1,\n line: start.line\n }\n\n if (opts.word) {\n let stringRepresentation = this.toString()\n let index = stringRepresentation.indexOf(opts.word)\n if (index !== -1) {\n start = this.positionInside(index, stringRepresentation)\n end = this.positionInside(index + opts.word.length, stringRepresentation)\n }\n } else {\n if (opts.start) {\n start = {\n column: opts.start.column,\n line: opts.start.line\n }\n } else if (opts.index) {\n start = this.positionInside(opts.index)\n }\n\n if (opts.end) {\n end = {\n column: opts.end.column,\n line: opts.end.line\n }\n } else if (opts.endIndex) {\n end = this.positionInside(opts.endIndex)\n } else if (opts.index) {\n end = this.positionInside(opts.index + 1)\n }\n }\n\n if (\n end.line < start.line ||\n (end.line === start.line && end.column <= start.column)\n ) {\n end = { column: start.column + 1, line: start.line }\n }\n\n return { end, start }\n }\n\n raw(prop, defaultType) {\n let str = new Stringifier()\n return str.raw(this, prop, defaultType)\n }\n\n remove() {\n if (this.parent) {\n this.parent.removeChild(this)\n }\n this.parent = undefined\n return this\n }\n\n replaceWith(...nodes) {\n if (this.parent) {\n let bookmark = this\n let foundSelf = false\n for (let node of nodes) {\n if (node === this) {\n foundSelf = true\n } else if (foundSelf) {\n this.parent.insertAfter(bookmark, node)\n bookmark = node\n } else {\n this.parent.insertBefore(bookmark, node)\n }\n }\n\n if (!foundSelf) {\n this.remove()\n }\n }\n\n return this\n }\n\n root() {\n let result = this\n while (result.parent && result.parent.type !== 'document') {\n result = result.parent\n }\n return result\n }\n\n toJSON(_, inputs) {\n let fixed = {}\n let emitInputs = inputs == null\n inputs = inputs || new Map()\n let inputsNextIndex = 0\n\n for (let name in this) {\n if (!Object.prototype.hasOwnProperty.call(this, name)) {\n /* c8 ignore next 2 */\n continue\n }\n if (name === 'parent' || name === 'proxyCache') continue\n let value = this[name]\n\n if (Array.isArray(value)) {\n fixed[name] = value.map(i => {\n if (typeof i === 'object' && i.toJSON) {\n return i.toJSON(null, inputs)\n } else {\n return i\n }\n })\n } else if (typeof value === 'object' && value.toJSON) {\n fixed[name] = value.toJSON(null, inputs)\n } else if (name === 'source') {\n let inputId = inputs.get(value.input)\n if (inputId == null) {\n inputId = inputsNextIndex\n inputs.set(value.input, inputsNextIndex)\n inputsNextIndex++\n }\n fixed[name] = {\n end: value.end,\n inputId,\n start: value.start\n }\n } else {\n fixed[name] = value\n }\n }\n\n if (emitInputs) {\n fixed.inputs = [...inputs.keys()].map(input => input.toJSON())\n }\n\n return fixed\n }\n\n toProxy() {\n if (!this.proxyCache) {\n this.proxyCache = new Proxy(this, this.getProxyProcessor())\n }\n return this.proxyCache\n }\n\n toString(stringifier = stringify) {\n if (stringifier.stringify) stringifier = stringifier.stringify\n let result = ''\n stringifier(this, i => {\n result += i\n })\n return result\n }\n\n warn(result, text, opts) {\n let data = { node: this }\n for (let i in opts) data[i] = opts[i]\n return result.warn(text, data)\n }\n\n get proxyOf() {\n return this\n }\n}\n\nmodule.exports = Node\nNode.default = Node\n","'use strict'\n\nlet Node = require('./node')\n\nclass Declaration extends Node {\n constructor(defaults) {\n if (\n defaults &&\n typeof defaults.value !== 'undefined' &&\n typeof defaults.value !== 'string'\n ) {\n defaults = { ...defaults, value: String(defaults.value) }\n }\n super(defaults)\n this.type = 'decl'\n }\n\n get variable() {\n return this.prop.startsWith('--') || this.prop[0] === '$'\n }\n}\n\nmodule.exports = Declaration\nDeclaration.default = Declaration\n","let urlAlphabet =\n 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'\nlet customAlphabet = (alphabet, defaultSize = 21) => {\n return (size = defaultSize) => {\n let id = ''\n let i = size\n while (i--) {\n id += alphabet[(Math.random() * alphabet.length) | 0]\n }\n return id\n }\n}\nlet nanoid = (size = 21) => {\n let id = ''\n let i = size\n while (i--) {\n id += urlAlphabet[(Math.random() * 64) | 0]\n }\n return id\n}\nmodule.exports = { nanoid, customAlphabet }\n","'use strict'\n\nlet { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')\nlet { existsSync, readFileSync } = require('fs')\nlet { dirname, join } = require('path')\n\nfunction fromBase64(str) {\n if (Buffer) {\n return Buffer.from(str, 'base64').toString()\n } else {\n /* c8 ignore next 2 */\n return window.atob(str)\n }\n}\n\nclass PreviousMap {\n constructor(css, opts) {\n if (opts.map === false) return\n this.loadAnnotation(css)\n this.inline = this.startWith(this.annotation, 'data:')\n\n let prev = opts.map ? opts.map.prev : undefined\n let text = this.loadMap(opts.from, prev)\n if (!this.mapFile && opts.from) {\n this.mapFile = opts.from\n }\n if (this.mapFile) this.root = dirname(this.mapFile)\n if (text) this.text = text\n }\n\n consumer() {\n if (!this.consumerCache) {\n this.consumerCache = new SourceMapConsumer(this.text)\n }\n return this.consumerCache\n }\n\n decodeInline(text) {\n let baseCharsetUri = /^data:application\\/json;charset=utf-?8;base64,/\n let baseUri = /^data:application\\/json;base64,/\n let charsetUri = /^data:application\\/json;charset=utf-?8,/\n let uri = /^data:application\\/json,/\n\n if (charsetUri.test(text) || uri.test(text)) {\n return decodeURIComponent(text.substr(RegExp.lastMatch.length))\n }\n\n if (baseCharsetUri.test(text) || baseUri.test(text)) {\n return fromBase64(text.substr(RegExp.lastMatch.length))\n }\n\n let encoding = text.match(/data:application\\/json;([^,]+),/)[1]\n throw new Error('Unsupported source map encoding ' + encoding)\n }\n\n getAnnotationURL(sourceMapString) {\n return sourceMapString.replace(/^\\/\\*\\s*# sourceMappingURL=/, '').trim()\n }\n\n isMap(map) {\n if (typeof map !== 'object') return false\n return (\n typeof map.mappings === 'string' ||\n typeof map._mappings === 'string' ||\n Array.isArray(map.sections)\n )\n }\n\n loadAnnotation(css) {\n let comments = css.match(/\\/\\*\\s*# sourceMappingURL=/gm)\n if (!comments) return\n\n // sourceMappingURLs from comments, strings, etc.\n let start = css.lastIndexOf(comments.pop())\n let end = css.indexOf('*/', start)\n\n if (start > -1 && end > -1) {\n // Locate the last sourceMappingURL to avoid pickin\n this.annotation = this.getAnnotationURL(css.substring(start, end))\n }\n }\n\n loadFile(path) {\n this.root = dirname(path)\n if (existsSync(path)) {\n this.mapFile = path\n return readFileSync(path, 'utf-8').toString().trim()\n }\n }\n\n loadMap(file, prev) {\n if (prev === false) return false\n\n if (prev) {\n if (typeof prev === 'string') {\n return prev\n } else if (typeof prev === 'function') {\n let prevPath = prev(file)\n if (prevPath) {\n let map = this.loadFile(prevPath)\n if (!map) {\n throw new Error(\n 'Unable to load previous source map: ' + prevPath.toString()\n )\n }\n return map\n }\n } else if (prev instanceof SourceMapConsumer) {\n return SourceMapGenerator.fromSourceMap(prev).toString()\n } else if (prev instanceof SourceMapGenerator) {\n return prev.toString()\n } else if (this.isMap(prev)) {\n return JSON.stringify(prev)\n } else {\n throw new Error(\n 'Unsupported previous source map format: ' + prev.toString()\n )\n }\n } else if (this.inline) {\n return this.decodeInline(this.annotation)\n } else if (this.annotation) {\n let map = this.annotation\n if (file) map = join(dirname(file), map)\n return this.loadFile(map)\n }\n }\n\n startWith(string, start) {\n if (!string) return false\n return string.substr(0, start.length) === start\n }\n\n withContent() {\n return !!(\n this.consumer().sourcesContent &&\n this.consumer().sourcesContent.length > 0\n )\n }\n}\n\nmodule.exports = PreviousMap\nPreviousMap.default = PreviousMap\n","'use strict'\n\nlet { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')\nlet { fileURLToPath, pathToFileURL } = require('url')\nlet { isAbsolute, resolve } = require('path')\nlet { nanoid } = require('nanoid/non-secure')\n\nlet terminalHighlight = require('./terminal-highlight')\nlet CssSyntaxError = require('./css-syntax-error')\nlet PreviousMap = require('./previous-map')\n\nlet fromOffsetCache = Symbol('fromOffsetCache')\n\nlet sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator)\nlet pathAvailable = Boolean(resolve && isAbsolute)\n\nclass Input {\n constructor(css, opts = {}) {\n if (\n css === null ||\n typeof css === 'undefined' ||\n (typeof css === 'object' && !css.toString)\n ) {\n throw new Error(`PostCSS received ${css} instead of CSS string`)\n }\n\n this.css = css.toString()\n\n if (this.css[0] === '\\uFEFF' || this.css[0] === '\\uFFFE') {\n this.hasBOM = true\n this.css = this.css.slice(1)\n } else {\n this.hasBOM = false\n }\n\n if (opts.from) {\n if (\n !pathAvailable ||\n /^\\w+:\\/\\//.test(opts.from) ||\n isAbsolute(opts.from)\n ) {\n this.file = opts.from\n } else {\n this.file = resolve(opts.from)\n }\n }\n\n if (pathAvailable && sourceMapAvailable) {\n let map = new PreviousMap(this.css, opts)\n if (map.text) {\n this.map = map\n let file = map.consumer().file\n if (!this.file && file) this.file = this.mapResolve(file)\n }\n }\n\n if (!this.file) {\n this.id = ''\n }\n if (this.map) this.map.file = this.from\n }\n\n error(message, line, column, opts = {}) {\n let result, endLine, endColumn\n\n if (line && typeof line === 'object') {\n let start = line\n let end = column\n if (typeof start.offset === 'number') {\n let pos = this.fromOffset(start.offset)\n line = pos.line\n column = pos.col\n } else {\n line = start.line\n column = start.column\n }\n if (typeof end.offset === 'number') {\n let pos = this.fromOffset(end.offset)\n endLine = pos.line\n endColumn = pos.col\n } else {\n endLine = end.line\n endColumn = end.column\n }\n } else if (!column) {\n let pos = this.fromOffset(line)\n line = pos.line\n column = pos.col\n }\n\n let origin = this.origin(line, column, endLine, endColumn)\n if (origin) {\n result = new CssSyntaxError(\n message,\n origin.endLine === undefined\n ? origin.line\n : { column: origin.column, line: origin.line },\n origin.endLine === undefined\n ? origin.column\n : { column: origin.endColumn, line: origin.endLine },\n origin.source,\n origin.file,\n opts.plugin\n )\n } else {\n result = new CssSyntaxError(\n message,\n endLine === undefined ? line : { column, line },\n endLine === undefined ? column : { column: endColumn, line: endLine },\n this.css,\n this.file,\n opts.plugin\n )\n }\n\n result.input = { column, endColumn, endLine, line, source: this.css }\n if (this.file) {\n if (pathToFileURL) {\n result.input.url = pathToFileURL(this.file).toString()\n }\n result.input.file = this.file\n }\n\n return result\n }\n\n fromOffset(offset) {\n let lastLine, lineToIndex\n if (!this[fromOffsetCache]) {\n let lines = this.css.split('\\n')\n lineToIndex = new Array(lines.length)\n let prevIndex = 0\n\n for (let i = 0, l = lines.length; i < l; i++) {\n lineToIndex[i] = prevIndex\n prevIndex += lines[i].length + 1\n }\n\n this[fromOffsetCache] = lineToIndex\n } else {\n lineToIndex = this[fromOffsetCache]\n }\n lastLine = lineToIndex[lineToIndex.length - 1]\n\n let min = 0\n if (offset >= lastLine) {\n min = lineToIndex.length - 1\n } else {\n let max = lineToIndex.length - 2\n let mid\n while (min < max) {\n mid = min + ((max - min) >> 1)\n if (offset < lineToIndex[mid]) {\n max = mid - 1\n } else if (offset >= lineToIndex[mid + 1]) {\n min = mid + 1\n } else {\n min = mid\n break\n }\n }\n }\n return {\n col: offset - lineToIndex[min] + 1,\n line: min + 1\n }\n }\n\n mapResolve(file) {\n if (/^\\w+:\\/\\//.test(file)) {\n return file\n }\n return resolve(this.map.consumer().sourceRoot || this.map.root || '.', file)\n }\n\n origin(line, column, endLine, endColumn) {\n if (!this.map) return false\n let consumer = this.map.consumer()\n\n let from = consumer.originalPositionFor({ column, line })\n if (!from.source) return false\n\n let to\n if (typeof endLine === 'number') {\n to = consumer.originalPositionFor({ column: endColumn, line: endLine })\n }\n\n let fromUrl\n\n if (isAbsolute(from.source)) {\n fromUrl = pathToFileURL(from.source)\n } else {\n fromUrl = new URL(\n from.source,\n this.map.consumer().sourceRoot || pathToFileURL(this.map.mapFile)\n )\n }\n\n let result = {\n column: from.column,\n endColumn: to && to.column,\n endLine: to && to.line,\n line: from.line,\n url: fromUrl.toString()\n }\n\n if (fromUrl.protocol === 'file:') {\n if (fileURLToPath) {\n result.file = fileURLToPath(fromUrl)\n } else {\n /* c8 ignore next 2 */\n throw new Error(`file: protocol is not available in this PostCSS build`)\n }\n }\n\n let source = consumer.sourceContentFor(from.source)\n if (source) result.source = source\n\n return result\n }\n\n toJSON() {\n let json = {}\n for (let name of ['hasBOM', 'css', 'file', 'id']) {\n if (this[name] != null) {\n json[name] = this[name]\n }\n }\n if (this.map) {\n json.map = { ...this.map }\n if (json.map.consumerCache) {\n json.map.consumerCache = undefined\n }\n }\n return json\n }\n\n get from() {\n return this.file || this.id\n }\n}\n\nmodule.exports = Input\nInput.default = Input\n\nif (terminalHighlight && terminalHighlight.registerInput) {\n terminalHighlight.registerInput(Input)\n}\n","'use strict'\n\nlet { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')\nlet { dirname, relative, resolve, sep } = require('path')\nlet { pathToFileURL } = require('url')\n\nlet Input = require('./input')\n\nlet sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator)\nlet pathAvailable = Boolean(dirname && resolve && relative && sep)\n\nclass MapGenerator {\n constructor(stringify, root, opts, cssString) {\n this.stringify = stringify\n this.mapOpts = opts.map || {}\n this.root = root\n this.opts = opts\n this.css = cssString\n this.originalCSS = cssString\n this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute\n\n this.memoizedFileURLs = new Map()\n this.memoizedPaths = new Map()\n this.memoizedURLs = new Map()\n }\n\n addAnnotation() {\n let content\n\n if (this.isInline()) {\n content =\n 'data:application/json;base64,' + this.toBase64(this.map.toString())\n } else if (typeof this.mapOpts.annotation === 'string') {\n content = this.mapOpts.annotation\n } else if (typeof this.mapOpts.annotation === 'function') {\n content = this.mapOpts.annotation(this.opts.to, this.root)\n } else {\n content = this.outputFile() + '.map'\n }\n let eol = '\\n'\n if (this.css.includes('\\r\\n')) eol = '\\r\\n'\n\n this.css += eol + '/*# sourceMappingURL=' + content + ' */'\n }\n\n applyPrevMaps() {\n for (let prev of this.previous()) {\n let from = this.toUrl(this.path(prev.file))\n let root = prev.root || dirname(prev.file)\n let map\n\n if (this.mapOpts.sourcesContent === false) {\n map = new SourceMapConsumer(prev.text)\n if (map.sourcesContent) {\n map.sourcesContent = null\n }\n } else {\n map = prev.consumer()\n }\n\n this.map.applySourceMap(map, from, this.toUrl(this.path(root)))\n }\n }\n\n clearAnnotation() {\n if (this.mapOpts.annotation === false) return\n\n if (this.root) {\n let node\n for (let i = this.root.nodes.length - 1; i >= 0; i--) {\n node = this.root.nodes[i]\n if (node.type !== 'comment') continue\n if (node.text.indexOf('# sourceMappingURL=') === 0) {\n this.root.removeChild(i)\n }\n }\n } else if (this.css) {\n this.css = this.css.replace(/\\n*?\\/\\*#[\\S\\s]*?\\*\\/$/gm, '')\n }\n }\n\n generate() {\n this.clearAnnotation()\n if (pathAvailable && sourceMapAvailable && this.isMap()) {\n return this.generateMap()\n } else {\n let result = ''\n this.stringify(this.root, i => {\n result += i\n })\n return [result]\n }\n }\n\n generateMap() {\n if (this.root) {\n this.generateString()\n } else if (this.previous().length === 1) {\n let prev = this.previous()[0].consumer()\n prev.file = this.outputFile()\n this.map = SourceMapGenerator.fromSourceMap(prev)\n } else {\n this.map = new SourceMapGenerator({ file: this.outputFile() })\n this.map.addMapping({\n generated: { column: 0, line: 1 },\n original: { column: 0, line: 1 },\n source: this.opts.from\n ? this.toUrl(this.path(this.opts.from))\n : ''\n })\n }\n\n if (this.isSourcesContent()) this.setSourcesContent()\n if (this.root && this.previous().length > 0) this.applyPrevMaps()\n if (this.isAnnotation()) this.addAnnotation()\n\n if (this.isInline()) {\n return [this.css]\n } else {\n return [this.css, this.map]\n }\n }\n\n generateString() {\n this.css = ''\n this.map = new SourceMapGenerator({ file: this.outputFile() })\n\n let line = 1\n let column = 1\n\n let noSource = ''\n let mapping = {\n generated: { column: 0, line: 0 },\n original: { column: 0, line: 0 },\n source: ''\n }\n\n let lines, last\n this.stringify(this.root, (str, node, type) => {\n this.css += str\n\n if (node && type !== 'end') {\n mapping.generated.line = line\n mapping.generated.column = column - 1\n if (node.source && node.source.start) {\n mapping.source = this.sourcePath(node)\n mapping.original.line = node.source.start.line\n mapping.original.column = node.source.start.column - 1\n this.map.addMapping(mapping)\n } else {\n mapping.source = noSource\n mapping.original.line = 1\n mapping.original.column = 0\n this.map.addMapping(mapping)\n }\n }\n\n lines = str.match(/\\n/g)\n if (lines) {\n line += lines.length\n last = str.lastIndexOf('\\n')\n column = str.length - last\n } else {\n column += str.length\n }\n\n if (node && type !== 'start') {\n let p = node.parent || { raws: {} }\n let childless =\n node.type === 'decl' || (node.type === 'atrule' && !node.nodes)\n if (!childless || node !== p.last || p.raws.semicolon) {\n if (node.source && node.source.end) {\n mapping.source = this.sourcePath(node)\n mapping.original.line = node.source.end.line\n mapping.original.column = node.source.end.column - 1\n mapping.generated.line = line\n mapping.generated.column = column - 2\n this.map.addMapping(mapping)\n } else {\n mapping.source = noSource\n mapping.original.line = 1\n mapping.original.column = 0\n mapping.generated.line = line\n mapping.generated.column = column - 1\n this.map.addMapping(mapping)\n }\n }\n }\n })\n }\n\n isAnnotation() {\n if (this.isInline()) {\n return true\n }\n if (typeof this.mapOpts.annotation !== 'undefined') {\n return this.mapOpts.annotation\n }\n if (this.previous().length) {\n return this.previous().some(i => i.annotation)\n }\n return true\n }\n\n isInline() {\n if (typeof this.mapOpts.inline !== 'undefined') {\n return this.mapOpts.inline\n }\n\n let annotation = this.mapOpts.annotation\n if (typeof annotation !== 'undefined' && annotation !== true) {\n return false\n }\n\n if (this.previous().length) {\n return this.previous().some(i => i.inline)\n }\n return true\n }\n\n isMap() {\n if (typeof this.opts.map !== 'undefined') {\n return !!this.opts.map\n }\n return this.previous().length > 0\n }\n\n isSourcesContent() {\n if (typeof this.mapOpts.sourcesContent !== 'undefined') {\n return this.mapOpts.sourcesContent\n }\n if (this.previous().length) {\n return this.previous().some(i => i.withContent())\n }\n return true\n }\n\n outputFile() {\n if (this.opts.to) {\n return this.path(this.opts.to)\n } else if (this.opts.from) {\n return this.path(this.opts.from)\n } else {\n return 'to.css'\n }\n }\n\n path(file) {\n if (this.mapOpts.absolute) return file\n if (file.charCodeAt(0) === 60 /* `<` */) return file\n if (/^\\w+:\\/\\//.test(file)) return file\n let cached = this.memoizedPaths.get(file)\n if (cached) return cached\n\n let from = this.opts.to ? dirname(this.opts.to) : '.'\n\n if (typeof this.mapOpts.annotation === 'string') {\n from = dirname(resolve(from, this.mapOpts.annotation))\n }\n\n let path = relative(from, file)\n this.memoizedPaths.set(file, path)\n\n return path\n }\n\n previous() {\n if (!this.previousMaps) {\n this.previousMaps = []\n if (this.root) {\n this.root.walk(node => {\n if (node.source && node.source.input.map) {\n let map = node.source.input.map\n if (!this.previousMaps.includes(map)) {\n this.previousMaps.push(map)\n }\n }\n })\n } else {\n let input = new Input(this.originalCSS, this.opts)\n if (input.map) this.previousMaps.push(input.map)\n }\n }\n\n return this.previousMaps\n }\n\n setSourcesContent() {\n let already = {}\n if (this.root) {\n this.root.walk(node => {\n if (node.source) {\n let from = node.source.input.from\n if (from && !already[from]) {\n already[from] = true\n let fromUrl = this.usesFileUrls\n ? this.toFileUrl(from)\n : this.toUrl(this.path(from))\n this.map.setSourceContent(fromUrl, node.source.input.css)\n }\n }\n })\n } else if (this.css) {\n let from = this.opts.from\n ? this.toUrl(this.path(this.opts.from))\n : ''\n this.map.setSourceContent(from, this.css)\n }\n }\n\n sourcePath(node) {\n if (this.mapOpts.from) {\n return this.toUrl(this.mapOpts.from)\n } else if (this.usesFileUrls) {\n return this.toFileUrl(node.source.input.from)\n } else {\n return this.toUrl(this.path(node.source.input.from))\n }\n }\n\n toBase64(str) {\n if (Buffer) {\n return Buffer.from(str).toString('base64')\n } else {\n return window.btoa(unescape(encodeURIComponent(str)))\n }\n }\n\n toFileUrl(path) {\n let cached = this.memoizedFileURLs.get(path)\n if (cached) return cached\n\n if (pathToFileURL) {\n let fileURL = pathToFileURL(path).toString()\n this.memoizedFileURLs.set(path, fileURL)\n\n return fileURL\n } else {\n throw new Error(\n '`map.absolute` option is not available in this PostCSS build'\n )\n }\n }\n\n toUrl(path) {\n let cached = this.memoizedURLs.get(path)\n if (cached) return cached\n\n if (sep === '\\\\') {\n path = path.replace(/\\\\/g, '/')\n }\n\n let url = encodeURI(path).replace(/[#?]/g, encodeURIComponent)\n this.memoizedURLs.set(path, url)\n\n return url\n }\n}\n\nmodule.exports = MapGenerator\n","'use strict'\n\nlet Node = require('./node')\n\nclass Comment extends Node {\n constructor(defaults) {\n super(defaults)\n this.type = 'comment'\n }\n}\n\nmodule.exports = Comment\nComment.default = Comment\n","'use strict'\n\nlet { isClean, my } = require('./symbols')\nlet Declaration = require('./declaration')\nlet Comment = require('./comment')\nlet Node = require('./node')\n\nlet parse, Rule, AtRule, Root\n\nfunction cleanSource(nodes) {\n return nodes.map(i => {\n if (i.nodes) i.nodes = cleanSource(i.nodes)\n delete i.source\n return i\n })\n}\n\nfunction markDirtyUp(node) {\n node[isClean] = false\n if (node.proxyOf.nodes) {\n for (let i of node.proxyOf.nodes) {\n markDirtyUp(i)\n }\n }\n}\n\nclass Container extends Node {\n append(...children) {\n for (let child of children) {\n let nodes = this.normalize(child, this.last)\n for (let node of nodes) this.proxyOf.nodes.push(node)\n }\n\n this.markDirty()\n\n return this\n }\n\n cleanRaws(keepBetween) {\n super.cleanRaws(keepBetween)\n if (this.nodes) {\n for (let node of this.nodes) node.cleanRaws(keepBetween)\n }\n }\n\n each(callback) {\n if (!this.proxyOf.nodes) return undefined\n let iterator = this.getIterator()\n\n let index, result\n while (this.indexes[iterator] < this.proxyOf.nodes.length) {\n index = this.indexes[iterator]\n result = callback(this.proxyOf.nodes[index], index)\n if (result === false) break\n\n this.indexes[iterator] += 1\n }\n\n delete this.indexes[iterator]\n return result\n }\n\n every(condition) {\n return this.nodes.every(condition)\n }\n\n getIterator() {\n if (!this.lastEach) this.lastEach = 0\n if (!this.indexes) this.indexes = {}\n\n this.lastEach += 1\n let iterator = this.lastEach\n this.indexes[iterator] = 0\n\n return iterator\n }\n\n getProxyProcessor() {\n return {\n get(node, prop) {\n if (prop === 'proxyOf') {\n return node\n } else if (!node[prop]) {\n return node[prop]\n } else if (\n prop === 'each' ||\n (typeof prop === 'string' && prop.startsWith('walk'))\n ) {\n return (...args) => {\n return node[prop](\n ...args.map(i => {\n if (typeof i === 'function') {\n return (child, index) => i(child.toProxy(), index)\n } else {\n return i\n }\n })\n )\n }\n } else if (prop === 'every' || prop === 'some') {\n return cb => {\n return node[prop]((child, ...other) =>\n cb(child.toProxy(), ...other)\n )\n }\n } else if (prop === 'root') {\n return () => node.root().toProxy()\n } else if (prop === 'nodes') {\n return node.nodes.map(i => i.toProxy())\n } else if (prop === 'first' || prop === 'last') {\n return node[prop].toProxy()\n } else {\n return node[prop]\n }\n },\n\n set(node, prop, value) {\n if (node[prop] === value) return true\n node[prop] = value\n if (prop === 'name' || prop === 'params' || prop === 'selector') {\n node.markDirty()\n }\n return true\n }\n }\n }\n\n index(child) {\n if (typeof child === 'number') return child\n if (child.proxyOf) child = child.proxyOf\n return this.proxyOf.nodes.indexOf(child)\n }\n\n insertAfter(exist, add) {\n let existIndex = this.index(exist)\n let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse()\n existIndex = this.index(exist)\n for (let node of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node)\n\n let index\n for (let id in this.indexes) {\n index = this.indexes[id]\n if (existIndex < index) {\n this.indexes[id] = index + nodes.length\n }\n }\n\n this.markDirty()\n\n return this\n }\n\n insertBefore(exist, add) {\n let existIndex = this.index(exist)\n let type = existIndex === 0 ? 'prepend' : false\n let nodes = this.normalize(add, this.proxyOf.nodes[existIndex], type).reverse()\n existIndex = this.index(exist)\n for (let node of nodes) this.proxyOf.nodes.splice(existIndex, 0, node)\n\n let index\n for (let id in this.indexes) {\n index = this.indexes[id]\n if (existIndex <= index) {\n this.indexes[id] = index + nodes.length\n }\n }\n\n this.markDirty()\n\n return this\n }\n\n normalize(nodes, sample) {\n if (typeof nodes === 'string') {\n nodes = cleanSource(parse(nodes).nodes)\n } else if (Array.isArray(nodes)) {\n nodes = nodes.slice(0)\n for (let i of nodes) {\n if (i.parent) i.parent.removeChild(i, 'ignore')\n }\n } else if (nodes.type === 'root' && this.type !== 'document') {\n nodes = nodes.nodes.slice(0)\n for (let i of nodes) {\n if (i.parent) i.parent.removeChild(i, 'ignore')\n }\n } else if (nodes.type) {\n nodes = [nodes]\n } else if (nodes.prop) {\n if (typeof nodes.value === 'undefined') {\n throw new Error('Value field is missed in node creation')\n } else if (typeof nodes.value !== 'string') {\n nodes.value = String(nodes.value)\n }\n nodes = [new Declaration(nodes)]\n } else if (nodes.selector) {\n nodes = [new Rule(nodes)]\n } else if (nodes.name) {\n nodes = [new AtRule(nodes)]\n } else if (nodes.text) {\n nodes = [new Comment(nodes)]\n } else {\n throw new Error('Unknown node type in node creation')\n }\n\n let processed = nodes.map(i => {\n /* c8 ignore next */\n if (!i[my]) Container.rebuild(i)\n i = i.proxyOf\n if (i.parent) i.parent.removeChild(i)\n if (i[isClean]) markDirtyUp(i)\n if (typeof i.raws.before === 'undefined') {\n if (sample && typeof sample.raws.before !== 'undefined') {\n i.raws.before = sample.raws.before.replace(/\\S/g, '')\n }\n }\n i.parent = this.proxyOf\n return i\n })\n\n return processed\n }\n\n prepend(...children) {\n children = children.reverse()\n for (let child of children) {\n let nodes = this.normalize(child, this.first, 'prepend').reverse()\n for (let node of nodes) this.proxyOf.nodes.unshift(node)\n for (let id in this.indexes) {\n this.indexes[id] = this.indexes[id] + nodes.length\n }\n }\n\n this.markDirty()\n\n return this\n }\n\n push(child) {\n child.parent = this\n this.proxyOf.nodes.push(child)\n return this\n }\n\n removeAll() {\n for (let node of this.proxyOf.nodes) node.parent = undefined\n this.proxyOf.nodes = []\n\n this.markDirty()\n\n return this\n }\n\n removeChild(child) {\n child = this.index(child)\n this.proxyOf.nodes[child].parent = undefined\n this.proxyOf.nodes.splice(child, 1)\n\n let index\n for (let id in this.indexes) {\n index = this.indexes[id]\n if (index >= child) {\n this.indexes[id] = index - 1\n }\n }\n\n this.markDirty()\n\n return this\n }\n\n replaceValues(pattern, opts, callback) {\n if (!callback) {\n callback = opts\n opts = {}\n }\n\n this.walkDecls(decl => {\n if (opts.props && !opts.props.includes(decl.prop)) return\n if (opts.fast && !decl.value.includes(opts.fast)) return\n\n decl.value = decl.value.replace(pattern, callback)\n })\n\n this.markDirty()\n\n return this\n }\n\n some(condition) {\n return this.nodes.some(condition)\n }\n\n walk(callback) {\n return this.each((child, i) => {\n let result\n try {\n result = callback(child, i)\n } catch (e) {\n throw child.addToError(e)\n }\n if (result !== false && child.walk) {\n result = child.walk(callback)\n }\n\n return result\n })\n }\n\n walkAtRules(name, callback) {\n if (!callback) {\n callback = name\n return this.walk((child, i) => {\n if (child.type === 'atrule') {\n return callback(child, i)\n }\n })\n }\n if (name instanceof RegExp) {\n return this.walk((child, i) => {\n if (child.type === 'atrule' && name.test(child.name)) {\n return callback(child, i)\n }\n })\n }\n return this.walk((child, i) => {\n if (child.type === 'atrule' && child.name === name) {\n return callback(child, i)\n }\n })\n }\n\n walkComments(callback) {\n return this.walk((child, i) => {\n if (child.type === 'comment') {\n return callback(child, i)\n }\n })\n }\n\n walkDecls(prop, callback) {\n if (!callback) {\n callback = prop\n return this.walk((child, i) => {\n if (child.type === 'decl') {\n return callback(child, i)\n }\n })\n }\n if (prop instanceof RegExp) {\n return this.walk((child, i) => {\n if (child.type === 'decl' && prop.test(child.prop)) {\n return callback(child, i)\n }\n })\n }\n return this.walk((child, i) => {\n if (child.type === 'decl' && child.prop === prop) {\n return callback(child, i)\n }\n })\n }\n\n walkRules(selector, callback) {\n if (!callback) {\n callback = selector\n\n return this.walk((child, i) => {\n if (child.type === 'rule') {\n return callback(child, i)\n }\n })\n }\n if (selector instanceof RegExp) {\n return this.walk((child, i) => {\n if (child.type === 'rule' && selector.test(child.selector)) {\n return callback(child, i)\n }\n })\n }\n return this.walk((child, i) => {\n if (child.type === 'rule' && child.selector === selector) {\n return callback(child, i)\n }\n })\n }\n\n get first() {\n if (!this.proxyOf.nodes) return undefined\n return this.proxyOf.nodes[0]\n }\n\n get last() {\n if (!this.proxyOf.nodes) return undefined\n return this.proxyOf.nodes[this.proxyOf.nodes.length - 1]\n }\n}\n\nContainer.registerParse = dependant => {\n parse = dependant\n}\n\nContainer.registerRule = dependant => {\n Rule = dependant\n}\n\nContainer.registerAtRule = dependant => {\n AtRule = dependant\n}\n\nContainer.registerRoot = dependant => {\n Root = dependant\n}\n\nmodule.exports = Container\nContainer.default = Container\n\n/* c8 ignore start */\nContainer.rebuild = node => {\n if (node.type === 'atrule') {\n Object.setPrototypeOf(node, AtRule.prototype)\n } else if (node.type === 'rule') {\n Object.setPrototypeOf(node, Rule.prototype)\n } else if (node.type === 'decl') {\n Object.setPrototypeOf(node, Declaration.prototype)\n } else if (node.type === 'comment') {\n Object.setPrototypeOf(node, Comment.prototype)\n } else if (node.type === 'root') {\n Object.setPrototypeOf(node, Root.prototype)\n }\n\n node[my] = true\n\n if (node.nodes) {\n node.nodes.forEach(child => {\n Container.rebuild(child)\n })\n }\n}\n/* c8 ignore stop */\n","'use strict'\n\nlet Container = require('./container')\n\nlet LazyResult, Processor\n\nclass Document extends Container {\n constructor(defaults) {\n // type needs to be passed to super, otherwise child roots won't be normalized correctly\n super({ type: 'document', ...defaults })\n\n if (!this.nodes) {\n this.nodes = []\n }\n }\n\n toResult(opts = {}) {\n let lazy = new LazyResult(new Processor(), this, opts)\n\n return lazy.stringify()\n }\n}\n\nDocument.registerLazyResult = dependant => {\n LazyResult = dependant\n}\n\nDocument.registerProcessor = dependant => {\n Processor = dependant\n}\n\nmodule.exports = Document\nDocument.default = Document\n","/* eslint-disable no-console */\n'use strict'\n\nlet printed = {}\n\nmodule.exports = function warnOnce(message) {\n if (printed[message]) return\n printed[message] = true\n\n if (typeof console !== 'undefined' && console.warn) {\n console.warn(message)\n }\n}\n","'use strict'\n\nclass Warning {\n constructor(text, opts = {}) {\n this.type = 'warning'\n this.text = text\n\n if (opts.node && opts.node.source) {\n let range = opts.node.rangeBy(opts)\n this.line = range.start.line\n this.column = range.start.column\n this.endLine = range.end.line\n this.endColumn = range.end.column\n }\n\n for (let opt in opts) this[opt] = opts[opt]\n }\n\n toString() {\n if (this.node) {\n return this.node.error(this.text, {\n index: this.index,\n plugin: this.plugin,\n word: this.word\n }).message\n }\n\n if (this.plugin) {\n return this.plugin + ': ' + this.text\n }\n\n return this.text\n }\n}\n\nmodule.exports = Warning\nWarning.default = Warning\n","'use strict'\n\nlet Warning = require('./warning')\n\nclass Result {\n constructor(processor, root, opts) {\n this.processor = processor\n this.messages = []\n this.root = root\n this.opts = opts\n this.css = undefined\n this.map = undefined\n }\n\n toString() {\n return this.css\n }\n\n warn(text, opts = {}) {\n if (!opts.plugin) {\n if (this.lastPlugin && this.lastPlugin.postcssPlugin) {\n opts.plugin = this.lastPlugin.postcssPlugin\n }\n }\n\n let warning = new Warning(text, opts)\n this.messages.push(warning)\n\n return warning\n }\n\n warnings() {\n return this.messages.filter(i => i.type === 'warning')\n }\n\n get content() {\n return this.css\n }\n}\n\nmodule.exports = Result\nResult.default = Result\n","'use strict'\n\nconst SINGLE_QUOTE = \"'\".charCodeAt(0)\nconst DOUBLE_QUOTE = '\"'.charCodeAt(0)\nconst BACKSLASH = '\\\\'.charCodeAt(0)\nconst SLASH = '/'.charCodeAt(0)\nconst NEWLINE = '\\n'.charCodeAt(0)\nconst SPACE = ' '.charCodeAt(0)\nconst FEED = '\\f'.charCodeAt(0)\nconst TAB = '\\t'.charCodeAt(0)\nconst CR = '\\r'.charCodeAt(0)\nconst OPEN_SQUARE = '['.charCodeAt(0)\nconst CLOSE_SQUARE = ']'.charCodeAt(0)\nconst OPEN_PARENTHESES = '('.charCodeAt(0)\nconst CLOSE_PARENTHESES = ')'.charCodeAt(0)\nconst OPEN_CURLY = '{'.charCodeAt(0)\nconst CLOSE_CURLY = '}'.charCodeAt(0)\nconst SEMICOLON = ';'.charCodeAt(0)\nconst ASTERISK = '*'.charCodeAt(0)\nconst COLON = ':'.charCodeAt(0)\nconst AT = '@'.charCodeAt(0)\n\nconst RE_AT_END = /[\\t\\n\\f\\r \"#'()/;[\\\\\\]{}]/g\nconst RE_WORD_END = /[\\t\\n\\f\\r !\"#'():;@[\\\\\\]{}]|\\/(?=\\*)/g\nconst RE_BAD_BRACKET = /.[\\r\\n\"'(/\\\\]/\nconst RE_HEX_ESCAPE = /[\\da-f]/i\n\nmodule.exports = function tokenizer(input, options = {}) {\n let css = input.css.valueOf()\n let ignore = options.ignoreErrors\n\n let code, next, quote, content, escape\n let escaped, escapePos, prev, n, currentToken\n\n let length = css.length\n let pos = 0\n let buffer = []\n let returned = []\n\n function position() {\n return pos\n }\n\n function unclosed(what) {\n throw input.error('Unclosed ' + what, pos)\n }\n\n function endOfFile() {\n return returned.length === 0 && pos >= length\n }\n\n function nextToken(opts) {\n if (returned.length) return returned.pop()\n if (pos >= length) return\n\n let ignoreUnclosed = opts ? opts.ignoreUnclosed : false\n\n code = css.charCodeAt(pos)\n\n switch (code) {\n case NEWLINE:\n case SPACE:\n case TAB:\n case CR:\n case FEED: {\n next = pos\n do {\n next += 1\n code = css.charCodeAt(next)\n } while (\n code === SPACE ||\n code === NEWLINE ||\n code === TAB ||\n code === CR ||\n code === FEED\n )\n\n currentToken = ['space', css.slice(pos, next)]\n pos = next - 1\n break\n }\n\n case OPEN_SQUARE:\n case CLOSE_SQUARE:\n case OPEN_CURLY:\n case CLOSE_CURLY:\n case COLON:\n case SEMICOLON:\n case CLOSE_PARENTHESES: {\n let controlChar = String.fromCharCode(code)\n currentToken = [controlChar, controlChar, pos]\n break\n }\n\n case OPEN_PARENTHESES: {\n prev = buffer.length ? buffer.pop()[1] : ''\n n = css.charCodeAt(pos + 1)\n if (\n prev === 'url' &&\n n !== SINGLE_QUOTE &&\n n !== DOUBLE_QUOTE &&\n n !== SPACE &&\n n !== NEWLINE &&\n n !== TAB &&\n n !== FEED &&\n n !== CR\n ) {\n next = pos\n do {\n escaped = false\n next = css.indexOf(')', next + 1)\n if (next === -1) {\n if (ignore || ignoreUnclosed) {\n next = pos\n break\n } else {\n unclosed('bracket')\n }\n }\n escapePos = next\n while (css.charCodeAt(escapePos - 1) === BACKSLASH) {\n escapePos -= 1\n escaped = !escaped\n }\n } while (escaped)\n\n currentToken = ['brackets', css.slice(pos, next + 1), pos, next]\n\n pos = next\n } else {\n next = css.indexOf(')', pos + 1)\n content = css.slice(pos, next + 1)\n\n if (next === -1 || RE_BAD_BRACKET.test(content)) {\n currentToken = ['(', '(', pos]\n } else {\n currentToken = ['brackets', content, pos, next]\n pos = next\n }\n }\n\n break\n }\n\n case SINGLE_QUOTE:\n case DOUBLE_QUOTE: {\n quote = code === SINGLE_QUOTE ? \"'\" : '\"'\n next = pos\n do {\n escaped = false\n next = css.indexOf(quote, next + 1)\n if (next === -1) {\n if (ignore || ignoreUnclosed) {\n next = pos + 1\n break\n } else {\n unclosed('string')\n }\n }\n escapePos = next\n while (css.charCodeAt(escapePos - 1) === BACKSLASH) {\n escapePos -= 1\n escaped = !escaped\n }\n } while (escaped)\n\n currentToken = ['string', css.slice(pos, next + 1), pos, next]\n pos = next\n break\n }\n\n case AT: {\n RE_AT_END.lastIndex = pos + 1\n RE_AT_END.test(css)\n if (RE_AT_END.lastIndex === 0) {\n next = css.length - 1\n } else {\n next = RE_AT_END.lastIndex - 2\n }\n\n currentToken = ['at-word', css.slice(pos, next + 1), pos, next]\n\n pos = next\n break\n }\n\n case BACKSLASH: {\n next = pos\n escape = true\n while (css.charCodeAt(next + 1) === BACKSLASH) {\n next += 1\n escape = !escape\n }\n code = css.charCodeAt(next + 1)\n if (\n escape &&\n code !== SLASH &&\n code !== SPACE &&\n code !== NEWLINE &&\n code !== TAB &&\n code !== CR &&\n code !== FEED\n ) {\n next += 1\n if (RE_HEX_ESCAPE.test(css.charAt(next))) {\n while (RE_HEX_ESCAPE.test(css.charAt(next + 1))) {\n next += 1\n }\n if (css.charCodeAt(next + 1) === SPACE) {\n next += 1\n }\n }\n }\n\n currentToken = ['word', css.slice(pos, next + 1), pos, next]\n\n pos = next\n break\n }\n\n default: {\n if (code === SLASH && css.charCodeAt(pos + 1) === ASTERISK) {\n next = css.indexOf('*/', pos + 2) + 1\n if (next === 0) {\n if (ignore || ignoreUnclosed) {\n next = css.length\n } else {\n unclosed('comment')\n }\n }\n\n currentToken = ['comment', css.slice(pos, next + 1), pos, next]\n pos = next\n } else {\n RE_WORD_END.lastIndex = pos + 1\n RE_WORD_END.test(css)\n if (RE_WORD_END.lastIndex === 0) {\n next = css.length - 1\n } else {\n next = RE_WORD_END.lastIndex - 2\n }\n\n currentToken = ['word', css.slice(pos, next + 1), pos, next]\n buffer.push(currentToken)\n pos = next\n }\n\n break\n }\n }\n\n pos++\n return currentToken\n }\n\n function back(token) {\n returned.push(token)\n }\n\n return {\n back,\n endOfFile,\n nextToken,\n position\n }\n}\n","'use strict'\n\nlet Container = require('./container')\n\nclass AtRule extends Container {\n constructor(defaults) {\n super(defaults)\n this.type = 'atrule'\n }\n\n append(...children) {\n if (!this.proxyOf.nodes) this.nodes = []\n return super.append(...children)\n }\n\n prepend(...children) {\n if (!this.proxyOf.nodes) this.nodes = []\n return super.prepend(...children)\n }\n}\n\nmodule.exports = AtRule\nAtRule.default = AtRule\n\nContainer.registerAtRule(AtRule)\n","'use strict'\n\nlet Container = require('./container')\n\nlet LazyResult, Processor\n\nclass Root extends Container {\n constructor(defaults) {\n super(defaults)\n this.type = 'root'\n if (!this.nodes) this.nodes = []\n }\n\n normalize(child, sample, type) {\n let nodes = super.normalize(child)\n\n if (sample) {\n if (type === 'prepend') {\n if (this.nodes.length > 1) {\n sample.raws.before = this.nodes[1].raws.before\n } else {\n delete sample.raws.before\n }\n } else if (this.first !== sample) {\n for (let node of nodes) {\n node.raws.before = sample.raws.before\n }\n }\n }\n\n return nodes\n }\n\n removeChild(child, ignore) {\n let index = this.index(child)\n\n if (!ignore && index === 0 && this.nodes.length > 1) {\n this.nodes[1].raws.before = this.nodes[index].raws.before\n }\n\n return super.removeChild(child)\n }\n\n toResult(opts = {}) {\n let lazy = new LazyResult(new Processor(), this, opts)\n return lazy.stringify()\n }\n}\n\nRoot.registerLazyResult = dependant => {\n LazyResult = dependant\n}\n\nRoot.registerProcessor = dependant => {\n Processor = dependant\n}\n\nmodule.exports = Root\nRoot.default = Root\n\nContainer.registerRoot(Root)\n","'use strict'\n\nlet list = {\n comma(string) {\n return list.split(string, [','], true)\n },\n\n space(string) {\n let spaces = [' ', '\\n', '\\t']\n return list.split(string, spaces)\n },\n\n split(string, separators, last) {\n let array = []\n let current = ''\n let split = false\n\n let func = 0\n let inQuote = false\n let prevQuote = ''\n let escape = false\n\n for (let letter of string) {\n if (escape) {\n escape = false\n } else if (letter === '\\\\') {\n escape = true\n } else if (inQuote) {\n if (letter === prevQuote) {\n inQuote = false\n }\n } else if (letter === '\"' || letter === \"'\") {\n inQuote = true\n prevQuote = letter\n } else if (letter === '(') {\n func += 1\n } else if (letter === ')') {\n if (func > 0) func -= 1\n } else if (func === 0) {\n if (separators.includes(letter)) split = true\n }\n\n if (split) {\n if (current !== '') array.push(current.trim())\n current = ''\n split = false\n } else {\n current += letter\n }\n }\n\n if (last || current !== '') array.push(current.trim())\n return array\n }\n}\n\nmodule.exports = list\nlist.default = list\n","'use strict'\n\nlet Container = require('./container')\nlet list = require('./list')\n\nclass Rule extends Container {\n constructor(defaults) {\n super(defaults)\n this.type = 'rule'\n if (!this.nodes) this.nodes = []\n }\n\n get selectors() {\n return list.comma(this.selector)\n }\n\n set selectors(values) {\n let match = this.selector ? this.selector.match(/,\\s*/) : null\n let sep = match ? match[0] : ',' + this.raw('between', 'beforeOpen')\n this.selector = values.join(sep)\n }\n}\n\nmodule.exports = Rule\nRule.default = Rule\n\nContainer.registerRule(Rule)\n","'use strict'\n\nlet Declaration = require('./declaration')\nlet tokenizer = require('./tokenize')\nlet Comment = require('./comment')\nlet AtRule = require('./at-rule')\nlet Root = require('./root')\nlet Rule = require('./rule')\n\nconst SAFE_COMMENT_NEIGHBOR = {\n empty: true,\n space: true\n}\n\nfunction findLastWithPosition(tokens) {\n for (let i = tokens.length - 1; i >= 0; i--) {\n let token = tokens[i]\n let pos = token[3] || token[2]\n if (pos) return pos\n }\n}\n\nclass Parser {\n constructor(input) {\n this.input = input\n\n this.root = new Root()\n this.current = this.root\n this.spaces = ''\n this.semicolon = false\n\n this.createTokenizer()\n this.root.source = { input, start: { column: 1, line: 1, offset: 0 } }\n }\n\n atrule(token) {\n let node = new AtRule()\n node.name = token[1].slice(1)\n if (node.name === '') {\n this.unnamedAtrule(node, token)\n }\n this.init(node, token[2])\n\n let type\n let prev\n let shift\n let last = false\n let open = false\n let params = []\n let brackets = []\n\n while (!this.tokenizer.endOfFile()) {\n token = this.tokenizer.nextToken()\n type = token[0]\n\n if (type === '(' || type === '[') {\n brackets.push(type === '(' ? ')' : ']')\n } else if (type === '{' && brackets.length > 0) {\n brackets.push('}')\n } else if (type === brackets[brackets.length - 1]) {\n brackets.pop()\n }\n\n if (brackets.length === 0) {\n if (type === ';') {\n node.source.end = this.getPosition(token[2])\n node.source.end.offset++\n this.semicolon = true\n break\n } else if (type === '{') {\n open = true\n break\n } else if (type === '}') {\n if (params.length > 0) {\n shift = params.length - 1\n prev = params[shift]\n while (prev && prev[0] === 'space') {\n prev = params[--shift]\n }\n if (prev) {\n node.source.end = this.getPosition(prev[3] || prev[2])\n node.source.end.offset++\n }\n }\n this.end(token)\n break\n } else {\n params.push(token)\n }\n } else {\n params.push(token)\n }\n\n if (this.tokenizer.endOfFile()) {\n last = true\n break\n }\n }\n\n node.raws.between = this.spacesAndCommentsFromEnd(params)\n if (params.length) {\n node.raws.afterName = this.spacesAndCommentsFromStart(params)\n this.raw(node, 'params', params)\n if (last) {\n token = params[params.length - 1]\n node.source.end = this.getPosition(token[3] || token[2])\n node.source.end.offset++\n this.spaces = node.raws.between\n node.raws.between = ''\n }\n } else {\n node.raws.afterName = ''\n node.params = ''\n }\n\n if (open) {\n node.nodes = []\n this.current = node\n }\n }\n\n checkMissedSemicolon(tokens) {\n let colon = this.colon(tokens)\n if (colon === false) return\n\n let founded = 0\n let token\n for (let j = colon - 1; j >= 0; j--) {\n token = tokens[j]\n if (token[0] !== 'space') {\n founded += 1\n if (founded === 2) break\n }\n }\n // If the token is a word, e.g. `!important`, `red` or any other valid property's value.\n // Then we need to return the colon after that word token. [3] is the \"end\" colon of that word.\n // And because we need it after that one we do +1 to get the next one.\n throw this.input.error(\n 'Missed semicolon',\n token[0] === 'word' ? token[3] + 1 : token[2]\n )\n }\n\n colon(tokens) {\n let brackets = 0\n let token, type, prev\n for (let [i, element] of tokens.entries()) {\n token = element\n type = token[0]\n\n if (type === '(') {\n brackets += 1\n }\n if (type === ')') {\n brackets -= 1\n }\n if (brackets === 0 && type === ':') {\n if (!prev) {\n this.doubleColon(token)\n } else if (prev[0] === 'word' && prev[1] === 'progid') {\n continue\n } else {\n return i\n }\n }\n\n prev = token\n }\n return false\n }\n\n comment(token) {\n let node = new Comment()\n this.init(node, token[2])\n node.source.end = this.getPosition(token[3] || token[2])\n node.source.end.offset++\n\n let text = token[1].slice(2, -2)\n if (/^\\s*$/.test(text)) {\n node.text = ''\n node.raws.left = text\n node.raws.right = ''\n } else {\n let match = text.match(/^(\\s*)([^]*\\S)(\\s*)$/)\n node.text = match[2]\n node.raws.left = match[1]\n node.raws.right = match[3]\n }\n }\n\n createTokenizer() {\n this.tokenizer = tokenizer(this.input)\n }\n\n decl(tokens, customProperty) {\n let node = new Declaration()\n this.init(node, tokens[0][2])\n\n let last = tokens[tokens.length - 1]\n if (last[0] === ';') {\n this.semicolon = true\n tokens.pop()\n }\n\n node.source.end = this.getPosition(\n last[3] || last[2] || findLastWithPosition(tokens)\n )\n node.source.end.offset++\n\n while (tokens[0][0] !== 'word') {\n if (tokens.length === 1) this.unknownWord(tokens)\n node.raws.before += tokens.shift()[1]\n }\n node.source.start = this.getPosition(tokens[0][2])\n\n node.prop = ''\n while (tokens.length) {\n let type = tokens[0][0]\n if (type === ':' || type === 'space' || type === 'comment') {\n break\n }\n node.prop += tokens.shift()[1]\n }\n\n node.raws.between = ''\n\n let token\n while (tokens.length) {\n token = tokens.shift()\n\n if (token[0] === ':') {\n node.raws.between += token[1]\n break\n } else {\n if (token[0] === 'word' && /\\w/.test(token[1])) {\n this.unknownWord([token])\n }\n node.raws.between += token[1]\n }\n }\n\n if (node.prop[0] === '_' || node.prop[0] === '*') {\n node.raws.before += node.prop[0]\n node.prop = node.prop.slice(1)\n }\n\n let firstSpaces = []\n let next\n while (tokens.length) {\n next = tokens[0][0]\n if (next !== 'space' && next !== 'comment') break\n firstSpaces.push(tokens.shift())\n }\n\n this.precheckMissedSemicolon(tokens)\n\n for (let i = tokens.length - 1; i >= 0; i--) {\n token = tokens[i]\n if (token[1].toLowerCase() === '!important') {\n node.important = true\n let string = this.stringFrom(tokens, i)\n string = this.spacesFromEnd(tokens) + string\n if (string !== ' !important') node.raws.important = string\n break\n } else if (token[1].toLowerCase() === 'important') {\n let cache = tokens.slice(0)\n let str = ''\n for (let j = i; j > 0; j--) {\n let type = cache[j][0]\n if (str.trim().indexOf('!') === 0 && type !== 'space') {\n break\n }\n str = cache.pop()[1] + str\n }\n if (str.trim().indexOf('!') === 0) {\n node.important = true\n node.raws.important = str\n tokens = cache\n }\n }\n\n if (token[0] !== 'space' && token[0] !== 'comment') {\n break\n }\n }\n\n let hasWord = tokens.some(i => i[0] !== 'space' && i[0] !== 'comment')\n\n if (hasWord) {\n node.raws.between += firstSpaces.map(i => i[1]).join('')\n firstSpaces = []\n }\n this.raw(node, 'value', firstSpaces.concat(tokens), customProperty)\n\n if (node.value.includes(':') && !customProperty) {\n this.checkMissedSemicolon(tokens)\n }\n }\n\n doubleColon(token) {\n throw this.input.error(\n 'Double colon',\n { offset: token[2] },\n { offset: token[2] + token[1].length }\n )\n }\n\n emptyRule(token) {\n let node = new Rule()\n this.init(node, token[2])\n node.selector = ''\n node.raws.between = ''\n this.current = node\n }\n\n end(token) {\n if (this.current.nodes && this.current.nodes.length) {\n this.current.raws.semicolon = this.semicolon\n }\n this.semicolon = false\n\n this.current.raws.after = (this.current.raws.after || '') + this.spaces\n this.spaces = ''\n\n if (this.current.parent) {\n this.current.source.end = this.getPosition(token[2])\n this.current.source.end.offset++\n this.current = this.current.parent\n } else {\n this.unexpectedClose(token)\n }\n }\n\n endFile() {\n if (this.current.parent) this.unclosedBlock()\n if (this.current.nodes && this.current.nodes.length) {\n this.current.raws.semicolon = this.semicolon\n }\n this.current.raws.after = (this.current.raws.after || '') + this.spaces\n this.root.source.end = this.getPosition(this.tokenizer.position())\n }\n\n freeSemicolon(token) {\n this.spaces += token[1]\n if (this.current.nodes) {\n let prev = this.current.nodes[this.current.nodes.length - 1]\n if (prev && prev.type === 'rule' && !prev.raws.ownSemicolon) {\n prev.raws.ownSemicolon = this.spaces\n this.spaces = ''\n }\n }\n }\n\n // Helpers\n\n getPosition(offset) {\n let pos = this.input.fromOffset(offset)\n return {\n column: pos.col,\n line: pos.line,\n offset\n }\n }\n\n init(node, offset) {\n this.current.push(node)\n node.source = {\n input: this.input,\n start: this.getPosition(offset)\n }\n node.raws.before = this.spaces\n this.spaces = ''\n if (node.type !== 'comment') this.semicolon = false\n }\n\n other(start) {\n let end = false\n let type = null\n let colon = false\n let bracket = null\n let brackets = []\n let customProperty = start[1].startsWith('--')\n\n let tokens = []\n let token = start\n while (token) {\n type = token[0]\n tokens.push(token)\n\n if (type === '(' || type === '[') {\n if (!bracket) bracket = token\n brackets.push(type === '(' ? ')' : ']')\n } else if (customProperty && colon && type === '{') {\n if (!bracket) bracket = token\n brackets.push('}')\n } else if (brackets.length === 0) {\n if (type === ';') {\n if (colon) {\n this.decl(tokens, customProperty)\n return\n } else {\n break\n }\n } else if (type === '{') {\n this.rule(tokens)\n return\n } else if (type === '}') {\n this.tokenizer.back(tokens.pop())\n end = true\n break\n } else if (type === ':') {\n colon = true\n }\n } else if (type === brackets[brackets.length - 1]) {\n brackets.pop()\n if (brackets.length === 0) bracket = null\n }\n\n token = this.tokenizer.nextToken()\n }\n\n if (this.tokenizer.endOfFile()) end = true\n if (brackets.length > 0) this.unclosedBracket(bracket)\n\n if (end && colon) {\n if (!customProperty) {\n while (tokens.length) {\n token = tokens[tokens.length - 1][0]\n if (token !== 'space' && token !== 'comment') break\n this.tokenizer.back(tokens.pop())\n }\n }\n this.decl(tokens, customProperty)\n } else {\n this.unknownWord(tokens)\n }\n }\n\n parse() {\n let token\n while (!this.tokenizer.endOfFile()) {\n token = this.tokenizer.nextToken()\n\n switch (token[0]) {\n case 'space':\n this.spaces += token[1]\n break\n\n case ';':\n this.freeSemicolon(token)\n break\n\n case '}':\n this.end(token)\n break\n\n case 'comment':\n this.comment(token)\n break\n\n case 'at-word':\n this.atrule(token)\n break\n\n case '{':\n this.emptyRule(token)\n break\n\n default:\n this.other(token)\n break\n }\n }\n this.endFile()\n }\n\n precheckMissedSemicolon(/* tokens */) {\n // Hook for Safe Parser\n }\n\n raw(node, prop, tokens, customProperty) {\n let token, type\n let length = tokens.length\n let value = ''\n let clean = true\n let next, prev\n\n for (let i = 0; i < length; i += 1) {\n token = tokens[i]\n type = token[0]\n if (type === 'space' && i === length - 1 && !customProperty) {\n clean = false\n } else if (type === 'comment') {\n prev = tokens[i - 1] ? tokens[i - 1][0] : 'empty'\n next = tokens[i + 1] ? tokens[i + 1][0] : 'empty'\n if (!SAFE_COMMENT_NEIGHBOR[prev] && !SAFE_COMMENT_NEIGHBOR[next]) {\n if (value.slice(-1) === ',') {\n clean = false\n } else {\n value += token[1]\n }\n } else {\n clean = false\n }\n } else {\n value += token[1]\n }\n }\n if (!clean) {\n let raw = tokens.reduce((all, i) => all + i[1], '')\n node.raws[prop] = { raw, value }\n }\n node[prop] = value\n }\n\n rule(tokens) {\n tokens.pop()\n\n let node = new Rule()\n this.init(node, tokens[0][2])\n\n node.raws.between = this.spacesAndCommentsFromEnd(tokens)\n this.raw(node, 'selector', tokens)\n this.current = node\n }\n\n spacesAndCommentsFromEnd(tokens) {\n let lastTokenType\n let spaces = ''\n while (tokens.length) {\n lastTokenType = tokens[tokens.length - 1][0]\n if (lastTokenType !== 'space' && lastTokenType !== 'comment') break\n spaces = tokens.pop()[1] + spaces\n }\n return spaces\n }\n\n // Errors\n\n spacesAndCommentsFromStart(tokens) {\n let next\n let spaces = ''\n while (tokens.length) {\n next = tokens[0][0]\n if (next !== 'space' && next !== 'comment') break\n spaces += tokens.shift()[1]\n }\n return spaces\n }\n\n spacesFromEnd(tokens) {\n let lastTokenType\n let spaces = ''\n while (tokens.length) {\n lastTokenType = tokens[tokens.length - 1][0]\n if (lastTokenType !== 'space') break\n spaces = tokens.pop()[1] + spaces\n }\n return spaces\n }\n\n stringFrom(tokens, from) {\n let result = ''\n for (let i = from; i < tokens.length; i++) {\n result += tokens[i][1]\n }\n tokens.splice(from, tokens.length - from)\n return result\n }\n\n unclosedBlock() {\n let pos = this.current.source.start\n throw this.input.error('Unclosed block', pos.line, pos.column)\n }\n\n unclosedBracket(bracket) {\n throw this.input.error(\n 'Unclosed bracket',\n { offset: bracket[2] },\n { offset: bracket[2] + 1 }\n )\n }\n\n unexpectedClose(token) {\n throw this.input.error(\n 'Unexpected }',\n { offset: token[2] },\n { offset: token[2] + 1 }\n )\n }\n\n unknownWord(tokens) {\n throw this.input.error(\n 'Unknown word',\n { offset: tokens[0][2] },\n { offset: tokens[0][2] + tokens[0][1].length }\n )\n }\n\n unnamedAtrule(node, token) {\n throw this.input.error(\n 'At-rule without name',\n { offset: token[2] },\n { offset: token[2] + token[1].length }\n )\n }\n}\n\nmodule.exports = Parser\n","'use strict'\n\nlet Container = require('./container')\nlet Parser = require('./parser')\nlet Input = require('./input')\n\nfunction parse(css, opts) {\n let input = new Input(css, opts)\n let parser = new Parser(input)\n try {\n parser.parse()\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n if (e.name === 'CssSyntaxError' && opts && opts.from) {\n if (/\\.scss$/i.test(opts.from)) {\n e.message +=\n '\\nYou tried to parse SCSS with ' +\n 'the standard CSS parser; ' +\n 'try again with the postcss-scss parser'\n } else if (/\\.sass/i.test(opts.from)) {\n e.message +=\n '\\nYou tried to parse Sass with ' +\n 'the standard CSS parser; ' +\n 'try again with the postcss-sass parser'\n } else if (/\\.less$/i.test(opts.from)) {\n e.message +=\n '\\nYou tried to parse Less with ' +\n 'the standard CSS parser; ' +\n 'try again with the postcss-less parser'\n }\n }\n }\n throw e\n }\n\n return parser.root\n}\n\nmodule.exports = parse\nparse.default = parse\n\nContainer.registerParse(parse)\n","'use strict'\n\nlet { isClean, my } = require('./symbols')\nlet MapGenerator = require('./map-generator')\nlet stringify = require('./stringify')\nlet Container = require('./container')\nlet Document = require('./document')\nlet warnOnce = require('./warn-once')\nlet Result = require('./result')\nlet parse = require('./parse')\nlet Root = require('./root')\n\nconst TYPE_TO_CLASS_NAME = {\n atrule: 'AtRule',\n comment: 'Comment',\n decl: 'Declaration',\n document: 'Document',\n root: 'Root',\n rule: 'Rule'\n}\n\nconst PLUGIN_PROPS = {\n AtRule: true,\n AtRuleExit: true,\n Comment: true,\n CommentExit: true,\n Declaration: true,\n DeclarationExit: true,\n Document: true,\n DocumentExit: true,\n Once: true,\n OnceExit: true,\n postcssPlugin: true,\n prepare: true,\n Root: true,\n RootExit: true,\n Rule: true,\n RuleExit: true\n}\n\nconst NOT_VISITORS = {\n Once: true,\n postcssPlugin: true,\n prepare: true\n}\n\nconst CHILDREN = 0\n\nfunction isPromise(obj) {\n return typeof obj === 'object' && typeof obj.then === 'function'\n}\n\nfunction getEvents(node) {\n let key = false\n let type = TYPE_TO_CLASS_NAME[node.type]\n if (node.type === 'decl') {\n key = node.prop.toLowerCase()\n } else if (node.type === 'atrule') {\n key = node.name.toLowerCase()\n }\n\n if (key && node.append) {\n return [\n type,\n type + '-' + key,\n CHILDREN,\n type + 'Exit',\n type + 'Exit-' + key\n ]\n } else if (key) {\n return [type, type + '-' + key, type + 'Exit', type + 'Exit-' + key]\n } else if (node.append) {\n return [type, CHILDREN, type + 'Exit']\n } else {\n return [type, type + 'Exit']\n }\n}\n\nfunction toStack(node) {\n let events\n if (node.type === 'document') {\n events = ['Document', CHILDREN, 'DocumentExit']\n } else if (node.type === 'root') {\n events = ['Root', CHILDREN, 'RootExit']\n } else {\n events = getEvents(node)\n }\n\n return {\n eventIndex: 0,\n events,\n iterator: 0,\n node,\n visitorIndex: 0,\n visitors: []\n }\n}\n\nfunction cleanMarks(node) {\n node[isClean] = false\n if (node.nodes) node.nodes.forEach(i => cleanMarks(i))\n return node\n}\n\nlet postcss = {}\n\nclass LazyResult {\n constructor(processor, css, opts) {\n this.stringified = false\n this.processed = false\n\n let root\n if (\n typeof css === 'object' &&\n css !== null &&\n (css.type === 'root' || css.type === 'document')\n ) {\n root = cleanMarks(css)\n } else if (css instanceof LazyResult || css instanceof Result) {\n root = cleanMarks(css.root)\n if (css.map) {\n if (typeof opts.map === 'undefined') opts.map = {}\n if (!opts.map.inline) opts.map.inline = false\n opts.map.prev = css.map\n }\n } else {\n let parser = parse\n if (opts.syntax) parser = opts.syntax.parse\n if (opts.parser) parser = opts.parser\n if (parser.parse) parser = parser.parse\n\n try {\n root = parser(css, opts)\n } catch (error) {\n this.processed = true\n this.error = error\n }\n\n if (root && !root[my]) {\n /* c8 ignore next 2 */\n Container.rebuild(root)\n }\n }\n\n this.result = new Result(processor, root, opts)\n this.helpers = { ...postcss, postcss, result: this.result }\n this.plugins = this.processor.plugins.map(plugin => {\n if (typeof plugin === 'object' && plugin.prepare) {\n return { ...plugin, ...plugin.prepare(this.result) }\n } else {\n return plugin\n }\n })\n }\n\n async() {\n if (this.error) return Promise.reject(this.error)\n if (this.processed) return Promise.resolve(this.result)\n if (!this.processing) {\n this.processing = this.runAsync()\n }\n return this.processing\n }\n\n catch(onRejected) {\n return this.async().catch(onRejected)\n }\n\n finally(onFinally) {\n return this.async().then(onFinally, onFinally)\n }\n\n getAsyncError() {\n throw new Error('Use process(css).then(cb) to work with async plugins')\n }\n\n handleError(error, node) {\n let plugin = this.result.lastPlugin\n try {\n if (node) node.addToError(error)\n this.error = error\n if (error.name === 'CssSyntaxError' && !error.plugin) {\n error.plugin = plugin.postcssPlugin\n error.setMessage()\n } else if (plugin.postcssVersion) {\n if (process.env.NODE_ENV !== 'production') {\n let pluginName = plugin.postcssPlugin\n let pluginVer = plugin.postcssVersion\n let runtimeVer = this.result.processor.version\n let a = pluginVer.split('.')\n let b = runtimeVer.split('.')\n\n if (a[0] !== b[0] || parseInt(a[1]) > parseInt(b[1])) {\n // eslint-disable-next-line no-console\n console.error(\n 'Unknown error from PostCSS plugin. Your current PostCSS ' +\n 'version is ' +\n runtimeVer +\n ', but ' +\n pluginName +\n ' uses ' +\n pluginVer +\n '. Perhaps this is the source of the error below.'\n )\n }\n }\n }\n } catch (err) {\n /* c8 ignore next 3 */\n // eslint-disable-next-line no-console\n if (console && console.error) console.error(err)\n }\n return error\n }\n\n prepareVisitors() {\n this.listeners = {}\n let add = (plugin, type, cb) => {\n if (!this.listeners[type]) this.listeners[type] = []\n this.listeners[type].push([plugin, cb])\n }\n for (let plugin of this.plugins) {\n if (typeof plugin === 'object') {\n for (let event in plugin) {\n if (!PLUGIN_PROPS[event] && /^[A-Z]/.test(event)) {\n throw new Error(\n `Unknown event ${event} in ${plugin.postcssPlugin}. ` +\n `Try to update PostCSS (${this.processor.version} now).`\n )\n }\n if (!NOT_VISITORS[event]) {\n if (typeof plugin[event] === 'object') {\n for (let filter in plugin[event]) {\n if (filter === '*') {\n add(plugin, event, plugin[event][filter])\n } else {\n add(\n plugin,\n event + '-' + filter.toLowerCase(),\n plugin[event][filter]\n )\n }\n }\n } else if (typeof plugin[event] === 'function') {\n add(plugin, event, plugin[event])\n }\n }\n }\n }\n }\n this.hasListener = Object.keys(this.listeners).length > 0\n }\n\n async runAsync() {\n this.plugin = 0\n for (let i = 0; i < this.plugins.length; i++) {\n let plugin = this.plugins[i]\n let promise = this.runOnRoot(plugin)\n if (isPromise(promise)) {\n try {\n await promise\n } catch (error) {\n throw this.handleError(error)\n }\n }\n }\n\n this.prepareVisitors()\n if (this.hasListener) {\n let root = this.result.root\n while (!root[isClean]) {\n root[isClean] = true\n let stack = [toStack(root)]\n while (stack.length > 0) {\n let promise = this.visitTick(stack)\n if (isPromise(promise)) {\n try {\n await promise\n } catch (e) {\n let node = stack[stack.length - 1].node\n throw this.handleError(e, node)\n }\n }\n }\n }\n\n if (this.listeners.OnceExit) {\n for (let [plugin, visitor] of this.listeners.OnceExit) {\n this.result.lastPlugin = plugin\n try {\n if (root.type === 'document') {\n let roots = root.nodes.map(subRoot =>\n visitor(subRoot, this.helpers)\n )\n\n await Promise.all(roots)\n } else {\n await visitor(root, this.helpers)\n }\n } catch (e) {\n throw this.handleError(e)\n }\n }\n }\n }\n\n this.processed = true\n return this.stringify()\n }\n\n runOnRoot(plugin) {\n this.result.lastPlugin = plugin\n try {\n if (typeof plugin === 'object' && plugin.Once) {\n if (this.result.root.type === 'document') {\n let roots = this.result.root.nodes.map(root =>\n plugin.Once(root, this.helpers)\n )\n\n if (isPromise(roots[0])) {\n return Promise.all(roots)\n }\n\n return roots\n }\n\n return plugin.Once(this.result.root, this.helpers)\n } else if (typeof plugin === 'function') {\n return plugin(this.result.root, this.result)\n }\n } catch (error) {\n throw this.handleError(error)\n }\n }\n\n stringify() {\n if (this.error) throw this.error\n if (this.stringified) return this.result\n this.stringified = true\n\n this.sync()\n\n let opts = this.result.opts\n let str = stringify\n if (opts.syntax) str = opts.syntax.stringify\n if (opts.stringifier) str = opts.stringifier\n if (str.stringify) str = str.stringify\n\n let map = new MapGenerator(str, this.result.root, this.result.opts)\n let data = map.generate()\n this.result.css = data[0]\n this.result.map = data[1]\n\n return this.result\n }\n\n sync() {\n if (this.error) throw this.error\n if (this.processed) return this.result\n this.processed = true\n\n if (this.processing) {\n throw this.getAsyncError()\n }\n\n for (let plugin of this.plugins) {\n let promise = this.runOnRoot(plugin)\n if (isPromise(promise)) {\n throw this.getAsyncError()\n }\n }\n\n this.prepareVisitors()\n if (this.hasListener) {\n let root = this.result.root\n while (!root[isClean]) {\n root[isClean] = true\n this.walkSync(root)\n }\n if (this.listeners.OnceExit) {\n if (root.type === 'document') {\n for (let subRoot of root.nodes) {\n this.visitSync(this.listeners.OnceExit, subRoot)\n }\n } else {\n this.visitSync(this.listeners.OnceExit, root)\n }\n }\n }\n\n return this.result\n }\n\n then(onFulfilled, onRejected) {\n if (process.env.NODE_ENV !== 'production') {\n if (!('from' in this.opts)) {\n warnOnce(\n 'Without `from` option PostCSS could generate wrong source map ' +\n 'and will not find Browserslist config. Set it to CSS file path ' +\n 'or to `undefined` to prevent this warning.'\n )\n }\n }\n return this.async().then(onFulfilled, onRejected)\n }\n\n toString() {\n return this.css\n }\n\n visitSync(visitors, node) {\n for (let [plugin, visitor] of visitors) {\n this.result.lastPlugin = plugin\n let promise\n try {\n promise = visitor(node, this.helpers)\n } catch (e) {\n throw this.handleError(e, node.proxyOf)\n }\n if (node.type !== 'root' && node.type !== 'document' && !node.parent) {\n return true\n }\n if (isPromise(promise)) {\n throw this.getAsyncError()\n }\n }\n }\n\n visitTick(stack) {\n let visit = stack[stack.length - 1]\n let { node, visitors } = visit\n\n if (node.type !== 'root' && node.type !== 'document' && !node.parent) {\n stack.pop()\n return\n }\n\n if (visitors.length > 0 && visit.visitorIndex < visitors.length) {\n let [plugin, visitor] = visitors[visit.visitorIndex]\n visit.visitorIndex += 1\n if (visit.visitorIndex === visitors.length) {\n visit.visitors = []\n visit.visitorIndex = 0\n }\n this.result.lastPlugin = plugin\n try {\n return visitor(node.toProxy(), this.helpers)\n } catch (e) {\n throw this.handleError(e, node)\n }\n }\n\n if (visit.iterator !== 0) {\n let iterator = visit.iterator\n let child\n while ((child = node.nodes[node.indexes[iterator]])) {\n node.indexes[iterator] += 1\n if (!child[isClean]) {\n child[isClean] = true\n stack.push(toStack(child))\n return\n }\n }\n visit.iterator = 0\n delete node.indexes[iterator]\n }\n\n let events = visit.events\n while (visit.eventIndex < events.length) {\n let event = events[visit.eventIndex]\n visit.eventIndex += 1\n if (event === CHILDREN) {\n if (node.nodes && node.nodes.length) {\n node[isClean] = true\n visit.iterator = node.getIterator()\n }\n return\n } else if (this.listeners[event]) {\n visit.visitors = this.listeners[event]\n return\n }\n }\n stack.pop()\n }\n\n walkSync(node) {\n node[isClean] = true\n let events = getEvents(node)\n for (let event of events) {\n if (event === CHILDREN) {\n if (node.nodes) {\n node.each(child => {\n if (!child[isClean]) this.walkSync(child)\n })\n }\n } else {\n let visitors = this.listeners[event]\n if (visitors) {\n if (this.visitSync(visitors, node.toProxy())) return\n }\n }\n }\n }\n\n warnings() {\n return this.sync().warnings()\n }\n\n get content() {\n return this.stringify().content\n }\n\n get css() {\n return this.stringify().css\n }\n\n get map() {\n return this.stringify().map\n }\n\n get messages() {\n return this.sync().messages\n }\n\n get opts() {\n return this.result.opts\n }\n\n get processor() {\n return this.result.processor\n }\n\n get root() {\n return this.sync().root\n }\n\n get [Symbol.toStringTag]() {\n return 'LazyResult'\n }\n}\n\nLazyResult.registerPostcss = dependant => {\n postcss = dependant\n}\n\nmodule.exports = LazyResult\nLazyResult.default = LazyResult\n\nRoot.registerLazyResult(LazyResult)\nDocument.registerLazyResult(LazyResult)\n","'use strict'\n\nlet MapGenerator = require('./map-generator')\nlet stringify = require('./stringify')\nlet warnOnce = require('./warn-once')\nlet parse = require('./parse')\nconst Result = require('./result')\n\nclass NoWorkResult {\n constructor(processor, css, opts) {\n css = css.toString()\n this.stringified = false\n\n this._processor = processor\n this._css = css\n this._opts = opts\n this._map = undefined\n let root\n\n let str = stringify\n this.result = new Result(this._processor, root, this._opts)\n this.result.css = css\n\n let self = this\n Object.defineProperty(this.result, 'root', {\n get() {\n return self.root\n }\n })\n\n let map = new MapGenerator(str, root, this._opts, css)\n if (map.isMap()) {\n let [generatedCSS, generatedMap] = map.generate()\n if (generatedCSS) {\n this.result.css = generatedCSS\n }\n if (generatedMap) {\n this.result.map = generatedMap\n }\n } else {\n map.clearAnnotation()\n this.result.css = map.css\n }\n }\n\n async() {\n if (this.error) return Promise.reject(this.error)\n return Promise.resolve(this.result)\n }\n\n catch(onRejected) {\n return this.async().catch(onRejected)\n }\n\n finally(onFinally) {\n return this.async().then(onFinally, onFinally)\n }\n\n sync() {\n if (this.error) throw this.error\n return this.result\n }\n\n then(onFulfilled, onRejected) {\n if (process.env.NODE_ENV !== 'production') {\n if (!('from' in this._opts)) {\n warnOnce(\n 'Without `from` option PostCSS could generate wrong source map ' +\n 'and will not find Browserslist config. Set it to CSS file path ' +\n 'or to `undefined` to prevent this warning.'\n )\n }\n }\n\n return this.async().then(onFulfilled, onRejected)\n }\n\n toString() {\n return this._css\n }\n\n warnings() {\n return []\n }\n\n get content() {\n return this.result.css\n }\n\n get css() {\n return this.result.css\n }\n\n get map() {\n return this.result.map\n }\n\n get messages() {\n return []\n }\n\n get opts() {\n return this.result.opts\n }\n\n get processor() {\n return this.result.processor\n }\n\n get root() {\n if (this._root) {\n return this._root\n }\n\n let root\n let parser = parse\n\n try {\n root = parser(this._css, this._opts)\n } catch (error) {\n this.error = error\n }\n\n if (this.error) {\n throw this.error\n } else {\n this._root = root\n return root\n }\n }\n\n get [Symbol.toStringTag]() {\n return 'NoWorkResult'\n }\n}\n\nmodule.exports = NoWorkResult\nNoWorkResult.default = NoWorkResult\n","'use strict'\n\nlet NoWorkResult = require('./no-work-result')\nlet LazyResult = require('./lazy-result')\nlet Document = require('./document')\nlet Root = require('./root')\n\nclass Processor {\n constructor(plugins = []) {\n this.version = '8.4.34'\n this.plugins = this.normalize(plugins)\n }\n\n normalize(plugins) {\n let normalized = []\n for (let i of plugins) {\n if (i.postcss === true) {\n i = i()\n } else if (i.postcss) {\n i = i.postcss\n }\n\n if (typeof i === 'object' && Array.isArray(i.plugins)) {\n normalized = normalized.concat(i.plugins)\n } else if (typeof i === 'object' && i.postcssPlugin) {\n normalized.push(i)\n } else if (typeof i === 'function') {\n normalized.push(i)\n } else if (typeof i === 'object' && (i.parse || i.stringify)) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(\n 'PostCSS syntaxes cannot be used as plugins. Instead, please use ' +\n 'one of the syntax/parser/stringifier options as outlined ' +\n 'in your PostCSS runner documentation.'\n )\n }\n } else {\n throw new Error(i + ' is not a PostCSS plugin')\n }\n }\n return normalized\n }\n\n process(css, opts = {}) {\n if (\n !this.plugins.length &&\n !opts.parser &&\n !opts.stringifier &&\n !opts.syntax\n ) {\n return new NoWorkResult(this, css, opts)\n } else {\n return new LazyResult(this, css, opts)\n }\n }\n\n use(plugin) {\n this.plugins = this.plugins.concat(this.normalize([plugin]))\n return this\n }\n}\n\nmodule.exports = Processor\nProcessor.default = Processor\n\nRoot.registerProcessor(Processor)\nDocument.registerProcessor(Processor)\n","'use strict'\n\nlet Declaration = require('./declaration')\nlet PreviousMap = require('./previous-map')\nlet Comment = require('./comment')\nlet AtRule = require('./at-rule')\nlet Input = require('./input')\nlet Root = require('./root')\nlet Rule = require('./rule')\n\nfunction fromJSON(json, inputs) {\n if (Array.isArray(json)) return json.map(n => fromJSON(n))\n\n let { inputs: ownInputs, ...defaults } = json\n if (ownInputs) {\n inputs = []\n for (let input of ownInputs) {\n let inputHydrated = { ...input, __proto__: Input.prototype }\n if (inputHydrated.map) {\n inputHydrated.map = {\n ...inputHydrated.map,\n __proto__: PreviousMap.prototype\n }\n }\n inputs.push(inputHydrated)\n }\n }\n if (defaults.nodes) {\n defaults.nodes = json.nodes.map(n => fromJSON(n, inputs))\n }\n if (defaults.source) {\n let { inputId, ...source } = defaults.source\n defaults.source = source\n if (inputId != null) {\n defaults.source.input = inputs[inputId]\n }\n }\n if (defaults.type === 'root') {\n return new Root(defaults)\n } else if (defaults.type === 'decl') {\n return new Declaration(defaults)\n } else if (defaults.type === 'rule') {\n return new Rule(defaults)\n } else if (defaults.type === 'comment') {\n return new Comment(defaults)\n } else if (defaults.type === 'atrule') {\n return new AtRule(defaults)\n } else {\n throw new Error('Unknown node type: ' + json.type)\n }\n}\n\nmodule.exports = fromJSON\nfromJSON.default = fromJSON\n","'use strict'\n\nlet CssSyntaxError = require('./css-syntax-error')\nlet Declaration = require('./declaration')\nlet LazyResult = require('./lazy-result')\nlet Container = require('./container')\nlet Processor = require('./processor')\nlet stringify = require('./stringify')\nlet fromJSON = require('./fromJSON')\nlet Document = require('./document')\nlet Warning = require('./warning')\nlet Comment = require('./comment')\nlet AtRule = require('./at-rule')\nlet Result = require('./result.js')\nlet Input = require('./input')\nlet parse = require('./parse')\nlet list = require('./list')\nlet Rule = require('./rule')\nlet Root = require('./root')\nlet Node = require('./node')\n\nfunction postcss(...plugins) {\n if (plugins.length === 1 && Array.isArray(plugins[0])) {\n plugins = plugins[0]\n }\n return new Processor(plugins)\n}\n\npostcss.plugin = function plugin(name, initializer) {\n let warningPrinted = false\n function creator(...args) {\n // eslint-disable-next-line no-console\n if (console && console.warn && !warningPrinted) {\n warningPrinted = true\n // eslint-disable-next-line no-console\n console.warn(\n name +\n ': postcss.plugin was deprecated. Migration guide:\\n' +\n 'https://evilmartians.com/chronicles/postcss-8-plugin-migration'\n )\n if (process.env.LANG && process.env.LANG.startsWith('cn')) {\n /* c8 ignore next 7 */\n // eslint-disable-next-line no-console\n console.warn(\n name +\n ': 里面 postcss.plugin 被弃用. 迁移指南:\\n' +\n 'https://www.w3ctech.com/topic/2226'\n )\n }\n }\n let transformer = initializer(...args)\n transformer.postcssPlugin = name\n transformer.postcssVersion = new Processor().version\n return transformer\n }\n\n let cache\n Object.defineProperty(creator, 'postcss', {\n get() {\n if (!cache) cache = creator()\n return cache\n }\n })\n\n creator.process = function (css, processOpts, pluginOpts) {\n return postcss([creator(pluginOpts)]).process(css, processOpts)\n }\n\n return creator\n}\n\npostcss.stringify = stringify\npostcss.parse = parse\npostcss.fromJSON = fromJSON\npostcss.list = list\n\npostcss.comment = defaults => new Comment(defaults)\npostcss.atRule = defaults => new AtRule(defaults)\npostcss.decl = defaults => new Declaration(defaults)\npostcss.rule = defaults => new Rule(defaults)\npostcss.root = defaults => new Root(defaults)\npostcss.document = defaults => new Document(defaults)\n\npostcss.CssSyntaxError = CssSyntaxError\npostcss.Declaration = Declaration\npostcss.Container = Container\npostcss.Processor = Processor\npostcss.Document = Document\npostcss.Comment = Comment\npostcss.Warning = Warning\npostcss.AtRule = AtRule\npostcss.Result = Result\npostcss.Input = Input\npostcss.Rule = Rule\npostcss.Root = Root\npostcss.Node = Node\n\nLazyResult.registerPostcss(postcss)\n\nmodule.exports = postcss\npostcss.default = postcss\n","var openParentheses = \"(\".charCodeAt(0);\nvar closeParentheses = \")\".charCodeAt(0);\nvar singleQuote = \"'\".charCodeAt(0);\nvar doubleQuote = '\"'.charCodeAt(0);\nvar backslash = \"\\\\\".charCodeAt(0);\nvar slash = \"/\".charCodeAt(0);\nvar comma = \",\".charCodeAt(0);\nvar colon = \":\".charCodeAt(0);\nvar star = \"*\".charCodeAt(0);\nvar uLower = \"u\".charCodeAt(0);\nvar uUpper = \"U\".charCodeAt(0);\nvar plus = \"+\".charCodeAt(0);\nvar isUnicodeRange = /^[a-f0-9?-]+$/i;\n\nmodule.exports = function(input) {\n var tokens = [];\n var value = input;\n\n var next,\n quote,\n prev,\n token,\n escape,\n escapePos,\n whitespacePos,\n parenthesesOpenPos;\n var pos = 0;\n var code = value.charCodeAt(pos);\n var max = value.length;\n var stack = [{ nodes: tokens }];\n var balanced = 0;\n var parent;\n\n var name = \"\";\n var before = \"\";\n var after = \"\";\n\n while (pos < max) {\n // Whitespaces\n if (code <= 32) {\n next = pos;\n do {\n next += 1;\n code = value.charCodeAt(next);\n } while (code <= 32);\n token = value.slice(pos, next);\n\n prev = tokens[tokens.length - 1];\n if (code === closeParentheses && balanced) {\n after = token;\n } else if (prev && prev.type === \"div\") {\n prev.after = token;\n prev.sourceEndIndex += token.length;\n } else if (\n code === comma ||\n code === colon ||\n (code === slash &&\n value.charCodeAt(next + 1) !== star &&\n (!parent ||\n (parent && parent.type === \"function\" && parent.value !== \"calc\")))\n ) {\n before = token;\n } else {\n tokens.push({\n type: \"space\",\n sourceIndex: pos,\n sourceEndIndex: next,\n value: token\n });\n }\n\n pos = next;\n\n // Quotes\n } else if (code === singleQuote || code === doubleQuote) {\n next = pos;\n quote = code === singleQuote ? \"'\" : '\"';\n token = {\n type: \"string\",\n sourceIndex: pos,\n quote: quote\n };\n do {\n escape = false;\n next = value.indexOf(quote, next + 1);\n if (~next) {\n escapePos = next;\n while (value.charCodeAt(escapePos - 1) === backslash) {\n escapePos -= 1;\n escape = !escape;\n }\n } else {\n value += quote;\n next = value.length - 1;\n token.unclosed = true;\n }\n } while (escape);\n token.value = value.slice(pos + 1, next);\n token.sourceEndIndex = token.unclosed ? next : next + 1;\n tokens.push(token);\n pos = next + 1;\n code = value.charCodeAt(pos);\n\n // Comments\n } else if (code === slash && value.charCodeAt(pos + 1) === star) {\n next = value.indexOf(\"*/\", pos);\n\n token = {\n type: \"comment\",\n sourceIndex: pos,\n sourceEndIndex: next + 2\n };\n\n if (next === -1) {\n token.unclosed = true;\n next = value.length;\n token.sourceEndIndex = next;\n }\n\n token.value = value.slice(pos + 2, next);\n tokens.push(token);\n\n pos = next + 2;\n code = value.charCodeAt(pos);\n\n // Operation within calc\n } else if (\n (code === slash || code === star) &&\n parent &&\n parent.type === \"function\" &&\n parent.value === \"calc\"\n ) {\n token = value[pos];\n tokens.push({\n type: \"word\",\n sourceIndex: pos - before.length,\n sourceEndIndex: pos + token.length,\n value: token\n });\n pos += 1;\n code = value.charCodeAt(pos);\n\n // Dividers\n } else if (code === slash || code === comma || code === colon) {\n token = value[pos];\n\n tokens.push({\n type: \"div\",\n sourceIndex: pos - before.length,\n sourceEndIndex: pos + token.length,\n value: token,\n before: before,\n after: \"\"\n });\n before = \"\";\n\n pos += 1;\n code = value.charCodeAt(pos);\n\n // Open parentheses\n } else if (openParentheses === code) {\n // Whitespaces after open parentheses\n next = pos;\n do {\n next += 1;\n code = value.charCodeAt(next);\n } while (code <= 32);\n parenthesesOpenPos = pos;\n token = {\n type: \"function\",\n sourceIndex: pos - name.length,\n value: name,\n before: value.slice(parenthesesOpenPos + 1, next)\n };\n pos = next;\n\n if (name === \"url\" && code !== singleQuote && code !== doubleQuote) {\n next -= 1;\n do {\n escape = false;\n next = value.indexOf(\")\", next + 1);\n if (~next) {\n escapePos = next;\n while (value.charCodeAt(escapePos - 1) === backslash) {\n escapePos -= 1;\n escape = !escape;\n }\n } else {\n value += \")\";\n next = value.length - 1;\n token.unclosed = true;\n }\n } while (escape);\n // Whitespaces before closed\n whitespacePos = next;\n do {\n whitespacePos -= 1;\n code = value.charCodeAt(whitespacePos);\n } while (code <= 32);\n if (parenthesesOpenPos < whitespacePos) {\n if (pos !== whitespacePos + 1) {\n token.nodes = [\n {\n type: \"word\",\n sourceIndex: pos,\n sourceEndIndex: whitespacePos + 1,\n value: value.slice(pos, whitespacePos + 1)\n }\n ];\n } else {\n token.nodes = [];\n }\n if (token.unclosed && whitespacePos + 1 !== next) {\n token.after = \"\";\n token.nodes.push({\n type: \"space\",\n sourceIndex: whitespacePos + 1,\n sourceEndIndex: next,\n value: value.slice(whitespacePos + 1, next)\n });\n } else {\n token.after = value.slice(whitespacePos + 1, next);\n token.sourceEndIndex = next;\n }\n } else {\n token.after = \"\";\n token.nodes = [];\n }\n pos = next + 1;\n token.sourceEndIndex = token.unclosed ? next : pos;\n code = value.charCodeAt(pos);\n tokens.push(token);\n } else {\n balanced += 1;\n token.after = \"\";\n token.sourceEndIndex = pos + 1;\n tokens.push(token);\n stack.push(token);\n tokens = token.nodes = [];\n parent = token;\n }\n name = \"\";\n\n // Close parentheses\n } else if (closeParentheses === code && balanced) {\n pos += 1;\n code = value.charCodeAt(pos);\n\n parent.after = after;\n parent.sourceEndIndex += after.length;\n after = \"\";\n balanced -= 1;\n stack[stack.length - 1].sourceEndIndex = pos;\n stack.pop();\n parent = stack[balanced];\n tokens = parent.nodes;\n\n // Words\n } else {\n next = pos;\n do {\n if (code === backslash) {\n next += 1;\n }\n next += 1;\n code = value.charCodeAt(next);\n } while (\n next < max &&\n !(\n code <= 32 ||\n code === singleQuote ||\n code === doubleQuote ||\n code === comma ||\n code === colon ||\n code === slash ||\n code === openParentheses ||\n (code === star &&\n parent &&\n parent.type === \"function\" &&\n parent.value === \"calc\") ||\n (code === slash &&\n parent.type === \"function\" &&\n parent.value === \"calc\") ||\n (code === closeParentheses && balanced)\n )\n );\n token = value.slice(pos, next);\n\n if (openParentheses === code) {\n name = token;\n } else if (\n (uLower === token.charCodeAt(0) || uUpper === token.charCodeAt(0)) &&\n plus === token.charCodeAt(1) &&\n isUnicodeRange.test(token.slice(2))\n ) {\n tokens.push({\n type: \"unicode-range\",\n sourceIndex: pos,\n sourceEndIndex: next,\n value: token\n });\n } else {\n tokens.push({\n type: \"word\",\n sourceIndex: pos,\n sourceEndIndex: next,\n value: token\n });\n }\n\n pos = next;\n }\n }\n\n for (pos = stack.length - 1; pos; pos -= 1) {\n stack[pos].unclosed = true;\n stack[pos].sourceEndIndex = value.length;\n }\n\n return stack[0].nodes;\n};\n","module.exports = function walk(nodes, cb, bubble) {\n var i, max, node, result;\n\n for (i = 0, max = nodes.length; i < max; i += 1) {\n node = nodes[i];\n if (!bubble) {\n result = cb(node, i, nodes);\n }\n\n if (\n result !== false &&\n node.type === \"function\" &&\n Array.isArray(node.nodes)\n ) {\n walk(node.nodes, cb, bubble);\n }\n\n if (bubble) {\n cb(node, i, nodes);\n }\n }\n};\n","function stringifyNode(node, custom) {\n var type = node.type;\n var value = node.value;\n var buf;\n var customResult;\n\n if (custom && (customResult = custom(node)) !== undefined) {\n return customResult;\n } else if (type === \"word\" || type === \"space\") {\n return value;\n } else if (type === \"string\") {\n buf = node.quote || \"\";\n return buf + value + (node.unclosed ? \"\" : buf);\n } else if (type === \"comment\") {\n return \"/*\" + value + (node.unclosed ? \"\" : \"*/\");\n } else if (type === \"div\") {\n return (node.before || \"\") + value + (node.after || \"\");\n } else if (Array.isArray(node.nodes)) {\n buf = stringify(node.nodes, custom);\n if (type !== \"function\") {\n return buf;\n }\n return (\n value +\n \"(\" +\n (node.before || \"\") +\n buf +\n (node.after || \"\") +\n (node.unclosed ? \"\" : \")\")\n );\n }\n return value;\n}\n\nfunction stringify(nodes, custom) {\n var result, i;\n\n if (Array.isArray(nodes)) {\n result = \"\";\n for (i = nodes.length - 1; ~i; i -= 1) {\n result = stringifyNode(nodes[i], custom) + result;\n }\n return result;\n }\n return stringifyNode(nodes, custom);\n}\n\nmodule.exports = stringify;\n","var minus = \"-\".charCodeAt(0);\nvar plus = \"+\".charCodeAt(0);\nvar dot = \".\".charCodeAt(0);\nvar exp = \"e\".charCodeAt(0);\nvar EXP = \"E\".charCodeAt(0);\n\n// Check if three code points would start a number\n// https://www.w3.org/TR/css-syntax-3/#starts-with-a-number\nfunction likeNumber(value) {\n var code = value.charCodeAt(0);\n var nextCode;\n\n if (code === plus || code === minus) {\n nextCode = value.charCodeAt(1);\n\n if (nextCode >= 48 && nextCode <= 57) {\n return true;\n }\n\n var nextNextCode = value.charCodeAt(2);\n\n if (nextCode === dot && nextNextCode >= 48 && nextNextCode <= 57) {\n return true;\n }\n\n return false;\n }\n\n if (code === dot) {\n nextCode = value.charCodeAt(1);\n\n if (nextCode >= 48 && nextCode <= 57) {\n return true;\n }\n\n return false;\n }\n\n if (code >= 48 && code <= 57) {\n return true;\n }\n\n return false;\n}\n\n// Consume a number\n// https://www.w3.org/TR/css-syntax-3/#consume-number\nmodule.exports = function(value) {\n var pos = 0;\n var length = value.length;\n var code;\n var nextCode;\n var nextNextCode;\n\n if (length === 0 || !likeNumber(value)) {\n return false;\n }\n\n code = value.charCodeAt(pos);\n\n if (code === plus || code === minus) {\n pos++;\n }\n\n while (pos < length) {\n code = value.charCodeAt(pos);\n\n if (code < 48 || code > 57) {\n break;\n }\n\n pos += 1;\n }\n\n code = value.charCodeAt(pos);\n nextCode = value.charCodeAt(pos + 1);\n\n if (code === dot && nextCode >= 48 && nextCode <= 57) {\n pos += 2;\n\n while (pos < length) {\n code = value.charCodeAt(pos);\n\n if (code < 48 || code > 57) {\n break;\n }\n\n pos += 1;\n }\n }\n\n code = value.charCodeAt(pos);\n nextCode = value.charCodeAt(pos + 1);\n nextNextCode = value.charCodeAt(pos + 2);\n\n if (\n (code === exp || code === EXP) &&\n ((nextCode >= 48 && nextCode <= 57) ||\n ((nextCode === plus || nextCode === minus) &&\n nextNextCode >= 48 &&\n nextNextCode <= 57))\n ) {\n pos += nextCode === plus || nextCode === minus ? 3 : 2;\n\n while (pos < length) {\n code = value.charCodeAt(pos);\n\n if (code < 48 || code > 57) {\n break;\n }\n\n pos += 1;\n }\n }\n\n return {\n number: value.slice(0, pos),\n unit: value.slice(pos)\n };\n};\n","var parse = require(\"./parse\");\nvar walk = require(\"./walk\");\nvar stringify = require(\"./stringify\");\n\nfunction ValueParser(value) {\n if (this instanceof ValueParser) {\n this.nodes = parse(value);\n return this;\n }\n return new ValueParser(value);\n}\n\nValueParser.prototype.toString = function() {\n return Array.isArray(this.nodes) ? stringify(this.nodes) : \"\";\n};\n\nValueParser.prototype.walk = function(cb, bubble) {\n walk(this.nodes, cb, bubble);\n return this;\n};\n\nValueParser.unit = require(\"./unit\");\n\nValueParser.walk = walk;\n\nValueParser.stringify = stringify;\n\nmodule.exports = ValueParser;\n","// Copyright (c) 2014 Rafael Caricio. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nvar GradientParser = (GradientParser || {});\n\nGradientParser.stringify = (function() {\n\n var visitor = {\n\n 'visit_linear-gradient': function(node) {\n return visitor.visit_gradient(node);\n },\n\n 'visit_repeating-linear-gradient': function(node) {\n return visitor.visit_gradient(node);\n },\n\n 'visit_radial-gradient': function(node) {\n return visitor.visit_gradient(node);\n },\n\n 'visit_repeating-radial-gradient': function(node) {\n return visitor.visit_gradient(node);\n },\n\n 'visit_gradient': function(node) {\n var orientation = visitor.visit(node.orientation);\n if (orientation) {\n orientation += ', ';\n }\n\n return node.type + '(' + orientation + visitor.visit(node.colorStops) + ')';\n },\n\n 'visit_shape': function(node) {\n var result = node.value,\n at = visitor.visit(node.at),\n style = visitor.visit(node.style);\n\n if (style) {\n result += ' ' + style;\n }\n\n if (at) {\n result += ' at ' + at;\n }\n\n return result;\n },\n\n 'visit_default-radial': function(node) {\n var result = '',\n at = visitor.visit(node.at);\n\n if (at) {\n result += at;\n }\n return result;\n },\n\n 'visit_extent-keyword': function(node) {\n var result = node.value,\n at = visitor.visit(node.at);\n\n if (at) {\n result += ' at ' + at;\n }\n\n return result;\n },\n\n 'visit_position-keyword': function(node) {\n return node.value;\n },\n\n 'visit_position': function(node) {\n return visitor.visit(node.value.x) + ' ' + visitor.visit(node.value.y);\n },\n\n 'visit_%': function(node) {\n return node.value + '%';\n },\n\n 'visit_em': function(node) {\n return node.value + 'em';\n },\n\n 'visit_px': function(node) {\n return node.value + 'px';\n },\n\n 'visit_literal': function(node) {\n return visitor.visit_color(node.value, node);\n },\n\n 'visit_hex': function(node) {\n return visitor.visit_color('#' + node.value, node);\n },\n\n 'visit_rgb': function(node) {\n return visitor.visit_color('rgb(' + node.value.join(', ') + ')', node);\n },\n\n 'visit_rgba': function(node) {\n return visitor.visit_color('rgba(' + node.value.join(', ') + ')', node);\n },\n\n 'visit_color': function(resultColor, node) {\n var result = resultColor,\n length = visitor.visit(node.length);\n\n if (length) {\n result += ' ' + length;\n }\n return result;\n },\n\n 'visit_angular': function(node) {\n return node.value + 'deg';\n },\n\n 'visit_directional': function(node) {\n return 'to ' + node.value;\n },\n\n 'visit_array': function(elements) {\n var result = '',\n size = elements.length;\n\n elements.forEach(function(element, i) {\n result += visitor.visit(element);\n if (i < size - 1) {\n result += ', ';\n }\n });\n\n return result;\n },\n\n 'visit': function(element) {\n if (!element) {\n return '';\n }\n var result = '';\n\n if (element instanceof Array) {\n return visitor.visit_array(element, result);\n } else if (element.type) {\n var nodeVisitor = visitor['visit_' + element.type];\n if (nodeVisitor) {\n return nodeVisitor(element);\n } else {\n throw Error('Missing visitor visit_' + element.type);\n }\n } else {\n throw Error('Invalid node.');\n }\n }\n\n };\n\n return function(root) {\n return visitor.visit(root);\n };\n})();\n\n// Copyright (c) 2014 Rafael Caricio. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nvar GradientParser = (GradientParser || {});\n\nGradientParser.parse = (function() {\n\n var tokens = {\n linearGradient: /^(\\-(webkit|o|ms|moz)\\-)?(linear\\-gradient)/i,\n repeatingLinearGradient: /^(\\-(webkit|o|ms|moz)\\-)?(repeating\\-linear\\-gradient)/i,\n radialGradient: /^(\\-(webkit|o|ms|moz)\\-)?(radial\\-gradient)/i,\n repeatingRadialGradient: /^(\\-(webkit|o|ms|moz)\\-)?(repeating\\-radial\\-gradient)/i,\n sideOrCorner: /^to (left (top|bottom)|right (top|bottom)|left|right|top|bottom)/i,\n extentKeywords: /^(closest\\-side|closest\\-corner|farthest\\-side|farthest\\-corner|contain|cover)/,\n positionKeywords: /^(left|center|right|top|bottom)/i,\n pixelValue: /^(-?(([0-9]*\\.[0-9]+)|([0-9]+\\.?)))px/,\n percentageValue: /^(-?(([0-9]*\\.[0-9]+)|([0-9]+\\.?)))\\%/,\n emValue: /^(-?(([0-9]*\\.[0-9]+)|([0-9]+\\.?)))em/,\n angleValue: /^(-?(([0-9]*\\.[0-9]+)|([0-9]+\\.?)))deg/,\n startCall: /^\\(/,\n endCall: /^\\)/,\n comma: /^,/,\n hexColor: /^\\#([0-9a-fA-F]+)/,\n literalColor: /^([a-zA-Z]+)/,\n rgbColor: /^rgb/i,\n rgbaColor: /^rgba/i,\n number: /^(([0-9]*\\.[0-9]+)|([0-9]+\\.?))/\n };\n\n var input = '';\n\n function error(msg) {\n var err = new Error(input + ': ' + msg);\n err.source = input;\n throw err;\n }\n\n function getAST() {\n var ast = matchListDefinitions();\n\n if (input.length > 0) {\n error('Invalid input not EOF');\n }\n\n return ast;\n }\n\n function matchListDefinitions() {\n return matchListing(matchDefinition);\n }\n\n function matchDefinition() {\n return matchGradient(\n 'linear-gradient',\n tokens.linearGradient,\n matchLinearOrientation) ||\n\n matchGradient(\n 'repeating-linear-gradient',\n tokens.repeatingLinearGradient,\n matchLinearOrientation) ||\n\n matchGradient(\n 'radial-gradient',\n tokens.radialGradient,\n matchListRadialOrientations) ||\n\n matchGradient(\n 'repeating-radial-gradient',\n tokens.repeatingRadialGradient,\n matchListRadialOrientations);\n }\n\n function matchGradient(gradientType, pattern, orientationMatcher) {\n return matchCall(pattern, function(captures) {\n\n var orientation = orientationMatcher();\n if (orientation) {\n if (!scan(tokens.comma)) {\n error('Missing comma before color stops');\n }\n }\n\n return {\n type: gradientType,\n orientation: orientation,\n colorStops: matchListing(matchColorStop)\n };\n });\n }\n\n function matchCall(pattern, callback) {\n var captures = scan(pattern);\n\n if (captures) {\n if (!scan(tokens.startCall)) {\n error('Missing (');\n }\n\n var result = callback(captures);\n\n if (!scan(tokens.endCall)) {\n error('Missing )');\n }\n\n return result;\n }\n }\n\n function matchLinearOrientation() {\n return matchSideOrCorner() ||\n matchAngle();\n }\n\n function matchSideOrCorner() {\n return match('directional', tokens.sideOrCorner, 1);\n }\n\n function matchAngle() {\n return match('angular', tokens.angleValue, 1);\n }\n\n function matchListRadialOrientations() {\n var radialOrientations,\n radialOrientation = matchRadialOrientation(),\n lookaheadCache;\n\n if (radialOrientation) {\n radialOrientations = [];\n radialOrientations.push(radialOrientation);\n\n lookaheadCache = input;\n if (scan(tokens.comma)) {\n radialOrientation = matchRadialOrientation();\n if (radialOrientation) {\n radialOrientations.push(radialOrientation);\n } else {\n input = lookaheadCache;\n }\n }\n }\n\n return radialOrientations;\n }\n\n function matchRadialOrientation() {\n var radialType = matchCircle() ||\n matchEllipse();\n\n if (radialType) {\n radialType.at = matchAtPosition();\n } else {\n var extent = matchExtentKeyword();\n if (extent) {\n radialType = extent;\n var positionAt = matchAtPosition();\n if (positionAt) {\n radialType.at = positionAt;\n }\n } else {\n var defaultPosition = matchPositioning();\n if (defaultPosition) {\n radialType = {\n type: 'default-radial',\n at: defaultPosition\n };\n }\n }\n }\n\n return radialType;\n }\n\n function matchCircle() {\n var circle = match('shape', /^(circle)/i, 0);\n\n if (circle) {\n circle.style = matchLength() || matchExtentKeyword();\n }\n\n return circle;\n }\n\n function matchEllipse() {\n var ellipse = match('shape', /^(ellipse)/i, 0);\n\n if (ellipse) {\n ellipse.style = matchDistance() || matchExtentKeyword();\n }\n\n return ellipse;\n }\n\n function matchExtentKeyword() {\n return match('extent-keyword', tokens.extentKeywords, 1);\n }\n\n function matchAtPosition() {\n if (match('position', /^at/, 0)) {\n var positioning = matchPositioning();\n\n if (!positioning) {\n error('Missing positioning value');\n }\n\n return positioning;\n }\n }\n\n function matchPositioning() {\n var location = matchCoordinates();\n\n if (location.x || location.y) {\n return {\n type: 'position',\n value: location\n };\n }\n }\n\n function matchCoordinates() {\n return {\n x: matchDistance(),\n y: matchDistance()\n };\n }\n\n function matchListing(matcher) {\n var captures = matcher(),\n result = [];\n\n if (captures) {\n result.push(captures);\n while (scan(tokens.comma)) {\n captures = matcher();\n if (captures) {\n result.push(captures);\n } else {\n error('One extra comma');\n }\n }\n }\n\n return result;\n }\n\n function matchColorStop() {\n var color = matchColor();\n\n if (!color) {\n error('Expected color definition');\n }\n\n color.length = matchDistance();\n return color;\n }\n\n function matchColor() {\n return matchHexColor() ||\n matchRGBAColor() ||\n matchRGBColor() ||\n matchLiteralColor();\n }\n\n function matchLiteralColor() {\n return match('literal', tokens.literalColor, 0);\n }\n\n function matchHexColor() {\n return match('hex', tokens.hexColor, 1);\n }\n\n function matchRGBColor() {\n return matchCall(tokens.rgbColor, function() {\n return {\n type: 'rgb',\n value: matchListing(matchNumber)\n };\n });\n }\n\n function matchRGBAColor() {\n return matchCall(tokens.rgbaColor, function() {\n return {\n type: 'rgba',\n value: matchListing(matchNumber)\n };\n });\n }\n\n function matchNumber() {\n return scan(tokens.number)[1];\n }\n\n function matchDistance() {\n return match('%', tokens.percentageValue, 1) ||\n matchPositionKeyword() ||\n matchLength();\n }\n\n function matchPositionKeyword() {\n return match('position-keyword', tokens.positionKeywords, 1);\n }\n\n function matchLength() {\n return match('px', tokens.pixelValue, 1) ||\n match('em', tokens.emValue, 1);\n }\n\n function match(type, pattern, captureIndex) {\n var captures = scan(pattern);\n if (captures) {\n return {\n type: type,\n value: captures[captureIndex]\n };\n }\n }\n\n function scan(regexp) {\n var captures,\n blankCaptures;\n\n blankCaptures = /^[\\n\\r\\t\\s]+/.exec(input);\n if (blankCaptures) {\n consume(blankCaptures[0].length);\n }\n\n captures = regexp.exec(input);\n if (captures) {\n consume(captures[0].length);\n }\n\n return captures;\n }\n\n function consume(size) {\n input = input.substr(size);\n }\n\n return function(code) {\n input = code.toString();\n return getAST();\n };\n})();\n\nexports.parse = GradientParser.parse;\nexports.stringify = GradientParser.stringify;\n","/*\nLanguage: 1C:Enterprise\nAuthor: Stanislav Belov \nDescription: built-in language 1C:Enterprise (v7, v8)\nCategory: enterprise\n*/\n\nfunction _1c(hljs) {\n // общий паттерн для определения идентификаторов\n const UNDERSCORE_IDENT_RE = '[A-Za-zА-Яа-яёЁ_][A-Za-zА-Яа-яёЁ_0-9]+';\n\n // v7 уникальные ключевые слова, отсутствующие в v8 ==> keyword\n const v7_keywords =\n 'далее ';\n\n // v8 ключевые слова ==> keyword\n const v8_keywords =\n 'возврат вызватьисключение выполнить для если и из или иначе иначеесли исключение каждого конецесли '\n + 'конецпопытки конеццикла не новый перейти перем по пока попытка прервать продолжить тогда цикл экспорт ';\n\n // keyword : ключевые слова\n const KEYWORD = v7_keywords + v8_keywords;\n\n // v7 уникальные директивы, отсутствующие в v8 ==> meta-keyword\n const v7_meta_keywords =\n 'загрузитьизфайла ';\n\n // v8 ключевые слова в инструкциях препроцессора, директивах компиляции, аннотациях ==> meta-keyword\n const v8_meta_keywords =\n 'вебклиент вместо внешнеесоединение клиент конецобласти мобильноеприложениеклиент мобильноеприложениесервер '\n + 'наклиенте наклиентенасервере наклиентенасерверебезконтекста насервере насерверебезконтекста область перед '\n + 'после сервер толстыйклиентобычноеприложение толстыйклиентуправляемоеприложение тонкийклиент ';\n\n // meta-keyword : ключевые слова в инструкциях препроцессора, директивах компиляции, аннотациях\n const METAKEYWORD = v7_meta_keywords + v8_meta_keywords;\n\n // v7 системные константы ==> built_in\n const v7_system_constants =\n 'разделительстраниц разделительстрок символтабуляции ';\n\n // v7 уникальные методы глобального контекста, отсутствующие в v8 ==> built_in\n const v7_global_context_methods =\n 'ansitooem oemtoansi ввестивидсубконто ввестиперечисление ввестипериод ввестиплансчетов выбранныйплансчетов '\n + 'датагод датамесяц датачисло заголовоксистемы значениевстроку значениеизстроки каталогиб каталогпользователя '\n + 'кодсимв конгода конецпериодаби конецрассчитанногопериодаби конецстандартногоинтервала конквартала конмесяца '\n + 'коннедели лог лог10 максимальноеколичествосубконто названиеинтерфейса названиенабораправ назначитьвид '\n + 'назначитьсчет найтиссылки началопериодаби началостандартногоинтервала начгода начквартала начмесяца '\n + 'начнедели номерднягода номерднянедели номернеделигода обработкаожидания основнойжурналрасчетов '\n + 'основнойплансчетов основнойязык очиститьокносообщений периодстр получитьвремята получитьдатута '\n + 'получитьдокументта получитьзначенияотбора получитьпозициюта получитьпустоезначение получитьта '\n + 'префиксавтонумерации пропись пустоезначение разм разобратьпозициюдокумента рассчитатьрегистрына '\n + 'рассчитатьрегистрыпо симв создатьобъект статусвозврата стрколичествострок сформироватьпозициюдокумента '\n + 'счетпокоду текущеевремя типзначения типзначениястр установитьтана установитьтапо фиксшаблон шаблон ';\n\n // v8 методы глобального контекста ==> built_in\n const v8_global_context_methods =\n 'acos asin atan base64значение base64строка cos exp log log10 pow sin sqrt tan xmlзначение xmlстрока '\n + 'xmlтип xmlтипзнч активноеокно безопасныйрежим безопасныйрежимразделенияданных булево ввестидату ввестизначение '\n + 'ввестистроку ввестичисло возможностьчтенияxml вопрос восстановитьзначение врег выгрузитьжурналрегистрации '\n + 'выполнитьобработкуоповещения выполнитьпроверкуправдоступа вычислить год данныеформывзначение дата день деньгода '\n + 'деньнедели добавитьмесяц заблокироватьданныедляредактирования заблокироватьработупользователя завершитьработусистемы '\n + 'загрузитьвнешнююкомпоненту закрытьсправку записатьjson записатьxml записатьдатуjson записьжурналарегистрации '\n + 'заполнитьзначениясвойств запроситьразрешениепользователя запуститьприложение запуститьсистему зафиксироватьтранзакцию '\n + 'значениевданныеформы значениевстрокувнутр значениевфайл значениезаполнено значениеизстрокивнутр значениеизфайла '\n + 'изxmlтипа импортмоделиxdto имякомпьютера имяпользователя инициализироватьпредопределенныеданные информацияобошибке '\n + 'каталогбиблиотекимобильногоустройства каталогвременныхфайлов каталогдокументов каталогпрограммы кодироватьстроку '\n + 'кодлокализацииинформационнойбазы кодсимвола командасистемы конецгода конецдня конецквартала конецмесяца конецминуты '\n + 'конецнедели конецчаса конфигурациябазыданныхизмененадинамически конфигурацияизменена копироватьданныеформы '\n + 'копироватьфайл краткоепредставлениеошибки лев макс местноевремя месяц мин минута монопольныйрежим найти '\n + 'найтинедопустимыесимволыxml найтиокнопонавигационнойссылке найтипомеченныенаудаление найтипоссылкам найтифайлы '\n + 'началогода началодня началоквартала началомесяца началоминуты началонедели началочаса начатьзапросразрешенияпользователя '\n + 'начатьзапускприложения начатькопированиефайла начатьперемещениефайла начатьподключениевнешнейкомпоненты '\n + 'начатьподключениерасширенияработыскриптографией начатьподключениерасширенияработысфайлами начатьпоискфайлов '\n + 'начатьполучениекаталогавременныхфайлов начатьполучениекаталогадокументов начатьполучениерабочегокаталогаданныхпользователя '\n + 'начатьполучениефайлов начатьпомещениефайла начатьпомещениефайлов начатьсозданиедвоичныхданныхизфайла начатьсозданиекаталога '\n + 'начатьтранзакцию начатьудалениефайлов начатьустановкувнешнейкомпоненты начатьустановкурасширенияработыскриптографией '\n + 'начатьустановкурасширенияработысфайлами неделягода необходимостьзавершениясоединения номерсеансаинформационнойбазы '\n + 'номерсоединенияинформационнойбазы нрег нстр обновитьинтерфейс обновитьнумерациюобъектов обновитьповторноиспользуемыезначения '\n + 'обработкапрерыванияпользователя объединитьфайлы окр описаниеошибки оповестить оповеститьобизменении '\n + 'отключитьобработчикзапросанастроекклиенталицензирования отключитьобработчикожидания отключитьобработчикоповещения '\n + 'открытьзначение открытьиндекссправки открытьсодержаниесправки открытьсправку открытьформу открытьформумодально '\n + 'отменитьтранзакцию очиститьжурналрегистрации очиститьнастройкипользователя очиститьсообщения параметрыдоступа '\n + 'перейтипонавигационнойссылке переместитьфайл подключитьвнешнююкомпоненту '\n + 'подключитьобработчикзапросанастроекклиенталицензирования подключитьобработчикожидания подключитьобработчикоповещения '\n + 'подключитьрасширениеработыскриптографией подключитьрасширениеработысфайлами подробноепредставлениеошибки '\n + 'показатьвводдаты показатьвводзначения показатьвводстроки показатьвводчисла показатьвопрос показатьзначение '\n + 'показатьинформациюобошибке показатьнакарте показатьоповещениепользователя показатьпредупреждение полноеимяпользователя '\n + 'получитьcomобъект получитьxmlтип получитьадреспоместоположению получитьблокировкусеансов получитьвремязавершенияспящегосеанса '\n + 'получитьвремязасыпанияпассивногосеанса получитьвремяожиданияблокировкиданных получитьданныевыбора '\n + 'получитьдополнительныйпараметрклиенталицензирования получитьдопустимыекодылокализации получитьдопустимыечасовыепояса '\n + 'получитьзаголовокклиентскогоприложения получитьзаголовоксистемы получитьзначенияотборажурналарегистрации '\n + 'получитьидентификаторконфигурации получитьизвременногохранилища получитьимявременногофайла '\n + 'получитьимяклиенталицензирования получитьинформациюэкрановклиента получитьиспользованиежурналарегистрации '\n + 'получитьиспользованиесобытияжурналарегистрации получитькраткийзаголовокприложения получитьмакетоформления '\n + 'получитьмаскувсефайлы получитьмаскувсефайлыклиента получитьмаскувсефайлысервера получитьместоположениепоадресу '\n + 'получитьминимальнуюдлинупаролейпользователей получитьнавигационнуюссылку получитьнавигационнуюссылкуинформационнойбазы '\n + 'получитьобновлениеконфигурациибазыданных получитьобновлениепредопределенныхданныхинформационнойбазы получитьобщиймакет '\n + 'получитьобщуюформу получитьокна получитьоперативнуюотметкувремени получитьотключениебезопасногорежима '\n + 'получитьпараметрыфункциональныхопцийинтерфейса получитьполноеимяпредопределенногозначения '\n + 'получитьпредставлениянавигационныхссылок получитьпроверкусложностипаролейпользователей получитьразделительпути '\n + 'получитьразделительпутиклиента получитьразделительпутисервера получитьсеансыинформационнойбазы '\n + 'получитьскоростьклиентскогосоединения получитьсоединенияинформационнойбазы получитьсообщенияпользователю '\n + 'получитьсоответствиеобъектаиформы получитьсоставстандартногоинтерфейсаodata получитьструктурухранениябазыданных '\n + 'получитьтекущийсеансинформационнойбазы получитьфайл получитьфайлы получитьформу получитьфункциональнуюопцию '\n + 'получитьфункциональнуюопциюинтерфейса получитьчасовойпоясинформационнойбазы пользователиос поместитьвовременноехранилище '\n + 'поместитьфайл поместитьфайлы прав праводоступа предопределенноезначение представлениекодалокализации представлениепериода '\n + 'представлениеправа представлениеприложения представлениесобытияжурналарегистрации представлениечасовогопояса предупреждение '\n + 'прекратитьработусистемы привилегированныйрежим продолжитьвызов прочитатьjson прочитатьxml прочитатьдатуjson пустаястрока '\n + 'рабочийкаталогданныхпользователя разблокироватьданныедляредактирования разделитьфайл разорватьсоединениесвнешнимисточникомданных '\n + 'раскодироватьстроку рольдоступна секунда сигнал символ скопироватьжурналрегистрации смещениелетнеговремени '\n + 'смещениестандартноговремени соединитьбуферыдвоичныхданных создатькаталог создатьфабрикуxdto сокрл сокрлп сокрп сообщить '\n + 'состояние сохранитьзначение сохранитьнастройкипользователя сред стрдлина стрзаканчиваетсяна стрзаменить стрнайти стрначинаетсяс '\n + 'строка строкасоединенияинформационнойбазы стрполучитьстроку стрразделить стрсоединить стрсравнить стрчисловхождений '\n + 'стрчислострок стршаблон текущаядата текущаядатасеанса текущаяуниверсальнаядата текущаяуниверсальнаядатавмиллисекундах '\n + 'текущийвариантинтерфейсаклиентскогоприложения текущийвариантосновногошрифтаклиентскогоприложения текущийкодлокализации '\n + 'текущийрежимзапуска текущийязык текущийязыксистемы тип типзнч транзакцияактивна трег удалитьданныеинформационнойбазы '\n + 'удалитьизвременногохранилища удалитьобъекты удалитьфайлы универсальноевремя установитьбезопасныйрежим '\n + 'установитьбезопасныйрежимразделенияданных установитьблокировкусеансов установитьвнешнююкомпоненту '\n + 'установитьвремязавершенияспящегосеанса установитьвремязасыпанияпассивногосеанса установитьвремяожиданияблокировкиданных '\n + 'установитьзаголовокклиентскогоприложения установитьзаголовоксистемы установитьиспользованиежурналарегистрации '\n + 'установитьиспользованиесобытияжурналарегистрации установитькраткийзаголовокприложения '\n + 'установитьминимальнуюдлинупаролейпользователей установитьмонопольныйрежим установитьнастройкиклиенталицензирования '\n + 'установитьобновлениепредопределенныхданныхинформационнойбазы установитьотключениебезопасногорежима '\n + 'установитьпараметрыфункциональныхопцийинтерфейса установитьпривилегированныйрежим '\n + 'установитьпроверкусложностипаролейпользователей установитьрасширениеработыскриптографией '\n + 'установитьрасширениеработысфайлами установитьсоединениесвнешнимисточникомданных установитьсоответствиеобъектаиформы '\n + 'установитьсоставстандартногоинтерфейсаodata установитьчасовойпоясинформационнойбазы установитьчасовойпояссеанса '\n + 'формат цел час часовойпояс часовойпояссеанса число числопрописью этоадресвременногохранилища ';\n\n // v8 свойства глобального контекста ==> built_in\n const v8_global_context_property =\n 'wsссылки библиотекакартинок библиотекамакетовоформлениякомпоновкиданных библиотекастилей бизнеспроцессы '\n + 'внешниеисточникиданных внешниеобработки внешниеотчеты встроенныепокупки главныйинтерфейс главныйстиль '\n + 'документы доставляемыеуведомления журналыдокументов задачи информацияобинтернетсоединении использованиерабочейдаты '\n + 'историяработыпользователя константы критерииотбора метаданные обработки отображениерекламы отправкадоставляемыхуведомлений '\n + 'отчеты панельзадачос параметрзапуска параметрысеанса перечисления планывидоврасчета планывидовхарактеристик '\n + 'планыобмена планысчетов полнотекстовыйпоиск пользователиинформационнойбазы последовательности проверкавстроенныхпокупок '\n + 'рабочаядата расширенияконфигурации регистрыбухгалтерии регистрынакопления регистрырасчета регистрысведений '\n + 'регламентныезадания сериализаторxdto справочники средствагеопозиционирования средствакриптографии средствамультимедиа '\n + 'средстваотображениярекламы средствапочты средствателефонии фабрикаxdto файловыепотоки фоновыезадания хранилищанастроек '\n + 'хранилищевариантовотчетов хранилищенастроекданныхформ хранилищеобщихнастроек хранилищепользовательскихнастроекдинамическихсписков '\n + 'хранилищепользовательскихнастроекотчетов хранилищесистемныхнастроек ';\n\n // built_in : встроенные или библиотечные объекты (константы, классы, функции)\n const BUILTIN =\n v7_system_constants\n + v7_global_context_methods + v8_global_context_methods\n + v8_global_context_property;\n\n // v8 системные наборы значений ==> class\n const v8_system_sets_of_values =\n 'webцвета windowsцвета windowsшрифты библиотекакартинок рамкистиля символы цветастиля шрифтыстиля ';\n\n // v8 системные перечисления - интерфейсные ==> class\n const v8_system_enums_interface =\n 'автоматическоесохранениеданныхформывнастройках автонумерациявформе автораздвижениесерий '\n + 'анимациядиаграммы вариантвыравниванияэлементовизаголовков вариантуправлениявысотойтаблицы '\n + 'вертикальнаяпрокруткаформы вертикальноеположение вертикальноеположениеэлемента видгруппыформы '\n + 'виддекорацииформы виддополненияэлементаформы видизмененияданных видкнопкиформы видпереключателя '\n + 'видподписейкдиаграмме видполяформы видфлажка влияниеразмеранапузырекдиаграммы горизонтальноеположение '\n + 'горизонтальноеположениеэлемента группировкаколонок группировкаподчиненныхэлементовформы '\n + 'группыиэлементы действиеперетаскивания дополнительныйрежимотображения допустимыедействияперетаскивания '\n + 'интервалмеждуэлементамиформы использованиевывода использованиеполосыпрокрутки '\n + 'используемоезначениеточкибиржевойдиаграммы историявыборапривводе источникзначенийоситочекдиаграммы '\n + 'источникзначенияразмерапузырькадиаграммы категориягруппыкоманд максимумсерий начальноеотображениедерева '\n + 'начальноеотображениесписка обновлениетекстаредактирования ориентациядендрограммы ориентациядиаграммы '\n + 'ориентацияметокдиаграммы ориентацияметоксводнойдиаграммы ориентацияэлементаформы отображениевдиаграмме '\n + 'отображениевлегендедиаграммы отображениегруппыкнопок отображениезаголовкашкалыдиаграммы '\n + 'отображениезначенийсводнойдиаграммы отображениезначенияизмерительнойдиаграммы '\n + 'отображениеинтерваладиаграммыганта отображениекнопки отображениекнопкивыбора отображениеобсужденийформы '\n + 'отображениеобычнойгруппы отображениеотрицательныхзначенийпузырьковойдиаграммы отображениепанелипоиска '\n + 'отображениеподсказки отображениепредупрежденияприредактировании отображениеразметкиполосырегулирования '\n + 'отображениестраницформы отображениетаблицы отображениетекстазначениядиаграммыганта '\n + 'отображениеуправленияобычнойгруппы отображениефигурыкнопки палитрацветовдиаграммы поведениеобычнойгруппы '\n + 'поддержкамасштабадендрограммы поддержкамасштабадиаграммыганта поддержкамасштабасводнойдиаграммы '\n + 'поисквтаблицепривводе положениезаголовкаэлементаформы положениекартинкикнопкиформы '\n + 'положениекартинкиэлементаграфическойсхемы положениекоманднойпанелиформы положениекоманднойпанелиэлементаформы '\n + 'положениеопорнойточкиотрисовки положениеподписейкдиаграмме положениеподписейшкалызначенийизмерительнойдиаграммы '\n + 'положениесостоянияпросмотра положениестрокипоиска положениетекстасоединительнойлинии положениеуправленияпоиском '\n + 'положениешкалывремени порядокотображенияточекгоризонтальнойгистограммы порядоксерийвлегендедиаграммы '\n + 'размеркартинки расположениезаголовкашкалыдиаграммы растягиваниеповертикалидиаграммыганта '\n + 'режимавтоотображениясостояния режимвводастроктаблицы режимвыборанезаполненного режимвыделениядаты '\n + 'режимвыделениястрокитаблицы режимвыделениятаблицы режимизмененияразмера режимизменениясвязанногозначения '\n + 'режимиспользованиядиалогапечати режимиспользованияпараметракоманды режиммасштабированияпросмотра '\n + 'режимосновногоокнаклиентскогоприложения режимоткрытияокнаформы режимотображениявыделения '\n + 'режимотображениягеографическойсхемы режимотображениязначенийсерии режимотрисовкисеткиграфическойсхемы '\n + 'режимполупрозрачностидиаграммы режимпробеловдиаграммы режимразмещениянастранице режимредактированияколонки '\n + 'режимсглаживаниядиаграммы режимсглаживанияиндикатора режимсписказадач сквозноевыравнивание '\n + 'сохранениеданныхформывнастройках способзаполнениятекстазаголовкашкалыдиаграммы '\n + 'способопределенияограничивающегозначениядиаграммы стандартнаягруппакоманд стандартноеоформление '\n + 'статусоповещенияпользователя стильстрелки типаппроксимациилиниитрендадиаграммы типдиаграммы '\n + 'типединицышкалывремени типимпортасерийслоягеографическойсхемы типлиниигеографическойсхемы типлиниидиаграммы '\n + 'типмаркерагеографическойсхемы типмаркерадиаграммы типобластиоформления '\n + 'типорганизацииисточникаданныхгеографическойсхемы типотображениясериислоягеографическойсхемы '\n + 'типотображенияточечногообъектагеографическойсхемы типотображенияшкалыэлементалегендыгеографическойсхемы '\n + 'типпоискаобъектовгеографическойсхемы типпроекциигеографическойсхемы типразмещенияизмерений '\n + 'типразмещенияреквизитовизмерений типрамкиэлементауправления типсводнойдиаграммы '\n + 'типсвязидиаграммыганта типсоединениязначенийпосериямдиаграммы типсоединенияточекдиаграммы '\n + 'типсоединительнойлинии типстороныэлементаграфическойсхемы типформыотчета типшкалырадарнойдиаграммы '\n + 'факторлиниитрендадиаграммы фигуракнопки фигурыграфическойсхемы фиксациявтаблице форматдняшкалывремени '\n + 'форматкартинки ширинаподчиненныхэлементовформы ';\n\n // v8 системные перечисления - свойства прикладных объектов ==> class\n const v8_system_enums_objects_properties =\n 'виддвижениябухгалтерии виддвижениянакопления видпериодарегистрарасчета видсчета видточкимаршрутабизнеспроцесса '\n + 'использованиеагрегатарегистранакопления использованиегруппиэлементов использованиережимапроведения '\n + 'использованиесреза периодичностьагрегатарегистранакопления режимавтовремя режимзаписидокумента режимпроведениядокумента ';\n\n // v8 системные перечисления - планы обмена ==> class\n const v8_system_enums_exchange_plans =\n 'авторегистрацияизменений допустимыйномерсообщения отправкаэлементаданных получениеэлементаданных ';\n\n // v8 системные перечисления - табличный документ ==> class\n const v8_system_enums_tabular_document =\n 'использованиерасшифровкитабличногодокумента ориентациястраницы положениеитоговколоноксводнойтаблицы '\n + 'положениеитоговстроксводнойтаблицы положениетекстаотносительнокартинки расположениезаголовкагруппировкитабличногодокумента '\n + 'способчтениязначенийтабличногодокумента типдвустороннейпечати типзаполненияобластитабличногодокумента '\n + 'типкурсоровтабличногодокумента типлиниирисункатабличногодокумента типлинииячейкитабличногодокумента '\n + 'типнаправленияпереходатабличногодокумента типотображениявыделениятабличногодокумента типотображениялинийсводнойтаблицы '\n + 'типразмещениятекстатабличногодокумента типрисункатабличногодокумента типсмещениятабличногодокумента '\n + 'типузоратабличногодокумента типфайлатабличногодокумента точностьпечати чередованиерасположениястраниц ';\n\n // v8 системные перечисления - планировщик ==> class\n const v8_system_enums_sheduler =\n 'отображениевремениэлементовпланировщика ';\n\n // v8 системные перечисления - форматированный документ ==> class\n const v8_system_enums_formatted_document =\n 'типфайлаформатированногодокумента ';\n\n // v8 системные перечисления - запрос ==> class\n const v8_system_enums_query =\n 'обходрезультатазапроса типзаписизапроса ';\n\n // v8 системные перечисления - построитель отчета ==> class\n const v8_system_enums_report_builder =\n 'видзаполнениярасшифровкипостроителяотчета типдобавленияпредставлений типизмеренияпостроителяотчета типразмещенияитогов ';\n\n // v8 системные перечисления - работа с файлами ==> class\n const v8_system_enums_files =\n 'доступкфайлу режимдиалогавыборафайла режимоткрытияфайла ';\n\n // v8 системные перечисления - построитель запроса ==> class\n const v8_system_enums_query_builder =\n 'типизмеренияпостроителязапроса ';\n\n // v8 системные перечисления - анализ данных ==> class\n const v8_system_enums_data_analysis =\n 'видданныханализа методкластеризации типединицыинтервалавременианализаданных типзаполнениятаблицырезультатаанализаданных '\n + 'типиспользованиячисловыхзначенийанализаданных типисточникаданныхпоискаассоциаций типколонкианализаданныхдереворешений '\n + 'типколонкианализаданныхкластеризация типколонкианализаданныхобщаястатистика типколонкианализаданныхпоискассоциаций '\n + 'типколонкианализаданныхпоискпоследовательностей типколонкимоделипрогноза типмерырасстоянияанализаданных '\n + 'типотсеченияправилассоциации типполяанализаданных типстандартизациианализаданных типупорядочиванияправилассоциациианализаданных '\n + 'типупорядочиванияшаблоновпоследовательностейанализаданных типупрощениядереварешений ';\n\n // v8 системные перечисления - xml, json, xs, dom, xdto, web-сервисы ==> class\n const v8_system_enums_xml_json_xs_dom_xdto_ws =\n 'wsнаправлениепараметра вариантxpathxs вариантзаписидатыjson вариантпростоготипаxs видгруппымоделиxs видфасетаxdto '\n + 'действиепостроителяdom завершенностьпростоготипаxs завершенностьсоставноготипаxs завершенностьсхемыxs запрещенныеподстановкиxs '\n + 'исключениягруппподстановкиxs категорияиспользованияатрибутаxs категорияограниченияидентичностиxs категорияограниченияпространствименxs '\n + 'методнаследованияxs модельсодержимогоxs назначениетипаxml недопустимыеподстановкиxs обработкапробельныхсимволовxs обработкасодержимогоxs '\n + 'ограничениезначенияxs параметрыотбораузловdom переносстрокjson позициявдокументеdom пробельныесимволыxml типатрибутаxml типзначенияjson '\n + 'типканоническогоxml типкомпонентыxs типпроверкиxml типрезультатаdomxpath типузлаdom типузлаxml формаxml формапредставленияxs '\n + 'форматдатыjson экранированиесимволовjson ';\n\n // v8 системные перечисления - система компоновки данных ==> class\n const v8_system_enums_data_composition_system =\n 'видсравнениякомпоновкиданных действиеобработкирасшифровкикомпоновкиданных направлениесортировкикомпоновкиданных '\n + 'расположениевложенныхэлементоврезультатакомпоновкиданных расположениеитоговкомпоновкиданных расположениегруппировкикомпоновкиданных '\n + 'расположениеполейгруппировкикомпоновкиданных расположениеполякомпоновкиданных расположениереквизитовкомпоновкиданных '\n + 'расположениересурсовкомпоновкиданных типбухгалтерскогоостаткакомпоновкиданных типвыводатекстакомпоновкиданных '\n + 'типгруппировкикомпоновкиданных типгруппыэлементовотборакомпоновкиданных типдополненияпериодакомпоновкиданных '\n + 'типзаголовкаполейкомпоновкиданных типмакетагруппировкикомпоновкиданных типмакетаобластикомпоновкиданных типостаткакомпоновкиданных '\n + 'типпериодакомпоновкиданных типразмещениятекстакомпоновкиданных типсвязинаборовданныхкомпоновкиданных типэлементарезультатакомпоновкиданных '\n + 'расположениелегендыдиаграммыкомпоновкиданных типпримененияотборакомпоновкиданных режимотображенияэлементанастройкикомпоновкиданных '\n + 'режимотображениянастроеккомпоновкиданных состояниеэлементанастройкикомпоновкиданных способвосстановлениянастроеккомпоновкиданных '\n + 'режимкомпоновкирезультата использованиепараметракомпоновкиданных автопозицияресурсовкомпоновкиданных '\n + 'вариантиспользованиягруппировкикомпоновкиданных расположениересурсоввдиаграммекомпоновкиданных фиксациякомпоновкиданных '\n + 'использованиеусловногооформлениякомпоновкиданных ';\n\n // v8 системные перечисления - почта ==> class\n const v8_system_enums_email =\n 'важностьинтернетпочтовогосообщения обработкатекстаинтернетпочтовогосообщения способкодированияинтернетпочтовоговложения '\n + 'способкодированиянеasciiсимволовинтернетпочтовогосообщения типтекстапочтовогосообщения протоколинтернетпочты '\n + 'статусразборапочтовогосообщения ';\n\n // v8 системные перечисления - журнал регистрации ==> class\n const v8_system_enums_logbook =\n 'режимтранзакциизаписижурналарегистрации статустранзакциизаписижурналарегистрации уровеньжурналарегистрации ';\n\n // v8 системные перечисления - криптография ==> class\n const v8_system_enums_cryptography =\n 'расположениехранилищасертификатовкриптографии режимвключениясертификатовкриптографии режимпроверкисертификатакриптографии '\n + 'типхранилищасертификатовкриптографии ';\n\n // v8 системные перечисления - ZIP ==> class\n const v8_system_enums_zip =\n 'кодировкаименфайловвzipфайле методсжатияzip методшифрованияzip режимвосстановленияпутейфайловzip режимобработкиподкаталоговzip '\n + 'режимсохраненияпутейzip уровеньсжатияzip ';\n\n // v8 системные перечисления -\n // Блокировка данных, Фоновые задания, Автоматизированное тестирование,\n // Доставляемые уведомления, Встроенные покупки, Интернет, Работа с двоичными данными ==> class\n const v8_system_enums_other =\n 'звуковоеоповещение направлениепереходакстроке позициявпотоке порядокбайтов режимблокировкиданных режимуправленияблокировкойданных '\n + 'сервисвстроенныхпокупок состояниефоновогозадания типподписчикадоставляемыхуведомлений уровеньиспользованиязащищенногосоединенияftp ';\n\n // v8 системные перечисления - схема запроса ==> class\n const v8_system_enums_request_schema =\n 'направлениепорядкасхемызапроса типдополненияпериодамисхемызапроса типконтрольнойточкисхемызапроса типобъединениясхемызапроса '\n + 'типпараметрадоступнойтаблицысхемызапроса типсоединениясхемызапроса ';\n\n // v8 системные перечисления - свойства объектов метаданных ==> class\n const v8_system_enums_properties_of_metadata_objects =\n 'httpметод автоиспользованиеобщегореквизита автопрефиксномеразадачи вариантвстроенногоязыка видиерархии видрегистранакопления '\n + 'видтаблицывнешнегоисточникаданных записьдвиженийприпроведении заполнениепоследовательностей индексирование '\n + 'использованиебазыпланавидоврасчета использованиебыстроговыбора использованиеобщегореквизита использованиеподчинения '\n + 'использованиеполнотекстовогопоиска использованиеразделяемыхданныхобщегореквизита использованиереквизита '\n + 'назначениеиспользованияприложения назначениерасширенияконфигурации направлениепередачи обновлениепредопределенныхданных '\n + 'оперативноепроведение основноепредставлениевидарасчета основноепредставлениевидахарактеристики основноепредставлениезадачи '\n + 'основноепредставлениепланаобмена основноепредставлениесправочника основноепредставлениесчета перемещениеграницыприпроведении '\n + 'периодичностьномерабизнеспроцесса периодичностьномерадокумента периодичностьрегистрарасчета периодичностьрегистрасведений '\n + 'повторноеиспользованиевозвращаемыхзначений полнотекстовыйпоискпривводепостроке принадлежностьобъекта проведение '\n + 'разделениеаутентификацииобщегореквизита разделениеданныхобщегореквизита разделениерасширенийконфигурацииобщегореквизита '\n + 'режимавтонумерацииобъектов режимзаписирегистра режимиспользованиямодальности '\n + 'режимиспользованиясинхронныхвызововрасширенийплатформыивнешнихкомпонент режимповторногоиспользованиясеансов '\n + 'режимполученияданныхвыборапривводепостроке режимсовместимости режимсовместимостиинтерфейса '\n + 'режимуправленияблокировкойданныхпоумолчанию сериикодовпланавидовхарактеристик сериикодовпланасчетов '\n + 'сериикодовсправочника созданиепривводе способвыбора способпоискастрокипривводепостроке способредактирования '\n + 'типданныхтаблицывнешнегоисточникаданных типкодапланавидоврасчета типкодасправочника типмакета типномерабизнеспроцесса '\n + 'типномерадокумента типномеразадачи типформы удалениедвижений ';\n\n // v8 системные перечисления - разные ==> class\n const v8_system_enums_differents =\n 'важностьпроблемыприменениярасширенияконфигурации вариантинтерфейсаклиентскогоприложения вариантмасштабаформклиентскогоприложения '\n + 'вариантосновногошрифтаклиентскогоприложения вариантстандартногопериода вариантстандартнойдатыначала видграницы видкартинки '\n + 'видотображенияполнотекстовогопоиска видрамки видсравнения видцвета видчисловогозначения видшрифта допустимаядлина допустимыйзнак '\n + 'использованиеbyteordermark использованиеметаданныхполнотекстовогопоиска источникрасширенийконфигурации клавиша кодвозвратадиалога '\n + 'кодировкаxbase кодировкатекста направлениепоиска направлениесортировки обновлениепредопределенныхданных обновлениеприизмененииданных '\n + 'отображениепанелиразделов проверказаполнения режимдиалогавопрос режимзапускаклиентскогоприложения режимокругления режимоткрытияформприложения '\n + 'режимполнотекстовогопоиска скоростьклиентскогосоединения состояниевнешнегоисточникаданных состояниеобновленияконфигурациибазыданных '\n + 'способвыборасертификатаwindows способкодированиястроки статуссообщения типвнешнейкомпоненты типплатформы типповеденияклавишиenter '\n + 'типэлементаинформацииовыполненииобновленияконфигурациибазыданных уровеньизоляциитранзакций хешфункция частидаты';\n\n // class: встроенные наборы значений, системные перечисления (содержат дочерние значения, обращения к которым через разыменование)\n const CLASS =\n v8_system_sets_of_values\n + v8_system_enums_interface\n + v8_system_enums_objects_properties\n + v8_system_enums_exchange_plans\n + v8_system_enums_tabular_document\n + v8_system_enums_sheduler\n + v8_system_enums_formatted_document\n + v8_system_enums_query\n + v8_system_enums_report_builder\n + v8_system_enums_files\n + v8_system_enums_query_builder\n + v8_system_enums_data_analysis\n + v8_system_enums_xml_json_xs_dom_xdto_ws\n + v8_system_enums_data_composition_system\n + v8_system_enums_email\n + v8_system_enums_logbook\n + v8_system_enums_cryptography\n + v8_system_enums_zip\n + v8_system_enums_other\n + v8_system_enums_request_schema\n + v8_system_enums_properties_of_metadata_objects\n + v8_system_enums_differents;\n\n // v8 общие объекты (у объектов есть конструктор, экземпляры создаются методом НОВЫЙ) ==> type\n const v8_shared_object =\n 'comобъект ftpсоединение httpзапрос httpсервисответ httpсоединение wsопределения wsпрокси xbase анализданных аннотацияxs '\n + 'блокировкаданных буфердвоичныхданных включениеxs выражениекомпоновкиданных генераторслучайныхчисел географическаясхема '\n + 'географическиекоординаты графическаясхема группамоделиxs данныерасшифровкикомпоновкиданных двоичныеданные дендрограмма '\n + 'диаграмма диаграммаганта диалогвыборафайла диалогвыборацвета диалогвыборашрифта диалограсписаниярегламентногозадания '\n + 'диалогредактированиястандартногопериода диапазон документdom документhtml документацияxs доставляемоеуведомление '\n + 'записьdom записьfastinfoset записьhtml записьjson записьxml записьzipфайла записьданных записьтекста записьузловdom '\n + 'запрос защищенноесоединениеopenssl значенияполейрасшифровкикомпоновкиданных извлечениетекста импортxs интернетпочта '\n + 'интернетпочтовоесообщение интернетпочтовыйпрофиль интернетпрокси интернетсоединение информациядляприложенияxs '\n + 'использованиеатрибутаxs использованиесобытияжурналарегистрации источникдоступныхнастроеккомпоновкиданных '\n + 'итераторузловdom картинка квалификаторыдаты квалификаторыдвоичныхданных квалификаторыстроки квалификаторычисла '\n + 'компоновщикмакетакомпоновкиданных компоновщикнастроеккомпоновкиданных конструктормакетаоформлениякомпоновкиданных '\n + 'конструкторнастроеккомпоновкиданных конструкторформатнойстроки линия макеткомпоновкиданных макетобластикомпоновкиданных '\n + 'макетоформлениякомпоновкиданных маскаxs менеджеркриптографии наборсхемxml настройкикомпоновкиданных настройкисериализацииjson '\n + 'обработкакартинок обработкарасшифровкикомпоновкиданных обходдереваdom объявлениеатрибутаxs объявлениенотацииxs '\n + 'объявлениеэлементаxs описаниеиспользованиясобытиядоступжурналарегистрации '\n + 'описаниеиспользованиясобытияотказвдоступежурналарегистрации описаниеобработкирасшифровкикомпоновкиданных '\n + 'описаниепередаваемогофайла описаниетипов определениегруппыатрибутовxs определениегруппымоделиxs '\n + 'определениеограниченияидентичностиxs определениепростоготипаxs определениесоставноготипаxs определениетипадокументаdom '\n + 'определенияxpathxs отборкомпоновкиданных пакетотображаемыхдокументов параметрвыбора параметркомпоновкиданных '\n + 'параметрызаписиjson параметрызаписиxml параметрычтенияxml переопределениеxs планировщик полеанализаданных '\n + 'полекомпоновкиданных построительdom построительзапроса построительотчета построительотчетаанализаданных '\n + 'построительсхемxml поток потоквпамяти почта почтовоесообщение преобразованиеxsl преобразованиекканоническомуxml '\n + 'процессорвыводарезультатакомпоновкиданныхвколлекциюзначений процессорвыводарезультатакомпоновкиданныхвтабличныйдокумент '\n + 'процессоркомпоновкиданных разыменовательпространствименdom рамка расписаниерегламентногозадания расширенноеимяxml '\n + 'результатчтенияданных своднаядиаграмма связьпараметравыбора связьпотипу связьпотипукомпоновкиданных сериализаторxdto '\n + 'сертификатклиентаwindows сертификатклиентафайл сертификаткриптографии сертификатыудостоверяющихцентровwindows '\n + 'сертификатыудостоверяющихцентровфайл сжатиеданных системнаяинформация сообщениепользователю сочетаниеклавиш '\n + 'сравнениезначений стандартнаядатаначала стандартныйпериод схемаxml схемакомпоновкиданных табличныйдокумент '\n + 'текстовыйдокумент тестируемоеприложение типданныхxml уникальныйидентификатор фабрикаxdto файл файловыйпоток '\n + 'фасетдлиныxs фасетколичестваразрядовдробнойчастиxs фасетмаксимальноговключающегозначенияxs '\n + 'фасетмаксимальногоисключающегозначенияxs фасетмаксимальнойдлиныxs фасетминимальноговключающегозначенияxs '\n + 'фасетминимальногоисключающегозначенияxs фасетминимальнойдлиныxs фасетобразцаxs фасетобщегоколичестваразрядовxs '\n + 'фасетперечисленияxs фасетпробельныхсимволовxs фильтрузловdom форматированнаястрока форматированныйдокумент '\n + 'фрагментxs хешированиеданных хранилищезначения цвет чтениеfastinfoset чтениеhtml чтениеjson чтениеxml чтениеzipфайла '\n + 'чтениеданных чтениетекста чтениеузловdom шрифт элементрезультатакомпоновкиданных ';\n\n // v8 универсальные коллекции значений ==> type\n const v8_universal_collection =\n 'comsafearray деревозначений массив соответствие списокзначений структура таблицазначений фиксированнаяструктура '\n + 'фиксированноесоответствие фиксированныймассив ';\n\n // type : встроенные типы\n const TYPE =\n v8_shared_object\n + v8_universal_collection;\n\n // literal : примитивные типы\n const LITERAL = 'null истина ложь неопределено';\n\n // number : числа\n const NUMBERS = hljs.inherit(hljs.NUMBER_MODE);\n\n // string : строки\n const STRINGS = {\n className: 'string',\n begin: '\"|\\\\|',\n end: '\"|$',\n contains: [ { begin: '\"\"' } ]\n };\n\n // number : даты\n const DATE = {\n begin: \"'\",\n end: \"'\",\n excludeBegin: true,\n excludeEnd: true,\n contains: [\n {\n className: 'number',\n begin: '\\\\d{4}([\\\\.\\\\\\\\/:-]?\\\\d{2}){0,5}'\n }\n ]\n };\n\n // comment : комментарии\n const COMMENTS = hljs.inherit(hljs.C_LINE_COMMENT_MODE);\n\n // meta : инструкции препроцессора, директивы компиляции\n const META = {\n className: 'meta',\n\n begin: '#|&',\n end: '$',\n keywords: {\n $pattern: UNDERSCORE_IDENT_RE,\n keyword: KEYWORD + METAKEYWORD\n },\n contains: [ COMMENTS ]\n };\n\n // symbol : метка goto\n const SYMBOL = {\n className: 'symbol',\n begin: '~',\n end: ';|:',\n excludeEnd: true\n };\n\n // function : объявление процедур и функций\n const FUNCTION = {\n className: 'function',\n variants: [\n {\n begin: 'процедура|функция',\n end: '\\\\)',\n keywords: 'процедура функция'\n },\n {\n begin: 'конецпроцедуры|конецфункции',\n keywords: 'конецпроцедуры конецфункции'\n }\n ],\n contains: [\n {\n begin: '\\\\(',\n end: '\\\\)',\n endsParent: true,\n contains: [\n {\n className: 'params',\n begin: UNDERSCORE_IDENT_RE,\n end: ',',\n excludeEnd: true,\n endsWithParent: true,\n keywords: {\n $pattern: UNDERSCORE_IDENT_RE,\n keyword: 'знач',\n literal: LITERAL\n },\n contains: [\n NUMBERS,\n STRINGS,\n DATE\n ]\n },\n COMMENTS\n ]\n },\n hljs.inherit(hljs.TITLE_MODE, { begin: UNDERSCORE_IDENT_RE })\n ]\n };\n\n return {\n name: '1C:Enterprise',\n case_insensitive: true,\n keywords: {\n $pattern: UNDERSCORE_IDENT_RE,\n keyword: KEYWORD,\n built_in: BUILTIN,\n class: CLASS,\n type: TYPE,\n literal: LITERAL\n },\n contains: [\n META,\n FUNCTION,\n COMMENTS,\n SYMBOL,\n NUMBERS,\n STRINGS,\n DATE\n ]\n };\n}\n\nmodule.exports = _1c;\n","/*\nLanguage: Augmented Backus-Naur Form\nAuthor: Alex McKibben \nWebsite: https://tools.ietf.org/html/rfc5234\nAudit: 2020\n*/\n\n/** @type LanguageFn */\nfunction abnf(hljs) {\n const regex = hljs.regex;\n const IDENT = /^[a-zA-Z][a-zA-Z0-9-]*/;\n\n const KEYWORDS = [\n \"ALPHA\",\n \"BIT\",\n \"CHAR\",\n \"CR\",\n \"CRLF\",\n \"CTL\",\n \"DIGIT\",\n \"DQUOTE\",\n \"HEXDIG\",\n \"HTAB\",\n \"LF\",\n \"LWSP\",\n \"OCTET\",\n \"SP\",\n \"VCHAR\",\n \"WSP\"\n ];\n\n const COMMENT = hljs.COMMENT(/;/, /$/);\n\n const TERMINAL_BINARY = {\n scope: \"symbol\",\n match: /%b[0-1]+(-[0-1]+|(\\.[0-1]+)+)?/\n };\n\n const TERMINAL_DECIMAL = {\n scope: \"symbol\",\n match: /%d[0-9]+(-[0-9]+|(\\.[0-9]+)+)?/\n };\n\n const TERMINAL_HEXADECIMAL = {\n scope: \"symbol\",\n match: /%x[0-9A-F]+(-[0-9A-F]+|(\\.[0-9A-F]+)+)?/\n };\n\n const CASE_SENSITIVITY = {\n scope: \"symbol\",\n match: /%[si](?=\".*\")/\n };\n\n const RULE_DECLARATION = {\n scope: \"attribute\",\n match: regex.concat(IDENT, /(?=\\s*=)/)\n };\n\n const ASSIGNMENT = {\n scope: \"operator\",\n match: /=\\/?/\n };\n\n return {\n name: 'Augmented Backus-Naur Form',\n illegal: /[!@#$^&',?+~`|:]/,\n keywords: KEYWORDS,\n contains: [\n ASSIGNMENT,\n RULE_DECLARATION,\n COMMENT,\n TERMINAL_BINARY,\n TERMINAL_DECIMAL,\n TERMINAL_HEXADECIMAL,\n CASE_SENSITIVITY,\n hljs.QUOTE_STRING_MODE,\n hljs.NUMBER_MODE\n ]\n };\n}\n\nmodule.exports = abnf;\n","/*\n Language: Apache Access Log\n Author: Oleg Efimov \n Description: Apache/Nginx Access Logs\n Website: https://httpd.apache.org/docs/2.4/logs.html#accesslog\n Category: web, logs\n Audit: 2020\n */\n\n/** @type LanguageFn */\nfunction accesslog(hljs) {\n const regex = hljs.regex;\n // https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods\n const HTTP_VERBS = [\n \"GET\",\n \"POST\",\n \"HEAD\",\n \"PUT\",\n \"DELETE\",\n \"CONNECT\",\n \"OPTIONS\",\n \"PATCH\",\n \"TRACE\"\n ];\n return {\n name: 'Apache Access Log',\n contains: [\n // IP\n {\n className: 'number',\n begin: /^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b/,\n relevance: 5\n },\n // Other numbers\n {\n className: 'number',\n begin: /\\b\\d+\\b/,\n relevance: 0\n },\n // Requests\n {\n className: 'string',\n begin: regex.concat(/\"/, regex.either(...HTTP_VERBS)),\n end: /\"/,\n keywords: HTTP_VERBS,\n illegal: /\\n/,\n relevance: 5,\n contains: [\n {\n begin: /HTTP\\/[12]\\.\\d'/,\n relevance: 5\n }\n ]\n },\n // Dates\n {\n className: 'string',\n // dates must have a certain length, this prevents matching\n // simple array accesses a[123] and [] and other common patterns\n // found in other languages\n begin: /\\[\\d[^\\]\\n]{8,}\\]/,\n illegal: /\\n/,\n relevance: 1\n },\n {\n className: 'string',\n begin: /\\[/,\n end: /\\]/,\n illegal: /\\n/,\n relevance: 0\n },\n // User agent / relevance boost\n {\n className: 'string',\n begin: /\"Mozilla\\/\\d\\.\\d \\(/,\n end: /\"/,\n illegal: /\\n/,\n relevance: 3\n },\n // Strings\n {\n className: 'string',\n begin: /\"/,\n end: /\"/,\n illegal: /\\n/,\n relevance: 0\n }\n ]\n };\n}\n\nmodule.exports = accesslog;\n","/*\nLanguage: ActionScript\nAuthor: Alexander Myadzel \nCategory: scripting\nAudit: 2020\n*/\n\n/** @type LanguageFn */\nfunction actionscript(hljs) {\n const regex = hljs.regex;\n const IDENT_RE = /[a-zA-Z_$][a-zA-Z0-9_$]*/;\n const PKG_NAME_RE = regex.concat(\n IDENT_RE,\n regex.concat(\"(\\\\.\", IDENT_RE, \")*\")\n );\n const IDENT_FUNC_RETURN_TYPE_RE = /([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)/;\n\n const AS3_REST_ARG_MODE = {\n className: 'rest_arg',\n begin: /[.]{3}/,\n end: IDENT_RE,\n relevance: 10\n };\n\n const KEYWORDS = [\n \"as\",\n \"break\",\n \"case\",\n \"catch\",\n \"class\",\n \"const\",\n \"continue\",\n \"default\",\n \"delete\",\n \"do\",\n \"dynamic\",\n \"each\",\n \"else\",\n \"extends\",\n \"final\",\n \"finally\",\n \"for\",\n \"function\",\n \"get\",\n \"if\",\n \"implements\",\n \"import\",\n \"in\",\n \"include\",\n \"instanceof\",\n \"interface\",\n \"internal\",\n \"is\",\n \"namespace\",\n \"native\",\n \"new\",\n \"override\",\n \"package\",\n \"private\",\n \"protected\",\n \"public\",\n \"return\",\n \"set\",\n \"static\",\n \"super\",\n \"switch\",\n \"this\",\n \"throw\",\n \"try\",\n \"typeof\",\n \"use\",\n \"var\",\n \"void\",\n \"while\",\n \"with\"\n ];\n const LITERALS = [\n \"true\",\n \"false\",\n \"null\",\n \"undefined\"\n ];\n\n return {\n name: 'ActionScript',\n aliases: [ 'as' ],\n keywords: {\n keyword: KEYWORDS,\n literal: LITERALS\n },\n contains: [\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n hljs.C_NUMBER_MODE,\n {\n match: [\n /\\bpackage/,\n /\\s+/,\n PKG_NAME_RE\n ],\n className: {\n 1: \"keyword\",\n 3: \"title.class\"\n }\n },\n {\n match: [\n /\\b(?:class|interface|extends|implements)/,\n /\\s+/,\n IDENT_RE\n ],\n className: {\n 1: \"keyword\",\n 3: \"title.class\"\n }\n },\n {\n className: 'meta',\n beginKeywords: 'import include',\n end: /;/,\n keywords: { keyword: 'import include' }\n },\n {\n beginKeywords: 'function',\n end: /[{;]/,\n excludeEnd: true,\n illegal: /\\S/,\n contains: [\n hljs.inherit(hljs.TITLE_MODE, { className: \"title.function\" }),\n {\n className: 'params',\n begin: /\\(/,\n end: /\\)/,\n contains: [\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n AS3_REST_ARG_MODE\n ]\n },\n { begin: regex.concat(/:\\s*/, IDENT_FUNC_RETURN_TYPE_RE) }\n ]\n },\n hljs.METHOD_GUARD\n ],\n illegal: /#/\n };\n}\n\nmodule.exports = actionscript;\n","/*\nLanguage: Ada\nAuthor: Lars Schulna \nDescription: Ada is a general-purpose programming language that has great support for saftey critical and real-time applications.\n It has been developed by the DoD and thus has been used in military and safety-critical applications (like civil aviation).\n The first version appeared in the 80s, but it's still actively developed today with\n the newest standard being Ada2012.\n*/\n\n// We try to support full Ada2012\n//\n// We highlight all appearances of types, keywords, literals (string, char, number, bool)\n// and titles (user defined function/procedure/package)\n// CSS classes are set accordingly\n//\n// Languages causing problems for language detection:\n// xml (broken by Foo : Bar type), elm (broken by Foo : Bar type), vbscript-html (broken by body keyword)\n// sql (ada default.txt has a lot of sql keywords)\n\n/** @type LanguageFn */\nfunction ada(hljs) {\n // Regular expression for Ada numeric literals.\n // stolen form the VHDL highlighter\n\n // Decimal literal:\n const INTEGER_RE = '\\\\d(_|\\\\d)*';\n const EXPONENT_RE = '[eE][-+]?' + INTEGER_RE;\n const DECIMAL_LITERAL_RE = INTEGER_RE + '(\\\\.' + INTEGER_RE + ')?' + '(' + EXPONENT_RE + ')?';\n\n // Based literal:\n const BASED_INTEGER_RE = '\\\\w+';\n const BASED_LITERAL_RE = INTEGER_RE + '#' + BASED_INTEGER_RE + '(\\\\.' + BASED_INTEGER_RE + ')?' + '#' + '(' + EXPONENT_RE + ')?';\n\n const NUMBER_RE = '\\\\b(' + BASED_LITERAL_RE + '|' + DECIMAL_LITERAL_RE + ')';\n\n // Identifier regex\n const ID_REGEX = '[A-Za-z](_?[A-Za-z0-9.])*';\n\n // bad chars, only allowed in literals\n const BAD_CHARS = `[]\\\\{\\\\}%#'\"`;\n\n // Ada doesn't have block comments, only line comments\n const COMMENTS = hljs.COMMENT('--', '$');\n\n // variable declarations of the form\n // Foo : Bar := Baz;\n // where only Bar will be highlighted\n const VAR_DECLS = {\n // TODO: These spaces are not required by the Ada syntax\n // however, I have yet to see handwritten Ada code where\n // someone does not put spaces around :\n begin: '\\\\s+:\\\\s+',\n end: '\\\\s*(:=|;|\\\\)|=>|$)',\n // endsWithParent: true,\n // returnBegin: true,\n illegal: BAD_CHARS,\n contains: [\n {\n // workaround to avoid highlighting\n // named loops and declare blocks\n beginKeywords: 'loop for declare others',\n endsParent: true\n },\n {\n // properly highlight all modifiers\n className: 'keyword',\n beginKeywords: 'not null constant access function procedure in out aliased exception'\n },\n {\n className: 'type',\n begin: ID_REGEX,\n endsParent: true,\n relevance: 0\n }\n ]\n };\n\n const KEYWORDS = [\n \"abort\",\n \"else\",\n \"new\",\n \"return\",\n \"abs\",\n \"elsif\",\n \"not\",\n \"reverse\",\n \"abstract\",\n \"end\",\n \"accept\",\n \"entry\",\n \"select\",\n \"access\",\n \"exception\",\n \"of\",\n \"separate\",\n \"aliased\",\n \"exit\",\n \"or\",\n \"some\",\n \"all\",\n \"others\",\n \"subtype\",\n \"and\",\n \"for\",\n \"out\",\n \"synchronized\",\n \"array\",\n \"function\",\n \"overriding\",\n \"at\",\n \"tagged\",\n \"generic\",\n \"package\",\n \"task\",\n \"begin\",\n \"goto\",\n \"pragma\",\n \"terminate\",\n \"body\",\n \"private\",\n \"then\",\n \"if\",\n \"procedure\",\n \"type\",\n \"case\",\n \"in\",\n \"protected\",\n \"constant\",\n \"interface\",\n \"is\",\n \"raise\",\n \"use\",\n \"declare\",\n \"range\",\n \"delay\",\n \"limited\",\n \"record\",\n \"when\",\n \"delta\",\n \"loop\",\n \"rem\",\n \"while\",\n \"digits\",\n \"renames\",\n \"with\",\n \"do\",\n \"mod\",\n \"requeue\",\n \"xor\"\n ];\n\n return {\n name: 'Ada',\n case_insensitive: true,\n keywords: {\n keyword: KEYWORDS,\n literal: [\n \"True\",\n \"False\"\n ]\n },\n contains: [\n COMMENTS,\n // strings \"foobar\"\n {\n className: 'string',\n begin: /\"/,\n end: /\"/,\n contains: [\n {\n begin: /\"\"/,\n relevance: 0\n }\n ]\n },\n // characters ''\n {\n // character literals always contain one char\n className: 'string',\n begin: /'.'/\n },\n {\n // number literals\n className: 'number',\n begin: NUMBER_RE,\n relevance: 0\n },\n {\n // Attributes\n className: 'symbol',\n begin: \"'\" + ID_REGEX\n },\n {\n // package definition, maybe inside generic\n className: 'title',\n begin: '(\\\\bwith\\\\s+)?(\\\\bprivate\\\\s+)?\\\\bpackage\\\\s+(\\\\bbody\\\\s+)?',\n end: '(is|$)',\n keywords: 'package body',\n excludeBegin: true,\n excludeEnd: true,\n illegal: BAD_CHARS\n },\n {\n // function/procedure declaration/definition\n // maybe inside generic\n begin: '(\\\\b(with|overriding)\\\\s+)?\\\\b(function|procedure)\\\\s+',\n end: '(\\\\bis|\\\\bwith|\\\\brenames|\\\\)\\\\s*;)',\n keywords: 'overriding function procedure with is renames return',\n // we need to re-match the 'function' keyword, so that\n // the title mode below matches only exactly once\n returnBegin: true,\n contains:\n [\n COMMENTS,\n {\n // name of the function/procedure\n className: 'title',\n begin: '(\\\\bwith\\\\s+)?\\\\b(function|procedure)\\\\s+',\n end: '(\\\\(|\\\\s+|$)',\n excludeBegin: true,\n excludeEnd: true,\n illegal: BAD_CHARS\n },\n // 'self'\n // // parameter types\n VAR_DECLS,\n {\n // return type\n className: 'type',\n begin: '\\\\breturn\\\\s+',\n end: '(\\\\s+|;|$)',\n keywords: 'return',\n excludeBegin: true,\n excludeEnd: true,\n // we are done with functions\n endsParent: true,\n illegal: BAD_CHARS\n\n }\n ]\n },\n {\n // new type declarations\n // maybe inside generic\n className: 'type',\n begin: '\\\\b(sub)?type\\\\s+',\n end: '\\\\s+',\n keywords: 'type',\n excludeBegin: true,\n illegal: BAD_CHARS\n },\n\n // see comment above the definition\n VAR_DECLS\n\n // no markup\n // relevance boosters for small snippets\n // {begin: '\\\\s*=>\\\\s*'},\n // {begin: '\\\\s*:=\\\\s*'},\n // {begin: '\\\\s+:=\\\\s+'},\n ]\n };\n}\n\nmodule.exports = ada;\n","/*\nLanguage: AngelScript\nAuthor: Melissa Geels \nCategory: scripting\nWebsite: https://www.angelcode.com/angelscript/\n*/\n\n/** @type LanguageFn */\nfunction angelscript(hljs) {\n const builtInTypeMode = {\n className: 'built_in',\n begin: '\\\\b(void|bool|int8|int16|int32|int64|int|uint8|uint16|uint32|uint64|uint|string|ref|array|double|float|auto|dictionary)'\n };\n\n const objectHandleMode = {\n className: 'symbol',\n begin: '[a-zA-Z0-9_]+@'\n };\n\n const genericMode = {\n className: 'keyword',\n begin: '<',\n end: '>',\n contains: [\n builtInTypeMode,\n objectHandleMode\n ]\n };\n\n builtInTypeMode.contains = [ genericMode ];\n objectHandleMode.contains = [ genericMode ];\n\n const KEYWORDS = [\n \"for\",\n \"in|0\",\n \"break\",\n \"continue\",\n \"while\",\n \"do|0\",\n \"return\",\n \"if\",\n \"else\",\n \"case\",\n \"switch\",\n \"namespace\",\n \"is\",\n \"cast\",\n \"or\",\n \"and\",\n \"xor\",\n \"not\",\n \"get|0\",\n \"in\",\n \"inout|10\",\n \"out\",\n \"override\",\n \"set|0\",\n \"private\",\n \"public\",\n \"const\",\n \"default|0\",\n \"final\",\n \"shared\",\n \"external\",\n \"mixin|10\",\n \"enum\",\n \"typedef\",\n \"funcdef\",\n \"this\",\n \"super\",\n \"import\",\n \"from\",\n \"interface\",\n \"abstract|0\",\n \"try\",\n \"catch\",\n \"protected\",\n \"explicit\",\n \"property\"\n ];\n\n return {\n name: 'AngelScript',\n aliases: [ 'asc' ],\n\n keywords: KEYWORDS,\n\n // avoid close detection with C# and JS\n illegal: '(^using\\\\s+[A-Za-z0-9_\\\\.]+;$|\\\\bfunction\\\\s*[^\\\\(])',\n\n contains: [\n { // 'strings'\n className: 'string',\n begin: '\\'',\n end: '\\'',\n illegal: '\\\\n',\n contains: [ hljs.BACKSLASH_ESCAPE ],\n relevance: 0\n },\n\n // \"\"\"heredoc strings\"\"\"\n {\n className: 'string',\n begin: '\"\"\"',\n end: '\"\"\"'\n },\n\n { // \"strings\"\n className: 'string',\n begin: '\"',\n end: '\"',\n illegal: '\\\\n',\n contains: [ hljs.BACKSLASH_ESCAPE ],\n relevance: 0\n },\n\n hljs.C_LINE_COMMENT_MODE, // single-line comments\n hljs.C_BLOCK_COMMENT_MODE, // comment blocks\n\n { // metadata\n className: 'string',\n begin: '^\\\\s*\\\\[',\n end: '\\\\]'\n },\n\n { // interface or namespace declaration\n beginKeywords: 'interface namespace',\n end: /\\{/,\n illegal: '[;.\\\\-]',\n contains: [\n { // interface or namespace name\n className: 'symbol',\n begin: '[a-zA-Z0-9_]+'\n }\n ]\n },\n\n { // class declaration\n beginKeywords: 'class',\n end: /\\{/,\n illegal: '[;.\\\\-]',\n contains: [\n { // class name\n className: 'symbol',\n begin: '[a-zA-Z0-9_]+',\n contains: [\n {\n begin: '[:,]\\\\s*',\n contains: [\n {\n className: 'symbol',\n begin: '[a-zA-Z0-9_]+'\n }\n ]\n }\n ]\n }\n ]\n },\n\n builtInTypeMode, // built-in types\n objectHandleMode, // object handles\n\n { // literals\n className: 'literal',\n begin: '\\\\b(null|true|false)'\n },\n\n { // numbers\n className: 'number',\n relevance: 0,\n begin: '(-?)(\\\\b0[xXbBoOdD][a-fA-F0-9]+|(\\\\b\\\\d+(\\\\.\\\\d*)?f?|\\\\.\\\\d+f?)([eE][-+]?\\\\d+f?)?)'\n }\n ]\n };\n}\n\nmodule.exports = angelscript;\n","/*\nLanguage: Apache config\nAuthor: Ruslan Keba \nContributors: Ivan Sagalaev \nWebsite: https://httpd.apache.org\nDescription: language definition for Apache configuration files (httpd.conf & .htaccess)\nCategory: config, web\nAudit: 2020\n*/\n\n/** @type LanguageFn */\nfunction apache(hljs) {\n const NUMBER_REF = {\n className: 'number',\n begin: /[$%]\\d+/\n };\n const NUMBER = {\n className: 'number',\n begin: /\\b\\d+/\n };\n const IP_ADDRESS = {\n className: \"number\",\n begin: /\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?/\n };\n const PORT_NUMBER = {\n className: \"number\",\n begin: /:\\d{1,5}/\n };\n return {\n name: 'Apache config',\n aliases: [ 'apacheconf' ],\n case_insensitive: true,\n contains: [\n hljs.HASH_COMMENT_MODE,\n {\n className: 'section',\n begin: /<\\/?/,\n end: />/,\n contains: [\n IP_ADDRESS,\n PORT_NUMBER,\n // low relevance prevents us from claming XML/HTML where this rule would\n // match strings inside of XML tags\n hljs.inherit(hljs.QUOTE_STRING_MODE, { relevance: 0 })\n ]\n },\n {\n className: 'attribute',\n begin: /\\w+/,\n relevance: 0,\n // keywords aren’t needed for highlighting per se, they only boost relevance\n // for a very generally defined mode (starts with a word, ends with line-end\n keywords: { _: [\n \"order\",\n \"deny\",\n \"allow\",\n \"setenv\",\n \"rewriterule\",\n \"rewriteengine\",\n \"rewritecond\",\n \"documentroot\",\n \"sethandler\",\n \"errordocument\",\n \"loadmodule\",\n \"options\",\n \"header\",\n \"listen\",\n \"serverroot\",\n \"servername\"\n ] },\n starts: {\n end: /$/,\n relevance: 0,\n keywords: { literal: 'on off all deny allow' },\n contains: [\n {\n className: 'meta',\n begin: /\\s\\[/,\n end: /\\]$/\n },\n {\n className: 'variable',\n begin: /[\\$%]\\{/,\n end: /\\}/,\n contains: [\n 'self',\n NUMBER_REF\n ]\n },\n IP_ADDRESS,\n NUMBER,\n hljs.QUOTE_STRING_MODE\n ]\n }\n }\n ],\n illegal: /\\S/\n };\n}\n\nmodule.exports = apache;\n","/*\nLanguage: AppleScript\nAuthors: Nathan Grigg , Dr. Drang \nCategory: scripting\nWebsite: https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/introduction/ASLR_intro.html\nAudit: 2020\n*/\n\n/** @type LanguageFn */\nfunction applescript(hljs) {\n const regex = hljs.regex;\n const STRING = hljs.inherit(\n hljs.QUOTE_STRING_MODE, { illegal: null });\n const PARAMS = {\n className: 'params',\n begin: /\\(/,\n end: /\\)/,\n contains: [\n 'self',\n hljs.C_NUMBER_MODE,\n STRING\n ]\n };\n const COMMENT_MODE_1 = hljs.COMMENT(/--/, /$/);\n const COMMENT_MODE_2 = hljs.COMMENT(\n /\\(\\*/,\n /\\*\\)/,\n { contains: [\n 'self', // allow nesting\n COMMENT_MODE_1\n ] }\n );\n const COMMENTS = [\n COMMENT_MODE_1,\n COMMENT_MODE_2,\n hljs.HASH_COMMENT_MODE\n ];\n\n const KEYWORD_PATTERNS = [\n /apart from/,\n /aside from/,\n /instead of/,\n /out of/,\n /greater than/,\n /isn't|(doesn't|does not) (equal|come before|come after|contain)/,\n /(greater|less) than( or equal)?/,\n /(starts?|ends|begins?) with/,\n /contained by/,\n /comes (before|after)/,\n /a (ref|reference)/,\n /POSIX (file|path)/,\n /(date|time) string/,\n /quoted form/\n ];\n\n const BUILT_IN_PATTERNS = [\n /clipboard info/,\n /the clipboard/,\n /info for/,\n /list (disks|folder)/,\n /mount volume/,\n /path to/,\n /(close|open for) access/,\n /(get|set) eof/,\n /current date/,\n /do shell script/,\n /get volume settings/,\n /random number/,\n /set volume/,\n /system attribute/,\n /system info/,\n /time to GMT/,\n /(load|run|store) script/,\n /scripting components/,\n /ASCII (character|number)/,\n /localized string/,\n /choose (application|color|file|file name|folder|from list|remote application|URL)/,\n /display (alert|dialog)/\n ];\n\n return {\n name: 'AppleScript',\n aliases: [ 'osascript' ],\n keywords: {\n keyword:\n 'about above after against and around as at back before beginning '\n + 'behind below beneath beside between but by considering '\n + 'contain contains continue copy div does eighth else end equal '\n + 'equals error every exit fifth first for fourth from front '\n + 'get given global if ignoring in into is it its last local me '\n + 'middle mod my ninth not of on onto or over prop property put ref '\n + 'reference repeat returning script second set seventh since '\n + 'sixth some tell tenth that the|0 then third through thru '\n + 'timeout times to transaction try until where while whose with '\n + 'without',\n literal:\n 'AppleScript false linefeed return pi quote result space tab true',\n built_in:\n 'alias application boolean class constant date file integer list '\n + 'number real record string text '\n + 'activate beep count delay launch log offset read round '\n + 'run say summarize write '\n + 'character characters contents day frontmost id item length '\n + 'month name|0 paragraph paragraphs rest reverse running time version '\n + 'weekday word words year'\n },\n contains: [\n STRING,\n hljs.C_NUMBER_MODE,\n {\n className: 'built_in',\n begin: regex.concat(\n /\\b/,\n regex.either(...BUILT_IN_PATTERNS),\n /\\b/\n )\n },\n {\n className: 'built_in',\n begin: /^\\s*return\\b/\n },\n {\n className: 'literal',\n begin:\n /\\b(text item delimiters|current application|missing value)\\b/\n },\n {\n className: 'keyword',\n begin: regex.concat(\n /\\b/,\n regex.either(...KEYWORD_PATTERNS),\n /\\b/\n )\n },\n {\n beginKeywords: 'on',\n illegal: /[${=;\\n]/,\n contains: [\n hljs.UNDERSCORE_TITLE_MODE,\n PARAMS\n ]\n },\n ...COMMENTS\n ],\n illegal: /\\/\\/|->|=>|\\[\\[/\n };\n}\n\nmodule.exports = applescript;\n","/*\n Language: ArcGIS Arcade\n Category: scripting\n Author: John Foster \n Website: https://developers.arcgis.com/arcade/\n Description: ArcGIS Arcade is an expression language used in many Esri ArcGIS products such as Pro, Online, Server, Runtime, JavaScript, and Python\n*/\n\n/** @type LanguageFn */\nfunction arcade(hljs) {\n const IDENT_RE = '[A-Za-z_][0-9A-Za-z_]*';\n const KEYWORDS = {\n keyword: [\n \"if\",\n \"for\",\n \"while\",\n \"var\",\n \"new\",\n \"function\",\n \"do\",\n \"return\",\n \"void\",\n \"else\",\n \"break\"\n ],\n literal: [\n \"BackSlash\",\n \"DoubleQuote\",\n \"false\",\n \"ForwardSlash\",\n \"Infinity\",\n \"NaN\",\n \"NewLine\",\n \"null\",\n \"PI\",\n \"SingleQuote\",\n \"Tab\",\n \"TextFormatting\",\n \"true\",\n \"undefined\"\n ],\n built_in: [\n \"Abs\",\n \"Acos\",\n \"All\",\n \"Angle\",\n \"Any\",\n \"Area\",\n \"AreaGeodetic\",\n \"Array\",\n \"Asin\",\n \"Atan\",\n \"Atan2\",\n \"Attachments\",\n \"Average\",\n \"Back\",\n \"Bearing\",\n \"Boolean\",\n \"Buffer\",\n \"BufferGeodetic\",\n \"Ceil\",\n \"Centroid\",\n \"Clip\",\n \"Concatenate\",\n \"Console\",\n \"Constrain\",\n \"Contains\",\n \"ConvertDirection\",\n \"Cos\",\n \"Count\",\n \"Crosses\",\n \"Cut\",\n \"Date\",\n \"DateAdd\",\n \"DateDiff\",\n \"Day\",\n \"Decode\",\n \"DefaultValue\",\n \"Densify\",\n \"DensifyGeodetic\",\n \"Dictionary\",\n \"Difference\",\n \"Disjoint\",\n \"Distance\",\n \"DistanceGeodetic\",\n \"Distinct\",\n \"Domain\",\n \"DomainCode\",\n \"DomainName\",\n \"EnvelopeIntersects\",\n \"Equals\",\n \"Erase\",\n \"Exp\",\n \"Expects\",\n \"Extent\",\n \"Feature\",\n \"FeatureSet\",\n \"FeatureSetByAssociation\",\n \"FeatureSetById\",\n \"FeatureSetByName\",\n \"FeatureSetByPortalItem\",\n \"FeatureSetByRelationshipName\",\n \"Filter\",\n \"Find\",\n \"First\",\n \"Floor\",\n \"FromCharCode\",\n \"FromCodePoint\",\n \"FromJSON\",\n \"GdbVersion\",\n \"Generalize\",\n \"Geometry\",\n \"GetFeatureSet\",\n \"GetUser\",\n \"GroupBy\",\n \"Guid\",\n \"Hash\",\n \"HasKey\",\n \"Hour\",\n \"IIf\",\n \"Includes\",\n \"IndexOf\",\n \"Insert\",\n \"Intersection\",\n \"Intersects\",\n \"IsEmpty\",\n \"IsNan\",\n \"ISOMonth\",\n \"ISOWeek\",\n \"ISOWeekday\",\n \"ISOYear\",\n \"IsSelfIntersecting\",\n \"IsSimple\",\n \"Left|0\",\n \"Length\",\n \"Length3D\",\n \"LengthGeodetic\",\n \"Log\",\n \"Lower\",\n \"Map\",\n \"Max\",\n \"Mean\",\n \"Mid\",\n \"Millisecond\",\n \"Min\",\n \"Minute\",\n \"Month\",\n \"MultiPartToSinglePart\",\n \"Multipoint\",\n \"NextSequenceValue\",\n \"None\",\n \"Now\",\n \"Number\",\n \"Offset|0\",\n \"OrderBy\",\n \"Overlaps\",\n \"Point\",\n \"Polygon\",\n \"Polyline\",\n \"Pop\",\n \"Portal\",\n \"Pow\",\n \"Proper\",\n \"Push\",\n \"Random\",\n \"Reduce\",\n \"Relate\",\n \"Replace\",\n \"Resize\",\n \"Reverse\",\n \"Right|0\",\n \"RingIsClockwise\",\n \"Rotate\",\n \"Round\",\n \"Schema\",\n \"Second\",\n \"SetGeometry\",\n \"Simplify\",\n \"Sin\",\n \"Slice\",\n \"Sort\",\n \"Splice\",\n \"Split\",\n \"Sqrt\",\n \"Stdev\",\n \"SubtypeCode\",\n \"SubtypeName\",\n \"Subtypes\",\n \"Sum\",\n \"SymmetricDifference\",\n \"Tan\",\n \"Text\",\n \"Timestamp\",\n \"ToCharCode\",\n \"ToCodePoint\",\n \"Today\",\n \"ToHex\",\n \"ToLocal\",\n \"Top|0\",\n \"Touches\",\n \"ToUTC\",\n \"TrackAccelerationAt\",\n \"TrackAccelerationWindow\",\n \"TrackCurrentAcceleration\",\n \"TrackCurrentDistance\",\n \"TrackCurrentSpeed\",\n \"TrackCurrentTime\",\n \"TrackDistanceAt\",\n \"TrackDistanceWindow\",\n \"TrackDuration\",\n \"TrackFieldWindow\",\n \"TrackGeometryWindow\",\n \"TrackIndex\",\n \"TrackSpeedAt\",\n \"TrackSpeedWindow\",\n \"TrackStartTime\",\n \"TrackWindow\",\n \"Trim\",\n \"TypeOf\",\n \"Union\",\n \"Upper\",\n \"UrlEncode\",\n \"Variance\",\n \"Week\",\n \"Weekday\",\n \"When\",\n \"Within\",\n \"Year\"\n ]\n };\n const SYMBOL = {\n className: 'symbol',\n begin: '\\\\$[datastore|feature|layer|map|measure|sourcefeature|sourcelayer|targetfeature|targetlayer|value|view]+'\n };\n const NUMBER = {\n className: 'number',\n variants: [\n { begin: '\\\\b(0[bB][01]+)' },\n { begin: '\\\\b(0[oO][0-7]+)' },\n { begin: hljs.C_NUMBER_RE }\n ],\n relevance: 0\n };\n const SUBST = {\n className: 'subst',\n begin: '\\\\$\\\\{',\n end: '\\\\}',\n keywords: KEYWORDS,\n contains: [] // defined later\n };\n const TEMPLATE_STRING = {\n className: 'string',\n begin: '`',\n end: '`',\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ]\n };\n SUBST.contains = [\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n TEMPLATE_STRING,\n NUMBER,\n hljs.REGEXP_MODE\n ];\n const PARAMS_CONTAINS = SUBST.contains.concat([\n hljs.C_BLOCK_COMMENT_MODE,\n hljs.C_LINE_COMMENT_MODE\n ]);\n\n return {\n name: 'ArcGIS Arcade',\n case_insensitive: true,\n keywords: KEYWORDS,\n contains: [\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n TEMPLATE_STRING,\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n SYMBOL,\n NUMBER,\n { // object attr container\n begin: /[{,]\\s*/,\n relevance: 0,\n contains: [\n {\n begin: IDENT_RE + '\\\\s*:',\n returnBegin: true,\n relevance: 0,\n contains: [\n {\n className: 'attr',\n begin: IDENT_RE,\n relevance: 0\n }\n ]\n }\n ]\n },\n { // \"value\" container\n begin: '(' + hljs.RE_STARTERS_RE + '|\\\\b(return)\\\\b)\\\\s*',\n keywords: 'return',\n contains: [\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n hljs.REGEXP_MODE,\n {\n className: 'function',\n begin: '(\\\\(.*?\\\\)|' + IDENT_RE + ')\\\\s*=>',\n returnBegin: true,\n end: '\\\\s*=>',\n contains: [\n {\n className: 'params',\n variants: [\n { begin: IDENT_RE },\n { begin: /\\(\\s*\\)/ },\n {\n begin: /\\(/,\n end: /\\)/,\n excludeBegin: true,\n excludeEnd: true,\n keywords: KEYWORDS,\n contains: PARAMS_CONTAINS\n }\n ]\n }\n ]\n }\n ],\n relevance: 0\n },\n {\n beginKeywords: 'function',\n end: /\\{/,\n excludeEnd: true,\n contains: [\n hljs.inherit(hljs.TITLE_MODE, {\n className: \"title.function\",\n begin: IDENT_RE\n }),\n {\n className: 'params',\n begin: /\\(/,\n end: /\\)/,\n excludeBegin: true,\n excludeEnd: true,\n contains: PARAMS_CONTAINS\n }\n ],\n illegal: /\\[|%/\n },\n { begin: /\\$[(.]/ }\n ],\n illegal: /#(?!!)/\n };\n}\n\nmodule.exports = arcade;\n","/*\nLanguage: C++\nCategory: common, system\nWebsite: https://isocpp.org\n*/\n\n/** @type LanguageFn */\nfunction cPlusPlus(hljs) {\n const regex = hljs.regex;\n // added for historic reasons because `hljs.C_LINE_COMMENT_MODE` does\n // not include such support nor can we be sure all the grammars depending\n // on it would desire this behavior\n const C_LINE_COMMENT_MODE = hljs.COMMENT('//', '$', { contains: [ { begin: /\\\\\\n/ } ] });\n const DECLTYPE_AUTO_RE = 'decltype\\\\(auto\\\\)';\n const NAMESPACE_RE = '[a-zA-Z_]\\\\w*::';\n const TEMPLATE_ARGUMENT_RE = '<[^<>]+>';\n const FUNCTION_TYPE_RE = '(?!struct)('\n + DECLTYPE_AUTO_RE + '|'\n + regex.optional(NAMESPACE_RE)\n + '[a-zA-Z_]\\\\w*' + regex.optional(TEMPLATE_ARGUMENT_RE)\n + ')';\n\n const CPP_PRIMITIVE_TYPES = {\n className: 'type',\n begin: '\\\\b[a-z\\\\d_]*_t\\\\b'\n };\n\n // https://en.cppreference.com/w/cpp/language/escape\n // \\\\ \\x \\xFF \\u2837 \\u00323747 \\374\n const CHARACTER_ESCAPES = '\\\\\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\\\S)';\n const STRINGS = {\n className: 'string',\n variants: [\n {\n begin: '(u8?|U|L)?\"',\n end: '\"',\n illegal: '\\\\n',\n contains: [ hljs.BACKSLASH_ESCAPE ]\n },\n {\n begin: '(u8?|U|L)?\\'(' + CHARACTER_ESCAPES + '|.)',\n end: '\\'',\n illegal: '.'\n },\n hljs.END_SAME_AS_BEGIN({\n begin: /(?:u8?|U|L)?R\"([^()\\\\ ]{0,16})\\(/,\n end: /\\)([^()\\\\ ]{0,16})\"/\n })\n ]\n };\n\n const NUMBERS = {\n className: 'number',\n variants: [\n { begin: '\\\\b(0b[01\\']+)' },\n { begin: '(-?)\\\\b([\\\\d\\']+(\\\\.[\\\\d\\']*)?|\\\\.[\\\\d\\']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)' },\n { begin: '(-?)(\\\\b0[xX][a-fA-F0-9\\']+|(\\\\b[\\\\d\\']+(\\\\.[\\\\d\\']*)?|\\\\.[\\\\d\\']+)([eE][-+]?[\\\\d\\']+)?)' }\n ],\n relevance: 0\n };\n\n const PREPROCESSOR = {\n className: 'meta',\n begin: /#\\s*[a-z]+\\b/,\n end: /$/,\n keywords: { keyword:\n 'if else elif endif define undef warning error line '\n + 'pragma _Pragma ifdef ifndef include' },\n contains: [\n {\n begin: /\\\\\\n/,\n relevance: 0\n },\n hljs.inherit(STRINGS, { className: 'string' }),\n {\n className: 'string',\n begin: /<.*?>/\n },\n C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE\n ]\n };\n\n const TITLE_MODE = {\n className: 'title',\n begin: regex.optional(NAMESPACE_RE) + hljs.IDENT_RE,\n relevance: 0\n };\n\n const FUNCTION_TITLE = regex.optional(NAMESPACE_RE) + hljs.IDENT_RE + '\\\\s*\\\\(';\n\n // https://en.cppreference.com/w/cpp/keyword\n const RESERVED_KEYWORDS = [\n 'alignas',\n 'alignof',\n 'and',\n 'and_eq',\n 'asm',\n 'atomic_cancel',\n 'atomic_commit',\n 'atomic_noexcept',\n 'auto',\n 'bitand',\n 'bitor',\n 'break',\n 'case',\n 'catch',\n 'class',\n 'co_await',\n 'co_return',\n 'co_yield',\n 'compl',\n 'concept',\n 'const_cast|10',\n 'consteval',\n 'constexpr',\n 'constinit',\n 'continue',\n 'decltype',\n 'default',\n 'delete',\n 'do',\n 'dynamic_cast|10',\n 'else',\n 'enum',\n 'explicit',\n 'export',\n 'extern',\n 'false',\n 'final',\n 'for',\n 'friend',\n 'goto',\n 'if',\n 'import',\n 'inline',\n 'module',\n 'mutable',\n 'namespace',\n 'new',\n 'noexcept',\n 'not',\n 'not_eq',\n 'nullptr',\n 'operator',\n 'or',\n 'or_eq',\n 'override',\n 'private',\n 'protected',\n 'public',\n 'reflexpr',\n 'register',\n 'reinterpret_cast|10',\n 'requires',\n 'return',\n 'sizeof',\n 'static_assert',\n 'static_cast|10',\n 'struct',\n 'switch',\n 'synchronized',\n 'template',\n 'this',\n 'thread_local',\n 'throw',\n 'transaction_safe',\n 'transaction_safe_dynamic',\n 'true',\n 'try',\n 'typedef',\n 'typeid',\n 'typename',\n 'union',\n 'using',\n 'virtual',\n 'volatile',\n 'while',\n 'xor',\n 'xor_eq'\n ];\n\n // https://en.cppreference.com/w/cpp/keyword\n const RESERVED_TYPES = [\n 'bool',\n 'char',\n 'char16_t',\n 'char32_t',\n 'char8_t',\n 'double',\n 'float',\n 'int',\n 'long',\n 'short',\n 'void',\n 'wchar_t',\n 'unsigned',\n 'signed',\n 'const',\n 'static'\n ];\n\n const TYPE_HINTS = [\n 'any',\n 'auto_ptr',\n 'barrier',\n 'binary_semaphore',\n 'bitset',\n 'complex',\n 'condition_variable',\n 'condition_variable_any',\n 'counting_semaphore',\n 'deque',\n 'false_type',\n 'future',\n 'imaginary',\n 'initializer_list',\n 'istringstream',\n 'jthread',\n 'latch',\n 'lock_guard',\n 'multimap',\n 'multiset',\n 'mutex',\n 'optional',\n 'ostringstream',\n 'packaged_task',\n 'pair',\n 'promise',\n 'priority_queue',\n 'queue',\n 'recursive_mutex',\n 'recursive_timed_mutex',\n 'scoped_lock',\n 'set',\n 'shared_future',\n 'shared_lock',\n 'shared_mutex',\n 'shared_timed_mutex',\n 'shared_ptr',\n 'stack',\n 'string_view',\n 'stringstream',\n 'timed_mutex',\n 'thread',\n 'true_type',\n 'tuple',\n 'unique_lock',\n 'unique_ptr',\n 'unordered_map',\n 'unordered_multimap',\n 'unordered_multiset',\n 'unordered_set',\n 'variant',\n 'vector',\n 'weak_ptr',\n 'wstring',\n 'wstring_view'\n ];\n\n const FUNCTION_HINTS = [\n 'abort',\n 'abs',\n 'acos',\n 'apply',\n 'as_const',\n 'asin',\n 'atan',\n 'atan2',\n 'calloc',\n 'ceil',\n 'cerr',\n 'cin',\n 'clog',\n 'cos',\n 'cosh',\n 'cout',\n 'declval',\n 'endl',\n 'exchange',\n 'exit',\n 'exp',\n 'fabs',\n 'floor',\n 'fmod',\n 'forward',\n 'fprintf',\n 'fputs',\n 'free',\n 'frexp',\n 'fscanf',\n 'future',\n 'invoke',\n 'isalnum',\n 'isalpha',\n 'iscntrl',\n 'isdigit',\n 'isgraph',\n 'islower',\n 'isprint',\n 'ispunct',\n 'isspace',\n 'isupper',\n 'isxdigit',\n 'labs',\n 'launder',\n 'ldexp',\n 'log',\n 'log10',\n 'make_pair',\n 'make_shared',\n 'make_shared_for_overwrite',\n 'make_tuple',\n 'make_unique',\n 'malloc',\n 'memchr',\n 'memcmp',\n 'memcpy',\n 'memset',\n 'modf',\n 'move',\n 'pow',\n 'printf',\n 'putchar',\n 'puts',\n 'realloc',\n 'scanf',\n 'sin',\n 'sinh',\n 'snprintf',\n 'sprintf',\n 'sqrt',\n 'sscanf',\n 'std',\n 'stderr',\n 'stdin',\n 'stdout',\n 'strcat',\n 'strchr',\n 'strcmp',\n 'strcpy',\n 'strcspn',\n 'strlen',\n 'strncat',\n 'strncmp',\n 'strncpy',\n 'strpbrk',\n 'strrchr',\n 'strspn',\n 'strstr',\n 'swap',\n 'tan',\n 'tanh',\n 'terminate',\n 'to_underlying',\n 'tolower',\n 'toupper',\n 'vfprintf',\n 'visit',\n 'vprintf',\n 'vsprintf'\n ];\n\n const LITERALS = [\n 'NULL',\n 'false',\n 'nullopt',\n 'nullptr',\n 'true'\n ];\n\n // https://en.cppreference.com/w/cpp/keyword\n const BUILT_IN = [ '_Pragma' ];\n\n const CPP_KEYWORDS = {\n type: RESERVED_TYPES,\n keyword: RESERVED_KEYWORDS,\n literal: LITERALS,\n built_in: BUILT_IN,\n _type_hints: TYPE_HINTS\n };\n\n const FUNCTION_DISPATCH = {\n className: 'function.dispatch',\n relevance: 0,\n keywords: {\n // Only for relevance, not highlighting.\n _hint: FUNCTION_HINTS },\n begin: regex.concat(\n /\\b/,\n /(?!decltype)/,\n /(?!if)/,\n /(?!for)/,\n /(?!switch)/,\n /(?!while)/,\n hljs.IDENT_RE,\n regex.lookahead(/(<[^<>]+>|)\\s*\\(/))\n };\n\n const EXPRESSION_CONTAINS = [\n FUNCTION_DISPATCH,\n PREPROCESSOR,\n CPP_PRIMITIVE_TYPES,\n C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n NUMBERS,\n STRINGS\n ];\n\n const EXPRESSION_CONTEXT = {\n // This mode covers expression context where we can't expect a function\n // definition and shouldn't highlight anything that looks like one:\n // `return some()`, `else if()`, `(x*sum(1, 2))`\n variants: [\n {\n begin: /=/,\n end: /;/\n },\n {\n begin: /\\(/,\n end: /\\)/\n },\n {\n beginKeywords: 'new throw return else',\n end: /;/\n }\n ],\n keywords: CPP_KEYWORDS,\n contains: EXPRESSION_CONTAINS.concat([\n {\n begin: /\\(/,\n end: /\\)/,\n keywords: CPP_KEYWORDS,\n contains: EXPRESSION_CONTAINS.concat([ 'self' ]),\n relevance: 0\n }\n ]),\n relevance: 0\n };\n\n const FUNCTION_DECLARATION = {\n className: 'function',\n begin: '(' + FUNCTION_TYPE_RE + '[\\\\*&\\\\s]+)+' + FUNCTION_TITLE,\n returnBegin: true,\n end: /[{;=]/,\n excludeEnd: true,\n keywords: CPP_KEYWORDS,\n illegal: /[^\\w\\s\\*&:<>.]/,\n contains: [\n { // to prevent it from being confused as the function title\n begin: DECLTYPE_AUTO_RE,\n keywords: CPP_KEYWORDS,\n relevance: 0\n },\n {\n begin: FUNCTION_TITLE,\n returnBegin: true,\n contains: [ TITLE_MODE ],\n relevance: 0\n },\n // needed because we do not have look-behind on the below rule\n // to prevent it from grabbing the final : in a :: pair\n {\n begin: /::/,\n relevance: 0\n },\n // initializers\n {\n begin: /:/,\n endsWithParent: true,\n contains: [\n STRINGS,\n NUMBERS\n ]\n },\n // allow for multiple declarations, e.g.:\n // extern void f(int), g(char);\n {\n relevance: 0,\n match: /,/\n },\n {\n className: 'params',\n begin: /\\(/,\n end: /\\)/,\n keywords: CPP_KEYWORDS,\n relevance: 0,\n contains: [\n C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n STRINGS,\n NUMBERS,\n CPP_PRIMITIVE_TYPES,\n // Count matching parentheses.\n {\n begin: /\\(/,\n end: /\\)/,\n keywords: CPP_KEYWORDS,\n relevance: 0,\n contains: [\n 'self',\n C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n STRINGS,\n NUMBERS,\n CPP_PRIMITIVE_TYPES\n ]\n }\n ]\n },\n CPP_PRIMITIVE_TYPES,\n C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n PREPROCESSOR\n ]\n };\n\n return {\n name: 'C++',\n aliases: [\n 'cc',\n 'c++',\n 'h++',\n 'hpp',\n 'hh',\n 'hxx',\n 'cxx'\n ],\n keywords: CPP_KEYWORDS,\n illegal: ' rooms (9);`\n begin: '\\\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function)\\\\s*<(?!<)',\n end: '>',\n keywords: CPP_KEYWORDS,\n contains: [\n 'self',\n CPP_PRIMITIVE_TYPES\n ]\n },\n {\n begin: hljs.IDENT_RE + '::',\n keywords: CPP_KEYWORDS\n },\n {\n match: [\n // extra complexity to deal with `enum class` and `enum struct`\n /\\b(?:enum(?:\\s+(?:class|struct))?|class|struct|union)/,\n /\\s+/,\n /\\w+/\n ],\n className: {\n 1: 'keyword',\n 3: 'title.class'\n }\n }\n ])\n };\n}\n\n/*\nLanguage: Arduino\nAuthor: Stefania Mellai \nDescription: The Arduino® Language is a superset of C++. This rules are designed to highlight the Arduino® source code. For info about language see http://www.arduino.cc.\nWebsite: https://www.arduino.cc\n*/\n\n\n/** @type LanguageFn */\nfunction arduino(hljs) {\n const ARDUINO_KW = {\n type: [\n \"boolean\",\n \"byte\",\n \"word\",\n \"String\"\n ],\n built_in: [\n \"KeyboardController\",\n \"MouseController\",\n \"SoftwareSerial\",\n \"EthernetServer\",\n \"EthernetClient\",\n \"LiquidCrystal\",\n \"RobotControl\",\n \"GSMVoiceCall\",\n \"EthernetUDP\",\n \"EsploraTFT\",\n \"HttpClient\",\n \"RobotMotor\",\n \"WiFiClient\",\n \"GSMScanner\",\n \"FileSystem\",\n \"Scheduler\",\n \"GSMServer\",\n \"YunClient\",\n \"YunServer\",\n \"IPAddress\",\n \"GSMClient\",\n \"GSMModem\",\n \"Keyboard\",\n \"Ethernet\",\n \"Console\",\n \"GSMBand\",\n \"Esplora\",\n \"Stepper\",\n \"Process\",\n \"WiFiUDP\",\n \"GSM_SMS\",\n \"Mailbox\",\n \"USBHost\",\n \"Firmata\",\n \"PImage\",\n \"Client\",\n \"Server\",\n \"GSMPIN\",\n \"FileIO\",\n \"Bridge\",\n \"Serial\",\n \"EEPROM\",\n \"Stream\",\n \"Mouse\",\n \"Audio\",\n \"Servo\",\n \"File\",\n \"Task\",\n \"GPRS\",\n \"WiFi\",\n \"Wire\",\n \"TFT\",\n \"GSM\",\n \"SPI\",\n \"SD\"\n ],\n _hints: [\n \"setup\",\n \"loop\",\n \"runShellCommandAsynchronously\",\n \"analogWriteResolution\",\n \"retrieveCallingNumber\",\n \"printFirmwareVersion\",\n \"analogReadResolution\",\n \"sendDigitalPortPair\",\n \"noListenOnLocalhost\",\n \"readJoystickButton\",\n \"setFirmwareVersion\",\n \"readJoystickSwitch\",\n \"scrollDisplayRight\",\n \"getVoiceCallStatus\",\n \"scrollDisplayLeft\",\n \"writeMicroseconds\",\n \"delayMicroseconds\",\n \"beginTransmission\",\n \"getSignalStrength\",\n \"runAsynchronously\",\n \"getAsynchronously\",\n \"listenOnLocalhost\",\n \"getCurrentCarrier\",\n \"readAccelerometer\",\n \"messageAvailable\",\n \"sendDigitalPorts\",\n \"lineFollowConfig\",\n \"countryNameWrite\",\n \"runShellCommand\",\n \"readStringUntil\",\n \"rewindDirectory\",\n \"readTemperature\",\n \"setClockDivider\",\n \"readLightSensor\",\n \"endTransmission\",\n \"analogReference\",\n \"detachInterrupt\",\n \"countryNameRead\",\n \"attachInterrupt\",\n \"encryptionType\",\n \"readBytesUntil\",\n \"robotNameWrite\",\n \"readMicrophone\",\n \"robotNameRead\",\n \"cityNameWrite\",\n \"userNameWrite\",\n \"readJoystickY\",\n \"readJoystickX\",\n \"mouseReleased\",\n \"openNextFile\",\n \"scanNetworks\",\n \"noInterrupts\",\n \"digitalWrite\",\n \"beginSpeaker\",\n \"mousePressed\",\n \"isActionDone\",\n \"mouseDragged\",\n \"displayLogos\",\n \"noAutoscroll\",\n \"addParameter\",\n \"remoteNumber\",\n \"getModifiers\",\n \"keyboardRead\",\n \"userNameRead\",\n \"waitContinue\",\n \"processInput\",\n \"parseCommand\",\n \"printVersion\",\n \"readNetworks\",\n \"writeMessage\",\n \"blinkVersion\",\n \"cityNameRead\",\n \"readMessage\",\n \"setDataMode\",\n \"parsePacket\",\n \"isListening\",\n \"setBitOrder\",\n \"beginPacket\",\n \"isDirectory\",\n \"motorsWrite\",\n \"drawCompass\",\n \"digitalRead\",\n \"clearScreen\",\n \"serialEvent\",\n \"rightToLeft\",\n \"setTextSize\",\n \"leftToRight\",\n \"requestFrom\",\n \"keyReleased\",\n \"compassRead\",\n \"analogWrite\",\n \"interrupts\",\n \"WiFiServer\",\n \"disconnect\",\n \"playMelody\",\n \"parseFloat\",\n \"autoscroll\",\n \"getPINUsed\",\n \"setPINUsed\",\n \"setTimeout\",\n \"sendAnalog\",\n \"readSlider\",\n \"analogRead\",\n \"beginWrite\",\n \"createChar\",\n \"motorsStop\",\n \"keyPressed\",\n \"tempoWrite\",\n \"readButton\",\n \"subnetMask\",\n \"debugPrint\",\n \"macAddress\",\n \"writeGreen\",\n \"randomSeed\",\n \"attachGPRS\",\n \"readString\",\n \"sendString\",\n \"remotePort\",\n \"releaseAll\",\n \"mouseMoved\",\n \"background\",\n \"getXChange\",\n \"getYChange\",\n \"answerCall\",\n \"getResult\",\n \"voiceCall\",\n \"endPacket\",\n \"constrain\",\n \"getSocket\",\n \"writeJSON\",\n \"getButton\",\n \"available\",\n \"connected\",\n \"findUntil\",\n \"readBytes\",\n \"exitValue\",\n \"readGreen\",\n \"writeBlue\",\n \"startLoop\",\n \"IPAddress\",\n \"isPressed\",\n \"sendSysex\",\n \"pauseMode\",\n \"gatewayIP\",\n \"setCursor\",\n \"getOemKey\",\n \"tuneWrite\",\n \"noDisplay\",\n \"loadImage\",\n \"switchPIN\",\n \"onRequest\",\n \"onReceive\",\n \"changePIN\",\n \"playFile\",\n \"noBuffer\",\n \"parseInt\",\n \"overflow\",\n \"checkPIN\",\n \"knobRead\",\n \"beginTFT\",\n \"bitClear\",\n \"updateIR\",\n \"bitWrite\",\n \"position\",\n \"writeRGB\",\n \"highByte\",\n \"writeRed\",\n \"setSpeed\",\n \"readBlue\",\n \"noStroke\",\n \"remoteIP\",\n \"transfer\",\n \"shutdown\",\n \"hangCall\",\n \"beginSMS\",\n \"endWrite\",\n \"attached\",\n \"maintain\",\n \"noCursor\",\n \"checkReg\",\n \"checkPUK\",\n \"shiftOut\",\n \"isValid\",\n \"shiftIn\",\n \"pulseIn\",\n \"connect\",\n \"println\",\n \"localIP\",\n \"pinMode\",\n \"getIMEI\",\n \"display\",\n \"noBlink\",\n \"process\",\n \"getBand\",\n \"running\",\n \"beginSD\",\n \"drawBMP\",\n \"lowByte\",\n \"setBand\",\n \"release\",\n \"bitRead\",\n \"prepare\",\n \"pointTo\",\n \"readRed\",\n \"setMode\",\n \"noFill\",\n \"remove\",\n \"listen\",\n \"stroke\",\n \"detach\",\n \"attach\",\n \"noTone\",\n \"exists\",\n \"buffer\",\n \"height\",\n \"bitSet\",\n \"circle\",\n \"config\",\n \"cursor\",\n \"random\",\n \"IRread\",\n \"setDNS\",\n \"endSMS\",\n \"getKey\",\n \"micros\",\n \"millis\",\n \"begin\",\n \"print\",\n \"write\",\n \"ready\",\n \"flush\",\n \"width\",\n \"isPIN\",\n \"blink\",\n \"clear\",\n \"press\",\n \"mkdir\",\n \"rmdir\",\n \"close\",\n \"point\",\n \"yield\",\n \"image\",\n \"BSSID\",\n \"click\",\n \"delay\",\n \"read\",\n \"text\",\n \"move\",\n \"peek\",\n \"beep\",\n \"rect\",\n \"line\",\n \"open\",\n \"seek\",\n \"fill\",\n \"size\",\n \"turn\",\n \"stop\",\n \"home\",\n \"find\",\n \"step\",\n \"tone\",\n \"sqrt\",\n \"RSSI\",\n \"SSID\",\n \"end\",\n \"bit\",\n \"tan\",\n \"cos\",\n \"sin\",\n \"pow\",\n \"map\",\n \"abs\",\n \"max\",\n \"min\",\n \"get\",\n \"run\",\n \"put\"\n ],\n literal: [\n \"DIGITAL_MESSAGE\",\n \"FIRMATA_STRING\",\n \"ANALOG_MESSAGE\",\n \"REPORT_DIGITAL\",\n \"REPORT_ANALOG\",\n \"INPUT_PULLUP\",\n \"SET_PIN_MODE\",\n \"INTERNAL2V56\",\n \"SYSTEM_RESET\",\n \"LED_BUILTIN\",\n \"INTERNAL1V1\",\n \"SYSEX_START\",\n \"INTERNAL\",\n \"EXTERNAL\",\n \"DEFAULT\",\n \"OUTPUT\",\n \"INPUT\",\n \"HIGH\",\n \"LOW\"\n ]\n };\n\n const ARDUINO = cPlusPlus(hljs);\n\n const kws = /** @type {Record} */ (ARDUINO.keywords);\n\n kws.type = [\n ...kws.type,\n ...ARDUINO_KW.type\n ];\n kws.literal = [\n ...kws.literal,\n ...ARDUINO_KW.literal\n ];\n kws.built_in = [\n ...kws.built_in,\n ...ARDUINO_KW.built_in\n ];\n kws._hints = ARDUINO_KW._hints;\n\n ARDUINO.name = 'Arduino';\n ARDUINO.aliases = [ 'ino' ];\n ARDUINO.supersetOf = \"cpp\";\n\n return ARDUINO;\n}\n\nmodule.exports = arduino;\n","/*\nLanguage: ARM Assembly\nAuthor: Dan Panzarella \nDescription: ARM Assembly including Thumb and Thumb2 instructions\nCategory: assembler\n*/\n\n/** @type LanguageFn */\nfunction armasm(hljs) {\n // local labels: %?[FB]?[AT]?\\d{1,2}\\w+\n\n const COMMENT = { variants: [\n hljs.COMMENT('^[ \\\\t]*(?=#)', '$', {\n relevance: 0,\n excludeBegin: true\n }),\n hljs.COMMENT('[;@]', '$', { relevance: 0 }),\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE\n ] };\n\n return {\n name: 'ARM Assembly',\n case_insensitive: true,\n aliases: [ 'arm' ],\n keywords: {\n $pattern: '\\\\.?' + hljs.IDENT_RE,\n meta:\n // GNU preprocs\n '.2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .arm .thumb .code16 .code32 .force_thumb .thumb_func .ltorg '\n // ARM directives\n + 'ALIAS ALIGN ARM AREA ASSERT ATTR CN CODE CODE16 CODE32 COMMON CP DATA DCB DCD DCDU DCDO DCFD DCFDU DCI DCQ DCQU DCW DCWU DN ELIF ELSE END ENDFUNC ENDIF ENDP ENTRY EQU EXPORT EXPORTAS EXTERN FIELD FILL FUNCTION GBLA GBLL GBLS GET GLOBAL IF IMPORT INCBIN INCLUDE INFO KEEP LCLA LCLL LCLS LTORG MACRO MAP MEND MEXIT NOFP OPT PRESERVE8 PROC QN READONLY RELOC REQUIRE REQUIRE8 RLIST FN ROUT SETA SETL SETS SN SPACE SUBT THUMB THUMBX TTL WHILE WEND ',\n built_in:\n 'r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 ' // standard registers\n + 'w0 w1 w2 w3 w4 w5 w6 w7 w8 w9 w10 w11 w12 w13 w14 w15 ' // 32 bit ARMv8 registers\n + 'w16 w17 w18 w19 w20 w21 w22 w23 w24 w25 w26 w27 w28 w29 w30 '\n + 'x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 ' // 64 bit ARMv8 registers\n + 'x16 x17 x18 x19 x20 x21 x22 x23 x24 x25 x26 x27 x28 x29 x30 '\n + 'pc lr sp ip sl sb fp ' // typical regs plus backward compatibility\n + 'a1 a2 a3 a4 v1 v2 v3 v4 v5 v6 v7 v8 f0 f1 f2 f3 f4 f5 f6 f7 ' // more regs and fp\n + 'p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 ' // coprocessor regs\n + 'c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 ' // more coproc\n + 'q0 q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q14 q15 ' // advanced SIMD NEON regs\n\n // program status registers\n + 'cpsr_c cpsr_x cpsr_s cpsr_f cpsr_cx cpsr_cxs cpsr_xs cpsr_xsf cpsr_sf cpsr_cxsf '\n + 'spsr_c spsr_x spsr_s spsr_f spsr_cx spsr_cxs spsr_xs spsr_xsf spsr_sf spsr_cxsf '\n\n // NEON and VFP registers\n + 's0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 '\n + 's16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s31 '\n + 'd0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 '\n + 'd16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 '\n\n + '{PC} {VAR} {TRUE} {FALSE} {OPT} {CONFIG} {ENDIAN} {CODESIZE} {CPU} {FPU} {ARCHITECTURE} {PCSTOREOFFSET} {ARMASM_VERSION} {INTER} {ROPI} {RWPI} {SWST} {NOSWST} . @'\n },\n contains: [\n {\n className: 'keyword',\n begin: '\\\\b(' // mnemonics\n + 'adc|'\n + '(qd?|sh?|u[qh]?)?add(8|16)?|usada?8|(q|sh?|u[qh]?)?(as|sa)x|'\n + 'and|adrl?|sbc|rs[bc]|asr|b[lx]?|blx|bxj|cbn?z|tb[bh]|bic|'\n + 'bfc|bfi|[su]bfx|bkpt|cdp2?|clz|clrex|cmp|cmn|cpsi[ed]|cps|'\n + 'setend|dbg|dmb|dsb|eor|isb|it[te]{0,3}|lsl|lsr|ror|rrx|'\n + 'ldm(([id][ab])|f[ds])?|ldr((s|ex)?[bhd])?|movt?|mvn|mra|mar|'\n + 'mul|[us]mull|smul[bwt][bt]|smu[as]d|smmul|smmla|'\n + 'mla|umlaal|smlal?([wbt][bt]|d)|mls|smlsl?[ds]|smc|svc|sev|'\n + 'mia([bt]{2}|ph)?|mrr?c2?|mcrr2?|mrs|msr|orr|orn|pkh(tb|bt)|rbit|'\n + 'rev(16|sh)?|sel|[su]sat(16)?|nop|pop|push|rfe([id][ab])?|'\n + 'stm([id][ab])?|str(ex)?[bhd]?|(qd?)?sub|(sh?|q|u[qh]?)?sub(8|16)|'\n + '[su]xt(a?h|a?b(16)?)|srs([id][ab])?|swpb?|swi|smi|tst|teq|'\n + 'wfe|wfi|yield'\n + ')'\n + '(eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|hs|lo)?' // condition codes\n + '[sptrx]?' // legal postfixes\n + '(?=\\\\s)' // followed by space\n },\n COMMENT,\n hljs.QUOTE_STRING_MODE,\n {\n className: 'string',\n begin: '\\'',\n end: '[^\\\\\\\\]\\'',\n relevance: 0\n },\n {\n className: 'title',\n begin: '\\\\|',\n end: '\\\\|',\n illegal: '\\\\n',\n relevance: 0\n },\n {\n className: 'number',\n variants: [\n { // hex\n begin: '[#$=]?0x[0-9a-f]+' },\n { // bin\n begin: '[#$=]?0b[01]+' },\n { // literal\n begin: '[#$=]\\\\d+' },\n { // bare number\n begin: '\\\\b\\\\d+' }\n ],\n relevance: 0\n },\n {\n className: 'symbol',\n variants: [\n { // GNU ARM syntax\n begin: '^[ \\\\t]*[a-z_\\\\.\\\\$][a-z0-9_\\\\.\\\\$]+:' },\n { // ARM syntax\n begin: '^[a-z_\\\\.\\\\$][a-z0-9_\\\\.\\\\$]+' },\n { // label reference\n begin: '[=#]\\\\w+' }\n ],\n relevance: 0\n }\n ]\n };\n}\n\nmodule.exports = armasm;\n","/*\nLanguage: HTML, XML\nWebsite: https://www.w3.org/XML/\nCategory: common, web\nAudit: 2020\n*/\n\n/** @type LanguageFn */\nfunction xml(hljs) {\n const regex = hljs.regex;\n // XML names can have the following additional letters: https://www.w3.org/TR/xml/#NT-NameChar\n // OTHER_NAME_CHARS = /[:\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]/;\n // Element names start with NAME_START_CHAR followed by optional other Unicode letters, ASCII digits, hyphens, underscores, and periods\n // const TAG_NAME_RE = regex.concat(/[A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/, regex.optional(/[A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*:/), /[A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*/);;\n // const XML_IDENT_RE = /[A-Z_a-z:\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]+/;\n // const TAG_NAME_RE = regex.concat(/[A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/, regex.optional(/[A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*:/), /[A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*/);\n // however, to cater for performance and more Unicode support rely simply on the Unicode letter class\n const TAG_NAME_RE = regex.concat(/[\\p{L}_]/u, regex.optional(/[\\p{L}0-9_.-]*:/u), /[\\p{L}0-9_.-]*/u);\n const XML_IDENT_RE = /[\\p{L}0-9._:-]+/u;\n const XML_ENTITIES = {\n className: 'symbol',\n begin: /&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/\n };\n const XML_META_KEYWORDS = {\n begin: /\\s/,\n contains: [\n {\n className: 'keyword',\n begin: /#?[a-z_][a-z1-9_-]+/,\n illegal: /\\n/\n }\n ]\n };\n const XML_META_PAR_KEYWORDS = hljs.inherit(XML_META_KEYWORDS, {\n begin: /\\(/,\n end: /\\)/\n });\n const APOS_META_STRING_MODE = hljs.inherit(hljs.APOS_STRING_MODE, { className: 'string' });\n const QUOTE_META_STRING_MODE = hljs.inherit(hljs.QUOTE_STRING_MODE, { className: 'string' });\n const TAG_INTERNALS = {\n endsWithParent: true,\n illegal: /`]+/ }\n ]\n }\n ]\n }\n ]\n };\n return {\n name: 'HTML, XML',\n aliases: [\n 'html',\n 'xhtml',\n 'rss',\n 'atom',\n 'xjb',\n 'xsd',\n 'xsl',\n 'plist',\n 'wsf',\n 'svg'\n ],\n case_insensitive: true,\n unicodeRegex: true,\n contains: [\n {\n className: 'meta',\n begin: //,\n relevance: 10,\n contains: [\n XML_META_KEYWORDS,\n QUOTE_META_STRING_MODE,\n APOS_META_STRING_MODE,\n XML_META_PAR_KEYWORDS,\n {\n begin: /\\[/,\n end: /\\]/,\n contains: [\n {\n className: 'meta',\n begin: //,\n contains: [\n XML_META_KEYWORDS,\n XML_META_PAR_KEYWORDS,\n QUOTE_META_STRING_MODE,\n APOS_META_STRING_MODE\n ]\n }\n ]\n }\n ]\n },\n hljs.COMMENT(\n //,\n { relevance: 10 }\n ),\n {\n begin: //,\n relevance: 10\n },\n XML_ENTITIES,\n // xml processing instructions\n {\n className: 'meta',\n end: /\\?>/,\n variants: [\n {\n begin: /<\\?xml/,\n relevance: 10,\n contains: [\n QUOTE_META_STRING_MODE\n ]\n },\n {\n begin: /<\\?[a-z][a-z0-9]+/,\n }\n ]\n\n },\n {\n className: 'tag',\n /*\n The lookahead pattern (?=...) ensures that 'begin' only matches\n ')/,\n end: />/,\n keywords: { name: 'style' },\n contains: [ TAG_INTERNALS ],\n starts: {\n end: /<\\/style>/,\n returnEnd: true,\n subLanguage: [\n 'css',\n 'xml'\n ]\n }\n },\n {\n className: 'tag',\n // See the comment in the