{"version":3,"sources":["../src/util.js","../src/h.js","../src/vdom/index.js","../src/extend.js","../src/dom/index.js","../src/vdom/diff.js","../node_modules/weakmap-polyfill/weakmap-polyfill.js","../src/we-element.js","../src/render.js","../src/define.js","../src/clone-element.js","../src/get-host.js","../src/class.js","../node_modules/construct-style-sheets-polyfill/dist/adoptedStyleSheets.js","../src/options.js","../src/constants.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","pathToArr","path","split","hyphenate","hyphenateRE","toLowerCase","capitalize","name","all","letter","s","getValByPath","forEach","prop","createStyleSheet","style","styleSheet","CSSStyleSheet","replaceSync","h","nodeName","attributes","lastSimple","child","simple","ignoreAttrs","arguments","length","stack","push","pop","String","p","key","options","vnode","isSameNodeType","splitText","mapping","hydrating","_componentConstructor","isNamedNode","extend$1","handler","extension","origin","arr","get","e","type","eventProxy","el","_listeners","addEventListener","createNode","removeNode","setAccessor","component","old","isSvg","cssText","IS_NON_DIMENSIONAL","test","innerHTML","__html","bindEvent","pureRemoveAttribute","removeAttribute","ns","removeAttributeNS","pureSetAttribute","setAttribute","className","useCapture","event","nameLower","eventProxy$1","ret","diffLevel","isSvgMode","parent","ownerSVGElement","dom","updateSelf","innerDiffNode","ele","idiff","index","item","one","recollectNodeTree","parentNode","appendChild","out","prevSvgMode","nodeValue","createTextNode","replaceChild","vnodeName","isForeignObject","prevProps","vchildren","firstChild","fc","a","nextSibling","constructor","is","noSlot","unsafeHTML","dangerouslySetInnerHTML","diffAttributes","min","len","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","HTMLElement","WeElement","_classCallCheck$1","_possibleConstructorReturn$1","define","ctor","customElements","config","Ele","_WeElement","_temp","_this","_ret","_len","args","Array","this","apply","concat","compute","propTypes","defaultProps","isLightDOM","storeHelpers","func","target","cloneElement","root","host","b","window","innerWidth","arg","classNames","classes","argType","inner","join","_Array$prototype$slic","slice","class","unshift","o","JSON","stringify","createRef","store","global","Math","Reflect","hasOwnProperty","BuiltInHTMLElement","construct","setPrototypeOf","Promise","resolve","then","bind","setTimeout","DOM_EVENT_MAP","oncompositionend","oncompositionupdate","onanimationcancel","oncompositionstart","onfocusin","onfocusout","onscrollend","ontouchmove","isObject","x","WeakMap","hasDefine","defineProperty","object","genId","checkInstance","methodName","prefix","rand","random","substring","entry","_id","globalThis","id","_HTMLElement","elementId","computed","isInstalled","connectedCallback","_this2","inject","provide","injection","injectKey","attrsToProps","beforeInstall","shadowRoot","install","afterInstall","attachShadow","mode","removeChild","adoptedStyleSheetsMap","has","styleSheets","map","default","set","beforeRender","adoptedStyleSheets","rootElement","_customStyleContent","_customStyleElement","installed","disconnectedCallback","uninstall","update","beforeUpdate","_willUpdate","rendered","render","updateProps","_this3","val","getAttribute","keys","types","matched","Number","substr","Omi","parse","console","warn","fire","data","CustomEvent","detail","updated","_contents","contents","importPattern","clearRules","sheet","cssRules","deleteRule","insertAllRules","from","to","rule","insertRule","isElementConnected","element","isConnected","contains","unique","filter","diff","arr1","arr2","getShadowRoot","closedShadowRootRegistry","isCSSStyleSheetInstance","proto$2","isPrototypeOf","nonConstructedProto","isNonConstructedStyleSheetInstance","addAdopterLocation","location","adopter","$adoptersByLocation","$locations","getAdopterByLocation","removeAdopterLocation","delete","_location","restyleAdopter","requestAnimationFrame","$basicStyleSheet","checkInvocationCorrectness","ConstructedStyleSheet","bootstrapper","body","getAssociatedLocation","locations","Location","attachAdoptedStyleSheetProperty","configurable","enumerable","sheets","traverseWebComponents","callback","iter","createNodeIterator","NodeFilter","SHOW_ELEMENT","foundNode","FILTER_ACCEPT","FILTER_REJECT","next","nextNode","isExistingAdopter","HTMLStyleElement","$uniqueSheets","some","getAdopterContainer","$element","Document","adopt","styleList","createDocumentFragment","observer","$observer","container","disconnect","insertBefore","observe","defaultObserverOptions","MutationObserver","mutations","mutation","hasShadyCss","addedNodes","Element","connect","removedNodes","ShadyCSS","nativeShadow","implementation","createHTMLDocument","cssStyleSheetMethods","NonConstructedStyleSheet","reject","_DOMException","self_1","ownerNode","rejectImports","method","basic","result","Symbol","hasInstance","childList","subtree","proto$1","readyState","locationType","every","oldUniqueSheets","uniqueSheets","proto","attach_1","init","documentLocation","Component","defineElement","tag","elements","omi","getHost","rpx","extractClass","unbind","version","module","exports"],"mappings":"wBAqCO,SAASA,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,GAAMC,SAGR,QAASC,GAAOC,EAAKH,GAC1B,IAAK,GAAII,KAAKJ,GAAOG,EAAIC,GAAKJ,EAAMI,EACpC,OAAOD,GAOF,QAASE,GAASC,EAAKC,GACjB,MAAPD,IACgB,kBAAPA,GAAmBA,EAAIC,GAC7BD,EAAIE,QAAUD,GAehB,QAASE,GAAQN,GACtB,MAA+C,mBAAxCO,OAAOC,UAAUC,SAASC,KAAKV,GAGjC,QAASW,GAAUC,GACxB,MAAoB,gBAATA,IAAsBA,EAE1BA,EACJpB,QAAQ,KAAM,IACdA,QAAQ,MAAO,KACfqB,MAAM,QAIJ,QAASC,GAAUvB,GACxB,MAAOA,GAAIC,QAAQuB,EAAa,OAAOC,cAGlC,QAASC,GAAWC,GACzB,MAAOA,GACJ1B,QAAQ,UAAW,SAAS2B,EAAKC,GAChC,MAAOA,GAAOzB,gBAEfH,QAAQ,MAAO,SAAA6B,GAAA,MAAKA,GAAE1B,gBAGpB,QAAS2B,GAAaV,EAAMP,GAKjC,MAJYM,G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I,OAAAA,EACAxP,aALWyJ,EAMXnM,QAAAA,EACAyD,IAAAA,EACAoH,cARW4P,GASXtO,WAAAA,EACA0O,aAAAA,EACAC,UAXWxN,EAYXmN,EAAAA,EACA/N,SAAAA,GACAqO,EAAAA,GACAzN,OAAAA,EACAH,IAhBW7I,EAiBXqW,IAAAA,EACAta,KAlBW6N,EAmBXvN,OAAAA,EAGAuN,GAAAA,KAtBW0E,IAAAgI,GAuBXI,EAAAA,KAAAA,IAAAA,GAvBWvX,EAAZ2I,KAAAwG,IAAAqI,QAAA,UA0BmBL,mBAAXxO,QAAR8O,OAAAC,QAAAP,GAAArQ,KAAAqI,IAAAgI","file":"omi.min.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 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\nconst hyphenateRE = /\\B([A-Z])/g\nexport function hyphenate(str) {\n return str.replace(hyphenateRE, '-$1').toLowerCase()\n}\n\nexport function capitalize(name) {\n return name\n .replace(/\\-(\\w)/g, function(all, letter) {\n return letter.toUpperCase()\n })\n .replace(/^\\S/, s => s.toUpperCase())\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 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\nexport function createStyleSheet(style) {\n const styleSheet = new CSSStyleSheet()\n styleSheet.replaceSync(style)\n return styleSheet\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\n // jsx 嵌套的元素自动忽略 attrs\n if(attributes) {\n attributes.ignoreAttrs = true\n } else {\n attributes = { ignoreAttrs: true }\n }\n for (i = arguments.length; i-- > 2; ) {\n stack.push(arguments[i])\n }\n if (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,\n key: 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, DOM_EVENT_MAP } 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, options) {\n /** @type {Element} */\n let node = isSvg\n ? document.createElementNS('http://www.w3.org/2000/svg', nodeName)\n : document.createElement(nodeName, options)\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' || name === 'ignoreAttrs') {\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 === 'unsafeHTML') {\n if (value) node.innerHTML = value.html || value || ''\n } else if (name === 'dangerouslySetInnerHTML') {\n if (value) node.innerHTML = value.__html || ''\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 = ((DOM_EVENT_MAP[nameLower] || 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, removeNode } from '../dom/index'\nimport { camelCase, isArray, Fragment } from '../util'\nimport options from '../options'\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\nlet isForeignObject = false\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 // diff node list and vnode list\n innerDiffNode(parent, vnode, hydrating, component, updateSelf)\n } else {\n // connectedCallback 的时候 parent 为 null\n ret = []\n vnode.forEach((item, index) => {\n let ele = idiff(index === 0 ? dom : null, item, component, updateSelf)\n // 返回数组的情况下,在 WeElement 中进行了 shadowRoot.appendChild\n // 所有不会出现 vnode index 大于 0 丢失的情况\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 prevForeignObject = isForeignObject\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 isForeignObject = vnodeName === 'foreignObject'\n isSvgMode =\n vnodeName === 'svg'\n ? true\n : isForeignObject\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 // foreignObject 自身 isSvgMode 设置成 true,内部设置成 false\n out = createNode(vnodeName, isForeignObject || 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.unsafeHTML != null || 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 isForeignObject = prevForeignObject\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 isForeignObject || 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 isForeignObject || 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], isForeignObject || 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 * weakmap-polyfill v2.0.4 - ECMAScript6 WeakMap polyfill\n * https://github.com/polygonplanet/weakmap-polyfill\n * Copyright (c) 2015-2021 polygonplanet \n * @license MIT\n */\n\n(function(self) {\n 'use strict';\n\n if (self.WeakMap) {\n return;\n }\n\n var hasOwnProperty = Object.prototype.hasOwnProperty;\n var hasDefine = Object.defineProperty && (function() {\n try {\n // Avoid IE8's broken Object.defineProperty\n return Object.defineProperty({}, 'x', { value: 1 }).x === 1;\n } catch (e) {}\n })();\n\n var defineProperty = function(object, name, value) {\n if (hasDefine) {\n Object.defineProperty(object, name, {\n configurable: true,\n writable: true,\n value: value\n });\n } else {\n object[name] = value;\n }\n };\n\n self.WeakMap = (function() {\n\n // ECMA-262 23.3 WeakMap Objects\n function WeakMap() {\n if (this === void 0) {\n throw new TypeError(\"Constructor WeakMap requires 'new'\");\n }\n\n defineProperty(this, '_id', genId('_WeakMap'));\n\n // ECMA-262 23.3.1.1 WeakMap([iterable])\n if (arguments.length > 0) {\n // Currently, WeakMap `iterable` argument is not supported\n throw new TypeError('WeakMap iterable is not supported');\n }\n }\n\n // ECMA-262 23.3.3.2 WeakMap.prototype.delete(key)\n defineProperty(WeakMap.prototype, 'delete', function(key) {\n checkInstance(this, 'delete');\n\n if (!isObject(key)) {\n return false;\n }\n\n var entry = key[this._id];\n if (entry && entry[0] === key) {\n delete key[this._id];\n return true;\n }\n\n return false;\n });\n\n // ECMA-262 23.3.3.3 WeakMap.prototype.get(key)\n defineProperty(WeakMap.prototype, 'get', function(key) {\n checkInstance(this, 'get');\n\n if (!isObject(key)) {\n return void 0;\n }\n\n var entry = key[this._id];\n if (entry && entry[0] === key) {\n return entry[1];\n }\n\n return void 0;\n });\n\n // ECMA-262 23.3.3.4 WeakMap.prototype.has(key)\n defineProperty(WeakMap.prototype, 'has', function(key) {\n checkInstance(this, 'has');\n\n if (!isObject(key)) {\n return false;\n }\n\n var entry = key[this._id];\n if (entry && entry[0] === key) {\n return true;\n }\n\n return false;\n });\n\n // ECMA-262 23.3.3.5 WeakMap.prototype.set(key, value)\n defineProperty(WeakMap.prototype, 'set', function(key, value) {\n checkInstance(this, 'set');\n\n if (!isObject(key)) {\n throw new TypeError('Invalid value used as weak map key');\n }\n\n var entry = key[this._id];\n if (entry && entry[0] === key) {\n entry[1] = value;\n return this;\n }\n\n defineProperty(key, this._id, [key, value]);\n return this;\n });\n\n function checkInstance(x, methodName) {\n if (!isObject(x) || !hasOwnProperty.call(x, '_id')) {\n throw new TypeError(\n methodName + ' method called on incompatible receiver ' +\n typeof x\n );\n }\n }\n\n function genId(prefix) {\n return prefix + '_' + rand() + '.' + rand();\n }\n\n function rand() {\n return Math.random().toString().substring(2);\n }\n\n defineProperty(WeakMap, '_polyfill', true);\n return WeakMap;\n })();\n\n function isObject(x) {\n return Object(x) === x;\n }\n\n})(\n typeof globalThis !== 'undefined' ? globalThis :\n typeof self !== 'undefined' ? self :\n typeof window !== 'undefined' ? window :\n typeof global !== 'undefined' ? global : this\n);\n","import {\n cssToDom,\n isArray,\n hyphenate,\n getValByPath,\n capitalize,\n createStyleSheet\n} from './util'\nimport { diff } from './vdom/diff'\nimport options from './options'\nimport 'weakmap-polyfill'\n\nlet id = 0\n\nconst adoptedStyleSheetsMap = new WeakMap()\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 if (this.inject) {\n this.injection = {}\n p = this.parentNode\n let provide\n while (p && !provide) {\n provide = p.provide\n p = p.parentNode || p.host\n }\n if (provide) {\n this.inject.forEach(injectKey => {\n this.injection[injectKey] = provide[injectKey]\n })\n }\n }\n\n this.attrsToProps()\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 if (!adoptedStyleSheetsMap.has(this.constructor)) {\n const css = this.constructor.css\n if (css) {\n let styleSheets = []\n if (typeof css === 'string') {\n styleSheets = [createStyleSheet(css)]\n } else if (isArray(css)) {\n styleSheets = css.map(styleSheet => {\n if (typeof styleSheet === 'string') {\n return createStyleSheet(styleSheet)\n } else if (\n styleSheet.default &&\n typeof styleSheet.default === 'string'\n ) {\n return createStyleSheet(styleSheet.default)\n } else {\n return styleSheet\n }\n })\n } else if (css.default && typeof css.default === 'string') {\n styleSheets = [createStyleSheet(css.default)]\n } else {\n styleSheets = [css]\n }\n shadowRoot.adoptedStyleSheets = styleSheets\n adoptedStyleSheetsMap.set(this.constructor, styleSheets)\n }\n } else {\n shadowRoot.adoptedStyleSheets = adoptedStyleSheetsMap.get(\n this.constructor\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.rootElement = 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.rootElement)) {\n this.rootElement.forEach(function (item) {\n shadowRoot.appendChild(item)\n })\n } else {\n this.rootElement && shadowRoot.appendChild(this.rootElement)\n }\n this.installed()\n this.isInstalled = true\n }\n\n disconnectedCallback() {\n this.uninstall()\n this.isInstalled = false\n }\n\n update(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 if (this._customStyleElement) {\n this._customStyleElement.textContent = this._customStyleContent\n } else {\n // 当 prop css 开始没有值,后来有值\n this._customStyleElement = cssToDom(this.props.css)\n this.shadowRoot.appendChild(this._customStyleElement)\n }\n }\n this.attrsToProps()\n\n const rendered = this.render(this.props, this.store)\n this.rendered()\n\n this.rootElement = diff(\n this.rootElement,\n rendered,\n this.constructor.isLightDOM ? this : this.shadowRoot,\n this,\n updateSelf\n )\n this._willUpdate = false\n this.updated()\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.update()\n }\n\n updateSelf() {\n this.update(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() {\n if (this.props.ignoreAttrs) 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 types = isArray(attrs[key]) ? attrs[key] : [attrs[key]]\n const val = ele.getAttribute(hyphenate(key))\n if (val !== null) {\n for (let i = 0; i < types.length; i++) {\n const type = types[i]\n let matched = false\n switch (type) {\n case String:\n ele.props[key] = val\n matched = true\n break\n case Number:\n ele.props[key] = Number(val)\n matched = true\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 matched = true\n break\n case Array:\n case Object:\n if (val[0] === ':') {\n ele.props[key] = getValByPath(val.substr(1), Omi.$)\n } else {\n try {\n ele.props[key] = JSON.parse(val)\n } catch (e) {\n console.warn(\n `The ${key} object prop does not comply with the JSON specification, the incorrect string is [${val}].`\n )\n }\n }\n matched = true\n break\n }\n if (matched) 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 const handler = this.props[`on${capitalize(name)}`]\n if (handler) {\n handler(\n new CustomEvent(name, {\n detail: data\n })\n )\n } else {\n this.dispatchEvent(\n new CustomEvent(name, {\n detail: data\n })\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","import { diff } from './vdom/diff'\n\nexport function render(vnode, parent, store) {\n parent = typeof parent === 'string' ? document.querySelector(parent) : parent\n if (store) {\n parent.store = store\n }\n return diff(null, vnode, parent, false)\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 root = ele.getRootNode()\n return root && root.host\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 (typeof document === 'undefined' || '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}\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\nexport const DOM_EVENT_MAP = {\n onanimationcancel: 1,\n oncompositionend: 1,\n oncompositionstart: 1,\n oncompositionupdate: 1,\n onfocusin: 1,\n onfocusout: 1,\n onscrollend: 1,\n ontouchcancel : 1,\n ontouchend: 1,\n ontouchmove: 1,\n ontouchstart: 1\n}\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","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 { Fragment } from './util'\nimport 'construct-style-sheets-polyfill'\n\nh.f = Fragment\n\nfunction createRef() {\n\treturn {}\n}\n\nconst $ = {}\nconst Component = WeElement\nconst defineElement = define\nconst elements = options.mapping\n\nconst omi = {\n\ttag,\n\tWeElement,\n\tComponent,\n\trender,\n\th,\n\tcreateElement,\n\toptions,\n\tdefine,\n\tcloneElement,\n\tgetHost,\n\trpx,\n\tdefineElement,\n\tclassNames,\n\textractClass,\n\tcreateRef,\n\to,\n\telements,\n\t$,\n\textend,\n\tget,\n\tset,\n\tbind,\n\tunbind\n}\n\noptions.root.Omi = omi\noptions.root.omi = omi\noptions.root.Omi.version = '6.25.23'\n\nexport default omi\n\nexport {\n\ttag,\n\tWeElement,\n\tComponent,\n\trender,\n\th,\n\tcreateElement,\n\toptions,\n\tdefine,\n\tcloneElement,\n\tgetHost,\n\trpx,\n\tdefineElement,\n\tclassNames,\n\textractClass,\n\tcreateRef,\n\to,\n\telements,\n\t$,\n\textend,\n\tget,\n\tset,\n\tbind,\n\tunbind\n}\n"]}