{"version":3,"file":"Utils.js","names":["_functionPrototype","_interopRequireDefault","require","_object","_hasown","_createMountWrapper","_createRenderWrapper","_wrapWithSimpleWrapper","_RootFinder","obj","__esModule","_slicedToArray","arr","i","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","TypeError","o","minLen","_arrayLikeToArray","n","Object","prototype","toString","call","slice","constructor","name","Array","from","test","len","length","arr2","r","l","t","Symbol","iterator","e","u","a","f","next","done","push","value","isArray","_typeof","ownKeys","keys","getOwnPropertySymbols","filter","getOwnPropertyDescriptor","enumerable","apply","_objectSpread","arguments","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","key","_toPropertyKey","configurable","writable","_toPrimitive","String","toPrimitive","Number","mapNativeEventNames","event","_ref","undefined","_ref$animation","animation","_ref$pointerEvents","pointerEvents","_ref$auxClick","auxClick","nativeToReactEventMap","compositionend","compositionstart","compositionupdate","keydown","keyup","keypress","contextmenu","dblclick","doubleclick","dragend","dragenter","dragexist","dragleave","dragover","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","touchcancel","touchend","touchmove","touchstart","canplay","canplaythrough","durationchange","loadeddata","loadedmetadata","loadstart","ratechange","timeupdate","volumechange","beforeinput","mouseenter","mouseleave","transitionend","animationstart","animationiteration","animationend","pointerdown","pointermove","pointerup","pointercancel","gotpointercapture","lostpointercapture","pointerenter","pointerleave","pointerover","pointerout","auxclick","propFromEvent","eventOptions","nativeEvent","concat","toUpperCase","withSetStateAllowed","fn","cleanup","global","document","result","assertDomAvailable","feature","createElement","Error","displayNameOfNode","node","type","displayName","functionName","nodeTypeFromType","isReactComponent","getIteratorFn","iteratorFn","isIterable","isArrayLike","flatten","arrs","reduce","flatArrs","item","step","flatItem","ensureKeyOrUndefined","elementToTree","el","recurse","props","ref","children","rendered","map","x","nodeType","dangerouslySetInnerHTML","error","instance","mapFind","arraylike","mapper","finder","found","isFound","find","findElement","predicate","propsWithKeysAndRef","getComponentStack","hierarchy","getNodeType","getDisplayName","tuples","RootFinder","_ref2","_ref3","_ref4","_ref6","_ref7","_ref5","closestComponent","join","simulateError","catchingInstance","rootNode","catchingType","componentDidCatch","getDerivedStateFromError","stateUpdate","setState","componentStack","getMaskedContext","contextTypes","unmaskedContext","fromEntries","getNodeFromRootFinder","isCustomComponent","tree","options","wrappingComponent","rootFinder","wrapWithWrappingComponent","wrappingComponentProps","getWrappingComponentMountRenderer","_ref8","toTree","getMountWrapperInstance","getNode","render","context","callback","setWrappingComponentProps","fakeDynamicImport","moduleToImport","Promise","resolve","compareNodeTypeOf","matchingTypeOf","$$typeof","spyMethod","methodName","getStub","lastReturnValue","originalMethod","hasOwnProp","hasOwn","descriptor","spied","_len","args","_key","restore","getLastReturnValue","spyProperty","propertyName","handlers","originalValue","wasAssigned","holder","getV","get","set","newValue","handlerNewValue","v"],"sources":["../src/Utils.js"],"sourcesContent":["import functionName from 'function.prototype.name';\nimport fromEntries from 'object.fromentries';\nimport hasOwn from 'hasown';\nimport createMountWrapper from './createMountWrapper';\nimport createRenderWrapper from './createRenderWrapper';\nimport wrap from './wrapWithSimpleWrapper';\nimport RootFinder from './RootFinder';\n\nexport {\n createMountWrapper,\n createRenderWrapper,\n wrap,\n RootFinder,\n};\n\nexport function mapNativeEventNames(event, {\n animation = false, // should be true for React 15+\n pointerEvents = false, // should be true for React 16.4+\n auxClick = false, // should be true for React 16.5+\n} = {}) {\n const nativeToReactEventMap = {\n compositionend: 'compositionEnd',\n compositionstart: 'compositionStart',\n compositionupdate: 'compositionUpdate',\n keydown: 'keyDown',\n keyup: 'keyUp',\n keypress: 'keyPress',\n contextmenu: 'contextMenu',\n dblclick: 'doubleClick',\n doubleclick: 'doubleClick', // kept for legacy. TODO: remove with next major.\n dragend: 'dragEnd',\n dragenter: 'dragEnter',\n dragexist: 'dragExit',\n dragleave: 'dragLeave',\n dragover: 'dragOver',\n dragstart: 'dragStart',\n mousedown: 'mouseDown',\n mousemove: 'mouseMove',\n mouseout: 'mouseOut',\n mouseover: 'mouseOver',\n mouseup: 'mouseUp',\n touchcancel: 'touchCancel',\n touchend: 'touchEnd',\n touchmove: 'touchMove',\n touchstart: 'touchStart',\n canplay: 'canPlay',\n canplaythrough: 'canPlayThrough',\n durationchange: 'durationChange',\n loadeddata: 'loadedData',\n loadedmetadata: 'loadedMetadata',\n loadstart: 'loadStart',\n ratechange: 'rateChange',\n timeupdate: 'timeUpdate',\n volumechange: 'volumeChange',\n beforeinput: 'beforeInput',\n mouseenter: 'mouseEnter',\n mouseleave: 'mouseLeave',\n transitionend: 'transitionEnd',\n ...(animation && {\n animationstart: 'animationStart',\n animationiteration: 'animationIteration',\n animationend: 'animationEnd',\n }),\n ...(pointerEvents && {\n pointerdown: 'pointerDown',\n pointermove: 'pointerMove',\n pointerup: 'pointerUp',\n pointercancel: 'pointerCancel',\n gotpointercapture: 'gotPointerCapture',\n lostpointercapture: 'lostPointerCapture',\n pointerenter: 'pointerEnter',\n pointerleave: 'pointerLeave',\n pointerover: 'pointerOver',\n pointerout: 'pointerOut',\n }),\n ...(auxClick && {\n auxclick: 'auxClick',\n }),\n };\n\n return nativeToReactEventMap[event] || event;\n}\n\n// 'click' => 'onClick'\n// 'mouseEnter' => 'onMouseEnter'\nexport function propFromEvent(event, eventOptions = {}) {\n const nativeEvent = mapNativeEventNames(event, eventOptions);\n return `on${nativeEvent[0].toUpperCase()}${nativeEvent.slice(1)}`;\n}\n\nexport function withSetStateAllowed(fn) {\n // NOTE(lmr):\n // this is currently here to circumvent a React bug where `setState()` is\n // not allowed without global being defined.\n let cleanup = false;\n if (typeof global.document === 'undefined') {\n cleanup = true;\n global.document = {};\n }\n const result = fn();\n if (cleanup) {\n // This works around a bug in node/jest in that developers aren't able to\n // delete things from global when running in a node vm.\n global.document = undefined;\n delete global.document;\n }\n return result;\n}\n\nexport function assertDomAvailable(feature) {\n if (!global || !global.document || !global.document.createElement) {\n throw new Error(`Enzyme's ${feature} expects a DOM environment to be loaded, but found none`);\n }\n}\n\nexport function displayNameOfNode(node) {\n if (!node) return null;\n\n const { type } = node;\n\n if (!type) return null;\n\n return type.displayName || (typeof type === 'function' ? functionName(type) : type.name || type);\n}\n\nexport function nodeTypeFromType(type) {\n if (typeof type === 'string') {\n return 'host';\n }\n if (type && type.prototype && type.prototype.isReactComponent) {\n return 'class';\n }\n return 'function';\n}\n\nfunction getIteratorFn(obj) {\n const iteratorFn = obj && (\n (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' && obj[Symbol.iterator])\n || obj['@@iterator']\n );\n\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n\n return undefined;\n}\n\nfunction isIterable(obj) {\n return !!getIteratorFn(obj);\n}\n\nexport function isArrayLike(obj) {\n return Array.isArray(obj) || (typeof obj !== 'string' && isIterable(obj));\n}\n\nexport function flatten(arrs) {\n // optimize for the most common case\n if (Array.isArray(arrs)) {\n return arrs.reduce(\n (flatArrs, item) => flatArrs.concat(isArrayLike(item) ? flatten(item) : item),\n [],\n );\n }\n\n // fallback for arbitrary iterable children\n let flatArrs = [];\n\n const iteratorFn = getIteratorFn(arrs);\n const iterator = iteratorFn.call(arrs);\n\n let step = iterator.next();\n\n while (!step.done) {\n const item = step.value;\n let flatItem;\n\n if (isArrayLike(item)) {\n flatItem = flatten(item);\n } else {\n flatItem = item;\n }\n\n flatArrs = flatArrs.concat(flatItem);\n\n step = iterator.next();\n }\n\n return flatArrs;\n}\n\nexport function ensureKeyOrUndefined(key) {\n return key || (key === '' ? '' : undefined);\n}\n\nexport function elementToTree(el, recurse = elementToTree) {\n if (typeof recurse !== 'function' && arguments.length === 3) {\n // special case for backwards compat for `.map(elementToTree)`\n recurse = elementToTree; // eslint-disable-line no-param-reassign\n }\n if (el === null || typeof el !== 'object' || !('type' in el)) {\n return el;\n }\n const {\n type,\n props,\n key,\n ref,\n } = el;\n const { children } = props;\n let rendered = null;\n if (isArrayLike(children)) {\n rendered = flatten(children).map((x) => recurse(x));\n } else if (typeof children !== 'undefined') {\n rendered = recurse(children);\n }\n\n const nodeType = nodeTypeFromType(type);\n\n if (nodeType === 'host' && props.dangerouslySetInnerHTML) {\n if (props.children != null) {\n const error = new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.');\n error.name = 'Invariant Violation';\n throw error;\n }\n }\n\n return {\n nodeType,\n type,\n props,\n key: ensureKeyOrUndefined(key),\n ref,\n instance: null,\n rendered,\n };\n}\n\nfunction mapFind(arraylike, mapper, finder) {\n let found;\n const isFound = Array.prototype.find.call(arraylike, (item) => {\n found = mapper(item);\n return finder(found);\n });\n return isFound ? found : undefined;\n}\n\nexport function findElement(el, predicate) {\n if (el === null || typeof el !== 'object' || !('type' in el)) {\n return undefined;\n }\n if (predicate(el)) {\n return el;\n }\n const { rendered } = el;\n if (isArrayLike(rendered)) {\n return mapFind(rendered, (x) => findElement(x, predicate), (x) => typeof x !== 'undefined');\n }\n return findElement(rendered, predicate);\n}\n\nexport function propsWithKeysAndRef(node) {\n if (node.ref !== null || node.key !== null) {\n return {\n ...node.props,\n key: node.key,\n ref: node.ref,\n };\n }\n return node.props;\n}\n\nexport function getComponentStack(\n hierarchy,\n getNodeType = nodeTypeFromType,\n getDisplayName = displayNameOfNode,\n) {\n const tuples = hierarchy.filter((node) => node.type !== RootFinder).map((x) => [\n getNodeType(x.type),\n getDisplayName(x),\n ]).concat([[\n 'class',\n 'WrapperComponent',\n ]]);\n\n return tuples.map(([, name], i, arr) => {\n const [, closestComponent] = arr.slice(i + 1).find(([nodeType]) => nodeType !== 'host') || [];\n return `\\n in ${name}${closestComponent ? ` (created by ${closestComponent})` : ''}`;\n }).join('');\n}\n\nexport function simulateError(\n error,\n catchingInstance,\n rootNode, // TODO: remove `rootNode` next semver-major\n hierarchy,\n getNodeType = nodeTypeFromType,\n getDisplayName = displayNameOfNode,\n catchingType = {},\n) {\n const instance = catchingInstance || {};\n\n const { componentDidCatch } = instance;\n\n const { getDerivedStateFromError } = catchingType;\n\n if (!componentDidCatch && !getDerivedStateFromError) {\n throw error;\n }\n\n if (getDerivedStateFromError) {\n const stateUpdate = getDerivedStateFromError.call(catchingType, error);\n instance.setState(stateUpdate);\n }\n\n if (componentDidCatch) {\n const componentStack = getComponentStack(hierarchy, getNodeType, getDisplayName);\n componentDidCatch.call(instance, error, { componentStack });\n }\n}\n\nexport function getMaskedContext(contextTypes, unmaskedContext) {\n if (!contextTypes || !unmaskedContext) {\n return {};\n }\n return fromEntries(Object.keys(contextTypes).map((key) => [key, unmaskedContext[key]]));\n}\n\nexport function getNodeFromRootFinder(isCustomComponent, tree, options) {\n if (!isCustomComponent(options.wrappingComponent)) {\n return tree.rendered;\n }\n const rootFinder = findElement(tree, (node) => node.type === RootFinder);\n if (!rootFinder) {\n throw new Error('`wrappingComponent` must render its children!');\n }\n return rootFinder.rendered;\n}\n\nexport function wrapWithWrappingComponent(createElement, node, options) {\n const { wrappingComponent, wrappingComponentProps } = options;\n if (!wrappingComponent) {\n return node;\n }\n return createElement(\n wrappingComponent,\n wrappingComponentProps,\n createElement(RootFinder, null, node),\n );\n}\n\nexport function getWrappingComponentMountRenderer({ toTree, getMountWrapperInstance }) {\n return {\n getNode() {\n const instance = getMountWrapperInstance();\n return instance ? toTree(instance).rendered : null;\n },\n render(el, context, callback) {\n const instance = getMountWrapperInstance();\n if (!instance) {\n throw new Error('The wrapping component may not be updated if the root is unmounted.');\n }\n return instance.setWrappingComponentProps(el.props, callback);\n },\n };\n}\n\nexport function fakeDynamicImport(moduleToImport) {\n return Promise.resolve({ default: moduleToImport });\n}\n\nexport function compareNodeTypeOf(node, matchingTypeOf) {\n if (!node) {\n return false;\n }\n return node.$$typeof === matchingTypeOf;\n}\n\n// TODO: when enzyme v3.12.0 is required, delete this\nexport function spyMethod(instance, methodName, getStub = () => {}) {\n let lastReturnValue;\n const originalMethod = instance[methodName];\n const hasOwnProp = hasOwn(instance, methodName);\n let descriptor;\n if (hasOwnProp) {\n descriptor = Object.getOwnPropertyDescriptor(instance, methodName);\n }\n Object.defineProperty(instance, methodName, {\n configurable: true,\n enumerable: !descriptor || !!descriptor.enumerable,\n value: getStub(originalMethod) || function spied(...args) {\n const result = originalMethod.apply(this, args);\n lastReturnValue = result;\n return result;\n },\n });\n return {\n restore() {\n if (hasOwnProp) {\n if (descriptor) {\n Object.defineProperty(instance, methodName, descriptor);\n } else {\n /* eslint-disable no-param-reassign */\n instance[methodName] = originalMethod;\n /* eslint-enable no-param-reassign */\n }\n } else {\n /* eslint-disable no-param-reassign */\n delete instance[methodName];\n /* eslint-enable no-param-reassign */\n }\n },\n getLastReturnValue() {\n return lastReturnValue;\n },\n };\n}\n\n// TODO: when enzyme v3.12.0 is required, delete this\nexport function spyProperty(instance, propertyName, handlers = {}) {\n const originalValue = instance[propertyName];\n const hasOwnProp = hasOwn(instance, propertyName);\n let descriptor;\n if (hasOwnProp) {\n descriptor = Object.getOwnPropertyDescriptor(instance, propertyName);\n }\n let wasAssigned = false;\n let holder = originalValue;\n const getV = handlers.get ? () => {\n const value = descriptor && descriptor.get ? descriptor.get.call(instance) : holder;\n return handlers.get.call(instance, value);\n } : () => holder;\n const set = handlers.set ? (newValue) => {\n wasAssigned = true;\n const handlerNewValue = handlers.set.call(instance, holder, newValue);\n holder = handlerNewValue;\n if (descriptor && descriptor.set) {\n descriptor.set.call(instance, holder);\n }\n } : (v) => {\n wasAssigned = true;\n holder = v;\n };\n Object.defineProperty(instance, propertyName, {\n configurable: true,\n enumerable: !descriptor || !!descriptor.enumerable,\n get: getV,\n set,\n });\n\n return {\n restore() {\n if (hasOwnProp) {\n if (descriptor) {\n Object.defineProperty(instance, propertyName, descriptor);\n } else {\n /* eslint-disable no-param-reassign */\n instance[propertyName] = holder;\n /* eslint-enable no-param-reassign */\n }\n } else {\n /* eslint-disable no-param-reassign */\n delete instance[propertyName];\n /* eslint-enable no-param-reassign */\n }\n },\n wasAssigned() {\n return wasAssigned;\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAA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