{"version":3,"sources":["../src/util.js","../src/h.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","../node_modules/_construct-style-sheets-polyfill@3.0.0-0@construct-style-sheets-polyfill/dist/adoptedStyleSheets.js","../src/options.js","../src/we-element.js","../src/o.js","../src/omi.js"],"names":["cssToDom","css","node","document","createElement","textContent","camelCase","str","replace","$","$1","toUpperCase","Fragment","props","children","extend","obj","i","applyRef","ref","value","current","isArray","Object","prototype","toString","call","getUse","data","paths","out","name","forEach","path","index","isPath","getTargetByPath","key","keys","tempPath","tempVal","args","push","apply","pathToArr","split","origin","arr","len","length","hyphenate","hyphenateRE","toLowerCase","getValByPath","prop","getPath","result","item","removeItem","splice","h","nodeName","attributes","lastSimple","child","simple","arguments","stack","pop","undefined","String","p","options","vnode","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","constructor","is","bindEvent","innerHTML","pureRemoveAttribute","removeAttribute","ns","removeAttributeNS","pureSetAttribute","setAttribute","useCapture","event","nameLower","eventProxy$1","ret","diffLevel","isSvgMode","parent","ownerSVGElement","dom","innerDiffNode","updateSelf","ele","one","idiff","recollectNodeTree","parentNode","appendChild","nodeValue","createTextNode","replaceChild","vnodeName","vchildren","firstChild","fc","a","nextSibling","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","indexOf","_ccName","_classCallCheck","instance","Constructor","TypeError","_possibleConstructorReturn","self","ReferenceError","render","store","JSONPatcherProxy","querySelector","observeStore","diff","instances","updateSelfInstances","observe","patch","extendStoreUpdate","getArrayPatch","JSONProxy","patchs","kv","v","update","k","compute","_updatePath","needUpdate","use","using","this","useSelf","usingSelf","isMultiStore","ck","diffResult","updatePath","keyA","keyB","includePath","pathA","pathB","next","substr","fixPath","mpPath","Number","fixArrPath","_classCallCheck$1","_possibleConstructorReturn$1","define","ctor","customElements","config","Ele","_WeElement","_temp","_this","_ret","_len","Array","concat","WeElement","propTypes","defaultProps","isLightDom","storeHelpers","func","target","cloneElement","getHost","shadowRoot","host","rpx","b","window","innerWidth","arg","classNames","classes","argType","inner","join","_Array$prototype$slic","slice","class","unshift","o","JSON","stringify","createRef","root","global","Math","ignoreAttrs","Reflect","hasOwnProperty","BuiltInHTMLElement","HTMLElement","construct","setPrototypeOf","Promise","resolve","then","bind","setTimeout","_HTMLElement","elementId","id","computed","isInstalled","connectedCallback","attrsToProps","storeName","_use","_updatePath2","_using","_storeName","_updateSelfPath","beforeInstall","install","afterInstall","attachShadow","mode","removeChild","adoptedStyleSheets","styleSheet","replaceSync","adoptedStyleSheet","styleSheets","_customStyleContent","_customStyleElement","rootNode","installed","disconnectedCallback","uninstall","_willUpdate","beforeUpdate","beforeRender","rendered","forceUpdate","updated","_this2","updateProps","prevProps","val","getAttribute","Boolean","Omi","parse","fire","dispatchEvent","CustomEvent","detail","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","receiver","deleteProperty","deleteTrap","Proxy","revocable","revocableInstance","trapsInstance","traps","originalObject","_proxifyObjectTreeRecursively","proxifyObjectTree","isProxifyingTreeNow","proxifiedObject","targetObject","message","propKey","record","callback","generate","isRecording","revoke","disableTraps","_contents","contents","importPattern","clearRules","sheet","cssRules","deleteRule","insertAllRules","from","to","rule","insertRule","isElementConnected","element","isConnected","contains","unique","filter","arr1","arr2","getShadowRoot","closedShadowRootRegistry","isCSSStyleSheetInstance","proto$2","isPrototypeOf","nonConstructedProto","isNonConstructedStyleSheetInstance","addAdopterLocation","location","adopter","$adoptersByLocation","$locations","getAdopterByLocation","removeAdopterLocation","_location","restyleAdopter","requestAnimationFrame","$basicStyleSheet","checkInvocationCorrectness","ConstructedStyleSheet","bootstrapper","body","WeakMap","getAssociatedLocation","locations","Location","attachAdoptedStyleSheetProperty","defineProperty","configurable","enumerable","sheets","traverseWebComponents","iter","createNodeIterator","NodeFilter","SHOW_ELEMENT","foundNode","FILTER_ACCEPT","FILTER_REJECT","nextNode","isExistingAdopter","HTMLStyleElement","$uniqueSheets","some","getAdopterContainer","$element","Document","adopt","styleList","createDocumentFragment","observer","$observer","container","disconnect","insertBefore","defaultObserverOptions","MutationObserver","mutations","mutation","hasShadyCss","addedNodes","Element","connect","removedNodes","ShadyCSS","nativeShadow","implementation","createHTMLDocument","cssStyleSheetMethods","NonConstructedStyleSheet","CSSStyleSheet","reject","_DOMException","self_1","ownerNode","rejectImports","method","basic","Symbol","hasInstance","childList","subtree","proto$1","readyState","locationType","every","oldUniqueSheets","uniqueSheets","removedSheets","proto","attach_1","init","documentLocation","Component","defineElement","tag","elements","extractClass","unbind","omi","version","module","exports"],"mappings":";;IAqCO,SAASA,SAASC;QACvB,IAAMC,OAAOC,SAASC,cAAc;QACpCF,KAAKG,cAAcJ;QACnB,OAAOC;;IAGF,SAASI,UAAUC;QACxB,OAAOA,IAAIC,QAAQ,UAAU,SAACC,GAAGC;YAC/B,OAAOA,GAAGC;;;IAIP,SAASC,SAASC;QACvB,OAAOA,MAAMC;;IAGR,SAASC,OAAOC,KAAKH;QAC1B,KAAK,IAAII,KAAKJ,OAAOG,IAAIC,KAAKJ,MAAMI;QACpC,OAAOD;;IAOF,SAASE,SAASC,KAAKC;QAC5B,IAAW,QAAPD,KACF,IAAkB,qBAAPA,KAAmBA,IAAIC,aAC7BD,IAAIE,UAAUD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AAzL,KAAAuN;;;IAKxC1a,EAAA+F,IAAK/I;IIxTL,IAAAH;IACE,IAAA8d,YAAAlQ;IACD,IAAAmQ,gBAAA/Q;;IAGD,IAAM8Q;QACNE,KAAMD;QACNnQ,WAAMqQ;;QAEN5T,QAAYA;QACV2T,GAAAA;QACApQ,eAAAA;QACAkQ,SAAAA;QACAzT,QAAAA;QACAlH,cALUgL;QAMVxO,SAAAA;QACAoE,KAAAA;QACAiJ,eARU+Q;QASV5P,YAAAA;QACAC,cAAAA;QACAG,WAXUiB;QAYVuO,GAAAA;QACAnP,UAAAA;QACAsP,GAAAA;QACA1O,QAAAA;QACAH,KAhBU3K;QAiBVuZ,KAAAA;QACAje,MAlBUsQ;QAmBVhQ,QAAAA;QACAoE,WApBU6F;;IAuBV4T,QAAAA,KAAAA,MAvBUC;IAwBVnT,QAAAA,KAAAA,MAAAA;IAxBUlH,QAAZ0L,KAAAyD,IAAAmL,UAAA;IA2BAta,IAAmBqa,sBAAX3O,QAAR6O,OAAAC,UAAAH,UAAAjU,KAAA+I,MAAAkL","file":"omi.js","sourcesContent":["/**\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\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 })\n if (out) out[name] = obj\n return obj\n}\n\nexport function pathToArr(path) {\n if (typeof path !== 'string' || !path) return []\n // return path.split(/\\.|\\[|\\]/).filter(name => !!name)\n return path\n .replace(/]/g, '')\n .replace(/\\[/g, '.')\n .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 const arr = pathToArr(path)\n arr.forEach(prop => {\n current = current[prop]\n })\n return current\n}\n\nexport function getPath(obj, out, name) {\n const result = {}\n obj.forEach(item => {\n if (typeof item === 'string') {\n result[item] = true\n } else {\n const tempPath = item[Object.keys(item)[0]]\n if (typeof tempPath === 'string') {\n result[tempPath] = true\n } else {\n if (typeof tempPath[0] === 'string') {\n result[tempPath[0]] = true\n } else {\n tempPath[0].forEach(path => (result[path] = true))\n }\n }\n }\n })\n if (out) out[name] = result\n return 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}\n","import options from './options'\nimport { Fragment } from './util'\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 if (nodeName === Fragment) {\n return children\n }\n\n const p = {\n nodeName,\n children,\n attributes: attributes == null ? undefined : attributes,\n key: attributes == null ? undefined : attributes.key\n }\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","import { extend } from '../util'\nimport options from '../options'\n/**\n * Check if two nodes are equivalent.\n *\n * @param {Node} node DOM Node to compare\n * @param {VNode} vnode Virtual DOM node to compare\n * @param {boolean} [hydrating=false] If 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 A DOM Element to inspect the name of.\n * @param {String} nodeName Unnormalized 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 extension['o-' + name] = handler\n}\n\nexport function set(origin, path, value) {\n const arr = pathToArr(path)\n let current = origin\n for (let i = 0, len = arr.length; i < len; i++) {\n if (i === len - 1) {\n current[arr[i]] = value\n } else {\n current = current[arr[i]]\n }\n }\n}\n\nexport function get(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\n return current\n}\n\nfunction eventProxy(e) {\n return this._listeners[e.type](e)\n}\n\nexport function bind(el, type, handler) {\n el._listeners = el._listeners || {}\n el._listeners[type] = handler\n el.addEventListener(type, eventProxy)\n}\n\nexport function unbind(el, type) {\n el.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 (\n name[0] == '_' &&\n name[1] == 'o' &&\n name[2] == 'n' &&\n node.constructor.is === 'WeElement'\n ) {\n bindEvent(node, name.replace('_', ''), value, old)\n } else if (name[0] == 'o' && name[1] == 'n') {\n bindEvent(node, name, value, old)\n } else if (node.nodeName === 'INPUT' && name === 'value') {\n node[name] = value == null ? '' : value\n } else if (\n name !== 'list' &&\n name !== 'type' &&\n name !== 'css' &&\n !isSvg &&\n name in node &&\n value !== ''\n ) {\n //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\n ? node.pureRemoveAttribute(name)\n : 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\n node.pureRemoveAttribute\n ? node.pureRemoveAttribute(name)\n : 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\n ? node.pureSetAttribute(name, value)\n : 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 bindEvent(node, name, value, old) {\n let useCapture = name !== (name = name.replace(/Capture$/, ''))\n let nameLower = name.toLowerCase()\n name = (nameLower in node ? nameLower : name).slice(2)\n if (value) {\n if (!old) {\n node.addEventListener(name, eventProxy, useCapture)\n }\n } else {\n node.removeEventListener(name, eventProxy, useCapture)\n }\n ;(node._listeners || (node._listeners = {}))[name] = value\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 * @param {Element} [dom=null] A DOM node to mutate into the shape of the `vnode`\n * @param {VNode} vnode A VNode (with descendants forming a tree) representing the desired DOM structure\n * @returns {Element} dom The created/mutated element\n * @private\n */\nexport function diff(dom, vnode, parent, component, updateSelf) {\n //first render return undefined\n if (!dom && !vnode) return\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 && vnode.nodeName === Fragment) {\n vnode = vnode.children\n }\n if (isArray(vnode)) {\n if (parent) {\n //don't use css and props.css when using h.f\n innerDiffNode(parent, vnode, hydrating, component, updateSelf)\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 * @param {Element} dom Element whose children should be compared & mutated\n * @param {Array} vchildren Array of VNodes to compare to `dom.childNodes`\n * @param {Boolean} isHydrating If `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 if (vchild) {\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\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 * @param {Node} node DOM node to start unmount/removal from\n * @param {Boolean} [unmountOnly=false] If `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 * - we use .lastChild here because it causes less reflow than .firstChild\n * - 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 * @param {Element} dom Element with attributes to diff `attrs` against\n * @param {Object} attrs The desired end-state key-value attribute pairs\n * @param {Object} old Current/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(\n dom,\n name,\n old[name],\n (old[name] = undefined),\n isSvgMode,\n component\n )\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(\n dom,\n name,\n old[name],\n (old[name] = attrs[name]),\n isSvgMode,\n component\n )\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 //fix lazy load props missing\n if (dom.nodeName.indexOf('-') !== -1) {\n dom.props = dom.props || {}\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 parent = typeof parent === 'string' ? document.querySelector(parent) : parent\n if (store) {\n if (store.data) {\n observeStore(store)\n }\n // else {\n // //Multi-store injection\n // for (let key in store) {\n // if (key !== 'ignoreAttrs') {\n // options.isMultiStore = true\n // observeStore(store[key], key)\n // }\n // }\n // }\n parent.store = store\n }\n return diff(null, vnode, parent, false)\n}\n\nfunction observeStore(store, key) {\n store.instances = []\n store.updateSelfInstances = []\n extendStoreUpdate(store, key)\n\n store.data = new JSONProxy(store.data).observe(false, function(patch) {\n const patchs = {}\n if (patch.op === 'remove') {\n // fix arr splice\n const kv = getArrayPatch(patch.path, store)\n patchs[kv.k] = kv.v\n\n update(patchs, store)\n } else {\n const key = fixPath(patch.path)\n patchs[key] = patch.value\n\n update(patchs, store)\n }\n })\n}\n\nfunction update(patch, store) {\n store.update(patch)\n}\n\nfunction extendStoreUpdate(store, key) {\n store.update = function(patch) {\n if (Object.keys(patch).length > 0) {\n this.instances.forEach(instance => {\n compute(instance, key)\n if (key) {\n if (\n instance._updatePath &&\n instance._updatePath[key] &&\n needUpdate(patch, instance._updatePath[key])\n ) {\n if (instance.use) {\n getUse(\n store.data,\n (typeof instance.use === 'function'\n ? instance.use()\n : instance.use)[key],\n instance.using,\n key\n )\n }\n\n instance.update()\n }\n } else {\n if (instance._updatePath && needUpdate(patch, instance._updatePath)) {\n if (instance.use) {\n instance.using = getUse(\n store.data,\n typeof instance.use === 'function'\n ? instance.use()\n : instance.use\n )\n }\n\n instance.update()\n }\n }\n })\n\n this.updateSelfInstances.forEach(instance => {\n compute(instance, key)\n if (key) {\n if (\n instance._updateSelfPath &&\n instance._updateSelfPath[key] &&\n needUpdate(patch, instance._updateSelfPath[key])\n ) {\n if (instance.useSelf) {\n getUse(\n store.data,\n (typeof instance.useSelf === 'function'\n ? instance.useSelf()\n : instance.useSelf)[key],\n instance.usingSelf,\n key\n )\n }\n\n instance.updateSelf()\n }\n } else {\n if (\n instance._updateSelfPath &&\n needUpdate(patch, instance._updateSelfPath)\n ) {\n instance.usingSelf = getUse(\n store.data,\n typeof instance.useSelf === 'function'\n ? instance.useSelf()\n : instance.useSelf\n )\n instance.updateSelf()\n }\n }\n })\n this.onChange && this.onChange(patch)\n }\n }\n}\n\nfunction compute(instance, isMultiStore) {\n if (instance.compute) {\n for (let ck in instance.compute) {\n instance.computed[ck] = instance.compute[ck].call(\n isMultiStore ? instance.store : instance.store.data\n )\n }\n }\n}\n\nexport function needUpdate(diffResult, updatePath) {\n for (let keyA in diffResult) {\n if (updatePath[keyA]) {\n return true\n }\n for (let keyB in updatePath) {\n if (includePath(keyA, keyB)) {\n return true\n }\n }\n }\n return false\n}\n\nfunction includePath(pathA, pathB) {\n if (pathA.indexOf(pathB) === 0) {\n const next = pathA.substr(pathB.length, 1)\n if (next === '[' || next === '.') {\n return true\n }\n }\n return false\n}\n\nexport function fixPath(path) {\n let mpPath = ''\n const arr = path.replace('/', '').split('/')\n arr.forEach((item, index) => {\n if (index) {\n if (isNaN(Number(item))) {\n mpPath += '.' + item\n } else {\n mpPath += '[' + item + ']'\n }\n } else {\n mpPath += item\n }\n })\n return mpPath\n}\n\nfunction getArrayPatch(path, store) {\n const arr = path.replace('/', '').split('/')\n let current = store.data[arr[0]]\n for (let i = 1, len = arr.length; i < len - 1; i++) {\n current = current[arr[i]]\n }\n return {\n k: fixArrPath(path),\n v: current\n }\n}\n\nfunction fixArrPath(path) {\n let mpPath = ''\n const arr = path.replace('/', '').split('/')\n const len = arr.length\n arr.forEach((item, index) => {\n if (index < len - 1) {\n if (index) {\n if (isNaN(Number(item))) {\n mpPath += '.' + item\n } else {\n mpPath += '[' + item + ']'\n }\n } else {\n mpPath += item\n }\n }\n })\n return mpPath\n}\n","import WeElement from './we-element'\nimport options from './options'\n\nconst storeHelpers = ['use', 'useSelf']\n\nexport function define(name, ctor, config) {\n if (customElements.get(name)) {\n return\n }\n if (options.mapping[name]) {\n return\n }\n if (ctor.is === 'WeElement') {\n customElements.define(name, ctor)\n options.mapping[name] = ctor\n } else {\n if (typeof config === 'string') {\n config = { css: config }\n } else {\n config = config || {}\n }\n\n class Ele extends WeElement {\n static css = config.css\n\n static propTypes = config.propTypes\n\n static defaultProps = config.defaultProps\n\n static isLightDom = config.isLightDom\n\n compute = config.compute\n\n render() {\n return ctor.call(this, this)\n }\n }\n\n for (let key in config) {\n if (typeof config[key] === 'function') {\n Ele.prototype[key] = function() {\n return config[key].apply(this, arguments)\n }\n }\n }\n\n storeHelpers.forEach(func => {\n if (config[func] && config[func] !== 'function') {\n Ele.prototype[func] = function() {\n return config[func]\n }\n }\n })\n\n customElements.define(name, Ele)\n options.mapping[name] = Ele\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 The virtual DOM element to clone\n * @param {Object} props Attributes/props to add when cloning\n * @param {VNode} rest Any 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","(function () {\n 'use strict';\n\n if ('adoptedStyleSheets' in document) { return; }\n\n var hasShadyCss = 'ShadyCSS' in window && !ShadyCSS.nativeShadow;\n var bootstrapper = document.implementation.createHTMLDocument('boot');\n var closedShadowRootRegistry = new WeakMap();\n var _DOMException = typeof DOMException === 'object' ? Error : DOMException;\n\n var defineProperty = Object.defineProperty;\n var forEach = Array.prototype.forEach;\n var importPattern = /@import.+?;?$/gm;\n function rejectImports(contents) {\n var _contents = contents.replace(importPattern, '');\n if (_contents !== contents) {\n console.warn('@import rules are not allowed here. See https://github.com/WICG/construct-stylesheets/issues/119#issuecomment-588352418');\n }\n return _contents.trim();\n }\n function clearRules(sheet) {\n for (var i = 0; i < sheet.cssRules.length; i++) {\n sheet.deleteRule(0);\n }\n }\n function insertAllRules(from, to) {\n forEach.call(from.cssRules, function (rule, i) {\n to.insertRule(rule.cssText, i);\n });\n }\n function isElementConnected(element) {\n return 'isConnected' in element\n ? element.isConnected\n : document.contains(element);\n }\n function unique(arr) {\n return arr.filter(function (value, index) { return arr.indexOf(value) === index; });\n }\n function diff(arr1, arr2) {\n return arr1.filter(function (value) { return arr2.indexOf(value) === -1; });\n }\n function removeNode(node) {\n node.parentNode.removeChild(node);\n }\n function getShadowRoot(element) {\n return element.shadowRoot || closedShadowRootRegistry.get(element);\n }\n\n var cssStyleSheetMethods = [\n 'addImport',\n 'addPageRule',\n 'addRule',\n 'deleteRule',\n 'insertRule',\n 'removeImport',\n 'removeRule',\n ];\n var NonConstructedStyleSheet = CSSStyleSheet;\n var nonConstructedProto = NonConstructedStyleSheet.prototype;\n nonConstructedProto.replace = function () {\n return Promise.reject(new _DOMException(\"Can't call replace on non-constructed CSSStyleSheets.\"));\n };\n nonConstructedProto.replaceSync = function () {\n throw new _DOMException(\"Failed to execute 'replaceSync' on 'CSSStyleSheet': Can't call replaceSync on non-constructed CSSStyleSheets.\");\n };\n function isCSSStyleSheetInstance(instance) {\n return typeof instance === 'object'\n ? proto$2.isPrototypeOf(instance) ||\n nonConstructedProto.isPrototypeOf(instance)\n : false;\n }\n function isNonConstructedStyleSheetInstance(instance) {\n return typeof instance === 'object'\n ? nonConstructedProto.isPrototypeOf(instance)\n : false;\n }\n var $basicStyleSheet = new WeakMap();\n var $locations = new WeakMap();\n var $adoptersByLocation = new WeakMap();\n function addAdopterLocation(sheet, location) {\n var adopter = document.createElement('style');\n $adoptersByLocation.get(sheet).set(location, adopter);\n $locations.get(sheet).push(location);\n return adopter;\n }\n function getAdopterByLocation(sheet, location) {\n return $adoptersByLocation.get(sheet).get(location);\n }\n function removeAdopterLocation(sheet, location) {\n $adoptersByLocation.get(sheet).delete(location);\n $locations.set(sheet, $locations.get(sheet).filter(function (_location) { return _location !== location; }));\n }\n function restyleAdopter(sheet, adopter) {\n requestAnimationFrame(function () {\n clearRules(adopter.sheet);\n insertAllRules($basicStyleSheet.get(sheet), adopter.sheet);\n });\n }\n function checkInvocationCorrectness(self) {\n if (!$basicStyleSheet.has(self)) {\n throw new TypeError('Illegal invocation');\n }\n }\n function ConstructedStyleSheet() {\n var self = this;\n var style = document.createElement('style');\n bootstrapper.body.appendChild(style);\n $basicStyleSheet.set(self, style.sheet);\n $locations.set(self, []);\n $adoptersByLocation.set(self, new WeakMap());\n }\n var proto$2 = ConstructedStyleSheet.prototype;\n proto$2.replace = function replace(contents) {\n try {\n this.replaceSync(contents);\n return Promise.resolve(this);\n }\n catch (e) {\n return Promise.reject(e);\n }\n };\n proto$2.replaceSync = function replaceSync(contents) {\n checkInvocationCorrectness(this);\n if (typeof contents === 'string') {\n var self_1 = this;\n var style = $basicStyleSheet.get(self_1).ownerNode;\n style.textContent = rejectImports(contents);\n $basicStyleSheet.set(self_1, style.sheet);\n $locations.get(self_1).forEach(function (location) {\n if (location.isConnected()) {\n restyleAdopter(self_1, getAdopterByLocation(self_1, location));\n }\n });\n }\n };\n defineProperty(proto$2, 'cssRules', {\n configurable: true,\n enumerable: true,\n get: function cssRules() {\n checkInvocationCorrectness(this);\n return $basicStyleSheet.get(this).cssRules;\n },\n });\n cssStyleSheetMethods.forEach(function (method) {\n proto$2[method] = function () {\n var self = this;\n checkInvocationCorrectness(self);\n var args = arguments;\n var basic = $basicStyleSheet.get(self);\n var locations = $locations.get(self);\n var result = basic[method].apply(basic, args);\n locations.forEach(function (location) {\n if (location.isConnected()) {\n var sheet = getAdopterByLocation(self, location).sheet;\n sheet[method].apply(sheet, args);\n }\n });\n return result;\n };\n });\n defineProperty(ConstructedStyleSheet, Symbol.hasInstance, {\n configurable: true,\n value: isCSSStyleSheetInstance,\n });\n\n var defaultObserverOptions = {\n childList: true,\n subtree: true,\n };\n var locations = new WeakMap();\n function getAssociatedLocation(element) {\n var location = locations.get(element);\n if (!location) {\n location = new Location(element);\n locations.set(element, location);\n }\n return location;\n }\n function attachAdoptedStyleSheetProperty(constructor) {\n defineProperty(constructor.prototype, 'adoptedStyleSheets', {\n configurable: true,\n enumerable: true,\n get: function () {\n return getAssociatedLocation(this).sheets;\n },\n set: function (sheets) {\n getAssociatedLocation(this).update(sheets);\n },\n });\n }\n function traverseWebComponents(node, callback) {\n var iter = document.createNodeIterator(node, NodeFilter.SHOW_ELEMENT, function (foundNode) {\n return getShadowRoot(foundNode)\n ? NodeFilter.FILTER_ACCEPT\n : NodeFilter.FILTER_REJECT;\n },\n null, false);\n for (var next = void 0; (next = iter.nextNode());) {\n callback(getShadowRoot(next));\n }\n }\n var $element = new WeakMap();\n var $uniqueSheets = new WeakMap();\n var $observer = new WeakMap();\n function isExistingAdopter(self, element) {\n return (element instanceof HTMLStyleElement &&\n $uniqueSheets.get(self).some(function (sheet) { return getAdopterByLocation(sheet, self); }));\n }\n function getAdopterContainer(self) {\n var element = $element.get(self);\n return element instanceof Document ? element.body : element;\n }\n function adopt(self) {\n var styleList = document.createDocumentFragment();\n var sheets = $uniqueSheets.get(self);\n var observer = $observer.get(self);\n var container = getAdopterContainer(self);\n observer.disconnect();\n sheets.forEach(function (sheet) {\n styleList.appendChild(getAdopterByLocation(sheet, self) || addAdopterLocation(sheet, self));\n });\n container.insertBefore(styleList, null);\n observer.observe(container, defaultObserverOptions);\n sheets.forEach(function (sheet) {\n restyleAdopter(sheet, getAdopterByLocation(sheet, self));\n });\n }\n function Location(element) {\n var self = this;\n self.sheets = [];\n $element.set(self, element);\n $uniqueSheets.set(self, []);\n $observer.set(self, new MutationObserver(function (mutations, observer) {\n if (!document) {\n observer.disconnect();\n return;\n }\n mutations.forEach(function (mutation) {\n if (!hasShadyCss) {\n forEach.call(mutation.addedNodes, function (node) {\n if (!(node instanceof Element)) {\n return;\n }\n traverseWebComponents(node, function (root) {\n getAssociatedLocation(root).connect();\n });\n });\n }\n forEach.call(mutation.removedNodes, function (node) {\n if (!(node instanceof Element)) {\n return;\n }\n if (isExistingAdopter(self, node)) {\n adopt(self);\n }\n if (!hasShadyCss) {\n traverseWebComponents(node, function (root) {\n getAssociatedLocation(root).disconnect();\n });\n }\n });\n });\n }));\n }\n var proto$1 = Location.prototype;\n proto$1.isConnected = function isConnected() {\n var element = $element.get(this);\n return element instanceof Document\n ? element.readyState !== 'loading'\n : isElementConnected(element.host);\n };\n proto$1.connect = function connect() {\n var container = getAdopterContainer(this);\n $observer.get(this).observe(container, defaultObserverOptions);\n if ($uniqueSheets.get(this).length > 0) {\n adopt(this);\n }\n traverseWebComponents(container, function (root) {\n getAssociatedLocation(root).connect();\n });\n };\n proto$1.disconnect = function disconnect() {\n $observer.get(this).disconnect();\n };\n proto$1.update = function update(sheets) {\n var self = this;\n var locationType = $element.get(self) === document ? 'Document' : 'ShadowRoot';\n if (!Array.isArray(sheets)) {\n throw new TypeError(\"Failed to set the 'adoptedStyleSheets' property on \" + locationType + \": Iterator getter is not callable.\");\n }\n if (!sheets.every(isCSSStyleSheetInstance)) {\n throw new TypeError(\"Failed to set the 'adoptedStyleSheets' property on \" + locationType + \": Failed to convert value to 'CSSStyleSheet'\");\n }\n if (sheets.some(isNonConstructedStyleSheetInstance)) {\n throw new TypeError(\"Failed to set the 'adoptedStyleSheets' property on \" + locationType + \": Can't adopt non-constructed stylesheets\");\n }\n self.sheets = sheets;\n var oldUniqueSheets = $uniqueSheets.get(self);\n var uniqueSheets = unique(sheets);\n var removedSheets = diff(oldUniqueSheets, uniqueSheets);\n removedSheets.forEach(function (sheet) {\n removeNode(getAdopterByLocation(sheet, self));\n removeAdopterLocation(sheet, self);\n });\n $uniqueSheets.set(self, uniqueSheets);\n if (self.isConnected() && uniqueSheets.length > 0) {\n adopt(self);\n }\n };\n\n window.CSSStyleSheet = ConstructedStyleSheet;\n attachAdoptedStyleSheetProperty(Document);\n if ('ShadowRoot' in window) {\n attachAdoptedStyleSheetProperty(ShadowRoot);\n var proto = Element.prototype;\n var attach_1 = proto.attachShadow;\n proto.attachShadow = function attachShadow(init) {\n var root = attach_1.call(this, init);\n if (init.mode === 'closed') {\n closedShadowRootRegistry.set(this, root);\n }\n return root;\n };\n }\n var documentLocation = getAssociatedLocation(document);\n if (documentLocation.isConnected()) {\n documentLocation.connect();\n }\n else {\n document.addEventListener('DOMContentLoaded', documentLocation.connect.bind(documentLocation));\n }\n\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 * @public\n * @namespace options {Object}\n */\nexport default {\n store: null,\n root: getGlobal(),\n mapping: {},\n isMultiStore: false,\n //when set true, using props of hypescript, don't use getAttribute\n //if you render all the node tree by omi self, set it\n ignoreAttrs: false\n}\n","import {\n cssToDom,\n isArray,\n getUse,\n hyphenate,\n getValByPath,\n removeItem\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 static is = 'WeElement'\n\n constructor() {\n super()\n // fix lazy load props missing\n this.props = Object.assign({}, this.constructor.defaultProps, this.props)\n this.elementId = id++\n this.computed = {}\n this.isInstalled = false\n }\n\n connectedCallback() {\n let p = this.parentNode\n while (p && !this.store) {\n this.store = p.store\n p = p.parentNode || p.host\n }\n\n this.attrsToProps()\n\n if (this.props.use) {\n this.use = this.props.use\n }\n\n if (this.props.useSelf) {\n this.use = this.props.useSelf\n }\n\n if (this.use) {\n const use = typeof this.use === 'function' ? this.use() : this.use\n\n if (options.isMultiStore) {\n let _updatePath = {}\n let using = {}\n for (let storeName in use) {\n _updatePath[storeName] = {}\n using[storeName] = {}\n getPath(use[storeName], _updatePath, storeName)\n getUse(this.store[storeName].data, use[storeName], using, storeName)\n this.store[storeName].instances.push(this)\n }\n this.using = using\n this._updatePath = _updatePath\n } else {\n this._updatePath = getPath(use)\n this.using = getUse(this.store.data, use)\n this.store.instances.push(this)\n }\n }\n if (this.useSelf) {\n const use =\n typeof this.useSelf === 'function' ? this.useSelf() : this.useSelf\n if (options.isMultiStore) {\n let _updatePath = {}\n let using = {}\n for (let storeName in use) {\n getPath(use[storeName], _updatePath, storeName)\n getUse(this.store[storeName].data, use[storeName], using, storeName)\n this.store[storeName].updateSelfInstances.push(this)\n }\n this.usingSelf = using\n this._updateSelfPath = _updatePath\n } else {\n this._updateSelfPath = getPath(use)\n this.usingSelf = getUse(this.store.data, use)\n this.store.updateSelfInstances.push(this)\n }\n }\n\n if (this.compute) {\n for (let key in this.compute) {\n this.computed[key] = this.compute[key].call(\n options.isMultiStore ? this.store : this.store.data\n )\n }\n }\n\n this.beforeInstall()\n this.install()\n this.afterInstall()\n\n let shadowRoot\n if (this.constructor.isLightDom) {\n shadowRoot = this\n } else {\n if (!this.shadowRoot) {\n shadowRoot = this.attachShadow({\n mode: 'open'\n })\n } else {\n shadowRoot = this.shadowRoot\n let fc\n while ((fc = shadowRoot.firstChild)) {\n shadowRoot.removeChild(fc)\n }\n }\n }\n\n const css = this.constructor.css\n if (css) {\n if (typeof css === 'string') {\n const styleSheet = new CSSStyleSheet()\n styleSheet.replaceSync(css)\n shadowRoot.adoptedStyleSheets = [styleSheet]\n } else if (Object.prototype.toString.call(css) === '[object Array]') {\n const styleSheets = []\n css.forEach(styleSheet => {\n if (typeof styleSheet === 'string') {\n const adoptedStyleSheet = new CSSStyleSheet()\n adoptedStyleSheet.replaceSync(styleSheet)\n styleSheets.push(adoptedStyleSheet)\n } else {\n styleSheets.push(styleSheet)\n }\n shadowRoot.adoptedStyleSheets = styleSheets\n })\n } else {\n shadowRoot.adoptedStyleSheets = [css]\n }\n }\n\n this.beforeRender()\n options.afterInstall && options.afterInstall(this)\n\n const rendered = this.render(this.props, this.store)\n\n this.rootNode = diff(null, rendered, null, this)\n this.rendered()\n\n if (this.css) {\n shadowRoot.appendChild(\n cssToDom(typeof this.css === 'function' ? this.css() : this.css)\n )\n }\n\n if (this.props.css) {\n this._customStyleElement = cssToDom(this.props.css)\n this._customStyleContent = this.props.css\n shadowRoot.appendChild(this._customStyleElement)\n }\n\n if (isArray(this.rootNode)) {\n this.rootNode.forEach(function(item) {\n shadowRoot.appendChild(item)\n })\n } else {\n this.rootNode && shadowRoot.appendChild(this.rootNode)\n }\n this.installed()\n this.isInstalled = true\n }\n\n disconnectedCallback() {\n this.uninstall()\n this.isInstalled = false\n if (this.store) {\n if (options.isMultiStore) {\n for (let key in this.store) {\n const current = this.store[key]\n removeItem(this, current.instances)\n removeItem(this, current.updateSelfInstances)\n }\n } else {\n removeItem(this, this.store.instances)\n removeItem(this, this.store.updateSelfInstances)\n }\n }\n }\n\n update(ignoreAttrs, updateSelf) {\n this._willUpdate = true\n this.beforeUpdate()\n this.beforeRender()\n //fix null !== undefined\n if (this._customStyleContent != this.props.css) {\n this._customStyleContent = this.props.css\n this._customStyleElement.textContent = this._customStyleContent\n }\n this.attrsToProps(ignoreAttrs)\n\n const rendered = this.render(this.props, this.store)\n this.rendered()\n\n this.rootNode = diff(\n this.rootNode,\n rendered,\n this.constructor.isLightDom ? this : this.shadowRoot,\n this,\n updateSelf\n )\n this._willUpdate = false\n this.updated()\n }\n\n forceUpdate() {\n this.update(true)\n }\n\n updateProps(obj) {\n Object.keys(obj).forEach(key => {\n this.props[key] = obj[key]\n if (this.prevProps) {\n this.prevProps[key] = obj[key]\n }\n })\n this.forceUpdate()\n }\n\n updateSelf(ignoreAttrs) {\n this.update(ignoreAttrs, true)\n }\n\n removeAttribute(key) {\n super.removeAttribute(key)\n //Avoid executing removeAttribute methods before connectedCallback\n this.isInstalled && this.update()\n }\n\n setAttribute(key, val) {\n if (val && typeof val === 'object') {\n super.setAttribute(key, JSON.stringify(val))\n } else {\n super.setAttribute(key, val)\n }\n //Avoid executing setAttribute methods before connectedCallback\n this.isInstalled && this.update()\n }\n\n pureRemoveAttribute(key) {\n super.removeAttribute(key)\n }\n\n pureSetAttribute(key, val) {\n super.setAttribute(key, val)\n }\n\n attrsToProps(ignoreAttrs) {\n if (\n options.ignoreAttrs ||\n ignoreAttrs ||\n (this.store && this.store.ignoreAttrs) ||\n this.props.ignoreAttrs\n )\n return\n const ele = this\n ele.props['css'] = ele.getAttribute('css')\n const attrs = this.constructor.propTypes\n if (!attrs) return\n Object.keys(attrs).forEach(key => {\n const type = attrs[key]\n const val = ele.getAttribute(hyphenate(key))\n if (val !== null) {\n switch (type) {\n case String:\n ele.props[key] = val\n break\n case Number:\n ele.props[key] = Number(val)\n break\n case Boolean:\n if (val === 'false' || val === '0') {\n ele.props[key] = false\n } else {\n ele.props[key] = true\n }\n break\n case Array:\n case Object:\n if (val[0] === ':') {\n ele.props[key] = getValByPath(val.substr(1), Omi.$)\n } else {\n ele.props[key] = JSON.parse(\n val\n .replace(/(['\"])?([a-zA-Z0-9_-]+)(['\"])?:([^\\/])/g, '\"$2\":$4')\n .replace(/'([\\s\\S]*?)'/g, '\"$1\"')\n .replace(/,(\\s*})/g, '$1')\n )\n }\n break\n }\n } else {\n if (\n ele.constructor.defaultProps &&\n ele.constructor.defaultProps.hasOwnProperty(key)\n ) {\n ele.props[key] = ele.constructor.defaultProps[key]\n } else {\n ele.props[key] = null\n }\n }\n })\n }\n\n fire(name, data) {\n this.dispatchEvent(\n new CustomEvent(name, {\n detail: data\n })\n )\n }\n\n beforeInstall() {}\n\n install() {}\n\n afterInstall() {}\n\n installed() {}\n\n uninstall() {}\n\n beforeUpdate() {}\n\n updated() {}\n\n beforeRender() {}\n\n rendered() {}\n\n receiveProps() {}\n}\n","export function o(obj) {\n return JSON.stringify(obj)\n}\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 { extend, get, set, bind, unbind } from './extend'\nimport JSONProxy from './proxy'\nimport { Fragment } from './util'\nimport 'construct-style-sheets-polyfill'\n\nh.f = Fragment\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 o,\n elements,\n $,\n extend,\n get,\n set,\n bind,\n unbind,\n JSONProxy\n}\n\noptions.root.Omi = omi\noptions.root.omi = omi\noptions.root.Omi.version = '6.19.27'\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 o,\n elements,\n $,\n extend,\n get,\n set,\n bind,\n unbind,\n JSONProxy\n}\n"]}