isomorfeus-preact 10.7.2 → 10.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/preact/version.rb +1 -1
- data/node_modules/.package-lock.json +3 -3
- data/node_modules/preact/compat/dist/compat.mjs.map +1 -0
- data/node_modules/preact/compat/server.browser.js +4 -0
- data/node_modules/preact/debug/dist/debug.mjs.map +1 -0
- data/node_modules/preact/devtools/dist/devtools.js +1 -1
- data/node_modules/preact/devtools/dist/devtools.js.map +1 -1
- data/node_modules/preact/devtools/dist/devtools.mjs +1 -1
- data/node_modules/preact/devtools/dist/devtools.mjs.map +1 -0
- data/node_modules/preact/devtools/dist/devtools.module.js +1 -1
- data/node_modules/preact/devtools/dist/devtools.module.js.map +1 -1
- data/node_modules/preact/devtools/dist/devtools.umd.js +1 -1
- data/node_modules/preact/devtools/dist/devtools.umd.js.map +1 -1
- data/node_modules/preact/devtools/src/devtools.js +1 -1
- data/node_modules/preact/dist/preact.mjs.map +1 -0
- data/node_modules/preact/hooks/dist/hooks.mjs.map +1 -0
- data/node_modules/preact/jsx-runtime/dist/jsxRuntime.mjs.map +1 -0
- data/node_modules/preact/package.json +3 -1
- data/node_modules/preact/src/jsx.d.ts +1 -0
- data/node_modules/preact/test-utils/dist/testUtils.mjs.map +1 -0
- data/package.json +1 -1
- metadata +16 -13
- data/node_modules/preact/compat/LICENSE +0 -21
- data/node_modules/preact/debug/LICENSE +0 -21
- data/node_modules/preact/devtools/LICENSE +0 -21
- data/node_modules/preact/hooks/LICENSE +0 -21
- data/node_modules/preact/jsx-runtime/LICENSE +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7922e2d864f18fe47083bf45a91240d00bc14eccb1ac13a967f7bd990218fb7
|
4
|
+
data.tar.gz: e952ece57b995223a55e1ea76ce48ab26218e205c994308a2e76960e3bc4729a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27601bdc9a83ef20319b09efc722583fcb8e063f82d572553763dab88082a24e7e5a6fa11e53350b985147a22e27f5312fa92f456916636f07eccb953bd7a9e4
|
7
|
+
data.tar.gz: 4150592d030f626880d6ada150c188a1cb357de175bf087b2681781ecc9a3caf8e7e026137425576906a5e4be0a9a6bdbe2af899452c9f1c7716ff03058df101
|
data/lib/preact/version.rb
CHANGED
@@ -4,9 +4,9 @@
|
|
4
4
|
"requires": true,
|
5
5
|
"packages": {
|
6
6
|
"node_modules/preact": {
|
7
|
-
"version": "10.7.
|
8
|
-
"resolved": "https://registry.npmjs.org/preact/-/preact-10.7.
|
9
|
-
"integrity": "sha512-
|
7
|
+
"version": "10.7.3",
|
8
|
+
"resolved": "https://registry.npmjs.org/preact/-/preact-10.7.3.tgz",
|
9
|
+
"integrity": "sha512-giqJXP8VbtA1tyGa3f1n9wiN7PrHtONrDyE3T+ifjr/tTkg+2N4d/6sjC9WyJKv8wM7rOYDveqy5ZoFmYlwo4w==",
|
10
10
|
"funding": {
|
11
11
|
"type": "opencollective",
|
12
12
|
"url": "https://opencollective.com/preact"
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"compat.mjs","sources":["../src/util.js","../src/PureComponent.js","../src/memo.js","../src/forwardRef.js","../src/Children.js","../../src/component.js","../../src/tree.js","../../src/constants.js","../src/suspense.js","../src/suspense-list.js","../src/render.js","../src/scheduler.js","../src/index.js"],"sourcesContent":["export const IS_NON_DIMENSIONAL = /^(-|f[lo].*[^se]$|g.{5,}[^ps]$|z|o[pr]|(W.{5})?[lL]i.*(t|mp)$|an|(bo|s).{4}Im|sca|m.{6}[ds]|ta|c.*[st]$|wido|ini)/;\n\n/**\n * Check if two objects have a different shape\n * @param {object} a\n * @param {object} b\n * @returns {boolean}\n */\nexport function 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","import { Component } from 'preact';\nimport { shallowDiffers } from './util';\n\n/**\n * Component class with a predefined `shouldComponentUpdate` implementation\n */\nexport function PureComponent(p) {\n\tthis.props = p;\n}\nPureComponent.prototype = new Component();\n// Some third-party libraries check if this property is present\nPureComponent.prototype.isPureReactComponent = true;\nPureComponent.prototype.shouldComponentUpdate = function(props, state) {\n\treturn shallowDiffers(this.props, props) || shallowDiffers(this.state, state);\n};\n","import { createElement, Component } from 'preact';\nimport { shallowDiffers } from './util';\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').FunctionComponent} c functional component\n * @param {(prev: object, next: object) => boolean} [comparer] Custom equality function\n * @returns {import('./internal').FunctionComponent}\n */\nexport function memo(c, comparer) {\n\tfunction Memoed() {}\n\n\tMemoed.prototype = new Component();\n\tMemoed.displayName = 'Memo(' + (c.displayName || c.name) + ')';\n\t// eslint-disable-next-line\n\tMemoed.prototype.render = function(props) {\n\t\treturn createElement(c, props);\n\t};\n\n\tMemoed.prototype.shouldComponentUpdate = function(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\n\t\tif (!comparer) {\n\t\t\treturn shallowDiffers(this.props, nextProps);\n\t\t}\n\n\t\treturn !comparer(this.props, nextProps) || !updateRef;\n\t};\n\n\tMemoed.prototype.isReactComponent = true;\n\tMemoed._forwarded = true;\n\treturn Memoed;\n}\n","import { options } from 'preact';\n\nlet oldDiffHook = options._diff;\noptions._diff = (internal, vnode) => {\n\tif (internal.type && internal.type._forwarded && vnode.ref) {\n\t\tvnode.props.ref = vnode.ref;\n\t\tvnode.ref = null;\n\t\tinternal.ref = null;\n\t}\n\tif (oldDiffHook) oldDiffHook(internal, vnode);\n};\n\nexport const REACT_FORWARD_SYMBOL =\n\t(typeof Symbol != 'undefined' &&\n\t\tSymbol.for &&\n\t\tSymbol.for('react.forward_ref')) ||\n\t0xf47;\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('./index').ForwardFn} fn\n * @returns {import('./internal').FunctionComponent}\n */\nexport function forwardRef(fn) {\n\tfunction Forwarded(props) {\n\t\tlet clone = Object.assign({}, props);\n\t\tdelete clone.ref;\n\t\treturn fn(clone, props.ref || null);\n\t}\n\n\t// mobx-react checks for this being present\n\tForwarded.$$typeof = REACT_FORWARD_SYMBOL;\n\t// mobx-react heavily relies on implementation details.\n\t// It expects an object here with a `render` property,\n\t// and prototype.render will fail. Without this\n\t// mobx-react throws.\n\tForwarded.render = Forwarded;\n\n\tForwarded.prototype.isReactComponent = Forwarded._forwarded = true;\n\tForwarded.displayName = 'ForwardRef(' + (fn.displayName || fn.name) + ')';\n\treturn Forwarded;\n}\n","import { toChildArray } from 'preact';\n\nconst mapFn = (children, fn) => {\n\tif (children == null) return null;\n\treturn toChildArray(toChildArray(children).map(fn));\n};\n\n// This API is completely unnecessary for Preact, so it's basically passthrough.\nexport const 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\tconst normalized = toChildArray(children);\n\t\tif (normalized.length !== 1) throw 'Children.only';\n\t\treturn normalized[0];\n\t},\n\ttoArray: toChildArray\n};\n","import { commitRoot } from './diff/commit';\nimport options from './options';\nimport { createVNode, Fragment } from './create-element';\nimport { patch } from './diff/patch';\nimport { DIRTY_BIT, FORCE_UPDATE, MODE_UNMOUNTING } from './constants';\nimport { getParentContext, getParentDom } from './tree';\n\n/**\n * The render queue\n * @type {import('./internal').RendererState}\n */\nexport const rendererState = {\n\t_parentDom: null,\n\t_context: {},\n\t_commitQueue: []\n};\n\n/**\n * Base Component class. Provides `setState()` and `forceUpdate()`, which\n * trigger rendering\n * @param {object} props The initial component props\n * @param {object} context The initial context from parent components'\n * getChildContext\n */\nexport function Component(props, context) {\n\tthis.props = props;\n\tthis.context = context;\n}\n\n/**\n * Update component state and schedule a re-render.\n * @this {import('./internal').Component}\n * @param {object | ((s: object, p: object) => object)} update A hash of state\n * properties to update with new values or a function that given the current\n * state and props returns a new partial state\n * @param {() => void} [callback] A function to be called once component state is\n * updated\n */\nComponent.prototype.setState = function(update, callback) {\n\t// only clone state when copying to nextState the first time.\n\tlet s;\n\tif (this._nextState != null && this._nextState !== this.state) {\n\t\ts = this._nextState;\n\t} else {\n\t\ts = this._nextState = Object.assign({}, this.state);\n\t}\n\n\tif (typeof update == 'function') {\n\t\t// Some libraries like `immer` mark the current state as readonly,\n\t\t// preventing us from mutating it, so we need to clone it. See #2716\n\t\tupdate = update(Object.assign({}, s), this.props);\n\t}\n\n\tif (update) {\n\t\tObject.assign(s, update);\n\t}\n\n\t// Skip update if updater function returned null\n\tif (update == null) return;\n\n\tconst internal = this._internal;\n\tif (update != null && internal) {\n\t\tif (callback) internal._commitCallbacks.push(callback.bind(this));\n\t\tinternal.rerender(internal);\n\t}\n};\n\n/**\n * Immediately perform a synchronous re-render of the component\n * @this {import('./internal').Component}\n * @param {() => void} [callback] A function to be called after component is\n * re-rendered\n */\nComponent.prototype.forceUpdate = function(callback) {\n\tconst internal = this._internal;\n\tif (internal) {\n\t\t// Set render mode so that we can differentiate where the render request\n\t\t// is coming from. We need this because forceUpdate should never call\n\t\t// shouldComponentUpdate\n\t\tinternal.flags |= FORCE_UPDATE;\n\t\tif (callback) internal._commitCallbacks.push(callback.bind(this));\n\t\tinternal.rerender(internal);\n\t}\n};\n\n/**\n * Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\n * Virtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx).\n * @param {object} props Props (eg: JSX attributes) received from parent\n * element/component\n * @param {object} state The component's current state\n * @param {object} context Context object, as returned by the nearest\n * ancestor's `getChildContext()`\n * @returns {import('./index').ComponentChildren | void}\n */\nComponent.prototype.render = Fragment;\n\n/**\n * @param {import('./internal').Internal} internal The internal to rerender\n */\nfunction rerender(internal) {\n\tif (~internal.flags & MODE_UNMOUNTING && internal.flags & DIRTY_BIT) {\n\t\tconst vnode = createVNode(\n\t\t\tinternal.type,\n\t\t\tinternal.props,\n\t\t\tinternal.key, // @TODO we shouldn't need to actually pass these\n\t\t\tinternal.ref, // since the mode flag should bypass key/ref handling\n\t\t\t0\n\t\t);\n\n\t\trendererState._context = getParentContext(internal);\n\t\trendererState._commitQueue = [];\n\t\trendererState._parentDom = getParentDom(internal);\n\t\tpatch(internal, vnode);\n\t\tcommitRoot(internal);\n\t}\n}\n\n/**\n * The render queue\n * @type {Array<import('./internal').Internal>}\n */\nlet rerenderQueue = [];\n\n/*\n * The value of `Component.debounce` must asynchronously invoke the passed in callback. It is\n * important that contributors to Preact can consistently reason about what calls to `setState`, etc.\n * do, and when their effects will be applied. See the links below for some further reading on designing\n * asynchronous APIs.\n * * [Designing APIs for Asynchrony](https://blog.izs.me/2013/08/designing-apis-for-asynchrony)\n * * [Callbacks synchronous and asynchronous](https://blog.ometer.com/2011/07/24/callbacks-synchronous-and-asynchronous/)\n */\n\nlet prevDebounce;\n\nconst defer = Promise.prototype.then.bind(Promise.resolve());\n\n/**\n * Enqueue a rerender of an internal\n * @param {import('./internal').Internal} internal The internal to rerender\n */\nexport function enqueueRender(internal) {\n\tif (\n\t\t(!(internal.flags & DIRTY_BIT) &&\n\t\t\t(internal.flags |= DIRTY_BIT) &&\n\t\t\trerenderQueue.push(internal) &&\n\t\t\t!process._rerenderCount++) ||\n\t\tprevDebounce !== options.debounceRendering\n\t) {\n\t\tprevDebounce = options.debounceRendering;\n\t\t(prevDebounce || defer)(process);\n\t}\n}\n\n/** Flush the render queue by rerendering all queued components */\nfunction process() {\n\twhile ((len = process._rerenderCount = rerenderQueue.length)) {\n\t\trerenderQueue.sort((a, b) => a._depth - b._depth);\n\t\twhile (len--) {\n\t\t\trerender(rerenderQueue.shift());\n\t\t}\n\t}\n}\nlet len = (process._rerenderCount = 0);\n","import options from './options';\nimport {\n\tTYPE_FUNCTION,\n\tTYPE_ELEMENT,\n\tTYPE_TEXT,\n\tTYPE_CLASS,\n\tTYPE_ROOT,\n\tINHERITED_MODES,\n\tTYPE_COMPONENT,\n\tTYPE_DOM,\n\tMODE_SVG,\n\tUNDEFINED\n} from './constants';\nimport { enqueueRender } from './component';\n\n/**\n * Create an internal tree node\n * @param {import('./internal').VNode | string} vnode\n * @param {import('./internal').Internal} [parentInternal]\n * @returns {import('./internal').Internal}\n */\nexport function createInternal(vnode, parentInternal) {\n\tlet type = null,\n\t\tprops,\n\t\tkey,\n\t\tref;\n\n\t/** @type {number} */\n\tlet flags = parentInternal ? parentInternal.flags & INHERITED_MODES : 0;\n\n\t// Text VNodes/Internals have an ID of 0 that is never used:\n\tlet vnodeId = 0;\n\n\tif (typeof vnode === 'string') {\n\t\t// type = null;\n\t\tflags |= TYPE_TEXT;\n\t\tprops = vnode;\n\t}\n\t// Prevent JSON injection by rendering injected objects as empty Text nodes\n\telse if (vnode.constructor !== UNDEFINED) {\n\t\tflags |= TYPE_TEXT;\n\t\tprops = '';\n\t} else {\n\t\ttype = vnode.type;\n\t\tprops = vnode.props;\n\t\tkey = vnode.key;\n\t\tref = vnode.ref;\n\t\tvnodeId = vnode._vnodeId;\n\n\t\t// @TODO re-enable this when we stop removing key+ref from VNode props\n\t\t// if (props) {\n\t\t// \tif ((key = props.key) != null) {\n\t\t// \t\tprops.key = UNDEFINED;\n\t\t// \t}\n\t\t// \tif (typeof type !== 'function' && (ref = props.ref) != null) {\n\t\t// \t\tprops.ref = UNDEFINED;\n\t\t// \t}\n\t\t// } else {\n\t\t// \tprops = {};\n\t\t// }\n\n\t\t// flags = typeof type === 'function' ? COMPONENT_NODE : ELEMENT_NODE;\n\t\tflags |=\n\t\t\ttypeof type === 'function'\n\t\t\t\t? type.prototype && type.prototype.render\n\t\t\t\t\t? TYPE_CLASS\n\t\t\t\t\t: props._parentDom\n\t\t\t\t\t? TYPE_ROOT\n\t\t\t\t\t: TYPE_FUNCTION\n\t\t\t\t: TYPE_ELEMENT;\n\n\t\tif (flags & TYPE_ELEMENT && type === 'svg') {\n\t\t\tflags |= MODE_SVG;\n\t\t} else if (\n\t\t\tparentInternal &&\n\t\t\tparentInternal.flags & MODE_SVG &&\n\t\t\tparentInternal.type === 'foreignObject'\n\t\t) {\n\t\t\tflags &= ~MODE_SVG;\n\t\t}\n\t}\n\n\t/** @type {import('./internal').Internal} */\n\tconst internal = {\n\t\ttype,\n\t\tprops,\n\t\tkey,\n\t\tref,\n\t\t_prevRef: null,\n\t\tdata: flags & TYPE_COMPONENT ? {} : null,\n\t\t_commitCallbacks: flags & TYPE_COMPONENT ? [] : null,\n\t\trerender: enqueueRender,\n\t\tflags,\n\t\t_children: null,\n\t\t_parent: parentInternal,\n\t\t_vnodeId: vnodeId,\n\t\t_dom: null,\n\t\t_component: null,\n\t\t_context: null,\n\t\t_depth: parentInternal ? parentInternal._depth + 1 : 0\n\t};\n\n\tif (options._internal) options._internal(internal, vnode);\n\n\treturn internal;\n}\n\nconst shouldSearchComponent = internal =>\n\tinternal.flags & TYPE_COMPONENT &&\n\t(!(internal.flags & TYPE_ROOT) ||\n\t\tinternal.props._parentDom == getParentDom(internal._parent));\n\n/**\n * @param {import('./internal').Internal} internal\n * @param {number | null} [childIndex]\n * @returns {import('./internal').PreactNode}\n */\nexport function getDomSibling(internal, childIndex) {\n\tif (childIndex == null) {\n\t\t// Use childIndex==null as a signal to resume the search from the vnode's sibling\n\t\treturn getDomSibling(\n\t\t\tinternal._parent,\n\t\t\tinternal._parent._children.indexOf(internal) + 1\n\t\t);\n\t}\n\n\tlet childDom = getChildDom(internal, childIndex);\n\tif (childDom) {\n\t\treturn childDom;\n\t}\n\n\t// If we get here, we have not found a DOM node in this vnode's children. We\n\t// must resume from this vnode's sibling (in it's parent _children array).\n\t// Only climb up and search the parent if we aren't searching through a DOM\n\t// VNode (meaning we reached the DOM parent of the original vnode that began\n\t// the search). Note, the top of the tree has _parent == null so avoiding that\n\t// here.\n\treturn internal._parent && shouldSearchComponent(internal)\n\t\t? getDomSibling(internal)\n\t\t: null;\n}\n\n/**\n * @param {import('./internal').Internal} internal\n * @param {number} [i]\n * @returns {import('./internal').PreactElement}\n */\nexport function getChildDom(internal, i) {\n\tif (internal._children == null) {\n\t\treturn null;\n\t}\n\n\tfor (i = i || 0; i < internal._children.length; i++) {\n\t\tlet child = internal._children[i];\n\t\tif (child != null) {\n\t\t\tif (child.flags & TYPE_DOM) {\n\t\t\t\treturn child._dom;\n\t\t\t}\n\n\t\t\tif (shouldSearchComponent(child)) {\n\t\t\t\tlet childDom = getChildDom(child);\n\t\t\t\tif (childDom) {\n\t\t\t\t\treturn childDom;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn null;\n}\n/**\n * @param {import('./internal').Internal} internal\n * @returns {any}\n */\nexport function getParentContext(internal) {\n\t// @TODO: compare performance of recursion here (it's 11b smaller, but may be slower for deep trees)\n\treturn internal._context || getParentContext(internal._parent);\n\n\t// while ((internal = internal._parent)) {\n\t// \tlet context = internal._context;\n\t// \tif (context != null) return context;\n\t// }\n}\n\n/**\n * @param {import('./internal').Internal} internal\n * @returns {import('./internal').PreactElement}\n */\nexport function getParentDom(internal) {\n\tlet parent = internal;\n\n\t// if this is a Root internal, return its parent DOM:\n\tif (parent.flags & TYPE_ROOT) {\n\t\treturn parent.props._parentDom;\n\t}\n\n\t// walk up the tree to find the nearest DOM or Root Internal:\n\twhile ((parent = parent._parent)) {\n\t\tif (parent.flags & TYPE_ROOT) {\n\t\t\treturn parent.props._parentDom;\n\t\t} else if (parent.flags & TYPE_ELEMENT) {\n\t\t\treturn parent._dom;\n\t\t}\n\t}\n}\n","// Internal.flags bitfield constants\nexport const TYPE_TEXT = 1 << 0;\nexport const TYPE_ELEMENT = 1 << 1;\nexport const TYPE_CLASS = 1 << 2;\nexport const TYPE_FUNCTION = 1 << 3;\n/** Signals this internal has a _parentDom prop that should change the parent\n * DOM node of it's children */\nexport const TYPE_ROOT = 1 << 4;\n\n/** Any type of internal representing DOM */\nexport const TYPE_DOM = TYPE_TEXT | TYPE_ELEMENT;\n/** Any type of component */\nexport const TYPE_COMPONENT = TYPE_CLASS | TYPE_FUNCTION | TYPE_ROOT;\n\n// Modes of rendering\n/** Normal hydration that attaches to a DOM tree but does not diff it. */\nexport const MODE_HYDRATE = 1 << 5;\n/** Top level render unspecified behaviour (old replaceNode parameter to render) */\nexport const MODE_MUTATIVE_HYDRATE = 1 << 6;\n/** Signifies this VNode suspended on the previous render */\nexport const MODE_SUSPENDED = 1 << 7;\n/** Signifies this VNode errored on the previous render */\nexport const MODE_ERRORED = 1 << 8;\n/** Signifies an error has been thrown and this component will be attempting to\n * handle & rerender the error on next render. In other words, on the next\n * render of this component, unset this mode and set the MODE_RERENDERING_ERROR.\n * This flag is distinct from MODE_RERENDERING_ERROR so that a component can\n * catch multiple errors thrown by its children in one render pass (see test\n * \"should handle double child throws\").\n */\nexport const MODE_PENDING_ERROR = 1 << 9;\n/** Signifies this Internal is attempting to \"handle\" an error and is\n * rerendering. This mode tracks that a component's last rerender was trying to\n * handle an error. As such, if another error is thrown while a component has\n * this flag set, it should not handle the newly thrown error since it failed to\n * successfully rerender the original error. This prevents error handling\n * infinite render loops */\nexport const MODE_RERENDERING_ERROR = 1 << 10;\n/** Signals this internal has been unmounted */\nexport const MODE_UNMOUNTING = 1 << 11;\n/** This Internal is rendered in an SVG tree */\nexport const MODE_SVG = 1 << 12;\n\n/** Signifies that bailout checks will be bypassed */\nexport const FORCE_UPDATE = 1 << 13;\n/** Signifies that a node needs to be updated */\nexport const DIRTY_BIT = 1 << 14;\n/** Signals the component can skip children due to a non-update */\nexport const SKIP_CHILDREN = 1 << 15;\n\n/** Reset all mode flags */\nexport const RESET_MODE = ~(\n\tMODE_HYDRATE |\n\tMODE_MUTATIVE_HYDRATE |\n\tMODE_SUSPENDED |\n\tMODE_ERRORED |\n\tMODE_RERENDERING_ERROR |\n\tFORCE_UPDATE |\n\tSKIP_CHILDREN\n);\n\n/** Modes a child internal inherits from their parent */\nexport const INHERITED_MODES = MODE_HYDRATE | MODE_MUTATIVE_HYDRATE | MODE_SVG;\n\nexport const EMPTY_ARR = [];\nexport const UNDEFINED = undefined;\n","import { Component, createElement, options, Fragment, createPortal } from 'preact';\nimport { TYPE_ELEMENT, MODE_HYDRATE } from '../../src/constants';\nimport { getParentDom } from '../../src/tree';\n\nconst oldCatchError = options._catchError;\n/** @type {(error: any, internal: import('./internal').Internal) => void} */\noptions._catchError = function(error, internal) {\n\tif (error.then) {\n\t\t/** @type {import('./internal').Component} */\n\t\tlet component;\n\t\tlet handler = internal;\n\n\t\tfor (; (handler = handler._parent); ) {\n\t\t\tif ((component = handler._component) && component._childDidSuspend) {\n\t\t\t\t// Don't call oldCatchError if we found a Suspense\n\t\t\t\treturn component._childDidSuspend(error, internal);\n\t\t\t}\n\t\t}\n\t}\n\toldCatchError(error, internal);\n};\n\nconst oldUnmount = options.unmount;\n/** @type {(internal: import('./internal').Internal) => void} */\noptions.unmount = function(internal) {\n\t/** @type {import('./internal').Component} */\n\tconst component = internal._component;\n\tif (component && component._onResolve) {\n\t\tcomponent._onResolve();\n\t}\n\n\t// If a component suspended while it was hydrating and is now being unmounted,\n\t// update it's flags so it appears to be of TYPE_ELEMENT, causing `unmount`\n\t// to remove the DOM nodes that were awaiting hydration (which are stored on\n\t// this internal's _dom property).\n\tconst wasHydrating = (internal.flags & MODE_HYDRATE) === MODE_HYDRATE;\n\tif (component && wasHydrating) {\n\t\tinternal.flags |= TYPE_ELEMENT;\n\t}\n\n\tif (oldUnmount) oldUnmount(internal);\n};\n\n// having custom inheritance instead of a class here saves a lot of bytes\nexport function Suspense() {\n\t// we do not call super here to golf some bytes...\n\tthis._pendingSuspensionCount = 0;\n\t/** @type {Array<import('./internal').Internal>} */\n\tthis._suspenders = null;\n\t/** @type {import('./internal').PreactElement} */\n\tthis._parentDom = null;\n\t/** @type {number} */\n\tthis._portalVNodeId = 0;\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 * @this {import('./internal').SuspenseComponent}\n * @param {Promise} promise The thrown promise\n * @param {import('./internal').Internal} suspendingInternal The suspending component\n */\nSuspense.prototype._childDidSuspend = function(promise, suspendingInternal) {\n\tconst suspendingComponent = suspendingInternal._component;\n\tif (suspendingComponent._onResolve != null) {\n\t\t// This component has already been handled by a Suspense component. Do\n\t\t// nothing\n\t\treturn;\n\t}\n\n\t/** @type {import('./internal').SuspenseComponent} */\n\tconst c = this;\n\n\tif (c._suspenders == null) {\n\t\tc._suspenders = [];\n\t}\n\tc._suspenders.push(suspendingComponent);\n\n\tconst resolve = suspended(c._internal);\n\n\tlet resolved = false;\n\tconst onResolved = () => {\n\t\tif (resolved) return;\n\n\t\tresolved = true;\n\t\tsuspendingComponent._onResolve = null;\n\n\t\tif (resolve) {\n\t\t\tresolve(onSuspensionComplete);\n\t\t} else {\n\t\t\tonSuspensionComplete();\n\t\t}\n\t};\n\n\tsuspendingComponent._onResolve = onResolved;\n\n\tconst onSuspensionComplete = () => {\n\t\tif (!--c._pendingSuspensionCount) {\n\t\t\tthis._parentDom = null;\n\t\t\tc.setState({ _suspended: false });\n\n\t\t\tlet suspended;\n\t\t\twhile ((suspended = c._suspenders.pop())) {\n\t\t\t\tsuspended.forceUpdate();\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * We do not set `suspended: true` during hydration because we want the actual markup\n\t * to remain on screen and hydrate it when the suspense actually gets resolved.\n\t * While in non-hydration cases the usual fallback -> component flow would occur.\n\t */\n\tconst wasHydrating =\n\t\t(suspendingInternal.flags & MODE_HYDRATE) === MODE_HYDRATE;\n\n\tif (!c._pendingSuspensionCount++ && !wasHydrating) {\n\t\tthis._parentDom = document.createElement('div');\n\t\tc.setState({ _suspended: true });\n\t}\n\n\tpromise.then(onResolved, onResolved);\n};\n\nSuspense.prototype.componentWillUnmount = function() {\n\tthis._suspenders = [];\n\tthis._parentDom = null;\n};\n\n/**\n * @this {import('./internal').SuspenseComponent}\n * @param {import('./internal').SuspenseComponent[\"props\"]} props\n * @param {import('./internal').SuspenseState} state\n */\nSuspense.prototype.render = function(props, state) {\n\tif (this._parentDom == null) {\n\t\tthis._parentDom = getParentDom(this._internal);\n\t}\n\n\t// Wrap fallback tree in a VNode that prevents itself from being marked as aborting mid-hydration:\n\tconst fallback =\n\t\tstate._suspended && createElement(Fragment, null, props.fallback);\n\n\tconst portal = createPortal(props.children, this._parentDom);\n\tif (state._suspended) {\n\t\t// If we are suspended, don't rerender all of the portal's children. Instead\n\t\t// just reorder the Portal's children\n\t\tportal._vnodeId = this._portalVNodeId;\n\t} else {\n\t\tthis._portalVNodeId = portal._vnodeId;\n\t}\n\n\treturn [portal, fallback];\n};\n\n/**\n * Checks and calls the parent component's _suspended method, passing in the\n * suspended Internal. This is a way for a parent (e.g. SuspenseList) to get\n * notified that one of its children/descendants suspended.\n *\n * The parent MAY return a callback. The callback will get called when the\n * suspension resolves, notifying the parent of the fact. Moreover, the callback\n * gets function `unsuspend` as a parameter. The resolved child descendant will\n * not actually get unsuspended until `unsuspend` gets called. This is a way for\n * the parent to delay unsuspending.\n *\n * If the parent does not return a callback then the resolved Internal gets\n * unsuspended immediately when it resolves.\n *\n * @param {import('./internal').Internal} internal\n * @returns {((unsuspend: () => void) => void)?}\n */\nexport function suspended(internal) {\n\tlet component = internal._parent._component;\n\treturn component && component._suspended && component._suspended(internal);\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\texports => {\n\t\t\t\t\tcomponent = exports.default || exports;\n\t\t\t\t},\n\t\t\t\te => {\n\t\t\t\t\terror = e;\n\t\t\t\t}\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 { Component, toChildArray } from 'preact';\nimport { suspended } from './suspense';\n\n// Indexes to linked list nodes (nodes are stored as arrays to save bytes).\nconst SUSPENDED_COUNT = 0;\nconst RESOLVED_COUNT = 1;\nconst NEXT_NODE = 2;\n\n// Having custom inheritance instead of a class here saves a lot of bytes.\nexport function SuspenseList() {\n\tthis._next = null;\n\tthis._map = null;\n}\n\n// Mark one of child's earlier suspensions as resolved.\n// Some pending callbacks may become callable due to this\n// (e.g. the last suspended descendant gets resolved when\n// revealOrder === 'together'). Process those callbacks as well.\nconst resolve = (list, child, node) => {\n\tif (++node[RESOLVED_COUNT] === node[SUSPENDED_COUNT]) {\n\t\t// The number a child (or any of its descendants) has been suspended\n\t\t// matches the number of times it's been resolved. Therefore we\n\t\t// mark the child as completely resolved by deleting it from ._map.\n\t\t// This is used to figure out when *all* children have been completely\n\t\t// resolved when revealOrder is 'together'.\n\t\tlist._map.delete(child.props);\n\t}\n\n\t// If revealOrder is falsy then we can do an early exit, as the\n\t// callbacks won't get queued in the node anyway.\n\t// If revealOrder is 'together' then also do an early exit\n\t// if all suspended descendants have not yet been resolved.\n\tif (\n\t\t!list.props.revealOrder ||\n\t\t(list.props.revealOrder[0] === 't' && list._map.size)\n\t) {\n\t\treturn;\n\t}\n\n\t// Walk the currently suspended children in order, calling their\n\t// stored callbacks on the way. Stop if we encounter a child that\n\t// has not been completely resolved yet.\n\tnode = list._next;\n\twhile (node) {\n\t\twhile (node.length > 3) {\n\t\t\tnode.pop()();\n\t\t}\n\t\tif (node[RESOLVED_COUNT] < node[SUSPENDED_COUNT]) {\n\t\t\tbreak;\n\t\t}\n\t\tlist._next = node = node[NEXT_NODE];\n\t}\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`\nSuspenseList.prototype = new Component();\n\nSuspenseList.prototype._suspended = function(child) {\n\tconst list = this;\n\tconst delegated = suspended(list._internal);\n\tconst node = list._map.get(child.props);\n\tnode[SUSPENDED_COUNT]++;\n\n\treturn unsuspend => {\n\t\tconst wrappedUnsuspend = () => {\n\t\t\tif (!list.props.revealOrder) {\n\t\t\t\t// Special case the undefined (falsy) revealOrder, as there\n\t\t\t\t// is no need to coordinate a specific order or unsuspends.\n\t\t\t\tunsuspend();\n\t\t\t} else {\n\t\t\t\tnode.push(unsuspend);\n\t\t\t\tresolve(list, child, node);\n\t\t\t}\n\t\t};\n\n\t\tif (delegated) {\n\t\t\tdelegated(wrappedUnsuspend);\n\t\t} else {\n\t\t\twrappedUnsuspend();\n\t\t}\n\t};\n};\n\nSuspenseList.prototype.render = function(props) {\n\tthis._next = null;\n\tthis._map = new Map();\n\n\tconst children = toChildArray(props.children);\n\tif (props.revealOrder && props.revealOrder[0] === 'b') {\n\t\t// If order === 'backwards' (or, well, anything starting with a 'b')\n\t\t// then flip the child list around so that the last child will be\n\t\t// the first in the linked list.\n\t\tchildren.reverse();\n\t}\n\t// Build the linked list. Iterate through the children in reverse order\n\t// so that `_next` points to the first linked list node to be resolved.\n\tfor (let i = children.length; i--; ) {\n\t\t// Create a new linked list node as an array of form:\n\t\t// \t[suspended_count, resolved_count, next_node]\n\t\t// where suspended_count and resolved_count are numeric counters for\n\t\t// keeping track how many times a node has been suspended and resolved.\n\t\t//\n\t\t// Note that suspended_count starts from 1 instead of 0, so we can block\n\t\t// processing callbacks until componentDidMount has been called. In a sense\n\t\t// node is suspended at least until componentDidMount gets called!\n\t\t//\n\t\t// Pending callbacks are added to the end of the node:\n\t\t// \t[suspended_count, resolved_count, next_node, callback_0, callback_1, ...]\n\t\tthis._map.set(children[i].props, (this._next = [1, 0, this._next]));\n\t}\n\treturn props.children;\n};\n\nSuspenseList.prototype.componentDidUpdate = SuspenseList.prototype.componentDidMount = function() {\n\t// Iterate through all children after mounting for two reasons:\n\t// 1. As each node[SUSPENDED_COUNT] starts from 1, this iteration increases\n\t// each node[RELEASED_COUNT] by 1, therefore balancing the counters.\n\t// The nodes can now be completely consumed from the linked list.\n\t// 2. Handle nodes that might have gotten resolved between render and\n\t// componentDidMount.\n\tthis._map.forEach((node, child) => {\n\t\tresolve(this, { props: child }, node);\n\t});\n};\n","import {\n\trender as preactRender,\n\thydrate as preactHydrate,\n\toptions,\n\ttoChildArray,\n\tComponent\n} from 'preact';\nimport { getParentContext } from '../../src/tree';\nimport { IS_NON_DIMENSIONAL } from './util';\n\nexport const REACT_ELEMENT_TYPE =\n\t(typeof Symbol != 'undefined' && Symbol.for && Symbol.for('react.element')) ||\n\t0xeac7;\n\nconst CAMEL_PROPS = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/;\nconst IS_DOM = typeof document !== 'undefined';\n\n// Input types for which onchange should not be converted to oninput.\n// type=\"file|checkbox|radio\", plus \"range\" in IE11.\n// (IE11 doesn't support Symbol, which we use here to turn `rad` into `ra` which matches \"range\")\nconst onChangeInputType = type =>\n\t(typeof Symbol != 'undefined' && typeof Symbol() == 'symbol'\n\t\t? /fil|che|rad/i\n\t\t: /fil|che|ra/i\n\t).test(type);\n\n// Some libraries like `react-virtualized` explicitly check for this.\nComponent.prototype.isReactComponent = {};\n\n// `UNSAFE_*` lifecycle hooks\n// Preact only ever invokes the unprefixed methods.\n// Here we provide a base \"fallback\" implementation that calls any defined UNSAFE_ prefixed method.\n// - If a component defines its own `componentDidMount()` (including via defineProperty), use that.\n// - If a component defines `UNSAFE_componentDidMount()`, `componentDidMount` is the alias getter/setter.\n// - If anything assigns to an `UNSAFE_*` property, the assignment is forwarded to the unprefixed property.\n// See https://github.com/preactjs/preact/issues/1941\n[\n\t'componentWillMount',\n\t'componentWillReceiveProps',\n\t'componentWillUpdate'\n].forEach(key => {\n\tObject.defineProperty(Component.prototype, key, {\n\t\tconfigurable: true,\n\t\tget() {\n\t\t\treturn this['UNSAFE_' + key];\n\t\t},\n\t\tset(v) {\n\t\t\tObject.defineProperty(this, key, {\n\t\t\t\tconfigurable: true,\n\t\t\t\twritable: true,\n\t\t\t\tvalue: v\n\t\t\t});\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 */\nexport function 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\tparent.textContent = '';\n\t}\n\n\tpreactRender(vnode, parent);\n\tif (typeof callback == 'function') callback();\n\n\tconst internal = parent._children._children[0];\n\treturn internal ? internal._component : null;\n}\n\nexport function hydrate(vnode, parent, callback) {\n\tpreactHydrate(vnode, parent);\n\tif (typeof callback == 'function') callback();\n\n\treturn vnode ? vnode._component : null;\n}\n\nlet oldEventHook = options.event;\noptions.event = e => {\n\tif (oldEventHook) e = oldEventHook(e);\n\te.persist = empty;\n\te.isPropagationStopped = isPropagationStopped;\n\te.isDefaultPrevented = isDefaultPrevented;\n\treturn (e.nativeEvent = e);\n};\n\nfunction empty() {}\n\nfunction isPropagationStopped() {\n\treturn this.cancelBubble;\n}\n\nfunction isDefaultPrevented() {\n\treturn this.defaultPrevented;\n}\n\nlet classNameDescriptor = {\n\tconfigurable: true,\n\tget() {\n\t\treturn this.class;\n\t}\n};\n\nlet oldVNodeHook = options.vnode;\noptions.vnode = vnode => {\n\tlet i;\n\tlet type = vnode.type;\n\tlet props = vnode.props;\n\t/** @type {any} */\n\tlet normalizedProps = props;\n\n\t// only normalize props on Element nodes\n\tif (typeof type === 'string') {\n\t\tconst nonCustomElement = type.indexOf('-') === -1;\n\t\tnormalizedProps = {};\n\n\t\tlet style = props.style;\n\t\tif (typeof style === 'object') {\n\t\t\tfor (i in style) {\n\t\t\t\tif (typeof style[i] === 'number' && !IS_NON_DIMENSIONAL.test(i)) {\n\t\t\t\t\tstyle[i] += 'px';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (i in props) {\n\t\t\tlet value = props[i];\n\n\t\t\tif (IS_DOM && i === 'children' && type === 'noscript') {\n\t\t\t\t// Emulate React's behavior of not rendering the contents of noscript tags on the client.\n\t\t\t\tcontinue;\n\t\t\t} else if (i === 'value' && 'defaultValue' in props && value == null) {\n\t\t\t\t// Skip applying value if it is null/undefined and we already set\n\t\t\t\t// a default value\n\t\t\t\tcontinue;\n\t\t\t} else if (\n\t\t\t\ti === 'defaultValue' &&\n\t\t\t\t'value' in props &&\n\t\t\t\tprops.value == null\n\t\t\t) {\n\t\t\t\t// `defaultValue` is treated as a fallback `value` when a value prop is present but null/undefined.\n\t\t\t\t// `defaultValue` for Elements with no value prop is the same as the DOM defaultValue property.\n\t\t\t\ti = 'value';\n\t\t\t} else if (i === 'download' && value === true) {\n\t\t\t\t// Calling `setAttribute` with a truthy value will lead to it being\n\t\t\t\t// passed as a stringified value, e.g. `download=\"true\"`. React\n\t\t\t\t// converts it to an empty string instead, otherwise the attribute\n\t\t\t\t// value will be used as the file name and the file will be called\n\t\t\t\t// \"true\" upon downloading it.\n\t\t\t\tvalue = '';\n\t\t\t} else if (/ondoubleclick/i.test(i)) {\n\t\t\t\ti = 'ondblclick';\n\t\t\t} else if (\n\t\t\t\t/^onchange(textarea|input)/i.test(i + type) &&\n\t\t\t\t!onChangeInputType(props.type)\n\t\t\t) {\n\t\t\t\ti = 'oninput';\n\t\t\t} else if (/^onfocus$/i.test(i)) {\n\t\t\t\ti = 'onfocusin';\n\t\t\t} else if (/^onblur$/i.test(i)) {\n\t\t\t\ti = 'onfocusout';\n\t\t\t} else if (/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(i)) {\n\t\t\t\ti = i.toLowerCase();\n\t\t\t} else if (nonCustomElement && CAMEL_PROPS.test(i)) {\n\t\t\t\ti = i.replace(/[A-Z0-9]/, '-$&').toLowerCase();\n\t\t\t} else if (value === null) {\n\t\t\t\tvalue = undefined;\n\t\t\t}\n\n\t\t\tnormalizedProps[i] = value;\n\t\t}\n\n\t\t// Add support for array select values: <select multiple value={[]} />\n\t\tif (\n\t\t\ttype == 'select' &&\n\t\t\tnormalizedProps.multiple &&\n\t\t\tArray.isArray(normalizedProps.value)\n\t\t) {\n\t\t\t// forEach() always returns undefined, which we abuse here to unset the value prop.\n\t\t\tnormalizedProps.value = toChildArray(props.children).forEach(child => {\n\t\t\t\tchild.props.selected =\n\t\t\t\t\tnormalizedProps.value.indexOf(child.props.value) != -1;\n\t\t\t});\n\t\t}\n\n\t\t// Adding support for defaultValue in select tag\n\t\tif (type == 'select' && normalizedProps.defaultValue != null) {\n\t\t\tnormalizedProps.value = toChildArray(props.children).forEach(child => {\n\t\t\t\tif (normalizedProps.multiple) {\n\t\t\t\t\tchild.props.selected =\n\t\t\t\t\t\tnormalizedProps.defaultValue.indexOf(child.props.value) != -1;\n\t\t\t\t} else {\n\t\t\t\t\tchild.props.selected =\n\t\t\t\t\t\tnormalizedProps.defaultValue == child.props.value;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tvnode.props = normalizedProps;\n\n\t\tif (type && props.class != props.className) {\n\t\t\tclassNameDescriptor.enumerable = 'className' in props;\n\t\t\tif (props.className != null) normalizedProps.class = props.className;\n\t\t\tObject.defineProperty(normalizedProps, 'className', classNameDescriptor);\n\t\t}\n\t} else if (typeof type === 'function' && type.defaultProps) {\n\t\tfor (i in type.defaultProps) {\n\t\t\tif (normalizedProps[i] === undefined) {\n\t\t\t\tnormalizedProps[i] = type.defaultProps[i];\n\t\t\t}\n\t\t}\n\t}\n\n\tvnode.$$typeof = REACT_ELEMENT_TYPE;\n\n\tif (oldVNodeHook) oldVNodeHook(vnode);\n};\n\n// Only needed for react-relay\nlet currentContext;\nconst oldBeforeRender = options._render;\noptions._render = function(internal) {\n\tif (oldBeforeRender) {\n\t\toldBeforeRender(internal);\n\t}\n\tcurrentContext = getParentContext(internal);\n};\n\n// This is a very very private internal function for React it\n// is used to sort-of do runtime dependency injection. So far\n// only `react-relay` makes use of it. It uses it to read the\n// context value.\nexport const __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {\n\tReactCurrentDispatcher: {\n\t\tcurrent: {\n\t\t\treadContext(context) {\n\t\t\t\treturn currentContext[context._id].props.value;\n\t\t\t}\n\t\t}\n\t}\n};\n","// This file includes experimental React APIs exported from the \"scheduler\"\n// npm package. Despite being explicitely marked as unstable some libraries\n// already make use of them. This file is not a full replacement for the\n// scheduler package, but includes the necessary shims to make those libraries\n// work with Preact.\n\nexport const unstable_ImmediatePriority = 1;\nexport const unstable_UserBlockingPriority = 2;\nexport const unstable_NormalPriority = 3;\nexport const unstable_LowPriority = 4;\nexport const unstable_IdlePriority = 5;\n\n/**\n * @param {number} priority\n * @param {() => void} callback\n */\nexport function unstable_runWithPriority(priority, callback) {\n\treturn callback();\n}\n\nexport const unstable_now =\n\ttypeof performance === 'object' && typeof performance.now === 'function'\n\t\t? performance.now.bind(performance)\n\t\t: () => Date.now();\n","import {\n\tcreateElement,\n\trender as preactRender,\n\tcloneElement as preactCloneElement,\n\tcreateRef,\n\tComponent,\n\tcreateContext,\n\tFragment,\n\tcreateRoot,\n\tcreatePortal\n} from 'preact';\nimport {\n\tuseState,\n\tuseReducer,\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseRef,\n\tuseImperativeHandle,\n\tuseMemo,\n\tuseCallback,\n\tuseContext,\n\tuseDebugValue\n} from 'preact/hooks';\nimport { PureComponent } from './PureComponent';\nimport { memo } from './memo';\nimport { forwardRef } from './forwardRef';\nimport { Children } from './Children';\nimport { Suspense, lazy } from './suspense';\nimport { SuspenseList } from './suspense-list';\nimport {\n\thydrate,\n\trender,\n\tREACT_ELEMENT_TYPE,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n} from './render';\nimport { getChildDom } from '../../src/tree';\nexport * from './scheduler';\n\nconst version = '17.0.2'; // trick libraries to think we are react\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 * 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 * 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<import('./internal').ComponentChildren>} rest Optional component children\n */\nfunction cloneElement(element) {\n\tif (!isValidElement(element)) return element;\n\treturn preactCloneElement.apply(null, arguments);\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 * 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\tif (component == null) {\n\t\treturn null;\n\t} else if (component.nodeType == 1) {\n\t\treturn component;\n\t}\n\n\treturn getChildDom(component._internal);\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\n/**\n * Strict Mode is not implemented in Preact, so we provide a stand-in for it\n * that just renders its children without imposing any restrictions.\n */\nconst StrictMode = Fragment;\n\n/**\n * In React, `flushSync` flushes the entire tree and forces a rerender. It's\n * implmented here as a no-op.\n * @template Arg\n * @template Result\n * @param {(arg: Arg) => Result} callback function that runs before the flush\n * @param {Arg} [arg] Optional arugment that can be passed to the callback\n * @returns\n */\nconst flushSync = (callback, arg) => callback(arg);\n\nexport * from 'preact/hooks';\nexport {\n\tversion,\n\tChildren,\n\trender,\n\tflushSync,\n\thydrate,\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\tStrictMode,\n\tSuspense,\n\tSuspenseList,\n\tlazy,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,\n\tcreateRoot\n};\n\n// React copies the named exports to the default one.\nexport default {\n\tuseState,\n\tuseReducer,\n\tflushSync,\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseRef,\n\tuseImperativeHandle,\n\tuseMemo,\n\tuseCallback,\n\tuseContext,\n\tuseDebugValue,\n\tversion,\n\tChildren,\n\trender,\n\thydrate,\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\tStrictMode,\n\tSuspense,\n\tSuspenseList,\n\tlazy,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,\n\tcreateRoot\n};\n"],"names":["IS_NON_DIMENSIONAL","shallowDiffers","a","b","i","PureComponent","p","this","props","memo","c","comparer","Memoed","prototype","Component","displayName","name","render","createElement","shouldComponentUpdate","nextProps","ref","updateRef","call","current","isReactComponent","isPureReactComponent","state","oldDiffHook","options","internal","vnode","type","REACT_FORWARD_SYMBOL","Symbol","for","forwardRef","fn","Forwarded","clone","Object","assign","$$typeof","mapFn","children","toChildArray","map","Children","forEach","count","length","only","normalized","toArray","Promise","then","bind","resolve","shouldSearchComponent","TYPE_CLASS","flags","getParentDom","getChildDom","child","TYPE_TEXT","childDom","getParentContext","parent","oldCatchError","error","component","handler","oldUnmount","unmount","Suspense","_suspenders","_portalVNodeId","suspended","lazy","loader","prom","Lazy","exports","default","e","SuspenseList","_next","_map","promise","suspendingInternal","suspendingComponent","push","resolved","onResolved","onSuspensionComplete","setState","__e","pop","forceUpdate","wasHydrating","document","componentWillUnmount","fallback","Fragment","portal","createPortal","list","node","delete","revealOrder","size","delegated","get","unsuspend","wrappedUnsuspend","Map","reverse","set","componentDidUpdate","componentDidMount","REACT_ELEMENT_TYPE","CAMEL_PROPS","IS_DOM","onChangeInputType","test","callback","textContent","preactRender","hydrate","preactHydrate","key","defineProperty","configurable","v","writable","value","oldEventHook","event","empty","isPropagationStopped","cancelBubble","isDefaultPrevented","defaultPrevented","persist","nativeEvent","currentContext","classNameDescriptor","class","oldVNodeHook","normalizedProps","nonCustomElement","indexOf","style","toLowerCase","replace","undefined","multiple","Array","isArray","selected","defaultValue","className","enumerable","defaultProps","oldBeforeRender","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentDispatcher","readContext","context","unstable_ImmediatePriority","unstable_UserBlockingPriority","unstable_NormalPriority","unstable_LowPriority","unstable_IdlePriority","unstable_runWithPriority","priority","unstable_now","performance","now","Date","version","createFactory","isValidElement","element","cloneElement","preactCloneElement","apply","arguments","unmountComponentAtNode","container","findDOMNode","nodeType","unstable_batchedUpdates","arg","StrictMode","flushSync","useState","useReducer","useEffect","useLayoutEffect","useRef","useImperativeHandle","useMemo","useCallback","useContext","useDebugValue","createContext","createRef","createRoot"],"mappings":"yhBAAaA,EAAqB,6HAQlBC,EAAeC,EAAGC,GACjC,IAAK,IAAIC,KAAKF,EAAG,GAAU,aAANE,KAAsBA,KAAKD,GAAI,SACpD,IAAK,IAAIC,KAAKD,EAAG,GAAU,aAANC,GAAoBF,EAAEE,KAAOD,EAAEC,GAAI,SACxD,kBCLeC,EAAcC,GAC7BC,KAAKC,MAAQF,WCGEG,EAAKC,EAAGC,GACvB,SAASC,KAyBT,OAvBAA,EAAOC,UAAY,IAAIC,EACvBF,EAAOG,YAAc,SAAWL,EAAEK,aAAeL,EAAEM,MAAQ,IAE3DJ,EAAOC,UAAUI,OAAS,SAAST,GAClC,OAAOU,EAAcR,EAAGF,IAGzBI,EAAOC,UAAUM,sBAAwB,SAASC,GACjD,IAAIC,EAAMd,KAAKC,MAAMa,IACjBC,EAAYD,GAAOD,EAAUC,IAKjC,OAJKC,GAAaD,IACjBA,EAAIE,KAAOF,EAAI,MAASA,EAAIG,QAAU,MAGlCb,GAIGA,EAASJ,KAAKC,MAAOY,KAAeE,EAHpCrB,EAAeM,KAAKC,MAAOY,IAMpCR,EAAOC,UAAUY,kBAAmB,EACpCb,OAAoB,EACbA,GD3BRP,EAAcQ,UAAY,IAAIC,GAENY,sBAAuB,EAC/CrB,EAAcQ,UAAUM,sBAAwB,SAASX,EAAOmB,GAC/D,OAAO1B,EAAeM,KAAKC,MAAOA,IAAUP,EAAeM,KAAKoB,MAAOA,IEXxE,IAAIC,EAAcC,MAClBA,MAAgB,CAACC,EAAUC,KACtBD,EAASE,MAAQF,EAASE,UAAmBD,EAAMV,MACtDU,EAAMvB,MAAMa,IAAMU,EAAMV,IACxBU,EAAMV,IAAM,KACZS,EAAST,IAAM,MAEZO,GAAaA,EAAYE,EA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GACAuB,UAAAA,EACAxG,SAAAA,EACA+E,eAAAA,GACAQ,YAAAA,GACAhL,UAAAA,EACAT,cAAAA,EACAI,KAAAA,EACA2B,WAAAA,EACA4J,wBAAAA,GACAE,WAAAA,GACAxH,SAAAA,EACAW,aAAAA,EACAP,KAAAA,EACAuF,mDAAAA,GACA2C,WAAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"debug.mjs","sources":["../src/check-props.js","../src/component-stack.js","../../compat/src/util.js","../src/debug.js","../../src/constants.js","../src/constants.js","../src/index.js"],"sourcesContent":["const ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nlet loggedTypeFailures = {};\n\n/**\n * Reset the history of which prop type warnings have been logged.\n */\nexport function resetPropWarnings() {\n\tloggedTypeFailures = {};\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * Adapted from https://github.com/facebook/prop-types/blob/master/checkPropTypes.js\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n */\nexport function checkPropTypes(\n\ttypeSpecs,\n\tvalues,\n\tlocation,\n\tcomponentName,\n\tgetStack\n) {\n\tObject.keys(typeSpecs).forEach(typeSpecName => {\n\t\tlet error;\n\t\ttry {\n\t\t\terror = typeSpecs[typeSpecName](\n\t\t\t\tvalues,\n\t\t\t\ttypeSpecName,\n\t\t\t\tcomponentName,\n\t\t\t\tlocation,\n\t\t\t\tnull,\n\t\t\t\tReactPropTypesSecret\n\t\t\t);\n\t\t} catch (e) {\n\t\t\terror = e;\n\t\t}\n\t\tif (error && !(error.message in loggedTypeFailures)) {\n\t\t\tloggedTypeFailures[error.message] = true;\n\t\t\tconsole.error(\n\t\t\t\t`Failed ${location} type: ${error.message}${(getStack &&\n\t\t\t\t\t`\\n${getStack()}`) ||\n\t\t\t\t\t''}`\n\t\t\t);\n\t\t}\n\t});\n}\n","import { options, Fragment } from 'preact';\n\n/**\n * Get human readable name of the component/dom node\n * @param {import('./internal').VNode} vnode\n * @param {import('./internal').VNode} vnode\n * @returns {string}\n */\nexport function getDisplayName(vnode) {\n\tif (vnode.type === Fragment) {\n\t\treturn 'Fragment';\n\t} else if (typeof vnode.type == 'function') {\n\t\treturn vnode.type.displayName || vnode.type.name;\n\t} else if (typeof vnode.type == 'string') {\n\t\treturn vnode.type;\n\t}\n\n\treturn '#text';\n}\n\n/**\n * Used to keep track of the currently rendered `vnode` and print it\n * in debug messages.\n */\nlet renderStack = [];\n\n/**\n * Keep track of the current owners. An owner describes a component\n * which was responsible to render a specific `vnode`. This exclude\n * children that are passed via `props.children`, because they belong\n * to the parent owner.\n *\n * ```jsx\n * const Foo = props => <div>{props.children}</div> // div's owner is Foo\n * const Bar = props => {\n * return (\n * <Foo><span /></Foo> // Foo's owner is Bar, span's owner is Bar\n * )\n * }\n * ```\n *\n * Note: A `vnode` may be hoisted to the root scope due to compiler\n * optimiztions. In these cases the `_owner` will be different.\n */\nlet ownerStack = [];\n\n/**\n * Get the currently rendered instance\n * @returns {import('./internal').Internal | null}\n */\nexport function getCurrentInternal() {\n\treturn renderStack.length > 0 ? renderStack[renderStack.length - 1] : null;\n}\n\n/**\n * If the user doesn't have `@babel/plugin-transform-react-jsx-source`\n * somewhere in his tool chain we can't print the filename and source\n * location of a component. In that case we just omit that, but we'll\n * print a helpful message to the console, notifying the user of it.\n */\nlet hasBabelPlugin = false;\n\n/**\n * Check if a `vnode` is a possible owner.\n * @param {import('./internal').Internal} internal\n */\nfunction isPossibleOwner(internal) {\n\treturn typeof internal.type == 'function' && internal.type != Fragment;\n}\n\n/**\n * Return the component stack that was captured up to this point.\n * @param {import('./internal').Internal} internal\n * @returns {string}\n */\nexport function getOwnerStack(internal) {\n\tconst stack = [internal];\n\tlet next = internal;\n\twhile (next._owner != null) {\n\t\tstack.push(next._owner);\n\t\tnext = next._owner;\n\t}\n\n\treturn stack.reduce((acc, owner) => {\n\t\tacc += ` in ${getDisplayName(owner)}`;\n\n\t\tconst source = owner.props && owner.props.__source;\n\t\tif (source) {\n\t\t\tacc += ` (at ${source.fileName}:${source.lineNumber})`;\n\t\t} else if (!hasBabelPlugin) {\n\t\t\thasBabelPlugin = true;\n\t\t\tconsole.warn(\n\t\t\t\t'Add @babel/plugin-transform-react-jsx-source to get a more detailed component stack. Note that you should not add it to production builds of your App for bundle size reasons.'\n\t\t\t);\n\t\t}\n\n\t\treturn (acc += '\\n');\n\t}, '');\n}\n\n/**\n * Setup code to capture the component trace while rendering. Note that\n * we cannot simply traverse `vnode._parent` upwards, because we have some\n * debug messages for `this.setState` where the `vnode` is `undefined`.\n */\nexport function setupComponentStack() {\n\tlet oldDiff = options._diff;\n\tlet oldDiffed = options.diffed;\n\tlet oldRoot = options._root;\n\tlet oldVNode = options.vnode;\n\tlet oldInternal = options._internal;\n\tlet oldRender = options._render;\n\n\toptions.diffed = internal => {\n\t\tif (isPossibleOwner(internal)) {\n\t\t\townerStack.pop();\n\t\t}\n\t\trenderStack.pop();\n\t\tif (oldDiffed) oldDiffed(internal);\n\t};\n\n\toptions._diff = (internal, vnode) => {\n\t\tif (isPossibleOwner(internal)) {\n\t\t\trenderStack.push(internal);\n\t\t}\n\t\tif (oldDiff) oldDiff(internal, vnode);\n\t};\n\n\toptions._root = (vnode, parent) => {\n\t\townerStack = [];\n\t\tif (oldRoot) oldRoot(vnode, parent);\n\t};\n\n\toptions.vnode = vnode => {\n\t\tvnode._owner =\n\t\t\townerStack.length > 0 ? ownerStack[ownerStack.length - 1] : null;\n\t\tif (oldVNode) oldVNode(vnode);\n\t};\n\n\toptions._internal = (internal, vnode) => {\n\t\tif (internal.type !== null) {\n\t\t\tinternal._owner = vnode._owner;\n\t\t}\n\t\tif (oldInternal) oldInternal(internal, vnode);\n\t};\n\n\toptions._render = vnode => {\n\t\tif (isPossibleOwner(vnode)) {\n\t\t\townerStack.push(vnode);\n\t\t}\n\n\t\tif (oldRender) oldRender(vnode);\n\t};\n}\n","export const IS_NON_DIMENSIONAL = /^(-|f[lo].*[^se]$|g.{5,}[^ps]$|z|o[pr]|(W.{5})?[lL]i.*(t|mp)$|an|(bo|s).{4}Im|sca|m.{6}[ds]|ta|c.*[st]$|wido|ini)/;\n\n/**\n * Check if two objects have a different shape\n * @param {object} a\n * @param {object} b\n * @returns {boolean}\n */\nexport function 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","import { checkPropTypes } from './check-props';\nimport { options, Component } from 'preact';\nimport {\n\tELEMENT_NODE,\n\tDOCUMENT_NODE,\n\tDOCUMENT_FRAGMENT_NODE\n} from './constants';\nimport {\n\tgetOwnerStack,\n\tsetupComponentStack,\n\tgetCurrentInternal,\n\tgetDisplayName\n} from './component-stack';\n// these constants get inlined at build time:\nimport { MODE_UNMOUNTING } from '../../src/constants';\nimport { IS_NON_DIMENSIONAL } from '../../compat/src/util';\n\nconst isWeakMapSupported = typeof WeakMap == 'function';\n\nfunction getClosestDomNodeParent(parent) {\n\tif (!parent) return {};\n\tif (typeof parent.type == 'function') {\n\t\treturn getClosestDomNodeParent(parent._parent);\n\t}\n\treturn parent;\n}\n\nexport function initDebug() {\n\tsetupComponentStack();\n\n\tlet hooksAllowed = false;\n\n\t/* eslint-disable no-console */\n\tlet oldBeforeDiff = options._diff;\n\tlet oldDiffed = options.diffed;\n\tlet oldVnode = options.vnode;\n\tlet oldCatchError = options._catchError;\n\tlet oldRoot = options._root;\n\tlet oldHook = options._hook;\n\tconst warnedComponents = !isWeakMapSupported\n\t\t? null\n\t\t: {\n\t\t\t\tuseEffect: new WeakMap(),\n\t\t\t\tuseLayoutEffect: new WeakMap(),\n\t\t\t\tlazyPropTypes: new WeakMap()\n\t\t };\n\tconst deprecations = [];\n\n\toptions._catchError = (error, vnode, oldVNode) => {\n\t\tlet component = vnode && vnode._component;\n\t\tif (component && typeof error.then == 'function') {\n\t\t\tconst promise = error;\n\t\t\terror = new Error(\n\t\t\t\t`Missing Suspense. The throwing component was: ${getDisplayName(vnode)}`\n\t\t\t);\n\n\t\t\tlet parent = vnode;\n\t\t\tfor (; parent; parent = parent._parent) {\n\t\t\t\tif (parent._component && parent._component._childDidSuspend) {\n\t\t\t\t\terror = promise;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// We haven't recovered and we know at this point that there is no\n\t\t\t// Suspense component higher up in the tree\n\t\t\tif (error instanceof Error) {\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\toldCatchError(error, vnode, oldVNode);\n\n\t\t\t// when an error was handled by an ErrorBoundary we will nontheless emit an error\n\t\t\t// event on the window object. This is to make up for react compatibility in dev mode\n\t\t\t// and thus make the Next.js dev overlay work.\n\t\t\tif (typeof error.then != 'function') {\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tthrow error;\n\t\t\t\t});\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tthrow e;\n\t\t}\n\t};\n\n\toptions._root = (vnode, parentNode) => {\n\t\tif (!parentNode) {\n\t\t\tthrow new Error(\n\t\t\t\t'Undefined parent passed to render(), this is the second argument.\\n' +\n\t\t\t\t\t'Check if the element is available in the DOM/has the correct id.'\n\t\t\t);\n\t\t}\n\n\t\tlet isValid;\n\t\tswitch (parentNode.nodeType) {\n\t\t\tcase ELEMENT_NODE:\n\t\t\tcase DOCUMENT_FRAGMENT_NODE:\n\t\t\tcase DOCUMENT_NODE:\n\t\t\t\tisValid = true;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tisValid = false;\n\t\t}\n\n\t\tif (!isValid) {\n\t\t\tlet componentName = getDisplayName(vnode);\n\t\t\tthrow new Error(\n\t\t\t\t`Expected a valid HTML node as a second argument to render.\tReceived ${parentNode} instead: render(<${componentName} />, ${parentNode});`\n\t\t\t);\n\t\t}\n\n\t\tif (oldRoot) oldRoot(vnode, parentNode);\n\t};\n\n\toptions._diff = (internal, vnode) => {\n\t\tif (vnode === null || typeof vnode !== 'object') return;\n\t\t// Check if the user passed plain objects as children. Note that we cannot\n\t\t// move this check into `options.vnode` because components can receive\n\t\t// children in any shape they want (e.g.\n\t\t// `<MyJSONFormatter>{{ foo: 123, bar: \"abc\" }}</MyJSONFormatter>`).\n\t\tif (vnode.constructor !== undefined) {\n\t\t\tconst keys = Object.keys(vnode).join(',');\n\t\t\tthrow new Error(\n\t\t\t\t`Objects are not valid as a child. Encountered an object with the keys {${keys}}.` +\n\t\t\t\t\t`\\n\\n${getOwnerStack(internal)}`\n\t\t\t);\n\t\t}\n\n\t\tlet { type, _parent: parent } = internal;\n\n\t\tif (type === undefined) {\n\t\t\tthrow new Error(\n\t\t\t\t'Undefined component passed to createElement()\\n\\n' +\n\t\t\t\t\t'You likely forgot to export your component or might have mixed up default and named imports' +\n\t\t\t\t\tserializeVNode(vnode) +\n\t\t\t\t\t`\\n\\n${getOwnerStack(internal)}`\n\t\t\t);\n\t\t} else if (type != null && typeof type == 'object') {\n\t\t\tif (type.constructor === undefined) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Invalid type passed to createElement(): ${type}\\n\\n` +\n\t\t\t\t\t\t'Did you accidentally pass a JSX literal as JSX twice?\\n\\n' +\n\t\t\t\t\t\t` let My${getDisplayName(internal)} = ${serializeVNode(type)};\\n` +\n\t\t\t\t\t\t` let vnode = <My${getDisplayName(internal)} />;\\n\\n` +\n\t\t\t\t\t\t'This usually happens when you export a JSX literal and not the component.' +\n\t\t\t\t\t\t`\\n\\n${getOwnerStack(internal)}`\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthrow new Error(\n\t\t\t\t'Invalid type passed to createElement(): ' +\n\t\t\t\t\t(Array.isArray(type) ? 'array' : type)\n\t\t\t);\n\t\t}\n\n\t\tlet parentVNode = getClosestDomNodeParent(parent);\n\n\t\thooksAllowed = true;\n\n\t\tif (\n\t\t\t(type === 'thead' || type === 'tfoot' || type === 'tbody') &&\n\t\t\tparentVNode.type !== 'table'\n\t\t) {\n\t\t\tconsole.error(\n\t\t\t\t'Improper nesting of table. Your <thead/tbody/tfoot> should have a <table> parent.' +\n\t\t\t\t\tserializeVNode(internal) +\n\t\t\t\t\t`\\n\\n${getOwnerStack(internal)}`\n\t\t\t);\n\t\t} else if (\n\t\t\ttype === 'tr' &&\n\t\t\tparentVNode.type !== 'thead' &&\n\t\t\tparentVNode.type !== 'tfoot' &&\n\t\t\tparentVNode.type !== 'tbody' &&\n\t\t\tparentVNode.type !== 'table'\n\t\t) {\n\t\t\tconsole.error(\n\t\t\t\t'Improper nesting of table. Your <tr> should have a <thead/tbody/tfoot/table> parent.' +\n\t\t\t\t\tserializeVNode(internal) +\n\t\t\t\t\t`\\n\\n${getOwnerStack(internal)}`\n\t\t\t);\n\t\t} else if (type === 'td' && parentVNode.type !== 'tr') {\n\t\t\tconsole.error(\n\t\t\t\t'Improper nesting of table. Your <td> should have a <tr> parent.' +\n\t\t\t\t\tserializeVNode(internal) +\n\t\t\t\t\t`\\n\\n${getOwnerStack(internal)}`\n\t\t\t);\n\t\t} else if (type === 'th' && parentVNode.type !== 'tr') {\n\t\t\tconsole.error(\n\t\t\t\t'Improper nesting of table. Your <th> should have a <tr>.' +\n\t\t\t\t\tserializeVNode(internal) +\n\t\t\t\t\t`\\n\\n${getOwnerStack(internal)}`\n\t\t\t);\n\t\t}\n\t\tlet isCompatNode = '$$typeof' in vnode;\n\t\tif (\n\t\t\tinternal.ref !== undefined &&\n\t\t\ttypeof internal.ref != 'function' &&\n\t\t\ttypeof internal.ref != 'object' &&\n\t\t\t!isCompatNode // allow string refs when preact-compat is installed\n\t\t) {\n\t\t\tthrow new Error(\n\t\t\t\t`Component's \"ref\" property should be a function, or an object created ` +\n\t\t\t\t\t`by createRef(), but got [${typeof internal.ref}] instead\\n` +\n\t\t\t\t\tserializeVNode(internal) +\n\t\t\t\t\t`\\n\\n${getOwnerStack(internal)}`\n\t\t\t);\n\t\t}\n\n\t\tif (typeof internal.type == 'string') {\n\t\t\tfor (const key in vnode.props) {\n\t\t\t\tif (\n\t\t\t\t\tkey[0] === 'o' &&\n\t\t\t\t\tkey[1] === 'n' &&\n\t\t\t\t\ttypeof vnode.props[key] != 'function' &&\n\t\t\t\t\tvnode.props[key] != null\n\t\t\t\t) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t`Component's \"${key}\" property should be a function, ` +\n\t\t\t\t\t\t\t`but got [${typeof vnode.props[key]}] instead\\n` +\n\t\t\t\t\t\t\tserializeVNode(vnode) +\n\t\t\t\t\t\t\t`\\n\\n${getOwnerStack(internal)}`\n\t\t\t\t\t);\n\t\t\t\t} else if (\n\t\t\t\t\t!isCompatNode &&\n\t\t\t\t\tkey === 'style' &&\n\t\t\t\t\tvnode.props[key] !== null &&\n\t\t\t\t\ttypeof vnode.props[key] === 'object'\n\t\t\t\t) {\n\t\t\t\t\tconst style = vnode.props[key];\n\t\t\t\t\tfor (let i in style) {\n\t\t\t\t\t\tif (typeof style[i] === 'number' && !IS_NON_DIMENSIONAL.test(i)) {\n\t\t\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t\t\t`Numeric CSS property value is missing a \"px\" unit: ${i}: ${style[i]}\"\\n` +\n\t\t\t\t\t\t\t\t\tserializeVNode(vnode) +\n\t\t\t\t\t\t\t\t\t`\\n\\n${getOwnerStack(vnode)}`\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Check prop-types if available\n\t\tif (typeof internal.type == 'function' && internal.type.propTypes) {\n\t\t\tif (\n\t\t\t\tinternal.type.displayName === 'Lazy' &&\n\t\t\t\twarnedComponents &&\n\t\t\t\t!warnedComponents.lazyPropTypes.has(internal.type)\n\t\t\t) {\n\t\t\t\tconst m =\n\t\t\t\t\t'PropTypes are not supported on lazy(). Use propTypes on the wrapped component itself. ';\n\t\t\t\ttry {\n\t\t\t\t\tconst lazyVNode = internal.type();\n\t\t\t\t\twarnedComponents.lazyPropTypes.set(internal.type, true);\n\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\tm + `Component wrapped in lazy() is ${getDisplayName(lazyVNode)}`\n\t\t\t\t\t);\n\t\t\t\t} catch (promise) {\n\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\tm + \"We will log the wrapped component's name once it is loaded.\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If vnode is not present we're mounting\n\t\t\tlet values = vnode ? vnode.props : internal.props;\n\t\t\tif (internal.type._forwarded) {\n\t\t\t\tvalues = Object.assign({}, values);\n\t\t\t\tdelete values.ref;\n\t\t\t}\n\n\t\t\tcheckPropTypes(\n\t\t\t\tinternal.type.propTypes,\n\t\t\t\tvalues,\n\t\t\t\t'prop',\n\t\t\t\tgetDisplayName(internal),\n\t\t\t\t() => getOwnerStack(internal)\n\t\t\t);\n\t\t}\n\n\t\tif (oldBeforeDiff) oldBeforeDiff(internal, vnode);\n\t};\n\n\toptions._hook = (internal, index, type) => {\n\t\tif (!internal || !hooksAllowed) {\n\t\t\tthrow new Error('Hook can only be invoked from render methods.');\n\t\t}\n\n\t\tif (oldHook) oldHook(internal, index, type);\n\t};\n\n\t// Ideally we'd want to print a warning once per component, but we\n\t// don't have access to the vnode that triggered it here. As a\n\t// compromise and to avoid flooding the console with warnings we\n\t// print each deprecation warning only once.\n\tconst warn = (property, message) => ({\n\t\tget() {\n\t\t\tconst key = 'get' + property + message;\n\t\t\tif (deprecations && deprecations.indexOf(key) < 0) {\n\t\t\t\tdeprecations.push(key);\n\t\t\t\tconsole.warn(`getting vnode.${property} is deprecated, ${message}`);\n\t\t\t}\n\t\t},\n\t\tset() {\n\t\t\tconst key = 'set' + property + message;\n\t\t\tif (deprecations && deprecations.indexOf(key) < 0) {\n\t\t\t\tdeprecations.push(key);\n\t\t\t\tconsole.warn(`setting vnode.${property} is not allowed, ${message}`);\n\t\t\t}\n\t\t}\n\t});\n\n\tconst deprecatedAttributes = {\n\t\tnodeName: warn('nodeName', 'use vnode.type'),\n\t\tattributes: warn('attributes', 'use vnode.props'),\n\t\tchildren: warn('children', 'use vnode.props.children')\n\t};\n\n\t// Property descriptor: preserve a property's value but make it non-enumerable:\n\tconst debugProps = {\n\t\t__source: { enumerable: false },\n\t\t__self: { enumerable: false }\n\t};\n\n\t// If it's acceptable to inject debug properties onto the\n\t// prototype, __proto__ is faster than defineProperties():\n\t// https://esbench.com/bench/6021ebd7d9c27600a7bfdba3\n\tconst deprecatedProto = Object.create({}, deprecatedAttributes);\n\n\toptions.vnode = vnode => {\n\t\tconst props = vnode.props;\n\t\tif (props != null && ('__source' in props || '__self' in props)) {\n\t\t\tObject.defineProperties(props, debugProps);\n\t\t\tvnode.__source = props.__source;\n\t\t\tvnode.__self = props.__self;\n\t\t}\n\n\t\t// eslint-disable-next-line\n\t\tvnode.__proto__ = deprecatedProto;\n\t\tif (oldVnode) oldVnode(vnode);\n\t};\n\n\toptions.diffed = vnode => {\n\t\thooksAllowed = false;\n\n\t\tif (oldDiffed) oldDiffed(vnode);\n\n\t\tif (vnode._children != null) {\n\t\t\tconst keys = [];\n\t\t\tfor (let i = 0; i < vnode._children.length; i++) {\n\t\t\t\tconst child = vnode._children[i];\n\t\t\t\tif (!child || child.key == null) continue;\n\n\t\t\t\tconst key = child.key;\n\t\t\t\tif (keys.indexOf(key) !== -1) {\n\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t'Following component has two or more children with the ' +\n\t\t\t\t\t\t\t`same key attribute: \"${key}\". This may cause glitches and misbehavior ` +\n\t\t\t\t\t\t\t'in rendering process. Component: \\n\\n' +\n\t\t\t\t\t\t\tserializeVNode(vnode) +\n\t\t\t\t\t\t\t`\\n\\n${getOwnerStack(vnode)}`\n\t\t\t\t\t);\n\n\t\t\t\t\t// Break early to not spam the console\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tkeys.push(key);\n\t\t\t}\n\t\t}\n\t};\n}\n\nconst setState = Component.prototype.setState;\n\n/** @this {import('../../src/internal').Component} */\nComponent.prototype.setState = function(update, callback) {\n\tif (this._internal == null) {\n\t\t// `this._internal` will be `null` during componentWillMount. But it\n\t\t// is perfectly valid to call `setState` during cWM. So we\n\t\t// need an additional check to verify that we are dealing with a\n\t\t// call inside constructor.\n\t\tif (this.state == null) {\n\t\t\tconsole.warn(\n\t\t\t\t`Calling \"this.setState\" inside the constructor of a component is a ` +\n\t\t\t\t\t`no-op and might be a bug in your application. Instead, set ` +\n\t\t\t\t\t`\"this.state = {}\" directly.\\n\\n${getOwnerStack(\n\t\t\t\t\t\tgetCurrentInternal()\n\t\t\t\t\t)}`\n\t\t\t);\n\t\t}\n\t}\n\n\treturn setState.call(this, update, callback);\n};\n\nconst forceUpdate = Component.prototype.forceUpdate;\n\n/** @this {import('../../src/internal').Component} */\nComponent.prototype.forceUpdate = function(callback) {\n\tif (this._internal == null) {\n\t\tconsole.warn(\n\t\t\t`Calling \"this.forceUpdate\" inside the constructor of a component is a ` +\n\t\t\t\t`no-op and might be a bug in your application.\\n\\n${getOwnerStack(\n\t\t\t\t\tgetCurrentInternal()\n\t\t\t\t)}`\n\t\t);\n\t} else if (this._internal.flags & MODE_UNMOUNTING) {\n\t\tconsole.warn(\n\t\t\t`Can't call \"this.forceUpdate\" on an unmounted component. This is a no-op, ` +\n\t\t\t\t`but it indicates a memory leak in your application. To fix, cancel all ` +\n\t\t\t\t`subscriptions and asynchronous tasks in the componentWillUnmount method.` +\n\t\t\t\t`\\n\\n${getOwnerStack(this._internal)}`\n\t\t);\n\t}\n\treturn forceUpdate.call(this, callback);\n};\n\n/**\n * Serialize a vnode tree to a string\n * @param {import('./internal').VNode} vnode\n * @returns {string}\n */\nexport function serializeVNode(vnode) {\n\tlet { props } = vnode;\n\tlet name = getDisplayName(vnode);\n\n\tlet attrs = '';\n\tfor (let prop in props) {\n\t\tif (props.hasOwnProperty(prop) && prop !== 'children') {\n\t\t\tlet value = props[prop];\n\n\t\t\t// If it is an object but doesn't have toString(), use Object.toString\n\t\t\tif (typeof value == 'function') {\n\t\t\t\tvalue = `function ${value.displayName || value.name}() {}`;\n\t\t\t}\n\n\t\t\tvalue =\n\t\t\t\tObject(value) === value && !value.toString\n\t\t\t\t\t? Object.prototype.toString.call(value)\n\t\t\t\t\t: value + '';\n\n\t\t\tattrs += ` ${prop}=${JSON.stringify(value)}`;\n\t\t}\n\t}\n\n\tlet children = props.children;\n\treturn `<${name}${attrs}${\n\t\tchildren && children.length ? '>..</' + name + '>' : ' />'\n\t}`;\n}\n","// Internal.flags bitfield constants\nexport const TYPE_TEXT = 1 << 0;\nexport const TYPE_ELEMENT = 1 << 1;\nexport const TYPE_CLASS = 1 << 2;\nexport const TYPE_FUNCTION = 1 << 3;\n/** Signals this internal has a _parentDom prop that should change the parent\n * DOM node of it's children */\nexport const TYPE_ROOT = 1 << 4;\n\n/** Any type of internal representing DOM */\nexport const TYPE_DOM = TYPE_TEXT | TYPE_ELEMENT;\n/** Any type of component */\nexport const TYPE_COMPONENT = TYPE_CLASS | TYPE_FUNCTION | TYPE_ROOT;\n\n// Modes of rendering\n/** Normal hydration that attaches to a DOM tree but does not diff it. */\nexport const MODE_HYDRATE = 1 << 5;\n/** Top level render unspecified behaviour (old replaceNode parameter to render) */\nexport const MODE_MUTATIVE_HYDRATE = 1 << 6;\n/** Signifies this VNode suspended on the previous render */\nexport const MODE_SUSPENDED = 1 << 7;\n/** Signifies this VNode errored on the previous render */\nexport const MODE_ERRORED = 1 << 8;\n/** Signifies an error has been thrown and this component will be attempting to\n * handle & rerender the error on next render. In other words, on the next\n * render of this component, unset this mode and set the MODE_RERENDERING_ERROR.\n * This flag is distinct from MODE_RERENDERING_ERROR so that a component can\n * catch multiple errors thrown by its children in one render pass (see test\n * \"should handle double child throws\").\n */\nexport const MODE_PENDING_ERROR = 1 << 9;\n/** Signifies this Internal is attempting to \"handle\" an error and is\n * rerendering. This mode tracks that a component's last rerender was trying to\n * handle an error. As such, if another error is thrown while a component has\n * this flag set, it should not handle the newly thrown error since it failed to\n * successfully rerender the original error. This prevents error handling\n * infinite render loops */\nexport const MODE_RERENDERING_ERROR = 1 << 10;\n/** Signals this internal has been unmounted */\nexport const MODE_UNMOUNTING = 1 << 11;\n/** This Internal is rendered in an SVG tree */\nexport const MODE_SVG = 1 << 12;\n\n/** Signifies that bailout checks will be bypassed */\nexport const FORCE_UPDATE = 1 << 13;\n/** Signifies that a node needs to be updated */\nexport const DIRTY_BIT = 1 << 14;\n/** Signals the component can skip children due to a non-update */\nexport const SKIP_CHILDREN = 1 << 15;\n\n/** Reset all mode flags */\nexport const RESET_MODE = ~(\n\tMODE_HYDRATE |\n\tMODE_MUTATIVE_HYDRATE |\n\tMODE_SUSPENDED |\n\tMODE_ERRORED |\n\tMODE_RERENDERING_ERROR |\n\tFORCE_UPDATE |\n\tSKIP_CHILDREN\n);\n\n/** Modes a child internal inherits from their parent */\nexport const INHERITED_MODES = MODE_HYDRATE | MODE_MUTATIVE_HYDRATE | MODE_SVG;\n\nexport const EMPTY_ARR = [];\nexport const UNDEFINED = undefined;\n","export const ELEMENT_NODE = 1;\nexport const DOCUMENT_NODE = 9;\nexport const DOCUMENT_FRAGMENT_NODE = 11;\n","import { initDebug } from './debug';\nimport 'preact/devtools';\n\ninitDebug();\n\nexport { resetPropWarnings } from './check-props';\n"],"names":["loggedTypeFailures","resetPropWarnings","getDisplayName","vnode","type","Fragment","displayName","name","renderStack","ownerStack","getCurrentInternal","length","hasBabelPlugin","isPossibleOwner","internal","getOwnerStack","stack","next","push","reduce","acc","owner","source","props","__source","fileName","lineNumber","console","warn","IS_NON_DIMENSIONAL","isWeakMapSupported","WeakMap","getClosestDomNodeParent","parent","setState","Component","prototype","update","callback","this","state","call","forceUpdate","serializeVNode","attrs","prop","hasOwnProperty","value","Object","toString","JSON","stringify","children","flags","oldDiff","options","oldDiffed","diffed","oldRoot","oldVNode","oldInternal","oldRender","pop","setupComponentStack","hooksAllowed","oldBeforeDiff","oldVnode","oldCatchError","oldHook","warnedComponents","useEffect","useLayoutEffect","lazyPropTypes","deprecations","error","then","promise","Error","setTimeout","e","parentNode","isValid","nodeType","componentName","undefined","constructor","keys","join","__","Array","isArray","parentVNode","isCompatNode","ref","key","style","i","test","propTypes","has","m","lazyVNode","set","values","assign","typeSpecs","location","getStack","forEach","typeSpecName","message","checkPropTypes","index","property","get","indexOf","deprecatedAttributes","nodeName","attributes","debugProps","enumerable","__self","deprecatedProto","create","defineProperties","__proto__","child","initDebug"],"mappings":"sFAEA,IAAIA,EAAqB,YAKTC,IACfD,EAAqB,YCANE,EAAeC,GAC9B,OAAIA,EAAMC,OAASC,EACX,WACwB,mBAAdF,EAAMC,KAChBD,EAAMC,KAAKE,aAAeH,EAAMC,KAAKG,KACb,iBAAdJ,EAAMC,KAChBD,EAAMC,KAGP,QAOR,IAAII,EAAc,GAoBdC,EAAa,YAMDC,IACf,OAAOF,EAAYG,OAAS,EAAIH,EAAYA,EAAYG,OAAS,GAAK,KASvE,IAAIC,GAAiB,EAMrB,SAASC,EAAgBC,GACxB,MAA+B,mBAAjBA,EAASV,MAAsBU,EAASV,MAAQC,WAQ/CU,EAAcD,GAC7B,MAAME,EAAQ,CAACF,GACf,IAAIG,EAAOH,EACX,KAAsB,MAAfG,OACND,EAAME,KAAKD,OACXA,EAAOA,MAGR,OAAOD,EAAMG,OAAO,CAACC,EAAKC,KACzBD,GAAQ,QAAOlB,EAAemB,KAE9B,MAAMC,EAASD,EAAME,OAASF,EAAME,MAAMC,SAU1C,OATIF,EACHF,GAAQ,QAAOE,EAAOG,YAAYH,EAAOI,cAC9Bd,IACXA,GAAiB,EACjBe,QAAQC,KACP,mLAIMR,EAAO,MACb,UCjGSS,EAAqB,oHCiB5BC,EAAuC,mBAAXC,QAElC,SAASC,EAAwBC,GAChC,OAAKA,EACq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AAMkG,QAItBtH,EAAM0H,UAAYH,EACdxD,GAAUA,EAAS/D,IAGxBoD,EAAQE,OAAStD,IAKhB,GAJA6D,GAAe,EAEXR,GAAWA,EAAUrD,GAEF,MAAnBA,MAAyB,CAC5B,MAAMmF,EAAO,GACb,IAAK,IAAIU,EAAI,EAAGA,EAAI7F,MAAgBQ,OAAQqF,IAAK,CAChD,MAAM8B,EAAQ3H,MAAgB6F,GAC9B,IAAK8B,GAAsB,MAAbA,EAAMhC,IAAa,SAEjC,MAAMA,EAAMgC,EAAMhC,IAClB,IAA2B,IAAvBR,EAAK6B,QAAQrB,GAAa,CAC7BnE,QAAQ+C,MAEL,8EAAuBoB,oFAExBnD,EAAexC,GACd,OAAMY,EAAcZ,MAIvB,MAGDmF,EAAKpE,KAAK4E,MG9WdiC"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
var n=require("preact");"undefined"!=typeof window&&window.__PREACT_DEVTOOLS__&&window.__PREACT_DEVTOOLS__.attachPreact("10.7.
|
1
|
+
var n=require("preact");"undefined"!=typeof window&&window.__PREACT_DEVTOOLS__&&window.__PREACT_DEVTOOLS__.attachPreact("10.7.3",n.options,{Fragment:n.Fragment,Component:n.Component}),exports.addHookName=function(e,o){return n.options.__a&&n.options.__a(o),e};
|
2
2
|
//# sourceMappingURL=devtools.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"devtools.js","sources":["../src/devtools.js","../src/index.js"],"sourcesContent":["import { options, Fragment, Component } from 'preact';\n\nexport function initDevTools() {\n\tif (typeof window != 'undefined' && window.__PREACT_DEVTOOLS__) {\n\t\twindow.__PREACT_DEVTOOLS__.attachPreact('10.7.
|
1
|
+
{"version":3,"file":"devtools.js","sources":["../src/devtools.js","../src/index.js"],"sourcesContent":["import { options, Fragment, Component } from 'preact';\n\nexport function initDevTools() {\n\tif (typeof window != 'undefined' && window.__PREACT_DEVTOOLS__) {\n\t\twindow.__PREACT_DEVTOOLS__.attachPreact('10.7.3', options, {\n\t\t\tFragment,\n\t\t\tComponent\n\t\t});\n\t}\n}\n","import { options } from 'preact';\nimport { initDevTools } from './devtools';\n\ninitDevTools();\n\n/**\n * Display a custom label for a custom hook for the devtools panel\n * @type {<T>(value: T, name: string) => T}\n */\nexport function addHookName(value, name) {\n\tif (options._addHookName) {\n\t\toptions._addHookName(name);\n\t}\n\treturn value;\n}\n"],"names":["window","__PREACT_DEVTOOLS__","attachPreact","options","Fragment","Component","value","name"],"mappings":"wBAGsB,oBAAVA,QAAyBA,OAAOC,qBAC1CD,OAAOC,oBAAoBC,aAAa,SAAUC,UAAS,CAC1DC,SAAAA,WACAC,UAAAA,kCCGI,SAAqBC,EAAOC,UAC9BJ,eACHA,cAAqBI,GAEfD"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{options as n,Fragment as o,Component as e}from"preact";function t(o,e){return n.__a&&n.__a(e),o}"undefined"!=typeof window&&window.__PREACT_DEVTOOLS__&&window.__PREACT_DEVTOOLS__.attachPreact("10.7.
|
1
|
+
import{options as n,Fragment as o,Component as e}from"preact";function t(o,e){return n.__a&&n.__a(e),o}"undefined"!=typeof window&&window.__PREACT_DEVTOOLS__&&window.__PREACT_DEVTOOLS__.attachPreact("10.7.3",n,{Fragment:o,Component:e});export{t as addHookName};
|
2
2
|
//# sourceMappingURL=devtools.module.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"devtools.mjs","sources":["../src/index.js","../src/devtools.js"],"sourcesContent":["import { options } from 'preact';\nimport { initDevTools } from './devtools';\n\ninitDevTools();\n\n/**\n * Display a custom label for a custom hook for the devtools panel\n * @type {<T>(value: T, name: string) => T}\n */\nexport function addHookName(value, name) {\n\tif (options._addHookName) {\n\t\toptions._addHookName(name);\n\t}\n\treturn value;\n}\n","import { options, Fragment, Component } from 'preact';\n\nexport function initDevTools() {\n\tif (typeof window != 'undefined' && window.__PREACT_DEVTOOLS__) {\n\t\twindow.__PREACT_DEVTOOLS__.attachPreact('10.5.13', options, {\n\t\t\tFragment,\n\t\t\tComponent\n\t\t});\n\t}\n}\n"],"names":["addHookName","value","name","options","window","__PREACT_DEVTOOLS__","attachPreact","Fragment","Component"],"mappings":"uEASgBA,EAAYC,EAAOC,GAIlC,OAHIC,OACHA,MAAqBD,GAEfD,ECVc,oBAAVG,QAAyBA,OAAOC,qBAC1CD,OAAOC,oBAAoBC,aAAa,UAAWH,EAAS,CAC3DI,SAAAA,EACAC,UAAAA"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{options as n,Fragment as o,Component as e}from"preact";function t(o,e){return n.__a&&n.__a(e),o}"undefined"!=typeof window&&window.__PREACT_DEVTOOLS__&&window.__PREACT_DEVTOOLS__.attachPreact("10.7.
|
1
|
+
import{options as n,Fragment as o,Component as e}from"preact";function t(o,e){return n.__a&&n.__a(e),o}"undefined"!=typeof window&&window.__PREACT_DEVTOOLS__&&window.__PREACT_DEVTOOLS__.attachPreact("10.7.3",n,{Fragment:o,Component:e});export{t as addHookName};
|
2
2
|
//# sourceMappingURL=devtools.module.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"devtools.module.js","sources":["../src/index.js","../src/devtools.js"],"sourcesContent":["import { options } from 'preact';\nimport { initDevTools } from './devtools';\n\ninitDevTools();\n\n/**\n * Display a custom label for a custom hook for the devtools panel\n * @type {<T>(value: T, name: string) => T}\n */\nexport function addHookName(value, name) {\n\tif (options._addHookName) {\n\t\toptions._addHookName(name);\n\t}\n\treturn value;\n}\n","import { options, Fragment, Component } from 'preact';\n\nexport function initDevTools() {\n\tif (typeof window != 'undefined' && window.__PREACT_DEVTOOLS__) {\n\t\twindow.__PREACT_DEVTOOLS__.attachPreact('10.7.
|
1
|
+
{"version":3,"file":"devtools.module.js","sources":["../src/index.js","../src/devtools.js"],"sourcesContent":["import { options } from 'preact';\nimport { initDevTools } from './devtools';\n\ninitDevTools();\n\n/**\n * Display a custom label for a custom hook for the devtools panel\n * @type {<T>(value: T, name: string) => T}\n */\nexport function addHookName(value, name) {\n\tif (options._addHookName) {\n\t\toptions._addHookName(name);\n\t}\n\treturn value;\n}\n","import { options, Fragment, Component } from 'preact';\n\nexport function initDevTools() {\n\tif (typeof window != 'undefined' && window.__PREACT_DEVTOOLS__) {\n\t\twindow.__PREACT_DEVTOOLS__.attachPreact('10.7.3', options, {\n\t\t\tFragment,\n\t\t\tComponent\n\t\t});\n\t}\n}\n"],"names":["addHookName","value","name","options","window","__PREACT_DEVTOOLS__","attachPreact","Fragment","Component"],"mappings":"8DASO,SAASA,EAAYC,EAAOC,UAC9BC,OACHA,MAAqBD,GAEfD,ECVc,oBAAVG,QAAyBA,OAAOC,qBAC1CD,OAAOC,oBAAoBC,aAAa,SAAUH,EAAS,CAC1DI,SAAAA,EACAC,UAAAA"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("preact")):"function"==typeof define&&define.amd?define(["exports","preact"],n):n(e.preactDevtools={},e.preact)}(this,function(e,n){"undefined"!=typeof window&&window.__PREACT_DEVTOOLS__&&window.__PREACT_DEVTOOLS__.attachPreact("10.7.
|
1
|
+
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("preact")):"function"==typeof define&&define.amd?define(["exports","preact"],n):n(e.preactDevtools={},e.preact)}(this,function(e,n){"undefined"!=typeof window&&window.__PREACT_DEVTOOLS__&&window.__PREACT_DEVTOOLS__.attachPreact("10.7.3",n.options,{Fragment:n.Fragment,Component:n.Component}),e.addHookName=function(e,o){return n.options.__a&&n.options.__a(o),e}});
|
2
2
|
//# sourceMappingURL=devtools.umd.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"devtools.umd.js","sources":["../src/devtools.js","../src/index.js"],"sourcesContent":["import { options, Fragment, Component } from 'preact';\n\nexport function initDevTools() {\n\tif (typeof window != 'undefined' && window.__PREACT_DEVTOOLS__) {\n\t\twindow.__PREACT_DEVTOOLS__.attachPreact('10.7.
|
1
|
+
{"version":3,"file":"devtools.umd.js","sources":["../src/devtools.js","../src/index.js"],"sourcesContent":["import { options, Fragment, Component } from 'preact';\n\nexport function initDevTools() {\n\tif (typeof window != 'undefined' && window.__PREACT_DEVTOOLS__) {\n\t\twindow.__PREACT_DEVTOOLS__.attachPreact('10.7.3', options, {\n\t\t\tFragment,\n\t\t\tComponent\n\t\t});\n\t}\n}\n","import { options } from 'preact';\nimport { initDevTools } from './devtools';\n\ninitDevTools();\n\n/**\n * Display a custom label for a custom hook for the devtools panel\n * @type {<T>(value: T, name: string) => T}\n */\nexport function addHookName(value, name) {\n\tif (options._addHookName) {\n\t\toptions._addHookName(name);\n\t}\n\treturn value;\n}\n"],"names":["window","__PREACT_DEVTOOLS__","attachPreact","options","Fragment","Component","value","name"],"mappings":"0NAGsB,oBAAVA,QAAyBA,OAAOC,qBAC1CD,OAAOC,oBAAoBC,aAAa,SAAUC,UAAS,CAC1DC,SAAAA,WACAC,UAAAA,4BCGI,SAAqBC,EAAOC,UAC9BJ,eACHA,cAAqBI,GAEfD"}
|
@@ -2,7 +2,7 @@ import { options, Fragment, Component } from 'preact';
|
|
2
2
|
|
3
3
|
export function initDevTools() {
|
4
4
|
if (typeof window != 'undefined' && window.__PREACT_DEVTOOLS__) {
|
5
|
-
window.__PREACT_DEVTOOLS__.attachPreact('10.7.
|
5
|
+
window.__PREACT_DEVTOOLS__.attachPreact('10.7.3', options, {
|
6
6
|
Fragment,
|
7
7
|
Component
|
8
8
|
});
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"preact.mjs","sources":["../src/constants.js","../src/options.js","../src/diff/catch-error.js","../src/create-element.js","../src/diff/refs.js","../src/diff/props.js","../src/diff/component.js","../src/tree.js","../src/diff/mount.js","../src/create-context.js","../src/diff/unmount.js","../src/diff/children.js","../src/diff/patch.js","../src/component.js","../src/diff/commit.js","../src/create-root.js","../src/render.js","../src/clone-element.js","../src/create-portal.js"],"sourcesContent":["// Internal.flags bitfield constants\nexport const TYPE_TEXT = 1 << 0;\nexport const TYPE_ELEMENT = 1 << 1;\nexport const TYPE_CLASS = 1 << 2;\nexport const TYPE_FUNCTION = 1 << 3;\n/** Signals this internal has a _parentDom prop that should change the parent\n * DOM node of it's children */\nexport const TYPE_ROOT = 1 << 4;\n\n/** Any type of internal representing DOM */\nexport const TYPE_DOM = TYPE_TEXT | TYPE_ELEMENT;\n/** Any type of component */\nexport const TYPE_COMPONENT = TYPE_CLASS | TYPE_FUNCTION | TYPE_ROOT;\n\n// Modes of rendering\n/** Normal hydration that attaches to a DOM tree but does not diff it. */\nexport const MODE_HYDRATE = 1 << 5;\n/** Top level render unspecified behaviour (old replaceNode parameter to render) */\nexport const MODE_MUTATIVE_HYDRATE = 1 << 6;\n/** Signifies this VNode suspended on the previous render */\nexport const MODE_SUSPENDED = 1 << 7;\n/** Signifies this VNode errored on the previous render */\nexport const MODE_ERRORED = 1 << 8;\n/** Signifies an error has been thrown and this component will be attempting to\n * handle & rerender the error on next render. In other words, on the next\n * render of this component, unset this mode and set the MODE_RERENDERING_ERROR.\n * This flag is distinct from MODE_RERENDERING_ERROR so that a component can\n * catch multiple errors thrown by its children in one render pass (see test\n * \"should handle double child throws\").\n */\nexport const MODE_PENDING_ERROR = 1 << 9;\n/** Signifies this Internal is attempting to \"handle\" an error and is\n * rerendering. This mode tracks that a component's last rerender was trying to\n * handle an error. As such, if another error is thrown while a component has\n * this flag set, it should not handle the newly thrown error since it failed to\n * successfully rerender the original error. This prevents error handling\n * infinite render loops */\nexport const MODE_RERENDERING_ERROR = 1 << 10;\n/** Signals this internal has been unmounted */\nexport const MODE_UNMOUNTING = 1 << 11;\n/** This Internal is rendered in an SVG tree */\nexport const MODE_SVG = 1 << 12;\n\n/** Signifies that bailout checks will be bypassed */\nexport const FORCE_UPDATE = 1 << 13;\n/** Signifies that a node needs to be updated */\nexport const DIRTY_BIT = 1 << 14;\n/** Signals the component can skip children due to a non-update */\nexport const SKIP_CHILDREN = 1 << 15;\n\n/** Reset all mode flags */\nexport const RESET_MODE = ~(\n\tMODE_HYDRATE |\n\tMODE_MUTATIVE_HYDRATE |\n\tMODE_SUSPENDED |\n\tMODE_ERRORED |\n\tMODE_RERENDERING_ERROR |\n\tFORCE_UPDATE |\n\tSKIP_CHILDREN\n);\n\n/** Modes a child internal inherits from their parent */\nexport const INHERITED_MODES = MODE_HYDRATE | MODE_MUTATIVE_HYDRATE | MODE_SVG;\n\nexport const EMPTY_ARR = [];\nexport const UNDEFINED = undefined;\n","import { _catchError } from './diff/catch-error';\n\n/**\n * The `option` object can potentially contain callback functions\n * that are called during various stages of our renderer. This is the\n * foundation on which all our addons like `preact/debug`, `preact/compat`,\n * and `preact/hooks` are based on. See the `Options` type in `internal.d.ts`\n * for a full list of available option hooks (most editors/IDEs allow you to\n * ctrl+click or cmd+click on mac the type definition below).\n * @type {import('./internal').Options}\n */\nconst options = {\n\t_catchError,\n};\n\nexport default options;\n","import {\n\tDIRTY_BIT,\n\tMODE_RERENDERING_ERROR,\n\tMODE_PENDING_ERROR,\n\tTYPE_COMPONENT\n} from '../constants';\n\n/**\n * Find the closest error boundary to a thrown error and call it\n * @param {object} error The thrown value\n * @param {import('../internal').Internal} internal The Internal node that threw\n * the error that was caught (except for unmounting when this parameter\n * is the highest parent that was being unmounted)\n */\nexport function _catchError(error, internal) {\n\twhile ((internal = internal._parent)) {\n\t\tif (\n\t\t\tinternal.flags & TYPE_COMPONENT &&\n\t\t\t~internal.flags & MODE_RERENDERING_ERROR\n\t\t) {\n\t\t\ttry {\n\t\t\t\tif (internal.type.getDerivedStateFromError) {\n\t\t\t\t\tinternal._component.setState(\n\t\t\t\t\t\tinternal.type.getDerivedStateFromError(error)\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif (internal._component.componentDidCatch) {\n\t\t\t\t\tinternal._component.componentDidCatch(error);\n\t\t\t\t}\n\n\t\t\t\t// NOTE: We're checking that any component in the stack got marked as dirty, even if it did so prior to this loop,\n\t\t\t\t// which is technically incorrect. However, there is no way for a component to mark itself as dirty during rendering.\n\t\t\t\t// The only way for a component to falsely intercept error bubbling would be to manually sets its internal dirty flag.\n\t\t\t\tif (internal.flags & DIRTY_BIT) {\n\t\t\t\t\tinternal.flags |= MODE_PENDING_ERROR;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\terror = e;\n\t\t\t}\n\t\t}\n\t}\n\n\tthrow error;\n}\n","import { UNDEFINED } from './constants';\nimport options from './options';\n\nlet vnodeId = 0;\n\n/**\n * Create an virtual node (used for JSX)\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component\n * constructor for this virtual node\n * @param {object | null | undefined} [props] The properties of the virtual node\n * @param {Array<import('.').ComponentChildren>} [children] The children of the virtual node\n * @returns {import('./internal').VNode}\n */\nexport function createElement(type, props, children) {\n\tlet normalizedProps = {},\n\t\tkey,\n\t\tref,\n\t\ti;\n\tfor (i in props) {\n\t\tif (i == 'key') key = props[i];\n\t\telse if (i == 'ref') ref = props[i];\n\t\telse normalizedProps[i] = props[i];\n\t}\n\n\tif (arguments.length > 3) {\n\t\tchildren = [children];\n\t\t// https://github.com/preactjs/preact/issues/1916\n\t\tfor (i = 3; i < arguments.length; i++) {\n\t\t\tchildren.push(arguments[i]);\n\t\t}\n\t}\n\n\tif (children !== undefined) {\n\t\tnormalizedProps.children = children;\n\t}\n\n\treturn createVNode(type, normalizedProps, key, ref, 0);\n}\n\n/**\n * Create a VNode (used internally by Preact)\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component\n * Constructor for this virtual node\n * @param {object | string | number | null} props The properties of this virtual node.\n * If this virtual node represents a text node, this is the text of the node (string or number).\n * @param {string | number | null} key The key for this virtual node, used when\n * diffing it against its children\n * @param {import('./internal').VNode[\"ref\"]} ref The ref property that will\n * receive a reference to its created child\n * @returns {import('./internal').VNode}\n */\nexport function createVNode(type, props, key, ref, original) {\n\t// V8 seems to be better at detecting type shapes if the object is allocated from the same call site\n\t// Do not inline into createElement and coerceToVNode!\n\tconst vnode = {\n\t\ttype,\n\t\tprops,\n\t\tkey,\n\t\tref,\n\t\tconstructor: undefined,\n\t\t_vnodeId: original || ++vnodeId\n\t};\n\n\tif (options.vnode != null) options.vnode(vnode);\n\n\treturn vnode;\n}\n\n/**\n * @param {import('./internal').ComponentChildren} childVNode\n * @returns {import('./internal').VNode | string | null}\n */\nexport function normalizeToVNode(childVNode) {\n\tlet type = typeof childVNode;\n\tif (childVNode == null || type === 'boolean') {\n\t\treturn null;\n\t}\n\tif (type === 'object') {\n\t\tif (Array.isArray(childVNode)) {\n\t\t\treturn createVNode(Fragment, { children: childVNode }, null, null, 0);\n\t\t}\n\t} else if (type !== 'string' && type !== 'function') {\n\t\treturn String(childVNode);\n\t}\n\treturn childVNode;\n}\n\nexport function createRef() {\n\treturn { current: null };\n}\n\nexport function Fragment(props) {\n\treturn props.children;\n}\n\n/**\n * Check if a the argument is a valid Preact VNode.\n * @param {*} vnode\n * @returns {vnode is import('./internal').VNode}\n */\nexport const isValidElement = vnode =>\n\tvnode != null && vnode.constructor === UNDEFINED;\n","import options from '../options';\n\n/**\n * Invoke or update a ref, depending on whether it is a function or object ref.\n * @param {object|function} ref\n * @param {any} value\n * @param {import('../internal').Internal} internal\n */\nexport function applyRef(ref, value, internal) {\n\ttry {\n\t\tif (typeof ref == 'function') ref(value);\n\t\telse if (ref) ref.current = value;\n\t} catch (e) {\n\t\toptions._catchError(e, internal);\n\t}\n}\n","import options from '../options';\n\nfunction setStyle(dom, key, value) {\n\tif (key[0] === '-') {\n\t\tdom.style.setProperty(key, value);\n\t} else {\n\t\tdom.style[key] = value == null ? '' : value;\n\t}\n}\n\n/**\n * Set a property value on a DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to modify\n * @param {string} name The name of the property to set\n * @param {*} value The value to set the property to\n * @param {*} oldValue The old value the property had\n * @param {number} isSvg 0 if not an SVG element, else it is an SVG element\n */\nexport function setProperty(dom, name, value, oldValue, isSvg) {\n\tlet useCapture;\n\n\to: if (name === 'style') {\n\t\tif (typeof value == 'string') {\n\t\t\tsetStyle(dom, 'cssText', value);\n\t\t} else {\n\t\t\tif (typeof oldValue == 'string') {\n\t\t\t\tsetStyle(dom, 'cssText', (oldValue = ''));\n\t\t\t}\n\n\t\t\tif (oldValue) {\n\t\t\t\tfor (name in oldValue) {\n\t\t\t\t\tif (!value || !(name in value)) {\n\t\t\t\t\t\tsetStyle(dom, name, '');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (name in value) {\n\t\t\t\tif (!oldValue || value[name] !== oldValue[name]) {\n\t\t\t\t\tsetStyle(dom, name, value[name]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Benchmark for comparison: https://esbench.com/bench/574c954bdb965b9a00965ac6\n\telse if (name[0] === 'o' && name[1] === 'n') {\n\t\tuseCapture = name !== (name = name.replace(/Capture$/, ''));\n\n\t\t// Infer correct casing for DOM built-in events:\n\t\tif (name.toLowerCase() in dom) name = name.toLowerCase().slice(2);\n\t\telse name = name.slice(2);\n\n\t\tif (!dom._listeners) dom._listeners = {};\n\t\tdom._listeners[name + useCapture] = value;\n\n\t\tif (value) {\n\t\t\tif (!oldValue) {\n\t\t\t\tconst handler = useCapture ? eventProxyCapture : eventProxy;\n\t\t\t\tdom.addEventListener(name, handler, useCapture);\n\t\t\t}\n\t\t} else {\n\t\t\tconst handler = useCapture ? eventProxyCapture : eventProxy;\n\t\t\tdom.removeEventListener(name, handler, useCapture);\n\t\t}\n\t} else if (name !== 'dangerouslySetInnerHTML') {\n\t\tif (isSvg) {\n\t\t\t// Normalize incorrect prop usage for SVG:\n\t\t\t// - xlink:href / xlinkHref --> href (xlink:href was removed from SVG and isn't needed)\n\t\t\t// - className --> class\n\t\t\tname = name.replace(/xlink[H:h]/, 'h').replace(/sName$/, 's');\n\t\t} else if (\n\t\t\tname !== 'href' &&\n\t\t\tname !== 'list' &&\n\t\t\tname !== 'form' &&\n\t\t\t// Default value in browsers is `-1` and an empty string is\n\t\t\t// cast to `0` instead\n\t\t\tname !== 'tabIndex' &&\n\t\t\tname !== 'download' &&\n\t\t\tname in dom\n\t\t) {\n\t\t\ttry {\n\t\t\t\tdom[name] = value == null ? '' : value;\n\t\t\t\t// labelled break is 1b smaller here than a return statement (sorry)\n\t\t\t\tbreak o;\n\t\t\t} catch (e) {}\n\t\t}\n\n\t\t// ARIA-attributes have a different notion of boolean values.\n\t\t// The value `false` is different from the attribute not\n\t\t// existing on the DOM, so we can't remove it. For non-boolean\n\t\t// ARIA-attributes we could treat false as a removal, but the\n\t\t// amount of exceptions would cost us too many bytes. On top of\n\t\t// that other VDOM frameworks also always stringify `false`.\n\n\t\tif (typeof value === 'function') {\n\t\t\t// never serialize functions as attribute values\n\t\t} else if (\n\t\t\tvalue != null &&\n\t\t\t(value !== false || (name[0] === 'a' && name[1] === 'r'))\n\t\t) {\n\t\t\tdom.setAttribute(name, value);\n\t\t} else {\n\t\t\tdom.removeAttribute(name);\n\t\t}\n\t}\n}\n\n/**\n * Proxy an event to hooked event handlers\n * @param {Event} e The event object from the browser\n * @private\n */\nfunction eventProxy(e) {\n\tthis._listeners[e.type + false](options.event ? options.event(e) : e);\n\tif (this._isControlled) {\n\t\tif (this.value != null && (e.type === 'input' || e.type === 'change')) {\n\t\t\tthis.value = this._prevValue;\n\t\t}\n\t\tif (this.checked != null && e.type === 'change') {\n\t\t\tthis.checked = this._prevValue;\n\t\t}\n\t}\n}\n\nfunction eventProxyCapture(e) {\n\tthis._listeners[e.type + true](options.event ? options.event(e) : e);\n}\n","import options from '../options';\nimport { DIRTY_BIT, FORCE_UPDATE, SKIP_CHILDREN } from '../constants';\nimport { rendererState } from '../component';\n\n/**\n * Render a function component\n * @param {import('../internal').Internal} internal The component's backing Internal node\n * @param {import('../internal').VNode} newVNode The new virtual node\n * @returns {import('../internal').ComponentChildren} the component's children\n */\nexport function renderFunctionComponent(\n\tinternal,\n\tnewVNode,\n\tcomponentContext\n) {\n\t/** @type {import('../internal').Component} */\n\tlet c;\n\n\tlet type = /** @type {import('../internal').ComponentType} */ (internal.type);\n\n\t// @TODO split update + mount?\n\tlet newProps = newVNode ? newVNode.props : internal.props;\n\n\tif (!(c = internal._component)) {\n\t\tinternal._component = c = {\n\t\t\tprops: newProps,\n\t\t\tcontext: componentContext,\n\t\t\tforceUpdate: internal.rerender.bind(null, internal)\n\t\t};\n\t\tc._internal = internal;\n\t\tinternal.flags |= DIRTY_BIT;\n\t}\n\n\tif (newVNode && newVNode._vnodeId === internal._vnodeId) {\n\t\tc.props = newProps;\n\t\tinternal.flags |= SKIP_CHILDREN;\n\t\treturn;\n\t}\n\n\tc.context = componentContext;\n\tinternal.props = c.props = newProps;\n\n\tlet renderResult;\n\tlet renderHook = options._render;\n\tlet counter = 0;\n\twhile (counter++ < 25) {\n\t\tinternal.flags &= ~DIRTY_BIT;\n\t\tif (renderHook) renderHook(internal);\n\t\trenderResult = type.call(c, c.props, componentContext);\n\t\tif (!(internal.flags & DIRTY_BIT)) {\n\t\t\tbreak;\n\t\t}\n\t}\n\tinternal.flags &= ~DIRTY_BIT;\n\tif (c.getChildContext != null) {\n\t\trendererState._context = internal._context = Object.assign(\n\t\t\t{},\n\t\t\trendererState._context,\n\t\t\tc.getChildContext()\n\t\t);\n\t}\n\n\treturn renderResult;\n}\n\n/**\n * Render a class component\n * @param {import('../internal').Internal} internal The component's backing Internal node\n * @param {import('../internal').VNode} newVNode The new virtual node\n * @returns {import('../internal').ComponentChildren} the component's children\n */\nexport function renderClassComponent(\n\tinternal,\n\tnewVNode,\n\tcomponentContext\n) {\n\t/** @type {import('../internal').Component} */\n\tlet c;\n\tlet isNew, oldProps, oldState, snapshot;\n\n\tlet type = /** @type {import('../internal').ComponentType} */ (internal.type);\n\n\t// @TODO split update + mount?\n\tlet newProps = newVNode ? newVNode.props : internal.props;\n\n\tif (!(c = internal._component)) {\n\t\t// @ts-ignore The check above verifies that newType is suppose to be constructed\n\t\tinternal._component = c = new type(newProps, componentContext); // eslint-disable-line new-cap\n\n\t\tif (!c.state) c.state = {};\n\t\tisNew = true;\n\t\tc._internal = internal;\n\t\tinternal.flags |= DIRTY_BIT;\n\t}\n\n\t// Invoke getDerivedStateFromProps\n\tif (c._nextState == null) {\n\t\tc._nextState = c.state;\n\t}\n\tif (type.getDerivedStateFromProps != null) {\n\t\tif (c._nextState == c.state) {\n\t\t\tc._nextState = Object.assign({}, c._nextState);\n\t\t}\n\n\t\tObject.assign(\n\t\t\tc._nextState,\n\t\t\ttype.getDerivedStateFromProps(newProps, c._nextState)\n\t\t);\n\t}\n\n\toldProps = c.props;\n\toldState = c.state;\n\tif (isNew) {\n\t\tif (type.getDerivedStateFromProps == null && c.componentWillMount != null) {\n\t\t\tc.componentWillMount();\n\t\t}\n\n\t\tif (c.componentDidMount != null) {\n\t\t\t// If the component was constructed, queue up componentDidMount so the\n\t\t\t// first time this internal commits (regardless of suspense or not) it\n\t\t\t// will be called\n\t\t\tinternal._commitCallbacks.push(c.componentDidMount.bind(c));\n\t\t}\n\t} else {\n\t\tif (\n\t\t\ttype.getDerivedStateFromProps == null &&\n\t\t\tnewProps !== oldProps &&\n\t\t\tc.componentWillReceiveProps != null\n\t\t) {\n\t\t\tc.componentWillReceiveProps(newProps, componentContext);\n\t\t}\n\n\t\tif (\n\t\t\t(!(internal.flags & FORCE_UPDATE) &&\n\t\t\t\tc.shouldComponentUpdate != null &&\n\t\t\t\tc.shouldComponentUpdate(newProps, c._nextState, componentContext) ===\n\t\t\t\t\tfalse) ||\n\t\t\t(newVNode && newVNode._vnodeId === internal._vnodeId)\n\t\t) {\n\t\t\tc.props = newProps;\n\t\t\tc.state = c._nextState;\n\t\t\tinternal.flags |= SKIP_CHILDREN;\n\t\t\treturn;\n\t\t}\n\n\t\tif (c.componentWillUpdate != null) {\n\t\t\tc.componentWillUpdate(newProps, c._nextState, componentContext);\n\t\t}\n\t}\n\n\tc.context = componentContext;\n\tinternal.props = c.props = newProps;\n\tc.state = c._nextState;\n\n\tlet renderHook = options._render;\n\tif (renderHook) renderHook(internal);\n\n\tinternal.flags &= ~DIRTY_BIT;\n\n\tlet renderResult = c.render(c.props, c.state, c.context);\n\n\t// Handle setState called in render, see #2553\n\tc.state = c._nextState;\n\n\tif (c.getChildContext != null) {\n\t\trendererState._context = internal._context = Object.assign(\n\t\t\t{},\n\t\t\trendererState._context,\n\t\t\tc.getChildContext()\n\t\t);\n\t}\n\n\tif (!isNew) {\n\t\tif (c.getSnapshotBeforeUpdate != null) {\n\t\t\tsnapshot = c.getSnapshotBeforeUpdate(oldProps, oldState);\n\t\t}\n\n\t\t// Only schedule componentDidUpdate if the component successfully rendered\n\t\tif (c.componentDidUpdate != null) {\n\t\t\tinternal._commitCallbacks.push(() => {\n\t\t\t\tc.componentDidUpdate(oldProps, oldState, snapshot);\n\t\t\t});\n\t\t}\n\t}\n\n\treturn renderResult;\n}\n","import options from './options';\nimport {\n\tTYPE_FUNCTION,\n\tTYPE_ELEMENT,\n\tTYPE_TEXT,\n\tTYPE_CLASS,\n\tTYPE_ROOT,\n\tINHERITED_MODES,\n\tTYPE_COMPONENT,\n\tTYPE_DOM,\n\tMODE_SVG,\n\tUNDEFINED\n} from './constants';\nimport { enqueueRender } from './component';\n\n/**\n * Create an internal tree node\n * @param {import('./internal').VNode | string} vnode\n * @param {import('./internal').Internal} [parentInternal]\n * @returns {import('./internal').Internal}\n */\nexport function createInternal(vnode, parentInternal) {\n\tlet type = null,\n\t\tprops,\n\t\tkey,\n\t\tref;\n\n\t/** @type {number} */\n\tlet flags = parentInternal ? parentInternal.flags & INHERITED_MODES : 0;\n\n\t// Text VNodes/Internals have an ID of 0 that is never used:\n\tlet vnodeId = 0;\n\n\tif (typeof vnode === 'string') {\n\t\t// type = null;\n\t\tflags |= TYPE_TEXT;\n\t\tprops = vnode;\n\t}\n\t// Prevent JSON injection by rendering injected objects as empty Text nodes\n\telse if (vnode.constructor !== UNDEFINED) {\n\t\tflags |= TYPE_TEXT;\n\t\tprops = '';\n\t} else {\n\t\ttype = vnode.type;\n\t\tprops = vnode.props;\n\t\tkey = vnode.key;\n\t\tref = vnode.ref;\n\t\tvnodeId = vnode._vnodeId;\n\n\t\t// @TODO re-enable this when we stop removing key+ref from VNode props\n\t\t// if (props) {\n\t\t// \tif ((key = props.key) != null) {\n\t\t// \t\tprops.key = UNDEFINED;\n\t\t// \t}\n\t\t// \tif (typeof type !== 'function' && (ref = props.ref) != null) {\n\t\t// \t\tprops.ref = UNDEFINED;\n\t\t// \t}\n\t\t// } else {\n\t\t// \tprops = {};\n\t\t// }\n\n\t\t// flags = typeof type === 'function' ? COMPONENT_NODE : ELEMENT_NODE;\n\t\tflags |=\n\t\t\ttypeof type === 'function'\n\t\t\t\t? type.prototype && type.prototype.render\n\t\t\t\t\t? TYPE_CLASS\n\t\t\t\t\t: props._parentDom\n\t\t\t\t\t? TYPE_ROOT\n\t\t\t\t\t: TYPE_FUNCTION\n\t\t\t\t: TYPE_ELEMENT;\n\n\t\tif (flags & TYPE_ELEMENT && type === 'svg') {\n\t\t\tflags |= MODE_SVG;\n\t\t} else if (\n\t\t\tparentInternal &&\n\t\t\tparentInternal.flags & MODE_SVG &&\n\t\t\tparentInternal.type === 'foreignObject'\n\t\t) {\n\t\t\tflags &= ~MODE_SVG;\n\t\t}\n\t}\n\n\t/** @type {import('./internal').Internal} */\n\tconst internal = {\n\t\ttype,\n\t\tprops,\n\t\tkey,\n\t\tref,\n\t\t_prevRef: null,\n\t\tdata: flags & TYPE_COMPONENT ? {} : null,\n\t\t_commitCallbacks: flags & TYPE_COMPONENT ? [] : null,\n\t\trerender: enqueueRender,\n\t\tflags,\n\t\t_children: null,\n\t\t_parent: parentInternal,\n\t\t_vnodeId: vnodeId,\n\t\t_dom: null,\n\t\t_component: null,\n\t\t_context: null,\n\t\t_depth: parentInternal ? parentInternal._depth + 1 : 0\n\t};\n\n\tif (options._internal) options._internal(internal, vnode);\n\n\treturn internal;\n}\n\nconst shouldSearchComponent = internal =>\n\tinternal.flags & TYPE_COMPONENT &&\n\t(!(internal.flags & TYPE_ROOT) ||\n\t\tinternal.props._parentDom == getParentDom(internal._parent));\n\n/**\n * @param {import('./internal').Internal} internal\n * @param {number | null} [childIndex]\n * @returns {import('./internal').PreactNode}\n */\nexport function getDomSibling(internal, childIndex) {\n\tif (childIndex == null) {\n\t\t// Use childIndex==null as a signal to resume the search from the vnode's sibling\n\t\treturn getDomSibling(\n\t\t\tinternal._parent,\n\t\t\tinternal._parent._children.indexOf(internal) + 1\n\t\t);\n\t}\n\n\tlet childDom = getChildDom(internal, childIndex);\n\tif (childDom) {\n\t\treturn childDom;\n\t}\n\n\t// If we get here, we have not found a DOM node in this vnode's children. We\n\t// must resume from this vnode's sibling (in it's parent _children array).\n\t// Only climb up and search the parent if we aren't searching through a DOM\n\t// VNode (meaning we reached the DOM parent of the original vnode that began\n\t// the search). Note, the top of the tree has _parent == null so avoiding that\n\t// here.\n\treturn internal._parent && shouldSearchComponent(internal)\n\t\t? getDomSibling(internal)\n\t\t: null;\n}\n\n/**\n * @param {import('./internal').Internal} internal\n * @param {number} [i]\n * @returns {import('./internal').PreactElement}\n */\nexport function getChildDom(internal, i) {\n\tif (internal._children == null) {\n\t\treturn null;\n\t}\n\n\tfor (i = i || 0; i < internal._children.length; i++) {\n\t\tlet child = internal._children[i];\n\t\tif (child != null) {\n\t\t\tif (child.flags & TYPE_DOM) {\n\t\t\t\treturn child._dom;\n\t\t\t}\n\n\t\t\tif (shouldSearchComponent(child)) {\n\t\t\t\tlet childDom = getChildDom(child);\n\t\t\t\tif (childDom) {\n\t\t\t\t\treturn childDom;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn null;\n}\n/**\n * @param {import('./internal').Internal} internal\n * @returns {any}\n */\nexport function getParentContext(internal) {\n\t// @TODO: compare performance of recursion here (it's 11b smaller, but may be slower for deep trees)\n\treturn internal._context || getParentContext(internal._parent);\n\n\t// while ((internal = internal._parent)) {\n\t// \tlet context = internal._context;\n\t// \tif (context != null) return context;\n\t// }\n}\n\n/**\n * @param {import('./internal').Internal} internal\n * @returns {import('./internal').PreactElement}\n */\nexport function getParentDom(internal) {\n\tlet parent = internal;\n\n\t// if this is a Root internal, return its parent DOM:\n\tif (parent.flags & TYPE_ROOT) {\n\t\treturn parent.props._parentDom;\n\t}\n\n\t// walk up the tree to find the nearest DOM or Root Internal:\n\twhile ((parent = parent._parent)) {\n\t\tif (parent.flags & TYPE_ROOT) {\n\t\t\treturn parent.props._parentDom;\n\t\t} else if (parent.flags & TYPE_ELEMENT) {\n\t\t\treturn parent._dom;\n\t\t}\n\t}\n}\n","import { applyRef } from './refs';\nimport {\n\tTYPE_COMPONENT,\n\tTYPE_ELEMENT,\n\tMODE_HYDRATE,\n\tMODE_MUTATIVE_HYDRATE,\n\tMODE_SUSPENDED,\n\tRESET_MODE,\n\tTYPE_TEXT,\n\tTYPE_CLASS,\n\tMODE_ERRORED,\n\tTYPE_ROOT,\n\tMODE_SVG\n} from '../constants';\nimport { normalizeToVNode, Fragment } from '../create-element';\nimport { setProperty } from './props';\nimport { renderClassComponent, renderFunctionComponent } from './component';\nimport { createInternal } from '../tree';\nimport options from '../options';\nimport { rendererState } from '../component';\n/**\n * Diff two virtual nodes and apply proper changes to the DOM\n * @param {import('../internal').Internal} internal The Internal node to mount\n * @param {import('../internal').VNode | string} newVNode The new virtual node\n * @param {import('../internal').PreactNode} startDom\n * @returns {import('../internal').PreactNode | null} pointer to the next DOM node to be hydrated (or null)\n */\nexport function mount(internal, newVNode, startDom) {\n\tif (options._diff) options._diff(internal, newVNode);\n\n\t/** @type {import('../internal').PreactNode} */\n\tlet nextDomSibling;\n\n\ttry {\n\t\tif (internal.flags & TYPE_COMPONENT) {\n\t\t\t// Root nodes signal that an attempt to render into a specific DOM node on\n\t\t\t// the page. Root nodes can occur anywhere in the tree and not just at the\n\t\t\t// top.\n\t\t\tlet prevStartDom = startDom;\n\t\t\tlet prevParentDom = rendererState._parentDom;\n\t\t\tif (internal.flags & TYPE_ROOT) {\n\t\t\t\trendererState._parentDom = newVNode.props._parentDom;\n\n\t\t\t\t// Note: this is likely always true because we are inside mount()\n\t\t\t\tif (rendererState._parentDom !== prevParentDom) {\n\t\t\t\t\tstartDom = null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet prevContext = rendererState._context;\n\t\t\t// Necessary for createContext api. Setting this property will pass\n\t\t\t// the context value as `this.context` just for this component.\n\t\t\tlet tmp = newVNode.type.contextType;\n\t\t\tlet provider = tmp && rendererState._context[tmp._id];\n\t\t\tlet componentContext = tmp\n\t\t\t\t? provider\n\t\t\t\t\t? provider.props.value\n\t\t\t\t\t: tmp._defaultValue\n\t\t\t\t: rendererState._context;\n\n\t\t\tif (provider) provider._subs.add(internal);\n\n\t\t\tlet renderResult;\n\n\t\t\tif (internal.flags & TYPE_CLASS) {\n\t\t\t\trenderResult = renderClassComponent(\n\t\t\t\t\tinternal,\n\t\t\t\t\tnull,\n\t\t\t\t\tcomponentContext\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\trenderResult = renderFunctionComponent(\n\t\t\t\t\tinternal,\n\t\t\t\t\tnull,\n\t\t\t\t\tcomponentContext\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (renderResult == null) {\n\t\t\t\tnextDomSibling = startDom;\n\t\t\t} else {\n\t\t\t\tif (typeof renderResult === 'object') {\n\t\t\t\t\t// dissolve unkeyed root fragments:\n\t\t\t\t\tif (renderResult.type === Fragment && renderResult.key == null) {\n\t\t\t\t\t\trenderResult = renderResult.props.children;\n\t\t\t\t\t}\n\t\t\t\t\tif (!Array.isArray(renderResult)) {\n\t\t\t\t\t\trenderResult = [renderResult];\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\trenderResult = [renderResult];\n\t\t\t\t}\n\n\t\t\t\tnextDomSibling = mountChildren(\n\t\t\t\t\tinternal,\n\t\t\t\t\trenderResult,\n\t\t\t\t\tstartDom\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tinternal._commitCallbacks != null &&\n\t\t\t\tinternal._commitCallbacks.length\n\t\t\t) {\n\t\t\t\trendererState._commitQueue.push(internal);\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tinternal.flags & TYPE_ROOT &&\n\t\t\t\tprevParentDom !== rendererState._parentDom\n\t\t\t) {\n\t\t\t\t// If we just mounted a root node/Portal, and it changed the parentDom\n\t\t\t\t// of it's children, then we need to resume the diff from it's previous\n\t\t\t\t// startDom element, which could be null if we are mounting an entirely\n\t\t\t\t// new tree, or the portal's nextSibling if we are mounting a Portal in\n\t\t\t\t// an existing tree.\n\t\t\t\tnextDomSibling = prevStartDom;\n\t\t\t}\n\n\t\t\trendererState._parentDom = prevParentDom;\n\t\t\t// In the event this subtree creates a new context for its children, restore\n\t\t\t// the previous context for its siblings\n\t\t\trendererState._context = prevContext;\n\t\t} else {\n\t\t\t// @TODO: we could just assign this as internal.dom here\n\t\t\tlet hydrateDom =\n\t\t\t\tinternal.flags & (MODE_HYDRATE | MODE_MUTATIVE_HYDRATE)\n\t\t\t\t\t? startDom\n\t\t\t\t\t: null;\n\n\t\t\tnextDomSibling = mountElement(internal, hydrateDom);\n\t\t}\n\n\t\tif (options.diffed) options.diffed(internal);\n\n\t\t// We successfully rendered this VNode, unset any stored hydration/bailout state:\n\t\tinternal.flags &= RESET_MODE;\n\t} catch (e) {\n\t\tinternal._vnodeId = 0;\n\t\tinternal.flags |= e.then ? MODE_SUSPENDED : MODE_ERRORED;\n\n\t\tif (internal.flags & MODE_HYDRATE) {\n\t\t\t// @ts-ignore Trust me TS, nextSibling is a PreactElement\n\t\t\tnextDomSibling = startDom && startDom.nextSibling;\n\t\t\tinternal._dom = startDom; // Save our current DOM position to resume later\n\t\t}\n\t\toptions._catchError(e, internal);\n\t}\n\n\treturn nextDomSibling;\n}\n\n/**\n * Construct (or select, if hydrating) a new DOM element for the given Internal.\n * @param {import('../internal').Internal} internal\n * @param {import('../internal').PreactNode} dom A DOM node to attempt to re-use during hydration\n * @returns {import('../internal').PreactNode}\n */\nfunction mountElement(internal, dom) {\n\tlet newProps = internal.props;\n\tlet nodeType = internal.type;\n\tlet flags = internal.flags;\n\n\t// Are we rendering within an inline SVG?\n\tlet isSvg = flags & MODE_SVG;\n\n\t// Are we *not* hydrating? (a top-level render() or mutative hydration):\n\tlet isFullRender = ~flags & MODE_HYDRATE;\n\n\t/** @type {any} */\n\tlet i, value;\n\n\t// if hydrating (hydrate() or render() with replaceNode), find the matching child:\n\tif (flags & (MODE_HYDRATE | MODE_MUTATIVE_HYDRATE)) {\n\t\twhile (\n\t\t\tdom &&\n\t\t\t(nodeType ? dom.localName !== nodeType : dom.nodeType !== 3)\n\t\t) {\n\t\t\tdom = dom.nextSibling;\n\t\t}\n\t}\n\n\tlet isNew = dom == null;\n\n\tif (flags & TYPE_TEXT) {\n\t\tif (isNew) {\n\t\t\t// @ts-ignore createTextNode returns Text, we expect PreactElement\n\t\t\tdom = document.createTextNode(newProps);\n\t\t} else if (dom.data !== newProps) {\n\t\t\tdom.data = newProps;\n\t\t}\n\n\t\tinternal._dom = dom;\n\t} else {\n\t\t// Tracks entering and exiting SVG namespace when descending through the tree.\n\t\t// if (nodeType === 'svg') internal.flags |= MODE_SVG;\n\n\t\tif (isNew) {\n\t\t\tif (isSvg) {\n\t\t\t\tdom = document.createElementNS(\n\t\t\t\t\t'http://www.w3.org/2000/svg',\n\t\t\t\t\t// @ts-ignore We know `newVNode.type` is a string\n\t\t\t\t\tnodeType\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tdom = document.createElement(\n\t\t\t\t\t// @ts-ignore We know `newVNode.type` is a string\n\t\t\t\t\tnodeType,\n\t\t\t\t\tnewProps.is && newProps\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// we are creating a new node, so we can assume this is a new subtree (in case we are hydrating), this deopts the hydrate\n\t\t\tinternal.flags = flags &= RESET_MODE;\n\t\t\tisFullRender = 1;\n\t\t}\n\n\t\t// @TODO: Consider removing and instructing users to instead set the desired\n\t\t// prop for removal to undefined/null. During hydration, props are not\n\t\t// diffed at all (including dangerouslySetInnerHTML)\n\t\tif (flags & MODE_MUTATIVE_HYDRATE) {\n\t\t\t// But, if we are in a situation where we are using existing DOM (e.g. replaceNode)\n\t\t\t// we should read the existing DOM attributes to diff them\n\t\t\tfor (i = 0; i < dom.attributes.length; i++) {\n\t\t\t\tvalue = dom.attributes[i].name;\n\t\t\t\tif (!(value in newProps)) {\n\t\t\t\t\tdom.removeAttribute(value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tlet newHtml, newValue, newChildren;\n\t\tif (\n\t\t\t(nodeType === 'input' ||\n\t\t\t\tnodeType === 'textarea' ||\n\t\t\t\tnodeType === 'select') &&\n\t\t\t(newProps.onInput || newProps.onChange)\n\t\t) {\n\t\t\tif (newProps.value != null) {\n\t\t\t\tdom._isControlled = true;\n\t\t\t\tdom._prevValue = newProps.value;\n\t\t\t} else if (newProps.checked != null) {\n\t\t\t\tdom._isControlled = true;\n\t\t\t\tdom._prevValue = newProps.checked;\n\t\t\t}\n\t\t}\n\n\t\tfor (i in newProps) {\n\t\t\tvalue = newProps[i];\n\t\t\tif (i === 'children') {\n\t\t\t\tnewChildren = value;\n\t\t\t} else if (i === 'dangerouslySetInnerHTML') {\n\t\t\t\tnewHtml = value;\n\t\t\t} else if (i === 'value') {\n\t\t\t\tnewValue = value;\n\t\t\t} else if (\n\t\t\t\tvalue != null &&\n\t\t\t\t(isFullRender || typeof value === 'function')\n\t\t\t) {\n\t\t\t\tsetProperty(dom, i, value, null, isSvg);\n\t\t\t}\n\t\t}\n\n\t\tinternal._dom = dom;\n\n\t\t// If the new vnode didn't have dangerouslySetInnerHTML, diff its children\n\t\tif (newHtml) {\n\t\t\tif (isFullRender && newHtml.__html) {\n\t\t\t\tdom.innerHTML = newHtml.__html;\n\t\t\t}\n\t\t} else if (newChildren != null) {\n\t\t\tconst prevParentDom = rendererState._parentDom;\n\t\t\trendererState._parentDom = dom;\n\t\t\tmountChildren(\n\t\t\t\tinternal,\n\t\t\t\tArray.isArray(newChildren) ? newChildren : [newChildren],\n\t\t\t\tisNew ? null : dom.firstChild\n\t\t\t);\n\t\t\trendererState._parentDom = prevParentDom;\n\t\t}\n\n\t\t// (as above, don't diff props during hydration)\n\t\tif (isFullRender && newValue != null) {\n\t\t\tsetProperty(dom, 'value', newValue, null, 0);\n\t\t}\n\t}\n\n\t// @ts-ignore\n\treturn isNew ? null : dom.nextSibling;\n}\n\n/**\n * Mount all children of an Internal\n * @param {import('../internal').Internal} internal The parent Internal of the given children\n * @param {import('../internal').ComponentChild[]} children\n * @param {import('../internal').PreactNode} startDom\n */\nexport function mountChildren(\n\tinternal,\n\tchildren,\n\tstartDom\n) {\n\tlet internalChildren = (internal._children = []),\n\t\ti,\n\t\tchildVNode,\n\t\tchildInternal,\n\t\tnewDom,\n\t\tmountedNextChild;\n\n\tfor (i = 0; i < children.length; i++) {\n\t\tchildVNode = normalizeToVNode(children[i]);\n\n\t\t// Terser removes the `continue` here and wraps the loop body\n\t\t// in a `if (childVNode) { ... } condition\n\t\tif (childVNode == null) {\n\t\t\tinternalChildren[i] = null;\n\t\t\tcontinue;\n\t\t}\n\n\t\tchildInternal = createInternal(childVNode, internal);\n\t\tinternalChildren[i] = childInternal;\n\n\t\t// Morph the old element into the new one, but don't append it to the dom yet\n\t\tmountedNextChild = mount(\n\t\t\tchildInternal,\n\t\t\tchildVNode,\n\t\t\tstartDom\n\t\t);\n\n\t\tnewDom = childInternal._dom;\n\n\t\tif (childInternal.flags & TYPE_COMPONENT || newDom == startDom) {\n\t\t\t// If the child is a Fragment-like or if it is DOM VNode and its _dom\n\t\t\t// property matches the dom we are diffing (i.e. startDom), just\n\t\t\t// continue with the mountedNextChild\n\t\t\tstartDom = mountedNextChild;\n\t\t} else if (newDom != null) {\n\t\t\t// The DOM the diff should begin with is now startDom (since we inserted\n\t\t\t// newDom before startDom) so ignore mountedNextChild and continue with\n\t\t\t// startDom\n\t\t\trendererState._parentDom.insertBefore(newDom, startDom);\n\t\t}\n\n\t\tif (childInternal.ref) {\n\t\t\tapplyRef(\n\t\t\t\tchildInternal.ref,\n\t\t\t\tchildInternal._component || newDom,\n\t\t\t\tchildInternal\n\t\t\t);\n\t\t}\n\t}\n\n\t// Remove children that are not part of any vnode.\n\tif (\n\t\tinternal.flags & (MODE_HYDRATE | MODE_MUTATIVE_HYDRATE) &&\n\t\tinternal.flags & TYPE_ELEMENT\n\t) {\n\t\t// TODO: Would it be simpler to just clear the pre-existing DOM in top-level\n\t\t// render if render is called with no oldVNode & existing children & no\n\t\t// replaceNode? Instead of patching the DOM to match the VNode tree? (remove\n\t\t// attributes & unused DOM)\n\t\twhile (startDom) {\n\t\t\ti = startDom;\n\t\t\tstartDom = startDom.nextSibling;\n\t\t\ti.remove();\n\t\t}\n\t}\n\n\treturn startDom;\n}\n","import { enqueueRender } from './component';\n\nlet nextContextId = 0;\n\nconst providers = new Set();\n\nexport const unsubscribeFromContext = internal => {\n\t// if this was a context provider, delete() returns true and we exit:\n\tif (providers.delete(internal)) return;\n\t// ... otherwise, unsubscribe from any contexts:\n\tproviders.forEach(p => {\n\t\tp._component._subs.delete(internal);\n\t});\n};\n\nexport const createContext = (defaultValue, contextId) => {\n\tcontextId = '__cC' + nextContextId++;\n\n\tconst context = {\n\t\t_id: contextId,\n\t\t_defaultValue: defaultValue,\n\t\t/** @type {import('./internal').FunctionComponent} */\n\t\tConsumer(props, contextValue) {\n\t\t\t// return props.children(\n\t\t\t// \tcontext[contextId] ? context[contextId].props.value : defaultValue\n\t\t\t// );\n\t\t\treturn props.children(contextValue);\n\t\t},\n\t\t/** @type {import('./internal').FunctionComponent} */\n\t\tProvider(props, ctx) {\n\t\t\t// initial setup:\n\t\t\tif (!this._subs) {\n\t\t\t\tthis._subs = new Set();\n\t\t\t\tctx = {};\n\t\t\t\tctx[contextId] = this;\n\t\t\t\tthis.getChildContext = () => ctx;\n\t\t\t\tproviders.add(this._internal);\n\t\t\t}\n\t\t\t// re-render subscribers in response to value change\n\t\t\telse if (props.value !== this._prev) {\n\t\t\t\tthis._subs.forEach(enqueueRender);\n\t\t\t}\n\t\t\tthis._prev = props.value;\n\n\t\t\treturn props.children;\n\t\t}\n\t};\n\n\t// Devtools needs access to the context object when it\n\t// encounters a Provider. This is necessary to support\n\t// setting `displayName` on the context object instead\n\t// of on the component itself. See:\n\t// https://reactjs.org/docs/context.html#contextdisplayname\n\n\treturn (context.Provider._contextRef = context.Consumer.contextType = context);\n};\n","import { MODE_UNMOUNTING, TYPE_DOM, TYPE_ROOT } from '../constants';\nimport { unsubscribeFromContext } from '../create-context';\nimport options from '../options';\nimport { applyRef } from './refs';\n\n/**\n * Unmount a virtual node from the tree and apply DOM changes\n * @param {import('../internal').Internal} internal The virtual node to unmount\n * @param {import('../internal').Internal} parentInternal The parent of the VNode that\n * initiated the unmount\n * @param {number} [skipRemove] Flag that indicates that a parent node of the\n * current element is already detached from the DOM.\n */\nexport function unmount(internal, parentInternal, skipRemove) {\n\tlet r,\n\t\ti = 0;\n\tif (options.unmount) options.unmount(internal);\n\tinternal.flags |= MODE_UNMOUNTING;\n\n\tif ((r = internal.ref)) {\n\t\tapplyRef(r, null, parentInternal);\n\t}\n\n\tif ((r = internal._component)) {\n\t\tunsubscribeFromContext(internal);\n\n\t\tif (r.componentWillUnmount) {\n\t\t\ttry {\n\t\t\t\tr.componentWillUnmount();\n\t\t\t} catch (e) {\n\t\t\t\toptions._catchError(e, parentInternal);\n\t\t\t}\n\t\t}\n\t}\n\n\tif ((r = internal._children)) {\n\t\tfor (; i < r.length; i++) {\n\t\t\tif (r[i]) {\n\t\t\t\tunmount(\n\t\t\t\t\tr[i],\n\t\t\t\t\tparentInternal,\n\t\t\t\t\tskipRemove ? ~internal.flags & TYPE_ROOT : internal.flags & TYPE_DOM\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (!skipRemove && internal.flags & TYPE_DOM) {\n\t\tinternal._dom.remove();\n\t}\n\n\tinternal._dom = null;\n}\n","import { applyRef } from './refs';\nimport { normalizeToVNode } from '../create-element';\nimport {\n\tTYPE_COMPONENT,\n\tMODE_HYDRATE,\n\tMODE_SUSPENDED,\n\tEMPTY_ARR,\n\tTYPE_DOM,\n\tUNDEFINED\n} from '../constants';\nimport { mount } from './mount';\nimport { patch } from './patch';\nimport { unmount } from './unmount';\nimport { createInternal, getDomSibling } from '../tree';\nimport { rendererState } from '../component';\n\n/**\n * Update an internal with new children.\n * @param {import('../internal').Internal} internal The internal whose children should be patched\n * @param {import('../internal').ComponentChild[]} children The new children, represented as VNodes\n */\nexport function patchChildren(internal, children) {\n\tlet oldChildren =\n\t\t(internal._children && internal._children.slice()) || EMPTY_ARR;\n\n\tlet oldChildrenLength = oldChildren.length;\n\tlet remainingOldChildren = oldChildrenLength;\n\n\tlet skew = 0;\n\tlet i;\n\n\t/** @type {import('../internal').Internal} */\n\tlet childInternal;\n\n\t/** @type {import('../internal').ComponentChild} */\n\tlet childVNode;\n\n\t/** @type {import('../internal').Internal[]} */\n\tconst newChildren = [];\n\n\tfor (i = 0; i < children.length; i++) {\n\t\tchildVNode = normalizeToVNode(children[i]);\n\n\t\t// Terser removes the `continue` here and wraps the loop body\n\t\t// in a `if (childVNode) { ... } condition\n\t\tif (childVNode == null) {\n\t\t\tnewChildren[i] = null;\n\t\t\tcontinue;\n\t\t}\n\n\t\tlet skewedIndex = i + skew;\n\n\t\t/// TODO: Reconsider if we should bring back the \"not moving text nodes\" logic?\n\t\tlet matchingIndex = findMatchingIndex(\n\t\t\tchildVNode,\n\t\t\toldChildren,\n\t\t\tskewedIndex,\n\t\t\tremainingOldChildren\n\t\t);\n\n\t\tif (matchingIndex === -1) {\n\t\t\tchildInternal = UNDEFINED;\n\t\t} else {\n\t\t\tchildInternal = oldChildren[matchingIndex];\n\t\t\toldChildren[matchingIndex] = UNDEFINED;\n\t\t\tremainingOldChildren--;\n\t\t}\n\n\t\tlet mountingChild = childInternal == null;\n\n\t\tif (mountingChild) {\n\t\t\tchildInternal = createInternal(childVNode, internal);\n\n\t\t\t// We are mounting a new VNode\n\t\t\tmount(\n\t\t\t\tchildInternal,\n\t\t\t\tchildVNode,\n\t\t\t\tgetDomSibling(internal, skewedIndex)\n\t\t\t);\n\t\t}\n\t\t// If this node suspended during hydration, and no other flags are set:\n\t\t// @TODO: might be better to explicitly check for MODE_ERRORED here.\n\t\telse if (\n\t\t\t(childInternal.flags & (MODE_HYDRATE | MODE_SUSPENDED)) ===\n\t\t\t(MODE_HYDRATE | MODE_SUSPENDED)\n\t\t) {\n\t\t\t// We are resuming the hydration of a VNode\n\t\t\tmount(\n\t\t\t\tchildInternal,\n\t\t\t\tchildVNode,\n\t\t\t\tchildInternal._dom\n\t\t\t);\n\t\t} else {\n\t\t\t// Morph the old element into the new one, but don't append it to the dom yet\n\t\t\tpatch(childInternal, childVNode);\n\t\t}\n\n\t\tgo: if (mountingChild) {\n\t\t\tif (matchingIndex == -1) {\n\t\t\t\tskew--;\n\t\t\t}\n\n\t\t\t// Perform insert of new dom\n\t\t\tif (childInternal.flags & TYPE_DOM) {\n\t\t\t\trendererState._parentDom.insertBefore(\n\t\t\t\t\tchildInternal._dom,\n\t\t\t\t\tgetDomSibling(internal, skewedIndex)\n\t\t\t\t);\n\t\t\t}\n\t\t} else if (matchingIndex !== skewedIndex) {\n\t\t\t// Move this DOM into its correct place\n\t\t\tif (matchingIndex === skewedIndex + 1) {\n\t\t\t\tskew++;\n\t\t\t\tbreak go;\n\t\t\t} else if (matchingIndex > skewedIndex) {\n\t\t\t\tif (remainingOldChildren > children.length - skewedIndex) {\n\t\t\t\t\tskew += matchingIndex - skewedIndex;\n\t\t\t\t\tbreak go;\n\t\t\t\t} else {\n\t\t\t\t\t// ### Change from keyed: I think this was missing from the algo...\n\t\t\t\t\tskew--;\n\t\t\t\t}\n\t\t\t} else if (matchingIndex < skewedIndex) {\n\t\t\t\tif (matchingIndex == skewedIndex - 1) {\n\t\t\t\t\tskew = matchingIndex - skewedIndex;\n\t\t\t\t} else {\n\t\t\t\t\tskew = 0;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tskew = 0;\n\t\t\t}\n\n\t\t\tskewedIndex = i + skew;\n\n\t\t\tif (matchingIndex == i) break go;\n\n\t\t\tlet nextSibling = getDomSibling(internal, skewedIndex + 1);\n\t\t\tif (childInternal.flags & TYPE_DOM) {\n\t\t\t\trendererState._parentDom.insertBefore(childInternal._dom, nextSibling);\n\t\t\t} else {\n\t\t\t\tinsertComponentDom(\n\t\t\t\t\tchildInternal,\n\t\t\t\t\tnextSibling,\n\t\t\t\t\trendererState._parentDom\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tnewChildren[i] = childInternal;\n\t}\n\n\tinternal._children = newChildren;\n\n\t// Remove remaining oldChildren if there are any.\n\tif (remainingOldChildren > 0) {\n\t\tfor (i = oldChildrenLength; i--; ) {\n\t\t\tif (oldChildren[i] != null) {\n\t\t\t\tunmount(oldChildren[i], oldChildren[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Set refs only after unmount\n\tfor (i = 0; i < newChildren.length; i++) {\n\t\tchildInternal = newChildren[i];\n\t\tif (childInternal) {\n\t\t\tlet oldRef = childInternal._prevRef;\n\t\t\tif (childInternal.ref != oldRef) {\n\t\t\t\tif (oldRef) applyRef(oldRef, null, childInternal);\n\t\t\t\tif (childInternal.ref)\n\t\t\t\t\tapplyRef(\n\t\t\t\t\t\tchildInternal.ref,\n\t\t\t\t\t\tchildInternal._component || childInternal._dom,\n\t\t\t\t\t\tchildInternal\n\t\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * @param {import('../internal').VNode | string} childVNode\n * @param {import('../internal').Internal[]} oldChildren\n * @param {number} skewedIndex\n * @param {number} remainingOldChildren\n * @returns {number}\n */\nfunction findMatchingIndex(\n\tchildVNode,\n\toldChildren,\n\tskewedIndex,\n\tremainingOldChildren\n) {\n\tconst type = typeof childVNode === 'string' ? null : childVNode.type;\n\tconst key = type !== null ? childVNode.key : UNDEFINED;\n\tlet match = -1;\n\tlet x = skewedIndex - 1; // i - 1;\n\tlet y = skewedIndex + 1; // i + 1;\n\tlet oldChild = oldChildren[skewedIndex]; // i\n\n\tif (\n\t\t// ### Change from keyed: support for matching null placeholders\n\t\toldChild === null ||\n\t\t(oldChild != null && oldChild.type === type && oldChild.key == key)\n\t) {\n\t\tmatch = skewedIndex; // i\n\t}\n\t// If there are any unused children left (ignoring an available in-place child which we just checked)\n\telse if (remainingOldChildren > (oldChild != null ? 1 : 0)) {\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tif (x >= 0) {\n\t\t\t\toldChild = oldChildren[x];\n\t\t\t\tif (oldChild != null && oldChild.type === type && oldChild.key == key) {\n\t\t\t\t\tmatch = x;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tx--;\n\t\t\t}\n\t\t\tif (y < oldChildren.length) {\n\t\t\t\toldChild = oldChildren[y];\n\t\t\t\tif (oldChild != null && oldChild.type === type && oldChild.key == key) {\n\t\t\t\t\tmatch = y;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\ty++;\n\t\t\t} else if (x < 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn match;\n}\n\n/**\n * @param {import('../internal').Internal} internal\n * @param {import('../internal').PreactNode} nextSibling\n * @param {import('../internal').PreactNode} parentDom\n */\nexport function insertComponentDom(internal, nextSibling, parentDom) {\n\tif (internal._children == null) {\n\t\treturn;\n\t}\n\n\tfor (let i = 0; i < internal._children.length; i++) {\n\t\tlet childInternal = internal._children[i];\n\t\tif (childInternal) {\n\t\t\tchildInternal._parent = internal;\n\n\t\t\tif (childInternal.flags & TYPE_COMPONENT) {\n\t\t\t\tinsertComponentDom(childInternal, nextSibling, parentDom);\n\t\t\t} else if (childInternal._dom != nextSibling) {\n\t\t\t\tparentDom.insertBefore(childInternal._dom, nextSibling);\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Flatten and loop through the children of a virtual node\n * @param {import('../index').ComponentChildren} children The unflattened\n * children of a virtual node\n * @returns {import('../internal').VNode[]}\n */\nexport function toChildArray(children, out) {\n\tout = out || [];\n\tif (children == null || typeof children == 'boolean') {\n\t} else if (Array.isArray(children)) {\n\t\tfor (children of children) {\n\t\t\ttoChildArray(children, out);\n\t\t}\n\t} else {\n\t\tout.push(children);\n\t}\n\treturn out;\n}\n","import { patchChildren, insertComponentDom } from './children';\nimport { setProperty } from './props';\nimport options from '../options';\nimport { renderClassComponent, renderFunctionComponent } from './component';\nimport {\n\tRESET_MODE,\n\tTYPE_TEXT,\n\tTYPE_ELEMENT,\n\tMODE_SUSPENDED,\n\tMODE_ERRORED,\n\tTYPE_ROOT,\n\tTYPE_CLASS,\n\tMODE_SVG,\n\tUNDEFINED,\n\tMODE_HYDRATE,\n\tMODE_PENDING_ERROR,\n\tMODE_RERENDERING_ERROR,\n\tSKIP_CHILDREN,\n\tDIRTY_BIT\n} from '../constants';\nimport { getDomSibling } from '../tree';\nimport { mountChildren } from './mount';\nimport { Fragment } from '../create-element';\nimport { rendererState } from '../component';\n\n/**\n * Diff two virtual nodes and apply proper changes to the DOM\n * @param {import('../internal').Internal} internal The Internal node to patch\n * @param {import('../internal').VNode | string} vnode The new virtual node\n */\nexport function patch(internal, vnode) {\n\tlet flags = internal.flags;\n\n\tif (flags & TYPE_TEXT) {\n\t\tif (vnode !== internal.props) {\n\t\t\t// @ts-ignore We know that newVNode is string/number/bigint, and internal._dom is Text\n\t\t\tinternal._dom.data = vnode;\n\t\t\tinternal.props = vnode;\n\t\t}\n\n\t\treturn;\n\t}\n\n\t// When passing through createElement it assigns the object\n\t// constructor as undefined. This to prevent JSON-injection.\n\tif (vnode.constructor !== UNDEFINED) return;\n\n\tif (options._diff) options._diff(internal, vnode);\n\n\t// Root nodes render their children into a specific parent DOM element.\n\t// They can occur anywhere in the tree, can be nested, and currently allow reparenting during patches.\n\t// @TODO: Decide if we actually want to support silent reparenting during patch - is it worth the bytes?\n\tlet prevParentDom = rendererState._parentDom;\n\tif (flags & TYPE_ROOT) {\n\t\trendererState._parentDom = vnode.props._parentDom;\n\n\t\tif (internal.props._parentDom !== vnode.props._parentDom) {\n\t\t\tlet nextSibling =\n\t\t\t\trendererState._parentDom == prevParentDom\n\t\t\t\t\t? getDomSibling(internal)\n\t\t\t\t\t: null;\n\t\t\tinsertComponentDom(internal, nextSibling, rendererState._parentDom);\n\t\t}\n\t}\n\n\tif (flags & TYPE_ELEMENT) {\n\t\tif (vnode._vnodeId !== internal._vnodeId) {\n\t\t\t// @ts-ignore dom is a PreactElement here\n\t\t\tpatchElement(internal, vnode);\n\t\t}\n\t} else {\n\t\ttry {\n\t\t\tif (internal.flags & MODE_PENDING_ERROR) {\n\t\t\t\t// Toggle the MODE_PENDING_ERROR and MODE_RERENDERING_ERROR flags. In\n\t\t\t\t// actuality, this should turn off the MODE_PENDING_ERROR flag and turn on\n\t\t\t\t// the MODE_RERENDERING_ERROR flag.\n\t\t\t\tinternal.flags ^= MODE_PENDING_ERROR | MODE_RERENDERING_ERROR;\n\t\t\t}\n\n\t\t\tlet prevContext = rendererState._context;\n\t\t\t// Necessary for createContext api. Setting this property will pass\n\t\t\t// the context value as `this.context` just for this component.\n\t\t\tlet tmp = vnode.type.contextType;\n\t\t\tlet provider = tmp && rendererState._context[tmp._id];\n\t\t\tlet componentContext = tmp\n\t\t\t\t? provider\n\t\t\t\t\t? provider.props.value\n\t\t\t\t\t: tmp._defaultValue\n\t\t\t\t: rendererState._context;\n\t\t\tlet isNew = !internal || !internal._component;\n\n\t\t\tlet renderResult;\n\n\t\t\tif (internal.flags & TYPE_CLASS) {\n\t\t\t\trenderResult = renderClassComponent(\n\t\t\t\t\tinternal,\n\t\t\t\t\tvnode,\n\t\t\t\t\tcomponentContext\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\trenderResult = renderFunctionComponent(\n\t\t\t\t\tinternal,\n\t\t\t\t\tvnode,\n\t\t\t\t\tcomponentContext\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (renderResult == null) {\n\t\t\t\trenderResult = [];\n\t\t\t} else if (typeof renderResult === 'object') {\n\t\t\t\tif (renderResult.type === Fragment && renderResult.key == null) {\n\t\t\t\t\trenderResult = renderResult.props.children;\n\t\t\t\t}\n\t\t\t\tif (!Array.isArray(renderResult)) {\n\t\t\t\t\trenderResult = [renderResult];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\trenderResult = [renderResult];\n\t\t\t}\n\n\t\t\tif (internal.flags & SKIP_CHILDREN) {\n\t\t\t\tinternal.props = vnode.props;\n\t\t\t\tinternal.flags &= ~SKIP_CHILDREN;\n\t\t\t\t// More info about this here: https://gist.github.com/JoviDeCroock/bec5f2ce93544d2e6070ef8e0036e4e8\n\t\t\t\tif (vnode && vnode._vnodeId !== internal._vnodeId) {\n\t\t\t\t\tinternal.flags &= ~DIRTY_BIT;\n\t\t\t\t}\n\t\t\t} else if (internal._children == null) {\n\t\t\t\tlet siblingDom =\n\t\t\t\t\t(internal.flags & (MODE_HYDRATE | MODE_SUSPENDED)) ===\n\t\t\t\t\t(MODE_HYDRATE | MODE_SUSPENDED)\n\t\t\t\t\t\t? internal._dom\n\t\t\t\t\t\t: isNew || internal.flags & MODE_HYDRATE\n\t\t\t\t\t\t? null\n\t\t\t\t\t\t: getDomSibling(internal);\n\n\t\t\t\tmountChildren(\n\t\t\t\t\tinternal,\n\t\t\t\t\trenderResult,\n\t\t\t\t\tsiblingDom\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tpatchChildren(internal, renderResult);\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tinternal._commitCallbacks != null &&\n\t\t\t\tinternal._commitCallbacks.length\n\t\t\t) {\n\t\t\t\trendererState._commitQueue.push(internal);\n\t\t\t}\n\n\t\t\trendererState._parentDom = prevParentDom;\n\t\t\t// In the event this subtree creates a new context for its children, restore\n\t\t\t// the previous context for its siblings\n\t\t\trendererState._context = prevContext;\n\t\t} catch (e) {\n\t\t\t// @TODO: assign a new VNode ID here? Or NaN?\n\t\t\t// newVNode._vnodeId = 0;\n\t\t\tinternal.flags |= e.then ? MODE_SUSPENDED : MODE_ERRORED;\n\t\t\toptions._catchError(e, internal);\n\t\t}\n\t}\n\n\tif (options.diffed) options.diffed(internal);\n\n\t// We successfully rendered this VNode, unset any stored hydration/bailout state:\n\tinternal.flags &= RESET_MODE;\n\n\t// Once we have successfully rendered the new VNode, copy it's ID over\n\tinternal._vnodeId = vnode._vnodeId;\n\n\tinternal._prevRef = internal.ref;\n\tinternal.ref = vnode.ref;\n}\n\n/**\n * Update an internal and its associated DOM element based on a new VNode\n * @param {import('../internal').Internal} internal\n * @param {import('../internal').VNode} vnode A VNode with props to compare and apply\n */\nfunction patchElement(internal, vnode) {\n\tlet dom = /** @type {import('../internal').PreactElement} */ (internal._dom),\n\t\toldProps = internal.props,\n\t\tnewProps = (internal.props = vnode.props),\n\t\tisSvg = internal.flags & MODE_SVG,\n\t\ti,\n\t\tvalue,\n\t\ttmp,\n\t\tnewHtml,\n\t\toldHtml,\n\t\tnewChildren;\n\n\tfor (i in oldProps) {\n\t\tvalue = oldProps[i];\n\t\tif (i === 'children') {\n\t\t} else if (i === 'dangerouslySetInnerHTML') {\n\t\t\toldHtml = value;\n\t\t} else if (!(i in newProps)) {\n\t\t\tsetProperty(dom, i, null, value, isSvg);\n\t\t}\n\t}\n\n\tfor (i in newProps) {\n\t\tvalue = newProps[i];\n\t\tif (i === 'children') {\n\t\t\tnewChildren = value;\n\t\t} else if (i === 'dangerouslySetInnerHTML') {\n\t\t\tnewHtml = value;\n\t\t} else if (\n\t\t\tvalue !== (tmp = oldProps[i]) ||\n\t\t\t((i === 'checked' || i === 'value') && value != null && value !== dom[i])\n\t\t) {\n\t\t\tsetProperty(dom, i, value, tmp, isSvg);\n\t\t}\n\t}\n\n\t// If the new vnode didn't have dangerouslySetInnerHTML, diff its children\n\tif (newHtml) {\n\t\tvalue = newHtml.__html;\n\t\t// Avoid re-applying the same '__html' if it did not changed between re-render\n\t\tif (!oldHtml || (value !== oldHtml.__html && value !== dom.innerHTML)) {\n\t\t\tdom.innerHTML = value;\n\t\t}\n\t\tinternal._children = null;\n\t} else {\n\t\tif (oldHtml) dom.innerHTML = '';\n\t\tconst prevParentDom = rendererState._parentDom;\n\t\trendererState._parentDom = dom;\n\t\tpatchChildren(\n\t\t\tinternal,\n\t\t\tnewChildren && Array.isArray(newChildren) ? newChildren : [newChildren],\n\t\t);\n\t\trendererState._parentDom = prevParentDom;\n\t}\n\n\tif (newProps.checked != null && dom._isControlled) {\n\t\tdom._prevValue = newProps.checked;\n\t} else if (newProps.value != null && dom._isControlled) {\n\t\tdom._prevValue = newProps.value;\n\t}\n}\n","import { commitRoot } from './diff/commit';\nimport options from './options';\nimport { createVNode, Fragment } from './create-element';\nimport { patch } from './diff/patch';\nimport { DIRTY_BIT, FORCE_UPDATE, MODE_UNMOUNTING } from './constants';\nimport { getParentContext, getParentDom } from './tree';\n\n/**\n * The render queue\n * @type {import('./internal').RendererState}\n */\nexport const rendererState = {\n\t_parentDom: null,\n\t_context: {},\n\t_commitQueue: []\n};\n\n/**\n * Base Component class. Provides `setState()` and `forceUpdate()`, which\n * trigger rendering\n * @param {object} props The initial component props\n * @param {object} context The initial context from parent components'\n * getChildContext\n */\nexport function Component(props, context) {\n\tthis.props = props;\n\tthis.context = context;\n}\n\n/**\n * Update component state and schedule a re-render.\n * @this {import('./internal').Component}\n * @param {object | ((s: object, p: object) => object)} update A hash of state\n * properties to update with new values or a function that given the current\n * state and props returns a new partial state\n * @param {() => void} [callback] A function to be called once component state is\n * updated\n */\nComponent.prototype.setState = function(update, callback) {\n\t// only clone state when copying to nextState the first time.\n\tlet s;\n\tif (this._nextState != null && this._nextState !== this.state) {\n\t\ts = this._nextState;\n\t} else {\n\t\ts = this._nextState = Object.assign({}, this.state);\n\t}\n\n\tif (typeof update == 'function') {\n\t\t// Some libraries like `immer` mark the current state as readonly,\n\t\t// preventing us from mutating it, so we need to clone it. See #2716\n\t\tupdate = update(Object.assign({}, s), this.props);\n\t}\n\n\tif (update) {\n\t\tObject.assign(s, update);\n\t}\n\n\t// Skip update if updater function returned null\n\tif (update == null) return;\n\n\tconst internal = this._internal;\n\tif (update != null && internal) {\n\t\tif (callback) internal._commitCallbacks.push(callback.bind(this));\n\t\tinternal.rerender(internal);\n\t}\n};\n\n/**\n * Immediately perform a synchronous re-render of the component\n * @this {import('./internal').Component}\n * @param {() => void} [callback] A function to be called after component is\n * re-rendered\n */\nComponent.prototype.forceUpdate = function(callback) {\n\tconst internal = this._internal;\n\tif (internal) {\n\t\t// Set render mode so that we can differentiate where the render request\n\t\t// is coming from. We need this because forceUpdate should never call\n\t\t// shouldComponentUpdate\n\t\tinternal.flags |= FORCE_UPDATE;\n\t\tif (callback) internal._commitCallbacks.push(callback.bind(this));\n\t\tinternal.rerender(internal);\n\t}\n};\n\n/**\n * Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\n * Virtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx).\n * @param {object} props Props (eg: JSX attributes) received from parent\n * element/component\n * @param {object} state The component's current state\n * @param {object} context Context object, as returned by the nearest\n * ancestor's `getChildContext()`\n * @returns {import('./index').ComponentChildren | void}\n */\nComponent.prototype.render = Fragment;\n\n/**\n * @param {import('./internal').Internal} internal The internal to rerender\n */\nfunction rerender(internal) {\n\tif (~internal.flags & MODE_UNMOUNTING && internal.flags & DIRTY_BIT) {\n\t\tconst vnode = createVNode(\n\t\t\tinternal.type,\n\t\t\tinternal.props,\n\t\t\tinternal.key, // @TODO we shouldn't need to actually pass these\n\t\t\tinternal.ref, // since the mode flag should bypass key/ref handling\n\t\t\t0\n\t\t);\n\n\t\trendererState._context = getParentContext(internal);\n\t\trendererState._commitQueue = [];\n\t\trendererState._parentDom = getParentDom(internal);\n\t\tpatch(internal, vnode);\n\t\tcommitRoot(internal);\n\t}\n}\n\n/**\n * The render queue\n * @type {Array<import('./internal').Internal>}\n */\nlet rerenderQueue = [];\n\n/*\n * The value of `Component.debounce` must asynchronously invoke the passed in callback. It is\n * important that contributors to Preact can consistently reason about what calls to `setState`, etc.\n * do, and when their effects will be applied. See the links below for some further reading on designing\n * asynchronous APIs.\n * * [Designing APIs for Asynchrony](https://blog.izs.me/2013/08/designing-apis-for-asynchrony)\n * * [Callbacks synchronous and asynchronous](https://blog.ometer.com/2011/07/24/callbacks-synchronous-and-asynchronous/)\n */\n\nlet prevDebounce;\n\nconst defer = Promise.prototype.then.bind(Promise.resolve());\n\n/**\n * Enqueue a rerender of an internal\n * @param {import('./internal').Internal} internal The internal to rerender\n */\nexport function enqueueRender(internal) {\n\tif (\n\t\t(!(internal.flags & DIRTY_BIT) &&\n\t\t\t(internal.flags |= DIRTY_BIT) &&\n\t\t\trerenderQueue.push(internal) &&\n\t\t\t!process._rerenderCount++) ||\n\t\tprevDebounce !== options.debounceRendering\n\t) {\n\t\tprevDebounce = options.debounceRendering;\n\t\t(prevDebounce || defer)(process);\n\t}\n}\n\n/** Flush the render queue by rerendering all queued components */\nfunction process() {\n\twhile ((len = process._rerenderCount = rerenderQueue.length)) {\n\t\trerenderQueue.sort((a, b) => a._depth - b._depth);\n\t\twhile (len--) {\n\t\t\trerender(rerenderQueue.shift());\n\t\t}\n\t}\n}\nlet len = (process._rerenderCount = 0);\n","import { rendererState } from '../component';\nimport options from '../options';\n\n/**\n * @param {import('../internal').Internal} rootInternal\n */\nexport function commitRoot(rootInternal) {\n\tlet commitQueue = [].concat(rendererState._commitQueue);\n\trendererState._commitQueue = [];\n\n\tif (options._commit) options._commit(rootInternal, commitQueue);\n\n\tcommitQueue.some(internal => {\n\t\ttry {\n\t\t\t// @ts-ignore Reuse the root variable here so the type changes\n\t\t\tcommitQueue = internal._commitCallbacks.length;\n\t\t\t// @ts-ignore See above ts-ignore comment\n\t\t\twhile (commitQueue--) {\n\t\t\t\tinternal._commitCallbacks.shift()();\n\t\t\t}\n\t\t} catch (e) {\n\t\t\toptions._catchError(e, internal);\n\t\t}\n\t});\n}\n","import {\n\tMODE_HYDRATE,\n\tMODE_MUTATIVE_HYDRATE,\n\tMODE_SVG,\n\tUNDEFINED\n} from './constants';\nimport { commitRoot } from './diff/commit';\nimport { createElement, Fragment } from './create-element';\nimport options from './options';\nimport { mount } from './diff/mount';\nimport { patch } from './diff/patch';\nimport { createInternal } from './tree';\nimport { rendererState } from './component';\n\n/**\n *\n * @param {import('./internal').PreactElement} parentDom The DOM element to\n * @returns {import('./internal').Root}\n */\nexport function createRoot(parentDom) {\n\tlet rootInternal,\n\t\tfirstChild,\n\t\tflags = 0;\n\n\tfunction render(vnode) {\n\t\tif (options._root) options._root(vnode, parentDom);\n\n\t\tvnode = createElement(Fragment, { _parentDom: parentDom }, [vnode]);\n\n\t\tfirstChild =\n\t\t\t/** @type {import('./internal').PreactElement} */ (parentDom.firstChild);\n\n\t\trendererState._context = {};\n\t\t// List of effects that need to be called after diffing:\n\t\trendererState._commitQueue = [];\n\t\trendererState._parentDom = parentDom;\n\n\t\tif (rootInternal) {\n\t\t\tpatch(rootInternal, vnode);\n\t\t} else {\n\t\t\trootInternal = createInternal(vnode, undefined);\n\n\t\t\t// Store the VDOM tree root on the DOM element in a (minified) property:\n\t\t\tparentDom._children = rootInternal;\n\n\t\t\t// Calling createRoot().render() on an Element with existing children triggers mutative hydrate mode:\n\t\t\tif (firstChild) {\n\t\t\t\tflags = flags || MODE_MUTATIVE_HYDRATE;\n\t\t\t}\n\t\t\t// If the parent of this tree is within an inline SVG, the tree should start off in SVG mode:\n\t\t\tif (parentDom.ownerSVGElement !== UNDEFINED) {\n\t\t\t\tflags |= MODE_SVG;\n\t\t\t}\n\t\t\trootInternal.flags |= flags;\n\n\t\t\trootInternal._context = {};\n\n\t\t\tmount(rootInternal, vnode, firstChild);\n\t\t}\n\n\t\t// Flush all queued effects\n\t\tcommitRoot(rootInternal);\n\t}\n\n\treturn {\n\t\thydrate(vnode) {\n\t\t\tflags |= MODE_HYDRATE;\n\t\t\trender(vnode);\n\t\t},\n\t\trender\n\t};\n}\n","import { createRoot } from './create-root';\n\n/**\n * Render a Preact virtual node into a DOM element\n * @param {import('./internal').ComponentChild} vnode The virtual node to render\n * @param {import('./internal').PreactElement} parentDom The DOM element to\n * render into\n */\nexport function render(vnode, parentDom) {\n\tlet root = parentDom && parentDom._root;\n\tif (!root) {\n\t\troot = createRoot(parentDom);\n\t}\n\troot.render(vnode);\n\tparentDom._root = root;\n}\n\n/**\n * Update an existing DOM element with data from a Preact virtual node\n * @param {import('./internal').ComponentChild} vnode The virtual node to render\n * @param {import('./internal').PreactElement} parentDom The DOM element to\n * update\n */\nexport function hydrate(vnode, parentDom) {\n\tlet root = parentDom && parentDom._root;\n\tif (!root) {\n\t\troot = createRoot(parentDom);\n\t}\n\troot.hydrate(vnode);\n\tparentDom._root = root;\n}\n","import { createVNode } from './create-element';\n\n/**\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\n * @param {import('./internal').VNode} vnode The virtual DOM element to clone\n * @param {object} props Attributes/props to add when cloning\n * @param {Array<import('./internal').ComponentChildren>} rest Any additional arguments will be used as replacement children.\n * @returns {import('./internal').VNode}\n */\nexport function cloneElement(vnode, props, children) {\n\tlet normalizedProps = Object.assign({}, vnode.props),\n\t\tkey,\n\t\tref,\n\t\ti;\n\n\tfor (i in props) {\n\t\tif (i == 'key') key = props[i];\n\t\telse if (i == 'ref') ref = props[i];\n\t\telse normalizedProps[i] = props[i];\n\t}\n\n\tif (arguments.length > 3) {\n\t\tchildren = [children];\n\t\tfor (i = 3; i < arguments.length; i++) {\n\t\t\tchildren.push(arguments[i]);\n\t\t}\n\t}\n\n\tif (children !== undefined) {\n\t\tnormalizedProps.children = children;\n\t}\n\n\treturn createVNode(\n\t\tvnode.type,\n\t\tnormalizedProps,\n\t\tkey || vnode.key,\n\t\tref || vnode.ref,\n\t\t0\n\t);\n}\n","import { createElement } from './create-element';\n\n/**\n * Portal component\n * @this {import('./internal').Component}\n * @param {object | null | undefined} props\n *\n * TODO: use createRoot() instead of fake root\n */\nfunction Portal(props) {\n\treturn props.children;\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 */\nexport function createPortal(vnode, container) {\n\t// Note: We can't use Fragment here because a component that returned a Portal\n\t// (e.g. `const App = () => createPortal(...)`) wouldn't work. Our diff\n\t// collapses Fragments without keys that are returned directly from components\n\t// into just an array and sets that as the children array of the component.\n\t//\n\t// We also can't use keyed Fragments here cuz it might lead to weird edge\n\t// cases when toggling between two sibling portals if we use a shared keyed or\n\t// lead to unnecessary re-mounts if trying to generate a new key on each call.\n\t//\n\t// So the simplest solution seems to be just to use an unique type for Portal\n\t// to skip the Fragment collapsing logic when diffing components\n\treturn createElement(Portal, { _parentDom: container }, vnode);\n}\n"],"names":["EMPTY_ARR","options","[object Object]","error","internal","TYPE_CLASS","flags","type","getDerivedStateFromError","setState","componentDidCatch","e","vnodeId","createElement","props","children","key","ref","i","normalizedProps","arguments","length","push","undefined","createVNode","original","vnode","constructor","__v","normalizeToVNode","childVNode","Array","isArray","Fragment","String","createRef","current","isValidElement","applyRef","value","setStyle","dom","style","setProperty","name","oldValue","isSvg","useCapture","o","replace","toLowerCase","slice","_listeners","addEventListener","eventProxyCapture","eventProxy","removeEventListener","setAttribute","removeAttribute","this","event","_isControlled","_prevValue","checked","renderFunctionComponent","newVNode","componentContext","c","renderResult","newProps","context","forceUpdate","rerender","bind","renderHook","counter","call","getChildContext","rendererState","Object","assign","renderClassComponent","isNew","oldProps","oldState","snapshot","state","getDerivedStateFromProps","componentWillMount","componentDidMount","componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","render","getSnapshotBeforeUpdate","componentDidUpdate","createInternal","parentInternal","MODE_HYDRATE","prototype","_prevRef","data","__h","enqueueRender","__k","__","__e","__c","__b","shouldSearchComponent","getParentDom","getDomSibling","childIndex","indexOf","getChildDom","child","TYPE_TEXT","childDom","getParentContext","parent","mount","startDom","nextDomSibling","prevStartDom","prevParentDom","prevContext","tmp","contextType","provider","add","mountChildren","_commitQueue","mountElement","diffed","then","nextSibling","nodeType","isFullRender","localName","document","createTextNode","createElementNS","is","attributes","newHtml","newValue","newChildren","onInput","onChange","innerHTML","firstChild","childInternal","newDom","mountedNextChild","internalChildren","insertBefore","remove","nextContextId","providers","Set","unsubscribeFromContext","delete","forEach","p","createContext","defaultValue","contextId","Consumer","contextValue","Provider","ctx","unmount","skipRemove","r","componentWillUnmount","patchChildren","oldChildren","oldChildrenLength","remainingOldChildren","skew","skewedIndex","matchingIndex","findMatchingIndex","mountingChild","patch","go","insertComponentDom","oldRef","match","x","y","oldChild","parentDom","toChildArray","out","patchElement","MODE_PENDING_ERROR","oldHtml","__P","Component","commitRoot","update","callback","s","prevDebounce","rerenderQueue","defer","Promise","resolve","process","debounceRendering","len","sort","a","b","shift","rootInternal","commitQueue","concat","some","createRoot","ownerSVGElement","hydrate","root","cloneElement","Portal","createPortal","container"],"mappings":"MAgEaA,EAAY,GCrDnBC,EAAU,CACfC,ICE2BC,EAAOC,GAClC,KAAQA,EAAWA,MAClB,GFJ4BC,GEK3BD,EAASE,OFoB0B,MEnBlCF,EAASE,MAEV,IAcC,GAbIF,EAASG,KAAKC,0BACjBJ,MAAoBK,SACnBL,EAASG,KAAKC,yBAAyBL,IAIrCC,MAAoBM,mBACvBN,MAAoBM,kBAAkBP,GFkBlB,MEZjBC,EAASE,MAEZ,YADAF,EAASE,OFLoB,KEQ7B,MAAOK,GACRR,EAAQQ,EAKX,MAAMR,ICzCP,IAAIS,EAAU,WAUEC,EAAcN,EAAMO,EAAOC,GAC1C,IACCC,EACAC,EACAC,EAHGC,EAAkB,GAItB,IAAKD,KAAKJ,EACA,OAALI,EAAYF,EAAMF,EAAMI,GACd,OAALA,EAAYD,EAAMH,EAAMI,GAC5BC,EAAgBD,GAAKJ,EAAMI,GAGjC,GAAIE,UAAU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xM,EAAOyM,GAYnC,OAAOtN,EAAcoN,EAAQ,CAAE3B,IAAY6B,GAAazM"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"hooks.mjs","sources":["../../src/tree.js","../src/index.js","../../src/component.js","../../src/constants.js"],"sourcesContent":["import options from './options';\nimport {\n\tTYPE_FUNCTION,\n\tTYPE_ELEMENT,\n\tTYPE_TEXT,\n\tTYPE_CLASS,\n\tTYPE_ROOT,\n\tINHERITED_MODES,\n\tTYPE_COMPONENT,\n\tTYPE_DOM,\n\tMODE_SVG,\n\tUNDEFINED\n} from './constants';\nimport { enqueueRender } from './component';\n\n/**\n * Create an internal tree node\n * @param {import('./internal').VNode | string} vnode\n * @param {import('./internal').Internal} [parentInternal]\n * @returns {import('./internal').Internal}\n */\nexport function createInternal(vnode, parentInternal) {\n\tlet type = null,\n\t\tprops,\n\t\tkey,\n\t\tref;\n\n\t/** @type {number} */\n\tlet flags = parentInternal ? parentInternal.flags & INHERITED_MODES : 0;\n\n\t// Text VNodes/Internals have an ID of 0 that is never used:\n\tlet vnodeId = 0;\n\n\tif (typeof vnode === 'string') {\n\t\t// type = null;\n\t\tflags |= TYPE_TEXT;\n\t\tprops = vnode;\n\t}\n\t// Prevent JSON injection by rendering injected objects as empty Text nodes\n\telse if (vnode.constructor !== UNDEFINED) {\n\t\tflags |= TYPE_TEXT;\n\t\tprops = '';\n\t} else {\n\t\ttype = vnode.type;\n\t\tprops = vnode.props;\n\t\tkey = vnode.key;\n\t\tref = vnode.ref;\n\t\tvnodeId = vnode._vnodeId;\n\n\t\t// @TODO re-enable this when we stop removing key+ref from VNode props\n\t\t// if (props) {\n\t\t// \tif ((key = props.key) != null) {\n\t\t// \t\tprops.key = UNDEFINED;\n\t\t// \t}\n\t\t// \tif (typeof type !== 'function' && (ref = props.ref) != null) {\n\t\t// \t\tprops.ref = UNDEFINED;\n\t\t// \t}\n\t\t// } else {\n\t\t// \tprops = {};\n\t\t// }\n\n\t\t// flags = typeof type === 'function' ? COMPONENT_NODE : ELEMENT_NODE;\n\t\tflags |=\n\t\t\ttypeof type === 'function'\n\t\t\t\t? type.prototype && type.prototype.render\n\t\t\t\t\t? TYPE_CLASS\n\t\t\t\t\t: props._parentDom\n\t\t\t\t\t? TYPE_ROOT\n\t\t\t\t\t: TYPE_FUNCTION\n\t\t\t\t: TYPE_ELEMENT;\n\n\t\tif (flags & TYPE_ELEMENT && type === 'svg') {\n\t\t\tflags |= MODE_SVG;\n\t\t} else if (\n\t\t\tparentInternal &&\n\t\t\tparentInternal.flags & MODE_SVG &&\n\t\t\tparentInternal.type === 'foreignObject'\n\t\t) {\n\t\t\tflags &= ~MODE_SVG;\n\t\t}\n\t}\n\n\t/** @type {import('./internal').Internal} */\n\tconst internal = {\n\t\ttype,\n\t\tprops,\n\t\tkey,\n\t\tref,\n\t\t_prevRef: null,\n\t\tdata: flags & TYPE_COMPONENT ? {} : null,\n\t\t_commitCallbacks: flags & TYPE_COMPONENT ? [] : null,\n\t\trerender: enqueueRender,\n\t\tflags,\n\t\t_children: null,\n\t\t_parent: parentInternal,\n\t\t_vnodeId: vnodeId,\n\t\t_dom: null,\n\t\t_component: null,\n\t\t_context: null,\n\t\t_depth: parentInternal ? parentInternal._depth + 1 : 0\n\t};\n\n\tif (options._internal) options._internal(internal, vnode);\n\n\treturn internal;\n}\n\nconst shouldSearchComponent = internal =>\n\tinternal.flags & TYPE_COMPONENT &&\n\t(!(internal.flags & TYPE_ROOT) ||\n\t\tinternal.props._parentDom == getParentDom(internal._parent));\n\n/**\n * @param {import('./internal').Internal} internal\n * @param {number | null} [childIndex]\n * @returns {import('./internal').PreactNode}\n */\nexport function getDomSibling(internal, childIndex) {\n\tif (childIndex == null) {\n\t\t// Use childIndex==null as a signal to resume the search from the vnode's sibling\n\t\treturn getDomSibling(\n\t\t\tinternal._parent,\n\t\t\tinternal._parent._children.indexOf(internal) + 1\n\t\t);\n\t}\n\n\tlet childDom = getChildDom(internal, childIndex);\n\tif (childDom) {\n\t\treturn childDom;\n\t}\n\n\t// If we get here, we have not found a DOM node in this vnode's children. We\n\t// must resume from this vnode's sibling (in it's parent _children array).\n\t// Only climb up and search the parent if we aren't searching through a DOM\n\t// VNode (meaning we reached the DOM parent of the original vnode that began\n\t// the search). Note, the top of the tree has _parent == null so avoiding that\n\t// here.\n\treturn internal._parent && shouldSearchComponent(internal)\n\t\t? getDomSibling(internal)\n\t\t: null;\n}\n\n/**\n * @param {import('./internal').Internal} internal\n * @param {number} [i]\n * @returns {import('./internal').PreactElement}\n */\nexport function getChildDom(internal, i) {\n\tif (internal._children == null) {\n\t\treturn null;\n\t}\n\n\tfor (i = i || 0; i < internal._children.length; i++) {\n\t\tlet child = internal._children[i];\n\t\tif (child != null) {\n\t\t\tif (child.flags & TYPE_DOM) {\n\t\t\t\treturn child._dom;\n\t\t\t}\n\n\t\t\tif (shouldSearchComponent(child)) {\n\t\t\t\tlet childDom = getChildDom(child);\n\t\t\t\tif (childDom) {\n\t\t\t\t\treturn childDom;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn null;\n}\n/**\n * @param {import('./internal').Internal} internal\n * @returns {any}\n */\nexport function getParentContext(internal) {\n\t// @TODO: compare performance of recursion here (it's 11b smaller, but may be slower for deep trees)\n\treturn internal._context || getParentContext(internal._parent);\n\n\t// while ((internal = internal._parent)) {\n\t// \tlet context = internal._context;\n\t// \tif (context != null) return context;\n\t// }\n}\n\n/**\n * @param {import('./internal').Internal} internal\n * @returns {import('./internal').PreactElement}\n */\nexport function getParentDom(internal) {\n\tlet parent = internal;\n\n\t// if this is a Root internal, return its parent DOM:\n\tif (parent.flags & TYPE_ROOT) {\n\t\treturn parent.props._parentDom;\n\t}\n\n\t// walk up the tree to find the nearest DOM or Root Internal:\n\twhile ((parent = parent._parent)) {\n\t\tif (parent.flags & TYPE_ROOT) {\n\t\t\treturn parent.props._parentDom;\n\t\t} else if (parent.flags & TYPE_ELEMENT) {\n\t\t\treturn parent._dom;\n\t\t}\n\t}\n}\n","import { options } from 'preact';\nimport { getParentContext } from '../../src/tree';\nimport { MODE_UNMOUNTING } from '../../src/constants';\n\n/** @type {number} */\nlet currentIndex;\n\n/** @type {import('./internal').Internal} */\nlet currentInternal;\n\n/** @type {import('./internal').Internal} */\nlet previousInternal;\n\n/** @type {number} */\nlet currentHook = 0;\n\n/** @type {number} */\nlet currentIdCounter = 0;\n\n/** @type {Array<import('./internal').Component>} */\nlet afterPaintEffects = [];\n\nlet oldBeforeDiff = options._diff;\nlet oldBeforeRender = options._render;\nlet oldAfterDiff = options.diffed;\nlet oldCommit = options._commit;\nlet oldBeforeUnmount = options.unmount;\n\nconst RAF_TIMEOUT = 100;\nlet prevRaf;\n\noptions._diff = (internal, vnode) => {\n\tcurrentInternal = null;\n\tif (oldBeforeDiff) oldBeforeDiff(internal, vnode);\n};\n\noptions._render = internal => {\n\tif (oldBeforeRender) oldBeforeRender(internal);\n\n\tcurrentInternal = internal;\n\tcurrentIndex = 0;\n\n\tif (currentInternal.data && currentInternal.data.__hooks) {\n\t\tif (previousInternal === currentInternal) {\n\t\t\tcurrentInternal.data.__hooks._pendingEffects = [];\n\t\t\tcurrentInternal._commitCallbacks = [];\n\t\t\tcurrentInternal.data.__hooks._list.forEach(hookItem => {\n\t\t\t\tif (hookItem._pendingArgs) hookItem._pendingArgs = undefined;\n\t\t\t\tif (hookItem._pendingValue) hookItem._pendingValue = undefined;\n\t\t\t});\n\t\t} else {\n\t\t\tif (internal.data && internal.data.__hooks) {\n\t\t\t\tinternal.data &&\n\t\t\t\t\tinternal.data.__hooks._list.forEach(hookItem => {\n\t\t\t\t\t\tif (hookItem._pendingArgs) {\n\t\t\t\t\t\t\thookItem._args = hookItem._pendingArgs;\n\t\t\t\t\t\t\thookItem._pendingArgs = undefined;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (hookItem._pendingValue) {\n\t\t\t\t\t\t\thookItem._value = hookItem._pendingValue;\n\t\t\t\t\t\t\thookItem._pendingValue = undefined;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t}\n\t\t\tcurrentInternal.data.__hooks._pendingEffects.forEach(invokeCleanup);\n\t\t\tcurrentInternal.data.__hooks._pendingEffects.forEach(invokeEffect);\n\t\t\tcurrentInternal.data.__hooks._pendingEffects = [];\n\t\t}\n\t}\n\tpreviousInternal = internal;\n};\n\noptions.diffed = internal => {\n\tif (oldAfterDiff) oldAfterDiff(internal);\n\n\tpreviousInternal = undefined;\n\tif (\n\t\tinternal.data &&\n\t\tinternal.data.__hooks &&\n\t\tinternal.data.__hooks._pendingEffects.length\n\t) {\n\t\tafterPaint(afterPaintEffects.push(internal));\n\t}\n};\n\noptions._commit = (internal, commitQueue) => {\n\tcommitQueue.some(internal => {\n\t\ttry {\n\t\t\tif (internal.data && internal.data.__hooks) {\n\t\t\t\tinternal.data &&\n\t\t\t\t\tinternal.data.__hooks._list.forEach(hookItem => {\n\t\t\t\t\t\tif (hookItem._pendingArgs) {\n\t\t\t\t\t\t\thookItem._args = hookItem._pendingArgs;\n\t\t\t\t\t\t\thookItem._pendingArgs = undefined;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (hookItem._pendingValue) {\n\t\t\t\t\t\t\thookItem._value = hookItem._pendingValue;\n\t\t\t\t\t\t\thookItem._pendingValue = undefined;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t}\n\t\t\tinternal._commitCallbacks.forEach(invokeCleanup);\n\t\t\tinternal._commitCallbacks = internal._commitCallbacks.filter(cb =>\n\t\t\t\tcb._value ? invokeEffect(cb) : true\n\t\t\t);\n\t\t} catch (e) {\n\t\t\tcommitQueue.some(i => {\n\t\t\t\tif (i._commitCallbacks) i._commitCallbacks = [];\n\t\t\t});\n\t\t\tcommitQueue = [];\n\t\t\toptions._catchError(e, internal);\n\t\t}\n\t});\n\n\tif (oldCommit) oldCommit(internal, commitQueue);\n};\n\noptions.unmount = internal => {\n\tif (oldBeforeUnmount) oldBeforeUnmount(internal);\n\n\tif (internal.data && internal.data.__hooks) {\n\t\tlet hasErrored;\n\t\tinternal.data.__hooks._list.forEach(s => {\n\t\t\ttry {\n\t\t\t\tinvokeCleanup(s);\n\t\t\t} catch (e) {\n\t\t\t\thasErrored = e;\n\t\t\t}\n\t\t});\n\t\tif (hasErrored) options._catchError(hasErrored, internal);\n\t}\n};\n\n/**\n * Get a hook's state from the currentComponent\n * @param {number} index The index of the hook to get\n * @param {number} type The index of the hook to get\n * @returns {any}\n */\nfunction getHookState(index, type) {\n\tif (options._hook) {\n\t\toptions._hook(currentInternal, index, currentHook || type);\n\t}\n\tcurrentHook = 0;\n\n\t// Largely inspired by:\n\t// * https://github.com/michael-klein/funcy.js/blob/f6be73468e6ec46b0ff5aa3cc4c9baf72a29025a/src/hooks/core_hooks.mjs\n\t// * https://github.com/michael-klein/funcy.js/blob/650beaa58c43c33a74820a3c98b3c7079cf2e333/src/renderer.mjs\n\t// Other implementations to look at:\n\t// * https://codesandbox.io/s/mnox05qp8\n\tconst hooks =\n\t\tcurrentInternal.data.__hooks ||\n\t\t(currentInternal.data.__hooks = {\n\t\t\t_list: [],\n\t\t\t_pendingEffects: []\n\t\t});\n\n\tif (index >= hooks._list.length) {\n\t\thooks._list.push({});\n\t}\n\treturn hooks._list[index];\n}\n\n/**\n * @param {import('./index').StateUpdater<any>} [initialState]\n */\nexport function useState(initialState) {\n\tcurrentHook = 1;\n\treturn useReducer(invokeOrReturn, initialState);\n}\n\n/**\n * @param {import('./index').Reducer<any, any>} reducer\n * @param {import('./index').StateUpdater<any>} initialState\n * @param {(initialState: any) => void} [init]\n * @returns {[ any, (state: any) => void ]}\n */\nexport function useReducer(reducer, initialState, init) {\n\t/** @type {import('./internal').ReducerHookState} */\n\tconst hookState = getHookState(currentIndex++, 2);\n\thookState._reducer = reducer;\n\tif (!hookState._internal) {\n\t\thookState._value = [\n\t\t\t!init ? invokeOrReturn(undefined, initialState) : init(initialState),\n\n\t\t\taction => {\n\t\t\t\tconst nextValue = hookState._reducer(hookState._value[0], action);\n\t\t\t\tif (hookState._value[0] !== nextValue) {\n\t\t\t\t\thookState._value = [nextValue, hookState._value[1]];\n\t\t\t\t\thookState._internal.rerender(hookState._internal);\n\t\t\t\t}\n\t\t\t}\n\t\t];\n\n\t\thookState._internal = currentInternal;\n\t}\n\n\treturn hookState._value;\n}\n\n/**\n * @param {import('./internal').Effect} callback\n * @param {any[]} args\n */\nexport function useEffect(callback, args) {\n\t/** @type {import('./internal').EffectHookState} */\n\tconst state = getHookState(currentIndex++, 3);\n\tif (!options._skipEffects && argsChanged(state._args, args)) {\n\t\tstate._value = callback;\n\t\tstate._pendingArgs = args;\n\n\t\tcurrentInternal.data.__hooks._pendingEffects.push(state);\n\t}\n}\n\n/**\n * @param {import('./internal').Effect} callback\n * @param {any[]} args\n */\nexport function useLayoutEffect(callback, args) {\n\t/** @type {import('./internal').EffectHookState} */\n\tconst state = getHookState(currentIndex++, 4);\n\tif (!options._skipEffects && argsChanged(state._args, args)) {\n\t\tstate._value = callback;\n\t\tstate._pendingArgs = args;\n\n\t\tif (currentInternal._commitCallbacks == null) {\n\t\t\tcurrentInternal._commitCallbacks = [];\n\t\t}\n\t\tcurrentInternal._commitCallbacks.push(state);\n\t}\n}\n\nexport function useRef(initialValue) {\n\tcurrentHook = 5;\n\treturn useReducer(invokeEffect, { current: initialValue })[0];\n}\n\n/**\n * @param {object} ref\n * @param {() => object} createHandle\n * @param {any[]} args\n */\nexport function useImperativeHandle(ref, createHandle, args) {\n\tcurrentHook = 6;\n\tuseLayoutEffect(\n\t\t() => {\n\t\t\tif (typeof ref == 'function') {\n\t\t\t\tref(createHandle());\n\t\t\t\treturn () => ref(null);\n\t\t\t} else if (ref) {\n\t\t\t\tref.current = createHandle();\n\t\t\t\treturn () => (ref.current = null);\n\t\t\t}\n\t\t},\n\t\targs == null ? args : args.concat(ref)\n\t);\n}\n\n/**\n * @param {() => any} factory\n * @param {any[]} args\n */\nexport function useMemo(factory, args) {\n\t/** @type {import('./internal').MemoHookState} */\n\tconst state = getHookState(currentIndex++, 7);\n\tif (argsChanged(state._args, args)) {\n\t\tstate._pendingValue = factory();\n\t\tstate._pendingArgs = args;\n\t\tstate._factory = factory;\n\t\treturn state._pendingValue;\n\t}\n\n\treturn state._value;\n}\n\n/**\n * @param {() => void} callback\n * @param {any[]} args\n */\nexport function useCallback(callback, args) {\n\tcurrentHook = 8;\n\treturn useMemo(() => callback, args);\n}\n\n/**\n * @param {import('./internal').PreactContext} context\n */\nexport function useContext(context) {\n\tconst provider = getParentContext(currentInternal)[context._id];\n\t// We could skip this call here, but than we'd not call\n\t// `options._hook`. We need to do that in order to make\n\t// the devtools aware of this hook.\n\t/** @type {import('./internal').ContextHookState} */\n\tconst state = getHookState(currentIndex++, 9);\n\t// The devtools needs access to the context object to\n\t// be able to pull of the default value when no provider\n\t// is present in the tree.\n\tstate._context = context;\n\tif (!provider) return context._defaultValue;\n\t// This is probably not safe to convert to \"!\"\n\tif (state._value == null) {\n\t\tstate._value = true;\n\t\tprovider._subs.add(currentInternal);\n\t}\n\treturn provider.props.value;\n}\n\n/**\n * Display a custom label for a custom hook for the devtools panel\n * @type {<T>(value: T, cb?: (value: T) => string | number) => void}\n */\nexport function useDebugValue(value, formatter) {\n\tif (options.useDebugValue) {\n\t\toptions.useDebugValue(formatter ? formatter(value) : value);\n\t}\n}\n\nconst oldCatchError = options._catchError;\n// TODO: this double traverses now in combination with the root _catchError\n// however when we split Component up this shouldn't be needed\n// there can be a better solution to this if we just do a single iteration\n// as a combination of suspsense + hooks + component (compat) would be 3 tree-iterations\noptions._catchError = function(error, internal) {\n\t/** @type {import('./internal').Component} */\n\tlet handler = internal;\n\tfor (; (handler = handler._parent); ) {\n\t\tif (handler.data && handler.data._catchError) {\n\t\t\treturn handler.data._catchError(error, internal);\n\t\t}\n\t}\n\n\toldCatchError(error, internal);\n};\n\n/**\n * @param {(error: any) => void} cb\n */\nexport function useErrorBoundary(cb) {\n\t/** @type {import('./internal').ErrorBoundaryHookState} */\n\tconst state = getHookState(currentIndex++, 10);\n\tconst errState = useState();\n\tstate._value = cb;\n\n\tif (!currentInternal.data._catchError) {\n\t\tcurrentInternal.data._catchError = err => {\n\t\t\tif (state._value) state._value(err);\n\t\t\terrState[1](err);\n\t\t};\n\t}\n\treturn [\n\t\terrState[0],\n\t\t() => {\n\t\t\terrState[1](undefined);\n\t\t}\n\t];\n}\n\nexport function useId() {\n\tconst state = getHookState(currentIndex++, 11);\n\tif (!state._id) {\n\t\tcurrentIdCounter++;\n\n\t\tstate._id =\n\t\t\t'_P' +\n\t\t\t(currentInternal._parent._children.indexOf(currentInternal) +\n\t\t\t\tcurrentInternal._depth +\n\t\t\t\tcurrentIdCounter);\n\t}\n\treturn state._id;\n}\n\n/**\n * After paint effects consumer.\n */\nfunction flushAfterPaintEffects() {\n\tlet internal;\n\twhile ((internal = afterPaintEffects.shift())) {\n\t\tif (~internal.flags & MODE_UNMOUNTING) {\n\t\t\ttry {\n\t\t\t\tinternal.data.__hooks._pendingEffects.forEach(invokeCleanup);\n\t\t\t\tinternal.data.__hooks._pendingEffects.forEach(invokeEffect);\n\t\t\t\tinternal.data.__hooks._pendingEffects = [];\n\t\t\t} catch (e) {\n\t\t\t\tinternal.data.__hooks._pendingEffects = [];\n\t\t\t\toptions._catchError(e, internal);\n\t\t\t}\n\t\t}\n\t}\n}\n\nlet HAS_RAF = typeof requestAnimationFrame == 'function';\n\n/**\n * Schedule a callback to be invoked after the browser has a chance to paint a new frame.\n * Do this by combining requestAnimationFrame (rAF) + setTimeout to invoke a callback after\n * the next browser frame.\n *\n * Also, schedule a timeout in parallel to the the rAF to ensure the callback is invoked\n * even if RAF doesn't fire (for example if the browser tab is not visible)\n *\n * @param {() => void} callback\n */\nfunction afterNextFrame(callback) {\n\tconst done = () => {\n\t\tclearTimeout(timeout);\n\t\tif (HAS_RAF) cancelAnimationFrame(raf);\n\t\tsetTimeout(callback);\n\t};\n\tconst timeout = setTimeout(done, RAF_TIMEOUT);\n\n\tlet raf;\n\tif (HAS_RAF) {\n\t\traf = requestAnimationFrame(done);\n\t}\n}\n\n// Note: if someone used options.debounceRendering = requestAnimationFrame,\n// then effects will ALWAYS run on the NEXT frame instead of the current one, incurring a ~16ms delay.\n// Perhaps this is not such a big deal.\n/**\n * Schedule afterPaintEffects flush after the browser paints\n * @param {number} newQueueLength\n */\nfunction afterPaint(newQueueLength) {\n\tif (newQueueLength === 1 || prevRaf !== options.requestAnimationFrame) {\n\t\tprevRaf = options.requestAnimationFrame;\n\t\t(prevRaf || afterNextFrame)(flushAfterPaintEffects);\n\t}\n}\n\n/**\n * @param {import('./internal').EffectHookState} hook\n */\nfunction invokeCleanup(hook) {\n\t// A hook cleanup can introduce a call to render which creates a new root, this will call options.vnode\n\t// and move the currentInternal away.\n\tconst internal = currentInternal;\n\tlet cleanup = hook._cleanup;\n\tif (typeof cleanup == 'function') {\n\t\thook._cleanup = undefined;\n\t\tcleanup();\n\t}\n\tcurrentInternal = internal;\n}\n\n/**\n * Invoke a Hook's effect\n * @param {import('./internal').EffectHookState} hook\n */\nfunction invokeEffect(hook) {\n\t// A hook call can introduce a call to render which creates a new root, this will call options.vnode\n\t// and move the currentInternal away.\n\tconst internal = currentInternal;\n\thook._cleanup = hook._value();\n\tcurrentInternal = internal;\n}\n\n/**\n * @param {any[]} oldArgs\n * @param {any[]} newArgs\n */\nfunction argsChanged(oldArgs, newArgs) {\n\treturn (\n\t\t!oldArgs ||\n\t\toldArgs.length !== newArgs.length ||\n\t\tnewArgs.some((arg, index) => arg !== oldArgs[index])\n\t);\n}\n\nfunction invokeOrReturn(arg, f) {\n\treturn typeof f == 'function' ? f(arg) : f;\n}\n","import { commitRoot } from './diff/commit';\nimport options from './options';\nimport { createVNode, Fragment } from './create-element';\nimport { patch } from './diff/patch';\nimport { DIRTY_BIT, FORCE_UPDATE, MODE_UNMOUNTING } from './constants';\nimport { getParentContext, getParentDom } from './tree';\n\n/**\n * The render queue\n * @type {import('./internal').RendererState}\n */\nexport const rendererState = {\n\t_parentDom: null,\n\t_context: {},\n\t_commitQueue: []\n};\n\n/**\n * Base Component class. Provides `setState()` and `forceUpdate()`, which\n * trigger rendering\n * @param {object} props The initial component props\n * @param {object} context The initial context from parent components'\n * getChildContext\n */\nexport function Component(props, context) {\n\tthis.props = props;\n\tthis.context = context;\n}\n\n/**\n * Update component state and schedule a re-render.\n * @this {import('./internal').Component}\n * @param {object | ((s: object, p: object) => object)} update A hash of state\n * properties to update with new values or a function that given the current\n * state and props returns a new partial state\n * @param {() => void} [callback] A function to be called once component state is\n * updated\n */\nComponent.prototype.setState = function(update, callback) {\n\t// only clone state when copying to nextState the first time.\n\tlet s;\n\tif (this._nextState != null && this._nextState !== this.state) {\n\t\ts = this._nextState;\n\t} else {\n\t\ts = this._nextState = Object.assign({}, this.state);\n\t}\n\n\tif (typeof update == 'function') {\n\t\t// Some libraries like `immer` mark the current state as readonly,\n\t\t// preventing us from mutating it, so we need to clone it. See #2716\n\t\tupdate = update(Object.assign({}, s), this.props);\n\t}\n\n\tif (update) {\n\t\tObject.assign(s, update);\n\t}\n\n\t// Skip update if updater function returned null\n\tif (update == null) return;\n\n\tconst internal = this._internal;\n\tif (update != null && internal) {\n\t\tif (callback) internal._commitCallbacks.push(callback.bind(this));\n\t\tinternal.rerender(internal);\n\t}\n};\n\n/**\n * Immediately perform a synchronous re-render of the component\n * @this {import('./internal').Component}\n * @param {() => void} [callback] A function to be called after component is\n * re-rendered\n */\nComponent.prototype.forceUpdate = function(callback) {\n\tconst internal = this._internal;\n\tif (internal) {\n\t\t// Set render mode so that we can differentiate where the render request\n\t\t// is coming from. We need this because forceUpdate should never call\n\t\t// shouldComponentUpdate\n\t\tinternal.flags |= FORCE_UPDATE;\n\t\tif (callback) internal._commitCallbacks.push(callback.bind(this));\n\t\tinternal.rerender(internal);\n\t}\n};\n\n/**\n * Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\n * Virtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx).\n * @param {object} props Props (eg: JSX attributes) received from parent\n * element/component\n * @param {object} state The component's current state\n * @param {object} context Context object, as returned by the nearest\n * ancestor's `getChildContext()`\n * @returns {import('./index').ComponentChildren | void}\n */\nComponent.prototype.render = Fragment;\n\n/**\n * @param {import('./internal').Internal} internal The internal to rerender\n */\nfunction rerender(internal) {\n\tif (~internal.flags & MODE_UNMOUNTING && internal.flags & DIRTY_BIT) {\n\t\tconst vnode = createVNode(\n\t\t\tinternal.type,\n\t\t\tinternal.props,\n\t\t\tinternal.key, // @TODO we shouldn't need to actually pass these\n\t\t\tinternal.ref, // since the mode flag should bypass key/ref handling\n\t\t\t0\n\t\t);\n\n\t\trendererState._context = getParentContext(internal);\n\t\trendererState._commitQueue = [];\n\t\trendererState._parentDom = getParentDom(internal);\n\t\tpatch(internal, vnode);\n\t\tcommitRoot(internal);\n\t}\n}\n\n/**\n * The render queue\n * @type {Array<import('./internal').Internal>}\n */\nlet rerenderQueue = [];\n\n/*\n * The value of `Component.debounce` must asynchronously invoke the passed in callback. It is\n * important that contributors to Preact can consistently reason about what calls to `setState`, etc.\n * do, and when their effects will be applied. See the links below for some further reading on designing\n * asynchronous APIs.\n * * [Designing APIs for Asynchrony](https://blog.izs.me/2013/08/designing-apis-for-asynchrony)\n * * [Callbacks synchronous and asynchronous](https://blog.ometer.com/2011/07/24/callbacks-synchronous-and-asynchronous/)\n */\n\nlet prevDebounce;\n\nconst defer = Promise.prototype.then.bind(Promise.resolve());\n\n/**\n * Enqueue a rerender of an internal\n * @param {import('./internal').Internal} internal The internal to rerender\n */\nexport function enqueueRender(internal) {\n\tif (\n\t\t(!(internal.flags & DIRTY_BIT) &&\n\t\t\t(internal.flags |= DIRTY_BIT) &&\n\t\t\trerenderQueue.push(internal) &&\n\t\t\t!process._rerenderCount++) ||\n\t\tprevDebounce !== options.debounceRendering\n\t) {\n\t\tprevDebounce = options.debounceRendering;\n\t\t(prevDebounce || defer)(process);\n\t}\n}\n\n/** Flush the render queue by rerendering all queued components */\nfunction process() {\n\twhile ((len = process._rerenderCount = rerenderQueue.length)) {\n\t\trerenderQueue.sort((a, b) => a._depth - b._depth);\n\t\twhile (len--) {\n\t\t\trerender(rerenderQueue.shift());\n\t\t}\n\t}\n}\nlet len = (process._rerenderCount = 0);\n","// Internal.flags bitfield constants\nexport const TYPE_TEXT = 1 << 0;\nexport const TYPE_ELEMENT = 1 << 1;\nexport const TYPE_CLASS = 1 << 2;\nexport const TYPE_FUNCTION = 1 << 3;\n/** Signals this internal has a _parentDom prop that should change the parent\n * DOM node of it's children */\nexport const TYPE_ROOT = 1 << 4;\n\n/** Any type of internal representing DOM */\nexport const TYPE_DOM = TYPE_TEXT | TYPE_ELEMENT;\n/** Any type of component */\nexport const TYPE_COMPONENT = TYPE_CLASS | TYPE_FUNCTION | TYPE_ROOT;\n\n// Modes of rendering\n/** Normal hydration that attaches to a DOM tree but does not diff it. */\nexport const MODE_HYDRATE = 1 << 5;\n/** Top level render unspecified behaviour (old replaceNode parameter to render) */\nexport const MODE_MUTATIVE_HYDRATE = 1 << 6;\n/** Signifies this VNode suspended on the previous render */\nexport const MODE_SUSPENDED = 1 << 7;\n/** Signifies this VNode errored on the previous render */\nexport const MODE_ERRORED = 1 << 8;\n/** Signifies an error has been thrown and this component will be attempting to\n * handle & rerender the error on next render. In other words, on the next\n * render of this component, unset this mode and set the MODE_RERENDERING_ERROR.\n * This flag is distinct from MODE_RERENDERING_ERROR so that a component can\n * catch multiple errors thrown by its children in one render pass (see test\n * \"should handle double child throws\").\n */\nexport const MODE_PENDING_ERROR = 1 << 9;\n/** Signifies this Internal is attempting to \"handle\" an error and is\n * rerendering. This mode tracks that a component's last rerender was trying to\n * handle an error. As such, if another error is thrown while a component has\n * this flag set, it should not handle the newly thrown error since it failed to\n * successfully rerender the original error. This prevents error handling\n * infinite render loops */\nexport const MODE_RERENDERING_ERROR = 1 << 10;\n/** Signals this internal has been unmounted */\nexport const MODE_UNMOUNTING = 1 << 11;\n/** This Internal is rendered in an SVG tree */\nexport const MODE_SVG = 1 << 12;\n\n/** Signifies that bailout checks will be bypassed */\nexport const FORCE_UPDATE = 1 << 13;\n/** Signifies that a node needs to be updated */\nexport const DIRTY_BIT = 1 << 14;\n/** Signals the component can skip children due to a non-update */\nexport const SKIP_CHILDREN = 1 << 15;\n\n/** Reset all mode flags */\nexport const RESET_MODE = ~(\n\tMODE_HYDRATE |\n\tMODE_MUTATIVE_HYDRATE |\n\tMODE_SUSPENDED |\n\tMODE_ERRORED |\n\tMODE_RERENDERING_ERROR |\n\tFORCE_UPDATE |\n\tSKIP_CHILDREN\n);\n\n/** Modes a child internal inherits from their parent */\nexport const INHERITED_MODES = MODE_HYDRATE | MODE_MUTATIVE_HYDRATE | MODE_SVG;\n\nexport const EMPTY_ARR = [];\nexport const UNDEFINED = undefined;\n"],"names":["getParentContext","internal","currentIndex","currentInternal","previousInternal","Promise","prototype","then","bind","resolve","prevRaf","currentHook","currentIdCounter","afterPaintEffects","oldBeforeDiff","options","oldBeforeRender","oldAfterDiff","diffed","oldCommit","oldBeforeUnmount","unmount","getHookState","index","type","hooks","data","__","__h","length","push","useState","initialState","useReducer","invokeOrReturn","reducer","init","hookState","_reducer","undefined","action","nextValue","rerender","useEffect","callback","args","state","argsChanged","_pendingArgs","useLayoutEffect","useRef","initialValue","invokeEffect","current","useImperativeHandle","ref","createHandle","concat","useMemo","factory","_pendingValue","useCallback","useContext","context","provider","add","props","value","useDebugValue","formatter","vnode","forEach","hookItem","invokeCleanup","requestAnimationFrame","afterNextFrame","flushAfterPaintEffects","commitQueue","some","filter","cb","e","i","hasErrored","s","oldCatchError","useErrorBoundary","errState","err","useId","indexOf","shift","flags","error","handler","HAS_RAF","done","clearTimeout","timeout","cancelAnimationFrame","raf","setTimeout","hook","cleanup","oldArgs","newArgs","arg","f"],"mappings":"0CA8KgBA,EAAiBC,GAEhC,OAAOA,KAAqBD,EAAiBC,MC3K9C,IAAIC,EAGAC,EAGAC,EC4HUC,QAAQC,UAAUC,KAAKC,KAAK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,mBAALA,EAAkBA,EAAED,GAAOC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"jsxRuntime.mjs","sources":["../src/index.js"],"sourcesContent":["import { options, Fragment } from 'preact';\n\n/** @typedef {import('preact').VNode} VNode */\n\nlet vnodeId = 0;\n\n/**\n * @fileoverview\n * This file exports various methods that implement Babel's \"automatic\" JSX runtime API:\n * - jsx(type, props, key)\n * - jsxs(type, props, key)\n * - jsxDEV(type, props, key, __source, __self)\n *\n * The implementation of createVNode here is optimized for performance.\n * Benchmarks: https://esbench.com/bench/5f6b54a0b4632100a7dcd2b3\n */\n\n/**\n * JSX.Element factory used by Babel's {runtime:\"automatic\"} JSX transform\n * @param {VNode['type']} type\n * @param {VNode['props']} props\n * @param {VNode['key']} [key]\n * @param {string} [__source]\n * @param {string} [__self]\n */\nfunction createVNode(type, props, key, __source, __self) {\n\t// We'll want to preserve `ref` in props to get rid of the need for\n\t// forwardRef components in the future, but that should happen via\n\t// a separate PR.\n\tlet normalizedProps = {};\n\tfor (let i in props) {\n\t\tif (i != 'ref') {\n\t\t\tnormalizedProps[i] = props[i];\n\t\t}\n\t}\n\n\tconst vnode = {\n\t\ttype,\n\t\tprops: normalizedProps,\n\t\tkey,\n\t\tref: props && props.ref,\n\t\tconstructor: undefined,\n\t\t_vnodeId: --vnodeId,\n\t\t__source,\n\t\t__self\n\t};\n\n\t// If a Component VNode, check for and apply defaultProps.\n\t// Note: `type` is often a String, and can be `undefined` in development.\n\tlet defaults, i;\n\tif (typeof type === 'function' && (defaults = type.defaultProps)) {\n\t\tfor (i in defaults)\n\t\t\tif (normalizedProps[i] === undefined) {\n\t\t\t\tnormalizedProps[i] = defaults[i];\n\t\t\t}\n\t}\n\n\tif (options.vnode) options.vnode(vnode);\n\treturn vnode;\n}\n\nexport {\n\tcreateVNode as jsx,\n\tcreateVNode as jsxs,\n\tcreateVNode as jsxDEV,\n\tFragment\n};\n"],"names":["vnodeId","createVNode","type","props","key","__source","__self","normalizedProps","i","vnode","ref","constructor","undefined","__v","defaults","defaultProps","options"],"mappings":"8DAIA,IAAIA,EAAU,EAqBd,SAASC,EAAYC,EAAMC,EAAOC,EAAKC,EAAUC,GAIhD,IAAIC,EAAkB,GACtB,IAAK,IAAIC,KAAKL,EACJ,OAALK,IACHD,EAAgBC,GAAKL,EAAMK,IAI7B,MAAMC,EAAQ,CACbP,KAAAA,EACAC,MAAOI,EACPH,IAAAA,EACAM,IAAKP,GAASA,EAAMO,IACpBC,iBAAaC,EACbC,MAAYb,EACZK,SAAAA,EACAC,OAAAA,GAKD,IAAIQ,EAAUN,EACd,GAAoB,mBAATN,IAAwBY,EAAWZ,EAAKa,cAClD,IAAKP,KAAKM,OACkBF,IAAvBL,EAAgBC,KACnBD,EAAgBC,GAAKM,EAASN,IAKjC,OADIQ,EAAQP,OAAOO,EAAQP,MAAMA,GAC1BA"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "preact",
|
3
3
|
"amdName": "preact",
|
4
|
-
"version": "10.7.
|
4
|
+
"version": "10.7.3",
|
5
5
|
"private": false,
|
6
6
|
"description": "Fast 3kb React-compatible Virtual DOM library.",
|
7
7
|
"main": "dist/preact.js",
|
@@ -69,6 +69,7 @@
|
|
69
69
|
"require": "./compat/client.js"
|
70
70
|
},
|
71
71
|
"./compat/server": {
|
72
|
+
"browser": "./compat/server.browser.js",
|
72
73
|
"import": "./compat/server.mjs",
|
73
74
|
"require": "./compat/server.js"
|
74
75
|
},
|
@@ -202,6 +203,7 @@
|
|
202
203
|
"compat/src",
|
203
204
|
"compat/client.js",
|
204
205
|
"compat/client.mjs",
|
206
|
+
"compat/server.browser.js",
|
205
207
|
"compat/server.js",
|
206
208
|
"compat/server.mjs",
|
207
209
|
"compat/scheduler.js",
|
@@ -1006,6 +1006,7 @@ export namespace JSXInternal {
|
|
1006
1006
|
stop: SVGAttributes<SVGStopElement>;
|
1007
1007
|
symbol: SVGAttributes<SVGSymbolElement>;
|
1008
1008
|
text: SVGAttributes<SVGTextElement>;
|
1009
|
+
textPath: SVGAttributes<SVGTextPathElement>;
|
1009
1010
|
tspan: SVGAttributes<SVGTSpanElement>;
|
1010
1011
|
use: SVGAttributes<SVGUseElement>;
|
1011
1012
|
}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"testUtils.mjs","sources":["../src/index.js"],"sourcesContent":["import { options } from 'preact';\n\n/**\n * Setup a rerender function that will drain the queue of pending renders\n * @returns {() => void}\n */\nexport function setupRerender() {\n\toptions.__test__previousDebounce = options.debounceRendering;\n\toptions.debounceRendering = cb => (options.__test__drainQueue = cb);\n\treturn () => options.__test__drainQueue && options.__test__drainQueue();\n}\n\nconst isThenable = value => value != null && typeof value.then == 'function';\n\n/** Depth of nested calls to `act`. */\nlet actDepth = 0;\n\n/**\n * Run a test function, and flush all effects and rerenders after invoking it.\n *\n * Returns a Promise which resolves \"immediately\" if the callback is\n * synchronous or when the callback's result resolves if it is asynchronous.\n *\n * @param {() => void|Promise<void>} cb The function under test. This may be sync or async.\n * @return {Promise<void>}\n */\nexport function act(cb) {\n\tif (++actDepth > 1) {\n\t\t// If calls to `act` are nested, a flush happens only when the\n\t\t// outermost call returns. In the inner call, we just execute the\n\t\t// callback and return since the infrastructure for flushing has already\n\t\t// been set up.\n\t\t//\n\t\t// If an exception occurs, the outermost `act` will handle cleanup.\n\t\tconst result = cb();\n\t\tif (isThenable(result)) {\n\t\t\treturn result.then(() => {\n\t\t\t\t--actDepth;\n\t\t\t});\n\t\t}\n\t\t--actDepth;\n\t\treturn Promise.resolve();\n\t}\n\n\tconst previousRequestAnimationFrame = options.requestAnimationFrame;\n\tconst rerender = setupRerender();\n\n\t/** @type {() => void} */\n\tlet flush, toFlush;\n\n\t// Override requestAnimationFrame so we can flush pending hooks.\n\toptions.requestAnimationFrame = fc => (flush = fc);\n\n\tconst finish = () => {\n\t\ttry {\n\t\t\trerender();\n\t\t\twhile (flush) {\n\t\t\t\ttoFlush = flush;\n\t\t\t\tflush = null;\n\n\t\t\t\ttoFlush();\n\t\t\t\trerender();\n\t\t\t}\n\t\t\tteardown();\n\t\t} catch (e) {\n\t\t\tif (!err) {\n\t\t\t\terr = e;\n\t\t\t}\n\t\t}\n\n\t\toptions.requestAnimationFrame = previousRequestAnimationFrame;\n\t\t--actDepth;\n\t};\n\n\tlet err;\n\tlet result;\n\n\ttry {\n\t\tresult = cb();\n\t} catch (e) {\n\t\terr = e;\n\t}\n\n\tif (isThenable(result)) {\n\t\treturn result.then(finish, err => {\n\t\t\tfinish();\n\t\t\tthrow err;\n\t\t});\n\t}\n\n\t// nb. If the callback is synchronous, effects must be flushed before\n\t// `act` returns, so that the caller does not have to await the result,\n\t// even though React recommends this.\n\tfinish();\n\tif (err) {\n\t\tthrow err;\n\t}\n\treturn Promise.resolve();\n}\n\n/**\n * Teardown test environment and reset preact's internal state\n */\nexport function teardown() {\n\tif (options.__test__drainQueue) {\n\t\t// Flush any pending updates leftover by test\n\t\toptions.__test__drainQueue();\n\t\tdelete options.__test__drainQueue;\n\t}\n\n\tif (typeof options.__test__previousDebounce != 'undefined') {\n\t\toptions.debounceRendering = options.__test__previousDebounce;\n\t\tdelete options.__test__previousDebounce;\n\t} else {\n\t\toptions.debounceRendering = undefined;\n\t}\n}\n"],"names":["setupRerender","options","__test__previousDebounce","debounceRendering","cb","__test__drainQueue","isThenable","value","then","actDepth","act","result","Promise","resolve","previousRequestAnimationFrame","requestAnimationFrame","rerender","flush","toFlush","fc","finish","teardown","e","err","undefined"],"mappings":"0CAMgBA,IAGf,OAFAC,EAAQC,EAA2BD,EAAQE,kBAC3CF,EAAQE,kBAAoBC,GAAOH,EAAQI,EAAqBD,EACzD,IAAMH,EAAQI,GAAsBJ,EAAQI,IAGpD,MAAMC,EAAaC,GAAkB,MAATA,GAAsC,mBAAdA,EAAMC,KAG1D,IAAIC,EAAW,WAWCC,EAAIN,GACnB,KAAMK,EAAW,EAAG,CAOnB,MAAME,EAASP,IACf,OAAIE,EAAWK,GACPA,EAAOH,KAAK,OAChBC,OAGFA,EACKG,QAAQC,WAGhB,MAAMC,EAAgCb,EAAQc,sBACxCC,EAAWhB,IAGjB,IAAIiB,EAAOC,EAGXjB,EAAQc,sBAAwBI,GAAOF,EAAQE,EAE/C,MAAMC,EAAS,KACd,IAEC,IADAJ,IACOC,GACNC,EAAUD,EACVA,EAAQ,KAERC,IACAF,IAEDK,IACC,MAAOC,GACHC,IACJA,EAAMD,GAIRrB,EAAQc,sBAAwBD,IAC9BL,GAGH,IAAIc,EACAZ,EAEJ,IACCA,EAASP,IACR,MAAOkB,GACRC,EAAMD,EAGP,GAAIhB,EAAWK,GACd,OAAOA,EAAOH,KAAKY,EAAQG,IAE1B,MADAH,IACMG,IAQR,GADAH,IACIG,EACH,MAAMA,EAEP,OAAOX,QAAQC,mBAMAQ,IACXpB,EAAQI,IAEXJ,EAAQI,WACDJ,EAAQI,QAG+B,IAApCJ,EAAQC,GAClBD,EAAQE,kBAAoBF,EAAQC,SAC7BD,EAAQC,GAEfD,EAAQE,uBAAoBqB"}
|
data/package.json
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isomorfeus-preact
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 10.7.
|
4
|
+
version: 10.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Biedermann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.1.
|
19
|
+
version: 1.1.10
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.1.
|
26
|
+
version: 1.1.10
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: oj
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 3.13.
|
33
|
+
version: 3.13.13
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 3.13.
|
40
|
+
version: 3.13.13
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: opal
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -92,14 +92,14 @@ dependencies:
|
|
92
92
|
requirements:
|
93
93
|
- - "~>"
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
version: 0.14.
|
95
|
+
version: 0.14.24
|
96
96
|
type: :runtime
|
97
97
|
prerelease: false
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
100
|
- - "~>"
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: 0.14.
|
102
|
+
version: 0.14.24
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: isomorfeus-redux
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
@@ -290,12 +290,12 @@ files:
|
|
290
290
|
- node_modules/preact-render-to-string/typings.json
|
291
291
|
- node_modules/preact/LICENSE
|
292
292
|
- node_modules/preact/README.md
|
293
|
-
- node_modules/preact/compat/LICENSE
|
294
293
|
- node_modules/preact/compat/client.js
|
295
294
|
- node_modules/preact/compat/client.mjs
|
296
295
|
- node_modules/preact/compat/dist/compat.js
|
297
296
|
- node_modules/preact/compat/dist/compat.js.map
|
298
297
|
- node_modules/preact/compat/dist/compat.mjs
|
298
|
+
- node_modules/preact/compat/dist/compat.mjs.map
|
299
299
|
- node_modules/preact/compat/dist/compat.module.js
|
300
300
|
- node_modules/preact/compat/dist/compat.module.js.map
|
301
301
|
- node_modules/preact/compat/dist/compat.umd.js
|
@@ -307,6 +307,7 @@ files:
|
|
307
307
|
- node_modules/preact/compat/package.json
|
308
308
|
- node_modules/preact/compat/scheduler.js
|
309
309
|
- node_modules/preact/compat/scheduler.mjs
|
310
|
+
- node_modules/preact/compat/server.browser.js
|
310
311
|
- node_modules/preact/compat/server.js
|
311
312
|
- node_modules/preact/compat/server.mjs
|
312
313
|
- node_modules/preact/compat/src/Children.js
|
@@ -324,10 +325,10 @@ files:
|
|
324
325
|
- node_modules/preact/compat/src/suspense.js
|
325
326
|
- node_modules/preact/compat/src/util.js
|
326
327
|
- node_modules/preact/compat/test-utils.js
|
327
|
-
- node_modules/preact/debug/LICENSE
|
328
328
|
- node_modules/preact/debug/dist/debug.js
|
329
329
|
- node_modules/preact/debug/dist/debug.js.map
|
330
330
|
- node_modules/preact/debug/dist/debug.mjs
|
331
|
+
- node_modules/preact/debug/dist/debug.mjs.map
|
331
332
|
- node_modules/preact/debug/dist/debug.module.js
|
332
333
|
- node_modules/preact/debug/dist/debug.module.js.map
|
333
334
|
- node_modules/preact/debug/dist/debug.umd.js
|
@@ -340,10 +341,10 @@ files:
|
|
340
341
|
- node_modules/preact/debug/src/index.js
|
341
342
|
- node_modules/preact/debug/src/internal.d.ts
|
342
343
|
- node_modules/preact/debug/src/util.js
|
343
|
-
- node_modules/preact/devtools/LICENSE
|
344
344
|
- node_modules/preact/devtools/dist/devtools.js
|
345
345
|
- node_modules/preact/devtools/dist/devtools.js.map
|
346
346
|
- node_modules/preact/devtools/dist/devtools.mjs
|
347
|
+
- node_modules/preact/devtools/dist/devtools.mjs.map
|
347
348
|
- node_modules/preact/devtools/dist/devtools.module.js
|
348
349
|
- node_modules/preact/devtools/dist/devtools.module.js.map
|
349
350
|
- node_modules/preact/devtools/dist/devtools.umd.js
|
@@ -357,14 +358,15 @@ files:
|
|
357
358
|
- node_modules/preact/dist/preact.min.js
|
358
359
|
- node_modules/preact/dist/preact.min.js.map
|
359
360
|
- node_modules/preact/dist/preact.mjs
|
361
|
+
- node_modules/preact/dist/preact.mjs.map
|
360
362
|
- node_modules/preact/dist/preact.module.js
|
361
363
|
- node_modules/preact/dist/preact.module.js.map
|
362
364
|
- node_modules/preact/dist/preact.umd.js
|
363
365
|
- node_modules/preact/dist/preact.umd.js.map
|
364
|
-
- node_modules/preact/hooks/LICENSE
|
365
366
|
- node_modules/preact/hooks/dist/hooks.js
|
366
367
|
- node_modules/preact/hooks/dist/hooks.js.map
|
367
368
|
- node_modules/preact/hooks/dist/hooks.mjs
|
369
|
+
- node_modules/preact/hooks/dist/hooks.mjs.map
|
368
370
|
- node_modules/preact/hooks/dist/hooks.module.js
|
369
371
|
- node_modules/preact/hooks/dist/hooks.module.js.map
|
370
372
|
- node_modules/preact/hooks/dist/hooks.umd.js
|
@@ -373,10 +375,10 @@ files:
|
|
373
375
|
- node_modules/preact/hooks/src/index.d.ts
|
374
376
|
- node_modules/preact/hooks/src/index.js
|
375
377
|
- node_modules/preact/hooks/src/internal.d.ts
|
376
|
-
- node_modules/preact/jsx-runtime/LICENSE
|
377
378
|
- node_modules/preact/jsx-runtime/dist/jsxRuntime.js
|
378
379
|
- node_modules/preact/jsx-runtime/dist/jsxRuntime.js.map
|
379
380
|
- node_modules/preact/jsx-runtime/dist/jsxRuntime.mjs
|
381
|
+
- node_modules/preact/jsx-runtime/dist/jsxRuntime.mjs.map
|
380
382
|
- node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js
|
381
383
|
- node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js.map
|
382
384
|
- node_modules/preact/jsx-runtime/dist/jsxRuntime.umd.js
|
@@ -405,6 +407,7 @@ files:
|
|
405
407
|
- node_modules/preact/test-utils/dist/testUtils.js
|
406
408
|
- node_modules/preact/test-utils/dist/testUtils.js.map
|
407
409
|
- node_modules/preact/test-utils/dist/testUtils.mjs
|
410
|
+
- node_modules/preact/test-utils/dist/testUtils.mjs.map
|
408
411
|
- node_modules/preact/test-utils/dist/testUtils.module.js
|
409
412
|
- node_modules/preact/test-utils/dist/testUtils.module.js.map
|
410
413
|
- node_modules/preact/test-utils/dist/testUtils.umd.js
|
@@ -1,21 +0,0 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2015-present Jason Miller
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
13
|
-
copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
-
SOFTWARE.
|
@@ -1,21 +0,0 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2015-present Jason Miller
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
13
|
-
copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
-
SOFTWARE.
|
@@ -1,21 +0,0 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2015-present Jason Miller
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
13
|
-
copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
-
SOFTWARE.
|
@@ -1,21 +0,0 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2015-present Jason Miller
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
13
|
-
copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
-
SOFTWARE.
|
@@ -1,21 +0,0 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2015-present Jason Miller
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
13
|
-
copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
-
SOFTWARE.
|