{"version":3,"file":"compat.umd.js","sources":["../../src/util.js","../src/suspense.js","../src/index.js"],"sourcesContent":["/**\n * Assign properties from `props` to `obj`\n * @template O, P The obj and props types\n * @param {O} obj The object to copy properties to\n * @param {P} props The object to copy properties from\n * @returns {O & P}\n */\nexport function assign(obj, props) {\n\tfor (let i in props) obj[i] = props[i];\n\treturn /** @type {O & P} */ (obj);\n}\n\n/**\n * Remove a child node from its parent if attached. This is a workaround for\n * IE11 which doesn't support `Element.prototype.remove()`. Using this function\n * is smaller than including a dedicated polyfill.\n * @param {Node} node The node to remove\n */\nexport function removeNode(node) {\n\tlet parentNode = node.parentNode;\n\tif (parentNode) parentNode.removeChild(node);\n}\n","import { Component, createElement, _unmount as unmount, options, cloneElement } from 'preact';\nimport { removeNode } from '../../src/util';\n\nconst oldCatchError = options._catchError;\noptions._catchError = function (error, newVNode, oldVNode) {\n\tif (error.then && oldVNode) {\n\n\t\t/** @type {import('./internal').Component} */\n\t\tlet component;\n\t\tlet vnode = newVNode;\n\n\t\tfor (; vnode = vnode._parent;) {\n\t\t\tif ((component = vnode._component) && component._childDidSuspend) {\n\t\t\t\tif (oldVNode) {\n\t\t\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t\t\t\tnewVNode._children = oldVNode._children;\n\t\t\t\t}\n\n\t\t\t\tcomponent._childDidSuspend(error);\n\t\t\t\treturn; // Don't call oldCatchError if we found a Suspense\n\t\t\t}\n\t\t}\n\t}\n\n\toldCatchError(error, newVNode, oldVNode);\n};\n\nfunction detachDom(children) {\n\tfor (let i = 0; i < children.length; i++) {\n\t\tlet child = children[i];\n\t\tif (child != null) {\n\t\t\tif (typeof child.type !== 'function' && child._dom) {\n\t\t\t\tremoveNode(child._dom);\n\t\t\t}\n\t\t\telse if (child._children) {\n\t\t\t\tdetachDom(child._children);\n\t\t\t}\n\t\t}\n\t}\n}\n\n// having custom inheritance instead of a class here saves a lot of bytes\nexport function Suspense(props) {\n\t// we do not call super here to golf some bytes...\n\tthis._suspensions = [];\n\tthis._fallback = props.fallback;\n}\n\n// Things we do here to save some bytes but are not proper JS inheritance:\n// - call `new Component()` as the prototype\n// - do not set `Suspense.prototype.constructor` to `Suspense`\nSuspense.prototype = new Component();\n\n/**\n * @param {Promise} promise The thrown promise\n */\nSuspense.prototype._childDidSuspend = function(promise) {\n\n\t/** @type {import('./internal').SuspenseComponent} */\n\tconst c = this;\n\tc._suspensions.push(promise);\n\n\tconst onSuspensionComplete = () => {\n\t\t// From https://twitter.com/Rich_Harris/status/1125850391155965952\n\t\tc._suspensions[c._suspensions.indexOf(promise)] = c._suspensions[c._suspensions.length - 1];\n\t\tc._suspensions.pop();\n\n\t\tif (c._suspensions.length == 0) {\n\t\t\t// If fallback is null, don't try to unmount it\n\t\t\t// `unmount` expects a real VNode, not null values\n\t\t\tif (c._fallback) {\n\t\t\t\t// Unmount current children (should be fallback)\n\t\t\t\tunmount(c._fallback);\n\t\t\t}\n\t\t\tc._vnode._dom = null;\n\n\t\t\tc._vnode._children = c.state._parkedChildren;\n\t\t\tc.setState({ _parkedChildren: null });\n\t\t}\n\t};\n\n\tif (c.state._parkedChildren == null) {\n\t\tc._fallback = c._fallback && cloneElement(c._fallback);\n\t\tc.setState({ _parkedChildren: c._vnode._children });\n\t\tdetachDom(c._vnode._children);\n\t\tc._vnode._children = [];\n\t}\n\n\tpromise.then(onSuspensionComplete, onSuspensionComplete);\n};\n\nSuspense.prototype.render = function(props, state) {\n\treturn state._parkedChildren ? this._fallback : props.children;\n};\n\nexport function lazy(loader) {\n\tlet prom;\n\tlet component;\n\tlet error;\n\n\tfunction Lazy(props) {\n\t\tif (!prom) {\n\t\t\tprom = loader();\n\t\t\tprom.then(\n\t\t\t\t(exports) => { component = exports.default; },\n\t\t\t\t(e) => { error = e; },\n\t\t\t);\n\t\t}\n\n\t\tif (error) {\n\t\t\tthrow error;\n\t\t}\n\n\t\tif (!component) {\n\t\t\tthrow prom;\n\t\t}\n\n\t\treturn createElement(component, props);\n\t}\n\n\tLazy.displayName = 'Lazy';\n\tLazy._forwarded = true;\n\treturn Lazy;\n}\n","import { hydrate, render as preactRender, cloneElement as preactCloneElement, createRef, h, Component, options, toChildArray, createContext, Fragment, _unmount } from 'preact';\nimport { useState, useReducer, useEffect, useLayoutEffect, useRef, useImperativeHandle, useMemo, useCallback, useContext, useDebugValue } from 'preact/hooks';\nimport { Suspense, lazy } from './suspense';\nimport { assign, removeNode } from '../../src/util';\n\nconst version = '16.8.0'; // trick libraries to think we are react\n\n/* istanbul ignore next */\nconst REACT_ELEMENT_TYPE = (typeof Symbol!=='undefined' && Symbol.for && Symbol.for('react.element')) || 0xeac7;\n\nconst CAMEL_PROPS = /^(?:accent|alignment|arabic|baseline|cap|clip|color|fill|flood|font|glyph|horiz|marker|overline|paint|stop|strikethrough|stroke|text|underline|unicode|units|v|vector|vert|word|writing|x)[A-Z]/;\n\nlet oldEventHook = options.event;\noptions.event = e => {\n\tif (oldEventHook) e = oldEventHook(e);\n\te.persist = () => {};\n\treturn e.nativeEvent = e;\n};\n\n/**\n * Legacy version of createElement.\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component constructor\n */\nfunction createFactory(type) {\n\treturn createElement.bind(null, type);\n}\n\n/**\n * Normalize DOM vnode properties.\n * @param {import('./internal').VNode} vnode The vnode to normalize props of\n * @param {object | null | undefined} props props to normalize\n */\nfunction handleElementVNode(vnode, props) {\n\tlet shouldSanitize, attrs, i;\n\tfor (i in props) if ((shouldSanitize = CAMEL_PROPS.test(i))) break;\n\tif (shouldSanitize) {\n\t\tattrs = vnode.props = {};\n\t\tfor (i in props) {\n\t\t\tattrs[CAMEL_PROPS.test(i) ? i.replace(/([A-Z0-9])/, '-$1').toLowerCase() : i] = props[i];\n\t\t}\n\t}\n}\n\n/**\n * Proxy render() since React returns a Component reference.\n * @param {import('./internal').VNode} vnode VNode tree to render\n * @param {import('./internal').PreactElement} parent DOM node to render vnode tree into\n * @param {() => void} [callback] Optional callback that will be called after rendering\n * @returns {import('./internal').Component | null} The root component reference or null\n */\nfunction render(vnode, parent, callback) {\n\t// React destroys any existing DOM nodes, see #1727\n\t// ...but only on the first render, see #1828\n\tif (parent._children==null) {\n\t\twhile (parent.firstChild) {\n\t\t\tremoveNode(parent.firstChild);\n\t\t}\n\t}\n\n\tpreactRender(vnode, parent);\n\tif (typeof callback==='function') callback();\n\n\treturn vnode ? vnode._component : null;\n}\n\nclass ContextProvider {\n\tgetChildContext() {\n\t\treturn this.props.context;\n\t}\n\trender(props) {\n\t\treturn props.children;\n\t}\n}\n\n/**\n * Portal component\n * @param {object | null | undefined} props\n */\nfunction Portal(props) {\n\tlet _this = this;\n\tlet container = props.container;\n\tlet wrap = h(ContextProvider, { context: _this.context }, props.vnode);\n\n\t// When we change container we should clear our old container and\n\t// indicate a new mount.\n\tif (_this._container && _this._container !== container) {\n\t\tif (_this._temp.parentNode) _this._container.removeChild(_this._temp);\n\t\t_unmount(_this._wrap);\n\t\t_this._hasMounted = false;\n\t}\n\n\t// When props.vnode is undefined/false/null we are dealing with some kind of\n\t// conditional vnode. This should not trigger a render.\n\tif (props.vnode) {\n\t\tif (!_this._hasMounted) {\n\t\t\t// Create a placeholder that we can use to insert into.\n\t\t\t_this._temp = document.createTextNode('');\n\t\t\t// Hydrate existing nodes to keep the dom intact, when rendering\n\t\t\t// wrap into the container.\n\t\t\thydrate('', container);\n\t\t\t// Append to the container (this matches React's behavior)\n\t\t\tcontainer.appendChild(_this._temp);\n\t\t\t// At this point we have mounted and should set our container.\n\t\t\t_this._hasMounted = true;\n\t\t\t_this._container = container;\n\t\t\t// Render our wrapping element into temp.\n\t\t\tpreactRender(wrap, container, _this._temp);\n\t\t\t_this._children = this._temp._children;\n\t\t}\n\t\telse {\n\t\t\t// When we have mounted and the vnode is present it means the\n\t\t\t// props have changed or a parent is triggering a rerender.\n\t\t\t// This implies we only need to call render. But we need to keep\n\t\t\t// the old tree around, otherwise will treat the vnodes as new and\n\t\t\t// will wrongly call `componentDidMount` on them\n\t\t\tcontainer._children = _this._children;\n\t\t\tpreactRender(wrap, container);\n\t\t\t_this._children = container._children;\n\t\t}\n\t}\n\t// When we come from a conditional render, on a mounted\n\t// portal we should clear the DOM.\n\telse if (_this._hasMounted) {\n\t\tif (_this._temp.parentNode) _this._container.removeChild(_this._temp);\n\t\t_unmount(_this._wrap);\n\t}\n\t// Set the wrapping element for future unmounting.\n\t_this._wrap = wrap;\n\n\t_this.componentWillUnmount = () => {\n\t\tif (_this._temp.parentNode) _this._container.removeChild(_this._temp);\n\t\t_unmount(_this._wrap);\n\t};\n\n\treturn null;\n}\n\n/**\n * Create a `Portal` to continue rendering the vnode tree at a different DOM node\n * @param {import('./internal').VNode} vnode The vnode to render\n * @param {import('./internal').PreactElement} container The DOM node to continue rendering in to.\n */\nfunction createPortal(vnode, container) {\n\treturn h(Portal, { vnode, container });\n}\n\nconst mapFn = (children, fn) => {\n\tif (!children) return null;\n\treturn toChildArray(children).map(fn);\n};\n\n// This API is completely unnecessary for Preact, so it's basically passthrough.\nlet Children = {\n\tmap: mapFn,\n\tforEach: mapFn,\n\tcount(children) {\n\t\treturn children ? toChildArray(children).length : 0;\n\t},\n\tonly(children) {\n\t\tchildren = toChildArray(children);\n\t\tif (children.length!==1) throw new Error('Children.only() expects only one child.');\n\t\treturn children[0];\n\t},\n\ttoArray: toChildArray\n};\n\n/**\n * Wrap `createElement` to apply various vnode normalizations.\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component constructor\n * @param {object | null | undefined} [props] The vnode's properties\n * @param {Array} [children] The vnode's children\n * @returns {import('./internal').VNode}\n */\nfunction createElement(...args) {\n\tlet vnode = h(...args);\n\n\tlet type = vnode.type, props = vnode.props;\n\tif (typeof type!='function') {\n\t\tif (props.defaultValue) {\n\t\t\tif (!props.value && props.value!==0) {\n\t\t\t\tprops.value = props.defaultValue;\n\t\t\t}\n\t\t\tdelete props.defaultValue;\n\t\t}\n\n\t\tif (Array.isArray(props.value) && props.multiple && type==='select') {\n\t\t\ttoChildArray(props.children).forEach((child) => {\n\t\t\t\tif (props.value.indexOf(child.props.value)!=-1) {\n\t\t\t\t\tchild.props.selected = true;\n\t\t\t\t}\n\t\t\t});\n\t\t\tdelete props.value;\n\t\t}\n\t\thandleElementVNode(vnode, props);\n\t}\n\n\tvnode.preactCompatNormalized = false;\n\treturn normalizeVNode(vnode);\n}\n\n/**\n * Normalize a vnode\n * @param {import('./internal').VNode} vnode\n */\nfunction normalizeVNode(vnode) {\n\tvnode.preactCompatNormalized = true;\n\tapplyClassName(vnode);\n\treturn vnode;\n}\n\n/**\n * Wrap `cloneElement` to abort if the passed element is not a valid element and apply\n * all vnode normalizations.\n * @param {import('./internal').VNode} element The vnode to clone\n * @param {object} props Props to add when cloning\n * @param {Array} rest Optional component children\n */\nfunction cloneElement(element) {\n\tif (!isValidElement(element)) return element;\n\tlet vnode = normalizeVNode(preactCloneElement.apply(null, arguments));\n\treturn vnode;\n}\n\n/**\n * Check if the passed element is a valid (p)react node.\n * @param {*} element The element to check\n * @returns {boolean}\n */\nfunction isValidElement(element) {\n\treturn !!element && element.$$typeof===REACT_ELEMENT_TYPE;\n}\n\n/**\n * Normalize event handlers like react does. Most famously it uses `onChange` for any input element.\n * @param {import('./internal').VNode} vnode The vnode to normalize events on\n */\nfunction applyEventNormalization({ type, props }) {\n\tif (!props || typeof type!='string') return;\n\tlet newProps = {};\n\n\tfor (let i in props) {\n\t\tif (/^on(Ani|Tra)/.test(i)) {\n\t\t\tprops[i.toLowerCase()] = props[i];\n\t\t\tdelete props[i];\n\t\t}\n\t\tnewProps[i.toLowerCase()] = i;\n\n\t}\n\tif (newProps.ondoubleclick) {\n\t\tprops.ondblclick = props[newProps.ondoubleclick];\n\t\tdelete props[newProps.ondoubleclick];\n\t}\n\tif (newProps.onbeforeinput) {\n\t\tprops.onbeforeinput = props[newProps.onbeforeinput];\n\t\tdelete props[newProps.onbeforeinput];\n\t}\n\t// for *textual inputs* (incl textarea), normalize `onChange` -> `onInput`:\n\tif (newProps.onchange && (type==='textarea' || (type.toLowerCase()==='input' && !/^fil|che|ra/i.test(props.type)))) {\n\t\tlet normalized = newProps.oninput || 'oninput';\n\t\tif (!props[normalized]) {\n\t\t\tprops[normalized] = props[newProps.onchange];\n\t\t\tdelete props[newProps.onchange];\n\t\t}\n\t}\n}\n\n/**\n * Remove a component tree from the DOM, including state and event handlers.\n * @param {import('./internal').PreactElement} container\n * @returns {boolean}\n */\nfunction unmountComponentAtNode(container) {\n\tif (container._children) {\n\t\tpreactRender(null, container);\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n/**\n * Alias `class` prop to `className` if available\n * @param {import('./internal').VNode} vnode\n */\nfunction applyClassName(vnode) {\n\tlet a = vnode.props;\n\tif (a.class || a.className) {\n\t\tclassNameDescriptor.enumerable = 'className' in a;\n\t\tif (a.className) a.class = a.className;\n\t\tObject.defineProperty(a, 'className', classNameDescriptor);\n\t}\n}\n\nlet classNameDescriptor = {\n\tconfigurable: true,\n\tget() { return this.class; }\n};\n\n/**\n * Check if two objects have a different shape\n * @param {object} a\n * @param {object} b\n * @returns {boolean}\n */\nfunction shallowDiffers(a, b) {\n\tfor (let i in a) if (i !== '__source' && !(i in b)) return true;\n\tfor (let i in b) if (i !== '__source' && a[i]!==b[i]) return true;\n\treturn false;\n}\n\n/**\n * Get the matching DOM node for a component\n * @param {import('./internal').Component} component\n * @returns {import('./internal').PreactElement | null}\n */\nfunction findDOMNode(component) {\n\treturn component && (component.base || component.nodeType === 1 && component) || null;\n}\n\n/**\n * Component class with a predefined `shouldComponentUpdate` implementation\n */\nclass PureComponent extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\t// Some third-party libraries check if this property is present\n\t\tthis.isPureReactComponent = true;\n\t}\n\n\tshouldComponentUpdate(props, state) {\n\t\treturn shallowDiffers(this.props, props) || shallowDiffers(this.state, state);\n\t}\n}\n\n// Some libraries like `react-virtualized` explicitly check for this.\nComponent.prototype.isReactComponent = {};\n\n/**\n * Memoize a component, so that it only updates when the props actually have\n * changed. This was previously known as `React.pure`.\n * @param {import('./internal').FunctionalComponent} c functional component\n * @param {(prev: object, next: object) => boolean} [comparer] Custom equality function\n * @returns {import('./internal').FunctionalComponent}\n */\nfunction memo(c, comparer) {\n\tfunction shouldUpdate(nextProps) {\n\t\tlet ref = this.props.ref;\n\t\tlet updateRef = ref==nextProps.ref;\n\t\tif (!updateRef && ref) {\n\t\t\tref.call ? ref(null) : (ref.current = null);\n\t\t}\n\t\treturn (!comparer\n\t\t\t? shallowDiffers(this.props, nextProps)\n\t\t\t: !comparer(this.props, nextProps)) || !updateRef;\n\t}\n\n\tfunction Memoed(props) {\n\t\tthis.shouldComponentUpdate = shouldUpdate;\n\t\treturn h(c, assign({}, props));\n\t}\n\tMemoed.prototype.isReactComponent = true;\n\tMemoed.displayName = 'Memo(' + (c.displayName || c.name) + ')';\n\tMemoed._forwarded = true;\n\treturn Memoed;\n}\n\n/**\n * Pass ref down to a child. This is mainly used in libraries with HOCs that\n * wrap components. Using `forwardRef` there is an easy way to get a reference\n * of the wrapped component instead of one of the wrapper itself.\n * @param {import('./internal').ForwardFn} fn\n * @returns {import('./internal').FunctionalComponent}\n */\nfunction forwardRef(fn) {\n\tfunction Forwarded(props) {\n\t\tlet ref = props.ref;\n\t\tdelete props.ref;\n\t\treturn fn(props, ref);\n\t}\n\tForwarded.prototype.isReactComponent = true;\n\tForwarded._forwarded = true;\n\tForwarded.displayName = 'ForwardRef(' + (fn.displayName || fn.name) + ')';\n\treturn Forwarded;\n}\n\n// Patch in `UNSAFE_*` lifecycle hooks\nfunction setSafeDescriptor(proto, key) {\n\tif (proto['UNSAFE_'+key] && !proto[key]) {\n\t\tObject.defineProperty(proto, key, {\n\t\t\tconfigurable: false,\n\t\t\tget() { return this['UNSAFE_' + key]; },\n\t\t\t// This `set` is only used if a user sets a lifecycle like cWU\n\t\t\t// after setting a lifecycle like UNSAFE_cWU. I doubt anyone\n\t\t\t// actually does this in practice so not testing it\n\t\t\t/* istanbul ignore next */\n\t\t\tset(v) { this['UNSAFE_' + key] = v; }\n\t\t});\n\t}\n}\n\nlet oldVNodeHook = options.vnode;\noptions.vnode = vnode => {\n\tvnode.$$typeof = REACT_ELEMENT_TYPE;\n\n\tapplyEventNormalization(vnode);\n\tlet type = vnode.type;\n\tif (type && type._forwarded && vnode.ref) {\n\t\tvnode.props.ref = vnode.ref;\n\t\tvnode.ref = null;\n\t}\n\n\t// We can't just patch the base component class, because components that use\n\t// inheritance and are transpiled down to ES5 will overwrite our patched\n\t// getters and setters. See #1941\n\tif (typeof type === 'function' && !type._patchedLifecycles && type.prototype) {\n\t\tsetSafeDescriptor(type.prototype, 'componentWillMount');\n\t\tsetSafeDescriptor(type.prototype, 'componentWillReceiveProps');\n\t\tsetSafeDescriptor(type.prototype, 'componentWillUpdate');\n\t\ttype._patchedLifecycles = true;\n\t}\n\tif (oldVNodeHook) oldVNodeHook(vnode);\n};\n\n/**\n * Deprecated way to control batched rendering inside the reconciler, but we\n * already schedule in batches inside our rendering code\n * @template Arg\n * @param {(arg: Arg) => void} callback function that triggers the updated\n * @param {Arg} [arg] Optional argument that can be passed to the callback\n */\n// eslint-disable-next-line camelcase\nconst unstable_batchedUpdates = (callback, arg) => callback(arg);\n\nexport * from 'preact/hooks';\nexport {\n\tversion,\n\tChildren,\n\trender,\n\trender as hydrate,\n\tunmountComponentAtNode,\n\tcreatePortal,\n\tcreateElement,\n\tcreateContext,\n\tcreateFactory,\n\tcloneElement,\n\tcreateRef,\n\tFragment,\n\tisValidElement,\n\tfindDOMNode,\n\tComponent,\n\tPureComponent,\n\tmemo,\n\tforwardRef,\n\t// eslint-disable-next-line camelcase\n\tunstable_batchedUpdates,\n\tSuspense,\n\tlazy\n};\n\n// React copies the named exports to the default one.\nexport default {\n\tuseState,\n\tuseReducer,\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseRef,\n\tuseImperativeHandle,\n\tuseMemo,\n\tuseCallback,\n\tuseContext,\n\tuseDebugValue,\n\tversion,\n\tChildren,\n\trender,\n\thydrate: render,\n\tunmountComponentAtNode,\n\tcreatePortal,\n\tcreateElement,\n\tcreateContext,\n\tcreateFactory,\n\tcloneElement,\n\tcreateRef,\n\tFragment,\n\tisValidElement,\n\tfindDOMNode,\n\tComponent,\n\tPureComponent,\n\tmemo,\n\tforwardRef,\n\tunstable_batchedUpdates,\n\tSuspense,\n\tlazy\n};\n"],"names":["removeNode","node","parentNode","removeChild","const","oldCatchError","options","_catchError","Suspense","props","_suspensions","_fallback","fallback","lazy","loader","prom","component","error","Lazy","then","exports","default","e","createElement","displayName","_forwarded","newVNode","oldVNode","vnode","_parent","_component","_childDidSuspend","_dom","_children","prototype","Component","promise","c","this","push","onSuspensionComplete","indexOf","length","pop","unmount","_vnode","state","_parkedChildren","setState","cloneElement","detachDom","children","let","i","child","type","render","REACT_ELEMENT_TYPE","Symbol","for","CAMEL_PROPS","oldEventHook","event","createFactory","bind","parent","callback","firstChild","preactRender","persist","nativeEvent","ContextProvider","Portal","_this","container","wrap","h","context","_container","_temp","_unmount","_wrap","_hasMounted","document","createTextNode","hydrate","appendChild","componentWillUnmount","createPortal","getChildContext","mapFn","fn","toChildArray","map","Children","forEach","count","only","Error","toArray","args","defaultValue","value","Array","isArray","multiple","selected","shouldSanitize","attrs","test","replace","toLowerCase","handleElementVNode","preactCompatNormalized","normalizeVNode","a","class","className","classNameDescriptor","enumerable","Object","defineProperty","applyClassName","element","isValidElement","preactCloneElement","apply","arguments","$$typeof","unmountComponentAtNode","configurable","get","shallowDiffers","b","findDOMNode","base","nodeType","PureComponent","constructor","isPureReactComponent","shouldComponentUpdate","memo","comparer","shouldUpdate","nextProps","ref","updateRef","call","current","Memoed","obj","assign","isReactComponent","name","forwardRef","Forwarded","setSafeDescriptor","proto","key","set","v","oldVNodeHook","newProps","ondoubleclick","ondblclick","onbeforeinput","onchange","normalized","oninput","applyEventNormalization","_patchedLifecycles","unstable_batchedUpdates","arg","useState","useReducer","useEffect","useLayoutEffect","useRef","useImperativeHandle","useMemo","useCallback","useContext","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