From 2caba63b5d0fb648058196166d9bd3666c33f6bf Mon Sep 17 00:00:00 2001 From: dntzhang Date: Mon, 28 Oct 2019 11:30:34 +0800 Subject: [PATCH] publish(omi): v6.15.7, fix event binding testing of custom elements everywhere project --- packages/omi/dist/omi.dev.js | 7 ++++--- packages/omi/dist/omi.dev.js.map | 2 +- packages/omi/dist/omi.esm.js | 7 ++++--- packages/omi/dist/omi.esm.js.map | 2 +- packages/omi/dist/omi.js | 5 +++-- packages/omi/dist/omi.js.map | 2 +- packages/omi/dist/omi.min.js | 2 +- packages/omi/dist/omi.min.js.map | 2 +- packages/omi/package.json | 2 +- packages/omi/src/dom/index.js | 3 ++- packages/omi/src/omi.js | 2 +- 11 files changed, 20 insertions(+), 16 deletions(-) diff --git a/packages/omi/dist/omi.dev.js b/packages/omi/dist/omi.dev.js index a0172f7c85..62a0a916de 100644 --- a/packages/omi/dist/omi.dev.js +++ b/packages/omi/dist/omi.dev.js @@ -1,5 +1,5 @@ /** - * omi v6.15.6 https://tencent.github.io/omi/ + * omi v6.15.7 https://tencent.github.io/omi/ * Omi === Preact + Scoped CSS + Store System + Native Support in 3kb javascript. * By dntzhang https://github.com/dntzhang * Github: https://github.com/Tencent/omi @@ -390,7 +390,8 @@ if (value) node.innerHTML = value.__html || ''; } else if (name[0] == 'o' && name[1] == 'n') { var useCapture = name !== (name = name.replace(/Capture$/, '')); - name = name.toLowerCase().substring(2); + var nameLower = name.toLowerCase(); + name = (nameLower in node ? nameLower : name).slice(2); if (value) { if (!old) { node.addEventListener(name, eventProxy$1, useCapture); @@ -1797,7 +1798,7 @@ options.root.Omi = omi; options.root.omi = omi; - options.root.Omi.version = '6.15.6'; + options.root.Omi.version = '6.15.7'; if (typeof module != 'undefined') module.exports = omi;else self.Omi = omi; }()); diff --git a/packages/omi/dist/omi.dev.js.map b/packages/omi/dist/omi.dev.js.map index 6931dfe33a..21592108a5 100644 --- a/packages/omi/dist/omi.dev.js.map +++ b/packages/omi/dist/omi.dev.js.map @@ -1 +1 @@ -{"version":3,"file":"omi.dev.js","sources":["../src/vnode.js","../src/options.js","../src/h.js","../src/util.js","../src/constants.js","../src/vdom/index.js","../src/extend.js","../src/dom/index.js","../src/vdom/diff.js","../src/we-element.js","../src/proxy.js","../src/render.js","../src/define.js","../src/tag.js","../src/clone-element.js","../src/get-host.js","../src/rpx.js","../src/class.js","../src/o.js","../node_modules/htm/dist/htm.mjs","../src/omi.js","../src/omi.js"],"sourcesContent":["/** Virtual DOM Node */\nexport function VNode() {}\n","function getGlobal() {\n if (\n typeof global !== 'object' ||\n !global ||\n global.Math !== Math ||\n global.Array !== Array\n ) {\n return (\n self ||\n window ||\n global ||\n (function() {\n return this\n })()\n )\n }\n return global\n}\n\n/** Global options\n *\t@public\n *\t@namespace options {Object}\n */\nexport default {\n store: null,\n root: getGlobal(),\n\tmapping: {},\n\tisMultiStore: false\n}\n","import { VNode } from './vnode'\nimport options from './options'\n\nconst stack = []\n\nexport function h(nodeName, attributes) {\n let children = [],\n lastSimple,\n child,\n simple,\n i\n for (i = arguments.length; i-- > 2; ) {\n stack.push(arguments[i])\n }\n if (attributes && attributes.children != null) {\n if (!stack.length) stack.push(attributes.children)\n delete attributes.children\n }\n while (stack.length) {\n if ((child = stack.pop()) && child.pop !== undefined) {\n for (i = child.length; i--; ) stack.push(child[i])\n } else {\n if (typeof child === 'boolean') child = null\n\n if ((simple = typeof nodeName !== 'function')) {\n if (child == null) child = ''\n else if (typeof child === 'number') child = String(child)\n else if (typeof child !== 'string') simple = false\n }\n\n if (simple && lastSimple) {\n children[children.length - 1] += child\n } else if (children.length === 0) {\n children = [child]\n } else {\n children.push(child)\n }\n\n lastSimple = simple\n }\n }\n\n let p = new VNode()\n p.nodeName = nodeName\n p.children = children\n p.attributes = attributes == null ? undefined : attributes\n p.key = attributes == null ? undefined : attributes.key\n\n // if a \"vnode hook\" is defined, pass every created VNode to it\n if (options.vnode !== undefined) options.vnode(p)\n\n return p\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n/**\n * This shim allows elements written in, or compiled to, ES5 to work on native\n * implementations of Custom Elements v1. It sets new.target to the value of\n * this.constructor so that the native HTMLElement constructor can access the\n * current under-construction element's definition.\n */\n; (function () {\n if (\n // No Reflect, no classes, no need for shim because native custom elements\n // require ES2015 classes or Reflect.\n window.Reflect === undefined ||\n window.customElements === undefined ||\n // The webcomponentsjs custom elements polyfill doesn't require\n // ES2015-compatible construction (`super()` or `Reflect.construct`).\n window.customElements.hasOwnProperty('polyfillWrapFlushCallback')\n ) {\n return\n }\n const BuiltInHTMLElement = HTMLElement\n window.HTMLElement = function HTMLElement() {\n return Reflect.construct(BuiltInHTMLElement, [], this.constructor)\n }\n HTMLElement.prototype = BuiltInHTMLElement.prototype\n HTMLElement.prototype.constructor = HTMLElement\n Object.setPrototypeOf(HTMLElement, BuiltInHTMLElement)\n})()\n\nexport function cssToDom(css) {\n const node = document.createElement('style')\n node.textContent = css\n return node\n}\n\nexport function camelCase(str) {\n return str.replace(/-(\\w)/g, ($, $1) => {\n return $1.toUpperCase()\n })\n}\n\nexport function Fragment(props) {\n return props.children\n}\n\nexport function extend(obj, props) {\n for (let i in props) obj[i] = props[i]\n return obj\n}\n\n/** Invoke or update a ref, depending on whether it is a function or object ref.\n * @param {object|function} [ref=null]\n * @param {any} [value]\n */\nexport function applyRef(ref, value) {\n if (ref != null) {\n if (typeof ref == 'function') ref(value)\n else ref.current = value\n }\n}\n\n/**\n * Call a function asynchronously, as soon as possible. Makes\n * use of HTML Promise to schedule the callback if available,\n * otherwise falling back to `setTimeout` (mainly for IE<11).\n * @type {(callback: function) => void}\n */\nexport const defer =\n typeof Promise == 'function'\n ? Promise.resolve().then.bind(Promise.resolve())\n : setTimeout\n\nexport function isArray(obj) {\n return Object.prototype.toString.call(obj) === '[object Array]'\n}\n\n\nexport function getUse(data, paths, out, name) {\n const obj = []\n paths.forEach((path, index) => {\n const isPath = typeof path === 'string'\n if (isPath) {\n obj[index] = getTargetByPath(data, path)\n } else {\n const key = Object.keys(path)[0]\n const value = path[key]\n if (typeof value === 'string') {\n obj[index] = getTargetByPath(data, value)\n } else {\n const tempPath = value[0]\n if (typeof tempPath === 'string') {\n const tempVal = getTargetByPath(data, tempPath)\n obj[index] = value[1] ? value[1](tempVal) : tempVal\n } else {\n const args = []\n tempPath.forEach(path =>{\n args.push(getTargetByPath(data, path))\n })\n obj[index] = value[1].apply(null, args)\n }\n }\n obj[key] = obj[index]\n }\n\t})\n\tif(out) out[name] = obj\n return obj\n}\n\nexport function pathToArr(path) {\n\tif(typeof path !== 'string' || !path) return []\n\t// return path.split(/\\.|\\[|\\]/).filter(name => !!name)\n\treturn path.replace(/]/g, '').replace(/\\[/g, '.').split('.')\n}\n\nexport function getTargetByPath(origin, path) {\n const arr = pathToArr(path)\n let current = origin\n for (let i = 0, len = arr.length; i < len; i++) {\n current = current[arr[i]]\n }\n return current\n}\n\nconst hyphenateRE = /\\B([A-Z])/g\nexport function hyphenate(str) {\n return str.replace(hyphenateRE, '-$1').toLowerCase()\n}\n\nexport function getValByPath(path, current) {\n\tconst arr = pathToArr(path)\n\tarr.forEach(prop => {\n\t\tcurrent = current[prop]\n\t})\n\treturn current\n}\n\nexport function getPath(obj, out, name) {\n\tconst result = {}\n\tobj.forEach(item => {\n\t\tif (typeof item === 'string') {\n\t\t\tresult[item] = true\n\t\t} else {\n\t\t\tconst tempPath = item[Object.keys(item)[0]]\n\t\t\tif (typeof tempPath === 'string') {\n\t\t\t\tresult[tempPath] = true\n\t\t\t} else {\n\t\t\t\tif (typeof tempPath[0] === 'string') {\n\t\t\t\t\tresult[tempPath[0]] = true\n\t\t\t\t} else {\n\t\t\t\t\ttempPath[0].forEach(path => (result[path] = true))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\tif(out) out[name] = result\n\treturn result\n}\n\nexport function removeItem(item, arr){\n if(!arr) return\n for (let i = 0, len = arr.length; i < len; i++) {\n if (arr[i] === item) {\n arr.splice(i, 1)\n break\n }\n }\n}","// render modes\n\nexport const NO_RENDER = 0\nexport const SYNC_RENDER = 1\nexport const FORCE_RENDER = 2\nexport const ASYNC_RENDER = 3\n\nexport const ATTR_KEY = 'prevProps'\n\n// DOM properties that should NOT have \"px\" added when numeric\nexport const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i\n","import { extend } from '../util'\nimport options from '../options'\n/**\n * Check if two nodes are equivalent.\n *\n * @param {Node} node\t\t\tDOM Node to compare\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\n * @param {boolean} [hydrating=false]\tIf true, ignores component constructors when comparing.\n * @private\n */\nexport function isSameNodeType(node, vnode, hydrating) {\n if (typeof vnode === 'string' || typeof vnode === 'number') {\n return node.splitText !== undefined\n }\n if (typeof vnode.nodeName === 'string') {\n return !node._componentConstructor && isNamedNode(node, vnode.nodeName)\n } else if (typeof vnode.nodeName === 'function'){\n return options.mapping[node.nodeName.toLowerCase()] === vnode.nodeName\n }\n return hydrating || node._componentConstructor === vnode.nodeName\n}\n\n/**\n * Check if an Element has a given nodeName, case-insensitively.\n *\n * @param {Element} node\tA DOM Element to inspect the name of.\n * @param {String} nodeName\tUnnormalized name to compare against.\n */\nexport function isNamedNode(node, nodeName) {\n return (\n node.normalizedNodeName === nodeName ||\n node.nodeName.toLowerCase() === nodeName.toLowerCase()\n )\n}\n\n/**\n * Reconstruct Component-style `props` from a VNode.\n * Ensures default/fallback values from `defaultProps`:\n * Own-properties of `defaultProps` not present in `vnode.attributes` are added.\n *\n * @param {VNode} vnode\n * @returns {Object} props\n */\nexport function getNodeProps(vnode) {\n let props = extend({}, vnode.attributes)\n props.children = vnode.children\n\n let defaultProps = vnode.nodeName.defaultProps\n if (defaultProps !== undefined) {\n for (let i in defaultProps) {\n if (props[i] === undefined) {\n props[i] = defaultProps[i]\n }\n }\n }\n\n return props\n}\n","import {pathToArr} from './util'\n\nexport const extension = {}\n\nexport function extend(name, handler) {\n\textension['o-' + name] = handler\n}\n\nexport function set(origin, path, value) {\n\tconst arr = pathToArr(path)\n\tlet current = origin\n\tfor (let i = 0, len = arr.length; i < len; i++) {\n\t\t\tif (i === len - 1) {\n\t\t\t\t\tcurrent[arr[i]] = value\n\t\t\t} else {\n\t\t\t\t\tcurrent = current[arr[i]]\n\t\t\t}\n\t}\n}\n\nexport function get(origin, path) {\n\tconst arr = pathToArr(path)\n\tlet current = origin\n\tfor (let i = 0, len = arr.length; i < len; i++) {\n\t\tcurrent = current[arr[i]]\n\t}\n\n\treturn current\n}\n\nfunction eventProxy(e) {\n return this._listeners[e.type](e)\n}\n\nexport function bind(el, type, handler){\n\tel._listeners = el._listeners || {}\n\tel._listeners[type] = handler\n\tel.addEventListener(type, eventProxy)\n}\n\nexport function unbind(el, type){\n\tel.removeEventListener(type, eventProxy)\n}\n","import { IS_NON_DIMENSIONAL } from '../constants'\nimport { applyRef } from '../util'\nimport options from '../options'\nimport { extension } from '../extend'\n\n/**\n * Create an element with the given nodeName.\n * @param {string} nodeName The DOM node to create\n * @param {boolean} [isSvg=false] If `true`, creates an element within the SVG\n * namespace.\n * @returns {Element} The created DOM node\n */\nexport function createNode(nodeName, isSvg) {\n /** @type {Element} */\n let node = isSvg\n ? document.createElementNS('http://www.w3.org/2000/svg', nodeName)\n : document.createElement(nodeName)\n node.normalizedNodeName = nodeName\n return node\n}\n\n/**\n * Remove a child node from its parent if attached.\n * @param {Node} node The node to remove\n */\nexport function removeNode(node) {\n let parentNode = node.parentNode\n if (parentNode) parentNode.removeChild(node)\n}\n\n/**\n * Set a named attribute on the given Node, with special behavior for some names\n * and event handlers. If `value` is `null`, the attribute/handler will be\n * removed.\n * @param {Element} node An element to mutate\n * @param {string} name The name/key to set, such as an event or attribute name\n * @param {*} old The last value that was set for this name/node pair\n * @param {*} value An attribute value, such as a function to be used as an\n * event handler\n * @param {boolean} isSvg Are we currently diffing inside an svg?\n * @private\n */\nexport function setAccessor(node, name, old, value, isSvg, component) {\n if (name === 'className') name = 'class'\n\n if (name[0] == 'o' && name[1] == '-'){\n if(extension[name]){\n extension[name](node, value, component)\n }\n } else if (name === 'key') {\n // ignore\n } else if (name === 'ref') {\n applyRef(old, null)\n applyRef(value, node)\n } else if (name === 'class' && !isSvg) {\n node.className = value || ''\n } else if (name === 'style') {\n if (!value || typeof value === 'string' || typeof old === 'string') {\n node.style.cssText = value || ''\n }\n if (value && typeof value === 'object') {\n if (typeof old !== 'string') {\n for (let i in old) if (!(i in value)) node.style[i] = ''\n }\n for (let i in value) {\n node.style[i] =\n typeof value[i] === 'number' && IS_NON_DIMENSIONAL.test(i) === false\n ? value[i] + 'px'\n : value[i]\n }\n }\n } else if (name === 'dangerouslySetInnerHTML') {\n if (value) node.innerHTML = value.__html || ''\n } else if (name[0] == 'o' && name[1] == 'n') {\n let useCapture = name !== (name = name.replace(/Capture$/, ''))\n name = name.toLowerCase().substring(2)\n if (value) {\n if (!old) {\n node.addEventListener(name, eventProxy, useCapture)\n if (name == 'tap') {\n node.addEventListener('touchstart', touchStart, useCapture)\n node.addEventListener('touchend', touchEnd, useCapture)\n }\n }\n } else {\n node.removeEventListener(name, eventProxy, useCapture)\n if (name == 'tap') {\n node.removeEventListener('touchstart', touchStart, useCapture)\n node.removeEventListener('touchend', touchEnd, useCapture)\n }\n }\n ;(node._listeners || (node._listeners = {}))[name] = value\n } else if (node.nodeName === 'INPUT' && name === 'value'){\n node[name] = value == null ? '' : value\n } else if (name !== 'list' && name !== 'type' && name !== 'css' && !isSvg && name in node && value !== '') { //value !== '' fix for selected, disabled, checked with pure element\n // Attempt to set a DOM property to the given value.\n // IE & FF throw for certain property-value combinations.\n try {\n node[name] = value == null ? '' : value\n } catch (e) {}\n if ((value == null || value === false) && name != 'spellcheck')\n node.pureRemoveAttribute ? node.pureRemoveAttribute(name) : node.removeAttribute(name)\n } else {\n let ns = isSvg && name !== (name = name.replace(/^xlink:?/, ''))\n // spellcheck is treated differently than all other boolean values and\n // should not be removed when the value is `false`. See:\n // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-spellcheck\n if (value == null || value === false) {\n if (ns)\n node.removeAttributeNS(\n 'http://www.w3.org/1999/xlink',\n name.toLowerCase()\n )\n else node.pureRemoveAttribute ? node.pureRemoveAttribute(name) : node.removeAttribute(name)\n } else if (typeof value !== 'function') {\n if (ns) {\n node.setAttributeNS(\n 'http://www.w3.org/1999/xlink',\n name.toLowerCase(),\n value\n )\n } else {\n node.pureSetAttribute ? node.pureSetAttribute(name, value) : node.setAttribute(name, value)\n }\n }\n }\n}\n\n/**\n * Proxy an event to hooked event handlers\n * @param {Event} e The event object from the browser\n * @private\n */\nfunction eventProxy(e) {\n return this._listeners[e.type]((options.event && options.event(e)) || e)\n}\n\nfunction touchStart(e) {\n this.___touchX = e.touches[0].pageX\n this.___touchY = e.touches[0].pageY\n this.___scrollTop = document.body.scrollTop\n}\n\nfunction touchEnd(e) {\n if (\n Math.abs(e.changedTouches[0].pageX - this.___touchX) < 30 &&\n Math.abs(e.changedTouches[0].pageY - this.___touchY) < 30 &&\n Math.abs(document.body.scrollTop - this.___scrollTop) < 30\n ) {\n this.dispatchEvent(new CustomEvent('tap', { detail: e }))\n }\n}\n","import { ATTR_KEY } from '../constants'\nimport { isSameNodeType, isNamedNode } from './index'\nimport { createNode, setAccessor } from '../dom/index'\nimport { camelCase, isArray, Fragment } from '../util'\nimport { removeNode } from '../dom/index'\nimport options from '../options'\n\n/** Queue of components that have been mounted and are awaiting componentDidMount */\nexport const mounts = []\n\n/** Diff recursion count, used to track the end of the diff cycle. */\nexport let diffLevel = 0\n\n/** Global flag indicating if the diff is currently within an SVG */\nlet isSvgMode = false\n\n/** Global flag indicating if the diff is performing hydration */\nlet hydrating = false\n\n/** Apply differences in a given vnode (and it's deep children) to a real DOM Node.\n *\t@param {Element} [dom=null]\t\tA DOM node to mutate into the shape of the `vnode`\n *\t@param {VNode} vnode\t\t\tA VNode (with descendants forming a tree) representing the desired DOM structure\n *\t@returns {Element} dom\t\t\tThe created/mutated element\n *\t@private\n */\nexport function diff(dom, vnode, parent, component, updateSelf) {\n // diffLevel having been 0 here indicates initial entry into the diff (not a subdiff)\n let ret\n if (!diffLevel++) {\n // when first starting the diff, check if we're diffing an SVG or within an SVG\n isSvgMode = parent != null && parent.ownerSVGElement !== undefined\n\n // hydration is indicated by the existing element to be diffed not having a prop cache\n hydrating = dom != null && !(ATTR_KEY in dom)\n }\n if(vnode.nodeName === Fragment){\n vnode = vnode.children\n }\n if (isArray(vnode)) {\n if (parent) {\n const styles = parent.querySelectorAll('style')\n styles.forEach(s => {\n parent.removeChild(s)\n })\n innerDiffNode(parent, vnode, hydrating, component, updateSelf)\n\n for (let i = styles.length - 1; i >= 0; i--) {\n parent.firstChild ? parent.insertBefore(styles[i], parent.firstChild) : parent.appendChild(style[i])\n }\n } else {\n ret = []\n vnode.forEach((item, index) => {\n let ele = idiff(index === 0 ? dom : null, item, component, updateSelf)\n ret.push(ele)\n })\n }\n } else {\n if (isArray(dom)) {\n dom.forEach((one, index) => {\n if (index === 0) {\n ret = idiff(one, vnode, component, updateSelf)\n } else {\n recollectNodeTree(one, false)\n }\n })\n } else {\n ret = idiff(dom, vnode, component, updateSelf)\n }\n // append the element if its a new parent\n if (parent && ret.parentNode !== parent) parent.appendChild(ret)\n }\n\n // diffLevel being reduced to 0 means we're exiting the diff\n if (!--diffLevel) {\n hydrating = false\n // invoke queued componentDidMount lifecycle methods\n }\n\n return ret\n}\n\n/** Internals of `diff()`, separated to allow bypassing diffLevel / mount flushing. */\nfunction idiff(dom, vnode, component, updateSelf) {\n if (dom && vnode && dom.props) {\n dom.props.children = vnode.children\n }\n let out = dom,\n prevSvgMode = isSvgMode\n\n // empty values (null, undefined, booleans) render as empty Text nodes\n if (vnode == null || typeof vnode === 'boolean') vnode = ''\n\n // Fast case: Strings & Numbers create/update Text nodes.\n if (typeof vnode === 'string' || typeof vnode === 'number') {\n // update if it's already a Text node:\n if (\n dom &&\n dom.splitText !== undefined &&\n dom.parentNode &&\n (!dom._component || component)\n ) {\n /* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */\n if (dom.nodeValue != vnode) {\n dom.nodeValue = vnode\n }\n } else {\n // it wasn't a Text node: replace it with one and recycle the old Element\n out = document.createTextNode(vnode)\n if (dom) {\n if (dom.parentNode) dom.parentNode.replaceChild(out, dom)\n recollectNodeTree(dom, true)\n }\n }\n\n out[ATTR_KEY] = true\n\n return out\n }\n\n // If the VNode represents a Component, perform a component diff:\n let vnodeName = vnode.nodeName\n if (typeof vnodeName === 'function') {\n for (let key in options.mapping) {\n if (options.mapping[key] === vnodeName) {\n vnodeName = key\n vnode.nodeName = key\n break\n }\n }\n }\n // Tracks entering and exiting SVG namespace when descending through the tree.\n isSvgMode =\n vnodeName === 'svg'\n ? true\n : vnodeName === 'foreignObject'\n ? false\n : isSvgMode\n\n // If there's no existing element or it's the wrong type, create a new one:\n vnodeName = String(vnodeName)\n if (!dom || !isNamedNode(dom, vnodeName)) {\n out = createNode(vnodeName, isSvgMode)\n\n if (dom) {\n // move children into the replacement node\n while (dom.firstChild) out.appendChild(dom.firstChild)\n\n // if the previous Element was mounted into the DOM, replace it inline\n if (dom.parentNode) dom.parentNode.replaceChild(out, dom)\n\n // recycle the old element (skips non-Element node types)\n recollectNodeTree(dom, true)\n }\n }\n\n let fc = out.firstChild,\n props = out[ATTR_KEY],\n vchildren = vnode.children\n\n if (props == null) {\n props = out[ATTR_KEY] = {}\n for (let a = out.attributes, i = a.length; i--;)\n props[a[i].name] = a[i].value\n }\n\n // Optimization: fast-path for elements containing a single TextNode:\n if (\n !hydrating &&\n vchildren &&\n vchildren.length === 1 &&\n typeof vchildren[0] === 'string' &&\n fc != null &&\n fc.splitText !== undefined &&\n fc.nextSibling == null\n ) {\n if (fc.nodeValue != vchildren[0]) {\n fc.nodeValue = vchildren[0]\n }\n }\n // otherwise, if there are existing or new children, diff them:\n else if ((vchildren && vchildren.length) || fc != null) {\n if (!(out.constructor.is == 'WeElement' && out.constructor.noSlot)) {\n innerDiffNode(\n out,\n vchildren,\n hydrating || props.dangerouslySetInnerHTML != null,\n component,\n updateSelf\n )\n }\n }\n\n // Apply attributes/props from VNode to the DOM Element:\n diffAttributes(out, vnode.attributes, props, component, updateSelf)\n if (out.props) {\n out.props.children = vnode.children\n }\n // restore previous SVG mode: (in case we're exiting an SVG namespace)\n isSvgMode = prevSvgMode\n\n return out\n}\n\n/** Apply child and attribute changes between a VNode and a DOM Node to the DOM.\n *\t@param {Element} dom\t\t\tElement whose children should be compared & mutated\n *\t@param {Array} vchildren\t\tArray of VNodes to compare to `dom.childNodes`\n *\t@param {Boolean} isHydrating\tIf `true`, consumes externally created elements similar to hydration\n */\nfunction innerDiffNode(dom, vchildren, isHydrating, component, updateSelf) {\n let originalChildren = dom.childNodes,\n children = [],\n keyed = {},\n keyedLen = 0,\n min = 0,\n len = originalChildren.length,\n childrenLen = 0,\n vlen = vchildren ? vchildren.length : 0,\n j,\n c,\n f,\n vchild,\n child\n\n // Build up a map of keyed children and an Array of unkeyed children:\n if (len !== 0) {\n for (let i = 0; i < len; i++) {\n let child = originalChildren[i],\n props = child[ATTR_KEY],\n key =\n vlen && props\n ? child._component\n ? child._component.__key\n : props.key\n : null\n if (key != null) {\n keyedLen++\n keyed[key] = child\n } else if (\n props ||\n (child.splitText !== undefined\n ? isHydrating\n ? child.nodeValue.trim()\n : true\n : isHydrating)\n ) {\n children[childrenLen++] = child\n }\n }\n }\n\n if (vlen !== 0) {\n for (let i = 0; i < vlen; i++) {\n vchild = vchildren[i]\n child = null\n\n // attempt to find a node based on key matching\n let key = vchild.key\n if (key != null) {\n if (keyedLen && keyed[key] !== undefined) {\n child = keyed[key]\n keyed[key] = undefined\n keyedLen--\n }\n }\n // attempt to pluck a node of the same type from the existing children\n else if (!child && min < childrenLen) {\n for (j = min; j < childrenLen; j++) {\n if (\n children[j] !== undefined &&\n isSameNodeType((c = children[j]), vchild, isHydrating)\n ) {\n child = c\n children[j] = undefined\n if (j === childrenLen - 1) childrenLen--\n if (j === min) min++\n break\n }\n }\n }\n\n // morph the matched/found/created DOM child to match vchild (deep)\n child = idiff(child, vchild, component, updateSelf)\n\n f = originalChildren[i]\n if (child && child !== dom && child !== f) {\n if (f == null) {\n dom.appendChild(child)\n } else if (child === f.nextSibling) {\n removeNode(f)\n } else {\n dom.insertBefore(child, f)\n }\n }\n }\n }\n\n // remove unused keyed children:\n if (keyedLen) {\n for (let i in keyed)\n if (keyed[i] !== undefined) recollectNodeTree(keyed[i], false)\n }\n\n // remove orphaned unkeyed children:\n while (min <= childrenLen) {\n if ((child = children[childrenLen--]) !== undefined)\n recollectNodeTree(child, false)\n }\n}\n\n/** Recursively recycle (or just unmount) a node and its descendants.\n *\t@param {Node} node\t\t\t\t\t\tDOM node to start unmount/removal from\n *\t@param {Boolean} [unmountOnly=false]\tIf `true`, only triggers unmount lifecycle, skips removal\n */\nexport function recollectNodeTree(node, unmountOnly) {\n // If the node's VNode had a ref function, invoke it with null here.\n // (this is part of the React spec, and smart for unsetting references)\n if (node[ATTR_KEY] != null && node[ATTR_KEY].ref) {\n if (typeof node[ATTR_KEY].ref === 'function') {\n node[ATTR_KEY].ref(null)\n } else if (node[ATTR_KEY].ref.current) {\n node[ATTR_KEY].ref.current = null\n }\n }\n\n if (unmountOnly === false || node[ATTR_KEY] == null) {\n removeNode(node)\n }\n\n removeChildren(node)\n}\n\n/** Recollect/unmount all children.\n *\t- we use .lastChild here because it causes less reflow than .firstChild\n *\t- it's also cheaper than accessing the .childNodes Live NodeList\n */\nexport function removeChildren(node) {\n node = node.lastChild\n while (node) {\n let next = node.previousSibling\n recollectNodeTree(node, true)\n node = next\n }\n}\n\n/** Apply differences in attributes from a VNode to the given DOM Element.\n *\t@param {Element} dom\t\tElement with attributes to diff `attrs` against\n *\t@param {Object} attrs\t\tThe desired end-state key-value attribute pairs\n *\t@param {Object} old\t\t\tCurrent/previous attributes (from previous VNode or element's prop cache)\n */\nfunction diffAttributes(dom, attrs, old, component, updateSelf) {\n let name\n //let update = false\n let isWeElement = dom.update\n let oldClone\n if (dom.receiveProps) {\n oldClone = Object.assign({}, old)\n }\n // remove attributes no longer present on the vnode by setting them to undefined\n for (name in old) {\n if (!(attrs && attrs[name] != null) && old[name] != null) {\n setAccessor(dom, name, old[name], (old[name] = undefined), isSvgMode, component)\n if (isWeElement) {\n delete dom.props[name]\n //update = true\n }\n }\n }\n\n // add new & update changed attributes\n for (name in attrs) {\n if (isWeElement && typeof attrs[name] === 'object' && name !== 'ref') {\n if (name === 'style') {\n setAccessor(dom, name, old[name], (old[name] = attrs[name]), isSvgMode, component)\n }\n let ccName = camelCase(name)\n dom.props[ccName] = old[ccName] = attrs[name]\n //update = true\n } else if (\n name !== 'children' &&\n (!(name in old) ||\n attrs[name] !==\n (name === 'value' || name === 'checked' ? dom[name] : old[name]))\n ) {\n setAccessor(dom, name, old[name], attrs[name], isSvgMode, component)\n if (isWeElement) {\n let ccName = camelCase(name)\n dom.props[ccName] = old[ccName] = attrs[name]\n //update = true\n } else {\n old[name] = attrs[name]\n }\n }\n }\n\n if (isWeElement && !updateSelf && dom.parentNode) {\n //__hasChildren is not accuracy when it was empty at first, so add dom.children.length > 0 condition\n //if (update || dom.__hasChildren || dom.children.length > 0 || (dom.store && !dom.store.data)) {\n if (dom.receiveProps(dom.props, oldClone) !== false) {\n dom.update()\n }\n //}\n }\n}\n","import {\n\tcssToDom,\n\tisArray,\n\tgetUse,\n\thyphenate,\n\tgetValByPath,\n\tremoveItem\n} from './util'\nimport { diff } from './vdom/diff'\nimport options from './options'\nimport { getPath } from './util'\n\nlet id = 0\n\nexport default class WeElement extends HTMLElement {\n\tstatic is = 'WeElement'\n\n\tconstructor() {\n\t\tsuper()\n\t\tthis.props = Object.assign({},\n\t\t\tthis.constructor.defaultProps\n\t\t)\n\t\tthis.elementId = id++\n\t}\n\n\tconnectedCallback() {\n\t\tlet p = this.parentNode\n\t\twhile (p && !this.store) {\n\t\t\tthis.store = p.store\n\t\t\tp = p.parentNode || p.host\n\t\t}\n\n\t\tif (this.use) {\n\t\t\tlet use\n\t\t\tif (typeof this.use === 'function') {\n\t\t\t\tuse = this.use()\n\t\t\t} else {\n\t\t\t\tuse = this.use\n\t\t\t}\n\n\n\t\t\tif (options.isMultiStore) {\n\t\t\t\tlet _updatePath = {}\n\t\t\t\tlet using = {}\n\t\t\t\tfor (let storeName in use) {\n\t\t\t\t\t_updatePath[storeName] = {}\n\t\t\t\t\tusing[storeName] = {}\n\t\t\t\t\tgetPath(use[storeName], _updatePath, storeName)\n\t\t\t\t\tgetUse(this.store[storeName].data, use[storeName], using, storeName)\n\t\t\t\t\tthis.store[storeName].instances.push(this)\n\t\t\t\t}\n\t\t\t\tthis.using = using\n\t\t\t\tthis._updatePath = _updatePath\n\t\t\t} else {\n\t\t\t\tthis._updatePath = getPath(use)\n\t\t\t\tthis.using = getUse(this.store.data, use)\n\t\t\t\tthis.store.instances.push(this)\n\t\t\t}\n\t\t}\n\t\tif (this.useSelf) {\n\t\t\tconst use = typeof this.useSelf === 'function' ? this.useSelf() : this.useSelf\n\t\t\tif (options.isMultiStore) {\n\t\t\t\tlet _updatePath = {}\n\t\t\t\tlet using = {}\n\t\t\t\tfor (let storeName in use) {\n\t\t\t\t\tgetPath(use[storeName], _updatePath, storeName)\n\t\t\t\t\tgetUse(this.store[storeName].data, use[storeName], using, storeName)\n\t\t\t\t\tthis.store[storeName].updateSelfInstances.push(this)\n\t\t\t\t}\n\t\t\t\tthis.usingSelf = using\n\t\t\t\tthis._updateSelfPath = _updatePath\n\t\t\t} else {\n\t\t\t\tthis._updateSelfPath = getPath(use)\n\t\t\t\tthis.usingSelf = getUse(this.store.data, use)\n\t\t\t\tthis.store.updateSelfInstances.push(this)\n\t\t\t}\n\t\t}\n\t\tthis.attrsToProps()\n\t\tthis.beforeInstall()\n\t\tthis.install()\n\t\tthis.afterInstall()\n\n\t\tlet shadowRoot\n\t\tif (!this.shadowRoot) {\n\t\t\tshadowRoot = this.attachShadow({\n\t\t\t\tmode: 'open'\n\t\t\t})\n\t\t} else {\n\t\t\tshadowRoot = this.shadowRoot\n\t\t\tlet fc\n\t\t\twhile ((fc = shadowRoot.firstChild)) {\n\t\t\t\tshadowRoot.removeChild(fc)\n\t\t\t}\n\t\t}\n\n\t\tif (this.constructor.css) {\n\t\t\tshadowRoot.appendChild(cssToDom(this.constructor.css))\n\t\t} else if (this.css) {\n\t\t\tshadowRoot.appendChild(cssToDom(typeof this.css === 'function' ? this.css() : this.css))\n\t\t}\n\t\tthis.beforeRender()\n\t\toptions.afterInstall && options.afterInstall(this)\n\n\n\t\tconst rendered = this.render(this.props, this.store)\n\t\tthis.__hasChildren = Object.prototype.toString.call(rendered) === '[object Array]' && rendered.length > 0\n\n\t\tthis.rootNode = diff(\n\t\t\tnull,\n\t\t\trendered,\n\t\t\tnull,\n\t\t\tthis\n\t\t)\n\t\tthis.rendered()\n\n\t\tif (this.props.css) {\n\t\t\tthis._customStyleElement = cssToDom(this.props.css)\n\t\t\tthis._customStyleContent = this.props.css\n\t\t\tshadowRoot.appendChild(this._customStyleElement)\n\t\t}\n\n\t\tif (isArray(this.rootNode)) {\n\t\t\tthis.rootNode.forEach(function (item) {\n\t\t\t\tshadowRoot.appendChild(item)\n\t\t\t})\n\t\t} else {\n\t\t\tshadowRoot.appendChild(this.rootNode)\n\t\t}\n\t\tthis.installed()\n\t\tthis._isInstalled = true\n\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.uninstall()\n\t\tthis._isInstalled = false\n\t\tif (this.store) {\n\t\t\tif(options.isMultiStore){\n\t\t\t\tfor(let key in this.store){\n\t\t\t\t\tconst current = this.store[key]\n\t\t\t\t\tremoveItem(this, current.instances)\n\t\t\t\t removeItem(this, current.updateSelfInstances)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tremoveItem(this, this.store.instances)\n\t\t\t\tremoveItem(this, this.store.updateSelfInstances)\n\t\t\t}\n\t\t}\n\t}\n\n\tupdate(ignoreAttrs, updateSelf) {\n\t\tthis._willUpdate = true\n\t\tthis.beforeUpdate()\n\t\tthis.beforeRender()\n\t\t//fix null !== undefined\n\t\tif (this._customStyleContent != this.props.css) {\n\t\t\tthis._customStyleContent = this.props.css\n\t\t\tthis._customStyleElement.textContent = this._customStyleContent\n\t\t}\n\t\tthis.attrsToProps(ignoreAttrs)\n\n\t\tconst rendered = this.render(this.props, this.store)\n\t\tthis.rendered()\n\t\tthis.__hasChildren = this.__hasChildren || (Object.prototype.toString.call(rendered) === '[object Array]' && rendered.length > 0)\n\n\t\tthis.rootNode = diff(\n\t\t\tthis.rootNode,\n\t\t\trendered,\n\t\t\tthis.shadowRoot,\n\t\t\tthis,\n\t\t\tupdateSelf\n\t\t)\n\t\tthis._willUpdate = false\n\t\tthis.updated()\n\n\t}\n\n\tupdateSelf(ignoreAttrs) {\n\t\tthis.update(ignoreAttrs, true)\n\t}\n\n\tremoveAttribute(key) {\n\t\tsuper.removeAttribute(key)\n\t\t//Avoid executing removeAttribute methods before connectedCallback\n\t\tthis._isInstalled && this.update()\n\t}\n\n\tsetAttribute(key, val) {\n\t\tif (val && typeof val === 'object') {\n\t\t\tsuper.setAttribute(key, JSON.stringify(val))\n\t\t} else {\n\t\t\tsuper.setAttribute(key, val)\n\t\t}\n\t\t//Avoid executing setAttribute methods before connectedCallback\n\t\tthis._isInstalled && this.update()\n\t}\n\n\tpureRemoveAttribute(key) {\n\t\tsuper.removeAttribute(key)\n\t}\n\n\tpureSetAttribute(key, val) {\n\t\tsuper.setAttribute(key, val)\n\t}\n\n\tattrsToProps(ignoreAttrs) {\n\t\tconst ele = this\n\t\tif (ele.normalizedNodeName || ignoreAttrs) return\n\t\tele.props['css'] = ele.getAttribute('css')\n\t\tconst attrs = this.constructor.propTypes\n\t\tif (!attrs) return\n\t\tObject.keys(attrs).forEach(key => {\n\t\t\tconst type = attrs[key]\n\t\t\tconst val = ele.getAttribute(hyphenate(key))\n\t\t\tif (val !== null) {\n\t\t\t\tswitch (type) {\n\t\t\t\t\tcase String:\n\t\t\t\t\t\tele.props[key] = val\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Number:\n\t\t\t\t\t\tele.props[key] = Number(val)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Boolean:\n\t\t\t\t\t\tif (val === 'false' || val === '0') {\n\t\t\t\t\t\t\tele.props[key] = false\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tele.props[key] = true\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Array:\n\t\t\t\t\tcase Object:\n\t\t\t\t\t\tif (val[0] === ':') {\n\t\t\t\t\t\t\tele.props[key] = getValByPath(val.substr(1), Omi.$)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tele.props[key] = JSON.parse(val\n\t\t\t\t\t\t\t\t.replace(/(['\"])?([a-zA-Z0-9_-]+)(['\"])?:([^\\/])/g, '\"$2\":$4')\n\t\t\t\t\t\t\t\t.replace(/'([\\s\\S]*?)'/g, '\"$1\"')\n\t\t\t\t\t\t\t\t.replace(/,(\\s*})/g, '$1')\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (ele.constructor.defaultProps && ele.constructor.defaultProps.hasOwnProperty(key)) {\n\t\t\t\t\tele.props[key] = ele.constructor.defaultProps[key]\n\t\t\t\t} else {\n\t\t\t\t\tele.props[key] = null\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\tfire(name, data) {\n\t\tthis.dispatchEvent(new CustomEvent(name, {\n\t\t\tdetail: data\n\t\t}))\n\t}\n\n\tbeforeInstall() {}\n\n\tinstall() {}\n\n\tafterInstall() {}\n\n\tinstalled() {}\n\n\tuninstall() {}\n\n\tbeforeUpdate() {}\n\n\tupdated() {}\n\n\tbeforeRender() {}\n\n\trendered() {}\n\n\treceiveProps() {}\n\n}\n","/*!\n * https://github.com/Palindrom/JSONPatcherProxy\n * (c) 2017 Starcounter\n * MIT license\n */\n\n/** Class representing a JS Object observer */\nconst JSONPatcherProxy = (function() {\n /**\n * Deep clones your object and returns a new object.\n */\n function deepClone(obj) {\n switch (typeof obj) {\n case 'object':\n return JSON.parse(JSON.stringify(obj)) //Faster than ES5 clone - http://jsperf.com/deep-cloning-of-objects/5\n case 'undefined':\n return null //this is how JSON.stringify behaves for array items\n default:\n return obj //no need to clone primitives\n }\n }\n JSONPatcherProxy.deepClone = deepClone\n\n function escapePathComponent(str) {\n if (str.indexOf('/') == -1 && str.indexOf('~') == -1) return str\n return str.replace(/~/g, '~0').replace(/\\//g, '~1')\n }\n JSONPatcherProxy.escapePathComponent = escapePathComponent\n\n /**\n * Walk up the parenthood tree to get the path\n * @param {JSONPatcherProxy} instance\n * @param {Object} obj the object you need to find its path\n */\n function findObjectPath(instance, obj) {\n const pathComponents = []\n let parentAndPath = instance.parenthoodMap.get(obj)\n while (parentAndPath && parentAndPath.path) {\n // because we're walking up-tree, we need to use the array as a stack\n pathComponents.unshift(parentAndPath.path)\n parentAndPath = instance.parenthoodMap.get(parentAndPath.parent)\n }\n if (pathComponents.length) {\n const path = pathComponents.join('/')\n return '/' + path\n }\n return ''\n }\n /**\n * A callback to be used as th proxy set trap callback.\n * It updates parenthood map if needed, proxifies nested newly-added objects, calls default callbacks with the changes occurred.\n * @param {JSONPatcherProxy} instance JSONPatcherProxy instance\n * @param {Object} target the affected object\n * @param {String} key the effect property's name\n * @param {Any} newValue the value being set\n */\n function setTrap(instance, target, key, newValue) {\n const parentPath = findObjectPath(instance, target)\n\n const destinationPropKey = parentPath + '/' + escapePathComponent(key)\n\n if (instance.proxifiedObjectsMap.has(newValue)) {\n const newValueOriginalObject = instance.proxifiedObjectsMap.get(newValue)\n\n instance.parenthoodMap.set(newValueOriginalObject.originalObject, {\n parent: target,\n path: key\n })\n }\n /*\n mark already proxified values as inherited.\n rationale: proxy.arr.shift()\n will emit\n {op: replace, path: '/arr/1', value: arr_2}\n {op: remove, path: '/arr/2'}\n\n by default, the second operation would revoke the proxy, and this renders arr revoked.\n That's why we need to remember the proxies that are inherited.\n */\n const revokableInstance = instance.proxifiedObjectsMap.get(newValue)\n /*\n Why do we need to check instance.isProxifyingTreeNow?\n\n We need to make sure we mark revokables as inherited ONLY when we're observing,\n because throughout the first proxification, a sub-object is proxified and then assigned to\n its parent object. This assignment of a pre-proxified object can fool us into thinking\n that it's a proxified object moved around, while in fact it's the first assignment ever.\n\n Checking isProxifyingTreeNow ensures this is not happening in the first proxification,\n but in fact is is a proxified object moved around the tree\n */\n if (revokableInstance && !instance.isProxifyingTreeNow) {\n revokableInstance.inherited = true\n }\n\n // if the new value is an object, make sure to watch it\n if (\n newValue &&\n typeof newValue == 'object' &&\n !instance.proxifiedObjectsMap.has(newValue)\n ) {\n instance.parenthoodMap.set(newValue, {\n parent: target,\n path: key\n })\n newValue = instance._proxifyObjectTreeRecursively(target, newValue, key)\n }\n // let's start with this operation, and may or may not update it later\n const operation = {\n op: 'remove',\n path: destinationPropKey\n }\n if (typeof newValue == 'undefined') {\n // applying De Morgan's laws would be a tad faster, but less readable\n if (!Array.isArray(target) && !target.hasOwnProperty(key)) {\n // `undefined` is being set to an already undefined value, keep silent\n return Reflect.set(target, key, newValue)\n }\n // when array element is set to `undefined`, should generate replace to `null`\n if (Array.isArray(target)) {\n // undefined array elements are JSON.stringified to `null`\n ;(operation.op = 'replace'), (operation.value = null)\n }\n const oldValue = instance.proxifiedObjectsMap.get(target[key])\n // was the deleted a proxified object?\n if (oldValue) {\n instance.parenthoodMap.delete(target[key])\n instance.disableTrapsForProxy(oldValue)\n instance.proxifiedObjectsMap.delete(oldValue)\n }\n } else {\n if (Array.isArray(target) && !Number.isInteger(+key.toString())) {\n /* array props (as opposed to indices) don't emit any patches, to avoid needless `length` patches */\n if (key != 'length') {\n console.warn(\n 'JSONPatcherProxy noticed a non-integer prop was set for an array. This will not emit a patch'\n )\n }\n return Reflect.set(target, key, newValue)\n }\n operation.op = 'add'\n if (target.hasOwnProperty(key)) {\n if (typeof target[key] !== 'undefined' || Array.isArray(target)) {\n operation.op = 'replace' // setting `undefined` array elements is a `replace` op\n }\n }\n operation.value = newValue\n }\n operation.oldValue = target[key]\n const reflectionResult = Reflect.set(target, key, newValue)\n instance.defaultCallback(operation)\n return reflectionResult\n }\n /**\n * A callback to be used as th proxy delete trap callback.\n * It updates parenthood map if needed, calls default callbacks with the changes occurred.\n * @param {JSONPatcherProxy} instance JSONPatcherProxy instance\n * @param {Object} target the effected object\n * @param {String} key the effected property's name\n */\n function deleteTrap(instance, target, key) {\n if (typeof target[key] !== 'undefined') {\n const parentPath = findObjectPath(instance, target)\n const destinationPropKey = parentPath + '/' + escapePathComponent(key)\n\n const revokableProxyInstance = instance.proxifiedObjectsMap.get(\n target[key]\n )\n\n if (revokableProxyInstance) {\n if (revokableProxyInstance.inherited) {\n /*\n this is an inherited proxy (an already proxified object that was moved around),\n we shouldn't revoke it, because even though it was removed from path1, it is still used in path2.\n And we know that because we mark moved proxies with `inherited` flag when we move them\n\n it is a good idea to remove this flag if we come across it here, in deleteProperty trap.\n We DO want to revoke the proxy if it was removed again.\n */\n revokableProxyInstance.inherited = false\n } else {\n instance.parenthoodMap.delete(revokableProxyInstance.originalObject)\n instance.disableTrapsForProxy(revokableProxyInstance)\n instance.proxifiedObjectsMap.delete(target[key])\n }\n }\n const reflectionResult = Reflect.deleteProperty(target, key)\n\n instance.defaultCallback({\n op: 'remove',\n path: destinationPropKey\n })\n\n return reflectionResult\n }\n }\n /* pre-define resume and pause functions to enhance constructors performance */\n function resume() {\n this.defaultCallback = operation => {\n this.isRecording && this.patches.push(operation)\n this.userCallback && this.userCallback(operation)\n }\n this.isObserving = true\n }\n function pause() {\n this.defaultCallback = () => {}\n this.isObserving = false\n }\n /**\n * Creates an instance of JSONPatcherProxy around your object of interest `root`.\n * @param {Object|Array} root - the object you want to wrap\n * @param {Boolean} [showDetachedWarning = true] - whether to log a warning when a detached sub-object is modified @see {@link https://github.com/Palindrom/JSONPatcherProxy#detached-objects}\n * @returns {JSONPatcherProxy}\n * @constructor\n */\n function JSONPatcherProxy(root, showDetachedWarning) {\n this.isProxifyingTreeNow = false\n this.isObserving = false\n this.proxifiedObjectsMap = new Map()\n this.parenthoodMap = new Map()\n // default to true\n if (typeof showDetachedWarning !== 'boolean') {\n showDetachedWarning = true\n }\n\n this.showDetachedWarning = showDetachedWarning\n this.originalObject = root\n this.cachedProxy = null\n this.isRecording = false\n this.userCallback\n /**\n * @memberof JSONPatcherProxy\n * Restores callback back to the original one provided to `observe`.\n */\n this.resume = resume.bind(this)\n /**\n * @memberof JSONPatcherProxy\n * Replaces your callback with a noop function.\n */\n this.pause = pause.bind(this)\n }\n\n JSONPatcherProxy.prototype.generateProxyAtPath = function(parent, obj, path) {\n if (!obj) {\n return obj\n }\n const traps = {\n set: (target, key, value, receiver) =>\n setTrap(this, target, key, value, receiver),\n deleteProperty: (target, key) => deleteTrap(this, target, key)\n }\n const revocableInstance = Proxy.revocable(obj, traps)\n // cache traps object to disable them later.\n revocableInstance.trapsInstance = traps\n revocableInstance.originalObject = obj\n\n /* keeping track of object's parent and path */\n\n this.parenthoodMap.set(obj, { parent, path })\n\n /* keeping track of all the proxies to be able to revoke them later */\n this.proxifiedObjectsMap.set(revocableInstance.proxy, revocableInstance)\n return revocableInstance.proxy\n }\n // grab tree's leaves one by one, encapsulate them into a proxy and return\n JSONPatcherProxy.prototype._proxifyObjectTreeRecursively = function(\n parent,\n root,\n path\n ) {\n for (let key in root) {\n if (root.hasOwnProperty(key)) {\n if (root[key] instanceof Object) {\n root[key] = this._proxifyObjectTreeRecursively(\n root,\n root[key],\n escapePathComponent(key)\n )\n }\n }\n }\n return this.generateProxyAtPath(parent, root, path)\n }\n // this function is for aesthetic purposes\n JSONPatcherProxy.prototype.proxifyObjectTree = function(root) {\n /*\n while proxyifying object tree,\n the proxyifying operation itself is being\n recorded, which in an unwanted behavior,\n that's why we disable recording through this\n initial process;\n */\n this.pause()\n this.isProxifyingTreeNow = true\n const proxifiedObject = this._proxifyObjectTreeRecursively(\n undefined,\n root,\n ''\n )\n /* OK you can record now */\n this.isProxifyingTreeNow = false\n this.resume()\n return proxifiedObject\n }\n /**\n * Turns a proxified object into a forward-proxy object; doesn't emit any patches anymore, like a normal object\n * @param {Proxy} proxy - The target proxy object\n */\n JSONPatcherProxy.prototype.disableTrapsForProxy = function(\n revokableProxyInstance\n ) {\n if (this.showDetachedWarning) {\n const message =\n \"You're accessing an object that is detached from the observedObject tree, see https://github.com/Palindrom/JSONPatcherProxy#detached-objects\"\n\n revokableProxyInstance.trapsInstance.set = (\n targetObject,\n propKey,\n newValue\n ) => {\n console.warn(message)\n return Reflect.set(targetObject, propKey, newValue)\n }\n revokableProxyInstance.trapsInstance.set = (\n targetObject,\n propKey,\n newValue\n ) => {\n console.warn(message)\n return Reflect.set(targetObject, propKey, newValue)\n }\n revokableProxyInstance.trapsInstance.deleteProperty = (\n targetObject,\n propKey\n ) => {\n return Reflect.deleteProperty(targetObject, propKey)\n }\n } else {\n delete revokableProxyInstance.trapsInstance.set\n delete revokableProxyInstance.trapsInstance.get\n delete revokableProxyInstance.trapsInstance.deleteProperty\n }\n }\n /**\n * Proxifies the object that was passed in the constructor and returns a proxified mirror of it. Even though both parameters are options. You need to pass at least one of them.\n * @param {Boolean} [record] - whether to record object changes to a later-retrievable patches array.\n * @param {Function} [callback] - this will be synchronously called with every object change with a single `patch` as the only parameter.\n */\n JSONPatcherProxy.prototype.observe = function(record, callback) {\n if (!record && !callback) {\n throw new Error('You need to either record changes or pass a callback')\n }\n this.isRecording = record\n this.userCallback = callback\n /*\n I moved it here to remove it from `unobserve`,\n this will also make the constructor faster, why initiate\n the array before they decide to actually observe with recording?\n They might need to use only a callback.\n */\n if (record) this.patches = []\n this.cachedProxy = this.proxifyObjectTree(this.originalObject)\n return this.cachedProxy\n }\n /**\n * If the observed is set to record, it will synchronously return all the patches and empties patches array.\n */\n JSONPatcherProxy.prototype.generate = function() {\n if (!this.isRecording) {\n throw new Error('You should set record to true to get patches later')\n }\n return this.patches.splice(0, this.patches.length)\n }\n /**\n * Revokes all proxies rendering the observed object useless and good for garbage collection @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/revocable}\n */\n JSONPatcherProxy.prototype.revoke = function() {\n this.proxifiedObjectsMap.forEach(el => {\n el.revoke()\n })\n }\n /**\n * Disables all proxies' traps, turning the observed object into a forward-proxy object, like a normal object that you can modify silently.\n */\n JSONPatcherProxy.prototype.disableTraps = function() {\n this.proxifiedObjectsMap.forEach(this.disableTrapsForProxy, this)\n }\n return JSONPatcherProxy\n})()\n\nexport default JSONPatcherProxy\n","import { diff } from './vdom/diff'\nimport JSONProxy from './proxy'\nimport { getUse } from './util'\nimport options from './options'\n\nexport function render(vnode, parent, store) {\n\tparent = typeof parent === 'string' ? document.querySelector(parent) : parent\n\tif (store) {\n\t\tif (store.data) {\n\t\t\tobserveStore(store)\n\t\t} else {\n\t\t\toptions.isMultiStore = true\n\t\t\t//Multi-store injection\n\t\t\tfor (let key in store) {\n\t\t\t\tobserveStore(store[key], key)\n\t\t\t}\n\t\t}\n\t\tparent.store = store\n\t}\n\treturn diff(null, vnode, parent, false)\n}\n\nfunction observeStore(store, key) {\n\tstore.instances = []\n\tstore.updateSelfInstances = []\n\textendStoreUpate(store, key)\n\n\tstore.data = new JSONProxy(store.data).observe(false, function (patch) {\n\t\tconst patchs = {}\n\t\tif (patch.op === 'remove') {\n\t\t\t// fix arr splice\n\t\t\tconst kv = getArrayPatch(patch.path, store)\n\t\t\tpatchs[kv.k] = kv.v\n\n\t\t\tupdate(patchs, store)\n\n\t\t} else {\n\t\t\tconst key = fixPath(patch.path)\n\t\t\tpatchs[key] = patch.value\n\n\t\t\tupdate(patchs, store)\n\n\t\t}\n\t})\n}\n\nfunction update(patch, store) {\n\tstore.update(patch)\n}\n\nfunction extendStoreUpate(store, key) {\n\tstore.update = function (patch) {\n\t\tif (Object.keys(patch).length > 0) {\n\t\t\tthis.instances.forEach(instance => {\n\t\t\t\tif (key) {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updatePath && instance._updatePath[key] && needUpdate(patch, instance._updatePath[key]))) {\n\t\t\t\t\t\tif (instance.use) {\n\t\t\t\t\t\t\tgetUse(store.data, (typeof instance.use === 'function' ? instance.use() : instance.use)[key], instance.using, key)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.update()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updatePath && needUpdate(patch, instance._updatePath))) {\n\t\t\t\t\t\tif (instance.use) {\n\t\t\t\t\t\t\tinstance.using = getUse(store.data, typeof instance.use === 'function' ? instance.use() : instance.use)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.update()\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t})\n\n\t\t\tthis.updateSelfInstances.forEach(instance => {\n\t\t\t\tif (key) {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updateSelfPath && instance._updateSelfPath[key] && needUpdate(patch, instance._updateSelfPath[key]))) {\n\t\t\t\t\t\tif (instance.useSelf) {\n\t\t\t\t\t\t\tgetUse(store.data, (typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)[key], instance.usingSelf, key)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.updateSelf()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (instance._updateSelfPath && needUpdate(patch, instance._updateSelfPath)) {\n\t\t\t\t\t\tinstance.usingSelf = getUse(store.data, typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)\n\t\t\t\t\t\tinstance.updateSelf()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\tthis.onChange && this.onChange(patch)\n\t\t}\n\t}\n}\n\n\nexport function needUpdate(diffResult, updatePath) {\n\tfor (let keyA in diffResult) {\n\t\tif (updatePath[keyA]) {\n\t\t\treturn true\n\t\t}\n\t\tfor (let keyB in updatePath) {\n\t\t\tif (includePath(keyA, keyB)) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t}\n\treturn false\n}\n\nfunction includePath(pathA, pathB) {\n\tif (pathA.indexOf(pathB) === 0) {\n\t\tconst next = pathA.substr(pathB.length, 1)\n\t\tif (next === '[' || next === '.') {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nexport function fixPath(path) {\n\tlet mpPath = ''\n\tconst arr = path.replace('/', '').split('/')\n\tarr.forEach((item, index) => {\n\t\tif (index) {\n\t\t\tif (isNaN(Number(item))) {\n\t\t\t\tmpPath += '.' + item\n\t\t\t} else {\n\t\t\t\tmpPath += '[' + item + ']'\n\t\t\t}\n\t\t} else {\n\t\t\tmpPath += item\n\t\t}\n\t})\n\treturn mpPath\n}\n\nfunction getArrayPatch(path, store) {\n\tconst arr = path.replace('/', '').split('/')\n\tlet current = store.data[arr[0]]\n\tfor (let i = 1, len = arr.length; i < len - 1; i++) {\n\t\tcurrent = current[arr[i]]\n\t}\n\treturn {\n\t\tk: fixArrPath(path),\n\t\tv: current\n\t}\n}\n\nfunction fixArrPath(path) {\n\tlet mpPath = ''\n\tconst arr = path.replace('/', '').split('/')\n\tconst len = arr.length\n\tarr.forEach((item, index) => {\n\t\tif (index < len - 1) {\n\t\t\tif (index) {\n\t\t\t\tif (isNaN(Number(item))) {\n\t\t\t\t\tmpPath += '.' + item\n\t\t\t\t} else {\n\t\t\t\t\tmpPath += '[' + item + ']'\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmpPath += item\n\t\t\t}\n\t\t}\n\t})\n\treturn mpPath\n}\n","import WeElement from './we-element'\nimport options from './options'\n\nexport function define(name, ctor, config) {\n if (options.mapping[name]) {\n return\n }\n if (ctor.is === 'WeElement') {\n customElements.define(name, ctor)\n options.mapping[name] = ctor\n\n } else {\n \n if (typeof config === 'string') {\n config = { css: config }\n } else {\n config = config || { }\n }\n\n class Ele extends WeElement {\n\n static css = config.css\n\n static propTypes = config.propTypes\n\n static defaultProps = config.defaultProps\n\n render() {\n return ctor.call(this, this)\n }\n\n receiveProps() {\n if (config.receiveProps) {\n return config.receiveProps.apply(this, arguments)\n }\n }\n }\n\n const eleHooks = ['install', 'installed', 'uninstall', 'beforeUpdate', 'updated', 'beforeRender', 'rendered'],\n storeHelpers = ['use', 'useSelf']\n\n eleHooks.forEach(hook => {\n if (config[hook]) {\n Ele.prototype[hook] = function () {\n config[hook].apply(this, arguments)\n }\n }\n })\n\n storeHelpers.forEach(func => {\n if (config[func]) {\n Ele.prototype[func] = function () {\n return typeof config[func] === 'function'\n ? config[func].apply(this, arguments)\n : config[func]\n }\n }\n })\n\n customElements.define(name, Ele)\n options.mapping[name] = Ele\n }\n}\n\n\n\n","import { define } from './define'\n\nexport function tag(name, pure) {\n return function(target) {\n target.pure = pure\n define(name, target)\n }\n}\n","import { extend } from './util'\nimport { h } from './h'\n\n/**\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\n * @param {VNode} vnode\t\tThe virtual DOM element to clone\n * @param {Object} props\tAttributes/props to add when cloning\n * @param {VNode} rest\t\tAny additional arguments will be used as replacement children.\n */\nexport function cloneElement(vnode, props) {\n return h(\n vnode.nodeName,\n extend(extend({}, vnode.attributes), props),\n arguments.length > 2 ? [].slice.call(arguments, 2) : vnode.children\n )\n}\n","export function getHost(ele) {\n let p = ele.parentNode\n while (p) {\n if (p.host) {\n return p.host\n } else if (p.shadowRoot && p.shadowRoot.host) {\n return p.shadowRoot.host\n } else {\n p = p.parentNode\n }\n }\n}\n","export function rpx(str) {\n return str.replace(/([1-9]\\d*|0)(\\.\\d*)*rpx/g, (a, b) => {\n return (window.innerWidth * Number(b)) / 750 + 'px'\n })\n}\n","/**\n * classNames based on https://github.com/JedWatson/classnames\n * by Jed Watson\n * Licensed under the MIT License\n * https://github.com/JedWatson/classnames/blob/master/LICENSE\n * modified by dntzhang\n */\n\nvar hasOwn = {}.hasOwnProperty\n\nexport function classNames() {\n var classes = []\n\n for (var i = 0; i < arguments.length; i++) {\n var arg = arguments[i]\n if (!arg) continue\n\n var argType = typeof arg\n\n if (argType === 'string' || argType === 'number') {\n classes.push(arg)\n } else if (Array.isArray(arg) && arg.length) {\n var inner = classNames.apply(null, arg)\n if (inner) {\n classes.push(inner)\n }\n } else if (argType === 'object') {\n for (var key in arg) {\n if (hasOwn.call(arg, key) && arg[key]) {\n classes.push(key)\n }\n }\n }\n }\n\n return classes.join(' ')\n}\n\nexport function extractClass() {\n const [props, ...args] = Array.prototype.slice.call(arguments, 0)\n if (props.class) {\n args.unshift(props.class)\n delete props.class\n } else if (props.className) {\n args.unshift(props.className)\n delete props.className\n }\n if (args.length > 0) {\n return { class: classNames.apply(null, args) }\n }\n}\n","export function o(obj){\n return JSON.stringify(obj)\n}","var n=function(t,r,u,e){for(var p=1;p\"===t?(a(),u=1):u&&(\"=\"===t?(u=4,r=e,e=\"\"):\"/\"===t?(a(),3===u&&(s=s[0]),u=s,(s=s[0]).push(u,4),u=0):\" \"===t||\"\\t\"===t||\"\\n\"===t||\"\\r\"===t?(a(),u=2):e+=t)}return a(),s},r=\"function\"==typeof Map,u=r?new Map:{},e=r?function(n){var r=u.get(n);return r||u.set(n,r=t(n)),r}:function(n){for(var r=\"\",e=0;e1?r:r[0]}\n","import { h, h as createElement } from './h'\nimport options from './options'\nimport WeElement from './we-element'\nimport { render } from './render'\nimport { define } from './define'\nimport { tag } from './tag'\nimport { cloneElement } from './clone-element'\nimport { getHost } from './get-host'\nimport { rpx } from './rpx'\nimport { classNames, extractClass } from './class'\nimport { o } from './o'\nimport htm from 'htm'\nimport { extend, get, set, bind, unbind } from './extend'\nimport JSONProxy from './proxy'\nimport { Fragment } from './util'\n\nh.f = Fragment\n\nconst html = htm.bind(h)\n\nfunction createRef() {\n return {}\n}\n\nconst $ = {}\nconst Component = WeElement\nconst defineElement = define\nconst elements = options.mapping\n\nconst omi = {\n tag,\n WeElement,\n Component,\n render,\n h,\n createElement,\n options,\n define,\n cloneElement,\n getHost,\n rpx,\n defineElement,\n classNames,\n extractClass,\n createRef,\n html,\n htm,\n o,\n\telements,\n\t$,\n\textend,\n\tget,\n\tset,\n\tbind,\n\tunbind,\n JSONProxy\n}\n\noptions.root.Omi = omi\noptions.root.omi = omi\noptions.root.Omi.version = '6.15.6'\n\nexport default omi\n\nexport {\n tag,\n WeElement,\n Component,\n render,\n h,\n createElement,\n options,\n define,\n cloneElement,\n getHost,\n rpx,\n defineElement,\n classNames,\n extractClass,\n createRef,\n html,\n htm,\n o,\n\telements,\n\t$,\n\textend,\n\tget,\n\tset,\n\tbind,\n\tunbind,\n JSONProxy\n}\n","\n\t\t\t\timport Omi from './omi';\n\t\t\t\tif (typeof module!='undefined') module.exports = Omi;\n\t\t\t\telse self.Omi = Omi;\n\t\t\t"],"names":["VNode","getGlobal","global","Math","Array","self","window","store","root","mapping","isMultiStore","stack","h","nodeName","attributes","children","lastSimple","child","simple","i","arguments","length","push","pop","undefined","String","p","key","options","vnode","Reflect","customElements","hasOwnProperty","BuiltInHTMLElement","HTMLElement","construct","constructor","prototype","Object","setPrototypeOf","cssToDom","css","node","document","createElement","textContent","camelCase","str","replace","$","$1","toUpperCase","Fragment","props","extend","obj","applyRef","ref","value","current","defer","Promise","resolve","then","bind","setTimeout","isArray","toString","call","getUse","data","paths","out","name","forEach","path","index","isPath","getTargetByPath","keys","tempPath","tempVal","args","apply","pathToArr","split","origin","arr","len","hyphenateRE","hyphenate","toLowerCase","getValByPath","prop","getPath","result","item","removeItem","splice","ATTR_KEY","IS_NON_DIMENSIONAL","isSameNodeType","hydrating","splitText","_componentConstructor","isNamedNode","normalizedNodeName","extension","handler","set","get","eventProxy","e","_listeners","type","el","addEventListener","unbind","removeEventListener","createNode","isSvg","createElementNS","removeNode","parentNode","removeChild","setAccessor","old","component","className","style","cssText","test","innerHTML","__html","useCapture","substring","touchStart","touchEnd","pureRemoveAttribute","removeAttribute","ns","removeAttributeNS","setAttributeNS","pureSetAttribute","setAttribute","event","___touchX","touches","pageX","___touchY","pageY","___scrollTop","body","scrollTop","abs","changedTouches","dispatchEvent","CustomEvent","detail","diffLevel","isSvgMode","diff","dom","parent","updateSelf","ret","ownerSVGElement","styles","querySelectorAll","s","innerDiffNode","firstChild","insertBefore","appendChild","ele","idiff","one","recollectNodeTree","prevSvgMode","_component","nodeValue","createTextNode","replaceChild","vnodeName","fc","vchildren","a","nextSibling","is","noSlot","dangerouslySetInnerHTML","diffAttributes","isHydrating","originalChildren","childNodes","keyed","keyedLen","min","childrenLen","vlen","j","c","f","vchild","__key","trim","unmountOnly","removeChildren","lastChild","next","previousSibling","attrs","isWeElement","update","oldClone","receiveProps","assign","ccName","id","WeElement","defaultProps","elementId","connectedCallback","host","use","_updatePath","using","storeName","instances","useSelf","updateSelfInstances","usingSelf","_updateSelfPath","attrsToProps","beforeInstall","install","afterInstall","shadowRoot","attachShadow","mode","beforeRender","rendered","render","__hasChildren","rootNode","_customStyleElement","_customStyleContent","installed","_isInstalled","disconnectedCallback","uninstall","ignoreAttrs","_willUpdate","beforeUpdate","updated","val","JSON","stringify","getAttribute","propTypes","Number","Boolean","substr","Omi","parse","fire","JSONPatcherProxy","deepClone","escapePathComponent","indexOf","findObjectPath","instance","pathComponents","parentAndPath","parenthoodMap","unshift","join","setTrap","target","newValue","parentPath","destinationPropKey","proxifiedObjectsMap","has","newValueOriginalObject","originalObject","revokableInstance","isProxifyingTreeNow","inherited","_proxifyObjectTreeRecursively","operation","op","oldValue","delete","disableTrapsForProxy","isInteger","console","warn","reflectionResult","defaultCallback","deleteTrap","revokableProxyInstance","deleteProperty","resume","isRecording","patches","userCallback","isObserving","pause","showDetachedWarning","Map","cachedProxy","generateProxyAtPath","traps","receiver","revocableInstance","Proxy","revocable","trapsInstance","proxy","proxifyObjectTree","proxifiedObject","message","targetObject","propKey","observe","record","callback","Error","generate","revoke","disableTraps","querySelector","observeStore","extendStoreUpate","JSONProxy","patch","patchs","kv","getArrayPatch","k","v","fixPath","needUpdate","onChange","diffResult","updatePath","keyA","keyB","includePath","pathA","pathB","mpPath","isNaN","fixArrPath","define","ctor","config","Ele","eleHooks","storeHelpers","hook","func","tag","pure","cloneElement","slice","getHost","rpx","b","innerWidth","hasOwn","classNames","classes","arg","argType","inner","extractClass","class","o","html","htm","createRef","Component","defineElement","elements","omi","version","module","exports"],"mappings":";;;;;;;;;;;EAAA;AACA,EAAO,SAASA,KAAT,GAAiB;;ECDxB,SAASC,SAAT,GAAqB;EACnB,MACE,OAAOC,MAAP,KAAkB,QAAlB,IACA,CAACA,MADD,IAEAA,OAAOC,IAAP,KAAgBA,IAFhB,IAGAD,OAAOE,KAAP,KAAiBA,KAJnB,EAKE;EACA,WACEC,QACAC,MADA,IAEAJ,MAFA,IAGC,YAAW;EACV,aAAO,IAAP;EACD,KAFD,EAJF;EAQD;EACD,SAAOA,MAAP;EACD;;EAED;;;;AAIA,gBAAe;EACbK,SAAO,IADM;EAEbC,QAAMP,WAFO;EAGdQ,WAAS,EAHK;EAIdC,gBAAc;EAJA,CAAf;;MCpBMC,QAAQ,EAAd;;AAEA,EAAO,SAASC,CAAT,CAAWC,QAAX,EAAqBC,UAArB,EAAiC;EACtC,MAAIC,WAAW,EAAf;EAAA,MACEC,mBADF;EAAA,MAEEC,cAFF;EAAA,MAGEC,eAHF;EAAA,MAIEC,UAJF;EAKA,OAAKA,IAAIC,UAAUC,MAAnB,EAA2BF,MAAM,CAAjC,GAAsC;EACpCR,UAAMW,IAAN,CAAWF,UAAUD,CAAV,CAAX;EACD;EACD,MAA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OC,OAAP,GAAiB9H,GAAjB,CAAhC,KACKlQ,KAAKkQ,GAAL,GAAWA,GAAX;;"} \ No newline at end of file +{"version":3,"file":"omi.dev.js","sources":["../src/vnode.js","../src/options.js","../src/h.js","../src/util.js","../src/constants.js","../src/vdom/index.js","../src/extend.js","../src/dom/index.js","../src/vdom/diff.js","../src/we-element.js","../src/proxy.js","../src/render.js","../src/define.js","../src/tag.js","../src/clone-element.js","../src/get-host.js","../src/rpx.js","../src/class.js","../src/o.js","../node_modules/htm/dist/htm.mjs","../src/omi.js","../src/omi.js"],"sourcesContent":["/** Virtual DOM Node */\nexport function VNode() {}\n","function getGlobal() {\n if (\n typeof global !== 'object' ||\n !global ||\n global.Math !== Math ||\n global.Array !== Array\n ) {\n return (\n self ||\n window ||\n global ||\n (function() {\n return this\n })()\n )\n }\n return global\n}\n\n/** Global options\n *\t@public\n *\t@namespace options {Object}\n */\nexport default {\n store: null,\n root: getGlobal(),\n\tmapping: {},\n\tisMultiStore: false\n}\n","import { VNode } from './vnode'\nimport options from './options'\n\nconst stack = []\n\nexport function h(nodeName, attributes) {\n let children = [],\n lastSimple,\n child,\n simple,\n i\n for (i = arguments.length; i-- > 2; ) {\n stack.push(arguments[i])\n }\n if (attributes && attributes.children != null) {\n if (!stack.length) stack.push(attributes.children)\n delete attributes.children\n }\n while (stack.length) {\n if ((child = stack.pop()) && child.pop !== undefined) {\n for (i = child.length; i--; ) stack.push(child[i])\n } else {\n if (typeof child === 'boolean') child = null\n\n if ((simple = typeof nodeName !== 'function')) {\n if (child == null) child = ''\n else if (typeof child === 'number') child = String(child)\n else if (typeof child !== 'string') simple = false\n }\n\n if (simple && lastSimple) {\n children[children.length - 1] += child\n } else if (children.length === 0) {\n children = [child]\n } else {\n children.push(child)\n }\n\n lastSimple = simple\n }\n }\n\n let p = new VNode()\n p.nodeName = nodeName\n p.children = children\n p.attributes = attributes == null ? undefined : attributes\n p.key = attributes == null ? undefined : attributes.key\n\n // if a \"vnode hook\" is defined, pass every created VNode to it\n if (options.vnode !== undefined) options.vnode(p)\n\n return p\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n/**\n * This shim allows elements written in, or compiled to, ES5 to work on native\n * implementations of Custom Elements v1. It sets new.target to the value of\n * this.constructor so that the native HTMLElement constructor can access the\n * current under-construction element's definition.\n */\n; (function () {\n if (\n // No Reflect, no classes, no need for shim because native custom elements\n // require ES2015 classes or Reflect.\n window.Reflect === undefined ||\n window.customElements === undefined ||\n // The webcomponentsjs custom elements polyfill doesn't require\n // ES2015-compatible construction (`super()` or `Reflect.construct`).\n window.customElements.hasOwnProperty('polyfillWrapFlushCallback')\n ) {\n return\n }\n const BuiltInHTMLElement = HTMLElement\n window.HTMLElement = function HTMLElement() {\n return Reflect.construct(BuiltInHTMLElement, [], this.constructor)\n }\n HTMLElement.prototype = BuiltInHTMLElement.prototype\n HTMLElement.prototype.constructor = HTMLElement\n Object.setPrototypeOf(HTMLElement, BuiltInHTMLElement)\n})()\n\nexport function cssToDom(css) {\n const node = document.createElement('style')\n node.textContent = css\n return node\n}\n\nexport function camelCase(str) {\n return str.replace(/-(\\w)/g, ($, $1) => {\n return $1.toUpperCase()\n })\n}\n\nexport function Fragment(props) {\n return props.children\n}\n\nexport function extend(obj, props) {\n for (let i in props) obj[i] = props[i]\n return obj\n}\n\n/** Invoke or update a ref, depending on whether it is a function or object ref.\n * @param {object|function} [ref=null]\n * @param {any} [value]\n */\nexport function applyRef(ref, value) {\n if (ref != null) {\n if (typeof ref == 'function') ref(value)\n else ref.current = value\n }\n}\n\n/**\n * Call a function asynchronously, as soon as possible. Makes\n * use of HTML Promise to schedule the callback if available,\n * otherwise falling back to `setTimeout` (mainly for IE<11).\n * @type {(callback: function) => void}\n */\nexport const defer =\n typeof Promise == 'function'\n ? Promise.resolve().then.bind(Promise.resolve())\n : setTimeout\n\nexport function isArray(obj) {\n return Object.prototype.toString.call(obj) === '[object Array]'\n}\n\n\nexport function getUse(data, paths, out, name) {\n const obj = []\n paths.forEach((path, index) => {\n const isPath = typeof path === 'string'\n if (isPath) {\n obj[index] = getTargetByPath(data, path)\n } else {\n const key = Object.keys(path)[0]\n const value = path[key]\n if (typeof value === 'string') {\n obj[index] = getTargetByPath(data, value)\n } else {\n const tempPath = value[0]\n if (typeof tempPath === 'string') {\n const tempVal = getTargetByPath(data, tempPath)\n obj[index] = value[1] ? value[1](tempVal) : tempVal\n } else {\n const args = []\n tempPath.forEach(path =>{\n args.push(getTargetByPath(data, path))\n })\n obj[index] = value[1].apply(null, args)\n }\n }\n obj[key] = obj[index]\n }\n\t})\n\tif(out) out[name] = obj\n return obj\n}\n\nexport function pathToArr(path) {\n\tif(typeof path !== 'string' || !path) return []\n\t// return path.split(/\\.|\\[|\\]/).filter(name => !!name)\n\treturn path.replace(/]/g, '').replace(/\\[/g, '.').split('.')\n}\n\nexport function getTargetByPath(origin, path) {\n const arr = pathToArr(path)\n let current = origin\n for (let i = 0, len = arr.length; i < len; i++) {\n current = current[arr[i]]\n }\n return current\n}\n\nconst hyphenateRE = /\\B([A-Z])/g\nexport function hyphenate(str) {\n return str.replace(hyphenateRE, '-$1').toLowerCase()\n}\n\nexport function getValByPath(path, current) {\n\tconst arr = pathToArr(path)\n\tarr.forEach(prop => {\n\t\tcurrent = current[prop]\n\t})\n\treturn current\n}\n\nexport function getPath(obj, out, name) {\n\tconst result = {}\n\tobj.forEach(item => {\n\t\tif (typeof item === 'string') {\n\t\t\tresult[item] = true\n\t\t} else {\n\t\t\tconst tempPath = item[Object.keys(item)[0]]\n\t\t\tif (typeof tempPath === 'string') {\n\t\t\t\tresult[tempPath] = true\n\t\t\t} else {\n\t\t\t\tif (typeof tempPath[0] === 'string') {\n\t\t\t\t\tresult[tempPath[0]] = true\n\t\t\t\t} else {\n\t\t\t\t\ttempPath[0].forEach(path => (result[path] = true))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\tif(out) out[name] = result\n\treturn result\n}\n\nexport function removeItem(item, arr){\n if(!arr) return\n for (let i = 0, len = arr.length; i < len; i++) {\n if (arr[i] === item) {\n arr.splice(i, 1)\n break\n }\n }\n}","// render modes\n\nexport const NO_RENDER = 0\nexport const SYNC_RENDER = 1\nexport const FORCE_RENDER = 2\nexport const ASYNC_RENDER = 3\n\nexport const ATTR_KEY = 'prevProps'\n\n// DOM properties that should NOT have \"px\" added when numeric\nexport const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i\n","import { extend } from '../util'\nimport options from '../options'\n/**\n * Check if two nodes are equivalent.\n *\n * @param {Node} node\t\t\tDOM Node to compare\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\n * @param {boolean} [hydrating=false]\tIf true, ignores component constructors when comparing.\n * @private\n */\nexport function isSameNodeType(node, vnode, hydrating) {\n if (typeof vnode === 'string' || typeof vnode === 'number') {\n return node.splitText !== undefined\n }\n if (typeof vnode.nodeName === 'string') {\n return !node._componentConstructor && isNamedNode(node, vnode.nodeName)\n } else if (typeof vnode.nodeName === 'function'){\n return options.mapping[node.nodeName.toLowerCase()] === vnode.nodeName\n }\n return hydrating || node._componentConstructor === vnode.nodeName\n}\n\n/**\n * Check if an Element has a given nodeName, case-insensitively.\n *\n * @param {Element} node\tA DOM Element to inspect the name of.\n * @param {String} nodeName\tUnnormalized name to compare against.\n */\nexport function isNamedNode(node, nodeName) {\n return (\n node.normalizedNodeName === nodeName ||\n node.nodeName.toLowerCase() === nodeName.toLowerCase()\n )\n}\n\n/**\n * Reconstruct Component-style `props` from a VNode.\n * Ensures default/fallback values from `defaultProps`:\n * Own-properties of `defaultProps` not present in `vnode.attributes` are added.\n *\n * @param {VNode} vnode\n * @returns {Object} props\n */\nexport function getNodeProps(vnode) {\n let props = extend({}, vnode.attributes)\n props.children = vnode.children\n\n let defaultProps = vnode.nodeName.defaultProps\n if (defaultProps !== undefined) {\n for (let i in defaultProps) {\n if (props[i] === undefined) {\n props[i] = defaultProps[i]\n }\n }\n }\n\n return props\n}\n","import {pathToArr} from './util'\n\nexport const extension = {}\n\nexport function extend(name, handler) {\n\textension['o-' + name] = handler\n}\n\nexport function set(origin, path, value) {\n\tconst arr = pathToArr(path)\n\tlet current = origin\n\tfor (let i = 0, len = arr.length; i < len; i++) {\n\t\t\tif (i === len - 1) {\n\t\t\t\t\tcurrent[arr[i]] = value\n\t\t\t} else {\n\t\t\t\t\tcurrent = current[arr[i]]\n\t\t\t}\n\t}\n}\n\nexport function get(origin, path) {\n\tconst arr = pathToArr(path)\n\tlet current = origin\n\tfor (let i = 0, len = arr.length; i < len; i++) {\n\t\tcurrent = current[arr[i]]\n\t}\n\n\treturn current\n}\n\nfunction eventProxy(e) {\n return this._listeners[e.type](e)\n}\n\nexport function bind(el, type, handler){\n\tel._listeners = el._listeners || {}\n\tel._listeners[type] = handler\n\tel.addEventListener(type, eventProxy)\n}\n\nexport function unbind(el, type){\n\tel.removeEventListener(type, eventProxy)\n}\n","import { IS_NON_DIMENSIONAL } from '../constants'\nimport { applyRef } from '../util'\nimport options from '../options'\nimport { extension } from '../extend'\n\n/**\n * Create an element with the given nodeName.\n * @param {string} nodeName The DOM node to create\n * @param {boolean} [isSvg=false] If `true`, creates an element within the SVG\n * namespace.\n * @returns {Element} The created DOM node\n */\nexport function createNode(nodeName, isSvg) {\n /** @type {Element} */\n let node = isSvg\n ? document.createElementNS('http://www.w3.org/2000/svg', nodeName)\n : document.createElement(nodeName)\n node.normalizedNodeName = nodeName\n return node\n}\n\n/**\n * Remove a child node from its parent if attached.\n * @param {Node} node The node to remove\n */\nexport function removeNode(node) {\n let parentNode = node.parentNode\n if (parentNode) parentNode.removeChild(node)\n}\n\n/**\n * Set a named attribute on the given Node, with special behavior for some names\n * and event handlers. If `value` is `null`, the attribute/handler will be\n * removed.\n * @param {Element} node An element to mutate\n * @param {string} name The name/key to set, such as an event or attribute name\n * @param {*} old The last value that was set for this name/node pair\n * @param {*} value An attribute value, such as a function to be used as an\n * event handler\n * @param {boolean} isSvg Are we currently diffing inside an svg?\n * @private\n */\nexport function setAccessor(node, name, old, value, isSvg, component) {\n if (name === 'className') name = 'class'\n\n if (name[0] == 'o' && name[1] == '-'){\n if(extension[name]){\n extension[name](node, value, component)\n }\n } else if (name === 'key') {\n // ignore\n } else if (name === 'ref') {\n applyRef(old, null)\n applyRef(value, node)\n } else if (name === 'class' && !isSvg) {\n node.className = value || ''\n } else if (name === 'style') {\n if (!value || typeof value === 'string' || typeof old === 'string') {\n node.style.cssText = value || ''\n }\n if (value && typeof value === 'object') {\n if (typeof old !== 'string') {\n for (let i in old) if (!(i in value)) node.style[i] = ''\n }\n for (let i in value) {\n node.style[i] =\n typeof value[i] === 'number' && IS_NON_DIMENSIONAL.test(i) === false\n ? value[i] + 'px'\n : value[i]\n }\n }\n } else if (name === 'dangerouslySetInnerHTML') {\n if (value) node.innerHTML = value.__html || ''\n } else if (name[0] == 'o' && name[1] == 'n') {\n let useCapture = name !== (name = name.replace(/Capture$/, ''))\n\t\tlet nameLower = name.toLowerCase()\n\t\tname = (nameLower in node ? nameLower : name).slice(2)\n if (value) {\n if (!old) {\n node.addEventListener(name, eventProxy, useCapture)\n if (name == 'tap') {\n node.addEventListener('touchstart', touchStart, useCapture)\n node.addEventListener('touchend', touchEnd, useCapture)\n }\n }\n } else {\n node.removeEventListener(name, eventProxy, useCapture)\n if (name == 'tap') {\n node.removeEventListener('touchstart', touchStart, useCapture)\n node.removeEventListener('touchend', touchEnd, useCapture)\n }\n }\n ;(node._listeners || (node._listeners = {}))[name] = value\n } else if (node.nodeName === 'INPUT' && name === 'value'){\n node[name] = value == null ? '' : value\n } else if (name !== 'list' && name !== 'type' && name !== 'css' && !isSvg && name in node && value !== '') { //value !== '' fix for selected, disabled, checked with pure element\n // Attempt to set a DOM property to the given value.\n // IE & FF throw for certain property-value combinations.\n try {\n node[name] = value == null ? '' : value\n } catch (e) {}\n if ((value == null || value === false) && name != 'spellcheck')\n node.pureRemoveAttribute ? node.pureRemoveAttribute(name) : node.removeAttribute(name)\n } else {\n let ns = isSvg && name !== (name = name.replace(/^xlink:?/, ''))\n // spellcheck is treated differently than all other boolean values and\n // should not be removed when the value is `false`. See:\n // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-spellcheck\n if (value == null || value === false) {\n if (ns)\n node.removeAttributeNS(\n 'http://www.w3.org/1999/xlink',\n name.toLowerCase()\n )\n else node.pureRemoveAttribute ? node.pureRemoveAttribute(name) : node.removeAttribute(name)\n } else if (typeof value !== 'function') {\n if (ns) {\n node.setAttributeNS(\n 'http://www.w3.org/1999/xlink',\n name.toLowerCase(),\n value\n )\n } else {\n node.pureSetAttribute ? node.pureSetAttribute(name, value) : node.setAttribute(name, value)\n }\n }\n }\n}\n\n/**\n * Proxy an event to hooked event handlers\n * @param {Event} e The event object from the browser\n * @private\n */\nfunction eventProxy(e) {\n return this._listeners[e.type]((options.event && options.event(e)) || e)\n}\n\nfunction touchStart(e) {\n this.___touchX = e.touches[0].pageX\n this.___touchY = e.touches[0].pageY\n this.___scrollTop = document.body.scrollTop\n}\n\nfunction touchEnd(e) {\n if (\n Math.abs(e.changedTouches[0].pageX - this.___touchX) < 30 &&\n Math.abs(e.changedTouches[0].pageY - this.___touchY) < 30 &&\n Math.abs(document.body.scrollTop - this.___scrollTop) < 30\n ) {\n this.dispatchEvent(new CustomEvent('tap', { detail: e }))\n }\n}\n","import { ATTR_KEY } from '../constants'\nimport { isSameNodeType, isNamedNode } from './index'\nimport { createNode, setAccessor } from '../dom/index'\nimport { camelCase, isArray, Fragment } from '../util'\nimport { removeNode } from '../dom/index'\nimport options from '../options'\n\n/** Queue of components that have been mounted and are awaiting componentDidMount */\nexport const mounts = []\n\n/** Diff recursion count, used to track the end of the diff cycle. */\nexport let diffLevel = 0\n\n/** Global flag indicating if the diff is currently within an SVG */\nlet isSvgMode = false\n\n/** Global flag indicating if the diff is performing hydration */\nlet hydrating = false\n\n/** Apply differences in a given vnode (and it's deep children) to a real DOM Node.\n *\t@param {Element} [dom=null]\t\tA DOM node to mutate into the shape of the `vnode`\n *\t@param {VNode} vnode\t\t\tA VNode (with descendants forming a tree) representing the desired DOM structure\n *\t@returns {Element} dom\t\t\tThe created/mutated element\n *\t@private\n */\nexport function diff(dom, vnode, parent, component, updateSelf) {\n // diffLevel having been 0 here indicates initial entry into the diff (not a subdiff)\n let ret\n if (!diffLevel++) {\n // when first starting the diff, check if we're diffing an SVG or within an SVG\n isSvgMode = parent != null && parent.ownerSVGElement !== undefined\n\n // hydration is indicated by the existing element to be diffed not having a prop cache\n hydrating = dom != null && !(ATTR_KEY in dom)\n }\n if(vnode.nodeName === Fragment){\n vnode = vnode.children\n }\n if (isArray(vnode)) {\n if (parent) {\n const styles = parent.querySelectorAll('style')\n styles.forEach(s => {\n parent.removeChild(s)\n })\n innerDiffNode(parent, vnode, hydrating, component, updateSelf)\n\n for (let i = styles.length - 1; i >= 0; i--) {\n parent.firstChild ? parent.insertBefore(styles[i], parent.firstChild) : parent.appendChild(style[i])\n }\n } else {\n ret = []\n vnode.forEach((item, index) => {\n let ele = idiff(index === 0 ? dom : null, item, component, updateSelf)\n ret.push(ele)\n })\n }\n } else {\n if (isArray(dom)) {\n dom.forEach((one, index) => {\n if (index === 0) {\n ret = idiff(one, vnode, component, updateSelf)\n } else {\n recollectNodeTree(one, false)\n }\n })\n } else {\n ret = idiff(dom, vnode, component, updateSelf)\n }\n // append the element if its a new parent\n if (parent && ret.parentNode !== parent) parent.appendChild(ret)\n }\n\n // diffLevel being reduced to 0 means we're exiting the diff\n if (!--diffLevel) {\n hydrating = false\n // invoke queued componentDidMount lifecycle methods\n }\n\n return ret\n}\n\n/** Internals of `diff()`, separated to allow bypassing diffLevel / mount flushing. */\nfunction idiff(dom, vnode, component, updateSelf) {\n if (dom && vnode && dom.props) {\n dom.props.children = vnode.children\n }\n let out = dom,\n prevSvgMode = isSvgMode\n\n // empty values (null, undefined, booleans) render as empty Text nodes\n if (vnode == null || typeof vnode === 'boolean') vnode = ''\n\n // Fast case: Strings & Numbers create/update Text nodes.\n if (typeof vnode === 'string' || typeof vnode === 'number') {\n // update if it's already a Text node:\n if (\n dom &&\n dom.splitText !== undefined &&\n dom.parentNode &&\n (!dom._component || component)\n ) {\n /* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */\n if (dom.nodeValue != vnode) {\n dom.nodeValue = vnode\n }\n } else {\n // it wasn't a Text node: replace it with one and recycle the old Element\n out = document.createTextNode(vnode)\n if (dom) {\n if (dom.parentNode) dom.parentNode.replaceChild(out, dom)\n recollectNodeTree(dom, true)\n }\n }\n\n out[ATTR_KEY] = true\n\n return out\n }\n\n // If the VNode represents a Component, perform a component diff:\n let vnodeName = vnode.nodeName\n if (typeof vnodeName === 'function') {\n for (let key in options.mapping) {\n if (options.mapping[key] === vnodeName) {\n vnodeName = key\n vnode.nodeName = key\n break\n }\n }\n }\n // Tracks entering and exiting SVG namespace when descending through the tree.\n isSvgMode =\n vnodeName === 'svg'\n ? true\n : vnodeName === 'foreignObject'\n ? false\n : isSvgMode\n\n // If there's no existing element or it's the wrong type, create a new one:\n vnodeName = String(vnodeName)\n if (!dom || !isNamedNode(dom, vnodeName)) {\n out = createNode(vnodeName, isSvgMode)\n\n if (dom) {\n // move children into the replacement node\n while (dom.firstChild) out.appendChild(dom.firstChild)\n\n // if the previous Element was mounted into the DOM, replace it inline\n if (dom.parentNode) dom.parentNode.replaceChild(out, dom)\n\n // recycle the old element (skips non-Element node types)\n recollectNodeTree(dom, true)\n }\n }\n\n let fc = out.firstChild,\n props = out[ATTR_KEY],\n vchildren = vnode.children\n\n if (props == null) {\n props = out[ATTR_KEY] = {}\n for (let a = out.attributes, i = a.length; i--;)\n props[a[i].name] = a[i].value\n }\n\n // Optimization: fast-path for elements containing a single TextNode:\n if (\n !hydrating &&\n vchildren &&\n vchildren.length === 1 &&\n typeof vchildren[0] === 'string' &&\n fc != null &&\n fc.splitText !== undefined &&\n fc.nextSibling == null\n ) {\n if (fc.nodeValue != vchildren[0]) {\n fc.nodeValue = vchildren[0]\n }\n }\n // otherwise, if there are existing or new children, diff them:\n else if ((vchildren && vchildren.length) || fc != null) {\n if (!(out.constructor.is == 'WeElement' && out.constructor.noSlot)) {\n innerDiffNode(\n out,\n vchildren,\n hydrating || props.dangerouslySetInnerHTML != null,\n component,\n updateSelf\n )\n }\n }\n\n // Apply attributes/props from VNode to the DOM Element:\n diffAttributes(out, vnode.attributes, props, component, updateSelf)\n if (out.props) {\n out.props.children = vnode.children\n }\n // restore previous SVG mode: (in case we're exiting an SVG namespace)\n isSvgMode = prevSvgMode\n\n return out\n}\n\n/** Apply child and attribute changes between a VNode and a DOM Node to the DOM.\n *\t@param {Element} dom\t\t\tElement whose children should be compared & mutated\n *\t@param {Array} vchildren\t\tArray of VNodes to compare to `dom.childNodes`\n *\t@param {Boolean} isHydrating\tIf `true`, consumes externally created elements similar to hydration\n */\nfunction innerDiffNode(dom, vchildren, isHydrating, component, updateSelf) {\n let originalChildren = dom.childNodes,\n children = [],\n keyed = {},\n keyedLen = 0,\n min = 0,\n len = originalChildren.length,\n childrenLen = 0,\n vlen = vchildren ? vchildren.length : 0,\n j,\n c,\n f,\n vchild,\n child\n\n // Build up a map of keyed children and an Array of unkeyed children:\n if (len !== 0) {\n for (let i = 0; i < len; i++) {\n let child = originalChildren[i],\n props = child[ATTR_KEY],\n key =\n vlen && props\n ? child._component\n ? child._component.__key\n : props.key\n : null\n if (key != null) {\n keyedLen++\n keyed[key] = child\n } else if (\n props ||\n (child.splitText !== undefined\n ? isHydrating\n ? child.nodeValue.trim()\n : true\n : isHydrating)\n ) {\n children[childrenLen++] = child\n }\n }\n }\n\n if (vlen !== 0) {\n for (let i = 0; i < vlen; i++) {\n vchild = vchildren[i]\n child = null\n\n // attempt to find a node based on key matching\n let key = vchild.key\n if (key != null) {\n if (keyedLen && keyed[key] !== undefined) {\n child = keyed[key]\n keyed[key] = undefined\n keyedLen--\n }\n }\n // attempt to pluck a node of the same type from the existing children\n else if (!child && min < childrenLen) {\n for (j = min; j < childrenLen; j++) {\n if (\n children[j] !== undefined &&\n isSameNodeType((c = children[j]), vchild, isHydrating)\n ) {\n child = c\n children[j] = undefined\n if (j === childrenLen - 1) childrenLen--\n if (j === min) min++\n break\n }\n }\n }\n\n // morph the matched/found/created DOM child to match vchild (deep)\n child = idiff(child, vchild, component, updateSelf)\n\n f = originalChildren[i]\n if (child && child !== dom && child !== f) {\n if (f == null) {\n dom.appendChild(child)\n } else if (child === f.nextSibling) {\n removeNode(f)\n } else {\n dom.insertBefore(child, f)\n }\n }\n }\n }\n\n // remove unused keyed children:\n if (keyedLen) {\n for (let i in keyed)\n if (keyed[i] !== undefined) recollectNodeTree(keyed[i], false)\n }\n\n // remove orphaned unkeyed children:\n while (min <= childrenLen) {\n if ((child = children[childrenLen--]) !== undefined)\n recollectNodeTree(child, false)\n }\n}\n\n/** Recursively recycle (or just unmount) a node and its descendants.\n *\t@param {Node} node\t\t\t\t\t\tDOM node to start unmount/removal from\n *\t@param {Boolean} [unmountOnly=false]\tIf `true`, only triggers unmount lifecycle, skips removal\n */\nexport function recollectNodeTree(node, unmountOnly) {\n // If the node's VNode had a ref function, invoke it with null here.\n // (this is part of the React spec, and smart for unsetting references)\n if (node[ATTR_KEY] != null && node[ATTR_KEY].ref) {\n if (typeof node[ATTR_KEY].ref === 'function') {\n node[ATTR_KEY].ref(null)\n } else if (node[ATTR_KEY].ref.current) {\n node[ATTR_KEY].ref.current = null\n }\n }\n\n if (unmountOnly === false || node[ATTR_KEY] == null) {\n removeNode(node)\n }\n\n removeChildren(node)\n}\n\n/** Recollect/unmount all children.\n *\t- we use .lastChild here because it causes less reflow than .firstChild\n *\t- it's also cheaper than accessing the .childNodes Live NodeList\n */\nexport function removeChildren(node) {\n node = node.lastChild\n while (node) {\n let next = node.previousSibling\n recollectNodeTree(node, true)\n node = next\n }\n}\n\n/** Apply differences in attributes from a VNode to the given DOM Element.\n *\t@param {Element} dom\t\tElement with attributes to diff `attrs` against\n *\t@param {Object} attrs\t\tThe desired end-state key-value attribute pairs\n *\t@param {Object} old\t\t\tCurrent/previous attributes (from previous VNode or element's prop cache)\n */\nfunction diffAttributes(dom, attrs, old, component, updateSelf) {\n let name\n //let update = false\n let isWeElement = dom.update\n let oldClone\n if (dom.receiveProps) {\n oldClone = Object.assign({}, old)\n }\n // remove attributes no longer present on the vnode by setting them to undefined\n for (name in old) {\n if (!(attrs && attrs[name] != null) && old[name] != null) {\n setAccessor(dom, name, old[name], (old[name] = undefined), isSvgMode, component)\n if (isWeElement) {\n delete dom.props[name]\n //update = true\n }\n }\n }\n\n // add new & update changed attributes\n for (name in attrs) {\n if (isWeElement && typeof attrs[name] === 'object' && name !== 'ref') {\n if (name === 'style') {\n setAccessor(dom, name, old[name], (old[name] = attrs[name]), isSvgMode, component)\n }\n let ccName = camelCase(name)\n dom.props[ccName] = old[ccName] = attrs[name]\n //update = true\n } else if (\n name !== 'children' &&\n (!(name in old) ||\n attrs[name] !==\n (name === 'value' || name === 'checked' ? dom[name] : old[name]))\n ) {\n setAccessor(dom, name, old[name], attrs[name], isSvgMode, component)\n if (isWeElement) {\n let ccName = camelCase(name)\n dom.props[ccName] = old[ccName] = attrs[name]\n //update = true\n } else {\n old[name] = attrs[name]\n }\n }\n }\n\n if (isWeElement && !updateSelf && dom.parentNode) {\n //__hasChildren is not accuracy when it was empty at first, so add dom.children.length > 0 condition\n //if (update || dom.__hasChildren || dom.children.length > 0 || (dom.store && !dom.store.data)) {\n if (dom.receiveProps(dom.props, oldClone) !== false) {\n dom.update()\n }\n //}\n }\n}\n","import {\n\tcssToDom,\n\tisArray,\n\tgetUse,\n\thyphenate,\n\tgetValByPath,\n\tremoveItem\n} from './util'\nimport { diff } from './vdom/diff'\nimport options from './options'\nimport { getPath } from './util'\n\nlet id = 0\n\nexport default class WeElement extends HTMLElement {\n\tstatic is = 'WeElement'\n\n\tconstructor() {\n\t\tsuper()\n\t\tthis.props = Object.assign({},\n\t\t\tthis.constructor.defaultProps\n\t\t)\n\t\tthis.elementId = id++\n\t}\n\n\tconnectedCallback() {\n\t\tlet p = this.parentNode\n\t\twhile (p && !this.store) {\n\t\t\tthis.store = p.store\n\t\t\tp = p.parentNode || p.host\n\t\t}\n\n\t\tif (this.use) {\n\t\t\tlet use\n\t\t\tif (typeof this.use === 'function') {\n\t\t\t\tuse = this.use()\n\t\t\t} else {\n\t\t\t\tuse = this.use\n\t\t\t}\n\n\n\t\t\tif (options.isMultiStore) {\n\t\t\t\tlet _updatePath = {}\n\t\t\t\tlet using = {}\n\t\t\t\tfor (let storeName in use) {\n\t\t\t\t\t_updatePath[storeName] = {}\n\t\t\t\t\tusing[storeName] = {}\n\t\t\t\t\tgetPath(use[storeName], _updatePath, storeName)\n\t\t\t\t\tgetUse(this.store[storeName].data, use[storeName], using, storeName)\n\t\t\t\t\tthis.store[storeName].instances.push(this)\n\t\t\t\t}\n\t\t\t\tthis.using = using\n\t\t\t\tthis._updatePath = _updatePath\n\t\t\t} else {\n\t\t\t\tthis._updatePath = getPath(use)\n\t\t\t\tthis.using = getUse(this.store.data, use)\n\t\t\t\tthis.store.instances.push(this)\n\t\t\t}\n\t\t}\n\t\tif (this.useSelf) {\n\t\t\tconst use = typeof this.useSelf === 'function' ? this.useSelf() : this.useSelf\n\t\t\tif (options.isMultiStore) {\n\t\t\t\tlet _updatePath = {}\n\t\t\t\tlet using = {}\n\t\t\t\tfor (let storeName in use) {\n\t\t\t\t\tgetPath(use[storeName], _updatePath, storeName)\n\t\t\t\t\tgetUse(this.store[storeName].data, use[storeName], using, storeName)\n\t\t\t\t\tthis.store[storeName].updateSelfInstances.push(this)\n\t\t\t\t}\n\t\t\t\tthis.usingSelf = using\n\t\t\t\tthis._updateSelfPath = _updatePath\n\t\t\t} else {\n\t\t\t\tthis._updateSelfPath = getPath(use)\n\t\t\t\tthis.usingSelf = getUse(this.store.data, use)\n\t\t\t\tthis.store.updateSelfInstances.push(this)\n\t\t\t}\n\t\t}\n\t\tthis.attrsToProps()\n\t\tthis.beforeInstall()\n\t\tthis.install()\n\t\tthis.afterInstall()\n\n\t\tlet shadowRoot\n\t\tif (!this.shadowRoot) {\n\t\t\tshadowRoot = this.attachShadow({\n\t\t\t\tmode: 'open'\n\t\t\t})\n\t\t} else {\n\t\t\tshadowRoot = this.shadowRoot\n\t\t\tlet fc\n\t\t\twhile ((fc = shadowRoot.firstChild)) {\n\t\t\t\tshadowRoot.removeChild(fc)\n\t\t\t}\n\t\t}\n\n\t\tif (this.constructor.css) {\n\t\t\tshadowRoot.appendChild(cssToDom(this.constructor.css))\n\t\t} else if (this.css) {\n\t\t\tshadowRoot.appendChild(cssToDom(typeof this.css === 'function' ? this.css() : this.css))\n\t\t}\n\t\tthis.beforeRender()\n\t\toptions.afterInstall && options.afterInstall(this)\n\n\n\t\tconst rendered = this.render(this.props, this.store)\n\t\tthis.__hasChildren = Object.prototype.toString.call(rendered) === '[object Array]' && rendered.length > 0\n\n\t\tthis.rootNode = diff(\n\t\t\tnull,\n\t\t\trendered,\n\t\t\tnull,\n\t\t\tthis\n\t\t)\n\t\tthis.rendered()\n\n\t\tif (this.props.css) {\n\t\t\tthis._customStyleElement = cssToDom(this.props.css)\n\t\t\tthis._customStyleContent = this.props.css\n\t\t\tshadowRoot.appendChild(this._customStyleElement)\n\t\t}\n\n\t\tif (isArray(this.rootNode)) {\n\t\t\tthis.rootNode.forEach(function (item) {\n\t\t\t\tshadowRoot.appendChild(item)\n\t\t\t})\n\t\t} else {\n\t\t\tshadowRoot.appendChild(this.rootNode)\n\t\t}\n\t\tthis.installed()\n\t\tthis._isInstalled = true\n\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.uninstall()\n\t\tthis._isInstalled = false\n\t\tif (this.store) {\n\t\t\tif(options.isMultiStore){\n\t\t\t\tfor(let key in this.store){\n\t\t\t\t\tconst current = this.store[key]\n\t\t\t\t\tremoveItem(this, current.instances)\n\t\t\t\t removeItem(this, current.updateSelfInstances)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tremoveItem(this, this.store.instances)\n\t\t\t\tremoveItem(this, this.store.updateSelfInstances)\n\t\t\t}\n\t\t}\n\t}\n\n\tupdate(ignoreAttrs, updateSelf) {\n\t\tthis._willUpdate = true\n\t\tthis.beforeUpdate()\n\t\tthis.beforeRender()\n\t\t//fix null !== undefined\n\t\tif (this._customStyleContent != this.props.css) {\n\t\t\tthis._customStyleContent = this.props.css\n\t\t\tthis._customStyleElement.textContent = this._customStyleContent\n\t\t}\n\t\tthis.attrsToProps(ignoreAttrs)\n\n\t\tconst rendered = this.render(this.props, this.store)\n\t\tthis.rendered()\n\t\tthis.__hasChildren = this.__hasChildren || (Object.prototype.toString.call(rendered) === '[object Array]' && rendered.length > 0)\n\n\t\tthis.rootNode = diff(\n\t\t\tthis.rootNode,\n\t\t\trendered,\n\t\t\tthis.shadowRoot,\n\t\t\tthis,\n\t\t\tupdateSelf\n\t\t)\n\t\tthis._willUpdate = false\n\t\tthis.updated()\n\n\t}\n\n\tupdateSelf(ignoreAttrs) {\n\t\tthis.update(ignoreAttrs, true)\n\t}\n\n\tremoveAttribute(key) {\n\t\tsuper.removeAttribute(key)\n\t\t//Avoid executing removeAttribute methods before connectedCallback\n\t\tthis._isInstalled && this.update()\n\t}\n\n\tsetAttribute(key, val) {\n\t\tif (val && typeof val === 'object') {\n\t\t\tsuper.setAttribute(key, JSON.stringify(val))\n\t\t} else {\n\t\t\tsuper.setAttribute(key, val)\n\t\t}\n\t\t//Avoid executing setAttribute methods before connectedCallback\n\t\tthis._isInstalled && this.update()\n\t}\n\n\tpureRemoveAttribute(key) {\n\t\tsuper.removeAttribute(key)\n\t}\n\n\tpureSetAttribute(key, val) {\n\t\tsuper.setAttribute(key, val)\n\t}\n\n\tattrsToProps(ignoreAttrs) {\n\t\tconst ele = this\n\t\tif (ele.normalizedNodeName || ignoreAttrs) return\n\t\tele.props['css'] = ele.getAttribute('css')\n\t\tconst attrs = this.constructor.propTypes\n\t\tif (!attrs) return\n\t\tObject.keys(attrs).forEach(key => {\n\t\t\tconst type = attrs[key]\n\t\t\tconst val = ele.getAttribute(hyphenate(key))\n\t\t\tif (val !== null) {\n\t\t\t\tswitch (type) {\n\t\t\t\t\tcase String:\n\t\t\t\t\t\tele.props[key] = val\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Number:\n\t\t\t\t\t\tele.props[key] = Number(val)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Boolean:\n\t\t\t\t\t\tif (val === 'false' || val === '0') {\n\t\t\t\t\t\t\tele.props[key] = false\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tele.props[key] = true\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Array:\n\t\t\t\t\tcase Object:\n\t\t\t\t\t\tif (val[0] === ':') {\n\t\t\t\t\t\t\tele.props[key] = getValByPath(val.substr(1), Omi.$)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tele.props[key] = JSON.parse(val\n\t\t\t\t\t\t\t\t.replace(/(['\"])?([a-zA-Z0-9_-]+)(['\"])?:([^\\/])/g, '\"$2\":$4')\n\t\t\t\t\t\t\t\t.replace(/'([\\s\\S]*?)'/g, '\"$1\"')\n\t\t\t\t\t\t\t\t.replace(/,(\\s*})/g, '$1')\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (ele.constructor.defaultProps && ele.constructor.defaultProps.hasOwnProperty(key)) {\n\t\t\t\t\tele.props[key] = ele.constructor.defaultProps[key]\n\t\t\t\t} else {\n\t\t\t\t\tele.props[key] = null\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\tfire(name, data) {\n\t\tthis.dispatchEvent(new CustomEvent(name, {\n\t\t\tdetail: data\n\t\t}))\n\t}\n\n\tbeforeInstall() {}\n\n\tinstall() {}\n\n\tafterInstall() {}\n\n\tinstalled() {}\n\n\tuninstall() {}\n\n\tbeforeUpdate() {}\n\n\tupdated() {}\n\n\tbeforeRender() {}\n\n\trendered() {}\n\n\treceiveProps() {}\n\n}\n","/*!\n * https://github.com/Palindrom/JSONPatcherProxy\n * (c) 2017 Starcounter\n * MIT license\n */\n\n/** Class representing a JS Object observer */\nconst JSONPatcherProxy = (function() {\n /**\n * Deep clones your object and returns a new object.\n */\n function deepClone(obj) {\n switch (typeof obj) {\n case 'object':\n return JSON.parse(JSON.stringify(obj)) //Faster than ES5 clone - http://jsperf.com/deep-cloning-of-objects/5\n case 'undefined':\n return null //this is how JSON.stringify behaves for array items\n default:\n return obj //no need to clone primitives\n }\n }\n JSONPatcherProxy.deepClone = deepClone\n\n function escapePathComponent(str) {\n if (str.indexOf('/') == -1 && str.indexOf('~') == -1) return str\n return str.replace(/~/g, '~0').replace(/\\//g, '~1')\n }\n JSONPatcherProxy.escapePathComponent = escapePathComponent\n\n /**\n * Walk up the parenthood tree to get the path\n * @param {JSONPatcherProxy} instance\n * @param {Object} obj the object you need to find its path\n */\n function findObjectPath(instance, obj) {\n const pathComponents = []\n let parentAndPath = instance.parenthoodMap.get(obj)\n while (parentAndPath && parentAndPath.path) {\n // because we're walking up-tree, we need to use the array as a stack\n pathComponents.unshift(parentAndPath.path)\n parentAndPath = instance.parenthoodMap.get(parentAndPath.parent)\n }\n if (pathComponents.length) {\n const path = pathComponents.join('/')\n return '/' + path\n }\n return ''\n }\n /**\n * A callback to be used as th proxy set trap callback.\n * It updates parenthood map if needed, proxifies nested newly-added objects, calls default callbacks with the changes occurred.\n * @param {JSONPatcherProxy} instance JSONPatcherProxy instance\n * @param {Object} target the affected object\n * @param {String} key the effect property's name\n * @param {Any} newValue the value being set\n */\n function setTrap(instance, target, key, newValue) {\n const parentPath = findObjectPath(instance, target)\n\n const destinationPropKey = parentPath + '/' + escapePathComponent(key)\n\n if (instance.proxifiedObjectsMap.has(newValue)) {\n const newValueOriginalObject = instance.proxifiedObjectsMap.get(newValue)\n\n instance.parenthoodMap.set(newValueOriginalObject.originalObject, {\n parent: target,\n path: key\n })\n }\n /*\n mark already proxified values as inherited.\n rationale: proxy.arr.shift()\n will emit\n {op: replace, path: '/arr/1', value: arr_2}\n {op: remove, path: '/arr/2'}\n\n by default, the second operation would revoke the proxy, and this renders arr revoked.\n That's why we need to remember the proxies that are inherited.\n */\n const revokableInstance = instance.proxifiedObjectsMap.get(newValue)\n /*\n Why do we need to check instance.isProxifyingTreeNow?\n\n We need to make sure we mark revokables as inherited ONLY when we're observing,\n because throughout the first proxification, a sub-object is proxified and then assigned to\n its parent object. This assignment of a pre-proxified object can fool us into thinking\n that it's a proxified object moved around, while in fact it's the first assignment ever.\n\n Checking isProxifyingTreeNow ensures this is not happening in the first proxification,\n but in fact is is a proxified object moved around the tree\n */\n if (revokableInstance && !instance.isProxifyingTreeNow) {\n revokableInstance.inherited = true\n }\n\n // if the new value is an object, make sure to watch it\n if (\n newValue &&\n typeof newValue == 'object' &&\n !instance.proxifiedObjectsMap.has(newValue)\n ) {\n instance.parenthoodMap.set(newValue, {\n parent: target,\n path: key\n })\n newValue = instance._proxifyObjectTreeRecursively(target, newValue, key)\n }\n // let's start with this operation, and may or may not update it later\n const operation = {\n op: 'remove',\n path: destinationPropKey\n }\n if (typeof newValue == 'undefined') {\n // applying De Morgan's laws would be a tad faster, but less readable\n if (!Array.isArray(target) && !target.hasOwnProperty(key)) {\n // `undefined` is being set to an already undefined value, keep silent\n return Reflect.set(target, key, newValue)\n }\n // when array element is set to `undefined`, should generate replace to `null`\n if (Array.isArray(target)) {\n // undefined array elements are JSON.stringified to `null`\n ;(operation.op = 'replace'), (operation.value = null)\n }\n const oldValue = instance.proxifiedObjectsMap.get(target[key])\n // was the deleted a proxified object?\n if (oldValue) {\n instance.parenthoodMap.delete(target[key])\n instance.disableTrapsForProxy(oldValue)\n instance.proxifiedObjectsMap.delete(oldValue)\n }\n } else {\n if (Array.isArray(target) && !Number.isInteger(+key.toString())) {\n /* array props (as opposed to indices) don't emit any patches, to avoid needless `length` patches */\n if (key != 'length') {\n console.warn(\n 'JSONPatcherProxy noticed a non-integer prop was set for an array. This will not emit a patch'\n )\n }\n return Reflect.set(target, key, newValue)\n }\n operation.op = 'add'\n if (target.hasOwnProperty(key)) {\n if (typeof target[key] !== 'undefined' || Array.isArray(target)) {\n operation.op = 'replace' // setting `undefined` array elements is a `replace` op\n }\n }\n operation.value = newValue\n }\n operation.oldValue = target[key]\n const reflectionResult = Reflect.set(target, key, newValue)\n instance.defaultCallback(operation)\n return reflectionResult\n }\n /**\n * A callback to be used as th proxy delete trap callback.\n * It updates parenthood map if needed, calls default callbacks with the changes occurred.\n * @param {JSONPatcherProxy} instance JSONPatcherProxy instance\n * @param {Object} target the effected object\n * @param {String} key the effected property's name\n */\n function deleteTrap(instance, target, key) {\n if (typeof target[key] !== 'undefined') {\n const parentPath = findObjectPath(instance, target)\n const destinationPropKey = parentPath + '/' + escapePathComponent(key)\n\n const revokableProxyInstance = instance.proxifiedObjectsMap.get(\n target[key]\n )\n\n if (revokableProxyInstance) {\n if (revokableProxyInstance.inherited) {\n /*\n this is an inherited proxy (an already proxified object that was moved around),\n we shouldn't revoke it, because even though it was removed from path1, it is still used in path2.\n And we know that because we mark moved proxies with `inherited` flag when we move them\n\n it is a good idea to remove this flag if we come across it here, in deleteProperty trap.\n We DO want to revoke the proxy if it was removed again.\n */\n revokableProxyInstance.inherited = false\n } else {\n instance.parenthoodMap.delete(revokableProxyInstance.originalObject)\n instance.disableTrapsForProxy(revokableProxyInstance)\n instance.proxifiedObjectsMap.delete(target[key])\n }\n }\n const reflectionResult = Reflect.deleteProperty(target, key)\n\n instance.defaultCallback({\n op: 'remove',\n path: destinationPropKey\n })\n\n return reflectionResult\n }\n }\n /* pre-define resume and pause functions to enhance constructors performance */\n function resume() {\n this.defaultCallback = operation => {\n this.isRecording && this.patches.push(operation)\n this.userCallback && this.userCallback(operation)\n }\n this.isObserving = true\n }\n function pause() {\n this.defaultCallback = () => {}\n this.isObserving = false\n }\n /**\n * Creates an instance of JSONPatcherProxy around your object of interest `root`.\n * @param {Object|Array} root - the object you want to wrap\n * @param {Boolean} [showDetachedWarning = true] - whether to log a warning when a detached sub-object is modified @see {@link https://github.com/Palindrom/JSONPatcherProxy#detached-objects}\n * @returns {JSONPatcherProxy}\n * @constructor\n */\n function JSONPatcherProxy(root, showDetachedWarning) {\n this.isProxifyingTreeNow = false\n this.isObserving = false\n this.proxifiedObjectsMap = new Map()\n this.parenthoodMap = new Map()\n // default to true\n if (typeof showDetachedWarning !== 'boolean') {\n showDetachedWarning = true\n }\n\n this.showDetachedWarning = showDetachedWarning\n this.originalObject = root\n this.cachedProxy = null\n this.isRecording = false\n this.userCallback\n /**\n * @memberof JSONPatcherProxy\n * Restores callback back to the original one provided to `observe`.\n */\n this.resume = resume.bind(this)\n /**\n * @memberof JSONPatcherProxy\n * Replaces your callback with a noop function.\n */\n this.pause = pause.bind(this)\n }\n\n JSONPatcherProxy.prototype.generateProxyAtPath = function(parent, obj, path) {\n if (!obj) {\n return obj\n }\n const traps = {\n set: (target, key, value, receiver) =>\n setTrap(this, target, key, value, receiver),\n deleteProperty: (target, key) => deleteTrap(this, target, key)\n }\n const revocableInstance = Proxy.revocable(obj, traps)\n // cache traps object to disable them later.\n revocableInstance.trapsInstance = traps\n revocableInstance.originalObject = obj\n\n /* keeping track of object's parent and path */\n\n this.parenthoodMap.set(obj, { parent, path })\n\n /* keeping track of all the proxies to be able to revoke them later */\n this.proxifiedObjectsMap.set(revocableInstance.proxy, revocableInstance)\n return revocableInstance.proxy\n }\n // grab tree's leaves one by one, encapsulate them into a proxy and return\n JSONPatcherProxy.prototype._proxifyObjectTreeRecursively = function(\n parent,\n root,\n path\n ) {\n for (let key in root) {\n if (root.hasOwnProperty(key)) {\n if (root[key] instanceof Object) {\n root[key] = this._proxifyObjectTreeRecursively(\n root,\n root[key],\n escapePathComponent(key)\n )\n }\n }\n }\n return this.generateProxyAtPath(parent, root, path)\n }\n // this function is for aesthetic purposes\n JSONPatcherProxy.prototype.proxifyObjectTree = function(root) {\n /*\n while proxyifying object tree,\n the proxyifying operation itself is being\n recorded, which in an unwanted behavior,\n that's why we disable recording through this\n initial process;\n */\n this.pause()\n this.isProxifyingTreeNow = true\n const proxifiedObject = this._proxifyObjectTreeRecursively(\n undefined,\n root,\n ''\n )\n /* OK you can record now */\n this.isProxifyingTreeNow = false\n this.resume()\n return proxifiedObject\n }\n /**\n * Turns a proxified object into a forward-proxy object; doesn't emit any patches anymore, like a normal object\n * @param {Proxy} proxy - The target proxy object\n */\n JSONPatcherProxy.prototype.disableTrapsForProxy = function(\n revokableProxyInstance\n ) {\n if (this.showDetachedWarning) {\n const message =\n \"You're accessing an object that is detached from the observedObject tree, see https://github.com/Palindrom/JSONPatcherProxy#detached-objects\"\n\n revokableProxyInstance.trapsInstance.set = (\n targetObject,\n propKey,\n newValue\n ) => {\n console.warn(message)\n return Reflect.set(targetObject, propKey, newValue)\n }\n revokableProxyInstance.trapsInstance.set = (\n targetObject,\n propKey,\n newValue\n ) => {\n console.warn(message)\n return Reflect.set(targetObject, propKey, newValue)\n }\n revokableProxyInstance.trapsInstance.deleteProperty = (\n targetObject,\n propKey\n ) => {\n return Reflect.deleteProperty(targetObject, propKey)\n }\n } else {\n delete revokableProxyInstance.trapsInstance.set\n delete revokableProxyInstance.trapsInstance.get\n delete revokableProxyInstance.trapsInstance.deleteProperty\n }\n }\n /**\n * Proxifies the object that was passed in the constructor and returns a proxified mirror of it. Even though both parameters are options. You need to pass at least one of them.\n * @param {Boolean} [record] - whether to record object changes to a later-retrievable patches array.\n * @param {Function} [callback] - this will be synchronously called with every object change with a single `patch` as the only parameter.\n */\n JSONPatcherProxy.prototype.observe = function(record, callback) {\n if (!record && !callback) {\n throw new Error('You need to either record changes or pass a callback')\n }\n this.isRecording = record\n this.userCallback = callback\n /*\n I moved it here to remove it from `unobserve`,\n this will also make the constructor faster, why initiate\n the array before they decide to actually observe with recording?\n They might need to use only a callback.\n */\n if (record) this.patches = []\n this.cachedProxy = this.proxifyObjectTree(this.originalObject)\n return this.cachedProxy\n }\n /**\n * If the observed is set to record, it will synchronously return all the patches and empties patches array.\n */\n JSONPatcherProxy.prototype.generate = function() {\n if (!this.isRecording) {\n throw new Error('You should set record to true to get patches later')\n }\n return this.patches.splice(0, this.patches.length)\n }\n /**\n * Revokes all proxies rendering the observed object useless and good for garbage collection @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/revocable}\n */\n JSONPatcherProxy.prototype.revoke = function() {\n this.proxifiedObjectsMap.forEach(el => {\n el.revoke()\n })\n }\n /**\n * Disables all proxies' traps, turning the observed object into a forward-proxy object, like a normal object that you can modify silently.\n */\n JSONPatcherProxy.prototype.disableTraps = function() {\n this.proxifiedObjectsMap.forEach(this.disableTrapsForProxy, this)\n }\n return JSONPatcherProxy\n})()\n\nexport default JSONPatcherProxy\n","import { diff } from './vdom/diff'\nimport JSONProxy from './proxy'\nimport { getUse } from './util'\nimport options from './options'\n\nexport function render(vnode, parent, store) {\n\tparent = typeof parent === 'string' ? document.querySelector(parent) : parent\n\tif (store) {\n\t\tif (store.data) {\n\t\t\tobserveStore(store)\n\t\t} else {\n\t\t\toptions.isMultiStore = true\n\t\t\t//Multi-store injection\n\t\t\tfor (let key in store) {\n\t\t\t\tobserveStore(store[key], key)\n\t\t\t}\n\t\t}\n\t\tparent.store = store\n\t}\n\treturn diff(null, vnode, parent, false)\n}\n\nfunction observeStore(store, key) {\n\tstore.instances = []\n\tstore.updateSelfInstances = []\n\textendStoreUpate(store, key)\n\n\tstore.data = new JSONProxy(store.data).observe(false, function (patch) {\n\t\tconst patchs = {}\n\t\tif (patch.op === 'remove') {\n\t\t\t// fix arr splice\n\t\t\tconst kv = getArrayPatch(patch.path, store)\n\t\t\tpatchs[kv.k] = kv.v\n\n\t\t\tupdate(patchs, store)\n\n\t\t} else {\n\t\t\tconst key = fixPath(patch.path)\n\t\t\tpatchs[key] = patch.value\n\n\t\t\tupdate(patchs, store)\n\n\t\t}\n\t})\n}\n\nfunction update(patch, store) {\n\tstore.update(patch)\n}\n\nfunction extendStoreUpate(store, key) {\n\tstore.update = function (patch) {\n\t\tif (Object.keys(patch).length > 0) {\n\t\t\tthis.instances.forEach(instance => {\n\t\t\t\tif (key) {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updatePath && instance._updatePath[key] && needUpdate(patch, instance._updatePath[key]))) {\n\t\t\t\t\t\tif (instance.use) {\n\t\t\t\t\t\t\tgetUse(store.data, (typeof instance.use === 'function' ? instance.use() : instance.use)[key], instance.using, key)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.update()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updatePath && needUpdate(patch, instance._updatePath))) {\n\t\t\t\t\t\tif (instance.use) {\n\t\t\t\t\t\t\tinstance.using = getUse(store.data, typeof instance.use === 'function' ? instance.use() : instance.use)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.update()\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t})\n\n\t\t\tthis.updateSelfInstances.forEach(instance => {\n\t\t\t\tif (key) {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updateSelfPath && instance._updateSelfPath[key] && needUpdate(patch, instance._updateSelfPath[key]))) {\n\t\t\t\t\t\tif (instance.useSelf) {\n\t\t\t\t\t\t\tgetUse(store.data, (typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)[key], instance.usingSelf, key)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.updateSelf()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (instance._updateSelfPath && needUpdate(patch, instance._updateSelfPath)) {\n\t\t\t\t\t\tinstance.usingSelf = getUse(store.data, typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)\n\t\t\t\t\t\tinstance.updateSelf()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\tthis.onChange && this.onChange(patch)\n\t\t}\n\t}\n}\n\n\nexport function needUpdate(diffResult, updatePath) {\n\tfor (let keyA in diffResult) {\n\t\tif (updatePath[keyA]) {\n\t\t\treturn true\n\t\t}\n\t\tfor (let keyB in updatePath) {\n\t\t\tif (includePath(keyA, keyB)) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t}\n\treturn false\n}\n\nfunction includePath(pathA, pathB) {\n\tif (pathA.indexOf(pathB) === 0) {\n\t\tconst next = pathA.substr(pathB.length, 1)\n\t\tif (next === '[' || next === '.') {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nexport function fixPath(path) {\n\tlet mpPath = ''\n\tconst arr = path.replace('/', '').split('/')\n\tarr.forEach((item, index) => {\n\t\tif (index) {\n\t\t\tif (isNaN(Number(item))) {\n\t\t\t\tmpPath += '.' + item\n\t\t\t} else {\n\t\t\t\tmpPath += '[' + item + ']'\n\t\t\t}\n\t\t} else {\n\t\t\tmpPath += item\n\t\t}\n\t})\n\treturn mpPath\n}\n\nfunction getArrayPatch(path, store) {\n\tconst arr = path.replace('/', '').split('/')\n\tlet current = store.data[arr[0]]\n\tfor (let i = 1, len = arr.length; i < len - 1; i++) {\n\t\tcurrent = current[arr[i]]\n\t}\n\treturn {\n\t\tk: fixArrPath(path),\n\t\tv: current\n\t}\n}\n\nfunction fixArrPath(path) {\n\tlet mpPath = ''\n\tconst arr = path.replace('/', '').split('/')\n\tconst len = arr.length\n\tarr.forEach((item, index) => {\n\t\tif (index < len - 1) {\n\t\t\tif (index) {\n\t\t\t\tif (isNaN(Number(item))) {\n\t\t\t\t\tmpPath += '.' + item\n\t\t\t\t} else {\n\t\t\t\t\tmpPath += '[' + item + ']'\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmpPath += item\n\t\t\t}\n\t\t}\n\t})\n\treturn mpPath\n}\n","import WeElement from './we-element'\nimport options from './options'\n\nexport function define(name, ctor, config) {\n if (options.mapping[name]) {\n return\n }\n if (ctor.is === 'WeElement') {\n customElements.define(name, ctor)\n options.mapping[name] = ctor\n\n } else {\n \n if (typeof config === 'string') {\n config = { css: config }\n } else {\n config = config || { }\n }\n\n class Ele extends WeElement {\n\n static css = config.css\n\n static propTypes = config.propTypes\n\n static defaultProps = config.defaultProps\n\n render() {\n return ctor.call(this, this)\n }\n\n receiveProps() {\n if (config.receiveProps) {\n return config.receiveProps.apply(this, arguments)\n }\n }\n }\n\n const eleHooks = ['install', 'installed', 'uninstall', 'beforeUpdate', 'updated', 'beforeRender', 'rendered'],\n storeHelpers = ['use', 'useSelf']\n\n eleHooks.forEach(hook => {\n if (config[hook]) {\n Ele.prototype[hook] = function () {\n config[hook].apply(this, arguments)\n }\n }\n })\n\n storeHelpers.forEach(func => {\n if (config[func]) {\n Ele.prototype[func] = function () {\n return typeof config[func] === 'function'\n ? config[func].apply(this, arguments)\n : config[func]\n }\n }\n })\n\n customElements.define(name, Ele)\n options.mapping[name] = Ele\n }\n}\n\n\n\n","import { define } from './define'\n\nexport function tag(name, pure) {\n return function(target) {\n target.pure = pure\n define(name, target)\n }\n}\n","import { extend } from './util'\nimport { h } from './h'\n\n/**\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\n * @param {VNode} vnode\t\tThe virtual DOM element to clone\n * @param {Object} props\tAttributes/props to add when cloning\n * @param {VNode} rest\t\tAny additional arguments will be used as replacement children.\n */\nexport function cloneElement(vnode, props) {\n return h(\n vnode.nodeName,\n extend(extend({}, vnode.attributes), props),\n arguments.length > 2 ? [].slice.call(arguments, 2) : vnode.children\n )\n}\n","export function getHost(ele) {\n let p = ele.parentNode\n while (p) {\n if (p.host) {\n return p.host\n } else if (p.shadowRoot && p.shadowRoot.host) {\n return p.shadowRoot.host\n } else {\n p = p.parentNode\n }\n }\n}\n","export function rpx(str) {\n return str.replace(/([1-9]\\d*|0)(\\.\\d*)*rpx/g, (a, b) => {\n return (window.innerWidth * Number(b)) / 750 + 'px'\n })\n}\n","/**\n * classNames based on https://github.com/JedWatson/classnames\n * by Jed Watson\n * Licensed under the MIT License\n * https://github.com/JedWatson/classnames/blob/master/LICENSE\n * modified by dntzhang\n */\n\nvar hasOwn = {}.hasOwnProperty\n\nexport function classNames() {\n var classes = []\n\n for (var i = 0; i < arguments.length; i++) {\n var arg = arguments[i]\n if (!arg) continue\n\n var argType = typeof arg\n\n if (argType === 'string' || argType === 'number') {\n classes.push(arg)\n } else if (Array.isArray(arg) && arg.length) {\n var inner = classNames.apply(null, arg)\n if (inner) {\n classes.push(inner)\n }\n } else if (argType === 'object') {\n for (var key in arg) {\n if (hasOwn.call(arg, key) && arg[key]) {\n classes.push(key)\n }\n }\n }\n }\n\n return classes.join(' ')\n}\n\nexport function extractClass() {\n const [props, ...args] = Array.prototype.slice.call(arguments, 0)\n if (props.class) {\n args.unshift(props.class)\n delete props.class\n } else if (props.className) {\n args.unshift(props.className)\n delete props.className\n }\n if (args.length > 0) {\n return { class: classNames.apply(null, args) }\n }\n}\n","export function o(obj){\n return JSON.stringify(obj)\n}","var n=function(t,r,u,e){for(var p=1;p\"===t?(a(),u=1):u&&(\"=\"===t?(u=4,r=e,e=\"\"):\"/\"===t?(a(),3===u&&(s=s[0]),u=s,(s=s[0]).push(u,4),u=0):\" \"===t||\"\\t\"===t||\"\\n\"===t||\"\\r\"===t?(a(),u=2):e+=t)}return a(),s},r=\"function\"==typeof Map,u=r?new Map:{},e=r?function(n){var r=u.get(n);return r||u.set(n,r=t(n)),r}:function(n){for(var r=\"\",e=0;e1?r:r[0]}\n","import { h, h as createElement } from './h'\nimport options from './options'\nimport WeElement from './we-element'\nimport { render } from './render'\nimport { define } from './define'\nimport { tag } from './tag'\nimport { cloneElement } from './clone-element'\nimport { getHost } from './get-host'\nimport { rpx } from './rpx'\nimport { classNames, extractClass } from './class'\nimport { o } from './o'\nimport htm from 'htm'\nimport { extend, get, set, bind, unbind } from './extend'\nimport JSONProxy from './proxy'\nimport { Fragment } from './util'\n\nh.f = Fragment\n\nconst html = htm.bind(h)\n\nfunction createRef() {\n return {}\n}\n\nconst $ = {}\nconst Component = WeElement\nconst defineElement = define\nconst elements = options.mapping\n\nconst omi = {\n tag,\n WeElement,\n Component,\n render,\n h,\n createElement,\n options,\n define,\n cloneElement,\n getHost,\n rpx,\n defineElement,\n classNames,\n extractClass,\n createRef,\n html,\n htm,\n o,\n\telements,\n\t$,\n\textend,\n\tget,\n\tset,\n\tbind,\n\tunbind,\n JSONProxy\n}\n\noptions.root.Omi = omi\noptions.root.omi = omi\noptions.root.Omi.version = '6.15.7'\n\nexport default omi\n\nexport {\n tag,\n WeElement,\n Component,\n render,\n h,\n createElement,\n options,\n define,\n cloneElement,\n getHost,\n rpx,\n defineElement,\n classNames,\n extractClass,\n createRef,\n html,\n htm,\n o,\n\telements,\n\t$,\n\textend,\n\tget,\n\tset,\n\tbind,\n\tunbind,\n JSONProxy\n}\n","\n\t\t\t\timport Omi from './omi';\n\t\t\t\tif (typeof module!='undefined') module.exports = Omi;\n\t\t\t\telse self.Omi = Omi;\n\t\t\t"],"names":["VNode","getGlobal","global","Math","Array","self","window","store","root","mapping","isMultiStore","stack","h","nodeName","attributes","children","lastSimple","child","simple","i","arguments","length","push","pop","undefined","String","p","key","options","vnode","Reflect","customElements","hasOwnProperty","BuiltInHTMLElement","HTMLElement","construct","constructor","prototype","Object","setPrototypeOf","cssToDom","css","node","document","createElement","textContent","camelCase","str","replace","$","$1","toUpperCase","Fragment","props","extend","obj","applyRef","ref","value","current","defer","Promise","resolve","then","bind","setTimeout","isArray","toString","call","getUse","data","paths","out","name","forEach","path","index","isPath","getTargetByPath","keys","tempPath","tempVal","args","apply","pathToArr","split","origin","arr","len","hyphenateRE","hyphenate","toLowerCase","getValByPath","prop","getPath","result","item","removeItem","splice","ATTR_KEY","IS_NON_DIMENSIONAL","isSameNodeType","hydrating","splitText","_componentConstructor","isNamedNode","normalizedNodeName","extension","handler","set","get","eventProxy","e","_listeners","type","el","addEventListener","unbind","removeEventListener","createNode","isSvg","createElementNS","removeNode","parentNode","removeChild","setAccessor","old","component","className","style","cssText","test","innerHTML","__html","useCapture","nameLower","slice","touchStart","touchEnd","pureRemoveAttribute","removeAttribute","ns","removeAttributeNS","setAttributeNS","pureSetAttribute","setAttribute","event","___touchX","touches","pageX","___touchY","pageY","___scrollTop","body","scrollTop","abs","changedTouches","dispatchEvent","CustomEvent","detail","diffLevel","isSvgMode","diff","dom","parent","updateSelf","ret","ownerSVGElement","styles","querySelectorAll","s","innerDiffNode","firstChild","insertBefore","appendChild","ele","idiff","one","recollectNodeTree","prevSvgMode","_component","nodeValue","createTextNode","replaceChild","vnodeName","fc","vchildren","a","nextSibling","is","noSlot","dangerouslySetInnerHTML","diffAttributes","isHydrating","originalChildren","childNodes","keyed","keyedLen","min","childrenLen","vlen","j","c","f","vchild","__key","trim","unmountOnly","removeChildren","lastChild","next","previousSibling","attrs","isWeElement","update","oldClone","receiveProps","assign","ccName","id","WeElement","defaultProps","elementId","connectedCallback","host","use","_updatePath","using","storeName","instances","useSelf","updateSelfInstances","usingSelf","_updateSelfPath","attrsToProps","beforeInstall","install","afterInstall","shadowRoot","attachShadow","mode","beforeRender","rendered","render","__hasChildren","rootNode","_customStyleElement","_customStyleContent","installed","_isInstalled","disconnectedCallback","uninstall","ignoreAttrs","_willUpdate","beforeUpdate","updated","val","JSON","stringify","getAttribute","propTypes","Number","Boolean","substr","Omi","parse","fire","JSONPatcherProxy","deepClone","escapePathComponent","indexOf","findObjectPath","instance","pathComponents","parentAndPath","parenthoodMap","unshift","join","setTrap","target","newValue","parentPath","destinationPropKey","proxifiedObjectsMap","has","newValueOriginalObject","originalObject","revokableInstance","isProxifyingTreeNow","inherited","_proxifyObjectTreeRecursively","operation","op","oldValue","delete","disableTrapsForProxy","isInteger","console","warn","reflectionResult","defaultCallback","deleteTrap","revokableProxyInstance","deleteProperty","resume","isRecording","patches","userCallback","isObserving","pause","showDetachedWarning","Map","cachedProxy","generateProxyAtPath","traps","receiver","revocableInstance","Proxy","revocable","trapsInstance","proxy","proxifyObjectTree","proxifiedObject","message","targetObject","propKey","observe","record","callback","Error","generate","revoke","disableTraps","querySelector","observeStore","extendStoreUpate","JSONProxy","patch","patchs","kv","getArrayPatch","k","v","fixPath","needUpdate","onChange","diffResult","updatePath","keyA","keyB","includePath","pathA","pathB","mpPath","isNaN","fixArrPath","define","ctor","config","Ele","eleHooks","storeHelpers","hook","func","tag","pure","cloneElement","getHost","rpx","b","innerWidth","hasOwn","classNames","classes","arg","argType","inner","extractClass","class","o","html","htm","createRef","Component","defineElement","elements","omi","version","module","exports"],"mappings":";;;;;;;;;;;EAAA;AACA,EAAO,SAASA,KAAT,GAAiB;;ECDxB,SAASC,SAAT,GAAqB;EACnB,MACE,OAAOC,MAAP,KAAkB,QAAlB,IACA,CAACA,MADD,IAEAA,OAAOC,IAAP,KAAgBA,IAFhB,IAGAD,OAAOE,KAAP,KAAiBA,KAJnB,EAKE;EACA,WACEC,QACAC,MADA,IAEAJ,MAFA,IAGC,YAAW;EACV,aAAO,IAAP;EACD,KAFD,EAJF;EAQD;EACD,SAAOA,MAAP;EACD;;EAED;;;;AAIA,gBAAe;EACbK,SAAO,IADM;EAEbC,QAAMP,WAFO;EAGdQ,WAAS,EAHK;EAIdC,gBAAc;EAJA,CAAf;;MCpBMC,QAAQ,EAAd;;AAEA,EAAO,SAASC,CAAT,CAAWC,QAAX,EAAqBC,UAArB,EAAiC;EACtC,MAAIC,WAAW,EAAf;EAAA,MACEC,mBADF;EAAA,MAEEC,cAFF;EAAA,MAGEC,eAHF;EAAA,MAIEC,UAJF;EAKA,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IAAR,CAAagQ,GAAb,GAAmB0H,GAAnB;EACAtW,QAAQpB,IAAR,CAAa0X,GAAb,GAAmBA,GAAnB;EACAtW,QAAQpB,IAAR,CAAagQ,GAAb,CAAiB2H,OAAjB,GAA2B,QAA3B;;EC1DI,IAAI,OAAOC,MAAP,IAAe,WAAnB,EAAgCA,OAAOC,OAAP,GAAiB7H,GAAjB,CAAhC,KACKnQ,KAAKmQ,GAAL,GAAWA,GAAX;;"} \ No newline at end of file diff --git a/packages/omi/dist/omi.esm.js b/packages/omi/dist/omi.esm.js index 283a8c83b6..0420d1df27 100644 --- a/packages/omi/dist/omi.esm.js +++ b/packages/omi/dist/omi.esm.js @@ -1,5 +1,5 @@ /** - * omi v6.15.6 https://tencent.github.io/omi/ + * omi v6.15.7 https://tencent.github.io/omi/ * Omi === Preact + Scoped CSS + Store System + Native Support in 3kb javascript. * By dntzhang https://github.com/dntzhang * Github: https://github.com/Tencent/omi @@ -387,7 +387,8 @@ function setAccessor(node, name, old, value, isSvg, component) { if (value) node.innerHTML = value.__html || ''; } else if (name[0] == 'o' && name[1] == 'n') { var useCapture = name !== (name = name.replace(/Capture$/, '')); - name = name.toLowerCase().substring(2); + var nameLower = name.toLowerCase(); + name = (nameLower in node ? nameLower : name).slice(2); if (value) { if (!old) { node.addEventListener(name, eventProxy$1, useCapture); @@ -1794,7 +1795,7 @@ var omi = { options.root.Omi = omi; options.root.omi = omi; -options.root.Omi.version = '6.15.6'; +options.root.Omi.version = '6.15.7'; export default omi; export { tag, WeElement, Component, render, h, h as createElement, options, define, cloneElement, getHost, rpx, defineElement, classNames, extractClass, createRef, html, htm, o, elements, $, extend$1 as extend, get, set, bind, unbind, JSONPatcherProxy as JSONProxy }; diff --git a/packages/omi/dist/omi.esm.js.map b/packages/omi/dist/omi.esm.js.map index f0d1891b58..e6ab6cece1 100644 --- a/packages/omi/dist/omi.esm.js.map +++ b/packages/omi/dist/omi.esm.js.map @@ -1 +1 @@ -{"version":3,"file":"omi.esm.js","sources":["../src/vnode.js","../src/options.js","../src/h.js","../src/util.js","../src/constants.js","../src/vdom/index.js","../src/extend.js","../src/dom/index.js","../src/vdom/diff.js","../src/we-element.js","../src/proxy.js","../src/render.js","../src/define.js","../src/tag.js","../src/clone-element.js","../src/get-host.js","../src/rpx.js","../src/class.js","../src/o.js","../node_modules/htm/dist/htm.mjs","../src/omi.js"],"sourcesContent":["/** Virtual DOM Node */\nexport function VNode() {}\n","function getGlobal() {\n if (\n typeof global !== 'object' ||\n !global ||\n global.Math !== Math ||\n global.Array !== Array\n ) {\n return (\n self ||\n window ||\n global ||\n (function() {\n return this\n })()\n )\n }\n return global\n}\n\n/** Global options\n *\t@public\n *\t@namespace options {Object}\n */\nexport default {\n store: null,\n root: getGlobal(),\n\tmapping: {},\n\tisMultiStore: false\n}\n","import { VNode } from './vnode'\nimport options from './options'\n\nconst stack = []\n\nexport function h(nodeName, attributes) {\n let children = [],\n lastSimple,\n child,\n simple,\n i\n for (i = arguments.length; i-- > 2; ) {\n stack.push(arguments[i])\n }\n if (attributes && attributes.children != null) {\n if (!stack.length) stack.push(attributes.children)\n delete attributes.children\n }\n while (stack.length) {\n if ((child = stack.pop()) && child.pop !== undefined) {\n for (i = child.length; i--; ) stack.push(child[i])\n } else {\n if (typeof child === 'boolean') child = null\n\n if ((simple = typeof nodeName !== 'function')) {\n if (child == null) child = ''\n else if (typeof child === 'number') child = String(child)\n else if (typeof child !== 'string') simple = false\n }\n\n if (simple && lastSimple) {\n children[children.length - 1] += child\n } else if (children.length === 0) {\n children = [child]\n } else {\n children.push(child)\n }\n\n lastSimple = simple\n }\n }\n\n let p = new VNode()\n p.nodeName = nodeName\n p.children = children\n p.attributes = attributes == null ? undefined : attributes\n p.key = attributes == null ? undefined : attributes.key\n\n // if a \"vnode hook\" is defined, pass every created VNode to it\n if (options.vnode !== undefined) options.vnode(p)\n\n return p\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n/**\n * This shim allows elements written in, or compiled to, ES5 to work on native\n * implementations of Custom Elements v1. It sets new.target to the value of\n * this.constructor so that the native HTMLElement constructor can access the\n * current under-construction element's definition.\n */\n; (function () {\n if (\n // No Reflect, no classes, no need for shim because native custom elements\n // require ES2015 classes or Reflect.\n window.Reflect === undefined ||\n window.customElements === undefined ||\n // The webcomponentsjs custom elements polyfill doesn't require\n // ES2015-compatible construction (`super()` or `Reflect.construct`).\n window.customElements.hasOwnProperty('polyfillWrapFlushCallback')\n ) {\n return\n }\n const BuiltInHTMLElement = HTMLElement\n window.HTMLElement = function HTMLElement() {\n return Reflect.construct(BuiltInHTMLElement, [], this.constructor)\n }\n HTMLElement.prototype = BuiltInHTMLElement.prototype\n HTMLElement.prototype.constructor = HTMLElement\n Object.setPrototypeOf(HTMLElement, BuiltInHTMLElement)\n})()\n\nexport function cssToDom(css) {\n const node = document.createElement('style')\n node.textContent = css\n return node\n}\n\nexport function camelCase(str) {\n return str.replace(/-(\\w)/g, ($, $1) => {\n return $1.toUpperCase()\n })\n}\n\nexport function Fragment(props) {\n return props.children\n}\n\nexport function extend(obj, props) {\n for (let i in props) obj[i] = props[i]\n return obj\n}\n\n/** Invoke or update a ref, depending on whether it is a function or object ref.\n * @param {object|function} [ref=null]\n * @param {any} [value]\n */\nexport function applyRef(ref, value) {\n if (ref != null) {\n if (typeof ref == 'function') ref(value)\n else ref.current = value\n }\n}\n\n/**\n * Call a function asynchronously, as soon as possible. Makes\n * use of HTML Promise to schedule the callback if available,\n * otherwise falling back to `setTimeout` (mainly for IE<11).\n * @type {(callback: function) => void}\n */\nexport const defer =\n typeof Promise == 'function'\n ? Promise.resolve().then.bind(Promise.resolve())\n : setTimeout\n\nexport function isArray(obj) {\n return Object.prototype.toString.call(obj) === '[object Array]'\n}\n\n\nexport function getUse(data, paths, out, name) {\n const obj = []\n paths.forEach((path, index) => {\n const isPath = typeof path === 'string'\n if (isPath) {\n obj[index] = getTargetByPath(data, path)\n } else {\n const key = Object.keys(path)[0]\n const value = path[key]\n if (typeof value === 'string') {\n obj[index] = getTargetByPath(data, value)\n } else {\n const tempPath = value[0]\n if (typeof tempPath === 'string') {\n const tempVal = getTargetByPath(data, tempPath)\n obj[index] = value[1] ? value[1](tempVal) : tempVal\n } else {\n const args = []\n tempPath.forEach(path =>{\n args.push(getTargetByPath(data, path))\n })\n obj[index] = value[1].apply(null, args)\n }\n }\n obj[key] = obj[index]\n }\n\t})\n\tif(out) out[name] = obj\n return obj\n}\n\nexport function pathToArr(path) {\n\tif(typeof path !== 'string' || !path) return []\n\t// return path.split(/\\.|\\[|\\]/).filter(name => !!name)\n\treturn path.replace(/]/g, '').replace(/\\[/g, '.').split('.')\n}\n\nexport function getTargetByPath(origin, path) {\n const arr = pathToArr(path)\n let current = origin\n for (let i = 0, len = arr.length; i < len; i++) {\n current = current[arr[i]]\n }\n return current\n}\n\nconst hyphenateRE = /\\B([A-Z])/g\nexport function hyphenate(str) {\n return str.replace(hyphenateRE, '-$1').toLowerCase()\n}\n\nexport function getValByPath(path, current) {\n\tconst arr = pathToArr(path)\n\tarr.forEach(prop => {\n\t\tcurrent = current[prop]\n\t})\n\treturn current\n}\n\nexport function getPath(obj, out, name) {\n\tconst result = {}\n\tobj.forEach(item => {\n\t\tif (typeof item === 'string') {\n\t\t\tresult[item] = true\n\t\t} else {\n\t\t\tconst tempPath = item[Object.keys(item)[0]]\n\t\t\tif (typeof tempPath === 'string') {\n\t\t\t\tresult[tempPath] = true\n\t\t\t} else {\n\t\t\t\tif (typeof tempPath[0] === 'string') {\n\t\t\t\t\tresult[tempPath[0]] = true\n\t\t\t\t} else {\n\t\t\t\t\ttempPath[0].forEach(path => (result[path] = true))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\tif(out) out[name] = result\n\treturn result\n}\n\nexport function removeItem(item, arr){\n if(!arr) return\n for (let i = 0, len = arr.length; i < len; i++) {\n if (arr[i] === item) {\n arr.splice(i, 1)\n break\n }\n }\n}","// render modes\n\nexport const NO_RENDER = 0\nexport const SYNC_RENDER = 1\nexport const FORCE_RENDER = 2\nexport const ASYNC_RENDER = 3\n\nexport const ATTR_KEY = 'prevProps'\n\n// DOM properties that should NOT have \"px\" added when numeric\nexport const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i\n","import { extend } from '../util'\nimport options from '../options'\n/**\n * Check if two nodes are equivalent.\n *\n * @param {Node} node\t\t\tDOM Node to compare\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\n * @param {boolean} [hydrating=false]\tIf true, ignores component constructors when comparing.\n * @private\n */\nexport function isSameNodeType(node, vnode, hydrating) {\n if (typeof vnode === 'string' || typeof vnode === 'number') {\n return node.splitText !== undefined\n }\n if (typeof vnode.nodeName === 'string') {\n return !node._componentConstructor && isNamedNode(node, vnode.nodeName)\n } else if (typeof vnode.nodeName === 'function'){\n return options.mapping[node.nodeName.toLowerCase()] === vnode.nodeName\n }\n return hydrating || node._componentConstructor === vnode.nodeName\n}\n\n/**\n * Check if an Element has a given nodeName, case-insensitively.\n *\n * @param {Element} node\tA DOM Element to inspect the name of.\n * @param {String} nodeName\tUnnormalized name to compare against.\n */\nexport function isNamedNode(node, nodeName) {\n return (\n node.normalizedNodeName === nodeName ||\n node.nodeName.toLowerCase() === nodeName.toLowerCase()\n )\n}\n\n/**\n * Reconstruct Component-style `props` from a VNode.\n * Ensures default/fallback values from `defaultProps`:\n * Own-properties of `defaultProps` not present in `vnode.attributes` are added.\n *\n * @param {VNode} vnode\n * @returns {Object} props\n */\nexport function getNodeProps(vnode) {\n let props = extend({}, vnode.attributes)\n props.children = vnode.children\n\n let defaultProps = vnode.nodeName.defaultProps\n if (defaultProps !== undefined) {\n for (let i in defaultProps) {\n if (props[i] === undefined) {\n props[i] = defaultProps[i]\n }\n }\n }\n\n return props\n}\n","import {pathToArr} from './util'\n\nexport const extension = {}\n\nexport function extend(name, handler) {\n\textension['o-' + name] = handler\n}\n\nexport function set(origin, path, value) {\n\tconst arr = pathToArr(path)\n\tlet current = origin\n\tfor (let i = 0, len = arr.length; i < len; i++) {\n\t\t\tif (i === len - 1) {\n\t\t\t\t\tcurrent[arr[i]] = value\n\t\t\t} else {\n\t\t\t\t\tcurrent = current[arr[i]]\n\t\t\t}\n\t}\n}\n\nexport function get(origin, path) {\n\tconst arr = pathToArr(path)\n\tlet current = origin\n\tfor (let i = 0, len = arr.length; i < len; i++) {\n\t\tcurrent = current[arr[i]]\n\t}\n\n\treturn current\n}\n\nfunction eventProxy(e) {\n return this._listeners[e.type](e)\n}\n\nexport function bind(el, type, handler){\n\tel._listeners = el._listeners || {}\n\tel._listeners[type] = handler\n\tel.addEventListener(type, eventProxy)\n}\n\nexport function unbind(el, type){\n\tel.removeEventListener(type, eventProxy)\n}\n","import { IS_NON_DIMENSIONAL } from '../constants'\nimport { applyRef } from '../util'\nimport options from '../options'\nimport { extension } from '../extend'\n\n/**\n * Create an element with the given nodeName.\n * @param {string} nodeName The DOM node to create\n * @param {boolean} [isSvg=false] If `true`, creates an element within the SVG\n * namespace.\n * @returns {Element} The created DOM node\n */\nexport function createNode(nodeName, isSvg) {\n /** @type {Element} */\n let node = isSvg\n ? document.createElementNS('http://www.w3.org/2000/svg', nodeName)\n : document.createElement(nodeName)\n node.normalizedNodeName = nodeName\n return node\n}\n\n/**\n * Remove a child node from its parent if attached.\n * @param {Node} node The node to remove\n */\nexport function removeNode(node) {\n let parentNode = node.parentNode\n if (parentNode) parentNode.removeChild(node)\n}\n\n/**\n * Set a named attribute on the given Node, with special behavior for some names\n * and event handlers. If `value` is `null`, the attribute/handler will be\n * removed.\n * @param {Element} node An element to mutate\n * @param {string} name The name/key to set, such as an event or attribute name\n * @param {*} old The last value that was set for this name/node pair\n * @param {*} value An attribute value, such as a function to be used as an\n * event handler\n * @param {boolean} isSvg Are we currently diffing inside an svg?\n * @private\n */\nexport function setAccessor(node, name, old, value, isSvg, component) {\n if (name === 'className') name = 'class'\n\n if (name[0] == 'o' && name[1] == '-'){\n if(extension[name]){\n extension[name](node, value, component)\n }\n } else if (name === 'key') {\n // ignore\n } else if (name === 'ref') {\n applyRef(old, null)\n applyRef(value, node)\n } else if (name === 'class' && !isSvg) {\n node.className = value || ''\n } else if (name === 'style') {\n if (!value || typeof value === 'string' || typeof old === 'string') {\n node.style.cssText = value || ''\n }\n if (value && typeof value === 'object') {\n if (typeof old !== 'string') {\n for (let i in old) if (!(i in value)) node.style[i] = ''\n }\n for (let i in value) {\n node.style[i] =\n typeof value[i] === 'number' && IS_NON_DIMENSIONAL.test(i) === false\n ? value[i] + 'px'\n : value[i]\n }\n }\n } else if (name === 'dangerouslySetInnerHTML') {\n if (value) node.innerHTML = value.__html || ''\n } else if (name[0] == 'o' && name[1] == 'n') {\n let useCapture = name !== (name = name.replace(/Capture$/, ''))\n name = name.toLowerCase().substring(2)\n if (value) {\n if (!old) {\n node.addEventListener(name, eventProxy, useCapture)\n if (name == 'tap') {\n node.addEventListener('touchstart', touchStart, useCapture)\n node.addEventListener('touchend', touchEnd, useCapture)\n }\n }\n } else {\n node.removeEventListener(name, eventProxy, useCapture)\n if (name == 'tap') {\n node.removeEventListener('touchstart', touchStart, useCapture)\n node.removeEventListener('touchend', touchEnd, useCapture)\n }\n }\n ;(node._listeners || (node._listeners = {}))[name] = value\n } else if (node.nodeName === 'INPUT' && name === 'value'){\n node[name] = value == null ? '' : value\n } else if (name !== 'list' && name !== 'type' && name !== 'css' && !isSvg && name in node && value !== '') { //value !== '' fix for selected, disabled, checked with pure element\n // Attempt to set a DOM property to the given value.\n // IE & FF throw for certain property-value combinations.\n try {\n node[name] = value == null ? '' : value\n } catch (e) {}\n if ((value == null || value === false) && name != 'spellcheck')\n node.pureRemoveAttribute ? node.pureRemoveAttribute(name) : node.removeAttribute(name)\n } else {\n let ns = isSvg && name !== (name = name.replace(/^xlink:?/, ''))\n // spellcheck is treated differently than all other boolean values and\n // should not be removed when the value is `false`. See:\n // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-spellcheck\n if (value == null || value === false) {\n if (ns)\n node.removeAttributeNS(\n 'http://www.w3.org/1999/xlink',\n name.toLowerCase()\n )\n else node.pureRemoveAttribute ? node.pureRemoveAttribute(name) : node.removeAttribute(name)\n } else if (typeof value !== 'function') {\n if (ns) {\n node.setAttributeNS(\n 'http://www.w3.org/1999/xlink',\n name.toLowerCase(),\n value\n )\n } else {\n node.pureSetAttribute ? node.pureSetAttribute(name, value) : node.setAttribute(name, value)\n }\n }\n }\n}\n\n/**\n * Proxy an event to hooked event handlers\n * @param {Event} e The event object from the browser\n * @private\n */\nfunction eventProxy(e) {\n return this._listeners[e.type]((options.event && options.event(e)) || e)\n}\n\nfunction touchStart(e) {\n this.___touchX = e.touches[0].pageX\n this.___touchY = e.touches[0].pageY\n this.___scrollTop = document.body.scrollTop\n}\n\nfunction touchEnd(e) {\n if (\n Math.abs(e.changedTouches[0].pageX - this.___touchX) < 30 &&\n Math.abs(e.changedTouches[0].pageY - this.___touchY) < 30 &&\n Math.abs(document.body.scrollTop - this.___scrollTop) < 30\n ) {\n this.dispatchEvent(new CustomEvent('tap', { detail: e }))\n }\n}\n","import { ATTR_KEY } from '../constants'\nimport { isSameNodeType, isNamedNode } from './index'\nimport { createNode, setAccessor } from '../dom/index'\nimport { camelCase, isArray, Fragment } from '../util'\nimport { removeNode } from '../dom/index'\nimport options from '../options'\n\n/** Queue of components that have been mounted and are awaiting componentDidMount */\nexport const mounts = []\n\n/** Diff recursion count, used to track the end of the diff cycle. */\nexport let diffLevel = 0\n\n/** Global flag indicating if the diff is currently within an SVG */\nlet isSvgMode = false\n\n/** Global flag indicating if the diff is performing hydration */\nlet hydrating = false\n\n/** Apply differences in a given vnode (and it's deep children) to a real DOM Node.\n *\t@param {Element} [dom=null]\t\tA DOM node to mutate into the shape of the `vnode`\n *\t@param {VNode} vnode\t\t\tA VNode (with descendants forming a tree) representing the desired DOM structure\n *\t@returns {Element} dom\t\t\tThe created/mutated element\n *\t@private\n */\nexport function diff(dom, vnode, parent, component, updateSelf) {\n // diffLevel having been 0 here indicates initial entry into the diff (not a subdiff)\n let ret\n if (!diffLevel++) {\n // when first starting the diff, check if we're diffing an SVG or within an SVG\n isSvgMode = parent != null && parent.ownerSVGElement !== undefined\n\n // hydration is indicated by the existing element to be diffed not having a prop cache\n hydrating = dom != null && !(ATTR_KEY in dom)\n }\n if(vnode.nodeName === Fragment){\n vnode = vnode.children\n }\n if (isArray(vnode)) {\n if (parent) {\n const styles = parent.querySelectorAll('style')\n styles.forEach(s => {\n parent.removeChild(s)\n })\n innerDiffNode(parent, vnode, hydrating, component, updateSelf)\n\n for (let i = styles.length - 1; i >= 0; i--) {\n parent.firstChild ? parent.insertBefore(styles[i], parent.firstChild) : parent.appendChild(style[i])\n }\n } else {\n ret = []\n vnode.forEach((item, index) => {\n let ele = idiff(index === 0 ? dom : null, item, component, updateSelf)\n ret.push(ele)\n })\n }\n } else {\n if (isArray(dom)) {\n dom.forEach((one, index) => {\n if (index === 0) {\n ret = idiff(one, vnode, component, updateSelf)\n } else {\n recollectNodeTree(one, false)\n }\n })\n } else {\n ret = idiff(dom, vnode, component, updateSelf)\n }\n // append the element if its a new parent\n if (parent && ret.parentNode !== parent) parent.appendChild(ret)\n }\n\n // diffLevel being reduced to 0 means we're exiting the diff\n if (!--diffLevel) {\n hydrating = false\n // invoke queued componentDidMount lifecycle methods\n }\n\n return ret\n}\n\n/** Internals of `diff()`, separated to allow bypassing diffLevel / mount flushing. */\nfunction idiff(dom, vnode, component, updateSelf) {\n if (dom && vnode && dom.props) {\n dom.props.children = vnode.children\n }\n let out = dom,\n prevSvgMode = isSvgMode\n\n // empty values (null, undefined, booleans) render as empty Text nodes\n if (vnode == null || typeof vnode === 'boolean') vnode = ''\n\n // Fast case: Strings & Numbers create/update Text nodes.\n if (typeof vnode === 'string' || typeof vnode === 'number') {\n // update if it's already a Text node:\n if (\n dom &&\n dom.splitText !== undefined &&\n dom.parentNode &&\n (!dom._component || component)\n ) {\n /* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */\n if (dom.nodeValue != vnode) {\n dom.nodeValue = vnode\n }\n } else {\n // it wasn't a Text node: replace it with one and recycle the old Element\n out = document.createTextNode(vnode)\n if (dom) {\n if (dom.parentNode) dom.parentNode.replaceChild(out, dom)\n recollectNodeTree(dom, true)\n }\n }\n\n out[ATTR_KEY] = true\n\n return out\n }\n\n // If the VNode represents a Component, perform a component diff:\n let vnodeName = vnode.nodeName\n if (typeof vnodeName === 'function') {\n for (let key in options.mapping) {\n if (options.mapping[key] === vnodeName) {\n vnodeName = key\n vnode.nodeName = key\n break\n }\n }\n }\n // Tracks entering and exiting SVG namespace when descending through the tree.\n isSvgMode =\n vnodeName === 'svg'\n ? true\n : vnodeName === 'foreignObject'\n ? false\n : isSvgMode\n\n // If there's no existing element or it's the wrong type, create a new one:\n vnodeName = String(vnodeName)\n if (!dom || !isNamedNode(dom, vnodeName)) {\n out = createNode(vnodeName, isSvgMode)\n\n if (dom) {\n // move children into the replacement node\n while (dom.firstChild) out.appendChild(dom.firstChild)\n\n // if the previous Element was mounted into the DOM, replace it inline\n if (dom.parentNode) dom.parentNode.replaceChild(out, dom)\n\n // recycle the old element (skips non-Element node types)\n recollectNodeTree(dom, true)\n }\n }\n\n let fc = out.firstChild,\n props = out[ATTR_KEY],\n vchildren = vnode.children\n\n if (props == null) {\n props = out[ATTR_KEY] = {}\n for (let a = out.attributes, i = a.length; i--;)\n props[a[i].name] = a[i].value\n }\n\n // Optimization: fast-path for elements containing a single TextNode:\n if (\n !hydrating &&\n vchildren &&\n vchildren.length === 1 &&\n typeof vchildren[0] === 'string' &&\n fc != null &&\n fc.splitText !== undefined &&\n fc.nextSibling == null\n ) {\n if (fc.nodeValue != vchildren[0]) {\n fc.nodeValue = vchildren[0]\n }\n }\n // otherwise, if there are existing or new children, diff them:\n else if ((vchildren && vchildren.length) || fc != null) {\n if (!(out.constructor.is == 'WeElement' && out.constructor.noSlot)) {\n innerDiffNode(\n out,\n vchildren,\n hydrating || props.dangerouslySetInnerHTML != null,\n component,\n updateSelf\n )\n }\n }\n\n // Apply attributes/props from VNode to the DOM Element:\n diffAttributes(out, vnode.attributes, props, component, updateSelf)\n if (out.props) {\n out.props.children = vnode.children\n }\n // restore previous SVG mode: (in case we're exiting an SVG namespace)\n isSvgMode = prevSvgMode\n\n return out\n}\n\n/** Apply child and attribute changes between a VNode and a DOM Node to the DOM.\n *\t@param {Element} dom\t\t\tElement whose children should be compared & mutated\n *\t@param {Array} vchildren\t\tArray of VNodes to compare to `dom.childNodes`\n *\t@param {Boolean} isHydrating\tIf `true`, consumes externally created elements similar to hydration\n */\nfunction innerDiffNode(dom, vchildren, isHydrating, component, updateSelf) {\n let originalChildren = dom.childNodes,\n children = [],\n keyed = {},\n keyedLen = 0,\n min = 0,\n len = originalChildren.length,\n childrenLen = 0,\n vlen = vchildren ? vchildren.length : 0,\n j,\n c,\n f,\n vchild,\n child\n\n // Build up a map of keyed children and an Array of unkeyed children:\n if (len !== 0) {\n for (let i = 0; i < len; i++) {\n let child = originalChildren[i],\n props = child[ATTR_KEY],\n key =\n vlen && props\n ? child._component\n ? child._component.__key\n : props.key\n : null\n if (key != null) {\n keyedLen++\n keyed[key] = child\n } else if (\n props ||\n (child.splitText !== undefined\n ? isHydrating\n ? child.nodeValue.trim()\n : true\n : isHydrating)\n ) {\n children[childrenLen++] = child\n }\n }\n }\n\n if (vlen !== 0) {\n for (let i = 0; i < vlen; i++) {\n vchild = vchildren[i]\n child = null\n\n // attempt to find a node based on key matching\n let key = vchild.key\n if (key != null) {\n if (keyedLen && keyed[key] !== undefined) {\n child = keyed[key]\n keyed[key] = undefined\n keyedLen--\n }\n }\n // attempt to pluck a node of the same type from the existing children\n else if (!child && min < childrenLen) {\n for (j = min; j < childrenLen; j++) {\n if (\n children[j] !== undefined &&\n isSameNodeType((c = children[j]), vchild, isHydrating)\n ) {\n child = c\n children[j] = undefined\n if (j === childrenLen - 1) childrenLen--\n if (j === min) min++\n break\n }\n }\n }\n\n // morph the matched/found/created DOM child to match vchild (deep)\n child = idiff(child, vchild, component, updateSelf)\n\n f = originalChildren[i]\n if (child && child !== dom && child !== f) {\n if (f == null) {\n dom.appendChild(child)\n } else if (child === f.nextSibling) {\n removeNode(f)\n } else {\n dom.insertBefore(child, f)\n }\n }\n }\n }\n\n // remove unused keyed children:\n if (keyedLen) {\n for (let i in keyed)\n if (keyed[i] !== undefined) recollectNodeTree(keyed[i], false)\n }\n\n // remove orphaned unkeyed children:\n while (min <= childrenLen) {\n if ((child = children[childrenLen--]) !== undefined)\n recollectNodeTree(child, false)\n }\n}\n\n/** Recursively recycle (or just unmount) a node and its descendants.\n *\t@param {Node} node\t\t\t\t\t\tDOM node to start unmount/removal from\n *\t@param {Boolean} [unmountOnly=false]\tIf `true`, only triggers unmount lifecycle, skips removal\n */\nexport function recollectNodeTree(node, unmountOnly) {\n // If the node's VNode had a ref function, invoke it with null here.\n // (this is part of the React spec, and smart for unsetting references)\n if (node[ATTR_KEY] != null && node[ATTR_KEY].ref) {\n if (typeof node[ATTR_KEY].ref === 'function') {\n node[ATTR_KEY].ref(null)\n } else if (node[ATTR_KEY].ref.current) {\n node[ATTR_KEY].ref.current = null\n }\n }\n\n if (unmountOnly === false || node[ATTR_KEY] == null) {\n removeNode(node)\n }\n\n removeChildren(node)\n}\n\n/** Recollect/unmount all children.\n *\t- we use .lastChild here because it causes less reflow than .firstChild\n *\t- it's also cheaper than accessing the .childNodes Live NodeList\n */\nexport function removeChildren(node) {\n node = node.lastChild\n while (node) {\n let next = node.previousSibling\n recollectNodeTree(node, true)\n node = next\n }\n}\n\n/** Apply differences in attributes from a VNode to the given DOM Element.\n *\t@param {Element} dom\t\tElement with attributes to diff `attrs` against\n *\t@param {Object} attrs\t\tThe desired end-state key-value attribute pairs\n *\t@param {Object} old\t\t\tCurrent/previous attributes (from previous VNode or element's prop cache)\n */\nfunction diffAttributes(dom, attrs, old, component, updateSelf) {\n let name\n //let update = false\n let isWeElement = dom.update\n let oldClone\n if (dom.receiveProps) {\n oldClone = Object.assign({}, old)\n }\n // remove attributes no longer present on the vnode by setting them to undefined\n for (name in old) {\n if (!(attrs && attrs[name] != null) && old[name] != null) {\n setAccessor(dom, name, old[name], (old[name] = undefined), isSvgMode, component)\n if (isWeElement) {\n delete dom.props[name]\n //update = true\n }\n }\n }\n\n // add new & update changed attributes\n for (name in attrs) {\n if (isWeElement && typeof attrs[name] === 'object' && name !== 'ref') {\n if (name === 'style') {\n setAccessor(dom, name, old[name], (old[name] = attrs[name]), isSvgMode, component)\n }\n let ccName = camelCase(name)\n dom.props[ccName] = old[ccName] = attrs[name]\n //update = true\n } else if (\n name !== 'children' &&\n (!(name in old) ||\n attrs[name] !==\n (name === 'value' || name === 'checked' ? dom[name] : old[name]))\n ) {\n setAccessor(dom, name, old[name], attrs[name], isSvgMode, component)\n if (isWeElement) {\n let ccName = camelCase(name)\n dom.props[ccName] = old[ccName] = attrs[name]\n //update = true\n } else {\n old[name] = attrs[name]\n }\n }\n }\n\n if (isWeElement && !updateSelf && dom.parentNode) {\n //__hasChildren is not accuracy when it was empty at first, so add dom.children.length > 0 condition\n //if (update || dom.__hasChildren || dom.children.length > 0 || (dom.store && !dom.store.data)) {\n if (dom.receiveProps(dom.props, oldClone) !== false) {\n dom.update()\n }\n //}\n }\n}\n","import {\n\tcssToDom,\n\tisArray,\n\tgetUse,\n\thyphenate,\n\tgetValByPath,\n\tremoveItem\n} from './util'\nimport { diff } from './vdom/diff'\nimport options from './options'\nimport { getPath } from './util'\n\nlet id = 0\n\nexport default class WeElement extends HTMLElement {\n\tstatic is = 'WeElement'\n\n\tconstructor() {\n\t\tsuper()\n\t\tthis.props = Object.assign({},\n\t\t\tthis.constructor.defaultProps\n\t\t)\n\t\tthis.elementId = id++\n\t}\n\n\tconnectedCallback() {\n\t\tlet p = this.parentNode\n\t\twhile (p && !this.store) {\n\t\t\tthis.store = p.store\n\t\t\tp = p.parentNode || p.host\n\t\t}\n\n\t\tif (this.use) {\n\t\t\tlet use\n\t\t\tif (typeof this.use === 'function') {\n\t\t\t\tuse = this.use()\n\t\t\t} else {\n\t\t\t\tuse = this.use\n\t\t\t}\n\n\n\t\t\tif (options.isMultiStore) {\n\t\t\t\tlet _updatePath = {}\n\t\t\t\tlet using = {}\n\t\t\t\tfor (let storeName in use) {\n\t\t\t\t\t_updatePath[storeName] = {}\n\t\t\t\t\tusing[storeName] = {}\n\t\t\t\t\tgetPath(use[storeName], _updatePath, storeName)\n\t\t\t\t\tgetUse(this.store[storeName].data, use[storeName], using, storeName)\n\t\t\t\t\tthis.store[storeName].instances.push(this)\n\t\t\t\t}\n\t\t\t\tthis.using = using\n\t\t\t\tthis._updatePath = _updatePath\n\t\t\t} else {\n\t\t\t\tthis._updatePath = getPath(use)\n\t\t\t\tthis.using = getUse(this.store.data, use)\n\t\t\t\tthis.store.instances.push(this)\n\t\t\t}\n\t\t}\n\t\tif (this.useSelf) {\n\t\t\tconst use = typeof this.useSelf === 'function' ? this.useSelf() : this.useSelf\n\t\t\tif (options.isMultiStore) {\n\t\t\t\tlet _updatePath = {}\n\t\t\t\tlet using = {}\n\t\t\t\tfor (let storeName in use) {\n\t\t\t\t\tgetPath(use[storeName], _updatePath, storeName)\n\t\t\t\t\tgetUse(this.store[storeName].data, use[storeName], using, storeName)\n\t\t\t\t\tthis.store[storeName].updateSelfInstances.push(this)\n\t\t\t\t}\n\t\t\t\tthis.usingSelf = using\n\t\t\t\tthis._updateSelfPath = _updatePath\n\t\t\t} else {\n\t\t\t\tthis._updateSelfPath = getPath(use)\n\t\t\t\tthis.usingSelf = getUse(this.store.data, use)\n\t\t\t\tthis.store.updateSelfInstances.push(this)\n\t\t\t}\n\t\t}\n\t\tthis.attrsToProps()\n\t\tthis.beforeInstall()\n\t\tthis.install()\n\t\tthis.afterInstall()\n\n\t\tlet shadowRoot\n\t\tif (!this.shadowRoot) {\n\t\t\tshadowRoot = this.attachShadow({\n\t\t\t\tmode: 'open'\n\t\t\t})\n\t\t} else {\n\t\t\tshadowRoot = this.shadowRoot\n\t\t\tlet fc\n\t\t\twhile ((fc = shadowRoot.firstChild)) {\n\t\t\t\tshadowRoot.removeChild(fc)\n\t\t\t}\n\t\t}\n\n\t\tif (this.constructor.css) {\n\t\t\tshadowRoot.appendChild(cssToDom(this.constructor.css))\n\t\t} else if (this.css) {\n\t\t\tshadowRoot.appendChild(cssToDom(typeof this.css === 'function' ? this.css() : this.css))\n\t\t}\n\t\tthis.beforeRender()\n\t\toptions.afterInstall && options.afterInstall(this)\n\n\n\t\tconst rendered = this.render(this.props, this.store)\n\t\tthis.__hasChildren = Object.prototype.toString.call(rendered) === '[object Array]' && rendered.length > 0\n\n\t\tthis.rootNode = diff(\n\t\t\tnull,\n\t\t\trendered,\n\t\t\tnull,\n\t\t\tthis\n\t\t)\n\t\tthis.rendered()\n\n\t\tif (this.props.css) {\n\t\t\tthis._customStyleElement = cssToDom(this.props.css)\n\t\t\tthis._customStyleContent = this.props.css\n\t\t\tshadowRoot.appendChild(this._customStyleElement)\n\t\t}\n\n\t\tif (isArray(this.rootNode)) {\n\t\t\tthis.rootNode.forEach(function (item) {\n\t\t\t\tshadowRoot.appendChild(item)\n\t\t\t})\n\t\t} else {\n\t\t\tshadowRoot.appendChild(this.rootNode)\n\t\t}\n\t\tthis.installed()\n\t\tthis._isInstalled = true\n\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.uninstall()\n\t\tthis._isInstalled = false\n\t\tif (this.store) {\n\t\t\tif(options.isMultiStore){\n\t\t\t\tfor(let key in this.store){\n\t\t\t\t\tconst current = this.store[key]\n\t\t\t\t\tremoveItem(this, current.instances)\n\t\t\t\t removeItem(this, current.updateSelfInstances)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tremoveItem(this, this.store.instances)\n\t\t\t\tremoveItem(this, this.store.updateSelfInstances)\n\t\t\t}\n\t\t}\n\t}\n\n\tupdate(ignoreAttrs, updateSelf) {\n\t\tthis._willUpdate = true\n\t\tthis.beforeUpdate()\n\t\tthis.beforeRender()\n\t\t//fix null !== undefined\n\t\tif (this._customStyleContent != this.props.css) {\n\t\t\tthis._customStyleContent = this.props.css\n\t\t\tthis._customStyleElement.textContent = this._customStyleContent\n\t\t}\n\t\tthis.attrsToProps(ignoreAttrs)\n\n\t\tconst rendered = this.render(this.props, this.store)\n\t\tthis.rendered()\n\t\tthis.__hasChildren = this.__hasChildren || (Object.prototype.toString.call(rendered) === '[object Array]' && rendered.length > 0)\n\n\t\tthis.rootNode = diff(\n\t\t\tthis.rootNode,\n\t\t\trendered,\n\t\t\tthis.shadowRoot,\n\t\t\tthis,\n\t\t\tupdateSelf\n\t\t)\n\t\tthis._willUpdate = false\n\t\tthis.updated()\n\n\t}\n\n\tupdateSelf(ignoreAttrs) {\n\t\tthis.update(ignoreAttrs, true)\n\t}\n\n\tremoveAttribute(key) {\n\t\tsuper.removeAttribute(key)\n\t\t//Avoid executing removeAttribute methods before connectedCallback\n\t\tthis._isInstalled && this.update()\n\t}\n\n\tsetAttribute(key, val) {\n\t\tif (val && typeof val === 'object') {\n\t\t\tsuper.setAttribute(key, JSON.stringify(val))\n\t\t} else {\n\t\t\tsuper.setAttribute(key, val)\n\t\t}\n\t\t//Avoid executing setAttribute methods before connectedCallback\n\t\tthis._isInstalled && this.update()\n\t}\n\n\tpureRemoveAttribute(key) {\n\t\tsuper.removeAttribute(key)\n\t}\n\n\tpureSetAttribute(key, val) {\n\t\tsuper.setAttribute(key, val)\n\t}\n\n\tattrsToProps(ignoreAttrs) {\n\t\tconst ele = this\n\t\tif (ele.normalizedNodeName || ignoreAttrs) return\n\t\tele.props['css'] = ele.getAttribute('css')\n\t\tconst attrs = this.constructor.propTypes\n\t\tif (!attrs) return\n\t\tObject.keys(attrs).forEach(key => {\n\t\t\tconst type = attrs[key]\n\t\t\tconst val = ele.getAttribute(hyphenate(key))\n\t\t\tif (val !== null) {\n\t\t\t\tswitch (type) {\n\t\t\t\t\tcase String:\n\t\t\t\t\t\tele.props[key] = val\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Number:\n\t\t\t\t\t\tele.props[key] = Number(val)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Boolean:\n\t\t\t\t\t\tif (val === 'false' || val === '0') {\n\t\t\t\t\t\t\tele.props[key] = false\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tele.props[key] = true\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Array:\n\t\t\t\t\tcase Object:\n\t\t\t\t\t\tif (val[0] === ':') {\n\t\t\t\t\t\t\tele.props[key] = getValByPath(val.substr(1), Omi.$)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tele.props[key] = JSON.parse(val\n\t\t\t\t\t\t\t\t.replace(/(['\"])?([a-zA-Z0-9_-]+)(['\"])?:([^\\/])/g, '\"$2\":$4')\n\t\t\t\t\t\t\t\t.replace(/'([\\s\\S]*?)'/g, '\"$1\"')\n\t\t\t\t\t\t\t\t.replace(/,(\\s*})/g, '$1')\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (ele.constructor.defaultProps && ele.constructor.defaultProps.hasOwnProperty(key)) {\n\t\t\t\t\tele.props[key] = ele.constructor.defaultProps[key]\n\t\t\t\t} else {\n\t\t\t\t\tele.props[key] = null\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\tfire(name, data) {\n\t\tthis.dispatchEvent(new CustomEvent(name, {\n\t\t\tdetail: data\n\t\t}))\n\t}\n\n\tbeforeInstall() {}\n\n\tinstall() {}\n\n\tafterInstall() {}\n\n\tinstalled() {}\n\n\tuninstall() {}\n\n\tbeforeUpdate() {}\n\n\tupdated() {}\n\n\tbeforeRender() {}\n\n\trendered() {}\n\n\treceiveProps() {}\n\n}\n","/*!\n * https://github.com/Palindrom/JSONPatcherProxy\n * (c) 2017 Starcounter\n * MIT license\n */\n\n/** Class representing a JS Object observer */\nconst JSONPatcherProxy = (function() {\n /**\n * Deep clones your object and returns a new object.\n */\n function deepClone(obj) {\n switch (typeof obj) {\n case 'object':\n return JSON.parse(JSON.stringify(obj)) //Faster than ES5 clone - http://jsperf.com/deep-cloning-of-objects/5\n case 'undefined':\n return null //this is how JSON.stringify behaves for array items\n default:\n return obj //no need to clone primitives\n }\n }\n JSONPatcherProxy.deepClone = deepClone\n\n function escapePathComponent(str) {\n if (str.indexOf('/') == -1 && str.indexOf('~') == -1) return str\n return str.replace(/~/g, '~0').replace(/\\//g, '~1')\n }\n JSONPatcherProxy.escapePathComponent = escapePathComponent\n\n /**\n * Walk up the parenthood tree to get the path\n * @param {JSONPatcherProxy} instance\n * @param {Object} obj the object you need to find its path\n */\n function findObjectPath(instance, obj) {\n const pathComponents = []\n let parentAndPath = instance.parenthoodMap.get(obj)\n while (parentAndPath && parentAndPath.path) {\n // because we're walking up-tree, we need to use the array as a stack\n pathComponents.unshift(parentAndPath.path)\n parentAndPath = instance.parenthoodMap.get(parentAndPath.parent)\n }\n if (pathComponents.length) {\n const path = pathComponents.join('/')\n return '/' + path\n }\n return ''\n }\n /**\n * A callback to be used as th proxy set trap callback.\n * It updates parenthood map if needed, proxifies nested newly-added objects, calls default callbacks with the changes occurred.\n * @param {JSONPatcherProxy} instance JSONPatcherProxy instance\n * @param {Object} target the affected object\n * @param {String} key the effect property's name\n * @param {Any} newValue the value being set\n */\n function setTrap(instance, target, key, newValue) {\n const parentPath = findObjectPath(instance, target)\n\n const destinationPropKey = parentPath + '/' + escapePathComponent(key)\n\n if (instance.proxifiedObjectsMap.has(newValue)) {\n const newValueOriginalObject = instance.proxifiedObjectsMap.get(newValue)\n\n instance.parenthoodMap.set(newValueOriginalObject.originalObject, {\n parent: target,\n path: key\n })\n }\n /*\n mark already proxified values as inherited.\n rationale: proxy.arr.shift()\n will emit\n {op: replace, path: '/arr/1', value: arr_2}\n {op: remove, path: '/arr/2'}\n\n by default, the second operation would revoke the proxy, and this renders arr revoked.\n That's why we need to remember the proxies that are inherited.\n */\n const revokableInstance = instance.proxifiedObjectsMap.get(newValue)\n /*\n Why do we need to check instance.isProxifyingTreeNow?\n\n We need to make sure we mark revokables as inherited ONLY when we're observing,\n because throughout the first proxification, a sub-object is proxified and then assigned to\n its parent object. This assignment of a pre-proxified object can fool us into thinking\n that it's a proxified object moved around, while in fact it's the first assignment ever.\n\n Checking isProxifyingTreeNow ensures this is not happening in the first proxification,\n but in fact is is a proxified object moved around the tree\n */\n if (revokableInstance && !instance.isProxifyingTreeNow) {\n revokableInstance.inherited = true\n }\n\n // if the new value is an object, make sure to watch it\n if (\n newValue &&\n typeof newValue == 'object' &&\n !instance.proxifiedObjectsMap.has(newValue)\n ) {\n instance.parenthoodMap.set(newValue, {\n parent: target,\n path: key\n })\n newValue = instance._proxifyObjectTreeRecursively(target, newValue, key)\n }\n // let's start with this operation, and may or may not update it later\n const operation = {\n op: 'remove',\n path: destinationPropKey\n }\n if (typeof newValue == 'undefined') {\n // applying De Morgan's laws would be a tad faster, but less readable\n if (!Array.isArray(target) && !target.hasOwnProperty(key)) {\n // `undefined` is being set to an already undefined value, keep silent\n return Reflect.set(target, key, newValue)\n }\n // when array element is set to `undefined`, should generate replace to `null`\n if (Array.isArray(target)) {\n // undefined array elements are JSON.stringified to `null`\n ;(operation.op = 'replace'), (operation.value = null)\n }\n const oldValue = instance.proxifiedObjectsMap.get(target[key])\n // was the deleted a proxified object?\n if (oldValue) {\n instance.parenthoodMap.delete(target[key])\n instance.disableTrapsForProxy(oldValue)\n instance.proxifiedObjectsMap.delete(oldValue)\n }\n } else {\n if (Array.isArray(target) && !Number.isInteger(+key.toString())) {\n /* array props (as opposed to indices) don't emit any patches, to avoid needless `length` patches */\n if (key != 'length') {\n console.warn(\n 'JSONPatcherProxy noticed a non-integer prop was set for an array. This will not emit a patch'\n )\n }\n return Reflect.set(target, key, newValue)\n }\n operation.op = 'add'\n if (target.hasOwnProperty(key)) {\n if (typeof target[key] !== 'undefined' || Array.isArray(target)) {\n operation.op = 'replace' // setting `undefined` array elements is a `replace` op\n }\n }\n operation.value = newValue\n }\n operation.oldValue = target[key]\n const reflectionResult = Reflect.set(target, key, newValue)\n instance.defaultCallback(operation)\n return reflectionResult\n }\n /**\n * A callback to be used as th proxy delete trap callback.\n * It updates parenthood map if needed, calls default callbacks with the changes occurred.\n * @param {JSONPatcherProxy} instance JSONPatcherProxy instance\n * @param {Object} target the effected object\n * @param {String} key the effected property's name\n */\n function deleteTrap(instance, target, key) {\n if (typeof target[key] !== 'undefined') {\n const parentPath = findObjectPath(instance, target)\n const destinationPropKey = parentPath + '/' + escapePathComponent(key)\n\n const revokableProxyInstance = instance.proxifiedObjectsMap.get(\n target[key]\n )\n\n if (revokableProxyInstance) {\n if (revokableProxyInstance.inherited) {\n /*\n this is an inherited proxy (an already proxified object that was moved around),\n we shouldn't revoke it, because even though it was removed from path1, it is still used in path2.\n And we know that because we mark moved proxies with `inherited` flag when we move them\n\n it is a good idea to remove this flag if we come across it here, in deleteProperty trap.\n We DO want to revoke the proxy if it was removed again.\n */\n revokableProxyInstance.inherited = false\n } else {\n instance.parenthoodMap.delete(revokableProxyInstance.originalObject)\n instance.disableTrapsForProxy(revokableProxyInstance)\n instance.proxifiedObjectsMap.delete(target[key])\n }\n }\n const reflectionResult = Reflect.deleteProperty(target, key)\n\n instance.defaultCallback({\n op: 'remove',\n path: destinationPropKey\n })\n\n return reflectionResult\n }\n }\n /* pre-define resume and pause functions to enhance constructors performance */\n function resume() {\n this.defaultCallback = operation => {\n this.isRecording && this.patches.push(operation)\n this.userCallback && this.userCallback(operation)\n }\n this.isObserving = true\n }\n function pause() {\n this.defaultCallback = () => {}\n this.isObserving = false\n }\n /**\n * Creates an instance of JSONPatcherProxy around your object of interest `root`.\n * @param {Object|Array} root - the object you want to wrap\n * @param {Boolean} [showDetachedWarning = true] - whether to log a warning when a detached sub-object is modified @see {@link https://github.com/Palindrom/JSONPatcherProxy#detached-objects}\n * @returns {JSONPatcherProxy}\n * @constructor\n */\n function JSONPatcherProxy(root, showDetachedWarning) {\n this.isProxifyingTreeNow = false\n this.isObserving = false\n this.proxifiedObjectsMap = new Map()\n this.parenthoodMap = new Map()\n // default to true\n if (typeof showDetachedWarning !== 'boolean') {\n showDetachedWarning = true\n }\n\n this.showDetachedWarning = showDetachedWarning\n this.originalObject = root\n this.cachedProxy = null\n this.isRecording = false\n this.userCallback\n /**\n * @memberof JSONPatcherProxy\n * Restores callback back to the original one provided to `observe`.\n */\n this.resume = resume.bind(this)\n /**\n * @memberof JSONPatcherProxy\n * Replaces your callback with a noop function.\n */\n this.pause = pause.bind(this)\n }\n\n JSONPatcherProxy.prototype.generateProxyAtPath = function(parent, obj, path) {\n if (!obj) {\n return obj\n }\n const traps = {\n set: (target, key, value, receiver) =>\n setTrap(this, target, key, value, receiver),\n deleteProperty: (target, key) => deleteTrap(this, target, key)\n }\n const revocableInstance = Proxy.revocable(obj, traps)\n // cache traps object to disable them later.\n revocableInstance.trapsInstance = traps\n revocableInstance.originalObject = obj\n\n /* keeping track of object's parent and path */\n\n this.parenthoodMap.set(obj, { parent, path })\n\n /* keeping track of all the proxies to be able to revoke them later */\n this.proxifiedObjectsMap.set(revocableInstance.proxy, revocableInstance)\n return revocableInstance.proxy\n }\n // grab tree's leaves one by one, encapsulate them into a proxy and return\n JSONPatcherProxy.prototype._proxifyObjectTreeRecursively = function(\n parent,\n root,\n path\n ) {\n for (let key in root) {\n if (root.hasOwnProperty(key)) {\n if (root[key] instanceof Object) {\n root[key] = this._proxifyObjectTreeRecursively(\n root,\n root[key],\n escapePathComponent(key)\n )\n }\n }\n }\n return this.generateProxyAtPath(parent, root, path)\n }\n // this function is for aesthetic purposes\n JSONPatcherProxy.prototype.proxifyObjectTree = function(root) {\n /*\n while proxyifying object tree,\n the proxyifying operation itself is being\n recorded, which in an unwanted behavior,\n that's why we disable recording through this\n initial process;\n */\n this.pause()\n this.isProxifyingTreeNow = true\n const proxifiedObject = this._proxifyObjectTreeRecursively(\n undefined,\n root,\n ''\n )\n /* OK you can record now */\n this.isProxifyingTreeNow = false\n this.resume()\n return proxifiedObject\n }\n /**\n * Turns a proxified object into a forward-proxy object; doesn't emit any patches anymore, like a normal object\n * @param {Proxy} proxy - The target proxy object\n */\n JSONPatcherProxy.prototype.disableTrapsForProxy = function(\n revokableProxyInstance\n ) {\n if (this.showDetachedWarning) {\n const message =\n \"You're accessing an object that is detached from the observedObject tree, see https://github.com/Palindrom/JSONPatcherProxy#detached-objects\"\n\n revokableProxyInstance.trapsInstance.set = (\n targetObject,\n propKey,\n newValue\n ) => {\n console.warn(message)\n return Reflect.set(targetObject, propKey, newValue)\n }\n revokableProxyInstance.trapsInstance.set = (\n targetObject,\n propKey,\n newValue\n ) => {\n console.warn(message)\n return Reflect.set(targetObject, propKey, newValue)\n }\n revokableProxyInstance.trapsInstance.deleteProperty = (\n targetObject,\n propKey\n ) => {\n return Reflect.deleteProperty(targetObject, propKey)\n }\n } else {\n delete revokableProxyInstance.trapsInstance.set\n delete revokableProxyInstance.trapsInstance.get\n delete revokableProxyInstance.trapsInstance.deleteProperty\n }\n }\n /**\n * Proxifies the object that was passed in the constructor and returns a proxified mirror of it. Even though both parameters are options. You need to pass at least one of them.\n * @param {Boolean} [record] - whether to record object changes to a later-retrievable patches array.\n * @param {Function} [callback] - this will be synchronously called with every object change with a single `patch` as the only parameter.\n */\n JSONPatcherProxy.prototype.observe = function(record, callback) {\n if (!record && !callback) {\n throw new Error('You need to either record changes or pass a callback')\n }\n this.isRecording = record\n this.userCallback = callback\n /*\n I moved it here to remove it from `unobserve`,\n this will also make the constructor faster, why initiate\n the array before they decide to actually observe with recording?\n They might need to use only a callback.\n */\n if (record) this.patches = []\n this.cachedProxy = this.proxifyObjectTree(this.originalObject)\n return this.cachedProxy\n }\n /**\n * If the observed is set to record, it will synchronously return all the patches and empties patches array.\n */\n JSONPatcherProxy.prototype.generate = function() {\n if (!this.isRecording) {\n throw new Error('You should set record to true to get patches later')\n }\n return this.patches.splice(0, this.patches.length)\n }\n /**\n * Revokes all proxies rendering the observed object useless and good for garbage collection @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/revocable}\n */\n JSONPatcherProxy.prototype.revoke = function() {\n this.proxifiedObjectsMap.forEach(el => {\n el.revoke()\n })\n }\n /**\n * Disables all proxies' traps, turning the observed object into a forward-proxy object, like a normal object that you can modify silently.\n */\n JSONPatcherProxy.prototype.disableTraps = function() {\n this.proxifiedObjectsMap.forEach(this.disableTrapsForProxy, this)\n }\n return JSONPatcherProxy\n})()\n\nexport default JSONPatcherProxy\n","import { diff } from './vdom/diff'\nimport JSONProxy from './proxy'\nimport { getUse } from './util'\nimport options from './options'\n\nexport function render(vnode, parent, store) {\n\tparent = typeof parent === 'string' ? document.querySelector(parent) : parent\n\tif (store) {\n\t\tif (store.data) {\n\t\t\tobserveStore(store)\n\t\t} else {\n\t\t\toptions.isMultiStore = true\n\t\t\t//Multi-store injection\n\t\t\tfor (let key in store) {\n\t\t\t\tobserveStore(store[key], key)\n\t\t\t}\n\t\t}\n\t\tparent.store = store\n\t}\n\treturn diff(null, vnode, parent, false)\n}\n\nfunction observeStore(store, key) {\n\tstore.instances = []\n\tstore.updateSelfInstances = []\n\textendStoreUpate(store, key)\n\n\tstore.data = new JSONProxy(store.data).observe(false, function (patch) {\n\t\tconst patchs = {}\n\t\tif (patch.op === 'remove') {\n\t\t\t// fix arr splice\n\t\t\tconst kv = getArrayPatch(patch.path, store)\n\t\t\tpatchs[kv.k] = kv.v\n\n\t\t\tupdate(patchs, store)\n\n\t\t} else {\n\t\t\tconst key = fixPath(patch.path)\n\t\t\tpatchs[key] = patch.value\n\n\t\t\tupdate(patchs, store)\n\n\t\t}\n\t})\n}\n\nfunction update(patch, store) {\n\tstore.update(patch)\n}\n\nfunction extendStoreUpate(store, key) {\n\tstore.update = function (patch) {\n\t\tif (Object.keys(patch).length > 0) {\n\t\t\tthis.instances.forEach(instance => {\n\t\t\t\tif (key) {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updatePath && instance._updatePath[key] && needUpdate(patch, instance._updatePath[key]))) {\n\t\t\t\t\t\tif (instance.use) {\n\t\t\t\t\t\t\tgetUse(store.data, (typeof instance.use === 'function' ? instance.use() : instance.use)[key], instance.using, key)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.update()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updatePath && needUpdate(patch, instance._updatePath))) {\n\t\t\t\t\t\tif (instance.use) {\n\t\t\t\t\t\t\tinstance.using = getUse(store.data, typeof instance.use === 'function' ? instance.use() : instance.use)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.update()\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t})\n\n\t\t\tthis.updateSelfInstances.forEach(instance => {\n\t\t\t\tif (key) {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updateSelfPath && instance._updateSelfPath[key] && needUpdate(patch, instance._updateSelfPath[key]))) {\n\t\t\t\t\t\tif (instance.useSelf) {\n\t\t\t\t\t\t\tgetUse(store.data, (typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)[key], instance.usingSelf, key)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.updateSelf()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (instance._updateSelfPath && needUpdate(patch, instance._updateSelfPath)) {\n\t\t\t\t\t\tinstance.usingSelf = getUse(store.data, typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)\n\t\t\t\t\t\tinstance.updateSelf()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\tthis.onChange && this.onChange(patch)\n\t\t}\n\t}\n}\n\n\nexport function needUpdate(diffResult, updatePath) {\n\tfor (let keyA in diffResult) {\n\t\tif (updatePath[keyA]) {\n\t\t\treturn true\n\t\t}\n\t\tfor (let keyB in updatePath) {\n\t\t\tif (includePath(keyA, keyB)) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t}\n\treturn false\n}\n\nfunction includePath(pathA, pathB) {\n\tif (pathA.indexOf(pathB) === 0) {\n\t\tconst next = pathA.substr(pathB.length, 1)\n\t\tif (next === '[' || next === '.') {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nexport function fixPath(path) {\n\tlet mpPath = ''\n\tconst arr = path.replace('/', '').split('/')\n\tarr.forEach((item, index) => {\n\t\tif (index) {\n\t\t\tif (isNaN(Number(item))) {\n\t\t\t\tmpPath += '.' + item\n\t\t\t} else {\n\t\t\t\tmpPath += '[' + item + ']'\n\t\t\t}\n\t\t} else {\n\t\t\tmpPath += item\n\t\t}\n\t})\n\treturn mpPath\n}\n\nfunction getArrayPatch(path, store) {\n\tconst arr = path.replace('/', '').split('/')\n\tlet current = store.data[arr[0]]\n\tfor (let i = 1, len = arr.length; i < len - 1; i++) {\n\t\tcurrent = current[arr[i]]\n\t}\n\treturn {\n\t\tk: fixArrPath(path),\n\t\tv: current\n\t}\n}\n\nfunction fixArrPath(path) {\n\tlet mpPath = ''\n\tconst arr = path.replace('/', '').split('/')\n\tconst len = arr.length\n\tarr.forEach((item, index) => {\n\t\tif (index < len - 1) {\n\t\t\tif (index) {\n\t\t\t\tif (isNaN(Number(item))) {\n\t\t\t\t\tmpPath += '.' + item\n\t\t\t\t} else {\n\t\t\t\t\tmpPath += '[' + item + ']'\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmpPath += item\n\t\t\t}\n\t\t}\n\t})\n\treturn mpPath\n}\n","import WeElement from './we-element'\nimport options from './options'\n\nexport function define(name, ctor, config) {\n if (options.mapping[name]) {\n return\n }\n if (ctor.is === 'WeElement') {\n customElements.define(name, ctor)\n options.mapping[name] = ctor\n\n } else {\n \n if (typeof config === 'string') {\n config = { css: config }\n } else {\n config = config || { }\n }\n\n class Ele extends WeElement {\n\n static css = config.css\n\n static propTypes = config.propTypes\n\n static defaultProps = config.defaultProps\n\n render() {\n return ctor.call(this, this)\n }\n\n receiveProps() {\n if (config.receiveProps) {\n return config.receiveProps.apply(this, arguments)\n }\n }\n }\n\n const eleHooks = ['install', 'installed', 'uninstall', 'beforeUpdate', 'updated', 'beforeRender', 'rendered'],\n storeHelpers = ['use', 'useSelf']\n\n eleHooks.forEach(hook => {\n if (config[hook]) {\n Ele.prototype[hook] = function () {\n config[hook].apply(this, arguments)\n }\n }\n })\n\n storeHelpers.forEach(func => {\n if (config[func]) {\n Ele.prototype[func] = function () {\n return typeof config[func] === 'function'\n ? config[func].apply(this, arguments)\n : config[func]\n }\n }\n })\n\n customElements.define(name, Ele)\n options.mapping[name] = Ele\n }\n}\n\n\n\n","import { define } from './define'\n\nexport function tag(name, pure) {\n return function(target) {\n target.pure = pure\n define(name, target)\n }\n}\n","import { extend } from './util'\nimport { h } from './h'\n\n/**\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\n * @param {VNode} vnode\t\tThe virtual DOM element to clone\n * @param {Object} props\tAttributes/props to add when cloning\n * @param {VNode} rest\t\tAny additional arguments will be used as replacement children.\n */\nexport function cloneElement(vnode, props) {\n return h(\n vnode.nodeName,\n extend(extend({}, vnode.attributes), props),\n arguments.length > 2 ? [].slice.call(arguments, 2) : vnode.children\n )\n}\n","export function getHost(ele) {\n let p = ele.parentNode\n while (p) {\n if (p.host) {\n return p.host\n } else if (p.shadowRoot && p.shadowRoot.host) {\n return p.shadowRoot.host\n } else {\n p = p.parentNode\n }\n }\n}\n","export function rpx(str) {\n return str.replace(/([1-9]\\d*|0)(\\.\\d*)*rpx/g, (a, b) => {\n return (window.innerWidth * Number(b)) / 750 + 'px'\n })\n}\n","/**\n * classNames based on https://github.com/JedWatson/classnames\n * by Jed Watson\n * Licensed under the MIT License\n * https://github.com/JedWatson/classnames/blob/master/LICENSE\n * modified by dntzhang\n */\n\nvar hasOwn = {}.hasOwnProperty\n\nexport function classNames() {\n var classes = []\n\n for (var i = 0; i < arguments.length; i++) {\n var arg = arguments[i]\n if (!arg) continue\n\n var argType = typeof arg\n\n if (argType === 'string' || argType === 'number') {\n classes.push(arg)\n } else if (Array.isArray(arg) && arg.length) {\n var inner = classNames.apply(null, arg)\n if (inner) {\n classes.push(inner)\n }\n } else if (argType === 'object') {\n for (var key in arg) {\n if (hasOwn.call(arg, key) && arg[key]) {\n classes.push(key)\n }\n }\n }\n }\n\n return classes.join(' ')\n}\n\nexport function extractClass() {\n const [props, ...args] = Array.prototype.slice.call(arguments, 0)\n if (props.class) {\n args.unshift(props.class)\n delete props.class\n } else if (props.className) {\n args.unshift(props.className)\n delete props.className\n }\n if (args.length > 0) {\n return { class: classNames.apply(null, args) }\n }\n}\n","export function o(obj){\n return JSON.stringify(obj)\n}","var n=function(t,r,u,e){for(var p=1;p\"===t?(a(),u=1):u&&(\"=\"===t?(u=4,r=e,e=\"\"):\"/\"===t?(a(),3===u&&(s=s[0]),u=s,(s=s[0]).push(u,4),u=0):\" \"===t||\"\\t\"===t||\"\\n\"===t||\"\\r\"===t?(a(),u=2):e+=t)}return a(),s},r=\"function\"==typeof Map,u=r?new Map:{},e=r?function(n){var r=u.get(n);return r||u.set(n,r=t(n)),r}:function(n){for(var r=\"\",e=0;e1?r:r[0]}\n","import { h, h as createElement } from './h'\nimport options from './options'\nimport WeElement from './we-element'\nimport { render } from './render'\nimport { define } from './define'\nimport { tag } from './tag'\nimport { cloneElement } from './clone-element'\nimport { getHost } from './get-host'\nimport { rpx } from './rpx'\nimport { classNames, extractClass } from './class'\nimport { o } from './o'\nimport htm from 'htm'\nimport { extend, get, set, bind, unbind } from './extend'\nimport JSONProxy from './proxy'\nimport { Fragment } from './util'\n\nh.f = Fragment\n\nconst html = htm.bind(h)\n\nfunction createRef() {\n return {}\n}\n\nconst $ = {}\nconst Component = WeElement\nconst defineElement = define\nconst elements = options.mapping\n\nconst omi = {\n tag,\n WeElement,\n Component,\n render,\n h,\n createElement,\n options,\n define,\n cloneElement,\n getHost,\n rpx,\n defineElement,\n classNames,\n extractClass,\n createRef,\n html,\n htm,\n o,\n\telements,\n\t$,\n\textend,\n\tget,\n\tset,\n\tbind,\n\tunbind,\n JSONProxy\n}\n\noptions.root.Omi = omi\noptions.root.omi = omi\noptions.root.Omi.version = '6.15.6'\n\nexport default omi\n\nexport {\n tag,\n WeElement,\n Component,\n render,\n h,\n createElement,\n options,\n define,\n cloneElement,\n getHost,\n rpx,\n defineElement,\n classNames,\n extractClass,\n createRef,\n html,\n htm,\n o,\n\telements,\n\t$,\n\textend,\n\tget,\n\tset,\n\tbind,\n\tunbind,\n JSONProxy\n}\n"],"names":["VNode","getGlobal","global","Math","Array","self","window","stack","h","nodeName","attributes","children","lastSimple","child","simple","i","arguments","length","push","pop","undefined","String","p","key","options","vnode","Reflect","customElements","hasOwnProperty","BuiltInHTMLElement","HTMLElement","construct","constructor","prototype","setPrototypeOf","cssToDom","css","node","document","createElement","textContent","camelCase","str","replace","$","$1","toUpperCase","Fragment","props","extend","obj","applyRef","ref","value","current","defer","Promise","resolve","then","bind","setTimeout","isArray","Object","toString","call","getUse","data","paths","out","name","forEach","path","index","isPath","getTargetByPath","keys","tempPath","tempVal","args","apply","pathToArr","split","origin","arr","len","hyphenateRE","hyphenate","toLowerCase","getValByPath","prop","getPath","result","item","removeItem","splice","ATTR_KEY","IS_NON_DIMENSIONAL","isSameNodeType","hydrating","splitText","_componentConstructor","isNamedNode","mapping","normalizedNodeName","extension","handler","set","get","eventProxy","e","_listeners","type","el","addEventListener","unbind","removeEventListener","createNode","isSvg","createElementNS","removeNode","parentNode","removeChild","setAccessor","old","component","className","style","cssText","test","innerHTML","__html","useCapture","substring","touchStart","touchEnd","pureRemoveAttribute","removeAttribute","ns","removeAttributeNS","setAttributeNS","pureSetAttribute","setAttribute","event","___touchX","touches","pageX","___touchY","pageY","___scrollTop","body","scrollTop","abs","changedTouches","dispatchEvent","CustomEvent","detail","diffLevel","isSvgMode","diff","dom","parent","updateSelf","ret","ownerSVGElement","styles","querySelectorAll","s","firstChild","insertBefore","appendChild","ele","idiff","one","prevSvgMode","_component","nodeValue","createTextNode","replaceChild","vnodeName","fc","vchildren","a","nextSibling","is","noSlot","dangerouslySetInnerHTML","innerDiffNode","isHydrating","originalChildren","childNodes","keyed","keyedLen","min","childrenLen","vlen","j","c","f","vchild","__key","trim","recollectNodeTree","unmountOnly","removeChildren","lastChild","next","previousSibling","diffAttributes","attrs","isWeElement","update","oldClone","receiveProps","assign","ccName","id","WeElement","defaultProps","elementId","connectedCallback","store","host","use","isMultiStore","_updatePath","using","storeName","instances","useSelf","updateSelfInstances","usingSelf","_updateSelfPath","attrsToProps","beforeInstall","install","afterInstall","shadowRoot","attachShadow","beforeRender","rendered","render","__hasChildren","rootNode","_customStyleElement","_customStyleContent","installed","_isInstalled","disconnectedCallback","uninstall","ignoreAttrs","_willUpdate","beforeUpdate","updated","val","JSON","stringify","getAttribute","propTypes","Number","Boolean","substr","Omi","parse","fire","JSONPatcherProxy","deepClone","escapePathComponent","indexOf","findObjectPath","instance","pathComponents","parentAndPath","parenthoodMap","unshift","join","setTrap","target","newValue","parentPath","destinationPropKey","proxifiedObjectsMap","has","newValueOriginalObject","originalObject","revokableInstance","isProxifyingTreeNow","inherited","_proxifyObjectTreeRecursively","operation","op","oldValue","delete","disableTrapsForProxy","isInteger","warn","reflectionResult","defaultCallback","deleteTrap","revokableProxyInstance","deleteProperty","resume","isRecording","patches","userCallback","isObserving","pause","root","showDetachedWarning","Map","cachedProxy","generateProxyAtPath","traps","receiver","revocableInstance","Proxy","revocable","trapsInstance","proxy","proxifyObjectTree","proxifiedObject","message","targetObject","propKey","observe","record","callback","Error","generate","revoke","disableTraps","querySelector","observeStore","JSONProxy","patch","patchs","kv","getArrayPatch","k","v","fixPath","extendStoreUpate","needUpdate","onChange","diffResult","updatePath","keyA","keyB","includePath","pathA","pathB","mpPath","isNaN","fixArrPath","define","ctor","config","Ele","eleHooks","storeHelpers","hook","func","tag","pure","cloneElement","slice","getHost","rpx","b","innerWidth","hasOwn","classNames","classes","arg","argType","inner","extractClass","class","o","html","htm","createRef","Component","defineElement","elements","omi","version"],"mappings":";;;;;;;;AAAA;AACA,SAAgBA,KAAT,GAAiB;;ACDxB,SAASC,SAAT,GAAqB;MAEjB,OAAOC,MAAP,KAAkB,QAAlB,IACA,CAACA,MADD,IAEAA,OAAOC,IAAP,KAAgBA,IAFhB,IAGAD,OAAOE,KAAP,KAAiBA,KAJnB,EAKE;WAEEC,QACAC,MADA,IAEAJ,MAFA,IAGC,YAAW;aACH,IAAP;KADF,EAJF;;SASKA,MAAP;;;;;;;AAOF,cAAe;SACN,IADM;QAEPD,WAFO;WAGL,EAHK;gBAIA;CAJf;;ICpBMM,QAAQ,EAAd;;AAEA,SAAgBC,CAAT,CAAWC,QAAX,EAAqBC,UAArB,EAAiC;MAClCC,WAAW,EAAf;MACEC,mBADF;MAEEC,cAFF;MAGEC,eAHF;MAIEC,UAJF;OAKKA,IAAIC,UAAUC,MAAnB,EAA2BF,MAAM,CAAjC,GAAsC;UAC9BG,IAAN,CAAWF,UAAUD,CAAV,CAAX;;MAEEL,cAAcA,WAAWC,QAAX,IAAuB,IAAzC,EAA+C;QACzC,CAACJ,MAAMU,MAAX,EAAmBV,MAAMW,IAAN,CAAWR,WAAWC,QAAtB;WACZD,WAAWC,QAAlB;;SAEKJ,MAAMU,MAAb,EAAqB;QACf,CAACJ,QAAQN,MAAMY,GAAN,EAAT,KAAyBN,MAAMM,GAAN,KAAcC,SAA3C,EAAsD;WAC/CL,IAAIF,MAAMI,MAAf,EAAuBF,GA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C,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;ACgBplC1C,EAAE6L,CAAF,GAAMtJ,QAAN;;AAEA,IAAM2U,OAAOC,IAAIhU,IAAJ,CAASnD,CAAT,CAAb;;AAEA,SAASoX,SAAT,GAAqB;SACZ,EAAP;;;AAGF,IAAMhV,IAAI,EAAV;AACA,IAAMiV,YAAYrK,SAAlB;AACA,IAAMsK,gBAAgB7B,MAAtB;AACA,IAAM8B,WAAWvW,QAAQ8E,OAAzB;;AAEA,IAAM0R,MAAM;UAAA;sBAAA;sBAAA;gBAAA;MAAA;kBAAA;kBAAA;gBAAA;4BAAA;kBAAA;UAAA;8BAAA;wBAAA;4BAAA;sBAAA;YAAA;UAAA;MAAA;oBAAA;MAAA;kBAAA;UAAA;UAAA;YAAA;gBAAA;;CAAZ;;AA6BAxW,QAAQ0R,IAAR,CAAa7C,GAAb,GAAmB2H,GAAnB;AACAxW,QAAQ0R,IAAR,CAAa8E,GAAb,GAAmBA,GAAnB;AACAxW,QAAQ0R,IAAR,CAAa7C,GAAb,CAAiB4H,OAAjB,GAA2B,QAA3B;;;"} \ No newline at end of file +{"version":3,"file":"omi.esm.js","sources":["../src/vnode.js","../src/options.js","../src/h.js","../src/util.js","../src/constants.js","../src/vdom/index.js","../src/extend.js","../src/dom/index.js","../src/vdom/diff.js","../src/we-element.js","../src/proxy.js","../src/render.js","../src/define.js","../src/tag.js","../src/clone-element.js","../src/get-host.js","../src/rpx.js","../src/class.js","../src/o.js","../node_modules/htm/dist/htm.mjs","../src/omi.js"],"sourcesContent":["/** Virtual DOM Node */\nexport function VNode() {}\n","function getGlobal() {\n if (\n typeof global !== 'object' ||\n !global ||\n global.Math !== Math ||\n global.Array !== Array\n ) {\n return (\n self ||\n window ||\n global ||\n (function() {\n return this\n })()\n )\n }\n return global\n}\n\n/** Global options\n *\t@public\n *\t@namespace options {Object}\n */\nexport default {\n store: null,\n root: getGlobal(),\n\tmapping: {},\n\tisMultiStore: false\n}\n","import { VNode } from './vnode'\nimport options from './options'\n\nconst stack = []\n\nexport function h(nodeName, attributes) {\n let children = [],\n lastSimple,\n child,\n simple,\n i\n for (i = arguments.length; i-- > 2; ) {\n stack.push(arguments[i])\n }\n if (attributes && attributes.children != null) {\n if (!stack.length) stack.push(attributes.children)\n delete attributes.children\n }\n while (stack.length) {\n if ((child = stack.pop()) && child.pop !== undefined) {\n for (i = child.length; i--; ) stack.push(child[i])\n } else {\n if (typeof child === 'boolean') child = null\n\n if ((simple = typeof nodeName !== 'function')) {\n if (child == null) child = ''\n else if (typeof child === 'number') child = String(child)\n else if (typeof child !== 'string') simple = false\n }\n\n if (simple && lastSimple) {\n children[children.length - 1] += child\n } else if (children.length === 0) {\n children = [child]\n } else {\n children.push(child)\n }\n\n lastSimple = simple\n }\n }\n\n let p = new VNode()\n p.nodeName = nodeName\n p.children = children\n p.attributes = attributes == null ? undefined : attributes\n p.key = attributes == null ? undefined : attributes.key\n\n // if a \"vnode hook\" is defined, pass every created VNode to it\n if (options.vnode !== undefined) options.vnode(p)\n\n return p\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n/**\n * This shim allows elements written in, or compiled to, ES5 to work on native\n * implementations of Custom Elements v1. It sets new.target to the value of\n * this.constructor so that the native HTMLElement constructor can access the\n * current under-construction element's definition.\n */\n; (function () {\n if (\n // No Reflect, no classes, no need for shim because native custom elements\n // require ES2015 classes or Reflect.\n window.Reflect === undefined ||\n window.customElements === undefined ||\n // The webcomponentsjs custom elements polyfill doesn't require\n // ES2015-compatible construction (`super()` or `Reflect.construct`).\n window.customElements.hasOwnProperty('polyfillWrapFlushCallback')\n ) {\n return\n }\n const BuiltInHTMLElement = HTMLElement\n window.HTMLElement = function HTMLElement() {\n return Reflect.construct(BuiltInHTMLElement, [], this.constructor)\n }\n HTMLElement.prototype = BuiltInHTMLElement.prototype\n HTMLElement.prototype.constructor = HTMLElement\n Object.setPrototypeOf(HTMLElement, BuiltInHTMLElement)\n})()\n\nexport function cssToDom(css) {\n const node = document.createElement('style')\n node.textContent = css\n return node\n}\n\nexport function camelCase(str) {\n return str.replace(/-(\\w)/g, ($, $1) => {\n return $1.toUpperCase()\n })\n}\n\nexport function Fragment(props) {\n return props.children\n}\n\nexport function extend(obj, props) {\n for (let i in props) obj[i] = props[i]\n return obj\n}\n\n/** Invoke or update a ref, depending on whether it is a function or object ref.\n * @param {object|function} [ref=null]\n * @param {any} [value]\n */\nexport function applyRef(ref, value) {\n if (ref != null) {\n if (typeof ref == 'function') ref(value)\n else ref.current = value\n }\n}\n\n/**\n * Call a function asynchronously, as soon as possible. Makes\n * use of HTML Promise to schedule the callback if available,\n * otherwise falling back to `setTimeout` (mainly for IE<11).\n * @type {(callback: function) => void}\n */\nexport const defer =\n typeof Promise == 'function'\n ? Promise.resolve().then.bind(Promise.resolve())\n : setTimeout\n\nexport function isArray(obj) {\n return Object.prototype.toString.call(obj) === '[object Array]'\n}\n\n\nexport function getUse(data, paths, out, name) {\n const obj = []\n paths.forEach((path, index) => {\n const isPath = typeof path === 'string'\n if (isPath) {\n obj[index] = getTargetByPath(data, path)\n } else {\n const key = Object.keys(path)[0]\n const value = path[key]\n if (typeof value === 'string') {\n obj[index] = getTargetByPath(data, value)\n } else {\n const tempPath = value[0]\n if (typeof tempPath === 'string') {\n const tempVal = getTargetByPath(data, tempPath)\n obj[index] = value[1] ? value[1](tempVal) : tempVal\n } else {\n const args = []\n tempPath.forEach(path =>{\n args.push(getTargetByPath(data, path))\n })\n obj[index] = value[1].apply(null, args)\n }\n }\n obj[key] = obj[index]\n }\n\t})\n\tif(out) out[name] = obj\n return obj\n}\n\nexport function pathToArr(path) {\n\tif(typeof path !== 'string' || !path) return []\n\t// return path.split(/\\.|\\[|\\]/).filter(name => !!name)\n\treturn path.replace(/]/g, '').replace(/\\[/g, '.').split('.')\n}\n\nexport function getTargetByPath(origin, path) {\n const arr = pathToArr(path)\n let current = origin\n for (let i = 0, len = arr.length; i < len; i++) {\n current = current[arr[i]]\n }\n return current\n}\n\nconst hyphenateRE = /\\B([A-Z])/g\nexport function hyphenate(str) {\n return str.replace(hyphenateRE, '-$1').toLowerCase()\n}\n\nexport function getValByPath(path, current) {\n\tconst arr = pathToArr(path)\n\tarr.forEach(prop => {\n\t\tcurrent = current[prop]\n\t})\n\treturn current\n}\n\nexport function getPath(obj, out, name) {\n\tconst result = {}\n\tobj.forEach(item => {\n\t\tif (typeof item === 'string') {\n\t\t\tresult[item] = true\n\t\t} else {\n\t\t\tconst tempPath = item[Object.keys(item)[0]]\n\t\t\tif (typeof tempPath === 'string') {\n\t\t\t\tresult[tempPath] = true\n\t\t\t} else {\n\t\t\t\tif (typeof tempPath[0] === 'string') {\n\t\t\t\t\tresult[tempPath[0]] = true\n\t\t\t\t} else {\n\t\t\t\t\ttempPath[0].forEach(path => (result[path] = true))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\tif(out) out[name] = result\n\treturn result\n}\n\nexport function removeItem(item, arr){\n if(!arr) return\n for (let i = 0, len = arr.length; i < len; i++) {\n if (arr[i] === item) {\n arr.splice(i, 1)\n break\n }\n }\n}","// render modes\n\nexport const NO_RENDER = 0\nexport const SYNC_RENDER = 1\nexport const FORCE_RENDER = 2\nexport const ASYNC_RENDER = 3\n\nexport const ATTR_KEY = 'prevProps'\n\n// DOM properties that should NOT have \"px\" added when numeric\nexport const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i\n","import { extend } from '../util'\nimport options from '../options'\n/**\n * Check if two nodes are equivalent.\n *\n * @param {Node} node\t\t\tDOM Node to compare\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\n * @param {boolean} [hydrating=false]\tIf true, ignores component constructors when comparing.\n * @private\n */\nexport function isSameNodeType(node, vnode, hydrating) {\n if (typeof vnode === 'string' || typeof vnode === 'number') {\n return node.splitText !== undefined\n }\n if (typeof vnode.nodeName === 'string') {\n return !node._componentConstructor && isNamedNode(node, vnode.nodeName)\n } else if (typeof vnode.nodeName === 'function'){\n return options.mapping[node.nodeName.toLowerCase()] === vnode.nodeName\n }\n return hydrating || node._componentConstructor === vnode.nodeName\n}\n\n/**\n * Check if an Element has a given nodeName, case-insensitively.\n *\n * @param {Element} node\tA DOM Element to inspect the name of.\n * @param {String} nodeName\tUnnormalized name to compare against.\n */\nexport function isNamedNode(node, nodeName) {\n return (\n node.normalizedNodeName === nodeName ||\n node.nodeName.toLowerCase() === nodeName.toLowerCase()\n )\n}\n\n/**\n * Reconstruct Component-style `props` from a VNode.\n * Ensures default/fallback values from `defaultProps`:\n * Own-properties of `defaultProps` not present in `vnode.attributes` are added.\n *\n * @param {VNode} vnode\n * @returns {Object} props\n */\nexport function getNodeProps(vnode) {\n let props = extend({}, vnode.attributes)\n props.children = vnode.children\n\n let defaultProps = vnode.nodeName.defaultProps\n if (defaultProps !== undefined) {\n for (let i in defaultProps) {\n if (props[i] === undefined) {\n props[i] = defaultProps[i]\n }\n }\n }\n\n return props\n}\n","import {pathToArr} from './util'\n\nexport const extension = {}\n\nexport function extend(name, handler) {\n\textension['o-' + name] = handler\n}\n\nexport function set(origin, path, value) {\n\tconst arr = pathToArr(path)\n\tlet current = origin\n\tfor (let i = 0, len = arr.length; i < len; i++) {\n\t\t\tif (i === len - 1) {\n\t\t\t\t\tcurrent[arr[i]] = value\n\t\t\t} else {\n\t\t\t\t\tcurrent = current[arr[i]]\n\t\t\t}\n\t}\n}\n\nexport function get(origin, path) {\n\tconst arr = pathToArr(path)\n\tlet current = origin\n\tfor (let i = 0, len = arr.length; i < len; i++) {\n\t\tcurrent = current[arr[i]]\n\t}\n\n\treturn current\n}\n\nfunction eventProxy(e) {\n return this._listeners[e.type](e)\n}\n\nexport function bind(el, type, handler){\n\tel._listeners = el._listeners || {}\n\tel._listeners[type] = handler\n\tel.addEventListener(type, eventProxy)\n}\n\nexport function unbind(el, type){\n\tel.removeEventListener(type, eventProxy)\n}\n","import { IS_NON_DIMENSIONAL } from '../constants'\nimport { applyRef } from '../util'\nimport options from '../options'\nimport { extension } from '../extend'\n\n/**\n * Create an element with the given nodeName.\n * @param {string} nodeName The DOM node to create\n * @param {boolean} [isSvg=false] If `true`, creates an element within the SVG\n * namespace.\n * @returns {Element} The created DOM node\n */\nexport function createNode(nodeName, isSvg) {\n /** @type {Element} */\n let node = isSvg\n ? document.createElementNS('http://www.w3.org/2000/svg', nodeName)\n : document.createElement(nodeName)\n node.normalizedNodeName = nodeName\n return node\n}\n\n/**\n * Remove a child node from its parent if attached.\n * @param {Node} node The node to remove\n */\nexport function removeNode(node) {\n let parentNode = node.parentNode\n if (parentNode) parentNode.removeChild(node)\n}\n\n/**\n * Set a named attribute on the given Node, with special behavior for some names\n * and event handlers. If `value` is `null`, the attribute/handler will be\n * removed.\n * @param {Element} node An element to mutate\n * @param {string} name The name/key to set, such as an event or attribute name\n * @param {*} old The last value that was set for this name/node pair\n * @param {*} value An attribute value, such as a function to be used as an\n * event handler\n * @param {boolean} isSvg Are we currently diffing inside an svg?\n * @private\n */\nexport function setAccessor(node, name, old, value, isSvg, component) {\n if (name === 'className') name = 'class'\n\n if (name[0] == 'o' && name[1] == '-'){\n if(extension[name]){\n extension[name](node, value, component)\n }\n } else if (name === 'key') {\n // ignore\n } else if (name === 'ref') {\n applyRef(old, null)\n applyRef(value, node)\n } else if (name === 'class' && !isSvg) {\n node.className = value || ''\n } else if (name === 'style') {\n if (!value || typeof value === 'string' || typeof old === 'string') {\n node.style.cssText = value || ''\n }\n if (value && typeof value === 'object') {\n if (typeof old !== 'string') {\n for (let i in old) if (!(i in value)) node.style[i] = ''\n }\n for (let i in value) {\n node.style[i] =\n typeof value[i] === 'number' && IS_NON_DIMENSIONAL.test(i) === false\n ? value[i] + 'px'\n : value[i]\n }\n }\n } else if (name === 'dangerouslySetInnerHTML') {\n if (value) node.innerHTML = value.__html || ''\n } else if (name[0] == 'o' && name[1] == 'n') {\n let useCapture = name !== (name = name.replace(/Capture$/, ''))\n\t\tlet nameLower = name.toLowerCase()\n\t\tname = (nameLower in node ? nameLower : name).slice(2)\n if (value) {\n if (!old) {\n node.addEventListener(name, eventProxy, useCapture)\n if (name == 'tap') {\n node.addEventListener('touchstart', touchStart, useCapture)\n node.addEventListener('touchend', touchEnd, useCapture)\n }\n }\n } else {\n node.removeEventListener(name, eventProxy, useCapture)\n if (name == 'tap') {\n node.removeEventListener('touchstart', touchStart, useCapture)\n node.removeEventListener('touchend', touchEnd, useCapture)\n }\n }\n ;(node._listeners || (node._listeners = {}))[name] = value\n } else if (node.nodeName === 'INPUT' && name === 'value'){\n node[name] = value == null ? '' : value\n } else if (name !== 'list' && name !== 'type' && name !== 'css' && !isSvg && name in node && value !== '') { //value !== '' fix for selected, disabled, checked with pure element\n // Attempt to set a DOM property to the given value.\n // IE & FF throw for certain property-value combinations.\n try {\n node[name] = value == null ? '' : value\n } catch (e) {}\n if ((value == null || value === false) && name != 'spellcheck')\n node.pureRemoveAttribute ? node.pureRemoveAttribute(name) : node.removeAttribute(name)\n } else {\n let ns = isSvg && name !== (name = name.replace(/^xlink:?/, ''))\n // spellcheck is treated differently than all other boolean values and\n // should not be removed when the value is `false`. See:\n // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-spellcheck\n if (value == null || value === false) {\n if (ns)\n node.removeAttributeNS(\n 'http://www.w3.org/1999/xlink',\n name.toLowerCase()\n )\n else node.pureRemoveAttribute ? node.pureRemoveAttribute(name) : node.removeAttribute(name)\n } else if (typeof value !== 'function') {\n if (ns) {\n node.setAttributeNS(\n 'http://www.w3.org/1999/xlink',\n name.toLowerCase(),\n value\n )\n } else {\n node.pureSetAttribute ? node.pureSetAttribute(name, value) : node.setAttribute(name, value)\n }\n }\n }\n}\n\n/**\n * Proxy an event to hooked event handlers\n * @param {Event} e The event object from the browser\n * @private\n */\nfunction eventProxy(e) {\n return this._listeners[e.type]((options.event && options.event(e)) || e)\n}\n\nfunction touchStart(e) {\n this.___touchX = e.touches[0].pageX\n this.___touchY = e.touches[0].pageY\n this.___scrollTop = document.body.scrollTop\n}\n\nfunction touchEnd(e) {\n if (\n Math.abs(e.changedTouches[0].pageX - this.___touchX) < 30 &&\n Math.abs(e.changedTouches[0].pageY - this.___touchY) < 30 &&\n Math.abs(document.body.scrollTop - this.___scrollTop) < 30\n ) {\n this.dispatchEvent(new CustomEvent('tap', { detail: e }))\n }\n}\n","import { ATTR_KEY } from '../constants'\nimport { isSameNodeType, isNamedNode } from './index'\nimport { createNode, setAccessor } from '../dom/index'\nimport { camelCase, isArray, Fragment } from '../util'\nimport { removeNode } from '../dom/index'\nimport options from '../options'\n\n/** Queue of components that have been mounted and are awaiting componentDidMount */\nexport const mounts = []\n\n/** Diff recursion count, used to track the end of the diff cycle. */\nexport let diffLevel = 0\n\n/** Global flag indicating if the diff is currently within an SVG */\nlet isSvgMode = false\n\n/** Global flag indicating if the diff is performing hydration */\nlet hydrating = false\n\n/** Apply differences in a given vnode (and it's deep children) to a real DOM Node.\n *\t@param {Element} [dom=null]\t\tA DOM node to mutate into the shape of the `vnode`\n *\t@param {VNode} vnode\t\t\tA VNode (with descendants forming a tree) representing the desired DOM structure\n *\t@returns {Element} dom\t\t\tThe created/mutated element\n *\t@private\n */\nexport function diff(dom, vnode, parent, component, updateSelf) {\n // diffLevel having been 0 here indicates initial entry into the diff (not a subdiff)\n let ret\n if (!diffLevel++) {\n // when first starting the diff, check if we're diffing an SVG or within an SVG\n isSvgMode = parent != null && parent.ownerSVGElement !== undefined\n\n // hydration is indicated by the existing element to be diffed not having a prop cache\n hydrating = dom != null && !(ATTR_KEY in dom)\n }\n if(vnode.nodeName === Fragment){\n vnode = vnode.children\n }\n if (isArray(vnode)) {\n if (parent) {\n const styles = parent.querySelectorAll('style')\n styles.forEach(s => {\n parent.removeChild(s)\n })\n innerDiffNode(parent, vnode, hydrating, component, updateSelf)\n\n for (let i = styles.length - 1; i >= 0; i--) {\n parent.firstChild ? parent.insertBefore(styles[i], parent.firstChild) : parent.appendChild(style[i])\n }\n } else {\n ret = []\n vnode.forEach((item, index) => {\n let ele = idiff(index === 0 ? dom : null, item, component, updateSelf)\n ret.push(ele)\n })\n }\n } else {\n if (isArray(dom)) {\n dom.forEach((one, index) => {\n if (index === 0) {\n ret = idiff(one, vnode, component, updateSelf)\n } else {\n recollectNodeTree(one, false)\n }\n })\n } else {\n ret = idiff(dom, vnode, component, updateSelf)\n }\n // append the element if its a new parent\n if (parent && ret.parentNode !== parent) parent.appendChild(ret)\n }\n\n // diffLevel being reduced to 0 means we're exiting the diff\n if (!--diffLevel) {\n hydrating = false\n // invoke queued componentDidMount lifecycle methods\n }\n\n return ret\n}\n\n/** Internals of `diff()`, separated to allow bypassing diffLevel / mount flushing. */\nfunction idiff(dom, vnode, component, updateSelf) {\n if (dom && vnode && dom.props) {\n dom.props.children = vnode.children\n }\n let out = dom,\n prevSvgMode = isSvgMode\n\n // empty values (null, undefined, booleans) render as empty Text nodes\n if (vnode == null || typeof vnode === 'boolean') vnode = ''\n\n // Fast case: Strings & Numbers create/update Text nodes.\n if (typeof vnode === 'string' || typeof vnode === 'number') {\n // update if it's already a Text node:\n if (\n dom &&\n dom.splitText !== undefined &&\n dom.parentNode &&\n (!dom._component || component)\n ) {\n /* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */\n if (dom.nodeValue != vnode) {\n dom.nodeValue = vnode\n }\n } else {\n // it wasn't a Text node: replace it with one and recycle the old Element\n out = document.createTextNode(vnode)\n if (dom) {\n if (dom.parentNode) dom.parentNode.replaceChild(out, dom)\n recollectNodeTree(dom, true)\n }\n }\n\n out[ATTR_KEY] = true\n\n return out\n }\n\n // If the VNode represents a Component, perform a component diff:\n let vnodeName = vnode.nodeName\n if (typeof vnodeName === 'function') {\n for (let key in options.mapping) {\n if (options.mapping[key] === vnodeName) {\n vnodeName = key\n vnode.nodeName = key\n break\n }\n }\n }\n // Tracks entering and exiting SVG namespace when descending through the tree.\n isSvgMode =\n vnodeName === 'svg'\n ? true\n : vnodeName === 'foreignObject'\n ? false\n : isSvgMode\n\n // If there's no existing element or it's the wrong type, create a new one:\n vnodeName = String(vnodeName)\n if (!dom || !isNamedNode(dom, vnodeName)) {\n out = createNode(vnodeName, isSvgMode)\n\n if (dom) {\n // move children into the replacement node\n while (dom.firstChild) out.appendChild(dom.firstChild)\n\n // if the previous Element was mounted into the DOM, replace it inline\n if (dom.parentNode) dom.parentNode.replaceChild(out, dom)\n\n // recycle the old element (skips non-Element node types)\n recollectNodeTree(dom, true)\n }\n }\n\n let fc = out.firstChild,\n props = out[ATTR_KEY],\n vchildren = vnode.children\n\n if (props == null) {\n props = out[ATTR_KEY] = {}\n for (let a = out.attributes, i = a.length; i--;)\n props[a[i].name] = a[i].value\n }\n\n // Optimization: fast-path for elements containing a single TextNode:\n if (\n !hydrating &&\n vchildren &&\n vchildren.length === 1 &&\n typeof vchildren[0] === 'string' &&\n fc != null &&\n fc.splitText !== undefined &&\n fc.nextSibling == null\n ) {\n if (fc.nodeValue != vchildren[0]) {\n fc.nodeValue = vchildren[0]\n }\n }\n // otherwise, if there are existing or new children, diff them:\n else if ((vchildren && vchildren.length) || fc != null) {\n if (!(out.constructor.is == 'WeElement' && out.constructor.noSlot)) {\n innerDiffNode(\n out,\n vchildren,\n hydrating || props.dangerouslySetInnerHTML != null,\n component,\n updateSelf\n )\n }\n }\n\n // Apply attributes/props from VNode to the DOM Element:\n diffAttributes(out, vnode.attributes, props, component, updateSelf)\n if (out.props) {\n out.props.children = vnode.children\n }\n // restore previous SVG mode: (in case we're exiting an SVG namespace)\n isSvgMode = prevSvgMode\n\n return out\n}\n\n/** Apply child and attribute changes between a VNode and a DOM Node to the DOM.\n *\t@param {Element} dom\t\t\tElement whose children should be compared & mutated\n *\t@param {Array} vchildren\t\tArray of VNodes to compare to `dom.childNodes`\n *\t@param {Boolean} isHydrating\tIf `true`, consumes externally created elements similar to hydration\n */\nfunction innerDiffNode(dom, vchildren, isHydrating, component, updateSelf) {\n let originalChildren = dom.childNodes,\n children = [],\n keyed = {},\n keyedLen = 0,\n min = 0,\n len = originalChildren.length,\n childrenLen = 0,\n vlen = vchildren ? vchildren.length : 0,\n j,\n c,\n f,\n vchild,\n child\n\n // Build up a map of keyed children and an Array of unkeyed children:\n if (len !== 0) {\n for (let i = 0; i < len; i++) {\n let child = originalChildren[i],\n props = child[ATTR_KEY],\n key =\n vlen && props\n ? child._component\n ? child._component.__key\n : props.key\n : null\n if (key != null) {\n keyedLen++\n keyed[key] = child\n } else if (\n props ||\n (child.splitText !== undefined\n ? isHydrating\n ? child.nodeValue.trim()\n : true\n : isHydrating)\n ) {\n children[childrenLen++] = child\n }\n }\n }\n\n if (vlen !== 0) {\n for (let i = 0; i < vlen; i++) {\n vchild = vchildren[i]\n child = null\n\n // attempt to find a node based on key matching\n let key = vchild.key\n if (key != null) {\n if (keyedLen && keyed[key] !== undefined) {\n child = keyed[key]\n keyed[key] = undefined\n keyedLen--\n }\n }\n // attempt to pluck a node of the same type from the existing children\n else if (!child && min < childrenLen) {\n for (j = min; j < childrenLen; j++) {\n if (\n children[j] !== undefined &&\n isSameNodeType((c = children[j]), vchild, isHydrating)\n ) {\n child = c\n children[j] = undefined\n if (j === childrenLen - 1) childrenLen--\n if (j === min) min++\n break\n }\n }\n }\n\n // morph the matched/found/created DOM child to match vchild (deep)\n child = idiff(child, vchild, component, updateSelf)\n\n f = originalChildren[i]\n if (child && child !== dom && child !== f) {\n if (f == null) {\n dom.appendChild(child)\n } else if (child === f.nextSibling) {\n removeNode(f)\n } else {\n dom.insertBefore(child, f)\n }\n }\n }\n }\n\n // remove unused keyed children:\n if (keyedLen) {\n for (let i in keyed)\n if (keyed[i] !== undefined) recollectNodeTree(keyed[i], false)\n }\n\n // remove orphaned unkeyed children:\n while (min <= childrenLen) {\n if ((child = children[childrenLen--]) !== undefined)\n recollectNodeTree(child, false)\n }\n}\n\n/** Recursively recycle (or just unmount) a node and its descendants.\n *\t@param {Node} node\t\t\t\t\t\tDOM node to start unmount/removal from\n *\t@param {Boolean} [unmountOnly=false]\tIf `true`, only triggers unmount lifecycle, skips removal\n */\nexport function recollectNodeTree(node, unmountOnly) {\n // If the node's VNode had a ref function, invoke it with null here.\n // (this is part of the React spec, and smart for unsetting references)\n if (node[ATTR_KEY] != null && node[ATTR_KEY].ref) {\n if (typeof node[ATTR_KEY].ref === 'function') {\n node[ATTR_KEY].ref(null)\n } else if (node[ATTR_KEY].ref.current) {\n node[ATTR_KEY].ref.current = null\n }\n }\n\n if (unmountOnly === false || node[ATTR_KEY] == null) {\n removeNode(node)\n }\n\n removeChildren(node)\n}\n\n/** Recollect/unmount all children.\n *\t- we use .lastChild here because it causes less reflow than .firstChild\n *\t- it's also cheaper than accessing the .childNodes Live NodeList\n */\nexport function removeChildren(node) {\n node = node.lastChild\n while (node) {\n let next = node.previousSibling\n recollectNodeTree(node, true)\n node = next\n }\n}\n\n/** Apply differences in attributes from a VNode to the given DOM Element.\n *\t@param {Element} dom\t\tElement with attributes to diff `attrs` against\n *\t@param {Object} attrs\t\tThe desired end-state key-value attribute pairs\n *\t@param {Object} old\t\t\tCurrent/previous attributes (from previous VNode or element's prop cache)\n */\nfunction diffAttributes(dom, attrs, old, component, updateSelf) {\n let name\n //let update = false\n let isWeElement = dom.update\n let oldClone\n if (dom.receiveProps) {\n oldClone = Object.assign({}, old)\n }\n // remove attributes no longer present on the vnode by setting them to undefined\n for (name in old) {\n if (!(attrs && attrs[name] != null) && old[name] != null) {\n setAccessor(dom, name, old[name], (old[name] = undefined), isSvgMode, component)\n if (isWeElement) {\n delete dom.props[name]\n //update = true\n }\n }\n }\n\n // add new & update changed attributes\n for (name in attrs) {\n if (isWeElement && typeof attrs[name] === 'object' && name !== 'ref') {\n if (name === 'style') {\n setAccessor(dom, name, old[name], (old[name] = attrs[name]), isSvgMode, component)\n }\n let ccName = camelCase(name)\n dom.props[ccName] = old[ccName] = attrs[name]\n //update = true\n } else if (\n name !== 'children' &&\n (!(name in old) ||\n attrs[name] !==\n (name === 'value' || name === 'checked' ? dom[name] : old[name]))\n ) {\n setAccessor(dom, name, old[name], attrs[name], isSvgMode, component)\n if (isWeElement) {\n let ccName = camelCase(name)\n dom.props[ccName] = old[ccName] = attrs[name]\n //update = true\n } else {\n old[name] = attrs[name]\n }\n }\n }\n\n if (isWeElement && !updateSelf && dom.parentNode) {\n //__hasChildren is not accuracy when it was empty at first, so add dom.children.length > 0 condition\n //if (update || dom.__hasChildren || dom.children.length > 0 || (dom.store && !dom.store.data)) {\n if (dom.receiveProps(dom.props, oldClone) !== false) {\n dom.update()\n }\n //}\n }\n}\n","import {\n\tcssToDom,\n\tisArray,\n\tgetUse,\n\thyphenate,\n\tgetValByPath,\n\tremoveItem\n} from './util'\nimport { diff } from './vdom/diff'\nimport options from './options'\nimport { getPath } from './util'\n\nlet id = 0\n\nexport default class WeElement extends HTMLElement {\n\tstatic is = 'WeElement'\n\n\tconstructor() {\n\t\tsuper()\n\t\tthis.props = Object.assign({},\n\t\t\tthis.constructor.defaultProps\n\t\t)\n\t\tthis.elementId = id++\n\t}\n\n\tconnectedCallback() {\n\t\tlet p = this.parentNode\n\t\twhile (p && !this.store) {\n\t\t\tthis.store = p.store\n\t\t\tp = p.parentNode || p.host\n\t\t}\n\n\t\tif (this.use) {\n\t\t\tlet use\n\t\t\tif (typeof this.use === 'function') {\n\t\t\t\tuse = this.use()\n\t\t\t} else {\n\t\t\t\tuse = this.use\n\t\t\t}\n\n\n\t\t\tif (options.isMultiStore) {\n\t\t\t\tlet _updatePath = {}\n\t\t\t\tlet using = {}\n\t\t\t\tfor (let storeName in use) {\n\t\t\t\t\t_updatePath[storeName] = {}\n\t\t\t\t\tusing[storeName] = {}\n\t\t\t\t\tgetPath(use[storeName], _updatePath, storeName)\n\t\t\t\t\tgetUse(this.store[storeName].data, use[storeName], using, storeName)\n\t\t\t\t\tthis.store[storeName].instances.push(this)\n\t\t\t\t}\n\t\t\t\tthis.using = using\n\t\t\t\tthis._updatePath = _updatePath\n\t\t\t} else {\n\t\t\t\tthis._updatePath = getPath(use)\n\t\t\t\tthis.using = getUse(this.store.data, use)\n\t\t\t\tthis.store.instances.push(this)\n\t\t\t}\n\t\t}\n\t\tif (this.useSelf) {\n\t\t\tconst use = typeof this.useSelf === 'function' ? this.useSelf() : this.useSelf\n\t\t\tif (options.isMultiStore) {\n\t\t\t\tlet _updatePath = {}\n\t\t\t\tlet using = {}\n\t\t\t\tfor (let storeName in use) {\n\t\t\t\t\tgetPath(use[storeName], _updatePath, storeName)\n\t\t\t\t\tgetUse(this.store[storeName].data, use[storeName], using, storeName)\n\t\t\t\t\tthis.store[storeName].updateSelfInstances.push(this)\n\t\t\t\t}\n\t\t\t\tthis.usingSelf = using\n\t\t\t\tthis._updateSelfPath = _updatePath\n\t\t\t} else {\n\t\t\t\tthis._updateSelfPath = getPath(use)\n\t\t\t\tthis.usingSelf = getUse(this.store.data, use)\n\t\t\t\tthis.store.updateSelfInstances.push(this)\n\t\t\t}\n\t\t}\n\t\tthis.attrsToProps()\n\t\tthis.beforeInstall()\n\t\tthis.install()\n\t\tthis.afterInstall()\n\n\t\tlet shadowRoot\n\t\tif (!this.shadowRoot) {\n\t\t\tshadowRoot = this.attachShadow({\n\t\t\t\tmode: 'open'\n\t\t\t})\n\t\t} else {\n\t\t\tshadowRoot = this.shadowRoot\n\t\t\tlet fc\n\t\t\twhile ((fc = shadowRoot.firstChild)) {\n\t\t\t\tshadowRoot.removeChild(fc)\n\t\t\t}\n\t\t}\n\n\t\tif (this.constructor.css) {\n\t\t\tshadowRoot.appendChild(cssToDom(this.constructor.css))\n\t\t} else if (this.css) {\n\t\t\tshadowRoot.appendChild(cssToDom(typeof this.css === 'function' ? this.css() : this.css))\n\t\t}\n\t\tthis.beforeRender()\n\t\toptions.afterInstall && options.afterInstall(this)\n\n\n\t\tconst rendered = this.render(this.props, this.store)\n\t\tthis.__hasChildren = Object.prototype.toString.call(rendered) === '[object Array]' && rendered.length > 0\n\n\t\tthis.rootNode = diff(\n\t\t\tnull,\n\t\t\trendered,\n\t\t\tnull,\n\t\t\tthis\n\t\t)\n\t\tthis.rendered()\n\n\t\tif (this.props.css) {\n\t\t\tthis._customStyleElement = cssToDom(this.props.css)\n\t\t\tthis._customStyleContent = this.props.css\n\t\t\tshadowRoot.appendChild(this._customStyleElement)\n\t\t}\n\n\t\tif (isArray(this.rootNode)) {\n\t\t\tthis.rootNode.forEach(function (item) {\n\t\t\t\tshadowRoot.appendChild(item)\n\t\t\t})\n\t\t} else {\n\t\t\tshadowRoot.appendChild(this.rootNode)\n\t\t}\n\t\tthis.installed()\n\t\tthis._isInstalled = true\n\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.uninstall()\n\t\tthis._isInstalled = false\n\t\tif (this.store) {\n\t\t\tif(options.isMultiStore){\n\t\t\t\tfor(let key in this.store){\n\t\t\t\t\tconst current = this.store[key]\n\t\t\t\t\tremoveItem(this, current.instances)\n\t\t\t\t removeItem(this, current.updateSelfInstances)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tremoveItem(this, this.store.instances)\n\t\t\t\tremoveItem(this, this.store.updateSelfInstances)\n\t\t\t}\n\t\t}\n\t}\n\n\tupdate(ignoreAttrs, updateSelf) {\n\t\tthis._willUpdate = true\n\t\tthis.beforeUpdate()\n\t\tthis.beforeRender()\n\t\t//fix null !== undefined\n\t\tif (this._customStyleContent != this.props.css) {\n\t\t\tthis._customStyleContent = this.props.css\n\t\t\tthis._customStyleElement.textContent = this._customStyleContent\n\t\t}\n\t\tthis.attrsToProps(ignoreAttrs)\n\n\t\tconst rendered = this.render(this.props, this.store)\n\t\tthis.rendered()\n\t\tthis.__hasChildren = this.__hasChildren || (Object.prototype.toString.call(rendered) === '[object Array]' && rendered.length > 0)\n\n\t\tthis.rootNode = diff(\n\t\t\tthis.rootNode,\n\t\t\trendered,\n\t\t\tthis.shadowRoot,\n\t\t\tthis,\n\t\t\tupdateSelf\n\t\t)\n\t\tthis._willUpdate = false\n\t\tthis.updated()\n\n\t}\n\n\tupdateSelf(ignoreAttrs) {\n\t\tthis.update(ignoreAttrs, true)\n\t}\n\n\tremoveAttribute(key) {\n\t\tsuper.removeAttribute(key)\n\t\t//Avoid executing removeAttribute methods before connectedCallback\n\t\tthis._isInstalled && this.update()\n\t}\n\n\tsetAttribute(key, val) {\n\t\tif (val && typeof val === 'object') {\n\t\t\tsuper.setAttribute(key, JSON.stringify(val))\n\t\t} else {\n\t\t\tsuper.setAttribute(key, val)\n\t\t}\n\t\t//Avoid executing setAttribute methods before connectedCallback\n\t\tthis._isInstalled && this.update()\n\t}\n\n\tpureRemoveAttribute(key) {\n\t\tsuper.removeAttribute(key)\n\t}\n\n\tpureSetAttribute(key, val) {\n\t\tsuper.setAttribute(key, val)\n\t}\n\n\tattrsToProps(ignoreAttrs) {\n\t\tconst ele = this\n\t\tif (ele.normalizedNodeName || ignoreAttrs) return\n\t\tele.props['css'] = ele.getAttribute('css')\n\t\tconst attrs = this.constructor.propTypes\n\t\tif (!attrs) return\n\t\tObject.keys(attrs).forEach(key => {\n\t\t\tconst type = attrs[key]\n\t\t\tconst val = ele.getAttribute(hyphenate(key))\n\t\t\tif (val !== null) {\n\t\t\t\tswitch (type) {\n\t\t\t\t\tcase String:\n\t\t\t\t\t\tele.props[key] = val\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Number:\n\t\t\t\t\t\tele.props[key] = Number(val)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Boolean:\n\t\t\t\t\t\tif (val === 'false' || val === '0') {\n\t\t\t\t\t\t\tele.props[key] = false\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tele.props[key] = true\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Array:\n\t\t\t\t\tcase Object:\n\t\t\t\t\t\tif (val[0] === ':') {\n\t\t\t\t\t\t\tele.props[key] = getValByPath(val.substr(1), Omi.$)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tele.props[key] = JSON.parse(val\n\t\t\t\t\t\t\t\t.replace(/(['\"])?([a-zA-Z0-9_-]+)(['\"])?:([^\\/])/g, '\"$2\":$4')\n\t\t\t\t\t\t\t\t.replace(/'([\\s\\S]*?)'/g, '\"$1\"')\n\t\t\t\t\t\t\t\t.replace(/,(\\s*})/g, '$1')\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (ele.constructor.defaultProps && ele.constructor.defaultProps.hasOwnProperty(key)) {\n\t\t\t\t\tele.props[key] = ele.constructor.defaultProps[key]\n\t\t\t\t} else {\n\t\t\t\t\tele.props[key] = null\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\tfire(name, data) {\n\t\tthis.dispatchEvent(new CustomEvent(name, {\n\t\t\tdetail: data\n\t\t}))\n\t}\n\n\tbeforeInstall() {}\n\n\tinstall() {}\n\n\tafterInstall() {}\n\n\tinstalled() {}\n\n\tuninstall() {}\n\n\tbeforeUpdate() {}\n\n\tupdated() {}\n\n\tbeforeRender() {}\n\n\trendered() {}\n\n\treceiveProps() {}\n\n}\n","/*!\n * https://github.com/Palindrom/JSONPatcherProxy\n * (c) 2017 Starcounter\n * MIT license\n */\n\n/** Class representing a JS Object observer */\nconst JSONPatcherProxy = (function() {\n /**\n * Deep clones your object and returns a new object.\n */\n function deepClone(obj) {\n switch (typeof obj) {\n case 'object':\n return JSON.parse(JSON.stringify(obj)) //Faster than ES5 clone - http://jsperf.com/deep-cloning-of-objects/5\n case 'undefined':\n return null //this is how JSON.stringify behaves for array items\n default:\n return obj //no need to clone primitives\n }\n }\n JSONPatcherProxy.deepClone = deepClone\n\n function escapePathComponent(str) {\n if (str.indexOf('/') == -1 && str.indexOf('~') == -1) return str\n return str.replace(/~/g, '~0').replace(/\\//g, '~1')\n }\n JSONPatcherProxy.escapePathComponent = escapePathComponent\n\n /**\n * Walk up the parenthood tree to get the path\n * @param {JSONPatcherProxy} instance\n * @param {Object} obj the object you need to find its path\n */\n function findObjectPath(instance, obj) {\n const pathComponents = []\n let parentAndPath = instance.parenthoodMap.get(obj)\n while (parentAndPath && parentAndPath.path) {\n // because we're walking up-tree, we need to use the array as a stack\n pathComponents.unshift(parentAndPath.path)\n parentAndPath = instance.parenthoodMap.get(parentAndPath.parent)\n }\n if (pathComponents.length) {\n const path = pathComponents.join('/')\n return '/' + path\n }\n return ''\n }\n /**\n * A callback to be used as th proxy set trap callback.\n * It updates parenthood map if needed, proxifies nested newly-added objects, calls default callbacks with the changes occurred.\n * @param {JSONPatcherProxy} instance JSONPatcherProxy instance\n * @param {Object} target the affected object\n * @param {String} key the effect property's name\n * @param {Any} newValue the value being set\n */\n function setTrap(instance, target, key, newValue) {\n const parentPath = findObjectPath(instance, target)\n\n const destinationPropKey = parentPath + '/' + escapePathComponent(key)\n\n if (instance.proxifiedObjectsMap.has(newValue)) {\n const newValueOriginalObject = instance.proxifiedObjectsMap.get(newValue)\n\n instance.parenthoodMap.set(newValueOriginalObject.originalObject, {\n parent: target,\n path: key\n })\n }\n /*\n mark already proxified values as inherited.\n rationale: proxy.arr.shift()\n will emit\n {op: replace, path: '/arr/1', value: arr_2}\n {op: remove, path: '/arr/2'}\n\n by default, the second operation would revoke the proxy, and this renders arr revoked.\n That's why we need to remember the proxies that are inherited.\n */\n const revokableInstance = instance.proxifiedObjectsMap.get(newValue)\n /*\n Why do we need to check instance.isProxifyingTreeNow?\n\n We need to make sure we mark revokables as inherited ONLY when we're observing,\n because throughout the first proxification, a sub-object is proxified and then assigned to\n its parent object. This assignment of a pre-proxified object can fool us into thinking\n that it's a proxified object moved around, while in fact it's the first assignment ever.\n\n Checking isProxifyingTreeNow ensures this is not happening in the first proxification,\n but in fact is is a proxified object moved around the tree\n */\n if (revokableInstance && !instance.isProxifyingTreeNow) {\n revokableInstance.inherited = true\n }\n\n // if the new value is an object, make sure to watch it\n if (\n newValue &&\n typeof newValue == 'object' &&\n !instance.proxifiedObjectsMap.has(newValue)\n ) {\n instance.parenthoodMap.set(newValue, {\n parent: target,\n path: key\n })\n newValue = instance._proxifyObjectTreeRecursively(target, newValue, key)\n }\n // let's start with this operation, and may or may not update it later\n const operation = {\n op: 'remove',\n path: destinationPropKey\n }\n if (typeof newValue == 'undefined') {\n // applying De Morgan's laws would be a tad faster, but less readable\n if (!Array.isArray(target) && !target.hasOwnProperty(key)) {\n // `undefined` is being set to an already undefined value, keep silent\n return Reflect.set(target, key, newValue)\n }\n // when array element is set to `undefined`, should generate replace to `null`\n if (Array.isArray(target)) {\n // undefined array elements are JSON.stringified to `null`\n ;(operation.op = 'replace'), (operation.value = null)\n }\n const oldValue = instance.proxifiedObjectsMap.get(target[key])\n // was the deleted a proxified object?\n if (oldValue) {\n instance.parenthoodMap.delete(target[key])\n instance.disableTrapsForProxy(oldValue)\n instance.proxifiedObjectsMap.delete(oldValue)\n }\n } else {\n if (Array.isArray(target) && !Number.isInteger(+key.toString())) {\n /* array props (as opposed to indices) don't emit any patches, to avoid needless `length` patches */\n if (key != 'length') {\n console.warn(\n 'JSONPatcherProxy noticed a non-integer prop was set for an array. This will not emit a patch'\n )\n }\n return Reflect.set(target, key, newValue)\n }\n operation.op = 'add'\n if (target.hasOwnProperty(key)) {\n if (typeof target[key] !== 'undefined' || Array.isArray(target)) {\n operation.op = 'replace' // setting `undefined` array elements is a `replace` op\n }\n }\n operation.value = newValue\n }\n operation.oldValue = target[key]\n const reflectionResult = Reflect.set(target, key, newValue)\n instance.defaultCallback(operation)\n return reflectionResult\n }\n /**\n * A callback to be used as th proxy delete trap callback.\n * It updates parenthood map if needed, calls default callbacks with the changes occurred.\n * @param {JSONPatcherProxy} instance JSONPatcherProxy instance\n * @param {Object} target the effected object\n * @param {String} key the effected property's name\n */\n function deleteTrap(instance, target, key) {\n if (typeof target[key] !== 'undefined') {\n const parentPath = findObjectPath(instance, target)\n const destinationPropKey = parentPath + '/' + escapePathComponent(key)\n\n const revokableProxyInstance = instance.proxifiedObjectsMap.get(\n target[key]\n )\n\n if (revokableProxyInstance) {\n if (revokableProxyInstance.inherited) {\n /*\n this is an inherited proxy (an already proxified object that was moved around),\n we shouldn't revoke it, because even though it was removed from path1, it is still used in path2.\n And we know that because we mark moved proxies with `inherited` flag when we move them\n\n it is a good idea to remove this flag if we come across it here, in deleteProperty trap.\n We DO want to revoke the proxy if it was removed again.\n */\n revokableProxyInstance.inherited = false\n } else {\n instance.parenthoodMap.delete(revokableProxyInstance.originalObject)\n instance.disableTrapsForProxy(revokableProxyInstance)\n instance.proxifiedObjectsMap.delete(target[key])\n }\n }\n const reflectionResult = Reflect.deleteProperty(target, key)\n\n instance.defaultCallback({\n op: 'remove',\n path: destinationPropKey\n })\n\n return reflectionResult\n }\n }\n /* pre-define resume and pause functions to enhance constructors performance */\n function resume() {\n this.defaultCallback = operation => {\n this.isRecording && this.patches.push(operation)\n this.userCallback && this.userCallback(operation)\n }\n this.isObserving = true\n }\n function pause() {\n this.defaultCallback = () => {}\n this.isObserving = false\n }\n /**\n * Creates an instance of JSONPatcherProxy around your object of interest `root`.\n * @param {Object|Array} root - the object you want to wrap\n * @param {Boolean} [showDetachedWarning = true] - whether to log a warning when a detached sub-object is modified @see {@link https://github.com/Palindrom/JSONPatcherProxy#detached-objects}\n * @returns {JSONPatcherProxy}\n * @constructor\n */\n function JSONPatcherProxy(root, showDetachedWarning) {\n this.isProxifyingTreeNow = false\n this.isObserving = false\n this.proxifiedObjectsMap = new Map()\n this.parenthoodMap = new Map()\n // default to true\n if (typeof showDetachedWarning !== 'boolean') {\n showDetachedWarning = true\n }\n\n this.showDetachedWarning = showDetachedWarning\n this.originalObject = root\n this.cachedProxy = null\n this.isRecording = false\n this.userCallback\n /**\n * @memberof JSONPatcherProxy\n * Restores callback back to the original one provided to `observe`.\n */\n this.resume = resume.bind(this)\n /**\n * @memberof JSONPatcherProxy\n * Replaces your callback with a noop function.\n */\n this.pause = pause.bind(this)\n }\n\n JSONPatcherProxy.prototype.generateProxyAtPath = function(parent, obj, path) {\n if (!obj) {\n return obj\n }\n const traps = {\n set: (target, key, value, receiver) =>\n setTrap(this, target, key, value, receiver),\n deleteProperty: (target, key) => deleteTrap(this, target, key)\n }\n const revocableInstance = Proxy.revocable(obj, traps)\n // cache traps object to disable them later.\n revocableInstance.trapsInstance = traps\n revocableInstance.originalObject = obj\n\n /* keeping track of object's parent and path */\n\n this.parenthoodMap.set(obj, { parent, path })\n\n /* keeping track of all the proxies to be able to revoke them later */\n this.proxifiedObjectsMap.set(revocableInstance.proxy, revocableInstance)\n return revocableInstance.proxy\n }\n // grab tree's leaves one by one, encapsulate them into a proxy and return\n JSONPatcherProxy.prototype._proxifyObjectTreeRecursively = function(\n parent,\n root,\n path\n ) {\n for (let key in root) {\n if (root.hasOwnProperty(key)) {\n if (root[key] instanceof Object) {\n root[key] = this._proxifyObjectTreeRecursively(\n root,\n root[key],\n escapePathComponent(key)\n )\n }\n }\n }\n return this.generateProxyAtPath(parent, root, path)\n }\n // this function is for aesthetic purposes\n JSONPatcherProxy.prototype.proxifyObjectTree = function(root) {\n /*\n while proxyifying object tree,\n the proxyifying operation itself is being\n recorded, which in an unwanted behavior,\n that's why we disable recording through this\n initial process;\n */\n this.pause()\n this.isProxifyingTreeNow = true\n const proxifiedObject = this._proxifyObjectTreeRecursively(\n undefined,\n root,\n ''\n )\n /* OK you can record now */\n this.isProxifyingTreeNow = false\n this.resume()\n return proxifiedObject\n }\n /**\n * Turns a proxified object into a forward-proxy object; doesn't emit any patches anymore, like a normal object\n * @param {Proxy} proxy - The target proxy object\n */\n JSONPatcherProxy.prototype.disableTrapsForProxy = function(\n revokableProxyInstance\n ) {\n if (this.showDetachedWarning) {\n const message =\n \"You're accessing an object that is detached from the observedObject tree, see https://github.com/Palindrom/JSONPatcherProxy#detached-objects\"\n\n revokableProxyInstance.trapsInstance.set = (\n targetObject,\n propKey,\n newValue\n ) => {\n console.warn(message)\n return Reflect.set(targetObject, propKey, newValue)\n }\n revokableProxyInstance.trapsInstance.set = (\n targetObject,\n propKey,\n newValue\n ) => {\n console.warn(message)\n return Reflect.set(targetObject, propKey, newValue)\n }\n revokableProxyInstance.trapsInstance.deleteProperty = (\n targetObject,\n propKey\n ) => {\n return Reflect.deleteProperty(targetObject, propKey)\n }\n } else {\n delete revokableProxyInstance.trapsInstance.set\n delete revokableProxyInstance.trapsInstance.get\n delete revokableProxyInstance.trapsInstance.deleteProperty\n }\n }\n /**\n * Proxifies the object that was passed in the constructor and returns a proxified mirror of it. Even though both parameters are options. You need to pass at least one of them.\n * @param {Boolean} [record] - whether to record object changes to a later-retrievable patches array.\n * @param {Function} [callback] - this will be synchronously called with every object change with a single `patch` as the only parameter.\n */\n JSONPatcherProxy.prototype.observe = function(record, callback) {\n if (!record && !callback) {\n throw new Error('You need to either record changes or pass a callback')\n }\n this.isRecording = record\n this.userCallback = callback\n /*\n I moved it here to remove it from `unobserve`,\n this will also make the constructor faster, why initiate\n the array before they decide to actually observe with recording?\n They might need to use only a callback.\n */\n if (record) this.patches = []\n this.cachedProxy = this.proxifyObjectTree(this.originalObject)\n return this.cachedProxy\n }\n /**\n * If the observed is set to record, it will synchronously return all the patches and empties patches array.\n */\n JSONPatcherProxy.prototype.generate = function() {\n if (!this.isRecording) {\n throw new Error('You should set record to true to get patches later')\n }\n return this.patches.splice(0, this.patches.length)\n }\n /**\n * Revokes all proxies rendering the observed object useless and good for garbage collection @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/revocable}\n */\n JSONPatcherProxy.prototype.revoke = function() {\n this.proxifiedObjectsMap.forEach(el => {\n el.revoke()\n })\n }\n /**\n * Disables all proxies' traps, turning the observed object into a forward-proxy object, like a normal object that you can modify silently.\n */\n JSONPatcherProxy.prototype.disableTraps = function() {\n this.proxifiedObjectsMap.forEach(this.disableTrapsForProxy, this)\n }\n return JSONPatcherProxy\n})()\n\nexport default JSONPatcherProxy\n","import { diff } from './vdom/diff'\nimport JSONProxy from './proxy'\nimport { getUse } from './util'\nimport options from './options'\n\nexport function render(vnode, parent, store) {\n\tparent = typeof parent === 'string' ? document.querySelector(parent) : parent\n\tif (store) {\n\t\tif (store.data) {\n\t\t\tobserveStore(store)\n\t\t} else {\n\t\t\toptions.isMultiStore = true\n\t\t\t//Multi-store injection\n\t\t\tfor (let key in store) {\n\t\t\t\tobserveStore(store[key], key)\n\t\t\t}\n\t\t}\n\t\tparent.store = store\n\t}\n\treturn diff(null, vnode, parent, false)\n}\n\nfunction observeStore(store, key) {\n\tstore.instances = []\n\tstore.updateSelfInstances = []\n\textendStoreUpate(store, key)\n\n\tstore.data = new JSONProxy(store.data).observe(false, function (patch) {\n\t\tconst patchs = {}\n\t\tif (patch.op === 'remove') {\n\t\t\t// fix arr splice\n\t\t\tconst kv = getArrayPatch(patch.path, store)\n\t\t\tpatchs[kv.k] = kv.v\n\n\t\t\tupdate(patchs, store)\n\n\t\t} else {\n\t\t\tconst key = fixPath(patch.path)\n\t\t\tpatchs[key] = patch.value\n\n\t\t\tupdate(patchs, store)\n\n\t\t}\n\t})\n}\n\nfunction update(patch, store) {\n\tstore.update(patch)\n}\n\nfunction extendStoreUpate(store, key) {\n\tstore.update = function (patch) {\n\t\tif (Object.keys(patch).length > 0) {\n\t\t\tthis.instances.forEach(instance => {\n\t\t\t\tif (key) {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updatePath && instance._updatePath[key] && needUpdate(patch, instance._updatePath[key]))) {\n\t\t\t\t\t\tif (instance.use) {\n\t\t\t\t\t\t\tgetUse(store.data, (typeof instance.use === 'function' ? instance.use() : instance.use)[key], instance.using, key)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.update()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updatePath && needUpdate(patch, instance._updatePath))) {\n\t\t\t\t\t\tif (instance.use) {\n\t\t\t\t\t\t\tinstance.using = getUse(store.data, typeof instance.use === 'function' ? instance.use() : instance.use)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.update()\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t})\n\n\t\t\tthis.updateSelfInstances.forEach(instance => {\n\t\t\t\tif (key) {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updateSelfPath && instance._updateSelfPath[key] && needUpdate(patch, instance._updateSelfPath[key]))) {\n\t\t\t\t\t\tif (instance.useSelf) {\n\t\t\t\t\t\t\tgetUse(store.data, (typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)[key], instance.usingSelf, key)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.updateSelf()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (instance._updateSelfPath && needUpdate(patch, instance._updateSelfPath)) {\n\t\t\t\t\t\tinstance.usingSelf = getUse(store.data, typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)\n\t\t\t\t\t\tinstance.updateSelf()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\tthis.onChange && this.onChange(patch)\n\t\t}\n\t}\n}\n\n\nexport function needUpdate(diffResult, updatePath) {\n\tfor (let keyA in diffResult) {\n\t\tif (updatePath[keyA]) {\n\t\t\treturn true\n\t\t}\n\t\tfor (let keyB in updatePath) {\n\t\t\tif (includePath(keyA, keyB)) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t}\n\treturn false\n}\n\nfunction includePath(pathA, pathB) {\n\tif (pathA.indexOf(pathB) === 0) {\n\t\tconst next = pathA.substr(pathB.length, 1)\n\t\tif (next === '[' || next === '.') {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nexport function fixPath(path) {\n\tlet mpPath = ''\n\tconst arr = path.replace('/', '').split('/')\n\tarr.forEach((item, index) => {\n\t\tif (index) {\n\t\t\tif (isNaN(Number(item))) {\n\t\t\t\tmpPath += '.' + item\n\t\t\t} else {\n\t\t\t\tmpPath += '[' + item + ']'\n\t\t\t}\n\t\t} else {\n\t\t\tmpPath += item\n\t\t}\n\t})\n\treturn mpPath\n}\n\nfunction getArrayPatch(path, store) {\n\tconst arr = path.replace('/', '').split('/')\n\tlet current = store.data[arr[0]]\n\tfor (let i = 1, len = arr.length; i < len - 1; i++) {\n\t\tcurrent = current[arr[i]]\n\t}\n\treturn {\n\t\tk: fixArrPath(path),\n\t\tv: current\n\t}\n}\n\nfunction fixArrPath(path) {\n\tlet mpPath = ''\n\tconst arr = path.replace('/', '').split('/')\n\tconst len = arr.length\n\tarr.forEach((item, index) => {\n\t\tif (index < len - 1) {\n\t\t\tif (index) {\n\t\t\t\tif (isNaN(Number(item))) {\n\t\t\t\t\tmpPath += '.' + item\n\t\t\t\t} else {\n\t\t\t\t\tmpPath += '[' + item + ']'\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmpPath += item\n\t\t\t}\n\t\t}\n\t})\n\treturn mpPath\n}\n","import WeElement from './we-element'\nimport options from './options'\n\nexport function define(name, ctor, config) {\n if (options.mapping[name]) {\n return\n }\n if (ctor.is === 'WeElement') {\n customElements.define(name, ctor)\n options.mapping[name] = ctor\n\n } else {\n \n if (typeof config === 'string') {\n config = { css: config }\n } else {\n config = config || { }\n }\n\n class Ele extends WeElement {\n\n static css = config.css\n\n static propTypes = config.propTypes\n\n static defaultProps = config.defaultProps\n\n render() {\n return ctor.call(this, this)\n }\n\n receiveProps() {\n if (config.receiveProps) {\n return config.receiveProps.apply(this, arguments)\n }\n }\n }\n\n const eleHooks = ['install', 'installed', 'uninstall', 'beforeUpdate', 'updated', 'beforeRender', 'rendered'],\n storeHelpers = ['use', 'useSelf']\n\n eleHooks.forEach(hook => {\n if (config[hook]) {\n Ele.prototype[hook] = function () {\n config[hook].apply(this, arguments)\n }\n }\n })\n\n storeHelpers.forEach(func => {\n if (config[func]) {\n Ele.prototype[func] = function () {\n return typeof config[func] === 'function'\n ? config[func].apply(this, arguments)\n : config[func]\n }\n }\n })\n\n customElements.define(name, Ele)\n options.mapping[name] = Ele\n }\n}\n\n\n\n","import { define } from './define'\n\nexport function tag(name, pure) {\n return function(target) {\n target.pure = pure\n define(name, target)\n }\n}\n","import { extend } from './util'\nimport { h } from './h'\n\n/**\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\n * @param {VNode} vnode\t\tThe virtual DOM element to clone\n * @param {Object} props\tAttributes/props to add when cloning\n * @param {VNode} rest\t\tAny additional arguments will be used as replacement children.\n */\nexport function cloneElement(vnode, props) {\n return h(\n vnode.nodeName,\n extend(extend({}, vnode.attributes), props),\n arguments.length > 2 ? [].slice.call(arguments, 2) : vnode.children\n )\n}\n","export function getHost(ele) {\n let p = ele.parentNode\n while (p) {\n if (p.host) {\n return p.host\n } else if (p.shadowRoot && p.shadowRoot.host) {\n return p.shadowRoot.host\n } else {\n p = p.parentNode\n }\n }\n}\n","export function rpx(str) {\n return str.replace(/([1-9]\\d*|0)(\\.\\d*)*rpx/g, (a, b) => {\n return (window.innerWidth * Number(b)) / 750 + 'px'\n })\n}\n","/**\n * classNames based on https://github.com/JedWatson/classnames\n * by Jed Watson\n * Licensed under the MIT License\n * https://github.com/JedWatson/classnames/blob/master/LICENSE\n * modified by dntzhang\n */\n\nvar hasOwn = {}.hasOwnProperty\n\nexport function classNames() {\n var classes = []\n\n for (var i = 0; i < arguments.length; i++) {\n var arg = arguments[i]\n if (!arg) continue\n\n var argType = typeof arg\n\n if (argType === 'string' || argType === 'number') {\n classes.push(arg)\n } else if (Array.isArray(arg) && arg.length) {\n var inner = classNames.apply(null, arg)\n if (inner) {\n classes.push(inner)\n }\n } else if (argType === 'object') {\n for (var key in arg) {\n if (hasOwn.call(arg, key) && arg[key]) {\n classes.push(key)\n }\n }\n }\n }\n\n return classes.join(' ')\n}\n\nexport function extractClass() {\n const [props, ...args] = Array.prototype.slice.call(arguments, 0)\n if (props.class) {\n args.unshift(props.class)\n delete props.class\n } else if (props.className) {\n args.unshift(props.className)\n delete props.className\n }\n if (args.length > 0) {\n return { class: classNames.apply(null, args) }\n }\n}\n","export function o(obj){\n return JSON.stringify(obj)\n}","var n=function(t,r,u,e){for(var p=1;p\"===t?(a(),u=1):u&&(\"=\"===t?(u=4,r=e,e=\"\"):\"/\"===t?(a(),3===u&&(s=s[0]),u=s,(s=s[0]).push(u,4),u=0):\" \"===t||\"\\t\"===t||\"\\n\"===t||\"\\r\"===t?(a(),u=2):e+=t)}return a(),s},r=\"function\"==typeof Map,u=r?new Map:{},e=r?function(n){var r=u.get(n);return r||u.set(n,r=t(n)),r}:function(n){for(var r=\"\",e=0;e1?r:r[0]}\n","import { h, h as createElement } from './h'\nimport options from './options'\nimport WeElement from './we-element'\nimport { render } from './render'\nimport { define } from './define'\nimport { tag } from './tag'\nimport { cloneElement } from './clone-element'\nimport { getHost } from './get-host'\nimport { rpx } from './rpx'\nimport { classNames, extractClass } from './class'\nimport { o } from './o'\nimport htm from 'htm'\nimport { extend, get, set, bind, unbind } from './extend'\nimport JSONProxy from './proxy'\nimport { Fragment } from './util'\n\nh.f = Fragment\n\nconst html = htm.bind(h)\n\nfunction createRef() {\n return {}\n}\n\nconst $ = {}\nconst Component = WeElement\nconst defineElement = define\nconst elements = options.mapping\n\nconst omi = {\n tag,\n WeElement,\n Component,\n render,\n h,\n createElement,\n options,\n define,\n cloneElement,\n getHost,\n rpx,\n defineElement,\n classNames,\n extractClass,\n createRef,\n html,\n htm,\n o,\n\telements,\n\t$,\n\textend,\n\tget,\n\tset,\n\tbind,\n\tunbind,\n JSONProxy\n}\n\noptions.root.Omi = omi\noptions.root.omi = omi\noptions.root.Omi.version = '6.15.7'\n\nexport default omi\n\nexport {\n tag,\n WeElement,\n Component,\n render,\n h,\n createElement,\n options,\n define,\n cloneElement,\n getHost,\n rpx,\n defineElement,\n classNames,\n extractClass,\n createRef,\n html,\n htm,\n o,\n\telements,\n\t$,\n\textend,\n\tget,\n\tset,\n\tbind,\n\tunbind,\n JSONProxy\n}\n"],"names":["VNode","getGlobal","global","Math","Array","self","window","stack","h","nodeName","attributes","children","lastSimple","child","simple","i","arguments","length","push","pop","undefined","String","p","key","options","vnode","Reflect","customElements","hasOwnProperty","BuiltInHTMLElement","HTMLElement","construct","constructor","prototype","setPrototypeOf","cssToDom","css","node","document","createElement","textContent","camelCase","str","replace","$","$1","toUpperCase","Fragment","props","extend","obj","applyRef","ref","value","current","defer","Promise","resolve","then","bind","setTimeout","isArray","Object","toString","call","getUse","data","paths","out","name","forEach","path","index","isPath","getTargetByPath","keys","tempPath","tempVal","args","apply","pathToArr","split","origin","arr","len","hyphenateRE","hyphenate","toLowerCase","getValByPath","prop","getPath","result","item","removeItem","splice","ATTR_KEY","IS_NON_DIMENSIONAL","isSameNodeType","hydrating","splitText","_componentConstructor","isNamedNode","mapping","normalizedNodeName","extension","handler","set","get","eventProxy","e","_listeners","type","el","addEventListener","unbind","removeEventListener","createNode","isSvg","createElementNS","removeNode","parentNode","removeChild","setAccessor","old","component","className","style","cssText","test","innerHTML","__html","useCapture","nameLower","slice","touchStart","touchEnd","pureRemoveAttribute","removeAttribute","ns","removeAttributeNS","setAttributeNS","pureSetAttribute","setAttribute","event","___touchX","touches","pageX","___touchY","pageY","___scrollTop","body","scrollTop","abs","changedTouches","dispatchEvent","CustomEvent","detail","diffLevel","isSvgMode","diff","dom","parent","updateSelf","ret","ownerSVGElement","styles","querySelectorAll","s","firstChild","insertBefore","appendChild","ele","idiff","one","prevSvgMode","_component","nodeValue","createTextNode","replaceChild","vnodeName","fc","vchildren","a","nextSibling","is","noSlot","dangerouslySetInnerHTML","innerDiffNode","isHydrating","originalChildren","childNodes","keyed","keyedLen","min","childrenLen","vlen","j","c","f","vchild","__key","trim","recollectNodeTree","unmountOnly","removeChildren","lastChild","next","previousSibling","diffAttributes","attrs","isWeElement","update","oldClone","receiveProps","assign","ccName","id","WeElement","defaultProps","elementId","connectedCallback","store","host","use","isMultiStore","_updatePath","using","storeName","instances","useSelf","updateSelfInstances","usingSelf","_updateSelfPath","attrsToProps","beforeInstall","install","afterInstall","shadowRoot","attachShadow","beforeRender","rendered","render","__hasChildren","rootNode","_customStyleElement","_customStyleContent","installed","_isInstalled","disconnectedCallback","uninstall","ignoreAttrs","_willUpdate","beforeUpdate","updated","val","JSON","stringify","getAttribute","propTypes","Number","Boolean","substr","Omi","parse","fire","JSONPatcherProxy","deepClone","escapePathComponent","indexOf","findObjectPath","instance","pathComponents","parentAndPath","parenthoodMap","unshift","join","setTrap","target","newValue","parentPath","destinationPropKey","proxifiedObjectsMap","has","newValueOriginalObject","originalObject","revokableInstance","isProxifyingTreeNow","inherited","_proxifyObjectTreeRecursively","operation","op","oldValue","delete","disableTrapsForProxy","isInteger","warn","reflectionResult","defaultCallback","deleteTrap","revokableProxyInstance","deleteProperty","resume","isRecording","patches","userCallback","isObserving","pause","root","showDetachedWarning","Map","cachedProxy","generateProxyAtPath","traps","receiver","revocableInstance","Proxy","revocable","trapsInstance","proxy","proxifyObjectTree","proxifiedObject","message","targetObject","propKey","observe","record","callback","Error","generate","revoke","disableTraps","querySelector","observeStore","JSONProxy","patch","patchs","kv","getArrayPatch","k","v","fixPath","extendStoreUpate","needUpdate","onChange","diffResult","updatePath","keyA","keyB","includePath","pathA","pathB","mpPath","isNaN","fixArrPath","define","ctor","config","Ele","eleHooks","storeHelpers","hook","func","tag","pure","cloneElement","getHost","rpx","b","innerWidth","hasOwn","classNames","classes","arg","argType","inner","extractClass","class","o","html","htm","createRef","Component","defineElement","elements","omi","version"],"mappings":";;;;;;;;AAAA;AACA,SAAgBA,KAAT,GAAiB;;ACDxB,SAASC,SAAT,GAAqB;MAEjB,OAAOC,MAAP,KAAkB,QAAlB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AAA;kBAAA;gBAAA;4BAAA;kBAAA;UAAA;8BAAA;wBAAA;4BAAA;sBAAA;YAAA;UAAA;MAAA;oBAAA;MAAA;kBAAA;UAAA;UAAA;YAAA;gBAAA;;CAAZ;;AA6BAxW,QAAQ2R,IAAR,CAAa7C,GAAb,GAAmB0H,GAAnB;AACAxW,QAAQ2R,IAAR,CAAa6E,GAAb,GAAmBA,GAAnB;AACAxW,QAAQ2R,IAAR,CAAa7C,GAAb,CAAiB2H,OAAjB,GAA2B,QAA3B;;;"} \ No newline at end of file diff --git a/packages/omi/dist/omi.js b/packages/omi/dist/omi.js index 92f8684cd7..d88b6397b9 100644 --- a/packages/omi/dist/omi.js +++ b/packages/omi/dist/omi.js @@ -168,7 +168,8 @@ if (value) node.innerHTML = value.__html || ''; } else if ('o' == name[0] && 'n' == name[1]) { var useCapture = name !== (name = name.replace(/Capture$/, '')); - name = name.toLowerCase().substring(2); + var nameLower = name.toLowerCase(); + name = (nameLower in node ? nameLower : name).slice(2); if (value) { if (!old) { node.addEventListener(name, eventProxy$1, useCapture); @@ -1047,7 +1048,7 @@ }; options.root.Omi = omi; options.root.omi = omi; - options.root.Omi.version = '6.15.6'; + options.root.Omi.version = '6.15.7'; if ('undefined' != typeof module) module.exports = omi; else self.Omi = omi; }(); //# sourceMappingURL=omi.js.map \ No newline at end of file diff --git a/packages/omi/dist/omi.js.map b/packages/omi/dist/omi.js.map index b94367c1c2..bb9efd21bd 100644 --- a/packages/omi/dist/omi.js.map +++ b/packages/omi/dist/omi.js.map @@ -1 +1 @@ -{"version":3,"sources":["../src/vnode.js","../src/h.js","../src/util.js","../src/vdom/index.js","../src/extend.js","../src/dom/index.js","../src/vdom/diff.js","../src/proxy.js","../src/render.js","../src/define.js","../src/clone-element.js","../src/get-host.js","../src/class.js","../src/o.js","../src/omi.js","../src/options.js","../src/we-element.js","../node_modules/htm/dist/htm.mjs"],"names":["VNode","h","nodeName","attributes","lastSimple","child","simple","i","children","arguments","length","stack","push","pop","undefined","String","p","key","options","vnode","cssToDom","css","node","document","createElement","textContent","camelCase","str","replace","$","$1","toUpperCase","Fragment","props","extend","obj","applyRef","ref","value","current","isArray","Object","prototype","toString","call","getUse","data","paths","out","name","forEach","path","index","isPath","getTargetByPath","keys","tempPath","tempVal","args","apply","pathToArr","split","origin","arr","len","hyphenate","hyphenateRE","toLowerCase","getValByPath","prop","getPath","result","item","removeItem","splice","isSameNodeType","splitText","mapping","hydrating","_componentConstructor","isNamedNode","extend$1","handler","extension","get","e","type","eventProxy","el","_listeners","addEventListener","createNode","removeNode","setAccessor","component","old","isSvg","className","style","cssText","IS_NON_DIMENSIONAL","test","useCapture","substring","touchStart","touchEnd","eventProxy$1","removeEventListener","pureRemoveAttribute","removeAttribute","ns","removeAttributeNS","pureSetAttribute","setAttribute","this","___touchX","pageX","___touchY","touches","pageY","Math","___scrollTop","body","scrollTop","abs","changedTouches","dispatchEvent","CustomEvent","detail","isSvgMode","parent","ownerSVGElement","dom","querySelectorAll","styles","s","innerDiffNode","updateSelf","removeChild","firstChild","insertBefore","appendChild","ret","ele","idiff","one","recollectNodeTree","parentNode","nodeValue","createTextNode","replaceChild","vnodeName","vchildren","fc","a","nextSibling","constructor","is","noSlot","dangerouslySetInnerHTML","diffAttributes","min","childrenLen","vlen","j","keyedLen","originalChildren","keyed","vchild","_child","_component","__key","trim","isHydrating","c","f","unmountOnly","ATTR_KEY","removeChildren","oldClone","assign","receiveProps","isWeElement","attrs","ccName","_ccName","_classCallCheck","instance","Constructor","TypeError","_possibleConstructorReturn","self","ReferenceError","render","store","JSONPatcherProxy","querySelector","observeStore","isMultiStore","diff","instances","updateSelfInstances","observe","patch","extendStoreUpate","getArrayPatch","JSONProxy","patchs","kv","v","update","k","_updatePath","needUpdate","use","using","_updateSelfPath","useSelf","usingSelf","onChange","diffResult","updatePath","keyA","keyB","includePath","pathA","pathB","indexOf","next","substr","fixPath","mpPath","fixArrPath","_classCallCheck$1","_possibleConstructorReturn$1","ctor","define","config","customElements","Ele","_WeElement","WeElement","propTypes","defaultProps","eleHooks","storeHelpers","func","pure","target","cloneElement","getHost","shadowRoot","host","rpx","b","window","innerWidth","Number","arg","classNames","classes","argType","inner","join","_Array$prototype$slic","Array","slice","class","unshift","o","JSON","stringify","htm","t","r","n","root","global","Reflect","hasOwnProperty","BuiltInHTMLElement","HTMLElement","construct","setPrototypeOf","Promise","resolve","then","bind","setTimeout","diffLevel","_this","elementId","id","connectedCallback","storeName","_use","_updatePath2","_using","_storeName","attrsToProps","beforeInstall","install","afterInstall","attachShadow","mode","rendered","beforeRender","rootNode","_customStyleContent","_customStyleElement","installed","_isInstalled","disconnectedCallback","uninstall","ignoreAttrs","_willUpdate","beforeUpdate","__hasChildren","updated","_HTMLElement","val","normalizedNodeName","getAttribute","Boolean","Omi","parse","fire","deepClone","escapePathComponent","pathComponents","parentAndPath","parenthoodMap","parentPath","newValueOriginalObject","revokableInstance","inherited","proxifiedObjectsMap","has","newValue","set","operation","destinationPropKey","op","oldValue","delete","disableTrapsForProxy","console","warn","reflectionResult","revokableProxyInstance","defaultCallback","resume","patches","userCallback","pause","isObserving","showDetachedWarning","cachedProxy","_this2","receiver","deleteProperty","deleteTrap","Proxy","revocable","revocableInstance","trapsInstance","traps","originalObject","_proxifyObjectTreeRecursively","proxifyObjectTree","isProxifyingTreeNow","proxifiedObject","targetObject","message","propKey","record","callback","generate","isRecording","revoke","disableTraps","u","Map","html","Component","defineElement","tag","elements","createRef","extractClass","unbind","omi","version","module","exports"],"mappings":";;IACO,SAASA;ICIT,SAASC,EAAEC,UAAUC;QAC1B,IACEC,YACAC,OACAC,QACAC,GAJEC;QAKJ,KAAKD,IAAIE,UAAUC,QAAQH,MAAM,KAC/BI,MAAMC,KAAKH,UAAUF;QAEvB,IAAIJ,cAAqC,QAAvBA,WAAWK,UAAkB;YAC7C,KAAKG,MAAMD,QAAQC,MAAMC,KAAKT,WAAWK;mBAClCL,WAAWK;;QAEpB,OAAOG,MAAMD,QACX,KAAKL,QAAQM,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wP;QAMVjO,SAAAA;QACAN,KAAAA;QACA0N,eARUqJ;QASVxI,YAAAA;QACAC,cAAAA;QACAG,WAXUuI;QAYVH,MAAAA;QACA9H,KAAAA;QACAkI,GAAAA;QACAD,UAAAA;QACAL,GAAAA;QACA/G,QAjBU/L;QAkBV4L,KAlBUzL;QAmBX+S,KAAAA;QACAtW,MApBWkQ;QAqBX7P,QAAAA;QACAkD,WAtBW+G;;IAyBXmM,QAAAA,KAAAA,MAzBWC;IA0BVzL,QAAAA,KAAAA,MAAAA;IA1BU5L,QAAZkQ,KAAAgD,IAAAoE,UAAA;IA6BAtX,IAAmBqX,sBAAXnH,QAARqH,OAAAC,UAAAH,UAAAxM,KAAAqI,MAAAmE","file":"omi.js","sourcesContent":["/** Virtual DOM Node */\nexport function VNode() {}\n","import { VNode } from './vnode'\nimport options from './options'\n\nconst stack = []\n\nexport function h(nodeName, attributes) {\n let children = [],\n lastSimple,\n child,\n simple,\n i\n for (i = arguments.length; i-- > 2; ) {\n stack.push(arguments[i])\n }\n if (attributes && attributes.children != null) {\n if (!stack.length) stack.push(attributes.children)\n delete attributes.children\n }\n while (stack.length) {\n if ((child = stack.pop()) && child.pop !== undefined) {\n for (i = child.length; i--; ) stack.push(child[i])\n } else {\n if (typeof child === 'boolean') child = null\n\n if ((simple = typeof nodeName !== 'function')) {\n if (child == null) child = ''\n else if (typeof child === 'number') child = String(child)\n else if (typeof child !== 'string') simple = false\n }\n\n if (simple && lastSimple) {\n children[children.length - 1] += child\n } else if (children.length === 0) {\n children = [child]\n } else {\n children.push(child)\n }\n\n lastSimple = simple\n }\n }\n\n let p = new VNode()\n p.nodeName = nodeName\n p.children = children\n p.attributes = attributes == null ? undefined : attributes\n p.key = attributes == null ? undefined : attributes.key\n\n // if a \"vnode hook\" is defined, pass every created VNode to it\n if (options.vnode !== undefined) options.vnode(p)\n\n return p\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n/**\n * This shim allows elements written in, or compiled to, ES5 to work on native\n * implementations of Custom Elements v1. It sets new.target to the value of\n * this.constructor so that the native HTMLElement constructor can access the\n * current under-construction element's definition.\n */\n; (function () {\n if (\n // No Reflect, no classes, no need for shim because native custom elements\n // require ES2015 classes or Reflect.\n window.Reflect === undefined ||\n window.customElements === undefined ||\n // The webcomponentsjs custom elements polyfill doesn't require\n // ES2015-compatible construction (`super()` or `Reflect.construct`).\n window.customElements.hasOwnProperty('polyfillWrapFlushCallback')\n ) {\n return\n }\n const BuiltInHTMLElement = HTMLElement\n window.HTMLElement = function HTMLElement() {\n return Reflect.construct(BuiltInHTMLElement, [], this.constructor)\n }\n HTMLElement.prototype = BuiltInHTMLElement.prototype\n HTMLElement.prototype.constructor = HTMLElement\n Object.setPrototypeOf(HTMLElement, BuiltInHTMLElement)\n})()\n\nexport function cssToDom(css) {\n const node = document.createElement('style')\n node.textContent = css\n return node\n}\n\nexport function camelCase(str) {\n return str.replace(/-(\\w)/g, ($, $1) => {\n return $1.toUpperCase()\n })\n}\n\nexport function Fragment(props) {\n return props.children\n}\n\nexport function extend(obj, props) {\n for (let i in props) obj[i] = props[i]\n return obj\n}\n\n/** Invoke or update a ref, depending on whether it is a function or object ref.\n * @param {object|function} [ref=null]\n * @param {any} [value]\n */\nexport function applyRef(ref, value) {\n if (ref != null) {\n if (typeof ref == 'function') ref(value)\n else ref.current = value\n }\n}\n\n/**\n * Call a function asynchronously, as soon as possible. Makes\n * use of HTML Promise to schedule the callback if available,\n * otherwise falling back to `setTimeout` (mainly for IE<11).\n * @type {(callback: function) => void}\n */\nexport const defer =\n typeof Promise == 'function'\n ? Promise.resolve().then.bind(Promise.resolve())\n : setTimeout\n\nexport function isArray(obj) {\n return Object.prototype.toString.call(obj) === '[object Array]'\n}\n\n\nexport function getUse(data, paths, out, name) {\n const obj = []\n paths.forEach((path, index) => {\n const isPath = typeof path === 'string'\n if (isPath) {\n obj[index] = getTargetByPath(data, path)\n } else {\n const key = Object.keys(path)[0]\n const value = path[key]\n if (typeof value === 'string') {\n obj[index] = getTargetByPath(data, value)\n } else {\n const tempPath = value[0]\n if (typeof tempPath === 'string') {\n const tempVal = getTargetByPath(data, tempPath)\n obj[index] = value[1] ? value[1](tempVal) : tempVal\n } else {\n const args = []\n tempPath.forEach(path =>{\n args.push(getTargetByPath(data, path))\n })\n obj[index] = value[1].apply(null, args)\n }\n }\n obj[key] = obj[index]\n }\n\t})\n\tif(out) out[name] = obj\n return obj\n}\n\nexport function pathToArr(path) {\n\tif(typeof path !== 'string' || !path) return []\n\t// return path.split(/\\.|\\[|\\]/).filter(name => !!name)\n\treturn path.replace(/]/g, '').replace(/\\[/g, '.').split('.')\n}\n\nexport function getTargetByPath(origin, path) {\n const arr = pathToArr(path)\n let current = origin\n for (let i = 0, len = arr.length; i < len; i++) {\n current = current[arr[i]]\n }\n return current\n}\n\nconst hyphenateRE = /\\B([A-Z])/g\nexport function hyphenate(str) {\n return str.replace(hyphenateRE, '-$1').toLowerCase()\n}\n\nexport function getValByPath(path, current) {\n\tconst arr = pathToArr(path)\n\tarr.forEach(prop => {\n\t\tcurrent = current[prop]\n\t})\n\treturn current\n}\n\nexport function getPath(obj, out, name) {\n\tconst result = {}\n\tobj.forEach(item => {\n\t\tif (typeof item === 'string') {\n\t\t\tresult[item] = true\n\t\t} else {\n\t\t\tconst tempPath = item[Object.keys(item)[0]]\n\t\t\tif (typeof tempPath === 'string') {\n\t\t\t\tresult[tempPath] = true\n\t\t\t} else {\n\t\t\t\tif (typeof tempPath[0] === 'string') {\n\t\t\t\t\tresult[tempPath[0]] = true\n\t\t\t\t} else {\n\t\t\t\t\ttempPath[0].forEach(path => (result[path] = true))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\tif(out) out[name] = result\n\treturn result\n}\n\nexport function removeItem(item, arr){\n if(!arr) return\n for (let i = 0, len = arr.length; i < len; i++) {\n if (arr[i] === item) {\n arr.splice(i, 1)\n break\n }\n }\n}","import { extend } from '../util'\nimport options from '../options'\n/**\n * Check if two nodes are equivalent.\n *\n * @param {Node} node\t\t\tDOM Node to compare\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\n * @param {boolean} [hydrating=false]\tIf true, ignores component constructors when comparing.\n * @private\n */\nexport function isSameNodeType(node, vnode, hydrating) {\n if (typeof vnode === 'string' || typeof vnode === 'number') {\n return node.splitText !== undefined\n }\n if (typeof vnode.nodeName === 'string') {\n return !node._componentConstructor && isNamedNode(node, vnode.nodeName)\n } else if (typeof vnode.nodeName === 'function'){\n return options.mapping[node.nodeName.toLowerCase()] === vnode.nodeName\n }\n return hydrating || node._componentConstructor === vnode.nodeName\n}\n\n/**\n * Check if an Element has a given nodeName, case-insensitively.\n *\n * @param {Element} node\tA DOM Element to inspect the name of.\n * @param {String} nodeName\tUnnormalized name to compare against.\n */\nexport function isNamedNode(node, nodeName) {\n return (\n node.normalizedNodeName === nodeName ||\n node.nodeName.toLowerCase() === nodeName.toLowerCase()\n )\n}\n\n/**\n * Reconstruct Component-style `props` from a VNode.\n * Ensures default/fallback values from `defaultProps`:\n * Own-properties of `defaultProps` not present in `vnode.attributes` are added.\n *\n * @param {VNode} vnode\n * @returns {Object} props\n */\nexport function getNodeProps(vnode) {\n let props = extend({}, vnode.attributes)\n props.children = vnode.children\n\n let defaultProps = vnode.nodeName.defaultProps\n if (defaultProps !== undefined) {\n for (let i in defaultProps) {\n if (props[i] === undefined) {\n props[i] = defaultProps[i]\n }\n }\n }\n\n return props\n}\n","import {pathToArr} from './util'\n\nexport const extension = {}\n\nexport function extend(name, handler) {\n\textension['o-' + name] = handler\n}\n\nexport function set(origin, path, value) {\n\tconst arr = pathToArr(path)\n\tlet current = origin\n\tfor (let i = 0, len = arr.length; i < len; i++) {\n\t\t\tif (i === len - 1) {\n\t\t\t\t\tcurrent[arr[i]] = value\n\t\t\t} else {\n\t\t\t\t\tcurrent = current[arr[i]]\n\t\t\t}\n\t}\n}\n\nexport function get(origin, path) {\n\tconst arr = pathToArr(path)\n\tlet current = origin\n\tfor (let i = 0, len = arr.length; i < len; i++) {\n\t\tcurrent = current[arr[i]]\n\t}\n\n\treturn current\n}\n\nfunction eventProxy(e) {\n return this._listeners[e.type](e)\n}\n\nexport function bind(el, type, handler){\n\tel._listeners = el._listeners || {}\n\tel._listeners[type] = handler\n\tel.addEventListener(type, eventProxy)\n}\n\nexport function unbind(el, type){\n\tel.removeEventListener(type, eventProxy)\n}\n","import { IS_NON_DIMENSIONAL } from '../constants'\nimport { applyRef } from '../util'\nimport options from '../options'\nimport { extension } from '../extend'\n\n/**\n * Create an element with the given nodeName.\n * @param {string} nodeName The DOM node to create\n * @param {boolean} [isSvg=false] If `true`, creates an element within the SVG\n * namespace.\n * @returns {Element} The created DOM node\n */\nexport function createNode(nodeName, isSvg) {\n /** @type {Element} */\n let node = isSvg\n ? document.createElementNS('http://www.w3.org/2000/svg', nodeName)\n : document.createElement(nodeName)\n node.normalizedNodeName = nodeName\n return node\n}\n\n/**\n * Remove a child node from its parent if attached.\n * @param {Node} node The node to remove\n */\nexport function removeNode(node) {\n let parentNode = node.parentNode\n if (parentNode) parentNode.removeChild(node)\n}\n\n/**\n * Set a named attribute on the given Node, with special behavior for some names\n * and event handlers. If `value` is `null`, the attribute/handler will be\n * removed.\n * @param {Element} node An element to mutate\n * @param {string} name The name/key to set, such as an event or attribute name\n * @param {*} old The last value that was set for this name/node pair\n * @param {*} value An attribute value, such as a function to be used as an\n * event handler\n * @param {boolean} isSvg Are we currently diffing inside an svg?\n * @private\n */\nexport function setAccessor(node, name, old, value, isSvg, component) {\n if (name === 'className') name = 'class'\n\n if (name[0] == 'o' && name[1] == '-'){\n if(extension[name]){\n extension[name](node, value, component)\n }\n } else if (name === 'key') {\n // ignore\n } else if (name === 'ref') {\n applyRef(old, null)\n applyRef(value, node)\n } else if (name === 'class' && !isSvg) {\n node.className = value || ''\n } else if (name === 'style') {\n if (!value || typeof value === 'string' || typeof old === 'string') {\n node.style.cssText = value || ''\n }\n if (value && typeof value === 'object') {\n if (typeof old !== 'string') {\n for (let i in old) if (!(i in value)) node.style[i] = ''\n }\n for (let i in value) {\n node.style[i] =\n typeof value[i] === 'number' && IS_NON_DIMENSIONAL.test(i) === false\n ? value[i] + 'px'\n : value[i]\n }\n }\n } else if (name === 'dangerouslySetInnerHTML') {\n if (value) node.innerHTML = value.__html || ''\n } else if (name[0] == 'o' && name[1] == 'n') {\n let useCapture = name !== (name = name.replace(/Capture$/, ''))\n name = name.toLowerCase().substring(2)\n if (value) {\n if (!old) {\n node.addEventListener(name, eventProxy, useCapture)\n if (name == 'tap') {\n node.addEventListener('touchstart', touchStart, useCapture)\n node.addEventListener('touchend', touchEnd, useCapture)\n }\n }\n } else {\n node.removeEventListener(name, eventProxy, useCapture)\n if (name == 'tap') {\n node.removeEventListener('touchstart', touchStart, useCapture)\n node.removeEventListener('touchend', touchEnd, useCapture)\n }\n }\n ;(node._listeners || (node._listeners = {}))[name] = value\n } else if (node.nodeName === 'INPUT' && name === 'value'){\n node[name] = value == null ? '' : value\n } else if (name !== 'list' && name !== 'type' && name !== 'css' && !isSvg && name in node && value !== '') { //value !== '' fix for selected, disabled, checked with pure element\n // Attempt to set a DOM property to the given value.\n // IE & FF throw for certain property-value combinations.\n try {\n node[name] = value == null ? '' : value\n } catch (e) {}\n if ((value == null || value === false) && name != 'spellcheck')\n node.pureRemoveAttribute ? node.pureRemoveAttribute(name) : node.removeAttribute(name)\n } else {\n let ns = isSvg && name !== (name = name.replace(/^xlink:?/, ''))\n // spellcheck is treated differently than all other boolean values and\n // should not be removed when the value is `false`. See:\n // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-spellcheck\n if (value == null || value === false) {\n if (ns)\n node.removeAttributeNS(\n 'http://www.w3.org/1999/xlink',\n name.toLowerCase()\n )\n else node.pureRemoveAttribute ? node.pureRemoveAttribute(name) : node.removeAttribute(name)\n } else if (typeof value !== 'function') {\n if (ns) {\n node.setAttributeNS(\n 'http://www.w3.org/1999/xlink',\n name.toLowerCase(),\n value\n )\n } else {\n node.pureSetAttribute ? node.pureSetAttribute(name, value) : node.setAttribute(name, value)\n }\n }\n }\n}\n\n/**\n * Proxy an event to hooked event handlers\n * @param {Event} e The event object from the browser\n * @private\n */\nfunction eventProxy(e) {\n return this._listeners[e.type]((options.event && options.event(e)) || e)\n}\n\nfunction touchStart(e) {\n this.___touchX = e.touches[0].pageX\n this.___touchY = e.touches[0].pageY\n this.___scrollTop = document.body.scrollTop\n}\n\nfunction touchEnd(e) {\n if (\n Math.abs(e.changedTouches[0].pageX - this.___touchX) < 30 &&\n Math.abs(e.changedTouches[0].pageY - this.___touchY) < 30 &&\n Math.abs(document.body.scrollTop - this.___scrollTop) < 30\n ) {\n this.dispatchEvent(new CustomEvent('tap', { detail: e }))\n }\n}\n","import { ATTR_KEY } from '../constants'\nimport { isSameNodeType, isNamedNode } from './index'\nimport { createNode, setAccessor } from '../dom/index'\nimport { camelCase, isArray, Fragment } from '../util'\nimport { removeNode } from '../dom/index'\nimport options from '../options'\n\n/** Queue of components that have been mounted and are awaiting componentDidMount */\nexport const mounts = []\n\n/** Diff recursion count, used to track the end of the diff cycle. */\nexport let diffLevel = 0\n\n/** Global flag indicating if the diff is currently within an SVG */\nlet isSvgMode = false\n\n/** Global flag indicating if the diff is performing hydration */\nlet hydrating = false\n\n/** Apply differences in a given vnode (and it's deep children) to a real DOM Node.\n *\t@param {Element} [dom=null]\t\tA DOM node to mutate into the shape of the `vnode`\n *\t@param {VNode} vnode\t\t\tA VNode (with descendants forming a tree) representing the desired DOM structure\n *\t@returns {Element} dom\t\t\tThe created/mutated element\n *\t@private\n */\nexport function diff(dom, vnode, parent, component, updateSelf) {\n // diffLevel having been 0 here indicates initial entry into the diff (not a subdiff)\n let ret\n if (!diffLevel++) {\n // when first starting the diff, check if we're diffing an SVG or within an SVG\n isSvgMode = parent != null && parent.ownerSVGElement !== undefined\n\n // hydration is indicated by the existing element to be diffed not having a prop cache\n hydrating = dom != null && !(ATTR_KEY in dom)\n }\n if(vnode.nodeName === Fragment){\n vnode = vnode.children\n }\n if (isArray(vnode)) {\n if (parent) {\n const styles = parent.querySelectorAll('style')\n styles.forEach(s => {\n parent.removeChild(s)\n })\n innerDiffNode(parent, vnode, hydrating, component, updateSelf)\n\n for (let i = styles.length - 1; i >= 0; i--) {\n parent.firstChild ? parent.insertBefore(styles[i], parent.firstChild) : parent.appendChild(style[i])\n }\n } else {\n ret = []\n vnode.forEach((item, index) => {\n let ele = idiff(index === 0 ? dom : null, item, component, updateSelf)\n ret.push(ele)\n })\n }\n } else {\n if (isArray(dom)) {\n dom.forEach((one, index) => {\n if (index === 0) {\n ret = idiff(one, vnode, component, updateSelf)\n } else {\n recollectNodeTree(one, false)\n }\n })\n } else {\n ret = idiff(dom, vnode, component, updateSelf)\n }\n // append the element if its a new parent\n if (parent && ret.parentNode !== parent) parent.appendChild(ret)\n }\n\n // diffLevel being reduced to 0 means we're exiting the diff\n if (!--diffLevel) {\n hydrating = false\n // invoke queued componentDidMount lifecycle methods\n }\n\n return ret\n}\n\n/** Internals of `diff()`, separated to allow bypassing diffLevel / mount flushing. */\nfunction idiff(dom, vnode, component, updateSelf) {\n if (dom && vnode && dom.props) {\n dom.props.children = vnode.children\n }\n let out = dom,\n prevSvgMode = isSvgMode\n\n // empty values (null, undefined, booleans) render as empty Text nodes\n if (vnode == null || typeof vnode === 'boolean') vnode = ''\n\n // Fast case: Strings & Numbers create/update Text nodes.\n if (typeof vnode === 'string' || typeof vnode === 'number') {\n // update if it's already a Text node:\n if (\n dom &&\n dom.splitText !== undefined &&\n dom.parentNode &&\n (!dom._component || component)\n ) {\n /* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */\n if (dom.nodeValue != vnode) {\n dom.nodeValue = vnode\n }\n } else {\n // it wasn't a Text node: replace it with one and recycle the old Element\n out = document.createTextNode(vnode)\n if (dom) {\n if (dom.parentNode) dom.parentNode.replaceChild(out, dom)\n recollectNodeTree(dom, true)\n }\n }\n\n out[ATTR_KEY] = true\n\n return out\n }\n\n // If the VNode represents a Component, perform a component diff:\n let vnodeName = vnode.nodeName\n if (typeof vnodeName === 'function') {\n for (let key in options.mapping) {\n if (options.mapping[key] === vnodeName) {\n vnodeName = key\n vnode.nodeName = key\n break\n }\n }\n }\n // Tracks entering and exiting SVG namespace when descending through the tree.\n isSvgMode =\n vnodeName === 'svg'\n ? true\n : vnodeName === 'foreignObject'\n ? false\n : isSvgMode\n\n // If there's no existing element or it's the wrong type, create a new one:\n vnodeName = String(vnodeName)\n if (!dom || !isNamedNode(dom, vnodeName)) {\n out = createNode(vnodeName, isSvgMode)\n\n if (dom) {\n // move children into the replacement node\n while (dom.firstChild) out.appendChild(dom.firstChild)\n\n // if the previous Element was mounted into the DOM, replace it inline\n if (dom.parentNode) dom.parentNode.replaceChild(out, dom)\n\n // recycle the old element (skips non-Element node types)\n recollectNodeTree(dom, true)\n }\n }\n\n let fc = out.firstChild,\n props = out[ATTR_KEY],\n vchildren = vnode.children\n\n if (props == null) {\n props = out[ATTR_KEY] = {}\n for (let a = out.attributes, i = a.length; i--;)\n props[a[i].name] = a[i].value\n }\n\n // Optimization: fast-path for elements containing a single TextNode:\n if (\n !hydrating &&\n vchildren &&\n vchildren.length === 1 &&\n typeof vchildren[0] === 'string' &&\n fc != null &&\n fc.splitText !== undefined &&\n fc.nextSibling == null\n ) {\n if (fc.nodeValue != vchildren[0]) {\n fc.nodeValue = vchildren[0]\n }\n }\n // otherwise, if there are existing or new children, diff them:\n else if ((vchildren && vchildren.length) || fc != null) {\n if (!(out.constructor.is == 'WeElement' && out.constructor.noSlot)) {\n innerDiffNode(\n out,\n vchildren,\n hydrating || props.dangerouslySetInnerHTML != null,\n component,\n updateSelf\n )\n }\n }\n\n // Apply attributes/props from VNode to the DOM Element:\n diffAttributes(out, vnode.attributes, props, component, updateSelf)\n if (out.props) {\n out.props.children = vnode.children\n }\n // restore previous SVG mode: (in case we're exiting an SVG namespace)\n isSvgMode = prevSvgMode\n\n return out\n}\n\n/** Apply child and attribute changes between a VNode and a DOM Node to the DOM.\n *\t@param {Element} dom\t\t\tElement whose children should be compared & mutated\n *\t@param {Array} vchildren\t\tArray of VNodes to compare to `dom.childNodes`\n *\t@param {Boolean} isHydrating\tIf `true`, consumes externally created elements similar to hydration\n */\nfunction innerDiffNode(dom, vchildren, isHydrating, component, updateSelf) {\n let originalChildren = dom.childNodes,\n children = [],\n keyed = {},\n keyedLen = 0,\n min = 0,\n len = originalChildren.length,\n childrenLen = 0,\n vlen = vchildren ? vchildren.length : 0,\n j,\n c,\n f,\n vchild,\n child\n\n // Build up a map of keyed children and an Array of unkeyed children:\n if (len !== 0) {\n for (let i = 0; i < len; i++) {\n let child = originalChildren[i],\n props = child[ATTR_KEY],\n key =\n vlen && props\n ? child._component\n ? child._component.__key\n : props.key\n : null\n if (key != null) {\n keyedLen++\n keyed[key] = child\n } else if (\n props ||\n (child.splitText !== undefined\n ? isHydrating\n ? child.nodeValue.trim()\n : true\n : isHydrating)\n ) {\n children[childrenLen++] = child\n }\n }\n }\n\n if (vlen !== 0) {\n for (let i = 0; i < vlen; i++) {\n vchild = vchildren[i]\n child = null\n\n // attempt to find a node based on key matching\n let key = vchild.key\n if (key != null) {\n if (keyedLen && keyed[key] !== undefined) {\n child = keyed[key]\n keyed[key] = undefined\n keyedLen--\n }\n }\n // attempt to pluck a node of the same type from the existing children\n else if (!child && min < childrenLen) {\n for (j = min; j < childrenLen; j++) {\n if (\n children[j] !== undefined &&\n isSameNodeType((c = children[j]), vchild, isHydrating)\n ) {\n child = c\n children[j] = undefined\n if (j === childrenLen - 1) childrenLen--\n if (j === min) min++\n break\n }\n }\n }\n\n // morph the matched/found/created DOM child to match vchild (deep)\n child = idiff(child, vchild, component, updateSelf)\n\n f = originalChildren[i]\n if (child && child !== dom && child !== f) {\n if (f == null) {\n dom.appendChild(child)\n } else if (child === f.nextSibling) {\n removeNode(f)\n } else {\n dom.insertBefore(child, f)\n }\n }\n }\n }\n\n // remove unused keyed children:\n if (keyedLen) {\n for (let i in keyed)\n if (keyed[i] !== undefined) recollectNodeTree(keyed[i], false)\n }\n\n // remove orphaned unkeyed children:\n while (min <= childrenLen) {\n if ((child = children[childrenLen--]) !== undefined)\n recollectNodeTree(child, false)\n }\n}\n\n/** Recursively recycle (or just unmount) a node and its descendants.\n *\t@param {Node} node\t\t\t\t\t\tDOM node to start unmount/removal from\n *\t@param {Boolean} [unmountOnly=false]\tIf `true`, only triggers unmount lifecycle, skips removal\n */\nexport function recollectNodeTree(node, unmountOnly) {\n // If the node's VNode had a ref function, invoke it with null here.\n // (this is part of the React spec, and smart for unsetting references)\n if (node[ATTR_KEY] != null && node[ATTR_KEY].ref) {\n if (typeof node[ATTR_KEY].ref === 'function') {\n node[ATTR_KEY].ref(null)\n } else if (node[ATTR_KEY].ref.current) {\n node[ATTR_KEY].ref.current = null\n }\n }\n\n if (unmountOnly === false || node[ATTR_KEY] == null) {\n removeNode(node)\n }\n\n removeChildren(node)\n}\n\n/** Recollect/unmount all children.\n *\t- we use .lastChild here because it causes less reflow than .firstChild\n *\t- it's also cheaper than accessing the .childNodes Live NodeList\n */\nexport function removeChildren(node) {\n node = node.lastChild\n while (node) {\n let next = node.previousSibling\n recollectNodeTree(node, true)\n node = next\n }\n}\n\n/** Apply differences in attributes from a VNode to the given DOM Element.\n *\t@param {Element} dom\t\tElement with attributes to diff `attrs` against\n *\t@param {Object} attrs\t\tThe desired end-state key-value attribute pairs\n *\t@param {Object} old\t\t\tCurrent/previous attributes (from previous VNode or element's prop cache)\n */\nfunction diffAttributes(dom, attrs, old, component, updateSelf) {\n let name\n //let update = false\n let isWeElement = dom.update\n let oldClone\n if (dom.receiveProps) {\n oldClone = Object.assign({}, old)\n }\n // remove attributes no longer present on the vnode by setting them to undefined\n for (name in old) {\n if (!(attrs && attrs[name] != null) && old[name] != null) {\n setAccessor(dom, name, old[name], (old[name] = undefined), isSvgMode, component)\n if (isWeElement) {\n delete dom.props[name]\n //update = true\n }\n }\n }\n\n // add new & update changed attributes\n for (name in attrs) {\n if (isWeElement && typeof attrs[name] === 'object' && name !== 'ref') {\n if (name === 'style') {\n setAccessor(dom, name, old[name], (old[name] = attrs[name]), isSvgMode, component)\n }\n let ccName = camelCase(name)\n dom.props[ccName] = old[ccName] = attrs[name]\n //update = true\n } else if (\n name !== 'children' &&\n (!(name in old) ||\n attrs[name] !==\n (name === 'value' || name === 'checked' ? dom[name] : old[name]))\n ) {\n setAccessor(dom, name, old[name], attrs[name], isSvgMode, component)\n if (isWeElement) {\n let ccName = camelCase(name)\n dom.props[ccName] = old[ccName] = attrs[name]\n //update = true\n } else {\n old[name] = attrs[name]\n }\n }\n }\n\n if (isWeElement && !updateSelf && dom.parentNode) {\n //__hasChildren is not accuracy when it was empty at first, so add dom.children.length > 0 condition\n //if (update || dom.__hasChildren || dom.children.length > 0 || (dom.store && !dom.store.data)) {\n if (dom.receiveProps(dom.props, oldClone) !== false) {\n dom.update()\n }\n //}\n }\n}\n","/*!\n * https://github.com/Palindrom/JSONPatcherProxy\n * (c) 2017 Starcounter\n * MIT license\n */\n\n/** Class representing a JS Object observer */\nconst JSONPatcherProxy = (function() {\n /**\n * Deep clones your object and returns a new object.\n */\n function deepClone(obj) {\n switch (typeof obj) {\n case 'object':\n return JSON.parse(JSON.stringify(obj)) //Faster than ES5 clone - http://jsperf.com/deep-cloning-of-objects/5\n case 'undefined':\n return null //this is how JSON.stringify behaves for array items\n default:\n return obj //no need to clone primitives\n }\n }\n JSONPatcherProxy.deepClone = deepClone\n\n function escapePathComponent(str) {\n if (str.indexOf('/') == -1 && str.indexOf('~') == -1) return str\n return str.replace(/~/g, '~0').replace(/\\//g, '~1')\n }\n JSONPatcherProxy.escapePathComponent = escapePathComponent\n\n /**\n * Walk up the parenthood tree to get the path\n * @param {JSONPatcherProxy} instance\n * @param {Object} obj the object you need to find its path\n */\n function findObjectPath(instance, obj) {\n const pathComponents = []\n let parentAndPath = instance.parenthoodMap.get(obj)\n while (parentAndPath && parentAndPath.path) {\n // because we're walking up-tree, we need to use the array as a stack\n pathComponents.unshift(parentAndPath.path)\n parentAndPath = instance.parenthoodMap.get(parentAndPath.parent)\n }\n if (pathComponents.length) {\n const path = pathComponents.join('/')\n return '/' + path\n }\n return ''\n }\n /**\n * A callback to be used as th proxy set trap callback.\n * It updates parenthood map if needed, proxifies nested newly-added objects, calls default callbacks with the changes occurred.\n * @param {JSONPatcherProxy} instance JSONPatcherProxy instance\n * @param {Object} target the affected object\n * @param {String} key the effect property's name\n * @param {Any} newValue the value being set\n */\n function setTrap(instance, target, key, newValue) {\n const parentPath = findObjectPath(instance, target)\n\n const destinationPropKey = parentPath + '/' + escapePathComponent(key)\n\n if (instance.proxifiedObjectsMap.has(newValue)) {\n const newValueOriginalObject = instance.proxifiedObjectsMap.get(newValue)\n\n instance.parenthoodMap.set(newValueOriginalObject.originalObject, {\n parent: target,\n path: key\n })\n }\n /*\n mark already proxified values as inherited.\n rationale: proxy.arr.shift()\n will emit\n {op: replace, path: '/arr/1', value: arr_2}\n {op: remove, path: '/arr/2'}\n\n by default, the second operation would revoke the proxy, and this renders arr revoked.\n That's why we need to remember the proxies that are inherited.\n */\n const revokableInstance = instance.proxifiedObjectsMap.get(newValue)\n /*\n Why do we need to check instance.isProxifyingTreeNow?\n\n We need to make sure we mark revokables as inherited ONLY when we're observing,\n because throughout the first proxification, a sub-object is proxified and then assigned to\n its parent object. This assignment of a pre-proxified object can fool us into thinking\n that it's a proxified object moved around, while in fact it's the first assignment ever.\n\n Checking isProxifyingTreeNow ensures this is not happening in the first proxification,\n but in fact is is a proxified object moved around the tree\n */\n if (revokableInstance && !instance.isProxifyingTreeNow) {\n revokableInstance.inherited = true\n }\n\n // if the new value is an object, make sure to watch it\n if (\n newValue &&\n typeof newValue == 'object' &&\n !instance.proxifiedObjectsMap.has(newValue)\n ) {\n instance.parenthoodMap.set(newValue, {\n parent: target,\n path: key\n })\n newValue = instance._proxifyObjectTreeRecursively(target, newValue, key)\n }\n // let's start with this operation, and may or may not update it later\n const operation = {\n op: 'remove',\n path: destinationPropKey\n }\n if (typeof newValue == 'undefined') {\n // applying De Morgan's laws would be a tad faster, but less readable\n if (!Array.isArray(target) && !target.hasOwnProperty(key)) {\n // `undefined` is being set to an already undefined value, keep silent\n return Reflect.set(target, key, newValue)\n }\n // when array element is set to `undefined`, should generate replace to `null`\n if (Array.isArray(target)) {\n // undefined array elements are JSON.stringified to `null`\n ;(operation.op = 'replace'), (operation.value = null)\n }\n const oldValue = instance.proxifiedObjectsMap.get(target[key])\n // was the deleted a proxified object?\n if (oldValue) {\n instance.parenthoodMap.delete(target[key])\n instance.disableTrapsForProxy(oldValue)\n instance.proxifiedObjectsMap.delete(oldValue)\n }\n } else {\n if (Array.isArray(target) && !Number.isInteger(+key.toString())) {\n /* array props (as opposed to indices) don't emit any patches, to avoid needless `length` patches */\n if (key != 'length') {\n console.warn(\n 'JSONPatcherProxy noticed a non-integer prop was set for an array. This will not emit a patch'\n )\n }\n return Reflect.set(target, key, newValue)\n }\n operation.op = 'add'\n if (target.hasOwnProperty(key)) {\n if (typeof target[key] !== 'undefined' || Array.isArray(target)) {\n operation.op = 'replace' // setting `undefined` array elements is a `replace` op\n }\n }\n operation.value = newValue\n }\n operation.oldValue = target[key]\n const reflectionResult = Reflect.set(target, key, newValue)\n instance.defaultCallback(operation)\n return reflectionResult\n }\n /**\n * A callback to be used as th proxy delete trap callback.\n * It updates parenthood map if needed, calls default callbacks with the changes occurred.\n * @param {JSONPatcherProxy} instance JSONPatcherProxy instance\n * @param {Object} target the effected object\n * @param {String} key the effected property's name\n */\n function deleteTrap(instance, target, key) {\n if (typeof target[key] !== 'undefined') {\n const parentPath = findObjectPath(instance, target)\n const destinationPropKey = parentPath + '/' + escapePathComponent(key)\n\n const revokableProxyInstance = instance.proxifiedObjectsMap.get(\n target[key]\n )\n\n if (revokableProxyInstance) {\n if (revokableProxyInstance.inherited) {\n /*\n this is an inherited proxy (an already proxified object that was moved around),\n we shouldn't revoke it, because even though it was removed from path1, it is still used in path2.\n And we know that because we mark moved proxies with `inherited` flag when we move them\n\n it is a good idea to remove this flag if we come across it here, in deleteProperty trap.\n We DO want to revoke the proxy if it was removed again.\n */\n revokableProxyInstance.inherited = false\n } else {\n instance.parenthoodMap.delete(revokableProxyInstance.originalObject)\n instance.disableTrapsForProxy(revokableProxyInstance)\n instance.proxifiedObjectsMap.delete(target[key])\n }\n }\n const reflectionResult = Reflect.deleteProperty(target, key)\n\n instance.defaultCallback({\n op: 'remove',\n path: destinationPropKey\n })\n\n return reflectionResult\n }\n }\n /* pre-define resume and pause functions to enhance constructors performance */\n function resume() {\n this.defaultCallback = operation => {\n this.isRecording && this.patches.push(operation)\n this.userCallback && this.userCallback(operation)\n }\n this.isObserving = true\n }\n function pause() {\n this.defaultCallback = () => {}\n this.isObserving = false\n }\n /**\n * Creates an instance of JSONPatcherProxy around your object of interest `root`.\n * @param {Object|Array} root - the object you want to wrap\n * @param {Boolean} [showDetachedWarning = true] - whether to log a warning when a detached sub-object is modified @see {@link https://github.com/Palindrom/JSONPatcherProxy#detached-objects}\n * @returns {JSONPatcherProxy}\n * @constructor\n */\n function JSONPatcherProxy(root, showDetachedWarning) {\n this.isProxifyingTreeNow = false\n this.isObserving = false\n this.proxifiedObjectsMap = new Map()\n this.parenthoodMap = new Map()\n // default to true\n if (typeof showDetachedWarning !== 'boolean') {\n showDetachedWarning = true\n }\n\n this.showDetachedWarning = showDetachedWarning\n this.originalObject = root\n this.cachedProxy = null\n this.isRecording = false\n this.userCallback\n /**\n * @memberof JSONPatcherProxy\n * Restores callback back to the original one provided to `observe`.\n */\n this.resume = resume.bind(this)\n /**\n * @memberof JSONPatcherProxy\n * Replaces your callback with a noop function.\n */\n this.pause = pause.bind(this)\n }\n\n JSONPatcherProxy.prototype.generateProxyAtPath = function(parent, obj, path) {\n if (!obj) {\n return obj\n }\n const traps = {\n set: (target, key, value, receiver) =>\n setTrap(this, target, key, value, receiver),\n deleteProperty: (target, key) => deleteTrap(this, target, key)\n }\n const revocableInstance = Proxy.revocable(obj, traps)\n // cache traps object to disable them later.\n revocableInstance.trapsInstance = traps\n revocableInstance.originalObject = obj\n\n /* keeping track of object's parent and path */\n\n this.parenthoodMap.set(obj, { parent, path })\n\n /* keeping track of all the proxies to be able to revoke them later */\n this.proxifiedObjectsMap.set(revocableInstance.proxy, revocableInstance)\n return revocableInstance.proxy\n }\n // grab tree's leaves one by one, encapsulate them into a proxy and return\n JSONPatcherProxy.prototype._proxifyObjectTreeRecursively = function(\n parent,\n root,\n path\n ) {\n for (let key in root) {\n if (root.hasOwnProperty(key)) {\n if (root[key] instanceof Object) {\n root[key] = this._proxifyObjectTreeRecursively(\n root,\n root[key],\n escapePathComponent(key)\n )\n }\n }\n }\n return this.generateProxyAtPath(parent, root, path)\n }\n // this function is for aesthetic purposes\n JSONPatcherProxy.prototype.proxifyObjectTree = function(root) {\n /*\n while proxyifying object tree,\n the proxyifying operation itself is being\n recorded, which in an unwanted behavior,\n that's why we disable recording through this\n initial process;\n */\n this.pause()\n this.isProxifyingTreeNow = true\n const proxifiedObject = this._proxifyObjectTreeRecursively(\n undefined,\n root,\n ''\n )\n /* OK you can record now */\n this.isProxifyingTreeNow = false\n this.resume()\n return proxifiedObject\n }\n /**\n * Turns a proxified object into a forward-proxy object; doesn't emit any patches anymore, like a normal object\n * @param {Proxy} proxy - The target proxy object\n */\n JSONPatcherProxy.prototype.disableTrapsForProxy = function(\n revokableProxyInstance\n ) {\n if (this.showDetachedWarning) {\n const message =\n \"You're accessing an object that is detached from the observedObject tree, see https://github.com/Palindrom/JSONPatcherProxy#detached-objects\"\n\n revokableProxyInstance.trapsInstance.set = (\n targetObject,\n propKey,\n newValue\n ) => {\n console.warn(message)\n return Reflect.set(targetObject, propKey, newValue)\n }\n revokableProxyInstance.trapsInstance.set = (\n targetObject,\n propKey,\n newValue\n ) => {\n console.warn(message)\n return Reflect.set(targetObject, propKey, newValue)\n }\n revokableProxyInstance.trapsInstance.deleteProperty = (\n targetObject,\n propKey\n ) => {\n return Reflect.deleteProperty(targetObject, propKey)\n }\n } else {\n delete revokableProxyInstance.trapsInstance.set\n delete revokableProxyInstance.trapsInstance.get\n delete revokableProxyInstance.trapsInstance.deleteProperty\n }\n }\n /**\n * Proxifies the object that was passed in the constructor and returns a proxified mirror of it. Even though both parameters are options. You need to pass at least one of them.\n * @param {Boolean} [record] - whether to record object changes to a later-retrievable patches array.\n * @param {Function} [callback] - this will be synchronously called with every object change with a single `patch` as the only parameter.\n */\n JSONPatcherProxy.prototype.observe = function(record, callback) {\n if (!record && !callback) {\n throw new Error('You need to either record changes or pass a callback')\n }\n this.isRecording = record\n this.userCallback = callback\n /*\n I moved it here to remove it from `unobserve`,\n this will also make the constructor faster, why initiate\n the array before they decide to actually observe with recording?\n They might need to use only a callback.\n */\n if (record) this.patches = []\n this.cachedProxy = this.proxifyObjectTree(this.originalObject)\n return this.cachedProxy\n }\n /**\n * If the observed is set to record, it will synchronously return all the patches and empties patches array.\n */\n JSONPatcherProxy.prototype.generate = function() {\n if (!this.isRecording) {\n throw new Error('You should set record to true to get patches later')\n }\n return this.patches.splice(0, this.patches.length)\n }\n /**\n * Revokes all proxies rendering the observed object useless and good for garbage collection @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/revocable}\n */\n JSONPatcherProxy.prototype.revoke = function() {\n this.proxifiedObjectsMap.forEach(el => {\n el.revoke()\n })\n }\n /**\n * Disables all proxies' traps, turning the observed object into a forward-proxy object, like a normal object that you can modify silently.\n */\n JSONPatcherProxy.prototype.disableTraps = function() {\n this.proxifiedObjectsMap.forEach(this.disableTrapsForProxy, this)\n }\n return JSONPatcherProxy\n})()\n\nexport default JSONPatcherProxy\n","import { diff } from './vdom/diff'\nimport JSONProxy from './proxy'\nimport { getUse } from './util'\nimport options from './options'\n\nexport function render(vnode, parent, store) {\n\tparent = typeof parent === 'string' ? document.querySelector(parent) : parent\n\tif (store) {\n\t\tif (store.data) {\n\t\t\tobserveStore(store)\n\t\t} else {\n\t\t\toptions.isMultiStore = true\n\t\t\t//Multi-store injection\n\t\t\tfor (let key in store) {\n\t\t\t\tobserveStore(store[key], key)\n\t\t\t}\n\t\t}\n\t\tparent.store = store\n\t}\n\treturn diff(null, vnode, parent, false)\n}\n\nfunction observeStore(store, key) {\n\tstore.instances = []\n\tstore.updateSelfInstances = []\n\textendStoreUpate(store, key)\n\n\tstore.data = new JSONProxy(store.data).observe(false, function (patch) {\n\t\tconst patchs = {}\n\t\tif (patch.op === 'remove') {\n\t\t\t// fix arr splice\n\t\t\tconst kv = getArrayPatch(patch.path, store)\n\t\t\tpatchs[kv.k] = kv.v\n\n\t\t\tupdate(patchs, store)\n\n\t\t} else {\n\t\t\tconst key = fixPath(patch.path)\n\t\t\tpatchs[key] = patch.value\n\n\t\t\tupdate(patchs, store)\n\n\t\t}\n\t})\n}\n\nfunction update(patch, store) {\n\tstore.update(patch)\n}\n\nfunction extendStoreUpate(store, key) {\n\tstore.update = function (patch) {\n\t\tif (Object.keys(patch).length > 0) {\n\t\t\tthis.instances.forEach(instance => {\n\t\t\t\tif (key) {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updatePath && instance._updatePath[key] && needUpdate(patch, instance._updatePath[key]))) {\n\t\t\t\t\t\tif (instance.use) {\n\t\t\t\t\t\t\tgetUse(store.data, (typeof instance.use === 'function' ? instance.use() : instance.use)[key], instance.using, key)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.update()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updatePath && needUpdate(patch, instance._updatePath))) {\n\t\t\t\t\t\tif (instance.use) {\n\t\t\t\t\t\t\tinstance.using = getUse(store.data, typeof instance.use === 'function' ? instance.use() : instance.use)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.update()\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t})\n\n\t\t\tthis.updateSelfInstances.forEach(instance => {\n\t\t\t\tif (key) {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updateSelfPath && instance._updateSelfPath[key] && needUpdate(patch, instance._updateSelfPath[key]))) {\n\t\t\t\t\t\tif (instance.useSelf) {\n\t\t\t\t\t\t\tgetUse(store.data, (typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)[key], instance.usingSelf, key)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.updateSelf()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (instance._updateSelfPath && needUpdate(patch, instance._updateSelfPath)) {\n\t\t\t\t\t\tinstance.usingSelf = getUse(store.data, typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)\n\t\t\t\t\t\tinstance.updateSelf()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\tthis.onChange && this.onChange(patch)\n\t\t}\n\t}\n}\n\n\nexport function needUpdate(diffResult, updatePath) {\n\tfor (let keyA in diffResult) {\n\t\tif (updatePath[keyA]) {\n\t\t\treturn true\n\t\t}\n\t\tfor (let keyB in updatePath) {\n\t\t\tif (includePath(keyA, keyB)) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t}\n\treturn false\n}\n\nfunction includePath(pathA, pathB) {\n\tif (pathA.indexOf(pathB) === 0) {\n\t\tconst next = pathA.substr(pathB.length, 1)\n\t\tif (next === '[' || next === '.') {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nexport function fixPath(path) {\n\tlet mpPath = ''\n\tconst arr = path.replace('/', '').split('/')\n\tarr.forEach((item, index) => {\n\t\tif (index) {\n\t\t\tif (isNaN(Number(item))) {\n\t\t\t\tmpPath += '.' + item\n\t\t\t} else {\n\t\t\t\tmpPath += '[' + item + ']'\n\t\t\t}\n\t\t} else {\n\t\t\tmpPath += item\n\t\t}\n\t})\n\treturn mpPath\n}\n\nfunction getArrayPatch(path, store) {\n\tconst arr = path.replace('/', '').split('/')\n\tlet current = store.data[arr[0]]\n\tfor (let i = 1, len = arr.length; i < len - 1; i++) {\n\t\tcurrent = current[arr[i]]\n\t}\n\treturn {\n\t\tk: fixArrPath(path),\n\t\tv: current\n\t}\n}\n\nfunction fixArrPath(path) {\n\tlet mpPath = ''\n\tconst arr = path.replace('/', '').split('/')\n\tconst len = arr.length\n\tarr.forEach((item, index) => {\n\t\tif (index < len - 1) {\n\t\t\tif (index) {\n\t\t\t\tif (isNaN(Number(item))) {\n\t\t\t\t\tmpPath += '.' + item\n\t\t\t\t} else {\n\t\t\t\t\tmpPath += '[' + item + ']'\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmpPath += item\n\t\t\t}\n\t\t}\n\t})\n\treturn mpPath\n}\n","import WeElement from './we-element'\nimport options from './options'\n\nexport function define(name, ctor, config) {\n if (options.mapping[name]) {\n return\n }\n if (ctor.is === 'WeElement') {\n customElements.define(name, ctor)\n options.mapping[name] = ctor\n\n } else {\n \n if (typeof config === 'string') {\n config = { css: config }\n } else {\n config = config || { }\n }\n\n class Ele extends WeElement {\n\n static css = config.css\n\n static propTypes = config.propTypes\n\n static defaultProps = config.defaultProps\n\n render() {\n return ctor.call(this, this)\n }\n\n receiveProps() {\n if (config.receiveProps) {\n return config.receiveProps.apply(this, arguments)\n }\n }\n }\n\n const eleHooks = ['install', 'installed', 'uninstall', 'beforeUpdate', 'updated', 'beforeRender', 'rendered'],\n storeHelpers = ['use', 'useSelf']\n\n eleHooks.forEach(hook => {\n if (config[hook]) {\n Ele.prototype[hook] = function () {\n config[hook].apply(this, arguments)\n }\n }\n })\n\n storeHelpers.forEach(func => {\n if (config[func]) {\n Ele.prototype[func] = function () {\n return typeof config[func] === 'function'\n ? config[func].apply(this, arguments)\n : config[func]\n }\n }\n })\n\n customElements.define(name, Ele)\n options.mapping[name] = Ele\n }\n}\n\n\n\n","import { extend } from './util'\nimport { h } from './h'\n\n/**\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\n * @param {VNode} vnode\t\tThe virtual DOM element to clone\n * @param {Object} props\tAttributes/props to add when cloning\n * @param {VNode} rest\t\tAny additional arguments will be used as replacement children.\n */\nexport function cloneElement(vnode, props) {\n return h(\n vnode.nodeName,\n extend(extend({}, vnode.attributes), props),\n arguments.length > 2 ? [].slice.call(arguments, 2) : vnode.children\n )\n}\n","export function getHost(ele) {\n let p = ele.parentNode\n while (p) {\n if (p.host) {\n return p.host\n } else if (p.shadowRoot && p.shadowRoot.host) {\n return p.shadowRoot.host\n } else {\n p = p.parentNode\n }\n }\n}\n","/**\n * classNames based on https://github.com/JedWatson/classnames\n * by Jed Watson\n * Licensed under the MIT License\n * https://github.com/JedWatson/classnames/blob/master/LICENSE\n * modified by dntzhang\n */\n\nvar hasOwn = {}.hasOwnProperty\n\nexport function classNames() {\n var classes = []\n\n for (var i = 0; i < arguments.length; i++) {\n var arg = arguments[i]\n if (!arg) continue\n\n var argType = typeof arg\n\n if (argType === 'string' || argType === 'number') {\n classes.push(arg)\n } else if (Array.isArray(arg) && arg.length) {\n var inner = classNames.apply(null, arg)\n if (inner) {\n classes.push(inner)\n }\n } else if (argType === 'object') {\n for (var key in arg) {\n if (hasOwn.call(arg, key) && arg[key]) {\n classes.push(key)\n }\n }\n }\n }\n\n return classes.join(' ')\n}\n\nexport function extractClass() {\n const [props, ...args] = Array.prototype.slice.call(arguments, 0)\n if (props.class) {\n args.unshift(props.class)\n delete props.class\n } else if (props.className) {\n args.unshift(props.className)\n delete props.className\n }\n if (args.length > 0) {\n return { class: classNames.apply(null, args) }\n }\n}\n","export function o(obj){\n return JSON.stringify(obj)\n}","import { h, h as createElement } from './h'\nimport options from './options'\nimport WeElement from './we-element'\nimport { render } from './render'\nimport { define } from './define'\nimport { tag } from './tag'\nimport { cloneElement } from './clone-element'\nimport { getHost } from './get-host'\nimport { rpx } from './rpx'\nimport { classNames, extractClass } from './class'\nimport { o } from './o'\nimport htm from 'htm'\nimport { extend, get, set, bind, unbind } from './extend'\nimport JSONProxy from './proxy'\nimport { Fragment } from './util'\n\nh.f = Fragment\n\nconst html = htm.bind(h)\n\nfunction createRef() {\n return {}\n}\n\nconst $ = {}\nconst Component = WeElement\nconst defineElement = define\nconst elements = options.mapping\n\nconst omi = {\n tag,\n WeElement,\n Component,\n render,\n h,\n createElement,\n options,\n define,\n cloneElement,\n getHost,\n rpx,\n defineElement,\n classNames,\n extractClass,\n createRef,\n html,\n htm,\n o,\n\telements,\n\t$,\n\textend,\n\tget,\n\tset,\n\tbind,\n\tunbind,\n JSONProxy\n}\n\noptions.root.Omi = omi\noptions.root.omi = omi\noptions.root.Omi.version = '6.15.6'\n\nexport default omi\n\nexport {\n tag,\n WeElement,\n Component,\n render,\n h,\n createElement,\n options,\n define,\n cloneElement,\n getHost,\n rpx,\n defineElement,\n classNames,\n extractClass,\n createRef,\n html,\n htm,\n o,\n\telements,\n\t$,\n\textend,\n\tget,\n\tset,\n\tbind,\n\tunbind,\n JSONProxy\n}\n","function getGlobal() {\n if (\n typeof global !== 'object' ||\n !global ||\n global.Math !== Math ||\n global.Array !== Array\n ) {\n return (\n self ||\n window ||\n global ||\n (function() {\n return this\n })()\n )\n }\n return global\n}\n\n/** Global options\n *\t@public\n *\t@namespace options {Object}\n */\nexport default {\n store: null,\n root: getGlobal(),\n\tmapping: {},\n\tisMultiStore: false\n}\n","import {\n\tcssToDom,\n\tisArray,\n\tgetUse,\n\thyphenate,\n\tgetValByPath,\n\tremoveItem\n} from './util'\nimport { diff } from './vdom/diff'\nimport options from './options'\nimport { getPath } from './util'\n\nlet id = 0\n\nexport default class WeElement extends HTMLElement {\n\tstatic is = 'WeElement'\n\n\tconstructor() {\n\t\tsuper()\n\t\tthis.props = Object.assign({},\n\t\t\tthis.constructor.defaultProps\n\t\t)\n\t\tthis.elementId = id++\n\t}\n\n\tconnectedCallback() {\n\t\tlet p = this.parentNode\n\t\twhile (p && !this.store) {\n\t\t\tthis.store = p.store\n\t\t\tp = p.parentNode || p.host\n\t\t}\n\n\t\tif (this.use) {\n\t\t\tlet use\n\t\t\tif (typeof this.use === 'function') {\n\t\t\t\tuse = this.use()\n\t\t\t} else {\n\t\t\t\tuse = this.use\n\t\t\t}\n\n\n\t\t\tif (options.isMultiStore) {\n\t\t\t\tlet _updatePath = {}\n\t\t\t\tlet using = {}\n\t\t\t\tfor (let storeName in use) {\n\t\t\t\t\t_updatePath[storeName] = {}\n\t\t\t\t\tusing[storeName] = {}\n\t\t\t\t\tgetPath(use[storeName], _updatePath, storeName)\n\t\t\t\t\tgetUse(this.store[storeName].data, use[storeName], using, storeName)\n\t\t\t\t\tthis.store[storeName].instances.push(this)\n\t\t\t\t}\n\t\t\t\tthis.using = using\n\t\t\t\tthis._updatePath = _updatePath\n\t\t\t} else {\n\t\t\t\tthis._updatePath = getPath(use)\n\t\t\t\tthis.using = getUse(this.store.data, use)\n\t\t\t\tthis.store.instances.push(this)\n\t\t\t}\n\t\t}\n\t\tif (this.useSelf) {\n\t\t\tconst use = typeof this.useSelf === 'function' ? this.useSelf() : this.useSelf\n\t\t\tif (options.isMultiStore) {\n\t\t\t\tlet _updatePath = {}\n\t\t\t\tlet using = {}\n\t\t\t\tfor (let storeName in use) {\n\t\t\t\t\tgetPath(use[storeName], _updatePath, storeName)\n\t\t\t\t\tgetUse(this.store[storeName].data, use[storeName], using, storeName)\n\t\t\t\t\tthis.store[storeName].updateSelfInstances.push(this)\n\t\t\t\t}\n\t\t\t\tthis.usingSelf = using\n\t\t\t\tthis._updateSelfPath = _updatePath\n\t\t\t} else {\n\t\t\t\tthis._updateSelfPath = getPath(use)\n\t\t\t\tthis.usingSelf = getUse(this.store.data, use)\n\t\t\t\tthis.store.updateSelfInstances.push(this)\n\t\t\t}\n\t\t}\n\t\tthis.attrsToProps()\n\t\tthis.beforeInstall()\n\t\tthis.install()\n\t\tthis.afterInstall()\n\n\t\tlet shadowRoot\n\t\tif (!this.shadowRoot) {\n\t\t\tshadowRoot = this.attachShadow({\n\t\t\t\tmode: 'open'\n\t\t\t})\n\t\t} else {\n\t\t\tshadowRoot = this.shadowRoot\n\t\t\tlet fc\n\t\t\twhile ((fc = shadowRoot.firstChild)) {\n\t\t\t\tshadowRoot.removeChild(fc)\n\t\t\t}\n\t\t}\n\n\t\tif (this.constructor.css) {\n\t\t\tshadowRoot.appendChild(cssToDom(this.constructor.css))\n\t\t} else if (this.css) {\n\t\t\tshadowRoot.appendChild(cssToDom(typeof this.css === 'function' ? this.css() : this.css))\n\t\t}\n\t\tthis.beforeRender()\n\t\toptions.afterInstall && options.afterInstall(this)\n\n\n\t\tconst rendered = this.render(this.props, this.store)\n\t\tthis.__hasChildren = Object.prototype.toString.call(rendered) === '[object Array]' && rendered.length > 0\n\n\t\tthis.rootNode = diff(\n\t\t\tnull,\n\t\t\trendered,\n\t\t\tnull,\n\t\t\tthis\n\t\t)\n\t\tthis.rendered()\n\n\t\tif (this.props.css) {\n\t\t\tthis._customStyleElement = cssToDom(this.props.css)\n\t\t\tthis._customStyleContent = this.props.css\n\t\t\tshadowRoot.appendChild(this._customStyleElement)\n\t\t}\n\n\t\tif (isArray(this.rootNode)) {\n\t\t\tthis.rootNode.forEach(function (item) {\n\t\t\t\tshadowRoot.appendChild(item)\n\t\t\t})\n\t\t} else {\n\t\t\tshadowRoot.appendChild(this.rootNode)\n\t\t}\n\t\tthis.installed()\n\t\tthis._isInstalled = true\n\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.uninstall()\n\t\tthis._isInstalled = false\n\t\tif (this.store) {\n\t\t\tif(options.isMultiStore){\n\t\t\t\tfor(let key in this.store){\n\t\t\t\t\tconst current = this.store[key]\n\t\t\t\t\tremoveItem(this, current.instances)\n\t\t\t\t removeItem(this, current.updateSelfInstances)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tremoveItem(this, this.store.instances)\n\t\t\t\tremoveItem(this, this.store.updateSelfInstances)\n\t\t\t}\n\t\t}\n\t}\n\n\tupdate(ignoreAttrs, updateSelf) {\n\t\tthis._willUpdate = true\n\t\tthis.beforeUpdate()\n\t\tthis.beforeRender()\n\t\t//fix null !== undefined\n\t\tif (this._customStyleContent != this.props.css) {\n\t\t\tthis._customStyleContent = this.props.css\n\t\t\tthis._customStyleElement.textContent = this._customStyleContent\n\t\t}\n\t\tthis.attrsToProps(ignoreAttrs)\n\n\t\tconst rendered = this.render(this.props, this.store)\n\t\tthis.rendered()\n\t\tthis.__hasChildren = this.__hasChildren || (Object.prototype.toString.call(rendered) === '[object Array]' && rendered.length > 0)\n\n\t\tthis.rootNode = diff(\n\t\t\tthis.rootNode,\n\t\t\trendered,\n\t\t\tthis.shadowRoot,\n\t\t\tthis,\n\t\t\tupdateSelf\n\t\t)\n\t\tthis._willUpdate = false\n\t\tthis.updated()\n\n\t}\n\n\tupdateSelf(ignoreAttrs) {\n\t\tthis.update(ignoreAttrs, true)\n\t}\n\n\tremoveAttribute(key) {\n\t\tsuper.removeAttribute(key)\n\t\t//Avoid executing removeAttribute methods before connectedCallback\n\t\tthis._isInstalled && this.update()\n\t}\n\n\tsetAttribute(key, val) {\n\t\tif (val && typeof val === 'object') {\n\t\t\tsuper.setAttribute(key, JSON.stringify(val))\n\t\t} else {\n\t\t\tsuper.setAttribute(key, val)\n\t\t}\n\t\t//Avoid executing setAttribute methods before connectedCallback\n\t\tthis._isInstalled && this.update()\n\t}\n\n\tpureRemoveAttribute(key) {\n\t\tsuper.removeAttribute(key)\n\t}\n\n\tpureSetAttribute(key, val) {\n\t\tsuper.setAttribute(key, val)\n\t}\n\n\tattrsToProps(ignoreAttrs) {\n\t\tconst ele = this\n\t\tif (ele.normalizedNodeName || ignoreAttrs) return\n\t\tele.props['css'] = ele.getAttribute('css')\n\t\tconst attrs = this.constructor.propTypes\n\t\tif (!attrs) return\n\t\tObject.keys(attrs).forEach(key => {\n\t\t\tconst type = attrs[key]\n\t\t\tconst val = ele.getAttribute(hyphenate(key))\n\t\t\tif (val !== null) {\n\t\t\t\tswitch (type) {\n\t\t\t\t\tcase String:\n\t\t\t\t\t\tele.props[key] = val\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Number:\n\t\t\t\t\t\tele.props[key] = Number(val)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Boolean:\n\t\t\t\t\t\tif (val === 'false' || val === '0') {\n\t\t\t\t\t\t\tele.props[key] = false\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tele.props[key] = true\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Array:\n\t\t\t\t\tcase Object:\n\t\t\t\t\t\tif (val[0] === ':') {\n\t\t\t\t\t\t\tele.props[key] = getValByPath(val.substr(1), Omi.$)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tele.props[key] = JSON.parse(val\n\t\t\t\t\t\t\t\t.replace(/(['\"])?([a-zA-Z0-9_-]+)(['\"])?:([^\\/])/g, '\"$2\":$4')\n\t\t\t\t\t\t\t\t.replace(/'([\\s\\S]*?)'/g, '\"$1\"')\n\t\t\t\t\t\t\t\t.replace(/,(\\s*})/g, '$1')\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (ele.constructor.defaultProps && ele.constructor.defaultProps.hasOwnProperty(key)) {\n\t\t\t\t\tele.props[key] = ele.constructor.defaultProps[key]\n\t\t\t\t} else {\n\t\t\t\t\tele.props[key] = null\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\tfire(name, data) {\n\t\tthis.dispatchEvent(new CustomEvent(name, {\n\t\t\tdetail: data\n\t\t}))\n\t}\n\n\tbeforeInstall() {}\n\n\tinstall() {}\n\n\tafterInstall() {}\n\n\tinstalled() {}\n\n\tuninstall() {}\n\n\tbeforeUpdate() {}\n\n\tupdated() {}\n\n\tbeforeRender() {}\n\n\trendered() {}\n\n\treceiveProps() {}\n\n}\n","var n=function(t,r,u,e){for(var p=1;p\"===t?(a(),u=1):u&&(\"=\"===t?(u=4,r=e,e=\"\"):\"/\"===t?(a(),3===u&&(s=s[0]),u=s,(s=s[0]).push(u,4),u=0):\" \"===t||\"\\t\"===t||\"\\n\"===t||\"\\r\"===t?(a(),u=2):e+=t)}return a(),s},r=\"function\"==typeof Map,u=r?new Map:{},e=r?function(n){var r=u.get(n);return r||u.set(n,r=t(n)),r}:function(n){for(var r=\"\",e=0;e1?r:r[0]}\n"]} \ No newline at end of file +{"version":3,"sources":["../src/vnode.js","../src/h.js","../src/util.js","../src/vdom/index.js","../src/extend.js","../src/dom/index.js","../src/vdom/diff.js","../src/proxy.js","../src/render.js","../src/define.js","../src/clone-element.js","../src/get-host.js","../src/class.js","../src/o.js","../src/omi.js","../src/options.js","../src/we-element.js","../node_modules/htm/dist/htm.mjs"],"names":["VNode","h","nodeName","attributes","lastSimple","child","simple","i","children","arguments","length","stack","push","pop","undefined","String","p","key","options","vnode","cssToDom","css","node","document","createElement","textContent","camelCase","str","replace","$","$1","toUpperCase","Fragment","props","extend","obj","applyRef","ref","value","current","isArray","Object","prototype","toString","call","getUse","data","paths","out","name","forEach","path","index","isPath","getTargetByPath","keys","tempPath","tempVal","args","apply","pathToArr","split","origin","arr","len","hyphenate","hyphenateRE","toLowerCase","getValByPath","prop","getPath","result","item","removeItem","splice","isSameNodeType","splitText","mapping","hydrating","_componentConstructor","isNamedNode","extend$1","handler","extension","get","e","type","eventProxy","el","_listeners","addEventListener","createNode","removeNode","setAccessor","component","old","isSvg","className","style","cssText","IS_NON_DIMENSIONAL","test","useCapture","nameLower","innerHTML","slice","eventProxy$1","touchStart","touchEnd","removeEventListener","pureRemoveAttribute","removeAttribute","ns","removeAttributeNS","pureSetAttribute","setAttribute","this","___touchX","pageX","___touchY","touches","pageY","Math","___scrollTop","body","scrollTop","abs","changedTouches","dispatchEvent","CustomEvent","detail","isSvgMode","parent","ownerSVGElement","dom","querySelectorAll","styles","s","innerDiffNode","updateSelf","removeChild","firstChild","insertBefore","appendChild","ret","ele","idiff","one","recollectNodeTree","parentNode","nodeValue","createTextNode","replaceChild","vnodeName","vchildren","fc","a","nextSibling","constructor","is","noSlot","dangerouslySetInnerHTML","diffAttributes","min","childrenLen","vlen","j","keyedLen","originalChildren","keyed","vchild","_child","_component","__key","trim","isHydrating","c","f","unmountOnly","ATTR_KEY","removeChildren","oldClone","assign","receiveProps","isWeElement","attrs","ccName","_ccName","_classCallCheck","instance","Constructor","TypeError","_possibleConstructorReturn","self","ReferenceError","render","store","JSONPatcherProxy","querySelector","observeStore","isMultiStore","diff","instances","updateSelfInstances","observe","patch","extendStoreUpate","getArrayPatch","JSONProxy","patchs","kv","v","update","k","_updatePath","needUpdate","use","using","_updateSelfPath","useSelf","usingSelf","onChange","diffResult","updatePath","keyA","keyB","includePath","pathA","pathB","indexOf","next","substr","fixPath","mpPath","fixArrPath","_classCallCheck$1","_possibleConstructorReturn$1","ctor","define","config","customElements","Ele","_WeElement","WeElement","propTypes","defaultProps","eleHooks","storeHelpers","func","pure","target","cloneElement","getHost","shadowRoot","host","rpx","b","window","innerWidth","Number","arg","classNames","classes","argType","inner","join","_Array$prototype$slic","Array","class","unshift","o","JSON","stringify","htm","t","r","n","root","global","Reflect","hasOwnProperty","BuiltInHTMLElement","HTMLElement","construct","setPrototypeOf","Promise","resolve","then","bind","setTimeout","diffLevel","_this","elementId","id","connectedCallback","storeName","_use","_updatePath2","_using","_storeName","attrsToProps","beforeInstall","install","afterInstall","attachShadow","mode","rendered","beforeRender","rootNode","_customStyleContent","_customStyleElement","installed","_isInstalled","disconnectedCallback","uninstall","ignoreAttrs","_willUpdate","beforeUpdate","__hasChildren","updated","_HTMLElement","val","normalizedNodeName","getAttribute","Boolean","Omi","parse","fire","deepClone","escapePathComponent","pathComponents","parentAndPath","parenthoodMap","parentPath","newValueOriginalObject","revokableInstance","inherited","proxifiedObjectsMap","has","newValue","set","operation","destinationPropKey","op","oldValue","delete","disableTrapsForProxy","console","warn","reflectionResult","revokableProxyInstance","defaultCallback","resume","patches","userCallback","pause","isObserving","showDetachedWarning","cachedProxy","_this2","receiver","deleteProperty","deleteTrap","Proxy","revocable","revocableInstance","trapsInstance","traps","originalObject","_proxifyObjectTreeRecursively","proxifyObjectTree","isProxifyingTreeNow","proxifiedObject","targetObject","message","propKey","record","callback","generate","isRecording","revoke","disableTraps","u","Map","html","Component","defineElement","tag","elements","createRef","extractClass","unbind","omi","version","module","exports"],"mappings":";;IACO,SAASA;ICIT,SAASC,EAAEC,UAAUC;QAC1B,IACEC,YACAC,OACAC,QACAC,GAJEC;QAKJ,KAAKD,IAAIE,UAAUC,QAAQH,MAAM,KAC/BI,MAAMC,KAAKH,UAAUF;QAEvB,IAAIJ,cAAqC,QAAvBA,WAAWK,UAAkB;YAC7C,KAAKG,MAAMD,QAAQC,MAAMC,KAAKT,WAAWK;mBAClCL,WAAWK;;QAEpB,OAAOG,MAAMD,QACX,KAAKL,QAAQM,MAAME,eAAwBC,MAAdT,MAAMQ,KACjC,KAAKN,IAAIF,MAAMK,QAAQH,OAAOI,MAAMC,KAAKP,MAAME,UAC1C;YACL,IAAqB,oBAAVF,OAAqBA,QAAQ;YAExC,IAAKC,SAA6B,qBAAbJ,UACnB,IAAa,QAATG,OAAeA,QAAQ,SACtB,IAAqB,mBAAVA,OAAoBA,QAAQU,OAAOV,aAC9C,IAAqB,mBAAVA,OAAoBC,UAAS;YAG/C,IAAIA,UAAUF,YACZI,SAASA,SAASE,SAAS,MAAML,YAC5B,IAAwB,MAApBG,SAASE,QAClBF,aAAYH,cAEZG,SAASI,KAAKP;YAGhBD,aAAaE;;QAIjB,IAAIU,IAAI,IAAIhB;QACZgB,EAAEd,WAAWA;QACbc,EAAER,WAAWA;Q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AH,UAAAvM,KAAAoI,MAAAmE","file":"omi.js","sourcesContent":["/** Virtual DOM Node */\nexport function VNode() {}\n","import { VNode } from './vnode'\nimport options from './options'\n\nconst stack = []\n\nexport function h(nodeName, attributes) {\n let children = [],\n lastSimple,\n child,\n simple,\n i\n for (i = arguments.length; i-- > 2; ) {\n stack.push(arguments[i])\n }\n if (attributes && attributes.children != null) {\n if (!stack.length) stack.push(attributes.children)\n delete attributes.children\n }\n while (stack.length) {\n if ((child = stack.pop()) && child.pop !== undefined) {\n for (i = child.length; i--; ) stack.push(child[i])\n } else {\n if (typeof child === 'boolean') child = null\n\n if ((simple = typeof nodeName !== 'function')) {\n if (child == null) child = ''\n else if (typeof child === 'number') child = String(child)\n else if (typeof child !== 'string') simple = false\n }\n\n if (simple && lastSimple) {\n children[children.length - 1] += child\n } else if (children.length === 0) {\n children = [child]\n } else {\n children.push(child)\n }\n\n lastSimple = simple\n }\n }\n\n let p = new VNode()\n p.nodeName = nodeName\n p.children = children\n p.attributes = attributes == null ? undefined : attributes\n p.key = attributes == null ? undefined : attributes.key\n\n // if a \"vnode hook\" is defined, pass every created VNode to it\n if (options.vnode !== undefined) options.vnode(p)\n\n return p\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n/**\n * This shim allows elements written in, or compiled to, ES5 to work on native\n * implementations of Custom Elements v1. It sets new.target to the value of\n * this.constructor so that the native HTMLElement constructor can access the\n * current under-construction element's definition.\n */\n; (function () {\n if (\n // No Reflect, no classes, no need for shim because native custom elements\n // require ES2015 classes or Reflect.\n window.Reflect === undefined ||\n window.customElements === undefined ||\n // The webcomponentsjs custom elements polyfill doesn't require\n // ES2015-compatible construction (`super()` or `Reflect.construct`).\n window.customElements.hasOwnProperty('polyfillWrapFlushCallback')\n ) {\n return\n }\n const BuiltInHTMLElement = HTMLElement\n window.HTMLElement = function HTMLElement() {\n return Reflect.construct(BuiltInHTMLElement, [], this.constructor)\n }\n HTMLElement.prototype = BuiltInHTMLElement.prototype\n HTMLElement.prototype.constructor = HTMLElement\n Object.setPrototypeOf(HTMLElement, BuiltInHTMLElement)\n})()\n\nexport function cssToDom(css) {\n const node = document.createElement('style')\n node.textContent = css\n return node\n}\n\nexport function camelCase(str) {\n return str.replace(/-(\\w)/g, ($, $1) => {\n return $1.toUpperCase()\n })\n}\n\nexport function Fragment(props) {\n return props.children\n}\n\nexport function extend(obj, props) {\n for (let i in props) obj[i] = props[i]\n return obj\n}\n\n/** Invoke or update a ref, depending on whether it is a function or object ref.\n * @param {object|function} [ref=null]\n * @param {any} [value]\n */\nexport function applyRef(ref, value) {\n if (ref != null) {\n if (typeof ref == 'function') ref(value)\n else ref.current = value\n }\n}\n\n/**\n * Call a function asynchronously, as soon as possible. Makes\n * use of HTML Promise to schedule the callback if available,\n * otherwise falling back to `setTimeout` (mainly for IE<11).\n * @type {(callback: function) => void}\n */\nexport const defer =\n typeof Promise == 'function'\n ? Promise.resolve().then.bind(Promise.resolve())\n : setTimeout\n\nexport function isArray(obj) {\n return Object.prototype.toString.call(obj) === '[object Array]'\n}\n\n\nexport function getUse(data, paths, out, name) {\n const obj = []\n paths.forEach((path, index) => {\n const isPath = typeof path === 'string'\n if (isPath) {\n obj[index] = getTargetByPath(data, path)\n } else {\n const key = Object.keys(path)[0]\n const value = path[key]\n if (typeof value === 'string') {\n obj[index] = getTargetByPath(data, value)\n } else {\n const tempPath = value[0]\n if (typeof tempPath === 'string') {\n const tempVal = getTargetByPath(data, tempPath)\n obj[index] = value[1] ? value[1](tempVal) : tempVal\n } else {\n const args = []\n tempPath.forEach(path =>{\n args.push(getTargetByPath(data, path))\n })\n obj[index] = value[1].apply(null, args)\n }\n }\n obj[key] = obj[index]\n }\n\t})\n\tif(out) out[name] = obj\n return obj\n}\n\nexport function pathToArr(path) {\n\tif(typeof path !== 'string' || !path) return []\n\t// return path.split(/\\.|\\[|\\]/).filter(name => !!name)\n\treturn path.replace(/]/g, '').replace(/\\[/g, '.').split('.')\n}\n\nexport function getTargetByPath(origin, path) {\n const arr = pathToArr(path)\n let current = origin\n for (let i = 0, len = arr.length; i < len; i++) {\n current = current[arr[i]]\n }\n return current\n}\n\nconst hyphenateRE = /\\B([A-Z])/g\nexport function hyphenate(str) {\n return str.replace(hyphenateRE, '-$1').toLowerCase()\n}\n\nexport function getValByPath(path, current) {\n\tconst arr = pathToArr(path)\n\tarr.forEach(prop => {\n\t\tcurrent = current[prop]\n\t})\n\treturn current\n}\n\nexport function getPath(obj, out, name) {\n\tconst result = {}\n\tobj.forEach(item => {\n\t\tif (typeof item === 'string') {\n\t\t\tresult[item] = true\n\t\t} else {\n\t\t\tconst tempPath = item[Object.keys(item)[0]]\n\t\t\tif (typeof tempPath === 'string') {\n\t\t\t\tresult[tempPath] = true\n\t\t\t} else {\n\t\t\t\tif (typeof tempPath[0] === 'string') {\n\t\t\t\t\tresult[tempPath[0]] = true\n\t\t\t\t} else {\n\t\t\t\t\ttempPath[0].forEach(path => (result[path] = true))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\tif(out) out[name] = result\n\treturn result\n}\n\nexport function removeItem(item, arr){\n if(!arr) return\n for (let i = 0, len = arr.length; i < len; i++) {\n if (arr[i] === item) {\n arr.splice(i, 1)\n break\n }\n }\n}","import { extend } from '../util'\nimport options from '../options'\n/**\n * Check if two nodes are equivalent.\n *\n * @param {Node} node\t\t\tDOM Node to compare\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\n * @param {boolean} [hydrating=false]\tIf true, ignores component constructors when comparing.\n * @private\n */\nexport function isSameNodeType(node, vnode, hydrating) {\n if (typeof vnode === 'string' || typeof vnode === 'number') {\n return node.splitText !== undefined\n }\n if (typeof vnode.nodeName === 'string') {\n return !node._componentConstructor && isNamedNode(node, vnode.nodeName)\n } else if (typeof vnode.nodeName === 'function'){\n return options.mapping[node.nodeName.toLowerCase()] === vnode.nodeName\n }\n return hydrating || node._componentConstructor === vnode.nodeName\n}\n\n/**\n * Check if an Element has a given nodeName, case-insensitively.\n *\n * @param {Element} node\tA DOM Element to inspect the name of.\n * @param {String} nodeName\tUnnormalized name to compare against.\n */\nexport function isNamedNode(node, nodeName) {\n return (\n node.normalizedNodeName === nodeName ||\n node.nodeName.toLowerCase() === nodeName.toLowerCase()\n )\n}\n\n/**\n * Reconstruct Component-style `props` from a VNode.\n * Ensures default/fallback values from `defaultProps`:\n * Own-properties of `defaultProps` not present in `vnode.attributes` are added.\n *\n * @param {VNode} vnode\n * @returns {Object} props\n */\nexport function getNodeProps(vnode) {\n let props = extend({}, vnode.attributes)\n props.children = vnode.children\n\n let defaultProps = vnode.nodeName.defaultProps\n if (defaultProps !== undefined) {\n for (let i in defaultProps) {\n if (props[i] === undefined) {\n props[i] = defaultProps[i]\n }\n }\n }\n\n return props\n}\n","import {pathToArr} from './util'\n\nexport const extension = {}\n\nexport function extend(name, handler) {\n\textension['o-' + name] = handler\n}\n\nexport function set(origin, path, value) {\n\tconst arr = pathToArr(path)\n\tlet current = origin\n\tfor (let i = 0, len = arr.length; i < len; i++) {\n\t\t\tif (i === len - 1) {\n\t\t\t\t\tcurrent[arr[i]] = value\n\t\t\t} else {\n\t\t\t\t\tcurrent = current[arr[i]]\n\t\t\t}\n\t}\n}\n\nexport function get(origin, path) {\n\tconst arr = pathToArr(path)\n\tlet current = origin\n\tfor (let i = 0, len = arr.length; i < len; i++) {\n\t\tcurrent = current[arr[i]]\n\t}\n\n\treturn current\n}\n\nfunction eventProxy(e) {\n return this._listeners[e.type](e)\n}\n\nexport function bind(el, type, handler){\n\tel._listeners = el._listeners || {}\n\tel._listeners[type] = handler\n\tel.addEventListener(type, eventProxy)\n}\n\nexport function unbind(el, type){\n\tel.removeEventListener(type, eventProxy)\n}\n","import { IS_NON_DIMENSIONAL } from '../constants'\nimport { applyRef } from '../util'\nimport options from '../options'\nimport { extension } from '../extend'\n\n/**\n * Create an element with the given nodeName.\n * @param {string} nodeName The DOM node to create\n * @param {boolean} [isSvg=false] If `true`, creates an element within the SVG\n * namespace.\n * @returns {Element} The created DOM node\n */\nexport function createNode(nodeName, isSvg) {\n /** @type {Element} */\n let node = isSvg\n ? document.createElementNS('http://www.w3.org/2000/svg', nodeName)\n : document.createElement(nodeName)\n node.normalizedNodeName = nodeName\n return node\n}\n\n/**\n * Remove a child node from its parent if attached.\n * @param {Node} node The node to remove\n */\nexport function removeNode(node) {\n let parentNode = node.parentNode\n if (parentNode) parentNode.removeChild(node)\n}\n\n/**\n * Set a named attribute on the given Node, with special behavior for some names\n * and event handlers. If `value` is `null`, the attribute/handler will be\n * removed.\n * @param {Element} node An element to mutate\n * @param {string} name The name/key to set, such as an event or attribute name\n * @param {*} old The last value that was set for this name/node pair\n * @param {*} value An attribute value, such as a function to be used as an\n * event handler\n * @param {boolean} isSvg Are we currently diffing inside an svg?\n * @private\n */\nexport function setAccessor(node, name, old, value, isSvg, component) {\n if (name === 'className') name = 'class'\n\n if (name[0] == 'o' && name[1] == '-'){\n if(extension[name]){\n extension[name](node, value, component)\n }\n } else if (name === 'key') {\n // ignore\n } else if (name === 'ref') {\n applyRef(old, null)\n applyRef(value, node)\n } else if (name === 'class' && !isSvg) {\n node.className = value || ''\n } else if (name === 'style') {\n if (!value || typeof value === 'string' || typeof old === 'string') {\n node.style.cssText = value || ''\n }\n if (value && typeof value === 'object') {\n if (typeof old !== 'string') {\n for (let i in old) if (!(i in value)) node.style[i] = ''\n }\n for (let i in value) {\n node.style[i] =\n typeof value[i] === 'number' && IS_NON_DIMENSIONAL.test(i) === false\n ? value[i] + 'px'\n : value[i]\n }\n }\n } else if (name === 'dangerouslySetInnerHTML') {\n if (value) node.innerHTML = value.__html || ''\n } else if (name[0] == 'o' && name[1] == 'n') {\n let useCapture = name !== (name = name.replace(/Capture$/, ''))\n\t\tlet nameLower = name.toLowerCase()\n\t\tname = (nameLower in node ? nameLower : name).slice(2)\n if (value) {\n if (!old) {\n node.addEventListener(name, eventProxy, useCapture)\n if (name == 'tap') {\n node.addEventListener('touchstart', touchStart, useCapture)\n node.addEventListener('touchend', touchEnd, useCapture)\n }\n }\n } else {\n node.removeEventListener(name, eventProxy, useCapture)\n if (name == 'tap') {\n node.removeEventListener('touchstart', touchStart, useCapture)\n node.removeEventListener('touchend', touchEnd, useCapture)\n }\n }\n ;(node._listeners || (node._listeners = {}))[name] = value\n } else if (node.nodeName === 'INPUT' && name === 'value'){\n node[name] = value == null ? '' : value\n } else if (name !== 'list' && name !== 'type' && name !== 'css' && !isSvg && name in node && value !== '') { //value !== '' fix for selected, disabled, checked with pure element\n // Attempt to set a DOM property to the given value.\n // IE & FF throw for certain property-value combinations.\n try {\n node[name] = value == null ? '' : value\n } catch (e) {}\n if ((value == null || value === false) && name != 'spellcheck')\n node.pureRemoveAttribute ? node.pureRemoveAttribute(name) : node.removeAttribute(name)\n } else {\n let ns = isSvg && name !== (name = name.replace(/^xlink:?/, ''))\n // spellcheck is treated differently than all other boolean values and\n // should not be removed when the value is `false`. See:\n // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-spellcheck\n if (value == null || value === false) {\n if (ns)\n node.removeAttributeNS(\n 'http://www.w3.org/1999/xlink',\n name.toLowerCase()\n )\n else node.pureRemoveAttribute ? node.pureRemoveAttribute(name) : node.removeAttribute(name)\n } else if (typeof value !== 'function') {\n if (ns) {\n node.setAttributeNS(\n 'http://www.w3.org/1999/xlink',\n name.toLowerCase(),\n value\n )\n } else {\n node.pureSetAttribute ? node.pureSetAttribute(name, value) : node.setAttribute(name, value)\n }\n }\n }\n}\n\n/**\n * Proxy an event to hooked event handlers\n * @param {Event} e The event object from the browser\n * @private\n */\nfunction eventProxy(e) {\n return this._listeners[e.type]((options.event && options.event(e)) || e)\n}\n\nfunction touchStart(e) {\n this.___touchX = e.touches[0].pageX\n this.___touchY = e.touches[0].pageY\n this.___scrollTop = document.body.scrollTop\n}\n\nfunction touchEnd(e) {\n if (\n Math.abs(e.changedTouches[0].pageX - this.___touchX) < 30 &&\n Math.abs(e.changedTouches[0].pageY - this.___touchY) < 30 &&\n Math.abs(document.body.scrollTop - this.___scrollTop) < 30\n ) {\n this.dispatchEvent(new CustomEvent('tap', { detail: e }))\n }\n}\n","import { ATTR_KEY } from '../constants'\nimport { isSameNodeType, isNamedNode } from './index'\nimport { createNode, setAccessor } from '../dom/index'\nimport { camelCase, isArray, Fragment } from '../util'\nimport { removeNode } from '../dom/index'\nimport options from '../options'\n\n/** Queue of components that have been mounted and are awaiting componentDidMount */\nexport const mounts = []\n\n/** Diff recursion count, used to track the end of the diff cycle. */\nexport let diffLevel = 0\n\n/** Global flag indicating if the diff is currently within an SVG */\nlet isSvgMode = false\n\n/** Global flag indicating if the diff is performing hydration */\nlet hydrating = false\n\n/** Apply differences in a given vnode (and it's deep children) to a real DOM Node.\n *\t@param {Element} [dom=null]\t\tA DOM node to mutate into the shape of the `vnode`\n *\t@param {VNode} vnode\t\t\tA VNode (with descendants forming a tree) representing the desired DOM structure\n *\t@returns {Element} dom\t\t\tThe created/mutated element\n *\t@private\n */\nexport function diff(dom, vnode, parent, component, updateSelf) {\n // diffLevel having been 0 here indicates initial entry into the diff (not a subdiff)\n let ret\n if (!diffLevel++) {\n // when first starting the diff, check if we're diffing an SVG or within an SVG\n isSvgMode = parent != null && parent.ownerSVGElement !== undefined\n\n // hydration is indicated by the existing element to be diffed not having a prop cache\n hydrating = dom != null && !(ATTR_KEY in dom)\n }\n if(vnode.nodeName === Fragment){\n vnode = vnode.children\n }\n if (isArray(vnode)) {\n if (parent) {\n const styles = parent.querySelectorAll('style')\n styles.forEach(s => {\n parent.removeChild(s)\n })\n innerDiffNode(parent, vnode, hydrating, component, updateSelf)\n\n for (let i = styles.length - 1; i >= 0; i--) {\n parent.firstChild ? parent.insertBefore(styles[i], parent.firstChild) : parent.appendChild(style[i])\n }\n } else {\n ret = []\n vnode.forEach((item, index) => {\n let ele = idiff(index === 0 ? dom : null, item, component, updateSelf)\n ret.push(ele)\n })\n }\n } else {\n if (isArray(dom)) {\n dom.forEach((one, index) => {\n if (index === 0) {\n ret = idiff(one, vnode, component, updateSelf)\n } else {\n recollectNodeTree(one, false)\n }\n })\n } else {\n ret = idiff(dom, vnode, component, updateSelf)\n }\n // append the element if its a new parent\n if (parent && ret.parentNode !== parent) parent.appendChild(ret)\n }\n\n // diffLevel being reduced to 0 means we're exiting the diff\n if (!--diffLevel) {\n hydrating = false\n // invoke queued componentDidMount lifecycle methods\n }\n\n return ret\n}\n\n/** Internals of `diff()`, separated to allow bypassing diffLevel / mount flushing. */\nfunction idiff(dom, vnode, component, updateSelf) {\n if (dom && vnode && dom.props) {\n dom.props.children = vnode.children\n }\n let out = dom,\n prevSvgMode = isSvgMode\n\n // empty values (null, undefined, booleans) render as empty Text nodes\n if (vnode == null || typeof vnode === 'boolean') vnode = ''\n\n // Fast case: Strings & Numbers create/update Text nodes.\n if (typeof vnode === 'string' || typeof vnode === 'number') {\n // update if it's already a Text node:\n if (\n dom &&\n dom.splitText !== undefined &&\n dom.parentNode &&\n (!dom._component || component)\n ) {\n /* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */\n if (dom.nodeValue != vnode) {\n dom.nodeValue = vnode\n }\n } else {\n // it wasn't a Text node: replace it with one and recycle the old Element\n out = document.createTextNode(vnode)\n if (dom) {\n if (dom.parentNode) dom.parentNode.replaceChild(out, dom)\n recollectNodeTree(dom, true)\n }\n }\n\n out[ATTR_KEY] = true\n\n return out\n }\n\n // If the VNode represents a Component, perform a component diff:\n let vnodeName = vnode.nodeName\n if (typeof vnodeName === 'function') {\n for (let key in options.mapping) {\n if (options.mapping[key] === vnodeName) {\n vnodeName = key\n vnode.nodeName = key\n break\n }\n }\n }\n // Tracks entering and exiting SVG namespace when descending through the tree.\n isSvgMode =\n vnodeName === 'svg'\n ? true\n : vnodeName === 'foreignObject'\n ? false\n : isSvgMode\n\n // If there's no existing element or it's the wrong type, create a new one:\n vnodeName = String(vnodeName)\n if (!dom || !isNamedNode(dom, vnodeName)) {\n out = createNode(vnodeName, isSvgMode)\n\n if (dom) {\n // move children into the replacement node\n while (dom.firstChild) out.appendChild(dom.firstChild)\n\n // if the previous Element was mounted into the DOM, replace it inline\n if (dom.parentNode) dom.parentNode.replaceChild(out, dom)\n\n // recycle the old element (skips non-Element node types)\n recollectNodeTree(dom, true)\n }\n }\n\n let fc = out.firstChild,\n props = out[ATTR_KEY],\n vchildren = vnode.children\n\n if (props == null) {\n props = out[ATTR_KEY] = {}\n for (let a = out.attributes, i = a.length; i--;)\n props[a[i].name] = a[i].value\n }\n\n // Optimization: fast-path for elements containing a single TextNode:\n if (\n !hydrating &&\n vchildren &&\n vchildren.length === 1 &&\n typeof vchildren[0] === 'string' &&\n fc != null &&\n fc.splitText !== undefined &&\n fc.nextSibling == null\n ) {\n if (fc.nodeValue != vchildren[0]) {\n fc.nodeValue = vchildren[0]\n }\n }\n // otherwise, if there are existing or new children, diff them:\n else if ((vchildren && vchildren.length) || fc != null) {\n if (!(out.constructor.is == 'WeElement' && out.constructor.noSlot)) {\n innerDiffNode(\n out,\n vchildren,\n hydrating || props.dangerouslySetInnerHTML != null,\n component,\n updateSelf\n )\n }\n }\n\n // Apply attributes/props from VNode to the DOM Element:\n diffAttributes(out, vnode.attributes, props, component, updateSelf)\n if (out.props) {\n out.props.children = vnode.children\n }\n // restore previous SVG mode: (in case we're exiting an SVG namespace)\n isSvgMode = prevSvgMode\n\n return out\n}\n\n/** Apply child and attribute changes between a VNode and a DOM Node to the DOM.\n *\t@param {Element} dom\t\t\tElement whose children should be compared & mutated\n *\t@param {Array} vchildren\t\tArray of VNodes to compare to `dom.childNodes`\n *\t@param {Boolean} isHydrating\tIf `true`, consumes externally created elements similar to hydration\n */\nfunction innerDiffNode(dom, vchildren, isHydrating, component, updateSelf) {\n let originalChildren = dom.childNodes,\n children = [],\n keyed = {},\n keyedLen = 0,\n min = 0,\n len = originalChildren.length,\n childrenLen = 0,\n vlen = vchildren ? vchildren.length : 0,\n j,\n c,\n f,\n vchild,\n child\n\n // Build up a map of keyed children and an Array of unkeyed children:\n if (len !== 0) {\n for (let i = 0; i < len; i++) {\n let child = originalChildren[i],\n props = child[ATTR_KEY],\n key =\n vlen && props\n ? child._component\n ? child._component.__key\n : props.key\n : null\n if (key != null) {\n keyedLen++\n keyed[key] = child\n } else if (\n props ||\n (child.splitText !== undefined\n ? isHydrating\n ? child.nodeValue.trim()\n : true\n : isHydrating)\n ) {\n children[childrenLen++] = child\n }\n }\n }\n\n if (vlen !== 0) {\n for (let i = 0; i < vlen; i++) {\n vchild = vchildren[i]\n child = null\n\n // attempt to find a node based on key matching\n let key = vchild.key\n if (key != null) {\n if (keyedLen && keyed[key] !== undefined) {\n child = keyed[key]\n keyed[key] = undefined\n keyedLen--\n }\n }\n // attempt to pluck a node of the same type from the existing children\n else if (!child && min < childrenLen) {\n for (j = min; j < childrenLen; j++) {\n if (\n children[j] !== undefined &&\n isSameNodeType((c = children[j]), vchild, isHydrating)\n ) {\n child = c\n children[j] = undefined\n if (j === childrenLen - 1) childrenLen--\n if (j === min) min++\n break\n }\n }\n }\n\n // morph the matched/found/created DOM child to match vchild (deep)\n child = idiff(child, vchild, component, updateSelf)\n\n f = originalChildren[i]\n if (child && child !== dom && child !== f) {\n if (f == null) {\n dom.appendChild(child)\n } else if (child === f.nextSibling) {\n removeNode(f)\n } else {\n dom.insertBefore(child, f)\n }\n }\n }\n }\n\n // remove unused keyed children:\n if (keyedLen) {\n for (let i in keyed)\n if (keyed[i] !== undefined) recollectNodeTree(keyed[i], false)\n }\n\n // remove orphaned unkeyed children:\n while (min <= childrenLen) {\n if ((child = children[childrenLen--]) !== undefined)\n recollectNodeTree(child, false)\n }\n}\n\n/** Recursively recycle (or just unmount) a node and its descendants.\n *\t@param {Node} node\t\t\t\t\t\tDOM node to start unmount/removal from\n *\t@param {Boolean} [unmountOnly=false]\tIf `true`, only triggers unmount lifecycle, skips removal\n */\nexport function recollectNodeTree(node, unmountOnly) {\n // If the node's VNode had a ref function, invoke it with null here.\n // (this is part of the React spec, and smart for unsetting references)\n if (node[ATTR_KEY] != null && node[ATTR_KEY].ref) {\n if (typeof node[ATTR_KEY].ref === 'function') {\n node[ATTR_KEY].ref(null)\n } else if (node[ATTR_KEY].ref.current) {\n node[ATTR_KEY].ref.current = null\n }\n }\n\n if (unmountOnly === false || node[ATTR_KEY] == null) {\n removeNode(node)\n }\n\n removeChildren(node)\n}\n\n/** Recollect/unmount all children.\n *\t- we use .lastChild here because it causes less reflow than .firstChild\n *\t- it's also cheaper than accessing the .childNodes Live NodeList\n */\nexport function removeChildren(node) {\n node = node.lastChild\n while (node) {\n let next = node.previousSibling\n recollectNodeTree(node, true)\n node = next\n }\n}\n\n/** Apply differences in attributes from a VNode to the given DOM Element.\n *\t@param {Element} dom\t\tElement with attributes to diff `attrs` against\n *\t@param {Object} attrs\t\tThe desired end-state key-value attribute pairs\n *\t@param {Object} old\t\t\tCurrent/previous attributes (from previous VNode or element's prop cache)\n */\nfunction diffAttributes(dom, attrs, old, component, updateSelf) {\n let name\n //let update = false\n let isWeElement = dom.update\n let oldClone\n if (dom.receiveProps) {\n oldClone = Object.assign({}, old)\n }\n // remove attributes no longer present on the vnode by setting them to undefined\n for (name in old) {\n if (!(attrs && attrs[name] != null) && old[name] != null) {\n setAccessor(dom, name, old[name], (old[name] = undefined), isSvgMode, component)\n if (isWeElement) {\n delete dom.props[name]\n //update = true\n }\n }\n }\n\n // add new & update changed attributes\n for (name in attrs) {\n if (isWeElement && typeof attrs[name] === 'object' && name !== 'ref') {\n if (name === 'style') {\n setAccessor(dom, name, old[name], (old[name] = attrs[name]), isSvgMode, component)\n }\n let ccName = camelCase(name)\n dom.props[ccName] = old[ccName] = attrs[name]\n //update = true\n } else if (\n name !== 'children' &&\n (!(name in old) ||\n attrs[name] !==\n (name === 'value' || name === 'checked' ? dom[name] : old[name]))\n ) {\n setAccessor(dom, name, old[name], attrs[name], isSvgMode, component)\n if (isWeElement) {\n let ccName = camelCase(name)\n dom.props[ccName] = old[ccName] = attrs[name]\n //update = true\n } else {\n old[name] = attrs[name]\n }\n }\n }\n\n if (isWeElement && !updateSelf && dom.parentNode) {\n //__hasChildren is not accuracy when it was empty at first, so add dom.children.length > 0 condition\n //if (update || dom.__hasChildren || dom.children.length > 0 || (dom.store && !dom.store.data)) {\n if (dom.receiveProps(dom.props, oldClone) !== false) {\n dom.update()\n }\n //}\n }\n}\n","/*!\n * https://github.com/Palindrom/JSONPatcherProxy\n * (c) 2017 Starcounter\n * MIT license\n */\n\n/** Class representing a JS Object observer */\nconst JSONPatcherProxy = (function() {\n /**\n * Deep clones your object and returns a new object.\n */\n function deepClone(obj) {\n switch (typeof obj) {\n case 'object':\n return JSON.parse(JSON.stringify(obj)) //Faster than ES5 clone - http://jsperf.com/deep-cloning-of-objects/5\n case 'undefined':\n return null //this is how JSON.stringify behaves for array items\n default:\n return obj //no need to clone primitives\n }\n }\n JSONPatcherProxy.deepClone = deepClone\n\n function escapePathComponent(str) {\n if (str.indexOf('/') == -1 && str.indexOf('~') == -1) return str\n return str.replace(/~/g, '~0').replace(/\\//g, '~1')\n }\n JSONPatcherProxy.escapePathComponent = escapePathComponent\n\n /**\n * Walk up the parenthood tree to get the path\n * @param {JSONPatcherProxy} instance\n * @param {Object} obj the object you need to find its path\n */\n function findObjectPath(instance, obj) {\n const pathComponents = []\n let parentAndPath = instance.parenthoodMap.get(obj)\n while (parentAndPath && parentAndPath.path) {\n // because we're walking up-tree, we need to use the array as a stack\n pathComponents.unshift(parentAndPath.path)\n parentAndPath = instance.parenthoodMap.get(parentAndPath.parent)\n }\n if (pathComponents.length) {\n const path = pathComponents.join('/')\n return '/' + path\n }\n return ''\n }\n /**\n * A callback to be used as th proxy set trap callback.\n * It updates parenthood map if needed, proxifies nested newly-added objects, calls default callbacks with the changes occurred.\n * @param {JSONPatcherProxy} instance JSONPatcherProxy instance\n * @param {Object} target the affected object\n * @param {String} key the effect property's name\n * @param {Any} newValue the value being set\n */\n function setTrap(instance, target, key, newValue) {\n const parentPath = findObjectPath(instance, target)\n\n const destinationPropKey = parentPath + '/' + escapePathComponent(key)\n\n if (instance.proxifiedObjectsMap.has(newValue)) {\n const newValueOriginalObject = instance.proxifiedObjectsMap.get(newValue)\n\n instance.parenthoodMap.set(newValueOriginalObject.originalObject, {\n parent: target,\n path: key\n })\n }\n /*\n mark already proxified values as inherited.\n rationale: proxy.arr.shift()\n will emit\n {op: replace, path: '/arr/1', value: arr_2}\n {op: remove, path: '/arr/2'}\n\n by default, the second operation would revoke the proxy, and this renders arr revoked.\n That's why we need to remember the proxies that are inherited.\n */\n const revokableInstance = instance.proxifiedObjectsMap.get(newValue)\n /*\n Why do we need to check instance.isProxifyingTreeNow?\n\n We need to make sure we mark revokables as inherited ONLY when we're observing,\n because throughout the first proxification, a sub-object is proxified and then assigned to\n its parent object. This assignment of a pre-proxified object can fool us into thinking\n that it's a proxified object moved around, while in fact it's the first assignment ever.\n\n Checking isProxifyingTreeNow ensures this is not happening in the first proxification,\n but in fact is is a proxified object moved around the tree\n */\n if (revokableInstance && !instance.isProxifyingTreeNow) {\n revokableInstance.inherited = true\n }\n\n // if the new value is an object, make sure to watch it\n if (\n newValue &&\n typeof newValue == 'object' &&\n !instance.proxifiedObjectsMap.has(newValue)\n ) {\n instance.parenthoodMap.set(newValue, {\n parent: target,\n path: key\n })\n newValue = instance._proxifyObjectTreeRecursively(target, newValue, key)\n }\n // let's start with this operation, and may or may not update it later\n const operation = {\n op: 'remove',\n path: destinationPropKey\n }\n if (typeof newValue == 'undefined') {\n // applying De Morgan's laws would be a tad faster, but less readable\n if (!Array.isArray(target) && !target.hasOwnProperty(key)) {\n // `undefined` is being set to an already undefined value, keep silent\n return Reflect.set(target, key, newValue)\n }\n // when array element is set to `undefined`, should generate replace to `null`\n if (Array.isArray(target)) {\n // undefined array elements are JSON.stringified to `null`\n ;(operation.op = 'replace'), (operation.value = null)\n }\n const oldValue = instance.proxifiedObjectsMap.get(target[key])\n // was the deleted a proxified object?\n if (oldValue) {\n instance.parenthoodMap.delete(target[key])\n instance.disableTrapsForProxy(oldValue)\n instance.proxifiedObjectsMap.delete(oldValue)\n }\n } else {\n if (Array.isArray(target) && !Number.isInteger(+key.toString())) {\n /* array props (as opposed to indices) don't emit any patches, to avoid needless `length` patches */\n if (key != 'length') {\n console.warn(\n 'JSONPatcherProxy noticed a non-integer prop was set for an array. This will not emit a patch'\n )\n }\n return Reflect.set(target, key, newValue)\n }\n operation.op = 'add'\n if (target.hasOwnProperty(key)) {\n if (typeof target[key] !== 'undefined' || Array.isArray(target)) {\n operation.op = 'replace' // setting `undefined` array elements is a `replace` op\n }\n }\n operation.value = newValue\n }\n operation.oldValue = target[key]\n const reflectionResult = Reflect.set(target, key, newValue)\n instance.defaultCallback(operation)\n return reflectionResult\n }\n /**\n * A callback to be used as th proxy delete trap callback.\n * It updates parenthood map if needed, calls default callbacks with the changes occurred.\n * @param {JSONPatcherProxy} instance JSONPatcherProxy instance\n * @param {Object} target the effected object\n * @param {String} key the effected property's name\n */\n function deleteTrap(instance, target, key) {\n if (typeof target[key] !== 'undefined') {\n const parentPath = findObjectPath(instance, target)\n const destinationPropKey = parentPath + '/' + escapePathComponent(key)\n\n const revokableProxyInstance = instance.proxifiedObjectsMap.get(\n target[key]\n )\n\n if (revokableProxyInstance) {\n if (revokableProxyInstance.inherited) {\n /*\n this is an inherited proxy (an already proxified object that was moved around),\n we shouldn't revoke it, because even though it was removed from path1, it is still used in path2.\n And we know that because we mark moved proxies with `inherited` flag when we move them\n\n it is a good idea to remove this flag if we come across it here, in deleteProperty trap.\n We DO want to revoke the proxy if it was removed again.\n */\n revokableProxyInstance.inherited = false\n } else {\n instance.parenthoodMap.delete(revokableProxyInstance.originalObject)\n instance.disableTrapsForProxy(revokableProxyInstance)\n instance.proxifiedObjectsMap.delete(target[key])\n }\n }\n const reflectionResult = Reflect.deleteProperty(target, key)\n\n instance.defaultCallback({\n op: 'remove',\n path: destinationPropKey\n })\n\n return reflectionResult\n }\n }\n /* pre-define resume and pause functions to enhance constructors performance */\n function resume() {\n this.defaultCallback = operation => {\n this.isRecording && this.patches.push(operation)\n this.userCallback && this.userCallback(operation)\n }\n this.isObserving = true\n }\n function pause() {\n this.defaultCallback = () => {}\n this.isObserving = false\n }\n /**\n * Creates an instance of JSONPatcherProxy around your object of interest `root`.\n * @param {Object|Array} root - the object you want to wrap\n * @param {Boolean} [showDetachedWarning = true] - whether to log a warning when a detached sub-object is modified @see {@link https://github.com/Palindrom/JSONPatcherProxy#detached-objects}\n * @returns {JSONPatcherProxy}\n * @constructor\n */\n function JSONPatcherProxy(root, showDetachedWarning) {\n this.isProxifyingTreeNow = false\n this.isObserving = false\n this.proxifiedObjectsMap = new Map()\n this.parenthoodMap = new Map()\n // default to true\n if (typeof showDetachedWarning !== 'boolean') {\n showDetachedWarning = true\n }\n\n this.showDetachedWarning = showDetachedWarning\n this.originalObject = root\n this.cachedProxy = null\n this.isRecording = false\n this.userCallback\n /**\n * @memberof JSONPatcherProxy\n * Restores callback back to the original one provided to `observe`.\n */\n this.resume = resume.bind(this)\n /**\n * @memberof JSONPatcherProxy\n * Replaces your callback with a noop function.\n */\n this.pause = pause.bind(this)\n }\n\n JSONPatcherProxy.prototype.generateProxyAtPath = function(parent, obj, path) {\n if (!obj) {\n return obj\n }\n const traps = {\n set: (target, key, value, receiver) =>\n setTrap(this, target, key, value, receiver),\n deleteProperty: (target, key) => deleteTrap(this, target, key)\n }\n const revocableInstance = Proxy.revocable(obj, traps)\n // cache traps object to disable them later.\n revocableInstance.trapsInstance = traps\n revocableInstance.originalObject = obj\n\n /* keeping track of object's parent and path */\n\n this.parenthoodMap.set(obj, { parent, path })\n\n /* keeping track of all the proxies to be able to revoke them later */\n this.proxifiedObjectsMap.set(revocableInstance.proxy, revocableInstance)\n return revocableInstance.proxy\n }\n // grab tree's leaves one by one, encapsulate them into a proxy and return\n JSONPatcherProxy.prototype._proxifyObjectTreeRecursively = function(\n parent,\n root,\n path\n ) {\n for (let key in root) {\n if (root.hasOwnProperty(key)) {\n if (root[key] instanceof Object) {\n root[key] = this._proxifyObjectTreeRecursively(\n root,\n root[key],\n escapePathComponent(key)\n )\n }\n }\n }\n return this.generateProxyAtPath(parent, root, path)\n }\n // this function is for aesthetic purposes\n JSONPatcherProxy.prototype.proxifyObjectTree = function(root) {\n /*\n while proxyifying object tree,\n the proxyifying operation itself is being\n recorded, which in an unwanted behavior,\n that's why we disable recording through this\n initial process;\n */\n this.pause()\n this.isProxifyingTreeNow = true\n const proxifiedObject = this._proxifyObjectTreeRecursively(\n undefined,\n root,\n ''\n )\n /* OK you can record now */\n this.isProxifyingTreeNow = false\n this.resume()\n return proxifiedObject\n }\n /**\n * Turns a proxified object into a forward-proxy object; doesn't emit any patches anymore, like a normal object\n * @param {Proxy} proxy - The target proxy object\n */\n JSONPatcherProxy.prototype.disableTrapsForProxy = function(\n revokableProxyInstance\n ) {\n if (this.showDetachedWarning) {\n const message =\n \"You're accessing an object that is detached from the observedObject tree, see https://github.com/Palindrom/JSONPatcherProxy#detached-objects\"\n\n revokableProxyInstance.trapsInstance.set = (\n targetObject,\n propKey,\n newValue\n ) => {\n console.warn(message)\n return Reflect.set(targetObject, propKey, newValue)\n }\n revokableProxyInstance.trapsInstance.set = (\n targetObject,\n propKey,\n newValue\n ) => {\n console.warn(message)\n return Reflect.set(targetObject, propKey, newValue)\n }\n revokableProxyInstance.trapsInstance.deleteProperty = (\n targetObject,\n propKey\n ) => {\n return Reflect.deleteProperty(targetObject, propKey)\n }\n } else {\n delete revokableProxyInstance.trapsInstance.set\n delete revokableProxyInstance.trapsInstance.get\n delete revokableProxyInstance.trapsInstance.deleteProperty\n }\n }\n /**\n * Proxifies the object that was passed in the constructor and returns a proxified mirror of it. Even though both parameters are options. You need to pass at least one of them.\n * @param {Boolean} [record] - whether to record object changes to a later-retrievable patches array.\n * @param {Function} [callback] - this will be synchronously called with every object change with a single `patch` as the only parameter.\n */\n JSONPatcherProxy.prototype.observe = function(record, callback) {\n if (!record && !callback) {\n throw new Error('You need to either record changes or pass a callback')\n }\n this.isRecording = record\n this.userCallback = callback\n /*\n I moved it here to remove it from `unobserve`,\n this will also make the constructor faster, why initiate\n the array before they decide to actually observe with recording?\n They might need to use only a callback.\n */\n if (record) this.patches = []\n this.cachedProxy = this.proxifyObjectTree(this.originalObject)\n return this.cachedProxy\n }\n /**\n * If the observed is set to record, it will synchronously return all the patches and empties patches array.\n */\n JSONPatcherProxy.prototype.generate = function() {\n if (!this.isRecording) {\n throw new Error('You should set record to true to get patches later')\n }\n return this.patches.splice(0, this.patches.length)\n }\n /**\n * Revokes all proxies rendering the observed object useless and good for garbage collection @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/revocable}\n */\n JSONPatcherProxy.prototype.revoke = function() {\n this.proxifiedObjectsMap.forEach(el => {\n el.revoke()\n })\n }\n /**\n * Disables all proxies' traps, turning the observed object into a forward-proxy object, like a normal object that you can modify silently.\n */\n JSONPatcherProxy.prototype.disableTraps = function() {\n this.proxifiedObjectsMap.forEach(this.disableTrapsForProxy, this)\n }\n return JSONPatcherProxy\n})()\n\nexport default JSONPatcherProxy\n","import { diff } from './vdom/diff'\nimport JSONProxy from './proxy'\nimport { getUse } from './util'\nimport options from './options'\n\nexport function render(vnode, parent, store) {\n\tparent = typeof parent === 'string' ? document.querySelector(parent) : parent\n\tif (store) {\n\t\tif (store.data) {\n\t\t\tobserveStore(store)\n\t\t} else {\n\t\t\toptions.isMultiStore = true\n\t\t\t//Multi-store injection\n\t\t\tfor (let key in store) {\n\t\t\t\tobserveStore(store[key], key)\n\t\t\t}\n\t\t}\n\t\tparent.store = store\n\t}\n\treturn diff(null, vnode, parent, false)\n}\n\nfunction observeStore(store, key) {\n\tstore.instances = []\n\tstore.updateSelfInstances = []\n\textendStoreUpate(store, key)\n\n\tstore.data = new JSONProxy(store.data).observe(false, function (patch) {\n\t\tconst patchs = {}\n\t\tif (patch.op === 'remove') {\n\t\t\t// fix arr splice\n\t\t\tconst kv = getArrayPatch(patch.path, store)\n\t\t\tpatchs[kv.k] = kv.v\n\n\t\t\tupdate(patchs, store)\n\n\t\t} else {\n\t\t\tconst key = fixPath(patch.path)\n\t\t\tpatchs[key] = patch.value\n\n\t\t\tupdate(patchs, store)\n\n\t\t}\n\t})\n}\n\nfunction update(patch, store) {\n\tstore.update(patch)\n}\n\nfunction extendStoreUpate(store, key) {\n\tstore.update = function (patch) {\n\t\tif (Object.keys(patch).length > 0) {\n\t\t\tthis.instances.forEach(instance => {\n\t\t\t\tif (key) {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updatePath && instance._updatePath[key] && needUpdate(patch, instance._updatePath[key]))) {\n\t\t\t\t\t\tif (instance.use) {\n\t\t\t\t\t\t\tgetUse(store.data, (typeof instance.use === 'function' ? instance.use() : instance.use)[key], instance.using, key)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.update()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updatePath && needUpdate(patch, instance._updatePath))) {\n\t\t\t\t\t\tif (instance.use) {\n\t\t\t\t\t\t\tinstance.using = getUse(store.data, typeof instance.use === 'function' ? instance.use() : instance.use)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.update()\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t})\n\n\t\t\tthis.updateSelfInstances.forEach(instance => {\n\t\t\t\tif (key) {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updateSelfPath && instance._updateSelfPath[key] && needUpdate(patch, instance._updateSelfPath[key]))) {\n\t\t\t\t\t\tif (instance.useSelf) {\n\t\t\t\t\t\t\tgetUse(store.data, (typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)[key], instance.usingSelf, key)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.updateSelf()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (instance._updateSelfPath && needUpdate(patch, instance._updateSelfPath)) {\n\t\t\t\t\t\tinstance.usingSelf = getUse(store.data, typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)\n\t\t\t\t\t\tinstance.updateSelf()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\tthis.onChange && this.onChange(patch)\n\t\t}\n\t}\n}\n\n\nexport function needUpdate(diffResult, updatePath) {\n\tfor (let keyA in diffResult) {\n\t\tif (updatePath[keyA]) {\n\t\t\treturn true\n\t\t}\n\t\tfor (let keyB in updatePath) {\n\t\t\tif (includePath(keyA, keyB)) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t}\n\treturn false\n}\n\nfunction includePath(pathA, pathB) {\n\tif (pathA.indexOf(pathB) === 0) {\n\t\tconst next = pathA.substr(pathB.length, 1)\n\t\tif (next === '[' || next === '.') {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nexport function fixPath(path) {\n\tlet mpPath = ''\n\tconst arr = path.replace('/', '').split('/')\n\tarr.forEach((item, index) => {\n\t\tif (index) {\n\t\t\tif (isNaN(Number(item))) {\n\t\t\t\tmpPath += '.' + item\n\t\t\t} else {\n\t\t\t\tmpPath += '[' + item + ']'\n\t\t\t}\n\t\t} else {\n\t\t\tmpPath += item\n\t\t}\n\t})\n\treturn mpPath\n}\n\nfunction getArrayPatch(path, store) {\n\tconst arr = path.replace('/', '').split('/')\n\tlet current = store.data[arr[0]]\n\tfor (let i = 1, len = arr.length; i < len - 1; i++) {\n\t\tcurrent = current[arr[i]]\n\t}\n\treturn {\n\t\tk: fixArrPath(path),\n\t\tv: current\n\t}\n}\n\nfunction fixArrPath(path) {\n\tlet mpPath = ''\n\tconst arr = path.replace('/', '').split('/')\n\tconst len = arr.length\n\tarr.forEach((item, index) => {\n\t\tif (index < len - 1) {\n\t\t\tif (index) {\n\t\t\t\tif (isNaN(Number(item))) {\n\t\t\t\t\tmpPath += '.' + item\n\t\t\t\t} else {\n\t\t\t\t\tmpPath += '[' + item + ']'\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmpPath += item\n\t\t\t}\n\t\t}\n\t})\n\treturn mpPath\n}\n","import WeElement from './we-element'\nimport options from './options'\n\nexport function define(name, ctor, config) {\n if (options.mapping[name]) {\n return\n }\n if (ctor.is === 'WeElement') {\n customElements.define(name, ctor)\n options.mapping[name] = ctor\n\n } else {\n \n if (typeof config === 'string') {\n config = { css: config }\n } else {\n config = config || { }\n }\n\n class Ele extends WeElement {\n\n static css = config.css\n\n static propTypes = config.propTypes\n\n static defaultProps = config.defaultProps\n\n render() {\n return ctor.call(this, this)\n }\n\n receiveProps() {\n if (config.receiveProps) {\n return config.receiveProps.apply(this, arguments)\n }\n }\n }\n\n const eleHooks = ['install', 'installed', 'uninstall', 'beforeUpdate', 'updated', 'beforeRender', 'rendered'],\n storeHelpers = ['use', 'useSelf']\n\n eleHooks.forEach(hook => {\n if (config[hook]) {\n Ele.prototype[hook] = function () {\n config[hook].apply(this, arguments)\n }\n }\n })\n\n storeHelpers.forEach(func => {\n if (config[func]) {\n Ele.prototype[func] = function () {\n return typeof config[func] === 'function'\n ? config[func].apply(this, arguments)\n : config[func]\n }\n }\n })\n\n customElements.define(name, Ele)\n options.mapping[name] = Ele\n }\n}\n\n\n\n","import { extend } from './util'\nimport { h } from './h'\n\n/**\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\n * @param {VNode} vnode\t\tThe virtual DOM element to clone\n * @param {Object} props\tAttributes/props to add when cloning\n * @param {VNode} rest\t\tAny additional arguments will be used as replacement children.\n */\nexport function cloneElement(vnode, props) {\n return h(\n vnode.nodeName,\n extend(extend({}, vnode.attributes), props),\n arguments.length > 2 ? [].slice.call(arguments, 2) : vnode.children\n )\n}\n","export function getHost(ele) {\n let p = ele.parentNode\n while (p) {\n if (p.host) {\n return p.host\n } else if (p.shadowRoot && p.shadowRoot.host) {\n return p.shadowRoot.host\n } else {\n p = p.parentNode\n }\n }\n}\n","/**\n * classNames based on https://github.com/JedWatson/classnames\n * by Jed Watson\n * Licensed under the MIT License\n * https://github.com/JedWatson/classnames/blob/master/LICENSE\n * modified by dntzhang\n */\n\nvar hasOwn = {}.hasOwnProperty\n\nexport function classNames() {\n var classes = []\n\n for (var i = 0; i < arguments.length; i++) {\n var arg = arguments[i]\n if (!arg) continue\n\n var argType = typeof arg\n\n if (argType === 'string' || argType === 'number') {\n classes.push(arg)\n } else if (Array.isArray(arg) && arg.length) {\n var inner = classNames.apply(null, arg)\n if (inner) {\n classes.push(inner)\n }\n } else if (argType === 'object') {\n for (var key in arg) {\n if (hasOwn.call(arg, key) && arg[key]) {\n classes.push(key)\n }\n }\n }\n }\n\n return classes.join(' ')\n}\n\nexport function extractClass() {\n const [props, ...args] = Array.prototype.slice.call(arguments, 0)\n if (props.class) {\n args.unshift(props.class)\n delete props.class\n } else if (props.className) {\n args.unshift(props.className)\n delete props.className\n }\n if (args.length > 0) {\n return { class: classNames.apply(null, args) }\n }\n}\n","export function o(obj){\n return JSON.stringify(obj)\n}","import { h, h as createElement } from './h'\nimport options from './options'\nimport WeElement from './we-element'\nimport { render } from './render'\nimport { define } from './define'\nimport { tag } from './tag'\nimport { cloneElement } from './clone-element'\nimport { getHost } from './get-host'\nimport { rpx } from './rpx'\nimport { classNames, extractClass } from './class'\nimport { o } from './o'\nimport htm from 'htm'\nimport { extend, get, set, bind, unbind } from './extend'\nimport JSONProxy from './proxy'\nimport { Fragment } from './util'\n\nh.f = Fragment\n\nconst html = htm.bind(h)\n\nfunction createRef() {\n return {}\n}\n\nconst $ = {}\nconst Component = WeElement\nconst defineElement = define\nconst elements = options.mapping\n\nconst omi = {\n tag,\n WeElement,\n Component,\n render,\n h,\n createElement,\n options,\n define,\n cloneElement,\n getHost,\n rpx,\n defineElement,\n classNames,\n extractClass,\n createRef,\n html,\n htm,\n o,\n\telements,\n\t$,\n\textend,\n\tget,\n\tset,\n\tbind,\n\tunbind,\n JSONProxy\n}\n\noptions.root.Omi = omi\noptions.root.omi = omi\noptions.root.Omi.version = '6.15.7'\n\nexport default omi\n\nexport {\n tag,\n WeElement,\n Component,\n render,\n h,\n createElement,\n options,\n define,\n cloneElement,\n getHost,\n rpx,\n defineElement,\n classNames,\n extractClass,\n createRef,\n html,\n htm,\n o,\n\telements,\n\t$,\n\textend,\n\tget,\n\tset,\n\tbind,\n\tunbind,\n JSONProxy\n}\n","function getGlobal() {\n if (\n typeof global !== 'object' ||\n !global ||\n global.Math !== Math ||\n global.Array !== Array\n ) {\n return (\n self ||\n window ||\n global ||\n (function() {\n return this\n })()\n )\n }\n return global\n}\n\n/** Global options\n *\t@public\n *\t@namespace options {Object}\n */\nexport default {\n store: null,\n root: getGlobal(),\n\tmapping: {},\n\tisMultiStore: false\n}\n","import {\n\tcssToDom,\n\tisArray,\n\tgetUse,\n\thyphenate,\n\tgetValByPath,\n\tremoveItem\n} from './util'\nimport { diff } from './vdom/diff'\nimport options from './options'\nimport { getPath } from './util'\n\nlet id = 0\n\nexport default class WeElement extends HTMLElement {\n\tstatic is = 'WeElement'\n\n\tconstructor() {\n\t\tsuper()\n\t\tthis.props = Object.assign({},\n\t\t\tthis.constructor.defaultProps\n\t\t)\n\t\tthis.elementId = id++\n\t}\n\n\tconnectedCallback() {\n\t\tlet p = this.parentNode\n\t\twhile (p && !this.store) {\n\t\t\tthis.store = p.store\n\t\t\tp = p.parentNode || p.host\n\t\t}\n\n\t\tif (this.use) {\n\t\t\tlet use\n\t\t\tif (typeof this.use === 'function') {\n\t\t\t\tuse = this.use()\n\t\t\t} else {\n\t\t\t\tuse = this.use\n\t\t\t}\n\n\n\t\t\tif (options.isMultiStore) {\n\t\t\t\tlet _updatePath = {}\n\t\t\t\tlet using = {}\n\t\t\t\tfor (let storeName in use) {\n\t\t\t\t\t_updatePath[storeName] = {}\n\t\t\t\t\tusing[storeName] = {}\n\t\t\t\t\tgetPath(use[storeName], _updatePath, storeName)\n\t\t\t\t\tgetUse(this.store[storeName].data, use[storeName], using, storeName)\n\t\t\t\t\tthis.store[storeName].instances.push(this)\n\t\t\t\t}\n\t\t\t\tthis.using = using\n\t\t\t\tthis._updatePath = _updatePath\n\t\t\t} else {\n\t\t\t\tthis._updatePath = getPath(use)\n\t\t\t\tthis.using = getUse(this.store.data, use)\n\t\t\t\tthis.store.instances.push(this)\n\t\t\t}\n\t\t}\n\t\tif (this.useSelf) {\n\t\t\tconst use = typeof this.useSelf === 'function' ? this.useSelf() : this.useSelf\n\t\t\tif (options.isMultiStore) {\n\t\t\t\tlet _updatePath = {}\n\t\t\t\tlet using = {}\n\t\t\t\tfor (let storeName in use) {\n\t\t\t\t\tgetPath(use[storeName], _updatePath, storeName)\n\t\t\t\t\tgetUse(this.store[storeName].data, use[storeName], using, storeName)\n\t\t\t\t\tthis.store[storeName].updateSelfInstances.push(this)\n\t\t\t\t}\n\t\t\t\tthis.usingSelf = using\n\t\t\t\tthis._updateSelfPath = _updatePath\n\t\t\t} else {\n\t\t\t\tthis._updateSelfPath = getPath(use)\n\t\t\t\tthis.usingSelf = getUse(this.store.data, use)\n\t\t\t\tthis.store.updateSelfInstances.push(this)\n\t\t\t}\n\t\t}\n\t\tthis.attrsToProps()\n\t\tthis.beforeInstall()\n\t\tthis.install()\n\t\tthis.afterInstall()\n\n\t\tlet shadowRoot\n\t\tif (!this.shadowRoot) {\n\t\t\tshadowRoot = this.attachShadow({\n\t\t\t\tmode: 'open'\n\t\t\t})\n\t\t} else {\n\t\t\tshadowRoot = this.shadowRoot\n\t\t\tlet fc\n\t\t\twhile ((fc = shadowRoot.firstChild)) {\n\t\t\t\tshadowRoot.removeChild(fc)\n\t\t\t}\n\t\t}\n\n\t\tif (this.constructor.css) {\n\t\t\tshadowRoot.appendChild(cssToDom(this.constructor.css))\n\t\t} else if (this.css) {\n\t\t\tshadowRoot.appendChild(cssToDom(typeof this.css === 'function' ? this.css() : this.css))\n\t\t}\n\t\tthis.beforeRender()\n\t\toptions.afterInstall && options.afterInstall(this)\n\n\n\t\tconst rendered = this.render(this.props, this.store)\n\t\tthis.__hasChildren = Object.prototype.toString.call(rendered) === '[object Array]' && rendered.length > 0\n\n\t\tthis.rootNode = diff(\n\t\t\tnull,\n\t\t\trendered,\n\t\t\tnull,\n\t\t\tthis\n\t\t)\n\t\tthis.rendered()\n\n\t\tif (this.props.css) {\n\t\t\tthis._customStyleElement = cssToDom(this.props.css)\n\t\t\tthis._customStyleContent = this.props.css\n\t\t\tshadowRoot.appendChild(this._customStyleElement)\n\t\t}\n\n\t\tif (isArray(this.rootNode)) {\n\t\t\tthis.rootNode.forEach(function (item) {\n\t\t\t\tshadowRoot.appendChild(item)\n\t\t\t})\n\t\t} else {\n\t\t\tshadowRoot.appendChild(this.rootNode)\n\t\t}\n\t\tthis.installed()\n\t\tthis._isInstalled = true\n\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.uninstall()\n\t\tthis._isInstalled = false\n\t\tif (this.store) {\n\t\t\tif(options.isMultiStore){\n\t\t\t\tfor(let key in this.store){\n\t\t\t\t\tconst current = this.store[key]\n\t\t\t\t\tremoveItem(this, current.instances)\n\t\t\t\t removeItem(this, current.updateSelfInstances)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tremoveItem(this, this.store.instances)\n\t\t\t\tremoveItem(this, this.store.updateSelfInstances)\n\t\t\t}\n\t\t}\n\t}\n\n\tupdate(ignoreAttrs, updateSelf) {\n\t\tthis._willUpdate = true\n\t\tthis.beforeUpdate()\n\t\tthis.beforeRender()\n\t\t//fix null !== undefined\n\t\tif (this._customStyleContent != this.props.css) {\n\t\t\tthis._customStyleContent = this.props.css\n\t\t\tthis._customStyleElement.textContent = this._customStyleContent\n\t\t}\n\t\tthis.attrsToProps(ignoreAttrs)\n\n\t\tconst rendered = this.render(this.props, this.store)\n\t\tthis.rendered()\n\t\tthis.__hasChildren = this.__hasChildren || (Object.prototype.toString.call(rendered) === '[object Array]' && rendered.length > 0)\n\n\t\tthis.rootNode = diff(\n\t\t\tthis.rootNode,\n\t\t\trendered,\n\t\t\tthis.shadowRoot,\n\t\t\tthis,\n\t\t\tupdateSelf\n\t\t)\n\t\tthis._willUpdate = false\n\t\tthis.updated()\n\n\t}\n\n\tupdateSelf(ignoreAttrs) {\n\t\tthis.update(ignoreAttrs, true)\n\t}\n\n\tremoveAttribute(key) {\n\t\tsuper.removeAttribute(key)\n\t\t//Avoid executing removeAttribute methods before connectedCallback\n\t\tthis._isInstalled && this.update()\n\t}\n\n\tsetAttribute(key, val) {\n\t\tif (val && typeof val === 'object') {\n\t\t\tsuper.setAttribute(key, JSON.stringify(val))\n\t\t} else {\n\t\t\tsuper.setAttribute(key, val)\n\t\t}\n\t\t//Avoid executing setAttribute methods before connectedCallback\n\t\tthis._isInstalled && this.update()\n\t}\n\n\tpureRemoveAttribute(key) {\n\t\tsuper.removeAttribute(key)\n\t}\n\n\tpureSetAttribute(key, val) {\n\t\tsuper.setAttribute(key, val)\n\t}\n\n\tattrsToProps(ignoreAttrs) {\n\t\tconst ele = this\n\t\tif (ele.normalizedNodeName || ignoreAttrs) return\n\t\tele.props['css'] = ele.getAttribute('css')\n\t\tconst attrs = this.constructor.propTypes\n\t\tif (!attrs) return\n\t\tObject.keys(attrs).forEach(key => {\n\t\t\tconst type = attrs[key]\n\t\t\tconst val = ele.getAttribute(hyphenate(key))\n\t\t\tif (val !== null) {\n\t\t\t\tswitch (type) {\n\t\t\t\t\tcase String:\n\t\t\t\t\t\tele.props[key] = val\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Number:\n\t\t\t\t\t\tele.props[key] = Number(val)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Boolean:\n\t\t\t\t\t\tif (val === 'false' || val === '0') {\n\t\t\t\t\t\t\tele.props[key] = false\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tele.props[key] = true\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Array:\n\t\t\t\t\tcase Object:\n\t\t\t\t\t\tif (val[0] === ':') {\n\t\t\t\t\t\t\tele.props[key] = getValByPath(val.substr(1), Omi.$)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tele.props[key] = JSON.parse(val\n\t\t\t\t\t\t\t\t.replace(/(['\"])?([a-zA-Z0-9_-]+)(['\"])?:([^\\/])/g, '\"$2\":$4')\n\t\t\t\t\t\t\t\t.replace(/'([\\s\\S]*?)'/g, '\"$1\"')\n\t\t\t\t\t\t\t\t.replace(/,(\\s*})/g, '$1')\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (ele.constructor.defaultProps && ele.constructor.defaultProps.hasOwnProperty(key)) {\n\t\t\t\t\tele.props[key] = ele.constructor.defaultProps[key]\n\t\t\t\t} else {\n\t\t\t\t\tele.props[key] = null\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\tfire(name, data) {\n\t\tthis.dispatchEvent(new CustomEvent(name, {\n\t\t\tdetail: data\n\t\t}))\n\t}\n\n\tbeforeInstall() {}\n\n\tinstall() {}\n\n\tafterInstall() {}\n\n\tinstalled() {}\n\n\tuninstall() {}\n\n\tbeforeUpdate() {}\n\n\tupdated() {}\n\n\tbeforeRender() {}\n\n\trendered() {}\n\n\treceiveProps() {}\n\n}\n","var n=function(t,r,u,e){for(var p=1;p\"===t?(a(),u=1):u&&(\"=\"===t?(u=4,r=e,e=\"\"):\"/\"===t?(a(),3===u&&(s=s[0]),u=s,(s=s[0]).push(u,4),u=0):\" \"===t||\"\\t\"===t||\"\\n\"===t||\"\\r\"===t?(a(),u=2):e+=t)}return a(),s},r=\"function\"==typeof Map,u=r?new Map:{},e=r?function(n){var r=u.get(n);return r||u.set(n,r=t(n)),r}:function(n){for(var r=\"\",e=0;e1?r:r[0]}\n"]} \ No newline at end of file diff --git a/packages/omi/dist/omi.min.js b/packages/omi/dist/omi.min.js index ef226ad535..e4b902ef92 100644 --- a/packages/omi/dist/omi.min.js +++ b/packages/omi/dist/omi.min.js @@ -1,2 +1,2 @@ -!function(){"use strict";function e(){}function t(t,n){var r,o,i,s,a=[];for(s=arguments.length;s-- >2;)ae.push(arguments[s]);n&&null!=n.children&&(ae.length||ae.push(n.children),delete n.children);while(ae.length)if((o=ae.pop())&&void 0!==o.pop)for(s=o.length;s--;)ae.push(o[s]);else"boolean"==typeof o&&(o=null),(i="function"!=typeof t)&&(null==o?o="":"number"==typeof o?o+="":"string"!=typeof o&&(i=!1)),i&&r?a[a.length-1]+=o:0===a.length?a=[o]:a.push(o),r=i;var l=new e;return l.nodeName=t,l.children=a,l.attributes=null==n?void 0:n,l.key=null==n?void 0:n.key,void 0!==se.vnode&&se.vnode(l),l}function n(e){var t=document.createElement("style");return t.textContent=e,t}function r(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})}function o(e){return e.children}function i(e,t){for(var n in t)e[n]=t[n];return e}function s(e,t){null!=e&&("function"==typeof e?e(t):e.current=t)}function a(e){return"[object Array]"===Object.prototype.toString.call(e)}function l(e,t,n,r){var o=[];return t.forEach(function(t,n){if("string"==typeof t)o[n]=u(e,t);else{var r=Object.keys(t)[0],i=t[r];if("string"==typeof i)o[n]=u(e,i);else{var s=i[0];if("string"==typeof s){var a=u(e,s);o[n]=i[1]?i[1](a):a}else{var l=[];s.forEach(function(t){l.push(u(e,t))}),o[n]=i[1].apply(null,l)}}o[r]=o[n]}}),n&&(n[r]=o),o}function p(e){return"string"==typeof e&&e?e.replace(/]/g,"").replace(/\[/g,".").split("."):[]}function u(e,t){for(var n=p(t),r=e,o=0,i=n.length;o=0;p--)n.firstChild?n.insertBefore(l[p],n.firstChild):n.appendChild(style[p])}else s=[],t.forEach(function(t,n){var o=M(0===n?e:null,t,r,i);s.push(o)});else a(e)?e.forEach(function(e,n){0===n?s=M(e,t,r,i):T(e,!1)}):s=M(e,t,r,i),n&&s.parentNode!==n&&n.appendChild(s);return--ce||(he=!1),s}function M(e,t,n,r){e&&t&&e.props&&(e.props.children=t.children);var o=e,i=fe;if(null!=t&&"boolean"!=typeof t||(t=""),"string"==typeof t||"number"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||n)?e.nodeValue!=t&&(e.nodeValue=t):(o=document.createTextNode(t),e&&(e.parentNode&&e.parentNode.replaceChild(o,e),T(e,!0))),o.__p=!0,o;var s=t.nodeName;if("function"==typeof s)for(var a in se.mapping)if(se.mapping[a]===s){s=a,t.nodeName=a;break}if(fe="svg"===s||"foreignObject"!==s&&fe,s+="",(!e||!v(e,s))&&(o=P(s,fe),e)){while(e.firstChild)o.appendChild(e.firstChild);e.parentNode&&e.parentNode.replaceChild(o,e),T(e,!0)}var l=o.firstChild,p=o.__p,u=t.children;if(null==p){p=o.__p={};for(var c=o.attributes,f=c.length;f--;)p[c[f].name]=c[f].value}return!he&&u&&1===u.length&&"string"==typeof u[0]&&null!=l&&void 0!==l.splitText&&null==l.nextSibling?l.nodeValue!=u[0]&&(l.nodeValue=u[0]):(u&&u.length||null!=l)&&("WeElement"==o.constructor.is&&o.constructor.noSlot||A(o,u,he||null!=p.dangerouslySetInnerHTML,n,r)),k(o,t.attributes,p,n,r),o.props&&(o.props.children=t.children),fe=i,o}function A(e,t,n,r,o){var i,s,a,l,p,u=e.childNodes,c=[],f={},h=0,d=0,v=u.length,b=0,g=t?t.length:0;if(0!==v)for(var m=0;m0&&(this.instances.forEach(function(r){t?r.M&&r.M[t]&&F(n,r.M[t])&&(r.use&&l(e.data,("function"==typeof r.use?r.use():r.use)[t],r.using,t),r.update()):r.M&&F(n,r.M)&&(r.use&&(r.using=l(e.data,"function"==typeof r.use?r.use():r.use)),r.update())}),this.updateSelfInstances.forEach(function(r){t?r.R&&r.R[t]&&F(n,r.R[t])&&(r.useSelf&&l(e.data,("function"==typeof r.useSelf?r.useSelf():r.useSelf)[t],r.usingSelf,t),r.updateSelf()):r.R&&F(n,r.R)&&(r.usingSelf=l(e.data,"function"==typeof r.useSelf?r.useSelf():r.useSelf),r.updateSelf())}),this.onChange&&this.onChange(n))}}function F(e,t){for(var n in e){if(t[n])return!0;for(var r in t)if(V(n,r))return!0}return!1}function V(e,t){if(0===e.indexOf(t)){var n=e.substr(t.length,1);if("["===n||"."===n)return!0}return!1}function z(e){var t="";return e.replace("/","").split("/").forEach(function(e,n){n?isNaN(+e)?t+="."+e:t+="["+e+"]":t+=e}),t}function U(e,t){for(var n=e.replace("/","").split("/"),r=t.data[n[0]],o=1,i=n.length;o2?[].slice.call(arguments,2):e.children)}function Q(e){var t=e.parentNode;while(t){if(t.host)return t.host;if(t.shadowRoot&&t.shadowRoot.host)return t.shadowRoot.host;t=t.parentNode}}function ee(e){return e.replace(/([1-9]\d*|0)(\.\d*)*rpx/g,function(e,t){return window.innerWidth*+t/750+"px"})}function te(){for(var e=[],t=0;t0)return{class:te.apply(null,n)}}function re(e){return JSON.stringify(e)}function oe(e){var t=ge(this,Ne(e),arguments,[]);return t.length>1?t:t[0]}function ie(){return{}}var se={store:null,root:function(){return"object"==typeof global&&global&&global.Math===Math&&global.Array===Array?global:self||window||global||function(){return this}()}(),mapping:{},isMultiStore:!1},ae=[];!function(){if(void 0!==window.Reflect&&void 0!==window.customElements&&!window.customElements.hasOwnProperty("polyfillWrapFlushCallback")){var e=HTMLElement;window.HTMLElement=function(){return Reflect.construct(e,[],this.constructor)},HTMLElement.prototype=e.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,e)}}(),"function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout;var le=/\B([A-Z])/g,pe=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,ue={},ce=0,fe=!1,he=!1,de=0,ye=function(e){function t(){L(this,t);var n=I(this,e.call(this));return n.props=Object.assign({},n.constructor.defaultProps),n.elementId=de++,n}return H(t,e),t.prototype.connectedCallback=function(){var e=this.parentNode;while(e&&!this.store)this.store=e.store,e=e.parentNode||e.host;if(this.use){var t;if(t="function"==typeof this.use?this.use():this.use,se.isMultiStore){var r={},o={};for(var i in t)r[i]={},o[i]={},h(t[i],r,i),l(this.store[i].data,t[i],o,i),this.store[i].instances.push(this);this.using=o,this.M=r}else this.M=h(t),this.using=l(this.store.data,t),this.store.instances.push(this)}if(this.useSelf){var s="function"==typeof this.useSelf?this.useSelf():this.useSelf;if(se.isMultiStore){var p={},u={};for(var c in s)h(s[c],p,c),l(this.store[c].data,s[c],u,c),this.store[c].updateSelfInstances.push(this);this.usingSelf=u,this.R=p}else this.R=h(s),this.usingSelf=l(this.store.data,s),this.store.updateSelfInstances.push(this)}this.attrsToProps(),this.beforeInstall(),this.install(),this.afterInstall();var f;if(this.shadowRoot){f=this.shadowRoot;var d;while(d=f.firstChild)f.removeChild(d)}else f=this.attachShadow({mode:"open"});this.constructor.css?f.appendChild(n(this.constructor.css)):this.css&&f.appendChild(n("function"==typeof this.css?this.css():this.css)),this.beforeRender(),se.afterInstall&&se.afterInstall(this);var y=this.render(this.props,this.store);this.P="[object Array]"===Object.prototype.toString.call(y)&&y.length>0,this.rootNode=_(null,y,null,this),this.rendered(),this.props.css&&(this.N=n(this.props.css),this.O=this.props.css,f.appendChild(this.N)),a(this.rootNode)?this.rootNode.forEach(function(e){f.appendChild(e)}):f.appendChild(this.rootNode),this.installed(),this.B=!0},t.prototype.disconnectedCallback=function(){if(this.uninstall(),this.B=!1,this.store)if(se.isMultiStore)for(var e in this.store){var t=this.store[e];d(this,t.instances),d(this,t.updateSelfInstances)}else d(this,this.store.instances),d(this,this.store.updateSelfInstances)},t.prototype.update=function(e,t){this.J=!0,this.beforeUpdate(),this.beforeRender(),this.O!=this.props.css&&(this.O=this.props.css,this.N.textContent=this.O),this.attrsToProps(e);var n=this.render(this.props,this.store);this.rendered(),this.P=this.P||"[object Array]"===Object.prototype.toString.call(n)&&n.length>0,this.rootNode=_(this.rootNode,n,this.shadowRoot,this,t),this.J=!1,this.updated()},t.prototype.updateSelf=function(e){this.update(e,!0)},t.prototype.removeAttribute=function(t){e.prototype.removeAttribute.call(this,t),this.B&&this.update()},t.prototype.setAttribute=function(t,n){n&&"object"==typeof n?e.prototype.setAttribute.call(this,t,JSON.stringify(n)):e.prototype.setAttribute.call(this,t,n),this.B&&this.update()},t.prototype.pureRemoveAttribute=function(t){e.prototype.removeAttribute.call(this,t)},t.prototype.pureSetAttribute=function(t,n){e.prototype.setAttribute.call(this,t,n)},t.prototype.attrsToProps=function(e){var t=this;if(!t.normalizedNodeName&&!e){t.props.css=t.getAttribute("css");var n=this.constructor.propTypes;n&&Object.keys(n).forEach(function(e){var r=n[e],o=t.getAttribute(c(e));if(null!==o)switch(r){case String:t.props[e]=o;break;case Number:t.props[e]=+o;break;case Boolean:t.props[e]="false"!==o&&"0"!==o;break;case Array:case Object:t.props[e]=":"===o[0]?f(o.substr(1),Omi.$):JSON.parse(o.replace(/(['"])?([a-zA-Z0-9_-]+)(['"])?:([^\/])/g,'"$2":$4').replace(/'([\s\S]*?)'/g,'"$1"').replace(/,(\s*})/g,"$1"))}else t.props[e]=t.constructor.defaultProps&&t.constructor.defaultProps.hasOwnProperty(e)?t.constructor.defaultProps[e]:null})}},t.prototype.fire=function(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t}))},t.prototype.beforeInstall=function(){},t.prototype.install=function(){},t.prototype.afterInstall=function(){},t.prototype.installed=function(){},t.prototype.uninstall=function(){},t.prototype.beforeUpdate=function(){},t.prototype.updated=function(){},t.prototype.beforeRender=function(){},t.prototype.rendered=function(){},t.prototype.receiveProps=function(){},t}(HTMLElement);ye.is="WeElement";var ve=function(){function e(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}}function t(e){return-1==e.indexOf("/")&&-1==e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function n(e,t){var n=[],r=e.parenthoodMap.get(t);while(r&&r.path)n.unshift(r.path),r=e.parenthoodMap.get(r.parent);if(n.length){return"/"+n.join("/")}return""}function r(e,r,o,i){var s=n(e,r),a=s+"/"+t(o);if(e.proxifiedObjectsMap.has(i)){e.parenthoodMap.set(e.proxifiedObjectsMap.get(i).originalObject,{parent:r,path:o})}var l=e.proxifiedObjectsMap.get(i);l&&!e.isProxifyingTreeNow&&(l.inherited=!0),i&&"object"==typeof i&&!e.proxifiedObjectsMap.has(i)&&(e.parenthoodMap.set(i,{parent:r,path:o}),i=e.A(r,i,o));var p={op:"remove",path:a};if(void 0===i){if(!Array.isArray(r)&&!r.hasOwnProperty(o))return Reflect.set(r,o,i);Array.isArray(r)&&(p.op="replace",p.value=null);var u=e.proxifiedObjectsMap.get(r[o]);u&&(e.parenthoodMap.delete(r[o]),e.disableTrapsForProxy(u),e.proxifiedObjectsMap.delete(u))}else{if(Array.isArray(r)&&!Number.isInteger(+(""+o)))return"length"!=o&&console.warn("JSONPatcherProxy noticed a non-integer prop was set for an array. This will not emit a patch"),Reflect.set(r,o,i);p.op="add",r.hasOwnProperty(o)&&(void 0!==r[o]||Array.isArray(r))&&(p.op="replace"),p.value=i}p.oldValue=r[o];var c=Reflect.set(r,o,i);return e.defaultCallback(p),c}function o(e,r,o){if(void 0!==r[o]){var i=n(e,r),s=i+"/"+t(o),a=e.proxifiedObjectsMap.get(r[o]);a&&(a.inherited?a.inherited=!1:(e.parenthoodMap.delete(a.originalObject),e.disableTrapsForProxy(a),e.proxifiedObjectsMap.delete(r[o])));var l=Reflect.deleteProperty(r,o);return e.defaultCallback({op:"remove",path:s}),l}}function i(){var e=this;this.defaultCallback=function(t){e.isRecording&&e.patches.push(t),e.userCallback&&e.userCallback(t)},this.isObserving=!0}function s(){this.defaultCallback=function(){},this.isObserving=!1}function a(e,t){this.isProxifyingTreeNow=!1,this.isObserving=!1,this.proxifiedObjectsMap=new Map,this.parenthoodMap=new Map,"boolean"!=typeof t&&(t=!0),this.showDetachedWarning=t,this.originalObject=e,this.cachedProxy=null,this.isRecording=!1,this.resume=i.bind(this),this.pause=s.bind(this)}return a.deepClone=e,a.escapePathComponent=t,a.prototype.generateProxyAtPath=function(e,t,n){var i=this;if(!t)return t;var s={set:function(e,t,n){return r(i,e,t,n)},deleteProperty:function(e,t){return o(i,e,t)}},a=Proxy.revocable(t,s);return a.trapsInstance=s,a.originalObject=t,this.parenthoodMap.set(t,{parent:e,path:n}),this.proxifiedObjectsMap.set(a.proxy,a),a.proxy},a.prototype.A=function(e,n,r){for(var o in n)n.hasOwnProperty(o)&&n[o]instanceof Object&&(n[o]=this.A(n,n[o],t(o)));return this.generateProxyAtPath(e,n,r)},a.prototype.proxifyObjectTree=function(e){this.pause(),this.isProxifyingTreeNow=!0;var t=this.A(void 0,e,"");return this.isProxifyingTreeNow=!1,this.resume(),t},a.prototype.disableTrapsForProxy=function(e){if(this.showDetachedWarning){var t="You're accessing an object that is detached from the observedObject tree, see https://github.com/Palindrom/JSONPatcherProxy#detached-objects";e.trapsInstance.set=function(e,n,r){return console.warn(t),Reflect.set(e,n,r)},e.trapsInstance.set=function(e,n,r){return console.warn(t),Reflect.set(e,n,r)},e.trapsInstance.deleteProperty=function(e,t){return Reflect.deleteProperty(e,t)}}else delete e.trapsInstance.set,delete e.trapsInstance.get,delete e.trapsInstance.deleteProperty},a.prototype.observe=function(e,t){if(!e&&!t)throw Error("You need to either record changes or pass a callback");return this.isRecording=e,this.userCallback=t,e&&(this.patches=[]),this.cachedProxy=this.proxifyObjectTree(this.originalObject)},a.prototype.generate=function(){if(!this.isRecording)throw Error("You should set record to true to get patches later");return this.patches.splice(0,this.patches.length)},a.prototype.revoke=function(){this.proxifiedObjectsMap.forEach(function(e){e.revoke()})},a.prototype.disableTraps=function(){this.proxifiedObjectsMap.forEach(this.disableTrapsForProxy,this)},a}(),be={}.hasOwnProperty,ge=function(e,t,n,r){for(var o=1;o"===t?(a(),r=1):r&&("="===t?(r=4,n=o,o=""):"/"===t?(a(),3===r&&(s=s[0]),r=s,(s=s[0]).push(r,4),r=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(a(),r=2):o+=t)}return a(),s},we="function"==typeof Map,Oe=we?new Map:{},Ne=we?function(e){var t=Oe.get(e);return t||Oe.set(e,t=me(e)),t}:function(e){for(var t="",n=0;n2;)ae.push(arguments[s]);n&&null!=n.children&&(ae.length||ae.push(n.children),delete n.children);while(ae.length)if((o=ae.pop())&&void 0!==o.pop)for(s=o.length;s--;)ae.push(o[s]);else"boolean"==typeof o&&(o=null),(i="function"!=typeof t)&&(null==o?o="":"number"==typeof o?o+="":"string"!=typeof o&&(i=!1)),i&&r?a[a.length-1]+=o:0===a.length?a=[o]:a.push(o),r=i;var l=new e;return l.nodeName=t,l.children=a,l.attributes=null==n?void 0:n,l.key=null==n?void 0:n.key,void 0!==se.vnode&&se.vnode(l),l}function n(e){var t=document.createElement("style");return t.textContent=e,t}function r(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})}function o(e){return e.children}function i(e,t){for(var n in t)e[n]=t[n];return e}function s(e,t){null!=e&&("function"==typeof e?e(t):e.current=t)}function a(e){return"[object Array]"===Object.prototype.toString.call(e)}function l(e,t,n,r){var o=[];return t.forEach(function(t,n){if("string"==typeof t)o[n]=u(e,t);else{var r=Object.keys(t)[0],i=t[r];if("string"==typeof i)o[n]=u(e,i);else{var s=i[0];if("string"==typeof s){var a=u(e,s);o[n]=i[1]?i[1](a):a}else{var l=[];s.forEach(function(t){l.push(u(e,t))}),o[n]=i[1].apply(null,l)}}o[r]=o[n]}}),n&&(n[r]=o),o}function p(e){return"string"==typeof e&&e?e.replace(/]/g,"").replace(/\[/g,".").split("."):[]}function u(e,t){for(var n=p(t),r=e,o=0,i=n.length;o=0;p--)n.firstChild?n.insertBefore(l[p],n.firstChild):n.appendChild(style[p])}else s=[],t.forEach(function(t,n){var o=M(0===n?e:null,t,r,i);s.push(o)});else a(e)?e.forEach(function(e,n){0===n?s=M(e,t,r,i):T(e,!1)}):s=M(e,t,r,i),n&&s.parentNode!==n&&n.appendChild(s);return--ce||(he=!1),s}function M(e,t,n,r){e&&t&&e.props&&(e.props.children=t.children);var o=e,i=fe;if(null!=t&&"boolean"!=typeof t||(t=""),"string"==typeof t||"number"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||n)?e.nodeValue!=t&&(e.nodeValue=t):(o=document.createTextNode(t),e&&(e.parentNode&&e.parentNode.replaceChild(o,e),T(e,!0))),o.__p=!0,o;var s=t.nodeName;if("function"==typeof s)for(var a in se.mapping)if(se.mapping[a]===s){s=a,t.nodeName=a;break}if(fe="svg"===s||"foreignObject"!==s&&fe,s+="",(!e||!v(e,s))&&(o=P(s,fe),e)){while(e.firstChild)o.appendChild(e.firstChild);e.parentNode&&e.parentNode.replaceChild(o,e),T(e,!0)}var l=o.firstChild,p=o.__p,u=t.children;if(null==p){p=o.__p={};for(var c=o.attributes,f=c.length;f--;)p[c[f].name]=c[f].value}return!he&&u&&1===u.length&&"string"==typeof u[0]&&null!=l&&void 0!==l.splitText&&null==l.nextSibling?l.nodeValue!=u[0]&&(l.nodeValue=u[0]):(u&&u.length||null!=l)&&("WeElement"==o.constructor.is&&o.constructor.noSlot||A(o,u,he||null!=p.dangerouslySetInnerHTML,n,r)),k(o,t.attributes,p,n,r),o.props&&(o.props.children=t.children),fe=i,o}function A(e,t,n,r,o){var i,s,a,l,p,u=e.childNodes,c=[],f={},h=0,d=0,v=u.length,b=0,g=t?t.length:0;if(0!==v)for(var m=0;m0&&(this.instances.forEach(function(r){t?r.M&&r.M[t]&&F(n,r.M[t])&&(r.use&&l(e.data,("function"==typeof r.use?r.use():r.use)[t],r.using,t),r.update()):r.M&&F(n,r.M)&&(r.use&&(r.using=l(e.data,"function"==typeof r.use?r.use():r.use)),r.update())}),this.updateSelfInstances.forEach(function(r){t?r.R&&r.R[t]&&F(n,r.R[t])&&(r.useSelf&&l(e.data,("function"==typeof r.useSelf?r.useSelf():r.useSelf)[t],r.usingSelf,t),r.updateSelf()):r.R&&F(n,r.R)&&(r.usingSelf=l(e.data,"function"==typeof r.useSelf?r.useSelf():r.useSelf),r.updateSelf())}),this.onChange&&this.onChange(n))}}function F(e,t){for(var n in e){if(t[n])return!0;for(var r in t)if(V(n,r))return!0}return!1}function V(e,t){if(0===e.indexOf(t)){var n=e.substr(t.length,1);if("["===n||"."===n)return!0}return!1}function z(e){var t="";return e.replace("/","").split("/").forEach(function(e,n){n?isNaN(+e)?t+="."+e:t+="["+e+"]":t+=e}),t}function U(e,t){for(var n=e.replace("/","").split("/"),r=t.data[n[0]],o=1,i=n.length;o2?[].slice.call(arguments,2):e.children)}function Q(e){var t=e.parentNode;while(t){if(t.host)return t.host;if(t.shadowRoot&&t.shadowRoot.host)return t.shadowRoot.host;t=t.parentNode}}function ee(e){return e.replace(/([1-9]\d*|0)(\.\d*)*rpx/g,function(e,t){return window.innerWidth*+t/750+"px"})}function te(){for(var e=[],t=0;t0)return{class:te.apply(null,n)}}function re(e){return JSON.stringify(e)}function oe(e){var t=ge(this,Ne(e),arguments,[]);return t.length>1?t:t[0]}function ie(){return{}}var se={store:null,root:function(){return"object"==typeof global&&global&&global.Math===Math&&global.Array===Array?global:self||window||global||function(){return this}()}(),mapping:{},isMultiStore:!1},ae=[];!function(){if(void 0!==window.Reflect&&void 0!==window.customElements&&!window.customElements.hasOwnProperty("polyfillWrapFlushCallback")){var e=HTMLElement;window.HTMLElement=function(){return Reflect.construct(e,[],this.constructor)},HTMLElement.prototype=e.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,e)}}(),"function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout;var le=/\B([A-Z])/g,pe=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,ue={},ce=0,fe=!1,he=!1,de=0,ye=function(e){function t(){L(this,t);var n=I(this,e.call(this));return n.props=Object.assign({},n.constructor.defaultProps),n.elementId=de++,n}return H(t,e),t.prototype.connectedCallback=function(){var e=this.parentNode;while(e&&!this.store)this.store=e.store,e=e.parentNode||e.host;if(this.use){var t;if(t="function"==typeof this.use?this.use():this.use,se.isMultiStore){var r={},o={};for(var i in t)r[i]={},o[i]={},h(t[i],r,i),l(this.store[i].data,t[i],o,i),this.store[i].instances.push(this);this.using=o,this.M=r}else this.M=h(t),this.using=l(this.store.data,t),this.store.instances.push(this)}if(this.useSelf){var s="function"==typeof this.useSelf?this.useSelf():this.useSelf;if(se.isMultiStore){var p={},u={};for(var c in s)h(s[c],p,c),l(this.store[c].data,s[c],u,c),this.store[c].updateSelfInstances.push(this);this.usingSelf=u,this.R=p}else this.R=h(s),this.usingSelf=l(this.store.data,s),this.store.updateSelfInstances.push(this)}this.attrsToProps(),this.beforeInstall(),this.install(),this.afterInstall();var f;if(this.shadowRoot){f=this.shadowRoot;var d;while(d=f.firstChild)f.removeChild(d)}else f=this.attachShadow({mode:"open"});this.constructor.css?f.appendChild(n(this.constructor.css)):this.css&&f.appendChild(n("function"==typeof this.css?this.css():this.css)),this.beforeRender(),se.afterInstall&&se.afterInstall(this);var y=this.render(this.props,this.store);this.P="[object Array]"===Object.prototype.toString.call(y)&&y.length>0,this.rootNode=_(null,y,null,this),this.rendered(),this.props.css&&(this.N=n(this.props.css),this.O=this.props.css,f.appendChild(this.N)),a(this.rootNode)?this.rootNode.forEach(function(e){f.appendChild(e)}):f.appendChild(this.rootNode),this.installed(),this.B=!0},t.prototype.disconnectedCallback=function(){if(this.uninstall(),this.B=!1,this.store)if(se.isMultiStore)for(var e in this.store){var t=this.store[e];d(this,t.instances),d(this,t.updateSelfInstances)}else d(this,this.store.instances),d(this,this.store.updateSelfInstances)},t.prototype.update=function(e,t){this.J=!0,this.beforeUpdate(),this.beforeRender(),this.O!=this.props.css&&(this.O=this.props.css,this.N.textContent=this.O),this.attrsToProps(e);var n=this.render(this.props,this.store);this.rendered(),this.P=this.P||"[object Array]"===Object.prototype.toString.call(n)&&n.length>0,this.rootNode=_(this.rootNode,n,this.shadowRoot,this,t),this.J=!1,this.updated()},t.prototype.updateSelf=function(e){this.update(e,!0)},t.prototype.removeAttribute=function(t){e.prototype.removeAttribute.call(this,t),this.B&&this.update()},t.prototype.setAttribute=function(t,n){n&&"object"==typeof n?e.prototype.setAttribute.call(this,t,JSON.stringify(n)):e.prototype.setAttribute.call(this,t,n),this.B&&this.update()},t.prototype.pureRemoveAttribute=function(t){e.prototype.removeAttribute.call(this,t)},t.prototype.pureSetAttribute=function(t,n){e.prototype.setAttribute.call(this,t,n)},t.prototype.attrsToProps=function(e){var t=this;if(!t.normalizedNodeName&&!e){t.props.css=t.getAttribute("css");var n=this.constructor.propTypes;n&&Object.keys(n).forEach(function(e){var r=n[e],o=t.getAttribute(c(e));if(null!==o)switch(r){case String:t.props[e]=o;break;case Number:t.props[e]=+o;break;case Boolean:t.props[e]="false"!==o&&"0"!==o;break;case Array:case Object:t.props[e]=":"===o[0]?f(o.substr(1),Omi.$):JSON.parse(o.replace(/(['"])?([a-zA-Z0-9_-]+)(['"])?:([^\/])/g,'"$2":$4').replace(/'([\s\S]*?)'/g,'"$1"').replace(/,(\s*})/g,"$1"))}else t.props[e]=t.constructor.defaultProps&&t.constructor.defaultProps.hasOwnProperty(e)?t.constructor.defaultProps[e]:null})}},t.prototype.fire=function(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t}))},t.prototype.beforeInstall=function(){},t.prototype.install=function(){},t.prototype.afterInstall=function(){},t.prototype.installed=function(){},t.prototype.uninstall=function(){},t.prototype.beforeUpdate=function(){},t.prototype.updated=function(){},t.prototype.beforeRender=function(){},t.prototype.rendered=function(){},t.prototype.receiveProps=function(){},t}(HTMLElement);ye.is="WeElement";var ve=function(){function e(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}}function t(e){return-1==e.indexOf("/")&&-1==e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function n(e,t){var n=[],r=e.parenthoodMap.get(t);while(r&&r.path)n.unshift(r.path),r=e.parenthoodMap.get(r.parent);if(n.length){return"/"+n.join("/")}return""}function r(e,r,o,i){var s=n(e,r),a=s+"/"+t(o);if(e.proxifiedObjectsMap.has(i)){e.parenthoodMap.set(e.proxifiedObjectsMap.get(i).originalObject,{parent:r,path:o})}var l=e.proxifiedObjectsMap.get(i);l&&!e.isProxifyingTreeNow&&(l.inherited=!0),i&&"object"==typeof i&&!e.proxifiedObjectsMap.has(i)&&(e.parenthoodMap.set(i,{parent:r,path:o}),i=e.A(r,i,o));var p={op:"remove",path:a};if(void 0===i){if(!Array.isArray(r)&&!r.hasOwnProperty(o))return Reflect.set(r,o,i);Array.isArray(r)&&(p.op="replace",p.value=null);var u=e.proxifiedObjectsMap.get(r[o]);u&&(e.parenthoodMap.delete(r[o]),e.disableTrapsForProxy(u),e.proxifiedObjectsMap.delete(u))}else{if(Array.isArray(r)&&!Number.isInteger(+(""+o)))return"length"!=o&&console.warn("JSONPatcherProxy noticed a non-integer prop was set for an array. This will not emit a patch"),Reflect.set(r,o,i);p.op="add",r.hasOwnProperty(o)&&(void 0!==r[o]||Array.isArray(r))&&(p.op="replace"),p.value=i}p.oldValue=r[o];var c=Reflect.set(r,o,i);return e.defaultCallback(p),c}function o(e,r,o){if(void 0!==r[o]){var i=n(e,r),s=i+"/"+t(o),a=e.proxifiedObjectsMap.get(r[o]);a&&(a.inherited?a.inherited=!1:(e.parenthoodMap.delete(a.originalObject),e.disableTrapsForProxy(a),e.proxifiedObjectsMap.delete(r[o])));var l=Reflect.deleteProperty(r,o);return e.defaultCallback({op:"remove",path:s}),l}}function i(){var e=this;this.defaultCallback=function(t){e.isRecording&&e.patches.push(t),e.userCallback&&e.userCallback(t)},this.isObserving=!0}function s(){this.defaultCallback=function(){},this.isObserving=!1}function a(e,t){this.isProxifyingTreeNow=!1,this.isObserving=!1,this.proxifiedObjectsMap=new Map,this.parenthoodMap=new Map,"boolean"!=typeof t&&(t=!0),this.showDetachedWarning=t,this.originalObject=e,this.cachedProxy=null,this.isRecording=!1,this.resume=i.bind(this),this.pause=s.bind(this)}return a.deepClone=e,a.escapePathComponent=t,a.prototype.generateProxyAtPath=function(e,t,n){var i=this;if(!t)return t;var s={set:function(e,t,n){return r(i,e,t,n)},deleteProperty:function(e,t){return o(i,e,t)}},a=Proxy.revocable(t,s);return a.trapsInstance=s,a.originalObject=t,this.parenthoodMap.set(t,{parent:e,path:n}),this.proxifiedObjectsMap.set(a.proxy,a),a.proxy},a.prototype.A=function(e,n,r){for(var o in n)n.hasOwnProperty(o)&&n[o]instanceof Object&&(n[o]=this.A(n,n[o],t(o)));return this.generateProxyAtPath(e,n,r)},a.prototype.proxifyObjectTree=function(e){this.pause(),this.isProxifyingTreeNow=!0;var t=this.A(void 0,e,"");return this.isProxifyingTreeNow=!1,this.resume(),t},a.prototype.disableTrapsForProxy=function(e){if(this.showDetachedWarning){var t="You're accessing an object that is detached from the observedObject tree, see https://github.com/Palindrom/JSONPatcherProxy#detached-objects";e.trapsInstance.set=function(e,n,r){return console.warn(t),Reflect.set(e,n,r)},e.trapsInstance.set=function(e,n,r){return console.warn(t),Reflect.set(e,n,r)},e.trapsInstance.deleteProperty=function(e,t){return Reflect.deleteProperty(e,t)}}else delete e.trapsInstance.set,delete e.trapsInstance.get,delete e.trapsInstance.deleteProperty},a.prototype.observe=function(e,t){if(!e&&!t)throw Error("You need to either record changes or pass a callback");return this.isRecording=e,this.userCallback=t,e&&(this.patches=[]),this.cachedProxy=this.proxifyObjectTree(this.originalObject)},a.prototype.generate=function(){if(!this.isRecording)throw Error("You should set record to true to get patches later");return this.patches.splice(0,this.patches.length)},a.prototype.revoke=function(){this.proxifiedObjectsMap.forEach(function(e){e.revoke()})},a.prototype.disableTraps=function(){this.proxifiedObjectsMap.forEach(this.disableTrapsForProxy,this)},a}(),be={}.hasOwnProperty,ge=function(e,t,n,r){for(var o=1;o"===t?(a(),r=1):r&&("="===t?(r=4,n=o,o=""):"/"===t?(a(),3===r&&(s=s[0]),r=s,(s=s[0]).push(r,4),r=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(a(),r=2):o+=t)}return a(),s},we="function"==typeof Map,Oe=we?new Map:{},Ne=we?function(e){var t=Oe.get(e);return t||Oe.set(e,t=me(e)),t}:function(e){for(var t="",n=0;n 2; ) {\n stack.push(arguments[i])\n }\n if (attributes && attributes.children != null) {\n if (!stack.length) stack.push(attributes.children)\n delete attributes.children\n }\n while (stack.length) {\n if ((child = stack.pop()) && child.pop !== undefined) {\n for (i = child.length; i--; ) stack.push(child[i])\n } else {\n if (typeof child === 'boolean') child = null\n\n if ((simple = typeof nodeName !== 'function')) {\n if (child == null) child = ''\n else if (typeof child === 'number') child = String(child)\n else if (typeof child !== 'string') simple = false\n }\n\n if (simple && lastSimple) {\n children[children.length - 1] += child\n } else if (children.length === 0) {\n children = [child]\n } else {\n children.push(child)\n }\n\n lastSimple = simple\n }\n }\n\n let p = new VNode()\n p.nodeName = nodeName\n p.children = children\n p.attributes = attributes == null ? undefined : attributes\n p.key = attributes == null ? undefined : attributes.key\n\n // if a \"vnode hook\" is defined, pass every created VNode to it\n if (options.vnode !== undefined) options.vnode(p)\n\n return p\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n/**\n * This shim allows elements written in, or compiled to, ES5 to work on native\n * implementations of Custom Elements v1. It sets new.target to the value of\n * this.constructor so that the native HTMLElement constructor can access the\n * current under-construction element's definition.\n */\n; (function () {\n if (\n // No Reflect, no classes, no need for shim because native custom elements\n // require ES2015 classes or Reflect.\n window.Reflect === undefined ||\n window.customElements === undefined ||\n // The webcomponentsjs custom elements polyfill doesn't require\n // ES2015-compatible construction (`super()` or `Reflect.construct`).\n window.customElements.hasOwnProperty('polyfillWrapFlushCallback')\n ) {\n return\n }\n const BuiltInHTMLElement = HTMLElement\n window.HTMLElement = function HTMLElement() {\n return Reflect.construct(BuiltInHTMLElement, [], this.constructor)\n }\n HTMLElement.prototype = BuiltInHTMLElement.prototype\n HTMLElement.prototype.constructor = HTMLElement\n Object.setPrototypeOf(HTMLElement, BuiltInHTMLElement)\n})()\n\nexport function cssToDom(css) {\n const node = document.createElement('style')\n node.textContent = css\n return node\n}\n\nexport function camelCase(str) {\n return str.replace(/-(\\w)/g, ($, $1) => {\n return $1.toUpperCase()\n })\n}\n\nexport function Fragment(props) {\n return props.children\n}\n\nexport function extend(obj, props) {\n for (let i in props) obj[i] = props[i]\n return obj\n}\n\n/** Invoke or update a ref, depending on whether it is a function or object ref.\n * @param {object|function} [ref=null]\n * @param {any} [value]\n */\nexport function applyRef(ref, value) {\n if (ref != null) {\n if (typeof ref == 'function') ref(value)\n else ref.current = value\n }\n}\n\n/**\n * Call a function asynchronously, as soon as possible. Makes\n * use of HTML Promise to schedule the callback if available,\n * otherwise falling back to `setTimeout` (mainly for IE<11).\n * @type {(callback: function) => void}\n */\nexport const defer =\n typeof Promise == 'function'\n ? Promise.resolve().then.bind(Promise.resolve())\n : setTimeout\n\nexport function isArray(obj) {\n return Object.prototype.toString.call(obj) === '[object Array]'\n}\n\n\nexport function getUse(data, paths, out, name) {\n const obj = []\n paths.forEach((path, index) => {\n const isPath = typeof path === 'string'\n if (isPath) {\n obj[index] = getTargetByPath(data, path)\n } else {\n const key = Object.keys(path)[0]\n const value = path[key]\n if (typeof value === 'string') {\n obj[index] = getTargetByPath(data, value)\n } else {\n const tempPath = value[0]\n if (typeof tempPath === 'string') {\n const tempVal = getTargetByPath(data, tempPath)\n obj[index] = value[1] ? value[1](tempVal) : tempVal\n } else {\n const args = []\n tempPath.forEach(path =>{\n args.push(getTargetByPath(data, path))\n })\n obj[index] = value[1].apply(null, args)\n }\n }\n obj[key] = obj[index]\n }\n\t})\n\tif(out) out[name] = obj\n return obj\n}\n\nexport function pathToArr(path) {\n\tif(typeof path !== 'string' || !path) return []\n\t// return path.split(/\\.|\\[|\\]/).filter(name => !!name)\n\treturn path.replace(/]/g, '').replace(/\\[/g, '.').split('.')\n}\n\nexport function getTargetByPath(origin, path) {\n const arr = pathToArr(path)\n let current = origin\n for (let i = 0, len = arr.length; i < len; i++) {\n current = current[arr[i]]\n }\n return current\n}\n\nconst hyphenateRE = /\\B([A-Z])/g\nexport function hyphenate(str) {\n return str.replace(hyphenateRE, '-$1').toLowerCase()\n}\n\nexport function getValByPath(path, current) {\n\tconst arr = pathToArr(path)\n\tarr.forEach(prop => {\n\t\tcurrent = current[prop]\n\t})\n\treturn current\n}\n\nexport function getPath(obj, out, name) {\n\tconst result = {}\n\tobj.forEach(item => {\n\t\tif (typeof item === 'string') {\n\t\t\tresult[item] = true\n\t\t} else {\n\t\t\tconst tempPath = item[Object.keys(item)[0]]\n\t\t\tif (typeof tempPath === 'string') {\n\t\t\t\tresult[tempPath] = true\n\t\t\t} else {\n\t\t\t\tif (typeof tempPath[0] === 'string') {\n\t\t\t\t\tresult[tempPath[0]] = true\n\t\t\t\t} else {\n\t\t\t\t\ttempPath[0].forEach(path => (result[path] = true))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\tif(out) out[name] = result\n\treturn result\n}\n\nexport function removeItem(item, arr){\n if(!arr) return\n for (let i = 0, len = arr.length; i < len; i++) {\n if (arr[i] === item) {\n arr.splice(i, 1)\n break\n }\n }\n}","import { extend } from '../util'\nimport options from '../options'\n/**\n * Check if two nodes are equivalent.\n *\n * @param {Node} node\t\t\tDOM Node to compare\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\n * @param {boolean} [hydrating=false]\tIf true, ignores component constructors when comparing.\n * @private\n */\nexport function isSameNodeType(node, vnode, hydrating) {\n if (typeof vnode === 'string' || typeof vnode === 'number') {\n return node.splitText !== undefined\n }\n if (typeof vnode.nodeName === 'string') {\n return !node._componentConstructor && isNamedNode(node, vnode.nodeName)\n } else if (typeof vnode.nodeName === 'function'){\n return options.mapping[node.nodeName.toLowerCase()] === vnode.nodeName\n }\n return hydrating || node._componentConstructor === vnode.nodeName\n}\n\n/**\n * Check if an Element has a given nodeName, case-insensitively.\n *\n * @param {Element} node\tA DOM Element to inspect the name of.\n * @param {String} nodeName\tUnnormalized name to compare against.\n */\nexport function isNamedNode(node, nodeName) {\n return (\n node.normalizedNodeName === nodeName ||\n node.nodeName.toLowerCase() === nodeName.toLowerCase()\n )\n}\n\n/**\n * Reconstruct Component-style `props` from a VNode.\n * Ensures default/fallback values from `defaultProps`:\n * Own-properties of `defaultProps` not present in `vnode.attributes` are added.\n *\n * @param {VNode} vnode\n * @returns {Object} props\n */\nexport function getNodeProps(vnode) {\n let props = extend({}, vnode.attributes)\n props.children = vnode.children\n\n let defaultProps = vnode.nodeName.defaultProps\n if (defaultProps !== undefined) {\n for (let i in defaultProps) {\n if (props[i] === undefined) {\n props[i] = defaultProps[i]\n }\n }\n }\n\n return props\n}\n","import {pathToArr} from './util'\n\nexport const extension = {}\n\nexport function extend(name, handler) {\n\textension['o-' + name] = handler\n}\n\nexport function set(origin, path, value) {\n\tconst arr = pathToArr(path)\n\tlet current = origin\n\tfor (let i = 0, len = arr.length; i < len; i++) {\n\t\t\tif (i === len - 1) {\n\t\t\t\t\tcurrent[arr[i]] = value\n\t\t\t} else {\n\t\t\t\t\tcurrent = current[arr[i]]\n\t\t\t}\n\t}\n}\n\nexport function get(origin, path) {\n\tconst arr = pathToArr(path)\n\tlet current = origin\n\tfor (let i = 0, len = arr.length; i < len; i++) {\n\t\tcurrent = current[arr[i]]\n\t}\n\n\treturn current\n}\n\nfunction eventProxy(e) {\n return this._listeners[e.type](e)\n}\n\nexport function bind(el, type, handler){\n\tel._listeners = el._listeners || {}\n\tel._listeners[type] = handler\n\tel.addEventListener(type, eventProxy)\n}\n\nexport function unbind(el, type){\n\tel.removeEventListener(type, eventProxy)\n}\n","import { IS_NON_DIMENSIONAL } from '../constants'\nimport { applyRef } from '../util'\nimport options from '../options'\nimport { extension } from '../extend'\n\n/**\n * Create an element with the given nodeName.\n * @param {string} nodeName The DOM node to create\n * @param {boolean} [isSvg=false] If `true`, creates an element within the SVG\n * namespace.\n * @returns {Element} The created DOM node\n */\nexport function createNode(nodeName, isSvg) {\n /** @type {Element} */\n let node = isSvg\n ? document.createElementNS('http://www.w3.org/2000/svg', nodeName)\n : document.createElement(nodeName)\n node.normalizedNodeName = nodeName\n return node\n}\n\n/**\n * Remove a child node from its parent if attached.\n * @param {Node} node The node to remove\n */\nexport function removeNode(node) {\n let parentNode = node.parentNode\n if (parentNode) parentNode.removeChild(node)\n}\n\n/**\n * Set a named attribute on the given Node, with special behavior for some names\n * and event handlers. If `value` is `null`, the attribute/handler will be\n * removed.\n * @param {Element} node An element to mutate\n * @param {string} name The name/key to set, such as an event or attribute name\n * @param {*} old The last value that was set for this name/node pair\n * @param {*} value An attribute value, such as a function to be used as an\n * event handler\n * @param {boolean} isSvg Are we currently diffing inside an svg?\n * @private\n */\nexport function setAccessor(node, name, old, value, isSvg, component) {\n if (name === 'className') name = 'class'\n\n if (name[0] == 'o' && name[1] == '-'){\n if(extension[name]){\n extension[name](node, value, component)\n }\n } else if (name === 'key') {\n // ignore\n } else if (name === 'ref') {\n applyRef(old, null)\n applyRef(value, node)\n } else if (name === 'class' && !isSvg) {\n node.className = value || ''\n } else if (name === 'style') {\n if (!value || typeof value === 'string' || typeof old === 'string') {\n node.style.cssText = value || ''\n }\n if (value && typeof value === 'object') {\n if (typeof old !== 'string') {\n for (let i in old) if (!(i in value)) node.style[i] = ''\n }\n for (let i in value) {\n node.style[i] =\n typeof value[i] === 'number' && IS_NON_DIMENSIONAL.test(i) === false\n ? value[i] + 'px'\n : value[i]\n }\n }\n } else if (name === 'dangerouslySetInnerHTML') {\n if (value) node.innerHTML = value.__html || ''\n } else if (name[0] == 'o' && name[1] == 'n') {\n let useCapture = name !== (name = name.replace(/Capture$/, ''))\n name = name.toLowerCase().substring(2)\n if (value) {\n if (!old) {\n node.addEventListener(name, eventProxy, useCapture)\n if (name == 'tap') {\n node.addEventListener('touchstart', touchStart, useCapture)\n node.addEventListener('touchend', touchEnd, useCapture)\n }\n }\n } else {\n node.removeEventListener(name, eventProxy, useCapture)\n if (name == 'tap') {\n node.removeEventListener('touchstart', touchStart, useCapture)\n node.removeEventListener('touchend', touchEnd, useCapture)\n }\n }\n ;(node._listeners || (node._listeners = {}))[name] = value\n } else if (node.nodeName === 'INPUT' && name === 'value'){\n node[name] = value == null ? '' : value\n } else if (name !== 'list' && name !== 'type' && name !== 'css' && !isSvg && name in node && value !== '') { //value !== '' fix for selected, disabled, checked with pure element\n // Attempt to set a DOM property to the given value.\n // IE & FF throw for certain property-value combinations.\n try {\n node[name] = value == null ? '' : value\n } catch (e) {}\n if ((value == null || value === false) && name != 'spellcheck')\n node.pureRemoveAttribute ? node.pureRemoveAttribute(name) : node.removeAttribute(name)\n } else {\n let ns = isSvg && name !== (name = name.replace(/^xlink:?/, ''))\n // spellcheck is treated differently than all other boolean values and\n // should not be removed when the value is `false`. See:\n // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-spellcheck\n if (value == null || value === false) {\n if (ns)\n node.removeAttributeNS(\n 'http://www.w3.org/1999/xlink',\n name.toLowerCase()\n )\n else node.pureRemoveAttribute ? node.pureRemoveAttribute(name) : node.removeAttribute(name)\n } else if (typeof value !== 'function') {\n if (ns) {\n node.setAttributeNS(\n 'http://www.w3.org/1999/xlink',\n name.toLowerCase(),\n value\n )\n } else {\n node.pureSetAttribute ? node.pureSetAttribute(name, value) : node.setAttribute(name, value)\n }\n }\n }\n}\n\n/**\n * Proxy an event to hooked event handlers\n * @param {Event} e The event object from the browser\n * @private\n */\nfunction eventProxy(e) {\n return this._listeners[e.type]((options.event && options.event(e)) || e)\n}\n\nfunction touchStart(e) {\n this.___touchX = e.touches[0].pageX\n this.___touchY = e.touches[0].pageY\n this.___scrollTop = document.body.scrollTop\n}\n\nfunction touchEnd(e) {\n if (\n Math.abs(e.changedTouches[0].pageX - this.___touchX) < 30 &&\n Math.abs(e.changedTouches[0].pageY - this.___touchY) < 30 &&\n Math.abs(document.body.scrollTop - this.___scrollTop) < 30\n ) {\n this.dispatchEvent(new CustomEvent('tap', { detail: e }))\n }\n}\n","import { ATTR_KEY } from '../constants'\nimport { isSameNodeType, isNamedNode } from './index'\nimport { createNode, setAccessor } from '../dom/index'\nimport { camelCase, isArray, Fragment } from '../util'\nimport { removeNode } from '../dom/index'\nimport options from '../options'\n\n/** Queue of components that have been mounted and are awaiting componentDidMount */\nexport const mounts = []\n\n/** Diff recursion count, used to track the end of the diff cycle. */\nexport let diffLevel = 0\n\n/** Global flag indicating if the diff is currently within an SVG */\nlet isSvgMode = false\n\n/** Global flag indicating if the diff is performing hydration */\nlet hydrating = false\n\n/** Apply differences in a given vnode (and it's deep children) to a real DOM Node.\n *\t@param {Element} [dom=null]\t\tA DOM node to mutate into the shape of the `vnode`\n *\t@param {VNode} vnode\t\t\tA VNode (with descendants forming a tree) representing the desired DOM structure\n *\t@returns {Element} dom\t\t\tThe created/mutated element\n *\t@private\n */\nexport function diff(dom, vnode, parent, component, updateSelf) {\n // diffLevel having been 0 here indicates initial entry into the diff (not a subdiff)\n let ret\n if (!diffLevel++) {\n // when first starting the diff, check if we're diffing an SVG or within an SVG\n isSvgMode = parent != null && parent.ownerSVGElement !== undefined\n\n // hydration is indicated by the existing element to be diffed not having a prop cache\n hydrating = dom != null && !(ATTR_KEY in dom)\n }\n if(vnode.nodeName === Fragment){\n vnode = vnode.children\n }\n if (isArray(vnode)) {\n if (parent) {\n const styles = parent.querySelectorAll('style')\n styles.forEach(s => {\n parent.removeChild(s)\n })\n innerDiffNode(parent, vnode, hydrating, component, updateSelf)\n\n for (let i = styles.length - 1; i >= 0; i--) {\n parent.firstChild ? parent.insertBefore(styles[i], parent.firstChild) : parent.appendChild(style[i])\n }\n } else {\n ret = []\n vnode.forEach((item, index) => {\n let ele = idiff(index === 0 ? dom : null, item, component, updateSelf)\n ret.push(ele)\n })\n }\n } else {\n if (isArray(dom)) {\n dom.forEach((one, index) => {\n if (index === 0) {\n ret = idiff(one, vnode, component, updateSelf)\n } else {\n recollectNodeTree(one, false)\n }\n })\n } else {\n ret = idiff(dom, vnode, component, updateSelf)\n }\n // append the element if its a new parent\n if (parent && ret.parentNode !== parent) parent.appendChild(ret)\n }\n\n // diffLevel being reduced to 0 means we're exiting the diff\n if (!--diffLevel) {\n hydrating = false\n // invoke queued componentDidMount lifecycle methods\n }\n\n return ret\n}\n\n/** Internals of `diff()`, separated to allow bypassing diffLevel / mount flushing. */\nfunction idiff(dom, vnode, component, updateSelf) {\n if (dom && vnode && dom.props) {\n dom.props.children = vnode.children\n }\n let out = dom,\n prevSvgMode = isSvgMode\n\n // empty values (null, undefined, booleans) render as empty Text nodes\n if (vnode == null || typeof vnode === 'boolean') vnode = ''\n\n // Fast case: Strings & Numbers create/update Text nodes.\n if (typeof vnode === 'string' || typeof vnode === 'number') {\n // update if it's already a Text node:\n if (\n dom &&\n dom.splitText !== undefined &&\n dom.parentNode &&\n (!dom._component || component)\n ) {\n /* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */\n if (dom.nodeValue != vnode) {\n dom.nodeValue = vnode\n }\n } else {\n // it wasn't a Text node: replace it with one and recycle the old Element\n out = document.createTextNode(vnode)\n if (dom) {\n if (dom.parentNode) dom.parentNode.replaceChild(out, dom)\n recollectNodeTree(dom, true)\n }\n }\n\n out[ATTR_KEY] = true\n\n return out\n }\n\n // If the VNode represents a Component, perform a component diff:\n let vnodeName = vnode.nodeName\n if (typeof vnodeName === 'function') {\n for (let key in options.mapping) {\n if (options.mapping[key] === vnodeName) {\n vnodeName = key\n vnode.nodeName = key\n break\n }\n }\n }\n // Tracks entering and exiting SVG namespace when descending through the tree.\n isSvgMode =\n vnodeName === 'svg'\n ? true\n : vnodeName === 'foreignObject'\n ? false\n : isSvgMode\n\n // If there's no existing element or it's the wrong type, create a new one:\n vnodeName = String(vnodeName)\n if (!dom || !isNamedNode(dom, vnodeName)) {\n out = createNode(vnodeName, isSvgMode)\n\n if (dom) {\n // move children into the replacement node\n while (dom.firstChild) out.appendChild(dom.firstChild)\n\n // if the previous Element was mounted into the DOM, replace it inline\n if (dom.parentNode) dom.parentNode.replaceChild(out, dom)\n\n // recycle the old element (skips non-Element node types)\n recollectNodeTree(dom, true)\n }\n }\n\n let fc = out.firstChild,\n props = out[ATTR_KEY],\n vchildren = vnode.children\n\n if (props == null) {\n props = out[ATTR_KEY] = {}\n for (let a = out.attributes, i = a.length; i--;)\n props[a[i].name] = a[i].value\n }\n\n // Optimization: fast-path for elements containing a single TextNode:\n if (\n !hydrating &&\n vchildren &&\n vchildren.length === 1 &&\n typeof vchildren[0] === 'string' &&\n fc != null &&\n fc.splitText !== undefined &&\n fc.nextSibling == null\n ) {\n if (fc.nodeValue != vchildren[0]) {\n fc.nodeValue = vchildren[0]\n }\n }\n // otherwise, if there are existing or new children, diff them:\n else if ((vchildren && vchildren.length) || fc != null) {\n if (!(out.constructor.is == 'WeElement' && out.constructor.noSlot)) {\n innerDiffNode(\n out,\n vchildren,\n hydrating || props.dangerouslySetInnerHTML != null,\n component,\n updateSelf\n )\n }\n }\n\n // Apply attributes/props from VNode to the DOM Element:\n diffAttributes(out, vnode.attributes, props, component, updateSelf)\n if (out.props) {\n out.props.children = vnode.children\n }\n // restore previous SVG mode: (in case we're exiting an SVG namespace)\n isSvgMode = prevSvgMode\n\n return out\n}\n\n/** Apply child and attribute changes between a VNode and a DOM Node to the DOM.\n *\t@param {Element} dom\t\t\tElement whose children should be compared & mutated\n *\t@param {Array} vchildren\t\tArray of VNodes to compare to `dom.childNodes`\n *\t@param {Boolean} isHydrating\tIf `true`, consumes externally created elements similar to hydration\n */\nfunction innerDiffNode(dom, vchildren, isHydrating, component, updateSelf) {\n let originalChildren = dom.childNodes,\n children = [],\n keyed = {},\n keyedLen = 0,\n min = 0,\n len = originalChildren.length,\n childrenLen = 0,\n vlen = vchildren ? vchildren.length : 0,\n j,\n c,\n f,\n vchild,\n child\n\n // Build up a map of keyed children and an Array of unkeyed children:\n if (len !== 0) {\n for (let i = 0; i < len; i++) {\n let child = originalChildren[i],\n props = child[ATTR_KEY],\n key =\n vlen && props\n ? child._component\n ? child._component.__key\n : props.key\n : null\n if (key != null) {\n keyedLen++\n keyed[key] = child\n } else if (\n props ||\n (child.splitText !== undefined\n ? isHydrating\n ? child.nodeValue.trim()\n : true\n : isHydrating)\n ) {\n children[childrenLen++] = child\n }\n }\n }\n\n if (vlen !== 0) {\n for (let i = 0; i < vlen; i++) {\n vchild = vchildren[i]\n child = null\n\n // attempt to find a node based on key matching\n let key = vchild.key\n if (key != null) {\n if (keyedLen && keyed[key] !== undefined) {\n child = keyed[key]\n keyed[key] = undefined\n keyedLen--\n }\n }\n // attempt to pluck a node of the same type from the existing children\n else if (!child && min < childrenLen) {\n for (j = min; j < childrenLen; j++) {\n if (\n children[j] !== undefined &&\n isSameNodeType((c = children[j]), vchild, isHydrating)\n ) {\n child = c\n children[j] = undefined\n if (j === childrenLen - 1) childrenLen--\n if (j === min) min++\n break\n }\n }\n }\n\n // morph the matched/found/created DOM child to match vchild (deep)\n child = idiff(child, vchild, component, updateSelf)\n\n f = originalChildren[i]\n if (child && child !== dom && child !== f) {\n if (f == null) {\n dom.appendChild(child)\n } else if (child === f.nextSibling) {\n removeNode(f)\n } else {\n dom.insertBefore(child, f)\n }\n }\n }\n }\n\n // remove unused keyed children:\n if (keyedLen) {\n for (let i in keyed)\n if (keyed[i] !== undefined) recollectNodeTree(keyed[i], false)\n }\n\n // remove orphaned unkeyed children:\n while (min <= childrenLen) {\n if ((child = children[childrenLen--]) !== undefined)\n recollectNodeTree(child, false)\n }\n}\n\n/** Recursively recycle (or just unmount) a node and its descendants.\n *\t@param {Node} node\t\t\t\t\t\tDOM node to start unmount/removal from\n *\t@param {Boolean} [unmountOnly=false]\tIf `true`, only triggers unmount lifecycle, skips removal\n */\nexport function recollectNodeTree(node, unmountOnly) {\n // If the node's VNode had a ref function, invoke it with null here.\n // (this is part of the React spec, and smart for unsetting references)\n if (node[ATTR_KEY] != null && node[ATTR_KEY].ref) {\n if (typeof node[ATTR_KEY].ref === 'function') {\n node[ATTR_KEY].ref(null)\n } else if (node[ATTR_KEY].ref.current) {\n node[ATTR_KEY].ref.current = null\n }\n }\n\n if (unmountOnly === false || node[ATTR_KEY] == null) {\n removeNode(node)\n }\n\n removeChildren(node)\n}\n\n/** Recollect/unmount all children.\n *\t- we use .lastChild here because it causes less reflow than .firstChild\n *\t- it's also cheaper than accessing the .childNodes Live NodeList\n */\nexport function removeChildren(node) {\n node = node.lastChild\n while (node) {\n let next = node.previousSibling\n recollectNodeTree(node, true)\n node = next\n }\n}\n\n/** Apply differences in attributes from a VNode to the given DOM Element.\n *\t@param {Element} dom\t\tElement with attributes to diff `attrs` against\n *\t@param {Object} attrs\t\tThe desired end-state key-value attribute pairs\n *\t@param {Object} old\t\t\tCurrent/previous attributes (from previous VNode or element's prop cache)\n */\nfunction diffAttributes(dom, attrs, old, component, updateSelf) {\n let name\n //let update = false\n let isWeElement = dom.update\n let oldClone\n if (dom.receiveProps) {\n oldClone = Object.assign({}, old)\n }\n // remove attributes no longer present on the vnode by setting them to undefined\n for (name in old) {\n if (!(attrs && attrs[name] != null) && old[name] != null) {\n setAccessor(dom, name, old[name], (old[name] = undefined), isSvgMode, component)\n if (isWeElement) {\n delete dom.props[name]\n //update = true\n }\n }\n }\n\n // add new & update changed attributes\n for (name in attrs) {\n if (isWeElement && typeof attrs[name] === 'object' && name !== 'ref') {\n if (name === 'style') {\n setAccessor(dom, name, old[name], (old[name] = attrs[name]), isSvgMode, component)\n }\n let ccName = camelCase(name)\n dom.props[ccName] = old[ccName] = attrs[name]\n //update = true\n } else if (\n name !== 'children' &&\n (!(name in old) ||\n attrs[name] !==\n (name === 'value' || name === 'checked' ? dom[name] : old[name]))\n ) {\n setAccessor(dom, name, old[name], attrs[name], isSvgMode, component)\n if (isWeElement) {\n let ccName = camelCase(name)\n dom.props[ccName] = old[ccName] = attrs[name]\n //update = true\n } else {\n old[name] = attrs[name]\n }\n }\n }\n\n if (isWeElement && !updateSelf && dom.parentNode) {\n //__hasChildren is not accuracy when it was empty at first, so add dom.children.length > 0 condition\n //if (update || dom.__hasChildren || dom.children.length > 0 || (dom.store && !dom.store.data)) {\n if (dom.receiveProps(dom.props, oldClone) !== false) {\n dom.update()\n }\n //}\n }\n}\n","/*!\n * https://github.com/Palindrom/JSONPatcherProxy\n * (c) 2017 Starcounter\n * MIT license\n */\n\n/** Class representing a JS Object observer */\nconst JSONPatcherProxy = (function() {\n /**\n * Deep clones your object and returns a new object.\n */\n function deepClone(obj) {\n switch (typeof obj) {\n case 'object':\n return JSON.parse(JSON.stringify(obj)) //Faster than ES5 clone - http://jsperf.com/deep-cloning-of-objects/5\n case 'undefined':\n return null //this is how JSON.stringify behaves for array items\n default:\n return obj //no need to clone primitives\n }\n }\n JSONPatcherProxy.deepClone = deepClone\n\n function escapePathComponent(str) {\n if (str.indexOf('/') == -1 && str.indexOf('~') == -1) return str\n return str.replace(/~/g, '~0').replace(/\\//g, '~1')\n }\n JSONPatcherProxy.escapePathComponent = escapePathComponent\n\n /**\n * Walk up the parenthood tree to get the path\n * @param {JSONPatcherProxy} instance\n * @param {Object} obj the object you need to find its path\n */\n function findObjectPath(instance, obj) {\n const pathComponents = []\n let parentAndPath = instance.parenthoodMap.get(obj)\n while (parentAndPath && parentAndPath.path) {\n // because we're walking up-tree, we need to use the array as a stack\n pathComponents.unshift(parentAndPath.path)\n parentAndPath = instance.parenthoodMap.get(parentAndPath.parent)\n }\n if (pathComponents.length) {\n const path = pathComponents.join('/')\n return '/' + path\n }\n return ''\n }\n /**\n * A callback to be used as th proxy set trap callback.\n * It updates parenthood map if needed, proxifies nested newly-added objects, calls default callbacks with the changes occurred.\n * @param {JSONPatcherProxy} instance JSONPatcherProxy instance\n * @param {Object} target the affected object\n * @param {String} key the effect property's name\n * @param {Any} newValue the value being set\n */\n function setTrap(instance, target, key, newValue) {\n const parentPath = findObjectPath(instance, target)\n\n const destinationPropKey = parentPath + '/' + escapePathComponent(key)\n\n if (instance.proxifiedObjectsMap.has(newValue)) {\n const newValueOriginalObject = instance.proxifiedObjectsMap.get(newValue)\n\n instance.parenthoodMap.set(newValueOriginalObject.originalObject, {\n parent: target,\n path: key\n })\n }\n /*\n mark already proxified values as inherited.\n rationale: proxy.arr.shift()\n will emit\n {op: replace, path: '/arr/1', value: arr_2}\n {op: remove, path: '/arr/2'}\n\n by default, the second operation would revoke the proxy, and this renders arr revoked.\n That's why we need to remember the proxies that are inherited.\n */\n const revokableInstance = instance.proxifiedObjectsMap.get(newValue)\n /*\n Why do we need to check instance.isProxifyingTreeNow?\n\n We need to make sure we mark revokables as inherited ONLY when we're observing,\n because throughout the first proxification, a sub-object is proxified and then assigned to\n its parent object. This assignment of a pre-proxified object can fool us into thinking\n that it's a proxified object moved around, while in fact it's the first assignment ever.\n\n Checking isProxifyingTreeNow ensures this is not happening in the first proxification,\n but in fact is is a proxified object moved around the tree\n */\n if (revokableInstance && !instance.isProxifyingTreeNow) {\n revokableInstance.inherited = true\n }\n\n // if the new value is an object, make sure to watch it\n if (\n newValue &&\n typeof newValue == 'object' &&\n !instance.proxifiedObjectsMap.has(newValue)\n ) {\n instance.parenthoodMap.set(newValue, {\n parent: target,\n path: key\n })\n newValue = instance._proxifyObjectTreeRecursively(target, newValue, key)\n }\n // let's start with this operation, and may or may not update it later\n const operation = {\n op: 'remove',\n path: destinationPropKey\n }\n if (typeof newValue == 'undefined') {\n // applying De Morgan's laws would be a tad faster, but less readable\n if (!Array.isArray(target) && !target.hasOwnProperty(key)) {\n // `undefined` is being set to an already undefined value, keep silent\n return Reflect.set(target, key, newValue)\n }\n // when array element is set to `undefined`, should generate replace to `null`\n if (Array.isArray(target)) {\n // undefined array elements are JSON.stringified to `null`\n ;(operation.op = 'replace'), (operation.value = null)\n }\n const oldValue = instance.proxifiedObjectsMap.get(target[key])\n // was the deleted a proxified object?\n if (oldValue) {\n instance.parenthoodMap.delete(target[key])\n instance.disableTrapsForProxy(oldValue)\n instance.proxifiedObjectsMap.delete(oldValue)\n }\n } else {\n if (Array.isArray(target) && !Number.isInteger(+key.toString())) {\n /* array props (as opposed to indices) don't emit any patches, to avoid needless `length` patches */\n if (key != 'length') {\n console.warn(\n 'JSONPatcherProxy noticed a non-integer prop was set for an array. This will not emit a patch'\n )\n }\n return Reflect.set(target, key, newValue)\n }\n operation.op = 'add'\n if (target.hasOwnProperty(key)) {\n if (typeof target[key] !== 'undefined' || Array.isArray(target)) {\n operation.op = 'replace' // setting `undefined` array elements is a `replace` op\n }\n }\n operation.value = newValue\n }\n operation.oldValue = target[key]\n const reflectionResult = Reflect.set(target, key, newValue)\n instance.defaultCallback(operation)\n return reflectionResult\n }\n /**\n * A callback to be used as th proxy delete trap callback.\n * It updates parenthood map if needed, calls default callbacks with the changes occurred.\n * @param {JSONPatcherProxy} instance JSONPatcherProxy instance\n * @param {Object} target the effected object\n * @param {String} key the effected property's name\n */\n function deleteTrap(instance, target, key) {\n if (typeof target[key] !== 'undefined') {\n const parentPath = findObjectPath(instance, target)\n const destinationPropKey = parentPath + '/' + escapePathComponent(key)\n\n const revokableProxyInstance = instance.proxifiedObjectsMap.get(\n target[key]\n )\n\n if (revokableProxyInstance) {\n if (revokableProxyInstance.inherited) {\n /*\n this is an inherited proxy (an already proxified object that was moved around),\n we shouldn't revoke it, because even though it was removed from path1, it is still used in path2.\n And we know that because we mark moved proxies with `inherited` flag when we move them\n\n it is a good idea to remove this flag if we come across it here, in deleteProperty trap.\n We DO want to revoke the proxy if it was removed again.\n */\n revokableProxyInstance.inherited = false\n } else {\n instance.parenthoodMap.delete(revokableProxyInstance.originalObject)\n instance.disableTrapsForProxy(revokableProxyInstance)\n instance.proxifiedObjectsMap.delete(target[key])\n }\n }\n const reflectionResult = Reflect.deleteProperty(target, key)\n\n instance.defaultCallback({\n op: 'remove',\n path: destinationPropKey\n })\n\n return reflectionResult\n }\n }\n /* pre-define resume and pause functions to enhance constructors performance */\n function resume() {\n this.defaultCallback = operation => {\n this.isRecording && this.patches.push(operation)\n this.userCallback && this.userCallback(operation)\n }\n this.isObserving = true\n }\n function pause() {\n this.defaultCallback = () => {}\n this.isObserving = false\n }\n /**\n * Creates an instance of JSONPatcherProxy around your object of interest `root`.\n * @param {Object|Array} root - the object you want to wrap\n * @param {Boolean} [showDetachedWarning = true] - whether to log a warning when a detached sub-object is modified @see {@link https://github.com/Palindrom/JSONPatcherProxy#detached-objects}\n * @returns {JSONPatcherProxy}\n * @constructor\n */\n function JSONPatcherProxy(root, showDetachedWarning) {\n this.isProxifyingTreeNow = false\n this.isObserving = false\n this.proxifiedObjectsMap = new Map()\n this.parenthoodMap = new Map()\n // default to true\n if (typeof showDetachedWarning !== 'boolean') {\n showDetachedWarning = true\n }\n\n this.showDetachedWarning = showDetachedWarning\n this.originalObject = root\n this.cachedProxy = null\n this.isRecording = false\n this.userCallback\n /**\n * @memberof JSONPatcherProxy\n * Restores callback back to the original one provided to `observe`.\n */\n this.resume = resume.bind(this)\n /**\n * @memberof JSONPatcherProxy\n * Replaces your callback with a noop function.\n */\n this.pause = pause.bind(this)\n }\n\n JSONPatcherProxy.prototype.generateProxyAtPath = function(parent, obj, path) {\n if (!obj) {\n return obj\n }\n const traps = {\n set: (target, key, value, receiver) =>\n setTrap(this, target, key, value, receiver),\n deleteProperty: (target, key) => deleteTrap(this, target, key)\n }\n const revocableInstance = Proxy.revocable(obj, traps)\n // cache traps object to disable them later.\n revocableInstance.trapsInstance = traps\n revocableInstance.originalObject = obj\n\n /* keeping track of object's parent and path */\n\n this.parenthoodMap.set(obj, { parent, path })\n\n /* keeping track of all the proxies to be able to revoke them later */\n this.proxifiedObjectsMap.set(revocableInstance.proxy, revocableInstance)\n return revocableInstance.proxy\n }\n // grab tree's leaves one by one, encapsulate them into a proxy and return\n JSONPatcherProxy.prototype._proxifyObjectTreeRecursively = function(\n parent,\n root,\n path\n ) {\n for (let key in root) {\n if (root.hasOwnProperty(key)) {\n if (root[key] instanceof Object) {\n root[key] = this._proxifyObjectTreeRecursively(\n root,\n root[key],\n escapePathComponent(key)\n )\n }\n }\n }\n return this.generateProxyAtPath(parent, root, path)\n }\n // this function is for aesthetic purposes\n JSONPatcherProxy.prototype.proxifyObjectTree = function(root) {\n /*\n while proxyifying object tree,\n the proxyifying operation itself is being\n recorded, which in an unwanted behavior,\n that's why we disable recording through this\n initial process;\n */\n this.pause()\n this.isProxifyingTreeNow = true\n const proxifiedObject = this._proxifyObjectTreeRecursively(\n undefined,\n root,\n ''\n )\n /* OK you can record now */\n this.isProxifyingTreeNow = false\n this.resume()\n return proxifiedObject\n }\n /**\n * Turns a proxified object into a forward-proxy object; doesn't emit any patches anymore, like a normal object\n * @param {Proxy} proxy - The target proxy object\n */\n JSONPatcherProxy.prototype.disableTrapsForProxy = function(\n revokableProxyInstance\n ) {\n if (this.showDetachedWarning) {\n const message =\n \"You're accessing an object that is detached from the observedObject tree, see https://github.com/Palindrom/JSONPatcherProxy#detached-objects\"\n\n revokableProxyInstance.trapsInstance.set = (\n targetObject,\n propKey,\n newValue\n ) => {\n console.warn(message)\n return Reflect.set(targetObject, propKey, newValue)\n }\n revokableProxyInstance.trapsInstance.set = (\n targetObject,\n propKey,\n newValue\n ) => {\n console.warn(message)\n return Reflect.set(targetObject, propKey, newValue)\n }\n revokableProxyInstance.trapsInstance.deleteProperty = (\n targetObject,\n propKey\n ) => {\n return Reflect.deleteProperty(targetObject, propKey)\n }\n } else {\n delete revokableProxyInstance.trapsInstance.set\n delete revokableProxyInstance.trapsInstance.get\n delete revokableProxyInstance.trapsInstance.deleteProperty\n }\n }\n /**\n * Proxifies the object that was passed in the constructor and returns a proxified mirror of it. Even though both parameters are options. You need to pass at least one of them.\n * @param {Boolean} [record] - whether to record object changes to a later-retrievable patches array.\n * @param {Function} [callback] - this will be synchronously called with every object change with a single `patch` as the only parameter.\n */\n JSONPatcherProxy.prototype.observe = function(record, callback) {\n if (!record && !callback) {\n throw new Error('You need to either record changes or pass a callback')\n }\n this.isRecording = record\n this.userCallback = callback\n /*\n I moved it here to remove it from `unobserve`,\n this will also make the constructor faster, why initiate\n the array before they decide to actually observe with recording?\n They might need to use only a callback.\n */\n if (record) this.patches = []\n this.cachedProxy = this.proxifyObjectTree(this.originalObject)\n return this.cachedProxy\n }\n /**\n * If the observed is set to record, it will synchronously return all the patches and empties patches array.\n */\n JSONPatcherProxy.prototype.generate = function() {\n if (!this.isRecording) {\n throw new Error('You should set record to true to get patches later')\n }\n return this.patches.splice(0, this.patches.length)\n }\n /**\n * Revokes all proxies rendering the observed object useless and good for garbage collection @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/revocable}\n */\n JSONPatcherProxy.prototype.revoke = function() {\n this.proxifiedObjectsMap.forEach(el => {\n el.revoke()\n })\n }\n /**\n * Disables all proxies' traps, turning the observed object into a forward-proxy object, like a normal object that you can modify silently.\n */\n JSONPatcherProxy.prototype.disableTraps = function() {\n this.proxifiedObjectsMap.forEach(this.disableTrapsForProxy, this)\n }\n return JSONPatcherProxy\n})()\n\nexport default JSONPatcherProxy\n","import { diff } from './vdom/diff'\nimport JSONProxy from './proxy'\nimport { getUse } from './util'\nimport options from './options'\n\nexport function render(vnode, parent, store) {\n\tparent = typeof parent === 'string' ? document.querySelector(parent) : parent\n\tif (store) {\n\t\tif (store.data) {\n\t\t\tobserveStore(store)\n\t\t} else {\n\t\t\toptions.isMultiStore = true\n\t\t\t//Multi-store injection\n\t\t\tfor (let key in store) {\n\t\t\t\tobserveStore(store[key], key)\n\t\t\t}\n\t\t}\n\t\tparent.store = store\n\t}\n\treturn diff(null, vnode, parent, false)\n}\n\nfunction observeStore(store, key) {\n\tstore.instances = []\n\tstore.updateSelfInstances = []\n\textendStoreUpate(store, key)\n\n\tstore.data = new JSONProxy(store.data).observe(false, function (patch) {\n\t\tconst patchs = {}\n\t\tif (patch.op === 'remove') {\n\t\t\t// fix arr splice\n\t\t\tconst kv = getArrayPatch(patch.path, store)\n\t\t\tpatchs[kv.k] = kv.v\n\n\t\t\tupdate(patchs, store)\n\n\t\t} else {\n\t\t\tconst key = fixPath(patch.path)\n\t\t\tpatchs[key] = patch.value\n\n\t\t\tupdate(patchs, store)\n\n\t\t}\n\t})\n}\n\nfunction update(patch, store) {\n\tstore.update(patch)\n}\n\nfunction extendStoreUpate(store, key) {\n\tstore.update = function (patch) {\n\t\tif (Object.keys(patch).length > 0) {\n\t\t\tthis.instances.forEach(instance => {\n\t\t\t\tif (key) {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updatePath && instance._updatePath[key] && needUpdate(patch, instance._updatePath[key]))) {\n\t\t\t\t\t\tif (instance.use) {\n\t\t\t\t\t\t\tgetUse(store.data, (typeof instance.use === 'function' ? instance.use() : instance.use)[key], instance.using, key)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.update()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updatePath && needUpdate(patch, instance._updatePath))) {\n\t\t\t\t\t\tif (instance.use) {\n\t\t\t\t\t\t\tinstance.using = getUse(store.data, typeof instance.use === 'function' ? instance.use() : instance.use)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.update()\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t})\n\n\t\t\tthis.updateSelfInstances.forEach(instance => {\n\t\t\t\tif (key) {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updateSelfPath && instance._updateSelfPath[key] && needUpdate(patch, instance._updateSelfPath[key]))) {\n\t\t\t\t\t\tif (instance.useSelf) {\n\t\t\t\t\t\t\tgetUse(store.data, (typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)[key], instance.usingSelf, key)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.updateSelf()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (instance._updateSelfPath && needUpdate(patch, instance._updateSelfPath)) {\n\t\t\t\t\t\tinstance.usingSelf = getUse(store.data, typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)\n\t\t\t\t\t\tinstance.updateSelf()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\tthis.onChange && this.onChange(patch)\n\t\t}\n\t}\n}\n\n\nexport function needUpdate(diffResult, updatePath) {\n\tfor (let keyA in diffResult) {\n\t\tif (updatePath[keyA]) {\n\t\t\treturn true\n\t\t}\n\t\tfor (let keyB in updatePath) {\n\t\t\tif (includePath(keyA, keyB)) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t}\n\treturn false\n}\n\nfunction includePath(pathA, pathB) {\n\tif (pathA.indexOf(pathB) === 0) {\n\t\tconst next = pathA.substr(pathB.length, 1)\n\t\tif (next === '[' || next === '.') {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nexport function fixPath(path) {\n\tlet mpPath = ''\n\tconst arr = path.replace('/', '').split('/')\n\tarr.forEach((item, index) => {\n\t\tif (index) {\n\t\t\tif (isNaN(Number(item))) {\n\t\t\t\tmpPath += '.' + item\n\t\t\t} else {\n\t\t\t\tmpPath += '[' + item + ']'\n\t\t\t}\n\t\t} else {\n\t\t\tmpPath += item\n\t\t}\n\t})\n\treturn mpPath\n}\n\nfunction getArrayPatch(path, store) {\n\tconst arr = path.replace('/', '').split('/')\n\tlet current = store.data[arr[0]]\n\tfor (let i = 1, len = arr.length; i < len - 1; i++) {\n\t\tcurrent = current[arr[i]]\n\t}\n\treturn {\n\t\tk: fixArrPath(path),\n\t\tv: current\n\t}\n}\n\nfunction fixArrPath(path) {\n\tlet mpPath = ''\n\tconst arr = path.replace('/', '').split('/')\n\tconst len = arr.length\n\tarr.forEach((item, index) => {\n\t\tif (index < len - 1) {\n\t\t\tif (index) {\n\t\t\t\tif (isNaN(Number(item))) {\n\t\t\t\t\tmpPath += '.' + item\n\t\t\t\t} else {\n\t\t\t\t\tmpPath += '[' + item + ']'\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmpPath += item\n\t\t\t}\n\t\t}\n\t})\n\treturn mpPath\n}\n","import WeElement from './we-element'\nimport options from './options'\n\nexport function define(name, ctor, config) {\n if (options.mapping[name]) {\n return\n }\n if (ctor.is === 'WeElement') {\n customElements.define(name, ctor)\n options.mapping[name] = ctor\n\n } else {\n \n if (typeof config === 'string') {\n config = { css: config }\n } else {\n config = config || { }\n }\n\n class Ele extends WeElement {\n\n static css = config.css\n\n static propTypes = config.propTypes\n\n static defaultProps = config.defaultProps\n\n render() {\n return ctor.call(this, this)\n }\n\n receiveProps() {\n if (config.receiveProps) {\n return config.receiveProps.apply(this, arguments)\n }\n }\n }\n\n const eleHooks = ['install', 'installed', 'uninstall', 'beforeUpdate', 'updated', 'beforeRender', 'rendered'],\n storeHelpers = ['use', 'useSelf']\n\n eleHooks.forEach(hook => {\n if (config[hook]) {\n Ele.prototype[hook] = function () {\n config[hook].apply(this, arguments)\n }\n }\n })\n\n storeHelpers.forEach(func => {\n if (config[func]) {\n Ele.prototype[func] = function () {\n return typeof config[func] === 'function'\n ? config[func].apply(this, arguments)\n : config[func]\n }\n }\n })\n\n customElements.define(name, Ele)\n options.mapping[name] = Ele\n }\n}\n\n\n\n","import { extend } from './util'\nimport { h } from './h'\n\n/**\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\n * @param {VNode} vnode\t\tThe virtual DOM element to clone\n * @param {Object} props\tAttributes/props to add when cloning\n * @param {VNode} rest\t\tAny additional arguments will be used as replacement children.\n */\nexport function cloneElement(vnode, props) {\n return h(\n vnode.nodeName,\n extend(extend({}, vnode.attributes), props),\n arguments.length > 2 ? [].slice.call(arguments, 2) : vnode.children\n )\n}\n","export function getHost(ele) {\n let p = ele.parentNode\n while (p) {\n if (p.host) {\n return p.host\n } else if (p.shadowRoot && p.shadowRoot.host) {\n return p.shadowRoot.host\n } else {\n p = p.parentNode\n }\n }\n}\n","/**\n * classNames based on https://github.com/JedWatson/classnames\n * by Jed Watson\n * Licensed under the MIT License\n * https://github.com/JedWatson/classnames/blob/master/LICENSE\n * modified by dntzhang\n */\n\nvar hasOwn = {}.hasOwnProperty\n\nexport function classNames() {\n var classes = []\n\n for (var i = 0; i < arguments.length; i++) {\n var arg = arguments[i]\n if (!arg) continue\n\n var argType = typeof arg\n\n if (argType === 'string' || argType === 'number') {\n classes.push(arg)\n } else if (Array.isArray(arg) && arg.length) {\n var inner = classNames.apply(null, arg)\n if (inner) {\n classes.push(inner)\n }\n } else if (argType === 'object') {\n for (var key in arg) {\n if (hasOwn.call(arg, key) && arg[key]) {\n classes.push(key)\n }\n }\n }\n }\n\n return classes.join(' ')\n}\n\nexport function extractClass() {\n const [props, ...args] = Array.prototype.slice.call(arguments, 0)\n if (props.class) {\n args.unshift(props.class)\n delete props.class\n } else if (props.className) {\n args.unshift(props.className)\n delete props.className\n }\n if (args.length > 0) {\n return { class: classNames.apply(null, args) }\n }\n}\n","export function o(obj){\n return JSON.stringify(obj)\n}","import { h, h as createElement } from './h'\nimport options from './options'\nimport WeElement from './we-element'\nimport { render } from './render'\nimport { define } from './define'\nimport { tag } from './tag'\nimport { cloneElement } from './clone-element'\nimport { getHost } from './get-host'\nimport { rpx } from './rpx'\nimport { classNames, extractClass } from './class'\nimport { o } from './o'\nimport htm from 'htm'\nimport { extend, get, set, bind, unbind } from './extend'\nimport JSONProxy from './proxy'\nimport { Fragment } from './util'\n\nh.f = Fragment\n\nconst html = htm.bind(h)\n\nfunction createRef() {\n return {}\n}\n\nconst $ = {}\nconst Component = WeElement\nconst defineElement = define\nconst elements = options.mapping\n\nconst omi = {\n tag,\n WeElement,\n Component,\n render,\n h,\n createElement,\n options,\n define,\n cloneElement,\n getHost,\n rpx,\n defineElement,\n classNames,\n extractClass,\n createRef,\n html,\n htm,\n o,\n\telements,\n\t$,\n\textend,\n\tget,\n\tset,\n\tbind,\n\tunbind,\n JSONProxy\n}\n\noptions.root.Omi = omi\noptions.root.omi = omi\noptions.root.Omi.version = '6.15.6'\n\nexport default omi\n\nexport {\n tag,\n WeElement,\n Component,\n render,\n h,\n createElement,\n options,\n define,\n cloneElement,\n getHost,\n rpx,\n defineElement,\n classNames,\n extractClass,\n createRef,\n html,\n htm,\n o,\n\telements,\n\t$,\n\textend,\n\tget,\n\tset,\n\tbind,\n\tunbind,\n JSONProxy\n}\n","function getGlobal() {\n if (\n typeof global !== 'object' ||\n !global ||\n global.Math !== Math ||\n global.Array !== Array\n ) {\n return (\n self ||\n window ||\n global ||\n (function() {\n return this\n })()\n )\n }\n return global\n}\n\n/** Global options\n *\t@public\n *\t@namespace options {Object}\n */\nexport default {\n store: null,\n root: getGlobal(),\n\tmapping: {},\n\tisMultiStore: false\n}\n","import {\n\tcssToDom,\n\tisArray,\n\tgetUse,\n\thyphenate,\n\tgetValByPath,\n\tremoveItem\n} from './util'\nimport { diff } from './vdom/diff'\nimport options from './options'\nimport { getPath } from './util'\n\nlet id = 0\n\nexport default class WeElement extends HTMLElement {\n\tstatic is = 'WeElement'\n\n\tconstructor() {\n\t\tsuper()\n\t\tthis.props = Object.assign({},\n\t\t\tthis.constructor.defaultProps\n\t\t)\n\t\tthis.elementId = id++\n\t}\n\n\tconnectedCallback() {\n\t\tlet p = this.parentNode\n\t\twhile (p && !this.store) {\n\t\t\tthis.store = p.store\n\t\t\tp = p.parentNode || p.host\n\t\t}\n\n\t\tif (this.use) {\n\t\t\tlet use\n\t\t\tif (typeof this.use === 'function') {\n\t\t\t\tuse = this.use()\n\t\t\t} else {\n\t\t\t\tuse = this.use\n\t\t\t}\n\n\n\t\t\tif (options.isMultiStore) {\n\t\t\t\tlet _updatePath = {}\n\t\t\t\tlet using = {}\n\t\t\t\tfor (let storeName in use) {\n\t\t\t\t\t_updatePath[storeName] = {}\n\t\t\t\t\tusing[storeName] = {}\n\t\t\t\t\tgetPath(use[storeName], _updatePath, storeName)\n\t\t\t\t\tgetUse(this.store[storeName].data, use[storeName], using, storeName)\n\t\t\t\t\tthis.store[storeName].instances.push(this)\n\t\t\t\t}\n\t\t\t\tthis.using = using\n\t\t\t\tthis._updatePath = _updatePath\n\t\t\t} else {\n\t\t\t\tthis._updatePath = getPath(use)\n\t\t\t\tthis.using = getUse(this.store.data, use)\n\t\t\t\tthis.store.instances.push(this)\n\t\t\t}\n\t\t}\n\t\tif (this.useSelf) {\n\t\t\tconst use = typeof this.useSelf === 'function' ? this.useSelf() : this.useSelf\n\t\t\tif (options.isMultiStore) {\n\t\t\t\tlet _updatePath = {}\n\t\t\t\tlet using = {}\n\t\t\t\tfor (let storeName in use) {\n\t\t\t\t\tgetPath(use[storeName], _updatePath, storeName)\n\t\t\t\t\tgetUse(this.store[storeName].data, use[storeName], using, storeName)\n\t\t\t\t\tthis.store[storeName].updateSelfInstances.push(this)\n\t\t\t\t}\n\t\t\t\tthis.usingSelf = using\n\t\t\t\tthis._updateSelfPath = _updatePath\n\t\t\t} else {\n\t\t\t\tthis._updateSelfPath = getPath(use)\n\t\t\t\tthis.usingSelf = getUse(this.store.data, use)\n\t\t\t\tthis.store.updateSelfInstances.push(this)\n\t\t\t}\n\t\t}\n\t\tthis.attrsToProps()\n\t\tthis.beforeInstall()\n\t\tthis.install()\n\t\tthis.afterInstall()\n\n\t\tlet shadowRoot\n\t\tif (!this.shadowRoot) {\n\t\t\tshadowRoot = this.attachShadow({\n\t\t\t\tmode: 'open'\n\t\t\t})\n\t\t} else {\n\t\t\tshadowRoot = this.shadowRoot\n\t\t\tlet fc\n\t\t\twhile ((fc = shadowRoot.firstChild)) {\n\t\t\t\tshadowRoot.removeChild(fc)\n\t\t\t}\n\t\t}\n\n\t\tif (this.constructor.css) {\n\t\t\tshadowRoot.appendChild(cssToDom(this.constructor.css))\n\t\t} else if (this.css) {\n\t\t\tshadowRoot.appendChild(cssToDom(typeof this.css === 'function' ? this.css() : this.css))\n\t\t}\n\t\tthis.beforeRender()\n\t\toptions.afterInstall && options.afterInstall(this)\n\n\n\t\tconst rendered = this.render(this.props, this.store)\n\t\tthis.__hasChildren = Object.prototype.toString.call(rendered) === '[object Array]' && rendered.length > 0\n\n\t\tthis.rootNode = diff(\n\t\t\tnull,\n\t\t\trendered,\n\t\t\tnull,\n\t\t\tthis\n\t\t)\n\t\tthis.rendered()\n\n\t\tif (this.props.css) {\n\t\t\tthis._customStyleElement = cssToDom(this.props.css)\n\t\t\tthis._customStyleContent = this.props.css\n\t\t\tshadowRoot.appendChild(this._customStyleElement)\n\t\t}\n\n\t\tif (isArray(this.rootNode)) {\n\t\t\tthis.rootNode.forEach(function (item) {\n\t\t\t\tshadowRoot.appendChild(item)\n\t\t\t})\n\t\t} else {\n\t\t\tshadowRoot.appendChild(this.rootNode)\n\t\t}\n\t\tthis.installed()\n\t\tthis._isInstalled = true\n\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.uninstall()\n\t\tthis._isInstalled = false\n\t\tif (this.store) {\n\t\t\tif(options.isMultiStore){\n\t\t\t\tfor(let key in this.store){\n\t\t\t\t\tconst current = this.store[key]\n\t\t\t\t\tremoveItem(this, current.instances)\n\t\t\t\t removeItem(this, current.updateSelfInstances)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tremoveItem(this, this.store.instances)\n\t\t\t\tremoveItem(this, this.store.updateSelfInstances)\n\t\t\t}\n\t\t}\n\t}\n\n\tupdate(ignoreAttrs, updateSelf) {\n\t\tthis._willUpdate = true\n\t\tthis.beforeUpdate()\n\t\tthis.beforeRender()\n\t\t//fix null !== undefined\n\t\tif (this._customStyleContent != this.props.css) {\n\t\t\tthis._customStyleContent = this.props.css\n\t\t\tthis._customStyleElement.textContent = this._customStyleContent\n\t\t}\n\t\tthis.attrsToProps(ignoreAttrs)\n\n\t\tconst rendered = this.render(this.props, this.store)\n\t\tthis.rendered()\n\t\tthis.__hasChildren = this.__hasChildren || (Object.prototype.toString.call(rendered) === '[object Array]' && rendered.length > 0)\n\n\t\tthis.rootNode = diff(\n\t\t\tthis.rootNode,\n\t\t\trendered,\n\t\t\tthis.shadowRoot,\n\t\t\tthis,\n\t\t\tupdateSelf\n\t\t)\n\t\tthis._willUpdate = false\n\t\tthis.updated()\n\n\t}\n\n\tupdateSelf(ignoreAttrs) {\n\t\tthis.update(ignoreAttrs, true)\n\t}\n\n\tremoveAttribute(key) {\n\t\tsuper.removeAttribute(key)\n\t\t//Avoid executing removeAttribute methods before connectedCallback\n\t\tthis._isInstalled && this.update()\n\t}\n\n\tsetAttribute(key, val) {\n\t\tif (val && typeof val === 'object') {\n\t\t\tsuper.setAttribute(key, JSON.stringify(val))\n\t\t} else {\n\t\t\tsuper.setAttribute(key, val)\n\t\t}\n\t\t//Avoid executing setAttribute methods before connectedCallback\n\t\tthis._isInstalled && this.update()\n\t}\n\n\tpureRemoveAttribute(key) {\n\t\tsuper.removeAttribute(key)\n\t}\n\n\tpureSetAttribute(key, val) {\n\t\tsuper.setAttribute(key, val)\n\t}\n\n\tattrsToProps(ignoreAttrs) {\n\t\tconst ele = this\n\t\tif (ele.normalizedNodeName || ignoreAttrs) return\n\t\tele.props['css'] = ele.getAttribute('css')\n\t\tconst attrs = this.constructor.propTypes\n\t\tif (!attrs) return\n\t\tObject.keys(attrs).forEach(key => {\n\t\t\tconst type = attrs[key]\n\t\t\tconst val = ele.getAttribute(hyphenate(key))\n\t\t\tif (val !== null) {\n\t\t\t\tswitch (type) {\n\t\t\t\t\tcase String:\n\t\t\t\t\t\tele.props[key] = val\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Number:\n\t\t\t\t\t\tele.props[key] = Number(val)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Boolean:\n\t\t\t\t\t\tif (val === 'false' || val === '0') {\n\t\t\t\t\t\t\tele.props[key] = false\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tele.props[key] = true\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Array:\n\t\t\t\t\tcase Object:\n\t\t\t\t\t\tif (val[0] === ':') {\n\t\t\t\t\t\t\tele.props[key] = getValByPath(val.substr(1), Omi.$)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tele.props[key] = JSON.parse(val\n\t\t\t\t\t\t\t\t.replace(/(['\"])?([a-zA-Z0-9_-]+)(['\"])?:([^\\/])/g, '\"$2\":$4')\n\t\t\t\t\t\t\t\t.replace(/'([\\s\\S]*?)'/g, '\"$1\"')\n\t\t\t\t\t\t\t\t.replace(/,(\\s*})/g, '$1')\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (ele.constructor.defaultProps && ele.constructor.defaultProps.hasOwnProperty(key)) {\n\t\t\t\t\tele.props[key] = ele.constructor.defaultProps[key]\n\t\t\t\t} else {\n\t\t\t\t\tele.props[key] = null\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\tfire(name, data) {\n\t\tthis.dispatchEvent(new CustomEvent(name, {\n\t\t\tdetail: data\n\t\t}))\n\t}\n\n\tbeforeInstall() {}\n\n\tinstall() {}\n\n\tafterInstall() {}\n\n\tinstalled() {}\n\n\tuninstall() {}\n\n\tbeforeUpdate() {}\n\n\tupdated() {}\n\n\tbeforeRender() {}\n\n\trendered() {}\n\n\treceiveProps() {}\n\n}\n","var n=function(t,r,u,e){for(var p=1;p\"===t?(a(),u=1):u&&(\"=\"===t?(u=4,r=e,e=\"\"):\"/\"===t?(a(),3===u&&(s=s[0]),u=s,(s=s[0]).push(u,4),u=0):\" \"===t||\"\\t\"===t||\"\\n\"===t||\"\\r\"===t?(a(),u=2):e+=t)}return a(),s},r=\"function\"==typeof Map,u=r?new Map:{},e=r?function(n){var r=u.get(n);return r||u.set(n,r=t(n)),r}:function(n){for(var r=\"\",e=0;e1?r:r[0]}\n"]} \ No newline at end of file +{"version":3,"sources":["../src/vnode.js","../src/h.js","../src/util.js","../src/vdom/index.js","../src/extend.js","../src/dom/index.js","../src/vdom/diff.js","../src/proxy.js","../src/render.js","../src/define.js","../src/clone-element.js","../src/get-host.js","../src/class.js","../src/o.js","../src/omi.js","../src/options.js","../src/we-element.js","../node_modules/htm/dist/htm.mjs"],"names":["VNode","h","nodeName","attributes","lastSimple","child","simple","i","children","arguments","length","stack","push","pop","String","p","key","options","vnode","cssToDom","css","node","document","createElement","textContent","camelCase","str","replace","$","$1","toUpperCase","Fragment","props","extend","obj","applyRef","ref","value","current","isArray","Object","prototype","toString","call","getUse","data","paths","out","name","forEach","path","index","getTargetByPath","keys","tempPath","tempVal","args","apply","pathToArr","split","origin","arr","len","hyphenate","hyphenateRE","toLowerCase","getValByPath","prop","getPath","result","item","removeItem","splice","isSameNodeType","splitText","mapping","hydrating","_componentConstructor","isNamedNode","extend$1","handler","extension","get","e","type","eventProxy","el","_listeners","addEventListener","createNode","removeNode","setAccessor","component","old","isSvg","style","cssText","IS_NON_DIMENSIONAL","test","useCapture","nameLower","innerHTML","slice","eventProxy$1","touchStart","touchEnd","removeEventListener","pureRemoveAttribute","removeAttribute","ns","removeAttributeNS","pureSetAttribute","setAttribute","className","this","___touchX","pageX","___touchY","touches","pageY","Math","___scrollTop","body","scrollTop","abs","changedTouches","dispatchEvent","CustomEvent","detail","isSvgMode","parent","ownerSVGElement","dom","querySelectorAll","styles","s","innerDiffNode","updateSelf","removeChild","firstChild","insertBefore","appendChild","ret","ele","idiff","one","recollectNodeTree","parentNode","nodeValue","createTextNode","replaceChild","vnodeName","__p","vchildren","fc","a","nextSibling","constructor","is","noSlot","dangerouslySetInnerHTML","diffAttributes","min","childrenLen","vlen","j","keyedLen","originalChildren","keyed","vchild","_child","_component","__key","trim","isHydrating","c","f","unmountOnly","ATTR_KEY","removeChildren","oldClone","assign","receiveProps","isWeElement","attrs","ccName","_ccName","_classCallCheck","instance","Constructor","TypeError","_possibleConstructorReturn","self","ReferenceError","render","store","JSONPatcherProxy","querySelector","observeStore","isMultiStore","diff","instances","updateSelfInstances","observe","patch","extendStoreUpate","getArrayPatch","JSONProxy","patchs","kv","v","update","k","_updatePath","needUpdate","use","using","_updateSelfPath","useSelf","usingSelf","onChange","diffResult","updatePath","keyA","keyB","includePath","pathA","pathB","indexOf","next","substr","fixPath","mpPath","fixArrPath","_classCallCheck$1","_possibleConstructorReturn$1","ctor","define","customElements","Ele","_WeElement","config","WeElement","propTypes","defaultProps","eleHooks","storeHelpers","func","pure","target","cloneElement","getHost","shadowRoot","host","rpx","b","window","innerWidth","arg","classNames","classes","argType","inner","join","_Array$prototype$slic","Array","class","unshift","o","JSON","stringify","htm","t","r","n","root","global","Reflect","hasOwnProperty","BuiltInHTMLElement","HTMLElement","construct","setPrototypeOf","Promise","resolve","then","bind","setTimeout","diffLevel","_this","elementId","id","connectedCallback","storeName","_use","_updatePath2","_using","_storeName","attrsToProps","beforeInstall","install","afterInstall","attachShadow","mode","rendered","beforeRender","rootNode","_customStyleContent","_customStyleElement","installed","_isInstalled","disconnectedCallback","uninstall","ignoreAttrs","_willUpdate","beforeUpdate","__hasChildren","updated","_HTMLElement","val","normalizedNodeName","getAttribute","Number","Boolean","Omi","parse","fire","deepClone","escapePathComponent","pathComponents","parentAndPath","parenthoodMap","parentPath","newValueOriginalObject","revokableInstance","inherited","proxifiedObjectsMap","has","newValue","set","operation","destinationPropKey","op","oldValue","delete","disableTrapsForProxy","console","warn","reflectionResult","revokableProxyInstance","defaultCallback","resume","patches","userCallback","pause","isObserving","showDetachedWarning","cachedProxy","_this2","deleteProperty","deleteTrap","Proxy","revocable","revocableInstance","trapsInstance","traps","originalObject","_proxifyObjectTreeRecursively","proxifyObjectTree","isProxifyingTreeNow","proxifiedObject","targetObject","message","propKey","record","callback","generate","isRecording","revoke","disableTraps","u","Map","html","Component","defineElement","tag","elements","createRef","extractClass","unbind","omi","version","module","exports"],"mappings":"wBACO,SAASA,MCIT,QAASC,GAAEC,EAAUC,GAC1B,GACEC,GACAC,EACAC,EACAC,EAJEC,IAKJ,KAAKD,EAAIE,UAAUC,OAAQH,KAAM,GAC/BI,GAAMC,KAAKH,UAAUF,GAEnBJ,IAAqC,MAAvBA,EAAWK,WACtBG,GAAMD,QAAQC,GAAMC,KAAKT,EAAWK,gBAClCL,GAAWK,SAEpB,OAAOG,GAAMD,OACX,IAAKL,EAAQM,GAAME,YAAAA,KAAUR,EAAMQ,IACjC,IAAKN,EAAIF,EAAMK,OAAQH,KAAOI,GAAMC,KAAKP,EAAME,QAE1B,iBAAVF,KAAqBA,EAAQ,OAEnCC,EAA6B,kBAAbJ,MACN,MAATG,EAAeA,EAAQ,GACD,gBAAVA,GAAoBA,GAAQS,GAClB,gBAAVT,KAAoBC,GAAAA,IAGlCA,GAAUF,EACZI,EAASA,EAASE,OAAS,IAAML,EACJ,IAApBG,EAASE,OAClBF,GAAYH,GAEZG,EAASI,KAAKP,GAGhBD,EAAaE,CAIjB,IAAIS,GAAI,GAAIf,EASZ,OARAe,GAAEb,SAAWA,EACba,EAAEP,SAAWA,EACbO,EAAEZ,WAA2B,MAAdA,MAAAA,GAAiCA,EAChDY,EAAEC,IAAoB,MAAdb,MAAAA,GAAiCA,EAAWa,QAGpD,KAAIC,GAAQC,OAAqBD,GAAQC,MAAMH,GAExCA,ECdF,QAASI,GAASC,GACvB,GAAMC,GAAOC,SAASC,cAAc,QAEpC,OADAF,GAAKG,YAAcJ,EACZC,EAGF,QAASI,GAAUC,GACxB,MAAOA,GAAIC,QAAQ,SAAU,SAACC,EAAGC,GAC/B,MAAOA,GAAGC,gBAIP,QAASC,GAASC,GACvB,MAAOA,GAAMxB,SAGR,QAASyB,GAAOC,EAAKF,GAC1B,IAAK,GAAIzB,KAAKyB,GAAOE,EAAI3B,GAAKy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yS,IAAA3G,KAAA2G,GAAA3G,GAAAD,GAAAE,IAErBjR,GAAA+K,EAAAjJ,CIFD,IAAI+V,IAAE/G,GAASe,KAAK7R,GHoBpB2B,MACEmW,GAAA7I,GACD8I,GAAAnJ,gBAGKkJ,IACNE,IAAMD,EACN9I,UAAMgJ,gBAENhM,OAAYA,EACV+L,EAAAA,EACA/I,cAAAA,EACA6I,QAAAA,GACA7L,OAAAA,EACAjM,aALUyP,EAMVnO,QAAAA,EACAN,IAAAA,GACA4N,cARUmJ,GASVtI,WAAAA,GACAC,aAAAA,GACAG,UAXUqI,GAYVH,KAAAA,GACA7H,IAAAA,GACAiI,EAAAA,GACAD,SAAAA,GACAL,EAAAA,GACA/G,OAjBUhM,EAkBV6L,IAlBU1L,EAmBXgT,IAAAA,EACAtW,KApBWkQ,EAqBX7P,OAAAA,EACAiD,UAtBWkH,GAyBXiM,IAAAA,KAAAA,IAzBWC,GA0BVvL,GAAAA,KAAAA,IAAAA,GA1BU9L,GAAZkQ,KAAAiD,IAAAmE,QAAA,SA6BmBD,mBAAXnH,QAARqH,OAAAC,QAAAH,GAAAtM,KAAAoI,IAAAkE","file":"omi.min.js","sourcesContent":["/** Virtual DOM Node */\nexport function VNode() {}\n","import { VNode } from './vnode'\nimport options from './options'\n\nconst stack = []\n\nexport function h(nodeName, attributes) {\n let children = [],\n lastSimple,\n child,\n simple,\n i\n for (i = arguments.length; i-- > 2; ) {\n stack.push(arguments[i])\n }\n if (attributes && attributes.children != null) {\n if (!stack.length) stack.push(attributes.children)\n delete attributes.children\n }\n while (stack.length) {\n if ((child = stack.pop()) && child.pop !== undefined) {\n for (i = child.length; i--; ) stack.push(child[i])\n } else {\n if (typeof child === 'boolean') child = null\n\n if ((simple = typeof nodeName !== 'function')) {\n if (child == null) child = ''\n else if (typeof child === 'number') child = String(child)\n else if (typeof child !== 'string') simple = false\n }\n\n if (simple && lastSimple) {\n children[children.length - 1] += child\n } else if (children.length === 0) {\n children = [child]\n } else {\n children.push(child)\n }\n\n lastSimple = simple\n }\n }\n\n let p = new VNode()\n p.nodeName = nodeName\n p.children = children\n p.attributes = attributes == null ? undefined : attributes\n p.key = attributes == null ? undefined : attributes.key\n\n // if a \"vnode hook\" is defined, pass every created VNode to it\n if (options.vnode !== undefined) options.vnode(p)\n\n return p\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n/**\n * This shim allows elements written in, or compiled to, ES5 to work on native\n * implementations of Custom Elements v1. It sets new.target to the value of\n * this.constructor so that the native HTMLElement constructor can access the\n * current under-construction element's definition.\n */\n; (function () {\n if (\n // No Reflect, no classes, no need for shim because native custom elements\n // require ES2015 classes or Reflect.\n window.Reflect === undefined ||\n window.customElements === undefined ||\n // The webcomponentsjs custom elements polyfill doesn't require\n // ES2015-compatible construction (`super()` or `Reflect.construct`).\n window.customElements.hasOwnProperty('polyfillWrapFlushCallback')\n ) {\n return\n }\n const BuiltInHTMLElement = HTMLElement\n window.HTMLElement = function HTMLElement() {\n return Reflect.construct(BuiltInHTMLElement, [], this.constructor)\n }\n HTMLElement.prototype = BuiltInHTMLElement.prototype\n HTMLElement.prototype.constructor = HTMLElement\n Object.setPrototypeOf(HTMLElement, BuiltInHTMLElement)\n})()\n\nexport function cssToDom(css) {\n const node = document.createElement('style')\n node.textContent = css\n return node\n}\n\nexport function camelCase(str) {\n return str.replace(/-(\\w)/g, ($, $1) => {\n return $1.toUpperCase()\n })\n}\n\nexport function Fragment(props) {\n return props.children\n}\n\nexport function extend(obj, props) {\n for (let i in props) obj[i] = props[i]\n return obj\n}\n\n/** Invoke or update a ref, depending on whether it is a function or object ref.\n * @param {object|function} [ref=null]\n * @param {any} [value]\n */\nexport function applyRef(ref, value) {\n if (ref != null) {\n if (typeof ref == 'function') ref(value)\n else ref.current = value\n }\n}\n\n/**\n * Call a function asynchronously, as soon as possible. Makes\n * use of HTML Promise to schedule the callback if available,\n * otherwise falling back to `setTimeout` (mainly for IE<11).\n * @type {(callback: function) => void}\n */\nexport const defer =\n typeof Promise == 'function'\n ? Promise.resolve().then.bind(Promise.resolve())\n : setTimeout\n\nexport function isArray(obj) {\n return Object.prototype.toString.call(obj) === '[object Array]'\n}\n\n\nexport function getUse(data, paths, out, name) {\n const obj = []\n paths.forEach((path, index) => {\n const isPath = typeof path === 'string'\n if (isPath) {\n obj[index] = getTargetByPath(data, path)\n } else {\n const key = Object.keys(path)[0]\n const value = path[key]\n if (typeof value === 'string') {\n obj[index] = getTargetByPath(data, value)\n } else {\n const tempPath = value[0]\n if (typeof tempPath === 'string') {\n const tempVal = getTargetByPath(data, tempPath)\n obj[index] = value[1] ? value[1](tempVal) : tempVal\n } else {\n const args = []\n tempPath.forEach(path =>{\n args.push(getTargetByPath(data, path))\n })\n obj[index] = value[1].apply(null, args)\n }\n }\n obj[key] = obj[index]\n }\n\t})\n\tif(out) out[name] = obj\n return obj\n}\n\nexport function pathToArr(path) {\n\tif(typeof path !== 'string' || !path) return []\n\t// return path.split(/\\.|\\[|\\]/).filter(name => !!name)\n\treturn path.replace(/]/g, '').replace(/\\[/g, '.').split('.')\n}\n\nexport function getTargetByPath(origin, path) {\n const arr = pathToArr(path)\n let current = origin\n for (let i = 0, len = arr.length; i < len; i++) {\n current = current[arr[i]]\n }\n return current\n}\n\nconst hyphenateRE = /\\B([A-Z])/g\nexport function hyphenate(str) {\n return str.replace(hyphenateRE, '-$1').toLowerCase()\n}\n\nexport function getValByPath(path, current) {\n\tconst arr = pathToArr(path)\n\tarr.forEach(prop => {\n\t\tcurrent = current[prop]\n\t})\n\treturn current\n}\n\nexport function getPath(obj, out, name) {\n\tconst result = {}\n\tobj.forEach(item => {\n\t\tif (typeof item === 'string') {\n\t\t\tresult[item] = true\n\t\t} else {\n\t\t\tconst tempPath = item[Object.keys(item)[0]]\n\t\t\tif (typeof tempPath === 'string') {\n\t\t\t\tresult[tempPath] = true\n\t\t\t} else {\n\t\t\t\tif (typeof tempPath[0] === 'string') {\n\t\t\t\t\tresult[tempPath[0]] = true\n\t\t\t\t} else {\n\t\t\t\t\ttempPath[0].forEach(path => (result[path] = true))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\tif(out) out[name] = result\n\treturn result\n}\n\nexport function removeItem(item, arr){\n if(!arr) return\n for (let i = 0, len = arr.length; i < len; i++) {\n if (arr[i] === item) {\n arr.splice(i, 1)\n break\n }\n }\n}","import { extend } from '../util'\nimport options from '../options'\n/**\n * Check if two nodes are equivalent.\n *\n * @param {Node} node\t\t\tDOM Node to compare\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\n * @param {boolean} [hydrating=false]\tIf true, ignores component constructors when comparing.\n * @private\n */\nexport function isSameNodeType(node, vnode, hydrating) {\n if (typeof vnode === 'string' || typeof vnode === 'number') {\n return node.splitText !== undefined\n }\n if (typeof vnode.nodeName === 'string') {\n return !node._componentConstructor && isNamedNode(node, vnode.nodeName)\n } else if (typeof vnode.nodeName === 'function'){\n return options.mapping[node.nodeName.toLowerCase()] === vnode.nodeName\n }\n return hydrating || node._componentConstructor === vnode.nodeName\n}\n\n/**\n * Check if an Element has a given nodeName, case-insensitively.\n *\n * @param {Element} node\tA DOM Element to inspect the name of.\n * @param {String} nodeName\tUnnormalized name to compare against.\n */\nexport function isNamedNode(node, nodeName) {\n return (\n node.normalizedNodeName === nodeName ||\n node.nodeName.toLowerCase() === nodeName.toLowerCase()\n )\n}\n\n/**\n * Reconstruct Component-style `props` from a VNode.\n * Ensures default/fallback values from `defaultProps`:\n * Own-properties of `defaultProps` not present in `vnode.attributes` are added.\n *\n * @param {VNode} vnode\n * @returns {Object} props\n */\nexport function getNodeProps(vnode) {\n let props = extend({}, vnode.attributes)\n props.children = vnode.children\n\n let defaultProps = vnode.nodeName.defaultProps\n if (defaultProps !== undefined) {\n for (let i in defaultProps) {\n if (props[i] === undefined) {\n props[i] = defaultProps[i]\n }\n }\n }\n\n return props\n}\n","import {pathToArr} from './util'\n\nexport const extension = {}\n\nexport function extend(name, handler) {\n\textension['o-' + name] = handler\n}\n\nexport function set(origin, path, value) {\n\tconst arr = pathToArr(path)\n\tlet current = origin\n\tfor (let i = 0, len = arr.length; i < len; i++) {\n\t\t\tif (i === len - 1) {\n\t\t\t\t\tcurrent[arr[i]] = value\n\t\t\t} else {\n\t\t\t\t\tcurrent = current[arr[i]]\n\t\t\t}\n\t}\n}\n\nexport function get(origin, path) {\n\tconst arr = pathToArr(path)\n\tlet current = origin\n\tfor (let i = 0, len = arr.length; i < len; i++) {\n\t\tcurrent = current[arr[i]]\n\t}\n\n\treturn current\n}\n\nfunction eventProxy(e) {\n return this._listeners[e.type](e)\n}\n\nexport function bind(el, type, handler){\n\tel._listeners = el._listeners || {}\n\tel._listeners[type] = handler\n\tel.addEventListener(type, eventProxy)\n}\n\nexport function unbind(el, type){\n\tel.removeEventListener(type, eventProxy)\n}\n","import { IS_NON_DIMENSIONAL } from '../constants'\nimport { applyRef } from '../util'\nimport options from '../options'\nimport { extension } from '../extend'\n\n/**\n * Create an element with the given nodeName.\n * @param {string} nodeName The DOM node to create\n * @param {boolean} [isSvg=false] If `true`, creates an element within the SVG\n * namespace.\n * @returns {Element} The created DOM node\n */\nexport function createNode(nodeName, isSvg) {\n /** @type {Element} */\n let node = isSvg\n ? document.createElementNS('http://www.w3.org/2000/svg', nodeName)\n : document.createElement(nodeName)\n node.normalizedNodeName = nodeName\n return node\n}\n\n/**\n * Remove a child node from its parent if attached.\n * @param {Node} node The node to remove\n */\nexport function removeNode(node) {\n let parentNode = node.parentNode\n if (parentNode) parentNode.removeChild(node)\n}\n\n/**\n * Set a named attribute on the given Node, with special behavior for some names\n * and event handlers. If `value` is `null`, the attribute/handler will be\n * removed.\n * @param {Element} node An element to mutate\n * @param {string} name The name/key to set, such as an event or attribute name\n * @param {*} old The last value that was set for this name/node pair\n * @param {*} value An attribute value, such as a function to be used as an\n * event handler\n * @param {boolean} isSvg Are we currently diffing inside an svg?\n * @private\n */\nexport function setAccessor(node, name, old, value, isSvg, component) {\n if (name === 'className') name = 'class'\n\n if (name[0] == 'o' && name[1] == '-'){\n if(extension[name]){\n extension[name](node, value, component)\n }\n } else if (name === 'key') {\n // ignore\n } else if (name === 'ref') {\n applyRef(old, null)\n applyRef(value, node)\n } else if (name === 'class' && !isSvg) {\n node.className = value || ''\n } else if (name === 'style') {\n if (!value || typeof value === 'string' || typeof old === 'string') {\n node.style.cssText = value || ''\n }\n if (value && typeof value === 'object') {\n if (typeof old !== 'string') {\n for (let i in old) if (!(i in value)) node.style[i] = ''\n }\n for (let i in value) {\n node.style[i] =\n typeof value[i] === 'number' && IS_NON_DIMENSIONAL.test(i) === false\n ? value[i] + 'px'\n : value[i]\n }\n }\n } else if (name === 'dangerouslySetInnerHTML') {\n if (value) node.innerHTML = value.__html || ''\n } else if (name[0] == 'o' && name[1] == 'n') {\n let useCapture = name !== (name = name.replace(/Capture$/, ''))\n\t\tlet nameLower = name.toLowerCase()\n\t\tname = (nameLower in node ? nameLower : name).slice(2)\n if (value) {\n if (!old) {\n node.addEventListener(name, eventProxy, useCapture)\n if (name == 'tap') {\n node.addEventListener('touchstart', touchStart, useCapture)\n node.addEventListener('touchend', touchEnd, useCapture)\n }\n }\n } else {\n node.removeEventListener(name, eventProxy, useCapture)\n if (name == 'tap') {\n node.removeEventListener('touchstart', touchStart, useCapture)\n node.removeEventListener('touchend', touchEnd, useCapture)\n }\n }\n ;(node._listeners || (node._listeners = {}))[name] = value\n } else if (node.nodeName === 'INPUT' && name === 'value'){\n node[name] = value == null ? '' : value\n } else if (name !== 'list' && name !== 'type' && name !== 'css' && !isSvg && name in node && value !== '') { //value !== '' fix for selected, disabled, checked with pure element\n // Attempt to set a DOM property to the given value.\n // IE & FF throw for certain property-value combinations.\n try {\n node[name] = value == null ? '' : value\n } catch (e) {}\n if ((value == null || value === false) && name != 'spellcheck')\n node.pureRemoveAttribute ? node.pureRemoveAttribute(name) : node.removeAttribute(name)\n } else {\n let ns = isSvg && name !== (name = name.replace(/^xlink:?/, ''))\n // spellcheck is treated differently than all other boolean values and\n // should not be removed when the value is `false`. See:\n // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-spellcheck\n if (value == null || value === false) {\n if (ns)\n node.removeAttributeNS(\n 'http://www.w3.org/1999/xlink',\n name.toLowerCase()\n )\n else node.pureRemoveAttribute ? node.pureRemoveAttribute(name) : node.removeAttribute(name)\n } else if (typeof value !== 'function') {\n if (ns) {\n node.setAttributeNS(\n 'http://www.w3.org/1999/xlink',\n name.toLowerCase(),\n value\n )\n } else {\n node.pureSetAttribute ? node.pureSetAttribute(name, value) : node.setAttribute(name, value)\n }\n }\n }\n}\n\n/**\n * Proxy an event to hooked event handlers\n * @param {Event} e The event object from the browser\n * @private\n */\nfunction eventProxy(e) {\n return this._listeners[e.type]((options.event && options.event(e)) || e)\n}\n\nfunction touchStart(e) {\n this.___touchX = e.touches[0].pageX\n this.___touchY = e.touches[0].pageY\n this.___scrollTop = document.body.scrollTop\n}\n\nfunction touchEnd(e) {\n if (\n Math.abs(e.changedTouches[0].pageX - this.___touchX) < 30 &&\n Math.abs(e.changedTouches[0].pageY - this.___touchY) < 30 &&\n Math.abs(document.body.scrollTop - this.___scrollTop) < 30\n ) {\n this.dispatchEvent(new CustomEvent('tap', { detail: e }))\n }\n}\n","import { ATTR_KEY } from '../constants'\nimport { isSameNodeType, isNamedNode } from './index'\nimport { createNode, setAccessor } from '../dom/index'\nimport { camelCase, isArray, Fragment } from '../util'\nimport { removeNode } from '../dom/index'\nimport options from '../options'\n\n/** Queue of components that have been mounted and are awaiting componentDidMount */\nexport const mounts = []\n\n/** Diff recursion count, used to track the end of the diff cycle. */\nexport let diffLevel = 0\n\n/** Global flag indicating if the diff is currently within an SVG */\nlet isSvgMode = false\n\n/** Global flag indicating if the diff is performing hydration */\nlet hydrating = false\n\n/** Apply differences in a given vnode (and it's deep children) to a real DOM Node.\n *\t@param {Element} [dom=null]\t\tA DOM node to mutate into the shape of the `vnode`\n *\t@param {VNode} vnode\t\t\tA VNode (with descendants forming a tree) representing the desired DOM structure\n *\t@returns {Element} dom\t\t\tThe created/mutated element\n *\t@private\n */\nexport function diff(dom, vnode, parent, component, updateSelf) {\n // diffLevel having been 0 here indicates initial entry into the diff (not a subdiff)\n let ret\n if (!diffLevel++) {\n // when first starting the diff, check if we're diffing an SVG or within an SVG\n isSvgMode = parent != null && parent.ownerSVGElement !== undefined\n\n // hydration is indicated by the existing element to be diffed not having a prop cache\n hydrating = dom != null && !(ATTR_KEY in dom)\n }\n if(vnode.nodeName === Fragment){\n vnode = vnode.children\n }\n if (isArray(vnode)) {\n if (parent) {\n const styles = parent.querySelectorAll('style')\n styles.forEach(s => {\n parent.removeChild(s)\n })\n innerDiffNode(parent, vnode, hydrating, component, updateSelf)\n\n for (let i = styles.length - 1; i >= 0; i--) {\n parent.firstChild ? parent.insertBefore(styles[i], parent.firstChild) : parent.appendChild(style[i])\n }\n } else {\n ret = []\n vnode.forEach((item, index) => {\n let ele = idiff(index === 0 ? dom : null, item, component, updateSelf)\n ret.push(ele)\n })\n }\n } else {\n if (isArray(dom)) {\n dom.forEach((one, index) => {\n if (index === 0) {\n ret = idiff(one, vnode, component, updateSelf)\n } else {\n recollectNodeTree(one, false)\n }\n })\n } else {\n ret = idiff(dom, vnode, component, updateSelf)\n }\n // append the element if its a new parent\n if (parent && ret.parentNode !== parent) parent.appendChild(ret)\n }\n\n // diffLevel being reduced to 0 means we're exiting the diff\n if (!--diffLevel) {\n hydrating = false\n // invoke queued componentDidMount lifecycle methods\n }\n\n return ret\n}\n\n/** Internals of `diff()`, separated to allow bypassing diffLevel / mount flushing. */\nfunction idiff(dom, vnode, component, updateSelf) {\n if (dom && vnode && dom.props) {\n dom.props.children = vnode.children\n }\n let out = dom,\n prevSvgMode = isSvgMode\n\n // empty values (null, undefined, booleans) render as empty Text nodes\n if (vnode == null || typeof vnode === 'boolean') vnode = ''\n\n // Fast case: Strings & Numbers create/update Text nodes.\n if (typeof vnode === 'string' || typeof vnode === 'number') {\n // update if it's already a Text node:\n if (\n dom &&\n dom.splitText !== undefined &&\n dom.parentNode &&\n (!dom._component || component)\n ) {\n /* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */\n if (dom.nodeValue != vnode) {\n dom.nodeValue = vnode\n }\n } else {\n // it wasn't a Text node: replace it with one and recycle the old Element\n out = document.createTextNode(vnode)\n if (dom) {\n if (dom.parentNode) dom.parentNode.replaceChild(out, dom)\n recollectNodeTree(dom, true)\n }\n }\n\n out[ATTR_KEY] = true\n\n return out\n }\n\n // If the VNode represents a Component, perform a component diff:\n let vnodeName = vnode.nodeName\n if (typeof vnodeName === 'function') {\n for (let key in options.mapping) {\n if (options.mapping[key] === vnodeName) {\n vnodeName = key\n vnode.nodeName = key\n break\n }\n }\n }\n // Tracks entering and exiting SVG namespace when descending through the tree.\n isSvgMode =\n vnodeName === 'svg'\n ? true\n : vnodeName === 'foreignObject'\n ? false\n : isSvgMode\n\n // If there's no existing element or it's the wrong type, create a new one:\n vnodeName = String(vnodeName)\n if (!dom || !isNamedNode(dom, vnodeName)) {\n out = createNode(vnodeName, isSvgMode)\n\n if (dom) {\n // move children into the replacement node\n while (dom.firstChild) out.appendChild(dom.firstChild)\n\n // if the previous Element was mounted into the DOM, replace it inline\n if (dom.parentNode) dom.parentNode.replaceChild(out, dom)\n\n // recycle the old element (skips non-Element node types)\n recollectNodeTree(dom, true)\n }\n }\n\n let fc = out.firstChild,\n props = out[ATTR_KEY],\n vchildren = vnode.children\n\n if (props == null) {\n props = out[ATTR_KEY] = {}\n for (let a = out.attributes, i = a.length; i--;)\n props[a[i].name] = a[i].value\n }\n\n // Optimization: fast-path for elements containing a single TextNode:\n if (\n !hydrating &&\n vchildren &&\n vchildren.length === 1 &&\n typeof vchildren[0] === 'string' &&\n fc != null &&\n fc.splitText !== undefined &&\n fc.nextSibling == null\n ) {\n if (fc.nodeValue != vchildren[0]) {\n fc.nodeValue = vchildren[0]\n }\n }\n // otherwise, if there are existing or new children, diff them:\n else if ((vchildren && vchildren.length) || fc != null) {\n if (!(out.constructor.is == 'WeElement' && out.constructor.noSlot)) {\n innerDiffNode(\n out,\n vchildren,\n hydrating || props.dangerouslySetInnerHTML != null,\n component,\n updateSelf\n )\n }\n }\n\n // Apply attributes/props from VNode to the DOM Element:\n diffAttributes(out, vnode.attributes, props, component, updateSelf)\n if (out.props) {\n out.props.children = vnode.children\n }\n // restore previous SVG mode: (in case we're exiting an SVG namespace)\n isSvgMode = prevSvgMode\n\n return out\n}\n\n/** Apply child and attribute changes between a VNode and a DOM Node to the DOM.\n *\t@param {Element} dom\t\t\tElement whose children should be compared & mutated\n *\t@param {Array} vchildren\t\tArray of VNodes to compare to `dom.childNodes`\n *\t@param {Boolean} isHydrating\tIf `true`, consumes externally created elements similar to hydration\n */\nfunction innerDiffNode(dom, vchildren, isHydrating, component, updateSelf) {\n let originalChildren = dom.childNodes,\n children = [],\n keyed = {},\n keyedLen = 0,\n min = 0,\n len = originalChildren.length,\n childrenLen = 0,\n vlen = vchildren ? vchildren.length : 0,\n j,\n c,\n f,\n vchild,\n child\n\n // Build up a map of keyed children and an Array of unkeyed children:\n if (len !== 0) {\n for (let i = 0; i < len; i++) {\n let child = originalChildren[i],\n props = child[ATTR_KEY],\n key =\n vlen && props\n ? child._component\n ? child._component.__key\n : props.key\n : null\n if (key != null) {\n keyedLen++\n keyed[key] = child\n } else if (\n props ||\n (child.splitText !== undefined\n ? isHydrating\n ? child.nodeValue.trim()\n : true\n : isHydrating)\n ) {\n children[childrenLen++] = child\n }\n }\n }\n\n if (vlen !== 0) {\n for (let i = 0; i < vlen; i++) {\n vchild = vchildren[i]\n child = null\n\n // attempt to find a node based on key matching\n let key = vchild.key\n if (key != null) {\n if (keyedLen && keyed[key] !== undefined) {\n child = keyed[key]\n keyed[key] = undefined\n keyedLen--\n }\n }\n // attempt to pluck a node of the same type from the existing children\n else if (!child && min < childrenLen) {\n for (j = min; j < childrenLen; j++) {\n if (\n children[j] !== undefined &&\n isSameNodeType((c = children[j]), vchild, isHydrating)\n ) {\n child = c\n children[j] = undefined\n if (j === childrenLen - 1) childrenLen--\n if (j === min) min++\n break\n }\n }\n }\n\n // morph the matched/found/created DOM child to match vchild (deep)\n child = idiff(child, vchild, component, updateSelf)\n\n f = originalChildren[i]\n if (child && child !== dom && child !== f) {\n if (f == null) {\n dom.appendChild(child)\n } else if (child === f.nextSibling) {\n removeNode(f)\n } else {\n dom.insertBefore(child, f)\n }\n }\n }\n }\n\n // remove unused keyed children:\n if (keyedLen) {\n for (let i in keyed)\n if (keyed[i] !== undefined) recollectNodeTree(keyed[i], false)\n }\n\n // remove orphaned unkeyed children:\n while (min <= childrenLen) {\n if ((child = children[childrenLen--]) !== undefined)\n recollectNodeTree(child, false)\n }\n}\n\n/** Recursively recycle (or just unmount) a node and its descendants.\n *\t@param {Node} node\t\t\t\t\t\tDOM node to start unmount/removal from\n *\t@param {Boolean} [unmountOnly=false]\tIf `true`, only triggers unmount lifecycle, skips removal\n */\nexport function recollectNodeTree(node, unmountOnly) {\n // If the node's VNode had a ref function, invoke it with null here.\n // (this is part of the React spec, and smart for unsetting references)\n if (node[ATTR_KEY] != null && node[ATTR_KEY].ref) {\n if (typeof node[ATTR_KEY].ref === 'function') {\n node[ATTR_KEY].ref(null)\n } else if (node[ATTR_KEY].ref.current) {\n node[ATTR_KEY].ref.current = null\n }\n }\n\n if (unmountOnly === false || node[ATTR_KEY] == null) {\n removeNode(node)\n }\n\n removeChildren(node)\n}\n\n/** Recollect/unmount all children.\n *\t- we use .lastChild here because it causes less reflow than .firstChild\n *\t- it's also cheaper than accessing the .childNodes Live NodeList\n */\nexport function removeChildren(node) {\n node = node.lastChild\n while (node) {\n let next = node.previousSibling\n recollectNodeTree(node, true)\n node = next\n }\n}\n\n/** Apply differences in attributes from a VNode to the given DOM Element.\n *\t@param {Element} dom\t\tElement with attributes to diff `attrs` against\n *\t@param {Object} attrs\t\tThe desired end-state key-value attribute pairs\n *\t@param {Object} old\t\t\tCurrent/previous attributes (from previous VNode or element's prop cache)\n */\nfunction diffAttributes(dom, attrs, old, component, updateSelf) {\n let name\n //let update = false\n let isWeElement = dom.update\n let oldClone\n if (dom.receiveProps) {\n oldClone = Object.assign({}, old)\n }\n // remove attributes no longer present on the vnode by setting them to undefined\n for (name in old) {\n if (!(attrs && attrs[name] != null) && old[name] != null) {\n setAccessor(dom, name, old[name], (old[name] = undefined), isSvgMode, component)\n if (isWeElement) {\n delete dom.props[name]\n //update = true\n }\n }\n }\n\n // add new & update changed attributes\n for (name in attrs) {\n if (isWeElement && typeof attrs[name] === 'object' && name !== 'ref') {\n if (name === 'style') {\n setAccessor(dom, name, old[name], (old[name] = attrs[name]), isSvgMode, component)\n }\n let ccName = camelCase(name)\n dom.props[ccName] = old[ccName] = attrs[name]\n //update = true\n } else if (\n name !== 'children' &&\n (!(name in old) ||\n attrs[name] !==\n (name === 'value' || name === 'checked' ? dom[name] : old[name]))\n ) {\n setAccessor(dom, name, old[name], attrs[name], isSvgMode, component)\n if (isWeElement) {\n let ccName = camelCase(name)\n dom.props[ccName] = old[ccName] = attrs[name]\n //update = true\n } else {\n old[name] = attrs[name]\n }\n }\n }\n\n if (isWeElement && !updateSelf && dom.parentNode) {\n //__hasChildren is not accuracy when it was empty at first, so add dom.children.length > 0 condition\n //if (update || dom.__hasChildren || dom.children.length > 0 || (dom.store && !dom.store.data)) {\n if (dom.receiveProps(dom.props, oldClone) !== false) {\n dom.update()\n }\n //}\n }\n}\n","/*!\n * https://github.com/Palindrom/JSONPatcherProxy\n * (c) 2017 Starcounter\n * MIT license\n */\n\n/** Class representing a JS Object observer */\nconst JSONPatcherProxy = (function() {\n /**\n * Deep clones your object and returns a new object.\n */\n function deepClone(obj) {\n switch (typeof obj) {\n case 'object':\n return JSON.parse(JSON.stringify(obj)) //Faster than ES5 clone - http://jsperf.com/deep-cloning-of-objects/5\n case 'undefined':\n return null //this is how JSON.stringify behaves for array items\n default:\n return obj //no need to clone primitives\n }\n }\n JSONPatcherProxy.deepClone = deepClone\n\n function escapePathComponent(str) {\n if (str.indexOf('/') == -1 && str.indexOf('~') == -1) return str\n return str.replace(/~/g, '~0').replace(/\\//g, '~1')\n }\n JSONPatcherProxy.escapePathComponent = escapePathComponent\n\n /**\n * Walk up the parenthood tree to get the path\n * @param {JSONPatcherProxy} instance\n * @param {Object} obj the object you need to find its path\n */\n function findObjectPath(instance, obj) {\n const pathComponents = []\n let parentAndPath = instance.parenthoodMap.get(obj)\n while (parentAndPath && parentAndPath.path) {\n // because we're walking up-tree, we need to use the array as a stack\n pathComponents.unshift(parentAndPath.path)\n parentAndPath = instance.parenthoodMap.get(parentAndPath.parent)\n }\n if (pathComponents.length) {\n const path = pathComponents.join('/')\n return '/' + path\n }\n return ''\n }\n /**\n * A callback to be used as th proxy set trap callback.\n * It updates parenthood map if needed, proxifies nested newly-added objects, calls default callbacks with the changes occurred.\n * @param {JSONPatcherProxy} instance JSONPatcherProxy instance\n * @param {Object} target the affected object\n * @param {String} key the effect property's name\n * @param {Any} newValue the value being set\n */\n function setTrap(instance, target, key, newValue) {\n const parentPath = findObjectPath(instance, target)\n\n const destinationPropKey = parentPath + '/' + escapePathComponent(key)\n\n if (instance.proxifiedObjectsMap.has(newValue)) {\n const newValueOriginalObject = instance.proxifiedObjectsMap.get(newValue)\n\n instance.parenthoodMap.set(newValueOriginalObject.originalObject, {\n parent: target,\n path: key\n })\n }\n /*\n mark already proxified values as inherited.\n rationale: proxy.arr.shift()\n will emit\n {op: replace, path: '/arr/1', value: arr_2}\n {op: remove, path: '/arr/2'}\n\n by default, the second operation would revoke the proxy, and this renders arr revoked.\n That's why we need to remember the proxies that are inherited.\n */\n const revokableInstance = instance.proxifiedObjectsMap.get(newValue)\n /*\n Why do we need to check instance.isProxifyingTreeNow?\n\n We need to make sure we mark revokables as inherited ONLY when we're observing,\n because throughout the first proxification, a sub-object is proxified and then assigned to\n its parent object. This assignment of a pre-proxified object can fool us into thinking\n that it's a proxified object moved around, while in fact it's the first assignment ever.\n\n Checking isProxifyingTreeNow ensures this is not happening in the first proxification,\n but in fact is is a proxified object moved around the tree\n */\n if (revokableInstance && !instance.isProxifyingTreeNow) {\n revokableInstance.inherited = true\n }\n\n // if the new value is an object, make sure to watch it\n if (\n newValue &&\n typeof newValue == 'object' &&\n !instance.proxifiedObjectsMap.has(newValue)\n ) {\n instance.parenthoodMap.set(newValue, {\n parent: target,\n path: key\n })\n newValue = instance._proxifyObjectTreeRecursively(target, newValue, key)\n }\n // let's start with this operation, and may or may not update it later\n const operation = {\n op: 'remove',\n path: destinationPropKey\n }\n if (typeof newValue == 'undefined') {\n // applying De Morgan's laws would be a tad faster, but less readable\n if (!Array.isArray(target) && !target.hasOwnProperty(key)) {\n // `undefined` is being set to an already undefined value, keep silent\n return Reflect.set(target, key, newValue)\n }\n // when array element is set to `undefined`, should generate replace to `null`\n if (Array.isArray(target)) {\n // undefined array elements are JSON.stringified to `null`\n ;(operation.op = 'replace'), (operation.value = null)\n }\n const oldValue = instance.proxifiedObjectsMap.get(target[key])\n // was the deleted a proxified object?\n if (oldValue) {\n instance.parenthoodMap.delete(target[key])\n instance.disableTrapsForProxy(oldValue)\n instance.proxifiedObjectsMap.delete(oldValue)\n }\n } else {\n if (Array.isArray(target) && !Number.isInteger(+key.toString())) {\n /* array props (as opposed to indices) don't emit any patches, to avoid needless `length` patches */\n if (key != 'length') {\n console.warn(\n 'JSONPatcherProxy noticed a non-integer prop was set for an array. This will not emit a patch'\n )\n }\n return Reflect.set(target, key, newValue)\n }\n operation.op = 'add'\n if (target.hasOwnProperty(key)) {\n if (typeof target[key] !== 'undefined' || Array.isArray(target)) {\n operation.op = 'replace' // setting `undefined` array elements is a `replace` op\n }\n }\n operation.value = newValue\n }\n operation.oldValue = target[key]\n const reflectionResult = Reflect.set(target, key, newValue)\n instance.defaultCallback(operation)\n return reflectionResult\n }\n /**\n * A callback to be used as th proxy delete trap callback.\n * It updates parenthood map if needed, calls default callbacks with the changes occurred.\n * @param {JSONPatcherProxy} instance JSONPatcherProxy instance\n * @param {Object} target the effected object\n * @param {String} key the effected property's name\n */\n function deleteTrap(instance, target, key) {\n if (typeof target[key] !== 'undefined') {\n const parentPath = findObjectPath(instance, target)\n const destinationPropKey = parentPath + '/' + escapePathComponent(key)\n\n const revokableProxyInstance = instance.proxifiedObjectsMap.get(\n target[key]\n )\n\n if (revokableProxyInstance) {\n if (revokableProxyInstance.inherited) {\n /*\n this is an inherited proxy (an already proxified object that was moved around),\n we shouldn't revoke it, because even though it was removed from path1, it is still used in path2.\n And we know that because we mark moved proxies with `inherited` flag when we move them\n\n it is a good idea to remove this flag if we come across it here, in deleteProperty trap.\n We DO want to revoke the proxy if it was removed again.\n */\n revokableProxyInstance.inherited = false\n } else {\n instance.parenthoodMap.delete(revokableProxyInstance.originalObject)\n instance.disableTrapsForProxy(revokableProxyInstance)\n instance.proxifiedObjectsMap.delete(target[key])\n }\n }\n const reflectionResult = Reflect.deleteProperty(target, key)\n\n instance.defaultCallback({\n op: 'remove',\n path: destinationPropKey\n })\n\n return reflectionResult\n }\n }\n /* pre-define resume and pause functions to enhance constructors performance */\n function resume() {\n this.defaultCallback = operation => {\n this.isRecording && this.patches.push(operation)\n this.userCallback && this.userCallback(operation)\n }\n this.isObserving = true\n }\n function pause() {\n this.defaultCallback = () => {}\n this.isObserving = false\n }\n /**\n * Creates an instance of JSONPatcherProxy around your object of interest `root`.\n * @param {Object|Array} root - the object you want to wrap\n * @param {Boolean} [showDetachedWarning = true] - whether to log a warning when a detached sub-object is modified @see {@link https://github.com/Palindrom/JSONPatcherProxy#detached-objects}\n * @returns {JSONPatcherProxy}\n * @constructor\n */\n function JSONPatcherProxy(root, showDetachedWarning) {\n this.isProxifyingTreeNow = false\n this.isObserving = false\n this.proxifiedObjectsMap = new Map()\n this.parenthoodMap = new Map()\n // default to true\n if (typeof showDetachedWarning !== 'boolean') {\n showDetachedWarning = true\n }\n\n this.showDetachedWarning = showDetachedWarning\n this.originalObject = root\n this.cachedProxy = null\n this.isRecording = false\n this.userCallback\n /**\n * @memberof JSONPatcherProxy\n * Restores callback back to the original one provided to `observe`.\n */\n this.resume = resume.bind(this)\n /**\n * @memberof JSONPatcherProxy\n * Replaces your callback with a noop function.\n */\n this.pause = pause.bind(this)\n }\n\n JSONPatcherProxy.prototype.generateProxyAtPath = function(parent, obj, path) {\n if (!obj) {\n return obj\n }\n const traps = {\n set: (target, key, value, receiver) =>\n setTrap(this, target, key, value, receiver),\n deleteProperty: (target, key) => deleteTrap(this, target, key)\n }\n const revocableInstance = Proxy.revocable(obj, traps)\n // cache traps object to disable them later.\n revocableInstance.trapsInstance = traps\n revocableInstance.originalObject = obj\n\n /* keeping track of object's parent and path */\n\n this.parenthoodMap.set(obj, { parent, path })\n\n /* keeping track of all the proxies to be able to revoke them later */\n this.proxifiedObjectsMap.set(revocableInstance.proxy, revocableInstance)\n return revocableInstance.proxy\n }\n // grab tree's leaves one by one, encapsulate them into a proxy and return\n JSONPatcherProxy.prototype._proxifyObjectTreeRecursively = function(\n parent,\n root,\n path\n ) {\n for (let key in root) {\n if (root.hasOwnProperty(key)) {\n if (root[key] instanceof Object) {\n root[key] = this._proxifyObjectTreeRecursively(\n root,\n root[key],\n escapePathComponent(key)\n )\n }\n }\n }\n return this.generateProxyAtPath(parent, root, path)\n }\n // this function is for aesthetic purposes\n JSONPatcherProxy.prototype.proxifyObjectTree = function(root) {\n /*\n while proxyifying object tree,\n the proxyifying operation itself is being\n recorded, which in an unwanted behavior,\n that's why we disable recording through this\n initial process;\n */\n this.pause()\n this.isProxifyingTreeNow = true\n const proxifiedObject = this._proxifyObjectTreeRecursively(\n undefined,\n root,\n ''\n )\n /* OK you can record now */\n this.isProxifyingTreeNow = false\n this.resume()\n return proxifiedObject\n }\n /**\n * Turns a proxified object into a forward-proxy object; doesn't emit any patches anymore, like a normal object\n * @param {Proxy} proxy - The target proxy object\n */\n JSONPatcherProxy.prototype.disableTrapsForProxy = function(\n revokableProxyInstance\n ) {\n if (this.showDetachedWarning) {\n const message =\n \"You're accessing an object that is detached from the observedObject tree, see https://github.com/Palindrom/JSONPatcherProxy#detached-objects\"\n\n revokableProxyInstance.trapsInstance.set = (\n targetObject,\n propKey,\n newValue\n ) => {\n console.warn(message)\n return Reflect.set(targetObject, propKey, newValue)\n }\n revokableProxyInstance.trapsInstance.set = (\n targetObject,\n propKey,\n newValue\n ) => {\n console.warn(message)\n return Reflect.set(targetObject, propKey, newValue)\n }\n revokableProxyInstance.trapsInstance.deleteProperty = (\n targetObject,\n propKey\n ) => {\n return Reflect.deleteProperty(targetObject, propKey)\n }\n } else {\n delete revokableProxyInstance.trapsInstance.set\n delete revokableProxyInstance.trapsInstance.get\n delete revokableProxyInstance.trapsInstance.deleteProperty\n }\n }\n /**\n * Proxifies the object that was passed in the constructor and returns a proxified mirror of it. Even though both parameters are options. You need to pass at least one of them.\n * @param {Boolean} [record] - whether to record object changes to a later-retrievable patches array.\n * @param {Function} [callback] - this will be synchronously called with every object change with a single `patch` as the only parameter.\n */\n JSONPatcherProxy.prototype.observe = function(record, callback) {\n if (!record && !callback) {\n throw new Error('You need to either record changes or pass a callback')\n }\n this.isRecording = record\n this.userCallback = callback\n /*\n I moved it here to remove it from `unobserve`,\n this will also make the constructor faster, why initiate\n the array before they decide to actually observe with recording?\n They might need to use only a callback.\n */\n if (record) this.patches = []\n this.cachedProxy = this.proxifyObjectTree(this.originalObject)\n return this.cachedProxy\n }\n /**\n * If the observed is set to record, it will synchronously return all the patches and empties patches array.\n */\n JSONPatcherProxy.prototype.generate = function() {\n if (!this.isRecording) {\n throw new Error('You should set record to true to get patches later')\n }\n return this.patches.splice(0, this.patches.length)\n }\n /**\n * Revokes all proxies rendering the observed object useless and good for garbage collection @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/revocable}\n */\n JSONPatcherProxy.prototype.revoke = function() {\n this.proxifiedObjectsMap.forEach(el => {\n el.revoke()\n })\n }\n /**\n * Disables all proxies' traps, turning the observed object into a forward-proxy object, like a normal object that you can modify silently.\n */\n JSONPatcherProxy.prototype.disableTraps = function() {\n this.proxifiedObjectsMap.forEach(this.disableTrapsForProxy, this)\n }\n return JSONPatcherProxy\n})()\n\nexport default JSONPatcherProxy\n","import { diff } from './vdom/diff'\nimport JSONProxy from './proxy'\nimport { getUse } from './util'\nimport options from './options'\n\nexport function render(vnode, parent, store) {\n\tparent = typeof parent === 'string' ? document.querySelector(parent) : parent\n\tif (store) {\n\t\tif (store.data) {\n\t\t\tobserveStore(store)\n\t\t} else {\n\t\t\toptions.isMultiStore = true\n\t\t\t//Multi-store injection\n\t\t\tfor (let key in store) {\n\t\t\t\tobserveStore(store[key], key)\n\t\t\t}\n\t\t}\n\t\tparent.store = store\n\t}\n\treturn diff(null, vnode, parent, false)\n}\n\nfunction observeStore(store, key) {\n\tstore.instances = []\n\tstore.updateSelfInstances = []\n\textendStoreUpate(store, key)\n\n\tstore.data = new JSONProxy(store.data).observe(false, function (patch) {\n\t\tconst patchs = {}\n\t\tif (patch.op === 'remove') {\n\t\t\t// fix arr splice\n\t\t\tconst kv = getArrayPatch(patch.path, store)\n\t\t\tpatchs[kv.k] = kv.v\n\n\t\t\tupdate(patchs, store)\n\n\t\t} else {\n\t\t\tconst key = fixPath(patch.path)\n\t\t\tpatchs[key] = patch.value\n\n\t\t\tupdate(patchs, store)\n\n\t\t}\n\t})\n}\n\nfunction update(patch, store) {\n\tstore.update(patch)\n}\n\nfunction extendStoreUpate(store, key) {\n\tstore.update = function (patch) {\n\t\tif (Object.keys(patch).length > 0) {\n\t\t\tthis.instances.forEach(instance => {\n\t\t\t\tif (key) {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updatePath && instance._updatePath[key] && needUpdate(patch, instance._updatePath[key]))) {\n\t\t\t\t\t\tif (instance.use) {\n\t\t\t\t\t\t\tgetUse(store.data, (typeof instance.use === 'function' ? instance.use() : instance.use)[key], instance.using, key)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.update()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updatePath && needUpdate(patch, instance._updatePath))) {\n\t\t\t\t\t\tif (instance.use) {\n\t\t\t\t\t\t\tinstance.using = getUse(store.data, typeof instance.use === 'function' ? instance.use() : instance.use)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.update()\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t})\n\n\t\t\tthis.updateSelfInstances.forEach(instance => {\n\t\t\t\tif (key) {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updateSelfPath && instance._updateSelfPath[key] && needUpdate(patch, instance._updateSelfPath[key]))) {\n\t\t\t\t\t\tif (instance.useSelf) {\n\t\t\t\t\t\t\tgetUse(store.data, (typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)[key], instance.usingSelf, key)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.updateSelf()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (instance._updateSelfPath && needUpdate(patch, instance._updateSelfPath)) {\n\t\t\t\t\t\tinstance.usingSelf = getUse(store.data, typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)\n\t\t\t\t\t\tinstance.updateSelf()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\tthis.onChange && this.onChange(patch)\n\t\t}\n\t}\n}\n\n\nexport function needUpdate(diffResult, updatePath) {\n\tfor (let keyA in diffResult) {\n\t\tif (updatePath[keyA]) {\n\t\t\treturn true\n\t\t}\n\t\tfor (let keyB in updatePath) {\n\t\t\tif (includePath(keyA, keyB)) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t}\n\treturn false\n}\n\nfunction includePath(pathA, pathB) {\n\tif (pathA.indexOf(pathB) === 0) {\n\t\tconst next = pathA.substr(pathB.length, 1)\n\t\tif (next === '[' || next === '.') {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nexport function fixPath(path) {\n\tlet mpPath = ''\n\tconst arr = path.replace('/', '').split('/')\n\tarr.forEach((item, index) => {\n\t\tif (index) {\n\t\t\tif (isNaN(Number(item))) {\n\t\t\t\tmpPath += '.' + item\n\t\t\t} else {\n\t\t\t\tmpPath += '[' + item + ']'\n\t\t\t}\n\t\t} else {\n\t\t\tmpPath += item\n\t\t}\n\t})\n\treturn mpPath\n}\n\nfunction getArrayPatch(path, store) {\n\tconst arr = path.replace('/', '').split('/')\n\tlet current = store.data[arr[0]]\n\tfor (let i = 1, len = arr.length; i < len - 1; i++) {\n\t\tcurrent = current[arr[i]]\n\t}\n\treturn {\n\t\tk: fixArrPath(path),\n\t\tv: current\n\t}\n}\n\nfunction fixArrPath(path) {\n\tlet mpPath = ''\n\tconst arr = path.replace('/', '').split('/')\n\tconst len = arr.length\n\tarr.forEach((item, index) => {\n\t\tif (index < len - 1) {\n\t\t\tif (index) {\n\t\t\t\tif (isNaN(Number(item))) {\n\t\t\t\t\tmpPath += '.' + item\n\t\t\t\t} else {\n\t\t\t\t\tmpPath += '[' + item + ']'\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmpPath += item\n\t\t\t}\n\t\t}\n\t})\n\treturn mpPath\n}\n","import WeElement from './we-element'\nimport options from './options'\n\nexport function define(name, ctor, config) {\n if (options.mapping[name]) {\n return\n }\n if (ctor.is === 'WeElement') {\n customElements.define(name, ctor)\n options.mapping[name] = ctor\n\n } else {\n \n if (typeof config === 'string') {\n config = { css: config }\n } else {\n config = config || { }\n }\n\n class Ele extends WeElement {\n\n static css = config.css\n\n static propTypes = config.propTypes\n\n static defaultProps = config.defaultProps\n\n render() {\n return ctor.call(this, this)\n }\n\n receiveProps() {\n if (config.receiveProps) {\n return config.receiveProps.apply(this, arguments)\n }\n }\n }\n\n const eleHooks = ['install', 'installed', 'uninstall', 'beforeUpdate', 'updated', 'beforeRender', 'rendered'],\n storeHelpers = ['use', 'useSelf']\n\n eleHooks.forEach(hook => {\n if (config[hook]) {\n Ele.prototype[hook] = function () {\n config[hook].apply(this, arguments)\n }\n }\n })\n\n storeHelpers.forEach(func => {\n if (config[func]) {\n Ele.prototype[func] = function () {\n return typeof config[func] === 'function'\n ? config[func].apply(this, arguments)\n : config[func]\n }\n }\n })\n\n customElements.define(name, Ele)\n options.mapping[name] = Ele\n }\n}\n\n\n\n","import { extend } from './util'\nimport { h } from './h'\n\n/**\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\n * @param {VNode} vnode\t\tThe virtual DOM element to clone\n * @param {Object} props\tAttributes/props to add when cloning\n * @param {VNode} rest\t\tAny additional arguments will be used as replacement children.\n */\nexport function cloneElement(vnode, props) {\n return h(\n vnode.nodeName,\n extend(extend({}, vnode.attributes), props),\n arguments.length > 2 ? [].slice.call(arguments, 2) : vnode.children\n )\n}\n","export function getHost(ele) {\n let p = ele.parentNode\n while (p) {\n if (p.host) {\n return p.host\n } else if (p.shadowRoot && p.shadowRoot.host) {\n return p.shadowRoot.host\n } else {\n p = p.parentNode\n }\n }\n}\n","/**\n * classNames based on https://github.com/JedWatson/classnames\n * by Jed Watson\n * Licensed under the MIT License\n * https://github.com/JedWatson/classnames/blob/master/LICENSE\n * modified by dntzhang\n */\n\nvar hasOwn = {}.hasOwnProperty\n\nexport function classNames() {\n var classes = []\n\n for (var i = 0; i < arguments.length; i++) {\n var arg = arguments[i]\n if (!arg) continue\n\n var argType = typeof arg\n\n if (argType === 'string' || argType === 'number') {\n classes.push(arg)\n } else if (Array.isArray(arg) && arg.length) {\n var inner = classNames.apply(null, arg)\n if (inner) {\n classes.push(inner)\n }\n } else if (argType === 'object') {\n for (var key in arg) {\n if (hasOwn.call(arg, key) && arg[key]) {\n classes.push(key)\n }\n }\n }\n }\n\n return classes.join(' ')\n}\n\nexport function extractClass() {\n const [props, ...args] = Array.prototype.slice.call(arguments, 0)\n if (props.class) {\n args.unshift(props.class)\n delete props.class\n } else if (props.className) {\n args.unshift(props.className)\n delete props.className\n }\n if (args.length > 0) {\n return { class: classNames.apply(null, args) }\n }\n}\n","export function o(obj){\n return JSON.stringify(obj)\n}","import { h, h as createElement } from './h'\nimport options from './options'\nimport WeElement from './we-element'\nimport { render } from './render'\nimport { define } from './define'\nimport { tag } from './tag'\nimport { cloneElement } from './clone-element'\nimport { getHost } from './get-host'\nimport { rpx } from './rpx'\nimport { classNames, extractClass } from './class'\nimport { o } from './o'\nimport htm from 'htm'\nimport { extend, get, set, bind, unbind } from './extend'\nimport JSONProxy from './proxy'\nimport { Fragment } from './util'\n\nh.f = Fragment\n\nconst html = htm.bind(h)\n\nfunction createRef() {\n return {}\n}\n\nconst $ = {}\nconst Component = WeElement\nconst defineElement = define\nconst elements = options.mapping\n\nconst omi = {\n tag,\n WeElement,\n Component,\n render,\n h,\n createElement,\n options,\n define,\n cloneElement,\n getHost,\n rpx,\n defineElement,\n classNames,\n extractClass,\n createRef,\n html,\n htm,\n o,\n\telements,\n\t$,\n\textend,\n\tget,\n\tset,\n\tbind,\n\tunbind,\n JSONProxy\n}\n\noptions.root.Omi = omi\noptions.root.omi = omi\noptions.root.Omi.version = '6.15.7'\n\nexport default omi\n\nexport {\n tag,\n WeElement,\n Component,\n render,\n h,\n createElement,\n options,\n define,\n cloneElement,\n getHost,\n rpx,\n defineElement,\n classNames,\n extractClass,\n createRef,\n html,\n htm,\n o,\n\telements,\n\t$,\n\textend,\n\tget,\n\tset,\n\tbind,\n\tunbind,\n JSONProxy\n}\n","function getGlobal() {\n if (\n typeof global !== 'object' ||\n !global ||\n global.Math !== Math ||\n global.Array !== Array\n ) {\n return (\n self ||\n window ||\n global ||\n (function() {\n return this\n })()\n )\n }\n return global\n}\n\n/** Global options\n *\t@public\n *\t@namespace options {Object}\n */\nexport default {\n store: null,\n root: getGlobal(),\n\tmapping: {},\n\tisMultiStore: false\n}\n","import {\n\tcssToDom,\n\tisArray,\n\tgetUse,\n\thyphenate,\n\tgetValByPath,\n\tremoveItem\n} from './util'\nimport { diff } from './vdom/diff'\nimport options from './options'\nimport { getPath } from './util'\n\nlet id = 0\n\nexport default class WeElement extends HTMLElement {\n\tstatic is = 'WeElement'\n\n\tconstructor() {\n\t\tsuper()\n\t\tthis.props = Object.assign({},\n\t\t\tthis.constructor.defaultProps\n\t\t)\n\t\tthis.elementId = id++\n\t}\n\n\tconnectedCallback() {\n\t\tlet p = this.parentNode\n\t\twhile (p && !this.store) {\n\t\t\tthis.store = p.store\n\t\t\tp = p.parentNode || p.host\n\t\t}\n\n\t\tif (this.use) {\n\t\t\tlet use\n\t\t\tif (typeof this.use === 'function') {\n\t\t\t\tuse = this.use()\n\t\t\t} else {\n\t\t\t\tuse = this.use\n\t\t\t}\n\n\n\t\t\tif (options.isMultiStore) {\n\t\t\t\tlet _updatePath = {}\n\t\t\t\tlet using = {}\n\t\t\t\tfor (let storeName in use) {\n\t\t\t\t\t_updatePath[storeName] = {}\n\t\t\t\t\tusing[storeName] = {}\n\t\t\t\t\tgetPath(use[storeName], _updatePath, storeName)\n\t\t\t\t\tgetUse(this.store[storeName].data, use[storeName], using, storeName)\n\t\t\t\t\tthis.store[storeName].instances.push(this)\n\t\t\t\t}\n\t\t\t\tthis.using = using\n\t\t\t\tthis._updatePath = _updatePath\n\t\t\t} else {\n\t\t\t\tthis._updatePath = getPath(use)\n\t\t\t\tthis.using = getUse(this.store.data, use)\n\t\t\t\tthis.store.instances.push(this)\n\t\t\t}\n\t\t}\n\t\tif (this.useSelf) {\n\t\t\tconst use = typeof this.useSelf === 'function' ? this.useSelf() : this.useSelf\n\t\t\tif (options.isMultiStore) {\n\t\t\t\tlet _updatePath = {}\n\t\t\t\tlet using = {}\n\t\t\t\tfor (let storeName in use) {\n\t\t\t\t\tgetPath(use[storeName], _updatePath, storeName)\n\t\t\t\t\tgetUse(this.store[storeName].data, use[storeName], using, storeName)\n\t\t\t\t\tthis.store[storeName].updateSelfInstances.push(this)\n\t\t\t\t}\n\t\t\t\tthis.usingSelf = using\n\t\t\t\tthis._updateSelfPath = _updatePath\n\t\t\t} else {\n\t\t\t\tthis._updateSelfPath = getPath(use)\n\t\t\t\tthis.usingSelf = getUse(this.store.data, use)\n\t\t\t\tthis.store.updateSelfInstances.push(this)\n\t\t\t}\n\t\t}\n\t\tthis.attrsToProps()\n\t\tthis.beforeInstall()\n\t\tthis.install()\n\t\tthis.afterInstall()\n\n\t\tlet shadowRoot\n\t\tif (!this.shadowRoot) {\n\t\t\tshadowRoot = this.attachShadow({\n\t\t\t\tmode: 'open'\n\t\t\t})\n\t\t} else {\n\t\t\tshadowRoot = this.shadowRoot\n\t\t\tlet fc\n\t\t\twhile ((fc = shadowRoot.firstChild)) {\n\t\t\t\tshadowRoot.removeChild(fc)\n\t\t\t}\n\t\t}\n\n\t\tif (this.constructor.css) {\n\t\t\tshadowRoot.appendChild(cssToDom(this.constructor.css))\n\t\t} else if (this.css) {\n\t\t\tshadowRoot.appendChild(cssToDom(typeof this.css === 'function' ? this.css() : this.css))\n\t\t}\n\t\tthis.beforeRender()\n\t\toptions.afterInstall && options.afterInstall(this)\n\n\n\t\tconst rendered = this.render(this.props, this.store)\n\t\tthis.__hasChildren = Object.prototype.toString.call(rendered) === '[object Array]' && rendered.length > 0\n\n\t\tthis.rootNode = diff(\n\t\t\tnull,\n\t\t\trendered,\n\t\t\tnull,\n\t\t\tthis\n\t\t)\n\t\tthis.rendered()\n\n\t\tif (this.props.css) {\n\t\t\tthis._customStyleElement = cssToDom(this.props.css)\n\t\t\tthis._customStyleContent = this.props.css\n\t\t\tshadowRoot.appendChild(this._customStyleElement)\n\t\t}\n\n\t\tif (isArray(this.rootNode)) {\n\t\t\tthis.rootNode.forEach(function (item) {\n\t\t\t\tshadowRoot.appendChild(item)\n\t\t\t})\n\t\t} else {\n\t\t\tshadowRoot.appendChild(this.rootNode)\n\t\t}\n\t\tthis.installed()\n\t\tthis._isInstalled = true\n\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.uninstall()\n\t\tthis._isInstalled = false\n\t\tif (this.store) {\n\t\t\tif(options.isMultiStore){\n\t\t\t\tfor(let key in this.store){\n\t\t\t\t\tconst current = this.store[key]\n\t\t\t\t\tremoveItem(this, current.instances)\n\t\t\t\t removeItem(this, current.updateSelfInstances)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tremoveItem(this, this.store.instances)\n\t\t\t\tremoveItem(this, this.store.updateSelfInstances)\n\t\t\t}\n\t\t}\n\t}\n\n\tupdate(ignoreAttrs, updateSelf) {\n\t\tthis._willUpdate = true\n\t\tthis.beforeUpdate()\n\t\tthis.beforeRender()\n\t\t//fix null !== undefined\n\t\tif (this._customStyleContent != this.props.css) {\n\t\t\tthis._customStyleContent = this.props.css\n\t\t\tthis._customStyleElement.textContent = this._customStyleContent\n\t\t}\n\t\tthis.attrsToProps(ignoreAttrs)\n\n\t\tconst rendered = this.render(this.props, this.store)\n\t\tthis.rendered()\n\t\tthis.__hasChildren = this.__hasChildren || (Object.prototype.toString.call(rendered) === '[object Array]' && rendered.length > 0)\n\n\t\tthis.rootNode = diff(\n\t\t\tthis.rootNode,\n\t\t\trendered,\n\t\t\tthis.shadowRoot,\n\t\t\tthis,\n\t\t\tupdateSelf\n\t\t)\n\t\tthis._willUpdate = false\n\t\tthis.updated()\n\n\t}\n\n\tupdateSelf(ignoreAttrs) {\n\t\tthis.update(ignoreAttrs, true)\n\t}\n\n\tremoveAttribute(key) {\n\t\tsuper.removeAttribute(key)\n\t\t//Avoid executing removeAttribute methods before connectedCallback\n\t\tthis._isInstalled && this.update()\n\t}\n\n\tsetAttribute(key, val) {\n\t\tif (val && typeof val === 'object') {\n\t\t\tsuper.setAttribute(key, JSON.stringify(val))\n\t\t} else {\n\t\t\tsuper.setAttribute(key, val)\n\t\t}\n\t\t//Avoid executing setAttribute methods before connectedCallback\n\t\tthis._isInstalled && this.update()\n\t}\n\n\tpureRemoveAttribute(key) {\n\t\tsuper.removeAttribute(key)\n\t}\n\n\tpureSetAttribute(key, val) {\n\t\tsuper.setAttribute(key, val)\n\t}\n\n\tattrsToProps(ignoreAttrs) {\n\t\tconst ele = this\n\t\tif (ele.normalizedNodeName || ignoreAttrs) return\n\t\tele.props['css'] = ele.getAttribute('css')\n\t\tconst attrs = this.constructor.propTypes\n\t\tif (!attrs) return\n\t\tObject.keys(attrs).forEach(key => {\n\t\t\tconst type = attrs[key]\n\t\t\tconst val = ele.getAttribute(hyphenate(key))\n\t\t\tif (val !== null) {\n\t\t\t\tswitch (type) {\n\t\t\t\t\tcase String:\n\t\t\t\t\t\tele.props[key] = val\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Number:\n\t\t\t\t\t\tele.props[key] = Number(val)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Boolean:\n\t\t\t\t\t\tif (val === 'false' || val === '0') {\n\t\t\t\t\t\t\tele.props[key] = false\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tele.props[key] = true\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Array:\n\t\t\t\t\tcase Object:\n\t\t\t\t\t\tif (val[0] === ':') {\n\t\t\t\t\t\t\tele.props[key] = getValByPath(val.substr(1), Omi.$)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tele.props[key] = JSON.parse(val\n\t\t\t\t\t\t\t\t.replace(/(['\"])?([a-zA-Z0-9_-]+)(['\"])?:([^\\/])/g, '\"$2\":$4')\n\t\t\t\t\t\t\t\t.replace(/'([\\s\\S]*?)'/g, '\"$1\"')\n\t\t\t\t\t\t\t\t.replace(/,(\\s*})/g, '$1')\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (ele.constructor.defaultProps && ele.constructor.defaultProps.hasOwnProperty(key)) {\n\t\t\t\t\tele.props[key] = ele.constructor.defaultProps[key]\n\t\t\t\t} else {\n\t\t\t\t\tele.props[key] = null\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\tfire(name, data) {\n\t\tthis.dispatchEvent(new CustomEvent(name, {\n\t\t\tdetail: data\n\t\t}))\n\t}\n\n\tbeforeInstall() {}\n\n\tinstall() {}\n\n\tafterInstall() {}\n\n\tinstalled() {}\n\n\tuninstall() {}\n\n\tbeforeUpdate() {}\n\n\tupdated() {}\n\n\tbeforeRender() {}\n\n\trendered() {}\n\n\treceiveProps() {}\n\n}\n","var n=function(t,r,u,e){for(var p=1;p\"===t?(a(),u=1):u&&(\"=\"===t?(u=4,r=e,e=\"\"):\"/\"===t?(a(),3===u&&(s=s[0]),u=s,(s=s[0]).push(u,4),u=0):\" \"===t||\"\\t\"===t||\"\\n\"===t||\"\\r\"===t?(a(),u=2):e+=t)}return a(),s},r=\"function\"==typeof Map,u=r?new Map:{},e=r?function(n){var r=u.get(n);return r||u.set(n,r=t(n)),r}:function(n){for(var r=\"\",e=0;e1?r:r[0]}\n"]} \ No newline at end of file diff --git a/packages/omi/package.json b/packages/omi/package.json index 756dc4aa55..4ebead1c88 100644 --- a/packages/omi/package.json +++ b/packages/omi/package.json @@ -1,6 +1,6 @@ { "name": "omi", - "version": "6.15.6", + "version": "6.15.7", "description": "Front End Cross-Frameworks Framework.", "main": "dist/omi.js", "jsnext:main": "dist/omi.esm.js", diff --git a/packages/omi/src/dom/index.js b/packages/omi/src/dom/index.js index 527a417d12..33bb3320b6 100644 --- a/packages/omi/src/dom/index.js +++ b/packages/omi/src/dom/index.js @@ -73,7 +73,8 @@ export function setAccessor(node, name, old, value, isSvg, component) { if (value) node.innerHTML = value.__html || '' } else if (name[0] == 'o' && name[1] == 'n') { let useCapture = name !== (name = name.replace(/Capture$/, '')) - name = name.toLowerCase().substring(2) + let nameLower = name.toLowerCase() + name = (nameLower in node ? nameLower : name).slice(2) if (value) { if (!old) { node.addEventListener(name, eventProxy, useCapture) diff --git a/packages/omi/src/omi.js b/packages/omi/src/omi.js index ed6536c18c..a76e3639a0 100644 --- a/packages/omi/src/omi.js +++ b/packages/omi/src/omi.js @@ -58,7 +58,7 @@ const omi = { options.root.Omi = omi options.root.omi = omi -options.root.Omi.version = '6.15.6' +options.root.Omi.version = '6.15.7' export default omi