{ "version": 3, "sources": ["../node_modules/preact/src/constants.js", "../node_modules/preact/src/util.js", "../node_modules/preact/src/options.js", "../node_modules/preact/src/create-element.js", "../node_modules/preact/src/component.js", "../node_modules/preact/src/diff/props.js", "../node_modules/preact/src/create-context.js", "../node_modules/preact/src/diff/children.js", "../node_modules/preact/src/diff/index.js", "../node_modules/preact/src/render.js", "../node_modules/preact/src/clone-element.js", "../node_modules/preact/src/diff/catch-error.js", "esbuild-scss-modules-plugin:./KPIVisualiser.module.scss", "../node_modules/preact/hooks/src/index.js", "../src/KPIVisualiser/KPIVisualiser_Context.ts", "../node_modules/preact/compat/src/util.js", "../node_modules/preact/compat/src/PureComponent.js", "../node_modules/preact/compat/src/memo.js", "../node_modules/preact/compat/src/forwardRef.js", "../node_modules/preact/compat/src/Children.js", "../node_modules/preact/compat/src/suspense.js", "../node_modules/preact/compat/src/suspense-list.js", "../node_modules/preact/src/constants.js", "../node_modules/preact/compat/src/portals.js", "../node_modules/preact/compat/src/render.js", "../node_modules/preact/compat/src/index.js", "../src/KPIVisualiser/Utils.tsx", "../src/KPIVisualiser/KPIVisualiser_Entry.tsx", "../src/KPIVisualiser/KPIVisualiser_Entry_LeftHeader.tsx", "../src/KPIVisualiser/KPIVisualiser_Grid.tsx", "../src/KPIVisualiser/KPIVisualiser_Key.tsx", "../src/KPIVisualiser/KPIVisualiser_TrackerLine.tsx", "../src/KPIVisualiser/KPIVisualiser.tsx", "../src/index.ts"], "sourcesContent": ["/** Normal hydration that attaches to a DOM tree but does not diff it. */\nexport const MODE_HYDRATE = 1 << 5;\n/** Signifies this VNode suspended on the previous render */\nexport const MODE_SUSPENDED = 1 << 7;\n/** Indicates that this node needs to be inserted while patching children */\nexport const INSERT_VNODE = 1 << 16;\n/** Indicates a VNode has been matched with another VNode in the diff */\nexport const MATCHED = 1 << 17;\n\n/** Reset all mode flags */\nexport const RESET_MODE = ~(MODE_HYDRATE | MODE_SUSPENDED);\n\nexport const EMPTY_OBJ = /** @type {any} */ ({});\nexport const EMPTY_ARR = [];\nexport const IS_NON_DIMENSIONAL =\n\t/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;\n", "import { EMPTY_ARR } from './constants';\n\nexport const isArray = Array.isArray;\n\n/**\n * Assign properties from `props` to `obj`\n * @template O, P The obj and props types\n * @param {O} obj The object to copy properties to\n * @param {P} props The object to copy properties from\n * @returns {O & P}\n */\nexport function assign(obj, props) {\n\t// @ts-expect-error We change the type of `obj` to be `O & P`\n\tfor (let i in props) obj[i] = props[i];\n\treturn /** @type {O & P} */ (obj);\n}\n\n/**\n * Remove a child node from its parent if attached. This is a workaround for\n * IE11 which doesn't support `Element.prototype.remove()`. Using this function\n * is smaller than including a dedicated polyfill.\n * @param {preact.ContainerNode} node The node to remove\n */\nexport function removeNode(node) {\n\tlet parentNode = node.parentNode;\n\tif (parentNode) parentNode.removeChild(node);\n}\n\nexport const slice = EMPTY_ARR.slice;\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 {Options}\n */\nconst options = {\n\t_catchError\n};\n\nexport default options;\n", "import { slice } from './util';\nimport options from './options';\n\nlet vnodeId = 0;\n\n/**\n * Create an virtual node (used for JSX)\n * @param {VNode[\"type\"]} type The node name or Component constructor for this\n * virtual node\n * @param {object | null | undefined} [props] The properties of the virtual node\n * @param {Array} [children] The children of the\n * virtual node\n * @returns {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 > 2) {\n\t\tnormalizedProps.children =\n\t\t\targuments.length > 3 ? slice.call(arguments, 2) : children;\n\t}\n\n\t// If a Component VNode, check for and apply defaultProps\n\t// Note: type may be undefined in development, must never error here.\n\tif (typeof type == 'function' && type.defaultProps != null) {\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\treturn createVNode(type, normalizedProps, key, ref, null);\n}\n\n/**\n * Create a VNode (used internally by Preact)\n * @param {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 {VNode[\"ref\"]} ref The ref property that will\n * receive a reference to its created child\n * @returns {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\t/** @type {VNode} */\n\tconst vnode = {\n\t\ttype,\n\t\tprops,\n\t\tkey,\n\t\tref,\n\t\t_children: null,\n\t\t_parent: null,\n\t\t_depth: 0,\n\t\t_dom: null,\n\t\t// _nextDom must be initialized to undefined b/c it will eventually\n\t\t// be set to dom.nextSibling which can return `null` and it is important\n\t\t// to be able to distinguish between an uninitialized _nextDom and\n\t\t// a _nextDom that has been set to `null`\n\t\t_nextDom: undefined,\n\t\t_component: null,\n\t\tconstructor: undefined,\n\t\t_original: original == null ? ++vnodeId : original,\n\t\t_index: -1,\n\t\t_flags: 0\n\t};\n\n\t// Only invoke the vnode hook if this was *not* a direct copy:\n\tif (original == null && options.vnode != null) options.vnode(vnode);\n\n\treturn vnode;\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 VNode}\n */\nexport const isValidElement = vnode =>\n\tvnode != null && vnode.constructor == undefined;\n", "import { assign } from './util';\nimport { diff, commitRoot } from './diff/index';\nimport options from './options';\nimport { Fragment } from './create-element';\nimport { MODE_HYDRATE } from './constants';\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 BaseComponent(props, context) {\n\tthis.props = props;\n\tthis.context = context;\n}\n\n/**\n * Update component state and schedule a re-render.\n * @this {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 */\nBaseComponent.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 = 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(assign({}, s), this.props);\n\t}\n\n\tif (update) {\n\t\tassign(s, update);\n\t}\n\n\t// Skip update if updater function returned null\n\tif (update == null) return;\n\n\tif (this._vnode) {\n\t\tif (callback) {\n\t\t\tthis._stateCallbacks.push(callback);\n\t\t}\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Immediately perform a synchronous re-render of the component\n * @this {Component}\n * @param {() => void} [callback] A function to be called after component is\n * re-rendered\n */\nBaseComponent.prototype.forceUpdate = function (callback) {\n\tif (this._vnode) {\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\tthis._force = true;\n\t\tif (callback) this._renderCallbacks.push(callback);\n\t\tenqueueRender(this);\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 {ComponentChildren | void}\n */\nBaseComponent.prototype.render = Fragment;\n\n/**\n * @param {VNode} vnode\n * @param {number | null} [childIndex]\n */\nexport function getDomSibling(vnode, 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 vnode._parent\n\t\t\t? getDomSibling(vnode._parent, vnode._index + 1)\n\t\t\t: null;\n\t}\n\n\tlet sibling;\n\tfor (; childIndex < vnode._children.length; childIndex++) {\n\t\tsibling = vnode._children[childIndex];\n\n\t\tif (sibling != null && sibling._dom != null) {\n\t\t\t// Since updateParentDomPointers keeps _dom pointer correct,\n\t\t\t// we can rely on _dom to tell us if this subtree contains a\n\t\t\t// rendered DOM node, and what the first rendered DOM node is\n\t\t\treturn sibling._dom;\n\t\t}\n\t}\n\n\t// If we get here, we have not found a DOM node in this vnode's children.\n\t// We 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)\n\treturn typeof vnode.type == 'function' ? getDomSibling(vnode) : null;\n}\n\n/**\n * Trigger in-place re-rendering of a component.\n * @param {Component} component The component to rerender\n */\nfunction renderComponent(component) {\n\tlet oldVNode = component._vnode,\n\t\toldDom = oldVNode._dom,\n\t\tcommitQueue = [],\n\t\trefQueue = [];\n\n\tif (component._parentDom) {\n\t\tconst newVNode = assign({}, oldVNode);\n\t\tnewVNode._original = oldVNode._original + 1;\n\t\tif (options.vnode) options.vnode(newVNode);\n\n\t\tdiff(\n\t\t\tcomponent._parentDom,\n\t\t\tnewVNode,\n\t\t\toldVNode,\n\t\t\tcomponent._globalContext,\n\t\t\tcomponent._parentDom.namespaceURI,\n\t\t\toldVNode._flags & MODE_HYDRATE ? [oldDom] : null,\n\t\t\tcommitQueue,\n\t\t\toldDom == null ? getDomSibling(oldVNode) : oldDom,\n\t\t\t!!(oldVNode._flags & MODE_HYDRATE),\n\t\t\trefQueue\n\t\t);\n\n\t\tnewVNode._original = oldVNode._original;\n\t\tnewVNode._parent._children[newVNode._index] = newVNode;\n\t\tcommitRoot(commitQueue, newVNode, refQueue);\n\n\t\tif (newVNode._dom != oldDom) {\n\t\t\tupdateParentDomPointers(newVNode);\n\t\t}\n\t}\n}\n\n/**\n * @param {VNode} vnode\n */\nfunction updateParentDomPointers(vnode) {\n\tif ((vnode = vnode._parent) != null && vnode._component != null) {\n\t\tvnode._dom = vnode._component.base = null;\n\t\tfor (let i = 0; i < vnode._children.length; i++) {\n\t\t\tlet child = vnode._children[i];\n\t\t\tif (child != null && child._dom != null) {\n\t\t\t\tvnode._dom = vnode._component.base = child._dom;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn updateParentDomPointers(vnode);\n\t}\n}\n\n/**\n * The render queue\n * @type {Array}\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 =\n\ttypeof Promise == 'function'\n\t\t? Promise.prototype.then.bind(Promise.resolve())\n\t\t: setTimeout;\n\n/**\n * Enqueue a rerender of a component\n * @param {Component} c The component to rerender\n */\nexport function enqueueRender(c) {\n\tif (\n\t\t(!c._dirty &&\n\t\t\t(c._dirty = true) &&\n\t\t\trerenderQueue.push(c) &&\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/**\n * @param {Component} a\n * @param {Component} b\n */\nconst depthSort = (a, b) => a._vnode._depth - b._vnode._depth;\n\n/** Flush the render queue by rerendering all queued components */\nfunction process() {\n\tlet c;\n\trerenderQueue.sort(depthSort);\n\t// Don't update `renderCount` yet. Keep its value non-zero to prevent unnecessary\n\t// process() calls from getting scheduled while `queue` is still being consumed.\n\twhile ((c = rerenderQueue.shift())) {\n\t\tif (c._dirty) {\n\t\t\tlet renderQueueLength = rerenderQueue.length;\n\t\t\trenderComponent(c);\n\t\t\tif (rerenderQueue.length > renderQueueLength) {\n\t\t\t\t// When i.e. rerendering a provider additional new items can be injected, we want to\n\t\t\t\t// keep the order from top to bottom with those new items so we can handle them in a\n\t\t\t\t// single pass\n\t\t\t\trerenderQueue.sort(depthSort);\n\t\t\t}\n\t\t}\n\t}\n\tprocess._rerenderCount = 0;\n}\n\nprocess._rerenderCount = 0;\n", "import { IS_NON_DIMENSIONAL } from '../constants';\nimport options from '../options';\n\nfunction setStyle(style, key, value) {\n\tif (key[0] === '-') {\n\t\tstyle.setProperty(key, value == null ? '' : value);\n\t} else if (value == null) {\n\t\tstyle[key] = '';\n\t} else if (typeof value != 'number' || IS_NON_DIMENSIONAL.test(key)) {\n\t\tstyle[key] = value;\n\t} else {\n\t\tstyle[key] = value + 'px';\n\t}\n}\n\n// A logical clock to solve issues like https://github.com/preactjs/preact/issues/3927.\n// When the DOM performs an event it leaves micro-ticks in between bubbling up which means that\n// an event can trigger on a newly reated DOM-node while the event bubbles up.\n//\n// Originally inspired by Vue\n// (https://github.com/vuejs/core/blob/caeb8a68811a1b0f79/packages/runtime-dom/src/modules/events.ts#L90-L101),\n// but modified to use a logical clock instead of Date.now() in case event handlers get attached\n// and events get dispatched during the same millisecond.\n//\n// The clock is incremented after each new event dispatch. This allows 1 000 000 new events\n// per second for over 280 years before the value reaches Number.MAX_SAFE_INTEGER (2**53 - 1).\nlet eventClock = 0;\n\n/**\n * Set a property value on a DOM node\n * @param {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 {string} namespace Whether or not this DOM node is an SVG node or not\n */\nexport function setProperty(dom, name, value, oldValue, namespace) {\n\tlet useCapture;\n\n\to: if (name === 'style') {\n\t\tif (typeof value == 'string') {\n\t\t\tdom.style.cssText = value;\n\t\t} else {\n\t\t\tif (typeof oldValue == 'string') {\n\t\t\t\tdom.style.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.style, name, '');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (value) {\n\t\t\t\tfor (name in value) {\n\t\t\t\t\tif (!oldValue || value[name] !== oldValue[name]) {\n\t\t\t\t\t\tsetStyle(dom.style, name, value[name]);\n\t\t\t\t\t}\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 =\n\t\t\tname !== (name = name.replace(/(PointerCapture)$|Capture$/i, '$1'));\n\n\t\t// Infer correct casing for DOM built-in events:\n\t\tif (\n\t\t\tname.toLowerCase() in dom ||\n\t\t\tname === 'onFocusOut' ||\n\t\t\tname === 'onFocusIn'\n\t\t)\n\t\t\tname = 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\tvalue._attached = eventClock;\n\t\t\t\tdom.addEventListener(\n\t\t\t\t\tname,\n\t\t\t\t\tuseCapture ? eventProxyCapture : eventProxy,\n\t\t\t\t\tuseCapture\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tvalue._attached = oldValue._attached;\n\t\t\t}\n\t\t} else {\n\t\t\tdom.removeEventListener(\n\t\t\t\tname,\n\t\t\t\tuseCapture ? eventProxyCapture : eventProxy,\n\t\t\t\tuseCapture\n\t\t\t);\n\t\t}\n\t} else {\n\t\tif (namespace == 'http://www.w3.org/2000/svg') {\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 != 'width' &&\n\t\t\tname != 'height' &&\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 != 'rowSpan' &&\n\t\t\tname != 'colSpan' &&\n\t\t\tname != 'role' &&\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- and data- attributes have no boolean representation.\n\t\t// A `false` value is different from the attribute not being\n\t\t// present, so we can't remove it. For non-boolean aria\n\t\t// attributes we could treat false as a removal, but the\n\t\t// amount of exceptions would cost too many bytes. On top of\n\t\t// that other frameworks generally stringify `false`.\n\n\t\tif (typeof value == 'function') {\n\t\t\t// never serialize functions as attribute values\n\t\t} else if (value != null && (value !== false || name[4] === '-')) {\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 * Create an event proxy function.\n * @param {boolean} useCapture Is the event handler for the capture phase.\n * @private\n */\nfunction createEventProxy(useCapture) {\n\t/**\n\t * Proxy an event to hooked event handlers\n\t * @param {PreactEvent} e The event object from the browser\n\t * @private\n\t */\n\treturn function (e) {\n\t\tif (this._listeners) {\n\t\t\tconst eventHandler = this._listeners[e.type + useCapture];\n\t\t\tif (e._dispatched == null) {\n\t\t\t\te._dispatched = eventClock++;\n\n\t\t\t\t// When `e._dispatched` is smaller than the time when the targeted event\n\t\t\t\t// handler was attached we know we have bubbled up to an element that was added\n\t\t\t\t// during patching the DOM.\n\t\t\t} else if (e._dispatched < eventHandler._attached) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn eventHandler(options.event ? options.event(e) : e);\n\t\t}\n\t};\n}\n\nconst eventProxy = createEventProxy(false);\nconst eventProxyCapture = createEventProxy(true);\n", "import { enqueueRender } from './component';\n\nexport let i = 0;\n\nexport function createContext(defaultValue, contextId) {\n\tcontextId = '__cC' + i++;\n\n\tconst context = {\n\t\t_id: contextId,\n\t\t_defaultValue: defaultValue,\n\t\t/** @type {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 {FunctionComponent} */\n\t\tProvider(props) {\n\t\t\tif (!this.getChildContext) {\n\t\t\t\t/** @type {Component[]} */\n\t\t\t\tlet subs = [];\n\t\t\t\tlet ctx = {};\n\t\t\t\tctx[contextId] = this;\n\n\t\t\t\tthis.getChildContext = () => ctx;\n\n\t\t\t\tthis.shouldComponentUpdate = function (_props) {\n\t\t\t\t\tif (this.props.value !== _props.value) {\n\t\t\t\t\t\t// I think the forced value propagation here was only needed when `options.debounceRendering` was being bypassed:\n\t\t\t\t\t\t// https://github.com/preactjs/preact/commit/4d339fb803bea09e9f198abf38ca1bf8ea4b7771#diff-54682ce380935a717e41b8bfc54737f6R358\n\t\t\t\t\t\t// In those cases though, even with the value corrected, we're double-rendering all nodes.\n\t\t\t\t\t\t// It might be better to just tell folks not to use force-sync mode.\n\t\t\t\t\t\t// Currently, using `useContext()` in a class component will overwrite its `this.context` value.\n\t\t\t\t\t\t// subs.some(c => {\n\t\t\t\t\t\t// \tc.context = _props.value;\n\t\t\t\t\t\t// \tenqueueRender(c);\n\t\t\t\t\t\t// });\n\n\t\t\t\t\t\t// subs.some(c => {\n\t\t\t\t\t\t// \tc.context[contextId] = _props.value;\n\t\t\t\t\t\t// \tenqueueRender(c);\n\t\t\t\t\t\t// });\n\t\t\t\t\t\tsubs.some(c => {\n\t\t\t\t\t\t\tc._force = true;\n\t\t\t\t\t\t\tenqueueRender(c);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tthis.sub = c => {\n\t\t\t\t\tsubs.push(c);\n\t\t\t\t\tlet old = c.componentWillUnmount;\n\t\t\t\t\tc.componentWillUnmount = () => {\n\t\t\t\t\t\tsubs.splice(subs.indexOf(c), 1);\n\t\t\t\t\t\tif (old) old.call(c);\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t}\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 =\n\t\tcontext);\n}\n", "import { diff, unmount, applyRef } from './index';\nimport { createVNode, Fragment } from '../create-element';\nimport { EMPTY_OBJ, EMPTY_ARR, INSERT_VNODE, MATCHED } from '../constants';\nimport { isArray } from '../util';\nimport { getDomSibling } from '../component';\n\n/**\n * Diff the children of a virtual node\n * @param {PreactElement} parentDom The DOM element whose children are being\n * diffed\n * @param {ComponentChildren[]} renderResult\n * @param {VNode} newParentVNode The new virtual node whose children should be\n * diff'ed against oldParentVNode\n * @param {VNode} oldParentVNode The old virtual node whose children should be\n * diff'ed against newParentVNode\n * @param {object} globalContext The current context object - modified by\n * getChildContext\n * @param {string} namespace Current namespace of the DOM node (HTML, SVG, or MathML)\n * @param {Array} excessDomChildren\n * @param {Array} commitQueue List of components which have callbacks\n * to invoke in commitRoot\n * @param {PreactElement} oldDom The current attached DOM element any new dom\n * elements should be placed around. Likely `null` on first render (except when\n * hydrating). Can be a sibling DOM element when diffing Fragments that have\n * siblings. In most cases, it starts out as `oldChildren[0]._dom`.\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @param {any[]} refQueue an array of elements needed to invoke refs\n */\nexport function diffChildren(\n\tparentDom,\n\trenderResult,\n\tnewParentVNode,\n\toldParentVNode,\n\tglobalContext,\n\tnamespace,\n\texcessDomChildren,\n\tcommitQueue,\n\toldDom,\n\tisHydrating,\n\trefQueue\n) {\n\tlet i,\n\t\t/** @type {VNode} */\n\t\toldVNode,\n\t\t/** @type {VNode} */\n\t\tchildVNode,\n\t\t/** @type {PreactElement} */\n\t\tnewDom,\n\t\t/** @type {PreactElement} */\n\t\tfirstChildDom;\n\n\t// This is a compression of oldParentVNode!=null && oldParentVNode != EMPTY_OBJ && oldParentVNode._children || EMPTY_ARR\n\t// as EMPTY_OBJ._children should be `undefined`.\n\t/** @type {VNode[]} */\n\tlet oldChildren = (oldParentVNode && oldParentVNode._children) || EMPTY_ARR;\n\n\tlet newChildrenLength = renderResult.length;\n\n\tnewParentVNode._nextDom = oldDom;\n\tconstructNewChildrenArray(newParentVNode, renderResult, oldChildren);\n\toldDom = newParentVNode._nextDom;\n\n\tfor (i = 0; i < newChildrenLength; i++) {\n\t\tchildVNode = newParentVNode._children[i];\n\t\tif (\n\t\t\tchildVNode == null ||\n\t\t\ttypeof childVNode == 'boolean' ||\n\t\t\ttypeof childVNode == 'function'\n\t\t) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// At this point, constructNewChildrenArray has assigned _index to be the\n\t\t// matchingIndex for this VNode's oldVNode (or -1 if there is no oldVNode).\n\t\tif (childVNode._index === -1) {\n\t\t\toldVNode = EMPTY_OBJ;\n\t\t} else {\n\t\t\toldVNode = oldChildren[childVNode._index] || EMPTY_OBJ;\n\t\t}\n\n\t\t// Update childVNode._index to its final index\n\t\tchildVNode._index = i;\n\n\t\t// Morph the old element into the new one, but don't append it to the dom yet\n\t\tdiff(\n\t\t\tparentDom,\n\t\t\tchildVNode,\n\t\t\toldVNode,\n\t\t\tglobalContext,\n\t\t\tnamespace,\n\t\t\texcessDomChildren,\n\t\t\tcommitQueue,\n\t\t\toldDom,\n\t\t\tisHydrating,\n\t\t\trefQueue\n\t\t);\n\n\t\t// Adjust DOM nodes\n\t\tnewDom = childVNode._dom;\n\t\tif (childVNode.ref && oldVNode.ref != childVNode.ref) {\n\t\t\tif (oldVNode.ref) {\n\t\t\t\tapplyRef(oldVNode.ref, null, childVNode);\n\t\t\t}\n\t\t\trefQueue.push(\n\t\t\t\tchildVNode.ref,\n\t\t\t\tchildVNode._component || newDom,\n\t\t\t\tchildVNode\n\t\t\t);\n\t\t}\n\n\t\tif (firstChildDom == null && newDom != null) {\n\t\t\tfirstChildDom = newDom;\n\t\t}\n\n\t\tif (\n\t\t\tchildVNode._flags & INSERT_VNODE ||\n\t\t\toldVNode._children === childVNode._children\n\t\t) {\n\t\t\t// @ts-expect-error olDom should be present on a DOM node\n\t\t\tif (oldDom && !oldDom.isConnected) {\n\t\t\t\toldDom = getDomSibling(oldVNode);\n\t\t\t}\n\t\t\toldDom = insert(childVNode, oldDom, parentDom);\n\t\t} else if (\n\t\t\ttypeof childVNode.type == 'function' &&\n\t\t\tchildVNode._nextDom !== undefined\n\t\t) {\n\t\t\t// Since Fragments or components that return Fragment like VNodes can\n\t\t\t// contain multiple DOM nodes as the same level, continue the diff from\n\t\t\t// the sibling of last DOM child of this child VNode\n\t\t\toldDom = childVNode._nextDom;\n\t\t} else if (newDom) {\n\t\t\toldDom = newDom.nextSibling;\n\t\t}\n\n\t\t// Eagerly cleanup _nextDom. We don't need to persist the value because it\n\t\t// is only used by `diffChildren` to determine where to resume the diff\n\t\t// after diffing Components and Fragments. Once we store it the nextDOM\n\t\t// local var, we can clean up the property. Also prevents us hanging on to\n\t\t// DOM nodes that may have been unmounted.\n\t\tchildVNode._nextDom = undefined;\n\n\t\t// Unset diffing flags\n\t\tchildVNode._flags &= ~(INSERT_VNODE | MATCHED);\n\t}\n\n\t// TODO: With new child diffing algo, consider alt ways to diff Fragments.\n\t// Such as dropping oldDom and moving fragments in place\n\t//\n\t// Because the newParentVNode is Fragment-like, we need to set it's\n\t// _nextDom property to the nextSibling of its last child DOM node.\n\t//\n\t// `oldDom` contains the correct value here because if the last child\n\t// is a Fragment-like, then oldDom has already been set to that child's _nextDom.\n\t// If the last child is a DOM VNode, then oldDom will be set to that DOM\n\t// node's nextSibling.\n\tnewParentVNode._nextDom = oldDom;\n\tnewParentVNode._dom = firstChildDom;\n}\n\n/**\n * @param {VNode} newParentVNode\n * @param {ComponentChildren[]} renderResult\n * @param {VNode[]} oldChildren\n */\nfunction constructNewChildrenArray(newParentVNode, renderResult, oldChildren) {\n\t/** @type {number} */\n\tlet i;\n\t/** @type {VNode} */\n\tlet childVNode;\n\t/** @type {VNode} */\n\tlet oldVNode;\n\n\tconst newChildrenLength = renderResult.length;\n\tlet oldChildrenLength = oldChildren.length,\n\t\tremainingOldChildren = oldChildrenLength;\n\n\tlet skew = 0;\n\n\tnewParentVNode._children = [];\n\tfor (i = 0; i < newChildrenLength; i++) {\n\t\t// @ts-expect-error We are reusing the childVNode variable to hold both the\n\t\t// pre and post normalized childVNode\n\t\tchildVNode = renderResult[i];\n\n\t\tif (\n\t\t\tchildVNode == null ||\n\t\t\ttypeof childVNode == 'boolean' ||\n\t\t\ttypeof childVNode == 'function'\n\t\t) {\n\t\t\tchildVNode = newParentVNode._children[i] = null;\n\t\t}\n\t\t// If this newVNode is being reused (e.g.
{reuse}{reuse}
) in the same diff,\n\t\t// or we are rendering a component (e.g. setState) copy the oldVNodes so it can have\n\t\t// it's own DOM & etc. pointers\n\t\telse if (\n\t\t\ttypeof childVNode == 'string' ||\n\t\t\ttypeof childVNode == 'number' ||\n\t\t\t// eslint-disable-next-line valid-typeof\n\t\t\ttypeof childVNode == 'bigint' ||\n\t\t\tchildVNode.constructor == String\n\t\t) {\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tnull,\n\t\t\t\tchildVNode,\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tnull\n\t\t\t);\n\t\t} else if (isArray(childVNode)) {\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tFragment,\n\t\t\t\t{ children: childVNode },\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tnull\n\t\t\t);\n\t\t} else if (childVNode.constructor === undefined && childVNode._depth > 0) {\n\t\t\t// VNode is already in use, clone it. This can happen in the following\n\t\t\t// scenario:\n\t\t\t// const reuse =
\n\t\t\t//
{reuse}{reuse}
\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tchildVNode.type,\n\t\t\t\tchildVNode.props,\n\t\t\t\tchildVNode.key,\n\t\t\t\tchildVNode.ref ? childVNode.ref : null,\n\t\t\t\tchildVNode._original\n\t\t\t);\n\t\t} else {\n\t\t\tchildVNode = newParentVNode._children[i] = childVNode;\n\t\t}\n\n\t\tconst skewedIndex = i + skew;\n\n\t\t// Handle unmounting null placeholders, i.e. VNode => null in unkeyed children\n\t\tif (childVNode == null) {\n\t\t\toldVNode = oldChildren[skewedIndex];\n\t\t\tif (\n\t\t\t\toldVNode &&\n\t\t\t\toldVNode.key == null &&\n\t\t\t\toldVNode._dom &&\n\t\t\t\t(oldVNode._flags & MATCHED) === 0\n\t\t\t) {\n\t\t\t\tif (oldVNode._dom == newParentVNode._nextDom) {\n\t\t\t\t\tnewParentVNode._nextDom = getDomSibling(oldVNode);\n\t\t\t\t}\n\n\t\t\t\tunmount(oldVNode, oldVNode, false);\n\n\t\t\t\t// Explicitly nullify this position in oldChildren instead of just\n\t\t\t\t// setting `_match=true` to prevent other routines (e.g.\n\t\t\t\t// `findMatchingIndex` or `getDomSibling`) from thinking VNodes or DOM\n\t\t\t\t// nodes in this position are still available to be used in diffing when\n\t\t\t\t// they have actually already been unmounted. For example, by only\n\t\t\t\t// setting `_match=true` here, the unmounting loop later would attempt\n\t\t\t\t// to unmount this VNode again seeing `_match==true`. Further,\n\t\t\t\t// getDomSibling doesn't know about _match and so would incorrectly\n\t\t\t\t// assume DOM nodes in this subtree are mounted and usable.\n\t\t\t\toldChildren[skewedIndex] = null;\n\t\t\t\tremainingOldChildren--;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tchildVNode._parent = newParentVNode;\n\t\tchildVNode._depth = newParentVNode._depth + 1;\n\n\t\tconst matchingIndex = findMatchingIndex(\n\t\t\tchildVNode,\n\t\t\toldChildren,\n\t\t\tskewedIndex,\n\t\t\tremainingOldChildren\n\t\t);\n\n\t\t// Temporarily store the matchingIndex on the _index property so we can pull\n\t\t// out the oldVNode in diffChildren. We'll override this to the VNode's\n\t\t// final index after using this property to get the oldVNode\n\t\tchildVNode._index = matchingIndex;\n\n\t\toldVNode = null;\n\t\tif (matchingIndex !== -1) {\n\t\t\toldVNode = oldChildren[matchingIndex];\n\t\t\tremainingOldChildren--;\n\t\t\tif (oldVNode) {\n\t\t\t\toldVNode._flags |= MATCHED;\n\t\t\t}\n\t\t}\n\n\t\t// Here, we define isMounting for the purposes of the skew diffing\n\t\t// algorithm. Nodes that are unsuspending are considered mounting and we detect\n\t\t// this by checking if oldVNode._original === null\n\t\tconst isMounting = oldVNode == null || oldVNode._original === null;\n\n\t\tif (isMounting) {\n\t\t\tif (matchingIndex == -1) {\n\t\t\t\tskew--;\n\t\t\t}\n\n\t\t\t// If we are mounting a DOM VNode, mark it for insertion\n\t\t\tif (typeof childVNode.type != 'function') {\n\t\t\t\tchildVNode._flags |= INSERT_VNODE;\n\t\t\t}\n\t\t} else if (matchingIndex !== skewedIndex) {\n\t\t\tif (matchingIndex === skewedIndex + 1) {\n\t\t\t\tskew++;\n\t\t\t} else if (matchingIndex > skewedIndex) {\n\t\t\t\tif (remainingOldChildren > newChildrenLength - skewedIndex) {\n\t\t\t\t\tskew += matchingIndex - skewedIndex;\n\t\t\t\t} else {\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}\n\t\t\t} else {\n\t\t\t\tskew = 0;\n\t\t\t}\n\n\t\t\t// Move this VNode's DOM if the original index (matchingIndex) doesn't\n\t\t\t// match the new skew index (i + new skew)\n\t\t\tif (matchingIndex !== i + skew) {\n\t\t\t\tchildVNode._flags |= INSERT_VNODE;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Remove remaining oldChildren if there are any. Loop forwards so that as we\n\t// unmount DOM from the beginning of the oldChildren, we can adjust oldDom to\n\t// point to the next child, which needs to be the first DOM node that won't be\n\t// unmounted.\n\tif (remainingOldChildren) {\n\t\tfor (i = 0; i < oldChildrenLength; i++) {\n\t\t\toldVNode = oldChildren[i];\n\t\t\tif (oldVNode != null && (oldVNode._flags & MATCHED) === 0) {\n\t\t\t\tif (oldVNode._dom == newParentVNode._nextDom) {\n\t\t\t\t\tnewParentVNode._nextDom = getDomSibling(oldVNode);\n\t\t\t\t}\n\n\t\t\t\tunmount(oldVNode, oldVNode);\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * @param {VNode} parentVNode\n * @param {PreactElement} oldDom\n * @param {PreactElement} parentDom\n * @returns {PreactElement}\n */\nfunction insert(parentVNode, oldDom, parentDom) {\n\t// Note: VNodes in nested suspended trees may be missing _children.\n\n\tif (typeof parentVNode.type == 'function') {\n\t\tlet children = parentVNode._children;\n\t\tfor (let i = 0; children && i < children.length; i++) {\n\t\t\tif (children[i]) {\n\t\t\t\t// If we enter this code path on sCU bailout, where we copy\n\t\t\t\t// oldVNode._children to newVNode._children, we need to update the old\n\t\t\t\t// children's _parent pointer to point to the newVNode (parentVNode\n\t\t\t\t// here).\n\t\t\t\tchildren[i]._parent = parentVNode;\n\t\t\t\toldDom = insert(children[i], oldDom, parentDom);\n\t\t\t}\n\t\t}\n\n\t\treturn oldDom;\n\t} else if (parentVNode._dom != oldDom) {\n\t\tparentDom.insertBefore(parentVNode._dom, oldDom || null);\n\t\toldDom = parentVNode._dom;\n\t}\n\n\tdo {\n\t\toldDom = oldDom && oldDom.nextSibling;\n\t} while (oldDom != null && oldDom.nodeType === 8);\n\n\treturn oldDom;\n}\n\n/**\n * Flatten and loop through the children of a virtual node\n * @param {ComponentChildren} children The unflattened children of a virtual\n * node\n * @returns {VNode[]}\n */\nexport function toChildArray(children, out) {\n\tout = out || [];\n\tif (children == null || typeof children == 'boolean') {\n\t} else if (isArray(children)) {\n\t\tchildren.some(child => {\n\t\t\ttoChildArray(child, out);\n\t\t});\n\t} else {\n\t\tout.push(children);\n\t}\n\treturn out;\n}\n\n/**\n * @param {VNode} childVNode\n * @param {VNode[]} 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 key = childVNode.key;\n\tconst type = childVNode.type;\n\tlet x = skewedIndex - 1;\n\tlet y = skewedIndex + 1;\n\tlet oldVNode = oldChildren[skewedIndex];\n\n\t// We only need to perform a search if there are more children\n\t// (remainingOldChildren) to search. However, if the oldVNode we just looked\n\t// at skewedIndex was not already used in this diff, then there must be at\n\t// least 1 other (so greater than 1) remainingOldChildren to attempt to match\n\t// against. So the following condition checks that ensuring\n\t// remainingOldChildren > 1 if the oldVNode is not already used/matched. Else\n\t// if the oldVNode was null or matched, then there could needs to be at least\n\t// 1 (aka `remainingOldChildren > 0`) children to find and compare against.\n\tlet shouldSearch =\n\t\tremainingOldChildren >\n\t\t(oldVNode != null && (oldVNode._flags & MATCHED) === 0 ? 1 : 0);\n\n\tif (\n\t\toldVNode === null ||\n\t\t(oldVNode &&\n\t\t\tkey == oldVNode.key &&\n\t\t\ttype === oldVNode.type &&\n\t\t\t(oldVNode._flags & MATCHED) === 0)\n\t) {\n\t\treturn skewedIndex;\n\t} else if (shouldSearch) {\n\t\twhile (x >= 0 || y < oldChildren.length) {\n\t\t\tif (x >= 0) {\n\t\t\t\toldVNode = oldChildren[x];\n\t\t\t\tif (\n\t\t\t\t\toldVNode &&\n\t\t\t\t\t(oldVNode._flags & MATCHED) === 0 &&\n\t\t\t\t\tkey == oldVNode.key &&\n\t\t\t\t\ttype === oldVNode.type\n\t\t\t\t) {\n\t\t\t\t\treturn x;\n\t\t\t\t}\n\t\t\t\tx--;\n\t\t\t}\n\n\t\t\tif (y < oldChildren.length) {\n\t\t\t\toldVNode = oldChildren[y];\n\t\t\t\tif (\n\t\t\t\t\toldVNode &&\n\t\t\t\t\t(oldVNode._flags & MATCHED) === 0 &&\n\t\t\t\t\tkey == oldVNode.key &&\n\t\t\t\t\ttype === oldVNode.type\n\t\t\t\t) {\n\t\t\t\t\treturn y;\n\t\t\t\t}\n\t\t\t\ty++;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn -1;\n}\n", "import {\n\tEMPTY_OBJ,\n\tMODE_HYDRATE,\n\tMODE_SUSPENDED,\n\tRESET_MODE\n} from '../constants';\nimport { BaseComponent, getDomSibling } from '../component';\nimport { Fragment } from '../create-element';\nimport { diffChildren } from './children';\nimport { setProperty } from './props';\nimport { assign, isArray, removeNode, slice } from '../util';\nimport options from '../options';\n\n/**\n * Diff two virtual nodes and apply proper changes to the DOM\n * @param {PreactElement} parentDom The parent of the DOM element\n * @param {VNode} newVNode The new virtual node\n * @param {VNode} oldVNode The old virtual node\n * @param {object} globalContext The current context object. Modified by\n * getChildContext\n * @param {string} namespace Current namespace of the DOM node (HTML, SVG, or MathML)\n * @param {Array} excessDomChildren\n * @param {Array} commitQueue List of components which have callbacks\n * to invoke in commitRoot\n * @param {PreactElement} oldDom The current attached DOM element any new dom\n * elements should be placed around. Likely `null` on first render (except when\n * hydrating). Can be a sibling DOM element when diffing Fragments that have\n * siblings. In most cases, it starts out as `oldChildren[0]._dom`.\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @param {any[]} refQueue an array of elements needed to invoke refs\n */\nexport function diff(\n\tparentDom,\n\tnewVNode,\n\toldVNode,\n\tglobalContext,\n\tnamespace,\n\texcessDomChildren,\n\tcommitQueue,\n\toldDom,\n\tisHydrating,\n\trefQueue\n) {\n\t/** @type {any} */\n\tlet tmp,\n\t\tnewType = newVNode.type;\n\n\t// When passing through createElement it assigns the object\n\t// constructor as undefined. This to prevent JSON-injection.\n\tif (newVNode.constructor !== undefined) return null;\n\n\t// If the previous diff bailed out, resume creating/hydrating.\n\tif (oldVNode._flags & MODE_SUSPENDED) {\n\t\tisHydrating = !!(oldVNode._flags & MODE_HYDRATE);\n\t\toldDom = newVNode._dom = oldVNode._dom;\n\t\texcessDomChildren = [oldDom];\n\t}\n\n\tif ((tmp = options._diff)) tmp(newVNode);\n\n\touter: if (typeof newType == 'function') {\n\t\ttry {\n\t\t\tlet c, isNew, oldProps, oldState, snapshot, clearProcessingException;\n\t\t\tlet newProps = newVNode.props;\n\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\ttmp = newType.contextType;\n\t\t\tlet provider = tmp && globalContext[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: globalContext;\n\n\t\t\t// Get component and set it to `c`\n\t\t\tif (oldVNode._component) {\n\t\t\t\tc = newVNode._component = oldVNode._component;\n\t\t\t\tclearProcessingException = c._processingException = c._pendingError;\n\t\t\t} else {\n\t\t\t\t// Instantiate the new component\n\t\t\t\tif ('prototype' in newType && newType.prototype.render) {\n\t\t\t\t\t// @ts-expect-error The check above verifies that newType is suppose to be constructed\n\t\t\t\t\tnewVNode._component = c = new newType(newProps, componentContext); // eslint-disable-line new-cap\n\t\t\t\t} else {\n\t\t\t\t\t// @ts-expect-error Trust me, Component implements the interface we want\n\t\t\t\t\tnewVNode._component = c = new BaseComponent(\n\t\t\t\t\t\tnewProps,\n\t\t\t\t\t\tcomponentContext\n\t\t\t\t\t);\n\t\t\t\t\tc.constructor = newType;\n\t\t\t\t\tc.render = doRender;\n\t\t\t\t}\n\t\t\t\tif (provider) provider.sub(c);\n\n\t\t\t\tc.props = newProps;\n\t\t\t\tif (!c.state) c.state = {};\n\t\t\t\tc.context = componentContext;\n\t\t\t\tc._globalContext = globalContext;\n\t\t\t\tisNew = c._dirty = true;\n\t\t\t\tc._renderCallbacks = [];\n\t\t\t\tc._stateCallbacks = [];\n\t\t\t}\n\n\t\t\t// Invoke getDerivedStateFromProps\n\t\t\tif (c._nextState == null) {\n\t\t\t\tc._nextState = c.state;\n\t\t\t}\n\n\t\t\tif (newType.getDerivedStateFromProps != null) {\n\t\t\t\tif (c._nextState == c.state) {\n\t\t\t\t\tc._nextState = assign({}, c._nextState);\n\t\t\t\t}\n\n\t\t\t\tassign(\n\t\t\t\t\tc._nextState,\n\t\t\t\t\tnewType.getDerivedStateFromProps(newProps, c._nextState)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\toldProps = c.props;\n\t\t\toldState = c.state;\n\t\t\tc._vnode = newVNode;\n\n\t\t\t// Invoke pre-render lifecycle methods\n\t\t\tif (isNew) {\n\t\t\t\tif (\n\t\t\t\t\tnewType.getDerivedStateFromProps == null &&\n\t\t\t\t\tc.componentWillMount != null\n\t\t\t\t) {\n\t\t\t\t\tc.componentWillMount();\n\t\t\t\t}\n\n\t\t\t\tif (c.componentDidMount != null) {\n\t\t\t\t\tc._renderCallbacks.push(c.componentDidMount);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (\n\t\t\t\t\tnewType.getDerivedStateFromProps == null &&\n\t\t\t\t\tnewProps !== oldProps &&\n\t\t\t\t\tc.componentWillReceiveProps != null\n\t\t\t\t) {\n\t\t\t\t\tc.componentWillReceiveProps(newProps, componentContext);\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t!c._force &&\n\t\t\t\t\t((c.shouldComponentUpdate != null &&\n\t\t\t\t\t\tc.shouldComponentUpdate(\n\t\t\t\t\t\t\tnewProps,\n\t\t\t\t\t\t\tc._nextState,\n\t\t\t\t\t\t\tcomponentContext\n\t\t\t\t\t\t) === false) ||\n\t\t\t\t\t\tnewVNode._original === oldVNode._original)\n\t\t\t\t) {\n\t\t\t\t\t// More info about this here: https://gist.github.com/JoviDeCroock/bec5f2ce93544d2e6070ef8e0036e4e8\n\t\t\t\t\tif (newVNode._original !== oldVNode._original) {\n\t\t\t\t\t\t// When we are dealing with a bail because of sCU we have to update\n\t\t\t\t\t\t// the props, state and dirty-state.\n\t\t\t\t\t\t// when we are dealing with strict-equality we don't as the child could still\n\t\t\t\t\t\t// be dirtied see #3883\n\t\t\t\t\t\tc.props = newProps;\n\t\t\t\t\t\tc.state = c._nextState;\n\t\t\t\t\t\tc._dirty = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t\t\t\tnewVNode._children = oldVNode._children;\n\t\t\t\t\tnewVNode._children.forEach(vnode => {\n\t\t\t\t\t\tif (vnode) vnode._parent = newVNode;\n\t\t\t\t\t});\n\n\t\t\t\t\tfor (let i = 0; i < c._stateCallbacks.length; i++) {\n\t\t\t\t\t\tc._renderCallbacks.push(c._stateCallbacks[i]);\n\t\t\t\t\t}\n\t\t\t\t\tc._stateCallbacks = [];\n\n\t\t\t\t\tif (c._renderCallbacks.length) {\n\t\t\t\t\t\tcommitQueue.push(c);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak outer;\n\t\t\t\t}\n\n\t\t\t\tif (c.componentWillUpdate != null) {\n\t\t\t\t\tc.componentWillUpdate(newProps, c._nextState, componentContext);\n\t\t\t\t}\n\n\t\t\t\tif (c.componentDidUpdate != null) {\n\t\t\t\t\tc._renderCallbacks.push(() => {\n\t\t\t\t\t\tc.componentDidUpdate(oldProps, oldState, snapshot);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tc.context = componentContext;\n\t\t\tc.props = newProps;\n\t\t\tc._parentDom = parentDom;\n\t\t\tc._force = false;\n\n\t\t\tlet renderHook = options._render,\n\t\t\t\tcount = 0;\n\t\t\tif ('prototype' in newType && newType.prototype.render) {\n\t\t\t\tc.state = c._nextState;\n\t\t\t\tc._dirty = false;\n\n\t\t\t\tif (renderHook) renderHook(newVNode);\n\n\t\t\t\ttmp = c.render(c.props, c.state, c.context);\n\n\t\t\t\tfor (let i = 0; i < c._stateCallbacks.length; i++) {\n\t\t\t\t\tc._renderCallbacks.push(c._stateCallbacks[i]);\n\t\t\t\t}\n\t\t\t\tc._stateCallbacks = [];\n\t\t\t} else {\n\t\t\t\tdo {\n\t\t\t\t\tc._dirty = false;\n\t\t\t\t\tif (renderHook) renderHook(newVNode);\n\n\t\t\t\t\ttmp = c.render(c.props, c.state, c.context);\n\n\t\t\t\t\t// Handle setState called in render, see #2553\n\t\t\t\t\tc.state = c._nextState;\n\t\t\t\t} while (c._dirty && ++count < 25);\n\t\t\t}\n\n\t\t\t// Handle setState called in render, see #2553\n\t\t\tc.state = c._nextState;\n\n\t\t\tif (c.getChildContext != null) {\n\t\t\t\tglobalContext = assign(assign({}, globalContext), c.getChildContext());\n\t\t\t}\n\n\t\t\tif (!isNew && c.getSnapshotBeforeUpdate != null) {\n\t\t\t\tsnapshot = c.getSnapshotBeforeUpdate(oldProps, oldState);\n\t\t\t}\n\n\t\t\tlet isTopLevelFragment =\n\t\t\t\ttmp != null && tmp.type === Fragment && tmp.key == null;\n\t\t\tlet renderResult = isTopLevelFragment ? tmp.props.children : tmp;\n\n\t\t\tdiffChildren(\n\t\t\t\tparentDom,\n\t\t\t\tisArray(renderResult) ? renderResult : [renderResult],\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tnamespace,\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\toldDom,\n\t\t\t\tisHydrating,\n\t\t\t\trefQueue\n\t\t\t);\n\n\t\t\tc.base = newVNode._dom;\n\n\t\t\t// We successfully rendered this VNode, unset any stored hydration/bailout state:\n\t\t\tnewVNode._flags &= RESET_MODE;\n\n\t\t\tif (c._renderCallbacks.length) {\n\t\t\t\tcommitQueue.push(c);\n\t\t\t}\n\n\t\t\tif (clearProcessingException) {\n\t\t\t\tc._pendingError = c._processingException = null;\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tnewVNode._original = null;\n\t\t\t// if hydrating or creating initial tree, bailout preserves DOM:\n\t\t\tif (isHydrating || excessDomChildren != null) {\n\t\t\t\tnewVNode._dom = oldDom;\n\t\t\t\tnewVNode._flags |= isHydrating\n\t\t\t\t\t? MODE_HYDRATE | MODE_SUSPENDED\n\t\t\t\t\t: MODE_HYDRATE;\n\t\t\t\texcessDomChildren[excessDomChildren.indexOf(oldDom)] = null;\n\t\t\t\t// ^ could possibly be simplified to:\n\t\t\t\t// excessDomChildren.length = 0;\n\t\t\t} else {\n\t\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t\t\tnewVNode._children = oldVNode._children;\n\t\t\t}\n\t\t\toptions._catchError(e, newVNode, oldVNode);\n\t\t}\n\t} else if (\n\t\texcessDomChildren == null &&\n\t\tnewVNode._original === oldVNode._original\n\t) {\n\t\tnewVNode._children = oldVNode._children;\n\t\tnewVNode._dom = oldVNode._dom;\n\t} else {\n\t\tnewVNode._dom = diffElementNodes(\n\t\t\toldVNode._dom,\n\t\t\tnewVNode,\n\t\t\toldVNode,\n\t\t\tglobalContext,\n\t\t\tnamespace,\n\t\t\texcessDomChildren,\n\t\t\tcommitQueue,\n\t\t\tisHydrating,\n\t\t\trefQueue\n\t\t);\n\t}\n\n\tif ((tmp = options.diffed)) tmp(newVNode);\n}\n\n/**\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {VNode} root\n */\nexport function commitRoot(commitQueue, root, refQueue) {\n\troot._nextDom = undefined;\n\n\tfor (let i = 0; i < refQueue.length; i++) {\n\t\tapplyRef(refQueue[i], refQueue[++i], refQueue[++i]);\n\t}\n\n\tif (options._commit) options._commit(root, commitQueue);\n\n\tcommitQueue.some(c => {\n\t\ttry {\n\t\t\t// @ts-expect-error Reuse the commitQueue variable here so the type changes\n\t\t\tcommitQueue = c._renderCallbacks;\n\t\t\tc._renderCallbacks = [];\n\t\t\tcommitQueue.some(cb => {\n\t\t\t\t// @ts-expect-error See above comment on commitQueue\n\t\t\t\tcb.call(c);\n\t\t\t});\n\t\t} catch (e) {\n\t\t\toptions._catchError(e, c._vnode);\n\t\t}\n\t});\n}\n\n/**\n * Diff two virtual nodes representing DOM element\n * @param {PreactElement} dom The DOM element representing the virtual nodes\n * being diffed\n * @param {VNode} newVNode The new virtual node\n * @param {VNode} oldVNode The old virtual node\n * @param {object} globalContext The current context object\n * @param {string} namespace Current namespace of the DOM node (HTML, SVG, or MathML)\n * @param {Array} excessDomChildren\n * @param {Array} commitQueue List of components which have callbacks\n * to invoke in commitRoot\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @param {any[]} refQueue an array of elements needed to invoke refs\n * @returns {PreactElement}\n */\nfunction diffElementNodes(\n\tdom,\n\tnewVNode,\n\toldVNode,\n\tglobalContext,\n\tnamespace,\n\texcessDomChildren,\n\tcommitQueue,\n\tisHydrating,\n\trefQueue\n) {\n\tlet oldProps = oldVNode.props;\n\tlet newProps = newVNode.props;\n\tlet nodeType = /** @type {string} */ (newVNode.type);\n\t/** @type {any} */\n\tlet i;\n\t/** @type {{ __html?: string }} */\n\tlet newHtml;\n\t/** @type {{ __html?: string }} */\n\tlet oldHtml;\n\t/** @type {ComponentChildren} */\n\tlet newChildren;\n\tlet value;\n\tlet inputValue;\n\tlet checked;\n\n\t// Tracks entering and exiting namespaces when descending through the tree.\n\tif (nodeType === 'svg') namespace = 'http://www.w3.org/2000/svg';\n\telse if (nodeType === 'math')\n\t\tnamespace = 'http://www.w3.org/1998/Math/MathML';\n\telse if (!namespace) namespace = 'http://www.w3.org/1999/xhtml';\n\n\tif (excessDomChildren != null) {\n\t\tfor (i = 0; i < excessDomChildren.length; i++) {\n\t\t\tvalue = excessDomChildren[i];\n\n\t\t\t// if newVNode matches an element in excessDomChildren or the `dom`\n\t\t\t// argument matches an element in excessDomChildren, remove it from\n\t\t\t// excessDomChildren so it isn't later removed in diffChildren\n\t\t\tif (\n\t\t\t\tvalue &&\n\t\t\t\t'setAttribute' in value === !!nodeType &&\n\t\t\t\t(nodeType ? value.localName === nodeType : value.nodeType === 3)\n\t\t\t) {\n\t\t\t\tdom = value;\n\t\t\t\texcessDomChildren[i] = null;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (dom == null) {\n\t\tif (nodeType === null) {\n\t\t\treturn document.createTextNode(newProps);\n\t\t}\n\n\t\tdom = document.createElementNS(\n\t\t\tnamespace,\n\t\t\tnodeType,\n\t\t\tnewProps.is && newProps\n\t\t);\n\n\t\t// we created a new parent, so none of the previously attached children can be reused:\n\t\texcessDomChildren = null;\n\t\t// we are creating a new node, so we can assume this is a new subtree (in\n\t\t// case we are hydrating), this deopts the hydrate\n\t\tisHydrating = false;\n\t}\n\n\tif (nodeType === null) {\n\t\t// During hydration, we still have to split merged text from SSR'd HTML.\n\t\tif (oldProps !== newProps && (!isHydrating || dom.data !== newProps)) {\n\t\t\tdom.data = newProps;\n\t\t}\n\t} else {\n\t\t// If excessDomChildren was not null, repopulate it with the current element's children:\n\t\texcessDomChildren = excessDomChildren && slice.call(dom.childNodes);\n\n\t\toldProps = oldVNode.props || EMPTY_OBJ;\n\n\t\t// If we are in a situation where we are not hydrating but are using\n\t\t// existing DOM (e.g. replaceNode) we should read the existing DOM\n\t\t// attributes to diff them\n\t\tif (!isHydrating && excessDomChildren != null) {\n\t\t\toldProps = {};\n\t\t\tfor (i = 0; i < dom.attributes.length; i++) {\n\t\t\t\tvalue = dom.attributes[i];\n\t\t\t\toldProps[value.name] = value.value;\n\t\t\t}\n\t\t}\n\n\t\tfor (i in oldProps) {\n\t\t\tvalue = oldProps[i];\n\t\t\tif (i == 'children') {\n\t\t\t} else if (i == 'dangerouslySetInnerHTML') {\n\t\t\t\toldHtml = value;\n\t\t\t} else if (i !== 'key' && !(i in newProps)) {\n\t\t\t\tif (\n\t\t\t\t\t(i == 'value' && 'defaultValue' in newProps) ||\n\t\t\t\t\t(i == 'checked' && 'defaultChecked' in newProps)\n\t\t\t\t) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tsetProperty(dom, i, null, value, namespace);\n\t\t\t}\n\t\t}\n\n\t\t// During hydration, props are not diffed at all (including dangerouslySetInnerHTML)\n\t\t// @TODO we should warn in debug mode when props don't match here.\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\tinputValue = value;\n\t\t\t} else if (i == 'checked') {\n\t\t\t\tchecked = value;\n\t\t\t} else if (\n\t\t\t\ti !== 'key' &&\n\t\t\t\t(!isHydrating || typeof value == 'function') &&\n\t\t\t\toldProps[i] !== value\n\t\t\t) {\n\t\t\t\tsetProperty(dom, i, value, oldProps[i], namespace);\n\t\t\t}\n\t\t}\n\n\t\t// If the new vnode didn't have dangerouslySetInnerHTML, diff its children\n\t\tif (newHtml) {\n\t\t\t// Avoid re-applying the same '__html' if it did not changed between re-render\n\t\t\tif (\n\t\t\t\t!isHydrating &&\n\t\t\t\t(!oldHtml ||\n\t\t\t\t\t(newHtml.__html !== oldHtml.__html &&\n\t\t\t\t\t\tnewHtml.__html !== dom.innerHTML))\n\t\t\t) {\n\t\t\t\tdom.innerHTML = newHtml.__html;\n\t\t\t}\n\n\t\t\tnewVNode._children = [];\n\t\t} else {\n\t\t\tif (oldHtml) dom.innerHTML = '';\n\n\t\t\tdiffChildren(\n\t\t\t\tdom,\n\t\t\t\tisArray(newChildren) ? newChildren : [newChildren],\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tnodeType === 'foreignObject'\n\t\t\t\t\t? 'http://www.w3.org/1999/xhtml'\n\t\t\t\t\t: namespace,\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\texcessDomChildren\n\t\t\t\t\t? excessDomChildren[0]\n\t\t\t\t\t: oldVNode._children && getDomSibling(oldVNode, 0),\n\t\t\t\tisHydrating,\n\t\t\t\trefQueue\n\t\t\t);\n\n\t\t\t// Remove children that are not part of any vnode.\n\t\t\tif (excessDomChildren != null) {\n\t\t\t\tfor (i = excessDomChildren.length; i--; ) {\n\t\t\t\t\tif (excessDomChildren[i] != null) removeNode(excessDomChildren[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// As above, don't diff props during hydration\n\t\tif (!isHydrating) {\n\t\t\ti = 'value';\n\t\t\tif (\n\t\t\t\tinputValue !== undefined &&\n\t\t\t\t// #2756 For the -element the initial value is 0,\n\t\t\t\t// despite the attribute not being present. When the attribute\n\t\t\t\t// is missing the progress bar is treated as indeterminate.\n\t\t\t\t// To fix that we'll always update it when it is 0 for progress elements\n\t\t\t\t(inputValue !== dom[i] ||\n\t\t\t\t\t(nodeType === 'progress' && !inputValue) ||\n\t\t\t\t\t// This is only for IE 11 to fix \n\tif (\n\t\ttype == 'select' &&\n\t\tnormalizedProps.multiple &&\n\t\tArray.isArray(normalizedProps.value)\n\t) {\n\t\t// forEach() always returns undefined, which we abuse here to unset the value prop.\n\t\tnormalizedProps.value = toChildArray(props.children).forEach(child => {\n\t\t\tchild.props.selected =\n\t\t\t\tnormalizedProps.value.indexOf(child.props.value) != -1;\n\t\t});\n\t}\n\n\t// Adding support for defaultValue in select tag\n\tif (type == 'select' && normalizedProps.defaultValue != null) {\n\t\tnormalizedProps.value = toChildArray(props.children).forEach(child => {\n\t\t\tif (normalizedProps.multiple) {\n\t\t\t\tchild.props.selected =\n\t\t\t\t\tnormalizedProps.defaultValue.indexOf(child.props.value) != -1;\n\t\t\t} else {\n\t\t\t\tchild.props.selected =\n\t\t\t\t\tnormalizedProps.defaultValue == child.props.value;\n\t\t\t}\n\t\t});\n\t}\n\n\tif (props.class && !props.className) {\n\t\tnormalizedProps.class = props.class;\n\t\tObject.defineProperty(\n\t\t\tnormalizedProps,\n\t\t\t'className',\n\t\t\tclassNameDescriptorNonEnumberable\n\t\t);\n\t} else if (props.className && !props.class) {\n\t\tnormalizedProps.class = normalizedProps.className = props.className;\n\t} else if (props.class && props.className) {\n\t\tnormalizedProps.class = normalizedProps.className = props.className;\n\t}\n\n\tvnode.props = normalizedProps;\n}\n\nlet oldVNodeHook = options.vnode;\noptions.vnode = vnode => {\n\t// only normalize props on Element nodes\n\tif (typeof vnode.type === 'string') {\n\t\thandleDomVNode(vnode);\n\t}\n\n\tvnode.$$typeof = REACT_ELEMENT_TYPE;\n\n\tif (oldVNodeHook) oldVNodeHook(vnode);\n};\n\n// Only needed for react-relay\nlet currentComponent;\nconst oldBeforeRender = options._render;\noptions._render = function (vnode) {\n\tif (oldBeforeRender) {\n\t\toldBeforeRender(vnode);\n\t}\n\tcurrentComponent = vnode._component;\n};\n\nconst oldDiffed = options.diffed;\n/** @type {(vnode: import('./internal').VNode) => void} */\noptions.diffed = function (vnode) {\n\tif (oldDiffed) {\n\t\toldDiffed(vnode);\n\t}\n\n\tconst props = vnode.props;\n\tconst dom = vnode._dom;\n\n\tif (\n\t\tdom != null &&\n\t\tvnode.type === 'textarea' &&\n\t\t'value' in props &&\n\t\tprops.value !== dom.value\n\t) {\n\t\tdom.value = props.value == null ? '' : props.value;\n\t}\n\n\tcurrentComponent = null;\n};\n\n// This is a very very private internal function for React it\n// is used to sort-of do runtime dependency injection.\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 currentComponent._globalContext[context._id].props.value;\n\t\t\t},\n\t\t\tuseCallback,\n\t\t\tuseContext,\n\t\t\tuseDebugValue,\n\t\t\tuseDeferredValue,\n\t\t\tuseEffect,\n\t\t\tuseId,\n\t\t\tuseImperativeHandle,\n\t\t\tuseInsertionEffect,\n\t\t\tuseLayoutEffect,\n\t\t\tuseMemo,\n\t\t\t// useMutableSource, // experimental-only and replaced by uSES, likely not worth supporting\n\t\t\tuseReducer,\n\t\t\tuseRef,\n\t\t\tuseState,\n\t\t\tuseSyncExternalStore,\n\t\t\tuseTransition\n\t\t}\n\t}\n};\n", "import {\n\tcreateElement,\n\trender as preactRender,\n\tcloneElement as preactCloneElement,\n\tcreateRef,\n\tComponent,\n\tcreateContext,\n\tFragment\n} from 'preact';\nimport {\n\tuseState,\n\tuseId,\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 { createPortal } from './portals';\nimport { is } from './util';\nimport {\n\thydrate,\n\trender,\n\tREACT_ELEMENT_TYPE,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n} from './render';\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 * Check if the passed element is a Fragment node.\n * @param {*} element The element to check\n * @returns {boolean}\n */\nfunction isFragment(element) {\n\treturn isValidElement(element) && element.type === Fragment;\n}\n\n/**\n * Check if the passed element is a Memo node.\n * @param {*} element The element to check\n * @returns {boolean}\n */\nfunction isMemo(element) {\n\treturn (\n\t\t!!element &&\n\t\t!!element.displayName &&\n\t\t(typeof element.displayName === 'string' ||\n\t\t\telement.displayName instanceof String) &&\n\t\telement.displayName.startsWith('Memo(')\n\t);\n}\n\n/**\n * Wrap `cloneElement` to abort if the passed element is not a valid element and apply\n * all vnode normalizations.\n * @param {import('./internal').VNode} element The vnode to clone\n * @param {object} props Props to add when cloning\n * @param {Array} rest Optional component children\n */\nfunction cloneElement(element) {\n\tif (!isValidElement(element)) return element;\n\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\treturn (\n\t\t(component &&\n\t\t\t(component.base || (component.nodeType === 1 && component))) ||\n\t\tnull\n\t);\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 * 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 argument that can be passed to the callback\n * @returns\n */\nconst flushSync = (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\nexport function startTransition(cb) {\n\tcb();\n}\n\nexport function useDeferredValue(val) {\n\treturn val;\n}\n\nexport function useTransition() {\n\treturn [false, startTransition];\n}\n\n// TODO: in theory this should be done after a VNode is diffed as we want to insert\n// styles/... before it attaches\nexport const useInsertionEffect = useLayoutEffect;\n\n// compat to react-is\nexport const isElement = isValidElement;\n\n/**\n * This is taken from https://github.com/facebook/react/blob/main/packages/use-sync-external-store/src/useSyncExternalStoreShimClient.js#L84\n * on a high level this cuts out the warnings, ... and attempts a smaller implementation\n * @typedef {{ _value: any; _getSnapshot: () => any }} Store\n */\nexport function useSyncExternalStore(subscribe, getSnapshot) {\n\tconst value = getSnapshot();\n\n\t/**\n\t * @typedef {{ _instance: Store }} StoreRef\n\t * @type {[StoreRef, (store: StoreRef) => void]}\n\t */\n\tconst [{ _instance }, forceUpdate] = useState({\n\t\t_instance: { _value: value, _getSnapshot: getSnapshot }\n\t});\n\n\tuseLayoutEffect(() => {\n\t\t_instance._value = value;\n\t\t_instance._getSnapshot = getSnapshot;\n\n\t\tif (didSnapshotChange(_instance)) {\n\t\t\tforceUpdate({ _instance });\n\t\t}\n\t}, [subscribe, value, getSnapshot]);\n\n\tuseEffect(() => {\n\t\tif (didSnapshotChange(_instance)) {\n\t\t\tforceUpdate({ _instance });\n\t\t}\n\n\t\treturn subscribe(() => {\n\t\t\tif (didSnapshotChange(_instance)) {\n\t\t\t\tforceUpdate({ _instance });\n\t\t\t}\n\t\t});\n\t}, [subscribe]);\n\n\treturn value;\n}\n\n/** @type {(inst: Store) => boolean} */\nfunction didSnapshotChange(inst) {\n\tconst latestGetSnapshot = inst._getSnapshot;\n\tconst prevValue = inst._value;\n\ttry {\n\t\tconst nextValue = latestGetSnapshot();\n\t\treturn !is(prevValue, nextValue);\n\t} catch (error) {\n\t\treturn true;\n\t}\n}\n\nexport * from 'preact/hooks';\nexport {\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\tisFragment,\n\tisMemo,\n\tfindDOMNode,\n\tComponent,\n\tPureComponent,\n\tmemo,\n\tforwardRef,\n\tflushSync,\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};\n\n// React copies the named exports to the default one.\nexport default {\n\tuseState,\n\tuseId,\n\tuseReducer,\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseInsertionEffect,\n\tuseTransition,\n\tuseDeferredValue,\n\tuseSyncExternalStore,\n\tstartTransition,\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\tisElement,\n\tisFragment,\n\tisMemo,\n\tfindDOMNode,\n\tComponent,\n\tPureComponent,\n\tmemo,\n\tforwardRef,\n\tflushSync,\n\tunstable_batchedUpdates,\n\tStrictMode,\n\tSuspense,\n\tSuspenseList,\n\tlazy,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n};\n", "\uFEFFimport { h, FunctionComponent } from 'preact';\nimport { memo } from 'preact/compat';\nimport { useLocalized } from \"./KPIVisualiser_Context\";\n\nexport const DAYS_TO_MS = 1000 * 60 * 60 * 24;\nexport const MS_TO_DAYS = 1 / DAYS_TO_MS;\nexport const DAY_WIDTH = 128.0;\n\n/** The margin between the top of the document and the top of the grid lines. */\nexport const GRID_MARGIN_TOP = 56.0;\n/** Half of the spacing between KPI entries. */\nexport const ENTRY_PADDING = 6.0;\n/** The height of a KPI entry. */\nexport const ENTRY_HEIGHT = 54.0;\n/** The margin between the top of the document and the top of the first entry. */\nexport const ENTRY_MARGIN_TOP = GRID_MARGIN_TOP + ENTRY_PADDING + 6.0;\n\nexport const LEFT_HEADER_WIDTH = 256.0;\n\nexport const DAY_OF_WEEK_TO_NUM_MAP = {\n \"sunday\": 0,\n \"monday\": 1,\n \"tuesday\": 2,\n \"wednesday\": 3,\n \"thursday\": 4,\n \"friday\": 5,\n \"saturday\": 6,\n}\n\n\nexport function dateToXPos(date: Date | number, zoom: number): number {\n if (typeof date === 'number') {\n date = new Date(date);\n }\n\n const curDate = new Date();\n const dateDiff = date.getTime() - curDate.getTime();\n\n return (DAY_WIDTH * zoom) * (dateDiff * MS_TO_DAYS);\n}\n\nexport function xPosToDate(xPos: number, zoom: number): Date {\n const curDate = new Date();\n const targetDate = (xPos / (DAY_WIDTH * zoom)) * DAYS_TO_MS;\n\n return new Date(curDate.getTime() + targetDate);\n}\n\nexport function dateObjToUtcDate(d: string | number | Date) {\n if (typeof d === \"string\") {\n const dLwr = d.toLowerCase();\n const hasOffset = dLwr.endsWith(\"z\") || /[+-]\\d\\d:?\\d\\d/.test(dLwr);\n\n if (!hasOffset) {\n d += \"z\";\n }\n }\n\n return new Date(d);\n}\n\nexport function utcDateToLocalDate(d: string | number | Date) {\n if (!(d instanceof Date)) {\n d = new Date(d);\n }\n\n return new Date(Date.UTC(d.getFullYear(), d.getMonth(), d.getDate(), d.getHours(), d.getMinutes(), d.getSeconds()));\n}\n\n\nexport function localDateToUtcDate(d: string | number | Date) {\n if (!(d instanceof Date)) {\n d = new Date(d);\n }\n\n return new Date(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds());\n}\n\nexport function entryIndexToYPos(index: number, clamped?: boolean): number {\n const y = index * (ENTRY_HEIGHT + ENTRY_PADDING * 2) - ENTRY_PADDING;\n return clamped ? Math.max(y, 0) : y;\n}\n\nexport function extractTimeFromDate(date: Date) {\n const hours = date.getHours() * 1000 * 60 * 60;\n const minutes = date.getMinutes() * 1000 * 60;\n const seconds = date.getSeconds() * 1000;\n const ms = date.getMilliseconds();\n\n return hours + minutes + seconds + ms;\n}\n\nexport function getKpiStateLabel(startDate: Date, deadlineDate: Date, endDate: Date | null, isPrediction: boolean = false) {\n const finishedEarlyStr = useLocalized(\"lbl:finishedEarly\", \"Finished early\");\n const finishedOnTimeStr = useLocalized(\"lbl:finishedOnTime\", \"Finished on time\");\n const finishedLateStr = useLocalized(\"lbl:finishedLate\", \"Finished late\");\n const predictedStartTimeStr = useLocalized(\"lbl:predictedStartTime\", \"Predicted start time\");\n const inProgressStr = useLocalized(\"lbl:inProgress\", \"In progress\");\n const runningLateStr = useLocalized(\"lbl:runningLate\", \"Running late\");\n\n if (isPrediction) {\n return predictedStartTimeStr;\n }\n\n const now = new Date();\n let label;\n\n if (endDate != null && endDate < now) {\n if (endDate > deadlineDate) {\n label = finishedLateStr;\n } else {\n const dayDiff = Math.abs(endDate.getTime() - deadlineDate.getTime()) * MS_TO_DAYS;\n if (dayDiff > 1.0) {\n label = finishedEarlyStr;\n } else {\n label = finishedOnTimeStr;\n }\n }\n } else {\n //Only show the predicted label if the deadline is after the start date and KPI hasn't started\n if (startDate > now && deadlineDate > startDate) {\n debugger;\n label = predictedStartTimeStr;\n } else {\n label = inProgressStr;\n\n if (deadlineDate < now) {\n label += ` - ${runningLateStr}!`;\n }\n }\n }\n\n return label;\n}\n\nexport const SvgCommonDefs: FunctionComponent = memo(() => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n});\n", "\uFEFFimport { h, Fragment, FunctionComponent } from 'preact';\nimport { memo } from 'preact/compat';\nimport styles from './KPIVisualiser.module.scss';\nimport KpiVisualiserContext, { useLocalized } from './KPIVisualiser_Context';\nimport { dateObjToUtcDate, dateToXPos, DAY_WIDTH, ENTRY_HEIGHT, ENTRY_MARGIN_TOP, ENTRY_PADDING, getKpiStateLabel } from './Utils';\n\ninterface Props {\n entry: KPIRuntime;\n index: Integer;\n zoom: number;\n scrollX: number;\n isSelected: boolean;\n}\n\nexport const KpiVisualiser_Entry: FunctionComponent = memo(({ entry, index, zoom, scrollX, isSelected }) => {\n const contractualDeadlineStr = useLocalized(\"lbl:contractualDeadline\", \"Contractual Deadline\");\n const agreedDeadlineStr = useLocalized(\"lbl:agreedDeadline\", \"Agreed Deadline\");\n const unknownKpiStr = useLocalized(\"lbl:unknownKpi\", \"-- Unknown KPI --\");\n const nonWorkingTooltipStr = useLocalized(\"lbl:nonWorkingTooltip\", \"Job was outside of working hours for {0} days.\");\n const jobFrozenTooltipStr = useLocalized(\"lbl:jobFrozenTooltip\", \"Job was frozen for {0} days.\");\n\n const onClick = () => {\n KpiVisualiserContext.pageReference?.invokeMethodAsync('JS_SelectKPI', entry.id);\n }\n\n const now = new Date();\n let startDate = dateObjToUtcDate(entry.startDate);\n let actualStartDate = dateObjToUtcDate(entry.actualStartDate);\n const endDate = entry.endDate ? dateObjToUtcDate(entry.endDate) : null;\n if (endDate && endDate < startDate) {\n startDate = dateObjToUtcDate(entry.actualStartDate);\n\n if (startDate.getFullYear() < 2000) {\n startDate = new Date(endDate.getTime() - (1000 * 60));\n }\n }\n const deadlineDate = entry.targetDeadlineDate ? dateObjToUtcDate(entry.targetDeadlineDate) : new Date(startDate.getTime() + ((entry.kpiDefinition?.greenThreshold ?? 2) * 1000 * 60 * 60 * 24));\n const agreedDeadlineDate = entry.agreedDeadlineDate ? dateObjToUtcDate(entry.agreedDeadlineDate) : null;\n const frozenWidth = startDate < now ? (entry.frozenDays ?? 0) * (DAY_WIDTH * zoom) : 0;\n\n let titleText = entry.kpiDefinition?.displayName ?? unknownKpiStr;\n\n let x = dateToXPos(startDate, zoom);\n if (entry.isPrediction && startDate < now) {\n x = dateToXPos(now, zoom);\n }\n let y = ENTRY_MARGIN_TOP + index * (ENTRY_HEIGHT + ENTRY_PADDING * 2) - ENTRY_PADDING;\n const barEntryHeight = ENTRY_HEIGHT / 2;\n\n //const isSelected = KPIVisualiserContext.selectedEntry === entry.id;\n\n titleText += `\\n${getKpiStateLabel(startDate, agreedDeadlineDate ?? deadlineDate, endDate, entry.isPrediction)}`;\n\n if (entry.nonWorkingDays && entry.nonWorkingDays > 0) {\n titleText += `\\n${nonWorkingTooltipStr.replace(\"{0}\", entry.nonWorkingDays.toString())}`;\n }\n\n if (entry.frozenDays && entry.frozenDays > 0) {\n titleText += `\\n${jobFrozenTooltipStr.replace(\"{0}\", entry.frozenDays.toString())}`;\n }\n\n const contractualBarY = agreedDeadlineDate ? 0 : ENTRY_HEIGHT / 4.0;\n\n return (\n \n \n\n \n {titleText}\n\n \n\n {agreedDeadlineDate && (\n \n )}\n \n \n );\n});\n\ninterface BarProps {\n blockX: number;\n y: number;\n height: number;\n startDate: Date;\n actualStartDate: Date;\n endDate: Date | null;\n deadlineDate: Date;\n frozenWidth: number;\n label: string;\n zoom: number;\n isPrediction: boolean;\n isAgreedDeadline: boolean;\n}\n\nconst KPIVisualiser_EntryBar: FunctionComponent = memo((props) => {\n const now = new Date();\n\n let stateClass = \"\";\n let width = 0;\n\n let breachBoxLocalX = 0;\n let breachBoxWidth = 0;\n let extendedTailEndpoint = 0;\n let leadingTailStartpoint = 0;\n let agreedDeadlinePreStartDateLocalX = 0;\n let agreedDeadlinePreStartDateBoxWidth = 0;\n let extendedTailStartpointX = 0;\n\n if (!props.isPrediction && props.endDate != null && props.endDate < now) {\n width = Math.abs(dateToXPos(props.endDate, props.zoom) - props.blockX);\n\n if (props.deadlineDate < props.endDate) { // Is it late?\n stateClass = styles.late;\n breachBoxLocalX = dateToXPos(props.deadlineDate, props.zoom) - props.blockX;\n breachBoxWidth = width - breachBoxLocalX;\n } else {\n stateClass = styles.completed;\n\n if (props.deadlineDate > props.endDate) {\n extendedTailEndpoint = dateToXPos(props.deadlineDate, props.zoom) - props.blockX;\n }\n }\n\n } else if ((props.startDate > now && props.deadlineDate >= props.startDate) || props.isPrediction) {\n width = Math.abs(dateToXPos(props.deadlineDate, props.zoom) - props.blockX);\n stateClass = styles.future;\n } else if (props.deadlineDate >= props.startDate) {\n width = Math.abs(dateToXPos(now, props.zoom) - props.blockX);\n extendedTailEndpoint = dateToXPos(props.deadlineDate, props.zoom) - props.blockX;\n\n if (props.deadlineDate < now) {\n stateClass = styles.late;\n }\n }\n\n if (!props.isPrediction) {\n if (props.actualStartDate < props.startDate) {\n leadingTailStartpoint = dateToXPos(props.actualStartDate, props.zoom) - props.blockX;\n }\n\n //Drawing of bars if the agreed deadline is set to finish before the start date\n //Draw the bars from the created date of the KPI to the agreed deadline date\n if (props.isAgreedDeadline && props.deadlineDate < props.startDate) {\n agreedDeadlinePreStartDateLocalX = dateToXPos(props.actualStartDate, props.zoom) - props.blockX;\n\n //Calculation for width of bars if KPI is late and now date is prior to the start date of the KPI\n if (now >= props.deadlineDate && now < props.startDate) {\n agreedDeadlinePreStartDateBoxWidth = Math.abs(agreedDeadlinePreStartDateLocalX) - Math.abs(dateToXPos(props.deadlineDate, props.zoom) - props.blockX);\n breachBoxLocalX = dateToXPos(props.deadlineDate, props.zoom) - props.blockX;\n var nowX = Math.abs(dateToXPos(now, props.zoom) - props.blockX);\n breachBoxWidth = (Math.abs(agreedDeadlinePreStartDateLocalX) - nowX) - agreedDeadlinePreStartDateBoxWidth;\n stateClass = styles.late;\n }\n //Calculation for width of bars if KPI is late and now date is past the start date of the KPI\n else if (now >= props.deadlineDate) {\n agreedDeadlinePreStartDateBoxWidth = Math.abs(agreedDeadlinePreStartDateLocalX) - Math.abs(dateToXPos(props.deadlineDate, props.zoom) - props.blockX);\n breachBoxLocalX = dateToXPos(props.deadlineDate, props.zoom) - props.blockX;\n breachBoxWidth = Math.abs(breachBoxLocalX) + Math.abs(dateToXPos(now, props.zoom) - props.blockX);\n stateClass = styles.late;\n }\n else {\n agreedDeadlinePreStartDateBoxWidth = Math.abs(agreedDeadlinePreStartDateLocalX - (dateToXPos(now, props.zoom) - props.blockX));\n extendedTailStartpointX = dateToXPos(now, props.zoom) - props.blockX;\n extendedTailEndpoint = dateToXPos(props.deadlineDate, props.zoom) - props.blockX;\n }\n }\n }\n\n const typeIconBgWidth = 22;\n const typeIconBgArcSize = 6.0;\n const kpiTypeIconBgPath = `M0,${props.y + 2.0} v${props.height - 4.0} h${-typeIconBgWidth + typeIconBgArcSize} a${typeIconBgArcSize},${typeIconBgArcSize},0,0,1,${-typeIconBgArcSize},${-typeIconBgArcSize} v${-(props.height - 4.0 - typeIconBgArcSize * 2.0)} a${typeIconBgArcSize},${typeIconBgArcSize},0,0,1,${typeIconBgArcSize},${-typeIconBgArcSize} h${typeIconBgWidth - typeIconBgArcSize} z`;\n const kpiTypeIconAgreedDeadlinePreStartDateBgPath = `M${agreedDeadlinePreStartDateLocalX},${props.y + 2.0} v${props.height - 4.0} h${-typeIconBgWidth + typeIconBgArcSize} a${typeIconBgArcSize},${typeIconBgArcSize},0,0,1,${-typeIconBgArcSize},${-typeIconBgArcSize} v${-(props.height - 4.0 - typeIconBgArcSize * 2.0)} a${typeIconBgArcSize},${typeIconBgArcSize},0,0,1,${typeIconBgArcSize},${-typeIconBgArcSize} h${typeIconBgWidth - typeIconBgArcSize} z`;\n\n return (\n \n {agreedDeadlinePreStartDateLocalX !== 0 && (\n \n )}\n\n {/* KPI Type Icon for runtimes that have an agreed deadline before the start date*/}\n {agreedDeadlinePreStartDateLocalX !== 0 && (\n \n {props.label}\n \n \n \n )}\n\n {agreedDeadlinePreStartDateLocalX == 0 && (\n \n {props.label}\n \n \n \n )}\n\n {/* Background box */}\n {agreedDeadlinePreStartDateLocalX == 0 && (\n \n )}\n\n {breachBoxWidth > 0 && (\n \n )}\n\n {leadingTailStartpoint !== 0 && agreedDeadlinePreStartDateLocalX == 0 && (\n <>\n \n \n \n )}\n\n {extendedTailEndpoint > 0 && agreedDeadlinePreStartDateLocalX == 0 && (\n <>\n \n \n \n )}\n\n {extendedTailEndpoint != 0 && agreedDeadlinePreStartDateLocalX != 0 && (\n <>\n \n \n \n )}\n\n {props.frozenWidth > 0 && (\n \n )}\n\n {/* Border outline */}\n {agreedDeadlinePreStartDateLocalX == 0 && (\n \n )}\n\n {/* Border outline */}\n {agreedDeadlinePreStartDateLocalX != 0 && (\n \n )}\n\n {/* Used to catch clicks if the runtime width is too short. */}\n \n \n );\n});", "\uFEFFimport { FunctionComponent, h } from 'preact';\nimport { memo } from 'preact/compat';\nimport styles from './KPIVisualiser.module.scss';\nimport KpiVisualiserContext, { useLocalized } from './KPIVisualiser_Context';\nimport { dateObjToUtcDate, entryIndexToYPos, ENTRY_HEIGHT, ENTRY_MARGIN_TOP, ENTRY_PADDING, getKpiStateLabel, LEFT_HEADER_WIDTH } from './Utils';\n\ninterface Props {\n entry: KPIRuntime;\n index: Integer;\n isSelected: boolean;\n}\n\nexport const KpiVisualiser_Entry_LeftHeader: FunctionComponent = memo(({ entry, index, isSelected }) => {\n const unknownKpiStr = useLocalized(\"lbl:unknownKpi\", \"-- Unknown KPI --\");\n\n const onClick = () => {\n KpiVisualiserContext.pageReference?.invokeMethodAsync('JS_SelectKPI', entry.id);\n }\n\n const y = ENTRY_MARGIN_TOP + entryIndexToYPos(index);\n const box_top = y - ENTRY_PADDING;\n const box_bottom = y + ENTRY_HEIGHT + ENTRY_PADDING;\n const text_top = box_top + 6.0;\n const text_bottom = box_bottom - 6.0;\n\n const startDate = dateObjToUtcDate(entry.startDate);\n const endDate = entry.endDate ? dateObjToUtcDate(entry.endDate) : null;\n const deadlineDate = entry.targetDeadlineDate ? dateObjToUtcDate(entry.targetDeadlineDate) : new Date(startDate.getTime() + ((entry.kpiDefinition?.greenThreshold ?? 2) * 1000 * 60 * 60 * 24));\n const agreedDeadlineDate = entry.agreedDeadlineDate ? dateObjToUtcDate(entry.agreedDeadlineDate) : null;\n\n const displayNameLabel = `${entry.kpiDefinition?.displayName ?? unknownKpiStr}`;\n const stateLabel = getKpiStateLabel(startDate, agreedDeadlineDate ?? deadlineDate, endDate, entry.isPrediction);\n const timespanLabel = `${startDate.toLocaleDateString()} - ${(endDate ?? agreedDeadlineDate ?? deadlineDate).toLocaleDateString()}`;\n const title = `${displayNameLabel} (${entry.kpiDefinition?.internalName ?? unknownKpiStr}) at action ${entry.action}\\n${stateLabel}\\n${timespanLabel}`;\n\n let actionLabel;\n if (entry.endAction && entry.action != entry.endAction) {\n actionLabel = `${entry.action}-${entry.endAction}`;\n } else {\n actionLabel = entry.endAction ?? entry.action;\n }\n\n let displayNameLabelWidth = 0;\n const textLengthMeasurerSvg = document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\n const textLengthMeasurer = document.createElementNS(\"http://www.w3.org/2000/svg\", \"text\");\n if (textLengthMeasurerSvg && textLengthMeasurer && textLengthMeasurer.getComputedTextLength) {\n textLengthMeasurer.textContent = displayNameLabel;\n textLengthMeasurer.setAttribute(\"font-weight\", \"bold\");\n document.body.appendChild(textLengthMeasurerSvg);\n textLengthMeasurerSvg.appendChild(textLengthMeasurer);\n displayNameLabelWidth = textLengthMeasurer.getComputedTextLength();\n textLengthMeasurerSvg.remove();\n }\n\n return (\n \n {title}\n\n \n\n \n \n \n\n \n {displayNameLabel}\n \n\n \n {stateLabel}\n \n\n \n {timespanLabel}\n \n\n \n \n );\n});\n\ninterface ActionWidgetProps {\n label: string;\n centerX: number;\n centerY: number;\n}\n\nconst ActionWidget: FunctionComponent = memo(({ label, centerX, centerY }) => {\n const width = 32.0;\n const height = 18.0;\n\n return (\n \n \n \n {label}\n \n \n );\n});", "\uFEFFimport { h, Fragment, FunctionComponent } from 'preact';\nimport { memo } from 'preact/compat';\nimport { KpiVisualiser } from './KPIVisualiser';\nimport styles from './KPIVisualiser.module.scss';\nimport KpiVisualiserContext, { useLocalized } from './KPIVisualiser_Context';\nimport { dateToXPos, DAYS_TO_MS, extractTimeFromDate, GRID_MARGIN_TOP, localDateToUtcDate, MS_TO_DAYS } from './Utils';\n\ninterface Props {\n startDate: Date;\n endDate: Date;\n zoom: number;\n scrollX: number;\n}\n\nexport const KpiVisualiser_Grid_Lines: FunctionComponent = memo(({ startDate, endDate, zoom, scrollX }) => {\n const startDay = Math.floor(startDate.getTime() * MS_TO_DAYS);\n const endDay = Math.ceil(endDate.getTime() * MS_TO_DAYS);\n const elements: preact.JSX.Element[] = [];\n\n const visualiserHeight = KpiVisualiser.instance?.props.domElement.clientHeight ?? 2000.0;\n const visualiserWidth = KpiVisualiser.instance?.props.domElement.clientWidth ?? 2000.0;\n const leftClipEdge = -scrollX;\n const rightClipEdge = leftClipEdge + visualiserWidth;\n\n for (let i = startDay; i < endDay; ++i) {\n const d = localDateToUtcDate(new Date(i * DAYS_TO_MS));\n const x = dateToXPos(d, zoom);\n const d2 = localDateToUtcDate(new Date((i + 1) * DAYS_TO_MS));\n const x2 = dateToXPos(d2, zoom);\n\n if (x2 < leftClipEdge) {\n // Line is out of range. Skip.\n continue;\n }\n\n if (x > rightClipEdge) {\n // Line and future lines will be out of range. Skip rest.\n break;\n }\n\n let workingHours = KpiVisualiserContext.GetWorkingHoursForDate(d);\n if (workingHours) {\n const startTime = new Date(workingHours.localStartTime);\n const endTime = new Date(workingHours.localEndTime);\n const start = new Date(d.getTime() + extractTimeFromDate(startTime));\n const end = new Date(d.getTime() + extractTimeFromDate(endTime));\n\n const startX = dateToXPos(start, zoom);\n const endX = dateToXPos(end, zoom);\n\n elements.push((\n \n ));\n }\n\n elements.push((\n \n ));\n\n if (zoom >= 1.2) { // Show hour lines\n const showMinorLines = zoom >= 2.0;\n\n for (let j = 1; j < 24; ++j) {\n const hx = x + (x2 - x) * (j / 24.0);\n\n if (!showMinorLines && j % 6 !== 0) {\n continue;\n }\n\n elements.push((\n \n ));\n }\n }\n }\n\n return <>{elements};\n});\n\n\nexport const KpiVisualiser_Grid_Top: FunctionComponent = memo(({ startDate, endDate, zoom, scrollX }) => {\n const nowX = dateToXPos(new Date(), zoom);\n const startDay = Math.floor(startDate.getTime() * MS_TO_DAYS);\n const endDay = Math.ceil(endDate.getTime() * MS_TO_DAYS);\n const elements: preact.JSX.Element[] = [];\n\n const visualiserWidth = KpiVisualiser.instance?.props.domElement.clientWidth ?? 2000.0;\n const leftClipEdge = -scrollX - 32.0;\n const rightClipEdge = leftClipEdge + visualiserWidth + 64.0;\n\n for (let i = startDay; i < endDay; ++i) {\n const d = new Date(i * DAYS_TO_MS);\n const x = dateToXPos(localDateToUtcDate(d), zoom);\n\n if (x < leftClipEdge) {\n // Text is out of range. Skip.\n continue;\n }\n\n if (x > rightClipEdge) {\n // Text and future text will be out of range. Skip rest.\n break;\n }\n\n let y = GRID_MARGIN_TOP - 32.0;\n if (zoom < 0.7) {\n y += 8 * (i % 2 === 0 ? 1 : -1) + 6;\n }\n\n const fontSize = zoom < 0.4 ? \"10pt\" : \"1em\";\n\n elements.push((\n \n {d.toLocaleDateString()}\n \n ));\n }\n\n return (\n <>\n {elements}\n \n {useLocalized(\"lbl:now\", \"Now\")}\n \n \n );\n});", "\uFEFFimport { h, FunctionComponent, ComponentChildren } from 'preact';\nimport { memo } from 'preact/compat';\nimport styles from './KPIVisualiser.module.scss';\nimport { useLocalized } from './KPIVisualiser_Context';\nimport { ENTRY_HEIGHT } from './Utils';\n\ninterface Props {\n hidden: boolean;\n}\n\nexport const KpiVisualiser_Key: FunctionComponent = memo(({ hidden }) => {\n return (\n
\n

{useLocalized(\"lbl:key_header\", \"Key\")}

\n\n \n \n
{useLocalized(\"lbl:key_shapesHeader\", \"Shapes\")}
\n\n \n \n \n \n \n \n \n \n \n\n
{useLocalized(\"lbl:key_coloursHeader\", \"Colours\")}
\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n );\n});\n\nconst Header: FunctionComponent = memo(({ children }) => {\n return (\n \n \n {children}\n \n \n );\n});\n\ninterface RowProps {\n children: ComponentChildren;\n description: any;\n}\n\nconst Row: FunctionComponent = memo(({ children, description }) => {\n return (\n \n \n {children}\n \n \n {description}\n \n \n );\n});\n\ninterface BoxIconProps {\n label: string;\n boxClass?: string;\n}\n\nconst SVG_ICON_EXTERNAL_WIDTH = 158.0;\nconst SVG_ICON_INTERNAL_WIDTH = SVG_ICON_EXTERNAL_WIDTH - 8.0;\nconst SVG_ICON_PADDING = 4.0;\n\nconst BoxIcon: FunctionComponent = memo(({ label, boxClass }) => {\n return (\n \n \n \n \n \n {label}\n \n \n \n );\n});\n\nconst BreachBoxIcon: FunctionComponent = memo(({ label, boxClass }) => {\n return (\n \n \n \n \n {label}\n \n \n \n );\n});\n\nconst FrozenBoxIcon: FunctionComponent = memo(({ label, boxClass }) => {\n return (\n \n \n \n \n {label}\n \n \n \n );\n});\n\ninterface TailIconProps {\n label: string;\n}\n\nconst TailIcon: FunctionComponent = memo(({ label }) => {\n const lineY = ENTRY_HEIGHT / 2.0 + SVG_ICON_PADDING;\n\n return (\n \n \n \n \n {label}\n \n \n );\n});\n\nconst LeadingTailIcon: FunctionComponent = memo(({ label }) => {\n const lineY = ENTRY_HEIGHT / 2.0 + SVG_ICON_PADDING;\n\n return (\n \n \n \n \n {label}\n \n \n );\n});\n", "\uFEFFimport { Fragment, FunctionComponent, h } from 'preact';\nimport { KpiVisualiser } from './KPIVisualiser';\nimport styles from './KPIVisualiser.module.scss';\nimport { dateToXPos, GRID_MARGIN_TOP } from './Utils';\n\ninterface Props {\n zoom: number;\n}\nexport const KpiVisualiser_TrackerLine: FunctionComponent = ({ zoom }) => {\n const nowX = dateToXPos(new Date(), zoom);\n const visualiserHeight = KpiVisualiser.instance?.props.domElement.clientHeight ?? 800.0;\n const markerPadding = 9.0;\n\n return (\n <>\n \n \n \n \n \n );\n}\n", "\uFEFFimport { h, Fragment, Component, render } from 'preact';\nimport styles from './KPIVisualiser.module.scss';\nimport KpiVisualiserContext from './KPIVisualiser_Context';\nimport { KpiVisualiser_Entry } from './KPIVisualiser_Entry';\nimport { KpiVisualiser_Entry_LeftHeader } from './KPIVisualiser_Entry_LeftHeader';\nimport { KpiVisualiser_Grid_Lines, KpiVisualiser_Grid_Top } from './KPIVisualiser_Grid';\nimport { KpiVisualiser_Key } from './KPIVisualiser_Key';\nimport { KpiVisualiser_TrackerLine } from './KPIVisualiser_TrackerLine';\nimport { DAYS_TO_MS, DAY_WIDTH, dateObjToUtcDate, dateToXPos, GRID_MARGIN_TOP, LEFT_HEADER_WIDTH, entryIndexToYPos, ENTRY_PADDING, SvgCommonDefs, DAY_OF_WEEK_TO_NUM_MAP } from './Utils';\n\ninterface Props {\n domElement: KPIVisualiserDOM;\n}\n\ninterface State {\n scrollX: number;\n scrollY: number;\n zoom: number;\n mouseDown: boolean;\n controlsVisible: boolean;\n keyVisible: boolean;\n}\n\nconst INITIAL_SCROLL_OFFSET = DAY_WIDTH * 5.0;\nconst MIN_ZOOM_LEVEL = 0.3;\nconst MAX_ZOOM_LEVEL = 4.0;\nconst REFRESH_DATA_RATE_MS = 60 * 1000;\n\n// A React class to simplify the generation of the SVG\nexport class KpiVisualiser extends Component {\n public static instance: KpiVisualiser;\n private static refreshTimer: any;\n\n public static DotNetInit(pageRef: DotNet.DotNetObject) {\n KpiVisualiserContext.pageReference = pageRef;\n KpiVisualiser.refreshTimer = setInterval(() => {\n if (KpiVisualiserContext.pageReference) {\n console.debug(\"Refreshing KPI definitions\");\n KpiVisualiserContext.pageReference.invokeMethodAsync(\"JS_RefreshKpis\");\n } else {\n clearInterval(KpiVisualiser.refreshTimer);\n }\n }, REFRESH_DATA_RATE_MS);\n }\n\n public static DotNetDispose() {\n KpiVisualiserContext.pageReference = null;\n clearInterval(KpiVisualiser.refreshTimer);\n }\n\n public static SetKpiEntries(newEntries: KPIRuntime[]) {\n KpiVisualiserContext.entries = newEntries;\n }\n\n public static SetWorkingHours(workingHours: (WorkingHour | { dayOfWeek: string })[]) {\n for (const w of workingHours) {\n if (typeof w.dayOfWeek === 'string') {\n w.dayOfWeek = DAY_OF_WEEK_TO_NUM_MAP[w.dayOfWeek.toLowerCase()];\n }\n }\n\n KpiVisualiserContext.workingHours = workingHours as WorkingHour[];\n }\n\n public static SetSelectedEntry(newID: string | null) {\n KpiVisualiserContext.selectedEntry = newID;\n if (KpiVisualiserContext.selectedEntry) {\n console.log(`Selected KPI Runtime with ID '${KpiVisualiserContext.selectedEntry}'`);\n } else {\n console.log(`Deselected KPI Runtime`);\n }\n\n if (KpiVisualiser.instance) {\n // Force a rerender\n KpiVisualiser.instance.setState({});\n }\n }\n\n public static GoToSelectedRuntime() {\n if (KpiVisualiser.instance) {\n KpiVisualiser.instance.goToSelectedRuntime();\n }\n }\n\n public static ReturnToFirstRuntime() {\n if (KpiVisualiser.instance) {\n KpiVisualiser.instance.returnToFirstRuntime();\n }\n }\n\n public static ReturnToCurrentTime() {\n if (KpiVisualiser.instance) {\n KpiVisualiser.instance.returnToCurrentTime();\n }\n }\n\n state = {\n scrollX: INITIAL_SCROLL_OFFSET,\n scrollY: 0,\n zoom: 1.0,\n mouseDown: false,\n controlsVisible: false,\n keyVisible: false,\n } as State;\n\n componentDidMount() {\n KpiVisualiser.instance = this;\n }\n\n goToSelectedRuntime() {\n if (KpiVisualiserContext.entries.length == 0 || !KpiVisualiserContext.selectedEntry) {\n this.returnToCurrentTime();\n return;\n }\n\n let entry: KPIRuntime | null = null;\n let entryIndex = 0;\n for (const e of KpiVisualiserContext.entries) {\n if (e.id === KpiVisualiserContext.selectedEntry) {\n entry = e;\n break;\n }\n\n ++entryIndex;\n if (e.agreedDeadlineDate) {\n ++entryIndex;\n }\n }\n\n if (!entry) {\n this.returnToCurrentTime();\n return;\n }\n\n const startDate = dateObjToUtcDate(entry.startDate);\n const actualStartDate = dateObjToUtcDate(entry.actualStartDate);\n const endDate = entry.endDate ? dateObjToUtcDate(entry.endDate) : startDate;\n\n let targetDate = startDate;\n if (endDate < targetDate) {\n if (actualStartDate.getFullYear() > 2000) {\n targetDate = actualStartDate;\n }\n\n if (endDate < targetDate) {\n targetDate = endDate;\n }\n }\n this.setState({\n scrollX: -dateToXPos(targetDate, this.state.zoom) + (INITIAL_SCROLL_OFFSET * 0.5),\n scrollY: Math.min(Math.max(this.state.scrollY, -entryIndexToYPos(entryIndex, true) + ENTRY_PADDING * 2), 0),\n });\n }\n\n returnToFirstRuntime() {\n if (KpiVisualiserContext.entries.length == 0) {\n this.returnToCurrentTime();\n return;\n }\n\n let targetDate: Date | null = null;\n\n for (const entry of KpiVisualiserContext.entries) {\n const startDate = dateObjToUtcDate(entry.startDate);\n const actualStartDate = dateObjToUtcDate(entry.actualStartDate);\n const endDate = entry.endDate ? dateObjToUtcDate(entry.endDate) : startDate;\n\n if (targetDate == null || startDate < targetDate) {\n targetDate = startDate;\n }\n\n if (endDate < targetDate) {\n if (actualStartDate.getFullYear() > 2000) {\n targetDate = actualStartDate;\n }\n\n if (endDate < targetDate) {\n targetDate = endDate;\n }\n }\n }\n\n this.setState({\n scrollX: -dateToXPos(targetDate ?? new Date(), this.state.zoom) + (INITIAL_SCROLL_OFFSET * 0.5),\n scrollY: 0,\n });\n }\n\n returnToCurrentTime() {\n this.setState({\n scrollX: INITIAL_SCROLL_OFFSET,\n })\n }\n\n deselectSelectedEntry() {\n KpiVisualiserContext.pageReference?.invokeMethodAsync('JS_SelectKPI', null);\n }\n\n mouseDownPoint: { x: number, y: number } = { x: 0, y: 0 };\n\n onMouseDown(e: MouseEvent) {\n this.mouseDownPoint.x = e.clientX;\n this.mouseDownPoint.y = e.clientY;\n\n this.setState({ mouseDown: true });\n }\n\n\n onMouseMove(e: MouseEvent) {\n if (this.state.mouseDown) {\n const newState: State = { ...this.state, controlsVisible: true };\n\n newState.scrollX = this.state.scrollX + (e.clientX - this.mouseDownPoint.x);\n newState.scrollY = Math.min(0, this.state.scrollY + (e.clientY - this.mouseDownPoint.y));\n\n this.mouseDownPoint.x = e.clientX;\n this.mouseDownPoint.y = e.clientY;\n\n this.setState(newState);\n }\n }\n\n onMouseUp(e: MouseEvent) {\n this.setState({ mouseDown: false });\n }\n\n onMouseLeave(e: MouseEvent) {\n this.onMouseUp(e);\n this.setState({ controlsVisible: false });\n }\n\n onMouseWheel(e: WheelEvent) {\n const zoom = Math.max(MIN_ZOOM_LEVEL, Math.min(MAX_ZOOM_LEVEL, this.state.zoom - e.deltaY * 0.001));\n\n this.setState({ zoom });\n e.preventDefault();\n }\n\n render() {\n const nowDate = new Date();\n const now = nowDate.getTime() - (this.state.scrollX / (DAY_WIDTH * this.state.zoom)) * DAYS_TO_MS;\n const dist = Math.ceil(48 * (1 / (this.state.zoom * 5.0))) * DAYS_TO_MS;\n const startDate = new Date(now - dist);\n const endDate = new Date(now + dist * 3);\n\n\n return (\n \n
this.onMouseLeave(e)}>\n this.onMouseDown(e)} onMouseMove={e => this.onMouseMove(e)}\n onMouseUp={e => this.onMouseUp(e)} onWheel={e => this.onMouseWheel(e)}\n >\n \n\n {/* Main content */}\n \n\n \n {KpiVisualiserContext.entries.map((e, i) => (\n \n ))}\n \n\n \n \n\n {/* Left-side runtime list */}\n this.deselectSelectedEntry()} />\n \n\n \n {KpiVisualiserContext.entries.map((e, i) => (\n \n ))}\n \n \n\n \n\n {/* Top bar */}\n \n \n \n\n
\n
\n );\n }\n}\n\nclass ErrorBoundary extends Component {\n state = { error: null }\n\n static getDerivedStateFromError(error) {\n return { error: error.message }\n }\n\n componentDidCatch(error) {\n console.error(error)\n this.setState({ error: error.message })\n }\n\n render() {\n if (this.state.error) {\n return (\n
\n \n \n \n
\n

\n Error\n

\n

\n An error occured within the KPI Visualiser. Please raise a HelpDesk ticket detailing what you were doing when this error occurred and the following error message:\n

\n {this.state.error}\n
\n
\n );\n }\n return this.props.children\n }\n}\n\n// The entire point of this class is to act as a React root\nexport class KPIVisualiserDOM extends HTMLElement {\n constructor() {\n super();\n\n render(, this);\n }\n}\n\ncustomElements.define(\"kpi-visualiser\", KPIVisualiserDOM);\n(window as any).KPIVisualiser = KpiVisualiser;\n", "\uFEFFimport './KPIVisualiser'; // We do this style of import to immediately invoke code within it.\n\n/* istanbul ignore next */\nconsole.log(\"KPI JavaScript loaded\");"], "mappings": "mBACaA,IC2BAC,GCjBPC,ECRFC,GAgGSC,GC+ETC,EAWAC,GAEEC,GA0BAC,GC/LFC,GAkJEC,GACAC,GC3KKC,GNUEC,EAAgC,CAAA,EAChCC,GAAY,CAAA,EACZC,GACZ,oECbYC,GAAUC,MAAMD,QAStB,SAASE,EAAOC,EAAKC,EAAAA,CAE3B,QAASR,KAAKQ,EAAOD,EAAIP,CAAAA,EAAKQ,EAAMR,CAAAA,EACpC,OAA6BO,CAC7B,CAAA,SAQeE,GAAWC,EAAAA,CAC1B,IAAIC,EAAaD,EAAKC,WAClBA,GAAYA,EAAWC,YAAYF,CAAAA,CACvC,CEZM,SAASG,EAAcC,EAAMN,EAAOO,EAAAA,CAC1C,IACCC,EACAC,EACAjB,EAHGkB,EAAkB,CAAA,EAItB,IAAKlB,KAAKQ,EACLR,GAAK,MAAOgB,EAAMR,EAAMR,CAAAA,EACnBA,GAAK,MAAOiB,EAAMT,EAAMR,CAAAA,EAC5BkB,EAAgBlB,CAAAA,EAAKQ,EAAMR,CAAAA,EAUjC,GAPImB,UAAUC,OAAS,IACtBF,EAAgBH,SACfI,UAAUC,OAAS,EAAI/B,GAAMgC,KAAKF,UAAW,CAAA,EAAKJ,GAKjC,OAARD,GAAQ,YAAcA,EAAKQ,cAAgB,KACrD,IAAKtB,KAAKc,EAAKQ,aACVJ,EAAgBlB,CAAAA,IADNsB,SAEbJ,EAAgBlB,CAAAA,EAAKc,EAAKQ,aAAatB,CAAAA,GAK1C,OAAOuB,GAAYT,EAAMI,EAAiBF,EAAKC,EAAK,IAAA,CACpD,CAceM,SAAAA,GAAYT,EAAMN,EAAOQ,EAAKC,EAAKO,EAAAA,CAIlD,IAAMC,EAAQ,CACbX,KAAAA,EACAN,MAAAA,EACAQ,IAAAA,EACAC,IAAAA,EACAS,IAAW,KACXC,G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B,IAAKC,GAAgB,KAAM,GAAK,MAAO,KAAK,MAAM,KAAM,QAASc,GAAK,KAAK,SAAS,CAAE,KAAMA,EAAE,cAAc,aAAc,CAAC,EAAG,EAC5Nc,EAAC,UAAO,KAAK,SAAS,UAAU,kBAAkB,QAAS,IAAM,KAAK,SAAS,CAAE,WAAY,CAAC,KAAK,MAAM,UAAW,CAAC,GAAG,YAExH,CACJ,CACJ,CACJ,CAER,CACJ,EAEMC,GAAN,cAA4BzB,CAAU,CAAtC,kCACI,WAAQ,CAAE,MAAO,IAAK,EAEtB,OAAO,yBAAyBqC,EAAO,CACnC,MAAO,CAAE,MAAOA,EAAM,OAAQ,CAClC,CAEA,kBAAkBA,EAAO,CACrB,QAAQ,MAAMA,CAAK,EACnB,KAAK,SAAS,CAAE,MAAOA,EAAM,OAAQ,CAAC,CAC1C,CAEA,QAAS,CACL,OAAI,KAAK,MAAM,MAEPb,EAAC,OAAI,UAAU,+CAA+C,KAAK,SAC/DA,EAAC,OAAI,MAAM,6BAA6B,MAAM,KAAK,OAAO,KAAK,KAAK,eAAe,QAAQ,aACvFA,EAAC,QAAK,EAAE,yPAAyP,CACrQ,EACAA,EAAC,OAAI,UAAU,QACXA,EAAC,MAAG,UAAU,QAAO,OAErB,EACAA,EAAC,KAAE,UAAU,QAAO,oKAEpB,EACAA,EAAC,YAAM,KAAK,MAAM,KAAM,CAC5B,CACJ,EAGD,KAAK,MAAM,QACtB,CACJ,EAGac,GAAN,cAA+B,WAAY,CAC9C,aAAc,CACV,MAAM,EAENC,GAAOf,EAAC1B,EAAA,CAAc,WAAY,KAAM,EAAI,IAAI,CACpD,CACJ,EAEA,eAAe,OAAO,iBAAkBwC,EAAgB,EACvD,OAAe,cAAgBxC,ECxVhC,QAAQ,IAAI,uBAAuB", "names": ["MODE_HYDRATE", "slice", "options", "vnodeId", "isValidElement", "rerenderQueue", "prevDebounce", "defer", "depthSort", "eventClock", "eventProxy", "eventProxyCapture", "i", "EMPTY_OBJ", "EMPTY_ARR", "IS_NON_DIMENSIONAL", "isArray", "Array", "assign", "obj", "props", "removeNode", "node", "parentNode", "removeChild", "createElement", "type", "children", "key", "ref", "normalizedProps", "arguments", "length", "call", "defaultProps", "createVNode", "original", "vnode", "__k", "__", "__b", "__e", "__d", "__c", "constructor", "__v", "__i", "__u", "Fragment", "props", "children", "BaseComponent", "context", "this", "getDomSibling", "vnode", "childIndex", "__", "sibling", "__k", "length", "__e", "type", "updateParentDomPointers", "i", "child", "__c", "base", "enqueueRender", "c", "__d", "rerenderQueue", "push", "process", "prevDebounce", "options", "debounceRendering", "defer", "renderQueueLength", "component", "newVNode", "oldVNode", "oldDom", "commitQueue", "refQueue", "sort", "depthSort", "shift", "assign", "__v", "diff", "__P", "namespaceURI", "__u", "__i", "commitRoot", "diffChildren", "parentDom", "renderResult", "newParentVNode", "oldParentVNode", "globalContext", "namespace", "excessDomChildren", "isHydrating", "childVNode", "newDom", "firstChildDom", "oldChildren", "EMPTY_ARR", "newChildrenLength", "constructNewChildrenArray", "EMPTY_OBJ", "ref", "applyRef", "isConnected", "insert", "nextSibling", "skewedIndex", "matchingIndex", "oldChildrenLength", "remainingOldChildren", "skew", "constructor", "String", "createVNode", "isArray", "key", "findMatchingIndex", "unmount", "parentVNode", "insertBefore", "nodeType", "toChildArray", "out", "some", "x", "y", "setStyle", "style", "value", "setProperty", "IS_NON_DIMENSIONAL", "test", "dom", "name", "oldValue", "useCapture", "o", "cssText", "replace", "toLowerCase", "slice", "l", "_attached", "eventClock", "addEventListener", "eventProxyCapture", "eventProxy", "removeEventListener", "e", "removeAttribute", "setAttribute", "createEventProxy", "eventHandler", "_dispatched", "event", "tmp", "isNew", "oldProps", "oldState", "snapshot", "clearProcessingException", "newProps", "provider", "componentContext", "renderHook", "count", "newType", "__b", "outer", "contextType", "__E", "prototype", "render", "doRender", "sub", "state", "__n", "__h", "_sb", "__s", "getDerivedStateFromProps", "componentWillMount", "componentDidMount", "componentWillReceiveProps", "shouldComponentUpdate", "forEach", "componentWillUpdate", "componentDidUpdate", "__r", "getChildContext", "getSnapshotBeforeUpdate", "MODE_HYDRATE", "indexOf", "diffElementNodes", "diffed", "root", "cb", "call", "newHtml", "oldHtml", "newChildren", "inputValue", "checked", "localName", "document", "createTextNode", "createElementNS", "is", "data", "childNodes", "attributes", "__html", "innerHTML", "removeNode", "current", "skipRemove", "r", "componentWillUnmount", "replaceNode", "createElement", "firstChild", "slice", "EMPTY_ARR", "options", "__e", "error", "vnode", "oldVNode", "errorInfo", "component", "ctor", "handled", "__", "__c", "constructor", "getDerivedStateFromError", "setState", "__d", "componentDidCatch", "__E", "e", "vnodeId", "isValidElement", "undefined", "BaseComponent", "prototype", "update", "callback", "s", "this", "__s", "state", "assign", "props", "__v", "_sb", "push", "enqueueRender", "forceUpdate", "__h", "render", "Fragment", "rerenderQueue", "defer", "Promise", "then", "bind", "resolve", "setTimeout", "depthSort", "a", "b", "__b", "process", "__r", "eventClock", "eventProxy", "createEventProxy", "eventProxyCapture", "i", "classes", "KPIVisualiser_module_default", "classes", "currentIndex", "currentComponent", "previousComponent", "prevRaf", "currentHook", "afterPaintEffects", "EMPTY", "options", "_options", "oldBeforeDiff", "__b", "oldBeforeRender", "__r", "oldAfterDiff", "diffed", "oldCommit", "__c", "oldBeforeUnmount", "unmount", "oldRoot", "__", "getHookState", "index", "type", "__h", "hooks", "__H", "length", "push", "__V", "useState", "initialState", "useReducer", "invokeOrReturn", "reducer", "init", "hookState", "_reducer", "action", "currentValue", "__N", "nextValue", "setState", "_hasScuFromHooks", "updateHookState", "p", "s", "c", "stateHooks", "filter", "x", "every", "prevScu", "call", "this", "shouldUpdate", "forEach", "hookItem", "props", "shouldComponentUpdate", "prevCWU", "componentWillUpdate", "__e", "tmp", "useEffect", "callback", "args", "state", "argsChanged", "_pendingArgs", "flushAfterPaintEffects", "component", "afterPaintEffects", "shift", "__P", "__H", "__h", "forEach", "invokeCleanup", "invokeEffect", "e", "options", "__e", "__v", "__b", "vnode", "currentComponent", "oldBeforeDiff", "parentDom", "__k", "__m", "oldRoot", "__r", "oldBeforeRender", "currentIndex", "hooks", "__c", "previousComponent", "__", "hookItem", "__N", "__V", "EMPTY", "_pendingArgs", "diffed", "oldAfterDiff", "c", "length", "push", "prevRaf", "requestAnimationFrame", "afterNextFrame", "commitQueue", "some", "filter", "cb", "oldCommit", "unmount", "oldBeforeUnmount", "hasErrored", "s", "HAS_RAF", "callback", "raf", "done", "clearTimeout", "timeout", "cancelAnimationFrame", "setTimeout", "hook", "comp", "cleanup", "argsChanged", "oldArgs", "newArgs", "arg", "index", "invokeOrReturn", "f", "_KpiVisualiserContext", "key", "date", "dayNum", "wh", "KpiVisualiserContext", "useLocalized", "localizationKey", "defStr", "str", "setStr", "p", "_", "s", "assign", "obj", "props", "i", "shallowDiffers", "a", "b", "PureComponent", "p", "c", "this", "context", "memo", "comparer", "shouldUpdate", "nextProps", "ref", "updateRef", "call", "current", "Memoed", "shouldComponentUpdate", "createElement", "displayName", "name", "prototype", "isReactComponent", "Component", "isPureReactComponent", "state", "oldDiffHook", "options", "__b", "vnode", "type", "__f", "REACT_FORWARD_SYMBOL", "Symbol", "for", "oldCatchError", "options", "error", "newVNode", "oldVNode", "errorInfo", "then", "component", "vnode", "__", "__c", "__e", "__k", "oldUnmount", "unmount", "detachedClone", "detachedParent", "parentDom", "__H", "forEach", "effect", "assign", "__P", "map", "child", "removeOriginal", "originalParent", "__v", "appendChild", "Suspense", "this", "__u", "_suspenders", "__b", "suspended", "__a", "SuspenseList", "this", "_next", "_map", "options", "unmount", "vnode", "component", "__c", "__R", "__u", "type", "oldUnmount", "Suspense", "prototype", "Component", "promise", "suspendingVNode", "suspendingComponent", "c", "_suspenders", "push", "resolve", "suspended", "__v", "resolved", "onResolved", "onSuspensionComplete", "state", "__a", "suspendedVNode", "__k", "removeOriginal", "__P", "__O", "setState", "pop", "forceUpdate", "then", "componentWillUnmount", "render", "props", "detachedParent", "document", "createElement", "detachedComponent", "detachedClone", "__b", "fallback", "Fragment", "children", "list", "child", "node", "delete", "revealOrder", "size", "length", "SuspenseList", "prototype", "Component", "__a", "child", "list", "this", "delegated", "suspended", "__v", "node", "_map", "get", "unsuspend", "wrappedUnsuspend", "props", "revealOrder", "push", "resolve", "render", "_next", "Map", "children", "toChildArray", "reverse", "i", "length", "set", "componentDidUpdate", "componentDidMount", "_this", "forEach", "REACT_ELEMENT_TYPE", "Symbol", "for", "CAMEL_PROPS", "ON_ANI", "CAMEL_REPLACE", "IS_DOM", "document", "onChangeInputType", "type", "test", "Component", "prototype", "isReactComponent", "forEach", "key", "Object", "defineProperty", "configurable", "get", "this", "set", "v", "writable", "value", "oldEventHook", "options", "event", "empty", "isPropagationStopped", "cancelBubble", "isDefaultPrevented", "defaultPrevented", "e", "persist", "nativeEvent", "currentComponent", "classNameDescriptorNonEnumberable", "enumerable", "class", "oldVNodeHook", "vnode", "type", "props", "normalizedProps", "i", "IS_DOM", "lowerCased", "toLowerCase", "onChangeInputType", "ON_ANI", "test", "indexOf", "CAMEL_PROPS", "replace", "CAMEL_REPLACE", "multiple", "Array", "isArray", "toChildArray", "children", "child", "selected", "defaultValue", "className", "$$typeof", "REACT_ELEMENT_TYPE", "oldBeforeRender", "__r", "__c", "oldDiffed", "diffed", "dom", "__e", "DAYS_TO_MS", "MS_TO_DAYS", "DAY_WIDTH", "GRID_MARGIN_TOP", "ENTRY_PADDING", "ENTRY_HEIGHT", "ENTRY_MARGIN_TOP", "LEFT_HEADER_WIDTH", "DAY_OF_WEEK_TO_NUM_MAP", "dateToXPos", "date", "zoom", "curDate", "dateDiff", "dateObjToUtcDate", "d", "dLwr", "localDateToUtcDate", "d", "entryIndexToYPos", "index", "clamped", "y", "ENTRY_HEIGHT", "ENTRY_PADDING", "extractTimeFromDate", "date", "hours", "minutes", "seconds", "ms", "getKpiStateLabel", "startDate", "deadlineDate", "endDate", "isPrediction", "finishedEarlyStr", "useLocalized", "finishedOnTimeStr", "finishedLateStr", "predictedStartTimeStr", "inProgressStr", "runningLateStr", "now", "label", "MS_TO_DAYS", "SvgCommonDefs", "x", "_", "KpiVisualiser_Entry", "x", "entry", "index", "zoom", "scrollX", "isSelected", "contractualDeadlineStr", "useLocalized", "agreedDeadlineStr", "unknownKpiStr", "nonWorkingTooltipStr", "jobFrozenTooltipStr", "onClick", "KpiVisualiserContext", "now", "startDate", "dateObjToUtcDate", "actualStartDate", "endDate", "deadlineDate", "agreedDeadlineDate", "frozenWidth", "DAY_WIDTH", "titleText", "dateToXPos", "y", "ENTRY_MARGIN_TOP", "ENTRY_HEIGHT", "ENTRY_PADDING", "barEntryHeight", "getKpiStateLabel", "contractualBarY", "_", "KPIVisualiser_module_default", "KPIVisualiser_EntryBar", "props", "stateClass", "width", "breachBoxLocalX", "breachBoxWidth", "extendedTailEndpoint", "leadingTailStartpoint", "agreedDeadlinePreStartDateLocalX", "agreedDeadlinePreStartDateBoxWidth", "extendedTailStartpointX", "nowX", "typeIconBgWidth", "typeIconBgArcSize", "kpiTypeIconBgPath", "kpiTypeIconAgreedDeadlinePreStartDateBgPath", "k", "KpiVisualiser_Entry_LeftHeader", "x", "entry", "index", "isSelected", "unknownKpiStr", "useLocalized", "onClick", "KpiVisualiserContext", "y", "ENTRY_MARGIN_TOP", "entryIndexToYPos", "box_top", "ENTRY_PADDING", "box_bottom", "ENTRY_HEIGHT", "text_top", "text_bottom", "startDate", "dateObjToUtcDate", "endDate", "deadlineDate", "agreedDeadlineDate", "displayNameLabel", "stateLabel", "getKpiStateLabel", "timespanLabel", "title", "actionLabel", "displayNameLabelWidth", "textLengthMeasurerSvg", "textLengthMeasurer", "_", "KPIVisualiser_module_default", "LEFT_HEADER_WIDTH", "ActionWidget", "label", "centerX", "centerY", "KpiVisualiser_Grid_Lines", "x", "startDate", "endDate", "zoom", "scrollX", "startDay", "MS_TO_DAYS", "endDay", "elements", "visualiserHeight", "KpiVisualiser", "visualiserWidth", "leftClipEdge", "rightClipEdge", "i", "d", "localDateToUtcDate", "DAYS_TO_MS", "dateToXPos", "d2", "x2", "workingHours", "KpiVisualiserContext", "startTime", "endTime", "start", "extractTimeFromDate", "end", "startX", "endX", "_", "GRID_MARGIN_TOP", "KPIVisualiser_module_default", "showMinorLines", "j", "hx", "k", "KpiVisualiser_Grid_Top", "nowX", "fontSize", "useLocalized", "KpiVisualiser_Key", "x", "hidden", "_", "KPIVisualiser_module_default", "useLocalized", "Header", "Row", "BoxIcon", "TailIcon", "LeadingTailIcon", "BreachBoxIcon", "FrozenBoxIcon", "children", "description", "SVG_ICON_EXTERNAL_WIDTH", "SVG_ICON_INTERNAL_WIDTH", "SVG_ICON_PADDING", "label", "boxClass", "ENTRY_HEIGHT", "lineY", "KpiVisualiser_TrackerLine", "zoom", "nowX", "dateToXPos", "visualiserHeight", "KpiVisualiser", "markerPadding", "_", "k", "KPIVisualiser_module_default", "GRID_MARGIN_TOP", "INITIAL_SCROLL_OFFSET", "DAY_WIDTH", "MIN_ZOOM_LEVEL", "MAX_ZOOM_LEVEL", "REFRESH_DATA_RATE_MS", "KpiVisualiser", "_KpiVisualiser", "b", "pageRef", "KpiVisualiserContext", "newEntries", "workingHours", "w", "DAY_OF_WEEK_TO_NUM_MAP", "newID", "entry", "entryIndex", "e", "startDate", "dateObjToUtcDate", "actualStartDate", "endDate", "targetDate", "dateToXPos", "entryIndexToYPos", "ENTRY_PADDING", "newState", "zoom", "now", "DAYS_TO_MS", "dist", "_", "ErrorBoundary", "KPIVisualiser_module_default", "SvgCommonDefs", "KpiVisualiser_Grid_Lines", "i", "KpiVisualiser_Entry", "KpiVisualiser_TrackerLine", "LEFT_HEADER_WIDTH", "KpiVisualiser_Entry_LeftHeader", "GRID_MARGIN_TOP", "KpiVisualiser_Grid_Top", "KpiVisualiser_Key", "error", "KPIVisualiserDOM", "B"] }