From aef7b724eee53dae55736ee5f3f17c98238b4e41 Mon Sep 17 00:00:00 2001 From: dntzhang Date: Fri, 25 Jun 2021 16:52:06 +0800 Subject: [PATCH] feat(@omiu/table): support set align prop of column --- components/table/src/demo.d.ts | 7 ++++ components/table/src/demo.js | 64 +++++++++++++++-------------- components/table/src/demo.js.map | 2 +- components/table/src/demo.tsx | 1 + components/table/src/index.d.ts | 20 ++++++--- components/table/src/index.scss | 28 +++++++++++++ components/table/src/index.tsx | 69 +++++++++++++++++--------------- 7 files changed, 123 insertions(+), 68 deletions(-) diff --git a/components/table/src/demo.d.ts b/components/table/src/demo.d.ts index d6a6d744e..1895ba069 100644 --- a/components/table/src/demo.d.ts +++ b/components/table/src/demo.d.ts @@ -11,10 +11,17 @@ export default class Table extends WeElement { title: string; render: (item: any) => JSX.Element; key?: undefined; + align?: undefined; } | { title: string; key: string; render?: undefined; + align?: undefined; + } | { + title: string; + align: string; + render: (item: any) => JSX.Element; + key?: undefined; })[]; render(props: any): JSX.Element; } diff --git a/components/table/src/demo.js b/components/table/src/demo.js index c056fcfc6..8e9b159f2 100644 --- a/components/table/src/demo.js +++ b/components/table/src/demo.js @@ -98,7 +98,7 @@ exports = module.exports = __webpack_require__(/*! ../node_modules/css-loader/li // module -exports.push([module.i, ":host {\n display: block; }\n\n.o-table {\n background: white;\n margin: auto;\n padding: 5px;\n width: 100%;\n animation: float 5s infinite;\n border-spacing: 0;\n border-collapse: collapse;\n color: rgba(0, 0, 0, 0.87);\n font-weight: 400; }\n\n.o-table-checkbox th:first-child,\n.o-table-checkbox td:first-child {\n padding: 2px 40px 2px 16px; }\n\nth {\n border-bottom: 1px solid #E0E0E0;\n text-align: left;\n vertical-align: middle;\n padding: 14px 40px 14px 16px;\n color: rgba(0, 0, 0, 0.54);\n font-size: 0.75rem;\n line-height: 1.3125rem;\n font-weight: 500; }\n\n.o-table-border td,\n.o-table-border th {\n border-right: 1px solid #ebeef5; }\n\n.o-table-border td:first-child,\n.o-table-border th:first-child {\n border-left: 1px solid #ebeef5; }\n\n.o-table-border th {\n border-top: 1px solid #ebeef5; }\n\ntr {\n border-bottom: 1px solid #E0E0E0; }\n\ntr:hover td {\n background: #f5f5f5; }\n\ntd {\n text-align: left;\n vertical-align: middle;\n font-size: 0.875rem;\n padding: 14px 40px 14px 16px; }\n\na {\n text-decoration: none; }\n", ""]); +exports.push([module.i, ":host {\n display: block; }\n\n.o-table {\n background: white;\n margin: auto;\n padding: 5px;\n width: 100%;\n animation: float 5s infinite;\n border-spacing: 0;\n border-collapse: collapse;\n color: rgba(0, 0, 0, 0.87);\n font-weight: 400; }\n\n.o-table-checkbox th:first-child,\n.o-table-checkbox td:first-child {\n padding: 2px 40px 2px 16px; }\n\nth {\n border-bottom: 1px solid #E0E0E0;\n text-align: left;\n vertical-align: middle;\n padding: 14px 40px 14px 16px;\n color: rgba(0, 0, 0, 0.54);\n font-size: 0.75rem;\n line-height: 1.3125rem;\n font-weight: 500; }\n\n.o-table-border td,\n.o-table-border th {\n border-right: 1px solid #ebeef5; }\n\n.o-table-border td:first-child,\n.o-table-border th:first-child {\n border-left: 1px solid #ebeef5; }\n\n.o-table-border th {\n border-top: 1px solid #ebeef5; }\n\ntr {\n border-bottom: 1px solid #E0E0E0; }\n\ntr:hover td {\n background: #f5f5f5; }\n\ntd {\n text-align: left;\n vertical-align: middle;\n font-size: 0.875rem;\n padding: 14px 40px 14px 16px; }\n\na {\n text-decoration: none; }\n\n.o-table-align-left {\n text-align: left; }\n\n.o-table-align-center {\n text-align: center; }\n\n.o-table-align-right {\n text-align: right; }\n\na,\na:link,\na:visited,\na:active {\n text-decoration: none;\n color: inherit; }\n\na:hover {\n color: #07c160;\n color: var(--o-primary, #07c160); }\n", ""]); // exports @@ -2530,6 +2530,7 @@ var Table = /** @class */ (function (_super) { key: 'address', }, { title: '操作', + align: 'right', render: function (item) { return (omi_1.h("span", null, omi_1.h("a", { href: "javascript:;" }, "Delete"))); } }]; @@ -2609,15 +2610,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, }; Object.defineProperty(exports, "__esModule", { value: true }); var omi_1 = __webpack_require__(/*! omi */ "./node_modules/omi/dist/omi.esm.js"); +omi_1.options.ignoreAttrs = true; var css = __webpack_require__(/*! ./index.scss */ "./src/index.scss"); var Table = /** @class */ (function (_super) { __extends(Table, _super); function Table() { var _this = _super !== null && _super.apply(this, arguments) || this; - // static propTypes = { - // dataSource: Object, - // columns: Object - // } _this.removeItem = function (item) { _this.props.dataSource.splice(_this.props.dataSource.indexOf(item), 1); _this.update(); @@ -2636,20 +2634,6 @@ var Table = /** @class */ (function (_super) { }; return _this; } - Table.prototype.beforeRender = function () { - if (this.dataSource) { - this.props.dataSource = this.dataSource; - } - if (this.columns) { - this.props.columns = this.columns; - } - if (this.hasOwnProperty('checkbox')) { - this.props.checkbox = this.checkbox; - } - if (this.hasOwnProperty('border')) { - this.props.border = this.border; - } - }; Table.prototype._getCheckedState = function () { var c = 0, uc = 0; for (var i = 0, len = this.props.dataSource.length; i < len; i++) { @@ -2669,37 +2653,59 @@ var Table = /** @class */ (function (_super) { }; Table.prototype.render = function (props) { var _this = this; + console.error(props); if (!props.columns) return; if (!props.dataSource) return; return (omi_1.h("table", __assign({}, omi_1.extractClass(props, 'o-table', { 'o-table-checkbox': props.checkbox, - 'o-table-border': props.border + 'o-table-border': props.border, + 'o-table-stripe': props.stripe })), omi_1.h("thead", null, - omi_1.h("tr", null, props.columns.map(function (item, index) { + omi_1.h("tr", null, props.columns.map(function (column, index) { + var _a; var obj = {}; - var width = item.width; + var width = column.width; if (width !== undefined) { obj.style = { width: typeof width === 'number' ? width + 'px' : width }; } - return omi_1.h("th", __assign({}, obj, { class: "text-left" }), - index === 0 && props.checkbox && omi_1.h("o-checkbox", __assign({}, _this._getCheckedState(), { onChange: function (_) { return _this._changeHandlerTh(_, item); } })), - item.title); + return omi_1.h("th", __assign({}, obj, { class: omi_1.classNames((_a = {}, + _a["o-table-align-" + column.align] = column.align, + _a)) }), + index === 0 && props.checkbox && omi_1.h("o-checkbox", __assign({}, _this._getCheckedState(), { onChange: function (_) { return _this._changeHandlerTh(_, column); } })), + column.title); }))), - omi_1.h("tbody", { class: "table-hover" }, props.dataSource.map(function (item) { return (omi_1.h("tr", null, props.columns.map(function (subItem, subIndex) { + omi_1.h("tbody", { class: "table-hover" }, props.dataSource.map(function (item) { return (omi_1.h("tr", null, props.columns.map(function (column, subIndex) { + var _a; var obj = {}; - var width = subItem.width; + var width = column.width; if (width !== undefined) { obj.style = { width: typeof width === 'number' ? width + 'px' : width }; } - return omi_1.h("td", __assign({}, obj, { class: "text-left" }), + return omi_1.h("td", __assign({}, obj, { class: omi_1.classNames((_a = {}, + _a["o-table-align-" + column.align] = column.align, + _a)) }), subIndex === 0 && props.checkbox && omi_1.h("o-checkbox", { checked: item.checked, onChange: function (_) { return _this._changeHandlerTd(_, item); } }), - subItem.render ? subItem.render(item) : item[subItem.key]); + column.render ? column.render(item) : item[column.key]); }))); })))); }; Table.css = css; + Table.defaultProps = { + dataSource: [], + columns: [], + checkbox: false, + border: false, + stripe: false + }; + Table.propTypes = { + dataSource: Object, + columns: Object, + checkbox: Boolean, + border: Boolean, + stripe: Boolean + }; Table = __decorate([ omi_1.tag('o-table') ], Table); diff --git a/components/table/src/demo.js.map b/components/table/src/demo.js.map index 97d63b231..1330cbbd8 100644 --- a/components/table/src/demo.js.map +++ b/components/table/src/demo.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/index.scss","webpack:///./node_modules/css-loader/lib/css-base.js","webpack:///./node_modules/omi/dist/omi.esm.js","webpack:///(webpack)/buildin/global.js","webpack:///./src/demo.tsx","webpack:///./src/index.scss?2cb4","webpack:///./src/index.tsx"],"names":[],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;AClFA,2BAA2B,mBAAO,CAAC,6FAA4C;AAC/E;;;AAGA;AACA,cAAc,QAAS,UAAU,mBAAmB,EAAE,cAAc,sBAAsB,iBAAiB,iBAAiB,gBAAgB,iCAAiC,sBAAsB,8BAA8B,+BAA+B,qBAAqB,EAAE,yEAAyE,+BAA+B,EAAE,QAAQ,qCAAqC,qBAAqB,2BAA2B,iCAAiC,+BAA+B,uBAAuB,2BAA2B,qBAAqB,EAAE,6CAA6C,oCAAoC,EAAE,qEAAqE,mCAAmC,EAAE,wBAAwB,kCAAkC,EAAE,QAAQ,qCAAqC,EAAE,iBAAiB,wBAAwB,EAAE,QAAQ,qBAAqB,2BAA2B,wBAAwB,iCAAiC,EAAE,OAAO,0BAA0B,EAAE;;AAEhlC;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,IAAI;AACJ;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,oDAAoD,cAAc;;AAElE;AACA;;;;;;;;;;;;;AC3EA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA,YAAY,gBAAgB;AAC5B,YAAY,IAAI;AAChB;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mCAAmC,SAAS;AAC5C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,SAAS;AACT;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,mCAAmC,SAAS;AAC5C;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,SAAS;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,KAAK;AACjC;AACA;AACA,KAAK;AACL;;AAEA;AACA,sCAAsC,0DAA0D;AAChG;;AAEA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI;;AAEJ;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,mCAAmC,SAAS;AAC5C;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mCAAmC,SAAS;AAC5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,KAAK;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,WAAW,EAAE;AACb;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,yFAAyF;AACzF,KAAK;AACL;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,+CAA+C,YAAY;AAC3D;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,YAAY,QAAQ;AACpB,YAAY,MAAM;AAClB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA,qCAAqC,QAAQ;AAC7C;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,8CAA8C,KAAK;AACnD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,YAAY,QAAQ;AACpB,YAAY,MAAM;AAClB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,UAAU;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAY,KAAK;AACjB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAY,QAAQ;AACpB,YAAY,OAAO;AACnB,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iDAAiD,0CAA0C,0DAA0D,EAAE;;AAEvJ,iDAAiD,aAAa,uFAAuF,EAAE,uFAAuF;;AAE9O,0CAA0C,+DAA+D,qGAAqG,EAAE,yEAAyE,eAAe,yEAAyE,EAAE,EAAE,uHAAuH;;AAE5e;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA,kCAAkC;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,4JAA4J;AAC5J;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA,oBAAoB;AACpB;AACA,mBAAmB;AACnB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,iBAAiB;AAC9B,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,iBAAiB;AAC9B,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,IAAI;AACjB;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,iBAAiB;AAC9B,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,aAAa;AAC1B,aAAa,QAAQ,sGAAsG;AAC3H,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,iCAAiC,6BAA6B;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D,aAAa,MAAM;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qGAAqG;AACrG;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,mCAAmC,aAAa;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA,mDAAmD,0CAA0C,0DAA0D,EAAE;;AAEzJ,mDAAmD,aAAa,uFAAuF,EAAE,uFAAuF;;AAEhP,4CAA4C,+DAA+D,qGAAqG,EAAE,yEAAyE,eAAe,yEAAyE,EAAE,EAAE,uHAAuH;;AAE9e;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,gBAAgB;AAChB,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA,sEAAsE,YAAY;AAClF;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,MAAM;AACjB;AACA;AACA,2CAA2C;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe;;AAEf;AACA;;AAEA,iBAAiB,sBAAsB;AACvC;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;;AAEA,wBAAwB,YAAY,WAAW,KAAK,gDAAgD,8CAA8C,wBAAwB,mFAAmF,SAAS,eAAe,8CAA8C,iPAAiP,KAAK,WAAW,KAAK,sBAAsB,YAAY,cAAc,sWAAsW,cAAc,wCAAwC,iBAAiB,eAAe,6BAA6B,aAAa,iBAAiB,WAAW,4BAA4B,0BAA0B,gBAAgB,gCAAgC;;AAEjuC;;AAEA,2CAA2C,QAAQ;;AAEnD;AACA;AACA;AACA;;AAEA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,2BAA2B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,qCAAqC,EAAE;AAC1F;AACA;AACA,6CAA6C,mCAAmC,EAAE;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,+BAA+B,EAAE;AAClH;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,+BAA+B,0BAA0B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,0CAA0C,EAAE;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEe,kEAAG,EAAC;AACwP;AAC3Q;;;;;;;;;;;;;AC/oEA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;;AAEA;AACA;AACA,4CAA4C;;AAE5C;;;;;;;;;;;;;ACnBa;AACb;AACA;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,uDAAuD;AACpF;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA,8CAA8C,cAAc;AAC5D,YAAY,mBAAO,CAAC,+CAAK;AACzB,mBAAO,CAAC,oCAAa;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,yCAAyC,2CAA2C,EAAE;AACtF,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA,yCAAyC;AACzC,kCAAkC,oBAAoB,GAAG,cAAc;AACvE,aAAa;AACb;AACA;AACA;AACA,mCAAmC,qDAAqD;AACxF;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;;;AChFA,qBAAqB,mBAAO,CAAC,6QAAkJ;;AAE/K;AACA;AACA,SAAS;AACT;AACA;;;;;;;;;;;;;ACPa;AACb;AACA;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,uDAAuD;AACpF;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA,8CAA8C,cAAc;AAC5D,YAAY,mBAAO,CAAC,+CAAK;AACzB,UAAU,mBAAO,CAAC,sCAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,gCAAgC;AACrE;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kCAAkC,gCAAgC;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,SAAS;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA,oBAAoB;AACpB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA,oDAAoD,QAAQ,qBAAqB;AACjF,0FAA0F,6BAA6B,yBAAyB,wCAAwC,EAAE,EAAE;AAC5L;AACA,iBAAiB;AACjB,8BAA8B,uBAAuB,wCAAwC;AAC7F;AACA;AACA;AACA,iCAAiC;AACjC;AACA,gDAAgD,QAAQ,qBAAqB;AAC7E,+EAA+E,gDAAgD,wCAAwC,EAAE,EAAE;AAC3K;AACA,aAAa,IAAI,EAAE;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD","file":"demo.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/demo.tsx\");\n","exports = module.exports = require(\"../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \":host {\\n display: block; }\\n\\n.o-table {\\n background: white;\\n margin: auto;\\n padding: 5px;\\n width: 100%;\\n animation: float 5s infinite;\\n border-spacing: 0;\\n border-collapse: collapse;\\n color: rgba(0, 0, 0, 0.87);\\n font-weight: 400; }\\n\\n.o-table-checkbox th:first-child,\\n.o-table-checkbox td:first-child {\\n padding: 2px 40px 2px 16px; }\\n\\nth {\\n border-bottom: 1px solid #E0E0E0;\\n text-align: left;\\n vertical-align: middle;\\n padding: 14px 40px 14px 16px;\\n color: rgba(0, 0, 0, 0.54);\\n font-size: 0.75rem;\\n line-height: 1.3125rem;\\n font-weight: 500; }\\n\\n.o-table-border td,\\n.o-table-border th {\\n border-right: 1px solid #ebeef5; }\\n\\n.o-table-border td:first-child,\\n.o-table-border th:first-child {\\n border-left: 1px solid #ebeef5; }\\n\\n.o-table-border th {\\n border-top: 1px solid #ebeef5; }\\n\\ntr {\\n border-bottom: 1px solid #E0E0E0; }\\n\\ntr:hover td {\\n background: #f5f5f5; }\\n\\ntd {\\n text-align: left;\\n vertical-align: middle;\\n font-size: 0.875rem;\\n padding: 14px 40px 14px 16px; }\\n\\na {\\n text-decoration: none; }\\n\", \"\"]);\n\n// exports\n","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\nmodule.exports = function(useSourceMap) {\n\tvar list = [];\n\n\t// return the list of modules as css string\n\tlist.toString = function toString() {\n\t\treturn this.map(function (item) {\n\t\t\tvar content = cssWithMappingToString(item, useSourceMap);\n\t\t\tif(item[2]) {\n\t\t\t\treturn \"@media \" + item[2] + \"{\" + content + \"}\";\n\t\t\t} else {\n\t\t\t\treturn content;\n\t\t\t}\n\t\t}).join(\"\");\n\t};\n\n\t// import a list of modules into the list\n\tlist.i = function(modules, mediaQuery) {\n\t\tif(typeof modules === \"string\")\n\t\t\tmodules = [[null, modules, \"\"]];\n\t\tvar alreadyImportedModules = {};\n\t\tfor(var i = 0; i < this.length; i++) {\n\t\t\tvar id = this[i][0];\n\t\t\tif(typeof id === \"number\")\n\t\t\t\talreadyImportedModules[id] = true;\n\t\t}\n\t\tfor(i = 0; i < modules.length; i++) {\n\t\t\tvar item = modules[i];\n\t\t\t// skip already imported module\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\n\t\t\t// when a module is imported multiple times with different media queries.\n\t\t\t// I hope this will never occur (Hey this way we have smaller bundles)\n\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\n\t\t\t\tif(mediaQuery && !item[2]) {\n\t\t\t\t\titem[2] = mediaQuery;\n\t\t\t\t} else if(mediaQuery) {\n\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\n\t\t\t\t}\n\t\t\t\tlist.push(item);\n\t\t\t}\n\t\t}\n\t};\n\treturn list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n\tvar content = item[1] || '';\n\tvar cssMapping = item[3];\n\tif (!cssMapping) {\n\t\treturn content;\n\t}\n\n\tif (useSourceMap && typeof btoa === 'function') {\n\t\tvar sourceMapping = toComment(cssMapping);\n\t\tvar sourceURLs = cssMapping.sources.map(function (source) {\n\t\t\treturn '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'\n\t\t});\n\n\t\treturn [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n\t}\n\n\treturn [content].join('\\n');\n}\n\n// Adapted from convert-source-map (MIT)\nfunction toComment(sourceMap) {\n\t// eslint-disable-next-line no-undef\n\tvar base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n\tvar data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n\treturn '/*# ' + data + ' */';\n}\n","/**\n * Omi v6.19.10 http://omijs.org\n * Front End Cross-Frameworks Framework.\n * By dntzhang https://github.com/dntzhang\n * Github: https://github.com/Tencent/omi\n * MIT Licensed.\n */\n\nfunction getGlobal() {\n if (typeof global !== 'object' || !global || global.Math !== Math || global.Array !== Array) {\n return self || window || global || function () {\n return this;\n }();\n }\n return global;\n}\n\n/** Global options\n * @public\n * @namespace options {Object}\n */\nvar options = {\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\n/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n(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 || 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 return;\n }\n var 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\nfunction cssToDom(css) {\n var node = document.createElement('style');\n node.textContent = css;\n return node;\n}\n\nfunction camelCase(str) {\n return str.replace(/-(\\w)/g, function ($, $1) {\n return $1.toUpperCase();\n });\n}\n\nfunction Fragment(props) {\n return props.children;\n}\n\nfunction extend(obj, props) {\n for (var i in props) {\n 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 */\nfunction applyRef(ref, value) {\n if (ref != null) {\n if (typeof ref == 'function') ref(value);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 */\nvar defer = typeof Promise == 'function' ? Promise.resolve().then.bind(Promise.resolve()) : setTimeout;\n\nfunction isArray(obj) {\n return Object.prototype.toString.call(obj) === '[object Array]';\n}\n\nfunction getUse(data, paths, out, name) {\n var obj = [];\n paths.forEach(function (path, index) {\n var isPath = typeof path === 'string';\n if (isPath) {\n obj[index] = getTargetByPath(data, path);\n } else {\n var key = Object.keys(path)[0];\n var value = path[key];\n if (typeof value === 'string') {\n obj[index] = getTargetByPath(data, value);\n } else {\n var tempPath = value[0];\n if (typeof tempPath === 'string') {\n var tempVal = getTargetByPath(data, tempPath);\n obj[index] = value[1] ? value[1](tempVal) : tempVal;\n } else {\n var args = [];\n tempPath.forEach(function (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\nfunction pathToArr(path) {\n if (typeof path !== 'string' || !path) return [];\n // return path.split(/\\.|\\[|\\]/).filter(name => !!name)\n return path.replace(/]/g, '').replace(/\\[/g, '.').split('.');\n}\n\nfunction getTargetByPath(origin, path) {\n var arr = pathToArr(path);\n var current = origin;\n for (var i = 0, len = arr.length; i < len; i++) {\n current = current[arr[i]];\n }\n return current;\n}\n\nvar hyphenateRE = /\\B([A-Z])/g;\nfunction hyphenate(str) {\n return str.replace(hyphenateRE, '-$1').toLowerCase();\n}\n\nfunction getValByPath(path, current) {\n var arr = pathToArr(path);\n arr.forEach(function (prop) {\n current = current[prop];\n });\n return current;\n}\n\nfunction getPath(obj, out, name) {\n var result = {};\n obj.forEach(function (item) {\n if (typeof item === 'string') {\n result[item] = true;\n } else {\n var 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(function (path) {\n return result[path] = true;\n });\n }\n }\n }\n });\n if (out) out[name] = result;\n return result;\n}\n\nfunction removeItem(item, arr) {\n if (!arr) return;\n for (var i = 0, len = arr.length; i < len; i++) {\n if (arr[i] === item) {\n arr.splice(i, 1);\n break;\n }\n }\n}\n\nvar stack = [];\n\nfunction h(nodeName, attributes) {\n var 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--;) {\n stack.push(child[i]);\n }\n } else {\n if (typeof child === 'boolean') child = null;\n\n if (simple = typeof nodeName !== 'function') {\n if (child == null) child = '';else if (typeof child === 'number') child = String(child);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 var p = {\n nodeName: nodeName,\n children: children,\n attributes: attributes == null ? undefined : attributes,\n key: attributes == null ? undefined : attributes.key\n\n // if a \"vnode hook\" is defined, pass every created VNode to it\n };if (options.vnode !== undefined) options.vnode(p);\n\n return p;\n}\n\n// DOM properties that should NOT have \"px\" added when numeric\nvar IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;\n\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 */\nfunction 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 */\nfunction isNamedNode(node, nodeName) {\n return node.normalizedNodeName === nodeName || node.nodeName.toLowerCase() === nodeName.toLowerCase();\n}\n\nvar extension = {};\n\nfunction extend$1(name, handler) {\n extension['o-' + name] = handler;\n}\n\nfunction set(origin, path, value) {\n var arr = pathToArr(path);\n var current = origin;\n for (var 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\nfunction get(origin, path) {\n var arr = pathToArr(path);\n var current = origin;\n for (var 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\nfunction bind(el, type, handler) {\n el._listeners = el._listeners || {};\n el._listeners[type] = handler;\n el.addEventListener(type, eventProxy);\n}\n\nfunction unbind(el, type) {\n el.removeEventListener(type, eventProxy);\n}\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 */\nfunction createNode(nodeName, isSvg) {\n /** @type {Element} */\n var node = isSvg ? document.createElementNS('http://www.w3.org/2000/svg', nodeName) : 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 */\nfunction removeNode(node) {\n var 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 */\nfunction 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 (var i in old) {\n if (!(i in value)) node.style[i] = '';\n }\n }\n for (var i in value) {\n node.style[i] = typeof value[i] === 'number' && IS_NON_DIMENSIONAL.test(i) === false ? value[i] + 'px' : value[i];\n }\n }\n } else if (name === 'dangerouslySetInnerHTML') {\n if (value) node.innerHTML = value.__html || '';\n } else if (name[0] == 'o' && name[1] == 'n') {\n var useCapture = name !== (name = name.replace(/Capture$/, ''));\n var nameLower = name.toLowerCase();\n name = (nameLower in node ? nameLower : name).slice(2);\n if (value) {\n if (!old) {\n node.addEventListener(name, eventProxy$1, useCapture);\n if (name == 'tap') {\n node.addEventListener('touchstart', touchStart, useCapture);\n node.addEventListener('touchend', touchEnd, useCapture);\n }\n }\n } else {\n node.removeEventListener(name, eventProxy$1, useCapture);\n if (name == 'tap') {\n node.removeEventListener('touchstart', touchStart, useCapture);\n node.removeEventListener('touchend', touchEnd, useCapture);\n }\n }\n(node._listeners || (node._listeners = {}))[name] = value;\n } else if (node.nodeName === 'INPUT' && name === 'value') {\n node[name] = value == null ? '' : value;\n } else if (name !== 'list' && name !== 'type' && name !== 'css' && !isSvg && name in node && value !== '') {\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') node.pureRemoveAttribute ? node.pureRemoveAttribute(name) : node.removeAttribute(name);\n } else {\n var 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) node.removeAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase());else node.pureRemoveAttribute ? node.pureRemoveAttribute(name) : node.removeAttribute(name);\n } else if (typeof value !== 'function') {\n if (ns) {\n node.setAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase(), value);\n } else {\n node.pureSetAttribute ? node.pureSetAttribute(name, value) : node.setAttribute(name, value);\n }\n }\n }\n}\n\n/**\n * Proxy an event to hooked event handlers\n * @param {Event} e The event object from the browser\n * @private\n */\nfunction eventProxy$1(e) {\n return this._listeners[e.type](options.event && options.event(e) || e);\n}\n\nfunction touchStart(e) {\n this.___touchX = e.touches[0].pageX;\n this.___touchY = e.touches[0].pageY;\n this.___scrollTop = document.body.scrollTop;\n}\n\nfunction touchEnd(e) {\n if (Math.abs(e.changedTouches[0].pageX - this.___touchX) < 30 && Math.abs(e.changedTouches[0].pageY - this.___touchY) < 30 && Math.abs(document.body.scrollTop - this.___scrollTop) < 30) {\n this.dispatchEvent(new CustomEvent('tap', { detail: e }));\n }\n}\n\n/** Diff recursion count, used to track the end of the diff cycle. */\nvar diffLevel = 0;\n\n/** Global flag indicating if the diff is currently within an SVG */\nvar isSvgMode = false;\n\n/** Global flag indicating if the diff is performing hydration */\nvar 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 */\nfunction 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 var 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 && !('prevProps' in dom);\n }\n if (vnode && vnode.nodeName === Fragment) {\n vnode = vnode.children;\n }\n if (isArray(vnode)) {\n if (parent) {\n var styles = parent.querySelectorAll('style');\n styles.forEach(function (s) {\n parent.removeChild(s);\n });\n innerDiffNode(parent, vnode, hydrating, component, updateSelf);\n\n for (var i = styles.length - 1; i >= 0; i--) {\n parent.firstChild ? parent.insertBefore(styles[i], parent.firstChild) : parent.appendChild(style[i]);\n }\n } else {\n ret = [];\n vnode.forEach(function (item, index) {\n var ele = idiff(index === 0 ? dom : null, item, component, updateSelf);\n ret.push(ele);\n });\n }\n } else {\n if (isArray(dom)) {\n dom.forEach(function (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 var 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 (dom && dom.splitText !== undefined && dom.parentNode && (!dom._component || component)) {\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['prevProps'] = true;\n\n return out;\n }\n\n // If the VNode represents a Component, perform a component diff:\n var vnodeName = vnode.nodeName;\n if (typeof vnodeName === 'function') {\n for (var 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 = vnodeName === 'svg' ? true : vnodeName === 'foreignObject' ? false : 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) {\n out.appendChild(dom.firstChild);\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 var fc = out.firstChild,\n props = out['prevProps'],\n vchildren = vnode.children;\n\n if (props == null) {\n props = out['prevProps'] = {};\n for (var a = out.attributes, i = a.length; i--;) {\n props[a[i].name] = a[i].value;\n }\n }\n\n // Optimization: fast-path for elements containing a single TextNode:\n if (!hydrating && vchildren && vchildren.length === 1 && typeof vchildren[0] === 'string' && fc != null && fc.splitText !== undefined && fc.nextSibling == null) {\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(out, vchildren, hydrating || props.dangerouslySetInnerHTML != null, component, updateSelf);\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 var 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 (var i = 0; i < len; i++) {\n var _child = originalChildren[i],\n props = _child['prevProps'],\n key = vlen && props ? _child._component ? _child._component.__key : props.key : null;\n if (key != null) {\n keyedLen++;\n keyed[key] = _child;\n } else if (props || (_child.splitText !== undefined ? isHydrating ? _child.nodeValue.trim() : true : isHydrating)) {\n children[childrenLen++] = _child;\n }\n }\n }\n\n if (vlen !== 0) {\n for (var i = 0; i < vlen; i++) {\n vchild = vchildren[i];\n child = null;\n\n // attempt to find a node based on key matching\n var 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 (children[j] !== undefined && isSameNodeType(c = children[j], vchild, isHydrating)) {\n child = c;\n children[j] = undefined;\n if (j === childrenLen - 1) childrenLen--;\n if (j === min) min++;\n break;\n }\n }\n }\n\n // morph the matched/found/created DOM child to match vchild (deep)\n child = idiff(child, vchild, component, updateSelf);\n\n f = originalChildren[i];\n if (child && child !== dom && child !== f) {\n if (f == null) {\n dom.appendChild(child);\n } else if (child === f.nextSibling) {\n removeNode(f);\n } else {\n dom.insertBefore(child, f);\n }\n }\n }\n }\n\n // remove unused keyed children:\n if (keyedLen) {\n for (var i in keyed) {\n if (keyed[i] !== undefined) recollectNodeTree(keyed[i], false);\n }\n }\n\n // remove orphaned unkeyed children:\n while (min <= childrenLen) {\n if ((child = children[childrenLen--]) !== undefined) 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 */\nfunction 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['prevProps'] != null && node['prevProps'].ref) {\n if (typeof node['prevProps'].ref === 'function') {\n node['prevProps'].ref(null);\n } else if (node['prevProps'].ref.current) {\n node['prevProps'].ref.current = null;\n }\n }\n\n if (unmountOnly === false || node['prevProps'] == 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 */\nfunction removeChildren(node) {\n node = node.lastChild;\n while (node) {\n var 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 var name;\n //let update = false\n var isWeElement = dom.update;\n var oldClone;\n if (dom.receiveProps) {\n oldClone = Object.assign({}, old);\n }\n // remove attributes no longer present on the vnode by setting them to undefined\n for (name in old) {\n if (!(attrs && attrs[name] != null) && old[name] != null) {\n setAccessor(dom, name, old[name], old[name] = undefined, isSvgMode, component);\n if (isWeElement) {\n delete dom.props[name];\n //update = true\n }\n }\n }\n\n // add new & update changed attributes\n for (name in attrs) {\n if (isWeElement && typeof attrs[name] === 'object' && name !== 'ref') {\n if (name === 'style') {\n setAccessor(dom, name, old[name], old[name] = attrs[name], isSvgMode, component);\n }\n var ccName = camelCase(name);\n dom.props[ccName] = old[ccName] = attrs[name];\n //update = true\n } else if (name !== 'children' && (!(name in old) || attrs[name] !== (name === 'value' || name === 'checked' ? dom[name] : old[name]))) {\n setAccessor(dom, name, old[name], attrs[name], isSvgMode, component);\n if (isWeElement) {\n var _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\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar id = 0;\n\nvar WeElement = function (_HTMLElement) {\n _inherits(WeElement, _HTMLElement);\n\n function WeElement() {\n _classCallCheck(this, WeElement);\n\n var _this = _possibleConstructorReturn(this, _HTMLElement.call(this));\n\n _this.props = Object.assign({}, _this.constructor.defaultProps);\n _this.elementId = id++;\n _this.computed = {};\n return _this;\n }\n\n WeElement.prototype.connectedCallback = function connectedCallback() {\n var 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 var use = typeof this.use === 'function' ? this.use() : this.use;\n\n if (options.isMultiStore) {\n var _updatePath = {};\n var using = {};\n for (var 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 var _use = typeof this.useSelf === 'function' ? this.useSelf() : this.useSelf;\n if (options.isMultiStore) {\n var _updatePath2 = {};\n var _using = {};\n for (var _storeName in _use) {\n getPath(_use[_storeName], _updatePath2, _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 = _updatePath2;\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 (var key in this.compute) {\n this.computed[key] = this.compute[key].call(options.isMultiStore ? this.store : this.store.data);\n }\n }\n\n this.beforeInstall();\n this.install();\n this.afterInstall();\n\n var 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 var fc;\n while (fc = shadowRoot.firstChild) {\n shadowRoot.removeChild(fc);\n }\n }\n }\n\n if (this.constructor.css) {\n if (typeof this.constructor.css === 'string') {\n this.styleSheet = new CSSStyleSheet();\n this.styleSheet.replaceSync(this.constructor.css);\n } else {\n this.styleSheet = this.constructor.css;\n }\n shadowRoot.adoptedStyleSheets = [this.styleSheet];\n }\n\n if (this.css) {\n shadowRoot.appendChild(cssToDom(typeof this.css === 'function' ? this.css() : this.css));\n }\n\n this.beforeRender();\n options.afterInstall && options.afterInstall(this);\n\n var rendered = this.render(this.props, this.store);\n\n this.rootNode = diff(null, rendered, null, this);\n this.rendered();\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 WeElement.prototype.disconnectedCallback = function disconnectedCallback() {\n this.uninstall();\n this._isInstalled = false;\n if (this.store) {\n if (options.isMultiStore) {\n for (var key in this.store) {\n var 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 WeElement.prototype.update = function 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 var rendered = this.render(this.props, this.store);\n this.rendered();\n\n this.rootNode = diff(this.rootNode, rendered, this.constructor.isLightDom ? this : this.shadowRoot, this, updateSelf);\n this._willUpdate = false;\n this.updated();\n };\n\n WeElement.prototype.forceUpdate = function forceUpdate() {\n this.update(true);\n };\n\n WeElement.prototype.updateProps = function updateProps(obj) {\n var _this2 = this;\n\n Object.keys(obj).forEach(function (key) {\n _this2.props[key] = obj[key];\n if (_this2.prevProps) {\n _this2.prevProps[key] = obj[key];\n }\n });\n this.forceUpdate();\n };\n\n WeElement.prototype.updateSelf = function updateSelf(ignoreAttrs) {\n this.update(ignoreAttrs, true);\n };\n\n WeElement.prototype.removeAttribute = function removeAttribute(key) {\n _HTMLElement.prototype.removeAttribute.call(this, key);\n //Avoid executing removeAttribute methods before connectedCallback\n this._isInstalled && this.update();\n };\n\n WeElement.prototype.setAttribute = function setAttribute(key, val) {\n if (val && typeof val === 'object') {\n _HTMLElement.prototype.setAttribute.call(this, key, JSON.stringify(val));\n } else {\n _HTMLElement.prototype.setAttribute.call(this, key, val);\n }\n //Avoid executing setAttribute methods before connectedCallback\n this._isInstalled && this.update();\n };\n\n WeElement.prototype.pureRemoveAttribute = function pureRemoveAttribute(key) {\n _HTMLElement.prototype.removeAttribute.call(this, key);\n };\n\n WeElement.prototype.pureSetAttribute = function pureSetAttribute(key, val) {\n _HTMLElement.prototype.setAttribute.call(this, key, val);\n };\n\n WeElement.prototype.attrsToProps = function attrsToProps(ignoreAttrs) {\n if (options.ignoreAttrs || ignoreAttrs) return;\n var ele = this;\n ele.props['css'] = ele.getAttribute('css');\n var attrs = this.constructor.propTypes;\n if (!attrs) return;\n Object.keys(attrs).forEach(function (key) {\n var type = attrs[key];\n var 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(val.replace(/(['\"])?([a-zA-Z0-9_-]+)(['\"])?:([^\\/])/g, '\"$2\":$4').replace(/'([\\s\\S]*?)'/g, '\"$1\"').replace(/,(\\s*})/g, '$1'));\n }\n break;\n }\n } else {\n if (ele.constructor.defaultProps && ele.constructor.defaultProps.hasOwnProperty(key)) {\n ele.props[key] = ele.constructor.defaultProps[key];\n } else {\n ele.props[key] = null;\n }\n }\n });\n };\n\n WeElement.prototype.fire = function fire(name, data) {\n this.dispatchEvent(new CustomEvent(name, {\n detail: data\n }));\n };\n\n WeElement.prototype.beforeInstall = function beforeInstall() {};\n\n WeElement.prototype.install = function install() {};\n\n WeElement.prototype.afterInstall = function afterInstall() {};\n\n WeElement.prototype.installed = function installed() {};\n\n WeElement.prototype.uninstall = function uninstall() {};\n\n WeElement.prototype.beforeUpdate = function beforeUpdate() {};\n\n WeElement.prototype.updated = function updated() {};\n\n WeElement.prototype.beforeRender = function beforeRender() {};\n\n WeElement.prototype.rendered = function rendered() {};\n\n WeElement.prototype.receiveProps = function receiveProps() {};\n\n return WeElement;\n}(HTMLElement);\n\nWeElement.is = 'WeElement';\n\n/*!\n * https://github.com/Palindrom/JSONPatcherProxy\n * (c) 2017 Starcounter\n * MIT license\n */\n\n/** Class representing a JS Object observer */\nvar 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 var pathComponents = [];\n var 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 var 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 var parentPath = findObjectPath(instance, target);\n\n var destinationPropKey = parentPath + '/' + escapePathComponent(key);\n\n if (instance.proxifiedObjectsMap.has(newValue)) {\n var 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 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 var revokableInstance = instance.proxifiedObjectsMap.get(newValue);\n /*\n Why do we need to check instance.isProxifyingTreeNow?\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 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 (newValue && typeof newValue == 'object' && !instance.proxifiedObjectsMap.has(newValue)) {\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 var 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)) {\noperation.op = 'replace', operation.value = null;\n }\n var 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('JSONPatcherProxy noticed a non-integer prop was set for an array. This will not emit a patch');\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 var 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 var parentPath = findObjectPath(instance, target);\n var destinationPropKey = parentPath + '/' + escapePathComponent(key);\n\n var revokableProxyInstance = instance.proxifiedObjectsMap.get(target[key]);\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 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 var 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 var _this = this;\n\n this.defaultCallback = function (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 = function () {};\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 var _this2 = this;\n\n if (!obj) {\n return obj;\n }\n var traps = {\n set: function set(target, key, value, receiver) {\n return setTrap(_this2, target, key, value, receiver);\n },\n deleteProperty: function deleteProperty(target, key) {\n return deleteTrap(_this2, target, key);\n }\n };\n var 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: parent, path: 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 (parent, root, path) {\n for (var key in root) {\n if (root.hasOwnProperty(key)) {\n if (root[key] instanceof Object) {\n root[key] = this._proxifyObjectTreeRecursively(root, root[key], escapePathComponent(key));\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 var proxifiedObject = this._proxifyObjectTreeRecursively(undefined, root, '');\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 (revokableProxyInstance) {\n if (this.showDetachedWarning) {\n var message = \"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 = function (targetObject, propKey, newValue) {\n console.warn(message);\n return Reflect.set(targetObject, propKey, newValue);\n };\n revokableProxyInstance.trapsInstance.set = function (targetObject, propKey, newValue) {\n console.warn(message);\n return Reflect.set(targetObject, propKey, newValue);\n };\n revokableProxyInstance.trapsInstance.deleteProperty = function (targetObject, propKey) {\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(function (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\nfunction render(vnode, parent, store) {\n parent = typeof parent === 'string' ? document.querySelector(parent) : parent;\n if (store) {\n if (store.data) {\n observeStore(store);\n } else {\n options.isMultiStore = true;\n //Multi-store injection\n for (var key in store) {\n observeStore(store[key], key);\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 JSONPatcherProxy(store.data).observe(false, function (patch) {\n var patchs = {};\n if (patch.op === 'remove') {\n // fix arr splice\n var kv = getArrayPatch(patch.path, store);\n patchs[kv.k] = kv.v;\n\n update(patchs, store);\n } else {\n var 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(function (instance) {\n compute(instance, key);\n if (key) {\n if (instance._updatePath && instance._updatePath[key] && needUpdate(patch, instance._updatePath[key])) {\n if (instance.use) {\n getUse(store.data, (typeof instance.use === 'function' ? instance.use() : instance.use)[key], instance.using, key);\n }\n\n instance.update();\n }\n } else {\n if (instance._updatePath && needUpdate(patch, instance._updatePath)) {\n if (instance.use) {\n instance.using = getUse(store.data, typeof instance.use === 'function' ? instance.use() : instance.use);\n }\n\n instance.update();\n }\n }\n });\n\n this.updateSelfInstances.forEach(function (instance) {\n compute(instance, key);\n if (key) {\n if (instance._updateSelfPath && instance._updateSelfPath[key] && needUpdate(patch, instance._updateSelfPath[key])) {\n if (instance.useSelf) {\n getUse(store.data, (typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)[key], instance.usingSelf, key);\n }\n\n instance.updateSelf();\n }\n } else {\n if (instance._updateSelfPath && needUpdate(patch, instance._updateSelfPath)) {\n instance.usingSelf = getUse(store.data, typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf);\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 (var ck in instance.compute) {\n instance.computed[ck] = instance.compute[ck].call(isMultiStore ? instance.store : instance.store.data);\n }\n }\n}\n\nfunction needUpdate(diffResult, updatePath) {\n for (var keyA in diffResult) {\n if (updatePath[keyA]) {\n return true;\n }\n for (var 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 var next = pathA.substr(pathB.length, 1);\n if (next === '[' || next === '.') {\n return true;\n }\n }\n return false;\n}\n\nfunction fixPath(path) {\n var mpPath = '';\n var arr = path.replace('/', '').split('/');\n arr.forEach(function (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 var arr = path.replace('/', '').split('/');\n var current = store.data[arr[0]];\n for (var 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 var mpPath = '';\n var arr = path.replace('/', '').split('/');\n var len = arr.length;\n arr.forEach(function (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\nfunction _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn$1(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits$1(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar storeHelpers = ['use', 'useSelf'];\n\nfunction define(name, ctor, config) {\n if (options.mapping[name]) {\n return;\n }\n if (ctor.is === 'WeElement') {\n customElements.define(name, ctor);\n options.mapping[name] = ctor;\n } else {\n if (typeof config === 'string') {\n config = { css: config };\n } else {\n config = config || {};\n }\n\n var Ele = function (_WeElement) {\n _inherits$1(Ele, _WeElement);\n\n function Ele() {\n var _temp, _this, _ret;\n\n _classCallCheck$1(this, Ele);\n\n for (var _len = arguments.length, args = Array(_len), key = 0; key < _len; key++) {\n args[key] = arguments[key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn$1(this, _WeElement.call.apply(_WeElement, [this].concat(args))), _this), _this.compute = config.compute, _temp), _possibleConstructorReturn$1(_this, _ret);\n }\n\n Ele.prototype.render = function render() {\n return ctor.call(this, this);\n };\n\n return Ele;\n }(WeElement);\n\n Ele.css = config.css;\n Ele.propTypes = config.propTypes;\n Ele.defaultProps = config.defaultProps;\n Ele.isLightDom = config.isLightDom;\n\n var _loop = function _loop(key) {\n if (typeof config[key] === 'function') {\n Ele.prototype[key] = function () {\n return config[key].apply(this, arguments);\n };\n }\n };\n\n for (var key in config) {\n _loop(key);\n }\n\n storeHelpers.forEach(function (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\nfunction tag(name, pure) {\n return function (target) {\n target.pure = pure;\n define(name, target);\n };\n}\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 */\nfunction cloneElement(vnode, props) {\n return h(vnode.nodeName, extend(extend({}, vnode.attributes), props), arguments.length > 2 ? [].slice.call(arguments, 2) : vnode.children);\n}\n\nfunction getHost(ele) {\n var 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\nfunction rpx(str) {\n return str.replace(/([1-9]\\d*|0)(\\.\\d*)*rpx/g, function (a, b) {\n return window.innerWidth * Number(b) / 750 + 'px';\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\nfunction 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\nfunction extractClass() {\n var _Array$prototype$slic = Array.prototype.slice.call(arguments, 0),\n props = _Array$prototype$slic[0],\n args = _Array$prototype$slic.slice(1);\n\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\nfunction o(obj) {\n return JSON.stringify(obj);\n}\n\nvar n=function(t,r,u,e){for(var p=1;p=5&&((e||!n&&5===u)&&(s.push(e,u,r), u=6), n&&(s.push(n,u,r), u=6)), e=\"\";},a=0;a\"===t?(u=1, e=\"\"):e=t+e[0]:p?t===p?p=\"\":e+=t:'\"'===t||\"'\"===t?p=t:\">\"===t?(h(), u=1):u&&(\"=\"===t?(u=5, r=e, e=\"\"):\"/\"===t&&(u<5||\">\"===n[a][f+1])?(h(), 3===u&&(s=s[0]), u=s, (s=s[0]).push(u,2), u=0):\" \"===t||\"\\t\"===t||\"\\n\"===t||\"\\r\"===t?(h(), u=2):e+=t), 3===u&&\"!--\"===e&&(u=4, s=s[0]);}return h(), s},r=\"function\"==typeof Map,u=r?new Map:{},e=r?function(n){var r=u.get(n);return r||u.set(n,r=t(n)), r}:function(n){for(var r=\"\",e=0;e1?r:r[0]}\n\n(function () {\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\nh.f = Fragment;\n\nvar html = htm.bind(h);\n\nfunction createRef() {\n return {};\n}\n\nvar $ = {};\nvar Component = WeElement;\nvar defineElement = define;\nvar elements = options.mapping;\n\nvar omi = {\n tag: tag,\n WeElement: WeElement,\n Component: Component,\n render: render,\n h: h,\n createElement: h,\n options: options,\n define: define,\n cloneElement: cloneElement,\n getHost: getHost,\n rpx: rpx,\n defineElement: defineElement,\n classNames: classNames,\n extractClass: extractClass,\n createRef: createRef,\n html: html,\n htm: htm,\n o: o,\n elements: elements,\n $: $,\n extend: extend$1,\n get: get,\n set: set,\n bind: bind,\n unbind: unbind,\n JSONProxy: JSONPatcherProxy\n};\n\noptions.root.Omi = omi;\noptions.root.omi = omi;\noptions.root.Omi.version = '6.19.3';\n\nexport default omi;\nexport { tag, WeElement, Component, render, h, h as createElement, options, define, cloneElement, getHost, rpx, defineElement, classNames, extractClass, createRef, html, htm, o, elements, $, extend$1 as extend, get, set, bind, unbind, JSONPatcherProxy as JSONProxy };\n//# sourceMappingURL=omi.esm.js.map\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar omi_1 = require(\"omi\");\nrequire(\"./index.tsx\");\nvar Table = /** @class */ (function (_super) {\n __extends(Table, _super);\n function Table() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.dataSource = [{\n id: 1,\n name: 'xwang',\n age: 18,\n address: 'Tencent'\n }, {\n id: 2,\n name: 'dntzhang',\n age: 12,\n address: 'Tencent'\n }, {\n id: 3,\n name: 'lucy',\n age: 12,\n address: 'Tencent'\n }, {\n id: 4,\n name: 'john',\n age: 12,\n address: 'Tencent'\n }, {\n id: 5,\n name: 'tim',\n age: 12,\n address: 'Tencent'\n }];\n _this.columns = [{\n title: 'ID',\n render: function (item) { return (omi_1.h(\"strong\", null, item.id)); },\n }, {\n title: 'Name',\n key: 'name',\n }, {\n title: 'Age',\n key: 'age',\n }, {\n title: 'Address',\n key: 'address',\n }, {\n title: '操作',\n render: function (item) { return (omi_1.h(\"span\", null,\n omi_1.h(\"a\", { href: \"javascript:;\" }, \"Delete\"))); }\n }];\n return _this;\n }\n Table.prototype.render = function (props) {\n return omi_1.h(\"o-table\", { columns: this.columns, dataSource: this.dataSource });\n };\n Table = __decorate([\n omi_1.tag('table-demo')\n ], Table);\n return Table;\n}(omi_1.WeElement));\nexports.default = Table;\nomi_1.render(omi_1.h(\"table-demo\", null), 'body');\n","\n var result = require(\"!!../node_modules/css-loader/index.js!../node_modules/resolve-url-loader/index.js!../node_modules/sass-loader/dist/cjs.js??ref--4-3!./index.scss\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n ","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar omi_1 = require(\"omi\");\nvar css = require(\"./index.scss\");\nvar Table = /** @class */ (function (_super) {\n __extends(Table, _super);\n function Table() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n // static propTypes = {\n // dataSource: Object,\n // columns: Object\n // }\n _this.removeItem = function (item) {\n _this.props.dataSource.splice(_this.props.dataSource.indexOf(item), 1);\n _this.update();\n };\n _this._changeHandlerTh = function (e, item) {\n _this.fire('changeall', { item: item, checked: e.detail });\n _this.props.dataSource.forEach(function (item) {\n item.checked = e.detail;\n });\n _this.update();\n };\n _this._changeHandlerTd = function (e, item) {\n _this.fire('change', { item: item, checked: e.detail });\n item.checked = e.detail;\n _this.update();\n };\n return _this;\n }\n Table.prototype.beforeRender = function () {\n if (this.dataSource) {\n this.props.dataSource = this.dataSource;\n }\n if (this.columns) {\n this.props.columns = this.columns;\n }\n if (this.hasOwnProperty('checkbox')) {\n this.props.checkbox = this.checkbox;\n }\n if (this.hasOwnProperty('border')) {\n this.props.border = this.border;\n }\n };\n Table.prototype._getCheckedState = function () {\n var c = 0, uc = 0;\n for (var i = 0, len = this.props.dataSource.length; i < len; i++) {\n if (this.props.dataSource[i].checked) {\n c++;\n }\n else {\n uc++;\n }\n if (c > 0 && uc > 0) {\n return { 'indeterminate': true };\n }\n }\n if (c === 0)\n return { 'unchecked': true };\n return { 'checked': true };\n };\n Table.prototype.render = function (props) {\n var _this = this;\n if (!props.columns)\n return;\n if (!props.dataSource)\n return;\n return (omi_1.h(\"table\", __assign({}, omi_1.extractClass(props, 'o-table', {\n 'o-table-checkbox': props.checkbox,\n 'o-table-border': props.border\n })),\n omi_1.h(\"thead\", null,\n omi_1.h(\"tr\", null, props.columns.map(function (item, index) {\n var obj = {};\n var width = item.width;\n if (width !== undefined) {\n obj.style = { width: typeof width === 'number' ? width + 'px' : width };\n }\n return omi_1.h(\"th\", __assign({}, obj, { class: \"text-left\" }),\n index === 0 && props.checkbox && omi_1.h(\"o-checkbox\", __assign({}, _this._getCheckedState(), { onChange: function (_) { return _this._changeHandlerTh(_, item); } })),\n item.title);\n }))),\n omi_1.h(\"tbody\", { class: \"table-hover\" }, props.dataSource.map(function (item) { return (omi_1.h(\"tr\", null, props.columns.map(function (subItem, subIndex) {\n var obj = {};\n var width = subItem.width;\n if (width !== undefined) {\n obj.style = { width: typeof width === 'number' ? width + 'px' : width };\n }\n return omi_1.h(\"td\", __assign({}, obj, { class: \"text-left\" }),\n subIndex === 0 && props.checkbox && omi_1.h(\"o-checkbox\", { checked: item.checked, onChange: function (_) { return _this._changeHandlerTd(_, item); } }),\n subItem.render ? subItem.render(item) : item[subItem.key]);\n }))); }))));\n };\n Table.css = css;\n Table = __decorate([\n omi_1.tag('o-table')\n ], Table);\n return Table;\n}(omi_1.WeElement));\nexports.default = Table;\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/index.scss","webpack:///./node_modules/css-loader/lib/css-base.js","webpack:///./node_modules/omi/dist/omi.esm.js","webpack:///(webpack)/buildin/global.js","webpack:///./src/demo.tsx","webpack:///./src/index.scss?2cb4","webpack:///./src/index.tsx"],"names":[],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;AClFA,2BAA2B,mBAAO,CAAC,6FAA4C;AAC/E;;;AAGA;AACA,cAAc,QAAS,UAAU,mBAAmB,EAAE,cAAc,sBAAsB,iBAAiB,iBAAiB,gBAAgB,iCAAiC,sBAAsB,8BAA8B,+BAA+B,qBAAqB,EAAE,yEAAyE,+BAA+B,EAAE,QAAQ,qCAAqC,qBAAqB,2BAA2B,iCAAiC,+BAA+B,uBAAuB,2BAA2B,qBAAqB,EAAE,6CAA6C,oCAAoC,EAAE,qEAAqE,mCAAmC,EAAE,wBAAwB,kCAAkC,EAAE,QAAQ,qCAAqC,EAAE,iBAAiB,wBAAwB,EAAE,QAAQ,qBAAqB,2BAA2B,wBAAwB,iCAAiC,EAAE,OAAO,0BAA0B,EAAE,yBAAyB,qBAAqB,EAAE,2BAA2B,uBAAuB,EAAE,0BAA0B,sBAAsB,EAAE,uCAAuC,0BAA0B,mBAAmB,EAAE,aAAa,mBAAmB,qCAAqC,EAAE;;AAEn4C;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,IAAI;AACJ;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,oDAAoD,cAAc;;AAElE;AACA;;;;;;;;;;;;;AC3EA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA,YAAY,gBAAgB;AAC5B,YAAY,IAAI;AAChB;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mCAAmC,SAAS;AAC5C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,SAAS;AACT;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,mCAAmC,SAAS;AAC5C;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,SAAS;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,KAAK;AACjC;AACA;AACA,KAAK;AACL;;AAEA;AACA,sCAAsC,0DAA0D;AAChG;;AAEA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI;;AAEJ;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,mCAAmC,SAAS;AAC5C;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mCAAmC,SAAS;AAC5C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,KAAK;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,WAAW,EAAE;AACb;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,yFAAyF;AACzF,KAAK;AACL;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,+CAA+C,YAAY;AAC3D;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,YAAY,QAAQ;AACpB,YAAY,MAAM;AAClB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA,qCAAqC,QAAQ;AAC7C;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,8CAA8C,KAAK;AACnD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,YAAY,QAAQ;AACpB,YAAY,MAAM;AAClB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,UAAU;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAY,KAAK;AACjB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAY,QAAQ;AACpB,YAAY,OAAO;AACnB,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iDAAiD,0CAA0C,0DAA0D,EAAE;;AAEvJ,iDAAiD,aAAa,uFAAuF,EAAE,uFAAuF;;AAE9O,0CAA0C,+DAA+D,qGAAqG,EAAE,yEAAyE,eAAe,yEAAyE,EAAE,EAAE,uHAAuH;;AAE5e;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA,kCAAkC;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,4JAA4J;AAC5J;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA,oBAAoB;AACpB;AACA,mBAAmB;AACnB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,iBAAiB;AAC9B,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,iBAAiB;AAC9B,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,IAAI;AACjB;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,iBAAiB;AAC9B,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,aAAa;AAC1B,aAAa,QAAQ,sGAAsG;AAC3H,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,iCAAiC,6BAA6B;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D,aAAa,MAAM;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qGAAqG;AACrG;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,mCAAmC,aAAa;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA,mDAAmD,0CAA0C,0DAA0D,EAAE;;AAEzJ,mDAAmD,aAAa,uFAAuF,EAAE,uFAAuF;;AAEhP,4CAA4C,+DAA+D,qGAAqG,EAAE,yEAAyE,eAAe,yEAAyE,EAAE,EAAE,uHAAuH;;AAE9e;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,gBAAgB;AAChB,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA,sEAAsE,YAAY;AAClF;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,MAAM;AACjB;AACA;AACA,2CAA2C;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe;;AAEf;AACA;;AAEA,iBAAiB,sBAAsB;AACvC;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;;AAEA,wBAAwB,YAAY,WAAW,KAAK,gDAAgD,8CAA8C,wBAAwB,mFAAmF,SAAS,eAAe,8CAA8C,iPAAiP,KAAK,WAAW,KAAK,sBAAsB,YAAY,cAAc,sWAAsW,cAAc,wCAAwC,iBAAiB,eAAe,6BAA6B,aAAa,iBAAiB,WAAW,4BAA4B,0BAA0B,gBAAgB,gCAAgC;;AAEjuC;;AAEA,2CAA2C,QAAQ;;AAEnD;AACA;AACA;AACA;;AAEA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,2BAA2B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,qCAAqC,EAAE;AAC1F;AACA;AACA,6CAA6C,mCAAmC,EAAE;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,+BAA+B,EAAE;AAClH;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,+BAA+B,0BAA0B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,0CAA0C,EAAE;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEe,kEAAG,EAAC;AACwP;AAC3Q;;;;;;;;;;;;;AC/oEA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;;AAEA;AACA;AACA,4CAA4C;;AAE5C;;;;;;;;;;;;;ACnBa;AACb;AACA;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,uDAAuD;AACpF;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA,8CAA8C,cAAc;AAC5D,YAAY,mBAAO,CAAC,+CAAK;AACzB,mBAAO,CAAC,oCAAa;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,yCAAyC,2CAA2C,EAAE;AACtF,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,yCAAyC;AACzC,kCAAkC,oBAAoB,GAAG,cAAc;AACvE,aAAa;AACb;AACA;AACA;AACA,mCAAmC,qDAAqD;AACxF;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;;;ACjFA,qBAAqB,mBAAO,CAAC,6QAAkJ;;AAE/K;AACA;AACA,SAAS;AACT;AACA;;;;;;;;;;;;;ACPa;AACb;AACA;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,uDAAuD;AACpF;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA,8CAA8C,cAAc;AAC5D,YAAY,mBAAO,CAAC,+CAAK;AACzB;AACA,UAAU,mBAAO,CAAC,sCAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,gCAAgC;AACrE;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kCAAkC,gCAAgC;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,SAAS;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA,oBAAoB;AACpB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA,oDAAoD,QAAQ,iCAAiC;AAC7F;AACA,kCAAkC;AAClC,0FAA0F,6BAA6B,yBAAyB,0CAA0C,EAAE,EAAE;AAC9L;AACA,iBAAiB;AACjB,8BAA8B,uBAAuB,wCAAwC;AAC7F;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA,gDAAgD,QAAQ,iCAAiC;AACzF;AACA,8BAA8B;AAC9B,+EAA+E,gDAAgD,wCAAwC,EAAE,EAAE;AAC3K;AACA,aAAa,IAAI,EAAE;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD","file":"demo.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/demo.tsx\");\n","exports = module.exports = require(\"../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \":host {\\n display: block; }\\n\\n.o-table {\\n background: white;\\n margin: auto;\\n padding: 5px;\\n width: 100%;\\n animation: float 5s infinite;\\n border-spacing: 0;\\n border-collapse: collapse;\\n color: rgba(0, 0, 0, 0.87);\\n font-weight: 400; }\\n\\n.o-table-checkbox th:first-child,\\n.o-table-checkbox td:first-child {\\n padding: 2px 40px 2px 16px; }\\n\\nth {\\n border-bottom: 1px solid #E0E0E0;\\n text-align: left;\\n vertical-align: middle;\\n padding: 14px 40px 14px 16px;\\n color: rgba(0, 0, 0, 0.54);\\n font-size: 0.75rem;\\n line-height: 1.3125rem;\\n font-weight: 500; }\\n\\n.o-table-border td,\\n.o-table-border th {\\n border-right: 1px solid #ebeef5; }\\n\\n.o-table-border td:first-child,\\n.o-table-border th:first-child {\\n border-left: 1px solid #ebeef5; }\\n\\n.o-table-border th {\\n border-top: 1px solid #ebeef5; }\\n\\ntr {\\n border-bottom: 1px solid #E0E0E0; }\\n\\ntr:hover td {\\n background: #f5f5f5; }\\n\\ntd {\\n text-align: left;\\n vertical-align: middle;\\n font-size: 0.875rem;\\n padding: 14px 40px 14px 16px; }\\n\\na {\\n text-decoration: none; }\\n\\n.o-table-align-left {\\n text-align: left; }\\n\\n.o-table-align-center {\\n text-align: center; }\\n\\n.o-table-align-right {\\n text-align: right; }\\n\\na,\\na:link,\\na:visited,\\na:active {\\n text-decoration: none;\\n color: inherit; }\\n\\na:hover {\\n color: #07c160;\\n color: var(--o-primary, #07c160); }\\n\", \"\"]);\n\n// exports\n","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\nmodule.exports = function(useSourceMap) {\n\tvar list = [];\n\n\t// return the list of modules as css string\n\tlist.toString = function toString() {\n\t\treturn this.map(function (item) {\n\t\t\tvar content = cssWithMappingToString(item, useSourceMap);\n\t\t\tif(item[2]) {\n\t\t\t\treturn \"@media \" + item[2] + \"{\" + content + \"}\";\n\t\t\t} else {\n\t\t\t\treturn content;\n\t\t\t}\n\t\t}).join(\"\");\n\t};\n\n\t// import a list of modules into the list\n\tlist.i = function(modules, mediaQuery) {\n\t\tif(typeof modules === \"string\")\n\t\t\tmodules = [[null, modules, \"\"]];\n\t\tvar alreadyImportedModules = {};\n\t\tfor(var i = 0; i < this.length; i++) {\n\t\t\tvar id = this[i][0];\n\t\t\tif(typeof id === \"number\")\n\t\t\t\talreadyImportedModules[id] = true;\n\t\t}\n\t\tfor(i = 0; i < modules.length; i++) {\n\t\t\tvar item = modules[i];\n\t\t\t// skip already imported module\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\n\t\t\t// when a module is imported multiple times with different media queries.\n\t\t\t// I hope this will never occur (Hey this way we have smaller bundles)\n\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\n\t\t\t\tif(mediaQuery && !item[2]) {\n\t\t\t\t\titem[2] = mediaQuery;\n\t\t\t\t} else if(mediaQuery) {\n\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\n\t\t\t\t}\n\t\t\t\tlist.push(item);\n\t\t\t}\n\t\t}\n\t};\n\treturn list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n\tvar content = item[1] || '';\n\tvar cssMapping = item[3];\n\tif (!cssMapping) {\n\t\treturn content;\n\t}\n\n\tif (useSourceMap && typeof btoa === 'function') {\n\t\tvar sourceMapping = toComment(cssMapping);\n\t\tvar sourceURLs = cssMapping.sources.map(function (source) {\n\t\t\treturn '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'\n\t\t});\n\n\t\treturn [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n\t}\n\n\treturn [content].join('\\n');\n}\n\n// Adapted from convert-source-map (MIT)\nfunction toComment(sourceMap) {\n\t// eslint-disable-next-line no-undef\n\tvar base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n\tvar data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n\treturn '/*# ' + data + ' */';\n}\n","/**\n * Omi v6.19.10 http://omijs.org\n * Front End Cross-Frameworks Framework.\n * By dntzhang https://github.com/dntzhang\n * Github: https://github.com/Tencent/omi\n * MIT Licensed.\n */\n\nfunction getGlobal() {\n if (typeof global !== 'object' || !global || global.Math !== Math || global.Array !== Array) {\n return self || window || global || function () {\n return this;\n }();\n }\n return global;\n}\n\n/** Global options\n * @public\n * @namespace options {Object}\n */\nvar options = {\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\n/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n(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 || 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 return;\n }\n var 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\nfunction cssToDom(css) {\n var node = document.createElement('style');\n node.textContent = css;\n return node;\n}\n\nfunction camelCase(str) {\n return str.replace(/-(\\w)/g, function ($, $1) {\n return $1.toUpperCase();\n });\n}\n\nfunction Fragment(props) {\n return props.children;\n}\n\nfunction extend(obj, props) {\n for (var i in props) {\n 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 */\nfunction applyRef(ref, value) {\n if (ref != null) {\n if (typeof ref == 'function') ref(value);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 */\nvar defer = typeof Promise == 'function' ? Promise.resolve().then.bind(Promise.resolve()) : setTimeout;\n\nfunction isArray(obj) {\n return Object.prototype.toString.call(obj) === '[object Array]';\n}\n\nfunction getUse(data, paths, out, name) {\n var obj = [];\n paths.forEach(function (path, index) {\n var isPath = typeof path === 'string';\n if (isPath) {\n obj[index] = getTargetByPath(data, path);\n } else {\n var key = Object.keys(path)[0];\n var value = path[key];\n if (typeof value === 'string') {\n obj[index] = getTargetByPath(data, value);\n } else {\n var tempPath = value[0];\n if (typeof tempPath === 'string') {\n var tempVal = getTargetByPath(data, tempPath);\n obj[index] = value[1] ? value[1](tempVal) : tempVal;\n } else {\n var args = [];\n tempPath.forEach(function (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\nfunction pathToArr(path) {\n if (typeof path !== 'string' || !path) return [];\n // return path.split(/\\.|\\[|\\]/).filter(name => !!name)\n return path.replace(/]/g, '').replace(/\\[/g, '.').split('.');\n}\n\nfunction getTargetByPath(origin, path) {\n var arr = pathToArr(path);\n var current = origin;\n for (var i = 0, len = arr.length; i < len; i++) {\n current = current[arr[i]];\n }\n return current;\n}\n\nvar hyphenateRE = /\\B([A-Z])/g;\nfunction hyphenate(str) {\n return str.replace(hyphenateRE, '-$1').toLowerCase();\n}\n\nfunction getValByPath(path, current) {\n var arr = pathToArr(path);\n arr.forEach(function (prop) {\n current = current[prop];\n });\n return current;\n}\n\nfunction getPath(obj, out, name) {\n var result = {};\n obj.forEach(function (item) {\n if (typeof item === 'string') {\n result[item] = true;\n } else {\n var 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(function (path) {\n return result[path] = true;\n });\n }\n }\n }\n });\n if (out) out[name] = result;\n return result;\n}\n\nfunction removeItem(item, arr) {\n if (!arr) return;\n for (var i = 0, len = arr.length; i < len; i++) {\n if (arr[i] === item) {\n arr.splice(i, 1);\n break;\n }\n }\n}\n\nvar stack = [];\n\nfunction h(nodeName, attributes) {\n var 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--;) {\n stack.push(child[i]);\n }\n } else {\n if (typeof child === 'boolean') child = null;\n\n if (simple = typeof nodeName !== 'function') {\n if (child == null) child = '';else if (typeof child === 'number') child = String(child);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 var p = {\n nodeName: nodeName,\n children: children,\n attributes: attributes == null ? undefined : attributes,\n key: attributes == null ? undefined : attributes.key\n\n // if a \"vnode hook\" is defined, pass every created VNode to it\n };if (options.vnode !== undefined) options.vnode(p);\n\n return p;\n}\n\n// DOM properties that should NOT have \"px\" added when numeric\nvar IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;\n\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 */\nfunction 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 */\nfunction isNamedNode(node, nodeName) {\n return node.normalizedNodeName === nodeName || node.nodeName.toLowerCase() === nodeName.toLowerCase();\n}\n\nvar extension = {};\n\nfunction extend$1(name, handler) {\n extension['o-' + name] = handler;\n}\n\nfunction set(origin, path, value) {\n var arr = pathToArr(path);\n var current = origin;\n for (var 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\nfunction get(origin, path) {\n var arr = pathToArr(path);\n var current = origin;\n for (var 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\nfunction bind(el, type, handler) {\n el._listeners = el._listeners || {};\n el._listeners[type] = handler;\n el.addEventListener(type, eventProxy);\n}\n\nfunction unbind(el, type) {\n el.removeEventListener(type, eventProxy);\n}\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 */\nfunction createNode(nodeName, isSvg) {\n /** @type {Element} */\n var node = isSvg ? document.createElementNS('http://www.w3.org/2000/svg', nodeName) : 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 */\nfunction removeNode(node) {\n var 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 */\nfunction 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 (var i in old) {\n if (!(i in value)) node.style[i] = '';\n }\n }\n for (var i in value) {\n node.style[i] = typeof value[i] === 'number' && IS_NON_DIMENSIONAL.test(i) === false ? value[i] + 'px' : value[i];\n }\n }\n } else if (name === 'dangerouslySetInnerHTML') {\n if (value) node.innerHTML = value.__html || '';\n } else if (name[0] == 'o' && name[1] == 'n') {\n var useCapture = name !== (name = name.replace(/Capture$/, ''));\n var nameLower = name.toLowerCase();\n name = (nameLower in node ? nameLower : name).slice(2);\n if (value) {\n if (!old) {\n node.addEventListener(name, eventProxy$1, useCapture);\n if (name == 'tap') {\n node.addEventListener('touchstart', touchStart, useCapture);\n node.addEventListener('touchend', touchEnd, useCapture);\n }\n }\n } else {\n node.removeEventListener(name, eventProxy$1, useCapture);\n if (name == 'tap') {\n node.removeEventListener('touchstart', touchStart, useCapture);\n node.removeEventListener('touchend', touchEnd, useCapture);\n }\n }\n(node._listeners || (node._listeners = {}))[name] = value;\n } else if (node.nodeName === 'INPUT' && name === 'value') {\n node[name] = value == null ? '' : value;\n } else if (name !== 'list' && name !== 'type' && name !== 'css' && !isSvg && name in node && value !== '') {\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') node.pureRemoveAttribute ? node.pureRemoveAttribute(name) : node.removeAttribute(name);\n } else {\n var 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) node.removeAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase());else node.pureRemoveAttribute ? node.pureRemoveAttribute(name) : node.removeAttribute(name);\n } else if (typeof value !== 'function') {\n if (ns) {\n node.setAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase(), value);\n } else {\n node.pureSetAttribute ? node.pureSetAttribute(name, value) : node.setAttribute(name, value);\n }\n }\n }\n}\n\n/**\n * Proxy an event to hooked event handlers\n * @param {Event} e The event object from the browser\n * @private\n */\nfunction eventProxy$1(e) {\n return this._listeners[e.type](options.event && options.event(e) || e);\n}\n\nfunction touchStart(e) {\n this.___touchX = e.touches[0].pageX;\n this.___touchY = e.touches[0].pageY;\n this.___scrollTop = document.body.scrollTop;\n}\n\nfunction touchEnd(e) {\n if (Math.abs(e.changedTouches[0].pageX - this.___touchX) < 30 && Math.abs(e.changedTouches[0].pageY - this.___touchY) < 30 && Math.abs(document.body.scrollTop - this.___scrollTop) < 30) {\n this.dispatchEvent(new CustomEvent('tap', { detail: e }));\n }\n}\n\n/** Diff recursion count, used to track the end of the diff cycle. */\nvar diffLevel = 0;\n\n/** Global flag indicating if the diff is currently within an SVG */\nvar isSvgMode = false;\n\n/** Global flag indicating if the diff is performing hydration */\nvar 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 */\nfunction 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 var 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 && !('prevProps' in dom);\n }\n if (vnode && vnode.nodeName === Fragment) {\n vnode = vnode.children;\n }\n if (isArray(vnode)) {\n if (parent) {\n var styles = parent.querySelectorAll('style');\n styles.forEach(function (s) {\n parent.removeChild(s);\n });\n innerDiffNode(parent, vnode, hydrating, component, updateSelf);\n\n for (var i = styles.length - 1; i >= 0; i--) {\n parent.firstChild ? parent.insertBefore(styles[i], parent.firstChild) : parent.appendChild(style[i]);\n }\n } else {\n ret = [];\n vnode.forEach(function (item, index) {\n var ele = idiff(index === 0 ? dom : null, item, component, updateSelf);\n ret.push(ele);\n });\n }\n } else {\n if (isArray(dom)) {\n dom.forEach(function (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 var 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 (dom && dom.splitText !== undefined && dom.parentNode && (!dom._component || component)) {\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['prevProps'] = true;\n\n return out;\n }\n\n // If the VNode represents a Component, perform a component diff:\n var vnodeName = vnode.nodeName;\n if (typeof vnodeName === 'function') {\n for (var 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 = vnodeName === 'svg' ? true : vnodeName === 'foreignObject' ? false : 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) {\n out.appendChild(dom.firstChild);\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 var fc = out.firstChild,\n props = out['prevProps'],\n vchildren = vnode.children;\n\n if (props == null) {\n props = out['prevProps'] = {};\n for (var a = out.attributes, i = a.length; i--;) {\n props[a[i].name] = a[i].value;\n }\n }\n\n // Optimization: fast-path for elements containing a single TextNode:\n if (!hydrating && vchildren && vchildren.length === 1 && typeof vchildren[0] === 'string' && fc != null && fc.splitText !== undefined && fc.nextSibling == null) {\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(out, vchildren, hydrating || props.dangerouslySetInnerHTML != null, component, updateSelf);\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 var 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 (var i = 0; i < len; i++) {\n var _child = originalChildren[i],\n props = _child['prevProps'],\n key = vlen && props ? _child._component ? _child._component.__key : props.key : null;\n if (key != null) {\n keyedLen++;\n keyed[key] = _child;\n } else if (props || (_child.splitText !== undefined ? isHydrating ? _child.nodeValue.trim() : true : isHydrating)) {\n children[childrenLen++] = _child;\n }\n }\n }\n\n if (vlen !== 0) {\n for (var i = 0; i < vlen; i++) {\n vchild = vchildren[i];\n child = null;\n\n // attempt to find a node based on key matching\n var 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 (children[j] !== undefined && isSameNodeType(c = children[j], vchild, isHydrating)) {\n child = c;\n children[j] = undefined;\n if (j === childrenLen - 1) childrenLen--;\n if (j === min) min++;\n break;\n }\n }\n }\n\n // morph the matched/found/created DOM child to match vchild (deep)\n child = idiff(child, vchild, component, updateSelf);\n\n f = originalChildren[i];\n if (child && child !== dom && child !== f) {\n if (f == null) {\n dom.appendChild(child);\n } else if (child === f.nextSibling) {\n removeNode(f);\n } else {\n dom.insertBefore(child, f);\n }\n }\n }\n }\n\n // remove unused keyed children:\n if (keyedLen) {\n for (var i in keyed) {\n if (keyed[i] !== undefined) recollectNodeTree(keyed[i], false);\n }\n }\n\n // remove orphaned unkeyed children:\n while (min <= childrenLen) {\n if ((child = children[childrenLen--]) !== undefined) 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 */\nfunction 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['prevProps'] != null && node['prevProps'].ref) {\n if (typeof node['prevProps'].ref === 'function') {\n node['prevProps'].ref(null);\n } else if (node['prevProps'].ref.current) {\n node['prevProps'].ref.current = null;\n }\n }\n\n if (unmountOnly === false || node['prevProps'] == 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 */\nfunction removeChildren(node) {\n node = node.lastChild;\n while (node) {\n var 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 var name;\n //let update = false\n var isWeElement = dom.update;\n var oldClone;\n if (dom.receiveProps) {\n oldClone = Object.assign({}, old);\n }\n // remove attributes no longer present on the vnode by setting them to undefined\n for (name in old) {\n if (!(attrs && attrs[name] != null) && old[name] != null) {\n setAccessor(dom, name, old[name], old[name] = undefined, isSvgMode, component);\n if (isWeElement) {\n delete dom.props[name];\n //update = true\n }\n }\n }\n\n // add new & update changed attributes\n for (name in attrs) {\n if (isWeElement && typeof attrs[name] === 'object' && name !== 'ref') {\n if (name === 'style') {\n setAccessor(dom, name, old[name], old[name] = attrs[name], isSvgMode, component);\n }\n var ccName = camelCase(name);\n dom.props[ccName] = old[ccName] = attrs[name];\n //update = true\n } else if (name !== 'children' && (!(name in old) || attrs[name] !== (name === 'value' || name === 'checked' ? dom[name] : old[name]))) {\n setAccessor(dom, name, old[name], attrs[name], isSvgMode, component);\n if (isWeElement) {\n var _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\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar id = 0;\n\nvar WeElement = function (_HTMLElement) {\n _inherits(WeElement, _HTMLElement);\n\n function WeElement() {\n _classCallCheck(this, WeElement);\n\n var _this = _possibleConstructorReturn(this, _HTMLElement.call(this));\n\n _this.props = Object.assign({}, _this.constructor.defaultProps);\n _this.elementId = id++;\n _this.computed = {};\n return _this;\n }\n\n WeElement.prototype.connectedCallback = function connectedCallback() {\n var 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 var use = typeof this.use === 'function' ? this.use() : this.use;\n\n if (options.isMultiStore) {\n var _updatePath = {};\n var using = {};\n for (var 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 var _use = typeof this.useSelf === 'function' ? this.useSelf() : this.useSelf;\n if (options.isMultiStore) {\n var _updatePath2 = {};\n var _using = {};\n for (var _storeName in _use) {\n getPath(_use[_storeName], _updatePath2, _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 = _updatePath2;\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 (var key in this.compute) {\n this.computed[key] = this.compute[key].call(options.isMultiStore ? this.store : this.store.data);\n }\n }\n\n this.beforeInstall();\n this.install();\n this.afterInstall();\n\n var 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 var fc;\n while (fc = shadowRoot.firstChild) {\n shadowRoot.removeChild(fc);\n }\n }\n }\n\n if (this.constructor.css) {\n if (typeof this.constructor.css === 'string') {\n this.styleSheet = new CSSStyleSheet();\n this.styleSheet.replaceSync(this.constructor.css);\n } else {\n this.styleSheet = this.constructor.css;\n }\n shadowRoot.adoptedStyleSheets = [this.styleSheet];\n }\n\n if (this.css) {\n shadowRoot.appendChild(cssToDom(typeof this.css === 'function' ? this.css() : this.css));\n }\n\n this.beforeRender();\n options.afterInstall && options.afterInstall(this);\n\n var rendered = this.render(this.props, this.store);\n\n this.rootNode = diff(null, rendered, null, this);\n this.rendered();\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 WeElement.prototype.disconnectedCallback = function disconnectedCallback() {\n this.uninstall();\n this._isInstalled = false;\n if (this.store) {\n if (options.isMultiStore) {\n for (var key in this.store) {\n var 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 WeElement.prototype.update = function 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 var rendered = this.render(this.props, this.store);\n this.rendered();\n\n this.rootNode = diff(this.rootNode, rendered, this.constructor.isLightDom ? this : this.shadowRoot, this, updateSelf);\n this._willUpdate = false;\n this.updated();\n };\n\n WeElement.prototype.forceUpdate = function forceUpdate() {\n this.update(true);\n };\n\n WeElement.prototype.updateProps = function updateProps(obj) {\n var _this2 = this;\n\n Object.keys(obj).forEach(function (key) {\n _this2.props[key] = obj[key];\n if (_this2.prevProps) {\n _this2.prevProps[key] = obj[key];\n }\n });\n this.forceUpdate();\n };\n\n WeElement.prototype.updateSelf = function updateSelf(ignoreAttrs) {\n this.update(ignoreAttrs, true);\n };\n\n WeElement.prototype.removeAttribute = function removeAttribute(key) {\n _HTMLElement.prototype.removeAttribute.call(this, key);\n //Avoid executing removeAttribute methods before connectedCallback\n this._isInstalled && this.update();\n };\n\n WeElement.prototype.setAttribute = function setAttribute(key, val) {\n if (val && typeof val === 'object') {\n _HTMLElement.prototype.setAttribute.call(this, key, JSON.stringify(val));\n } else {\n _HTMLElement.prototype.setAttribute.call(this, key, val);\n }\n //Avoid executing setAttribute methods before connectedCallback\n this._isInstalled && this.update();\n };\n\n WeElement.prototype.pureRemoveAttribute = function pureRemoveAttribute(key) {\n _HTMLElement.prototype.removeAttribute.call(this, key);\n };\n\n WeElement.prototype.pureSetAttribute = function pureSetAttribute(key, val) {\n _HTMLElement.prototype.setAttribute.call(this, key, val);\n };\n\n WeElement.prototype.attrsToProps = function attrsToProps(ignoreAttrs) {\n if (options.ignoreAttrs || ignoreAttrs) return;\n var ele = this;\n ele.props['css'] = ele.getAttribute('css');\n var attrs = this.constructor.propTypes;\n if (!attrs) return;\n Object.keys(attrs).forEach(function (key) {\n var type = attrs[key];\n var 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(val.replace(/(['\"])?([a-zA-Z0-9_-]+)(['\"])?:([^\\/])/g, '\"$2\":$4').replace(/'([\\s\\S]*?)'/g, '\"$1\"').replace(/,(\\s*})/g, '$1'));\n }\n break;\n }\n } else {\n if (ele.constructor.defaultProps && ele.constructor.defaultProps.hasOwnProperty(key)) {\n ele.props[key] = ele.constructor.defaultProps[key];\n } else {\n ele.props[key] = null;\n }\n }\n });\n };\n\n WeElement.prototype.fire = function fire(name, data) {\n this.dispatchEvent(new CustomEvent(name, {\n detail: data\n }));\n };\n\n WeElement.prototype.beforeInstall = function beforeInstall() {};\n\n WeElement.prototype.install = function install() {};\n\n WeElement.prototype.afterInstall = function afterInstall() {};\n\n WeElement.prototype.installed = function installed() {};\n\n WeElement.prototype.uninstall = function uninstall() {};\n\n WeElement.prototype.beforeUpdate = function beforeUpdate() {};\n\n WeElement.prototype.updated = function updated() {};\n\n WeElement.prototype.beforeRender = function beforeRender() {};\n\n WeElement.prototype.rendered = function rendered() {};\n\n WeElement.prototype.receiveProps = function receiveProps() {};\n\n return WeElement;\n}(HTMLElement);\n\nWeElement.is = 'WeElement';\n\n/*!\n * https://github.com/Palindrom/JSONPatcherProxy\n * (c) 2017 Starcounter\n * MIT license\n */\n\n/** Class representing a JS Object observer */\nvar 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 var pathComponents = [];\n var 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 var 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 var parentPath = findObjectPath(instance, target);\n\n var destinationPropKey = parentPath + '/' + escapePathComponent(key);\n\n if (instance.proxifiedObjectsMap.has(newValue)) {\n var 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 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 var revokableInstance = instance.proxifiedObjectsMap.get(newValue);\n /*\n Why do we need to check instance.isProxifyingTreeNow?\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 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 (newValue && typeof newValue == 'object' && !instance.proxifiedObjectsMap.has(newValue)) {\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 var 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)) {\noperation.op = 'replace', operation.value = null;\n }\n var 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('JSONPatcherProxy noticed a non-integer prop was set for an array. This will not emit a patch');\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 var 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 var parentPath = findObjectPath(instance, target);\n var destinationPropKey = parentPath + '/' + escapePathComponent(key);\n\n var revokableProxyInstance = instance.proxifiedObjectsMap.get(target[key]);\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 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 var 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 var _this = this;\n\n this.defaultCallback = function (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 = function () {};\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 var _this2 = this;\n\n if (!obj) {\n return obj;\n }\n var traps = {\n set: function set(target, key, value, receiver) {\n return setTrap(_this2, target, key, value, receiver);\n },\n deleteProperty: function deleteProperty(target, key) {\n return deleteTrap(_this2, target, key);\n }\n };\n var 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: parent, path: 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 (parent, root, path) {\n for (var key in root) {\n if (root.hasOwnProperty(key)) {\n if (root[key] instanceof Object) {\n root[key] = this._proxifyObjectTreeRecursively(root, root[key], escapePathComponent(key));\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 var proxifiedObject = this._proxifyObjectTreeRecursively(undefined, root, '');\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 (revokableProxyInstance) {\n if (this.showDetachedWarning) {\n var message = \"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 = function (targetObject, propKey, newValue) {\n console.warn(message);\n return Reflect.set(targetObject, propKey, newValue);\n };\n revokableProxyInstance.trapsInstance.set = function (targetObject, propKey, newValue) {\n console.warn(message);\n return Reflect.set(targetObject, propKey, newValue);\n };\n revokableProxyInstance.trapsInstance.deleteProperty = function (targetObject, propKey) {\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(function (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\nfunction render(vnode, parent, store) {\n parent = typeof parent === 'string' ? document.querySelector(parent) : parent;\n if (store) {\n if (store.data) {\n observeStore(store);\n } else {\n options.isMultiStore = true;\n //Multi-store injection\n for (var key in store) {\n observeStore(store[key], key);\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 JSONPatcherProxy(store.data).observe(false, function (patch) {\n var patchs = {};\n if (patch.op === 'remove') {\n // fix arr splice\n var kv = getArrayPatch(patch.path, store);\n patchs[kv.k] = kv.v;\n\n update(patchs, store);\n } else {\n var 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(function (instance) {\n compute(instance, key);\n if (key) {\n if (instance._updatePath && instance._updatePath[key] && needUpdate(patch, instance._updatePath[key])) {\n if (instance.use) {\n getUse(store.data, (typeof instance.use === 'function' ? instance.use() : instance.use)[key], instance.using, key);\n }\n\n instance.update();\n }\n } else {\n if (instance._updatePath && needUpdate(patch, instance._updatePath)) {\n if (instance.use) {\n instance.using = getUse(store.data, typeof instance.use === 'function' ? instance.use() : instance.use);\n }\n\n instance.update();\n }\n }\n });\n\n this.updateSelfInstances.forEach(function (instance) {\n compute(instance, key);\n if (key) {\n if (instance._updateSelfPath && instance._updateSelfPath[key] && needUpdate(patch, instance._updateSelfPath[key])) {\n if (instance.useSelf) {\n getUse(store.data, (typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)[key], instance.usingSelf, key);\n }\n\n instance.updateSelf();\n }\n } else {\n if (instance._updateSelfPath && needUpdate(patch, instance._updateSelfPath)) {\n instance.usingSelf = getUse(store.data, typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf);\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 (var ck in instance.compute) {\n instance.computed[ck] = instance.compute[ck].call(isMultiStore ? instance.store : instance.store.data);\n }\n }\n}\n\nfunction needUpdate(diffResult, updatePath) {\n for (var keyA in diffResult) {\n if (updatePath[keyA]) {\n return true;\n }\n for (var 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 var next = pathA.substr(pathB.length, 1);\n if (next === '[' || next === '.') {\n return true;\n }\n }\n return false;\n}\n\nfunction fixPath(path) {\n var mpPath = '';\n var arr = path.replace('/', '').split('/');\n arr.forEach(function (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 var arr = path.replace('/', '').split('/');\n var current = store.data[arr[0]];\n for (var 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 var mpPath = '';\n var arr = path.replace('/', '').split('/');\n var len = arr.length;\n arr.forEach(function (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\nfunction _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn$1(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits$1(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar storeHelpers = ['use', 'useSelf'];\n\nfunction define(name, ctor, config) {\n if (options.mapping[name]) {\n return;\n }\n if (ctor.is === 'WeElement') {\n customElements.define(name, ctor);\n options.mapping[name] = ctor;\n } else {\n if (typeof config === 'string') {\n config = { css: config };\n } else {\n config = config || {};\n }\n\n var Ele = function (_WeElement) {\n _inherits$1(Ele, _WeElement);\n\n function Ele() {\n var _temp, _this, _ret;\n\n _classCallCheck$1(this, Ele);\n\n for (var _len = arguments.length, args = Array(_len), key = 0; key < _len; key++) {\n args[key] = arguments[key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn$1(this, _WeElement.call.apply(_WeElement, [this].concat(args))), _this), _this.compute = config.compute, _temp), _possibleConstructorReturn$1(_this, _ret);\n }\n\n Ele.prototype.render = function render() {\n return ctor.call(this, this);\n };\n\n return Ele;\n }(WeElement);\n\n Ele.css = config.css;\n Ele.propTypes = config.propTypes;\n Ele.defaultProps = config.defaultProps;\n Ele.isLightDom = config.isLightDom;\n\n var _loop = function _loop(key) {\n if (typeof config[key] === 'function') {\n Ele.prototype[key] = function () {\n return config[key].apply(this, arguments);\n };\n }\n };\n\n for (var key in config) {\n _loop(key);\n }\n\n storeHelpers.forEach(function (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\nfunction tag(name, pure) {\n return function (target) {\n target.pure = pure;\n define(name, target);\n };\n}\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 */\nfunction cloneElement(vnode, props) {\n return h(vnode.nodeName, extend(extend({}, vnode.attributes), props), arguments.length > 2 ? [].slice.call(arguments, 2) : vnode.children);\n}\n\nfunction getHost(ele) {\n var 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\nfunction rpx(str) {\n return str.replace(/([1-9]\\d*|0)(\\.\\d*)*rpx/g, function (a, b) {\n return window.innerWidth * Number(b) / 750 + 'px';\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\nfunction 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\nfunction extractClass() {\n var _Array$prototype$slic = Array.prototype.slice.call(arguments, 0),\n props = _Array$prototype$slic[0],\n args = _Array$prototype$slic.slice(1);\n\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\nfunction o(obj) {\n return JSON.stringify(obj);\n}\n\nvar n=function(t,r,u,e){for(var p=1;p=5&&((e||!n&&5===u)&&(s.push(e,u,r), u=6), n&&(s.push(n,u,r), u=6)), e=\"\";},a=0;a\"===t?(u=1, e=\"\"):e=t+e[0]:p?t===p?p=\"\":e+=t:'\"'===t||\"'\"===t?p=t:\">\"===t?(h(), u=1):u&&(\"=\"===t?(u=5, r=e, e=\"\"):\"/\"===t&&(u<5||\">\"===n[a][f+1])?(h(), 3===u&&(s=s[0]), u=s, (s=s[0]).push(u,2), u=0):\" \"===t||\"\\t\"===t||\"\\n\"===t||\"\\r\"===t?(h(), u=2):e+=t), 3===u&&\"!--\"===e&&(u=4, s=s[0]);}return h(), s},r=\"function\"==typeof Map,u=r?new Map:{},e=r?function(n){var r=u.get(n);return r||u.set(n,r=t(n)), r}:function(n){for(var r=\"\",e=0;e1?r:r[0]}\n\n(function () {\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\nh.f = Fragment;\n\nvar html = htm.bind(h);\n\nfunction createRef() {\n return {};\n}\n\nvar $ = {};\nvar Component = WeElement;\nvar defineElement = define;\nvar elements = options.mapping;\n\nvar omi = {\n tag: tag,\n WeElement: WeElement,\n Component: Component,\n render: render,\n h: h,\n createElement: h,\n options: options,\n define: define,\n cloneElement: cloneElement,\n getHost: getHost,\n rpx: rpx,\n defineElement: defineElement,\n classNames: classNames,\n extractClass: extractClass,\n createRef: createRef,\n html: html,\n htm: htm,\n o: o,\n elements: elements,\n $: $,\n extend: extend$1,\n get: get,\n set: set,\n bind: bind,\n unbind: unbind,\n JSONProxy: JSONPatcherProxy\n};\n\noptions.root.Omi = omi;\noptions.root.omi = omi;\noptions.root.Omi.version = '6.19.3';\n\nexport default omi;\nexport { tag, WeElement, Component, render, h, h as createElement, options, define, cloneElement, getHost, rpx, defineElement, classNames, extractClass, createRef, html, htm, o, elements, $, extend$1 as extend, get, set, bind, unbind, JSONPatcherProxy as JSONProxy };\n//# sourceMappingURL=omi.esm.js.map\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar omi_1 = require(\"omi\");\nrequire(\"./index.tsx\");\nvar Table = /** @class */ (function (_super) {\n __extends(Table, _super);\n function Table() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.dataSource = [{\n id: 1,\n name: 'xwang',\n age: 18,\n address: 'Tencent'\n }, {\n id: 2,\n name: 'dntzhang',\n age: 12,\n address: 'Tencent'\n }, {\n id: 3,\n name: 'lucy',\n age: 12,\n address: 'Tencent'\n }, {\n id: 4,\n name: 'john',\n age: 12,\n address: 'Tencent'\n }, {\n id: 5,\n name: 'tim',\n age: 12,\n address: 'Tencent'\n }];\n _this.columns = [{\n title: 'ID',\n render: function (item) { return (omi_1.h(\"strong\", null, item.id)); },\n }, {\n title: 'Name',\n key: 'name',\n }, {\n title: 'Age',\n key: 'age',\n }, {\n title: 'Address',\n key: 'address',\n }, {\n title: '操作',\n align: 'right',\n render: function (item) { return (omi_1.h(\"span\", null,\n omi_1.h(\"a\", { href: \"javascript:;\" }, \"Delete\"))); }\n }];\n return _this;\n }\n Table.prototype.render = function (props) {\n return omi_1.h(\"o-table\", { columns: this.columns, dataSource: this.dataSource });\n };\n Table = __decorate([\n omi_1.tag('table-demo')\n ], Table);\n return Table;\n}(omi_1.WeElement));\nexports.default = Table;\nomi_1.render(omi_1.h(\"table-demo\", null), 'body');\n","\n var result = require(\"!!../node_modules/css-loader/index.js!../node_modules/resolve-url-loader/index.js!../node_modules/sass-loader/dist/cjs.js??ref--4-3!./index.scss\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n ","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar omi_1 = require(\"omi\");\nomi_1.options.ignoreAttrs = true;\nvar css = require(\"./index.scss\");\nvar Table = /** @class */ (function (_super) {\n __extends(Table, _super);\n function Table() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.removeItem = function (item) {\n _this.props.dataSource.splice(_this.props.dataSource.indexOf(item), 1);\n _this.update();\n };\n _this._changeHandlerTh = function (e, item) {\n _this.fire('changeall', { item: item, checked: e.detail });\n _this.props.dataSource.forEach(function (item) {\n item.checked = e.detail;\n });\n _this.update();\n };\n _this._changeHandlerTd = function (e, item) {\n _this.fire('change', { item: item, checked: e.detail });\n item.checked = e.detail;\n _this.update();\n };\n return _this;\n }\n Table.prototype._getCheckedState = function () {\n var c = 0, uc = 0;\n for (var i = 0, len = this.props.dataSource.length; i < len; i++) {\n if (this.props.dataSource[i].checked) {\n c++;\n }\n else {\n uc++;\n }\n if (c > 0 && uc > 0) {\n return { 'indeterminate': true };\n }\n }\n if (c === 0)\n return { 'unchecked': true };\n return { 'checked': true };\n };\n Table.prototype.render = function (props) {\n var _this = this;\n console.error(props);\n if (!props.columns)\n return;\n if (!props.dataSource)\n return;\n return (omi_1.h(\"table\", __assign({}, omi_1.extractClass(props, 'o-table', {\n 'o-table-checkbox': props.checkbox,\n 'o-table-border': props.border,\n 'o-table-stripe': props.stripe\n })),\n omi_1.h(\"thead\", null,\n omi_1.h(\"tr\", null, props.columns.map(function (column, index) {\n var _a;\n var obj = {};\n var width = column.width;\n if (width !== undefined) {\n obj.style = { width: typeof width === 'number' ? width + 'px' : width };\n }\n return omi_1.h(\"th\", __assign({}, obj, { class: omi_1.classNames((_a = {},\n _a[\"o-table-align-\" + column.align] = column.align,\n _a)) }),\n index === 0 && props.checkbox && omi_1.h(\"o-checkbox\", __assign({}, _this._getCheckedState(), { onChange: function (_) { return _this._changeHandlerTh(_, column); } })),\n column.title);\n }))),\n omi_1.h(\"tbody\", { class: \"table-hover\" }, props.dataSource.map(function (item) { return (omi_1.h(\"tr\", null, props.columns.map(function (column, subIndex) {\n var _a;\n var obj = {};\n var width = column.width;\n if (width !== undefined) {\n obj.style = { width: typeof width === 'number' ? width + 'px' : width };\n }\n return omi_1.h(\"td\", __assign({}, obj, { class: omi_1.classNames((_a = {},\n _a[\"o-table-align-\" + column.align] = column.align,\n _a)) }),\n subIndex === 0 && props.checkbox && omi_1.h(\"o-checkbox\", { checked: item.checked, onChange: function (_) { return _this._changeHandlerTd(_, item); } }),\n column.render ? column.render(item) : item[column.key]);\n }))); }))));\n };\n Table.css = css;\n Table.defaultProps = {\n dataSource: [],\n columns: [],\n checkbox: false,\n border: false,\n stripe: false\n };\n Table.propTypes = {\n dataSource: Object,\n columns: Object,\n checkbox: Boolean,\n border: Boolean,\n stripe: Boolean\n };\n Table = __decorate([\n omi_1.tag('o-table')\n ], Table);\n return Table;\n}(omi_1.WeElement));\nexports.default = Table;\n"],"sourceRoot":""} \ No newline at end of file diff --git a/components/table/src/demo.tsx b/components/table/src/demo.tsx index 7fc959b46..9496d09e4 100644 --- a/components/table/src/demo.tsx +++ b/components/table/src/demo.tsx @@ -45,6 +45,7 @@ export default class Table extends WeElement { key: 'address', }, { title: '操作', + align: 'right', render: item => ( Delete diff --git a/components/table/src/index.d.ts b/components/table/src/index.d.ts index 2dbbb0607..3b5bcb864 100644 --- a/components/table/src/index.d.ts +++ b/components/table/src/index.d.ts @@ -4,17 +4,27 @@ interface Props { columns: object; checkbox: boolean; border: boolean; + stripe: boolean; } export default class Table extends WeElement { static css: any; - dataSource: any[]; - columns: any[]; - checkbox: boolean; - border: boolean; + static defaultProps: { + dataSource: any[]; + columns: any[]; + checkbox: boolean; + border: boolean; + stripe: boolean; + }; + static propTypes: { + dataSource: ObjectConstructor; + columns: ObjectConstructor; + checkbox: BooleanConstructor; + border: BooleanConstructor; + stripe: BooleanConstructor; + }; removeItem: (item: any) => void; _changeHandlerTh: (e: any, item: any) => void; _changeHandlerTd: (e: any, item: any) => void; - beforeRender(): void; _getCheckedState(): { indeterminate: boolean; unchecked?: undefined; diff --git a/components/table/src/index.scss b/components/table/src/index.scss index a0e616451..4f7cc1b7b 100644 --- a/components/table/src/index.scss +++ b/components/table/src/index.scss @@ -64,3 +64,31 @@ a { text-decoration: none; } + + .o-table-align-left { + text-align: left + } + + .o-table-align-center { + text-align: center + } + + + .o-table-align-right { + text-align: right + } + + + a, + a:link, + a:visited, + + a:active { + text-decoration: none; + color: inherit; + } + + a:hover { + color: $o-primary; + color: var(--o-primary, $o-primary); + } diff --git a/components/table/src/index.tsx b/components/table/src/index.tsx index fb0258f21..11b823e21 100644 --- a/components/table/src/index.tsx +++ b/components/table/src/index.tsx @@ -1,4 +1,7 @@ -import { tag, WeElement, h, extractClass } from 'omi' +import { tag, WeElement, h, extractClass, classNames, options } from 'omi' + +options.ignoreAttrs = true + import * as css from './index.scss' // import '../checkbox/index.tsx' @@ -6,21 +9,29 @@ interface Props { dataSource: any[], columns: object, checkbox: boolean, - border: boolean + border: boolean, + stripe: boolean } @tag('o-table') export default class Table extends WeElement { static css = css - dataSource:any[] - columns:any[] - checkbox: boolean - border: boolean - // static propTypes = { - // dataSource: Object, - // columns: Object - // } + static defaultProps = { + dataSource: [], + columns: [], + checkbox: false, + border: false, + stripe: false + } + + static propTypes = { + dataSource: Object, + columns: Object, + checkbox: Boolean, + border: Boolean, + stripe: Boolean + } removeItem = (item) => { this.props.dataSource.splice(this.props.dataSource.indexOf(item), 1) @@ -32,7 +43,6 @@ export default class Table extends WeElement { this.props.dataSource.forEach(item => { item.checked = e.detail }) - this.update() } @@ -42,21 +52,6 @@ export default class Table extends WeElement { this.update() } - beforeRender(){ - if(this.dataSource){ - this.props.dataSource = this.dataSource - } - if(this.columns){ - this.props.columns = this.columns - } - if(this.hasOwnProperty('checkbox')){ - this.props.checkbox = this.checkbox - } - - if(this.hasOwnProperty('border')){ - this.props.border = this.border - } - } _getCheckedState() { let c = 0, uc = 0 @@ -77,35 +72,43 @@ export default class Table extends WeElement { } render(props) { + + console.error(props) + if (!props.columns) return if (!props.dataSource) return return ( - {props.columns.map((item, index) => { + {props.columns.map((column, index) => { const obj: any = {} - const { width } = item + const { width } = column if (width !== undefined) { obj.style = { width: typeof width === 'number' ? width + 'px' : width } } - return + return })} {props.dataSource.map(item => ( - {props.columns.map((subItem, subIndex) => { + {props.columns.map((column, subIndex) => { const obj: any = {} - const { width } = subItem + const { width } = column if (width !== undefined) { obj.style = { width: typeof width === 'number' ? width + 'px' : width } } - return + return })} ))}
{index === 0 && props.checkbox && this._changeHandlerTh(_, item)} />}{item.title}{index === 0 && props.checkbox && this._changeHandlerTh(_, column)} />}{column.title}
{subIndex === 0 && props.checkbox && this._changeHandlerTd(_, item)} />}{subItem.render ? subItem.render(item) : item[subItem.key]}{subIndex === 0 && props.checkbox && this._changeHandlerTd(_, item)} />}{column.render ? column.render(item) : item[column.key]}