github-pages-deploy-action/node_modules/expect/build-es5/index.js.map
2020-01-28 00:08:03 -05:00

1 line
1.1 MiB
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"version":3,"sources":["webpack://expect/webpack/universalModuleDefinition","webpack://expect/webpack/bootstrap","webpack://expect/./node_modules/@babel/code-frame/lib/index.js","webpack://expect/./node_modules/@babel/highlight/lib/index.js","webpack://expect/./node_modules/ansi-regex/index.js","webpack://expect/./node_modules/ansi-styles/index.js","webpack://expect/./node_modules/ansi-styles/node_modules/color-convert/conversions.js","webpack://expect/./node_modules/ansi-styles/node_modules/color-convert/index.js","webpack://expect/./node_modules/ansi-styles/node_modules/color-convert/route.js","webpack://expect/./node_modules/base64-js/index.js","webpack://expect/./node_modules/braces/index.js","webpack://expect/./node_modules/braces/lib/compile.js","webpack://expect/./node_modules/braces/lib/constants.js","webpack://expect/./node_modules/braces/lib/expand.js","webpack://expect/./node_modules/braces/lib/parse.js","webpack://expect/./node_modules/braces/lib/stringify.js","webpack://expect/./node_modules/braces/lib/utils.js","webpack://expect/./node_modules/buffer/index.js","webpack://expect/./node_modules/color-name/index.js","webpack://expect/./node_modules/esutils/lib/ast.js","webpack://expect/./node_modules/esutils/lib/code.js","webpack://expect/./node_modules/esutils/lib/keyword.js","webpack://expect/./node_modules/esutils/lib/utils.js","webpack://expect/./node_modules/fill-range/index.js","webpack://expect/./node_modules/ieee754/index.js","webpack://expect/./node_modules/isarray/index.js","webpack://expect/./node_modules/js-tokens/index.js","webpack://expect/./node_modules/micromatch/index.js","webpack://expect/./node_modules/path-browserify/index.js","webpack://expect/./node_modules/picomatch/index.js","webpack://expect/./node_modules/picomatch/lib/constants.js","webpack://expect/./node_modules/picomatch/lib/parse.js","webpack://expect/./node_modules/picomatch/lib/picomatch.js","webpack://expect/./node_modules/picomatch/lib/scan.js","webpack://expect/./node_modules/picomatch/lib/utils.js","webpack://expect/./node_modules/process/browser.js","webpack://expect/./node_modules/react-is/cjs/react-is.development.js","webpack://expect/./node_modules/react-is/index.js","webpack://expect/./node_modules/slash/index.js","webpack://expect/./node_modules/stack-utils/index.js","webpack://expect/./node_modules/to-regex-range/index.js","webpack://expect/./node_modules/to-regex-range/node_modules/is-number/index.js","webpack://expect/./node_modules/util/node_modules/inherits/inherits_browser.js","webpack://expect/./node_modules/util/support/isBufferBrowser.js","webpack://expect/./node_modules/util/util.js","webpack://expect/(webpack)/buildin/global.js","webpack://expect/(webpack)/buildin/module.js","webpack://expect/./packages/diff-sequences/build/index.js","webpack://expect/./packages/expect/build/fakeChalk.js","webpack://expect/./packages/expect/src/asymmetricMatchers.ts","webpack://expect/./packages/expect/src/extractExpectedAssertionsErrors.ts","webpack://expect/./packages/expect/src/index.ts","webpack://expect/./packages/expect/src/jasmineUtils.ts","webpack://expect/./packages/expect/src/jestMatchersObject.ts","webpack://expect/./packages/expect/src/matchers.ts","webpack://expect/./packages/expect/src/print.ts","webpack://expect/./packages/expect/src/spyMatchers.ts","webpack://expect/./packages/expect/src/toThrowMatchers.ts","webpack://expect/./packages/expect/src/utils.ts","webpack://expect/./packages/jest-diff/build/cleanupSemantic.js","webpack://expect/./packages/jest-diff/build/constants.js","webpack://expect/./packages/jest-diff/build/diffLines.js","webpack://expect/./packages/jest-diff/build/diffStrings.js","webpack://expect/./packages/jest-diff/build/getAlignedDiffs.js","webpack://expect/./packages/jest-diff/build/index.js","webpack://expect/./packages/jest-diff/build/joinAlignedDiffs.js","webpack://expect/./packages/jest-diff/build/normalizeDiffOptions.js","webpack://expect/./packages/jest-diff/build/printDiffs.js","webpack://expect/./packages/jest-get-type/build/index.js","webpack://expect/./packages/jest-matcher-utils/build/Replaceable.js","webpack://expect/./packages/jest-matcher-utils/build/deepCyclicCopyReplaceable.js","webpack://expect/./packages/jest-matcher-utils/build/index.js","webpack://expect/./packages/jest-message-util/build/index.js","webpack://expect/./packages/pretty-format/build/collections.js","webpack://expect/./packages/pretty-format/build/index.js","webpack://expect/./packages/pretty-format/build/plugins/AsymmetricMatcher.js","webpack://expect/./packages/pretty-format/build/plugins/ConvertAnsi.js","webpack://expect/./packages/pretty-format/build/plugins/DOMCollection.js","webpack://expect/./packages/pretty-format/build/plugins/DOMElement.js","webpack://expect/./packages/pretty-format/build/plugins/Immutable.js","webpack://expect/./packages/pretty-format/build/plugins/ReactElement.js","webpack://expect/./packages/pretty-format/build/plugins/ReactTestComponent.js","webpack://expect/./packages/pretty-format/build/plugins/lib/escapeHTML.js","webpack://expect/./packages/pretty-format/build/plugins/lib/markup.js"],"names":["Object","defineProperty","exports","value","codeFrameColumns","default","_default","_highlight","_interopRequireWildcard","require","_getRequireWildcardCache","WeakMap","cache","obj","__esModule","has","get","newObj","hasPropertyDescriptor","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","deprecationWarningShown","getDefs","chalk","gutter","grey","marker","red","bold","message","NEWLINE","getMarkerLines","loc","source","opts","startLoc","assign","column","line","start","endLoc","end","linesAbove","linesBelow","startLine","startColumn","endLine","endColumn","Math","max","min","length","lineDiff","markerLines","i","lineNumber","sourceLength","rawLines","highlighted","highlightCode","forceColor","shouldHighlight","getChalk","defs","maybeHighlight","chalkFn","string","lines","split","hasColumns","numberMaxWidth","String","highlightedLines","frame","slice","map","index","number","paddedNumber","hasMarker","lastMarkerLine","markerLine","Array","isArray","markerSpacing","replace","numberOfMarkers","repeat","join","reset","colNumber","process","emitWarning","deprecationError","Error","name","console","warn","location","highlight","_jsTokens","_esutils","_interopRequireDefault","_chalk","keyword","cyan","capitalized","yellow","jsx_tag","punctuator","magenta","green","regex","comment","invalid","white","bgRed","JSX_TAG","BRACKET","getTokenType","match","offset","text","token","matchToToken","type","isReservedWordES6","test","substr","toLowerCase","highlightTokens","args","colorize","str","options","supportsColor","constructor","enabled","level","code","module","onlyFirst","pattern","RegExp","undefined","wrapAnsi16","fn","wrapAnsi256","wrapAnsi16m","rgb","ansi2ansi","n","rgb2rgb","r","g","b","setLazyProperty","object","property","enumerable","configurable","colorConvert","makeDynamicStyles","wrap","targetSpace","identity","isBackground","styles","entries","sourceSpace","suite","assembleStyles","codes","Map","modifier","dim","italic","underline","inverse","hidden","strikethrough","color","black","blue","blackBright","redBright","greenBright","yellowBright","blueBright","magentaBright","cyanBright","whiteBright","bgColor","bgBlack","bgGreen","bgYellow","bgBlue","bgMagenta","bgCyan","bgWhite","bgBlackBright","bgRedBright","bgGreenBright","bgYellowBright","bgBlueBright","bgMagentaBright","bgCyanBright","bgWhiteBright","gray","bgGray","bgGrey","groupName","group","styleName","style","open","close","cssKeywords","reverseKeywords","keys","convert","channels","labels","hsl","hsv","hwb","cmyk","xyz","lab","lch","hex","ansi16","ansi256","hcg","apple","model","delta","h","s","l","rdif","gdif","bdif","v","diff","diffc","c","w","k","m","y","comparativeDistance","x","reversed","currentClosestDistance","Infinity","currentClosestKeyword","distance","z","a","t2","t3","val","t1","smin","lmin","sv","hi","floor","f","p","q","t","vmin","sl","wh","bl","ratio","y2","x2","z2","hr","atan2","PI","sqrt","cos","sin","saturation","round","ansi","mult","rem","integer","toString","toUpperCase","substring","colorString","char","parseInt","chroma","grayscale","hue","pure","mg","conversions","route","models","wrapRaw","wrappedFn","arg0","conversion","wrapRounded","result","len","forEach","fromModel","routes","routeModels","toModel","raw","buildGraph","graph","parent","deriveBFS","queue","current","pop","adjacents","adjacent","node","unshift","link","from","to","wrapConversion","path","cur","byteLength","toByteArray","fromByteArray","lookup","revLookup","Arr","Uint8Array","charCodeAt","getLens","b64","validLen","indexOf","placeHoldersLen","lens","_byteLength","tmp","arr","curByte","tripletToBase64","num","encodeChunk","uint8","output","push","extraBytes","parts","maxChunkLength","len2","stringify","compile","expand","parse","braces","input","create","concat","nodupes","Set","noempty","filter","Boolean","fill","utils","ast","walk","invalidBlock","isInvalidBrace","invalidNode","escapeInvalid","prefix","isOpen","isClose","prev","nodes","ranges","reduce","range","toRegex","child","MAX_LENGTH","CHAR_0","CHAR_9","CHAR_UPPERCASE_A","CHAR_LOWERCASE_A","CHAR_UPPERCASE_Z","CHAR_LOWERCASE_Z","CHAR_LEFT_PARENTHESES","CHAR_RIGHT_PARENTHESES","CHAR_ASTERISK","CHAR_AMPERSAND","CHAR_AT","CHAR_BACKSLASH","CHAR_BACKTICK","CHAR_CARRIAGE_RETURN","CHAR_CIRCUMFLEX_ACCENT","CHAR_COLON","CHAR_COMMA","CHAR_DOLLAR","CHAR_DOT","CHAR_DOUBLE_QUOTE","CHAR_EQUAL","CHAR_EXCLAMATION_MARK","CHAR_FORM_FEED","CHAR_FORWARD_SLASH","CHAR_HASH","CHAR_HYPHEN_MINUS","CHAR_LEFT_ANGLE_BRACKET","CHAR_LEFT_CURLY_BRACE","CHAR_LEFT_SQUARE_BRACKET","CHAR_LINE_FEED","CHAR_NO_BREAK_SPACE","CHAR_PERCENT","CHAR_PLUS","CHAR_QUESTION_MARK","CHAR_RIGHT_ANGLE_BRACKET","CHAR_RIGHT_CURLY_BRACE","CHAR_RIGHT_SQUARE_BRACKET","CHAR_SEMICOLON","CHAR_SINGLE_QUOTE","CHAR_SPACE","CHAR_TAB","CHAR_UNDERSCORE","CHAR_VERTICAL_LINE","CHAR_ZERO_WIDTH_NOBREAK_SPACE","append","stash","enclose","flatten","ele","item","rangeLimit","dollar","exceedsLimit","step","RangeError","encloseBrace","block","TypeError","maxLength","SyntaxError","stack","brackets","depth","memo","advance","keepEscaping","closed","next","keepQuotes","brace","commas","shift","siblings","before","splice","isOpenOrClose","isInteger","Number","trim","find","limit","escapeNode","escaped","acc","flat","base64","ieee754","Buffer","SlowBuffer","INSPECT_MAX_BYTES","TYPED_ARRAY_SUPPORT","global","typedArraySupport","kMaxLength","__proto__","foo","subarray","e","createBuffer","that","arg","encodingOrOffset","allocUnsafe","poolSize","_augment","ArrayBuffer","fromArrayBuffer","fromString","fromObject","Symbol","species","assertSize","size","alloc","encoding","checked","allocUnsafeSlow","isEncoding","actual","write","fromArrayLike","array","byteOffset","isBuffer","copy","buffer","isnan","data","_isBuffer","compare","list","pos","buf","isView","loweredCase","utf8ToBytes","base64ToBytes","slowToString","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","swap","swap16","swap32","swap64","arguments","apply","equals","inspect","target","thisStart","thisEnd","thisCopy","targetCopy","bidirectionalIndexOf","dir","isNaN","arrayIndexOf","lastIndexOf","indexSize","arrLength","valLength","read","readUInt16BE","foundIndex","found","j","includes","hexWrite","remaining","strLen","parsed","utf8Write","blitBuffer","asciiWrite","asciiToBytes","latin1Write","base64Write","ucs2Write","utf16leToBytes","isFinite","toJSON","_arr","res","firstByte","codePoint","bytesPerSequence","secondByte","thirdByte","fourthByte","tempCodePoint","decodeCodePointsArray","MAX_ARGUMENTS_LENGTH","codePoints","fromCharCode","ret","out","toHex","bytes","newBuf","sliceLen","checkOffset","ext","readUIntLE","noAssert","mul","readUIntBE","readUInt8","readUInt16LE","readUInt32LE","readUInt32BE","readIntLE","pow","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","checkInt","writeUIntLE","maxBytes","writeUIntBE","writeUInt8","objectWriteUInt16","littleEndian","writeUInt16LE","writeUInt16BE","objectWriteUInt32","writeUInt32LE","writeUInt32BE","writeIntLE","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","checkIEEE754","writeFloat","writeFloatLE","writeFloatBE","writeDouble","writeDoubleLE","writeDoubleBE","targetStart","INVALID_BASE64_RE","base64clean","stringtrim","units","leadSurrogate","byteArray","lo","src","dst","isExpression","isIterationStatement","isStatement","isSourceElement","trailingStatement","alternate","consequent","body","isProblematicIfStatement","ES6Regex","ES5Regex","NON_ASCII_WHITESPACES","IDENTIFIER_START","IDENTIFIER_PART","ch","NonAsciiIdentifierStart","NonAsciiIdentifierPart","isDecimalDigit","isHexDigit","isOctalDigit","isWhiteSpace","isLineTerminator","fromCodePoint","cp","cu1","cu2","isIdentifierStartES5","isIdentifierPartES5","isIdentifierStartES6","isIdentifierPartES6","isStrictModeReservedWordES6","id","isKeywordES5","strict","isKeywordES6","isReservedWordES5","isRestrictedWord","isIdentifierNameES5","iz","decodeUtf16","lead","trail","isIdentifierNameES6","lowCh","check","isIdentifierES5","isIdentifierES6","util","toRegexRange","isObject","transform","toNumber","isValidValue","isNumber","zeros","pad","dash","padStart","toMaxLen","negative","toSequence","negatives","sort","positives","capture","toRange","isNumbers","stop","rangeError","invalidRange","strictRanges","invalidStep","fillNumbers","descending","startString","endString","stepString","abs","padded","maxLen","format","fillLetters","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","d","NaN","rt","log","LN2","picomatch","isEmptyString","micromatch","patterns","omit","keep","items","onResult","state","add","isMatch","negated","negatedExtglob","matched","delete","matches","failglob","nonull","nullglob","unescape","matcher","any","not","contains","some","startsWith","matchKeys","every","all","glob","posix","isWindows","makeRe","exec","toPosixSlashes","scan","nobrace","braceExpand","normalizeArray","allowAboveRoot","up","last","resolve","resolvedPath","resolvedAbsolute","cwd","charAt","normalize","isAbsolute","trailingSlash","paths","relative","fromParts","toParts","samePartsLength","outputParts","sep","delimiter","dirname","hasRoot","matchedSlash","basename","extname","startDot","startPart","preDotState","xs","WIN_SLASH","WIN_NO_SLASH","DOT_LITERAL","PLUS_LITERAL","QMARK_LITERAL","SLASH_LITERAL","ONE_CHAR","QMARK","END_ANCHOR","START_ANCHOR","DOTS_SLASH","NO_DOT","NO_DOTS","NO_DOT_SLASH","NO_DOTS_SLASH","QMARK_NO_DOT","STAR","POSIX_CHARS","WINDOWS_CHARS","POSIX_REGEX_SOURCE","alnum","alpha","ascii","blank","cntrl","digit","lower","print","punct","space","upper","word","xdigit","REGEX_BACKSLASH","REGEX_NON_SPECIAL_CHARS","REGEX_SPECIAL_CHARS","REGEX_SPECIAL_CHARS_BACKREF","REGEX_SPECIAL_CHARS_GLOBAL","REGEX_REMOVE_BACKSLASH","REPLACEMENTS","CHAR_BACKWARD_SLASH","CHAR_GRAVE_ACCENT","SEP","extglobChars","chars","globChars","win32","constants","expandRange","ex","escapeRegex","syntaxError","bos","prepend","tokens","PLATFORM_CHARS","EXTGLOB_CHARS","globstar","dot","nodot","qmarkNoDot","star","bash","noext","noextglob","consumed","backtrack","parens","quotes","removePrefix","extglobs","eos","peek","consume","negate","count","increment","decrement","tok","isBrace","isExtglob","extglob","inner","extglobOpen","conditions","extglobClose","extglobStar","fastpaths","backslashes","esc","first","rest","wrapOutput","slashes","idx","pre","strictBrackets","nobracket","prevValue","literalBrackets","hasRegexChars","outputIndex","tokensIndex","dots","comma","toks","isGroup","supportsLookbehinds","nonegate","noglobstar","prior","isStart","afterStar","after","strictSlashes","escapeLast","suffix","slashDot","returnState","fns","arrayMatcher","isState","compileRe","isIgnored","ignore","ignoreOpts","onMatch","returnObject","onIgnore","matchBase","returnOutput","flags","nocase","err","debug","isPathSeparator","isPrefix","isGlobstar","scanToEnd","lastIndex","isBracket","isGlob","braceEscaped","finished","isExtglobChar","noparen","base","removeBackslashes","maxDepth","prevIndex","platform","isRegexChar","segs","version","windows","lastIdx","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","defaultClearTimeout","setTimeout","clearTimeout","runTimeout","fun","runClearTimeout","draining","currentQueue","queueIndex","cleanUpNextTick","drainQueue","timeout","run","nextTick","Item","title","browser","env","argv","versions","noop","on","addListener","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","binding","chdir","umask","hasSymbol","for","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_ASYNC_MODE_TYPE","REACT_CONCURRENT_MODE_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_FUNDAMENTAL_TYPE","REACT_RESPONDER_TYPE","REACT_SCOPE_TYPE","isValidElementType","$$typeof","lowPriorityWarningWithoutStack","printWarning","_len","_key","argIndex","condition","_len2","_key2","lowPriorityWarningWithoutStack$1","typeOf","$$typeofType","AsyncMode","ConcurrentMode","ContextConsumer","ContextProvider","Element","ForwardRef","Fragment","Lazy","Memo","Portal","Profiler","StrictMode","Suspense","hasWarnedAboutDeprecatedIsAsyncMode","isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isProfiler","isStrictMode","isSuspense","isExtendedLengthPath","hasNonAscii","StackUtils","_cwd","_internals","internals","_wrapCallSite","wrapCallSite","nodeInternals","natives","clean","outdent","lastNonAtLine","st","isInternal","internal","isAtLine","captureString","limitBefore","stackTraceLimit","captureStackTrace","prepBefore","prepareStackTrace","site","at","getLineNumber","getColumnNumber","_setFile","getFileName","isConstructor","isEval","evalOrigin","getEvalOrigin","isNative","native","typename","getTypeName","er","fname","getFunctionName","function","meth","getMethodName","method","filename","file","re","methodRe","parseLine","ctor","evalFile","evalLine","evalCol","lnum","col","closeParen","closes","methodMatch","evalColumn","bound","bind","relaxZeros","strictZeros","relax","shorthand","cacheKey","isPadded","hasPadding","newMin","splitToPatterns","collatePatterns","neg","onlyNegative","filterPatterns","onlyPositive","intersected","subpatterns","splitToRanges","nines","countNines","stops","countZeros","rangeToPattern","digits","zipped","zip","startDigit","stopDigit","toCharacterClass","toQuantifier","padZeros","comparison","intersection","clearCache","inherits","superCtor","super_","writable","TempCtor","getOwnPropertyDescriptors","descriptors","formatRegExp","isString","objects","JSON","_","isNull","deprecate","msg","noDeprecation","warned","deprecated","throwDeprecation","traceDeprecation","trace","error","debugs","debugEnviron","debuglog","isUndefined","NODE_DEBUG","pid","ctx","seen","stylize","stylizeNoColor","colors","isBoolean","showHidden","_extend","customInspect","stylizeWithColor","formatValue","styleType","arrayToHash","hash","recurseTimes","isFunction","primitive","formatPrimitive","visibleKeys","getOwnPropertyNames","isError","formatError","isRegExp","isDate","Date","toUTCString","formatArray","formatProperty","reduceToSingleString","simple","numLinesEst","ar","isNullOrUndefined","isSymbol","objectToString","isPrimitive","o","months","timestamp","time","getHours","getMinutes","getSeconds","getDate","getMonth","origin","prop","kCustomPromisifiedSymbol","promisify","original","promiseResolve","promiseReject","promise","Promise","reject","setPrototypeOf","getPrototypeOf","defineProperties","custom","callbackifyOnRejected","reason","cb","newReason","callbackify","callbackified","maybeCb","self","then","rej","Function","window","webpackPolyfill","children","pkg","NOT_YET_SET","countCommonItemsF","aIndex","aEnd","bIndex","bEnd","isCommon","nCommon","countCommonItemsR","aStart","bStart","extendPathsF","bF","aIndexesF","iMaxF","iF","kF","aFirst","aIndexPrev1","nF","extendPathsR","bR","aIndexesR","iMaxR","iR","kR","nR","extendOverlappablePathsF","division","aLength","bLength","baDeltaLength","kMinOverlapF","kMaxOverlapF","insert","aLastPrev","bFirst","nCommonF","aLast","bLastPrev","nCommonR","aIndexPrevFirst","bIndexPrevFirst","aEndPreceding","bEndPreceding","nChangePreceding","nCommonPreceding","aCommonPreceding","bCommonPreceding","nCommonFollowing","aCommonFollowing","bCommonFollowing","aStartFollowing","bStartFollowing","nChangeFollowing","extendOverlappablePathsR","kMinOverlapR","kMaxOverlapR","bLast","divide","nChange","dMin","dMax","findSubsequences","transposed","callbacks","foundSubsequence","bCommon","aCommon","tStart","tEnd","validateLength","isSafeInteger","validateCallback","nCommonFR","_ansiStyles","returnInput","allColorsAsFunc","AsymmetricMatcher","sample","Any","other","Anything","ArrayContaining","another","ObjectContaining","StringContaining","StringMatching","expectedObject","anything","arrayContaining","arrayNotContaining","objectContaining","objectNotContaining","stringContaining","expected","stringNotContaining","stringMatching","stringNotMatching","resetAssertionsLocalState","assertionCalls","expectedAssertionsNumber","isExpectingAssertions","extractExpectedAssertionsErrors","expectedAssertionsNumberError","isExpectingAssertionsError","numOfAssertionsExpected","isDirectExpectCall","received","JestAssertionError","isPromise","createToThrowErrorMatchingSnapshotMatcher","testNameOrInlineSnapshot","getPromiseMatcher","expect","allMatchers","expectation","rejects","resolves","promiseMatcher","makeThrowingMatcher","makeResolveMatcher","makeRejectMatcher","getMessage","matcherUtils","RECEIVED_COLOR","matcherName","isNot","outerErr","matcherErrorMessage","matcherHint","printWithType","printReceived","innerErr","throwingMatcher","throws","iterableEquality","subsetEquality","matcherContext","dontThrow","processResult","asyncError","_validateResult","pass","matcherResult","suppressedErrors","handleError","INTERNAL_MATCHER_FLAG","potentialResult","__EXTERNAL_MATCHER_TRAP__","asyncResult","aResult","catch","syncResult","extend","matchers","assertions","hasAssertions","ensureNoExpected","spyMatchers","toThrowMatchers","addSnapshotSerializer","getState","setState","expectExport","customTesters","strictCheck","eq","hasKey","hasDefinedKey","functionToString","isAsymmetric","isA","asymmetricMatch","asymmetricA","asymmetricB","aStack","bStack","asymmetricResult","customTesterResult","is","className","valueOf","isDomNode","isEqualNode","aKeys","allKeys","getOwnPropertySymbols","symbol","extraKeys","typeName","nodeType","nodeName","fnNameFor","func","getPrototype","hasProperty","IS_KEYED_SENTINEL","IS_SET_SENTINEL","IS_ORDERED_SENTINEL","isImmutableUnorderedKeyed","maybeKeyed","isImmutableUnorderedSet","maybeSet","JEST_MATCHERS_OBJECT","getMatchers","setMatchers","CustomMatcher","EXPECTED_LABEL","RECEIVED_LABEL","EXPECTED_VALUE_LABEL","RECEIVED_VALUE_LABEL","isExpand","toStrictEqualTesters","typeEquality","sparseArrayEquality","toBe","expectedType","deepEqualityName","toBeCloseTo","precision","secondArgument","secondArgumentColor","printExpected","expectedDiff","receivedDiff","toBeDefined","toBeFalsy","toBeGreaterThan","toBeGreaterThanOrEqual","toBeInstanceOf","getType","toBeLessThan","toBeLessThanOrEqual","toBeNaN","toBeNull","toBeTruthy","toBeUndefined","toContain","labelExpected","labelReceived","printLabel","indexable","findIndex","SUGGEST_TO_CONTAIN_EQUAL","toContainEqual","toEqual","toHaveLength","labelReceivedLength","labelReceivedValue","toHaveProperty","expectedPath","expectedValue","expectedArgument","hasValue","expectedPathType","expectedPathLength","lastTraversedObject","hasEndProp","receivedPath","traversedPath","hasCompletePath","receivedValue","toMatch","toMatchObject","toStrictEqual","printSubstring","printReceivedStringContainExpectedSubstring","printReceivedStringContainExpectedResult","printReceivedArrayContainExpectedItem","stringified","printCloseTo","receivedDiffString","expectedDiffString","toExponential","toFixed","printExpectedConstructorName","label","printConstructorName","printExpectedConstructorNameNot","printReceivedConstructorName","printReceivedConstructorNameNot","isExpected","PRINT_LIMIT","NO_ARGUMENTS","printExpectedArgs","printReceivedArgs","isEqualValue","printCommon","isEqualCall","isEqualReturn","countReturns","results","printNumberOfReturns","countCalls","getRightAlignedPrinter","isExpectedCall","printReceivedCallsNegative","indexedCalls","isOnlyCall","iExpectedCall","printAligned","printed","printExpectedReceivedCallsPositive","expectedLine","isLineDiffableCall","isLineDiffableArg","difference","aligned","printDiffCall","indentation","receivedType","printResult","printReceivedResults","indexedResults","createToBeCalledMatcher","ensureMockOrSpy","receivedIsSpy","isSpy","receivedName","getMockName","calls","mock","createToReturnMatcher","ensureMock","createToBeCalledTimesMatcher","createToReturnTimesMatcher","createToBeCalledWithMatcher","createToReturnWithMatcher","createLastCalledWithMatcher","iLast","createLastReturnedMatcher","createNthCalledWithMatcher","nth","expectedColor","iNth","createNthReturnedWithMatcher","lastCalledWith","lastReturnedWith","nthCalledWith","nthReturnedWith","toBeCalled","toBeCalledTimes","toBeCalledWith","toHaveBeenCalled","toHaveBeenCalledTimes","toHaveBeenCalledWith","toHaveBeenLastCalledWith","toHaveBeenNthCalledWith","toHaveLastReturnedWith","toHaveNthReturnedWith","toHaveReturned","toHaveReturnedTimes","toHaveReturnedWith","toReturn","toReturnTimes","toReturnWith","isMock","_isMockFunction","DID_NOT_THROW","getThrown","hasMessage","createMatcher","fromPromise","thrown","placeholder","toThrow","toThrowExpectedClass","toThrowExpectedString","toThrowExpectedRegExp","toThrowExpectedAsymmetric","toThrowExpectedObject","toThrowError","formatExpected","formatReceived","formatStack","rootDir","testMatch","noStackTrace","hasGetterFromConstructor","descriptor","getPath","propertyPath","lastProp","newObject","getObjectSubset","subset","seenReferences","trimmed","IteratorSymbol","iterator","hasIterator","iterableEqualityWithStack","allFound","aValue","bValue","isEqual","aEntry","bEntry","matchedKey","matchedValue","bIterator","nextB","done","isObjectWithKeys","subsetEqualityWithContext","bKeys","partition","predicate","emptyObject","MULTILINE_REGEXP","isOneline","cleanupSemantic","DIFF_INSERT","DIFF_DELETE","DIFF_EQUAL","Diff","_defineProperty","op","diff_commonPrefix","text1","text2","pointermin","pointermax","pointermid","pointerstart","diff_commonSuffix","pointerend","diff_commonOverlap_","text1_length","text2_length","text_length","best","diff_cleanupSemantic","diffs","changes","equalities","equalitiesLength","lastEquality","pointer","length_insertions1","length_deletions1","length_insertions2","length_deletions2","diff_cleanupMerge","diff_cleanupSemanticLossless","deletion","insertion","overlap_length1","overlap_length2","diff_cleanupSemanticScore_","one","two","char1","char2","nonAlphaNumeric1","nonAlphaNumericRegex_","nonAlphaNumeric2","whitespace1","whitespaceRegex_","whitespace2","lineBreak1","linebreakRegex_","lineBreak2","blankLine1","blanklineEndRegex_","blankLine2","blanklineStartRegex_","equality1","edit","equality2","commonOffset","commonString","bestEquality1","bestEdit","bestEquality2","bestScore","score","count_delete","count_insert","text_delete","text_insert","commonlength","SIMILAR_MESSAGE","NO_DIFF_MESSAGE","diffLinesRaw","diffLinesUnified2","diffLinesUnified","_diffSequences","_cleanupSemantic","_normalizeDiffOptions","_printDiffs","aLines","bLines","printDiffLines","normalizeDiffOptions","aLinesDisplay","bLinesDisplay","aLinesCompare","bLinesCompare","diffStrings","concatenateRelevantDiffs","changeColor","reduced","ChangeBuffer","pushDiff","substrings","pushSubstring","pushLine","isLineEmpty","CommonBuffer","deleteBuffer","insertBuffer","isDiffEmpty","moveLinesTo","subdiff","flushChangeLines","pushDiffCommonLine","pushDiffChangeLines","getAlignedDiffs","commonBuffer","align","getLines","_diffLines","diffStringsRaw","diffStringsUnified","_prettyFormat","_jestGetType","_constants","ownKeys","enumerableOnly","symbols","sym","_objectSpread","plugins","DOMCollection","DOMElement","Immutable","ReactElement","ReactTestComponent","PLUGINS","FORMAT_OPTIONS","FORMAT_OPTIONS_0","indent","FALLBACK_FORMAT_OPTIONS","callToJSON","FALLBACK_FORMAT_OPTIONS_0","aType","omitDifference","getExpectedType","comparePrimitive","compareObjects","sortMap","sortSet","aFormat","bFormat","values","hasThrown","aCompare","bCompare","aDisplay","bDisplay","joinAlignedDiffsExpand","joinAlignedDiffsNoExpand","iLength","nContextLines","contextLines","nContextLines2","jLength","hasExcessAtStartOrEnd","nExcessesBetweenChanges","iStart","hasPatch","jLast","jPatchMark","pushCommonLine","printCommonLine","pushDeleteLine","printDeleteLine","pushInsertLine","printInsertLine","iCommon","iEnd","createPatchMark","nOmit","isFirstOrLast","noColor","DIFF_CONTEXT_DEFAULT","OPTIONS_DEFAULT","aAnnotation","aColor","aIndicator","bAnnotation","bColor","bIndicator","changeLineTrailingSpaceColor","commonColor","commonIndicator","commonLineTrailingSpaceColor","emptyFirstOrLastLinePlaceholder","includeChangeCounts","omitAnnotationLines","patchColor","getContextLines","printAnnotation","countChanges","hasCommonDiff","_diffStrings","_getAlignedDiffs","_joinAlignedDiffs","formatTrailingSpaces","trailingSpaceFormatter","printDiffLine","indicator","isMultiline","changeCounts","aRest","bRest","aCount","bCount","baAnnotationLengthDiff","aAnnotationPadding","bAnnotationPadding","baCountLengthDiff","aCountPadding","bCountPadding","optionsNormalized","cleanup","supportTypes","Replaceable","obj1","obj2","obj1Type","obj2Type","deepCyclicCopyReplaceable","builtInObject","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8ClampedArray","isBuiltInObject","isMap","cycles","deepCyclicCopyArray","deepCyclicCopyMap","deepCyclicCopyObject","newArray","newMap","getLabelPrinter","pluralize","printDiffOrStringify","ensureExpectedIsNonNegativeInteger","ensureNumbers","ensureExpectedIsNumber","ensureActualIsNumber","highlightTrailingWhitespace","DIM_COLOR","BOLD_WEIGHT","INVERTED_COLOR","EXPECTED_COLOR","_jestDiff","_Replaceable","_deepCyclicCopyReplaceable","SPACE_SYMBOL","NUMBERS","replaceTrailingSpaces","spaces","hasType","matcherString","getCommonAndChangedSubstrings","isLineDiffable","MAX_DIFF_STRING_LENGTH","expectedLabel","receivedLabel","receivedLine","replaceMatchedToAsymmetricMatcher","replacedExpected","replacedReceived","shouldPrintDiff","expectedCycles","receivedCycles","isReplaceable","expectedReplaceable","receivedReplaceable","isAsymmetricMatcher","replaced","strings","hint","generic","specific","receivedColor","dimString","_types","Frame","separateMessageFromStack","formatResultsErrors","formatStackTrace","getTopFrame","getStackTraceLines","formatExecError","fs","_micromatch","_slash","_codeFrame","_stackUtils","jestReadFile","readFileSync","stackUtils","PATH_NODE_MODULES","PATH_JEST_PACKAGES","JASMINE_IGNORE","JEST_INTERNALS_IGNORE","ANONYMOUS_FN_IGNORE","ANONYMOUS_PROMISE_IGNORE","ANONYMOUS_GENERATOR_IGNORE","NATIVE_NEXT_IGNORE","TITLE_INDENT","MESSAGE_INDENT","STACK_INDENT","ANCESTRY_SEPARATOR","TITLE_BULLET","STACK_TRACE_COLOR","STACK_PATH_REGEXP","EXEC_ERROR_MESSAGE","NOT_EMPTY_LINE_REGEXP","indentAllLines","trimPaths","getRenderedCallsite","fileContent","renderedCallsite","blankStringRegexp","config","testPath","reuseMessage","separated","messageToUse","removeInternalStackEntries","pathCounter","formatPaths","relativeTestPath","filePath","parsedFrame","topFrame","stacktrace","testResults","failedResults","errors","failureMessages","content","ancestorTitles","errorRegexp","removeBlankErrorLine","trimRight","messageMatch","printIteratorEntries","printIteratorValues","printListItems","printObjectProperties","getKeysOfEnumerableProperties","refs","printer","separator","spacingOuter","indentationNext","spacingInner","_collections","_AsymmetricMatcher","_ConvertAnsi","_DOMCollection","_DOMElement","_Immutable","_ReactElement","_ReactTestComponent","toISOString","errorToString","regExpToString","getConstructorName","isWindow","SYMBOL_REGEXP","NEWLINE_REGEXP","PrettyFormatPluginError","isToStringedArrayType","toStringed","printNumber","printBigInt","printFunction","printFunctionName","printSymbol","printError","printBasicValue","escapeString","printComplexValue","hasCalledToJSON","hitMaxDepth","isNewPlugin","plugin","serialize","printPlugin","valChild","edgeSpacing","spacing","findPlugin","basicResult","DEFAULT_THEME","tag","DEFAULT_THEME_KEYS","DEFAULT_OPTIONS","theme","validateOptions","getColorsHighlight","getColorsEmpty","getPrintFunctionName","getEscapeRegex","getEscapeString","getConfig","createIndent","prettyFormat","ConvertAnsi","asymmetricMatcher","SPACE","stringedValue","toAsymmetricMatcher","_ansiRegex","toHumanReadableAnsi","OBJECT_NAMES","ARRAY_REGEXP","testName","propsReducer","props","attribute","collection","_markup","ELEMENT_NODE","TEXT_NODE","COMMENT_NODE","FRAGMENT_NODE","ELEMENT_REGEXP","testNode","nodeIsText","nodeIsComment","nodeIsFragment","printText","printComment","tagName","printElementAsLeaf","printElement","printProps","attributes","attr","printChildren","childNodes","IS_ITERABLE_SENTINEL","IS_LIST_SENTINEL","IS_MAP_SENTINEL","IS_RECORD_SENTINEL","IS_SEQ_SENTINEL","IS_STACK_SENTINEL","getImmutableName","printAsLeaf","LAZY","printImmutableEntries","getRecordEntries","_keys","printImmutableRecord","_name","printImmutableSeq","_iter","_object","_array","_collection","_iterable","printImmutableValues","ReactIs","getChildren","element","displayName","functionName","render","getPropKeys","testSymbol","escapeHTML","_escapeHTML","contentColor","commentColor","printedProps","printedChildren","tagColor"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,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,QAAQ,CAACx5D,IAAT,GACA,GADA,GAEA1F,IAFA,IAGCg/D,YAAY,IACXE,QAAQ,CAACv5D,KAAT,GACEq5D,YADF,GAEEzJ,MAAM,CAAC+B,YAFT,GAGExc,WAHF,GAIEokB,QAAQ,CAACx5D,IARb,KASCu5D,eAAe,GACZ,MACAC,QAAQ,CAACv5D,KADT,GAEAs5D,eAFA,GAGA1J,MAAM,CAAC+B,YAHP,GAIAxc,WAJA,GAKAokB,QAAQ,CAACx5D,IALT,GAMA,IANA,GAOA1F,IARY,GASZ,CAACg/D,YAAY,IAAI,CAACzJ,MAAM,CAACl6D,GAAxB,GAA8B,EAA9B,GAAmC,GAApC,IAA2C,GAlB/C,IAmBA,GAnBA,GAoBA6jE,QAAQ,CAACv5D,KArBX;AAuBD,CA/BD;;AAiCA3N,OAAO,CAACykE,YAAR,GAAuBA,YAAvB;;AAEA,IAAMD,kBAAkB,GAAG,SAArBA,kBAAqB,CAACx8D,IAAD,EAAOu1D,MAAP,EAAkB;AAC3C,MAAM2J,QAAQ,GAAG3J,MAAM,CAACryB,MAAP,CAAc82B,GAA/B;AACA,SACEkF,QAAQ,CAACx5D,IAAT,GACA,GADA,GAEA1F,IAFA,GAGAk/D,QAAQ,CAACv5D,KAHT,GAIA,IAJA,GAKAu5D,QAAQ,CAACx5D,IALT,GAMA,KANA,GAOAw5D,QAAQ,CAACv5D,KARX;AAUD,CAZD;;AAcA3N,OAAO,CAACwkE,kBAAR,GAA6BA,kBAA7B,C","file":"index.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"expect\"] = factory();\n\telse\n\t\troot[\"expect\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./packages/expect/src/index.ts\");\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.codeFrameColumns = codeFrameColumns;\nexports.default = _default;\n\nvar _highlight = _interopRequireWildcard(require(\"@babel/highlight\"));\n\nfunction _getRequireWildcardCache() { if (typeof WeakMap !== \"function\") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { 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\nlet deprecationWarningShown = false;\n\nfunction getDefs(chalk) {\n return {\n gutter: chalk.grey,\n marker: chalk.red.bold,\n message: chalk.red.bold\n };\n}\n\nconst NEWLINE = /\\r\\n|[\\n\\r\\u2028\\u2029]/;\n\nfunction getMarkerLines(loc, source, opts) {\n const startLoc = Object.assign({\n column: 0,\n line: -1\n }, loc.start);\n const endLoc = Object.assign({}, startLoc, {}, loc.end);\n const {\n linesAbove = 2,\n linesBelow = 3\n } = opts || {};\n const startLine = startLoc.line;\n const startColumn = startLoc.column;\n const endLine = endLoc.line;\n const endColumn = endLoc.column;\n let start = Math.max(startLine - (linesAbove + 1), 0);\n let end = Math.min(source.length, endLine + linesBelow);\n\n if (startLine === -1) {\n start = 0;\n }\n\n if (endLine === -1) {\n end = source.length;\n }\n\n const lineDiff = endLine - startLine;\n const markerLines = {};\n\n if (lineDiff) {\n for (let i = 0; i <= lineDiff; i++) {\n const lineNumber = i + startLine;\n\n if (!startColumn) {\n markerLines[lineNumber] = true;\n } else if (i === 0) {\n const sourceLength = source[lineNumber - 1].length;\n markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];\n } else if (i === lineDiff) {\n markerLines[lineNumber] = [0, endColumn];\n } else {\n const sourceLength = source[lineNumber - i].length;\n markerLines[lineNumber] = [0, sourceLength];\n }\n }\n } else {\n if (startColumn === endColumn) {\n if (startColumn) {\n markerLines[startLine] = [startColumn, 0];\n } else {\n markerLines[startLine] = true;\n }\n } else {\n markerLines[startLine] = [startColumn, endColumn - startColumn];\n }\n }\n\n return {\n start,\n end,\n markerLines\n };\n}\n\nfunction codeFrameColumns(rawLines, loc, opts = {}) {\n const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);\n const chalk = (0, _highlight.getChalk)(opts);\n const defs = getDefs(chalk);\n\n const maybeHighlight = (chalkFn, string) => {\n return highlighted ? chalkFn(string) : string;\n };\n\n const lines = rawLines.split(NEWLINE);\n const {\n start,\n end,\n markerLines\n } = getMarkerLines(loc, lines, opts);\n const hasColumns = loc.start && typeof loc.start.column === \"number\";\n const numberMaxWidth = String(end).length;\n const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines;\n let frame = highlightedLines.split(NEWLINE).slice(start, end).map((line, index) => {\n const number = start + 1 + index;\n const paddedNumber = ` ${number}`.slice(-numberMaxWidth);\n const gutter = ` ${paddedNumber} | `;\n const hasMarker = markerLines[number];\n const lastMarkerLine = !markerLines[number + 1];\n\n if (hasMarker) {\n let markerLine = \"\";\n\n if (Array.isArray(hasMarker)) {\n const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\\t]/g, \" \");\n const numberOfMarkers = hasMarker[1] || 1;\n markerLine = [\"\\n \", maybeHighlight(defs.gutter, gutter.replace(/\\d/g, \" \")), markerSpacing, maybeHighlight(defs.marker, \"^\").repeat(numberOfMarkers)].join(\"\");\n\n if (lastMarkerLine && opts.message) {\n markerLine += \" \" + maybeHighlight(defs.message, opts.message);\n }\n }\n\n return [maybeHighlight(defs.marker, \">\"), maybeHighlight(defs.gutter, gutter), line, markerLine].join(\"\");\n } else {\n return ` ${maybeHighlight(defs.gutter, gutter)}${line}`;\n }\n }).join(\"\\n\");\n\n if (opts.message && !hasColumns) {\n frame = `${\" \".repeat(numberMaxWidth + 1)}${opts.message}\\n${frame}`;\n }\n\n if (highlighted) {\n return chalk.reset(frame);\n } else {\n return frame;\n }\n}\n\nfunction _default(rawLines, lineNumber, colNumber, opts = {}) {\n if (!deprecationWarningShown) {\n deprecationWarningShown = true;\n const message = \"Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.\";\n\n if (process.emitWarning) {\n process.emitWarning(message, \"DeprecationWarning\");\n } else {\n const deprecationError = new Error(message);\n deprecationError.name = \"DeprecationWarning\";\n console.warn(new Error(message));\n }\n }\n\n colNumber = Math.max(colNumber, 0);\n const location = {\n start: {\n column: colNumber,\n line: lineNumber\n }\n };\n return codeFrameColumns(rawLines, location, opts);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.shouldHighlight = shouldHighlight;\nexports.getChalk = getChalk;\nexports.default = highlight;\n\nvar _jsTokens = _interopRequireWildcard(require(\"js-tokens\"));\n\nvar _esutils = _interopRequireDefault(require(\"esutils\"));\n\nvar _chalk = _interopRequireDefault(require(\"chalk\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _getRequireWildcardCache() { if (typeof WeakMap !== \"function\") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { 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 getDefs(chalk) {\n return {\n keyword: chalk.cyan,\n capitalized: chalk.yellow,\n jsx_tag: chalk.yellow,\n punctuator: chalk.yellow,\n number: chalk.magenta,\n string: chalk.green,\n regex: chalk.magenta,\n comment: chalk.grey,\n invalid: chalk.white.bgRed.bold\n };\n}\n\nconst NEWLINE = /\\r\\n|[\\n\\r\\u2028\\u2029]/;\nconst JSX_TAG = /^[a-z][\\w-]*$/i;\nconst BRACKET = /^[()[\\]{}]$/;\n\nfunction getTokenType(match) {\n const [offset, text] = match.slice(-2);\n const token = (0, _jsTokens.matchToToken)(match);\n\n if (token.type === \"name\") {\n if (_esutils.default.keyword.isReservedWordES6(token.value)) {\n return \"keyword\";\n }\n\n if (JSX_TAG.test(token.value) && (text[offset - 1] === \"<\" || text.substr(offset - 2, 2) == \"</\")) {\n return \"jsx_tag\";\n }\n\n if (token.value[0] !== token.value[0].toLowerCase()) {\n return \"capitalized\";\n }\n }\n\n if (token.type === \"punctuator\" && BRACKET.test(token.value)) {\n return \"bracket\";\n }\n\n if (token.type === \"invalid\" && (token.value === \"@\" || token.value === \"#\")) {\n return \"punctuator\";\n }\n\n return token.type;\n}\n\nfunction highlightTokens(defs, text) {\n return text.replace(_jsTokens.default, function (...args) {\n const type = getTokenType(args);\n const colorize = defs[type];\n\n if (colorize) {\n return args[0].split(NEWLINE).map(str => colorize(str)).join(\"\\n\");\n } else {\n return args[0];\n }\n });\n}\n\nfunction shouldHighlight(options) {\n return _chalk.default.supportsColor || options.forceColor;\n}\n\nfunction getChalk(options) {\n let chalk = _chalk.default;\n\n if (options.forceColor) {\n chalk = new _chalk.default.constructor({\n enabled: true,\n level: 1\n });\n }\n\n return chalk;\n}\n\nfunction highlight(code, options = {}) {\n if (shouldHighlight(options)) {\n const chalk = getChalk(options);\n const defs = getDefs(chalk);\n return highlightTokens(defs, code);\n } else {\n return code;\n }\n}","'use strict';\n\nmodule.exports = ({onlyFirst = false} = {}) => {\n\tconst pattern = [\n\t\t'[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:[a-zA-Z\\\\d]*(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?\\\\u0007)',\n\t\t'(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PR-TZcf-ntqry=><~]))'\n\t].join('|');\n\n\treturn new RegExp(pattern, onlyFirst ? undefined : 'g');\n};\n","'use strict';\n\nconst wrapAnsi16 = (fn, offset) => (...args) => {\n\tconst code = fn(...args);\n\treturn `\\u001B[${code + offset}m`;\n};\n\nconst wrapAnsi256 = (fn, offset) => (...args) => {\n\tconst code = fn(...args);\n\treturn `\\u001B[${38 + offset};5;${code}m`;\n};\n\nconst wrapAnsi16m = (fn, offset) => (...args) => {\n\tconst rgb = fn(...args);\n\treturn `\\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;\n};\n\nconst ansi2ansi = n => n;\nconst rgb2rgb = (r, g, b) => [r, g, b];\n\nconst setLazyProperty = (object, property, get) => {\n\tObject.defineProperty(object, property, {\n\t\tget: () => {\n\t\t\tconst value = get();\n\n\t\t\tObject.defineProperty(object, property, {\n\t\t\t\tvalue,\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true\n\t\t\t});\n\n\t\t\treturn value;\n\t\t},\n\t\tenumerable: true,\n\t\tconfigurable: true\n\t});\n};\n\n/** @type {typeof import('color-convert')} */\nlet colorConvert;\nconst makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {\n\tif (colorConvert === undefined) {\n\t\tcolorConvert = require('color-convert');\n\t}\n\n\tconst offset = isBackground ? 10 : 0;\n\tconst styles = {};\n\n\tfor (const [sourceSpace, suite] of Object.entries(colorConvert)) {\n\t\tconst name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace;\n\t\tif (sourceSpace === targetSpace) {\n\t\t\tstyles[name] = wrap(identity, offset);\n\t\t} else if (typeof suite === 'object') {\n\t\t\tstyles[name] = wrap(suite[targetSpace], offset);\n\t\t}\n\t}\n\n\treturn styles;\n};\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\tconst styles = {\n\t\tmodifier: {\n\t\t\treset: [0, 0],\n\t\t\t// 21 isn't widely supported and 22 does the same thing\n\t\t\tbold: [1, 22],\n\t\t\tdim: [2, 22],\n\t\t\titalic: [3, 23],\n\t\t\tunderline: [4, 24],\n\t\t\tinverse: [7, 27],\n\t\t\thidden: [8, 28],\n\t\t\tstrikethrough: [9, 29]\n\t\t},\n\t\tcolor: {\n\t\t\tblack: [30, 39],\n\t\t\tred: [31, 39],\n\t\t\tgreen: [32, 39],\n\t\t\tyellow: [33, 39],\n\t\t\tblue: [34, 39],\n\t\t\tmagenta: [35, 39],\n\t\t\tcyan: [36, 39],\n\t\t\twhite: [37, 39],\n\n\t\t\t// Bright color\n\t\t\tblackBright: [90, 39],\n\t\t\tredBright: [91, 39],\n\t\t\tgreenBright: [92, 39],\n\t\t\tyellowBright: [93, 39],\n\t\t\tblueBright: [94, 39],\n\t\t\tmagentaBright: [95, 39],\n\t\t\tcyanBright: [96, 39],\n\t\t\twhiteBright: [97, 39]\n\t\t},\n\t\tbgColor: {\n\t\t\tbgBlack: [40, 49],\n\t\t\tbgRed: [41, 49],\n\t\t\tbgGreen: [42, 49],\n\t\t\tbgYellow: [43, 49],\n\t\t\tbgBlue: [44, 49],\n\t\t\tbgMagenta: [45, 49],\n\t\t\tbgCyan: [46, 49],\n\t\t\tbgWhite: [47, 49],\n\n\t\t\t// Bright color\n\t\t\tbgBlackBright: [100, 49],\n\t\t\tbgRedBright: [101, 49],\n\t\t\tbgGreenBright: [102, 49],\n\t\t\tbgYellowBright: [103, 49],\n\t\t\tbgBlueBright: [104, 49],\n\t\t\tbgMagentaBright: [105, 49],\n\t\t\tbgCyanBright: [106, 49],\n\t\t\tbgWhiteBright: [107, 49]\n\t\t}\n\t};\n\n\t// Alias bright black as gray (and grey)\n\tstyles.color.gray = styles.color.blackBright;\n\tstyles.bgColor.bgGray = styles.bgColor.bgBlackBright;\n\tstyles.color.grey = styles.color.blackBright;\n\tstyles.bgColor.bgGrey = styles.bgColor.bgBlackBright;\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false\n\t});\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tsetLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false));\n\tsetLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false));\n\tsetLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false));\n\tsetLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true));\n\tsetLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true));\n\tsetLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true));\n\n\treturn styles;\n}\n\n// Make the export immutable\nObject.defineProperty(module, 'exports', {\n\tenumerable: true,\n\tget: assembleStyles\n});\n","/* MIT license */\n/* eslint-disable no-mixed-operators */\nconst cssKeywords = require('color-name');\n\n// NOTE: conversions should only return primitive values (i.e. arrays, or\n// values that give correct `typeof` results).\n// do not use box values types (i.e. Number(), String(), etc.)\n\nconst reverseKeywords = {};\nfor (const key of Object.keys(cssKeywords)) {\n\treverseKeywords[cssKeywords[key]] = key;\n}\n\nconst convert = {\n\trgb: {channels: 3, labels: 'rgb'},\n\thsl: {channels: 3, labels: 'hsl'},\n\thsv: {channels: 3, labels: 'hsv'},\n\thwb: {channels: 3, labels: 'hwb'},\n\tcmyk: {channels: 4, labels: 'cmyk'},\n\txyz: {channels: 3, labels: 'xyz'},\n\tlab: {channels: 3, labels: 'lab'},\n\tlch: {channels: 3, labels: 'lch'},\n\thex: {channels: 1, labels: ['hex']},\n\tkeyword: {channels: 1, labels: ['keyword']},\n\tansi16: {channels: 1, labels: ['ansi16']},\n\tansi256: {channels: 1, labels: ['ansi256']},\n\thcg: {channels: 3, labels: ['h', 'c', 'g']},\n\tapple: {channels: 3, labels: ['r16', 'g16', 'b16']},\n\tgray: {channels: 1, labels: ['gray']}\n};\n\nmodule.exports = convert;\n\n// Hide .channels and .labels properties\nfor (const model of Object.keys(convert)) {\n\tif (!('channels' in convert[model])) {\n\t\tthrow new Error('missing channels property: ' + model);\n\t}\n\n\tif (!('labels' in convert[model])) {\n\t\tthrow new Error('missing channel labels property: ' + model);\n\t}\n\n\tif (convert[model].labels.length !== convert[model].channels) {\n\t\tthrow new Error('channel and label counts mismatch: ' + model);\n\t}\n\n\tconst {channels, labels} = convert[model];\n\tdelete convert[model].channels;\n\tdelete convert[model].labels;\n\tObject.defineProperty(convert[model], 'channels', {value: channels});\n\tObject.defineProperty(convert[model], 'labels', {value: labels});\n}\n\nconvert.rgb.hsl = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst min = Math.min(r, g, b);\n\tconst max = Math.max(r, g, b);\n\tconst delta = max - min;\n\tlet h;\n\tlet s;\n\n\tif (max === min) {\n\t\th = 0;\n\t} else if (r === max) {\n\t\th = (g - b) / delta;\n\t} else if (g === max) {\n\t\th = 2 + (b - r) / delta;\n\t} else if (b === max) {\n\t\th = 4 + (r - g) / delta;\n\t}\n\n\th = Math.min(h * 60, 360);\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tconst l = (min + max) / 2;\n\n\tif (max === min) {\n\t\ts = 0;\n\t} else if (l <= 0.5) {\n\t\ts = delta / (max + min);\n\t} else {\n\t\ts = delta / (2 - max - min);\n\t}\n\n\treturn [h, s * 100, l * 100];\n};\n\nconvert.rgb.hsv = function (rgb) {\n\tlet rdif;\n\tlet gdif;\n\tlet bdif;\n\tlet h;\n\tlet s;\n\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst v = Math.max(r, g, b);\n\tconst diff = v - Math.min(r, g, b);\n\tconst diffc = function (c) {\n\t\treturn (v - c) / 6 / diff + 1 / 2;\n\t};\n\n\tif (diff === 0) {\n\t\th = 0;\n\t\ts = 0;\n\t} else {\n\t\ts = diff / v;\n\t\trdif = diffc(r);\n\t\tgdif = diffc(g);\n\t\tbdif = diffc(b);\n\n\t\tif (r === v) {\n\t\t\th = bdif - gdif;\n\t\t} else if (g === v) {\n\t\t\th = (1 / 3) + rdif - bdif;\n\t\t} else if (b === v) {\n\t\t\th = (2 / 3) + gdif - rdif;\n\t\t}\n\n\t\tif (h < 0) {\n\t\t\th += 1;\n\t\t} else if (h > 1) {\n\t\t\th -= 1;\n\t\t}\n\t}\n\n\treturn [\n\t\th * 360,\n\t\ts * 100,\n\t\tv * 100\n\t];\n};\n\nconvert.rgb.hwb = function (rgb) {\n\tconst r = rgb[0];\n\tconst g = rgb[1];\n\tlet b = rgb[2];\n\tconst h = convert.rgb.hsl(rgb)[0];\n\tconst w = 1 / 255 * Math.min(r, Math.min(g, b));\n\n\tb = 1 - 1 / 255 * Math.max(r, Math.max(g, b));\n\n\treturn [h, w * 100, b * 100];\n};\n\nconvert.rgb.cmyk = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\n\tconst k = Math.min(1 - r, 1 - g, 1 - b);\n\tconst c = (1 - r - k) / (1 - k) || 0;\n\tconst m = (1 - g - k) / (1 - k) || 0;\n\tconst y = (1 - b - k) / (1 - k) || 0;\n\n\treturn [c * 100, m * 100, y * 100, k * 100];\n};\n\nfunction comparativeDistance(x, y) {\n\t/*\n\t\tSee https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance\n\t*/\n\treturn (\n\t\t((x[0] - y[0]) ** 2) +\n\t\t((x[1] - y[1]) ** 2) +\n\t\t((x[2] - y[2]) ** 2)\n\t);\n}\n\nconvert.rgb.keyword = function (rgb) {\n\tconst reversed = reverseKeywords[rgb];\n\tif (reversed) {\n\t\treturn reversed;\n\t}\n\n\tlet currentClosestDistance = Infinity;\n\tlet currentClosestKeyword;\n\n\tfor (const keyword of Object.keys(cssKeywords)) {\n\t\tconst value = cssKeywords[keyword];\n\n\t\t// Compute comparative distance\n\t\tconst distance = comparativeDistance(rgb, value);\n\n\t\t// Check if its less, if so set as closest\n\t\tif (distance < currentClosestDistance) {\n\t\t\tcurrentClosestDistance = distance;\n\t\t\tcurrentClosestKeyword = keyword;\n\t\t}\n\t}\n\n\treturn currentClosestKeyword;\n};\n\nconvert.keyword.rgb = function (keyword) {\n\treturn cssKeywords[keyword];\n};\n\nconvert.rgb.xyz = function (rgb) {\n\tlet r = rgb[0] / 255;\n\tlet g = rgb[1] / 255;\n\tlet b = rgb[2] / 255;\n\n\t// Assume sRGB\n\tr = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92);\n\tg = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92);\n\tb = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92);\n\n\tconst x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);\n\tconst y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);\n\tconst z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);\n\n\treturn [x * 100, y * 100, z * 100];\n};\n\nconvert.rgb.lab = function (rgb) {\n\tconst xyz = convert.rgb.xyz(rgb);\n\tlet x = xyz[0];\n\tlet y = xyz[1];\n\tlet z = xyz[2];\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);\n\n\tconst l = (116 * y) - 16;\n\tconst a = 500 * (x - y);\n\tconst b = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.hsl.rgb = function (hsl) {\n\tconst h = hsl[0] / 360;\n\tconst s = hsl[1] / 100;\n\tconst l = hsl[2] / 100;\n\tlet t2;\n\tlet t3;\n\tlet val;\n\n\tif (s === 0) {\n\t\tval = l * 255;\n\t\treturn [val, val, val];\n\t}\n\n\tif (l < 0.5) {\n\t\tt2 = l * (1 + s);\n\t} else {\n\t\tt2 = l + s - l * s;\n\t}\n\n\tconst t1 = 2 * l - t2;\n\n\tconst rgb = [0, 0, 0];\n\tfor (let i = 0; i < 3; i++) {\n\t\tt3 = h + 1 / 3 * -(i - 1);\n\t\tif (t3 < 0) {\n\t\t\tt3++;\n\t\t}\n\n\t\tif (t3 > 1) {\n\t\t\tt3--;\n\t\t}\n\n\t\tif (6 * t3 < 1) {\n\t\t\tval = t1 + (t2 - t1) * 6 * t3;\n\t\t} else if (2 * t3 < 1) {\n\t\t\tval = t2;\n\t\t} else if (3 * t3 < 2) {\n\t\t\tval = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n\t\t} else {\n\t\t\tval = t1;\n\t\t}\n\n\t\trgb[i] = val * 255;\n\t}\n\n\treturn rgb;\n};\n\nconvert.hsl.hsv = function (hsl) {\n\tconst h = hsl[0];\n\tlet s = hsl[1] / 100;\n\tlet l = hsl[2] / 100;\n\tlet smin = s;\n\tconst lmin = Math.max(l, 0.01);\n\n\tl *= 2;\n\ts *= (l <= 1) ? l : 2 - l;\n\tsmin *= lmin <= 1 ? lmin : 2 - lmin;\n\tconst v = (l + s) / 2;\n\tconst sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);\n\n\treturn [h, sv * 100, v * 100];\n};\n\nconvert.hsv.rgb = function (hsv) {\n\tconst h = hsv[0] / 60;\n\tconst s = hsv[1] / 100;\n\tlet v = hsv[2] / 100;\n\tconst hi = Math.floor(h) % 6;\n\n\tconst f = h - Math.floor(h);\n\tconst p = 255 * v * (1 - s);\n\tconst q = 255 * v * (1 - (s * f));\n\tconst t = 255 * v * (1 - (s * (1 - f)));\n\tv *= 255;\n\n\tswitch (hi) {\n\t\tcase 0:\n\t\t\treturn [v, t, p];\n\t\tcase 1:\n\t\t\treturn [q, v, p];\n\t\tcase 2:\n\t\t\treturn [p, v, t];\n\t\tcase 3:\n\t\t\treturn [p, q, v];\n\t\tcase 4:\n\t\t\treturn [t, p, v];\n\t\tcase 5:\n\t\t\treturn [v, p, q];\n\t}\n};\n\nconvert.hsv.hsl = function (hsv) {\n\tconst h = hsv[0];\n\tconst s = hsv[1] / 100;\n\tconst v = hsv[2] / 100;\n\tconst vmin = Math.max(v, 0.01);\n\tlet sl;\n\tlet l;\n\n\tl = (2 - s) * v;\n\tconst lmin = (2 - s) * vmin;\n\tsl = s * vmin;\n\tsl /= (lmin <= 1) ? lmin : 2 - lmin;\n\tsl = sl || 0;\n\tl /= 2;\n\n\treturn [h, sl * 100, l * 100];\n};\n\n// http://dev.w3.org/csswg/css-color/#hwb-to-rgb\nconvert.hwb.rgb = function (hwb) {\n\tconst h = hwb[0] / 360;\n\tlet wh = hwb[1] / 100;\n\tlet bl = hwb[2] / 100;\n\tconst ratio = wh + bl;\n\tlet f;\n\n\t// Wh + bl cant be > 1\n\tif (ratio > 1) {\n\t\twh /= ratio;\n\t\tbl /= ratio;\n\t}\n\n\tconst i = Math.floor(6 * h);\n\tconst v = 1 - bl;\n\tf = 6 * h - i;\n\n\tif ((i & 0x01) !== 0) {\n\t\tf = 1 - f;\n\t}\n\n\tconst n = wh + f * (v - wh); // Linear interpolation\n\n\tlet r;\n\tlet g;\n\tlet b;\n\t/* eslint-disable max-statements-per-line,no-multi-spaces */\n\tswitch (i) {\n\t\tdefault:\n\t\tcase 6:\n\t\tcase 0: r = v; g = n; b = wh; break;\n\t\tcase 1: r = n; g = v; b = wh; break;\n\t\tcase 2: r = wh; g = v; b = n; break;\n\t\tcase 3: r = wh; g = n; b = v; break;\n\t\tcase 4: r = n; g = wh; b = v; break;\n\t\tcase 5: r = v; g = wh; b = n; break;\n\t}\n\t/* eslint-enable max-statements-per-line,no-multi-spaces */\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.cmyk.rgb = function (cmyk) {\n\tconst c = cmyk[0] / 100;\n\tconst m = cmyk[1] / 100;\n\tconst y = cmyk[2] / 100;\n\tconst k = cmyk[3] / 100;\n\n\tconst r = 1 - Math.min(1, c * (1 - k) + k);\n\tconst g = 1 - Math.min(1, m * (1 - k) + k);\n\tconst b = 1 - Math.min(1, y * (1 - k) + k);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.rgb = function (xyz) {\n\tconst x = xyz[0] / 100;\n\tconst y = xyz[1] / 100;\n\tconst z = xyz[2] / 100;\n\tlet r;\n\tlet g;\n\tlet b;\n\n\tr = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n\tg = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n\tb = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n\t// Assume sRGB\n\tr = r > 0.0031308\n\t\t? ((1.055 * (r ** (1.0 / 2.4))) - 0.055)\n\t\t: r * 12.92;\n\n\tg = g > 0.0031308\n\t\t? ((1.055 * (g ** (1.0 / 2.4))) - 0.055)\n\t\t: g * 12.92;\n\n\tb = b > 0.0031308\n\t\t? ((1.055 * (b ** (1.0 / 2.4))) - 0.055)\n\t\t: b * 12.92;\n\n\tr = Math.min(Math.max(0, r), 1);\n\tg = Math.min(Math.max(0, g), 1);\n\tb = Math.min(Math.max(0, b), 1);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.lab = function (xyz) {\n\tlet x = xyz[0];\n\tlet y = xyz[1];\n\tlet z = xyz[2];\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);\n\n\tconst l = (116 * y) - 16;\n\tconst a = 500 * (x - y);\n\tconst b = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.lab.xyz = function (lab) {\n\tconst l = lab[0];\n\tconst a = lab[1];\n\tconst b = lab[2];\n\tlet x;\n\tlet y;\n\tlet z;\n\n\ty = (l + 16) / 116;\n\tx = a / 500 + y;\n\tz = y - b / 200;\n\n\tconst y2 = y ** 3;\n\tconst x2 = x ** 3;\n\tconst z2 = z ** 3;\n\ty = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;\n\tx = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;\n\tz = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;\n\n\tx *= 95.047;\n\ty *= 100;\n\tz *= 108.883;\n\n\treturn [x, y, z];\n};\n\nconvert.lab.lch = function (lab) {\n\tconst l = lab[0];\n\tconst a = lab[1];\n\tconst b = lab[2];\n\tlet h;\n\n\tconst hr = Math.atan2(b, a);\n\th = hr * 360 / 2 / Math.PI;\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tconst c = Math.sqrt(a * a + b * b);\n\n\treturn [l, c, h];\n};\n\nconvert.lch.lab = function (lch) {\n\tconst l = lch[0];\n\tconst c = lch[1];\n\tconst h = lch[2];\n\n\tconst hr = h / 360 * 2 * Math.PI;\n\tconst a = c * Math.cos(hr);\n\tconst b = c * Math.sin(hr);\n\n\treturn [l, a, b];\n};\n\nconvert.rgb.ansi16 = function (args, saturation = null) {\n\tconst [r, g, b] = args;\n\tlet value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization\n\n\tvalue = Math.round(value / 50);\n\n\tif (value === 0) {\n\t\treturn 30;\n\t}\n\n\tlet ansi = 30\n\t\t+ ((Math.round(b / 255) << 2)\n\t\t| (Math.round(g / 255) << 1)\n\t\t| Math.round(r / 255));\n\n\tif (value === 2) {\n\t\tansi += 60;\n\t}\n\n\treturn ansi;\n};\n\nconvert.hsv.ansi16 = function (args) {\n\t// Optimization here; we already know the value and don't need to get\n\t// it converted for us.\n\treturn convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);\n};\n\nconvert.rgb.ansi256 = function (args) {\n\tconst r = args[0];\n\tconst g = args[1];\n\tconst b = args[2];\n\n\t// We use the extended greyscale palette here, with the exception of\n\t// black and white. normal palette only has 4 greyscale shades.\n\tif (r === g && g === b) {\n\t\tif (r < 8) {\n\t\t\treturn 16;\n\t\t}\n\n\t\tif (r > 248) {\n\t\t\treturn 231;\n\t\t}\n\n\t\treturn Math.round(((r - 8) / 247) * 24) + 232;\n\t}\n\n\tconst ansi = 16\n\t\t+ (36 * Math.round(r / 255 * 5))\n\t\t+ (6 * Math.round(g / 255 * 5))\n\t\t+ Math.round(b / 255 * 5);\n\n\treturn ansi;\n};\n\nconvert.ansi16.rgb = function (args) {\n\tlet color = args % 10;\n\n\t// Handle greyscale\n\tif (color === 0 || color === 7) {\n\t\tif (args > 50) {\n\t\t\tcolor += 3.5;\n\t\t}\n\n\t\tcolor = color / 10.5 * 255;\n\n\t\treturn [color, color, color];\n\t}\n\n\tconst mult = (~~(args > 50) + 1) * 0.5;\n\tconst r = ((color & 1) * mult) * 255;\n\tconst g = (((color >> 1) & 1) * mult) * 255;\n\tconst b = (((color >> 2) & 1) * mult) * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.ansi256.rgb = function (args) {\n\t// Handle greyscale\n\tif (args >= 232) {\n\t\tconst c = (args - 232) * 10 + 8;\n\t\treturn [c, c, c];\n\t}\n\n\targs -= 16;\n\n\tlet rem;\n\tconst r = Math.floor(args / 36) / 5 * 255;\n\tconst g = Math.floor((rem = args % 36) / 6) / 5 * 255;\n\tconst b = (rem % 6) / 5 * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hex = function (args) {\n\tconst integer = ((Math.round(args[0]) & 0xFF) << 16)\n\t\t+ ((Math.round(args[1]) & 0xFF) << 8)\n\t\t+ (Math.round(args[2]) & 0xFF);\n\n\tconst string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.hex.rgb = function (args) {\n\tconst match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);\n\tif (!match) {\n\t\treturn [0, 0, 0];\n\t}\n\n\tlet colorString = match[0];\n\n\tif (match[0].length === 3) {\n\t\tcolorString = colorString.split('').map(char => {\n\t\t\treturn char + char;\n\t\t}).join('');\n\t}\n\n\tconst integer = parseInt(colorString, 16);\n\tconst r = (integer >> 16) & 0xFF;\n\tconst g = (integer >> 8) & 0xFF;\n\tconst b = integer & 0xFF;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hcg = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst max = Math.max(Math.max(r, g), b);\n\tconst min = Math.min(Math.min(r, g), b);\n\tconst chroma = (max - min);\n\tlet grayscale;\n\tlet hue;\n\n\tif (chroma < 1) {\n\t\tgrayscale = min / (1 - chroma);\n\t} else {\n\t\tgrayscale = 0;\n\t}\n\n\tif (chroma <= 0) {\n\t\thue = 0;\n\t} else\n\tif (max === r) {\n\t\thue = ((g - b) / chroma) % 6;\n\t} else\n\tif (max === g) {\n\t\thue = 2 + (b - r) / chroma;\n\t} else {\n\t\thue = 4 + (r - g) / chroma;\n\t}\n\n\thue /= 6;\n\thue %= 1;\n\n\treturn [hue * 360, chroma * 100, grayscale * 100];\n};\n\nconvert.hsl.hcg = function (hsl) {\n\tconst s = hsl[1] / 100;\n\tconst l = hsl[2] / 100;\n\n\tconst c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l));\n\n\tlet f = 0;\n\tif (c < 1.0) {\n\t\tf = (l - 0.5 * c) / (1.0 - c);\n\t}\n\n\treturn [hsl[0], c * 100, f * 100];\n};\n\nconvert.hsv.hcg = function (hsv) {\n\tconst s = hsv[1] / 100;\n\tconst v = hsv[2] / 100;\n\n\tconst c = s * v;\n\tlet f = 0;\n\n\tif (c < 1.0) {\n\t\tf = (v - c) / (1 - c);\n\t}\n\n\treturn [hsv[0], c * 100, f * 100];\n};\n\nconvert.hcg.rgb = function (hcg) {\n\tconst h = hcg[0] / 360;\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tif (c === 0.0) {\n\t\treturn [g * 255, g * 255, g * 255];\n\t}\n\n\tconst pure = [0, 0, 0];\n\tconst hi = (h % 1) * 6;\n\tconst v = hi % 1;\n\tconst w = 1 - v;\n\tlet mg = 0;\n\n\t/* eslint-disable max-statements-per-line */\n\tswitch (Math.floor(hi)) {\n\t\tcase 0:\n\t\t\tpure[0] = 1; pure[1] = v; pure[2] = 0; break;\n\t\tcase 1:\n\t\t\tpure[0] = w; pure[1] = 1; pure[2] = 0; break;\n\t\tcase 2:\n\t\t\tpure[0] = 0; pure[1] = 1; pure[2] = v; break;\n\t\tcase 3:\n\t\t\tpure[0] = 0; pure[1] = w; pure[2] = 1; break;\n\t\tcase 4:\n\t\t\tpure[0] = v; pure[1] = 0; pure[2] = 1; break;\n\t\tdefault:\n\t\t\tpure[0] = 1; pure[1] = 0; pure[2] = w;\n\t}\n\t/* eslint-enable max-statements-per-line */\n\n\tmg = (1.0 - c) * g;\n\n\treturn [\n\t\t(c * pure[0] + mg) * 255,\n\t\t(c * pure[1] + mg) * 255,\n\t\t(c * pure[2] + mg) * 255\n\t];\n};\n\nconvert.hcg.hsv = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tconst v = c + g * (1.0 - c);\n\tlet f = 0;\n\n\tif (v > 0.0) {\n\t\tf = c / v;\n\t}\n\n\treturn [hcg[0], f * 100, v * 100];\n};\n\nconvert.hcg.hsl = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tconst l = g * (1.0 - c) + 0.5 * c;\n\tlet s = 0;\n\n\tif (l > 0.0 && l < 0.5) {\n\t\ts = c / (2 * l);\n\t} else\n\tif (l >= 0.5 && l < 1.0) {\n\t\ts = c / (2 * (1 - l));\n\t}\n\n\treturn [hcg[0], s * 100, l * 100];\n};\n\nconvert.hcg.hwb = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\tconst v = c + g * (1.0 - c);\n\treturn [hcg[0], (v - c) * 100, (1 - v) * 100];\n};\n\nconvert.hwb.hcg = function (hwb) {\n\tconst w = hwb[1] / 100;\n\tconst b = hwb[2] / 100;\n\tconst v = 1 - b;\n\tconst c = v - w;\n\tlet g = 0;\n\n\tif (c < 1) {\n\t\tg = (v - c) / (1 - c);\n\t}\n\n\treturn [hwb[0], c * 100, g * 100];\n};\n\nconvert.apple.rgb = function (apple) {\n\treturn [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];\n};\n\nconvert.rgb.apple = function (rgb) {\n\treturn [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];\n};\n\nconvert.gray.rgb = function (args) {\n\treturn [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];\n};\n\nconvert.gray.hsl = function (args) {\n\treturn [0, 0, args[0]];\n};\n\nconvert.gray.hsv = convert.gray.hsl;\n\nconvert.gray.hwb = function (gray) {\n\treturn [0, 100, gray[0]];\n};\n\nconvert.gray.cmyk = function (gray) {\n\treturn [0, 0, 0, gray[0]];\n};\n\nconvert.gray.lab = function (gray) {\n\treturn [gray[0], 0, 0];\n};\n\nconvert.gray.hex = function (gray) {\n\tconst val = Math.round(gray[0] / 100 * 255) & 0xFF;\n\tconst integer = (val << 16) + (val << 8) + val;\n\n\tconst string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.rgb.gray = function (rgb) {\n\tconst val = (rgb[0] + rgb[1] + rgb[2]) / 3;\n\treturn [val / 255 * 100];\n};\n","const conversions = require('./conversions');\nconst route = require('./route');\n\nconst convert = {};\n\nconst models = Object.keys(conversions);\n\nfunction wrapRaw(fn) {\n\tconst wrappedFn = function (...args) {\n\t\tconst arg0 = args[0];\n\t\tif (arg0 === undefined || arg0 === null) {\n\t\t\treturn arg0;\n\t\t}\n\n\t\tif (arg0.length > 1) {\n\t\t\targs = arg0;\n\t\t}\n\n\t\treturn fn(args);\n\t};\n\n\t// Preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nfunction wrapRounded(fn) {\n\tconst wrappedFn = function (...args) {\n\t\tconst arg0 = args[0];\n\n\t\tif (arg0 === undefined || arg0 === null) {\n\t\t\treturn arg0;\n\t\t}\n\n\t\tif (arg0.length > 1) {\n\t\t\targs = arg0;\n\t\t}\n\n\t\tconst result = fn(args);\n\n\t\t// We're assuming the result is an array here.\n\t\t// see notice in conversions.js; don't use box types\n\t\t// in conversion functions.\n\t\tif (typeof result === 'object') {\n\t\t\tfor (let len = result.length, i = 0; i < len; i++) {\n\t\t\t\tresult[i] = Math.round(result[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\t// Preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nmodels.forEach(fromModel => {\n\tconvert[fromModel] = {};\n\n\tObject.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});\n\tObject.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});\n\n\tconst routes = route(fromModel);\n\tconst routeModels = Object.keys(routes);\n\n\trouteModels.forEach(toModel => {\n\t\tconst fn = routes[toModel];\n\n\t\tconvert[fromModel][toModel] = wrapRounded(fn);\n\t\tconvert[fromModel][toModel].raw = wrapRaw(fn);\n\t});\n});\n\nmodule.exports = convert;\n","const conversions = require('./conversions');\n\n/*\n\tThis function routes a model to all other models.\n\n\tall functions that are routed have a property `.conversion` attached\n\tto the returned synthetic function. This property is an array\n\tof strings, each with the steps in between the 'from' and 'to'\n\tcolor models (inclusive).\n\n\tconversions that are not possible simply are not included.\n*/\n\nfunction buildGraph() {\n\tconst graph = {};\n\t// https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\tconst models = Object.keys(conversions);\n\n\tfor (let len = models.length, i = 0; i < len; i++) {\n\t\tgraph[models[i]] = {\n\t\t\t// http://jsperf.com/1-vs-infinity\n\t\t\t// micro-opt, but this is simple.\n\t\t\tdistance: -1,\n\t\t\tparent: null\n\t\t};\n\t}\n\n\treturn graph;\n}\n\n// https://en.wikipedia.org/wiki/Breadth-first_search\nfunction deriveBFS(fromModel) {\n\tconst graph = buildGraph();\n\tconst queue = [fromModel]; // Unshift -> queue -> pop\n\n\tgraph[fromModel].distance = 0;\n\n\twhile (queue.length) {\n\t\tconst current = queue.pop();\n\t\tconst adjacents = Object.keys(conversions[current]);\n\n\t\tfor (let len = adjacents.length, i = 0; i < len; i++) {\n\t\t\tconst adjacent = adjacents[i];\n\t\t\tconst node = graph[adjacent];\n\n\t\t\tif (node.distance === -1) {\n\t\t\t\tnode.distance = graph[current].distance + 1;\n\t\t\t\tnode.parent = current;\n\t\t\t\tqueue.unshift(adjacent);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn graph;\n}\n\nfunction link(from, to) {\n\treturn function (args) {\n\t\treturn to(from(args));\n\t};\n}\n\nfunction wrapConversion(toModel, graph) {\n\tconst path = [graph[toModel].parent, toModel];\n\tlet fn = conversions[graph[toModel].parent][toModel];\n\n\tlet cur = graph[toModel].parent;\n\twhile (graph[cur].parent) {\n\t\tpath.unshift(graph[cur].parent);\n\t\tfn = link(conversions[graph[cur].parent][cur], fn);\n\t\tcur = graph[cur].parent;\n\t}\n\n\tfn.conversion = path;\n\treturn fn;\n}\n\nmodule.exports = function (fromModel) {\n\tconst graph = deriveBFS(fromModel);\n\tconst conversion = {};\n\n\tconst models = Object.keys(graph);\n\tfor (let len = models.length, i = 0; i < len; i++) {\n\t\tconst toModel = models[i];\n\t\tconst node = graph[toModel];\n\n\t\tif (node.parent === null) {\n\t\t\t// No possible conversion, or this node is the source model.\n\t\t\tcontinue;\n\t\t}\n\n\t\tconversion[toModel] = wrapConversion(toModel, graph);\n\t}\n\n\treturn conversion;\n};\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(\n uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\n ))\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","'use strict';\n\nconst stringify = require('./lib/stringify');\nconst compile = require('./lib/compile');\nconst expand = require('./lib/expand');\nconst parse = require('./lib/parse');\n\n/**\n * Expand the given pattern or create a regex-compatible string.\n *\n * ```js\n * const braces = require('braces');\n * console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)']\n * console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c']\n * ```\n * @param {String} `str`\n * @param {Object} `options`\n * @return {String}\n * @api public\n */\n\nconst braces = (input, options = {}) => {\n let output = [];\n\n if (Array.isArray(input)) {\n for (let pattern of input) {\n let result = braces.create(pattern, options);\n if (Array.isArray(result)) {\n output.push(...result);\n } else {\n output.push(result);\n }\n }\n } else {\n output = [].concat(braces.create(input, options));\n }\n\n if (options && options.expand === true && options.nodupes === true) {\n output = [...new Set(output)];\n }\n return output;\n};\n\n/**\n * Parse the given `str` with the given `options`.\n *\n * ```js\n * // braces.parse(pattern, [, options]);\n * const ast = braces.parse('a/{b,c}/d');\n * console.log(ast);\n * ```\n * @param {String} pattern Brace pattern to parse\n * @param {Object} options\n * @return {Object} Returns an AST\n * @api public\n */\n\nbraces.parse = (input, options = {}) => parse(input, options);\n\n/**\n * Creates a braces string from an AST, or an AST node.\n *\n * ```js\n * const braces = require('braces');\n * let ast = braces.parse('foo/{a,b}/bar');\n * console.log(stringify(ast.nodes[2])); //=> '{a,b}'\n * ```\n * @param {String} `input` Brace pattern or AST.\n * @param {Object} `options`\n * @return {Array} Returns an array of expanded values.\n * @api public\n */\n\nbraces.stringify = (input, options = {}) => {\n if (typeof input === 'string') {\n return stringify(braces.parse(input, options), options);\n }\n return stringify(input, options);\n};\n\n/**\n * Compiles a brace pattern into a regex-compatible, optimized string.\n * This method is called by the main [braces](#braces) function by default.\n *\n * ```js\n * const braces = require('braces');\n * console.log(braces.compile('a/{b,c}/d'));\n * //=> ['a/(b|c)/d']\n * ```\n * @param {String} `input` Brace pattern or AST.\n * @param {Object} `options`\n * @return {Array} Returns an array of expanded values.\n * @api public\n */\n\nbraces.compile = (input, options = {}) => {\n if (typeof input === 'string') {\n input = braces.parse(input, options);\n }\n return compile(input, options);\n};\n\n/**\n * Expands a brace pattern into an array. This method is called by the\n * main [braces](#braces) function when `options.expand` is true. Before\n * using this method it's recommended that you read the [performance notes](#performance))\n * and advantages of using [.compile](#compile) instead.\n *\n * ```js\n * const braces = require('braces');\n * console.log(braces.expand('a/{b,c}/d'));\n * //=> ['a/b/d', 'a/c/d'];\n * ```\n * @param {String} `pattern` Brace pattern\n * @param {Object} `options`\n * @return {Array} Returns an array of expanded values.\n * @api public\n */\n\nbraces.expand = (input, options = {}) => {\n if (typeof input === 'string') {\n input = braces.parse(input, options);\n }\n\n let result = expand(input, options);\n\n // filter out empty strings if specified\n if (options.noempty === true) {\n result = result.filter(Boolean);\n }\n\n // filter out duplicates if specified\n if (options.nodupes === true) {\n result = [...new Set(result)];\n }\n\n return result;\n};\n\n/**\n * Processes a brace pattern and returns either an expanded array\n * (if `options.expand` is true), a highly optimized regex-compatible string.\n * This method is called by the main [braces](#braces) function.\n *\n * ```js\n * const braces = require('braces');\n * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}'))\n * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)'\n * ```\n * @param {String} `pattern` Brace pattern\n * @param {Object} `options`\n * @return {Array} Returns an array of expanded values.\n * @api public\n */\n\nbraces.create = (input, options = {}) => {\n if (input === '' || input.length < 3) {\n return [input];\n }\n\n return options.expand !== true\n ? braces.compile(input, options)\n : braces.expand(input, options);\n};\n\n/**\n * Expose \"braces\"\n */\n\nmodule.exports = braces;\n","'use strict';\n\nconst fill = require('fill-range');\nconst utils = require('./utils');\n\nconst compile = (ast, options = {}) => {\n let walk = (node, parent = {}) => {\n let invalidBlock = utils.isInvalidBrace(parent);\n let invalidNode = node.invalid === true && options.escapeInvalid === true;\n let invalid = invalidBlock === true || invalidNode === true;\n let prefix = options.escapeInvalid === true ? '\\\\' : '';\n let output = '';\n\n if (node.isOpen === true) {\n return prefix + node.value;\n }\n if (node.isClose === true) {\n return prefix + node.value;\n }\n\n if (node.type === 'open') {\n return invalid ? (prefix + node.value) : '(';\n }\n\n if (node.type === 'close') {\n return invalid ? (prefix + node.value) : ')';\n }\n\n if (node.type === 'comma') {\n return node.prev.type === 'comma' ? '' : (invalid ? node.value : '|');\n }\n\n if (node.value) {\n return node.value;\n }\n\n if (node.nodes && node.ranges > 0) {\n let args = utils.reduce(node.nodes);\n let range = fill(...args, { ...options, wrap: false, toRegex: true });\n\n if (range.length !== 0) {\n return args.length > 1 && range.length > 1 ? `(${range})` : range;\n }\n }\n\n if (node.nodes) {\n for (let child of node.nodes) {\n output += walk(child, node);\n }\n }\n return output;\n };\n\n return walk(ast);\n};\n\nmodule.exports = compile;\n","'use strict';\n\nmodule.exports = {\n MAX_LENGTH: 1024 * 64,\n\n // Digits\n CHAR_0: '0', /* 0 */\n CHAR_9: '9', /* 9 */\n\n // Alphabet chars.\n CHAR_UPPERCASE_A: 'A', /* A */\n CHAR_LOWERCASE_A: 'a', /* a */\n CHAR_UPPERCASE_Z: 'Z', /* Z */\n CHAR_LOWERCASE_Z: 'z', /* z */\n\n CHAR_LEFT_PARENTHESES: '(', /* ( */\n CHAR_RIGHT_PARENTHESES: ')', /* ) */\n\n CHAR_ASTERISK: '*', /* * */\n\n // Non-alphabetic chars.\n CHAR_AMPERSAND: '&', /* & */\n CHAR_AT: '@', /* @ */\n CHAR_BACKSLASH: '\\\\', /* \\ */\n CHAR_BACKTICK: '`', /* ` */\n CHAR_CARRIAGE_RETURN: '\\r', /* \\r */\n CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */\n CHAR_COLON: ':', /* : */\n CHAR_COMMA: ',', /* , */\n CHAR_DOLLAR: '$', /* . */\n CHAR_DOT: '.', /* . */\n CHAR_DOUBLE_QUOTE: '\"', /* \" */\n CHAR_EQUAL: '=', /* = */\n CHAR_EXCLAMATION_MARK: '!', /* ! */\n CHAR_FORM_FEED: '\\f', /* \\f */\n CHAR_FORWARD_SLASH: '/', /* / */\n CHAR_HASH: '#', /* # */\n CHAR_HYPHEN_MINUS: '-', /* - */\n CHAR_LEFT_ANGLE_BRACKET: '<', /* < */\n CHAR_LEFT_CURLY_BRACE: '{', /* { */\n CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */\n CHAR_LINE_FEED: '\\n', /* \\n */\n CHAR_NO_BREAK_SPACE: '\\u00A0', /* \\u00A0 */\n CHAR_PERCENT: '%', /* % */\n CHAR_PLUS: '+', /* + */\n CHAR_QUESTION_MARK: '?', /* ? */\n CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */\n CHAR_RIGHT_CURLY_BRACE: '}', /* } */\n CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */\n CHAR_SEMICOLON: ';', /* ; */\n CHAR_SINGLE_QUOTE: '\\'', /* ' */\n CHAR_SPACE: ' ', /* */\n CHAR_TAB: '\\t', /* \\t */\n CHAR_UNDERSCORE: '_', /* _ */\n CHAR_VERTICAL_LINE: '|', /* | */\n CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\\uFEFF' /* \\uFEFF */\n};\n","'use strict';\n\nconst fill = require('fill-range');\nconst stringify = require('./stringify');\nconst utils = require('./utils');\n\nconst append = (queue = '', stash = '', enclose = false) => {\n let result = [];\n\n queue = [].concat(queue);\n stash = [].concat(stash);\n\n if (!stash.length) return queue;\n if (!queue.length) {\n return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash;\n }\n\n for (let item of queue) {\n if (Array.isArray(item)) {\n for (let value of item) {\n result.push(append(value, stash, enclose));\n }\n } else {\n for (let ele of stash) {\n if (enclose === true && typeof ele === 'string') ele = `{${ele}}`;\n result.push(Array.isArray(ele) ? append(item, ele, enclose) : (item + ele));\n }\n }\n }\n return utils.flatten(result);\n};\n\nconst expand = (ast, options = {}) => {\n let rangeLimit = options.rangeLimit === void 0 ? 1000 : options.rangeLimit;\n\n let walk = (node, parent = {}) => {\n node.queue = [];\n\n let p = parent;\n let q = parent.queue;\n\n while (p.type !== 'brace' && p.type !== 'root' && p.parent) {\n p = p.parent;\n q = p.queue;\n }\n\n if (node.invalid || node.dollar) {\n q.push(append(q.pop(), stringify(node, options)));\n return;\n }\n\n if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) {\n q.push(append(q.pop(), ['{}']));\n return;\n }\n\n if (node.nodes && node.ranges > 0) {\n let args = utils.reduce(node.nodes);\n\n if (utils.exceedsLimit(...args, options.step, rangeLimit)) {\n throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.');\n }\n\n let range = fill(...args, options);\n if (range.length === 0) {\n range = stringify(node, options);\n }\n\n q.push(append(q.pop(), range));\n node.nodes = [];\n return;\n }\n\n let enclose = utils.encloseBrace(node);\n let queue = node.queue;\n let block = node;\n\n while (block.type !== 'brace' && block.type !== 'root' && block.parent) {\n block = block.parent;\n queue = block.queue;\n }\n\n for (let i = 0; i < node.nodes.length; i++) {\n let child = node.nodes[i];\n\n if (child.type === 'comma' && node.type === 'brace') {\n if (i === 1) queue.push('');\n queue.push('');\n continue;\n }\n\n if (child.type === 'close') {\n q.push(append(q.pop(), queue, enclose));\n continue;\n }\n\n if (child.value && child.type !== 'open') {\n queue.push(append(queue.pop(), child.value));\n continue;\n }\n\n if (child.nodes) {\n walk(child, node);\n }\n }\n\n return queue;\n };\n\n return utils.flatten(walk(ast));\n};\n\nmodule.exports = expand;\n","'use strict';\n\nconst stringify = require('./stringify');\n\n/**\n * Constants\n */\n\nconst {\n MAX_LENGTH,\n CHAR_BACKSLASH, /* \\ */\n CHAR_BACKTICK, /* ` */\n CHAR_COMMA, /* , */\n CHAR_DOT, /* . */\n CHAR_LEFT_PARENTHESES, /* ( */\n CHAR_RIGHT_PARENTHESES, /* ) */\n CHAR_LEFT_CURLY_BRACE, /* { */\n CHAR_RIGHT_CURLY_BRACE, /* } */\n CHAR_LEFT_SQUARE_BRACKET, /* [ */\n CHAR_RIGHT_SQUARE_BRACKET, /* ] */\n CHAR_DOUBLE_QUOTE, /* \" */\n CHAR_SINGLE_QUOTE, /* ' */\n CHAR_NO_BREAK_SPACE,\n CHAR_ZERO_WIDTH_NOBREAK_SPACE\n} = require('./constants');\n\n/**\n * parse\n */\n\nconst parse = (input, options = {}) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected a string');\n }\n\n let opts = options || {};\n let max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n if (input.length > max) {\n throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);\n }\n\n let ast = { type: 'root', input, nodes: [] };\n let stack = [ast];\n let block = ast;\n let prev = ast;\n let brackets = 0;\n let length = input.length;\n let index = 0;\n let depth = 0;\n let value;\n let memo = {};\n\n /**\n * Helpers\n */\n\n const advance = () => input[index++];\n const push = node => {\n if (node.type === 'text' && prev.type === 'dot') {\n prev.type = 'text';\n }\n\n if (prev && prev.type === 'text' && node.type === 'text') {\n prev.value += node.value;\n return;\n }\n\n block.nodes.push(node);\n node.parent = block;\n node.prev = prev;\n prev = node;\n return node;\n };\n\n push({ type: 'bos' });\n\n while (index < length) {\n block = stack[stack.length - 1];\n value = advance();\n\n /**\n * Invalid chars\n */\n\n if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {\n continue;\n }\n\n /**\n * Escaped chars\n */\n\n if (value === CHAR_BACKSLASH) {\n push({ type: 'text', value: (options.keepEscaping ? value : '') + advance() });\n continue;\n }\n\n /**\n * Right square bracket (literal): ']'\n */\n\n if (value === CHAR_RIGHT_SQUARE_BRACKET) {\n push({ type: 'text', value: '\\\\' + value });\n continue;\n }\n\n /**\n * Left square bracket: '['\n */\n\n if (value === CHAR_LEFT_SQUARE_BRACKET) {\n brackets++;\n\n let closed = true;\n let next;\n\n while (index < length && (next = advance())) {\n value += next;\n\n if (next === CHAR_LEFT_SQUARE_BRACKET) {\n brackets++;\n continue;\n }\n\n if (next === CHAR_BACKSLASH) {\n value += advance();\n continue;\n }\n\n if (next === CHAR_RIGHT_SQUARE_BRACKET) {\n brackets--;\n\n if (brackets === 0) {\n break;\n }\n }\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Parentheses\n */\n\n if (value === CHAR_LEFT_PARENTHESES) {\n block = push({ type: 'paren', nodes: [] });\n stack.push(block);\n push({ type: 'text', value });\n continue;\n }\n\n if (value === CHAR_RIGHT_PARENTHESES) {\n if (block.type !== 'paren') {\n push({ type: 'text', value });\n continue;\n }\n block = stack.pop();\n push({ type: 'text', value });\n block = stack[stack.length - 1];\n continue;\n }\n\n /**\n * Quotes: '|\"|`\n */\n\n if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {\n let open = value;\n let next;\n\n if (options.keepQuotes !== true) {\n value = '';\n }\n\n while (index < length && (next = advance())) {\n if (next === CHAR_BACKSLASH) {\n value += next + advance();\n continue;\n }\n\n if (next === open) {\n if (options.keepQuotes === true) value += next;\n break;\n }\n\n value += next;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Left curly brace: '{'\n */\n\n if (value === CHAR_LEFT_CURLY_BRACE) {\n depth++;\n\n let dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true;\n let brace = {\n type: 'brace',\n open: true,\n close: false,\n dollar,\n depth,\n commas: 0,\n ranges: 0,\n nodes: []\n };\n\n block = push(brace);\n stack.push(block);\n push({ type: 'open', value });\n continue;\n }\n\n /**\n * Right curly brace: '}'\n */\n\n if (value === CHAR_RIGHT_CURLY_BRACE) {\n if (block.type !== 'brace') {\n push({ type: 'text', value });\n continue;\n }\n\n let type = 'close';\n block = stack.pop();\n block.close = true;\n\n push({ type, value });\n depth--;\n\n block = stack[stack.length - 1];\n continue;\n }\n\n /**\n * Comma: ','\n */\n\n if (value === CHAR_COMMA && depth > 0) {\n if (block.ranges > 0) {\n block.ranges = 0;\n let open = block.nodes.shift();\n block.nodes = [open, { type: 'text', value: stringify(block) }];\n }\n\n push({ type: 'comma', value });\n block.commas++;\n continue;\n }\n\n /**\n * Dot: '.'\n */\n\n if (value === CHAR_DOT && depth > 0 && block.commas === 0) {\n let siblings = block.nodes;\n\n if (depth === 0 || siblings.length === 0) {\n push({ type: 'text', value });\n continue;\n }\n\n if (prev.type === 'dot') {\n block.range = [];\n prev.value += value;\n prev.type = 'range';\n\n if (block.nodes.length !== 3 && block.nodes.length !== 5) {\n block.invalid = true;\n block.ranges = 0;\n prev.type = 'text';\n continue;\n }\n\n block.ranges++;\n block.args = [];\n continue;\n }\n\n if (prev.type === 'range') {\n siblings.pop();\n\n let before = siblings[siblings.length - 1];\n before.value += prev.value + value;\n prev = before;\n block.ranges--;\n continue;\n }\n\n push({ type: 'dot', value });\n continue;\n }\n\n /**\n * Text\n */\n\n push({ type: 'text', value });\n }\n\n // Mark imbalanced braces and brackets as invalid\n do {\n block = stack.pop();\n\n if (block.type !== 'root') {\n block.nodes.forEach(node => {\n if (!node.nodes) {\n if (node.type === 'open') node.isOpen = true;\n if (node.type === 'close') node.isClose = true;\n if (!node.nodes) node.type = 'text';\n node.invalid = true;\n }\n });\n\n // get the location of the block on parent.nodes (block's siblings)\n let parent = stack[stack.length - 1];\n let index = parent.nodes.indexOf(block);\n // replace the (invalid) block with it's nodes\n parent.nodes.splice(index, 1, ...block.nodes);\n }\n } while (stack.length > 0);\n\n push({ type: 'eos' });\n return ast;\n};\n\nmodule.exports = parse;\n","'use strict';\n\nconst utils = require('./utils');\n\nmodule.exports = (ast, options = {}) => {\n let stringify = (node, parent = {}) => {\n let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);\n let invalidNode = node.invalid === true && options.escapeInvalid === true;\n let output = '';\n\n if (node.value) {\n if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) {\n return '\\\\' + node.value;\n }\n return node.value;\n }\n\n if (node.value) {\n return node.value;\n }\n\n if (node.nodes) {\n for (let child of node.nodes) {\n output += stringify(child);\n }\n }\n return output;\n };\n\n return stringify(ast);\n};\n\n","'use strict';\n\nexports.isInteger = num => {\n if (typeof num === 'number') {\n return Number.isInteger(num);\n }\n if (typeof num === 'string' && num.trim() !== '') {\n return Number.isInteger(Number(num));\n }\n return false;\n};\n\n/**\n * Find a node of the given type\n */\n\nexports.find = (node, type) => node.nodes.find(node => node.type === type);\n\n/**\n * Find a node of the given type\n */\n\nexports.exceedsLimit = (min, max, step = 1, limit) => {\n if (limit === false) return false;\n if (!exports.isInteger(min) || !exports.isInteger(max)) return false;\n return ((Number(max) - Number(min)) / Number(step)) >= limit;\n};\n\n/**\n * Escape the given node with '\\\\' before node.value\n */\n\nexports.escapeNode = (block, n = 0, type) => {\n let node = block.nodes[n];\n if (!node) return;\n\n if ((type && node.type === type) || node.type === 'open' || node.type === 'close') {\n if (node.escaped !== true) {\n node.value = '\\\\' + node.value;\n node.escaped = true;\n }\n }\n};\n\n/**\n * Returns true if the given brace node should be enclosed in literal braces\n */\n\nexports.encloseBrace = node => {\n if (node.type !== 'brace') return false;\n if ((node.commas >> 0 + node.ranges >> 0) === 0) {\n node.invalid = true;\n return true;\n }\n return false;\n};\n\n/**\n * Returns true if a brace node is invalid.\n */\n\nexports.isInvalidBrace = block => {\n if (block.type !== 'brace') return false;\n if (block.invalid === true || block.dollar) return true;\n if ((block.commas >> 0 + block.ranges >> 0) === 0) {\n block.invalid = true;\n return true;\n }\n if (block.open !== true || block.close !== true) {\n block.invalid = true;\n return true;\n }\n return false;\n};\n\n/**\n * Returns true if a node is an open or close node\n */\n\nexports.isOpenOrClose = node => {\n if (node.type === 'open' || node.type === 'close') {\n return true;\n }\n return node.open === true || node.close === true;\n};\n\n/**\n * Reduce an array of text nodes.\n */\n\nexports.reduce = nodes => nodes.reduce((acc, node) => {\n if (node.type === 'text') acc.push(node.value);\n if (node.type === 'range') node.type = 'text';\n return acc;\n}, []);\n\n/**\n * Flatten an array\n */\n\nexports.flatten = (...args) => {\n const result = [];\n const flat = arr => {\n for (let i = 0; i < arr.length; i++) {\n let ele = arr[i];\n Array.isArray(ele) ? flat(ele, result) : ele !== void 0 && result.push(ele);\n }\n return result;\n };\n flat(args);\n return result;\n};\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh <http://feross.org>\n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object 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 * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\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 if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\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(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, 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 interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, 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(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\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(null, 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(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.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 that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().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)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var 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 (!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 var 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 var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\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 (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var 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 case undefined:\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) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var 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 coersion 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// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var 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 var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var 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 var length = this.length | 0\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.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 var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return '<Buffer ' + str + '>'\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\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 var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var 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 (isNaN(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 (Buffer.TYPED_ARRAY_SUPPORT &&\n 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 var indexSize = 1\n var arrLength = arr.length\n var 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 var i\n if (dir) {\n var 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 var found = true\n for (var 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 var 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 // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(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 latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, 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 // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var 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 var 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 return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(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 var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var 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\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var 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 var res = ''\n var 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 var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; 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 var 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 var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\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 = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\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 var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\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 = function readUInt32BE (offset, noAssert) {\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.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var 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 var i = byteLength\n var mul = 1\n var 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 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 if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\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 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.readFloatLE = function readFloatLE (offset, noAssert) {\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 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 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 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 = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var 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 = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var 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 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\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 if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\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 if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\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 if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\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 if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var 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 var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var 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 (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\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 if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\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 if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\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 if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\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 if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\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 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 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 (!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('sourceStart out of bounds')\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 var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\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 (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\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 } else if (typeof val === 'number') {\n val = val & 255\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 var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).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 stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var 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 var byteArray = []\n for (var 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 var c, hi, lo\n var byteArray = []\n for (var 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 for (var 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\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n","'use strict'\r\n\r\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\r\n","/*\n Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>\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 * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY\n DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n(function () {\n 'use strict';\n\n function isExpression(node) {\n if (node == null) { return false; }\n switch (node.type) {\n case 'ArrayExpression':\n case 'AssignmentExpression':\n case 'BinaryExpression':\n case 'CallExpression':\n case 'ConditionalExpression':\n case 'FunctionExpression':\n case 'Identifier':\n case 'Literal':\n case 'LogicalExpression':\n case 'MemberExpression':\n case 'NewExpression':\n case 'ObjectExpression':\n case 'SequenceExpression':\n case 'ThisExpression':\n case 'UnaryExpression':\n case 'UpdateExpression':\n return true;\n }\n return false;\n }\n\n function isIterationStatement(node) {\n if (node == null) { return false; }\n switch (node.type) {\n case 'DoWhileStatement':\n case 'ForInStatement':\n case 'ForStatement':\n case 'WhileStatement':\n return true;\n }\n return false;\n }\n\n function isStatement(node) {\n if (node == null) { return false; }\n switch (node.type) {\n case 'BlockStatement':\n case 'BreakStatement':\n case 'ContinueStatement':\n case 'DebuggerStatement':\n case 'DoWhileStatement':\n case 'EmptyStatement':\n case 'ExpressionStatement':\n case 'ForInStatement':\n case 'ForStatement':\n case 'IfStatement':\n case 'LabeledStatement':\n case 'ReturnStatement':\n case 'SwitchStatement':\n case 'ThrowStatement':\n case 'TryStatement':\n case 'VariableDeclaration':\n case 'WhileStatement':\n case 'WithStatement':\n return true;\n }\n return false;\n }\n\n function isSourceElement(node) {\n return isStatement(node) || node != null && node.type === 'FunctionDeclaration';\n }\n\n function trailingStatement(node) {\n switch (node.type) {\n case 'IfStatement':\n if (node.alternate != null) {\n return node.alternate;\n }\n return node.consequent;\n\n case 'LabeledStatement':\n case 'ForStatement':\n case 'ForInStatement':\n case 'WhileStatement':\n case 'WithStatement':\n return node.body;\n }\n return null;\n }\n\n function isProblematicIfStatement(node) {\n var current;\n\n if (node.type !== 'IfStatement') {\n return false;\n }\n if (node.alternate == null) {\n return false;\n }\n current = node.consequent;\n do {\n if (current.type === 'IfStatement') {\n if (current.alternate == null) {\n return true;\n }\n }\n current = trailingStatement(current);\n } while (current);\n\n return false;\n }\n\n module.exports = {\n isExpression: isExpression,\n isStatement: isStatement,\n isIterationStatement: isIterationStatement,\n isSourceElement: isSourceElement,\n isProblematicIfStatement: isProblematicIfStatement,\n\n trailingStatement: trailingStatement\n };\n}());\n/* vim: set sw=4 ts=4 et tw=80 : */\n","/*\n Copyright (C) 2013-2014 Yusuke Suzuki <utatane.tea@gmail.com>\n Copyright (C) 2014 Ivan Nikulin <ifaaan@gmail.com>\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 * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY\n DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n(function () {\n 'use strict';\n\n var ES6Regex, ES5Regex, NON_ASCII_WHITESPACES, IDENTIFIER_START, IDENTIFIER_PART, ch;\n\n // See `tools/generate-identifier-regex.js`.\n ES5Regex = {\n // ECMAScript 5.1/Unicode v9.0.0 NonAsciiIdentifierStart:\n NonAsciiIdentifierStart: /[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B4\\u08B6-\\u08BD\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FD5\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7AE\\uA7B0-\\uA7B7\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB65\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]/,\n // ECMAScript 5.1/Unicode v9.0.0 NonAsciiIdentifierPart:\n NonAsciiIdentifierPart: /[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B4\\u08B6-\\u08BD\\u08D4-\\u08E1\\u08E3-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0AF9\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\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40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1C80-\\u1C88\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFB-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FD5\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7AE\\uA7B0-\\uA7B7\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C5\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA8FD\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB65\\uAB70-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]/\n };\n\n ES6Regex = {\n // ECMAScript 6/Unicode v9.0.0 NonAsciiIdentifierStart:\n NonAsciiIdentifierStart: /[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B4\\u08B6-\\u08BD\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2118-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309B-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FD5\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7AE\\uA7B0-\\uA7B7\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB65\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\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\uDF80-\\uDF91]|\\uD803[\\uDC00-\\uDC48\\uDC80-\\uDCB2\\uDCC0-\\uDCF2]|\\uD804[\\uDC03-\\uDC37\\uDC83-\\uDCAF\\uDCD0-\\uDCE8\\uDD03-\\uDD26\\uDD50-\\uDD72\\uDD76\\uDD83-\\uDDB2\\uDDC1-\\uDDC4\\uDDDA\\uDDDC\\uDE00-\\uDE11\\uDE13-\\uDE2B\\uDE80-\\uDE86\\uDE88\\uDE8A-\\uDE8D\\uDE8F-\\uDE9D\\uDE9F-\\uDEA8\\uDEB0-\\uDEDE\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3D\\uDF50\\uDF5D-\\uDF61]|\\uD805[\\uDC00-\\uDC34\\uDC47-\\uDC4A\\uDC80-\\uDCAF\\uDCC4\\uDCC5\\uDCC7\\uDD80-\\uDDAE\\uDDD8-\\uDDDB\\uDE00-\\uDE2F\\uDE44\\uDE80-\\uDEAA\\uDF00-\\uDF19]|\\uD806[\\uDCA0-\\uDCDF\\uDCFF\\uDEC0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC2E\\uDC40\\uDC72-\\uDC8F]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC00-\\uDC6E\\uDC80-\\uDD43]|[\\uD80C\\uD81C-\\uD820\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF40-\\uDF43\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDF00-\\uDF44\\uDF50\\uDF93-\\uDF9F\\uDFE0]|\\uD821[\\uDC00-\\uDFEC]|\\uD822[\\uDC00-\\uDEF2]|\\uD82C[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// ECMAScript 6/Unicode v9.0.0 NonAsciiIdentifierPart:\n NonAsciiIdentifierPart: /[\\xAA\\xB5\\xB7\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B4\\u08B6-\\u08BD\\u08D4-\\u08E1\\u08E3-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0A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1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1369-\\u1371\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19DA\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1C80-\\u1C88\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFB-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2118-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FD5\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7AE\\uA7B0-\\uA7B7\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C5\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA8FD\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB65\\uAB70-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\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DE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDED6\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1]|\\uD87E[\\uDC00-\\uDE1D]|\\uDB40[\\uDD00-\\uDDEF]/\n };\n\n function isDecimalDigit(ch) {\n return 0x30 <= ch && ch <= 0x39; // 0..9\n }\n\n function isHexDigit(ch) {\n return 0x30 <= ch && ch <= 0x39 || // 0..9\n 0x61 <= ch && ch <= 0x66 || // a..f\n 0x41 <= ch && ch <= 0x46; // A..F\n }\n\n function isOctalDigit(ch) {\n return ch >= 0x30 && ch <= 0x37; // 0..7\n }\n\n // 7.2 White Space\n\n NON_ASCII_WHITESPACES = [\n 0x1680,\n 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A,\n 0x202F, 0x205F,\n 0x3000,\n 0xFEFF\n ];\n\n function isWhiteSpace(ch) {\n return ch === 0x20 || ch === 0x09 || ch === 0x0B || ch === 0x0C || ch === 0xA0 ||\n ch >= 0x1680 && NON_ASCII_WHITESPACES.indexOf(ch) >= 0;\n }\n\n // 7.3 Line Terminators\n\n function isLineTerminator(ch) {\n return ch === 0x0A || ch === 0x0D || ch === 0x2028 || ch === 0x2029;\n }\n\n // 7.6 Identifier Names and Identifiers\n\n function fromCodePoint(cp) {\n if (cp <= 0xFFFF) { return String.fromCharCode(cp); }\n var cu1 = String.fromCharCode(Math.floor((cp - 0x10000) / 0x400) + 0xD800);\n var cu2 = String.fromCharCode(((cp - 0x10000) % 0x400) + 0xDC00);\n return cu1 + cu2;\n }\n\n IDENTIFIER_START = new Array(0x80);\n for(ch = 0; ch < 0x80; ++ch) {\n IDENTIFIER_START[ch] =\n ch >= 0x61 && ch <= 0x7A || // a..z\n ch >= 0x41 && ch <= 0x5A || // A..Z\n ch === 0x24 || ch === 0x5F; // $ (dollar) and _ (underscore)\n }\n\n IDENTIFIER_PART = new Array(0x80);\n for(ch = 0; ch < 0x80; ++ch) {\n IDENTIFIER_PART[ch] =\n ch >= 0x61 && ch <= 0x7A || // a..z\n ch >= 0x41 && ch <= 0x5A || // A..Z\n ch >= 0x30 && ch <= 0x39 || // 0..9\n ch === 0x24 || ch === 0x5F; // $ (dollar) and _ (underscore)\n }\n\n function isIdentifierStartES5(ch) {\n return ch < 0x80 ? IDENTIFIER_START[ch] : ES5Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch));\n }\n\n function isIdentifierPartES5(ch) {\n return ch < 0x80 ? IDENTIFIER_PART[ch] : ES5Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch));\n }\n\n function isIdentifierStartES6(ch) {\n return ch < 0x80 ? IDENTIFIER_START[ch] : ES6Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch));\n }\n\n function isIdentifierPartES6(ch) {\n return ch < 0x80 ? IDENTIFIER_PART[ch] : ES6Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch));\n }\n\n module.exports = {\n isDecimalDigit: isDecimalDigit,\n isHexDigit: isHexDigit,\n isOctalDigit: isOctalDigit,\n isWhiteSpace: isWhiteSpace,\n isLineTerminator: isLineTerminator,\n isIdentifierStartES5: isIdentifierStartES5,\n isIdentifierPartES5: isIdentifierPartES5,\n isIdentifierStartES6: isIdentifierStartES6,\n isIdentifierPartES6: isIdentifierPartES6\n };\n}());\n/* vim: set sw=4 ts=4 et tw=80 : */\n","/*\n Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>\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 * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY\n DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n(function () {\n 'use strict';\n\n var code = require('./code');\n\n function isStrictModeReservedWordES6(id) {\n switch (id) {\n case 'implements':\n case 'interface':\n case 'package':\n case 'private':\n case 'protected':\n case 'public':\n case 'static':\n case 'let':\n return true;\n default:\n return false;\n }\n }\n\n function isKeywordES5(id, strict) {\n // yield should not be treated as keyword under non-strict mode.\n if (!strict && id === 'yield') {\n return false;\n }\n return isKeywordES6(id, strict);\n }\n\n function isKeywordES6(id, strict) {\n if (strict && isStrictModeReservedWordES6(id)) {\n return true;\n }\n\n switch (id.length) {\n case 2:\n return (id === 'if') || (id === 'in') || (id === 'do');\n case 3:\n return (id === 'var') || (id === 'for') || (id === 'new') || (id === 'try');\n case 4:\n return (id === 'this') || (id === 'else') || (id === 'case') ||\n (id === 'void') || (id === 'with') || (id === 'enum');\n case 5:\n return (id === 'while') || (id === 'break') || (id === 'catch') ||\n (id === 'throw') || (id === 'const') || (id === 'yield') ||\n (id === 'class') || (id === 'super');\n case 6:\n return (id === 'return') || (id === 'typeof') || (id === 'delete') ||\n (id === 'switch') || (id === 'export') || (id === 'import');\n case 7:\n return (id === 'default') || (id === 'finally') || (id === 'extends');\n case 8:\n return (id === 'function') || (id === 'continue') || (id === 'debugger');\n case 10:\n return (id === 'instanceof');\n default:\n return false;\n }\n }\n\n function isReservedWordES5(id, strict) {\n return id === 'null' || id === 'true' || id === 'false' || isKeywordES5(id, strict);\n }\n\n function isReservedWordES6(id, strict) {\n return id === 'null' || id === 'true' || id === 'false' || isKeywordES6(id, strict);\n }\n\n function isRestrictedWord(id) {\n return id === 'eval' || id === 'arguments';\n }\n\n function isIdentifierNameES5(id) {\n var i, iz, ch;\n\n if (id.length === 0) { return false; }\n\n ch = id.charCodeAt(0);\n if (!code.isIdentifierStartES5(ch)) {\n return false;\n }\n\n for (i = 1, iz = id.length; i < iz; ++i) {\n ch = id.charCodeAt(i);\n if (!code.isIdentifierPartES5(ch)) {\n return false;\n }\n }\n return true;\n }\n\n function decodeUtf16(lead, trail) {\n return (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n }\n\n function isIdentifierNameES6(id) {\n var i, iz, ch, lowCh, check;\n\n if (id.length === 0) { return false; }\n\n check = code.isIdentifierStartES6;\n for (i = 0, iz = id.length; i < iz; ++i) {\n ch = id.charCodeAt(i);\n if (0xD800 <= ch && ch <= 0xDBFF) {\n ++i;\n if (i >= iz) { return false; }\n lowCh = id.charCodeAt(i);\n if (!(0xDC00 <= lowCh && lowCh <= 0xDFFF)) {\n return false;\n }\n ch = decodeUtf16(ch, lowCh);\n }\n if (!check(ch)) {\n return false;\n }\n check = code.isIdentifierPartES6;\n }\n return true;\n }\n\n function isIdentifierES5(id, strict) {\n return isIdentifierNameES5(id) && !isReservedWordES5(id, strict);\n }\n\n function isIdentifierES6(id, strict) {\n return isIdentifierNameES6(id) && !isReservedWordES6(id, strict);\n }\n\n module.exports = {\n isKeywordES5: isKeywordES5,\n isKeywordES6: isKeywordES6,\n isReservedWordES5: isReservedWordES5,\n isReservedWordES6: isReservedWordES6,\n isRestrictedWord: isRestrictedWord,\n isIdentifierNameES5: isIdentifierNameES5,\n isIdentifierNameES6: isIdentifierNameES6,\n isIdentifierES5: isIdentifierES5,\n isIdentifierES6: isIdentifierES6\n };\n}());\n/* vim: set sw=4 ts=4 et tw=80 : */\n","/*\n Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>\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 * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY\n DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n\n(function () {\n 'use strict';\n\n exports.ast = require('./ast');\n exports.code = require('./code');\n exports.keyword = require('./keyword');\n}());\n/* vim: set sw=4 ts=4 et tw=80 : */\n","/*!\n * fill-range <https://github.com/jonschlinkert/fill-range>\n *\n * Copyright (c) 2014-present, Jon Schlinkert.\n * Licensed under the MIT License.\n */\n\n'use strict';\n\nconst util = require('util');\nconst toRegexRange = require('to-regex-range');\n\nconst isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);\n\nconst transform = toNumber => {\n return value => toNumber === true ? Number(value) : String(value);\n};\n\nconst isValidValue = value => {\n return typeof value === 'number' || (typeof value === 'string' && value !== '');\n};\n\nconst isNumber = num => Number.isInteger(+num);\n\nconst zeros = input => {\n let value = `${input}`;\n let index = -1;\n if (value[0] === '-') value = value.slice(1);\n if (value === '0') return false;\n while (value[++index] === '0');\n return index > 0;\n};\n\nconst stringify = (start, end, options) => {\n if (typeof start === 'string' || typeof end === 'string') {\n return true;\n }\n return options.stringify === true;\n};\n\nconst pad = (input, maxLength, toNumber) => {\n if (maxLength > 0) {\n let dash = input[0] === '-' ? '-' : '';\n if (dash) input = input.slice(1);\n input = (dash + input.padStart(dash ? maxLength - 1 : maxLength, '0'));\n }\n if (toNumber === false) {\n return String(input);\n }\n return input;\n};\n\nconst toMaxLen = (input, maxLength) => {\n let negative = input[0] === '-' ? '-' : '';\n if (negative) {\n input = input.slice(1);\n maxLength--;\n }\n while (input.length < maxLength) input = '0' + input;\n return negative ? ('-' + input) : input;\n};\n\nconst toSequence = (parts, options) => {\n parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);\n parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);\n\n let prefix = options.capture ? '' : '?:';\n let positives = '';\n let negatives = '';\n let result;\n\n if (parts.positives.length) {\n positives = parts.positives.join('|');\n }\n\n if (parts.negatives.length) {\n negatives = `-(${prefix}${parts.negatives.join('|')})`;\n }\n\n if (positives && negatives) {\n result = `${positives}|${negatives}`;\n } else {\n result = positives || negatives;\n }\n\n if (options.wrap) {\n return `(${prefix}${result})`;\n }\n\n return result;\n};\n\nconst toRange = (a, b, isNumbers, options) => {\n if (isNumbers) {\n return toRegexRange(a, b, { wrap: false, ...options });\n }\n\n let start = String.fromCharCode(a);\n if (a === b) return start;\n\n let stop = String.fromCharCode(b);\n return `[${start}-${stop}]`;\n};\n\nconst toRegex = (start, end, options) => {\n if (Array.isArray(start)) {\n let wrap = options.wrap === true;\n let prefix = options.capture ? '' : '?:';\n return wrap ? `(${prefix}${start.join('|')})` : start.join('|');\n }\n return toRegexRange(start, end, options);\n};\n\nconst rangeError = (...args) => {\n return new RangeError('Invalid range arguments: ' + util.inspect(...args));\n};\n\nconst invalidRange = (start, end, options) => {\n if (options.strictRanges === true) throw rangeError([start, end]);\n return [];\n};\n\nconst invalidStep = (step, options) => {\n if (options.strictRanges === true) {\n throw new TypeError(`Expected step \"${step}\" to be a number`);\n }\n return [];\n};\n\nconst fillNumbers = (start, end, step = 1, options = {}) => {\n let a = Number(start);\n let b = Number(end);\n\n if (!Number.isInteger(a) || !Number.isInteger(b)) {\n if (options.strictRanges === true) throw rangeError([start, end]);\n return [];\n }\n\n // fix negative zero\n if (a === 0) a = 0;\n if (b === 0) b = 0;\n\n let descending = a > b;\n let startString = String(start);\n let endString = String(end);\n let stepString = String(step);\n step = Math.max(Math.abs(step), 1);\n\n let padded = zeros(startString) || zeros(endString) || zeros(stepString);\n let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;\n let toNumber = padded === false && stringify(start, end, options) === false;\n let format = options.transform || transform(toNumber);\n\n if (options.toRegex && step === 1) {\n return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);\n }\n\n let parts = { negatives: [], positives: [] };\n let push = num => parts[num < 0 ? 'negatives' : 'positives'].push(Math.abs(num));\n let range = [];\n let index = 0;\n\n while (descending ? a >= b : a <= b) {\n if (options.toRegex === true && step > 1) {\n push(a);\n } else {\n range.push(pad(format(a, index), maxLen, toNumber));\n }\n a = descending ? a - step : a + step;\n index++;\n }\n\n if (options.toRegex === true) {\n return step > 1\n ? toSequence(parts, options)\n : toRegex(range, null, { wrap: false, ...options });\n }\n\n return range;\n};\n\nconst fillLetters = (start, end, step = 1, options = {}) => {\n if ((!isNumber(start) && start.length > 1) || (!isNumber(end) && end.length > 1)) {\n return invalidRange(start, end, options);\n }\n\n\n let format = options.transform || (val => String.fromCharCode(val));\n let a = `${start}`.charCodeAt(0);\n let b = `${end}`.charCodeAt(0);\n\n let descending = a > b;\n let min = Math.min(a, b);\n let max = Math.max(a, b);\n\n if (options.toRegex && step === 1) {\n return toRange(min, max, false, options);\n }\n\n let range = [];\n let index = 0;\n\n while (descending ? a >= b : a <= b) {\n range.push(format(a, index));\n a = descending ? a - step : a + step;\n index++;\n }\n\n if (options.toRegex === true) {\n return toRegex(range, null, { wrap: false, options });\n }\n\n return range;\n};\n\nconst fill = (start, end, step, options = {}) => {\n if (end == null && isValidValue(start)) {\n return [start];\n }\n\n if (!isValidValue(start) || !isValidValue(end)) {\n return invalidRange(start, end, options);\n }\n\n if (typeof step === 'function') {\n return fill(start, end, 1, { transform: step });\n }\n\n if (isObject(step)) {\n return fill(start, end, 0, step);\n }\n\n let opts = { ...options };\n if (opts.capture === true) opts.wrap = true;\n step = step || opts.step || 1;\n\n if (!isNumber(step)) {\n if (step != null && !isObject(step)) return invalidStep(step, opts);\n return fill(start, end, 1, step);\n }\n\n if (isNumber(start) && isNumber(end)) {\n return fillNumbers(start, end, step, opts);\n }\n\n return fillLetters(start, end, Math.max(Math.abs(step), 1), opts);\n};\n\nmodule.exports = fill;\n","exports.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","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n","// Copyright 2014, 2015, 2016, 2017, 2018 Simon Lydell\n// License: MIT. (See LICENSE.)\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n})\n\n// This regex comes from regex.coffee, and is inserted here by generate-index.js\n// (run `npm run build`).\nexports.default = /((['\"])(?:(?!\\2|\\\\).|\\\\(?:\\r\\n|[\\s\\S]))*(\\2)?|`(?:[^`\\\\$]|\\\\[\\s\\S]|\\$(?!\\{)|\\$\\{(?:[^{}]|\\{[^}]*\\}?)*\\}?)*(`)?)|(\\/\\/.*)|(\\/\\*(?:[^*]|\\*(?!\\/))*(\\*\\/)?)|(\\/(?!\\*)(?:\\[(?:(?![\\]\\\\]).|\\\\.)*\\]|(?![\\/\\]\\\\]).|\\\\.)+\\/(?:(?!\\s*(?:\\b|[\\u0080-\\uFFFF$\\\\'\"~({]|[+\\-!](?!=)|\\.?\\d))|[gmiyus]{1,6}\\b(?![\\u0080-\\uFFFF$\\\\]|\\s*(?:[+\\-*%&|^<>!=?({]|\\/(?![\\/*])))))|(0[xX][\\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\\d*\\.\\d+|\\d+\\.?)(?:[eE][+-]?\\d+)?)|((?!\\d)(?:(?!\\s)[$\\w\\u0080-\\uFFFF]|\\\\u[\\da-fA-F]{4}|\\\\u\\{[\\da-fA-F]+\\})+)|(--|\\+\\+|&&|\\|\\||=>|\\.{3}|(?:[+\\-\\/%&|^]|\\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\\](){}])|(\\s+)|(^$|[\\s\\S])/g\n\nexports.matchToToken = function(match) {\n var token = {type: \"invalid\", value: match[0], closed: undefined}\n if (match[ 1]) token.type = \"string\" , token.closed = !!(match[3] || match[4])\n else if (match[ 5]) token.type = \"comment\"\n else if (match[ 6]) token.type = \"comment\", token.closed = !!match[7]\n else if (match[ 8]) token.type = \"regex\"\n else if (match[ 9]) token.type = \"number\"\n else if (match[10]) token.type = \"name\"\n else if (match[11]) token.type = \"punctuator\"\n else if (match[12]) token.type = \"whitespace\"\n return token\n}\n","'use strict';\n\nconst util = require('util');\nconst braces = require('braces');\nconst picomatch = require('picomatch');\nconst utils = require('picomatch/lib/utils');\nconst isEmptyString = val => typeof val === 'string' && (val === '' || val === './');\n\n/**\n * Returns an array of strings that match one or more glob patterns.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm(list, patterns[, options]);\n *\n * console.log(mm(['a.js', 'a.txt'], ['*.js']));\n * //=> [ 'a.js' ]\n * ```\n * @param {String|Array<string>} list List of strings to match.\n * @param {String|Array<string>} patterns One or more glob patterns to use for matching.\n * @param {Object} options See available [options](#options)\n * @return {Array} Returns an array of matches\n * @summary false\n * @api public\n */\n\nconst micromatch = (list, patterns, options) => {\n patterns = [].concat(patterns);\n list = [].concat(list);\n\n let omit = new Set();\n let keep = new Set();\n let items = new Set();\n let negatives = 0;\n\n let onResult = state => {\n items.add(state.output);\n if (options && options.onResult) {\n options.onResult(state);\n }\n };\n\n for (let i = 0; i < patterns.length; i++) {\n let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true);\n let negated = isMatch.state.negated || isMatch.state.negatedExtglob;\n if (negated) negatives++;\n\n for (let item of list) {\n let matched = isMatch(item, true);\n\n let match = negated ? !matched.isMatch : matched.isMatch;\n if (!match) continue;\n\n if (negated) {\n omit.add(matched.output);\n } else {\n omit.delete(matched.output);\n keep.add(matched.output);\n }\n }\n }\n\n let result = negatives === patterns.length ? [...items] : [...keep];\n let matches = result.filter(item => !omit.has(item));\n\n if (options && matches.length === 0) {\n if (options.failglob === true) {\n throw new Error(`No matches found for \"${patterns.join(', ')}\"`);\n }\n\n if (options.nonull === true || options.nullglob === true) {\n return options.unescape ? patterns.map(p => p.replace(/\\\\/g, '')) : patterns;\n }\n }\n\n return matches;\n};\n\n/**\n * Backwards compatibility\n */\n\nmicromatch.match = micromatch;\n\n/**\n * Returns a matcher function from the given glob `pattern` and `options`.\n * The returned function takes a string to match as its only argument and returns\n * true if the string is a match.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm.matcher(pattern[, options]);\n *\n * const isMatch = mm.matcher('*.!(*a)');\n * console.log(isMatch('a.a')); //=> false\n * console.log(isMatch('a.b')); //=> true\n * ```\n * @param {String} `pattern` Glob pattern\n * @param {Object} `options`\n * @return {Function} Returns a matcher function.\n * @api public\n */\n\nmicromatch.matcher = (pattern, options) => picomatch(pattern, options);\n\n/**\n * Returns true if **any** of the given glob `patterns` match the specified `string`.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm.isMatch(string, patterns[, options]);\n *\n * console.log(mm.isMatch('a.a', ['b.*', '*.a'])); //=> true\n * console.log(mm.isMatch('a.a', 'b.*')); //=> false\n * ```\n * @param {String} str The string to test.\n * @param {String|Array} patterns One or more glob patterns to use for matching.\n * @param {Object} [options] See available [options](#options).\n * @return {Boolean} Returns true if any patterns match `str`\n * @api public\n */\n\nmicromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);\n\n/**\n * Backwards compatibility\n */\n\nmicromatch.any = micromatch.isMatch;\n\n/**\n * Returns a list of strings that _**do not match any**_ of the given `patterns`.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm.not(list, patterns[, options]);\n *\n * console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a'));\n * //=> ['b.b', 'c.c']\n * ```\n * @param {Array} `list` Array of strings to match.\n * @param {String|Array} `patterns` One or more glob pattern to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Array} Returns an array of strings that **do not match** the given patterns.\n * @api public\n */\n\nmicromatch.not = (list, patterns, options = {}) => {\n patterns = [].concat(patterns).map(String);\n let result = new Set();\n let items = [];\n\n let onResult = state => {\n if (options.onResult) options.onResult(state);\n items.push(state.output);\n };\n\n let matches = micromatch(list, patterns, { ...options, onResult });\n\n for (let item of items) {\n if (!matches.includes(item)) {\n result.add(item);\n }\n }\n return [...result];\n};\n\n/**\n * Returns true if the given `string` contains the given pattern. Similar\n * to [.isMatch](#isMatch) but the pattern can match any part of the string.\n *\n * ```js\n * var mm = require('micromatch');\n * // mm.contains(string, pattern[, options]);\n *\n * console.log(mm.contains('aa/bb/cc', '*b'));\n * //=> true\n * console.log(mm.contains('aa/bb/cc', '*d'));\n * //=> false\n * ```\n * @param {String} `str` The string to match.\n * @param {String|Array} `patterns` Glob pattern to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Boolean} Returns true if the patter matches any part of `str`.\n * @api public\n */\n\nmicromatch.contains = (str, pattern, options) => {\n if (typeof str !== 'string') {\n throw new TypeError(`Expected a string: \"${util.inspect(str)}\"`);\n }\n\n if (Array.isArray(pattern)) {\n return pattern.some(p => micromatch.contains(str, p, options));\n }\n\n if (typeof pattern === 'string') {\n if (isEmptyString(str) || isEmptyString(pattern)) {\n return false;\n }\n\n if (str.includes(pattern) || (str.startsWith('./') && str.slice(2).includes(pattern))) {\n return true;\n }\n }\n\n return micromatch.isMatch(str, pattern, { ...options, contains: true });\n};\n\n/**\n * Filter the keys of the given object with the given `glob` pattern\n * and `options`. Does not attempt to match nested keys. If you need this feature,\n * use [glob-object][] instead.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm.matchKeys(object, patterns[, options]);\n *\n * const obj = { aa: 'a', ab: 'b', ac: 'c' };\n * console.log(mm.matchKeys(obj, '*b'));\n * //=> { ab: 'b' }\n * ```\n * @param {Object} `object` The object with keys to filter.\n * @param {String|Array} `patterns` One or more glob patterns to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Object} Returns an object with only keys that match the given patterns.\n * @api public\n */\n\nmicromatch.matchKeys = (obj, patterns, options) => {\n if (!utils.isObject(obj)) {\n throw new TypeError('Expected the first argument to be an object');\n }\n let keys = micromatch(Object.keys(obj), patterns, options);\n let res = {};\n for (let key of keys) res[key] = obj[key];\n return res;\n};\n\n/**\n * Returns true if some of the strings in the given `list` match any of the given glob `patterns`.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm.some(list, patterns[, options]);\n *\n * console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js']));\n * // true\n * console.log(mm.some(['foo.js'], ['*.js', '!foo.js']));\n * // false\n * ```\n * @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found.\n * @param {String|Array} `patterns` One or more glob patterns to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Boolean} Returns true if any patterns match `str`\n * @api public\n */\n\nmicromatch.some = (list, patterns, options) => {\n let items = [].concat(list);\n\n for (let pattern of [].concat(patterns)) {\n let isMatch = picomatch(String(pattern), options);\n if (items.some(item => isMatch(item))) {\n return true;\n }\n }\n return false;\n};\n\n/**\n * Returns true if every string in the given `list` matches\n * any of the given glob `patterns`.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm.every(list, patterns[, options]);\n *\n * console.log(mm.every('foo.js', ['foo.js']));\n * // true\n * console.log(mm.every(['foo.js', 'bar.js'], ['*.js']));\n * // true\n * console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js']));\n * // false\n * console.log(mm.every(['foo.js'], ['*.js', '!foo.js']));\n * // false\n * ```\n * @param {String|Array} `list` The string or array of strings to test.\n * @param {String|Array} `patterns` One or more glob patterns to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Boolean} Returns true if any patterns match `str`\n * @api public\n */\n\nmicromatch.every = (list, patterns, options) => {\n let items = [].concat(list);\n\n for (let pattern of [].concat(patterns)) {\n let isMatch = picomatch(String(pattern), options);\n if (!items.every(item => isMatch(item))) {\n return false;\n }\n }\n return true;\n};\n\n/**\n * Returns true if **all** of the given `patterns` match\n * the specified string.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm.all(string, patterns[, options]);\n *\n * console.log(mm.all('foo.js', ['foo.js']));\n * // true\n *\n * console.log(mm.all('foo.js', ['*.js', '!foo.js']));\n * // false\n *\n * console.log(mm.all('foo.js', ['*.js', 'foo.js']));\n * // true\n *\n * console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js']));\n * // true\n * ```\n * @param {String|Array} `str` The string to test.\n * @param {String|Array} `patterns` One or more glob patterns to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Boolean} Returns true if any patterns match `str`\n * @api public\n */\n\nmicromatch.all = (str, patterns, options) => {\n if (typeof str !== 'string') {\n throw new TypeError(`Expected a string: \"${util.inspect(str)}\"`);\n }\n\n return [].concat(patterns).every(p => picomatch(p, options)(str));\n};\n\n/**\n * Returns an array of matches captured by `pattern` in `string, or `null` if the pattern did not match.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm.capture(pattern, string[, options]);\n *\n * console.log(mm.capture('test/*.js', 'test/foo.js'));\n * //=> ['foo']\n * console.log(mm.capture('test/*.js', 'foo/bar.css'));\n * //=> null\n * ```\n * @param {String} `glob` Glob pattern to use for matching.\n * @param {String} `input` String to match\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Boolean} Returns an array of captures if the input matches the glob pattern, otherwise `null`.\n * @api public\n */\n\nmicromatch.capture = (glob, input, options) => {\n let posix = utils.isWindows(options);\n let regex = picomatch.makeRe(String(glob), { ...options, capture: true });\n let match = regex.exec(posix ? utils.toPosixSlashes(input) : input);\n\n if (match) {\n return match.slice(1).map(v => v === void 0 ? '' : v);\n }\n};\n\n/**\n * Create a regular expression from the given glob `pattern`.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm.makeRe(pattern[, options]);\n *\n * console.log(mm.makeRe('*.js'));\n * //=> /^(?:(\\.[\\\\\\/])?(?!\\.)(?=.)[^\\/]*?\\.js)$/\n * ```\n * @param {String} `pattern` A glob pattern to convert to regex.\n * @param {Object} `options`\n * @return {RegExp} Returns a regex created from the given pattern.\n * @api public\n */\n\nmicromatch.makeRe = (...args) => picomatch.makeRe(...args);\n\n/**\n * Scan a glob pattern to separate the pattern into segments. Used\n * by the [split](#split) method.\n *\n * ```js\n * const mm = require('micromatch');\n * const state = mm.scan(pattern[, options]);\n * ```\n * @param {String} `pattern`\n * @param {Object} `options`\n * @return {Object} Returns an object with\n * @api public\n */\n\nmicromatch.scan = (...args) => picomatch.scan(...args);\n\n/**\n * Parse a glob pattern to create the source string for a regular\n * expression.\n *\n * ```js\n * const mm = require('micromatch');\n * const state = mm(pattern[, options]);\n * ```\n * @param {String} `glob`\n * @param {Object} `options`\n * @return {Object} Returns an object with useful properties and output to be used as regex source string.\n * @api public\n */\n\nmicromatch.parse = (patterns, options) => {\n let res = [];\n for (let pattern of [].concat(patterns || [])) {\n for (let str of braces(String(pattern), options)) {\n res.push(picomatch.parse(str, options));\n }\n }\n return res;\n};\n\n/**\n * Process the given brace `pattern`.\n *\n * ```js\n * const { braces } = require('micromatch');\n * console.log(braces('foo/{a,b,c}/bar'));\n * //=> [ 'foo/(a|b|c)/bar' ]\n *\n * console.log(braces('foo/{a,b,c}/bar', { expand: true }));\n * //=> [ 'foo/a/bar', 'foo/b/bar', 'foo/c/bar' ]\n * ```\n * @param {String} `pattern` String with brace pattern to process.\n * @param {Object} `options` Any [options](#options) to change how expansion is performed. See the [braces][] library for all available options.\n * @return {Array}\n * @api public\n */\n\nmicromatch.braces = (pattern, options) => {\n if (typeof pattern !== 'string') throw new TypeError('Expected a string');\n if ((options && options.nobrace === true) || !/\\{.*\\}/.test(pattern)) {\n return [pattern];\n }\n return braces(pattern, options);\n};\n\n/**\n * Expand braces\n */\n\nmicromatch.braceExpand = (pattern, options) => {\n if (typeof pattern !== 'string') throw new TypeError('Expected a string');\n return micromatch.braces(pattern, { ...options, expand: true });\n};\n\n/**\n * Expose micromatch\n */\n\nmodule.exports = micromatch;\n","// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,\n// backported and transplited with Babel, with backwards-compat fixes\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// resolves . and .. elements in a path array with directory names there\n// must be no slashes, empty elements, or device names (c:\\) in the array\n// (so also no leading and trailing slashes - it does not distinguish\n// relative and absolute paths)\nfunction normalizeArray(parts, allowAboveRoot) {\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = parts.length - 1; i >= 0; i--) {\n var last = parts[i];\n if (last === '.') {\n parts.splice(i, 1);\n } else if (last === '..') {\n parts.splice(i, 1);\n up++;\n } else if (up) {\n parts.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (allowAboveRoot) {\n for (; up--; up) {\n parts.unshift('..');\n }\n }\n\n return parts;\n}\n\n// path.resolve([from ...], to)\n// posix version\nexports.resolve = function() {\n var resolvedPath = '',\n resolvedAbsolute = false;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path = (i >= 0) ? arguments[i] : process.cwd();\n\n // Skip empty and invalid entries\n if (typeof path !== 'string') {\n throw new TypeError('Arguments to path.resolve must be strings');\n } else if (!path) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {\n return !!p;\n }), !resolvedAbsolute).join('/');\n\n return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\n};\n\n// path.normalize(path)\n// posix version\nexports.normalize = function(path) {\n var isAbsolute = exports.isAbsolute(path),\n trailingSlash = substr(path, -1) === '/';\n\n // Normalize the path\n path = normalizeArray(filter(path.split('/'), function(p) {\n return !!p;\n }), !isAbsolute).join('/');\n\n if (!path && !isAbsolute) {\n path = '.';\n }\n if (path && trailingSlash) {\n path += '/';\n }\n\n return (isAbsolute ? '/' : '') + path;\n};\n\n// posix version\nexports.isAbsolute = function(path) {\n return path.charAt(0) === '/';\n};\n\n// posix version\nexports.join = function() {\n var paths = Array.prototype.slice.call(arguments, 0);\n return exports.normalize(filter(paths, function(p, index) {\n if (typeof p !== 'string') {\n throw new TypeError('Arguments to path.join must be strings');\n }\n return p;\n }).join('/'));\n};\n\n\n// path.relative(from, to)\n// posix version\nexports.relative = function(from, to) {\n from = exports.resolve(from).substr(1);\n to = exports.resolve(to).substr(1);\n\n function trim(arr) {\n var start = 0;\n for (; start < arr.length; start++) {\n if (arr[start] !== '') break;\n }\n\n var end = arr.length - 1;\n for (; end >= 0; end--) {\n if (arr[end] !== '') break;\n }\n\n if (start > end) return [];\n return arr.slice(start, end - start + 1);\n }\n\n var fromParts = trim(from.split('/'));\n var toParts = trim(to.split('/'));\n\n var length = Math.min(fromParts.length, toParts.length);\n var samePartsLength = length;\n for (var i = 0; i < length; i++) {\n if (fromParts[i] !== toParts[i]) {\n samePartsLength = i;\n break;\n }\n }\n\n var outputParts = [];\n for (var i = samePartsLength; i < fromParts.length; i++) {\n outputParts.push('..');\n }\n\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n return outputParts.join('/');\n};\n\nexports.sep = '/';\nexports.delimiter = ':';\n\nexports.dirname = function (path) {\n if (typeof path !== 'string') path = path + '';\n if (path.length === 0) return '.';\n var code = path.charCodeAt(0);\n var hasRoot = code === 47 /*/*/;\n var end = -1;\n var matchedSlash = true;\n for (var i = path.length - 1; i >= 1; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n if (!matchedSlash) {\n end = i;\n break;\n }\n } else {\n // We saw the first non-path separator\n matchedSlash = false;\n }\n }\n\n if (end === -1) return hasRoot ? '/' : '.';\n if (hasRoot && end === 1) {\n // return '//';\n // Backwards-compat fix:\n return '/';\n }\n return path.slice(0, end);\n};\n\nfunction basename(path) {\n if (typeof path !== 'string') path = path + '';\n\n var start = 0;\n var end = -1;\n var matchedSlash = true;\n var i;\n\n for (i = path.length - 1; i >= 0; --i) {\n if (path.charCodeAt(i) === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // path component\n matchedSlash = false;\n end = i + 1;\n }\n }\n\n if (end === -1) return '';\n return path.slice(start, end);\n}\n\n// Uses a mixed approach for backwards-compatibility, as ext behavior changed\n// in new Node.js versions, so only basename() above is backported here\nexports.basename = function (path, ext) {\n var f = basename(path);\n if (ext && f.substr(-1 * ext.length) === ext) {\n f = f.substr(0, f.length - ext.length);\n }\n return f;\n};\n\nexports.extname = function (path) {\n if (typeof path !== 'string') path = path + '';\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n for (var i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1)\n startDot = i;\n else if (preDotState !== 1)\n preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n return '';\n }\n return path.slice(startDot, end);\n};\n\nfunction filter (xs, f) {\n if (xs.filter) return xs.filter(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n if (f(xs[i], i, xs)) res.push(xs[i]);\n }\n return res;\n}\n\n// String.prototype.substr - negative index don't work in IE8\nvar substr = 'ab'.substr(-1) === 'b'\n ? function (str, start, len) { return str.substr(start, len) }\n : function (str, start, len) {\n if (start < 0) start = str.length + start;\n return str.substr(start, len);\n }\n;\n","'use strict';\n\nmodule.exports = require('./lib/picomatch');\n","'use strict';\n\nconst path = require('path');\nconst WIN_SLASH = '\\\\\\\\/';\nconst WIN_NO_SLASH = `[^${WIN_SLASH}]`;\n\n/**\n * Posix glob regex\n */\n\nconst DOT_LITERAL = '\\\\.';\nconst PLUS_LITERAL = '\\\\+';\nconst QMARK_LITERAL = '\\\\?';\nconst SLASH_LITERAL = '\\\\/';\nconst ONE_CHAR = '(?=.)';\nconst QMARK = '[^/]';\nconst END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;\nconst START_ANCHOR = `(?:^|${SLASH_LITERAL})`;\nconst DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;\nconst NO_DOT = `(?!${DOT_LITERAL})`;\nconst NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;\nconst NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;\nconst NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;\nconst QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;\nconst STAR = `${QMARK}*?`;\n\nconst POSIX_CHARS = {\n DOT_LITERAL,\n PLUS_LITERAL,\n QMARK_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n QMARK,\n END_ANCHOR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOTS,\n NO_DOT_SLASH,\n NO_DOTS_SLASH,\n QMARK_NO_DOT,\n STAR,\n START_ANCHOR\n};\n\n/**\n * Windows glob regex\n */\n\nconst WINDOWS_CHARS = {\n ...POSIX_CHARS,\n\n SLASH_LITERAL: `[${WIN_SLASH}]`,\n QMARK: WIN_NO_SLASH,\n STAR: `${WIN_NO_SLASH}*?`,\n DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,\n NO_DOT: `(?!${DOT_LITERAL})`,\n NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,\n NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,\n NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,\n QMARK_NO_DOT: `[^.${WIN_SLASH}]`,\n START_ANCHOR: `(?:^|[${WIN_SLASH}])`,\n END_ANCHOR: `(?:[${WIN_SLASH}]|$)`\n};\n\n/**\n * POSIX Bracket Regex\n */\n\nconst POSIX_REGEX_SOURCE = {\n alnum: 'a-zA-Z0-9',\n alpha: 'a-zA-Z',\n ascii: '\\\\x00-\\\\x7F',\n blank: ' \\\\t',\n cntrl: '\\\\x00-\\\\x1F\\\\x7F',\n digit: '0-9',\n graph: '\\\\x21-\\\\x7E',\n lower: 'a-z',\n print: '\\\\x20-\\\\x7E ',\n punct: '\\\\-!\"#$%&\\'()\\\\*+,./:;<=>?@[\\\\]^_`{|}~',\n space: ' \\\\t\\\\r\\\\n\\\\v\\\\f',\n upper: 'A-Z',\n word: 'A-Za-z0-9_',\n xdigit: 'A-Fa-f0-9'\n};\n\nmodule.exports = {\n MAX_LENGTH: 1024 * 64,\n POSIX_REGEX_SOURCE,\n\n // regular expressions\n REGEX_BACKSLASH: /\\\\(?![*+?^${}(|)[\\]])/g,\n REGEX_NON_SPECIAL_CHARS: /^[^@![\\].,$*+?^{}()|\\\\/]+/,\n REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\\]]/,\n REGEX_SPECIAL_CHARS_BACKREF: /(\\\\?)((\\W)(\\3*))/g,\n REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\\]])/g,\n REGEX_REMOVE_BACKSLASH: /(?:\\[.*?[^\\\\]\\]|\\\\(?=.))/g,\n\n // Replace globs with equivalent patterns to reduce parsing time.\n REPLACEMENTS: {\n '***': '*',\n '**/**': '**',\n '**/**/**': '**'\n },\n\n // Digits\n CHAR_0: 48, /* 0 */\n CHAR_9: 57, /* 9 */\n\n // Alphabet chars.\n CHAR_UPPERCASE_A: 65, /* A */\n CHAR_LOWERCASE_A: 97, /* a */\n CHAR_UPPERCASE_Z: 90, /* Z */\n CHAR_LOWERCASE_Z: 122, /* z */\n\n CHAR_LEFT_PARENTHESES: 40, /* ( */\n CHAR_RIGHT_PARENTHESES: 41, /* ) */\n\n CHAR_ASTERISK: 42, /* * */\n\n // Non-alphabetic chars.\n CHAR_AMPERSAND: 38, /* & */\n CHAR_AT: 64, /* @ */\n CHAR_BACKWARD_SLASH: 92, /* \\ */\n CHAR_CARRIAGE_RETURN: 13, /* \\r */\n CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */\n CHAR_COLON: 58, /* : */\n CHAR_COMMA: 44, /* , */\n CHAR_DOT: 46, /* . */\n CHAR_DOUBLE_QUOTE: 34, /* \" */\n CHAR_EQUAL: 61, /* = */\n CHAR_EXCLAMATION_MARK: 33, /* ! */\n CHAR_FORM_FEED: 12, /* \\f */\n CHAR_FORWARD_SLASH: 47, /* / */\n CHAR_GRAVE_ACCENT: 96, /* ` */\n CHAR_HASH: 35, /* # */\n CHAR_HYPHEN_MINUS: 45, /* - */\n CHAR_LEFT_ANGLE_BRACKET: 60, /* < */\n CHAR_LEFT_CURLY_BRACE: 123, /* { */\n CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */\n CHAR_LINE_FEED: 10, /* \\n */\n CHAR_NO_BREAK_SPACE: 160, /* \\u00A0 */\n CHAR_PERCENT: 37, /* % */\n CHAR_PLUS: 43, /* + */\n CHAR_QUESTION_MARK: 63, /* ? */\n CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */\n CHAR_RIGHT_CURLY_BRACE: 125, /* } */\n CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */\n CHAR_SEMICOLON: 59, /* ; */\n CHAR_SINGLE_QUOTE: 39, /* ' */\n CHAR_SPACE: 32, /* */\n CHAR_TAB: 9, /* \\t */\n CHAR_UNDERSCORE: 95, /* _ */\n CHAR_VERTICAL_LINE: 124, /* | */\n CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \\uFEFF */\n\n SEP: path.sep,\n\n /**\n * Create EXTGLOB_CHARS\n */\n\n extglobChars(chars) {\n return {\n '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },\n '?': { type: 'qmark', open: '(?:', close: ')?' },\n '+': { type: 'plus', open: '(?:', close: ')+' },\n '*': { type: 'star', open: '(?:', close: ')*' },\n '@': { type: 'at', open: '(?:', close: ')' }\n };\n },\n\n /**\n * Create GLOB_CHARS\n */\n\n globChars(win32) {\n return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;\n }\n};\n","'use strict';\n\nconst constants = require('./constants');\nconst utils = require('./utils');\n\n/**\n * Constants\n */\n\nconst {\n MAX_LENGTH,\n POSIX_REGEX_SOURCE,\n REGEX_NON_SPECIAL_CHARS,\n REGEX_SPECIAL_CHARS_BACKREF,\n REPLACEMENTS\n} = constants;\n\n/**\n * Helpers\n */\n\nconst expandRange = (args, options) => {\n if (typeof options.expandRange === 'function') {\n return options.expandRange(...args, options);\n }\n\n args.sort();\n const value = `[${args.join('-')}]`;\n\n try {\n /* eslint-disable-next-line no-new */\n new RegExp(value);\n } catch (ex) {\n return args.map(v => utils.escapeRegex(v)).join('..');\n }\n\n return value;\n};\n\n/**\n * Create the message for a syntax error\n */\n\nconst syntaxError = (type, char) => {\n return `Missing ${type}: \"${char}\" - use \"\\\\\\\\${char}\" to match literal characters`;\n};\n\n/**\n * Parse the given input string.\n * @param {String} input\n * @param {Object} options\n * @return {Object}\n */\n\nconst parse = (input, options) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected a string');\n }\n\n input = REPLACEMENTS[input] || input;\n\n const opts = { ...options };\n const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n\n let len = input.length;\n if (len > max) {\n throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);\n }\n\n const bos = { type: 'bos', value: '', output: opts.prepend || '' };\n const tokens = [bos];\n\n const capture = opts.capture ? '' : '?:';\n const win32 = utils.isWindows(options);\n\n // create constants based on platform, for windows or posix\n const PLATFORM_CHARS = constants.globChars(win32);\n const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);\n\n const {\n DOT_LITERAL,\n PLUS_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOT_SLASH,\n NO_DOTS_SLASH,\n QMARK,\n QMARK_NO_DOT,\n STAR,\n START_ANCHOR\n } = PLATFORM_CHARS;\n\n const globstar = (opts) => {\n return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;\n };\n\n const nodot = opts.dot ? '' : NO_DOT;\n const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;\n let star = opts.bash === true ? globstar(opts) : STAR;\n\n if (opts.capture) {\n star = `(${star})`;\n }\n\n // minimatch options support\n if (typeof opts.noext === 'boolean') {\n opts.noextglob = opts.noext;\n }\n\n const state = {\n input,\n index: -1,\n start: 0,\n dot: opts.dot === true,\n consumed: '',\n output: '',\n prefix: '',\n backtrack: false,\n negated: false,\n brackets: 0,\n braces: 0,\n parens: 0,\n quotes: 0,\n globstar: false,\n tokens\n };\n\n input = utils.removePrefix(input, state);\n len = input.length;\n\n const extglobs = [];\n const braces = [];\n const stack = [];\n let prev = bos;\n let value;\n\n /**\n * Tokenizing helpers\n */\n\n const eos = () => state.index === len - 1;\n const peek = state.peek = (n = 1) => input[state.index + n];\n const advance = state.advance = () => input[++state.index];\n const remaining = () => input.slice(state.index + 1);\n const consume = (value = '', num = 0) => {\n state.consumed += value;\n state.index += num;\n };\n const append = token => {\n state.output += token.output != null ? token.output : token.value;\n consume(token.value);\n };\n\n const negate = () => {\n let count = 1;\n\n while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) {\n advance();\n state.start++;\n count++;\n }\n\n if (count % 2 === 0) {\n return false;\n }\n\n state.negated = true;\n state.start++;\n return true;\n };\n\n const increment = type => {\n state[type]++;\n stack.push(type);\n };\n\n const decrement = type => {\n state[type]--;\n stack.pop();\n };\n\n /**\n * Push tokens onto the tokens array. This helper speeds up\n * tokenizing by 1) helping us avoid backtracking as much as possible,\n * and 2) helping us avoid creating extra tokens when consecutive\n * characters are plain text. This improves performance and simplifies\n * lookbehinds.\n */\n\n const push = tok => {\n if (prev.type === 'globstar') {\n const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');\n const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren'));\n\n if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {\n state.output = state.output.slice(0, -prev.output.length);\n prev.type = 'star';\n prev.value = '*';\n prev.output = star;\n state.output += prev.output;\n }\n }\n\n if (extglobs.length && tok.type !== 'paren' && !EXTGLOB_CHARS[tok.value]) {\n extglobs[extglobs.length - 1].inner += tok.value;\n }\n\n if (tok.value || tok.output) append(tok);\n if (prev && prev.type === 'text' && tok.type === 'text') {\n prev.value += tok.value;\n prev.output = (prev.output || '') + tok.value;\n return;\n }\n\n tok.prev = prev;\n tokens.push(tok);\n prev = tok;\n };\n\n const extglobOpen = (type, value) => {\n const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' };\n\n token.prev = prev;\n token.parens = state.parens;\n token.output = state.output;\n const output = (opts.capture ? '(' : '') + token.open;\n\n increment('parens');\n\n\n push({ type, value, output: state.output ? '' : ONE_CHAR });\n push({ type: 'paren', extglob: true, value: advance(), output });\n extglobs.push(token);\n };\n\n const extglobClose = token => {\n let output = token.close + (opts.capture ? ')' : '');\n\n if (token.type === 'negate') {\n let extglobStar = star;\n\n if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {\n extglobStar = globstar(opts);\n }\n\n if (extglobStar !== star || eos() || /^\\)+$/.test(remaining())) {\n output = token.close = `)$))${extglobStar}`;\n }\n\n if (token.prev.type === 'bos' && eos()) {\n state.negatedExtglob = true;\n }\n }\n\n push({ type: 'paren', extglob: true, value, output });\n decrement('parens');\n };\n\n /**\n * Fast paths\n */\n\n if (opts.fastpaths !== false && !/(^[*!]|[/()[\\]{}\"])/.test(input)) {\n let backslashes = false;\n\n let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {\n if (first === '\\\\') {\n backslashes = true;\n return m;\n }\n\n if (first === '?') {\n if (esc) {\n return esc + first + (rest ? QMARK.repeat(rest.length) : '');\n }\n if (index === 0) {\n return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');\n }\n return QMARK.repeat(chars.length);\n }\n\n if (first === '.') {\n return DOT_LITERAL.repeat(chars.length);\n }\n\n if (first === '*') {\n if (esc) {\n return esc + first + (rest ? star : '');\n }\n return star;\n }\n return esc ? m : `\\\\${m}`;\n });\n\n if (backslashes === true) {\n if (opts.unescape === true) {\n output = output.replace(/\\\\/g, '');\n } else {\n output = output.replace(/\\\\+/g, m => {\n return m.length % 2 === 0 ? '\\\\\\\\' : (m ? '\\\\' : '');\n });\n }\n }\n\n if (output === input && opts.contains === true) {\n state.output = input;\n return state;\n }\n\n state.output = utils.wrapOutput(output, state, options);\n return state;\n }\n\n /**\n * Tokenize input until we reach end-of-string\n */\n\n while (!eos()) {\n value = advance();\n\n if (value === '\\u0000') {\n continue;\n }\n\n /**\n * Escaped characters\n */\n\n if (value === '\\\\') {\n const next = peek();\n\n if (next === '/' && opts.bash !== true) {\n continue;\n }\n\n if (next === '.' || next === ';') {\n continue;\n }\n\n if (!next) {\n value += '\\\\';\n push({ type: 'text', value });\n continue;\n }\n\n // collapse slashes to reduce potential for exploits\n const match = /^\\\\+/.exec(remaining());\n let slashes = 0;\n\n if (match && match[0].length > 2) {\n slashes = match[0].length;\n state.index += slashes;\n if (slashes % 2 !== 0) {\n value += '\\\\';\n }\n }\n\n if (opts.unescape === true) {\n value = advance() || '';\n } else {\n value += advance() || '';\n }\n\n if (state.brackets === 0) {\n push({ type: 'text', value });\n continue;\n }\n }\n\n /**\n * If we're inside a regex character class, continue\n * until we reach the closing bracket.\n */\n\n if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {\n if (opts.posix !== false && value === ':') {\n const inner = prev.value.slice(1);\n if (inner.includes('[')) {\n prev.posix = true;\n\n if (inner.includes(':')) {\n const idx = prev.value.lastIndexOf('[');\n const pre = prev.value.slice(0, idx);\n const rest = prev.value.slice(idx + 2);\n const posix = POSIX_REGEX_SOURCE[rest];\n if (posix) {\n prev.value = pre + posix;\n state.backtrack = true;\n advance();\n\n if (!bos.output && tokens.indexOf(prev) === 1) {\n bos.output = ONE_CHAR;\n }\n continue;\n }\n }\n }\n }\n\n if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) {\n value = `\\\\${value}`;\n }\n\n if (value === ']' && (prev.value === '[' || prev.value === '[^')) {\n value = `\\\\${value}`;\n }\n\n if (opts.posix === true && value === '!' && prev.value === '[') {\n value = '^';\n }\n\n prev.value += value;\n append({ value });\n continue;\n }\n\n /**\n * If we're inside a quoted string, continue\n * until we reach the closing double quote.\n */\n\n if (state.quotes === 1 && value !== '\"') {\n value = utils.escapeRegex(value);\n prev.value += value;\n append({ value });\n continue;\n }\n\n /**\n * Double quotes\n */\n\n if (value === '\"') {\n state.quotes = state.quotes === 1 ? 0 : 1;\n if (opts.keepQuotes === true) {\n push({ type: 'text', value });\n }\n continue;\n }\n\n /**\n * Parentheses\n */\n\n if (value === '(') {\n increment('parens');\n push({ type: 'paren', value });\n continue;\n }\n\n if (value === ')') {\n if (state.parens === 0 && opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('opening', '('));\n }\n\n const extglob = extglobs[extglobs.length - 1];\n if (extglob && state.parens === extglob.parens + 1) {\n extglobClose(extglobs.pop());\n continue;\n }\n\n push({ type: 'paren', value, output: state.parens ? ')' : '\\\\)' });\n decrement('parens');\n continue;\n }\n\n /**\n * Square brackets\n */\n\n if (value === '[') {\n if (opts.nobracket === true || !remaining().includes(']')) {\n if (opts.nobracket !== true && opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('closing', ']'));\n }\n\n value = `\\\\${value}`;\n } else {\n increment('brackets');\n }\n\n push({ type: 'bracket', value });\n continue;\n }\n\n if (value === ']') {\n if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) {\n push({ type: 'text', value, output: `\\\\${value}` });\n continue;\n }\n\n if (state.brackets === 0) {\n if (opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('opening', '['));\n }\n\n push({ type: 'text', value, output: `\\\\${value}` });\n continue;\n }\n\n decrement('brackets');\n\n const prevValue = prev.value.slice(1);\n if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {\n value = `/${value}`;\n }\n\n prev.value += value;\n append({ value });\n\n // when literal brackets are explicitly disabled\n // assume we should match with a regex character class\n if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {\n continue;\n }\n\n const escaped = utils.escapeRegex(prev.value);\n state.output = state.output.slice(0, -prev.value.length);\n\n // when literal brackets are explicitly enabled\n // assume we should escape the brackets to match literal characters\n if (opts.literalBrackets === true) {\n state.output += escaped;\n prev.value = escaped;\n continue;\n }\n\n // when the user specifies nothing, try to match both\n prev.value = `(${capture}${escaped}|${prev.value})`;\n state.output += prev.value;\n continue;\n }\n\n /**\n * Braces\n */\n\n if (value === '{' && opts.nobrace !== true) {\n increment('braces');\n\n const open = {\n type: 'brace',\n value,\n output: '(',\n outputIndex: state.output.length,\n tokensIndex: state.tokens.length\n };\n\n braces.push(open);\n push(open);\n continue;\n }\n\n if (value === '}') {\n const brace = braces[braces.length - 1];\n\n if (opts.nobrace === true || !brace) {\n push({ type: 'text', value, output: value });\n continue;\n }\n\n let output = ')';\n\n if (brace.dots === true) {\n const arr = tokens.slice();\n const range = [];\n\n for (let i = arr.length - 1; i >= 0; i--) {\n tokens.pop();\n if (arr[i].type === 'brace') {\n break;\n }\n if (arr[i].type !== 'dots') {\n range.unshift(arr[i].value);\n }\n }\n\n output = expandRange(range, opts);\n state.backtrack = true;\n }\n\n if (brace.comma !== true && brace.dots !== true) {\n const out = state.output.slice(0, brace.outputIndex);\n const toks = state.tokens.slice(brace.tokensIndex);\n brace.value = brace.output = '\\\\{';\n value = output = `\\\\}`;\n state.output = out;\n for (const t of toks) {\n state.output += (t.output || t.value);\n }\n }\n\n push({ type: 'brace', value, output });\n decrement('braces');\n braces.pop();\n continue;\n }\n\n /**\n * Pipes\n */\n\n if (value === '|') {\n if (extglobs.length > 0) {\n extglobs[extglobs.length - 1].conditions++;\n }\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Commas\n */\n\n if (value === ',') {\n let output = value;\n\n const brace = braces[braces.length - 1];\n if (brace && stack[stack.length - 1] === 'braces') {\n brace.comma = true;\n output = '|';\n }\n\n push({ type: 'comma', value, output });\n continue;\n }\n\n /**\n * Slashes\n */\n\n if (value === '/') {\n // if the beginning of the glob is \"./\", advance the start\n // to the current index, and don't add the \"./\" characters\n // to the state. This greatly simplifies lookbehinds when\n // checking for BOS characters like \"!\" and \".\" (not \"./\")\n if (prev.type === 'dot' && state.index === state.start + 1) {\n state.start = state.index + 1;\n state.consumed = '';\n state.output = '';\n tokens.pop();\n prev = bos; // reset \"prev\" to the first token\n continue;\n }\n\n push({ type: 'slash', value, output: SLASH_LITERAL });\n continue;\n }\n\n /**\n * Dots\n */\n\n if (value === '.') {\n if (state.braces > 0 && prev.type === 'dot') {\n if (prev.value === '.') prev.output = DOT_LITERAL;\n const brace = braces[braces.length - 1];\n prev.type = 'dots';\n prev.output += value;\n prev.value += value;\n brace.dots = true;\n continue;\n }\n\n if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') {\n push({ type: 'text', value, output: DOT_LITERAL });\n continue;\n }\n\n push({ type: 'dot', value, output: DOT_LITERAL });\n continue;\n }\n\n /**\n * Question marks\n */\n\n if (value === '?') {\n const isGroup = prev && prev.value === '(';\n if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n extglobOpen('qmark', value);\n continue;\n }\n\n if (prev && prev.type === 'paren') {\n const next = peek();\n let output = value;\n\n if (next === '<' && !utils.supportsLookbehinds()) {\n throw new Error('Node.js v10 or higher is required for regex lookbehinds');\n }\n\n if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\\w+>)/.test(remaining()))) {\n output = `\\\\${value}`;\n }\n\n push({ type: 'text', value, output });\n continue;\n }\n\n if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {\n push({ type: 'qmark', value, output: QMARK_NO_DOT });\n continue;\n }\n\n push({ type: 'qmark', value, output: QMARK });\n continue;\n }\n\n /**\n * Exclamation\n */\n\n if (value === '!') {\n if (opts.noextglob !== true && peek() === '(') {\n if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {\n extglobOpen('negate', value);\n continue;\n }\n }\n\n if (opts.nonegate !== true && state.index === 0) {\n negate();\n continue;\n }\n }\n\n /**\n * Plus\n */\n\n if (value === '+') {\n if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n extglobOpen('plus', value);\n continue;\n }\n\n if ((prev && prev.value === '(') || opts.regex === false) {\n push({ type: 'plus', value, output: PLUS_LITERAL });\n continue;\n }\n\n if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) {\n push({ type: 'plus', value });\n continue;\n }\n\n push({ type: 'plus', value: PLUS_LITERAL });\n continue;\n }\n\n /**\n * Plain text\n */\n\n if (value === '@') {\n if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n push({ type: 'at', extglob: true, value, output: '' });\n continue;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Plain text\n */\n\n if (value !== '*') {\n if (value === '$' || value === '^') {\n value = `\\\\${value}`;\n }\n\n const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());\n if (match) {\n value += match[0];\n state.index += match[0].length;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Stars\n */\n\n if (prev && (prev.type === 'globstar' || prev.star === true)) {\n prev.type = 'star';\n prev.star = true;\n prev.value += value;\n prev.output = star;\n state.backtrack = true;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n let rest = remaining();\n if (opts.noextglob !== true && /^\\([^?]/.test(rest)) {\n extglobOpen('star', value);\n continue;\n }\n\n if (prev.type === 'star') {\n if (opts.noglobstar === true) {\n consume(value);\n continue;\n }\n\n const prior = prev.prev;\n const before = prior.prev;\n const isStart = prior.type === 'slash' || prior.type === 'bos';\n const afterStar = before && (before.type === 'star' || before.type === 'globstar');\n\n if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) {\n push({ type: 'star', value, output: '' });\n continue;\n }\n\n const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');\n const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');\n if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {\n push({ type: 'star', value, output: '' });\n continue;\n }\n\n // strip consecutive `/**/`\n while (rest.slice(0, 3) === '/**') {\n const after = input[state.index + 4];\n if (after && after !== '/') {\n break;\n }\n rest = rest.slice(3);\n consume('/**', 3);\n }\n\n if (prior.type === 'bos' && eos()) {\n prev.type = 'globstar';\n prev.value += value;\n prev.output = globstar(opts);\n state.output = prev.output;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {\n state.output = state.output.slice(0, -(prior.output + prev.output).length);\n prior.output = `(?:${prior.output}`;\n\n prev.type = 'globstar';\n prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)');\n prev.value += value;\n state.globstar = true;\n state.output += prior.output + prev.output;\n consume(value);\n continue;\n }\n\n if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') {\n const end = rest[1] !== void 0 ? '|$' : '';\n\n state.output = state.output.slice(0, -(prior.output + prev.output).length);\n prior.output = `(?:${prior.output}`;\n\n prev.type = 'globstar';\n prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;\n prev.value += value;\n\n state.output += prior.output + prev.output;\n state.globstar = true;\n\n consume(value + advance());\n\n push({ type: 'slash', value: '/', output: '' });\n continue;\n }\n\n if (prior.type === 'bos' && rest[0] === '/') {\n prev.type = 'globstar';\n prev.value += value;\n prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;\n state.output = prev.output;\n state.globstar = true;\n consume(value + advance());\n push({ type: 'slash', value: '/', output: '' });\n continue;\n }\n\n // remove single star from output\n state.output = state.output.slice(0, -prev.output.length);\n\n // reset previous token to globstar\n prev.type = 'globstar';\n prev.output = globstar(opts);\n prev.value += value;\n\n // reset output with globstar\n state.output += prev.output;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n const token = { type: 'star', value, output: star };\n\n if (opts.bash === true) {\n token.output = '.*?';\n if (prev.type === 'bos' || prev.type === 'slash') {\n token.output = nodot + token.output;\n }\n push(token);\n continue;\n }\n\n if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {\n token.output = value;\n push(token);\n continue;\n }\n\n if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {\n if (prev.type === 'dot') {\n state.output += NO_DOT_SLASH;\n prev.output += NO_DOT_SLASH;\n\n } else if (opts.dot === true) {\n state.output += NO_DOTS_SLASH;\n prev.output += NO_DOTS_SLASH;\n\n } else {\n state.output += nodot;\n prev.output += nodot;\n }\n\n if (peek() !== '*') {\n state.output += ONE_CHAR;\n prev.output += ONE_CHAR;\n }\n }\n\n push(token);\n }\n\n while (state.brackets > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));\n state.output = utils.escapeLast(state.output, '[');\n decrement('brackets');\n }\n\n while (state.parens > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));\n state.output = utils.escapeLast(state.output, '(');\n decrement('parens');\n }\n\n while (state.braces > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));\n state.output = utils.escapeLast(state.output, '{');\n decrement('braces');\n }\n\n if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {\n push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` });\n }\n\n // rebuild the output if we had to backtrack at any point\n if (state.backtrack === true) {\n state.output = '';\n\n for (const token of state.tokens) {\n state.output += token.output != null ? token.output : token.value;\n\n if (token.suffix) {\n state.output += token.suffix;\n }\n }\n }\n\n return state;\n};\n\n/**\n * Fast paths for creating regular expressions for common glob patterns.\n * This can significantly speed up processing and has very little downside\n * impact when none of the fast paths match.\n */\n\nparse.fastpaths = (input, options) => {\n const opts = { ...options };\n const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n const len = input.length;\n if (len > max) {\n throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);\n }\n\n input = REPLACEMENTS[input] || input;\n const win32 = utils.isWindows(options);\n\n // create constants based on platform, for windows or posix\n const {\n DOT_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOTS,\n NO_DOTS_SLASH,\n STAR,\n START_ANCHOR\n } = constants.globChars(win32);\n\n const nodot = opts.dot ? NO_DOTS : NO_DOT;\n const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;\n const capture = opts.capture ? '' : '?:';\n const state = { negated: false, prefix: '' };\n let star = opts.bash === true ? '.*?' : STAR;\n\n if (opts.capture) {\n star = `(${star})`;\n }\n\n const globstar = (opts) => {\n if (opts.noglobstar === true) return star;\n return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;\n };\n\n const create = str => {\n switch (str) {\n case '*':\n return `${nodot}${ONE_CHAR}${star}`;\n\n case '.*':\n return `${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '*.*':\n return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '*/*':\n return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;\n\n case '**':\n return nodot + globstar(opts);\n\n case '**/*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;\n\n case '**/*.*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '**/.*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n default: {\n const match = /^(.*?)\\.(\\w+)$/.exec(str);\n if (!match) return;\n\n const source = create(match[1]);\n if (!source) return;\n\n return source + DOT_LITERAL + match[2];\n }\n }\n };\n\n const output = utils.removePrefix(input, state);\n let source = create(output);\n\n if (source && opts.strictSlashes !== true) {\n source += `${SLASH_LITERAL}?`;\n }\n\n return source;\n};\n\nmodule.exports = parse;\n","'use strict';\n\nconst path = require('path');\nconst scan = require('./scan');\nconst parse = require('./parse');\nconst utils = require('./utils');\nconst constants = require('./constants');\nconst isObject = val => val && typeof val === 'object' && !Array.isArray(val);\n\n/**\n * Creates a matcher function from one or more glob patterns. The\n * returned function takes a string to match as its first argument,\n * and returns true if the string is a match. The returned matcher\n * function also takes a boolean as the second argument that, when true,\n * returns an object with additional information.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch(glob[, options]);\n *\n * const isMatch = picomatch('*.!(*a)');\n * console.log(isMatch('a.a')); //=> false\n * console.log(isMatch('a.b')); //=> true\n * ```\n * @name picomatch\n * @param {String|Array} `globs` One or more glob patterns.\n * @param {Object=} `options`\n * @return {Function=} Returns a matcher function.\n * @api public\n */\n\nconst picomatch = (glob, options, returnState = false) => {\n if (Array.isArray(glob)) {\n const fns = glob.map(input => picomatch(input, options, returnState));\n const arrayMatcher = str => {\n for (const isMatch of fns) {\n const state = isMatch(str);\n if (state) return state;\n }\n return false;\n };\n return arrayMatcher;\n }\n\n const isState = isObject(glob) && glob.tokens && glob.input;\n\n if (glob === '' || (typeof glob !== 'string' && !isState)) {\n throw new TypeError('Expected pattern to be a non-empty string');\n }\n\n const opts = options || {};\n const posix = utils.isWindows(options);\n const regex = isState\n ? picomatch.compileRe(glob, options)\n : picomatch.makeRe(glob, options, false, true);\n\n const state = regex.state;\n delete regex.state;\n\n let isIgnored = () => false;\n if (opts.ignore) {\n const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };\n isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);\n }\n\n const matcher = (input, returnObject = false) => {\n const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });\n const result = { glob, state, regex, posix, input, output, match, isMatch };\n\n if (typeof opts.onResult === 'function') {\n opts.onResult(result);\n }\n\n if (isMatch === false) {\n result.isMatch = false;\n return returnObject ? result : false;\n }\n\n if (isIgnored(input)) {\n if (typeof opts.onIgnore === 'function') {\n opts.onIgnore(result);\n }\n result.isMatch = false;\n return returnObject ? result : false;\n }\n\n if (typeof opts.onMatch === 'function') {\n opts.onMatch(result);\n }\n return returnObject ? result : true;\n };\n\n if (returnState) {\n matcher.state = state;\n }\n\n return matcher;\n};\n\n/**\n * Test `input` with the given `regex`. This is used by the main\n * `picomatch()` function to test the input string.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.test(input, regex[, options]);\n *\n * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\\/([^/]*?))$/));\n * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }\n * ```\n * @param {String} `input` String to test.\n * @param {RegExp} `regex`\n * @return {Object} Returns an object with matching info.\n * @api public\n */\n\npicomatch.test = (input, regex, options, { glob, posix } = {}) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected input to be a string');\n }\n\n if (input === '') {\n return { isMatch: false, output: '' };\n }\n\n const opts = options || {};\n const format = opts.format || (posix ? utils.toPosixSlashes : null);\n let match = input === glob;\n let output = (match && format) ? format(input) : input;\n\n if (match === false) {\n output = format ? format(input) : input;\n match = output === glob;\n }\n\n if (match === false || opts.capture === true) {\n if (opts.matchBase === true || opts.basename === true) {\n match = picomatch.matchBase(input, regex, options, posix);\n } else {\n match = regex.exec(output);\n }\n }\n\n return { isMatch: Boolean(match), match, output };\n};\n\n/**\n * Match the basename of a filepath.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.matchBase(input, glob[, options]);\n * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true\n * ```\n * @param {String} `input` String to test.\n * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).\n * @return {Boolean}\n * @api public\n */\n\npicomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {\n const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);\n return regex.test(path.basename(input));\n};\n\n/**\n * Returns true if **any** of the given glob `patterns` match the specified `string`.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.isMatch(string, patterns[, options]);\n *\n * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true\n * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false\n * ```\n * @param {String|Array} str The string to test.\n * @param {String|Array} patterns One or more glob patterns to use for matching.\n * @param {Object} [options] See available [options](#options).\n * @return {Boolean} Returns true if any patterns match `str`\n * @api public\n */\n\npicomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);\n\n/**\n * Parse a glob pattern to create the source string for a regular\n * expression.\n *\n * ```js\n * const picomatch = require('picomatch');\n * const result = picomatch.parse(pattern[, options]);\n * ```\n * @param {String} `pattern`\n * @param {Object} `options`\n * @return {Object} Returns an object with useful properties and output to be used as a regex source string.\n * @api public\n */\n\npicomatch.parse = (pattern, options) => {\n if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));\n return parse(pattern, { ...options, fastpaths: false });\n};\n\n/**\n * Scan a glob pattern to separate the pattern into segments.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.scan(input[, options]);\n *\n * const result = picomatch.scan('!./foo/*.js');\n * console.log(result);\n * { prefix: '!./',\n * input: '!./foo/*.js',\n * start: 3,\n * base: 'foo',\n * glob: '*.js',\n * isBrace: false,\n * isBracket: false,\n * isGlob: true,\n * isExtglob: false,\n * isGlobstar: false,\n * negated: true }\n * ```\n * @param {String} `input` Glob pattern to scan.\n * @param {Object} `options`\n * @return {Object} Returns an object with\n * @api public\n */\n\npicomatch.scan = (input, options) => scan(input, options);\n\n/**\n * Create a regular expression from a glob pattern.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.makeRe(input[, options]);\n *\n * console.log(picomatch.makeRe('*.js'));\n * //=> /^(?:(?!\\.)(?=.)[^/]*?\\.js)$/\n * ```\n * @param {String} `input` A glob pattern to convert to regex.\n * @param {Object} `options`\n * @return {RegExp} Returns a regex created from the given pattern.\n * @api public\n */\n\npicomatch.compileRe = (parsed, options, returnOutput = false, returnState = false) => {\n if (returnOutput === true) {\n return parsed.output;\n }\n\n const opts = options || {};\n const prepend = opts.contains ? '' : '^';\n const append = opts.contains ? '' : '$';\n\n let source = `${prepend}(?:${parsed.output})${append}`;\n if (parsed && parsed.negated === true) {\n source = `^(?!${source}).*$`;\n }\n\n const regex = picomatch.toRegex(source, options);\n if (returnState === true) {\n regex.state = parsed;\n }\n\n return regex;\n};\n\npicomatch.makeRe = (input, options, returnOutput = false, returnState = false) => {\n if (!input || typeof input !== 'string') {\n throw new TypeError('Expected a non-empty string');\n }\n\n const opts = options || {};\n let parsed = { negated: false, fastpaths: true };\n let prefix = '';\n let output;\n\n if (input.startsWith('./')) {\n input = input.slice(2);\n prefix = parsed.prefix = './';\n }\n\n if (opts.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {\n output = parse.fastpaths(input, options);\n }\n\n if (output === undefined) {\n parsed = parse(input, options);\n parsed.prefix = prefix + (parsed.prefix || '');\n } else {\n parsed.output = output;\n }\n\n return picomatch.compileRe(parsed, options, returnOutput, returnState);\n};\n\n/**\n * Create a regular expression from the given regex source string.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.toRegex(source[, options]);\n *\n * const { output } = picomatch.parse('*.js');\n * console.log(picomatch.toRegex(output));\n * //=> /^(?:(?!\\.)(?=.)[^/]*?\\.js)$/\n * ```\n * @param {String} `source` Regular expression source string.\n * @param {Object} `options`\n * @return {RegExp}\n * @api public\n */\n\npicomatch.toRegex = (source, options) => {\n try {\n const opts = options || {};\n return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));\n } catch (err) {\n if (options && options.debug === true) throw err;\n return /$^/;\n }\n};\n\n/**\n * Picomatch constants.\n * @return {Object}\n */\n\npicomatch.constants = constants;\n\n/**\n * Expose \"picomatch\"\n */\n\nmodule.exports = picomatch;\n","'use strict';\n\nconst utils = require('./utils');\nconst {\n CHAR_ASTERISK, /* * */\n CHAR_AT, /* @ */\n CHAR_BACKWARD_SLASH, /* \\ */\n CHAR_COMMA, /* , */\n CHAR_DOT, /* . */\n CHAR_EXCLAMATION_MARK, /* ! */\n CHAR_FORWARD_SLASH, /* / */\n CHAR_LEFT_CURLY_BRACE, /* { */\n CHAR_LEFT_PARENTHESES, /* ( */\n CHAR_LEFT_SQUARE_BRACKET, /* [ */\n CHAR_PLUS, /* + */\n CHAR_QUESTION_MARK, /* ? */\n CHAR_RIGHT_CURLY_BRACE, /* } */\n CHAR_RIGHT_PARENTHESES, /* ) */\n CHAR_RIGHT_SQUARE_BRACKET /* ] */\n} = require('./constants');\n\nconst isPathSeparator = code => {\n return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;\n};\n\nconst depth = token => {\n if (token.isPrefix !== true) {\n token.depth = token.isGlobstar ? Infinity : 1;\n }\n};\n\n/**\n * Quickly scans a glob pattern and returns an object with a handful of\n * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),\n * `glob` (the actual pattern), and `negated` (true if the path starts with `!`).\n *\n * ```js\n * const pm = require('picomatch');\n * console.log(pm.scan('foo/bar/*.js'));\n * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }\n * ```\n * @param {String} `str`\n * @param {Object} `options`\n * @return {Object} Returns an object with tokens and regex source string.\n * @api public\n */\n\nconst scan = (input, options) => {\n const opts = options || {};\n\n const length = input.length - 1;\n const scanToEnd = opts.parts === true || opts.scanToEnd === true;\n const slashes = [];\n const tokens = [];\n const parts = [];\n\n let str = input;\n let index = -1;\n let start = 0;\n let lastIndex = 0;\n let isBrace = false;\n let isBracket = false;\n let isGlob = false;\n let isExtglob = false;\n let isGlobstar = false;\n let braceEscaped = false;\n let backslashes = false;\n let negated = false;\n let finished = false;\n let braces = 0;\n let prev;\n let code;\n let token = { value: '', depth: 0, isGlob: false };\n\n const eos = () => index >= length;\n const peek = () => str.charCodeAt(index + 1);\n const advance = () => {\n prev = code;\n return str.charCodeAt(++index);\n };\n\n while (index < length) {\n code = advance();\n let next;\n\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n code = advance();\n\n if (code === CHAR_LEFT_CURLY_BRACE) {\n braceEscaped = true;\n }\n continue;\n }\n\n if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {\n braces++;\n\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (code === CHAR_LEFT_CURLY_BRACE) {\n braces++;\n continue;\n }\n\n if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {\n isBrace = token.isBrace = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (braceEscaped !== true && code === CHAR_COMMA) {\n isBrace = token.isBrace = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (code === CHAR_RIGHT_CURLY_BRACE) {\n braces--;\n\n if (braces === 0) {\n braceEscaped = false;\n isBrace = token.isBrace = true;\n finished = true;\n break;\n }\n }\n }\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (code === CHAR_FORWARD_SLASH) {\n slashes.push(index);\n tokens.push(token);\n token = { value: '', depth: 0, isGlob: false };\n\n if (finished === true) continue;\n if (prev === CHAR_DOT && index === (start + 1)) {\n start += 2;\n continue;\n }\n\n lastIndex = index + 1;\n continue;\n }\n\n if (opts.noext !== true) {\n const isExtglobChar = code === CHAR_PLUS\n || code === CHAR_AT\n || code === CHAR_ASTERISK\n || code === CHAR_QUESTION_MARK\n || code === CHAR_EXCLAMATION_MARK;\n\n if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {\n isGlob = token.isGlob = true;\n isExtglob = token.isExtglob = true;\n finished = true;\n\n if (scanToEnd === true) {\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n code = advance();\n continue;\n }\n\n if (code === CHAR_RIGHT_PARENTHESES) {\n isGlob = token.isGlob = true;\n finished = true;\n break;\n }\n }\n continue;\n }\n break;\n }\n }\n\n if (code === CHAR_ASTERISK) {\n if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n\n if (code === CHAR_QUESTION_MARK) {\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n\n if (code === CHAR_LEFT_SQUARE_BRACKET) {\n while (eos() !== true && (next = advance())) {\n if (next === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (next === CHAR_RIGHT_SQUARE_BRACKET) {\n isBracket = token.isBracket = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n }\n }\n\n if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {\n negated = token.negated = true;\n start++;\n continue;\n }\n\n if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n code = advance();\n continue;\n }\n\n if (code === CHAR_RIGHT_PARENTHESES) {\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n }\n }\n\n if (isGlob === true) {\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n }\n\n if (opts.noext === true) {\n isExtglob = false;\n isGlob = false;\n }\n\n let base = str;\n let prefix = '';\n let glob = '';\n\n if (start > 0) {\n prefix = str.slice(0, start);\n str = str.slice(start);\n lastIndex -= start;\n }\n\n if (base && isGlob === true && lastIndex > 0) {\n base = str.slice(0, lastIndex);\n glob = str.slice(lastIndex);\n } else if (isGlob === true) {\n base = '';\n glob = str;\n } else {\n base = str;\n }\n\n if (base && base !== '' && base !== '/' && base !== str) {\n if (isPathSeparator(base.charCodeAt(base.length - 1))) {\n base = base.slice(0, -1);\n }\n }\n\n if (opts.unescape === true) {\n if (glob) glob = utils.removeBackslashes(glob);\n\n if (base && backslashes === true) {\n base = utils.removeBackslashes(base);\n }\n }\n\n const state = {\n prefix,\n input,\n start,\n base,\n glob,\n isBrace,\n isBracket,\n isGlob,\n isExtglob,\n isGlobstar,\n negated\n };\n\n if (opts.tokens === true) {\n state.maxDepth = 0;\n if (!isPathSeparator(code)) {\n tokens.push(token);\n }\n state.tokens = tokens;\n }\n\n if (opts.parts === true || opts.tokens === true) {\n let prevIndex;\n\n for (let idx = 0; idx < slashes.length; idx++) {\n const n = prevIndex ? prevIndex + 1 : start;\n const i = slashes[idx];\n const value = input.slice(n, i);\n if (opts.tokens) {\n if (idx === 0 && start !== 0) {\n tokens[idx].isPrefix = true;\n tokens[idx].value = prefix;\n } else {\n tokens[idx].value = value;\n }\n depth(tokens[idx]);\n state.maxDepth += tokens[idx].depth;\n }\n if (idx !== 0 || value !== '') {\n parts.push(value);\n }\n prevIndex = i;\n }\n\n if (prevIndex && prevIndex + 1 < input.length) {\n const value = input.slice(prevIndex + 1);\n parts.push(value);\n\n if (opts.tokens) {\n tokens[tokens.length - 1].value = value;\n depth(tokens[tokens.length - 1]);\n state.maxDepth += tokens[tokens.length - 1].depth;\n }\n }\n\n state.slashes = slashes;\n state.parts = parts;\n }\n\n return state;\n};\n\nmodule.exports = scan;\n","'use strict';\n\nconst path = require('path');\nconst win32 = process.platform === 'win32';\nconst {\n REGEX_BACKSLASH,\n REGEX_REMOVE_BACKSLASH,\n REGEX_SPECIAL_CHARS,\n REGEX_SPECIAL_CHARS_GLOBAL\n} = require('./constants');\n\nexports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);\nexports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);\nexports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);\nexports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\\\$1');\nexports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');\n\nexports.removeBackslashes = str => {\n return str.replace(REGEX_REMOVE_BACKSLASH, match => {\n return match === '\\\\' ? '' : match;\n });\n};\n\nexports.supportsLookbehinds = () => {\n const segs = process.version.slice(1).split('.').map(Number);\n if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) {\n return true;\n }\n return false;\n};\n\nexports.isWindows = options => {\n if (options && typeof options.windows === 'boolean') {\n return options.windows;\n }\n return win32 === true || path.sep === '\\\\';\n};\n\nexports.escapeLast = (input, char, lastIdx) => {\n const idx = input.lastIndexOf(char, lastIdx);\n if (idx === -1) return input;\n if (input[idx - 1] === '\\\\') return exports.escapeLast(input, char, idx - 1);\n return `${input.slice(0, idx)}\\\\${input.slice(idx)}`;\n};\n\nexports.removePrefix = (input, state = {}) => {\n let output = input;\n if (output.startsWith('./')) {\n output = output.slice(2);\n state.prefix = './';\n }\n return output;\n};\n\nexports.wrapOutput = (input, state = {}, options = {}) => {\n const prepend = options.contains ? '' : '^';\n const append = options.contains ? '' : '$';\n\n let output = `${prepend}(?:${input})${append}`;\n if (state.negated === true) {\n output = `(?:^(?!${output}).*$)`;\n }\n return output;\n};\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","/** @license React v16.12.0\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n// (unstable) APIs that have been removed. Can we remove the symbols?\n\nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\nvar REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\nvar REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\n\nfunction isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE);\n}\n\n/**\n * Forked from fbjs/warning:\n * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js\n *\n * Only change is we use console.warn instead of console.error,\n * and do nothing when 'console' is not supported.\n * This really simplifies the code.\n * ---\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\nvar lowPriorityWarningWithoutStack = function () {};\n\n{\n var printWarning = function (format) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n\n if (typeof console !== 'undefined') {\n console.warn(message);\n }\n\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n\n lowPriorityWarningWithoutStack = function (condition, format) {\n if (format === undefined) {\n throw new Error('`lowPriorityWarningWithoutStack(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (!condition) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(void 0, [format].concat(args));\n }\n };\n}\n\nvar lowPriorityWarningWithoutStack$1 = lowPriorityWarningWithoutStack;\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_ASYNC_MODE_TYPE:\n case REACT_CONCURRENT_MODE_TYPE:\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n} // AsyncMode is deprecated along with isAsyncMode\n\nvar AsyncMode = REACT_ASYNC_MODE_TYPE;\nvar ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}\nfunction isConcurrentMode(object) {\n return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.typeOf = typeOf;\nexports.AsyncMode = AsyncMode;\nexports.ConcurrentMode = ConcurrentMode;\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isValidElementType = isValidElementType;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","'use strict';\nmodule.exports = path => {\n\tconst isExtendedLengthPath = /^\\\\\\\\\\?\\\\/.test(path);\n\tconst hasNonAscii = /[^\\u0000-\\u0080]+/.test(path); // eslint-disable-line no-control-regex\n\n\tif (isExtendedLengthPath || hasNonAscii) {\n\t\treturn path;\n\t}\n\n\treturn path.replace(/\\\\/g, '/');\n};\n","'use strict';\nmodule.exports = StackUtils;\n\nfunction StackUtils(opts) {\n if (!(this instanceof StackUtils)) {\n throw new Error('StackUtils constructor must be called with new');\n }\n opts = opts || {};\n this._cwd = (opts.cwd || process.cwd()).replace(/\\\\/g, '/');\n this._internals = opts.internals || [];\n this._wrapCallSite = opts.wrapCallSite || false;\n}\n\nmodule.exports.nodeInternals = nodeInternals;\n\nfunction nodeInternals() {\n if (!module.exports.natives) {\n module.exports.natives = Object.keys(process.binding('natives'));\n module.exports.natives.push('bootstrap_node', 'node',\n 'internal/bootstrap/node');\n }\n\n return module.exports.natives.map(function (n) {\n return new RegExp('\\\\(' + n + '\\\\.js:\\\\d+:\\\\d+\\\\)$');\n }).concat([\n /\\s*at (bootstrap_)?node\\.js:\\d+:\\d+?$/,\n /\\(internal\\/[^:]+:\\d+:\\d+\\)$/,\n /\\/\\.node-spawn-wrap-\\w+-\\w+\\/node:\\d+:\\d+\\)?$/\n ]);\n}\n\nStackUtils.prototype.clean = function (stack) {\n if (!Array.isArray(stack)) {\n stack = stack.split('\\n');\n }\n\n if (!(/^\\s*at /.test(stack[0])) &&\n (/^\\s*at /.test(stack[1]))) {\n stack = stack.slice(1);\n }\n\n var outdent = false;\n var lastNonAtLine = null;\n var result = [];\n\n stack.forEach(function (st) {\n st = st.replace(/\\\\/g, '/');\n var isInternal = this._internals.some(function (internal) {\n return internal.test(st);\n });\n\n if (isInternal) {\n return null;\n }\n\n var isAtLine = /^\\s*at /.test(st);\n\n if (outdent) {\n st = st.replace(/\\s+$/, '').replace(/^(\\s+)at /, '$1');\n } else {\n st = st.trim();\n if (isAtLine) {\n st = st.substring(3);\n }\n }\n\n st = st.replace(this._cwd + '/', '');\n\n if (st) {\n if (isAtLine) {\n if (lastNonAtLine) {\n result.push(lastNonAtLine);\n lastNonAtLine = null;\n }\n result.push(st);\n } else {\n outdent = true;\n lastNonAtLine = st;\n }\n }\n }, this);\n\n stack = result.join('\\n').trim();\n\n if (stack) {\n return stack + '\\n';\n }\n return '';\n};\n\nStackUtils.prototype.captureString = function (limit, fn) {\n if (typeof limit === 'function') {\n fn = limit;\n limit = Infinity;\n }\n if (!fn) {\n fn = this.captureString;\n }\n\n var limitBefore = Error.stackTraceLimit;\n if (limit) {\n Error.stackTraceLimit = limit;\n }\n\n var obj = {};\n\n Error.captureStackTrace(obj, fn);\n var stack = obj.stack;\n Error.stackTraceLimit = limitBefore;\n\n return this.clean(stack);\n};\n\nStackUtils.prototype.capture = function (limit, fn) {\n if (typeof limit === 'function') {\n fn = limit;\n limit = Infinity;\n }\n if (!fn) {\n fn = this.capture;\n }\n var prepBefore = Error.prepareStackTrace;\n var limitBefore = Error.stackTraceLimit;\n var wrapCallSite = this._wrapCallSite;\n\n Error.prepareStackTrace = function (obj, site) {\n if (wrapCallSite) {\n return site.map(wrapCallSite);\n }\n return site;\n };\n\n if (limit) {\n Error.stackTraceLimit = limit;\n }\n\n var obj = {};\n Error.captureStackTrace(obj, fn);\n var stack = obj.stack;\n Error.prepareStackTrace = prepBefore;\n Error.stackTraceLimit = limitBefore;\n\n return stack;\n};\n\nStackUtils.prototype.at = function at(fn) {\n if (!fn) {\n fn = at;\n }\n\n var site = this.capture(1, fn)[0];\n\n if (!site) {\n return {};\n }\n\n var res = {\n line: site.getLineNumber(),\n column: site.getColumnNumber()\n };\n\n this._setFile(res, site.getFileName());\n\n if (site.isConstructor()) {\n res.constructor = true;\n }\n\n if (site.isEval()) {\n res.evalOrigin = site.getEvalOrigin();\n }\n\n // Node v10 stopped with the isNative() on callsites, apparently\n /* istanbul ignore next */\n if (site.isNative()) {\n res.native = true;\n }\n\n var typename = null;\n try {\n typename = site.getTypeName();\n } catch (er) {}\n\n if (typename &&\n typename !== 'Object' &&\n typename !== '[object Object]') {\n res.type = typename;\n }\n\n var fname = site.getFunctionName();\n if (fname) {\n res.function = fname;\n }\n\n var meth = site.getMethodName();\n if (meth && fname !== meth) {\n res.method = meth;\n }\n\n return res;\n};\n\nStackUtils.prototype._setFile = function (result, filename) {\n if (filename) {\n filename = filename.replace(/\\\\/g, '/');\n if ((filename.indexOf(this._cwd + '/') === 0)) {\n filename = filename.substr(this._cwd.length + 1);\n }\n result.file = filename;\n }\n};\n\nvar re = new RegExp(\n '^' +\n // Sometimes we strip out the ' at' because it's noisy\n '(?:\\\\s*at )?' +\n // $1 = ctor if 'new'\n '(?:(new) )?' +\n // $2 = function name (can be literally anything)\n // May contain method at the end as [as xyz]\n '(?:(.*?) \\\\()?' +\n // (eval at <anonymous> (file.js:1:1),\n // $3 = eval origin\n // $4:$5:$6 are eval file/line/col, but not normally reported\n '(?:eval at ([^ ]+) \\\\((.+?):(\\\\d+):(\\\\d+)\\\\), )?' +\n // file:line:col\n // $7:$8:$9\n // $10 = 'native' if native\n '(?:(.+?):(\\\\d+):(\\\\d+)|(native))' +\n // maybe close the paren, then end\n // if $11 is ), then we only allow balanced parens in the filename\n // any imbalance is placed on the fname. This is a heuristic, and\n // bound to be incorrect in some edge cases. The bet is that\n // having weird characters in method names is more common than\n // having weird characters in filenames, which seems reasonable.\n '(\\\\)?)$'\n);\n\nvar methodRe = /^(.*?) \\[as (.*?)\\]$/;\n\nStackUtils.prototype.parseLine = function parseLine(line) {\n var match = line && line.match(re);\n if (!match) {\n return null;\n }\n\n var ctor = match[1] === 'new';\n var fname = match[2];\n var evalOrigin = match[3];\n var evalFile = match[4];\n var evalLine = Number(match[5]);\n var evalCol = Number(match[6]);\n var file = match[7];\n var lnum = match[8];\n var col = match[9];\n var native = match[10] === 'native';\n var closeParen = match[11] === ')';\n\n var res = {};\n\n if (lnum) {\n res.line = Number(lnum);\n }\n\n if (col) {\n res.column = Number(col);\n }\n\n if (closeParen && file) {\n // make sure parens are balanced\n // if we have a file like \"asdf) [as foo] (xyz.js\", then odds are\n // that the fname should be += \" (asdf) [as foo]\" and the file\n // should be just \"xyz.js\"\n // walk backwards from the end to find the last unbalanced (\n var closes = 0;\n for (var i = file.length - 1; i > 0; i--) {\n if (file.charAt(i) === ')') {\n closes ++;\n } else if (file.charAt(i) === '(' && file.charAt(i - 1) === ' ') {\n closes --;\n if (closes === -1 && file.charAt(i - 1) === ' ') {\n var before = file.substr(0, i - 1);\n var after = file.substr(i + 1);\n file = after;\n fname += ' (' + before;\n break;\n }\n }\n }\n }\n\n if (fname) {\n var methodMatch = fname.match(methodRe);\n if (methodMatch) {\n fname = methodMatch[1];\n var meth = methodMatch[2];\n }\n }\n\n this._setFile(res, file);\n\n if (ctor) {\n res.constructor = true;\n }\n\n if (evalOrigin) {\n res.evalOrigin = evalOrigin;\n res.evalLine = evalLine;\n res.evalColumn = evalCol;\n res.evalFile = evalFile && evalFile.replace(/\\\\/g, '/');\n }\n\n if (native) {\n res.native = true;\n }\n\n if (fname) {\n res.function = fname;\n }\n\n if (meth && fname !== meth) {\n res.method = meth;\n }\n\n return res;\n};\n\nvar bound = new StackUtils();\n\nObject.keys(StackUtils.prototype).forEach(function (key) {\n StackUtils[key] = bound[key].bind(bound);\n});\n","/*!\n * to-regex-range <https://github.com/micromatch/to-regex-range>\n *\n * Copyright (c) 2015-present, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nconst isNumber = require('is-number');\n\nconst toRegexRange = (min, max, options) => {\n if (isNumber(min) === false) {\n throw new TypeError('toRegexRange: expected the first argument to be a number');\n }\n\n if (max === void 0 || min === max) {\n return String(min);\n }\n\n if (isNumber(max) === false) {\n throw new TypeError('toRegexRange: expected the second argument to be a number.');\n }\n\n let opts = { relaxZeros: true, ...options };\n if (typeof opts.strictZeros === 'boolean') {\n opts.relaxZeros = opts.strictZeros === false;\n }\n\n let relax = String(opts.relaxZeros);\n let shorthand = String(opts.shorthand);\n let capture = String(opts.capture);\n let wrap = String(opts.wrap);\n let cacheKey = min + ':' + max + '=' + relax + shorthand + capture + wrap;\n\n if (toRegexRange.cache.hasOwnProperty(cacheKey)) {\n return toRegexRange.cache[cacheKey].result;\n }\n\n let a = Math.min(min, max);\n let b = Math.max(min, max);\n\n if (Math.abs(a - b) === 1) {\n let result = min + '|' + max;\n if (opts.capture) {\n return `(${result})`;\n }\n if (opts.wrap === false) {\n return result;\n }\n return `(?:${result})`;\n }\n\n let isPadded = hasPadding(min) || hasPadding(max);\n let state = { min, max, a, b };\n let positives = [];\n let negatives = [];\n\n if (isPadded) {\n state.isPadded = isPadded;\n state.maxLen = String(state.max).length;\n }\n\n if (a < 0) {\n let newMin = b < 0 ? Math.abs(b) : 1;\n negatives = splitToPatterns(newMin, Math.abs(a), state, opts);\n a = state.a = 0;\n }\n\n if (b >= 0) {\n positives = splitToPatterns(a, b, state, opts);\n }\n\n state.negatives = negatives;\n state.positives = positives;\n state.result = collatePatterns(negatives, positives, opts);\n\n if (opts.capture === true) {\n state.result = `(${state.result})`;\n } else if (opts.wrap !== false && (positives.length + negatives.length) > 1) {\n state.result = `(?:${state.result})`;\n }\n\n toRegexRange.cache[cacheKey] = state;\n return state.result;\n};\n\nfunction collatePatterns(neg, pos, options) {\n let onlyNegative = filterPatterns(neg, pos, '-', false, options) || [];\n let onlyPositive = filterPatterns(pos, neg, '', false, options) || [];\n let intersected = filterPatterns(neg, pos, '-?', true, options) || [];\n let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive);\n return subpatterns.join('|');\n}\n\nfunction splitToRanges(min, max) {\n let nines = 1;\n let zeros = 1;\n\n let stop = countNines(min, nines);\n let stops = new Set([max]);\n\n while (min <= stop && stop <= max) {\n stops.add(stop);\n nines += 1;\n stop = countNines(min, nines);\n }\n\n stop = countZeros(max + 1, zeros) - 1;\n\n while (min < stop && stop <= max) {\n stops.add(stop);\n zeros += 1;\n stop = countZeros(max + 1, zeros) - 1;\n }\n\n stops = [...stops];\n stops.sort(compare);\n return stops;\n}\n\n/**\n * Convert a range to a regex pattern\n * @param {Number} `start`\n * @param {Number} `stop`\n * @return {String}\n */\n\nfunction rangeToPattern(start, stop, options) {\n if (start === stop) {\n return { pattern: start, count: [], digits: 0 };\n }\n\n let zipped = zip(start, stop);\n let digits = zipped.length;\n let pattern = '';\n let count = 0;\n\n for (let i = 0; i < digits; i++) {\n let [startDigit, stopDigit] = zipped[i];\n\n if (startDigit === stopDigit) {\n pattern += startDigit;\n\n } else if (startDigit !== '0' || stopDigit !== '9') {\n pattern += toCharacterClass(startDigit, stopDigit, options);\n\n } else {\n count++;\n }\n }\n\n if (count) {\n pattern += options.shorthand === true ? '\\\\d' : '[0-9]';\n }\n\n return { pattern, count: [count], digits };\n}\n\nfunction splitToPatterns(min, max, tok, options) {\n let ranges = splitToRanges(min, max);\n let tokens = [];\n let start = min;\n let prev;\n\n for (let i = 0; i < ranges.length; i++) {\n let max = ranges[i];\n let obj = rangeToPattern(String(start), String(max), options);\n let zeros = '';\n\n if (!tok.isPadded && prev && prev.pattern === obj.pattern) {\n if (prev.count.length > 1) {\n prev.count.pop();\n }\n\n prev.count.push(obj.count[0]);\n prev.string = prev.pattern + toQuantifier(prev.count);\n start = max + 1;\n continue;\n }\n\n if (tok.isPadded) {\n zeros = padZeros(max, tok, options);\n }\n\n obj.string = zeros + obj.pattern + toQuantifier(obj.count);\n tokens.push(obj);\n start = max + 1;\n prev = obj;\n }\n\n return tokens;\n}\n\nfunction filterPatterns(arr, comparison, prefix, intersection, options) {\n let result = [];\n\n for (let ele of arr) {\n let { string } = ele;\n\n // only push if _both_ are negative...\n if (!intersection && !contains(comparison, 'string', string)) {\n result.push(prefix + string);\n }\n\n // or _both_ are positive\n if (intersection && contains(comparison, 'string', string)) {\n result.push(prefix + string);\n }\n }\n return result;\n}\n\n/**\n * Zip strings\n */\n\nfunction zip(a, b) {\n let arr = [];\n for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);\n return arr;\n}\n\nfunction compare(a, b) {\n return a > b ? 1 : b > a ? -1 : 0;\n}\n\nfunction contains(arr, key, val) {\n return arr.some(ele => ele[key] === val);\n}\n\nfunction countNines(min, len) {\n return Number(String(min).slice(0, -len) + '9'.repeat(len));\n}\n\nfunction countZeros(integer, zeros) {\n return integer - (integer % Math.pow(10, zeros));\n}\n\nfunction toQuantifier(digits) {\n let [start = 0, stop = ''] = digits;\n if (stop || start > 1) {\n return `{${start + (stop ? ',' + stop : '')}}`;\n }\n return '';\n}\n\nfunction toCharacterClass(a, b, options) {\n return `[${a}${(b - a === 1) ? '' : '-'}${b}]`;\n}\n\nfunction hasPadding(str) {\n return /^-?(0+)\\d/.test(str);\n}\n\nfunction padZeros(value, tok, options) {\n if (!tok.isPadded) {\n return value;\n }\n\n let diff = Math.abs(tok.maxLen - String(value).length);\n let relax = options.relaxZeros !== false;\n\n switch (diff) {\n case 0:\n return '';\n case 1:\n return relax ? '0?' : '0';\n case 2:\n return relax ? '0{0,2}' : '00';\n default: {\n return relax ? `0{0,${diff}}` : `0{${diff}}`;\n }\n }\n}\n\n/**\n * Cache\n */\n\ntoRegexRange.cache = {};\ntoRegexRange.clearCache = () => (toRegexRange.cache = {});\n\n/**\n * Expose `toRegexRange`\n */\n\nmodule.exports = toRegexRange;\n","/*!\n * is-number <https://github.com/jonschlinkert/is-number>\n *\n * Copyright (c) 2014-present, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nmodule.exports = function(num) {\n if (typeof num === 'number') {\n return num - num === 0;\n }\n if (typeof num === 'string' && num.trim() !== '') {\n return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);\n }\n return false;\n};\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n}\n","module.exports = function isBuffer(arg) {\n return arg && typeof arg === 'object'\n && typeof arg.copy === 'function'\n && typeof arg.fill === 'function'\n && typeof arg.readUInt8 === 'function';\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\nvar getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors ||\n function getOwnPropertyDescriptors(obj) {\n var keys = Object.keys(obj);\n var descriptors = {};\n for (var i = 0; i < keys.length; i++) {\n descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]);\n }\n return descriptors;\n };\n\nvar formatRegExp = /%[sdj%]/g;\nexports.format = function(f) {\n if (!isString(f)) {\n var objects = [];\n for (var i = 0; i < arguments.length; i++) {\n objects.push(inspect(arguments[i]));\n }\n return objects.join(' ');\n }\n\n var i = 1;\n var args = arguments;\n var len = args.length;\n var str = String(f).replace(formatRegExp, function(x) {\n if (x === '%%') return '%';\n if (i >= len) return x;\n switch (x) {\n case '%s': return String(args[i++]);\n case '%d': return Number(args[i++]);\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n default:\n return x;\n }\n });\n for (var x = args[i]; i < len; x = args[++i]) {\n if (isNull(x) || !isObject(x)) {\n str += ' ' + x;\n } else {\n str += ' ' + inspect(x);\n }\n }\n return str;\n};\n\n\n// Mark that a method should not be used.\n// Returns a modified function which warns once by default.\n// If --no-deprecation is set, then it is a no-op.\nexports.deprecate = function(fn, msg) {\n if (typeof process !== 'undefined' && process.noDeprecation === true) {\n return fn;\n }\n\n // Allow for deprecating things in the process of starting up.\n if (typeof process === 'undefined') {\n return function() {\n return exports.deprecate(fn, msg).apply(this, arguments);\n };\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (process.throwDeprecation) {\n throw new Error(msg);\n } else if (process.traceDeprecation) {\n console.trace(msg);\n } else {\n console.error(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n};\n\n\nvar debugs = {};\nvar debugEnviron;\nexports.debuglog = function(set) {\n if (isUndefined(debugEnviron))\n debugEnviron = process.env.NODE_DEBUG || '';\n set = set.toUpperCase();\n if (!debugs[set]) {\n if (new RegExp('\\\\b' + set + '\\\\b', 'i').test(debugEnviron)) {\n var pid = process.pid;\n debugs[set] = function() {\n var msg = exports.format.apply(exports, arguments);\n console.error('%s %d: %s', set, pid, msg);\n };\n } else {\n debugs[set] = function() {};\n }\n }\n return debugs[set];\n};\n\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nfunction inspect(obj, opts) {\n // default options\n var ctx = {\n seen: [],\n stylize: stylizeNoColor\n };\n // legacy...\n if (arguments.length >= 3) ctx.depth = arguments[2];\n if (arguments.length >= 4) ctx.colors = arguments[3];\n if (isBoolean(opts)) {\n // legacy...\n ctx.showHidden = opts;\n } else if (opts) {\n // got an \"options\" object\n exports._extend(ctx, opts);\n }\n // set default options\n if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n if (isUndefined(ctx.depth)) ctx.depth = 2;\n if (isUndefined(ctx.colors)) ctx.colors = false;\n if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n if (ctx.colors) ctx.stylize = stylizeWithColor;\n return formatValue(ctx, obj, ctx.depth);\n}\nexports.inspect = inspect;\n\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect.colors = {\n 'bold' : [1, 22],\n 'italic' : [3, 23],\n 'underline' : [4, 24],\n 'inverse' : [7, 27],\n 'white' : [37, 39],\n 'grey' : [90, 39],\n 'black' : [30, 39],\n 'blue' : [34, 39],\n 'cyan' : [36, 39],\n 'green' : [32, 39],\n 'magenta' : [35, 39],\n 'red' : [31, 39],\n 'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect.styles = {\n 'special': 'cyan',\n 'number': 'yellow',\n 'boolean': 'yellow',\n 'undefined': 'grey',\n 'null': 'bold',\n 'string': 'green',\n 'date': 'magenta',\n // \"name\": intentionally not styling\n 'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n var style = inspect.styles[styleType];\n\n if (style) {\n return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n '\\u001b[' + inspect.colors[style][1] + 'm';\n } else {\n return str;\n }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n return str;\n}\n\n\nfunction arrayToHash(array) {\n var hash = {};\n\n array.forEach(function(val, idx) {\n hash[val] = true;\n });\n\n return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n // Provide a hook for user-specified inspect functions.\n // Check that value is an object with an inspect function on it\n if (ctx.customInspect &&\n value &&\n isFunction(value.inspect) &&\n // Filter out the util module, it's inspect function is special\n value.inspect !== exports.inspect &&\n // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes, ctx);\n if (!isString(ret)) {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n if (ctx.showHidden) {\n keys = Object.getOwnPropertyNames(value);\n }\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (isError(value)\n && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '', array = false, braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n if (isUndefined(value))\n return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') + '\\'';\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value))\n return ctx.stylize('' + value, 'number');\n if (isBoolean(value))\n return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value))\n return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n String(i), true));\n } else {\n output.push('');\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n key, true));\n }\n });\n return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n').substr(2);\n } else {\n str = '\\n' + str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.substr(1, name.length - 2);\n name = ctx.stylize(name, 'name');\n } else {\n name = name.replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = output.reduce(function(prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1];\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nfunction isArray(ar) {\n return Array.isArray(ar);\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n return isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = require('./support/isBuffer');\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n 'Oct', 'Nov', 'Dec'];\n\n// 26 Feb 16:19:34\nfunction timestamp() {\n var d = new Date();\n var time = [pad(d.getHours()),\n pad(d.getMinutes()),\n pad(d.getSeconds())].join(':');\n return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\n// log is just a thin wrapper to console.log that prepends a timestamp\nexports.log = function() {\n console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));\n};\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * The Function.prototype.inherits from lang.js rewritten as a standalone\n * function (not on Function.prototype). NOTE: If this file is to be loaded\n * during bootstrapping this function needs to be rewritten using some native\n * functions as prototype setup using normal JavaScript does not work as\n * expected during bootstrapping (see mirror.js in r114903).\n *\n * @param {function} ctor Constructor function which needs to inherit the\n * prototype.\n * @param {function} superCtor Constructor function to inherit prototype from.\n */\nexports.inherits = require('inherits');\n\nexports._extend = function(origin, add) {\n // Don't do anything if add isn't an object\n if (!add || !isObject(add)) return origin;\n\n var keys = Object.keys(add);\n var i = keys.length;\n while (i--) {\n origin[keys[i]] = add[keys[i]];\n }\n return origin;\n};\n\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nvar kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined;\n\nexports.promisify = function promisify(original) {\n if (typeof original !== 'function')\n throw new TypeError('The \"original\" argument must be of type Function');\n\n if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {\n var fn = original[kCustomPromisifiedSymbol];\n if (typeof fn !== 'function') {\n throw new TypeError('The \"util.promisify.custom\" argument must be of type Function');\n }\n Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n value: fn, enumerable: false, writable: false, configurable: true\n });\n return fn;\n }\n\n function fn() {\n var promiseResolve, promiseReject;\n var promise = new Promise(function (resolve, reject) {\n promiseResolve = resolve;\n promiseReject = reject;\n });\n\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n args.push(function (err, value) {\n if (err) {\n promiseReject(err);\n } else {\n promiseResolve(value);\n }\n });\n\n try {\n original.apply(this, args);\n } catch (err) {\n promiseReject(err);\n }\n\n return promise;\n }\n\n Object.setPrototypeOf(fn, Object.getPrototypeOf(original));\n\n if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n value: fn, enumerable: false, writable: false, configurable: true\n });\n return Object.defineProperties(\n fn,\n getOwnPropertyDescriptors(original)\n );\n}\n\nexports.promisify.custom = kCustomPromisifiedSymbol\n\nfunction callbackifyOnRejected(reason, cb) {\n // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M).\n // Because `null` is a special error value in callbacks which means \"no error\n // occurred\", we error-wrap so the callback consumer can distinguish between\n // \"the promise rejected with null\" or \"the promise fulfilled with undefined\".\n if (!reason) {\n var newReason = new Error('Promise was rejected with a falsy value');\n newReason.reason = reason;\n reason = newReason;\n }\n return cb(reason);\n}\n\nfunction callbackify(original) {\n if (typeof original !== 'function') {\n throw new TypeError('The \"original\" argument must be of type Function');\n }\n\n // We DO NOT return the promise as it gives the user a false sense that\n // the promise is actually somehow related to the callback's execution\n // and that the callback throwing will reject the promise.\n function callbackified() {\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n\n var maybeCb = args.pop();\n if (typeof maybeCb !== 'function') {\n throw new TypeError('The last argument must be of type Function');\n }\n var self = this;\n var cb = function() {\n return maybeCb.apply(self, arguments);\n };\n // In true node style we process the callback on `nextTick` with all the\n // implications (stack, `uncaughtException`, `async_hooks`)\n original.apply(this, args)\n .then(function(ret) { process.nextTick(cb, null, ret) },\n function(rej) { process.nextTick(callbackifyOnRejected, rej, cb) });\n }\n\n Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));\n Object.defineProperties(callbackified,\n getOwnPropertyDescriptors(original));\n return callbackified;\n}\nexports.callbackify = callbackify;\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.default = void 0;\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n// This diff-sequences package implements the linear space variation in\n// An O(ND) Difference Algorithm and Its Variations by Eugene W. Myers\n// Relationship in notation between Myers paper and this package:\n// A is a\n// N is aLength, aEnd - aStart, and so on\n// x is aIndex, aFirst, aLast, and so on\n// B is b\n// M is bLength, bEnd - bStart, and so on\n// y is bIndex, bFirst, bLast, and so on\n// Δ = N - M is negative of baDeltaLength = bLength - aLength\n// D is d\n// k is kF\n// k + Δ is kF = kR - baDeltaLength\n// V is aIndexesF or aIndexesR (see comment below about Indexes type)\n// index intervals [1, N] and [1, M] are [0, aLength) and [0, bLength)\n// starting point in forward direction (0, 0) is (-1, -1)\n// starting point in reverse direction (N + 1, M + 1) is (aLength, bLength)\n// The “edit graph” for sequences a and b corresponds to items:\n// in a on the horizontal axis\n// in b on the vertical axis\n//\n// Given a-coordinate of a point in a diagonal, you can compute b-coordinate.\n//\n// Forward diagonals kF:\n// zero diagonal intersects top left corner\n// positive diagonals intersect top edge\n// negative diagonals insersect left edge\n//\n// Reverse diagonals kR:\n// zero diagonal intersects bottom right corner\n// positive diagonals intersect right edge\n// negative diagonals intersect bottom edge\n// The graph contains a directed acyclic graph of edges:\n// horizontal: delete an item from a\n// vertical: insert an item from b\n// diagonal: common item in a and b\n//\n// The algorithm solves dual problems in the graph analogy:\n// Find longest common subsequence: path with maximum number of diagonal edges\n// Find shortest edit script: path with minimum number of non-diagonal edges\n// Input callback function compares items at indexes in the sequences.\n// Output callback function receives the number of adjacent items\n// and starting indexes of each common subsequence.\n// Either original functions or wrapped to swap indexes if graph is transposed.\n// Indexes in sequence a of last point of forward or reverse paths in graph.\n// Myers algorithm indexes by diagonal k which for negative is bad deopt in V8.\n// This package indexes by iF and iR which are greater than or equal to zero.\n// and also updates the index arrays in place to cut memory in half.\n// kF = 2 * iF - d\n// kR = d - 2 * iR\n// Division of index intervals in sequences a and b at the middle change.\n// Invariant: intervals do not have common items at the start or end.\nconst pkg = 'diff-sequences'; // for error messages\n\nconst NOT_YET_SET = 0; // small int instead of undefined to avoid deopt in V8\n// Return the number of common items that follow in forward direction.\n// The length of what Myers paper calls a “snake” in a forward path.\n\nconst countCommonItemsF = (aIndex, aEnd, bIndex, bEnd, isCommon) => {\n let nCommon = 0;\n\n while (aIndex < aEnd && bIndex < bEnd && isCommon(aIndex, bIndex)) {\n aIndex += 1;\n bIndex += 1;\n nCommon += 1;\n }\n\n return nCommon;\n}; // Return the number of common items that precede in reverse direction.\n// The length of what Myers paper calls a “snake” in a reverse path.\n\nconst countCommonItemsR = (aStart, aIndex, bStart, bIndex, isCommon) => {\n let nCommon = 0;\n\n while (aStart <= aIndex && bStart <= bIndex && isCommon(aIndex, bIndex)) {\n aIndex -= 1;\n bIndex -= 1;\n nCommon += 1;\n }\n\n return nCommon;\n}; // A simple function to extend forward paths from (d - 1) to d changes\n// when forward and reverse paths cannot yet overlap.\n\nconst extendPathsF = (d, aEnd, bEnd, bF, isCommon, aIndexesF, iMaxF) => {\n // Unroll the first iteration.\n let iF = 0;\n let kF = -d; // kF = 2 * iF - d\n\n let aFirst = aIndexesF[iF]; // in first iteration always insert\n\n let aIndexPrev1 = aFirst; // prev value of [iF - 1] in next iteration\n\n aIndexesF[iF] += countCommonItemsF(\n aFirst + 1,\n aEnd,\n bF + aFirst - kF + 1,\n bEnd,\n isCommon\n ); // Optimization: skip diagonals in which paths cannot ever overlap.\n\n const nF = d < iMaxF ? d : iMaxF; // The diagonals kF are odd when d is odd and even when d is even.\n\n for (iF += 1, kF += 2; iF <= nF; iF += 1, kF += 2) {\n // To get first point of path segment, move one change in forward direction\n // from last point of previous path segment in an adjacent diagonal.\n // In last possible iteration when iF === d and kF === d always delete.\n if (iF !== d && aIndexPrev1 < aIndexesF[iF]) {\n aFirst = aIndexesF[iF]; // vertical to insert from b\n } else {\n aFirst = aIndexPrev1 + 1; // horizontal to delete from a\n\n if (aEnd <= aFirst) {\n // Optimization: delete moved past right of graph.\n return iF - 1;\n }\n } // To get last point of path segment, move along diagonal of common items.\n\n aIndexPrev1 = aIndexesF[iF];\n aIndexesF[iF] =\n aFirst +\n countCommonItemsF(aFirst + 1, aEnd, bF + aFirst - kF + 1, bEnd, isCommon);\n }\n\n return iMaxF;\n}; // A simple function to extend reverse paths from (d - 1) to d changes\n// when reverse and forward paths cannot yet overlap.\n\nconst extendPathsR = (d, aStart, bStart, bR, isCommon, aIndexesR, iMaxR) => {\n // Unroll the first iteration.\n let iR = 0;\n let kR = d; // kR = d - 2 * iR\n\n let aFirst = aIndexesR[iR]; // in first iteration always insert\n\n let aIndexPrev1 = aFirst; // prev value of [iR - 1] in next iteration\n\n aIndexesR[iR] -= countCommonItemsR(\n aStart,\n aFirst - 1,\n bStart,\n bR + aFirst - kR - 1,\n isCommon\n ); // Optimization: skip diagonals in which paths cannot ever overlap.\n\n const nR = d < iMaxR ? d : iMaxR; // The diagonals kR are odd when d is odd and even when d is even.\n\n for (iR += 1, kR -= 2; iR <= nR; iR += 1, kR -= 2) {\n // To get first point of path segment, move one change in reverse direction\n // from last point of previous path segment in an adjacent diagonal.\n // In last possible iteration when iR === d and kR === -d always delete.\n if (iR !== d && aIndexesR[iR] < aIndexPrev1) {\n aFirst = aIndexesR[iR]; // vertical to insert from b\n } else {\n aFirst = aIndexPrev1 - 1; // horizontal to delete from a\n\n if (aFirst < aStart) {\n // Optimization: delete moved past left of graph.\n return iR - 1;\n }\n } // To get last point of path segment, move along diagonal of common items.\n\n aIndexPrev1 = aIndexesR[iR];\n aIndexesR[iR] =\n aFirst -\n countCommonItemsR(\n aStart,\n aFirst - 1,\n bStart,\n bR + aFirst - kR - 1,\n isCommon\n );\n }\n\n return iMaxR;\n}; // A complete function to extend forward paths from (d - 1) to d changes.\n// Return true if a path overlaps reverse path of (d - 1) changes in its diagonal.\n\nconst extendOverlappablePathsF = (\n d,\n aStart,\n aEnd,\n bStart,\n bEnd,\n isCommon,\n aIndexesF,\n iMaxF,\n aIndexesR,\n iMaxR,\n division\n) => {\n const bF = bStart - aStart; // bIndex = bF + aIndex - kF\n\n const aLength = aEnd - aStart;\n const bLength = bEnd - bStart;\n const baDeltaLength = bLength - aLength; // kF = kR - baDeltaLength\n // Range of diagonals in which forward and reverse paths might overlap.\n\n const kMinOverlapF = -baDeltaLength - (d - 1); // -(d - 1) <= kR\n\n const kMaxOverlapF = -baDeltaLength + (d - 1); // kR <= (d - 1)\n\n let aIndexPrev1 = NOT_YET_SET; // prev value of [iF - 1] in next iteration\n // Optimization: skip diagonals in which paths cannot ever overlap.\n\n const nF = d < iMaxF ? d : iMaxF; // The diagonals kF = 2 * iF - d are odd when d is odd and even when d is even.\n\n for (let iF = 0, kF = -d; iF <= nF; iF += 1, kF += 2) {\n // To get first point of path segment, move one change in forward direction\n // from last point of previous path segment in an adjacent diagonal.\n // In first iteration when iF === 0 and kF === -d always insert.\n // In last possible iteration when iF === d and kF === d always delete.\n const insert = iF === 0 || (iF !== d && aIndexPrev1 < aIndexesF[iF]);\n const aLastPrev = insert ? aIndexesF[iF] : aIndexPrev1;\n const aFirst = insert\n ? aLastPrev // vertical to insert from b\n : aLastPrev + 1; // horizontal to delete from a\n // To get last point of path segment, move along diagonal of common items.\n\n const bFirst = bF + aFirst - kF;\n const nCommonF = countCommonItemsF(\n aFirst + 1,\n aEnd,\n bFirst + 1,\n bEnd,\n isCommon\n );\n const aLast = aFirst + nCommonF;\n aIndexPrev1 = aIndexesF[iF];\n aIndexesF[iF] = aLast;\n\n if (kMinOverlapF <= kF && kF <= kMaxOverlapF) {\n // Solve for iR of reverse path with (d - 1) changes in diagonal kF:\n // kR = kF + baDeltaLength\n // kR = (d - 1) - 2 * iR\n const iR = (d - 1 - (kF + baDeltaLength)) / 2; // If this forward path overlaps the reverse path in this diagonal,\n // then this is the middle change of the index intervals.\n\n if (iR <= iMaxR && aIndexesR[iR] - 1 <= aLast) {\n // Unlike the Myers algorithm which finds only the middle “snake”\n // this package can find two common subsequences per division.\n // Last point of previous path segment is on an adjacent diagonal.\n const bLastPrev = bF + aLastPrev - (insert ? kF + 1 : kF - 1); // Because of invariant that intervals preceding the middle change\n // cannot have common items at the end,\n // move in reverse direction along a diagonal of common items.\n\n const nCommonR = countCommonItemsR(\n aStart,\n aLastPrev,\n bStart,\n bLastPrev,\n isCommon\n );\n const aIndexPrevFirst = aLastPrev - nCommonR;\n const bIndexPrevFirst = bLastPrev - nCommonR;\n const aEndPreceding = aIndexPrevFirst + 1;\n const bEndPreceding = bIndexPrevFirst + 1;\n division.nChangePreceding = d - 1;\n\n if (d - 1 === aEndPreceding + bEndPreceding - aStart - bStart) {\n // Optimization: number of preceding changes in forward direction\n // is equal to number of items in preceding interval,\n // therefore it cannot contain any common items.\n division.aEndPreceding = aStart;\n division.bEndPreceding = bStart;\n } else {\n division.aEndPreceding = aEndPreceding;\n division.bEndPreceding = bEndPreceding;\n }\n\n division.nCommonPreceding = nCommonR;\n\n if (nCommonR !== 0) {\n division.aCommonPreceding = aEndPreceding;\n division.bCommonPreceding = bEndPreceding;\n }\n\n division.nCommonFollowing = nCommonF;\n\n if (nCommonF !== 0) {\n division.aCommonFollowing = aFirst + 1;\n division.bCommonFollowing = bFirst + 1;\n }\n\n const aStartFollowing = aLast + 1;\n const bStartFollowing = bFirst + nCommonF + 1;\n division.nChangeFollowing = d - 1;\n\n if (d - 1 === aEnd + bEnd - aStartFollowing - bStartFollowing) {\n // Optimization: number of changes in reverse direction\n // is equal to number of items in following interval,\n // therefore it cannot contain any common items.\n division.aStartFollowing = aEnd;\n division.bStartFollowing = bEnd;\n } else {\n division.aStartFollowing = aStartFollowing;\n division.bStartFollowing = bStartFollowing;\n }\n\n return true;\n }\n }\n }\n\n return false;\n}; // A complete function to extend reverse paths from (d - 1) to d changes.\n// Return true if a path overlaps forward path of d changes in its diagonal.\n\nconst extendOverlappablePathsR = (\n d,\n aStart,\n aEnd,\n bStart,\n bEnd,\n isCommon,\n aIndexesF,\n iMaxF,\n aIndexesR,\n iMaxR,\n division\n) => {\n const bR = bEnd - aEnd; // bIndex = bR + aIndex - kR\n\n const aLength = aEnd - aStart;\n const bLength = bEnd - bStart;\n const baDeltaLength = bLength - aLength; // kR = kF + baDeltaLength\n // Range of diagonals in which forward and reverse paths might overlap.\n\n const kMinOverlapR = baDeltaLength - d; // -d <= kF\n\n const kMaxOverlapR = baDeltaLength + d; // kF <= d\n\n let aIndexPrev1 = NOT_YET_SET; // prev value of [iR - 1] in next iteration\n // Optimization: skip diagonals in which paths cannot ever overlap.\n\n const nR = d < iMaxR ? d : iMaxR; // The diagonals kR = d - 2 * iR are odd when d is odd and even when d is even.\n\n for (let iR = 0, kR = d; iR <= nR; iR += 1, kR -= 2) {\n // To get first point of path segment, move one change in reverse direction\n // from last point of previous path segment in an adjacent diagonal.\n // In first iteration when iR === 0 and kR === d always insert.\n // In last possible iteration when iR === d and kR === -d always delete.\n const insert = iR === 0 || (iR !== d && aIndexesR[iR] < aIndexPrev1);\n const aLastPrev = insert ? aIndexesR[iR] : aIndexPrev1;\n const aFirst = insert\n ? aLastPrev // vertical to insert from b\n : aLastPrev - 1; // horizontal to delete from a\n // To get last point of path segment, move along diagonal of common items.\n\n const bFirst = bR + aFirst - kR;\n const nCommonR = countCommonItemsR(\n aStart,\n aFirst - 1,\n bStart,\n bFirst - 1,\n isCommon\n );\n const aLast = aFirst - nCommonR;\n aIndexPrev1 = aIndexesR[iR];\n aIndexesR[iR] = aLast;\n\n if (kMinOverlapR <= kR && kR <= kMaxOverlapR) {\n // Solve for iF of forward path with d changes in diagonal kR:\n // kF = kR - baDeltaLength\n // kF = 2 * iF - d\n const iF = (d + (kR - baDeltaLength)) / 2; // If this reverse path overlaps the forward path in this diagonal,\n // then this is a middle change of the index intervals.\n\n if (iF <= iMaxF && aLast - 1 <= aIndexesF[iF]) {\n const bLast = bFirst - nCommonR;\n division.nChangePreceding = d;\n\n if (d === aLast + bLast - aStart - bStart) {\n // Optimization: number of changes in reverse direction\n // is equal to number of items in preceding interval,\n // therefore it cannot contain any common items.\n division.aEndPreceding = aStart;\n division.bEndPreceding = bStart;\n } else {\n division.aEndPreceding = aLast;\n division.bEndPreceding = bLast;\n }\n\n division.nCommonPreceding = nCommonR;\n\n if (nCommonR !== 0) {\n // The last point of reverse path segment is start of common subsequence.\n division.aCommonPreceding = aLast;\n division.bCommonPreceding = bLast;\n }\n\n division.nChangeFollowing = d - 1;\n\n if (d === 1) {\n // There is no previous path segment.\n division.nCommonFollowing = 0;\n division.aStartFollowing = aEnd;\n division.bStartFollowing = bEnd;\n } else {\n // Unlike the Myers algorithm which finds only the middle “snake”\n // this package can find two common subsequences per division.\n // Last point of previous path segment is on an adjacent diagonal.\n const bLastPrev = bR + aLastPrev - (insert ? kR - 1 : kR + 1); // Because of invariant that intervals following the middle change\n // cannot have common items at the start,\n // move in forward direction along a diagonal of common items.\n\n const nCommonF = countCommonItemsF(\n aLastPrev,\n aEnd,\n bLastPrev,\n bEnd,\n isCommon\n );\n division.nCommonFollowing = nCommonF;\n\n if (nCommonF !== 0) {\n // The last point of reverse path segment is start of common subsequence.\n division.aCommonFollowing = aLastPrev;\n division.bCommonFollowing = bLastPrev;\n }\n\n const aStartFollowing = aLastPrev + nCommonF; // aFirstPrev\n\n const bStartFollowing = bLastPrev + nCommonF; // bFirstPrev\n\n if (d - 1 === aEnd + bEnd - aStartFollowing - bStartFollowing) {\n // Optimization: number of changes in forward direction\n // is equal to number of items in following interval,\n // therefore it cannot contain any common items.\n division.aStartFollowing = aEnd;\n division.bStartFollowing = bEnd;\n } else {\n division.aStartFollowing = aStartFollowing;\n division.bStartFollowing = bStartFollowing;\n }\n }\n\n return true;\n }\n }\n }\n\n return false;\n}; // Given index intervals and input function to compare items at indexes,\n// divide at the middle change.\n//\n// DO NOT CALL if start === end, because interval cannot contain common items\n// and because this function will throw the “no overlap” error.\n\nconst divide = (\n nChange,\n aStart,\n aEnd,\n bStart,\n bEnd,\n isCommon,\n aIndexesF,\n aIndexesR,\n division // output\n) => {\n const bF = bStart - aStart; // bIndex = bF + aIndex - kF\n\n const bR = bEnd - aEnd; // bIndex = bR + aIndex - kR\n\n const aLength = aEnd - aStart;\n const bLength = bEnd - bStart; // Because graph has square or portrait orientation,\n // length difference is minimum number of items to insert from b.\n // Corresponding forward and reverse diagonals in graph\n // depend on length difference of the sequences:\n // kF = kR - baDeltaLength\n // kR = kF + baDeltaLength\n\n const baDeltaLength = bLength - aLength; // Optimization: max diagonal in graph intersects corner of shorter side.\n\n let iMaxF = aLength;\n let iMaxR = aLength; // Initialize no changes yet in forward or reverse direction:\n\n aIndexesF[0] = aStart - 1; // at open start of interval, outside closed start\n\n aIndexesR[0] = aEnd; // at open end of interval\n\n if (baDeltaLength % 2 === 0) {\n // The number of changes in paths is 2 * d if length difference is even.\n const dMin = (nChange || baDeltaLength) / 2;\n const dMax = (aLength + bLength) / 2;\n\n for (let d = 1; d <= dMax; d += 1) {\n iMaxF = extendPathsF(d, aEnd, bEnd, bF, isCommon, aIndexesF, iMaxF);\n\n if (d < dMin) {\n iMaxR = extendPathsR(d, aStart, bStart, bR, isCommon, aIndexesR, iMaxR);\n } else if (\n // If a reverse path overlaps a forward path in the same diagonal,\n // return a division of the index intervals at the middle change.\n extendOverlappablePathsR(\n d,\n aStart,\n aEnd,\n bStart,\n bEnd,\n isCommon,\n aIndexesF,\n iMaxF,\n aIndexesR,\n iMaxR,\n division\n )\n ) {\n return;\n }\n }\n } else {\n // The number of changes in paths is 2 * d - 1 if length difference is odd.\n const dMin = ((nChange || baDeltaLength) + 1) / 2;\n const dMax = (aLength + bLength + 1) / 2; // Unroll first half iteration so loop extends the relevant pairs of paths.\n // Because of invariant that intervals have no common items at start or end,\n // and limitation not to call divide with empty intervals,\n // therefore it cannot be called if a forward path with one change\n // would overlap a reverse path with no changes, even if dMin === 1.\n\n let d = 1;\n iMaxF = extendPathsF(d, aEnd, bEnd, bF, isCommon, aIndexesF, iMaxF);\n\n for (d += 1; d <= dMax; d += 1) {\n iMaxR = extendPathsR(\n d - 1,\n aStart,\n bStart,\n bR,\n isCommon,\n aIndexesR,\n iMaxR\n );\n\n if (d < dMin) {\n iMaxF = extendPathsF(d, aEnd, bEnd, bF, isCommon, aIndexesF, iMaxF);\n } else if (\n // If a forward path overlaps a reverse path in the same diagonal,\n // return a division of the index intervals at the middle change.\n extendOverlappablePathsF(\n d,\n aStart,\n aEnd,\n bStart,\n bEnd,\n isCommon,\n aIndexesF,\n iMaxF,\n aIndexesR,\n iMaxR,\n division\n )\n ) {\n return;\n }\n }\n }\n /* istanbul ignore next */\n\n throw new Error(\n `${pkg}: no overlap aStart=${aStart} aEnd=${aEnd} bStart=${bStart} bEnd=${bEnd}`\n );\n}; // Given index intervals and input function to compare items at indexes,\n// return by output function the number of adjacent items and starting indexes\n// of each common subsequence. Divide and conquer with only linear space.\n//\n// The index intervals are half open [start, end) like array slice method.\n// DO NOT CALL if start === end, because interval cannot contain common items\n// and because divide function will throw the “no overlap” error.\n\nconst findSubsequences = (\n nChange,\n aStart,\n aEnd,\n bStart,\n bEnd,\n transposed,\n callbacks,\n aIndexesF,\n aIndexesR,\n division // temporary memory, not input nor output\n) => {\n if (bEnd - bStart < aEnd - aStart) {\n // Transpose graph so it has portrait instead of landscape orientation.\n // Always compare shorter to longer sequence for consistency and optimization.\n transposed = !transposed;\n\n if (transposed && callbacks.length === 1) {\n // Lazily wrap callback functions to swap args if graph is transposed.\n const {foundSubsequence, isCommon} = callbacks[0];\n callbacks[1] = {\n foundSubsequence: (nCommon, bCommon, aCommon) => {\n foundSubsequence(nCommon, aCommon, bCommon);\n },\n isCommon: (bIndex, aIndex) => isCommon(aIndex, bIndex)\n };\n }\n\n const tStart = aStart;\n const tEnd = aEnd;\n aStart = bStart;\n aEnd = bEnd;\n bStart = tStart;\n bEnd = tEnd;\n }\n\n const {foundSubsequence, isCommon} = callbacks[transposed ? 1 : 0]; // Divide the index intervals at the middle change.\n\n divide(\n nChange,\n aStart,\n aEnd,\n bStart,\n bEnd,\n isCommon,\n aIndexesF,\n aIndexesR,\n division\n );\n const {\n nChangePreceding,\n aEndPreceding,\n bEndPreceding,\n nCommonPreceding,\n aCommonPreceding,\n bCommonPreceding,\n nCommonFollowing,\n aCommonFollowing,\n bCommonFollowing,\n nChangeFollowing,\n aStartFollowing,\n bStartFollowing\n } = division; // Unless either index interval is empty, they might contain common items.\n\n if (aStart < aEndPreceding && bStart < bEndPreceding) {\n // Recursely find and return common subsequences preceding the division.\n findSubsequences(\n nChangePreceding,\n aStart,\n aEndPreceding,\n bStart,\n bEndPreceding,\n transposed,\n callbacks,\n aIndexesF,\n aIndexesR,\n division\n );\n } // Return common subsequences that are adjacent to the middle change.\n\n if (nCommonPreceding !== 0) {\n foundSubsequence(nCommonPreceding, aCommonPreceding, bCommonPreceding);\n }\n\n if (nCommonFollowing !== 0) {\n foundSubsequence(nCommonFollowing, aCommonFollowing, bCommonFollowing);\n } // Unless either index interval is empty, they might contain common items.\n\n if (aStartFollowing < aEnd && bStartFollowing < bEnd) {\n // Recursely find and return common subsequences following the division.\n findSubsequences(\n nChangeFollowing,\n aStartFollowing,\n aEnd,\n bStartFollowing,\n bEnd,\n transposed,\n callbacks,\n aIndexesF,\n aIndexesR,\n division\n );\n }\n};\n\nconst validateLength = (name, arg) => {\n const type = typeof arg;\n\n if (type !== 'number') {\n throw new TypeError(`${pkg}: ${name} typeof ${type} is not a number`);\n }\n\n if (!Number.isSafeInteger(arg)) {\n throw new RangeError(`${pkg}: ${name} value ${arg} is not a safe integer`);\n }\n\n if (arg < 0) {\n throw new RangeError(`${pkg}: ${name} value ${arg} is a negative integer`);\n }\n};\n\nconst validateCallback = (name, arg) => {\n const type = typeof arg;\n\n if (type !== 'function') {\n throw new TypeError(`${pkg}: ${name} typeof ${type} is not a function`);\n }\n}; // Compare items in two sequences to find a longest common subsequence.\n// Given lengths of sequences and input function to compare items at indexes,\n// return by output function the number of adjacent items and starting indexes\n// of each common subsequence.\n\nvar _default = (aLength, bLength, isCommon, foundSubsequence) => {\n validateLength('aLength', aLength);\n validateLength('bLength', bLength);\n validateCallback('isCommon', isCommon);\n validateCallback('foundSubsequence', foundSubsequence); // Count common items from the start in the forward direction.\n\n const nCommonF = countCommonItemsF(0, aLength, 0, bLength, isCommon);\n\n if (nCommonF !== 0) {\n foundSubsequence(nCommonF, 0, 0);\n } // Unless both sequences consist of common items only,\n // find common items in the half-trimmed index intervals.\n\n if (aLength !== nCommonF || bLength !== nCommonF) {\n // Invariant: intervals do not have common items at the start.\n // The start of an index interval is closed like array slice method.\n const aStart = nCommonF;\n const bStart = nCommonF; // Count common items from the end in the reverse direction.\n\n const nCommonR = countCommonItemsR(\n aStart,\n aLength - 1,\n bStart,\n bLength - 1,\n isCommon\n ); // Invariant: intervals do not have common items at the end.\n // The end of an index interval is open like array slice method.\n\n const aEnd = aLength - nCommonR;\n const bEnd = bLength - nCommonR; // Unless one sequence consists of common items only,\n // therefore the other trimmed index interval consists of changes only,\n // find common items in the trimmed index intervals.\n\n const nCommonFR = nCommonF + nCommonR;\n\n if (aLength !== nCommonFR && bLength !== nCommonFR) {\n const nChange = 0; // number of change items is not yet known\n\n const transposed = false; // call the original unwrapped functions\n\n const callbacks = [\n {\n foundSubsequence,\n isCommon\n }\n ]; // Indexes in sequence a of last points in furthest reaching paths\n // from outside the start at top left in the forward direction:\n\n const aIndexesF = [NOT_YET_SET]; // from the end at bottom right in the reverse direction:\n\n const aIndexesR = [NOT_YET_SET]; // Initialize one object as output of all calls to divide function.\n\n const division = {\n aCommonFollowing: NOT_YET_SET,\n aCommonPreceding: NOT_YET_SET,\n aEndPreceding: NOT_YET_SET,\n aStartFollowing: NOT_YET_SET,\n bCommonFollowing: NOT_YET_SET,\n bCommonPreceding: NOT_YET_SET,\n bEndPreceding: NOT_YET_SET,\n bStartFollowing: NOT_YET_SET,\n nChangeFollowing: NOT_YET_SET,\n nChangePreceding: NOT_YET_SET,\n nCommonFollowing: NOT_YET_SET,\n nCommonPreceding: NOT_YET_SET\n }; // Find and return common subsequences in the trimmed index intervals.\n\n findSubsequences(\n nChange,\n aStart,\n aEnd,\n bStart,\n bEnd,\n transposed,\n callbacks,\n aIndexesF,\n aIndexesR,\n division\n );\n }\n\n if (nCommonR !== 0) {\n foundSubsequence(nCommonR, aEnd, bEnd);\n }\n }\n};\n\nexports.default = _default;\n","'use strict';\n\nvar _ansiStyles = _interopRequireDefault(require('ansi-styles'));\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {default: obj};\n}\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nconst returnInput = str => str;\n\nconst allColorsAsFunc = Object.keys(_ansiStyles.default)\n .map(style => ({\n [style]: returnInput\n }))\n .reduce((acc, cur) => Object.assign(acc, cur));\nObject.keys(allColorsAsFunc)\n .map(color => allColorsAsFunc[color])\n .forEach(style => {\n Object.assign(style, allColorsAsFunc);\n Object.assign(returnInput, style);\n });\nmodule.exports = allColorsAsFunc;\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport {equals, fnNameFor, hasProperty, isA, isUndefined} from './jasmineUtils';\n\nimport {emptyObject} from './utils';\n\nexport class AsymmetricMatcher<T> {\n protected sample: T;\n $$typeof: symbol;\n inverse?: boolean;\n\n constructor(sample: T) {\n this.$$typeof = Symbol.for('jest.asymmetricMatcher');\n this.sample = sample;\n }\n}\n\nclass Any extends AsymmetricMatcher<any> {\n constructor(sample: unknown) {\n if (typeof sample === 'undefined') {\n throw new TypeError(\n 'any() expects to be passed a constructor function. ' +\n 'Please pass one or use anything() to match any object.',\n );\n }\n super(sample);\n }\n\n asymmetricMatch(other: unknown) {\n if (this.sample == String) {\n return typeof other == 'string' || other instanceof String;\n }\n\n if (this.sample == Number) {\n return typeof other == 'number' || other instanceof Number;\n }\n\n if (this.sample == Function) {\n return typeof other == 'function' || other instanceof Function;\n }\n\n if (this.sample == Object) {\n return typeof other == 'object';\n }\n\n if (this.sample == Boolean) {\n return typeof other == 'boolean';\n }\n\n return other instanceof this.sample;\n }\n\n toString() {\n return 'Any';\n }\n\n getExpectedType() {\n if (this.sample == String) {\n return 'string';\n }\n\n if (this.sample == Number) {\n return 'number';\n }\n\n if (this.sample == Function) {\n return 'function';\n }\n\n if (this.sample == Object) {\n return 'object';\n }\n\n if (this.sample == Boolean) {\n return 'boolean';\n }\n\n return fnNameFor(this.sample);\n }\n\n toAsymmetricMatcher() {\n return 'Any<' + fnNameFor(this.sample) + '>';\n }\n}\n\nclass Anything extends AsymmetricMatcher<void> {\n asymmetricMatch(other: unknown) {\n return !isUndefined(other) && other !== null;\n }\n\n toString() {\n return 'Anything';\n }\n\n // No getExpectedType method, because it matches either null or undefined.\n\n toAsymmetricMatcher() {\n return 'Anything';\n }\n}\n\nclass ArrayContaining extends AsymmetricMatcher<Array<unknown>> {\n constructor(sample: Array<unknown>, inverse: boolean = false) {\n super(sample);\n this.inverse = inverse;\n }\n\n asymmetricMatch(other: Array<unknown>) {\n if (!Array.isArray(this.sample)) {\n throw new Error(\n `You must provide an array to ${this.toString()}, not '` +\n typeof this.sample +\n \"'.\",\n );\n }\n\n const result =\n this.sample.length === 0 ||\n (Array.isArray(other) &&\n this.sample.every(item =>\n other.some(another => equals(item, another)),\n ));\n\n return this.inverse ? !result : result;\n }\n\n toString() {\n return `Array${this.inverse ? 'Not' : ''}Containing`;\n }\n\n getExpectedType() {\n return 'array';\n }\n}\n\nclass ObjectContaining extends AsymmetricMatcher<Record<string, any>> {\n constructor(sample: Record<string, any>, inverse: boolean = false) {\n super(sample);\n this.inverse = inverse;\n }\n\n asymmetricMatch(other: any) {\n if (typeof this.sample !== 'object') {\n throw new Error(\n `You must provide an object to ${this.toString()}, not '` +\n typeof this.sample +\n \"'.\",\n );\n }\n\n if (this.inverse) {\n for (const property in this.sample) {\n if (\n hasProperty(other, property) &&\n equals(this.sample[property], other[property]) &&\n !emptyObject(this.sample[property]) &&\n !emptyObject(other[property])\n ) {\n return false;\n }\n }\n\n return true;\n } else {\n for (const property in this.sample) {\n if (\n !hasProperty(other, property) ||\n !equals(this.sample[property], other[property])\n ) {\n return false;\n }\n }\n\n return true;\n }\n }\n\n toString() {\n return `Object${this.inverse ? 'Not' : ''}Containing`;\n }\n\n getExpectedType() {\n return 'object';\n }\n}\n\nclass StringContaining extends AsymmetricMatcher<string> {\n constructor(sample: string, inverse: boolean = false) {\n if (!isA('String', sample)) {\n throw new Error('Expected is not a string');\n }\n super(sample);\n this.inverse = inverse;\n }\n\n asymmetricMatch(other: string) {\n const result = isA('String', other) && other.includes(this.sample);\n\n return this.inverse ? !result : result;\n }\n\n toString() {\n return `String${this.inverse ? 'Not' : ''}Containing`;\n }\n\n getExpectedType() {\n return 'string';\n }\n}\n\nclass StringMatching extends AsymmetricMatcher<RegExp> {\n constructor(sample: string | RegExp, inverse: boolean = false) {\n if (!isA('String', sample) && !isA('RegExp', sample)) {\n throw new Error('Expected is not a String or a RegExp');\n }\n super(new RegExp(sample));\n\n this.inverse = inverse;\n }\n\n asymmetricMatch(other: string) {\n const result = isA('String', other) && this.sample.test(other);\n\n return this.inverse ? !result : result;\n }\n\n toString() {\n return `String${this.inverse ? 'Not' : ''}Matching`;\n }\n\n getExpectedType() {\n return 'string';\n }\n}\n\nexport const any = (expectedObject: any) => new Any(expectedObject);\nexport const anything = () => new Anything();\nexport const arrayContaining = (sample: Array<unknown>) =>\n new ArrayContaining(sample);\nexport const arrayNotContaining = (sample: Array<unknown>) =>\n new ArrayContaining(sample, true);\nexport const objectContaining = (sample: Record<string, any>) =>\n new ObjectContaining(sample);\nexport const objectNotContaining = (sample: Record<string, any>) =>\n new ObjectContaining(sample, true);\nexport const stringContaining = (expected: string) =>\n new StringContaining(expected);\nexport const stringNotContaining = (expected: string) =>\n new StringContaining(expected, true);\nexport const stringMatching = (expected: string | RegExp) =>\n new StringMatching(expected);\nexport const stringNotMatching = (expected: string | RegExp) =>\n new StringMatching(expected, true);\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport {\n EXPECTED_COLOR,\n RECEIVED_COLOR,\n matcherHint,\n pluralize,\n} from 'jest-matcher-utils';\n\nimport {getState, setState} from './jestMatchersObject';\n\nconst resetAssertionsLocalState = () => {\n setState({\n assertionCalls: 0,\n expectedAssertionsNumber: null,\n isExpectingAssertions: false,\n });\n};\n\n// Create and format all errors related to the mismatched number of `expect`\n// calls and reset the matcher's state.\nconst extractExpectedAssertionsErrors = () => {\n const result = [];\n const {\n assertionCalls,\n expectedAssertionsNumber,\n expectedAssertionsNumberError,\n isExpectingAssertions,\n isExpectingAssertionsError,\n } = getState();\n\n resetAssertionsLocalState();\n\n if (\n typeof expectedAssertionsNumber === 'number' &&\n assertionCalls !== expectedAssertionsNumber\n ) {\n const numOfAssertionsExpected = EXPECTED_COLOR(\n pluralize('assertion', expectedAssertionsNumber),\n );\n\n expectedAssertionsNumberError.message =\n matcherHint('.assertions', '', String(expectedAssertionsNumber), {\n isDirectExpectCall: true,\n }) +\n '\\n\\n' +\n `Expected ${numOfAssertionsExpected} to be called but received ` +\n RECEIVED_COLOR(pluralize('assertion call', assertionCalls || 0)) +\n '.';\n\n result.push({\n actual: assertionCalls,\n error: expectedAssertionsNumberError,\n expected: expectedAssertionsNumber,\n });\n }\n if (isExpectingAssertions && assertionCalls === 0) {\n const expected = EXPECTED_COLOR('at least one assertion');\n const received = RECEIVED_COLOR('received none');\n\n isExpectingAssertionsError.message =\n matcherHint('.hasAssertions', '', '', {\n isDirectExpectCall: true,\n }) +\n '\\n\\n' +\n `Expected ${expected} to be called but ${received}.`;\n\n result.push({\n actual: 'none',\n error: isExpectingAssertionsError,\n expected: 'at least one',\n });\n }\n\n return result;\n};\n\nexport default extractExpectedAssertionsErrors;\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport * as matcherUtils from 'jest-matcher-utils';\nimport {\n AsyncExpectationResult,\n Expect,\n ExpectationResult,\n MatcherState as JestMatcherState,\n Matchers as MatcherInterface,\n MatchersObject,\n PromiseMatcherFn,\n RawMatcherFn,\n SyncExpectationResult,\n ThrowingMatcherFn,\n} from './types';\n\nimport {iterableEquality, subsetEquality} from './utils';\nimport matchers from './matchers';\nimport spyMatchers from './spyMatchers';\nimport toThrowMatchers, {\n createMatcher as createThrowMatcher,\n} from './toThrowMatchers';\nimport {equals} from './jasmineUtils';\nimport {\n any,\n anything,\n arrayContaining,\n arrayNotContaining,\n objectContaining,\n objectNotContaining,\n stringContaining,\n stringMatching,\n stringNotContaining,\n stringNotMatching,\n} from './asymmetricMatchers';\nimport {\n INTERNAL_MATCHER_FLAG,\n getMatchers,\n getState,\n setMatchers,\n setState,\n} from './jestMatchersObject';\nimport extractExpectedAssertionsErrors from './extractExpectedAssertionsErrors';\n\nclass JestAssertionError extends Error {\n matcherResult?: SyncExpectationResult;\n}\n\nconst isPromise = <T extends any>(obj: any): obj is PromiseLike<T> =>\n !!obj &&\n (typeof obj === 'object' || typeof obj === 'function') &&\n typeof obj.then === 'function';\n\nconst createToThrowErrorMatchingSnapshotMatcher = function(\n matcher: RawMatcherFn,\n) {\n return function(\n this: JestMatcherState,\n received: any,\n testNameOrInlineSnapshot?: string,\n ) {\n return matcher.apply(this, [received, testNameOrInlineSnapshot, true]);\n };\n};\n\nconst getPromiseMatcher = (name: string, matcher: any) => {\n if (name === 'toThrow' || name === 'toThrowError') {\n return createThrowMatcher(name, true);\n } else if (\n name === 'toThrowErrorMatchingSnapshot' ||\n name === 'toThrowErrorMatchingInlineSnapshot'\n ) {\n return createToThrowErrorMatchingSnapshotMatcher(matcher);\n }\n\n return null;\n};\n\nconst expect: any = (actual: any, ...rest: Array<any>) => {\n if (rest.length !== 0) {\n throw new Error('Expect takes at most one argument.');\n }\n\n const allMatchers = getMatchers();\n const expectation: any = {\n not: {},\n rejects: {not: {}},\n resolves: {not: {}},\n };\n\n const err = new JestAssertionError();\n\n Object.keys(allMatchers).forEach(name => {\n const matcher = allMatchers[name];\n const promiseMatcher = getPromiseMatcher(name, matcher) || matcher;\n expectation[name] = makeThrowingMatcher(matcher, false, '', actual);\n expectation.not[name] = makeThrowingMatcher(matcher, true, '', actual);\n\n expectation.resolves[name] = makeResolveMatcher(\n name,\n promiseMatcher,\n false,\n actual,\n err,\n );\n expectation.resolves.not[name] = makeResolveMatcher(\n name,\n promiseMatcher,\n true,\n actual,\n err,\n );\n\n expectation.rejects[name] = makeRejectMatcher(\n name,\n promiseMatcher,\n false,\n actual,\n err,\n );\n expectation.rejects.not[name] = makeRejectMatcher(\n name,\n promiseMatcher,\n true,\n actual,\n err,\n );\n });\n\n return expectation;\n};\n\nconst getMessage = (message?: () => string) =>\n (message && message()) ||\n matcherUtils.RECEIVED_COLOR('No message was specified for this matcher.');\n\nconst makeResolveMatcher = (\n matcherName: string,\n matcher: RawMatcherFn,\n isNot: boolean,\n actual: Promise<any>,\n outerErr: JestAssertionError,\n): PromiseMatcherFn => (...args) => {\n const options = {\n isNot,\n promise: 'resolves',\n };\n\n if (!isPromise(actual)) {\n throw new JestAssertionError(\n matcherUtils.matcherErrorMessage(\n matcherUtils.matcherHint(matcherName, undefined, '', options),\n `${matcherUtils.RECEIVED_COLOR('received')} value must be a promise`,\n matcherUtils.printWithType(\n 'Received',\n actual,\n matcherUtils.printReceived,\n ),\n ),\n );\n }\n\n const innerErr = new JestAssertionError();\n\n return actual.then(\n result =>\n makeThrowingMatcher(matcher, isNot, 'resolves', result, innerErr).apply(\n null,\n args,\n ),\n reason => {\n outerErr.message =\n matcherUtils.matcherHint(matcherName, undefined, '', options) +\n '\\n\\n' +\n `Received promise rejected instead of resolved\\n` +\n `Rejected to value: ${matcherUtils.printReceived(reason)}`;\n return Promise.reject(outerErr);\n },\n );\n};\n\nconst makeRejectMatcher = (\n matcherName: string,\n matcher: RawMatcherFn,\n isNot: boolean,\n actual: Promise<any>,\n outerErr: JestAssertionError,\n): PromiseMatcherFn => (...args) => {\n const options = {\n isNot,\n promise: 'rejects',\n };\n\n if (!isPromise(actual)) {\n throw new JestAssertionError(\n matcherUtils.matcherErrorMessage(\n matcherUtils.matcherHint(matcherName, undefined, '', options),\n `${matcherUtils.RECEIVED_COLOR('received')} value must be a promise`,\n matcherUtils.printWithType(\n 'Received',\n actual,\n matcherUtils.printReceived,\n ),\n ),\n );\n }\n\n const innerErr = new JestAssertionError();\n\n return actual.then(\n result => {\n outerErr.message =\n matcherUtils.matcherHint(matcherName, undefined, '', options) +\n '\\n\\n' +\n `Received promise resolved instead of rejected\\n` +\n `Resolved to value: ${matcherUtils.printReceived(result)}`;\n return Promise.reject(outerErr);\n },\n reason =>\n makeThrowingMatcher(matcher, isNot, 'rejects', reason, innerErr).apply(\n null,\n args,\n ),\n );\n};\n\nconst makeThrowingMatcher = (\n matcher: RawMatcherFn,\n isNot: boolean,\n promise: string,\n actual: any,\n err?: JestAssertionError,\n): ThrowingMatcherFn =>\n function throwingMatcher(...args): any {\n let throws = true;\n const utils = {...matcherUtils, iterableEquality, subsetEquality};\n\n const matcherContext: JestMatcherState = {\n // When throws is disabled, the matcher will not throw errors during test\n // execution but instead add them to the global matcher state. If a\n // matcher throws, test execution is normally stopped immediately. The\n // snapshot matcher uses it because we want to log all snapshot\n // failures in a test.\n dontThrow: () => (throws = false),\n ...getState(),\n equals,\n error: err,\n isNot,\n promise,\n utils,\n };\n\n const processResult = (\n result: SyncExpectationResult,\n asyncError?: JestAssertionError,\n ) => {\n _validateResult(result);\n\n getState().assertionCalls++;\n\n if ((result.pass && isNot) || (!result.pass && !isNot)) {\n // XOR\n const message = getMessage(result.message);\n let error;\n\n if (err) {\n error = err;\n error.message = message;\n } else if (asyncError) {\n error = asyncError;\n error.message = message;\n } else {\n error = new JestAssertionError(message);\n\n // Try to remove this function from the stack trace frame.\n // Guard for some environments (browsers) that do not support this feature.\n if (Error.captureStackTrace) {\n Error.captureStackTrace(error, throwingMatcher);\n }\n }\n // Passing the result of the matcher with the error so that a custom\n // reporter could access the actual and expected objects of the result\n // for example in order to display a custom visual diff\n error.matcherResult = result;\n\n if (throws) {\n throw error;\n } else {\n getState().suppressedErrors.push(error);\n }\n }\n };\n\n const handleError = (error: Error) => {\n if (\n matcher[INTERNAL_MATCHER_FLAG] === true &&\n !(error instanceof JestAssertionError) &&\n error.name !== 'PrettyFormatPluginError' &&\n // Guard for some environments (browsers) that do not support this feature.\n Error.captureStackTrace\n ) {\n // Try to remove this and deeper functions from the stack trace frame.\n Error.captureStackTrace(error, throwingMatcher);\n }\n throw error;\n };\n\n let potentialResult: ExpectationResult;\n\n try {\n potentialResult =\n matcher[INTERNAL_MATCHER_FLAG] === true\n ? matcher.call(matcherContext, actual, ...args)\n : // It's a trap specifically for inline snapshot to capture this name\n // in the stack trace, so that it can correctly get the custom matcher\n // function call.\n (function __EXTERNAL_MATCHER_TRAP__() {\n return matcher.call(matcherContext, actual, ...args);\n })();\n\n if (isPromise(potentialResult)) {\n const asyncResult = potentialResult as AsyncExpectationResult;\n const asyncError = new JestAssertionError();\n if (Error.captureStackTrace) {\n Error.captureStackTrace(asyncError, throwingMatcher);\n }\n\n return asyncResult\n .then(aResult => processResult(aResult, asyncError))\n .catch(error => handleError(error));\n } else {\n const syncResult = potentialResult as SyncExpectationResult;\n\n return processResult(syncResult);\n }\n } catch (error) {\n return handleError(error);\n }\n };\n\nexpect.extend = (matchers: MatchersObject): void =>\n setMatchers(matchers, false, expect);\n\nexpect.anything = anything;\nexpect.any = any;\n\nexpect.not = {\n arrayContaining: arrayNotContaining,\n objectContaining: objectNotContaining,\n stringContaining: stringNotContaining,\n stringMatching: stringNotMatching,\n};\n\nexpect.objectContaining = objectContaining;\nexpect.arrayContaining = arrayContaining;\nexpect.stringContaining = stringContaining;\nexpect.stringMatching = stringMatching;\n\nconst _validateResult = (result: any) => {\n if (\n typeof result !== 'object' ||\n typeof result.pass !== 'boolean' ||\n (result.message &&\n typeof result.message !== 'string' &&\n typeof result.message !== 'function')\n ) {\n throw new Error(\n 'Unexpected return from a matcher function.\\n' +\n 'Matcher functions should ' +\n 'return an object in the following format:\\n' +\n ' {message?: string | function, pass: boolean}\\n' +\n `'${matcherUtils.stringify(result)}' was returned`,\n );\n }\n};\n\nfunction assertions(expected: number) {\n const error = new Error();\n if (Error.captureStackTrace) {\n Error.captureStackTrace(error, assertions);\n }\n\n getState().expectedAssertionsNumber = expected;\n getState().expectedAssertionsNumberError = error;\n}\nfunction hasAssertions(...args: Array<any>) {\n const error = new Error();\n if (Error.captureStackTrace) {\n Error.captureStackTrace(error, hasAssertions);\n }\n\n matcherUtils.ensureNoExpected(args[0], '.hasAssertions');\n getState().isExpectingAssertions = true;\n getState().isExpectingAssertionsError = error;\n}\n\n// add default jest matchers\nsetMatchers(matchers, true, expect as Expect);\nsetMatchers(spyMatchers, true, expect as Expect);\nsetMatchers(toThrowMatchers, true, expect as Expect);\n\nexpect.addSnapshotSerializer = () => void 0;\nexpect.assertions = assertions;\nexpect.hasAssertions = hasAssertions;\nexpect.getState = getState;\nexpect.setState = setState;\nexpect.extractExpectedAssertionsErrors = extractExpectedAssertionsErrors;\n\nconst expectExport = expect as Expect;\n\n// eslint-disable-next-line no-redeclare\nnamespace expectExport {\n export type MatcherState = JestMatcherState;\n export interface Matchers<R> extends MatcherInterface<R> {}\n}\n\nexport = expectExport;\n","/*\nCopyright (c) 2008-2016 Pivotal Labs\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n*/\n\n/* eslint-disable */\n\nimport {Tester} from './types';\n\n// Extracted out of jasmine 2.5.2\nexport function equals(\n a: unknown,\n b: unknown,\n customTesters?: Array<Tester>,\n strictCheck?: boolean,\n): boolean {\n customTesters = customTesters || [];\n return eq(a, b, [], [], customTesters, strictCheck ? hasKey : hasDefinedKey);\n}\n\nconst functionToString = Function.prototype.toString;\n\nfunction isAsymmetric(obj: any) {\n return !!obj && isA('Function', obj.asymmetricMatch);\n}\n\nfunction asymmetricMatch(a: any, b: any) {\n var asymmetricA = isAsymmetric(a),\n asymmetricB = isAsymmetric(b);\n\n if (asymmetricA && asymmetricB) {\n return undefined;\n }\n\n if (asymmetricA) {\n return a.asymmetricMatch(b);\n }\n\n if (asymmetricB) {\n return b.asymmetricMatch(a);\n }\n}\n\n// Equality function lovingly adapted from isEqual in\n// [Underscore](http://underscorejs.org)\nfunction eq(\n a: any,\n b: any,\n aStack: Array<unknown>,\n bStack: Array<unknown>,\n customTesters: Array<Tester>,\n hasKey: any,\n): boolean {\n var result = true;\n\n var asymmetricResult = asymmetricMatch(a, b);\n if (asymmetricResult !== undefined) {\n return asymmetricResult;\n }\n\n for (var i = 0; i < customTesters.length; i++) {\n var customTesterResult = customTesters[i](a, b);\n if (customTesterResult !== undefined) {\n return customTesterResult;\n }\n }\n\n if (a instanceof Error && b instanceof Error) {\n return a.message == b.message;\n }\n\n if (Object.is(a, b)) {\n return true;\n }\n // A strict comparison is necessary because `null == undefined`.\n if (a === null || b === null) {\n return a === b;\n }\n var className = Object.prototype.toString.call(a);\n if (className != Object.prototype.toString.call(b)) {\n return false;\n }\n switch (className) {\n case '[object Boolean]':\n case '[object String]':\n case '[object Number]':\n if (typeof a !== typeof b) {\n // One is a primitive, one a `new Primitive()`\n return false;\n } else if (typeof a !== 'object' && typeof b !== 'object') {\n // both are proper primitives\n return Object.is(a, b);\n } else {\n // both are `new Primitive()`s\n return Object.is(a.valueOf(), b.valueOf());\n }\n case '[object Date]':\n // Coerce dates to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a == +b;\n // RegExps are compared by their source patterns and flags.\n case '[object RegExp]':\n return a.source === b.source && a.flags === b.flags;\n }\n if (typeof a !== 'object' || typeof b !== 'object') {\n return false;\n }\n\n // Use DOM3 method isEqualNode (IE>=9)\n if (isDomNode(a) && isDomNode(b)) {\n return a.isEqualNode(b);\n }\n\n // Used to detect circular references.\n var length = aStack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n // circular references at same depth are equal\n // circular reference is not equal to non-circular one\n if (aStack[length] === a) {\n return bStack[length] === b;\n } else if (bStack[length] === b) {\n return false;\n }\n }\n // Add the first object to the stack of traversed objects.\n aStack.push(a);\n bStack.push(b);\n var size = 0;\n // Recursively compare objects and arrays.\n // Compare array lengths to determine if a deep comparison is necessary.\n if (className == '[object Array]') {\n size = a.length;\n if (size !== b.length) {\n return false;\n }\n\n while (size--) {\n result = eq(a[size], b[size], aStack, bStack, customTesters, hasKey);\n if (!result) {\n return false;\n }\n }\n }\n\n // Deep compare objects.\n var aKeys = keys(a, className == '[object Array]', hasKey),\n key;\n size = aKeys.length;\n\n // Ensure that both objects contain the same number of properties before comparing deep equality.\n if (keys(b, className == '[object Array]', hasKey).length !== size) {\n return false;\n }\n\n while (size--) {\n key = aKeys[size];\n\n // Deep compare each member\n result =\n hasKey(b, key) &&\n eq(a[key], b[key], aStack, bStack, customTesters, hasKey);\n\n if (!result) {\n return false;\n }\n }\n // Remove the first object from the stack of traversed objects.\n aStack.pop();\n bStack.pop();\n\n return result;\n}\n\nfunction keys(\n obj: object,\n isArray: boolean,\n hasKey: (obj: object, key: string) => boolean,\n) {\n var allKeys = (function(o) {\n var keys = [];\n for (var key in o) {\n if (hasKey(o, key)) {\n keys.push(key);\n }\n }\n return keys.concat(\n (Object.getOwnPropertySymbols(o) as Array<any>).filter(\n symbol =>\n (Object.getOwnPropertyDescriptor(o, symbol) as PropertyDescriptor)\n .enumerable,\n ),\n );\n })(obj);\n\n if (!isArray) {\n return allKeys;\n }\n\n var extraKeys = [];\n if (allKeys.length === 0) {\n return allKeys;\n }\n\n for (var x = 0; x < allKeys.length; x++) {\n if (typeof allKeys[x] === 'symbol' || !allKeys[x].match(/^[0-9]+$/)) {\n extraKeys.push(allKeys[x]);\n }\n }\n\n return extraKeys;\n}\n\nfunction hasDefinedKey(obj: any, key: string) {\n return hasKey(obj, key) && obj[key] !== undefined;\n}\n\nfunction hasKey(obj: any, key: string) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexport function isA(typeName: string, value: unknown) {\n return Object.prototype.toString.apply(value) === '[object ' + typeName + ']';\n}\n\nfunction isDomNode(obj: any): boolean {\n return (\n obj !== null &&\n typeof obj === 'object' &&\n typeof obj.nodeType === 'number' &&\n typeof obj.nodeName === 'string' &&\n typeof obj.isEqualNode === 'function'\n );\n}\n\nexport function fnNameFor(func: Function) {\n if (func.name) {\n return func.name;\n }\n\n const matches = functionToString\n .call(func)\n .match(/^(?:async)?\\s*function\\s*\\*?\\s*([\\w$]+)\\s*\\(/);\n return matches ? matches[1] : '<anonymous>';\n}\n\nexport function isUndefined(obj: any) {\n return obj === void 0;\n}\n\nfunction getPrototype(obj: object) {\n if (Object.getPrototypeOf) {\n return Object.getPrototypeOf(obj);\n }\n\n if (obj.constructor.prototype == obj) {\n return null;\n }\n\n return obj.constructor.prototype;\n}\n\nexport function hasProperty(obj: object | null, property: string): boolean {\n if (!obj) {\n return false;\n }\n\n if (Object.prototype.hasOwnProperty.call(obj, property)) {\n return true;\n }\n\n return hasProperty(getPrototype(obj), property);\n}\n\n// SENTINEL constants are from https://github.com/facebook/immutable-js\nconst IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';\nconst IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@';\nconst IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';\n\nexport function isImmutableUnorderedKeyed(maybeKeyed: any) {\n return !!(\n maybeKeyed &&\n maybeKeyed[IS_KEYED_SENTINEL] &&\n !maybeKeyed[IS_ORDERED_SENTINEL]\n );\n}\n\nexport function isImmutableUnorderedSet(maybeSet: any) {\n return !!(\n maybeSet &&\n maybeSet[IS_SET_SENTINEL] &&\n !maybeSet[IS_ORDERED_SENTINEL]\n );\n}\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport {AsymmetricMatcher} from './asymmetricMatchers';\nimport {Expect, MatchersObject, SyncExpectationResult} from './types';\n\n// Global matchers object holds the list of available matchers and\n// the state, that can hold matcher specific values that change over time.\nconst JEST_MATCHERS_OBJECT = Symbol.for('$$jest-matchers-object');\n\n// Notes a built-in/internal Jest matcher.\n// Jest may override the stack trace of Errors thrown by internal matchers.\nexport const INTERNAL_MATCHER_FLAG = Symbol.for('$$jest-internal-matcher');\n\nif (!global.hasOwnProperty(JEST_MATCHERS_OBJECT)) {\n Object.defineProperty(global, JEST_MATCHERS_OBJECT, {\n value: {\n matchers: Object.create(null),\n state: {\n assertionCalls: 0,\n expectedAssertionsNumber: null,\n isExpectingAssertions: false,\n suppressedErrors: [], // errors that are not thrown immediately.\n },\n },\n });\n}\n\nexport const getState = () => (global as any)[JEST_MATCHERS_OBJECT].state;\n\nexport const setState = (state: object) => {\n Object.assign((global as any)[JEST_MATCHERS_OBJECT].state, state);\n};\n\nexport const getMatchers = () => (global as any)[JEST_MATCHERS_OBJECT].matchers;\n\nexport const setMatchers = (\n matchers: MatchersObject,\n isInternal: boolean,\n expect: Expect,\n) => {\n Object.keys(matchers).forEach(key => {\n const matcher = matchers[key];\n Object.defineProperty(matcher, INTERNAL_MATCHER_FLAG, {\n value: isInternal,\n });\n\n if (!isInternal) {\n // expect is defined\n\n class CustomMatcher extends AsymmetricMatcher<[unknown, unknown]> {\n constructor(inverse: boolean = false, ...sample: [unknown, unknown]) {\n super(sample);\n this.inverse = inverse;\n }\n\n asymmetricMatch(other: unknown) {\n const {pass} = matcher(\n other,\n ...this.sample,\n ) as SyncExpectationResult;\n\n return this.inverse ? !pass : pass;\n }\n\n toString() {\n return `${this.inverse ? 'not.' : ''}${key}`;\n }\n\n getExpectedType() {\n return 'any';\n }\n\n toAsymmetricMatcher() {\n return `${this.toString()}<${this.sample.join(', ')}>`;\n }\n }\n\n expect[key] = (...sample: [unknown, unknown]) =>\n new CustomMatcher(false, ...sample);\n if (!expect.not) {\n expect.not = {};\n }\n expect.not[key] = (...sample: [unknown, unknown]) =>\n new CustomMatcher(true, ...sample);\n }\n });\n\n Object.assign((global as any)[JEST_MATCHERS_OBJECT].matchers, matchers);\n};\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport getType = require('jest-get-type');\nimport {\n DIM_COLOR,\n EXPECTED_COLOR,\n MatcherHintOptions,\n RECEIVED_COLOR,\n SUGGEST_TO_CONTAIN_EQUAL,\n ensureExpectedIsNonNegativeInteger,\n ensureNoExpected,\n ensureNumbers,\n getLabelPrinter,\n matcherErrorMessage,\n matcherHint,\n printDiffOrStringify,\n printExpected,\n printReceived,\n printWithType,\n stringify,\n} from 'jest-matcher-utils';\nimport {MatcherState, MatchersObject} from './types';\nimport {\n printCloseTo,\n printExpectedConstructorName,\n printExpectedConstructorNameNot,\n printReceivedArrayContainExpectedItem,\n printReceivedConstructorName,\n printReceivedConstructorNameNot,\n printReceivedStringContainExpectedResult,\n printReceivedStringContainExpectedSubstring,\n} from './print';\nimport {\n getObjectSubset,\n getPath,\n iterableEquality,\n sparseArrayEquality,\n subsetEquality,\n typeEquality,\n} from './utils';\nimport {equals} from './jasmineUtils';\n\n// Omit colon and one or more spaces, so can call getLabelPrinter.\nconst EXPECTED_LABEL = 'Expected';\nconst RECEIVED_LABEL = 'Received';\nconst EXPECTED_VALUE_LABEL = 'Expected value';\nconst RECEIVED_VALUE_LABEL = 'Received value';\n\n// The optional property of matcher context is true if undefined.\nconst isExpand = (expand?: boolean): boolean => expand !== false;\n\nconst toStrictEqualTesters = [\n iterableEquality,\n typeEquality,\n sparseArrayEquality,\n];\n\ntype ContainIterable =\n | Array<unknown>\n | Set<unknown>\n | NodeListOf<any>\n | DOMTokenList\n | HTMLCollectionOf<any>;\n\nconst matchers: MatchersObject = {\n toBe(this: MatcherState, received: unknown, expected: unknown) {\n const matcherName = 'toBe';\n const options: MatcherHintOptions = {\n comment: 'Object.is equality',\n isNot: this.isNot,\n promise: this.promise,\n };\n\n const pass = Object.is(received, expected);\n\n const message = pass\n ? () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n `Expected: not ${printExpected(expected)}`\n : () => {\n const expectedType = getType(expected);\n\n let deepEqualityName = null;\n if (expectedType !== 'map' && expectedType !== 'set') {\n // If deep equality passes when referential identity fails,\n // but exclude map and set until review of their equality logic.\n if (equals(received, expected, toStrictEqualTesters, true)) {\n deepEqualityName = 'toStrictEqual';\n } else if (equals(received, expected, [iterableEquality])) {\n deepEqualityName = 'toEqual';\n }\n }\n\n return (\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n (deepEqualityName !== null\n ? DIM_COLOR(\n `If it should pass with deep equality, replace \"${matcherName}\" with \"${deepEqualityName}\"`,\n ) + '\\n\\n'\n : '') +\n printDiffOrStringify(\n expected,\n received,\n EXPECTED_LABEL,\n RECEIVED_LABEL,\n isExpand(this.expand),\n )\n );\n };\n\n // Passing the actual and expected objects so that a custom reporter\n // could access them, for example in order to display a custom visual diff,\n // or create a different error message\n return {actual: received, expected, message, name: matcherName, pass};\n },\n\n toBeCloseTo(\n this: MatcherState,\n received: number,\n expected: number,\n precision: number = 2,\n ) {\n const matcherName = 'toBeCloseTo';\n const secondArgument = arguments.length === 3 ? 'precision' : undefined;\n const isNot = this.isNot;\n const options: MatcherHintOptions = {\n isNot,\n promise: this.promise,\n secondArgument,\n secondArgumentColor: (arg: string) => arg,\n };\n\n if (typeof expected !== 'number') {\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherName, undefined, undefined, options),\n `${EXPECTED_COLOR('expected')} value must be a number`,\n printWithType('Expected', expected, printExpected),\n ),\n );\n }\n\n if (typeof received !== 'number') {\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherName, undefined, undefined, options),\n `${RECEIVED_COLOR('received')} value must be a number`,\n printWithType('Received', received, printReceived),\n ),\n );\n }\n\n let pass = false;\n let expectedDiff = 0;\n let receivedDiff = 0;\n\n if (received === Infinity && expected === Infinity) {\n pass = true; // Infinity - Infinity is NaN\n } else if (received === -Infinity && expected === -Infinity) {\n pass = true; // -Infinity - -Infinity is NaN\n } else {\n expectedDiff = Math.pow(10, -precision) / 2;\n receivedDiff = Math.abs(expected - received);\n pass = receivedDiff < expectedDiff;\n }\n\n const message = pass\n ? () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n `Expected: not ${printExpected(expected)}\\n` +\n (receivedDiff === 0\n ? ''\n : `Received: ${printReceived(received)}\\n` +\n '\\n' +\n printCloseTo(receivedDiff, expectedDiff, precision, isNot))\n : () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n `Expected: ${printExpected(expected)}\\n` +\n `Received: ${printReceived(received)}\\n` +\n '\\n' +\n printCloseTo(receivedDiff, expectedDiff, precision, isNot);\n\n return {message, pass};\n },\n\n toBeDefined(this: MatcherState, received: unknown, expected: void) {\n const matcherName = 'toBeDefined';\n const options: MatcherHintOptions = {\n isNot: this.isNot,\n promise: this.promise,\n };\n ensureNoExpected(expected, matcherName, options);\n\n const pass = received !== void 0;\n\n const message = () =>\n matcherHint(matcherName, undefined, '', options) +\n '\\n\\n' +\n `Received: ${printReceived(received)}`;\n\n return {message, pass};\n },\n\n toBeFalsy(this: MatcherState, received: unknown, expected: void) {\n const matcherName = 'toBeFalsy';\n const options: MatcherHintOptions = {\n isNot: this.isNot,\n promise: this.promise,\n };\n ensureNoExpected(expected, matcherName, options);\n\n const pass = !received;\n\n const message = () =>\n matcherHint(matcherName, undefined, '', options) +\n '\\n\\n' +\n `Received: ${printReceived(received)}`;\n\n return {message, pass};\n },\n\n toBeGreaterThan(\n this: MatcherState,\n received: number | bigint,\n expected: number | bigint,\n ) {\n const matcherName = 'toBeGreaterThan';\n const isNot = this.isNot;\n const options: MatcherHintOptions = {\n isNot,\n promise: this.promise,\n };\n ensureNumbers(received, expected, matcherName, options);\n\n const pass = received > expected;\n\n const message = () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n `Expected:${isNot ? ' not' : ''} > ${printExpected(expected)}\\n` +\n `Received:${isNot ? ' ' : ''} ${printReceived(received)}`;\n\n return {message, pass};\n },\n\n toBeGreaterThanOrEqual(\n this: MatcherState,\n received: number | bigint,\n expected: number | bigint,\n ) {\n const matcherName = 'toBeGreaterThanOrEqual';\n const isNot = this.isNot;\n const options: MatcherHintOptions = {\n isNot,\n promise: this.promise,\n };\n ensureNumbers(received, expected, matcherName, options);\n\n const pass = received >= expected;\n\n const message = () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n `Expected:${isNot ? ' not' : ''} >= ${printExpected(expected)}\\n` +\n `Received:${isNot ? ' ' : ''} ${printReceived(received)}`;\n\n return {message, pass};\n },\n\n toBeInstanceOf(this: MatcherState, received: any, expected: Function) {\n const matcherName = 'toBeInstanceOf';\n const options: MatcherHintOptions = {\n isNot: this.isNot,\n promise: this.promise,\n };\n\n if (typeof expected !== 'function') {\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherName, undefined, undefined, options),\n `${EXPECTED_COLOR('expected')} value must be a function`,\n printWithType('Expected', expected, printExpected),\n ),\n );\n }\n\n const pass = received instanceof expected;\n\n const message = pass\n ? () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n printExpectedConstructorNameNot('Expected constructor', expected) +\n (typeof received.constructor === 'function' &&\n received.constructor !== expected\n ? printReceivedConstructorNameNot(\n 'Received constructor',\n received.constructor,\n expected,\n )\n : '')\n : () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n printExpectedConstructorName('Expected constructor', expected) +\n (getType.isPrimitive(received) ||\n Object.getPrototypeOf(received) === null\n ? `\\nReceived value has no prototype\\nReceived value: ${printReceived(\n received,\n )}`\n : typeof received.constructor !== 'function'\n ? `\\nReceived value: ${printReceived(received)}`\n : printReceivedConstructorName(\n 'Received constructor',\n received.constructor,\n ));\n\n return {message, pass};\n },\n\n toBeLessThan(\n this: MatcherState,\n received: number | bigint,\n expected: number | bigint,\n ) {\n const matcherName = 'toBeLessThan';\n const isNot = this.isNot;\n const options: MatcherHintOptions = {\n isNot,\n promise: this.promise,\n };\n ensureNumbers(received, expected, matcherName, options);\n\n const pass = received < expected;\n\n const message = () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n `Expected:${isNot ? ' not' : ''} < ${printExpected(expected)}\\n` +\n `Received:${isNot ? ' ' : ''} ${printReceived(received)}`;\n\n return {message, pass};\n },\n\n toBeLessThanOrEqual(\n this: MatcherState,\n received: number | bigint,\n expected: number | bigint,\n ) {\n const matcherName = 'toBeLessThanOrEqual';\n const isNot = this.isNot;\n const options: MatcherHintOptions = {\n isNot,\n promise: this.promise,\n };\n ensureNumbers(received, expected, matcherName, options);\n\n const pass = received <= expected;\n\n const message = () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n `Expected:${isNot ? ' not' : ''} <= ${printExpected(expected)}\\n` +\n `Received:${isNot ? ' ' : ''} ${printReceived(received)}`;\n\n return {message, pass};\n },\n\n toBeNaN(this: MatcherState, received: any, expected: void) {\n const matcherName = 'toBeNaN';\n const options: MatcherHintOptions = {\n isNot: this.isNot,\n promise: this.promise,\n };\n ensureNoExpected(expected, matcherName, options);\n\n const pass = Number.isNaN(received);\n\n const message = () =>\n matcherHint(matcherName, undefined, '', options) +\n '\\n\\n' +\n `Received: ${printReceived(received)}`;\n\n return {message, pass};\n },\n\n toBeNull(this: MatcherState, received: unknown, expected: void) {\n const matcherName = 'toBeNull';\n const options: MatcherHintOptions = {\n isNot: this.isNot,\n promise: this.promise,\n };\n ensureNoExpected(expected, matcherName, options);\n\n const pass = received === null;\n\n const message = () =>\n matcherHint(matcherName, undefined, '', options) +\n '\\n\\n' +\n `Received: ${printReceived(received)}`;\n\n return {message, pass};\n },\n\n toBeTruthy(this: MatcherState, received: unknown, expected: void) {\n const matcherName = 'toBeTruthy';\n const options: MatcherHintOptions = {\n isNot: this.isNot,\n promise: this.promise,\n };\n ensureNoExpected(expected, matcherName, options);\n\n const pass = !!received;\n\n const message = () =>\n matcherHint(matcherName, undefined, '', options) +\n '\\n\\n' +\n `Received: ${printReceived(received)}`;\n\n return {message, pass};\n },\n\n toBeUndefined(this: MatcherState, received: unknown, expected: void) {\n const matcherName = 'toBeUndefined';\n const options: MatcherHintOptions = {\n isNot: this.isNot,\n promise: this.promise,\n };\n ensureNoExpected(expected, matcherName, options);\n\n const pass = received === void 0;\n\n const message = () =>\n matcherHint(matcherName, undefined, '', options) +\n '\\n\\n' +\n `Received: ${printReceived(received)}`;\n\n return {message, pass};\n },\n\n toContain(\n this: MatcherState,\n received: ContainIterable | string,\n expected: unknown,\n ) {\n const matcherName = 'toContain';\n const isNot = this.isNot;\n const options: MatcherHintOptions = {\n comment: 'indexOf',\n isNot,\n promise: this.promise,\n };\n\n if (received == null) {\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherName, undefined, undefined, options),\n `${RECEIVED_COLOR('received')} value must not be null nor undefined`,\n printWithType('Received', received, printReceived),\n ),\n );\n }\n\n if (typeof received === 'string') {\n const index = received.indexOf(String(expected));\n const pass = index !== -1;\n\n const message = () => {\n const labelExpected = `Expected ${\n typeof expected === 'string' ? 'substring' : 'value'\n }`;\n const labelReceived = 'Received string';\n const printLabel = getLabelPrinter(labelExpected, labelReceived);\n\n return (\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n `${printLabel(labelExpected)}${isNot ? 'not ' : ''}${printExpected(\n expected,\n )}\\n` +\n `${printLabel(labelReceived)}${isNot ? ' ' : ''}${\n isNot\n ? printReceivedStringContainExpectedSubstring(\n received,\n index,\n String(expected).length,\n )\n : printReceived(received)\n }`\n );\n };\n\n return {message, pass};\n }\n\n const indexable = Array.from(received);\n const index = indexable.indexOf(expected);\n const pass = index !== -1;\n\n const message = () => {\n const labelExpected = 'Expected value';\n const labelReceived = `Received ${getType(received)}`;\n const printLabel = getLabelPrinter(labelExpected, labelReceived);\n\n return (\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n `${printLabel(labelExpected)}${isNot ? 'not ' : ''}${printExpected(\n expected,\n )}\\n` +\n `${printLabel(labelReceived)}${isNot ? ' ' : ''}${\n isNot && Array.isArray(received)\n ? printReceivedArrayContainExpectedItem(received, index)\n : printReceived(received)\n }` +\n (!isNot &&\n indexable.findIndex(item =>\n equals(item, expected, [iterableEquality]),\n ) !== -1\n ? `\\n\\n${SUGGEST_TO_CONTAIN_EQUAL}`\n : '')\n );\n };\n\n return {message, pass};\n },\n\n toContainEqual(\n this: MatcherState,\n received: ContainIterable,\n expected: unknown,\n ) {\n const matcherName = 'toContainEqual';\n const isNot = this.isNot;\n const options: MatcherHintOptions = {\n comment: 'deep equality',\n isNot,\n promise: this.promise,\n };\n\n if (received == null) {\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherName, undefined, undefined, options),\n `${RECEIVED_COLOR('received')} value must not be null nor undefined`,\n printWithType('Received', received, printReceived),\n ),\n );\n }\n\n const index = Array.from(received).findIndex(item =>\n equals(item, expected, [iterableEquality]),\n );\n const pass = index !== -1;\n\n const message = () => {\n const labelExpected = 'Expected value';\n const labelReceived = `Received ${getType(received)}`;\n const printLabel = getLabelPrinter(labelExpected, labelReceived);\n\n return (\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n `${printLabel(labelExpected)}${isNot ? 'not ' : ''}${printExpected(\n expected,\n )}\\n` +\n `${printLabel(labelReceived)}${isNot ? ' ' : ''}${\n isNot && Array.isArray(received)\n ? printReceivedArrayContainExpectedItem(received, index)\n : printReceived(received)\n }`\n );\n };\n\n return {message, pass};\n },\n\n toEqual(this: MatcherState, received: unknown, expected: unknown) {\n const matcherName = 'toEqual';\n const options: MatcherHintOptions = {\n comment: 'deep equality',\n isNot: this.isNot,\n promise: this.promise,\n };\n\n const pass = equals(received, expected, [iterableEquality]);\n\n const message = pass\n ? () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n `Expected: not ${printExpected(expected)}\\n` +\n (stringify(expected) !== stringify(received)\n ? `Received: ${printReceived(received)}`\n : '')\n : () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n printDiffOrStringify(\n expected,\n received,\n EXPECTED_LABEL,\n RECEIVED_LABEL,\n isExpand(this.expand),\n );\n\n // Passing the actual and expected objects so that a custom reporter\n // could access them, for example in order to display a custom visual diff,\n // or create a different error message\n return {actual: received, expected, message, name: matcherName, pass};\n },\n\n toHaveLength(this: MatcherState, received: any, expected: number) {\n const matcherName = 'toHaveLength';\n const isNot = this.isNot;\n const options: MatcherHintOptions = {\n isNot,\n promise: this.promise,\n };\n\n if (\n typeof received !== 'string' &&\n (!received || typeof received.length !== 'number')\n ) {\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherName, undefined, undefined, options),\n `${RECEIVED_COLOR(\n 'received',\n )} value must have a length property whose value must be a number`,\n printWithType('Received', received, printReceived),\n ),\n );\n }\n\n ensureExpectedIsNonNegativeInteger(expected, matcherName, options);\n\n const pass = received.length === expected;\n\n const message = () => {\n const labelExpected = 'Expected length';\n const labelReceivedLength = 'Received length';\n const labelReceivedValue = `Received ${getType(received)}`;\n const printLabel = getLabelPrinter(\n labelExpected,\n labelReceivedLength,\n labelReceivedValue,\n );\n\n return (\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n `${printLabel(labelExpected)}${isNot ? 'not ' : ''}${printExpected(\n expected,\n )}\\n` +\n (isNot\n ? ''\n : `${printLabel(labelReceivedLength)}${printReceived(\n received.length,\n )}\\n`) +\n `${printLabel(labelReceivedValue)}${isNot ? ' ' : ''}${printReceived(\n received,\n )}`\n );\n };\n\n return {message, pass};\n },\n\n toHaveProperty(\n this: MatcherState,\n received: object,\n expectedPath: string | Array<string>,\n expectedValue?: unknown,\n ) {\n const matcherName = 'toHaveProperty';\n const expectedArgument = 'path';\n const hasValue = arguments.length === 3;\n const options: MatcherHintOptions = {\n isNot: this.isNot,\n promise: this.promise,\n secondArgument: hasValue ? 'value' : '',\n };\n\n if (received === null || received === undefined) {\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherName, undefined, expectedArgument, options),\n `${RECEIVED_COLOR('received')} value must not be null nor undefined`,\n printWithType('Received', received, printReceived),\n ),\n );\n }\n\n const expectedPathType = getType(expectedPath);\n\n if (expectedPathType !== 'string' && expectedPathType !== 'array') {\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherName, undefined, expectedArgument, options),\n `${EXPECTED_COLOR('expected')} path must be a string or array`,\n printWithType('Expected', expectedPath, printExpected),\n ),\n );\n }\n\n const expectedPathLength =\n typeof expectedPath === 'string'\n ? expectedPath.split('.').length\n : expectedPath.length;\n\n if (expectedPathType === 'array' && expectedPathLength === 0) {\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherName, undefined, expectedArgument, options),\n `${EXPECTED_COLOR('expected')} path must not be an empty array`,\n printWithType('Expected', expectedPath, printExpected),\n ),\n );\n }\n\n const result = getPath(received, expectedPath);\n const {lastTraversedObject, hasEndProp} = result;\n const receivedPath = result.traversedPath;\n const hasCompletePath = receivedPath.length === expectedPathLength;\n const receivedValue = hasCompletePath ? result.value : lastTraversedObject;\n\n const pass = hasValue\n ? equals(result.value, expectedValue, [iterableEquality])\n : Boolean(hasEndProp); // theoretically undefined if empty path\n // Remove type cast if we rewrite getPath as iterative algorithm.\n\n // Delete this unique report if future breaking change\n // removes the edge case that expected value undefined\n // also matches absence of a property with the key path.\n if (pass && !hasCompletePath) {\n const message = () =>\n matcherHint(matcherName, undefined, expectedArgument, options) +\n '\\n\\n' +\n `Expected path: ${printExpected(expectedPath)}\\n` +\n `Received path: ${printReceived(\n expectedPathType === 'array' || receivedPath.length === 0\n ? receivedPath\n : receivedPath.join('.'),\n )}\\n\\n` +\n `Expected value: not ${printExpected(expectedValue)}\\n` +\n `Received value: ${printReceived(receivedValue)}\\n\\n` +\n DIM_COLOR(\n 'Because a positive assertion passes for expected value undefined if the property does not exist, this negative assertion fails unless the property does exist and has a defined value',\n );\n\n return {message, pass};\n }\n\n const message = pass\n ? () =>\n matcherHint(matcherName, undefined, expectedArgument, options) +\n '\\n\\n' +\n (hasValue\n ? `Expected path: ${printExpected(expectedPath)}\\n\\n` +\n `Expected value: not ${printExpected(expectedValue)}` +\n (stringify(expectedValue) !== stringify(receivedValue)\n ? `\\nReceived value: ${printReceived(receivedValue)}`\n : '')\n : `Expected path: not ${printExpected(expectedPath)}\\n\\n` +\n `Received value: ${printReceived(receivedValue)}`)\n : () =>\n matcherHint(matcherName, undefined, expectedArgument, options) +\n '\\n\\n' +\n `Expected path: ${printExpected(expectedPath)}\\n` +\n (hasCompletePath\n ? '\\n' +\n printDiffOrStringify(\n expectedValue,\n receivedValue,\n EXPECTED_VALUE_LABEL,\n RECEIVED_VALUE_LABEL,\n isExpand(this.expand),\n )\n : `Received path: ${printReceived(\n expectedPathType === 'array' || receivedPath.length === 0\n ? receivedPath\n : receivedPath.join('.'),\n )}\\n\\n` +\n (hasValue\n ? `Expected value: ${printExpected(expectedValue)}\\n`\n : '') +\n `Received value: ${printReceived(receivedValue)}`);\n\n return {message, pass};\n },\n\n toMatch(this: MatcherState, received: string, expected: string | RegExp) {\n const matcherName = 'toMatch';\n const options: MatcherHintOptions = {\n isNot: this.isNot,\n promise: this.promise,\n };\n\n if (typeof received !== 'string') {\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherName, undefined, undefined, options),\n `${RECEIVED_COLOR('received')} value must be a string`,\n printWithType('Received', received, printReceived),\n ),\n );\n }\n\n if (\n !(typeof expected === 'string') &&\n !(expected && typeof expected.test === 'function')\n ) {\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherName, undefined, undefined, options),\n `${EXPECTED_COLOR(\n 'expected',\n )} value must be a string or regular expression`,\n printWithType('Expected', expected, printExpected),\n ),\n );\n }\n\n const pass =\n typeof expected === 'string'\n ? received.includes(expected)\n : new RegExp(expected).test(received);\n\n const message = pass\n ? () =>\n typeof expected === 'string'\n ? matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n `Expected substring: not ${printExpected(expected)}\\n` +\n `Received string: ${printReceivedStringContainExpectedSubstring(\n received,\n received.indexOf(expected),\n expected.length,\n )}`\n : matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n `Expected pattern: not ${printExpected(expected)}\\n` +\n `Received string: ${printReceivedStringContainExpectedResult(\n received,\n typeof expected.exec === 'function'\n ? expected.exec(received)\n : null,\n )}`\n : () => {\n const labelExpected = `Expected ${\n typeof expected === 'string' ? 'substring' : 'pattern'\n }`;\n const labelReceived = 'Received string';\n const printLabel = getLabelPrinter(labelExpected, labelReceived);\n\n return (\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n `${printLabel(labelExpected)}${printExpected(expected)}\\n` +\n `${printLabel(labelReceived)}${printReceived(received)}`\n );\n };\n\n return {message, pass};\n },\n\n toMatchObject(this: MatcherState, received: object, expected: object) {\n const matcherName = 'toMatchObject';\n const options: MatcherHintOptions = {\n isNot: this.isNot,\n promise: this.promise,\n };\n\n if (typeof received !== 'object' || received === null) {\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherName, undefined, undefined, options),\n `${RECEIVED_COLOR('received')} value must be a non-null object`,\n printWithType('Received', received, printReceived),\n ),\n );\n }\n\n if (typeof expected !== 'object' || expected === null) {\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherName, undefined, undefined, options),\n `${EXPECTED_COLOR('expected')} value must be a non-null object`,\n printWithType('Expected', expected, printExpected),\n ),\n );\n }\n\n const pass = equals(received, expected, [iterableEquality, subsetEquality]);\n\n const message = pass\n ? () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n `Expected: not ${printExpected(expected)}` +\n (stringify(expected) !== stringify(received)\n ? `\\nReceived: ${printReceived(received)}`\n : '')\n : () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n printDiffOrStringify(\n expected,\n getObjectSubset(received, expected),\n EXPECTED_LABEL,\n RECEIVED_LABEL,\n isExpand(this.expand),\n );\n\n return {message, pass};\n },\n\n toStrictEqual(this: MatcherState, received: unknown, expected: unknown) {\n const matcherName = 'toStrictEqual';\n const options: MatcherHintOptions = {\n comment: 'deep equality',\n isNot: this.isNot,\n promise: this.promise,\n };\n\n const pass = equals(received, expected, toStrictEqualTesters, true);\n\n const message = pass\n ? () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n `Expected: not ${printExpected(expected)}\\n` +\n (stringify(expected) !== stringify(received)\n ? `Received: ${printReceived(received)}`\n : '')\n : () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n printDiffOrStringify(\n expected,\n received,\n EXPECTED_LABEL,\n RECEIVED_LABEL,\n isExpand(this.expand),\n );\n\n // Passing the actual and expected objects so that a custom reporter\n // could access them, for example in order to display a custom visual diff,\n // or create a different error message\n return {actual: received, expected, message, name: matcherName, pass};\n },\n};\n\nexport default matchers;\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport {\n EXPECTED_COLOR,\n INVERTED_COLOR,\n RECEIVED_COLOR,\n printReceived,\n stringify,\n} from 'jest-matcher-utils';\n\n// Format substring but do not enclose in double quote marks.\n// The replacement is compatible with pretty-format package.\nconst printSubstring = (val: string): string => val.replace(/\"|\\\\/g, '\\\\$&');\n\nexport const printReceivedStringContainExpectedSubstring = (\n received: string,\n start: number,\n length: number, // not end\n): string =>\n RECEIVED_COLOR(\n '\"' +\n printSubstring(received.slice(0, start)) +\n INVERTED_COLOR(printSubstring(received.slice(start, start + length))) +\n printSubstring(received.slice(start + length)) +\n '\"',\n );\n\nexport const printReceivedStringContainExpectedResult = (\n received: string,\n result: RegExpExecArray | null,\n): string =>\n result === null\n ? printReceived(received)\n : printReceivedStringContainExpectedSubstring(\n received,\n result.index,\n result[0].length,\n );\n\n// The serialized array is compatible with pretty-format package min option.\n// However, items have default stringify depth (instead of depth - 1)\n// so expected item looks consistent by itself and enclosed in the array.\nexport const printReceivedArrayContainExpectedItem = (\n received: Array<unknown>,\n index: number,\n): string =>\n RECEIVED_COLOR(\n '[' +\n received\n .map((item, i) => {\n const stringified = stringify(item);\n return i === index ? INVERTED_COLOR(stringified) : stringified;\n })\n .join(', ') +\n ']',\n );\n\nexport const printCloseTo = (\n receivedDiff: number,\n expectedDiff: number,\n precision: number,\n isNot: boolean,\n): string => {\n const receivedDiffString = stringify(receivedDiff);\n const expectedDiffString = receivedDiffString.includes('e')\n ? // toExponential arg is number of digits after the decimal point.\n expectedDiff.toExponential(0)\n : 0 <= precision && precision < 20\n ? // toFixed arg is number of digits after the decimal point.\n // It may be a value between 0 and 20 inclusive.\n // Implementations may optionally support a larger range of values.\n expectedDiff.toFixed(precision + 1)\n : stringify(expectedDiff);\n\n return (\n `Expected precision: ${isNot ? ' ' : ''} ${stringify(precision)}\\n` +\n `Expected difference: ${isNot ? 'not ' : ''}< ${EXPECTED_COLOR(\n expectedDiffString,\n )}\\n` +\n `Received difference: ${isNot ? ' ' : ''} ${RECEIVED_COLOR(\n receivedDiffString,\n )}`\n );\n};\n\nexport const printExpectedConstructorName = (\n label: string,\n expected: Function,\n) => printConstructorName(label, expected, false, true) + '\\n';\n\nexport const printExpectedConstructorNameNot = (\n label: string,\n expected: Function,\n) => printConstructorName(label, expected, true, true) + '\\n';\n\nexport const printReceivedConstructorName = (\n label: string,\n received: Function,\n) => printConstructorName(label, received, false, false) + '\\n';\n\n// Do not call function if received is equal to expected.\nexport const printReceivedConstructorNameNot = (\n label: string,\n received: Function,\n expected: Function,\n) =>\n typeof expected.name === 'string' &&\n expected.name.length !== 0 &&\n typeof received.name === 'string' &&\n received.name.length !== 0\n ? printConstructorName(label, received, true, false) +\n ` ${\n Object.getPrototypeOf(received) === expected\n ? 'extends'\n : 'extends … extends'\n } ${EXPECTED_COLOR(expected.name)}` +\n '\\n'\n : printConstructorName(label, received, false, false) + '\\n';\n\nconst printConstructorName = (\n label: string,\n constructor: Function,\n isNot: boolean,\n isExpected: boolean,\n): string =>\n typeof constructor.name !== 'string'\n ? `${label} name is not a string`\n : constructor.name.length === 0\n ? `${label} name is an empty string`\n : `${label}: ${!isNot ? '' : isExpected ? 'not ' : ' '}${\n isExpected\n ? EXPECTED_COLOR(constructor.name)\n : RECEIVED_COLOR(constructor.name)\n }`;\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport getType = require('jest-get-type');\nimport {\n DIM_COLOR,\n EXPECTED_COLOR,\n MatcherHintOptions,\n RECEIVED_COLOR,\n diff,\n ensureExpectedIsNonNegativeInteger,\n ensureNoExpected,\n matcherErrorMessage,\n matcherHint,\n printExpected,\n printReceived,\n printWithType,\n stringify,\n} from 'jest-matcher-utils';\nimport {MatcherState, MatchersObject, SyncExpectationResult} from './types';\nimport {equals} from './jasmineUtils';\nimport {iterableEquality} from './utils';\n\n// The optional property of matcher context is true if undefined.\nconst isExpand = (expand?: boolean): boolean => expand !== false;\n\nconst PRINT_LIMIT = 3;\n\nconst NO_ARGUMENTS = 'called with 0 arguments';\n\nconst printExpectedArgs = (expected: Array<unknown>): string =>\n expected.length === 0\n ? NO_ARGUMENTS\n : expected.map(arg => printExpected(arg)).join(', ');\n\nconst printReceivedArgs = (\n received: Array<unknown>,\n expected?: Array<unknown>,\n): string =>\n received.length === 0\n ? NO_ARGUMENTS\n : received\n .map((arg, i) =>\n Array.isArray(expected) &&\n i < expected.length &&\n isEqualValue(expected[i], arg)\n ? printCommon(arg)\n : printReceived(arg),\n )\n .join(', ');\n\nconst printCommon = (val: unknown) => DIM_COLOR(stringify(val));\n\nconst isEqualValue = (expected: unknown, received: unknown): boolean =>\n equals(expected, received, [iterableEquality]);\n\nconst isEqualCall = (\n expected: Array<unknown>,\n received: Array<unknown>,\n): boolean => isEqualValue(expected, received);\n\nconst isEqualReturn = (expected: unknown, result: any): boolean =>\n result.type === 'return' && isEqualValue(expected, result.value);\n\nconst countReturns = (results: Array<any>): number =>\n results.reduce(\n (n: number, result: any) => (result.type === 'return' ? n + 1 : n),\n 0,\n );\n\nconst printNumberOfReturns = (\n countReturns: number,\n countCalls: number,\n): string =>\n `\\nNumber of returns: ${printReceived(countReturns)}` +\n (countCalls !== countReturns\n ? `\\nNumber of calls: ${printReceived(countCalls)}`\n : '');\n\ntype PrintLabel = (string: string, isExpectedCall: boolean) => string;\n\n// Given a label, return a function which given a string,\n// right-aligns it preceding the colon in the label.\nconst getRightAlignedPrinter = (label: string): PrintLabel => {\n // Assume that the label contains a colon.\n const index = label.indexOf(':');\n const suffix = label.slice(index);\n\n return (string: string, isExpectedCall: boolean) =>\n (isExpectedCall\n ? '->' + ' '.repeat(Math.max(0, index - 2 - string.length))\n : ' '.repeat(Math.max(index - string.length))) +\n string +\n suffix;\n};\n\ntype IndexedCall = [number, Array<unknown>];\n\nconst printReceivedCallsNegative = (\n expected: Array<unknown>,\n indexedCalls: Array<IndexedCall>,\n isOnlyCall: boolean,\n iExpectedCall?: number,\n) => {\n if (indexedCalls.length === 0) {\n return '';\n }\n\n const label = 'Received: ';\n if (isOnlyCall) {\n return label + printReceivedArgs(indexedCalls[0], expected) + '\\n';\n }\n\n const printAligned = getRightAlignedPrinter(label);\n\n return (\n 'Received\\n' +\n indexedCalls.reduce(\n (printed: string, [i, args]: IndexedCall) =>\n printed +\n printAligned(String(i + 1), i === iExpectedCall) +\n printReceivedArgs(args, expected) +\n '\\n',\n '',\n )\n );\n};\n\nconst printExpectedReceivedCallsPositive = (\n expected: Array<unknown>,\n indexedCalls: Array<IndexedCall>,\n expand: boolean,\n isOnlyCall: boolean,\n iExpectedCall?: number,\n) => {\n const expectedLine = `Expected: ${printExpectedArgs(expected)}\\n`;\n if (indexedCalls.length === 0) {\n return expectedLine;\n }\n\n const label = 'Received: ';\n if (isOnlyCall && (iExpectedCall === 0 || iExpectedCall === undefined)) {\n const received = indexedCalls[0][1];\n\n if (isLineDiffableCall(expected, received)) {\n // Display diff without indentation.\n const lines = [\n EXPECTED_COLOR('- Expected'),\n RECEIVED_COLOR('+ Received'),\n '',\n ];\n\n const length = Math.max(expected.length, received.length);\n for (let i = 0; i < length; i += 1) {\n if (i < expected.length && i < received.length) {\n if (isEqualValue(expected[i], received[i])) {\n lines.push(` ${printCommon(received[i])},`);\n continue;\n }\n\n if (isLineDiffableArg(expected[i], received[i])) {\n const difference = diff(expected[i], received[i], {expand});\n if (\n typeof difference === 'string' &&\n difference.includes('- Expected') &&\n difference.includes('+ Received')\n ) {\n // Omit annotation in case multiple args have diff.\n lines.push(\n difference\n .split('\\n')\n .slice(3)\n .join('\\n') + ',',\n );\n continue;\n }\n }\n }\n\n if (i < expected.length) {\n lines.push(EXPECTED_COLOR('- ' + stringify(expected[i])) + ',');\n }\n if (i < received.length) {\n lines.push(RECEIVED_COLOR('+ ' + stringify(received[i])) + ',');\n }\n }\n\n return lines.join('\\n') + '\\n';\n }\n\n return expectedLine + label + printReceivedArgs(received, expected) + '\\n';\n }\n\n const printAligned = getRightAlignedPrinter(label);\n\n return (\n expectedLine +\n 'Received\\n' +\n indexedCalls.reduce((printed: string, [i, received]: IndexedCall) => {\n const aligned = printAligned(String(i + 1), i === iExpectedCall);\n return (\n printed +\n ((i === iExpectedCall || iExpectedCall === undefined) &&\n isLineDiffableCall(expected, received)\n ? aligned.replace(': ', '\\n') +\n printDiffCall(expected, received, expand)\n : aligned + printReceivedArgs(received, expected)) +\n '\\n'\n );\n }, '')\n );\n};\n\nconst indentation = 'Received'.replace(/\\w/g, ' ');\n\nconst printDiffCall = (\n expected: Array<unknown>,\n received: Array<unknown>,\n expand: boolean,\n) =>\n received\n .map((arg, i) => {\n if (i < expected.length) {\n if (isEqualValue(expected[i], arg)) {\n return indentation + ' ' + printCommon(arg) + ',';\n }\n\n if (isLineDiffableArg(expected[i], arg)) {\n const difference = diff(expected[i], arg, {expand});\n\n if (\n typeof difference === 'string' &&\n difference.includes('- Expected') &&\n difference.includes('+ Received')\n ) {\n // Display diff with indentation.\n // Omit annotation in case multiple args have diff.\n return (\n difference\n .split('\\n')\n .slice(3)\n .map(line => indentation + line)\n .join('\\n') + ','\n );\n }\n }\n }\n\n // Display + only if received arg has no corresponding expected arg.\n return (\n indentation +\n (i < expected.length\n ? ' ' + printReceived(arg)\n : RECEIVED_COLOR('+ ' + stringify(arg))) +\n ','\n );\n })\n .join('\\n');\n\nconst isLineDiffableCall = (\n expected: Array<unknown>,\n received: Array<unknown>,\n): boolean =>\n expected.some(\n (arg, i) => i < received.length && isLineDiffableArg(arg, received[i]),\n );\n\n// Almost redundant with function in jest-matcher-utils,\n// except no line diff for any strings.\nconst isLineDiffableArg = (expected: unknown, received: unknown): boolean => {\n const expectedType = getType(expected);\n const receivedType = getType(received);\n\n if (expectedType !== receivedType) {\n return false;\n }\n\n if (getType.isPrimitive(expected)) {\n return false;\n }\n\n if (\n expectedType === 'date' ||\n expectedType === 'function' ||\n expectedType === 'regexp'\n ) {\n return false;\n }\n\n if (expected instanceof Error && received instanceof Error) {\n return false;\n }\n\n if (\n expectedType === 'object' &&\n typeof (expected as any).asymmetricMatch === 'function'\n ) {\n return false;\n }\n\n if (\n receivedType === 'object' &&\n typeof (received as any).asymmetricMatch === 'function'\n ) {\n return false;\n }\n\n return true;\n};\n\nconst printResult = (result: any, expected: unknown) =>\n result.type === 'throw'\n ? 'function call threw an error'\n : result.type === 'incomplete'\n ? 'function call has not returned yet'\n : isEqualValue(expected, result.value)\n ? printCommon(result.value)\n : printReceived(result.value);\n\ntype IndexedResult = [number, any];\n\n// Return either empty string or one line per indexed result,\n// so additional empty line can separate from `Number of returns` which follows.\nconst printReceivedResults = (\n label: string,\n expected: unknown,\n indexedResults: Array<IndexedResult>,\n isOnlyCall: boolean,\n iExpectedCall?: number,\n) => {\n if (indexedResults.length === 0) {\n return '';\n }\n\n if (isOnlyCall && (iExpectedCall === 0 || iExpectedCall === undefined)) {\n return label + printResult(indexedResults[0][1], expected) + '\\n';\n }\n\n const printAligned = getRightAlignedPrinter(label);\n\n return (\n label.replace(':', '').trim() +\n '\\n' +\n indexedResults.reduce(\n (printed: string, [i, result]: IndexedResult) =>\n printed +\n printAligned(String(i + 1), i === iExpectedCall) +\n printResult(result, expected) +\n '\\n',\n '',\n )\n );\n};\n\nconst createToBeCalledMatcher = (matcherName: string) =>\n function(\n this: MatcherState,\n received: any,\n expected: unknown,\n ): SyncExpectationResult {\n const expectedArgument = '';\n const options: MatcherHintOptions = {\n isNot: this.isNot,\n promise: this.promise,\n };\n ensureNoExpected(expected, matcherName, options);\n ensureMockOrSpy(received, matcherName, expectedArgument, options);\n\n const receivedIsSpy = isSpy(received);\n const receivedName = receivedIsSpy ? 'spy' : received.getMockName();\n const count = receivedIsSpy\n ? received.calls.count()\n : received.mock.calls.length;\n const calls = receivedIsSpy\n ? received.calls.all().map((x: any) => x.args)\n : received.mock.calls;\n const pass = count > 0;\n const message = pass\n ? () =>\n matcherHint(matcherName, receivedName, expectedArgument, options) +\n '\\n\\n' +\n `Expected number of calls: ${printExpected(0)}\\n` +\n `Received number of calls: ${printReceived(count)}\\n\\n` +\n calls\n .reduce((lines: Array<string>, args: any, i: number) => {\n if (lines.length < PRINT_LIMIT) {\n lines.push(`${i + 1}: ${printReceivedArgs(args)}`);\n }\n\n return lines;\n }, [])\n .join('\\n')\n : () =>\n matcherHint(matcherName, receivedName, expectedArgument, options) +\n '\\n\\n' +\n `Expected number of calls: >= ${printExpected(1)}\\n` +\n `Received number of calls: ${printReceived(count)}`;\n\n return {message, pass};\n };\n\nconst createToReturnMatcher = (matcherName: string) =>\n function(\n this: MatcherState,\n received: any,\n expected: unknown,\n ): SyncExpectationResult {\n const expectedArgument = '';\n const options: MatcherHintOptions = {\n isNot: this.isNot,\n promise: this.promise,\n };\n ensureNoExpected(expected, matcherName, options);\n ensureMock(received, matcherName, expectedArgument, options);\n\n const receivedName = received.getMockName();\n\n // Count return values that correspond only to calls that returned\n const count = received.mock.results.reduce(\n (n: number, result: any) => (result.type === 'return' ? n + 1 : n),\n 0,\n );\n\n const pass = count > 0;\n\n const message = pass\n ? () =>\n matcherHint(matcherName, receivedName, expectedArgument, options) +\n '\\n\\n' +\n `Expected number of returns: ${printExpected(0)}\\n` +\n `Received number of returns: ${printReceived(count)}\\n\\n` +\n received.mock.results\n .reduce((lines: Array<string>, result: any, i: number) => {\n if (result.type === 'return' && lines.length < PRINT_LIMIT) {\n lines.push(`${i + 1}: ${printReceived(result.value)}`);\n }\n\n return lines;\n }, [])\n .join('\\n') +\n (received.mock.calls.length !== count\n ? `\\n\\nReceived number of calls: ${printReceived(\n received.mock.calls.length,\n )}`\n : '')\n : () =>\n matcherHint(matcherName, receivedName, expectedArgument, options) +\n '\\n\\n' +\n `Expected number of returns: >= ${printExpected(1)}\\n` +\n `Received number of returns: ${printReceived(count)}` +\n (received.mock.calls.length !== count\n ? `\\nReceived number of calls: ${printReceived(\n received.mock.calls.length,\n )}`\n : '');\n\n return {message, pass};\n };\n\nconst createToBeCalledTimesMatcher = (matcherName: string) =>\n function(\n this: MatcherState,\n received: any,\n expected: number,\n ): SyncExpectationResult {\n const expectedArgument = 'expected';\n const options: MatcherHintOptions = {\n isNot: this.isNot,\n promise: this.promise,\n };\n ensureExpectedIsNonNegativeInteger(expected, matcherName, options);\n ensureMockOrSpy(received, matcherName, expectedArgument, options);\n\n const receivedIsSpy = isSpy(received);\n const receivedName = receivedIsSpy ? 'spy' : received.getMockName();\n const count = receivedIsSpy\n ? received.calls.count()\n : received.mock.calls.length;\n\n const pass = count === expected;\n\n const message = pass\n ? () =>\n matcherHint(matcherName, receivedName, expectedArgument, options) +\n `\\n\\n` +\n `Expected number of calls: not ${printExpected(expected)}`\n : () =>\n matcherHint(matcherName, receivedName, expectedArgument, options) +\n '\\n\\n' +\n `Expected number of calls: ${printExpected(expected)}\\n` +\n `Received number of calls: ${printReceived(count)}`;\n\n return {message, pass};\n };\n\nconst createToReturnTimesMatcher = (matcherName: string) =>\n function(\n this: MatcherState,\n received: any,\n expected: number,\n ): SyncExpectationResult {\n const expectedArgument = 'expected';\n const options: MatcherHintOptions = {\n isNot: this.isNot,\n promise: this.promise,\n };\n ensureExpectedIsNonNegativeInteger(expected, matcherName, options);\n ensureMock(received, matcherName, expectedArgument, options);\n\n const receivedName = received.getMockName();\n\n // Count return values that correspond only to calls that returned\n const count = received.mock.results.reduce(\n (n: number, result: any) => (result.type === 'return' ? n + 1 : n),\n 0,\n );\n\n const pass = count === expected;\n\n const message = pass\n ? () =>\n matcherHint(matcherName, receivedName, expectedArgument, options) +\n `\\n\\n` +\n `Expected number of returns: not ${printExpected(expected)}` +\n (received.mock.calls.length !== count\n ? `\\n\\nReceived number of calls: ${printReceived(\n received.mock.calls.length,\n )}`\n : '')\n : () =>\n matcherHint(matcherName, receivedName, expectedArgument, options) +\n '\\n\\n' +\n `Expected number of returns: ${printExpected(expected)}\\n` +\n `Received number of returns: ${printReceived(count)}` +\n (received.mock.calls.length !== count\n ? `\\nReceived number of calls: ${printReceived(\n received.mock.calls.length,\n )}`\n : '');\n\n return {message, pass};\n };\n\nconst createToBeCalledWithMatcher = (matcherName: string) =>\n function(\n this: MatcherState,\n received: any,\n ...expected: Array<unknown>\n ): SyncExpectationResult {\n const expectedArgument = '...expected';\n const options: MatcherHintOptions = {\n isNot: this.isNot,\n promise: this.promise,\n };\n ensureMockOrSpy(received, matcherName, expectedArgument, options);\n\n const receivedIsSpy = isSpy(received);\n const receivedName = receivedIsSpy ? 'spy' : received.getMockName();\n\n const calls = receivedIsSpy\n ? received.calls.all().map((x: any) => x.args)\n : received.mock.calls;\n\n const pass = calls.some((call: any) => isEqualCall(expected, call));\n\n const message = pass\n ? () => {\n // Some examples of calls that are equal to expected value.\n const indexedCalls: Array<IndexedCall> = [];\n let i = 0;\n while (i < calls.length && indexedCalls.length < PRINT_LIMIT) {\n if (isEqualCall(expected, calls[i])) {\n indexedCalls.push([i, calls[i]]);\n }\n i += 1;\n }\n\n return (\n matcherHint(matcherName, receivedName, expectedArgument, options) +\n '\\n\\n' +\n `Expected: not ${printExpectedArgs(expected)}\\n` +\n (calls.length === 1 && stringify(calls[0]) === stringify(expected)\n ? ''\n : printReceivedCallsNegative(\n expected,\n indexedCalls,\n calls.length === 1,\n )) +\n `\\nNumber of calls: ${printReceived(calls.length)}`\n );\n }\n : () => {\n // Some examples of calls that are not equal to expected value.\n const indexedCalls: Array<IndexedCall> = [];\n let i = 0;\n while (i < calls.length && indexedCalls.length < PRINT_LIMIT) {\n indexedCalls.push([i, calls[i]]);\n i += 1;\n }\n\n return (\n matcherHint(matcherName, receivedName, expectedArgument, options) +\n '\\n\\n' +\n printExpectedReceivedCallsPositive(\n expected,\n indexedCalls,\n isExpand(this.expand),\n calls.length === 1,\n ) +\n `\\nNumber of calls: ${printReceived(calls.length)}`\n );\n };\n\n return {message, pass};\n };\n\nconst createToReturnWithMatcher = (matcherName: string) =>\n function(\n this: MatcherState,\n received: any,\n expected: unknown,\n ): SyncExpectationResult {\n const expectedArgument = 'expected';\n const options: MatcherHintOptions = {\n isNot: this.isNot,\n promise: this.promise,\n };\n ensureMock(received, matcherName, expectedArgument, options);\n\n const receivedName = received.getMockName();\n const {calls, results} = received.mock;\n\n const pass = results.some((result: any) => isEqualReturn(expected, result));\n\n const message = pass\n ? () => {\n // Some examples of results that are equal to expected value.\n const indexedResults: Array<IndexedResult> = [];\n let i = 0;\n while (i < results.length && indexedResults.length < PRINT_LIMIT) {\n if (isEqualReturn(expected, results[i])) {\n indexedResults.push([i, results[i]]);\n }\n i += 1;\n }\n\n return (\n matcherHint(matcherName, receivedName, expectedArgument, options) +\n '\\n\\n' +\n `Expected: not ${printExpected(expected)}\\n` +\n (results.length === 1 &&\n results[0].type === 'return' &&\n stringify(results[0].value) === stringify(expected)\n ? ''\n : printReceivedResults(\n 'Received: ',\n expected,\n indexedResults,\n results.length === 1,\n )) +\n printNumberOfReturns(countReturns(results), calls.length)\n );\n }\n : () => {\n // Some examples of results that are not equal to expected value.\n const indexedResults: Array<IndexedResult> = [];\n let i = 0;\n while (i < results.length && indexedResults.length < PRINT_LIMIT) {\n indexedResults.push([i, results[i]]);\n i += 1;\n }\n\n return (\n matcherHint(matcherName, receivedName, expectedArgument, options) +\n '\\n\\n' +\n `Expected: ${printExpected(expected)}\\n` +\n printReceivedResults(\n 'Received: ',\n expected,\n indexedResults,\n results.length === 1,\n ) +\n printNumberOfReturns(countReturns(results), calls.length)\n );\n };\n\n return {message, pass};\n };\n\nconst createLastCalledWithMatcher = (matcherName: string) =>\n function(\n this: MatcherState,\n received: any,\n ...expected: Array<unknown>\n ): SyncExpectationResult {\n const expectedArgument = '...expected';\n const options: MatcherHintOptions = {\n isNot: this.isNot,\n promise: this.promise,\n };\n ensureMockOrSpy(received, matcherName, expectedArgument, options);\n\n const receivedIsSpy = isSpy(received);\n const receivedName = receivedIsSpy ? 'spy' : received.getMockName();\n\n const calls = receivedIsSpy\n ? received.calls.all().map((x: any) => x.args)\n : received.mock.calls;\n const iLast = calls.length - 1;\n\n const pass = iLast >= 0 && isEqualCall(expected, calls[iLast]);\n\n const message = pass\n ? () => {\n const indexedCalls: Array<IndexedCall> = [];\n if (iLast > 0) {\n // Display preceding call as context.\n indexedCalls.push([iLast - 1, calls[iLast - 1]]);\n }\n indexedCalls.push([iLast, calls[iLast]]);\n\n return (\n matcherHint(matcherName, receivedName, expectedArgument, options) +\n '\\n\\n' +\n `Expected: not ${printExpectedArgs(expected)}\\n` +\n (calls.length === 1 && stringify(calls[0]) === stringify(expected)\n ? ''\n : printReceivedCallsNegative(\n expected,\n indexedCalls,\n calls.length === 1,\n iLast,\n )) +\n `\\nNumber of calls: ${printReceived(calls.length)}`\n );\n }\n : () => {\n const indexedCalls: Array<IndexedCall> = [];\n if (iLast >= 0) {\n if (iLast > 0) {\n let i = iLast - 1;\n // Is there a preceding call that is equal to expected args?\n while (i >= 0 && !isEqualCall(expected, calls[i])) {\n i -= 1;\n }\n if (i < 0) {\n i = iLast - 1; // otherwise, preceding call\n }\n\n indexedCalls.push([i, calls[i]]);\n }\n\n indexedCalls.push([iLast, calls[iLast]]);\n }\n\n return (\n matcherHint(matcherName, receivedName, expectedArgument, options) +\n '\\n\\n' +\n printExpectedReceivedCallsPositive(\n expected,\n indexedCalls,\n isExpand(this.expand),\n calls.length === 1,\n iLast,\n ) +\n `\\nNumber of calls: ${printReceived(calls.length)}`\n );\n };\n\n return {message, pass};\n };\n\nconst createLastReturnedMatcher = (matcherName: string) =>\n function(\n this: MatcherState,\n received: any,\n expected: unknown,\n ): SyncExpectationResult {\n const expectedArgument = 'expected';\n const options: MatcherHintOptions = {\n isNot: this.isNot,\n promise: this.promise,\n };\n ensureMock(received, matcherName, expectedArgument, options);\n\n const receivedName = received.getMockName();\n\n const {calls, results} = received.mock;\n const iLast = results.length - 1;\n\n const pass = iLast >= 0 && isEqualReturn(expected, results[iLast]);\n\n const message = pass\n ? () => {\n const indexedResults: Array<IndexedResult> = [];\n if (iLast > 0) {\n // Display preceding result as context.\n indexedResults.push([iLast - 1, results[iLast - 1]]);\n }\n indexedResults.push([iLast, results[iLast]]);\n\n return (\n matcherHint(matcherName, receivedName, expectedArgument, options) +\n '\\n\\n' +\n `Expected: not ${printExpected(expected)}\\n` +\n (results.length === 1 &&\n results[0].type === 'return' &&\n stringify(results[0].value) === stringify(expected)\n ? ''\n : printReceivedResults(\n 'Received: ',\n expected,\n indexedResults,\n results.length === 1,\n iLast,\n )) +\n printNumberOfReturns(countReturns(results), calls.length)\n );\n }\n : () => {\n const indexedResults: Array<IndexedResult> = [];\n if (iLast >= 0) {\n if (iLast > 0) {\n let i = iLast - 1;\n // Is there a preceding result that is equal to expected value?\n while (i >= 0 && !isEqualReturn(expected, results[i])) {\n i -= 1;\n }\n if (i < 0) {\n i = iLast - 1; // otherwise, preceding result\n }\n\n indexedResults.push([i, results[i]]);\n }\n\n indexedResults.push([iLast, results[iLast]]);\n }\n\n return (\n matcherHint(matcherName, receivedName, expectedArgument, options) +\n '\\n\\n' +\n `Expected: ${printExpected(expected)}\\n` +\n printReceivedResults(\n 'Received: ',\n expected,\n indexedResults,\n results.length === 1,\n iLast,\n ) +\n printNumberOfReturns(countReturns(results), calls.length)\n );\n };\n\n return {message, pass};\n };\n\nconst createNthCalledWithMatcher = (matcherName: string) =>\n function(\n this: MatcherState,\n received: any,\n nth: number,\n ...expected: Array<unknown>\n ): SyncExpectationResult {\n const expectedArgument = 'n';\n const options: MatcherHintOptions = {\n expectedColor: (arg: string) => arg,\n isNot: this.isNot,\n promise: this.promise,\n secondArgument: '...expected',\n };\n ensureMockOrSpy(received, matcherName, expectedArgument, options);\n\n if (!Number.isSafeInteger(nth) || nth < 1) {\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherName, undefined, expectedArgument, options),\n `${expectedArgument} must be a positive integer`,\n printWithType(expectedArgument, nth, stringify),\n ),\n );\n }\n\n const receivedIsSpy = isSpy(received);\n const receivedName = receivedIsSpy ? 'spy' : received.getMockName();\n\n const calls = receivedIsSpy\n ? received.calls.all().map((x: any) => x.args)\n : received.mock.calls;\n const length = calls.length;\n const iNth = nth - 1;\n\n const pass = iNth < length && isEqualCall(expected, calls[iNth]);\n\n const message = pass\n ? () => {\n // Display preceding and following calls,\n // in case assertions fails because index is off by one.\n const indexedCalls: Array<IndexedCall> = [];\n if (iNth - 1 >= 0) {\n indexedCalls.push([iNth - 1, calls[iNth - 1]]);\n }\n indexedCalls.push([iNth, calls[iNth]]);\n if (iNth + 1 < length) {\n indexedCalls.push([iNth + 1, calls[iNth + 1]]);\n }\n\n return (\n matcherHint(matcherName, receivedName, expectedArgument, options) +\n '\\n\\n' +\n `n: ${nth}\\n` +\n `Expected: not ${printExpectedArgs(expected)}\\n` +\n (calls.length === 1 && stringify(calls[0]) === stringify(expected)\n ? ''\n : printReceivedCallsNegative(\n expected,\n indexedCalls,\n calls.length === 1,\n iNth,\n )) +\n `\\nNumber of calls: ${printReceived(calls.length)}`\n );\n }\n : () => {\n // Display preceding and following calls:\n // * nearest call that is equal to expected args\n // * otherwise, adjacent call\n // in case assertions fails because of index, especially off by one.\n const indexedCalls: Array<IndexedCall> = [];\n if (iNth < length) {\n if (iNth - 1 >= 0) {\n let i = iNth - 1;\n // Is there a preceding call that is equal to expected args?\n while (i >= 0 && !isEqualCall(expected, calls[i])) {\n i -= 1;\n }\n if (i < 0) {\n i = iNth - 1; // otherwise, adjacent call\n }\n\n indexedCalls.push([i, calls[i]]);\n }\n indexedCalls.push([iNth, calls[iNth]]);\n if (iNth + 1 < length) {\n let i = iNth + 1;\n // Is there a following call that is equal to expected args?\n while (i < length && !isEqualCall(expected, calls[i])) {\n i += 1;\n }\n if (i >= length) {\n i = iNth + 1; // otherwise, adjacent call\n }\n\n indexedCalls.push([i, calls[i]]);\n }\n } else if (length > 0) {\n // The number of received calls is fewer than the expected number.\n let i = length - 1;\n // Is there a call that is equal to expected args?\n while (i >= 0 && !isEqualCall(expected, calls[i])) {\n i -= 1;\n }\n if (i < 0) {\n i = length - 1; // otherwise, last call\n }\n\n indexedCalls.push([i, calls[i]]);\n }\n\n return (\n matcherHint(matcherName, receivedName, expectedArgument, options) +\n '\\n\\n' +\n `n: ${nth}\\n` +\n printExpectedReceivedCallsPositive(\n expected,\n indexedCalls,\n isExpand(this.expand),\n calls.length === 1,\n iNth,\n ) +\n `\\nNumber of calls: ${printReceived(calls.length)}`\n );\n };\n\n return {message, pass};\n };\n\nconst createNthReturnedWithMatcher = (matcherName: string) =>\n function(\n this: MatcherState,\n received: any,\n nth: number,\n expected: unknown,\n ): SyncExpectationResult {\n const expectedArgument = 'n';\n const options: MatcherHintOptions = {\n expectedColor: (arg: string) => arg,\n isNot: this.isNot,\n promise: this.promise,\n secondArgument: 'expected',\n };\n ensureMock(received, matcherName, expectedArgument, options);\n\n if (!Number.isSafeInteger(nth) || nth < 1) {\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherName, undefined, expectedArgument, options),\n `${expectedArgument} must be a positive integer`,\n printWithType(expectedArgument, nth, stringify),\n ),\n );\n }\n\n const receivedName = received.getMockName();\n const {calls, results} = received.mock;\n const length = results.length;\n const iNth = nth - 1;\n\n const pass = iNth < length && isEqualReturn(expected, results[iNth]);\n\n const message = pass\n ? () => {\n // Display preceding and following results,\n // in case assertions fails because index is off by one.\n const indexedResults: Array<IndexedResult> = [];\n if (iNth - 1 >= 0) {\n indexedResults.push([iNth - 1, results[iNth - 1]]);\n }\n indexedResults.push([iNth, results[iNth]]);\n if (iNth + 1 < length) {\n indexedResults.push([iNth + 1, results[iNth + 1]]);\n }\n\n return (\n matcherHint(matcherName, receivedName, expectedArgument, options) +\n '\\n\\n' +\n `n: ${nth}\\n` +\n `Expected: not ${printExpected(expected)}\\n` +\n (results.length === 1 &&\n results[0].type === 'return' &&\n stringify(results[0].value) === stringify(expected)\n ? ''\n : printReceivedResults(\n 'Received: ',\n expected,\n indexedResults,\n results.length === 1,\n iNth,\n )) +\n printNumberOfReturns(countReturns(results), calls.length)\n );\n }\n : () => {\n // Display preceding and following results:\n // * nearest result that is equal to expected value\n // * otherwise, adjacent result\n // in case assertions fails because of index, especially off by one.\n const indexedResults: Array<IndexedResult> = [];\n if (iNth < length) {\n if (iNth - 1 >= 0) {\n let i = iNth - 1;\n // Is there a preceding result that is equal to expected value?\n while (i >= 0 && !isEqualReturn(expected, results[i])) {\n i -= 1;\n }\n if (i < 0) {\n i = iNth - 1; // otherwise, adjacent result\n }\n\n indexedResults.push([i, results[i]]);\n }\n indexedResults.push([iNth, results[iNth]]);\n if (iNth + 1 < length) {\n let i = iNth + 1;\n // Is there a following result that is equal to expected value?\n while (i < length && !isEqualReturn(expected, results[i])) {\n i += 1;\n }\n if (i >= length) {\n i = iNth + 1; // otherwise, adjacent result\n }\n\n indexedResults.push([i, results[i]]);\n }\n } else if (length > 0) {\n // The number of received calls is fewer than the expected number.\n let i = length - 1;\n // Is there a result that is equal to expected value?\n while (i >= 0 && !isEqualReturn(expected, results[i])) {\n i -= 1;\n }\n if (i < 0) {\n i = length - 1; // otherwise, last result\n }\n\n indexedResults.push([i, results[i]]);\n }\n\n return (\n matcherHint(matcherName, receivedName, expectedArgument, options) +\n '\\n\\n' +\n `n: ${nth}\\n` +\n `Expected: ${printExpected(expected)}\\n` +\n printReceivedResults(\n 'Received: ',\n expected,\n indexedResults,\n results.length === 1,\n iNth,\n ) +\n printNumberOfReturns(countReturns(results), calls.length)\n );\n };\n\n return {message, pass};\n };\n\nconst spyMatchers: MatchersObject = {\n lastCalledWith: createLastCalledWithMatcher('lastCalledWith'),\n lastReturnedWith: createLastReturnedMatcher('lastReturnedWith'),\n nthCalledWith: createNthCalledWithMatcher('nthCalledWith'),\n nthReturnedWith: createNthReturnedWithMatcher('nthReturnedWith'),\n toBeCalled: createToBeCalledMatcher('toBeCalled'),\n toBeCalledTimes: createToBeCalledTimesMatcher('toBeCalledTimes'),\n toBeCalledWith: createToBeCalledWithMatcher('toBeCalledWith'),\n toHaveBeenCalled: createToBeCalledMatcher('toHaveBeenCalled'),\n toHaveBeenCalledTimes: createToBeCalledTimesMatcher('toHaveBeenCalledTimes'),\n toHaveBeenCalledWith: createToBeCalledWithMatcher('toHaveBeenCalledWith'),\n toHaveBeenLastCalledWith: createLastCalledWithMatcher(\n 'toHaveBeenLastCalledWith',\n ),\n toHaveBeenNthCalledWith: createNthCalledWithMatcher(\n 'toHaveBeenNthCalledWith',\n ),\n toHaveLastReturnedWith: createLastReturnedMatcher('toHaveLastReturnedWith'),\n toHaveNthReturnedWith: createNthReturnedWithMatcher('toHaveNthReturnedWith'),\n toHaveReturned: createToReturnMatcher('toHaveReturned'),\n toHaveReturnedTimes: createToReturnTimesMatcher('toHaveReturnedTimes'),\n toHaveReturnedWith: createToReturnWithMatcher('toHaveReturnedWith'),\n toReturn: createToReturnMatcher('toReturn'),\n toReturnTimes: createToReturnTimesMatcher('toReturnTimes'),\n toReturnWith: createToReturnWithMatcher('toReturnWith'),\n};\n\nconst isMock = (received: any) =>\n received != null && received._isMockFunction === true;\n\nconst isSpy = (received: any) =>\n received != null &&\n received.calls != null &&\n typeof received.calls.all === 'function' &&\n typeof received.calls.count === 'function';\n\nconst ensureMockOrSpy = (\n received: any,\n matcherName: string,\n expectedArgument: string,\n options: MatcherHintOptions,\n) => {\n if (!isMock(received) && !isSpy(received)) {\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherName, undefined, expectedArgument, options),\n `${RECEIVED_COLOR('received')} value must be a mock or spy function`,\n printWithType('Received', received, printReceived),\n ),\n );\n }\n};\n\nconst ensureMock = (\n received: any,\n matcherName: string,\n expectedArgument: string,\n options: MatcherHintOptions,\n) => {\n if (!isMock(received)) {\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherName, undefined, expectedArgument, options),\n `${RECEIVED_COLOR('received')} value must be a mock function`,\n printWithType('Received', received, printReceived),\n ),\n );\n }\n};\n\nexport default spyMatchers;\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport {formatStackTrace, separateMessageFromStack} from 'jest-message-util';\nimport {\n EXPECTED_COLOR,\n MatcherHintOptions,\n RECEIVED_COLOR,\n matcherErrorMessage,\n matcherHint,\n printDiffOrStringify,\n printExpected,\n printReceived,\n printWithType,\n} from 'jest-matcher-utils';\nimport {\n printExpectedConstructorName,\n printExpectedConstructorNameNot,\n printReceivedConstructorName,\n printReceivedConstructorNameNot,\n printReceivedStringContainExpectedResult,\n printReceivedStringContainExpectedSubstring,\n} from './print';\nimport {\n MatcherState,\n MatchersObject,\n RawMatcherFn,\n SyncExpectationResult,\n} from './types';\nimport {isError} from './utils';\n\nconst DID_NOT_THROW = 'Received function did not throw';\n\ntype Thrown =\n | {\n hasMessage: true;\n isError: true;\n message: string;\n value: Error;\n }\n | {\n hasMessage: boolean;\n isError: false;\n message: string;\n value: any;\n };\n\nconst getThrown = (e: any): Thrown => {\n const hasMessage =\n e !== null && e !== undefined && typeof e.message === 'string';\n\n if (hasMessage && typeof e.name === 'string' && typeof e.stack === 'string') {\n return {\n hasMessage,\n isError: true,\n message: e.message,\n value: e,\n };\n }\n\n return {\n hasMessage,\n isError: false,\n message: hasMessage ? e.message : String(e),\n value: e,\n };\n};\n\nexport const createMatcher = (\n matcherName: string,\n fromPromise?: boolean,\n): RawMatcherFn =>\n function(this: MatcherState, received: Function, expected: any) {\n const options = {\n isNot: this.isNot,\n promise: this.promise,\n };\n\n let thrown = null;\n\n if (fromPromise && isError(received)) {\n thrown = getThrown(received);\n } else {\n if (typeof received !== 'function') {\n if (!fromPromise) {\n const placeholder = expected === undefined ? '' : 'expected';\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherName, undefined, placeholder, options),\n `${RECEIVED_COLOR('received')} value must be a function`,\n printWithType('Received', received, printReceived),\n ),\n );\n }\n } else {\n try {\n received();\n } catch (e) {\n thrown = getThrown(e);\n }\n }\n }\n\n if (expected === undefined) {\n return toThrow(matcherName, options, thrown);\n } else if (typeof expected === 'function') {\n return toThrowExpectedClass(matcherName, options, thrown, expected);\n } else if (typeof expected === 'string') {\n return toThrowExpectedString(matcherName, options, thrown, expected);\n } else if (expected !== null && typeof expected.test === 'function') {\n return toThrowExpectedRegExp(matcherName, options, thrown, expected);\n } else if (\n expected !== null &&\n typeof expected.asymmetricMatch === 'function'\n ) {\n return toThrowExpectedAsymmetric(matcherName, options, thrown, expected);\n } else if (expected !== null && typeof expected === 'object') {\n return toThrowExpectedObject(matcherName, options, thrown, expected);\n } else {\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherName, undefined, undefined, options),\n `${EXPECTED_COLOR(\n 'expected',\n )} value must be a string or regular expression or class or error`,\n printWithType('Expected', expected, printExpected),\n ),\n );\n }\n };\n\nconst matchers: MatchersObject = {\n toThrow: createMatcher('toThrow'),\n toThrowError: createMatcher('toThrowError'),\n};\n\nconst toThrowExpectedRegExp = (\n matcherName: string,\n options: MatcherHintOptions,\n thrown: Thrown | null,\n expected: RegExp,\n): SyncExpectationResult => {\n const pass = thrown !== null && expected.test(thrown.message);\n\n const message = pass\n ? () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n formatExpected('Expected pattern: not ', expected) +\n (thrown !== null && thrown.hasMessage\n ? formatReceived(\n 'Received message: ',\n thrown,\n 'message',\n expected,\n ) + formatStack(thrown)\n : formatReceived('Received value: ', thrown, 'value'))\n : () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n formatExpected('Expected pattern: ', expected) +\n (thrown === null\n ? '\\n' + DID_NOT_THROW\n : thrown.hasMessage\n ? formatReceived('Received message: ', thrown, 'message') +\n formatStack(thrown)\n : formatReceived('Received value: ', thrown, 'value'));\n\n return {message, pass};\n};\n\ntype AsymmetricMatcher = {\n asymmetricMatch: (received: unknown) => boolean;\n};\n\nconst toThrowExpectedAsymmetric = (\n matcherName: string,\n options: MatcherHintOptions,\n thrown: Thrown | null,\n expected: AsymmetricMatcher,\n): SyncExpectationResult => {\n const pass = thrown !== null && expected.asymmetricMatch(thrown.value);\n\n const message = pass\n ? () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n formatExpected('Expected asymmetric matcher: not ', expected) +\n '\\n' +\n (thrown !== null && thrown.hasMessage\n ? formatReceived('Received name: ', thrown, 'name') +\n formatReceived('Received message: ', thrown, 'message') +\n formatStack(thrown)\n : formatReceived('Thrown value: ', thrown, 'value'))\n : () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n formatExpected('Expected asymmetric matcher: ', expected) +\n '\\n' +\n (thrown === null\n ? DID_NOT_THROW\n : thrown.hasMessage\n ? formatReceived('Received name: ', thrown, 'name') +\n formatReceived('Received message: ', thrown, 'message') +\n formatStack(thrown)\n : formatReceived('Thrown value: ', thrown, 'value'));\n\n return {message, pass};\n};\n\nconst toThrowExpectedObject = (\n matcherName: string,\n options: MatcherHintOptions,\n thrown: Thrown | null,\n expected: any,\n): SyncExpectationResult => {\n const pass = thrown !== null && thrown.message === expected.message;\n\n const message = pass\n ? () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n formatExpected('Expected message: not ', expected.message) +\n (thrown !== null && thrown.hasMessage\n ? formatStack(thrown)\n : formatReceived('Received value: ', thrown, 'value'))\n : () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n (thrown === null\n ? formatExpected('Expected message: ', expected.message) +\n '\\n' +\n DID_NOT_THROW\n : thrown.hasMessage\n ? printDiffOrStringify(\n expected.message,\n thrown.message,\n 'Expected message',\n 'Received message',\n true,\n ) +\n '\\n' +\n formatStack(thrown)\n : formatExpected('Expected message: ', expected.message) +\n formatReceived('Received value: ', thrown, 'value'));\n\n return {message, pass};\n};\n\nconst toThrowExpectedClass = (\n matcherName: string,\n options: MatcherHintOptions,\n thrown: Thrown | null,\n expected: Function,\n): SyncExpectationResult => {\n const pass = thrown !== null && thrown.value instanceof expected;\n\n const message = pass\n ? () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n printExpectedConstructorNameNot('Expected constructor', expected) +\n (thrown !== null &&\n thrown.value != null &&\n typeof thrown.value.constructor === 'function' &&\n thrown.value.constructor !== expected\n ? printReceivedConstructorNameNot(\n 'Received constructor',\n thrown.value.constructor,\n expected,\n )\n : '') +\n '\\n' +\n (thrown !== null && thrown.hasMessage\n ? formatReceived('Received message: ', thrown, 'message') +\n formatStack(thrown)\n : formatReceived('Received value: ', thrown, 'value'))\n : () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n printExpectedConstructorName('Expected constructor', expected) +\n (thrown === null\n ? '\\n' + DID_NOT_THROW\n : (thrown.value != null &&\n typeof thrown.value.constructor === 'function'\n ? printReceivedConstructorName(\n 'Received constructor',\n thrown.value.constructor,\n )\n : '') +\n '\\n' +\n (thrown.hasMessage\n ? formatReceived('Received message: ', thrown, 'message') +\n formatStack(thrown)\n : formatReceived('Received value: ', thrown, 'value')));\n\n return {message, pass};\n};\n\nconst toThrowExpectedString = (\n matcherName: string,\n options: MatcherHintOptions,\n thrown: Thrown | null,\n expected: string,\n): SyncExpectationResult => {\n const pass = thrown !== null && thrown.message.includes(expected);\n\n const message = pass\n ? () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n formatExpected('Expected substring: not ', expected) +\n (thrown !== null && thrown.hasMessage\n ? formatReceived(\n 'Received message: ',\n thrown,\n 'message',\n expected,\n ) + formatStack(thrown)\n : formatReceived('Received value: ', thrown, 'value'))\n : () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n formatExpected('Expected substring: ', expected) +\n (thrown === null\n ? '\\n' + DID_NOT_THROW\n : thrown.hasMessage\n ? formatReceived('Received message: ', thrown, 'message') +\n formatStack(thrown)\n : formatReceived('Received value: ', thrown, 'value'));\n\n return {message, pass};\n};\n\nconst toThrow = (\n matcherName: string,\n options: MatcherHintOptions,\n thrown: Thrown | null,\n): SyncExpectationResult => {\n const pass = thrown !== null;\n\n const message = pass\n ? () =>\n matcherHint(matcherName, undefined, '', options) +\n '\\n\\n' +\n (thrown !== null && thrown.hasMessage\n ? formatReceived('Error name: ', thrown, 'name') +\n formatReceived('Error message: ', thrown, 'message') +\n formatStack(thrown)\n : formatReceived('Thrown value: ', thrown, 'value'))\n : () =>\n matcherHint(matcherName, undefined, '', options) +\n '\\n\\n' +\n DID_NOT_THROW;\n\n return {message, pass};\n};\n\nconst formatExpected = (label: string, expected: unknown) =>\n label + printExpected(expected) + '\\n';\n\nconst formatReceived = (\n label: string,\n thrown: Thrown | null,\n key: string,\n expected?: string | RegExp,\n) => {\n if (thrown === null) {\n return '';\n }\n\n if (key === 'message') {\n const message = thrown.message;\n\n if (typeof expected === 'string') {\n const index = message.indexOf(expected);\n if (index !== -1) {\n return (\n label +\n printReceivedStringContainExpectedSubstring(\n message,\n index,\n expected.length,\n ) +\n '\\n'\n );\n }\n } else if (expected instanceof RegExp) {\n return (\n label +\n printReceivedStringContainExpectedResult(\n message,\n typeof expected.exec === 'function' ? expected.exec(message) : null,\n ) +\n '\\n'\n );\n }\n\n return label + printReceived(message) + '\\n';\n }\n\n if (key === 'name') {\n return thrown.isError\n ? label + printReceived(thrown.value.name) + '\\n'\n : '';\n }\n\n if (key === 'value') {\n return thrown.isError ? '' : label + printReceived(thrown.value) + '\\n';\n }\n\n return '';\n};\n\nconst formatStack = (thrown: Thrown | null) =>\n thrown === null || !thrown.isError\n ? ''\n : formatStackTrace(\n separateMessageFromStack(thrown.value.stack!).stack,\n {\n rootDir: process.cwd(),\n testMatch: [],\n },\n {\n noStackTrace: false,\n },\n );\n\nexport default matchers;\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport {isPrimitive} from 'jest-get-type';\nimport {\n equals,\n isA,\n isImmutableUnorderedKeyed,\n isImmutableUnorderedSet,\n} from './jasmineUtils';\n\ntype GetPath = {\n hasEndProp?: boolean;\n lastTraversedObject: unknown;\n traversedPath: Array<string>;\n value?: unknown;\n};\n\n// Return whether object instance inherits getter from its class.\nconst hasGetterFromConstructor = (object: object, key: string) => {\n const constructor = object.constructor;\n if (constructor === Object) {\n // A literal object has Object as constructor.\n // Therefore, it cannot inherit application-specific getters.\n // Furthermore, Object has __proto__ getter which is not relevant.\n // Array, Boolean, Number, String constructors dont have any getters.\n return false;\n }\n if (typeof constructor !== 'function') {\n // Object.create(null) constructs object with no constructor nor prototype.\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create#Custom_and_Null_objects\n return false;\n }\n\n const descriptor = Object.getOwnPropertyDescriptor(\n constructor.prototype,\n key,\n );\n return descriptor !== undefined && typeof descriptor.get === 'function';\n};\n\nexport const hasOwnProperty = (object: object, key: string) =>\n Object.prototype.hasOwnProperty.call(object, key) ||\n hasGetterFromConstructor(object, key);\n\nexport const getPath = (\n object: Record<string, any>,\n propertyPath: string | Array<string>,\n): GetPath => {\n if (!Array.isArray(propertyPath)) {\n propertyPath = (propertyPath as string).split('.');\n }\n\n if (propertyPath.length) {\n const lastProp = propertyPath.length === 1;\n const prop = propertyPath[0];\n const newObject = object[prop];\n\n if (!lastProp && (newObject === null || newObject === undefined)) {\n // This is not the last prop in the chain. If we keep recursing it will\n // hit a `can't access property X of undefined | null`. At this point we\n // know that the chain has broken and we can return right away.\n return {\n hasEndProp: false,\n lastTraversedObject: object,\n traversedPath: [],\n };\n }\n\n const result = getPath(newObject, propertyPath.slice(1));\n\n if (result.lastTraversedObject === null) {\n result.lastTraversedObject = object;\n }\n\n result.traversedPath.unshift(prop);\n\n if (lastProp) {\n // Does object have the property with an undefined value?\n // Although primitive values support bracket notation (above)\n // they would throw TypeError for in operator (below).\n result.hasEndProp =\n newObject !== undefined || (!isPrimitive(object) && prop in object);\n\n if (!result.hasEndProp) {\n result.traversedPath.shift();\n }\n }\n\n return result;\n }\n\n return {\n lastTraversedObject: null,\n traversedPath: [],\n value: object,\n };\n};\n\n// Strip properties from object that are not present in the subset. Useful for\n// printing the diff for toMatchObject() without adding unrelated noise.\nexport const getObjectSubset = (\n object: any,\n subset: any,\n seenReferences: WeakMap<object, boolean> = new WeakMap(),\n): any => {\n if (Array.isArray(object)) {\n if (Array.isArray(subset) && subset.length === object.length) {\n // The map method returns correct subclass of subset.\n return subset.map((sub: any, i: number) =>\n getObjectSubset(object[i], sub),\n );\n }\n } else if (object instanceof Date) {\n return object;\n } else if (isObject(object) && isObject(subset)) {\n if (equals(object, subset, [iterableEquality, subsetEquality])) {\n // Avoid unnecessary copy which might return Object instead of subclass.\n return subset;\n }\n\n const trimmed: any = {};\n seenReferences.set(object, trimmed);\n\n Object.keys(object)\n .filter(key => hasOwnProperty(subset, key))\n .forEach(key => {\n trimmed[key] = seenReferences.has(object[key])\n ? seenReferences.get(object[key])\n : getObjectSubset(object[key], subset[key], seenReferences);\n });\n\n if (Object.keys(trimmed).length > 0) {\n return trimmed;\n }\n }\n return object;\n};\n\nconst IteratorSymbol = Symbol.iterator;\n\nconst hasIterator = (object: any) =>\n !!(object != null && object[IteratorSymbol]);\n\nexport const iterableEquality = (\n a: any,\n b: any,\n aStack: Array<any> = [],\n bStack: Array<any> = [],\n) => {\n if (\n typeof a !== 'object' ||\n typeof b !== 'object' ||\n Array.isArray(a) ||\n Array.isArray(b) ||\n !hasIterator(a) ||\n !hasIterator(b)\n ) {\n return undefined;\n }\n if (a.constructor !== b.constructor) {\n return false;\n }\n let length = aStack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n // circular references at same depth are equal\n // circular reference is not equal to non-circular one\n if (aStack[length] === a) {\n return bStack[length] === b;\n }\n }\n aStack.push(a);\n bStack.push(b);\n\n const iterableEqualityWithStack = (a: any, b: any) =>\n iterableEquality(a, b, [...aStack], [...bStack]);\n\n if (a.size !== undefined) {\n if (a.size !== b.size) {\n return false;\n } else if (isA('Set', a) || isImmutableUnorderedSet(a)) {\n let allFound = true;\n for (const aValue of a) {\n if (!b.has(aValue)) {\n let has = false;\n for (const bValue of b) {\n const isEqual = equals(aValue, bValue, [iterableEqualityWithStack]);\n if (isEqual === true) {\n has = true;\n }\n }\n\n if (has === false) {\n allFound = false;\n break;\n }\n }\n }\n // Remove the first value from the stack of traversed values.\n aStack.pop();\n bStack.pop();\n return allFound;\n } else if (isA('Map', a) || isImmutableUnorderedKeyed(a)) {\n let allFound = true;\n for (const aEntry of a) {\n if (\n !b.has(aEntry[0]) ||\n !equals(aEntry[1], b.get(aEntry[0]), [iterableEqualityWithStack])\n ) {\n let has = false;\n for (const bEntry of b) {\n const matchedKey = equals(aEntry[0], bEntry[0], [\n iterableEqualityWithStack,\n ]);\n\n let matchedValue = false;\n if (matchedKey === true) {\n matchedValue = equals(aEntry[1], bEntry[1], [\n iterableEqualityWithStack,\n ]);\n }\n if (matchedValue === true) {\n has = true;\n }\n }\n\n if (has === false) {\n allFound = false;\n break;\n }\n }\n }\n // Remove the first value from the stack of traversed values.\n aStack.pop();\n bStack.pop();\n return allFound;\n }\n }\n\n const bIterator = b[IteratorSymbol]();\n\n for (const aValue of a) {\n const nextB = bIterator.next();\n if (\n nextB.done ||\n !equals(aValue, nextB.value, [iterableEqualityWithStack])\n ) {\n return false;\n }\n }\n if (!bIterator.next().done) {\n return false;\n }\n\n // Remove the first value from the stack of traversed values.\n aStack.pop();\n bStack.pop();\n return true;\n};\n\nconst isObject = (a: any) => a !== null && typeof a === 'object';\n\nconst isObjectWithKeys = (a: any) =>\n isObject(a) &&\n !(a instanceof Error) &&\n !(a instanceof Array) &&\n !(a instanceof Date);\n\nexport const subsetEquality = (\n object: any,\n subset: any,\n): undefined | boolean => {\n // subsetEquality needs to keep track of the references\n // it has already visited to avoid infinite loops in case\n // there are circular references in the subset passed to it.\n const subsetEqualityWithContext = (\n seenReferences: WeakMap<object, boolean> = new WeakMap(),\n ) => (object: any, subset: any): undefined | boolean => {\n if (!isObjectWithKeys(subset)) {\n return undefined;\n }\n\n return Object.keys(subset).every(key => {\n if (isObjectWithKeys(subset[key])) {\n if (seenReferences.has(subset[key])) {\n return equals(object[key], subset[key], [iterableEquality]);\n }\n seenReferences.set(subset[key], true);\n }\n const result =\n object != null &&\n hasOwnProperty(object, key) &&\n equals(object[key], subset[key], [\n iterableEquality,\n subsetEqualityWithContext(seenReferences),\n ]);\n // The main goal of using seenReference is to avoid circular node on tree.\n // It will only happen within a parent and its child, not a node and nodes next to it (same level)\n // We should keep the reference for a parent and its child only\n // Thus we should delete the reference immediately so that it doesn't interfere\n // other nodes within the same level on tree.\n seenReferences.delete(subset[key]);\n return result;\n });\n };\n\n return subsetEqualityWithContext()(object, subset);\n};\n\nexport const typeEquality = (a: any, b: any) => {\n if (a == null || b == null || a.constructor === b.constructor) {\n return undefined;\n }\n\n return false;\n};\n\nexport const sparseArrayEquality = (a: unknown, b: unknown) => {\n if (!Array.isArray(a) || !Array.isArray(b)) {\n return undefined;\n }\n\n // A sparse array [, , 1] will have keys [\"2\"] whereas [undefined, undefined, 1] will have keys [\"0\", \"1\", \"2\"]\n const aKeys = Object.keys(a);\n const bKeys = Object.keys(b);\n return (\n equals(a, b, [iterableEquality, typeEquality], true) && equals(aKeys, bKeys)\n );\n};\n\nexport const partition = <T>(\n items: Array<T>,\n predicate: (arg: T) => boolean,\n): [Array<T>, Array<T>] => {\n const result: [Array<T>, Array<T>] = [[], []];\n\n items.forEach(item => result[predicate(item) ? 0 : 1].push(item));\n\n return result;\n};\n\n// Copied from https://github.com/graingert/angular.js/blob/a43574052e9775cbc1d7dd8a086752c979b0f020/src/Angular.js#L685-L693\nexport const isError = (value: unknown) => {\n switch (Object.prototype.toString.call(value)) {\n case '[object Error]':\n return true;\n case '[object Exception]':\n return true;\n case '[object DOMException]':\n return true;\n default:\n return value instanceof Error;\n }\n};\n\nexport function emptyObject(obj: any) {\n return obj && typeof obj === 'object' ? !Object.keys(obj).length : false;\n}\n\nconst MULTILINE_REGEXP = /[\\r\\n]/;\n\nexport const isOneline = (expected: any, received: any): boolean =>\n typeof expected === 'string' &&\n typeof received === 'string' &&\n (!MULTILINE_REGEXP.test(expected) || !MULTILINE_REGEXP.test(received));\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.cleanupSemantic = exports.DIFF_INSERT = exports.DIFF_DELETE = exports.DIFF_EQUAL = exports.Diff = void 0;\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\n\n/**\n * Diff Match and Patch\n * Copyright 2018 The diff-match-patch Authors.\n * https://github.com/google/diff-match-patch\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @fileoverview Computes the difference between two texts to create a patch.\n * Applies the patch onto another text, allowing for errors.\n * @author fraser@google.com (Neil Fraser)\n */\n\n/**\n * CHANGES by pedrottimark to diff_match_patch_uncompressed.ts file:\n *\n * 1. Delete anything not needed to use diff_cleanupSemantic method\n * 2. Convert from prototype properties to var declarations\n * 3. Convert Diff to class from constructor and prototype\n * 4. Add type annotations for arguments and return values\n * 5. Add exports\n */\n\n/**\n * The data structure representing a diff is an array of tuples:\n * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']]\n * which means: delete 'Hello', add 'Goodbye' and keep ' world.'\n */\nvar DIFF_DELETE = -1;\nexports.DIFF_DELETE = DIFF_DELETE;\nvar DIFF_INSERT = 1;\nexports.DIFF_INSERT = DIFF_INSERT;\nvar DIFF_EQUAL = 0;\n/**\n * Class representing one diff tuple.\n * Attempts to look like a two-element array (which is what this used to be).\n * @param {number} op Operation, one of: DIFF_DELETE, DIFF_INSERT, DIFF_EQUAL.\n * @param {string} text Text to be deleted, inserted, or retained.\n * @constructor\n */\n\nexports.DIFF_EQUAL = DIFF_EQUAL;\n\nclass Diff {\n constructor(op, text) {\n _defineProperty(this, 0, void 0);\n\n _defineProperty(this, 1, void 0);\n\n this[0] = op;\n this[1] = text;\n }\n}\n/**\n * Determine the common prefix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the start of each\n * string.\n */\n\nexports.Diff = Diff;\n\nvar diff_commonPrefix = function(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 || text1.charAt(0) != text2.charAt(0)) {\n return 0;\n } // Binary search.\n // Performance analysis: https://neil.fraser.name/news/2007/10/09/\n\n var pointermin = 0;\n var pointermax = Math.min(text1.length, text2.length);\n var pointermid = pointermax;\n var pointerstart = 0;\n\n while (pointermin < pointermid) {\n if (\n text1.substring(pointerstart, pointermid) ==\n text2.substring(pointerstart, pointermid)\n ) {\n pointermin = pointermid;\n pointerstart = pointermin;\n } else {\n pointermax = pointermid;\n }\n\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n\n return pointermid;\n};\n/**\n * Determine the common suffix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of each string.\n */\n\nvar diff_commonSuffix = function(text1, text2) {\n // Quick check for common null cases.\n if (\n !text1 ||\n !text2 ||\n text1.charAt(text1.length - 1) != text2.charAt(text2.length - 1)\n ) {\n return 0;\n } // Binary search.\n // Performance analysis: https://neil.fraser.name/news/2007/10/09/\n\n var pointermin = 0;\n var pointermax = Math.min(text1.length, text2.length);\n var pointermid = pointermax;\n var pointerend = 0;\n\n while (pointermin < pointermid) {\n if (\n text1.substring(text1.length - pointermid, text1.length - pointerend) ==\n text2.substring(text2.length - pointermid, text2.length - pointerend)\n ) {\n pointermin = pointermid;\n pointerend = pointermin;\n } else {\n pointermax = pointermid;\n }\n\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n\n return pointermid;\n};\n/**\n * Determine if the suffix of one string is the prefix of another.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of the first\n * string and the start of the second string.\n * @private\n */\n\nvar diff_commonOverlap_ = function(text1, text2) {\n // Cache the text lengths to prevent multiple calls.\n var text1_length = text1.length;\n var text2_length = text2.length; // Eliminate the null case.\n\n if (text1_length == 0 || text2_length == 0) {\n return 0;\n } // Truncate the longer string.\n\n if (text1_length > text2_length) {\n text1 = text1.substring(text1_length - text2_length);\n } else if (text1_length < text2_length) {\n text2 = text2.substring(0, text1_length);\n }\n\n var text_length = Math.min(text1_length, text2_length); // Quick check for the worst case.\n\n if (text1 == text2) {\n return text_length;\n } // Start by looking for a single character match\n // and increase length until no match is found.\n // Performance analysis: https://neil.fraser.name/news/2010/11/04/\n\n var best = 0;\n var length = 1;\n\n while (true) {\n var pattern = text1.substring(text_length - length);\n var found = text2.indexOf(pattern);\n\n if (found == -1) {\n return best;\n }\n\n length += found;\n\n if (\n found == 0 ||\n text1.substring(text_length - length) == text2.substring(0, length)\n ) {\n best = length;\n length++;\n }\n }\n};\n/**\n * Reduce the number of edits by eliminating semantically trivial equalities.\n * @param {!Array.<!diff_match_patch.Diff>} diffs Array of diff tuples.\n */\n\nvar diff_cleanupSemantic = function(diffs) {\n var changes = false;\n var equalities = []; // Stack of indices where equalities are found.\n\n var equalitiesLength = 0; // Keeping our own length var is faster in JS.\n\n /** @type {?string} */\n\n var lastEquality = null; // Always equal to diffs[equalities[equalitiesLength - 1]][1]\n\n var pointer = 0; // Index of current position.\n // Number of characters that changed prior to the equality.\n\n var length_insertions1 = 0;\n var length_deletions1 = 0; // Number of characters that changed after the equality.\n\n var length_insertions2 = 0;\n var length_deletions2 = 0;\n\n while (pointer < diffs.length) {\n if (diffs[pointer][0] == DIFF_EQUAL) {\n // Equality found.\n equalities[equalitiesLength++] = pointer;\n length_insertions1 = length_insertions2;\n length_deletions1 = length_deletions2;\n length_insertions2 = 0;\n length_deletions2 = 0;\n lastEquality = diffs[pointer][1];\n } else {\n // An insertion or deletion.\n if (diffs[pointer][0] == DIFF_INSERT) {\n length_insertions2 += diffs[pointer][1].length;\n } else {\n length_deletions2 += diffs[pointer][1].length;\n } // Eliminate an equality that is smaller or equal to the edits on both\n // sides of it.\n\n if (\n lastEquality &&\n lastEquality.length <=\n Math.max(length_insertions1, length_deletions1) &&\n lastEquality.length <= Math.max(length_insertions2, length_deletions2)\n ) {\n // Duplicate record.\n diffs.splice(\n equalities[equalitiesLength - 1],\n 0,\n new Diff(DIFF_DELETE, lastEquality)\n ); // Change second copy to insert.\n\n diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT; // Throw away the equality we just deleted.\n\n equalitiesLength--; // Throw away the previous equality (it needs to be reevaluated).\n\n equalitiesLength--;\n pointer = equalitiesLength > 0 ? equalities[equalitiesLength - 1] : -1;\n length_insertions1 = 0; // Reset the counters.\n\n length_deletions1 = 0;\n length_insertions2 = 0;\n length_deletions2 = 0;\n lastEquality = null;\n changes = true;\n }\n }\n\n pointer++;\n } // Normalize the diff.\n\n if (changes) {\n diff_cleanupMerge(diffs);\n }\n\n diff_cleanupSemanticLossless(diffs); // Find any overlaps between deletions and insertions.\n // e.g: <del>abcxxx</del><ins>xxxdef</ins>\n // -> <del>abc</del>xxx<ins>def</ins>\n // e.g: <del>xxxabc</del><ins>defxxx</ins>\n // -> <ins>def</ins>xxx<del>abc</del>\n // Only extract an overlap if it is as big as the edit ahead or behind it.\n\n pointer = 1;\n\n while (pointer < diffs.length) {\n if (\n diffs[pointer - 1][0] == DIFF_DELETE &&\n diffs[pointer][0] == DIFF_INSERT\n ) {\n var deletion = diffs[pointer - 1][1];\n var insertion = diffs[pointer][1];\n var overlap_length1 = diff_commonOverlap_(deletion, insertion);\n var overlap_length2 = diff_commonOverlap_(insertion, deletion);\n\n if (overlap_length1 >= overlap_length2) {\n if (\n overlap_length1 >= deletion.length / 2 ||\n overlap_length1 >= insertion.length / 2\n ) {\n // Overlap found. Insert an equality and trim the surrounding edits.\n diffs.splice(\n pointer,\n 0,\n new Diff(DIFF_EQUAL, insertion.substring(0, overlap_length1))\n );\n diffs[pointer - 1][1] = deletion.substring(\n 0,\n deletion.length - overlap_length1\n );\n diffs[pointer + 1][1] = insertion.substring(overlap_length1);\n pointer++;\n }\n } else {\n if (\n overlap_length2 >= deletion.length / 2 ||\n overlap_length2 >= insertion.length / 2\n ) {\n // Reverse overlap found.\n // Insert an equality and swap and trim the surrounding edits.\n diffs.splice(\n pointer,\n 0,\n new Diff(DIFF_EQUAL, deletion.substring(0, overlap_length2))\n );\n diffs[pointer - 1][0] = DIFF_INSERT;\n diffs[pointer - 1][1] = insertion.substring(\n 0,\n insertion.length - overlap_length2\n );\n diffs[pointer + 1][0] = DIFF_DELETE;\n diffs[pointer + 1][1] = deletion.substring(overlap_length2);\n pointer++;\n }\n }\n\n pointer++;\n }\n\n pointer++;\n }\n};\n/**\n * Look for single edits surrounded on both sides by equalities\n * which can be shifted sideways to align the edit to a word boundary.\n * e.g: The c<ins>at c</ins>ame. -> The <ins>cat </ins>came.\n * @param {!Array.<!diff_match_patch.Diff>} diffs Array of diff tuples.\n */\n\nexports.cleanupSemantic = diff_cleanupSemantic;\n\nvar diff_cleanupSemanticLossless = function(diffs) {\n /**\n * Given two strings, compute a score representing whether the internal\n * boundary falls on logical boundaries.\n * Scores range from 6 (best) to 0 (worst).\n * Closure, but does not reference any external variables.\n * @param {string} one First string.\n * @param {string} two Second string.\n * @return {number} The score.\n * @private\n */\n function diff_cleanupSemanticScore_(one, two) {\n if (!one || !two) {\n // Edges are the best.\n return 6;\n } // Each port of this function behaves slightly differently due to\n // subtle differences in each language's definition of things like\n // 'whitespace'. Since this function's purpose is largely cosmetic,\n // the choice has been made to use each language's native features\n // rather than force total conformity.\n\n var char1 = one.charAt(one.length - 1);\n var char2 = two.charAt(0);\n var nonAlphaNumeric1 = char1.match(nonAlphaNumericRegex_);\n var nonAlphaNumeric2 = char2.match(nonAlphaNumericRegex_);\n var whitespace1 = nonAlphaNumeric1 && char1.match(whitespaceRegex_);\n var whitespace2 = nonAlphaNumeric2 && char2.match(whitespaceRegex_);\n var lineBreak1 = whitespace1 && char1.match(linebreakRegex_);\n var lineBreak2 = whitespace2 && char2.match(linebreakRegex_);\n var blankLine1 = lineBreak1 && one.match(blanklineEndRegex_);\n var blankLine2 = lineBreak2 && two.match(blanklineStartRegex_);\n\n if (blankLine1 || blankLine2) {\n // Five points for blank lines.\n return 5;\n } else if (lineBreak1 || lineBreak2) {\n // Four points for line breaks.\n return 4;\n } else if (nonAlphaNumeric1 && !whitespace1 && whitespace2) {\n // Three points for end of sentences.\n return 3;\n } else if (whitespace1 || whitespace2) {\n // Two points for whitespace.\n return 2;\n } else if (nonAlphaNumeric1 || nonAlphaNumeric2) {\n // One point for non-alphanumeric.\n return 1;\n }\n\n return 0;\n }\n\n var pointer = 1; // Intentionally ignore the first and last element (don't need checking).\n\n while (pointer < diffs.length - 1) {\n if (\n diffs[pointer - 1][0] == DIFF_EQUAL &&\n diffs[pointer + 1][0] == DIFF_EQUAL\n ) {\n // This is a single edit surrounded by equalities.\n var equality1 = diffs[pointer - 1][1];\n var edit = diffs[pointer][1];\n var equality2 = diffs[pointer + 1][1]; // First, shift the edit as far left as possible.\n\n var commonOffset = diff_commonSuffix(equality1, edit);\n\n if (commonOffset) {\n var commonString = edit.substring(edit.length - commonOffset);\n equality1 = equality1.substring(0, equality1.length - commonOffset);\n edit = commonString + edit.substring(0, edit.length - commonOffset);\n equality2 = commonString + equality2;\n } // Second, step character by character right, looking for the best fit.\n\n var bestEquality1 = equality1;\n var bestEdit = edit;\n var bestEquality2 = equality2;\n var bestScore =\n diff_cleanupSemanticScore_(equality1, edit) +\n diff_cleanupSemanticScore_(edit, equality2);\n\n while (edit.charAt(0) === equality2.charAt(0)) {\n equality1 += edit.charAt(0);\n edit = edit.substring(1) + equality2.charAt(0);\n equality2 = equality2.substring(1);\n var score =\n diff_cleanupSemanticScore_(equality1, edit) +\n diff_cleanupSemanticScore_(edit, equality2); // The >= encourages trailing rather than leading whitespace on edits.\n\n if (score >= bestScore) {\n bestScore = score;\n bestEquality1 = equality1;\n bestEdit = edit;\n bestEquality2 = equality2;\n }\n }\n\n if (diffs[pointer - 1][1] != bestEquality1) {\n // We have an improvement, save it back to the diff.\n if (bestEquality1) {\n diffs[pointer - 1][1] = bestEquality1;\n } else {\n diffs.splice(pointer - 1, 1);\n pointer--;\n }\n\n diffs[pointer][1] = bestEdit;\n\n if (bestEquality2) {\n diffs[pointer + 1][1] = bestEquality2;\n } else {\n diffs.splice(pointer + 1, 1);\n pointer--;\n }\n }\n }\n\n pointer++;\n }\n}; // Define some regex patterns for matching boundaries.\n\nvar nonAlphaNumericRegex_ = /[^a-zA-Z0-9]/;\nvar whitespaceRegex_ = /\\s/;\nvar linebreakRegex_ = /[\\r\\n]/;\nvar blanklineEndRegex_ = /\\n\\r?\\n$/;\nvar blanklineStartRegex_ = /^\\r?\\n\\r?\\n/;\n/**\n * Reorder and merge like edit sections. Merge equalities.\n * Any edit section can move as long as it doesn't cross an equality.\n * @param {!Array.<!diff_match_patch.Diff>} diffs Array of diff tuples.\n */\n\nvar diff_cleanupMerge = function(diffs) {\n // Add a dummy entry at the end.\n diffs.push(new Diff(DIFF_EQUAL, ''));\n var pointer = 0;\n var count_delete = 0;\n var count_insert = 0;\n var text_delete = '';\n var text_insert = '';\n var commonlength;\n\n while (pointer < diffs.length) {\n switch (diffs[pointer][0]) {\n case DIFF_INSERT:\n count_insert++;\n text_insert += diffs[pointer][1];\n pointer++;\n break;\n\n case DIFF_DELETE:\n count_delete++;\n text_delete += diffs[pointer][1];\n pointer++;\n break;\n\n case DIFF_EQUAL:\n // Upon reaching an equality, check for prior redundancies.\n if (count_delete + count_insert > 1) {\n if (count_delete !== 0 && count_insert !== 0) {\n // Factor out any common prefixies.\n commonlength = diff_commonPrefix(text_insert, text_delete);\n\n if (commonlength !== 0) {\n if (\n pointer - count_delete - count_insert > 0 &&\n diffs[pointer - count_delete - count_insert - 1][0] ==\n DIFF_EQUAL\n ) {\n diffs[\n pointer - count_delete - count_insert - 1\n ][1] += text_insert.substring(0, commonlength);\n } else {\n diffs.splice(\n 0,\n 0,\n new Diff(DIFF_EQUAL, text_insert.substring(0, commonlength))\n );\n pointer++;\n }\n\n text_insert = text_insert.substring(commonlength);\n text_delete = text_delete.substring(commonlength);\n } // Factor out any common suffixies.\n\n commonlength = diff_commonSuffix(text_insert, text_delete);\n\n if (commonlength !== 0) {\n diffs[pointer][1] =\n text_insert.substring(text_insert.length - commonlength) +\n diffs[pointer][1];\n text_insert = text_insert.substring(\n 0,\n text_insert.length - commonlength\n );\n text_delete = text_delete.substring(\n 0,\n text_delete.length - commonlength\n );\n }\n } // Delete the offending records and add the merged ones.\n\n pointer -= count_delete + count_insert;\n diffs.splice(pointer, count_delete + count_insert);\n\n if (text_delete.length) {\n diffs.splice(pointer, 0, new Diff(DIFF_DELETE, text_delete));\n pointer++;\n }\n\n if (text_insert.length) {\n diffs.splice(pointer, 0, new Diff(DIFF_INSERT, text_insert));\n pointer++;\n }\n\n pointer++;\n } else if (pointer !== 0 && diffs[pointer - 1][0] == DIFF_EQUAL) {\n // Merge this equality with the previous one.\n diffs[pointer - 1][1] += diffs[pointer][1];\n diffs.splice(pointer, 1);\n } else {\n pointer++;\n }\n\n count_insert = 0;\n count_delete = 0;\n text_delete = '';\n text_insert = '';\n break;\n }\n }\n\n if (diffs[diffs.length - 1][1] === '') {\n diffs.pop(); // Remove the dummy entry at the end.\n } // Second pass: look for single edits surrounded on both sides by equalities\n // which can be shifted sideways to eliminate an equality.\n // e.g: A<ins>BA</ins>C -> <ins>AB</ins>AC\n\n var changes = false;\n pointer = 1; // Intentionally ignore the first and last element (don't need checking).\n\n while (pointer < diffs.length - 1) {\n if (\n diffs[pointer - 1][0] == DIFF_EQUAL &&\n diffs[pointer + 1][0] == DIFF_EQUAL\n ) {\n // This is a single edit surrounded by equalities.\n if (\n diffs[pointer][1].substring(\n diffs[pointer][1].length - diffs[pointer - 1][1].length\n ) == diffs[pointer - 1][1]\n ) {\n // Shift the edit over the previous equality.\n diffs[pointer][1] =\n diffs[pointer - 1][1] +\n diffs[pointer][1].substring(\n 0,\n diffs[pointer][1].length - diffs[pointer - 1][1].length\n );\n diffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1];\n diffs.splice(pointer - 1, 1);\n changes = true;\n } else if (\n diffs[pointer][1].substring(0, diffs[pointer + 1][1].length) ==\n diffs[pointer + 1][1]\n ) {\n // Shift the edit over the next equality.\n diffs[pointer - 1][1] += diffs[pointer + 1][1];\n diffs[pointer][1] =\n diffs[pointer][1].substring(diffs[pointer + 1][1].length) +\n diffs[pointer + 1][1];\n diffs.splice(pointer + 1, 1);\n changes = true;\n }\n }\n\n pointer++;\n } // If shifts were made, the diff needs reordering and another shift sweep.\n\n if (changes) {\n diff_cleanupMerge(diffs);\n }\n};\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.SIMILAR_MESSAGE = exports.NO_DIFF_MESSAGE = void 0;\n\nvar _chalk = _interopRequireDefault(require('chalk'));\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {default: obj};\n}\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nconst NO_DIFF_MESSAGE = _chalk.default.dim(\n 'Compared values have no visual difference.'\n);\n\nexports.NO_DIFF_MESSAGE = NO_DIFF_MESSAGE;\n\nconst SIMILAR_MESSAGE = _chalk.default.dim(\n 'Compared values serialize to the same structure.\\n' +\n 'Printing internal object structure without calling `toJSON` instead.'\n);\n\nexports.SIMILAR_MESSAGE = SIMILAR_MESSAGE;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.diffLinesRaw = exports.diffLinesUnified2 = exports.diffLinesUnified = void 0;\n\nvar _diffSequences = _interopRequireDefault(require('diff-sequences'));\n\nvar _cleanupSemantic = require('./cleanupSemantic');\n\nvar _normalizeDiffOptions = require('./normalizeDiffOptions');\n\nvar _printDiffs = require('./printDiffs');\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {default: obj};\n}\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nconst isEmptyString = lines => lines.length === 1 && lines[0].length === 0; // Compare two arrays of strings line-by-line. Format as comparison lines.\n\nconst diffLinesUnified = (aLines, bLines, options) =>\n (0, _printDiffs.printDiffLines)(\n diffLinesRaw(\n isEmptyString(aLines) ? [] : aLines,\n isEmptyString(bLines) ? [] : bLines\n ),\n (0, _normalizeDiffOptions.normalizeDiffOptions)(options)\n ); // Given two pairs of arrays of strings:\n// Compare the pair of comparison arrays line-by-line.\n// Format the corresponding lines in the pair of displayable arrays.\n\nexports.diffLinesUnified = diffLinesUnified;\n\nconst diffLinesUnified2 = (\n aLinesDisplay,\n bLinesDisplay,\n aLinesCompare,\n bLinesCompare,\n options\n) => {\n if (isEmptyString(aLinesDisplay) && isEmptyString(aLinesCompare)) {\n aLinesDisplay = [];\n aLinesCompare = [];\n }\n\n if (isEmptyString(bLinesDisplay) && isEmptyString(bLinesCompare)) {\n bLinesDisplay = [];\n bLinesCompare = [];\n }\n\n if (\n aLinesDisplay.length !== aLinesCompare.length ||\n bLinesDisplay.length !== bLinesCompare.length\n ) {\n // Fall back to diff of display lines.\n return diffLinesUnified(aLinesDisplay, bLinesDisplay, options);\n }\n\n const diffs = diffLinesRaw(aLinesCompare, bLinesCompare); // Replace comparison lines with displayable lines.\n\n let aIndex = 0;\n let bIndex = 0;\n diffs.forEach(diff => {\n switch (diff[0]) {\n case _cleanupSemantic.DIFF_DELETE:\n diff[1] = aLinesDisplay[aIndex];\n aIndex += 1;\n break;\n\n case _cleanupSemantic.DIFF_INSERT:\n diff[1] = bLinesDisplay[bIndex];\n bIndex += 1;\n break;\n\n default:\n diff[1] = bLinesDisplay[bIndex];\n aIndex += 1;\n bIndex += 1;\n }\n });\n return (0, _printDiffs.printDiffLines)(\n diffs,\n (0, _normalizeDiffOptions.normalizeDiffOptions)(options)\n );\n}; // Compare two arrays of strings line-by-line.\n\nexports.diffLinesUnified2 = diffLinesUnified2;\n\nconst diffLinesRaw = (aLines, bLines) => {\n const aLength = aLines.length;\n const bLength = bLines.length;\n\n const isCommon = (aIndex, bIndex) => aLines[aIndex] === bLines[bIndex];\n\n const diffs = [];\n let aIndex = 0;\n let bIndex = 0;\n\n const foundSubsequence = (nCommon, aCommon, bCommon) => {\n for (; aIndex !== aCommon; aIndex += 1) {\n diffs.push(\n new _cleanupSemantic.Diff(_cleanupSemantic.DIFF_DELETE, aLines[aIndex])\n );\n }\n\n for (; bIndex !== bCommon; bIndex += 1) {\n diffs.push(\n new _cleanupSemantic.Diff(_cleanupSemantic.DIFF_INSERT, bLines[bIndex])\n );\n }\n\n for (; nCommon !== 0; nCommon -= 1, aIndex += 1, bIndex += 1) {\n diffs.push(\n new _cleanupSemantic.Diff(_cleanupSemantic.DIFF_EQUAL, bLines[bIndex])\n );\n }\n };\n\n (0, _diffSequences.default)(aLength, bLength, isCommon, foundSubsequence); // After the last common subsequence, push remaining change items.\n\n for (; aIndex !== aLength; aIndex += 1) {\n diffs.push(\n new _cleanupSemantic.Diff(_cleanupSemantic.DIFF_DELETE, aLines[aIndex])\n );\n }\n\n for (; bIndex !== bLength; bIndex += 1) {\n diffs.push(\n new _cleanupSemantic.Diff(_cleanupSemantic.DIFF_INSERT, bLines[bIndex])\n );\n }\n\n return diffs;\n};\n\nexports.diffLinesRaw = diffLinesRaw;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.default = void 0;\n\nvar _diffSequences = _interopRequireDefault(require('diff-sequences'));\n\nvar _cleanupSemantic = require('./cleanupSemantic');\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {default: obj};\n}\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nconst diffStrings = (a, b) => {\n const isCommon = (aIndex, bIndex) => a[aIndex] === b[bIndex];\n\n let aIndex = 0;\n let bIndex = 0;\n const diffs = [];\n\n const foundSubsequence = (nCommon, aCommon, bCommon) => {\n if (aIndex !== aCommon) {\n diffs.push(\n new _cleanupSemantic.Diff(\n _cleanupSemantic.DIFF_DELETE,\n a.slice(aIndex, aCommon)\n )\n );\n }\n\n if (bIndex !== bCommon) {\n diffs.push(\n new _cleanupSemantic.Diff(\n _cleanupSemantic.DIFF_INSERT,\n b.slice(bIndex, bCommon)\n )\n );\n }\n\n aIndex = aCommon + nCommon; // number of characters compared in a\n\n bIndex = bCommon + nCommon; // number of characters compared in b\n\n diffs.push(\n new _cleanupSemantic.Diff(\n _cleanupSemantic.DIFF_EQUAL,\n b.slice(bCommon, bIndex)\n )\n );\n };\n\n (0, _diffSequences.default)(a.length, b.length, isCommon, foundSubsequence); // After the last common subsequence, push remaining change items.\n\n if (aIndex !== a.length) {\n diffs.push(\n new _cleanupSemantic.Diff(_cleanupSemantic.DIFF_DELETE, a.slice(aIndex))\n );\n }\n\n if (bIndex !== b.length) {\n diffs.push(\n new _cleanupSemantic.Diff(_cleanupSemantic.DIFF_INSERT, b.slice(bIndex))\n );\n }\n\n return diffs;\n};\n\nvar _default = diffStrings;\nexports.default = _default;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.default = void 0;\n\nvar _cleanupSemantic = require('./cleanupSemantic');\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\n\n// Given change op and array of diffs, return concatenated string:\n// * include common strings\n// * include change strings which have argument op with changeColor\n// * exclude change strings which have opposite op\nconst concatenateRelevantDiffs = (op, diffs, changeColor) =>\n diffs.reduce(\n (reduced, diff) =>\n reduced +\n (diff[0] === _cleanupSemantic.DIFF_EQUAL\n ? diff[1]\n : diff[0] === op && diff[1].length !== 0 // empty if change is newline\n ? changeColor(diff[1])\n : ''),\n ''\n ); // Encapsulate change lines until either a common newline or the end.\n\nclass ChangeBuffer {\n // incomplete line\n // complete lines\n constructor(op, changeColor) {\n _defineProperty(this, 'op', void 0);\n\n _defineProperty(this, 'line', void 0);\n\n _defineProperty(this, 'lines', void 0);\n\n _defineProperty(this, 'changeColor', void 0);\n\n this.op = op;\n this.line = [];\n this.lines = [];\n this.changeColor = changeColor;\n }\n\n pushSubstring(substring) {\n this.pushDiff(new _cleanupSemantic.Diff(this.op, substring));\n }\n\n pushLine() {\n // Assume call only if line has at least one diff,\n // therefore an empty line must have a diff which has an empty string.\n // If line has multiple diffs, then assume it has a common diff,\n // therefore change diffs have change color;\n // otherwise then it has line color only.\n this.lines.push(\n this.line.length !== 1\n ? new _cleanupSemantic.Diff(\n this.op,\n concatenateRelevantDiffs(this.op, this.line, this.changeColor)\n )\n : this.line[0][0] === this.op\n ? this.line[0] // can use instance\n : new _cleanupSemantic.Diff(this.op, this.line[0][1]) // was common diff\n );\n this.line.length = 0;\n }\n\n isLineEmpty() {\n return this.line.length === 0;\n } // Minor input to buffer.\n\n pushDiff(diff) {\n this.line.push(diff);\n } // Main input to buffer.\n\n align(diff) {\n const string = diff[1];\n\n if (string.includes('\\n')) {\n const substrings = string.split('\\n');\n const iLast = substrings.length - 1;\n substrings.forEach((substring, i) => {\n if (i < iLast) {\n // The first substring completes the current change line.\n // A middle substring is a change line.\n this.pushSubstring(substring);\n this.pushLine();\n } else if (substring.length !== 0) {\n // The last substring starts a change line, if it is not empty.\n // Important: This non-empty condition also automatically omits\n // the newline appended to the end of expected and received strings.\n this.pushSubstring(substring);\n }\n });\n } else {\n // Append non-multiline string to current change line.\n this.pushDiff(diff);\n }\n } // Output from buffer.\n\n moveLinesTo(lines) {\n if (!this.isLineEmpty()) {\n this.pushLine();\n }\n\n lines.push(...this.lines);\n this.lines.length = 0;\n }\n} // Encapsulate common and change lines.\n\nclass CommonBuffer {\n constructor(deleteBuffer, insertBuffer) {\n _defineProperty(this, 'deleteBuffer', void 0);\n\n _defineProperty(this, 'insertBuffer', void 0);\n\n _defineProperty(this, 'lines', void 0);\n\n this.deleteBuffer = deleteBuffer;\n this.insertBuffer = insertBuffer;\n this.lines = [];\n }\n\n pushDiffCommonLine(diff) {\n this.lines.push(diff);\n }\n\n pushDiffChangeLines(diff) {\n const isDiffEmpty = diff[1].length === 0; // An empty diff string is redundant, unless a change line is empty.\n\n if (!isDiffEmpty || this.deleteBuffer.isLineEmpty()) {\n this.deleteBuffer.pushDiff(diff);\n }\n\n if (!isDiffEmpty || this.insertBuffer.isLineEmpty()) {\n this.insertBuffer.pushDiff(diff);\n }\n }\n\n flushChangeLines() {\n this.deleteBuffer.moveLinesTo(this.lines);\n this.insertBuffer.moveLinesTo(this.lines);\n } // Input to buffer.\n\n align(diff) {\n const op = diff[0];\n const string = diff[1];\n\n if (string.includes('\\n')) {\n const substrings = string.split('\\n');\n const iLast = substrings.length - 1;\n substrings.forEach((substring, i) => {\n if (i === 0) {\n const subdiff = new _cleanupSemantic.Diff(op, substring);\n\n if (\n this.deleteBuffer.isLineEmpty() &&\n this.insertBuffer.isLineEmpty()\n ) {\n // If both current change lines are empty,\n // then the first substring is a common line.\n this.flushChangeLines();\n this.pushDiffCommonLine(subdiff);\n } else {\n // If either current change line is non-empty,\n // then the first substring completes the change lines.\n this.pushDiffChangeLines(subdiff);\n this.flushChangeLines();\n }\n } else if (i < iLast) {\n // A middle substring is a common line.\n this.pushDiffCommonLine(new _cleanupSemantic.Diff(op, substring));\n } else if (substring.length !== 0) {\n // The last substring starts a change line, if it is not empty.\n // Important: This non-empty condition also automatically omits\n // the newline appended to the end of expected and received strings.\n this.pushDiffChangeLines(new _cleanupSemantic.Diff(op, substring));\n }\n });\n } else {\n // Append non-multiline string to current change lines.\n // Important: It cannot be at the end following empty change lines,\n // because newline appended to the end of expected and received strings.\n this.pushDiffChangeLines(diff);\n }\n } // Output from buffer.\n\n getLines() {\n this.flushChangeLines();\n return this.lines;\n }\n} // Given diffs from expected and received strings,\n// return new array of diffs split or joined into lines.\n//\n// To correctly align a change line at the end, the algorithm:\n// * assumes that a newline was appended to the strings\n// * omits the last newline from the output array\n//\n// Assume the function is not called:\n// * if either expected or received is empty string\n// * if neither expected nor received is multiline string\n\nconst getAlignedDiffs = (diffs, changeColor) => {\n const deleteBuffer = new ChangeBuffer(\n _cleanupSemantic.DIFF_DELETE,\n changeColor\n );\n const insertBuffer = new ChangeBuffer(\n _cleanupSemantic.DIFF_INSERT,\n changeColor\n );\n const commonBuffer = new CommonBuffer(deleteBuffer, insertBuffer);\n diffs.forEach(diff => {\n switch (diff[0]) {\n case _cleanupSemantic.DIFF_DELETE:\n deleteBuffer.align(diff);\n break;\n\n case _cleanupSemantic.DIFF_INSERT:\n insertBuffer.align(diff);\n break;\n\n default:\n commonBuffer.align(diff);\n }\n });\n return commonBuffer.getLines();\n};\n\nvar _default = getAlignedDiffs;\nexports.default = _default;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nObject.defineProperty(exports, 'DIFF_DELETE', {\n enumerable: true,\n get: function() {\n return _cleanupSemantic.DIFF_DELETE;\n }\n});\nObject.defineProperty(exports, 'DIFF_EQUAL', {\n enumerable: true,\n get: function() {\n return _cleanupSemantic.DIFF_EQUAL;\n }\n});\nObject.defineProperty(exports, 'DIFF_INSERT', {\n enumerable: true,\n get: function() {\n return _cleanupSemantic.DIFF_INSERT;\n }\n});\nObject.defineProperty(exports, 'Diff', {\n enumerable: true,\n get: function() {\n return _cleanupSemantic.Diff;\n }\n});\nObject.defineProperty(exports, 'diffLinesRaw', {\n enumerable: true,\n get: function() {\n return _diffLines.diffLinesRaw;\n }\n});\nObject.defineProperty(exports, 'diffLinesUnified', {\n enumerable: true,\n get: function() {\n return _diffLines.diffLinesUnified;\n }\n});\nObject.defineProperty(exports, 'diffLinesUnified2', {\n enumerable: true,\n get: function() {\n return _diffLines.diffLinesUnified2;\n }\n});\nObject.defineProperty(exports, 'diffStringsRaw', {\n enumerable: true,\n get: function() {\n return _printDiffs.diffStringsRaw;\n }\n});\nObject.defineProperty(exports, 'diffStringsUnified', {\n enumerable: true,\n get: function() {\n return _printDiffs.diffStringsUnified;\n }\n});\nexports.default = void 0;\n\nvar _prettyFormat = _interopRequireDefault(require('pretty-format'));\n\nvar _chalk = _interopRequireDefault(require('chalk'));\n\nvar _jestGetType = _interopRequireDefault(require('jest-get-type'));\n\nvar _cleanupSemantic = require('./cleanupSemantic');\n\nvar _diffLines = require('./diffLines');\n\nvar _printDiffs = require('./printDiffs');\n\nvar _constants = require('./constants');\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {default: obj};\n}\n\nvar Symbol = global['jest-symbol-do-not-touch'] || global.Symbol;\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly)\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function(key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(\n target,\n key,\n Object.getOwnPropertyDescriptor(source, key)\n );\n });\n }\n }\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\n\nconst {\n AsymmetricMatcher,\n DOMCollection,\n DOMElement,\n Immutable,\n ReactElement,\n ReactTestComponent\n} = _prettyFormat.default.plugins;\nconst PLUGINS = [\n ReactTestComponent,\n ReactElement,\n DOMElement,\n DOMCollection,\n Immutable,\n AsymmetricMatcher\n];\nconst FORMAT_OPTIONS = {\n plugins: PLUGINS\n};\n\nconst FORMAT_OPTIONS_0 = _objectSpread({}, FORMAT_OPTIONS, {\n indent: 0\n});\n\nconst FALLBACK_FORMAT_OPTIONS = {\n callToJSON: false,\n maxDepth: 10,\n plugins: PLUGINS\n};\n\nconst FALLBACK_FORMAT_OPTIONS_0 = _objectSpread({}, FALLBACK_FORMAT_OPTIONS, {\n indent: 0\n}); // Generate a string that will highlight the difference between two values\n// with green and red. (similar to how github does code diffing)\n\nfunction diff(a, b, options) {\n if (Object.is(a, b)) {\n return _constants.NO_DIFF_MESSAGE;\n }\n\n const aType = (0, _jestGetType.default)(a);\n let expectedType = aType;\n let omitDifference = false;\n\n if (aType === 'object' && typeof a.asymmetricMatch === 'function') {\n if (a.$$typeof !== Symbol.for('jest.asymmetricMatcher')) {\n // Do not know expected type of user-defined asymmetric matcher.\n return null;\n }\n\n if (typeof a.getExpectedType !== 'function') {\n // For example, expect.anything() matches either null or undefined\n return null;\n }\n\n expectedType = a.getExpectedType(); // Primitive types boolean and number omit difference below.\n // For example, omit difference for expect.stringMatching(regexp)\n\n omitDifference = expectedType === 'string';\n }\n\n if (expectedType !== (0, _jestGetType.default)(b)) {\n return (\n ' Comparing two different types of values.' +\n ` Expected ${_chalk.default.green(expectedType)} but ` +\n `received ${_chalk.default.red((0, _jestGetType.default)(b))}.`\n );\n }\n\n if (omitDifference) {\n return null;\n }\n\n switch (aType) {\n case 'string':\n return (0, _diffLines.diffLinesUnified)(\n a.split('\\n'),\n b.split('\\n'),\n options\n );\n\n case 'boolean':\n case 'number':\n return comparePrimitive(a, b, options);\n\n case 'map':\n return compareObjects(sortMap(a), sortMap(b), options);\n\n case 'set':\n return compareObjects(sortSet(a), sortSet(b), options);\n\n default:\n return compareObjects(a, b, options);\n }\n}\n\nfunction comparePrimitive(a, b, options) {\n const aFormat = (0, _prettyFormat.default)(a, FORMAT_OPTIONS);\n const bFormat = (0, _prettyFormat.default)(b, FORMAT_OPTIONS);\n return aFormat === bFormat\n ? _constants.NO_DIFF_MESSAGE\n : (0, _diffLines.diffLinesUnified)(\n aFormat.split('\\n'),\n bFormat.split('\\n'),\n options\n );\n}\n\nfunction sortMap(map) {\n return new Map(Array.from(map.entries()).sort());\n}\n\nfunction sortSet(set) {\n return new Set(Array.from(set.values()).sort());\n}\n\nfunction compareObjects(a, b, options) {\n let difference;\n let hasThrown = false;\n\n try {\n const aCompare = (0, _prettyFormat.default)(a, FORMAT_OPTIONS_0);\n const bCompare = (0, _prettyFormat.default)(b, FORMAT_OPTIONS_0);\n\n if (aCompare === bCompare) {\n difference = _constants.NO_DIFF_MESSAGE;\n } else {\n const aDisplay = (0, _prettyFormat.default)(a, FORMAT_OPTIONS);\n const bDisplay = (0, _prettyFormat.default)(b, FORMAT_OPTIONS);\n difference = (0, _diffLines.diffLinesUnified2)(\n aDisplay.split('\\n'),\n bDisplay.split('\\n'),\n aCompare.split('\\n'),\n bCompare.split('\\n'),\n options\n );\n }\n } catch (e) {\n hasThrown = true;\n } // If the comparison yields no results, compare again but this time\n // without calling `toJSON`. It's also possible that toJSON might throw.\n\n if (difference === undefined || difference === _constants.NO_DIFF_MESSAGE) {\n const aCompare = (0, _prettyFormat.default)(a, FALLBACK_FORMAT_OPTIONS_0);\n const bCompare = (0, _prettyFormat.default)(b, FALLBACK_FORMAT_OPTIONS_0);\n\n if (aCompare === bCompare) {\n difference = _constants.NO_DIFF_MESSAGE;\n } else {\n const aDisplay = (0, _prettyFormat.default)(a, FALLBACK_FORMAT_OPTIONS);\n const bDisplay = (0, _prettyFormat.default)(b, FALLBACK_FORMAT_OPTIONS);\n difference = (0, _diffLines.diffLinesUnified2)(\n aDisplay.split('\\n'),\n bDisplay.split('\\n'),\n aCompare.split('\\n'),\n bCompare.split('\\n'),\n options\n );\n }\n\n if (difference !== _constants.NO_DIFF_MESSAGE && !hasThrown) {\n difference = _constants.SIMILAR_MESSAGE + '\\n\\n' + difference;\n }\n }\n\n return difference;\n}\n\nvar _default = diff;\nexports.default = _default;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.joinAlignedDiffsExpand = exports.joinAlignedDiffsNoExpand = void 0;\n\nvar _cleanupSemantic = require('./cleanupSemantic');\n\nvar _printDiffs = require('./printDiffs');\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n// jest --no-expand\n//\n// Given array of aligned strings with inverse highlight formatting,\n// return joined lines with diff formatting (and patch marks, if needed).\nconst joinAlignedDiffsNoExpand = (diffs, options) => {\n const iLength = diffs.length;\n const nContextLines = options.contextLines;\n const nContextLines2 = nContextLines + nContextLines; // First pass: count output lines and see if it has patches.\n\n let jLength = iLength;\n let hasExcessAtStartOrEnd = false;\n let nExcessesBetweenChanges = 0;\n let i = 0;\n\n while (i !== iLength) {\n const iStart = i;\n\n while (i !== iLength && diffs[i][0] === _cleanupSemantic.DIFF_EQUAL) {\n i += 1;\n }\n\n if (iStart !== i) {\n if (iStart === 0) {\n // at start\n if (i > nContextLines) {\n jLength -= i - nContextLines; // subtract excess common lines\n\n hasExcessAtStartOrEnd = true;\n }\n } else if (i === iLength) {\n // at end\n const n = i - iStart;\n\n if (n > nContextLines) {\n jLength -= n - nContextLines; // subtract excess common lines\n\n hasExcessAtStartOrEnd = true;\n }\n } else {\n // between changes\n const n = i - iStart;\n\n if (n > nContextLines2) {\n jLength -= n - nContextLines2; // subtract excess common lines\n\n nExcessesBetweenChanges += 1;\n }\n }\n }\n\n while (i !== iLength && diffs[i][0] !== _cleanupSemantic.DIFF_EQUAL) {\n i += 1;\n }\n }\n\n const hasPatch = nExcessesBetweenChanges !== 0 || hasExcessAtStartOrEnd;\n\n if (nExcessesBetweenChanges !== 0) {\n jLength += nExcessesBetweenChanges + 1; // add patch lines\n } else if (hasExcessAtStartOrEnd) {\n jLength += 1; // add patch line\n }\n\n const jLast = jLength - 1;\n const lines = [];\n let jPatchMark = 0; // index of placeholder line for current patch mark\n\n if (hasPatch) {\n lines.push(''); // placeholder line for first patch mark\n } // Indexes of expected or received lines in current patch:\n\n let aStart = 0;\n let bStart = 0;\n let aEnd = 0;\n let bEnd = 0;\n\n const pushCommonLine = line => {\n const j = lines.length;\n lines.push(\n (0, _printDiffs.printCommonLine)(line, j === 0 || j === jLast, options)\n );\n aEnd += 1;\n bEnd += 1;\n };\n\n const pushDeleteLine = line => {\n const j = lines.length;\n lines.push(\n (0, _printDiffs.printDeleteLine)(line, j === 0 || j === jLast, options)\n );\n aEnd += 1;\n };\n\n const pushInsertLine = line => {\n const j = lines.length;\n lines.push(\n (0, _printDiffs.printInsertLine)(line, j === 0 || j === jLast, options)\n );\n bEnd += 1;\n }; // Second pass: push lines with diff formatting (and patch marks, if needed).\n\n i = 0;\n\n while (i !== iLength) {\n let iStart = i;\n\n while (i !== iLength && diffs[i][0] === _cleanupSemantic.DIFF_EQUAL) {\n i += 1;\n }\n\n if (iStart !== i) {\n if (iStart === 0) {\n // at beginning\n if (i > nContextLines) {\n iStart = i - nContextLines;\n aStart = iStart;\n bStart = iStart;\n aEnd = aStart;\n bEnd = bStart;\n }\n\n for (let iCommon = iStart; iCommon !== i; iCommon += 1) {\n pushCommonLine(diffs[iCommon][1]);\n }\n } else if (i === iLength) {\n // at end\n const iEnd = i - iStart > nContextLines ? iStart + nContextLines : i;\n\n for (let iCommon = iStart; iCommon !== iEnd; iCommon += 1) {\n pushCommonLine(diffs[iCommon][1]);\n }\n } else {\n // between changes\n const nCommon = i - iStart;\n\n if (nCommon > nContextLines2) {\n const iEnd = iStart + nContextLines;\n\n for (let iCommon = iStart; iCommon !== iEnd; iCommon += 1) {\n pushCommonLine(diffs[iCommon][1]);\n }\n\n lines[jPatchMark] = (0, _printDiffs.createPatchMark)(\n aStart,\n aEnd,\n bStart,\n bEnd,\n options\n );\n jPatchMark = lines.length;\n lines.push(''); // placeholder line for next patch mark\n\n const nOmit = nCommon - nContextLines2;\n aStart = aEnd + nOmit;\n bStart = bEnd + nOmit;\n aEnd = aStart;\n bEnd = bStart;\n\n for (let iCommon = i - nContextLines; iCommon !== i; iCommon += 1) {\n pushCommonLine(diffs[iCommon][1]);\n }\n } else {\n for (let iCommon = iStart; iCommon !== i; iCommon += 1) {\n pushCommonLine(diffs[iCommon][1]);\n }\n }\n }\n }\n\n while (i !== iLength && diffs[i][0] === _cleanupSemantic.DIFF_DELETE) {\n pushDeleteLine(diffs[i][1]);\n i += 1;\n }\n\n while (i !== iLength && diffs[i][0] === _cleanupSemantic.DIFF_INSERT) {\n pushInsertLine(diffs[i][1]);\n i += 1;\n }\n }\n\n if (hasPatch) {\n lines[jPatchMark] = (0, _printDiffs.createPatchMark)(\n aStart,\n aEnd,\n bStart,\n bEnd,\n options\n );\n }\n\n return lines.join('\\n');\n}; // jest --expand\n//\n// Given array of aligned strings with inverse highlight formatting,\n// return joined lines with diff formatting.\n\nexports.joinAlignedDiffsNoExpand = joinAlignedDiffsNoExpand;\n\nconst joinAlignedDiffsExpand = (diffs, options) =>\n diffs\n .map((diff, i, diffs) => {\n const line = diff[1];\n const isFirstOrLast = i === 0 || i === diffs.length - 1;\n\n switch (diff[0]) {\n case _cleanupSemantic.DIFF_DELETE:\n return (0, _printDiffs.printDeleteLine)(line, isFirstOrLast, options);\n\n case _cleanupSemantic.DIFF_INSERT:\n return (0, _printDiffs.printInsertLine)(line, isFirstOrLast, options);\n\n default:\n return (0, _printDiffs.printCommonLine)(line, isFirstOrLast, options);\n }\n })\n .join('\\n');\n\nexports.joinAlignedDiffsExpand = joinAlignedDiffsExpand;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.normalizeDiffOptions = exports.noColor = void 0;\n\nvar _chalk = _interopRequireDefault(require('chalk'));\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {default: obj};\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly)\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function(key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(\n target,\n key,\n Object.getOwnPropertyDescriptor(source, key)\n );\n });\n }\n }\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\n\nconst noColor = string => string;\n\nexports.noColor = noColor;\nconst DIFF_CONTEXT_DEFAULT = 5;\nconst OPTIONS_DEFAULT = {\n aAnnotation: 'Expected',\n aColor: _chalk.default.green,\n aIndicator: '-',\n bAnnotation: 'Received',\n bColor: _chalk.default.red,\n bIndicator: '+',\n changeColor: _chalk.default.inverse,\n changeLineTrailingSpaceColor: noColor,\n commonColor: _chalk.default.dim,\n commonIndicator: ' ',\n commonLineTrailingSpaceColor: noColor,\n contextLines: DIFF_CONTEXT_DEFAULT,\n emptyFirstOrLastLinePlaceholder: '',\n expand: true,\n includeChangeCounts: false,\n omitAnnotationLines: false,\n patchColor: _chalk.default.yellow\n};\n\nconst getContextLines = contextLines =>\n typeof contextLines === 'number' &&\n Number.isSafeInteger(contextLines) &&\n contextLines >= 0\n ? contextLines\n : DIFF_CONTEXT_DEFAULT; // Pure function returns options with all properties.\n\nconst normalizeDiffOptions = (options = {}) =>\n _objectSpread({}, OPTIONS_DEFAULT, {}, options, {\n contextLines: getContextLines(options.contextLines)\n });\n\nexports.normalizeDiffOptions = normalizeDiffOptions;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.diffStringsRaw = exports.diffStringsUnified = exports.createPatchMark = exports.printDiffLines = exports.printAnnotation = exports.countChanges = exports.hasCommonDiff = exports.printCommonLine = exports.printInsertLine = exports.printDeleteLine = void 0;\n\nvar _cleanupSemantic = require('./cleanupSemantic');\n\nvar _diffLines = require('./diffLines');\n\nvar _diffStrings = _interopRequireDefault(require('./diffStrings'));\n\nvar _getAlignedDiffs = _interopRequireDefault(require('./getAlignedDiffs'));\n\nvar _joinAlignedDiffs = require('./joinAlignedDiffs');\n\nvar _normalizeDiffOptions = require('./normalizeDiffOptions');\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {default: obj};\n}\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nconst formatTrailingSpaces = (line, trailingSpaceFormatter) =>\n line.replace(/\\s+$/, match => trailingSpaceFormatter(match));\n\nconst printDiffLine = (\n line,\n isFirstOrLast,\n color,\n indicator,\n trailingSpaceFormatter,\n emptyFirstOrLastLinePlaceholder\n) =>\n line.length !== 0\n ? color(\n indicator + ' ' + formatTrailingSpaces(line, trailingSpaceFormatter)\n )\n : indicator !== ' '\n ? color(indicator)\n : isFirstOrLast && emptyFirstOrLastLinePlaceholder.length !== 0\n ? color(indicator + ' ' + emptyFirstOrLastLinePlaceholder)\n : '';\n\nconst printDeleteLine = (\n line,\n isFirstOrLast,\n {\n aColor,\n aIndicator,\n changeLineTrailingSpaceColor,\n emptyFirstOrLastLinePlaceholder\n }\n) =>\n printDiffLine(\n line,\n isFirstOrLast,\n aColor,\n aIndicator,\n changeLineTrailingSpaceColor,\n emptyFirstOrLastLinePlaceholder\n );\n\nexports.printDeleteLine = printDeleteLine;\n\nconst printInsertLine = (\n line,\n isFirstOrLast,\n {\n bColor,\n bIndicator,\n changeLineTrailingSpaceColor,\n emptyFirstOrLastLinePlaceholder\n }\n) =>\n printDiffLine(\n line,\n isFirstOrLast,\n bColor,\n bIndicator,\n changeLineTrailingSpaceColor,\n emptyFirstOrLastLinePlaceholder\n );\n\nexports.printInsertLine = printInsertLine;\n\nconst printCommonLine = (\n line,\n isFirstOrLast,\n {\n commonColor,\n commonIndicator,\n commonLineTrailingSpaceColor,\n emptyFirstOrLastLinePlaceholder\n }\n) =>\n printDiffLine(\n line,\n isFirstOrLast,\n commonColor,\n commonIndicator,\n commonLineTrailingSpaceColor,\n emptyFirstOrLastLinePlaceholder\n );\n\nexports.printCommonLine = printCommonLine;\n\nconst hasCommonDiff = (diffs, isMultiline) => {\n if (isMultiline) {\n // Important: Ignore common newline that was appended to multiline strings!\n const iLast = diffs.length - 1;\n return diffs.some(\n (diff, i) =>\n diff[0] === _cleanupSemantic.DIFF_EQUAL &&\n (i !== iLast || diff[1] !== '\\n')\n );\n }\n\n return diffs.some(diff => diff[0] === _cleanupSemantic.DIFF_EQUAL);\n};\n\nexports.hasCommonDiff = hasCommonDiff;\n\nconst countChanges = diffs => {\n let a = 0;\n let b = 0;\n diffs.forEach(diff => {\n switch (diff[0]) {\n case _cleanupSemantic.DIFF_DELETE:\n a += 1;\n break;\n\n case _cleanupSemantic.DIFF_INSERT:\n b += 1;\n break;\n }\n });\n return {\n a,\n b\n };\n};\n\nexports.countChanges = countChanges;\n\nconst printAnnotation = (\n {\n aAnnotation,\n aColor,\n aIndicator,\n bAnnotation,\n bColor,\n bIndicator,\n includeChangeCounts,\n omitAnnotationLines\n },\n changeCounts\n) => {\n if (omitAnnotationLines) {\n return '';\n }\n\n let aRest = '';\n let bRest = '';\n\n if (includeChangeCounts) {\n const aCount = String(changeCounts.a);\n const bCount = String(changeCounts.b); // Padding right aligns the ends of the annotations.\n\n const baAnnotationLengthDiff = bAnnotation.length - aAnnotation.length;\n const aAnnotationPadding = ' '.repeat(Math.max(0, baAnnotationLengthDiff));\n const bAnnotationPadding = ' '.repeat(Math.max(0, -baAnnotationLengthDiff)); // Padding left aligns the ends of the counts.\n\n const baCountLengthDiff = bCount.length - aCount.length;\n const aCountPadding = ' '.repeat(Math.max(0, baCountLengthDiff));\n const bCountPadding = ' '.repeat(Math.max(0, -baCountLengthDiff));\n aRest =\n aAnnotationPadding + ' ' + aIndicator + ' ' + aCountPadding + aCount;\n bRest =\n bAnnotationPadding + ' ' + bIndicator + ' ' + bCountPadding + bCount;\n }\n\n return (\n aColor(aIndicator + ' ' + aAnnotation + aRest) +\n '\\n' +\n bColor(bIndicator + ' ' + bAnnotation + bRest) +\n '\\n\\n'\n );\n};\n\nexports.printAnnotation = printAnnotation;\n\nconst printDiffLines = (diffs, options) =>\n printAnnotation(options, countChanges(diffs)) +\n (options.expand\n ? (0, _joinAlignedDiffs.joinAlignedDiffsExpand)(diffs, options)\n : (0, _joinAlignedDiffs.joinAlignedDiffsNoExpand)(diffs, options)); // In GNU diff format, indexes are one-based instead of zero-based.\n\nexports.printDiffLines = printDiffLines;\n\nconst createPatchMark = (aStart, aEnd, bStart, bEnd, {patchColor}) =>\n patchColor(\n `@@ -${aStart + 1},${aEnd - aStart} +${bStart + 1},${bEnd - bStart} @@`\n ); // Compare two strings character-by-character.\n// Format as comparison lines in which changed substrings have inverse colors.\n\nexports.createPatchMark = createPatchMark;\n\nconst diffStringsUnified = (a, b, options) => {\n if (a !== b && a.length !== 0 && b.length !== 0) {\n const isMultiline = a.includes('\\n') || b.includes('\\n'); // getAlignedDiffs assumes that a newline was appended to the strings.\n\n const diffs = diffStringsRaw(\n isMultiline ? a + '\\n' : a,\n isMultiline ? b + '\\n' : b,\n true // cleanupSemantic\n );\n\n if (hasCommonDiff(diffs, isMultiline)) {\n const optionsNormalized = (0, _normalizeDiffOptions.normalizeDiffOptions)(\n options\n );\n const lines = (0, _getAlignedDiffs.default)(\n diffs,\n optionsNormalized.changeColor\n );\n return printDiffLines(lines, optionsNormalized);\n }\n } // Fall back to line-by-line diff.\n\n return (0, _diffLines.diffLinesUnified)(\n a.split('\\n'),\n b.split('\\n'),\n options\n );\n}; // Compare two strings character-by-character.\n// Optionally clean up small common substrings, also known as chaff.\n\nexports.diffStringsUnified = diffStringsUnified;\n\nconst diffStringsRaw = (a, b, cleanup) => {\n const diffs = (0, _diffStrings.default)(a, b);\n\n if (cleanup) {\n (0, _cleanupSemantic.cleanupSemantic)(diffs); // impure function\n }\n\n return diffs;\n};\n\nexports.diffStringsRaw = diffStringsRaw;\n","'use strict';\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n// get the type of a value with handling the edge cases like `typeof []`\n// and `typeof null`\nfunction getType(value) {\n if (value === undefined) {\n return 'undefined';\n } else if (value === null) {\n return 'null';\n } else if (Array.isArray(value)) {\n return 'array';\n } else if (typeof value === 'boolean') {\n return 'boolean';\n } else if (typeof value === 'function') {\n return 'function';\n } else if (typeof value === 'number') {\n return 'number';\n } else if (typeof value === 'string') {\n return 'string';\n } else if (typeof value === 'bigint') {\n return 'bigint';\n } else if (typeof value === 'object') {\n if (value != null) {\n if (value.constructor === RegExp) {\n return 'regexp';\n } else if (value.constructor === Map) {\n return 'map';\n } else if (value.constructor === Set) {\n return 'set';\n } else if (value.constructor === Date) {\n return 'date';\n }\n }\n\n return 'object';\n } else if (typeof value === 'symbol') {\n return 'symbol';\n }\n\n throw new Error(`value of unknown type: ${value}`);\n}\n\ngetType.isPrimitive = value => Object(value) !== value;\n\nmodule.exports = getType;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.default = void 0;\n\nvar _jestGetType = _interopRequireDefault(require('jest-get-type'));\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {default: obj};\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\n\nconst supportTypes = ['map', 'array', 'object'];\n\nclass Replaceable {\n constructor(object) {\n _defineProperty(this, 'object', void 0);\n\n _defineProperty(this, 'type', void 0);\n\n this.object = object;\n this.type = (0, _jestGetType.default)(object);\n\n if (!supportTypes.includes(this.type)) {\n throw new Error(`Type ${this.type} is not support in Replaceable!`);\n }\n }\n\n static isReplaceable(obj1, obj2) {\n const obj1Type = (0, _jestGetType.default)(obj1);\n const obj2Type = (0, _jestGetType.default)(obj2);\n return obj1Type === obj2Type && supportTypes.includes(obj1Type);\n }\n\n forEach(cb) {\n if (this.type === 'object') {\n Object.entries(this.object).forEach(([key, value]) => {\n cb(value, key, this.object);\n });\n } else {\n this.object.forEach(cb);\n }\n }\n\n get(key) {\n if (this.type === 'map') {\n return this.object.get(key);\n }\n\n return this.object[key];\n }\n\n set(key, value) {\n if (this.type === 'map') {\n this.object.set(key, value);\n } else {\n this.object[key] = value;\n }\n }\n}\n\nexports.default = Replaceable;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.default = deepCyclicCopyReplaceable;\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nconst builtInObject = [\n Array,\n Buffer,\n Date,\n Float32Array,\n Float64Array,\n Int16Array,\n Int32Array,\n Int8Array,\n Map,\n Set,\n RegExp,\n Uint16Array,\n Uint32Array,\n Uint8Array,\n Uint8ClampedArray\n];\n\nconst isBuiltInObject = object => builtInObject.includes(object.constructor);\n\nconst isMap = value => value.constructor === Map;\n\nfunction deepCyclicCopyReplaceable(value, cycles = new WeakMap()) {\n if (typeof value !== 'object' || value === null) {\n return value;\n } else if (cycles.has(value)) {\n return cycles.get(value);\n } else if (Array.isArray(value)) {\n return deepCyclicCopyArray(value, cycles);\n } else if (isMap(value)) {\n return deepCyclicCopyMap(value, cycles);\n } else if (isBuiltInObject(value)) {\n return value;\n } else {\n return deepCyclicCopyObject(value, cycles);\n }\n}\n\nfunction deepCyclicCopyObject(object, cycles) {\n const newObject = Object.create(Object.getPrototypeOf(object));\n const descriptors = Object.getOwnPropertyDescriptors(object);\n cycles.set(object, newObject);\n Object.keys(descriptors).forEach(key => {\n const descriptor = descriptors[key];\n\n if (typeof descriptor.value !== 'undefined') {\n descriptor.value = deepCyclicCopyReplaceable(descriptor.value, cycles);\n }\n\n descriptor.configurable = true;\n });\n return Object.defineProperties(newObject, descriptors);\n}\n\nfunction deepCyclicCopyArray(array, cycles) {\n const newArray = new (Object.getPrototypeOf(array).constructor)(array.length);\n const length = array.length;\n cycles.set(array, newArray);\n\n for (let i = 0; i < length; i++) {\n newArray[i] = deepCyclicCopyReplaceable(array[i], cycles);\n }\n\n return newArray;\n}\n\nfunction deepCyclicCopyMap(map, cycles) {\n const newMap = new Map();\n cycles.set(map, newMap);\n map.forEach((value, key) => {\n newMap.set(key, deepCyclicCopyReplaceable(value, cycles));\n });\n return newMap;\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.matcherHint = exports.matcherErrorMessage = exports.getLabelPrinter = exports.pluralize = exports.diff = exports.printDiffOrStringify = exports.ensureExpectedIsNonNegativeInteger = exports.ensureNumbers = exports.ensureExpectedIsNumber = exports.ensureActualIsNumber = exports.ensureNoExpected = exports.printWithType = exports.printExpected = exports.printReceived = exports.highlightTrailingWhitespace = exports.stringify = exports.SUGGEST_TO_CONTAIN_EQUAL = exports.DIM_COLOR = exports.BOLD_WEIGHT = exports.INVERTED_COLOR = exports.RECEIVED_COLOR = exports.EXPECTED_COLOR = void 0;\n\nvar _chalk = _interopRequireDefault(require('chalk'));\n\nvar _jestDiff = _interopRequireWildcard(require('jest-diff'));\n\nvar _jestGetType = _interopRequireDefault(require('jest-get-type'));\n\nvar _prettyFormat = _interopRequireDefault(require('pretty-format'));\n\nvar _Replaceable = _interopRequireDefault(require('./Replaceable'));\n\nvar _deepCyclicCopyReplaceable = _interopRequireDefault(\n require('./deepCyclicCopyReplaceable')\n);\n\nfunction _getRequireWildcardCache() {\n if (typeof WeakMap !== 'function') return null;\n var cache = new WeakMap();\n _getRequireWildcardCache = function() {\n return cache;\n };\n return cache;\n}\n\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n }\n if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) {\n return {default: obj};\n }\n var cache = _getRequireWildcardCache();\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n var newObj = {};\n var hasPropertyDescriptor =\n Object.defineProperty && Object.getOwnPropertyDescriptor;\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor\n ? Object.getOwnPropertyDescriptor(obj, key)\n : null;\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n newObj.default = obj;\n if (cache) {\n cache.set(obj, newObj);\n }\n return newObj;\n}\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {default: obj};\n}\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nconst {\n AsymmetricMatcher,\n DOMCollection,\n DOMElement,\n Immutable,\n ReactElement,\n ReactTestComponent\n} = _prettyFormat.default.plugins;\nconst PLUGINS = [\n ReactTestComponent,\n ReactElement,\n DOMElement,\n DOMCollection,\n Immutable,\n AsymmetricMatcher\n];\nconst EXPECTED_COLOR = _chalk.default.green;\nexports.EXPECTED_COLOR = EXPECTED_COLOR;\nconst RECEIVED_COLOR = _chalk.default.red;\nexports.RECEIVED_COLOR = RECEIVED_COLOR;\nconst INVERTED_COLOR = _chalk.default.inverse;\nexports.INVERTED_COLOR = INVERTED_COLOR;\nconst BOLD_WEIGHT = _chalk.default.bold;\nexports.BOLD_WEIGHT = BOLD_WEIGHT;\nconst DIM_COLOR = _chalk.default.dim;\nexports.DIM_COLOR = DIM_COLOR;\nconst MULTILINE_REGEXP = /\\n/;\nconst SPACE_SYMBOL = '\\u{00B7}'; // middle dot\n\nconst NUMBERS = [\n 'zero',\n 'one',\n 'two',\n 'three',\n 'four',\n 'five',\n 'six',\n 'seven',\n 'eight',\n 'nine',\n 'ten',\n 'eleven',\n 'twelve',\n 'thirteen'\n];\n\nconst SUGGEST_TO_CONTAIN_EQUAL = _chalk.default.dim(\n 'Looks like you wanted to test for object/array equality with the stricter `toContain` matcher. You probably need to use `toContainEqual` instead.'\n);\n\nexports.SUGGEST_TO_CONTAIN_EQUAL = SUGGEST_TO_CONTAIN_EQUAL;\n\nconst stringify = (object, maxDepth = 10) => {\n const MAX_LENGTH = 10000;\n let result;\n\n try {\n result = (0, _prettyFormat.default)(object, {\n maxDepth,\n min: true,\n plugins: PLUGINS\n });\n } catch (e) {\n result = (0, _prettyFormat.default)(object, {\n callToJSON: false,\n maxDepth,\n min: true,\n plugins: PLUGINS\n });\n }\n\n return result.length >= MAX_LENGTH && maxDepth > 1\n ? stringify(object, Math.floor(maxDepth / 2))\n : result;\n};\n\nexports.stringify = stringify;\n\nconst highlightTrailingWhitespace = text =>\n text.replace(/\\s+$/gm, _chalk.default.inverse('$&')); // Instead of inverse highlight which now implies a change,\n// replace common spaces with middle dot at the end of any line.\n\nexports.highlightTrailingWhitespace = highlightTrailingWhitespace;\n\nconst replaceTrailingSpaces = text =>\n text.replace(/\\s+$/gm, spaces => SPACE_SYMBOL.repeat(spaces.length));\n\nconst printReceived = object =>\n RECEIVED_COLOR(replaceTrailingSpaces(stringify(object)));\n\nexports.printReceived = printReceived;\n\nconst printExpected = value =>\n EXPECTED_COLOR(replaceTrailingSpaces(stringify(value)));\n\nexports.printExpected = printExpected;\n\nconst printWithType = (\n name,\n value,\n print // printExpected or printReceived\n) => {\n const type = (0, _jestGetType.default)(value);\n const hasType =\n type !== 'null' && type !== 'undefined'\n ? `${name} has type: ${type}\\n`\n : '';\n const hasValue = `${name} has value: ${print(value)}`;\n return hasType + hasValue;\n};\n\nexports.printWithType = printWithType;\n\nconst ensureNoExpected = (expected, matcherName, options) => {\n if (typeof expected !== 'undefined') {\n // Prepend maybe not only for backward compatibility.\n const matcherString = (options ? '' : '[.not]') + matcherName;\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherString, undefined, '', options), // Because expected is omitted in hint above,\n // expected is black instead of green in message below.\n 'this matcher must not have an expected argument',\n printWithType('Expected', expected, printExpected)\n )\n );\n }\n};\n/**\n * Ensures that `actual` is of type `number | bigint`\n */\n\nexports.ensureNoExpected = ensureNoExpected;\n\nconst ensureActualIsNumber = (actual, matcherName, options) => {\n if (typeof actual !== 'number' && typeof actual !== 'bigint') {\n // Prepend maybe not only for backward compatibility.\n const matcherString = (options ? '' : '[.not]') + matcherName;\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherString, undefined, undefined, options),\n `${RECEIVED_COLOR('received')} value must be a number or bigint`,\n printWithType('Received', actual, printReceived)\n )\n );\n }\n};\n/**\n * Ensures that `expected` is of type `number | bigint`\n */\n\nexports.ensureActualIsNumber = ensureActualIsNumber;\n\nconst ensureExpectedIsNumber = (expected, matcherName, options) => {\n if (typeof expected !== 'number' && typeof expected !== 'bigint') {\n // Prepend maybe not only for backward compatibility.\n const matcherString = (options ? '' : '[.not]') + matcherName;\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherString, undefined, undefined, options),\n `${EXPECTED_COLOR('expected')} value must be a number or bigint`,\n printWithType('Expected', expected, printExpected)\n )\n );\n }\n};\n/**\n * Ensures that `actual` & `expected` are of type `number | bigint`\n */\n\nexports.ensureExpectedIsNumber = ensureExpectedIsNumber;\n\nconst ensureNumbers = (actual, expected, matcherName, options) => {\n ensureActualIsNumber(actual, matcherName, options);\n ensureExpectedIsNumber(expected, matcherName, options);\n};\n\nexports.ensureNumbers = ensureNumbers;\n\nconst ensureExpectedIsNonNegativeInteger = (expected, matcherName, options) => {\n if (\n typeof expected !== 'number' ||\n !Number.isSafeInteger(expected) ||\n expected < 0\n ) {\n // Prepend maybe not only for backward compatibility.\n const matcherString = (options ? '' : '[.not]') + matcherName;\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherString, undefined, undefined, options),\n `${EXPECTED_COLOR('expected')} value must be a non-negative integer`,\n printWithType('Expected', expected, printExpected)\n )\n );\n }\n}; // Given array of diffs, return concatenated string:\n// * include common substrings\n// * exclude change substrings which have opposite op\n// * include change substrings which have argument op\n// with inverse highlight only if there is a common substring\n\nexports.ensureExpectedIsNonNegativeInteger = ensureExpectedIsNonNegativeInteger;\n\nconst getCommonAndChangedSubstrings = (diffs, op, hasCommonDiff) =>\n diffs.reduce(\n (reduced, diff) =>\n reduced +\n (diff[0] === _jestDiff.DIFF_EQUAL\n ? diff[1]\n : diff[0] !== op\n ? ''\n : hasCommonDiff\n ? INVERTED_COLOR(diff[1])\n : diff[1]),\n ''\n );\n\nconst isLineDiffable = (expected, received) => {\n const expectedType = (0, _jestGetType.default)(expected);\n const receivedType = (0, _jestGetType.default)(received);\n\n if (expectedType !== receivedType) {\n return false;\n }\n\n if (_jestGetType.default.isPrimitive(expected)) {\n // Print generic line diff for strings only:\n // * if neither string is empty\n // * if either string has more than one line\n return (\n typeof expected === 'string' &&\n typeof received === 'string' &&\n expected.length !== 0 &&\n received.length !== 0 &&\n (MULTILINE_REGEXP.test(expected) || MULTILINE_REGEXP.test(received))\n );\n }\n\n if (\n expectedType === 'date' ||\n expectedType === 'function' ||\n expectedType === 'regexp'\n ) {\n return false;\n }\n\n if (expected instanceof Error && received instanceof Error) {\n return false;\n }\n\n if (\n expectedType === 'object' &&\n typeof expected.asymmetricMatch === 'function'\n ) {\n return false;\n }\n\n if (\n receivedType === 'object' &&\n typeof received.asymmetricMatch === 'function'\n ) {\n return false;\n }\n\n return true;\n};\n\nconst MAX_DIFF_STRING_LENGTH = 20000;\n\nconst printDiffOrStringify = (\n expected,\n received,\n expectedLabel,\n receivedLabel,\n expand\n) => {\n if (\n typeof expected === 'string' &&\n typeof received === 'string' &&\n expected.length !== 0 &&\n received.length !== 0 &&\n expected.length <= MAX_DIFF_STRING_LENGTH &&\n received.length <= MAX_DIFF_STRING_LENGTH &&\n expected !== received\n ) {\n if (expected.includes('\\n') || received.includes('\\n')) {\n return (0, _jestDiff.diffStringsUnified)(expected, received, {\n aAnnotation: expectedLabel,\n bAnnotation: receivedLabel,\n changeLineTrailingSpaceColor: _chalk.default.bgYellow,\n commonLineTrailingSpaceColor: _chalk.default.bgYellow,\n emptyFirstOrLastLinePlaceholder: '↵',\n // U+21B5\n expand,\n includeChangeCounts: true\n });\n }\n\n const diffs = (0, _jestDiff.diffStringsRaw)(expected, received, true);\n const hasCommonDiff = diffs.some(diff => diff[0] === _jestDiff.DIFF_EQUAL);\n const printLabel = getLabelPrinter(expectedLabel, receivedLabel);\n const expectedLine =\n printLabel(expectedLabel) +\n printExpected(\n getCommonAndChangedSubstrings(\n diffs,\n _jestDiff.DIFF_DELETE,\n hasCommonDiff\n )\n );\n const receivedLine =\n printLabel(receivedLabel) +\n printReceived(\n getCommonAndChangedSubstrings(\n diffs,\n _jestDiff.DIFF_INSERT,\n hasCommonDiff\n )\n );\n return expectedLine + '\\n' + receivedLine;\n }\n\n if (isLineDiffable(expected, received)) {\n const {\n replacedExpected,\n replacedReceived\n } = replaceMatchedToAsymmetricMatcher(\n (0, _deepCyclicCopyReplaceable.default)(expected),\n (0, _deepCyclicCopyReplaceable.default)(received),\n [],\n []\n );\n const difference = (0, _jestDiff.default)(\n replacedExpected,\n replacedReceived,\n {\n aAnnotation: expectedLabel,\n bAnnotation: receivedLabel,\n expand,\n includeChangeCounts: true\n }\n );\n\n if (\n typeof difference === 'string' &&\n difference.includes('- ' + expectedLabel) &&\n difference.includes('+ ' + receivedLabel)\n ) {\n return difference;\n }\n }\n\n const printLabel = getLabelPrinter(expectedLabel, receivedLabel);\n const expectedLine = printLabel(expectedLabel) + printExpected(expected);\n const receivedLine =\n printLabel(receivedLabel) +\n (stringify(expected) === stringify(received)\n ? 'serializes to the same string'\n : printReceived(received));\n return expectedLine + '\\n' + receivedLine;\n}; // Sometimes, e.g. when comparing two numbers, the output from jest-diff\n// does not contain more information than the `Expected:` / `Received:` already gives.\n// In those cases, we do not print a diff to make the output shorter and not redundant.\n\nexports.printDiffOrStringify = printDiffOrStringify;\n\nconst shouldPrintDiff = (actual, expected) => {\n if (typeof actual === 'number' && typeof expected === 'number') {\n return false;\n }\n\n if (typeof actual === 'bigint' && typeof expected === 'bigint') {\n return false;\n }\n\n if (typeof actual === 'boolean' && typeof expected === 'boolean') {\n return false;\n }\n\n return true;\n};\n\nfunction replaceMatchedToAsymmetricMatcher(\n replacedExpected,\n replacedReceived,\n expectedCycles,\n receivedCycles\n) {\n if (!_Replaceable.default.isReplaceable(replacedExpected, replacedReceived)) {\n return {\n replacedExpected,\n replacedReceived\n };\n }\n\n if (\n expectedCycles.includes(replacedExpected) ||\n receivedCycles.includes(replacedReceived)\n ) {\n return {\n replacedExpected,\n replacedReceived\n };\n }\n\n expectedCycles.push(replacedExpected);\n receivedCycles.push(replacedReceived);\n const expectedReplaceable = new _Replaceable.default(replacedExpected);\n const receivedReplaceable = new _Replaceable.default(replacedReceived);\n expectedReplaceable.forEach((expectedValue, key) => {\n const receivedValue = receivedReplaceable.get(key);\n\n if (isAsymmetricMatcher(expectedValue)) {\n if (expectedValue.asymmetricMatch(receivedValue)) {\n receivedReplaceable.set(key, expectedValue);\n }\n } else if (isAsymmetricMatcher(receivedValue)) {\n if (receivedValue.asymmetricMatch(expectedValue)) {\n expectedReplaceable.set(key, receivedValue);\n }\n } else if (\n _Replaceable.default.isReplaceable(expectedValue, receivedValue)\n ) {\n const replaced = replaceMatchedToAsymmetricMatcher(\n expectedValue,\n receivedValue,\n expectedCycles,\n receivedCycles\n );\n expectedReplaceable.set(key, replaced.replacedExpected);\n receivedReplaceable.set(key, replaced.replacedReceived);\n }\n });\n return {\n replacedExpected: expectedReplaceable.object,\n replacedReceived: receivedReplaceable.object\n };\n}\n\nfunction isAsymmetricMatcher(data) {\n const type = (0, _jestGetType.default)(data);\n return type === 'object' && typeof data.asymmetricMatch === 'function';\n}\n\nconst diff = (a, b, options) =>\n shouldPrintDiff(a, b) ? (0, _jestDiff.default)(a, b, options) : null;\n\nexports.diff = diff;\n\nconst pluralize = (word, count) =>\n (NUMBERS[count] || count) + ' ' + word + (count === 1 ? '' : 's'); // To display lines of labeled values as two columns with monospace alignment:\n// given the strings which will describe the values,\n// return function which given each string, returns the label:\n// string, colon, space, and enough padding spaces to align the value.\n\nexports.pluralize = pluralize;\n\nconst getLabelPrinter = (...strings) => {\n const maxLength = strings.reduce(\n (max, string) => (string.length > max ? string.length : max),\n 0\n );\n return string => `${string}: ${' '.repeat(maxLength - string.length)}`;\n};\n\nexports.getLabelPrinter = getLabelPrinter;\n\nconst matcherErrorMessage = (\n hint,\n generic,\n specific // incorrect value returned from call to printWithType\n) =>\n `${hint}\\n\\n${_chalk.default.bold('Matcher error')}: ${generic}${\n typeof specific === 'string' ? '\\n\\n' + specific : ''\n }`; // Display assertion for the report when a test fails.\n// New format: rejects/resolves, not, and matcher name have black color\n// Old format: matcher name has dim color\n\nexports.matcherErrorMessage = matcherErrorMessage;\n\nconst matcherHint = (\n matcherName,\n received = 'received',\n expected = 'expected',\n options = {}\n) => {\n const {\n comment = '',\n expectedColor = EXPECTED_COLOR,\n isDirectExpectCall = false,\n // seems redundant with received === ''\n isNot = false,\n promise = '',\n receivedColor = RECEIVED_COLOR,\n secondArgument = '',\n secondArgumentColor = EXPECTED_COLOR\n } = options;\n let hint = '';\n let dimString = 'expect'; // concatenate adjacent dim substrings\n\n if (!isDirectExpectCall && received !== '') {\n hint += DIM_COLOR(dimString + '(') + receivedColor(received);\n dimString = ')';\n }\n\n if (promise !== '') {\n hint += DIM_COLOR(dimString + '.') + promise;\n dimString = '';\n }\n\n if (isNot) {\n hint += DIM_COLOR(dimString + '.') + 'not';\n dimString = '';\n }\n\n if (matcherName.includes('.')) {\n // Old format: for backward compatibility,\n // especially without promise or isNot options\n dimString += matcherName;\n } else {\n // New format: omit period from matcherName arg\n hint += DIM_COLOR(dimString + '.') + matcherName;\n dimString = '';\n }\n\n if (expected === '') {\n dimString += '()';\n } else {\n hint += DIM_COLOR(dimString + '(') + expectedColor(expected);\n\n if (secondArgument) {\n hint += DIM_COLOR(', ') + secondArgumentColor(secondArgument);\n }\n\n dimString = ')';\n }\n\n if (comment !== '') {\n dimString += ' // ' + comment;\n }\n\n if (dimString !== '') {\n hint += DIM_COLOR(dimString);\n }\n\n return hint;\n};\n\nexports.matcherHint = matcherHint;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nObject.defineProperty(exports, 'Frame', {\n enumerable: true,\n get: function() {\n return _types.Frame;\n }\n});\nexports.separateMessageFromStack = exports.formatResultsErrors = exports.formatStackTrace = exports.getTopFrame = exports.getStackTraceLines = exports.formatExecError = void 0;\n\nvar fs = _interopRequireWildcard(require('fs'));\n\nvar path = _interopRequireWildcard(require('path'));\n\nvar _chalk = _interopRequireDefault(require('chalk'));\n\nvar _micromatch = _interopRequireDefault(require('micromatch'));\n\nvar _slash = _interopRequireDefault(require('slash'));\n\nvar _codeFrame = require('@babel/code-frame');\n\nvar _stackUtils = _interopRequireDefault(require('stack-utils'));\n\nvar _types = require('./types');\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {default: obj};\n}\n\nfunction _getRequireWildcardCache() {\n if (typeof WeakMap !== 'function') return null;\n var cache = new WeakMap();\n _getRequireWildcardCache = function() {\n return cache;\n };\n return cache;\n}\n\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n }\n if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) {\n return {default: obj};\n }\n var cache = _getRequireWildcardCache();\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n var newObj = {};\n var hasPropertyDescriptor =\n Object.defineProperty && Object.getOwnPropertyDescriptor;\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor\n ? Object.getOwnPropertyDescriptor(obj, key)\n : null;\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n newObj.default = obj;\n if (cache) {\n cache.set(obj, newObj);\n }\n return newObj;\n}\n\nvar Symbol = global['jest-symbol-do-not-touch'] || global.Symbol;\nvar Symbol = global['jest-symbol-do-not-touch'] || global.Symbol;\nvar jestReadFile =\n global[Symbol.for('jest-native-read-file')] || fs.readFileSync;\n// stack utils tries to create pretty stack by making paths relative.\nconst stackUtils = new _stackUtils.default({\n cwd: 'something which does not exist'\n});\nlet nodeInternals = [];\n\ntry {\n nodeInternals = _stackUtils.default.nodeInternals();\n} catch (e) {\n // `StackUtils.nodeInternals()` fails in browsers. We don't need to remove\n // node internals in the browser though, so no issue.\n}\n\nconst PATH_NODE_MODULES = `${path.sep}node_modules${path.sep}`;\nconst PATH_JEST_PACKAGES = `${path.sep}jest${path.sep}packages${path.sep}`; // filter for noisy stack trace lines\n\nconst JASMINE_IGNORE = /^\\s+at(?:(?:.jasmine\\-)|\\s+jasmine\\.buildExpectationResult)/;\nconst JEST_INTERNALS_IGNORE = /^\\s+at.*?jest(-.*?)?(\\/|\\\\)(build|node_modules|packages)(\\/|\\\\)/;\nconst ANONYMOUS_FN_IGNORE = /^\\s+at <anonymous>.*$/;\nconst ANONYMOUS_PROMISE_IGNORE = /^\\s+at (new )?Promise \\(<anonymous>\\).*$/;\nconst ANONYMOUS_GENERATOR_IGNORE = /^\\s+at Generator.next \\(<anonymous>\\).*$/;\nconst NATIVE_NEXT_IGNORE = /^\\s+at next \\(native\\).*$/;\nconst TITLE_INDENT = ' ';\nconst MESSAGE_INDENT = ' ';\nconst STACK_INDENT = ' ';\nconst ANCESTRY_SEPARATOR = ' \\u203A ';\n\nconst TITLE_BULLET = _chalk.default.bold('\\u25cf ');\n\nconst STACK_TRACE_COLOR = _chalk.default.dim;\nconst STACK_PATH_REGEXP = /\\s*at.*\\(?(\\:\\d*\\:\\d*|native)\\)?/;\nconst EXEC_ERROR_MESSAGE = 'Test suite failed to run';\nconst NOT_EMPTY_LINE_REGEXP = /^(?!$)/gm;\n\nconst indentAllLines = (lines, indent) =>\n lines.replace(NOT_EMPTY_LINE_REGEXP, indent);\n\nconst trim = string => (string || '').trim(); // Some errors contain not only line numbers in stack traces\n// e.g. SyntaxErrors can contain snippets of code, and we don't\n// want to trim those, because they may have pointers to the column/character\n// which will get misaligned.\n\nconst trimPaths = string =>\n string.match(STACK_PATH_REGEXP) ? trim(string) : string;\n\nconst getRenderedCallsite = (fileContent, line, column) => {\n let renderedCallsite = (0, _codeFrame.codeFrameColumns)(\n fileContent,\n {\n start: {\n column,\n line\n }\n },\n {\n highlightCode: true\n }\n );\n renderedCallsite = indentAllLines(renderedCallsite, MESSAGE_INDENT);\n renderedCallsite = `\\n${renderedCallsite}\\n`;\n return renderedCallsite;\n};\n\nconst blankStringRegexp = /^\\s*$/; // ExecError is an error thrown outside of the test suite (not inside an `it` or\n// `before/after each` hooks). If it's thrown, none of the tests in the file\n// are executed.\n\nconst formatExecError = (error, config, options, testPath, reuseMessage) => {\n if (!error || typeof error === 'number') {\n error = new Error(`Expected an Error, but \"${String(error)}\" was thrown`);\n error.stack = '';\n }\n\n let message, stack;\n\n if (typeof error === 'string' || !error) {\n error || (error = 'EMPTY ERROR');\n message = '';\n stack = error;\n } else {\n message = error.message;\n stack = error.stack;\n }\n\n const separated = separateMessageFromStack(stack || '');\n stack = separated.stack;\n\n if (separated.message.includes(trim(message))) {\n // Often stack trace already contains the duplicate of the message\n message = separated.message;\n }\n\n message = indentAllLines(message, MESSAGE_INDENT);\n stack =\n stack && !options.noStackTrace\n ? '\\n' + formatStackTrace(stack, config, options, testPath)\n : '';\n\n if (blankStringRegexp.test(message) && blankStringRegexp.test(stack)) {\n // this can happen if an empty object is thrown.\n message = MESSAGE_INDENT + 'Error: No message was provided';\n }\n\n let messageToUse;\n\n if (reuseMessage) {\n messageToUse = ` ${message.trim()}`;\n } else {\n messageToUse = `${EXEC_ERROR_MESSAGE}\\n\\n${message}`;\n }\n\n return TITLE_INDENT + TITLE_BULLET + messageToUse + stack + '\\n';\n};\n\nexports.formatExecError = formatExecError;\n\nconst removeInternalStackEntries = (lines, options) => {\n let pathCounter = 0;\n return lines.filter(line => {\n if (ANONYMOUS_FN_IGNORE.test(line)) {\n return false;\n }\n\n if (ANONYMOUS_PROMISE_IGNORE.test(line)) {\n return false;\n }\n\n if (ANONYMOUS_GENERATOR_IGNORE.test(line)) {\n return false;\n }\n\n if (NATIVE_NEXT_IGNORE.test(line)) {\n return false;\n }\n\n if (nodeInternals.some(internal => internal.test(line))) {\n return false;\n }\n\n if (!STACK_PATH_REGEXP.test(line)) {\n return true;\n }\n\n if (JASMINE_IGNORE.test(line)) {\n return false;\n }\n\n if (++pathCounter === 1) {\n return true; // always keep the first line even if it's from Jest\n }\n\n if (options.noStackTrace) {\n return false;\n }\n\n if (JEST_INTERNALS_IGNORE.test(line)) {\n return false;\n }\n\n return true;\n });\n};\n\nconst formatPaths = (config, relativeTestPath, line) => {\n // Extract the file path from the trace line.\n const match = line.match(/(^\\s*at .*?\\(?)([^()]+)(:[0-9]+:[0-9]+\\)?.*$)/);\n\n if (!match) {\n return line;\n }\n\n let filePath = (0, _slash.default)(path.relative(config.rootDir, match[2])); // highlight paths from the current test file\n\n if (\n (config.testMatch &&\n config.testMatch.length &&\n (0, _micromatch.default)([filePath], config.testMatch).length > 0) ||\n filePath === relativeTestPath\n ) {\n filePath = _chalk.default.reset.cyan(filePath);\n }\n\n return STACK_TRACE_COLOR(match[1]) + filePath + STACK_TRACE_COLOR(match[3]);\n};\n\nconst getStackTraceLines = (\n stack,\n options = {\n noStackTrace: false\n }\n) => removeInternalStackEntries(stack.split(/\\n/), options);\n\nexports.getStackTraceLines = getStackTraceLines;\n\nconst getTopFrame = lines => {\n for (const line of lines) {\n if (line.includes(PATH_NODE_MODULES) || line.includes(PATH_JEST_PACKAGES)) {\n continue;\n }\n\n const parsedFrame = stackUtils.parseLine(line.trim());\n\n if (parsedFrame && parsedFrame.file) {\n return parsedFrame;\n }\n }\n\n return null;\n};\n\nexports.getTopFrame = getTopFrame;\n\nconst formatStackTrace = (stack, config, options, testPath) => {\n const lines = getStackTraceLines(stack, options);\n const topFrame = getTopFrame(lines);\n let renderedCallsite = '';\n const relativeTestPath = testPath\n ? (0, _slash.default)(path.relative(config.rootDir, testPath))\n : null;\n\n if (topFrame) {\n const {column, file: filename, line} = topFrame;\n\n if (line && filename && path.isAbsolute(filename)) {\n let fileContent;\n\n try {\n // TODO: check & read HasteFS instead of reading the filesystem:\n // see: https://github.com/facebook/jest/pull/5405#discussion_r164281696\n fileContent = jestReadFile(filename, 'utf8');\n renderedCallsite = getRenderedCallsite(fileContent, line, column);\n } catch (e) {\n // the file does not exist or is inaccessible, we ignore\n }\n }\n }\n\n const stacktrace = lines\n .filter(Boolean)\n .map(\n line =>\n STACK_INDENT + formatPaths(config, relativeTestPath, trimPaths(line))\n )\n .join('\\n');\n return `${renderedCallsite}\\n${stacktrace}`;\n};\n\nexports.formatStackTrace = formatStackTrace;\n\nconst formatResultsErrors = (testResults, config, options, testPath) => {\n const failedResults = testResults.reduce((errors, result) => {\n result.failureMessages.forEach(content =>\n errors.push({\n content,\n result\n })\n );\n return errors;\n }, []);\n\n if (!failedResults.length) {\n return null;\n }\n\n return failedResults\n .map(({result, content}) => {\n let {message, stack} = separateMessageFromStack(content);\n stack = options.noStackTrace\n ? ''\n : STACK_TRACE_COLOR(\n formatStackTrace(stack, config, options, testPath)\n ) + '\\n';\n message = indentAllLines(message, MESSAGE_INDENT);\n const title =\n _chalk.default.bold.red(\n TITLE_INDENT +\n TITLE_BULLET +\n result.ancestorTitles.join(ANCESTRY_SEPARATOR) +\n (result.ancestorTitles.length ? ANCESTRY_SEPARATOR : '') +\n result.title\n ) + '\\n';\n return title + '\\n' + message + '\\n' + stack;\n })\n .join('\\n');\n};\n\nexports.formatResultsErrors = formatResultsErrors;\nconst errorRegexp = /^Error:?\\s*$/;\n\nconst removeBlankErrorLine = str =>\n str\n .split('\\n') // Lines saying just `Error:` are useless\n .filter(line => !errorRegexp.test(line))\n .join('\\n')\n .trimRight(); // jasmine and worker farm sometimes don't give us access to the actual\n// Error object, so we have to regexp out the message from the stack string\n// to format it.\n\nconst separateMessageFromStack = content => {\n if (!content) {\n return {\n message: '',\n stack: ''\n };\n } // All lines up to what looks like a stack -- or if nothing looks like a stack\n // (maybe it's a code frame instead), just the first non-empty line.\n // If the error is a plain \"Error:\" instead of a SyntaxError or TypeError we\n // remove the prefix from the message because it is generally not useful.\n\n const messageMatch = content.match(\n /^(?:Error: )?([\\s\\S]*?(?=\\n\\s*at\\s.*:\\d*:\\d*)|\\s*.*)([\\s\\S]*)$/\n );\n\n if (!messageMatch) {\n // For typescript\n throw new Error('If you hit this error, the regex above is buggy.');\n }\n\n const message = removeBlankErrorLine(messageMatch[1]);\n const stack = removeBlankErrorLine(messageMatch[2]);\n return {\n message,\n stack\n };\n};\n\nexports.separateMessageFromStack = separateMessageFromStack;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.printIteratorEntries = printIteratorEntries;\nexports.printIteratorValues = printIteratorValues;\nexports.printListItems = printListItems;\nexports.printObjectProperties = printObjectProperties;\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst getKeysOfEnumerableProperties = object => {\n const keys = Object.keys(object).sort();\n\n if (Object.getOwnPropertySymbols) {\n Object.getOwnPropertySymbols(object).forEach(symbol => {\n if (Object.getOwnPropertyDescriptor(object, symbol).enumerable) {\n keys.push(symbol);\n }\n });\n }\n\n return keys;\n};\n/**\n * Return entries (for example, of a map)\n * with spacing, indentation, and comma\n * without surrounding punctuation (for example, braces)\n */\n\nfunction printIteratorEntries( // Flow 0.51.0: property `@@iterator` of $Iterator not found in Object\n // To allow simplistic getRecordIterator in immutable.js\n // replaced Iterator<[any, any]> with any\n iterator,\n config,\n indentation,\n depth,\n refs,\n printer, // Too bad, so sad that separator for ECMAScript Map has been ' => '\n // What a distracting diff if you change a data structure to/from\n // ECMAScript Object or Immutable.Map/OrderedMap which use the default.\n separator = ': '\n) {\n let result = '';\n let current = iterator.next();\n\n if (!current.done) {\n result += config.spacingOuter;\n const indentationNext = indentation + config.indent;\n\n while (!current.done) {\n const name = printer(\n current.value[0],\n config,\n indentationNext,\n depth,\n refs\n );\n const value = printer(\n current.value[1],\n config,\n indentationNext,\n depth,\n refs\n );\n result += indentationNext + name + separator + value;\n current = iterator.next();\n\n if (!current.done) {\n result += ',' + config.spacingInner;\n } else if (!config.min) {\n result += ',';\n }\n }\n\n result += config.spacingOuter + indentation;\n }\n\n return result;\n}\n/**\n * Return values (for example, of a set)\n * with spacing, indentation, and comma\n * without surrounding punctuation (braces or brackets)\n */\n\nfunction printIteratorValues(\n iterator,\n config,\n indentation,\n depth,\n refs,\n printer\n) {\n let result = '';\n let current = iterator.next();\n\n if (!current.done) {\n result += config.spacingOuter;\n const indentationNext = indentation + config.indent;\n\n while (!current.done) {\n result +=\n indentationNext +\n printer(current.value, config, indentationNext, depth, refs);\n current = iterator.next();\n\n if (!current.done) {\n result += ',' + config.spacingInner;\n } else if (!config.min) {\n result += ',';\n }\n }\n\n result += config.spacingOuter + indentation;\n }\n\n return result;\n}\n/**\n * Return items (for example, of an array)\n * with spacing, indentation, and comma\n * without surrounding punctuation (for example, brackets)\n **/\n\nfunction printListItems(list, config, indentation, depth, refs, printer) {\n let result = '';\n\n if (list.length) {\n result += config.spacingOuter;\n const indentationNext = indentation + config.indent;\n\n for (let i = 0; i < list.length; i++) {\n result +=\n indentationNext +\n printer(list[i], config, indentationNext, depth, refs);\n\n if (i < list.length - 1) {\n result += ',' + config.spacingInner;\n } else if (!config.min) {\n result += ',';\n }\n }\n\n result += config.spacingOuter + indentation;\n }\n\n return result;\n}\n/**\n * Return properties of an object\n * with spacing, indentation, and comma\n * without surrounding punctuation (for example, braces)\n */\n\nfunction printObjectProperties(val, config, indentation, depth, refs, printer) {\n let result = '';\n const keys = getKeysOfEnumerableProperties(val);\n\n if (keys.length) {\n result += config.spacingOuter;\n const indentationNext = indentation + config.indent;\n\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const name = printer(key, config, indentationNext, depth, refs);\n const value = printer(val[key], config, indentationNext, depth, refs);\n result += indentationNext + name + ': ' + value;\n\n if (i < keys.length - 1) {\n result += ',' + config.spacingInner;\n } else if (!config.min) {\n result += ',';\n }\n }\n\n result += config.spacingOuter + indentation;\n }\n\n return result;\n}\n","'use strict';\n\nvar _ansiStyles = _interopRequireDefault(require('ansi-styles'));\n\nvar _collections = require('./collections');\n\nvar _AsymmetricMatcher = _interopRequireDefault(\n require('./plugins/AsymmetricMatcher')\n);\n\nvar _ConvertAnsi = _interopRequireDefault(require('./plugins/ConvertAnsi'));\n\nvar _DOMCollection = _interopRequireDefault(require('./plugins/DOMCollection'));\n\nvar _DOMElement = _interopRequireDefault(require('./plugins/DOMElement'));\n\nvar _Immutable = _interopRequireDefault(require('./plugins/Immutable'));\n\nvar _ReactElement = _interopRequireDefault(require('./plugins/ReactElement'));\n\nvar _ReactTestComponent = _interopRequireDefault(\n require('./plugins/ReactTestComponent')\n);\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {default: obj};\n}\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nconst toString = Object.prototype.toString;\nconst toISOString = Date.prototype.toISOString;\nconst errorToString = Error.prototype.toString;\nconst regExpToString = RegExp.prototype.toString;\n/**\n * Explicitly comparing typeof constructor to function avoids undefined as name\n * when mock identity-obj-proxy returns the key as the value for any key.\n */\n\nconst getConstructorName = val =>\n (typeof val.constructor === 'function' && val.constructor.name) || 'Object';\n/* global window */\n\n/** Is val is equal to global window object? Works even if it does not exist :) */\n\nconst isWindow = val => typeof window !== 'undefined' && val === window;\n\nconst SYMBOL_REGEXP = /^Symbol\\((.*)\\)(.*)$/;\nconst NEWLINE_REGEXP = /\\n/gi;\n\nclass PrettyFormatPluginError extends Error {\n constructor(message, stack) {\n super(message);\n this.stack = stack;\n this.name = this.constructor.name;\n }\n}\n\nfunction isToStringedArrayType(toStringed) {\n return (\n toStringed === '[object Array]' ||\n toStringed === '[object ArrayBuffer]' ||\n toStringed === '[object DataView]' ||\n toStringed === '[object Float32Array]' ||\n toStringed === '[object Float64Array]' ||\n toStringed === '[object Int8Array]' ||\n toStringed === '[object Int16Array]' ||\n toStringed === '[object Int32Array]' ||\n toStringed === '[object Uint8Array]' ||\n toStringed === '[object Uint8ClampedArray]' ||\n toStringed === '[object Uint16Array]' ||\n toStringed === '[object Uint32Array]'\n );\n}\n\nfunction printNumber(val) {\n return Object.is(val, -0) ? '-0' : String(val);\n}\n\nfunction printBigInt(val) {\n return String(`${val}n`);\n}\n\nfunction printFunction(val, printFunctionName) {\n if (!printFunctionName) {\n return '[Function]';\n }\n\n return '[Function ' + (val.name || 'anonymous') + ']';\n}\n\nfunction printSymbol(val) {\n return String(val).replace(SYMBOL_REGEXP, 'Symbol($1)');\n}\n\nfunction printError(val) {\n return '[' + errorToString.call(val) + ']';\n}\n/**\n * The first port of call for printing an object, handles most of the\n * data-types in JS.\n */\n\nfunction printBasicValue(val, printFunctionName, escapeRegex, escapeString) {\n if (val === true || val === false) {\n return '' + val;\n }\n\n if (val === undefined) {\n return 'undefined';\n }\n\n if (val === null) {\n return 'null';\n }\n\n const typeOf = typeof val;\n\n if (typeOf === 'number') {\n return printNumber(val);\n }\n\n if (typeOf === 'bigint') {\n return printBigInt(val);\n }\n\n if (typeOf === 'string') {\n if (escapeString) {\n return '\"' + val.replace(/\"|\\\\/g, '\\\\$&') + '\"';\n }\n\n return '\"' + val + '\"';\n }\n\n if (typeOf === 'function') {\n return printFunction(val, printFunctionName);\n }\n\n if (typeOf === 'symbol') {\n return printSymbol(val);\n }\n\n const toStringed = toString.call(val);\n\n if (toStringed === '[object WeakMap]') {\n return 'WeakMap {}';\n }\n\n if (toStringed === '[object WeakSet]') {\n return 'WeakSet {}';\n }\n\n if (\n toStringed === '[object Function]' ||\n toStringed === '[object GeneratorFunction]'\n ) {\n return printFunction(val, printFunctionName);\n }\n\n if (toStringed === '[object Symbol]') {\n return printSymbol(val);\n }\n\n if (toStringed === '[object Date]') {\n return isNaN(+val) ? 'Date { NaN }' : toISOString.call(val);\n }\n\n if (toStringed === '[object Error]') {\n return printError(val);\n }\n\n if (toStringed === '[object RegExp]') {\n if (escapeRegex) {\n // https://github.com/benjamingr/RegExp.escape/blob/master/polyfill.js\n return regExpToString.call(val).replace(/[\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n\n return regExpToString.call(val);\n }\n\n if (val instanceof Error) {\n return printError(val);\n }\n\n return null;\n}\n/**\n * Handles more complex objects ( such as objects with circular references.\n * maps and sets etc )\n */\n\nfunction printComplexValue(\n val,\n config,\n indentation,\n depth,\n refs,\n hasCalledToJSON\n) {\n if (refs.indexOf(val) !== -1) {\n return '[Circular]';\n }\n\n refs = refs.slice();\n refs.push(val);\n const hitMaxDepth = ++depth > config.maxDepth;\n const min = config.min;\n\n if (\n config.callToJSON &&\n !hitMaxDepth &&\n val.toJSON &&\n typeof val.toJSON === 'function' &&\n !hasCalledToJSON\n ) {\n return printer(val.toJSON(), config, indentation, depth, refs, true);\n }\n\n const toStringed = toString.call(val);\n\n if (toStringed === '[object Arguments]') {\n return hitMaxDepth\n ? '[Arguments]'\n : (min ? '' : 'Arguments ') +\n '[' +\n (0, _collections.printListItems)(\n val,\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n ']';\n }\n\n if (isToStringedArrayType(toStringed)) {\n return hitMaxDepth\n ? '[' + val.constructor.name + ']'\n : (min ? '' : val.constructor.name + ' ') +\n '[' +\n (0, _collections.printListItems)(\n val,\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n ']';\n }\n\n if (toStringed === '[object Map]') {\n return hitMaxDepth\n ? '[Map]'\n : 'Map {' +\n (0, _collections.printIteratorEntries)(\n val.entries(),\n config,\n indentation,\n depth,\n refs,\n printer,\n ' => '\n ) +\n '}';\n }\n\n if (toStringed === '[object Set]') {\n return hitMaxDepth\n ? '[Set]'\n : 'Set {' +\n (0, _collections.printIteratorValues)(\n val.values(),\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n '}';\n } // Avoid failure to serialize global window object in jsdom test environment.\n // For example, not even relevant if window is prop of React element.\n\n return hitMaxDepth || isWindow(val)\n ? '[' + getConstructorName(val) + ']'\n : (min ? '' : getConstructorName(val) + ' ') +\n '{' +\n (0, _collections.printObjectProperties)(\n val,\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n '}';\n}\n\nfunction isNewPlugin(plugin) {\n return plugin.serialize != null;\n}\n\nfunction printPlugin(plugin, val, config, indentation, depth, refs) {\n let printed;\n\n try {\n printed = isNewPlugin(plugin)\n ? plugin.serialize(val, config, indentation, depth, refs, printer)\n : plugin.print(\n val,\n valChild => printer(valChild, config, indentation, depth, refs),\n str => {\n const indentationNext = indentation + config.indent;\n return (\n indentationNext +\n str.replace(NEWLINE_REGEXP, '\\n' + indentationNext)\n );\n },\n {\n edgeSpacing: config.spacingOuter,\n min: config.min,\n spacing: config.spacingInner\n },\n config.colors\n );\n } catch (error) {\n throw new PrettyFormatPluginError(error.message, error.stack);\n }\n\n if (typeof printed !== 'string') {\n throw new Error(\n `pretty-format: Plugin must return type \"string\" but instead returned \"${typeof printed}\".`\n );\n }\n\n return printed;\n}\n\nfunction findPlugin(plugins, val) {\n for (let p = 0; p < plugins.length; p++) {\n try {\n if (plugins[p].test(val)) {\n return plugins[p];\n }\n } catch (error) {\n throw new PrettyFormatPluginError(error.message, error.stack);\n }\n }\n\n return null;\n}\n\nfunction printer(val, config, indentation, depth, refs, hasCalledToJSON) {\n const plugin = findPlugin(config.plugins, val);\n\n if (plugin !== null) {\n return printPlugin(plugin, val, config, indentation, depth, refs);\n }\n\n const basicResult = printBasicValue(\n val,\n config.printFunctionName,\n config.escapeRegex,\n config.escapeString\n );\n\n if (basicResult !== null) {\n return basicResult;\n }\n\n return printComplexValue(\n val,\n config,\n indentation,\n depth,\n refs,\n hasCalledToJSON\n );\n}\n\nconst DEFAULT_THEME = {\n comment: 'gray',\n content: 'reset',\n prop: 'yellow',\n tag: 'cyan',\n value: 'green'\n};\nconst DEFAULT_THEME_KEYS = Object.keys(DEFAULT_THEME);\nconst DEFAULT_OPTIONS = {\n callToJSON: true,\n escapeRegex: false,\n escapeString: true,\n highlight: false,\n indent: 2,\n maxDepth: Infinity,\n min: false,\n plugins: [],\n printFunctionName: true,\n theme: DEFAULT_THEME\n};\n\nfunction validateOptions(options) {\n Object.keys(options).forEach(key => {\n if (!DEFAULT_OPTIONS.hasOwnProperty(key)) {\n throw new Error(`pretty-format: Unknown option \"${key}\".`);\n }\n });\n\n if (options.min && options.indent !== undefined && options.indent !== 0) {\n throw new Error(\n 'pretty-format: Options \"min\" and \"indent\" cannot be used together.'\n );\n }\n\n if (options.theme !== undefined) {\n if (options.theme === null) {\n throw new Error(`pretty-format: Option \"theme\" must not be null.`);\n }\n\n if (typeof options.theme !== 'object') {\n throw new Error(\n `pretty-format: Option \"theme\" must be of type \"object\" but instead received \"${typeof options.theme}\".`\n );\n }\n }\n}\n\nconst getColorsHighlight = options =>\n DEFAULT_THEME_KEYS.reduce((colors, key) => {\n const value =\n options.theme && options.theme[key] !== undefined\n ? options.theme[key]\n : DEFAULT_THEME[key];\n const color = value && _ansiStyles.default[value];\n\n if (\n color &&\n typeof color.close === 'string' &&\n typeof color.open === 'string'\n ) {\n colors[key] = color;\n } else {\n throw new Error(\n `pretty-format: Option \"theme\" has a key \"${key}\" whose value \"${value}\" is undefined in ansi-styles.`\n );\n }\n\n return colors;\n }, Object.create(null));\n\nconst getColorsEmpty = () =>\n DEFAULT_THEME_KEYS.reduce((colors, key) => {\n colors[key] = {\n close: '',\n open: ''\n };\n return colors;\n }, Object.create(null));\n\nconst getPrintFunctionName = options =>\n options && options.printFunctionName !== undefined\n ? options.printFunctionName\n : DEFAULT_OPTIONS.printFunctionName;\n\nconst getEscapeRegex = options =>\n options && options.escapeRegex !== undefined\n ? options.escapeRegex\n : DEFAULT_OPTIONS.escapeRegex;\n\nconst getEscapeString = options =>\n options && options.escapeString !== undefined\n ? options.escapeString\n : DEFAULT_OPTIONS.escapeString;\n\nconst getConfig = options => ({\n callToJSON:\n options && options.callToJSON !== undefined\n ? options.callToJSON\n : DEFAULT_OPTIONS.callToJSON,\n colors:\n options && options.highlight\n ? getColorsHighlight(options)\n : getColorsEmpty(),\n escapeRegex: getEscapeRegex(options),\n escapeString: getEscapeString(options),\n indent:\n options && options.min\n ? ''\n : createIndent(\n options && options.indent !== undefined\n ? options.indent\n : DEFAULT_OPTIONS.indent\n ),\n maxDepth:\n options && options.maxDepth !== undefined\n ? options.maxDepth\n : DEFAULT_OPTIONS.maxDepth,\n min: options && options.min !== undefined ? options.min : DEFAULT_OPTIONS.min,\n plugins:\n options && options.plugins !== undefined\n ? options.plugins\n : DEFAULT_OPTIONS.plugins,\n printFunctionName: getPrintFunctionName(options),\n spacingInner: options && options.min ? ' ' : '\\n',\n spacingOuter: options && options.min ? '' : '\\n'\n});\n\nfunction createIndent(indent) {\n return new Array(indent + 1).join(' ');\n}\n/**\n * Returns a presentation string of your `val` object\n * @param val any potential JavaScript object\n * @param options Custom settings\n */\n\nfunction prettyFormat(val, options) {\n if (options) {\n validateOptions(options);\n\n if (options.plugins) {\n const plugin = findPlugin(options.plugins, val);\n\n if (plugin !== null) {\n return printPlugin(plugin, val, getConfig(options), '', 0, []);\n }\n }\n }\n\n const basicResult = printBasicValue(\n val,\n getPrintFunctionName(options),\n getEscapeRegex(options),\n getEscapeString(options)\n );\n\n if (basicResult !== null) {\n return basicResult;\n }\n\n return printComplexValue(val, getConfig(options), '', 0, []);\n}\n\nprettyFormat.plugins = {\n AsymmetricMatcher: _AsymmetricMatcher.default,\n ConvertAnsi: _ConvertAnsi.default,\n DOMCollection: _DOMCollection.default,\n DOMElement: _DOMElement.default,\n Immutable: _Immutable.default,\n ReactElement: _ReactElement.default,\n ReactTestComponent: _ReactTestComponent.default\n};\n/* eslint-disable-next-line no-redeclare */\n\nmodule.exports = prettyFormat;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.default = exports.test = exports.serialize = void 0;\n\nvar _collections = require('../collections');\n\nvar Symbol = global['jest-symbol-do-not-touch'] || global.Symbol;\nconst asymmetricMatcher =\n typeof Symbol === 'function' && Symbol.for\n ? Symbol.for('jest.asymmetricMatcher')\n : 0x1357a5;\nconst SPACE = ' ';\n\nconst serialize = (val, config, indentation, depth, refs, printer) => {\n const stringedValue = val.toString();\n\n if (\n stringedValue === 'ArrayContaining' ||\n stringedValue === 'ArrayNotContaining'\n ) {\n if (++depth > config.maxDepth) {\n return '[' + stringedValue + ']';\n }\n\n return (\n stringedValue +\n SPACE +\n '[' +\n (0, _collections.printListItems)(\n val.sample,\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n ']'\n );\n }\n\n if (\n stringedValue === 'ObjectContaining' ||\n stringedValue === 'ObjectNotContaining'\n ) {\n if (++depth > config.maxDepth) {\n return '[' + stringedValue + ']';\n }\n\n return (\n stringedValue +\n SPACE +\n '{' +\n (0, _collections.printObjectProperties)(\n val.sample,\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n '}'\n );\n }\n\n if (\n stringedValue === 'StringMatching' ||\n stringedValue === 'StringNotMatching'\n ) {\n return (\n stringedValue +\n SPACE +\n printer(val.sample, config, indentation, depth, refs)\n );\n }\n\n if (\n stringedValue === 'StringContaining' ||\n stringedValue === 'StringNotContaining'\n ) {\n return (\n stringedValue +\n SPACE +\n printer(val.sample, config, indentation, depth, refs)\n );\n }\n\n return val.toAsymmetricMatcher();\n};\n\nexports.serialize = serialize;\n\nconst test = val => val && val.$$typeof === asymmetricMatcher;\n\nexports.test = test;\nconst plugin = {\n serialize,\n test\n};\nvar _default = plugin;\nexports.default = _default;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.default = exports.serialize = exports.test = void 0;\n\nvar _ansiRegex = _interopRequireDefault(require('ansi-regex'));\n\nvar _ansiStyles = _interopRequireDefault(require('ansi-styles'));\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {default: obj};\n}\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nconst toHumanReadableAnsi = text =>\n text.replace((0, _ansiRegex.default)(), match => {\n switch (match) {\n case _ansiStyles.default.red.close:\n case _ansiStyles.default.green.close:\n case _ansiStyles.default.cyan.close:\n case _ansiStyles.default.gray.close:\n case _ansiStyles.default.white.close:\n case _ansiStyles.default.yellow.close:\n case _ansiStyles.default.bgRed.close:\n case _ansiStyles.default.bgGreen.close:\n case _ansiStyles.default.bgYellow.close:\n case _ansiStyles.default.inverse.close:\n case _ansiStyles.default.dim.close:\n case _ansiStyles.default.bold.close:\n case _ansiStyles.default.reset.open:\n case _ansiStyles.default.reset.close:\n return '</>';\n\n case _ansiStyles.default.red.open:\n return '<red>';\n\n case _ansiStyles.default.green.open:\n return '<green>';\n\n case _ansiStyles.default.cyan.open:\n return '<cyan>';\n\n case _ansiStyles.default.gray.open:\n return '<gray>';\n\n case _ansiStyles.default.white.open:\n return '<white>';\n\n case _ansiStyles.default.yellow.open:\n return '<yellow>';\n\n case _ansiStyles.default.bgRed.open:\n return '<bgRed>';\n\n case _ansiStyles.default.bgGreen.open:\n return '<bgGreen>';\n\n case _ansiStyles.default.bgYellow.open:\n return '<bgYellow>';\n\n case _ansiStyles.default.inverse.open:\n return '<inverse>';\n\n case _ansiStyles.default.dim.open:\n return '<dim>';\n\n case _ansiStyles.default.bold.open:\n return '<bold>';\n\n default:\n return '';\n }\n });\n\nconst test = val =>\n typeof val === 'string' && !!val.match((0, _ansiRegex.default)());\n\nexports.test = test;\n\nconst serialize = (val, config, indentation, depth, refs, printer) =>\n printer(toHumanReadableAnsi(val), config, indentation, depth, refs);\n\nexports.serialize = serialize;\nconst plugin = {\n serialize,\n test\n};\nvar _default = plugin;\nexports.default = _default;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.default = exports.serialize = exports.test = void 0;\n\nvar _collections = require('../collections');\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly)\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function(key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(\n target,\n key,\n Object.getOwnPropertyDescriptor(source, key)\n );\n });\n }\n }\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\n\nconst SPACE = ' ';\nconst OBJECT_NAMES = ['DOMStringMap', 'NamedNodeMap'];\nconst ARRAY_REGEXP = /^(HTML\\w*Collection|NodeList)$/;\n\nconst testName = name =>\n OBJECT_NAMES.indexOf(name) !== -1 || ARRAY_REGEXP.test(name);\n\nconst test = val =>\n val &&\n val.constructor &&\n val.constructor.name &&\n testName(val.constructor.name); // Convert array of attribute objects to props object.\n\nexports.test = test;\n\nconst propsReducer = (props, attribute) => {\n props[attribute.name] = attribute.value;\n return props;\n};\n\nconst serialize = (collection, config, indentation, depth, refs, printer) => {\n const name = collection.constructor.name;\n\n if (++depth > config.maxDepth) {\n return '[' + name + ']';\n }\n\n return (\n (config.min ? '' : name + SPACE) +\n (OBJECT_NAMES.indexOf(name) !== -1\n ? '{' +\n (0, _collections.printObjectProperties)(\n name === 'NamedNodeMap'\n ? Array.prototype.reduce.call(collection, propsReducer, {})\n : _objectSpread({}, collection),\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n '}'\n : '[' +\n (0, _collections.printListItems)(\n Array.from(collection),\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n ']')\n );\n};\n\nexports.serialize = serialize;\nconst plugin = {\n serialize,\n test\n};\nvar _default = plugin;\nexports.default = _default;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.default = exports.serialize = exports.test = void 0;\n\nvar _markup = require('./lib/markup');\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nconst ELEMENT_NODE = 1;\nconst TEXT_NODE = 3;\nconst COMMENT_NODE = 8;\nconst FRAGMENT_NODE = 11;\nconst ELEMENT_REGEXP = /^((HTML|SVG)\\w*)?Element$/;\n\nconst testNode = (nodeType, name) =>\n (nodeType === ELEMENT_NODE && ELEMENT_REGEXP.test(name)) ||\n (nodeType === TEXT_NODE && name === 'Text') ||\n (nodeType === COMMENT_NODE && name === 'Comment') ||\n (nodeType === FRAGMENT_NODE && name === 'DocumentFragment');\n\nconst test = val =>\n val &&\n val.constructor &&\n val.constructor.name &&\n testNode(val.nodeType, val.constructor.name);\n\nexports.test = test;\n\nfunction nodeIsText(node) {\n return node.nodeType === TEXT_NODE;\n}\n\nfunction nodeIsComment(node) {\n return node.nodeType === COMMENT_NODE;\n}\n\nfunction nodeIsFragment(node) {\n return node.nodeType === FRAGMENT_NODE;\n}\n\nconst serialize = (node, config, indentation, depth, refs, printer) => {\n if (nodeIsText(node)) {\n return (0, _markup.printText)(node.data, config);\n }\n\n if (nodeIsComment(node)) {\n return (0, _markup.printComment)(node.data, config);\n }\n\n const type = nodeIsFragment(node)\n ? `DocumentFragment`\n : node.tagName.toLowerCase();\n\n if (++depth > config.maxDepth) {\n return (0, _markup.printElementAsLeaf)(type, config);\n }\n\n return (0, _markup.printElement)(\n type,\n (0, _markup.printProps)(\n nodeIsFragment(node)\n ? []\n : Array.from(node.attributes)\n .map(attr => attr.name)\n .sort(),\n nodeIsFragment(node)\n ? []\n : Array.from(node.attributes).reduce((props, attribute) => {\n props[attribute.name] = attribute.value;\n return props;\n }, {}),\n config,\n indentation + config.indent,\n depth,\n refs,\n printer\n ),\n (0, _markup.printChildren)(\n Array.prototype.slice.call(node.childNodes || node.children),\n config,\n indentation + config.indent,\n depth,\n refs,\n printer\n ),\n config,\n indentation\n );\n};\n\nexports.serialize = serialize;\nconst plugin = {\n serialize,\n test\n};\nvar _default = plugin;\nexports.default = _default;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.default = exports.test = exports.serialize = void 0;\n\nvar _collections = require('../collections');\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n// SENTINEL constants are from https://github.com/facebook/immutable-js\nconst IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';\nconst IS_LIST_SENTINEL = '@@__IMMUTABLE_LIST__@@';\nconst IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';\nconst IS_MAP_SENTINEL = '@@__IMMUTABLE_MAP__@@';\nconst IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';\nconst IS_RECORD_SENTINEL = '@@__IMMUTABLE_RECORD__@@'; // immutable v4\n\nconst IS_SEQ_SENTINEL = '@@__IMMUTABLE_SEQ__@@';\nconst IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@';\nconst IS_STACK_SENTINEL = '@@__IMMUTABLE_STACK__@@';\n\nconst getImmutableName = name => 'Immutable.' + name;\n\nconst printAsLeaf = name => '[' + name + ']';\n\nconst SPACE = ' ';\nconst LAZY = '…'; // Seq is lazy if it calls a method like filter\n\nconst printImmutableEntries = (\n val,\n config,\n indentation,\n depth,\n refs,\n printer,\n type\n) =>\n ++depth > config.maxDepth\n ? printAsLeaf(getImmutableName(type))\n : getImmutableName(type) +\n SPACE +\n '{' +\n (0, _collections.printIteratorEntries)(\n val.entries(),\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n '}'; // Record has an entries method because it is a collection in immutable v3.\n// Return an iterator for Immutable Record from version v3 or v4.\n\nconst getRecordEntries = val => {\n let i = 0;\n return {\n next() {\n if (i < val._keys.length) {\n const key = val._keys[i++];\n return {\n done: false,\n value: [key, val.get(key)]\n };\n }\n\n return {\n done: true\n };\n }\n };\n};\n\nconst printImmutableRecord = (\n val,\n config,\n indentation,\n depth,\n refs,\n printer\n) => {\n // _name property is defined only for an Immutable Record instance\n // which was constructed with a second optional descriptive name arg\n const name = getImmutableName(val._name || 'Record');\n return ++depth > config.maxDepth\n ? printAsLeaf(name)\n : name +\n SPACE +\n '{' +\n (0, _collections.printIteratorEntries)(\n getRecordEntries(val),\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n '}';\n};\n\nconst printImmutableSeq = (val, config, indentation, depth, refs, printer) => {\n const name = getImmutableName('Seq');\n\n if (++depth > config.maxDepth) {\n return printAsLeaf(name);\n }\n\n if (val[IS_KEYED_SENTINEL]) {\n return (\n name +\n SPACE +\n '{' + // from Immutable collection of entries or from ECMAScript object\n (val._iter || val._object\n ? (0, _collections.printIteratorEntries)(\n val.entries(),\n config,\n indentation,\n depth,\n refs,\n printer\n )\n : LAZY) +\n '}'\n );\n }\n\n return (\n name +\n SPACE +\n '[' +\n (val._iter || // from Immutable collection of values\n val._array || // from ECMAScript array\n val._collection || // from ECMAScript collection in immutable v4\n val._iterable // from ECMAScript collection in immutable v3\n ? (0, _collections.printIteratorValues)(\n val.values(),\n config,\n indentation,\n depth,\n refs,\n printer\n )\n : LAZY) +\n ']'\n );\n};\n\nconst printImmutableValues = (\n val,\n config,\n indentation,\n depth,\n refs,\n printer,\n type\n) =>\n ++depth > config.maxDepth\n ? printAsLeaf(getImmutableName(type))\n : getImmutableName(type) +\n SPACE +\n '[' +\n (0, _collections.printIteratorValues)(\n val.values(),\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n ']';\n\nconst serialize = (val, config, indentation, depth, refs, printer) => {\n if (val[IS_MAP_SENTINEL]) {\n return printImmutableEntries(\n val,\n config,\n indentation,\n depth,\n refs,\n printer,\n val[IS_ORDERED_SENTINEL] ? 'OrderedMap' : 'Map'\n );\n }\n\n if (val[IS_LIST_SENTINEL]) {\n return printImmutableValues(\n val,\n config,\n indentation,\n depth,\n refs,\n printer,\n 'List'\n );\n }\n\n if (val[IS_SET_SENTINEL]) {\n return printImmutableValues(\n val,\n config,\n indentation,\n depth,\n refs,\n printer,\n val[IS_ORDERED_SENTINEL] ? 'OrderedSet' : 'Set'\n );\n }\n\n if (val[IS_STACK_SENTINEL]) {\n return printImmutableValues(\n val,\n config,\n indentation,\n depth,\n refs,\n printer,\n 'Stack'\n );\n }\n\n if (val[IS_SEQ_SENTINEL]) {\n return printImmutableSeq(val, config, indentation, depth, refs, printer);\n } // For compatibility with immutable v3 and v4, let record be the default.\n\n return printImmutableRecord(val, config, indentation, depth, refs, printer);\n}; // Explicitly comparing sentinel properties to true avoids false positive\n// when mock identity-obj-proxy returns the key as the value for any key.\n\nexports.serialize = serialize;\n\nconst test = val =>\n val &&\n (val[IS_ITERABLE_SENTINEL] === true || val[IS_RECORD_SENTINEL] === true);\n\nexports.test = test;\nconst plugin = {\n serialize,\n test\n};\nvar _default = plugin;\nexports.default = _default;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.default = exports.test = exports.serialize = void 0;\n\nvar ReactIs = _interopRequireWildcard(require('react-is'));\n\nvar _markup = require('./lib/markup');\n\nfunction _getRequireWildcardCache() {\n if (typeof WeakMap !== 'function') return null;\n var cache = new WeakMap();\n _getRequireWildcardCache = function() {\n return cache;\n };\n return cache;\n}\n\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n }\n if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) {\n return {default: obj};\n }\n var cache = _getRequireWildcardCache();\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n var newObj = {};\n var hasPropertyDescriptor =\n Object.defineProperty && Object.getOwnPropertyDescriptor;\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor\n ? Object.getOwnPropertyDescriptor(obj, key)\n : null;\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n newObj.default = obj;\n if (cache) {\n cache.set(obj, newObj);\n }\n return newObj;\n}\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n// Given element.props.children, or subtree during recursive traversal,\n// return flattened array of children.\nconst getChildren = (arg, children = []) => {\n if (Array.isArray(arg)) {\n arg.forEach(item => {\n getChildren(item, children);\n });\n } else if (arg != null && arg !== false) {\n children.push(arg);\n }\n\n return children;\n};\n\nconst getType = element => {\n const type = element.type;\n\n if (typeof type === 'string') {\n return type;\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || 'Unknown';\n }\n\n if (ReactIs.isFragment(element)) {\n return 'React.Fragment';\n }\n\n if (ReactIs.isSuspense(element)) {\n return 'React.Suspense';\n }\n\n if (typeof type === 'object' && type !== null) {\n if (ReactIs.isContextProvider(element)) {\n return 'Context.Provider';\n }\n\n if (ReactIs.isContextConsumer(element)) {\n return 'Context.Consumer';\n }\n\n if (ReactIs.isForwardRef(element)) {\n if (type.displayName) {\n return type.displayName;\n }\n\n const functionName = type.render.displayName || type.render.name || '';\n return functionName !== ''\n ? 'ForwardRef(' + functionName + ')'\n : 'ForwardRef';\n }\n\n if (ReactIs.isMemo(element)) {\n const functionName =\n type.displayName || type.type.displayName || type.type.name || '';\n return functionName !== '' ? 'Memo(' + functionName + ')' : 'Memo';\n }\n }\n\n return 'UNDEFINED';\n};\n\nconst getPropKeys = element => {\n const {props} = element;\n return Object.keys(props)\n .filter(key => key !== 'children' && props[key] !== undefined)\n .sort();\n};\n\nconst serialize = (element, config, indentation, depth, refs, printer) =>\n ++depth > config.maxDepth\n ? (0, _markup.printElementAsLeaf)(getType(element), config)\n : (0, _markup.printElement)(\n getType(element),\n (0, _markup.printProps)(\n getPropKeys(element),\n element.props,\n config,\n indentation + config.indent,\n depth,\n refs,\n printer\n ),\n (0, _markup.printChildren)(\n getChildren(element.props.children),\n config,\n indentation + config.indent,\n depth,\n refs,\n printer\n ),\n config,\n indentation\n );\n\nexports.serialize = serialize;\n\nconst test = val => val && ReactIs.isElement(val);\n\nexports.test = test;\nconst plugin = {\n serialize,\n test\n};\nvar _default = plugin;\nexports.default = _default;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.default = exports.test = exports.serialize = void 0;\n\nvar _markup = require('./lib/markup');\n\nvar Symbol = global['jest-symbol-do-not-touch'] || global.Symbol;\nconst testSymbol =\n typeof Symbol === 'function' && Symbol.for\n ? Symbol.for('react.test.json')\n : 0xea71357;\n\nconst getPropKeys = object => {\n const {props} = object;\n return props\n ? Object.keys(props)\n .filter(key => props[key] !== undefined)\n .sort()\n : [];\n};\n\nconst serialize = (object, config, indentation, depth, refs, printer) =>\n ++depth > config.maxDepth\n ? (0, _markup.printElementAsLeaf)(object.type, config)\n : (0, _markup.printElement)(\n object.type,\n object.props\n ? (0, _markup.printProps)(\n getPropKeys(object),\n object.props,\n config,\n indentation + config.indent,\n depth,\n refs,\n printer\n )\n : '',\n object.children\n ? (0, _markup.printChildren)(\n object.children,\n config,\n indentation + config.indent,\n depth,\n refs,\n printer\n )\n : '',\n config,\n indentation\n );\n\nexports.serialize = serialize;\n\nconst test = val => val && val.$$typeof === testSymbol;\n\nexports.test = test;\nconst plugin = {\n serialize,\n test\n};\nvar _default = plugin;\nexports.default = _default;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.default = escapeHTML;\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nfunction escapeHTML(str) {\n return str.replace(/</g, '&lt;').replace(/>/g, '&gt;');\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.printElementAsLeaf = exports.printElement = exports.printComment = exports.printText = exports.printChildren = exports.printProps = void 0;\n\nvar _escapeHTML = _interopRequireDefault(require('./escapeHTML'));\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {default: obj};\n}\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n// Return empty string if keys is empty.\nconst printProps = (keys, props, config, indentation, depth, refs, printer) => {\n const indentationNext = indentation + config.indent;\n const colors = config.colors;\n return keys\n .map(key => {\n const value = props[key];\n let printed = printer(value, config, indentationNext, depth, refs);\n\n if (typeof value !== 'string') {\n if (printed.indexOf('\\n') !== -1) {\n printed =\n config.spacingOuter +\n indentationNext +\n printed +\n config.spacingOuter +\n indentation;\n }\n\n printed = '{' + printed + '}';\n }\n\n return (\n config.spacingInner +\n indentation +\n colors.prop.open +\n key +\n colors.prop.close +\n '=' +\n colors.value.open +\n printed +\n colors.value.close\n );\n })\n .join('');\n}; // Return empty string if children is empty.\n\nexports.printProps = printProps;\n\nconst printChildren = (children, config, indentation, depth, refs, printer) =>\n children\n .map(\n child =>\n config.spacingOuter +\n indentation +\n (typeof child === 'string'\n ? printText(child, config)\n : printer(child, config, indentation, depth, refs))\n )\n .join('');\n\nexports.printChildren = printChildren;\n\nconst printText = (text, config) => {\n const contentColor = config.colors.content;\n return (\n contentColor.open + (0, _escapeHTML.default)(text) + contentColor.close\n );\n};\n\nexports.printText = printText;\n\nconst printComment = (comment, config) => {\n const commentColor = config.colors.comment;\n return (\n commentColor.open +\n '<!--' +\n (0, _escapeHTML.default)(comment) +\n '-->' +\n commentColor.close\n );\n}; // Separate the functions to format props, children, and element,\n// so a plugin could override a particular function, if needed.\n// Too bad, so sad: the traditional (but unnecessary) space\n// in a self-closing tagColor requires a second test of printedProps.\n\nexports.printComment = printComment;\n\nconst printElement = (\n type,\n printedProps,\n printedChildren,\n config,\n indentation\n) => {\n const tagColor = config.colors.tag;\n return (\n tagColor.open +\n '<' +\n type +\n (printedProps &&\n tagColor.close +\n printedProps +\n config.spacingOuter +\n indentation +\n tagColor.open) +\n (printedChildren\n ? '>' +\n tagColor.close +\n printedChildren +\n config.spacingOuter +\n indentation +\n tagColor.open +\n '</' +\n type\n : (printedProps && !config.min ? '' : ' ') + '/') +\n '>' +\n tagColor.close\n );\n};\n\nexports.printElement = printElement;\n\nconst printElementAsLeaf = (type, config) => {\n const tagColor = config.colors.tag;\n return (\n tagColor.open +\n '<' +\n type +\n tagColor.close +\n ' …' +\n tagColor.open +\n ' />' +\n tagColor.close\n );\n};\n\nexports.printElementAsLeaf = printElementAsLeaf;\n"],"sourceRoot":""}