@evs-chris/raui
Advanced tools
Comparing version 0.4.18 to 0.4.19
@@ -143,3 +143,3 @@ import Ractive from 'ractive'; | ||
primary.popout = Object.assign({}, data('raui.menu.popout'), data('raui.menu.primary.popout')); | ||
var base = "\n .rmenu-wrapper {\n position: relative;\n z-index: 1;\n }\n .rmenu-wrapper.rmenu-vertical {\n min-height: 100%;\n }\n .rmenu {\n " + (data('raui.menu.font') ? ("font-family: " + (data('raui.menu.font')) + ";") : '') + "\n color: " + (primary.bg || '#fff') + ";\n background-color: " + (primary.fg || '#222') + ";\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n }\n .rmenu-wrapper.alt > .rmenu {\n color: " + (primary.fga || '#222') + ";\n background-color: " + (primary.bg || '#fff') + ";\n }\n .rmenu-inner {\n width: 100%;\n height: 100%;\n overflow-y: auto;\n }\n .rmenu-item {\n border-top: 1px solid transparent;\n border-bottom: 1px solid transparent;\n transition: border 0.2s ease-in-out;\n }\n .rmenu-item:hover > .rmenu-main {\n background-color: " + (primary.fga || '#07e') + ";\n color: " + (primary.bg || '#fff') + ";\n }\n .rmenu-disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n .rmenu-popout {\n border: none;\n }\n .rmenu-expanded {\n border-top: 0.0625em solid " + (primary.bc || '#ccc') + ";\n border-bottom: 0.0625em solid " + (primary.bc || '#ccc') + ";\n }\n .rmenu-popout.rmenu-expanded {\n border: none;\n }\n .rmenu-popout .rmenu-popout.rmenu-expanded {\n background-color: " + (primary.popout.bga || primary.bg || '#fff') + ";\n color: " + (primary.popout.fg || primary.fg || '#222') + ";\n }\n .rmenu-main {\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n user-select: none;\n transition: 0.3s ease-in-out;\n transition-property: color, background-color;\n display: flex;\n align-items: center;\n min-height: 1em;\n }\n .rmenu-main.rmenu-active, .rmenu-item:hover > .rmenu-main.rmenu-active {\n color: " + (primary.fga || '#07e') + ";\n background-color: " + (primary.bg || '#fff') + ";\n }\n .rmenu-popout .rmenu-entry .rmenu-main.rmenu-active, .rmenu-popout .rmenu-item:hover > .rmenu-main.rmenu-active {\n color: " + (primary.popout.bg || primary.bg || '#fff') + ";\n background-color: " + (primary.popout.fga || primary.fga || '#07e') + ";\n }\n .rmenu-wrapper.alt .rmenu-main.rmenu.active {\n color: " + (primary.bg || '#fff') + ";\n background-color: " + (primary.fg || '#222') + ";\n }\n .rmenu-popout .rmenu-items .rmenu-item:hover > .rmenu-main {\n background-color: " + (primary.popout.bga || '#f4f4f4') + ";\n color: " + (primary.popout.fg || '#222') + ";\n }\n \n .rmenu-items {\n display: block;\n }\n .rmenu-right {\n padding-right: 0.4em; \n }\n .rmenu-left {\n padding-left: 0.4em;\n }\n .rmenu-expand {\n width: 1.5em;\n height: 1.5em;\n padding-left: 0.5em;\n cursor: pointer;\n position: relative;\n }\n .rmenu-expand:before {\n position: absolute;\n display: inline-block;\n top: 0.25em;\n content: ' ';\n transform: rotate(45deg);\n transition: transform 0.2s ease-in-out, top 0.2s ease-in-out, left 0.2s ease-in-out;\n box-sizing: border-box;\n border-width: 0.25em;\n border-style: solid;\n border-left-color: transparent;\n border-top-color: transparent;\n }\n .rmenu-expanded > .rmenu-main > .rmenu-expand:before {\n top: -0.25em;\n }\n \n .rmenu-popout > .rmenu-items {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background-color: " + (primary.popout.bg || primary.bg || '#fff') + ";\n color: " + (primary.popout.fg || primary.fg || '#222') + ";\n box-sizing: border-box;\n border-right: 1px solid " + (primary.popout.bc || primary.bc || '#ccc') + ";\n z-index: -1;\n transition: box-shadow 0.2s ease-in-out;\n }\n .rmenu-popout.rmenu-expanded > .rmenu-items {\n left: calc(100% + 1px);\n z-index: initial;\n box-shadow: 0.2em 0 0.2em rgba(0, 0, 0, 0.2);\n }\n \n .rmenu-popout > .rmenu-items.rmenu-shrink {\n left: 100%;\n z-index: 1;\n }\n .rmenu-popout.rmenu-expanded > .rmenu-items.rmenu-shrink {\n left: 0;\n }\n \n .rmenu-popout > .rmenu-main > .rmenu-expand:before {\n transform: rotate(-45deg);\n top: 0.4em;\n }\n \n .rmenu-popout.rmenu-expanded > .rmenu-main > .rmenu-expand:before {\n transform: rotate(135deg);\n left: 0.75em;\n }\n \n .rmenu-popout > .rmenu-items .rmenu-popout > .rmenu-items {\n height: calc(100% + 2px);\n width: calc(100% + 1px);\n top: -1px;\n }\n .rmenu-popout > .rmenu-items .rmenu-popout > .rmenu-items.rmenu-shrink {\n height: 100%;\n }\n \n .rmenu-popout-close {\n color: " + (primary.popout.fga || primary.fga || '#07e') + ";\n display: block;\n padding: 0.5em;\n cursor: pointer;\n }\n \n .rmenu-title {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n cursor: pointer;\n padding: 0.5em;\n flex-grow: 1;\n }\n .rmenu-disabled > .rmenu-title {\n cursor: not-allowed;\n }\n .rmenu-item h1, .rmenu-item h2, .rmenu-item h3, .rmenu-item h4 {\n margin: 0;\n }\n \n .rmenu-section {\n padding: 0 0 0.75em 0;\n }\n .rmenu-section > .rmenu-main {\n cursor: default;\n font-size: 0.75em;\n opacity: 0.7;\n margin-bottom: 0.25em;\n }\n .rmenu-popout .rmenu-section:first-child > .rmenu-main {\n padding-top: 0;\n }\n .rmenu-popout .rmenu-section > .rmenu-main > .rmenu-title {\n font-size: 1.5em;\n text-align: center;\n padding: 0.75em;\n opacity: 1;\n font-weight: bold;\n color: " + (primary.popout.fg || primary.fg || '#222') + ";\n background-color: " + (primary.popout.bga || primary.bga || '#f4f4f4') + ";\n border-bottom: 1px solid " + (primary.popout.bc || primary.bc || '#ccc') + ";\n border-top: 1px solid " + (primary.popout.bc || primary.bc || '#ccc') + ";\n }\n \n .rmenu-container {\n box-sizing: border-box;\n }\n \n .rmenu-container-pad {\n padding: 0.3em 0.3em 0.8em 0.3em;\n }\n \n .rmenu-expanded > .rmenu-main > .rmenu-expand:before {\n transform: rotate(-135deg);\n top: 0.5em;\n }\n "; | ||
var base = "\n .rmenu-wrapper {\n position: relative;\n z-index: 1;\n }\n .rmenu-wrapper.rmenu-vertical {\n min-height: 100%;\n }\n .rmenu {\n " + (data('raui.menu.font') ? ("font-family: " + (data('raui.menu.font')) + ";") : '') + "\n color: " + (primary.bg || '#fff') + ";\n background-color: " + (primary.fg || '#222') + ";\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n }\n .rmenu-wrapper.alt > .rmenu {\n color: " + (primary.fga || '#222') + ";\n background-color: " + (primary.bg || '#fff') + ";\n }\n .rmenu-inner {\n width: 100%;\n height: 100%;\n overflow-y: auto;\n }\n .rmenu-item {\n border-top: 1px solid transparent;\n border-bottom: 1px solid transparent;\n transition: border 0.2s ease-in-out;\n }\n .rmenu-item:hover > .rmenu-main {\n background-color: " + (primary.fga || '#07e') + ";\n color: " + (primary.bg || '#fff') + ";\n }\n .rmenu-disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n .rmenu-popout {\n border: none;\n }\n .rmenu-expanded {\n border-top: 0.0625em solid " + (primary.bc || '#ccc') + ";\n border-bottom: 0.0625em solid " + (primary.bc || '#ccc') + ";\n }\n .rmenu-popout.rmenu-expanded {\n border: none;\n }\n .rmenu-popout .rmenu-popout.rmenu-expanded {\n background-color: " + (primary.popout.bga || primary.bg || '#fff') + ";\n color: " + (primary.popout.fg || primary.fg || '#222') + ";\n }\n .rmenu-main {\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n user-select: none;\n transition: 0.3s ease-in-out;\n transition-property: color, background-color;\n display: flex;\n align-items: center;\n min-height: 1em;\n }\n .rmenu-main.rmenu-active, .rmenu-item:hover > .rmenu-main.rmenu-active {\n color: " + (primary.fga || '#07e') + ";\n background-color: " + (primary.bg || '#fff') + ";\n }\n .rmenu-popout .rmenu-entry .rmenu-main.rmenu-active, .rmenu-popout .rmenu-item:hover > .rmenu-main.rmenu-active {\n color: " + (primary.popout.bg || primary.bg || '#fff') + ";\n background-color: " + (primary.popout.fga || primary.fga || '#07e') + ";\n }\n .rmenu-wrapper.alt .rmenu-main.rmenu.active {\n color: " + (primary.bg || '#fff') + ";\n background-color: " + (primary.fg || '#222') + ";\n }\n .rmenu-popout .rmenu-items .rmenu-item:hover > .rmenu-main {\n background-color: " + (primary.popout.bga || '#f4f4f4') + ";\n color: " + (primary.popout.fg || '#222') + ";\n }\n \n .rmenu-items {\n display: block;\n }\n .rmenu-right {\n padding-right: 0.4em; \n }\n .rmenu-left {\n padding-left: 0.4em;\n }\n .rmenu-expand {\n width: 1.5em;\n height: 1.5em;\n padding-left: 0.5em;\n cursor: pointer;\n position: relative;\n }\n .rmenu-expand:before {\n position: absolute;\n display: inline-block;\n top: 0.25em;\n content: ' ';\n transform: rotate(45deg);\n transition: transform 0.2s ease-in-out, top 0.2s ease-in-out, left 0.2s ease-in-out;\n box-sizing: border-box;\n border-width: 0.25em;\n border-style: solid;\n border-left-color: transparent;\n border-top-color: transparent;\n }\n .rmenu-expanded > .rmenu-main > .rmenu-expand:before {\n top: -0.25em;\n }\n \n .rmenu-popout > .rmenu-items {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background-color: " + (primary.popout.bg || primary.bg || '#fff') + ";\n color: " + (primary.popout.fg || primary.fg || '#222') + ";\n box-sizing: border-box;\n border-right: 1px solid " + (primary.popout.bc || primary.bc || '#ccc') + ";\n z-index: -1;\n transition: box-shadow 0.2s ease-in-out;\n }\n .rmenu-popout.rmenu-expanded > .rmenu-items {\n left: 100%;\n z-index: initial;\n box-shadow: 0.2em 0 0.2em rgba(0, 0, 0, 0.2);\n }\n .rmenu-popout.rmenu-expanded > .rmenu-items .rmenu-popout.rmenu-expanded > .rmenu-items {\n left: calc(100% + 1px);\n }\n \n .rmenu-popout > .rmenu-items.rmenu-shrink {\n left: 100%;\n z-index: 1;\n }\n .rmenu-popout.rmenu-expanded > .rmenu-items.rmenu-shrink,\n .rmenu-popout.rmenu-expanded > .rmenu-items .rmenu-popout.rmenu-expanded > .rmenu-items.rmenu-shrink {\n left: 0;\n }\n \n .rmenu-popout > .rmenu-main > .rmenu-expand:before {\n transform: rotate(-45deg);\n top: 0.4em;\n }\n \n .rmenu-popout.rmenu-expanded > .rmenu-main > .rmenu-expand:before {\n transform: rotate(135deg);\n left: 0.75em;\n }\n \n .rmenu-popout > .rmenu-items .rmenu-popout > .rmenu-items {\n height: 100%;\n width: calc(100% + 1px);\n top: 0px;\n }\n .rmenu-popout > .rmenu-items .rmenu-popout > .rmenu-items.rmenu-shrink {\n height: 100%;\n }\n \n .rmenu-popout-close {\n color: " + (primary.popout.fga || primary.fga || '#07e') + ";\n display: block;\n padding: 0.5em;\n cursor: pointer;\n }\n \n .rmenu-title {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n cursor: pointer;\n padding: 0.5em;\n flex-grow: 1;\n }\n .rmenu-disabled > .rmenu-title {\n cursor: not-allowed;\n }\n .rmenu-item h1, .rmenu-item h2, .rmenu-item h3, .rmenu-item h4 {\n margin: 0;\n }\n \n .rmenu-section {\n padding: 0 0 0.75em 0;\n }\n .rmenu-section > .rmenu-main {\n cursor: default;\n font-size: 0.75em;\n opacity: 0.7;\n margin-bottom: 0.25em;\n }\n .rmenu-popout .rmenu-section:first-child > .rmenu-main {\n padding-top: 0;\n }\n .rmenu-popout .rmenu-section > .rmenu-main > .rmenu-title {\n font-size: 1.5em;\n text-align: center;\n padding: 0.75em;\n opacity: 1;\n font-weight: bold;\n color: " + (primary.popout.fg || primary.fg || '#222') + ";\n background-color: " + (primary.popout.bga || primary.bga || '#f4f4f4') + ";\n border-bottom: 1px solid " + (primary.popout.bc || primary.bc || '#ccc') + ";\n border-top: 1px solid " + (primary.popout.bc || primary.bc || '#ccc') + ";\n }\n \n .rmenu-container {\n box-sizing: border-box;\n }\n \n .rmenu-container-pad {\n padding: 0.3em 0.3em 0.8em 0.3em;\n }\n \n .rmenu-expanded > .rmenu-main > .rmenu-expand:before {\n transform: rotate(-135deg);\n top: 0.5em;\n }\n "; | ||
// TODO: other themes | ||
@@ -146,0 +146,0 @@ return base; |
@@ -511,3 +511,3 @@ import Ractive from 'ractive'; | ||
if (filter instanceof RegExp || isString(filter)) { | ||
if ((filter instanceof RegExp || isString(filter)) && filter) { | ||
var nocase = filter === '' + filter.toLowerCase() || filter === '' + filter.toUpperCase(); | ||
@@ -514,0 +514,0 @@ try { |
{ | ||
"name": "@evs-chris/raui", | ||
"version": "0.4.18", | ||
"version": "0.4.19", | ||
"description": "Components, decorators, and helpers for Ractive apps that are generally Material-ish", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/evs-chris/raui", |
@@ -256,3 +256,3 @@ (function (global, factory) { | ||
primary.popout = Object.assign({}, data('raui.menu.popout'), data('raui.menu.primary.popout')); | ||
var base = "\n .rmenu-wrapper {\n position: relative;\n z-index: 1;\n }\n .rmenu-wrapper.rmenu-vertical {\n min-height: 100%;\n }\n .rmenu {\n " + (data('raui.menu.font') ? ("font-family: " + (data('raui.menu.font')) + ";") : '') + "\n color: " + (primary.bg || '#fff') + ";\n background-color: " + (primary.fg || '#222') + ";\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n }\n .rmenu-wrapper.alt > .rmenu {\n color: " + (primary.fga || '#222') + ";\n background-color: " + (primary.bg || '#fff') + ";\n }\n .rmenu-inner {\n width: 100%;\n height: 100%;\n overflow-y: auto;\n }\n .rmenu-item {\n border-top: 1px solid transparent;\n border-bottom: 1px solid transparent;\n transition: border 0.2s ease-in-out;\n }\n .rmenu-item:hover > .rmenu-main {\n background-color: " + (primary.fga || '#07e') + ";\n color: " + (primary.bg || '#fff') + ";\n }\n .rmenu-disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n .rmenu-popout {\n border: none;\n }\n .rmenu-expanded {\n border-top: 0.0625em solid " + (primary.bc || '#ccc') + ";\n border-bottom: 0.0625em solid " + (primary.bc || '#ccc') + ";\n }\n .rmenu-popout.rmenu-expanded {\n border: none;\n }\n .rmenu-popout .rmenu-popout.rmenu-expanded {\n background-color: " + (primary.popout.bga || primary.bg || '#fff') + ";\n color: " + (primary.popout.fg || primary.fg || '#222') + ";\n }\n .rmenu-main {\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n user-select: none;\n transition: 0.3s ease-in-out;\n transition-property: color, background-color;\n display: flex;\n align-items: center;\n min-height: 1em;\n }\n .rmenu-main.rmenu-active, .rmenu-item:hover > .rmenu-main.rmenu-active {\n color: " + (primary.fga || '#07e') + ";\n background-color: " + (primary.bg || '#fff') + ";\n }\n .rmenu-popout .rmenu-entry .rmenu-main.rmenu-active, .rmenu-popout .rmenu-item:hover > .rmenu-main.rmenu-active {\n color: " + (primary.popout.bg || primary.bg || '#fff') + ";\n background-color: " + (primary.popout.fga || primary.fga || '#07e') + ";\n }\n .rmenu-wrapper.alt .rmenu-main.rmenu.active {\n color: " + (primary.bg || '#fff') + ";\n background-color: " + (primary.fg || '#222') + ";\n }\n .rmenu-popout .rmenu-items .rmenu-item:hover > .rmenu-main {\n background-color: " + (primary.popout.bga || '#f4f4f4') + ";\n color: " + (primary.popout.fg || '#222') + ";\n }\n \n .rmenu-items {\n display: block;\n }\n .rmenu-right {\n padding-right: 0.4em; \n }\n .rmenu-left {\n padding-left: 0.4em;\n }\n .rmenu-expand {\n width: 1.5em;\n height: 1.5em;\n padding-left: 0.5em;\n cursor: pointer;\n position: relative;\n }\n .rmenu-expand:before {\n position: absolute;\n display: inline-block;\n top: 0.25em;\n content: ' ';\n transform: rotate(45deg);\n transition: transform 0.2s ease-in-out, top 0.2s ease-in-out, left 0.2s ease-in-out;\n box-sizing: border-box;\n border-width: 0.25em;\n border-style: solid;\n border-left-color: transparent;\n border-top-color: transparent;\n }\n .rmenu-expanded > .rmenu-main > .rmenu-expand:before {\n top: -0.25em;\n }\n \n .rmenu-popout > .rmenu-items {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background-color: " + (primary.popout.bg || primary.bg || '#fff') + ";\n color: " + (primary.popout.fg || primary.fg || '#222') + ";\n box-sizing: border-box;\n border-right: 1px solid " + (primary.popout.bc || primary.bc || '#ccc') + ";\n z-index: -1;\n transition: box-shadow 0.2s ease-in-out;\n }\n .rmenu-popout.rmenu-expanded > .rmenu-items {\n left: calc(100% + 1px);\n z-index: initial;\n box-shadow: 0.2em 0 0.2em rgba(0, 0, 0, 0.2);\n }\n \n .rmenu-popout > .rmenu-items.rmenu-shrink {\n left: 100%;\n z-index: 1;\n }\n .rmenu-popout.rmenu-expanded > .rmenu-items.rmenu-shrink {\n left: 0;\n }\n \n .rmenu-popout > .rmenu-main > .rmenu-expand:before {\n transform: rotate(-45deg);\n top: 0.4em;\n }\n \n .rmenu-popout.rmenu-expanded > .rmenu-main > .rmenu-expand:before {\n transform: rotate(135deg);\n left: 0.75em;\n }\n \n .rmenu-popout > .rmenu-items .rmenu-popout > .rmenu-items {\n height: calc(100% + 2px);\n width: calc(100% + 1px);\n top: -1px;\n }\n .rmenu-popout > .rmenu-items .rmenu-popout > .rmenu-items.rmenu-shrink {\n height: 100%;\n }\n \n .rmenu-popout-close {\n color: " + (primary.popout.fga || primary.fga || '#07e') + ";\n display: block;\n padding: 0.5em;\n cursor: pointer;\n }\n \n .rmenu-title {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n cursor: pointer;\n padding: 0.5em;\n flex-grow: 1;\n }\n .rmenu-disabled > .rmenu-title {\n cursor: not-allowed;\n }\n .rmenu-item h1, .rmenu-item h2, .rmenu-item h3, .rmenu-item h4 {\n margin: 0;\n }\n \n .rmenu-section {\n padding: 0 0 0.75em 0;\n }\n .rmenu-section > .rmenu-main {\n cursor: default;\n font-size: 0.75em;\n opacity: 0.7;\n margin-bottom: 0.25em;\n }\n .rmenu-popout .rmenu-section:first-child > .rmenu-main {\n padding-top: 0;\n }\n .rmenu-popout .rmenu-section > .rmenu-main > .rmenu-title {\n font-size: 1.5em;\n text-align: center;\n padding: 0.75em;\n opacity: 1;\n font-weight: bold;\n color: " + (primary.popout.fg || primary.fg || '#222') + ";\n background-color: " + (primary.popout.bga || primary.bga || '#f4f4f4') + ";\n border-bottom: 1px solid " + (primary.popout.bc || primary.bc || '#ccc') + ";\n border-top: 1px solid " + (primary.popout.bc || primary.bc || '#ccc') + ";\n }\n \n .rmenu-container {\n box-sizing: border-box;\n }\n \n .rmenu-container-pad {\n padding: 0.3em 0.3em 0.8em 0.3em;\n }\n \n .rmenu-expanded > .rmenu-main > .rmenu-expand:before {\n transform: rotate(-135deg);\n top: 0.5em;\n }\n "; | ||
var base = "\n .rmenu-wrapper {\n position: relative;\n z-index: 1;\n }\n .rmenu-wrapper.rmenu-vertical {\n min-height: 100%;\n }\n .rmenu {\n " + (data('raui.menu.font') ? ("font-family: " + (data('raui.menu.font')) + ";") : '') + "\n color: " + (primary.bg || '#fff') + ";\n background-color: " + (primary.fg || '#222') + ";\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n }\n .rmenu-wrapper.alt > .rmenu {\n color: " + (primary.fga || '#222') + ";\n background-color: " + (primary.bg || '#fff') + ";\n }\n .rmenu-inner {\n width: 100%;\n height: 100%;\n overflow-y: auto;\n }\n .rmenu-item {\n border-top: 1px solid transparent;\n border-bottom: 1px solid transparent;\n transition: border 0.2s ease-in-out;\n }\n .rmenu-item:hover > .rmenu-main {\n background-color: " + (primary.fga || '#07e') + ";\n color: " + (primary.bg || '#fff') + ";\n }\n .rmenu-disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n .rmenu-popout {\n border: none;\n }\n .rmenu-expanded {\n border-top: 0.0625em solid " + (primary.bc || '#ccc') + ";\n border-bottom: 0.0625em solid " + (primary.bc || '#ccc') + ";\n }\n .rmenu-popout.rmenu-expanded {\n border: none;\n }\n .rmenu-popout .rmenu-popout.rmenu-expanded {\n background-color: " + (primary.popout.bga || primary.bg || '#fff') + ";\n color: " + (primary.popout.fg || primary.fg || '#222') + ";\n }\n .rmenu-main {\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n user-select: none;\n transition: 0.3s ease-in-out;\n transition-property: color, background-color;\n display: flex;\n align-items: center;\n min-height: 1em;\n }\n .rmenu-main.rmenu-active, .rmenu-item:hover > .rmenu-main.rmenu-active {\n color: " + (primary.fga || '#07e') + ";\n background-color: " + (primary.bg || '#fff') + ";\n }\n .rmenu-popout .rmenu-entry .rmenu-main.rmenu-active, .rmenu-popout .rmenu-item:hover > .rmenu-main.rmenu-active {\n color: " + (primary.popout.bg || primary.bg || '#fff') + ";\n background-color: " + (primary.popout.fga || primary.fga || '#07e') + ";\n }\n .rmenu-wrapper.alt .rmenu-main.rmenu.active {\n color: " + (primary.bg || '#fff') + ";\n background-color: " + (primary.fg || '#222') + ";\n }\n .rmenu-popout .rmenu-items .rmenu-item:hover > .rmenu-main {\n background-color: " + (primary.popout.bga || '#f4f4f4') + ";\n color: " + (primary.popout.fg || '#222') + ";\n }\n \n .rmenu-items {\n display: block;\n }\n .rmenu-right {\n padding-right: 0.4em; \n }\n .rmenu-left {\n padding-left: 0.4em;\n }\n .rmenu-expand {\n width: 1.5em;\n height: 1.5em;\n padding-left: 0.5em;\n cursor: pointer;\n position: relative;\n }\n .rmenu-expand:before {\n position: absolute;\n display: inline-block;\n top: 0.25em;\n content: ' ';\n transform: rotate(45deg);\n transition: transform 0.2s ease-in-out, top 0.2s ease-in-out, left 0.2s ease-in-out;\n box-sizing: border-box;\n border-width: 0.25em;\n border-style: solid;\n border-left-color: transparent;\n border-top-color: transparent;\n }\n .rmenu-expanded > .rmenu-main > .rmenu-expand:before {\n top: -0.25em;\n }\n \n .rmenu-popout > .rmenu-items {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background-color: " + (primary.popout.bg || primary.bg || '#fff') + ";\n color: " + (primary.popout.fg || primary.fg || '#222') + ";\n box-sizing: border-box;\n border-right: 1px solid " + (primary.popout.bc || primary.bc || '#ccc') + ";\n z-index: -1;\n transition: box-shadow 0.2s ease-in-out;\n }\n .rmenu-popout.rmenu-expanded > .rmenu-items {\n left: 100%;\n z-index: initial;\n box-shadow: 0.2em 0 0.2em rgba(0, 0, 0, 0.2);\n }\n .rmenu-popout.rmenu-expanded > .rmenu-items .rmenu-popout.rmenu-expanded > .rmenu-items {\n left: calc(100% + 1px);\n }\n \n .rmenu-popout > .rmenu-items.rmenu-shrink {\n left: 100%;\n z-index: 1;\n }\n .rmenu-popout.rmenu-expanded > .rmenu-items.rmenu-shrink,\n .rmenu-popout.rmenu-expanded > .rmenu-items .rmenu-popout.rmenu-expanded > .rmenu-items.rmenu-shrink {\n left: 0;\n }\n \n .rmenu-popout > .rmenu-main > .rmenu-expand:before {\n transform: rotate(-45deg);\n top: 0.4em;\n }\n \n .rmenu-popout.rmenu-expanded > .rmenu-main > .rmenu-expand:before {\n transform: rotate(135deg);\n left: 0.75em;\n }\n \n .rmenu-popout > .rmenu-items .rmenu-popout > .rmenu-items {\n height: 100%;\n width: calc(100% + 1px);\n top: 0px;\n }\n .rmenu-popout > .rmenu-items .rmenu-popout > .rmenu-items.rmenu-shrink {\n height: 100%;\n }\n \n .rmenu-popout-close {\n color: " + (primary.popout.fga || primary.fga || '#07e') + ";\n display: block;\n padding: 0.5em;\n cursor: pointer;\n }\n \n .rmenu-title {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n cursor: pointer;\n padding: 0.5em;\n flex-grow: 1;\n }\n .rmenu-disabled > .rmenu-title {\n cursor: not-allowed;\n }\n .rmenu-item h1, .rmenu-item h2, .rmenu-item h3, .rmenu-item h4 {\n margin: 0;\n }\n \n .rmenu-section {\n padding: 0 0 0.75em 0;\n }\n .rmenu-section > .rmenu-main {\n cursor: default;\n font-size: 0.75em;\n opacity: 0.7;\n margin-bottom: 0.25em;\n }\n .rmenu-popout .rmenu-section:first-child > .rmenu-main {\n padding-top: 0;\n }\n .rmenu-popout .rmenu-section > .rmenu-main > .rmenu-title {\n font-size: 1.5em;\n text-align: center;\n padding: 0.75em;\n opacity: 1;\n font-weight: bold;\n color: " + (primary.popout.fg || primary.fg || '#222') + ";\n background-color: " + (primary.popout.bga || primary.bga || '#f4f4f4') + ";\n border-bottom: 1px solid " + (primary.popout.bc || primary.bc || '#ccc') + ";\n border-top: 1px solid " + (primary.popout.bc || primary.bc || '#ccc') + ";\n }\n \n .rmenu-container {\n box-sizing: border-box;\n }\n \n .rmenu-container-pad {\n padding: 0.3em 0.3em 0.8em 0.3em;\n }\n \n .rmenu-expanded > .rmenu-main > .rmenu-expand:before {\n transform: rotate(-135deg);\n top: 0.5em;\n }\n "; | ||
// TODO: other themes | ||
@@ -259,0 +259,0 @@ return base; |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("ractive")):"function"==typeof define&&define.amd?define(["exports","ractive"],e):e(t.RMMenu={},t.Ractive)}(this,function(t,e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var n="undefined"!=typeof window?window:null;function i(t,e,i){if(n&&n.Ractive&&"object"==typeof n.Ractive[e]){var r=document.currentScript;if(r||(r=(r=document.querySelectorAll("script"))[r.length-1]),r){var o=r.getAttribute("data-alias");o&&(o=(o=o.split("&")).reduce(function(t,e){var n=e.split("="),i=n[0],r=n[1];return t[i]=r,t},{})),Ractive[e][o&&o[t]||t]=i}}}function r(t,e){var n=t.processParams(e,{duration:200,easing:"easeInOut"});return new Promise(function(e){requestAnimationFrame(function(){t.setStyle("overflow","hidden");var i="x"===n.axis?"width":"height";if(t.isIntro||n.intro){var r=t.getStyle(i);t.setStyle(i,0),t.setStyle("opacity",0),e(t.animateStyle(i,r,n).then(function(){return t.animateStyle("opacity",1,n)}).then(function(){t.setStyle(i,""),t.setStyle("overflow","")}))}else t.setStyle(i,t.getStyle(i)),t.setStyle("opacity",1),e(t.animateStyle("opacity",0,n).then(function(){return t.animateStyle(i,0,n)}))})})}function o(t,e){var n=!1,i=!1;function r(n){for(var i=n.target;i;){if(i===t)return;if(!i.parentNode&&i!==document)return;i=i.parentNode}e(n)}return setTimeout(function(){n=!0,i||(document.body.addEventListener("click",r),document.body.addEventListener("touchstop",r))}),{teardown:function(){i=!0,n&&(document.body.removeEventListener("click",r),document.body.removeEventListener("touchstop",r))}}}i("expand","transitions",r);var s=function(t){function e(e){t.call(this,opts),this.refs={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addItem=function(t,e){return"number"==typeof e?this.splice("items",e,0,t):this.push("items",t),new a(this,null,t)},e.prototype.visibleItems=function(t){var e=this;return t.filter(function(t){return!1!==t.condition&&("string"!=typeof t.condition||!1!==e.get(t.condition))}).length},e.prototype.getHandle=function(t){var e,n=this;if("string"==typeof t)if(this.refs[t])e=this.refs[t].ctx;else{var i=this.find(t);if(i)e=this.getContext(i);else{var r=function t(e,n){for(var i=0;i<e.length;i++){if(e[i].ref===n)return[e[i]];if(e[i].items){var r=t(e[i].items,n);if(r)return r.unshift(e[i]),r}}}(this.get("items"),t);if(r)return r.reduce(function(t,e){return new a(n,t,e)},null)}}else t&&t.parentNode?e=this.getContext(t):t&&t.decorators&&(e=t);if(e){for(var o=[e.get()],s="../../";""!==e.resolve(s);)o.unshift(e.get(s)),s+="../../";return o.reduce(function(t,e){return new a(n,t,e)},null)}},e.prototype.popAllIn=function(t){t||(t="");var e=this.get(t);if(e&&e.items)for(var n=0;n<e.items.length;n++)this.popAllIn((t?t+".":"")+"items."+n);e.open&&e.popout&&this.set((t?t+".":"")+"open",!1)},e.prototype.popSiblingsIn=function(t){var e=t.resolve(),n=t.get("../");if(n)for(var i=0;i<n.length;i++)e!==t.resolve("../"+i)&&n[i].open&&n[i].popout&&t.toggle("../"+i+".open")},e.prototype._actioned=function(){this.fire("action"),this.popAllIn()},e.prototype._itemRendered=function(t){var e=this;return setTimeout(function(){return e.fire("item",t,e.getHandle(t))}),""},e.prototype.childActive=function(t){var e=this.get(t);if(e&&e.items)for(var n=0;n<e.items.length;n++)if(!0===this.get(t+".items."+n+".active")||"function"==typeof e.items[n].active&&e.items[n].active()||this.get(t+".items."+n+".activeRef")&&this.get(e.items[n].activeRef)||this.childActive(t+".items."+n))return!0},e}(e);e.extendWith(s,{template:{v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-wrapper",g:1},{t:16,r:"extra-attributes"},{n:"class-rmenu-vertical",t:13,f:[{t:2,x:{r:["~/horizontal"],s:"!_0"}}]},{n:"class-rmenu-horizontal",t:13,f:[{t:2,r:"~/horizontal"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-inner",g:1}],f:[{t:8,r:"items"}]}]}]}],e:{"!_0":function(t){return!t},'_0&&(_1||_2==="section")':function(t,e,n){return t&&(e||"section"===n)},"_0?_3.active(_1.getHandle((_2))):_3.active()":function(t,e,n,i){return t?i.active(e.getHandle(n)):i.active()},'typeof _0==="function"':function(t){return"function"==typeof t},'typeof _0==="boolean"':function(t){return"boolean"==typeof t},"_0.childActive(_1)":function(t,e){return t.childActive(e)},"_0!=null":function(t){return null!=t},"[_0.action(),_1._actioned()]":function(t,e){return[t.action(),e._actioned()]},"[_0._actioned()]":function(t){return[t._actioned()]},'[_0&&_1.popSiblingsIn((_2)),(_2).toggle(".open"),false]':function(t,e,n){return[t&&e.popSiblingsIn(n),n.toggle(".open"),!1]},"_0||(_1&&_2[_1])":function(t,e,n){return t||e&&n[e]},'[{axis:"x"}]':function(){return[{axis:"x"}]},"_2&&_0&&_1.visibleItems(_2)":function(t,e,n){return n&&t&&e.visibleItems(n)},"[_0.popAllIn(_1),false]":function(t,e){return[t.popAllIn(e),!1]},'!_0||_0==="item"':function(t){return!t||"item"===t},'_0==="section"':function(t){return"section"===t},'_0==="container"':function(t){return"container"===t},'(!_0||_0==="item")&&_1':function(t,e){return(!t||"item"===t)&&e},"[_0.popAllIn(_1)]":function(t,e){return[t.popAllIn(e)]},"[_0]":function(t){return[t]},'typeof _0==="string"':function(t){return"string"==typeof t},'_0||"item"':function(t){return t||"item"},"_0._itemRendered((_1))":function(t,e){return t._itemRendered(e)},'_1===undefined||(typeof _1==="boolean"&&_1)||(typeof _1==="string"&&_0[_1])||(typeof _1==="function"&&_2.condition())':function(t,e,n){return void 0===e||"boolean"==typeof e&&e||"string"==typeof e&&t[e]||"function"==typeof e&&n.condition()}},p:{container:[{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-container-pad",g:1}],f:[{t:3,r:".content"}]}],n:50,r:".pad"},{t:4,f:[{t:3,r:".content"}],n:51,l:1}],n:50,r:".content"},{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-container-pad",g:1}],f:[{t:16,r:".contentPartial"}]}],n:50,r:".pad"},{t:4,f:[{t:16,r:".contentPartial"}],n:51,l:1}],n:50,r:".contentPartial",l:1}],section:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-main",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-title",g:1}],f:[{t:4,f:[{t:2,r:".title"}],n:50,r:".title"},{t:4,f:[{t:16,r:".titlePartial"}],n:50,r:".titlePartial",l:1}]}]}," ",{t:8,r:"children"}],children:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-items",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,x:{r:[".popout"],s:"!_0"}},{t:4,f:[{n:"pop",t:72,v:"t0"}],n:51,l:1},{n:"class-rmenu-shrink",t:13,f:[{t:2,r:".shrink"}]}],f:[{t:8,r:"items"}]}],n:50,x:{r:[".items.length",".open",".type"],s:'_0&&(_1||_2==="section")'}}],item:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-main",g:1},{t:4,f:[{n:"class-rmenu-active",t:13,f:[{t:2,rx:{r:"~/",m:[{t:30,n:".activeRef"}]}}]}],n:50,r:".activeRef"},{t:4,f:[{n:"class-rmenu-active",t:13,f:[{t:2,x:{r:[".active.length","@this","@context","."],s:"_0?_3.active(_1.getHandle((_2))):_3.active()"}}]}],n:50,x:{r:[".active"],s:'typeof _0==="function"'},l:1},{t:4,f:[{n:"class-rmenu-active",t:13,f:[{t:2,r:".active"}]}],n:50,x:{r:[".active"],s:'typeof _0==="boolean"'},l:1},{t:4,f:[{n:"class-rmenu-active",t:13,f:[{t:2,x:{r:["@this","@keypath"],s:"_0.childActive(_1)"}}]}],n:50,r:".popout",l:1},{t:4,f:[{n:"class-rmenu-disabled",t:13,f:[{t:2,r:".disabled"}]}],n:50,x:{r:[".disabled"],s:"_0!=null"}},{t:4,f:[{n:"class-rmenu-disabled",t:13,f:[{t:2,rx:{r:"~/",m:[{t:30,n:".disabledRef"}]}}]}],n:50,r:".disabledRef",l:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"menu-left",g:1}],f:[{t:3,r:".left"}]}],n:50,r:".left"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-left",g:1}],f:[{t:16,r:".leftPartial"}]}],n:50,r:".leftPartial",l:1}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-title",g:1},{t:4,f:[{t:4,f:[{n:["click"],t:70,f:{r:[".","@this"],s:"[_0.action(),_1._actioned()]"}}],n:50,x:{r:[".action"],s:'typeof _0==="function"'}},{t:4,f:[{t:16,r:".actionPartial"},{n:["click"],t:70,f:{r:["@this"],s:"[_0._actioned()]"}}],n:50,r:".actionPartial",l:1},{t:4,f:[{n:["click"],t:70,f:{r:[".popout","@this","@context"],s:'[_0&&_1.popSiblingsIn((_2)),(_2).toggle(".open"),false]'}}],n:50,r:".items.length",l:1}],n:51,x:{r:[".disabled",".disabledRef","~/"],s:"_0||(_1&&_2[_1])"}}],f:[{t:4,f:[{t:3,r:".title"}],n:50,r:".title"},{t:4,f:[{t:16,r:".titlePartial"}],n:50,r:".titlePartial",l:1}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"menu-right",g:1}],f:[{t:3,r:".right"}]}],n:50,r:".right"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-right",g:1}],f:[{t:16,r:".rightPartial"}]}],n:50,r:".rightPartial",l:1}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-expand",g:1},{n:["click"],t:70,f:{r:[".popout","@this","@context"],s:'[_0&&_1.popSiblingsIn((_2)),(_2).toggle(".open"),false]'}},{n:"expand",t:72,f:{r:[],s:'[{axis:"x"}]'},v:"t0"}]}],n:50,x:{r:[".items.length","@this",".items"],s:"_2&&_0&&_1.visibleItems(_2)"}}]}," ",{t:8,r:"children"}],items:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-popout-close",g:1},{n:["click"],t:70,f:{r:["@this","@keypath"],s:"[_0.popAllIn(_1),false]"}}],f:["❌ Close"]}],n:50,r:".shrink"}," ",{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-entry",g:1},{t:4,f:[{n:"class-rmenu-item",t:13}],n:50,x:{r:[".type"],s:'!_0||_0==="item"'}},{t:4,f:[{n:"class-rmenu-section",t:13}],n:50,x:{r:[".type"],s:'_0==="section"'},l:1},{t:4,f:[{n:"class-rmenu-container",t:13}],n:50,x:{r:[".type"],s:'_0==="container"'},l:1},{n:"class-rmenu-expanded",t:13,f:[{t:2,r:".open"}]},{n:"class-rmenu-popout",t:13,f:[{t:2,x:{r:[".type",".popout"],s:'(!_0||_0==="item")&&_1'}}]},{t:4,f:[{n:"pop",t:72,v:"t0"},{t:4,f:[{n:["clickout"],t:70,f:{r:["@this","@keypath"],s:"[_0.popAllIn(_1)]"}}],n:50,r:".open"}," "],n:50,r:".popout"},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,x:{r:["~/noExpand"],s:"!_0"},l:1},{t:4,f:[{t:8,r:".refPartial"}],n:50,r:".refPartial"},{t:4,f:[{n:"ref",t:71,f:{r:[".ref"],s:"[_0]"}}],n:50,x:{r:[".ref"],s:'typeof _0==="string"'},l:1},{t:4,f:[{t:16,r:".extra"}],n:50,r:".extra"}],f:[{t:8,x:{r:[".type"],s:'_0||"item"'}}," ",{t:4,f:[{t:2,x:{r:["@this","@context"],s:"_0._itemRendered((_1))"}}],n:50,x:{r:[".type"],s:'!_0||_0==="item"'}}]}],n:50,x:{r:["~/",".condition","."],s:'_1===undefined||(typeof _1==="boolean"&&_1)||(typeof _1==="string"&&_0[_1])||(typeof _1==="function"&&_2.condition())'}}],n:52,r:".items"}]}},css:function(t){return[function(t){var e=Object.assign({},t("raui.primary"),t("raui.menu.primary"));return e.popout=Object.assign({},t("raui.menu.popout"),t("raui.menu.primary.popout")),"\n .rmenu-wrapper {\n position: relative;\n z-index: 1;\n }\n .rmenu-wrapper.rmenu-vertical {\n min-height: 100%;\n }\n .rmenu {\n "+(t("raui.menu.font")?"font-family: "+t("raui.menu.font")+";":"")+"\n color: "+(e.bg||"#fff")+";\n background-color: "+(e.fg||"#222")+";\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n }\n .rmenu-wrapper.alt > .rmenu {\n color: "+(e.fga||"#222")+";\n background-color: "+(e.bg||"#fff")+";\n }\n .rmenu-inner {\n width: 100%;\n height: 100%;\n overflow-y: auto;\n }\n .rmenu-item {\n border-top: 1px solid transparent;\n border-bottom: 1px solid transparent;\n transition: border 0.2s ease-in-out;\n }\n .rmenu-item:hover > .rmenu-main {\n background-color: "+(e.fga||"#07e")+";\n color: "+(e.bg||"#fff")+";\n }\n .rmenu-disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n .rmenu-popout {\n border: none;\n }\n .rmenu-expanded {\n border-top: 0.0625em solid "+(e.bc||"#ccc")+";\n border-bottom: 0.0625em solid "+(e.bc||"#ccc")+";\n }\n .rmenu-popout.rmenu-expanded {\n border: none;\n }\n .rmenu-popout .rmenu-popout.rmenu-expanded {\n background-color: "+(e.popout.bga||e.bg||"#fff")+";\n color: "+(e.popout.fg||e.fg||"#222")+";\n }\n .rmenu-main {\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n user-select: none;\n transition: 0.3s ease-in-out;\n transition-property: color, background-color;\n display: flex;\n align-items: center;\n min-height: 1em;\n }\n .rmenu-main.rmenu-active, .rmenu-item:hover > .rmenu-main.rmenu-active {\n color: "+(e.fga||"#07e")+";\n background-color: "+(e.bg||"#fff")+";\n }\n .rmenu-popout .rmenu-entry .rmenu-main.rmenu-active, .rmenu-popout .rmenu-item:hover > .rmenu-main.rmenu-active {\n color: "+(e.popout.bg||e.bg||"#fff")+";\n background-color: "+(e.popout.fga||e.fga||"#07e")+";\n }\n .rmenu-wrapper.alt .rmenu-main.rmenu.active {\n color: "+(e.bg||"#fff")+";\n background-color: "+(e.fg||"#222")+";\n }\n .rmenu-popout .rmenu-items .rmenu-item:hover > .rmenu-main {\n background-color: "+(e.popout.bga||"#f4f4f4")+";\n color: "+(e.popout.fg||"#222")+";\n }\n \n .rmenu-items {\n display: block;\n }\n .rmenu-right {\n padding-right: 0.4em; \n }\n .rmenu-left {\n padding-left: 0.4em;\n }\n .rmenu-expand {\n width: 1.5em;\n height: 1.5em;\n padding-left: 0.5em;\n cursor: pointer;\n position: relative;\n }\n .rmenu-expand:before {\n position: absolute;\n display: inline-block;\n top: 0.25em;\n content: ' ';\n transform: rotate(45deg);\n transition: transform 0.2s ease-in-out, top 0.2s ease-in-out, left 0.2s ease-in-out;\n box-sizing: border-box;\n border-width: 0.25em;\n border-style: solid;\n border-left-color: transparent;\n border-top-color: transparent;\n }\n .rmenu-expanded > .rmenu-main > .rmenu-expand:before {\n top: -0.25em;\n }\n \n .rmenu-popout > .rmenu-items {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background-color: "+(e.popout.bg||e.bg||"#fff")+";\n color: "+(e.popout.fg||e.fg||"#222")+";\n box-sizing: border-box;\n border-right: 1px solid "+(e.popout.bc||e.bc||"#ccc")+";\n z-index: -1;\n transition: box-shadow 0.2s ease-in-out;\n }\n .rmenu-popout.rmenu-expanded > .rmenu-items {\n left: calc(100% + 1px);\n z-index: initial;\n box-shadow: 0.2em 0 0.2em rgba(0, 0, 0, 0.2);\n }\n \n .rmenu-popout > .rmenu-items.rmenu-shrink {\n left: 100%;\n z-index: 1;\n }\n .rmenu-popout.rmenu-expanded > .rmenu-items.rmenu-shrink {\n left: 0;\n }\n \n .rmenu-popout > .rmenu-main > .rmenu-expand:before {\n transform: rotate(-45deg);\n top: 0.4em;\n }\n \n .rmenu-popout.rmenu-expanded > .rmenu-main > .rmenu-expand:before {\n transform: rotate(135deg);\n left: 0.75em;\n }\n \n .rmenu-popout > .rmenu-items .rmenu-popout > .rmenu-items {\n height: calc(100% + 2px);\n width: calc(100% + 1px);\n top: -1px;\n }\n .rmenu-popout > .rmenu-items .rmenu-popout > .rmenu-items.rmenu-shrink {\n height: 100%;\n }\n \n .rmenu-popout-close {\n color: "+(e.popout.fga||e.fga||"#07e")+";\n display: block;\n padding: 0.5em;\n cursor: pointer;\n }\n \n .rmenu-title {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n cursor: pointer;\n padding: 0.5em;\n flex-grow: 1;\n }\n .rmenu-disabled > .rmenu-title {\n cursor: not-allowed;\n }\n .rmenu-item h1, .rmenu-item h2, .rmenu-item h3, .rmenu-item h4 {\n margin: 0;\n }\n \n .rmenu-section {\n padding: 0 0 0.75em 0;\n }\n .rmenu-section > .rmenu-main {\n cursor: default;\n font-size: 0.75em;\n opacity: 0.7;\n margin-bottom: 0.25em;\n }\n .rmenu-popout .rmenu-section:first-child > .rmenu-main {\n padding-top: 0;\n }\n .rmenu-popout .rmenu-section > .rmenu-main > .rmenu-title {\n font-size: 1.5em;\n text-align: center;\n padding: 0.75em;\n opacity: 1;\n font-weight: bold;\n color: "+(e.popout.fg||e.fg||"#222")+";\n background-color: "+(e.popout.bga||e.bga||"#f4f4f4")+";\n border-bottom: 1px solid "+(e.popout.bc||e.bc||"#ccc")+";\n border-top: 1px solid "+(e.popout.bc||e.bc||"#ccc")+";\n }\n \n .rmenu-container {\n box-sizing: border-box;\n }\n \n .rmenu-container-pad {\n padding: 0.3em 0.3em 0.8em 0.3em;\n }\n \n .rmenu-expanded > .rmenu-main > .rmenu-expand:before {\n transform: rotate(-135deg);\n top: 0.5em;\n }\n "}.call(this,t)].join(" ")},cssId:"menu",noCssTransform:!0,noIntro:!0,nestedTransitions:!1,on:{construct:function(){var t=this.component;if(!t)return;var e=t.template.f||[],n=t.template.m?t.template.m.slice():[],i=t.template;t.template={e:i.e,f:i.f,t:i.t,m:n};var r=[];e.forEach(function(t){var e=function t(e){if("item"!==e.e&&"section"!==e.e&&"container"!==e.e)return;var i={};var r=[];var o;"item"!==e.e&&(i.type=e.e);e.m&&e.m.forEach(function(t){if("title"===t.n)"string"==typeof t.f?i.title=t.f:i.titlePartial={t:t.f};else if(70===t.t&&"action"===t.n[0])i.actionPartial={t:[{n:["click"],f:t.f,t:t.t}]};else if("guard"===t.n&&t.f&&1===t.f.length&&2===t.f[0].t){var o="_cnd"+n.length;i.condition=o,n.push({t:13,n:o,f:t.f})}else if("ref"===t.n){if("string"==typeof t.f)i.ref=t.f;else if(t.f&&1===t.f.length&&2===t.f[0].t){var s="_cnd"+n.length;n.push({t:13,n:s,f:t.f}),i.refPartials={t:[{t:71,n:"ref",f:{r:s,s:"[_0]"}}]}}}else if("active"===t.n){if(t.f&&1===t.f.length&&2===t.f[0].t){var a="_cnd"+n.length;i.activeRef=a,n.push({t:13,n:a,f:t.f})}}else if("open"===t.n)i.open=!0;else if("popout"===t.n)i.popout=!0;else if("container"===e.e&&"pad"===t.n)i.pad=!0;else if("disabled"===t.n)if(t.f&&1===t.f.length&&2===t.f[0].t){var f="_cnd"+n.length;i.disabledRef=f,n.push({t:13,n:f,f:t.f})}else 0===t.f&&(i.disabled=!0);else r.push(t)});r.length&&(i.extra={t:r});if("container"===e.e)return i.contentPartial={t:e.f},i.extra=r,i;e.f&&e.f.forEach(function(e){if("title"===e.e)1===e.f.length&&"string"==typeof e.f[0]?i.title=e.f[0]:i.titlePartial={t:e.f};else if("item"===e.e||"section"===e.e||"container"===e.e){var n=t(e);n&&(i.items||(i.items=[])).push(n)}else"left"===e.e?i.leftPartial={t:e.f}:"right"===e.e?i.rightPartial={t:e.f}:(o||(o=[]),o.push(e))});!i.titlePartial&&o&&(i.titlePartial={t:o});o=null;return i}(t);e&&r.push(e)}),this._items=r},config:function(){this._items&&this.set("items",(this.get("items")||[]).concat(this._items),{shuffle:!0})}},attributes:["noExpand"],use:[function(t){return void 0===t&&(t={}),function(e){e.instance.transitions[t.name||"expand"]=r}}(),function(t){return void 0===t&&(t={}),function(e){e.instance.events[t.name||"clickout"]=o}}()],decorators:{ref:function(t,e){var n=this,i=e;n.refs||(n.refs={});var r={update:function(t){n.refs[i]===r&&delete n.refs[i],i=t,n.refs[i]=r},teardown:function(){n.refs[i]===r&&delete n.refs[i]}};return r.ctx=n.getContext(t),n.refs[i]=r,r}},transitions:{pop:function(t,e){var n=t.processParams(e,{duration:200,easing:"easeInOut"}),i=this.getContext(t.node),r=i.get(".shrink");if(t.isIntro){var o=t.node.getBoundingClientRect();function s(){for(var e=t.node.parentNode;e&&e.classList;){if(e.classList.contains("rmenu"))return e;if(e.parentNode.classList.contains("rmenu-popout"))return e;e=e.parentNode}}o.left+o.width>window.innerWidth?(setTimeout(function(){return i.set(".shrink",!0)}),r=!0,s().style.overflowX="hidden"):r?(setTimeout(function(){return i.set(".shrink",!1)}),s().style.overflowX="",r=!1):s().style.overflowX=""}else setTimeout(function(){return i.set("shrink",!1)});return t.isIntro?r?(t.setStyle("left","100%"),t.animateStyle("left",0,n)):(t.setStyle("left",0),t.setStyle("z-index",-1),t.animateStyle("left","100%",n)):r?(t.setStyle("left",0),t.animateStyle("left","100%",n)):(t.setStyle("left","100%"),t.setStyle("z-index",-1),t.animateStyle("left",0,n))}}});var a=function(t,e,n){this.menu=t,this.parent=e,this.item=n},f={keypath:{configurable:!0},action:{configurable:!0},active:{configurable:!0},disabled:{configurable:!0},ref:{configurable:!0}};function u(t){return void 0===t&&(t={}),function(e){e.instance.components[t.name||"menu"]=s}}f.keypath.get=function(){if(!this.removed){if(!this.parent)return"items."+this.menu.get("items").indexOf(this.item);var t=this.parent.keypath+".items";return t+"."+this.menu.get(t).indexOf(this.item)}},f.action.get=function(){if(!this.removed)return this.item.action},f.action.set=function(t){return this.set(".action",t)},f.active.get=function(){if(!this.removed){var t=this.item;return t.activeRef?this.menu.get(t.activeRef):"function"==typeof t.active?t.active():t.active}},f.active.set=function(t){if(!this.removed){var e=this.item;return e.activeRef?this.menu.set(e.activeRef,t):this.set(".active",t)}},f.disabled.get=function(){if(!this.removed)return this.get(".disabled")},f.disabled.set=function(t){if(!this.removed)return this.set(".disabled",t)},f.ref.get=function(){if(!this.removed)return this.item.ref},f.ref.set=function(t){return this.set(".ref",t)},a.prototype.addItem=function(t,e){if(this.removed)return!1;var n=this.keypath+".items";return"number"==typeof e?this.menu.splice(n,0,e,t):this.menu.push(n,t),new a(this.menu,this,t)},a.prototype.open=function(){if(this.removed)return!1;this.menu.set(this.keypath+".open",!0)},a.prototype.close=function(){if(this.removed)return!1;this.menu.set(this.keypath+".open",!1)},a.prototype.remove=function(){if(this.removed)return!1;var t=(this.parent?this.parent.keypath+".":"")+"items",e=this.menu.get(t);return this.menu.splice(t,e.indexOf(this.item),1),this.removed=!0,!0},a.prototype.get=function(t){if(this.removed)return!1;var e=t.replace(/^[\.\/]*/,"");return this.menu.get(this.keypath+"."+e)},a.prototype.set=function(t,e){if(this.removed)return!1;var n=t.replace(/^[\.\/]*/,"");return this.menu.set(this.keypath+"."+n,e)},Object.defineProperties(a.prototype,f),i("RMMenu","components",s),t.Menu=s,t.plugin=u,t.default=u,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("ractive")):"function"==typeof define&&define.amd?define(["exports","ractive"],e):e(t.RMMenu={},t.Ractive)}(this,function(t,e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var n="undefined"!=typeof window?window:null;function r(t,e,r){if(n&&n.Ractive&&"object"==typeof n.Ractive[e]){var i=document.currentScript;if(i||(i=(i=document.querySelectorAll("script"))[i.length-1]),i){var o=i.getAttribute("data-alias");o&&(o=(o=o.split("&")).reduce(function(t,e){var n=e.split("="),r=n[0],i=n[1];return t[r]=i,t},{})),Ractive[e][o&&o[t]||t]=r}}}function i(t,e){var n=t.processParams(e,{duration:200,easing:"easeInOut"});return new Promise(function(e){requestAnimationFrame(function(){t.setStyle("overflow","hidden");var r="x"===n.axis?"width":"height";if(t.isIntro||n.intro){var i=t.getStyle(r);t.setStyle(r,0),t.setStyle("opacity",0),e(t.animateStyle(r,i,n).then(function(){return t.animateStyle("opacity",1,n)}).then(function(){t.setStyle(r,""),t.setStyle("overflow","")}))}else t.setStyle(r,t.getStyle(r)),t.setStyle("opacity",1),e(t.animateStyle("opacity",0,n).then(function(){return t.animateStyle(r,0,n)}))})})}function o(t,e){var n=!1,r=!1;function i(n){for(var r=n.target;r;){if(r===t)return;if(!r.parentNode&&r!==document)return;r=r.parentNode}e(n)}return setTimeout(function(){n=!0,r||(document.body.addEventListener("click",i),document.body.addEventListener("touchstop",i))}),{teardown:function(){r=!0,n&&(document.body.removeEventListener("click",i),document.body.removeEventListener("touchstop",i))}}}r("expand","transitions",i);var s=function(t){function e(e){t.call(this,opts),this.refs={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addItem=function(t,e){return"number"==typeof e?this.splice("items",e,0,t):this.push("items",t),new a(this,null,t)},e.prototype.visibleItems=function(t){var e=this;return t.filter(function(t){return!1!==t.condition&&("string"!=typeof t.condition||!1!==e.get(t.condition))}).length},e.prototype.getHandle=function(t){var e,n=this;if("string"==typeof t)if(this.refs[t])e=this.refs[t].ctx;else{var r=this.find(t);if(r)e=this.getContext(r);else{var i=function t(e,n){for(var r=0;r<e.length;r++){if(e[r].ref===n)return[e[r]];if(e[r].items){var i=t(e[r].items,n);if(i)return i.unshift(e[r]),i}}}(this.get("items"),t);if(i)return i.reduce(function(t,e){return new a(n,t,e)},null)}}else t&&t.parentNode?e=this.getContext(t):t&&t.decorators&&(e=t);if(e){for(var o=[e.get()],s="../../";""!==e.resolve(s);)o.unshift(e.get(s)),s+="../../";return o.reduce(function(t,e){return new a(n,t,e)},null)}},e.prototype.popAllIn=function(t){t||(t="");var e=this.get(t);if(e&&e.items)for(var n=0;n<e.items.length;n++)this.popAllIn((t?t+".":"")+"items."+n);e.open&&e.popout&&this.set((t?t+".":"")+"open",!1)},e.prototype.popSiblingsIn=function(t){var e=t.resolve(),n=t.get("../");if(n)for(var r=0;r<n.length;r++)e!==t.resolve("../"+r)&&n[r].open&&n[r].popout&&t.toggle("../"+r+".open")},e.prototype._actioned=function(){this.fire("action"),this.popAllIn()},e.prototype._itemRendered=function(t){var e=this;return setTimeout(function(){return e.fire("item",t,e.getHandle(t))}),""},e.prototype.childActive=function(t){var e=this.get(t);if(e&&e.items)for(var n=0;n<e.items.length;n++)if(!0===this.get(t+".items."+n+".active")||"function"==typeof e.items[n].active&&e.items[n].active()||this.get(t+".items."+n+".activeRef")&&this.get(e.items[n].activeRef)||this.childActive(t+".items."+n))return!0},e}(e);e.extendWith(s,{template:{v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-wrapper",g:1},{t:16,r:"extra-attributes"},{n:"class-rmenu-vertical",t:13,f:[{t:2,x:{r:["~/horizontal"],s:"!_0"}}]},{n:"class-rmenu-horizontal",t:13,f:[{t:2,r:"~/horizontal"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-inner",g:1}],f:[{t:8,r:"items"}]}]}]}],e:{"!_0":function(t){return!t},'_0&&(_1||_2==="section")':function(t,e,n){return t&&(e||"section"===n)},"_0?_3.active(_1.getHandle((_2))):_3.active()":function(t,e,n,r){return t?r.active(e.getHandle(n)):r.active()},'typeof _0==="function"':function(t){return"function"==typeof t},'typeof _0==="boolean"':function(t){return"boolean"==typeof t},"_0.childActive(_1)":function(t,e){return t.childActive(e)},"_0!=null":function(t){return null!=t},"[_0.action(),_1._actioned()]":function(t,e){return[t.action(),e._actioned()]},"[_0._actioned()]":function(t){return[t._actioned()]},'[_0&&_1.popSiblingsIn((_2)),(_2).toggle(".open"),false]':function(t,e,n){return[t&&e.popSiblingsIn(n),n.toggle(".open"),!1]},"_0||(_1&&_2[_1])":function(t,e,n){return t||e&&n[e]},'[{axis:"x"}]':function(){return[{axis:"x"}]},"_2&&_0&&_1.visibleItems(_2)":function(t,e,n){return n&&t&&e.visibleItems(n)},"[_0.popAllIn(_1),false]":function(t,e){return[t.popAllIn(e),!1]},'!_0||_0==="item"':function(t){return!t||"item"===t},'_0==="section"':function(t){return"section"===t},'_0==="container"':function(t){return"container"===t},'(!_0||_0==="item")&&_1':function(t,e){return(!t||"item"===t)&&e},"[_0.popAllIn(_1)]":function(t,e){return[t.popAllIn(e)]},"[_0]":function(t){return[t]},'typeof _0==="string"':function(t){return"string"==typeof t},'_0||"item"':function(t){return t||"item"},"_0._itemRendered((_1))":function(t,e){return t._itemRendered(e)},'_1===undefined||(typeof _1==="boolean"&&_1)||(typeof _1==="string"&&_0[_1])||(typeof _1==="function"&&_2.condition())':function(t,e,n){return void 0===e||"boolean"==typeof e&&e||"string"==typeof e&&t[e]||"function"==typeof e&&n.condition()}},p:{container:[{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-container-pad",g:1}],f:[{t:3,r:".content"}]}],n:50,r:".pad"},{t:4,f:[{t:3,r:".content"}],n:51,l:1}],n:50,r:".content"},{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-container-pad",g:1}],f:[{t:16,r:".contentPartial"}]}],n:50,r:".pad"},{t:4,f:[{t:16,r:".contentPartial"}],n:51,l:1}],n:50,r:".contentPartial",l:1}],section:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-main",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-title",g:1}],f:[{t:4,f:[{t:2,r:".title"}],n:50,r:".title"},{t:4,f:[{t:16,r:".titlePartial"}],n:50,r:".titlePartial",l:1}]}]}," ",{t:8,r:"children"}],children:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-items",g:1},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,x:{r:[".popout"],s:"!_0"}},{t:4,f:[{n:"pop",t:72,v:"t0"}],n:51,l:1},{n:"class-rmenu-shrink",t:13,f:[{t:2,r:".shrink"}]}],f:[{t:8,r:"items"}]}],n:50,x:{r:[".items.length",".open",".type"],s:'_0&&(_1||_2==="section")'}}],item:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-main",g:1},{t:4,f:[{n:"class-rmenu-active",t:13,f:[{t:2,rx:{r:"~/",m:[{t:30,n:".activeRef"}]}}]}],n:50,r:".activeRef"},{t:4,f:[{n:"class-rmenu-active",t:13,f:[{t:2,x:{r:[".active.length","@this","@context","."],s:"_0?_3.active(_1.getHandle((_2))):_3.active()"}}]}],n:50,x:{r:[".active"],s:'typeof _0==="function"'},l:1},{t:4,f:[{n:"class-rmenu-active",t:13,f:[{t:2,r:".active"}]}],n:50,x:{r:[".active"],s:'typeof _0==="boolean"'},l:1},{t:4,f:[{n:"class-rmenu-active",t:13,f:[{t:2,x:{r:["@this","@keypath"],s:"_0.childActive(_1)"}}]}],n:50,r:".popout",l:1},{t:4,f:[{n:"class-rmenu-disabled",t:13,f:[{t:2,r:".disabled"}]}],n:50,x:{r:[".disabled"],s:"_0!=null"}},{t:4,f:[{n:"class-rmenu-disabled",t:13,f:[{t:2,rx:{r:"~/",m:[{t:30,n:".disabledRef"}]}}]}],n:50,r:".disabledRef",l:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"menu-left",g:1}],f:[{t:3,r:".left"}]}],n:50,r:".left"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-left",g:1}],f:[{t:16,r:".leftPartial"}]}],n:50,r:".leftPartial",l:1}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-title",g:1},{t:4,f:[{t:4,f:[{n:["click"],t:70,f:{r:[".","@this"],s:"[_0.action(),_1._actioned()]"}}],n:50,x:{r:[".action"],s:'typeof _0==="function"'}},{t:4,f:[{t:16,r:".actionPartial"},{n:["click"],t:70,f:{r:["@this"],s:"[_0._actioned()]"}}],n:50,r:".actionPartial",l:1},{t:4,f:[{n:["click"],t:70,f:{r:[".popout","@this","@context"],s:'[_0&&_1.popSiblingsIn((_2)),(_2).toggle(".open"),false]'}}],n:50,r:".items.length",l:1}],n:51,x:{r:[".disabled",".disabledRef","~/"],s:"_0||(_1&&_2[_1])"}}],f:[{t:4,f:[{t:3,r:".title"}],n:50,r:".title"},{t:4,f:[{t:16,r:".titlePartial"}],n:50,r:".titlePartial",l:1}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"menu-right",g:1}],f:[{t:3,r:".right"}]}],n:50,r:".right"},{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-right",g:1}],f:[{t:16,r:".rightPartial"}]}],n:50,r:".rightPartial",l:1}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-expand",g:1},{n:["click"],t:70,f:{r:[".popout","@this","@context"],s:'[_0&&_1.popSiblingsIn((_2)),(_2).toggle(".open"),false]'}},{n:"expand",t:72,f:{r:[],s:'[{axis:"x"}]'},v:"t0"}]}],n:50,x:{r:[".items.length","@this",".items"],s:"_2&&_0&&_1.visibleItems(_2)"}}]}," ",{t:8,r:"children"}],items:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-popout-close",g:1},{n:["click"],t:70,f:{r:["@this","@keypath"],s:"[_0.popAllIn(_1),false]"}}],f:["❌ Close"]}],n:50,r:".shrink"}," ",{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rmenu-entry",g:1},{t:4,f:[{n:"class-rmenu-item",t:13}],n:50,x:{r:[".type"],s:'!_0||_0==="item"'}},{t:4,f:[{n:"class-rmenu-section",t:13}],n:50,x:{r:[".type"],s:'_0==="section"'},l:1},{t:4,f:[{n:"class-rmenu-container",t:13}],n:50,x:{r:[".type"],s:'_0==="container"'},l:1},{n:"class-rmenu-expanded",t:13,f:[{t:2,r:".open"}]},{n:"class-rmenu-popout",t:13,f:[{t:2,x:{r:[".type",".popout"],s:'(!_0||_0==="item")&&_1'}}]},{t:4,f:[{n:"pop",t:72,v:"t0"},{t:4,f:[{n:["clickout"],t:70,f:{r:["@this","@keypath"],s:"[_0.popAllIn(_1)]"}}],n:50,r:".open"}," "],n:50,r:".popout"},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:50,x:{r:["~/noExpand"],s:"!_0"},l:1},{t:4,f:[{t:8,r:".refPartial"}],n:50,r:".refPartial"},{t:4,f:[{n:"ref",t:71,f:{r:[".ref"],s:"[_0]"}}],n:50,x:{r:[".ref"],s:'typeof _0==="string"'},l:1},{t:4,f:[{t:16,r:".extra"}],n:50,r:".extra"}],f:[{t:8,x:{r:[".type"],s:'_0||"item"'}}," ",{t:4,f:[{t:2,x:{r:["@this","@context"],s:"_0._itemRendered((_1))"}}],n:50,x:{r:[".type"],s:'!_0||_0==="item"'}}]}],n:50,x:{r:["~/",".condition","."],s:'_1===undefined||(typeof _1==="boolean"&&_1)||(typeof _1==="string"&&_0[_1])||(typeof _1==="function"&&_2.condition())'}}],n:52,r:".items"}]}},css:function(t){return[function(t){var e=Object.assign({},t("raui.primary"),t("raui.menu.primary"));return e.popout=Object.assign({},t("raui.menu.popout"),t("raui.menu.primary.popout")),"\n .rmenu-wrapper {\n position: relative;\n z-index: 1;\n }\n .rmenu-wrapper.rmenu-vertical {\n min-height: 100%;\n }\n .rmenu {\n "+(t("raui.menu.font")?"font-family: "+t("raui.menu.font")+";":"")+"\n color: "+(e.bg||"#fff")+";\n background-color: "+(e.fg||"#222")+";\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n }\n .rmenu-wrapper.alt > .rmenu {\n color: "+(e.fga||"#222")+";\n background-color: "+(e.bg||"#fff")+";\n }\n .rmenu-inner {\n width: 100%;\n height: 100%;\n overflow-y: auto;\n }\n .rmenu-item {\n border-top: 1px solid transparent;\n border-bottom: 1px solid transparent;\n transition: border 0.2s ease-in-out;\n }\n .rmenu-item:hover > .rmenu-main {\n background-color: "+(e.fga||"#07e")+";\n color: "+(e.bg||"#fff")+";\n }\n .rmenu-disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n .rmenu-popout {\n border: none;\n }\n .rmenu-expanded {\n border-top: 0.0625em solid "+(e.bc||"#ccc")+";\n border-bottom: 0.0625em solid "+(e.bc||"#ccc")+";\n }\n .rmenu-popout.rmenu-expanded {\n border: none;\n }\n .rmenu-popout .rmenu-popout.rmenu-expanded {\n background-color: "+(e.popout.bga||e.bg||"#fff")+";\n color: "+(e.popout.fg||e.fg||"#222")+";\n }\n .rmenu-main {\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n user-select: none;\n transition: 0.3s ease-in-out;\n transition-property: color, background-color;\n display: flex;\n align-items: center;\n min-height: 1em;\n }\n .rmenu-main.rmenu-active, .rmenu-item:hover > .rmenu-main.rmenu-active {\n color: "+(e.fga||"#07e")+";\n background-color: "+(e.bg||"#fff")+";\n }\n .rmenu-popout .rmenu-entry .rmenu-main.rmenu-active, .rmenu-popout .rmenu-item:hover > .rmenu-main.rmenu-active {\n color: "+(e.popout.bg||e.bg||"#fff")+";\n background-color: "+(e.popout.fga||e.fga||"#07e")+";\n }\n .rmenu-wrapper.alt .rmenu-main.rmenu.active {\n color: "+(e.bg||"#fff")+";\n background-color: "+(e.fg||"#222")+";\n }\n .rmenu-popout .rmenu-items .rmenu-item:hover > .rmenu-main {\n background-color: "+(e.popout.bga||"#f4f4f4")+";\n color: "+(e.popout.fg||"#222")+";\n }\n \n .rmenu-items {\n display: block;\n }\n .rmenu-right {\n padding-right: 0.4em; \n }\n .rmenu-left {\n padding-left: 0.4em;\n }\n .rmenu-expand {\n width: 1.5em;\n height: 1.5em;\n padding-left: 0.5em;\n cursor: pointer;\n position: relative;\n }\n .rmenu-expand:before {\n position: absolute;\n display: inline-block;\n top: 0.25em;\n content: ' ';\n transform: rotate(45deg);\n transition: transform 0.2s ease-in-out, top 0.2s ease-in-out, left 0.2s ease-in-out;\n box-sizing: border-box;\n border-width: 0.25em;\n border-style: solid;\n border-left-color: transparent;\n border-top-color: transparent;\n }\n .rmenu-expanded > .rmenu-main > .rmenu-expand:before {\n top: -0.25em;\n }\n \n .rmenu-popout > .rmenu-items {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background-color: "+(e.popout.bg||e.bg||"#fff")+";\n color: "+(e.popout.fg||e.fg||"#222")+";\n box-sizing: border-box;\n border-right: 1px solid "+(e.popout.bc||e.bc||"#ccc")+";\n z-index: -1;\n transition: box-shadow 0.2s ease-in-out;\n }\n .rmenu-popout.rmenu-expanded > .rmenu-items {\n left: 100%;\n z-index: initial;\n box-shadow: 0.2em 0 0.2em rgba(0, 0, 0, 0.2);\n }\n .rmenu-popout.rmenu-expanded > .rmenu-items .rmenu-popout.rmenu-expanded > .rmenu-items {\n left: calc(100% + 1px);\n }\n \n .rmenu-popout > .rmenu-items.rmenu-shrink {\n left: 100%;\n z-index: 1;\n }\n .rmenu-popout.rmenu-expanded > .rmenu-items.rmenu-shrink,\n .rmenu-popout.rmenu-expanded > .rmenu-items .rmenu-popout.rmenu-expanded > .rmenu-items.rmenu-shrink {\n left: 0;\n }\n \n .rmenu-popout > .rmenu-main > .rmenu-expand:before {\n transform: rotate(-45deg);\n top: 0.4em;\n }\n \n .rmenu-popout.rmenu-expanded > .rmenu-main > .rmenu-expand:before {\n transform: rotate(135deg);\n left: 0.75em;\n }\n \n .rmenu-popout > .rmenu-items .rmenu-popout > .rmenu-items {\n height: 100%;\n width: calc(100% + 1px);\n top: 0px;\n }\n .rmenu-popout > .rmenu-items .rmenu-popout > .rmenu-items.rmenu-shrink {\n height: 100%;\n }\n \n .rmenu-popout-close {\n color: "+(e.popout.fga||e.fga||"#07e")+";\n display: block;\n padding: 0.5em;\n cursor: pointer;\n }\n \n .rmenu-title {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n cursor: pointer;\n padding: 0.5em;\n flex-grow: 1;\n }\n .rmenu-disabled > .rmenu-title {\n cursor: not-allowed;\n }\n .rmenu-item h1, .rmenu-item h2, .rmenu-item h3, .rmenu-item h4 {\n margin: 0;\n }\n \n .rmenu-section {\n padding: 0 0 0.75em 0;\n }\n .rmenu-section > .rmenu-main {\n cursor: default;\n font-size: 0.75em;\n opacity: 0.7;\n margin-bottom: 0.25em;\n }\n .rmenu-popout .rmenu-section:first-child > .rmenu-main {\n padding-top: 0;\n }\n .rmenu-popout .rmenu-section > .rmenu-main > .rmenu-title {\n font-size: 1.5em;\n text-align: center;\n padding: 0.75em;\n opacity: 1;\n font-weight: bold;\n color: "+(e.popout.fg||e.fg||"#222")+";\n background-color: "+(e.popout.bga||e.bga||"#f4f4f4")+";\n border-bottom: 1px solid "+(e.popout.bc||e.bc||"#ccc")+";\n border-top: 1px solid "+(e.popout.bc||e.bc||"#ccc")+";\n }\n \n .rmenu-container {\n box-sizing: border-box;\n }\n \n .rmenu-container-pad {\n padding: 0.3em 0.3em 0.8em 0.3em;\n }\n \n .rmenu-expanded > .rmenu-main > .rmenu-expand:before {\n transform: rotate(-135deg);\n top: 0.5em;\n }\n "}.call(this,t)].join(" ")},cssId:"menu",noCssTransform:!0,noIntro:!0,nestedTransitions:!1,on:{construct:function(){var t=this.component;if(!t)return;var e=t.template.f||[],n=t.template.m?t.template.m.slice():[],r=t.template;t.template={e:r.e,f:r.f,t:r.t,m:n};var i=[];e.forEach(function(t){var e=function t(e){if("item"!==e.e&&"section"!==e.e&&"container"!==e.e)return;var r={};var i=[];var o;"item"!==e.e&&(r.type=e.e);e.m&&e.m.forEach(function(t){if("title"===t.n)"string"==typeof t.f?r.title=t.f:r.titlePartial={t:t.f};else if(70===t.t&&"action"===t.n[0])r.actionPartial={t:[{n:["click"],f:t.f,t:t.t}]};else if("guard"===t.n&&t.f&&1===t.f.length&&2===t.f[0].t){var o="_cnd"+n.length;r.condition=o,n.push({t:13,n:o,f:t.f})}else if("ref"===t.n){if("string"==typeof t.f)r.ref=t.f;else if(t.f&&1===t.f.length&&2===t.f[0].t){var s="_cnd"+n.length;n.push({t:13,n:s,f:t.f}),r.refPartials={t:[{t:71,n:"ref",f:{r:s,s:"[_0]"}}]}}}else if("active"===t.n){if(t.f&&1===t.f.length&&2===t.f[0].t){var a="_cnd"+n.length;r.activeRef=a,n.push({t:13,n:a,f:t.f})}}else if("open"===t.n)r.open=!0;else if("popout"===t.n)r.popout=!0;else if("container"===e.e&&"pad"===t.n)r.pad=!0;else if("disabled"===t.n)if(t.f&&1===t.f.length&&2===t.f[0].t){var u="_cnd"+n.length;r.disabledRef=u,n.push({t:13,n:u,f:t.f})}else 0===t.f&&(r.disabled=!0);else i.push(t)});i.length&&(r.extra={t:i});if("container"===e.e)return r.contentPartial={t:e.f},r.extra=i,r;e.f&&e.f.forEach(function(e){if("title"===e.e)1===e.f.length&&"string"==typeof e.f[0]?r.title=e.f[0]:r.titlePartial={t:e.f};else if("item"===e.e||"section"===e.e||"container"===e.e){var n=t(e);n&&(r.items||(r.items=[])).push(n)}else"left"===e.e?r.leftPartial={t:e.f}:"right"===e.e?r.rightPartial={t:e.f}:(o||(o=[]),o.push(e))});!r.titlePartial&&o&&(r.titlePartial={t:o});o=null;return r}(t);e&&i.push(e)}),this._items=i},config:function(){this._items&&this.set("items",(this.get("items")||[]).concat(this._items),{shuffle:!0})}},attributes:["noExpand"],use:[function(t){return void 0===t&&(t={}),function(e){e.instance.transitions[t.name||"expand"]=i}}(),function(t){return void 0===t&&(t={}),function(e){e.instance.events[t.name||"clickout"]=o}}()],decorators:{ref:function(t,e){var n=this,r=e;n.refs||(n.refs={});var i={update:function(t){n.refs[r]===i&&delete n.refs[r],r=t,n.refs[r]=i},teardown:function(){n.refs[r]===i&&delete n.refs[r]}};return i.ctx=n.getContext(t),n.refs[r]=i,i}},transitions:{pop:function(t,e){var n=t.processParams(e,{duration:200,easing:"easeInOut"}),r=this.getContext(t.node),i=r.get(".shrink");if(t.isIntro){var o=t.node.getBoundingClientRect();function s(){for(var e=t.node.parentNode;e&&e.classList;){if(e.classList.contains("rmenu"))return e;if(e.parentNode.classList.contains("rmenu-popout"))return e;e=e.parentNode}}o.left+o.width>window.innerWidth?(setTimeout(function(){return r.set(".shrink",!0)}),i=!0,s().style.overflowX="hidden"):i?(setTimeout(function(){return r.set(".shrink",!1)}),s().style.overflowX="",i=!1):s().style.overflowX=""}else setTimeout(function(){return r.set("shrink",!1)});return t.isIntro?i?(t.setStyle("left","100%"),t.animateStyle("left",0,n)):(t.setStyle("left",0),t.setStyle("z-index",-1),t.animateStyle("left","100%",n)):i?(t.setStyle("left",0),t.animateStyle("left","100%",n)):(t.setStyle("left","100%"),t.setStyle("z-index",-1),t.animateStyle("left",0,n))}}});var a=function(t,e,n){this.menu=t,this.parent=e,this.item=n},u={keypath:{configurable:!0},action:{configurable:!0},active:{configurable:!0},disabled:{configurable:!0},ref:{configurable:!0}};function f(t){return void 0===t&&(t={}),function(e){e.instance.components[t.name||"menu"]=s}}u.keypath.get=function(){if(!this.removed){if(!this.parent)return"items."+this.menu.get("items").indexOf(this.item);var t=this.parent.keypath+".items";return t+"."+this.menu.get(t).indexOf(this.item)}},u.action.get=function(){if(!this.removed)return this.item.action},u.action.set=function(t){return this.set(".action",t)},u.active.get=function(){if(!this.removed){var t=this.item;return t.activeRef?this.menu.get(t.activeRef):"function"==typeof t.active?t.active():t.active}},u.active.set=function(t){if(!this.removed){var e=this.item;return e.activeRef?this.menu.set(e.activeRef,t):this.set(".active",t)}},u.disabled.get=function(){if(!this.removed)return this.get(".disabled")},u.disabled.set=function(t){if(!this.removed)return this.set(".disabled",t)},u.ref.get=function(){if(!this.removed)return this.item.ref},u.ref.set=function(t){return this.set(".ref",t)},a.prototype.addItem=function(t,e){if(this.removed)return!1;var n=this.keypath+".items";return"number"==typeof e?this.menu.splice(n,0,e,t):this.menu.push(n,t),new a(this.menu,this,t)},a.prototype.open=function(){if(this.removed)return!1;this.menu.set(this.keypath+".open",!0)},a.prototype.close=function(){if(this.removed)return!1;this.menu.set(this.keypath+".open",!1)},a.prototype.remove=function(){if(this.removed)return!1;var t=(this.parent?this.parent.keypath+".":"")+"items",e=this.menu.get(t);return this.menu.splice(t,e.indexOf(this.item),1),this.removed=!0,!0},a.prototype.get=function(t){if(this.removed)return!1;var e=t.replace(/^[\.\/]*/,"");return this.menu.get(this.keypath+"."+e)},a.prototype.set=function(t,e){if(this.removed)return!1;var n=t.replace(/^[\.\/]*/,"");return this.menu.set(this.keypath+"."+n,e)},Object.defineProperties(a.prototype,u),r("RMMenu","components",s),t.Menu=s,t.plugin=f,t.default=f,Object.defineProperty(t,"__esModule",{value:!0})}); |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("ractive")):"function"==typeof define&&define.amd?define(["exports","ractive"],t):t(e.RMTable={},e.Ractive)}(this,function(e,t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var n,r="undefined"!=typeof window?window:null;function i(e,t,n){if(r&&r.Ractive&&"object"==typeof r.Ractive[t]){var i=document.currentScript;if(i||(i=(i=document.querySelectorAll("script"))[i.length-1]),i){var o=i.getAttribute("data-alias");o&&(o=(o=o.split("&")).reduce(function(e,t){var n=t.split("="),r=n[0],i=n[1];return e[r]=i,e},{})),Ractive[t][o&&o[e]||e]=n}}}var o={tiny:{units:[2,3,4,5,6,8],max:"0",value:0},xsmall:{units:[2,3,4,5,6,8,10,12],max:"20em",prefix:"xs",value:10},small:{units:[2,3,4,5,6,8,10,12],max:"36em",value:20},medium:{units:[2,3,4,5,6,8,10,12],max:"48em",value:30},large:{units:[2,3,4,5,6,8,10,12,20,24],max:"64em",value:40},xlarge:{units:[2,3,4,5,6,8,10,12,20,24,32],max:"100em",value:50},ginormous:{units:[2,3,4,5,6,8,10,12,20,24,32,64],max:"150em",value:60}},a={"grid grid-root":/\bgrid grid-root\b/g},s=/\s+/g;function l(e,t){var r,i,l=this.getContext(e),c=this,f=t||{};function d(){var t=e.clientWidth;if(!f.type||"class"===f.type){var n,o=-1;for(var c in r)r[c]<=t&&(a[c].lastIndex=-1,r[c]>o&&(n=c,o=r[c])),e.className=e.className.replace(a[c],"").trim();a[n].test(e.className)||(e.className+=" "+n),f.value&&l.set(f.value,i[n].value),f.name&&l.set(f.name,n),e.className=e.className.replace(s," ")}}function u(){var e=(n||(n=document.createElement("div"),document.body.appendChild(n)),n);for(var t in i=c.get("@style.break")||o,r={},i)e.style.width=i[t].max,r[t]=e.clientWidth,a[t]||(a[t]=new RegExp("\\b"+t+"\\b","g"));e.style.width=0,d()}var p=function(){return requestAnimationFrame(d)},h=this.root.on("*.resize",p),b=this.observe("@style.break",u,{init:!1});return window.addEventListener("resize",p),e.className+=" grid grid-root",f.immediate?u():requestAnimationFrame(u),{update:function(e){f=e||{},requestAnimationFrame(d)},teardown:function(){e.className=e.className.replace(a["grid grid-root"],"").trim(),h.cancel(),b.cancel(),window.removeEventListener("resize",p)}}}function c(e,t){var n=e("raui.grid.break")||t||o,r=(e("raui.grid.wrappers")||[".row-wrap > ",".row-wrap > .row-wrap > "]).slice();r.unshift("");var i,a=".row > * { position: relative; width: 100%; transition-duration: 0.2s; transition-timing-function: ease-in-out; transition-property: width, padding, margin; box-sizing: border-box; }\n.grid { display: block; }\n.grid .row { display: flex; flex-wrap: wrap; min-height: fit-content; width: 100%; }\n.grid .row.row-pad > * { padding: "+(e("raui.grid.padding")||"0.5em")+"; }\n.grid .row > .pad { display: flex; flex-direction: column; padding: "+(e("raui.grid.padding")||"0.5em")+"; box-sizing: border-box; }",s=Object.keys(n).map(function(e){return(n[e].key=e)&&n[e]});s.sort(function(e,t){return e.value>t.value?1:e.value<t.value?-1:0});var l={};s.reverse().reduce(function(e,t){return e.push(t.key),l[t.key]=e.slice(),e},[]);var c="",f="";return s.reverse().forEach(function(t){var n=t.prefix||t.key[0];t.units.forEach(function(o){f+="\n"+l[t.key].map(function(e){return r.map(function(t){return"."+e+" > "+t+"."+n+"1, ."+e+" > "+t+".row > ."+n+"1, ."+e+" ."+n+"-n1, ."+e+" .row-"+n+"-n1 > *"}).join(", ")}).join(", ")+" { display: "+(e("raui.grid.display")||"inline-block")+"; width: 100%; flex-grow: 0; flex-shrink: 0; }\n"+l[t.key].map(function(e){return r.map(function(t){return"."+e+" > "+t+"."+n+"0, ."+e+" > "+t+".row > ."+n+"0, ."+e+" ."+n+"-n0, ."+e+" .row-"+n+"-n0 > *"}).join(", ")}).join(", ")+" { display: none; flex-grow: 0; flex-shrink: 0; }",c+="\n"+l[t.key].map(function(e){return"."+e+" .row-"+n+"-n1 > *"}).join(", ")+" { display: "+(e("raui.grid.display")||"inline-block")+"; width: 100%; }\n"+l[t.key].map(function(e){return"."+e+" .row-"+n+"-n0 > *"}).join(", ")+" { display: none; }";for(var a=function(a){i=(i=""+a/o*100).substr(0,i.indexOf(".")+3),c+="\n"+l[t.key].map(function(e){return r.map(function(t){return"."+e+" > "+t+".row-"+n+a+"-"+o+" > *, ."+e+" .row-"+n+"-n"+a+"-"+o+" > *, ."+e+" .row > ."+n+"-n"+a+"-"+o}).join(", ")}).join(", ")+" { display: "+(e("raui.grid.display")||"inline-block")+"; width: "+i+"%; }",f+="\n"+l[t.key].map(function(e){return r.map(function(t){return"."+e+" > "+t+"."+n+a+"-"+o+", ."+e+" > "+t+".row > ."+n+a+"-"+o+", ."+e+" ."+n+"-n"+a+"-"+o+", ."+e+" .row-"+n+"-n"+a+"-"+o+" > *"}).join(", ")}).join(", ")+" { display: "+(e("raui.grid.display")||"inline-block")+"; width: "+i+"%; flex-grow: 0; flex-shrink: 0; }"},s=1;s<o;s++)a(s)}),l[t.key].forEach(function(e){return f+=r.map(function(t){return"."+e+" > "+t+".row > ."+n+"-fill"}).join(", ")+", ."+e+" ."+n+"-nfill { width: auto; flex-grow: 2; flex-shink: 2; }\n"+r.map(function(t){return"."+e+" > "+t+".row > ."+n+"-auto"}).join(", ")+", ."+e+" ."+n+"-nauto { width: auto; flex-shrink: 2; }"})}),a+=c+f}l.style=c,i("grid","decorators",l);var f=250;function d(e){return void 0===e&&(e={}),function(t){var n=t.Ractive;t.instance.events[e.name||(e.count||"")+"clicks"]=function(t,r,i){var o,a=Object.assign({},e,i);return(o=t.__r_clicks__)?o.subscribe(a.count||1,!!a.hold,r):(o=new u(n.getContext(t),a.delay||f,a.bubble||!1),t.__r_clicks__=o,o.subscribe(a.count||1,!!a.hold,r)),{teardown:function(){o.unsubscribe(a.count||1,!!a.hold,r)}}}}}d({name:"click",count:1}),d({name:"dblclick",count:2}),d({name:"trpclick",count:3});var u=function(e,t,n){this.context=e,this.node=e.node,this.delay=t,this.fires={},this.refs=0,this.bubble=n,this.bind()};function p(e){return this.__r_clicks__.mousedown(e)}function h(e){return this.__r_clicks__.touchdown(e)}function b(){this.addEventListener("keydown",v,!1),this.addEventListener("blur",g,!1)}function g(){this.removeEventListener("keydown",v,!1),this.removeEventListener("blur",g,!1)}function v(e){if(32===e.which||10===e.which||13===e.which)return this.__r_clicks__.fire()}function m(e,t){var n=e.processParams(t,{duration:200,easing:"easeInOut"});return new Promise(function(t){requestAnimationFrame(function(){e.setStyle("overflow","hidden");var r="x"===n.axis?"width":"height";if(e.isIntro||n.intro){var i=e.getStyle(r);e.setStyle(r,0),e.setStyle("opacity",0),t(e.animateStyle(r,i,n).then(function(){return e.animateStyle("opacity",1,n)}).then(function(){e.setStyle(r,""),e.setStyle("overflow","")}))}else e.setStyle(r,e.getStyle(r)),e.setStyle("opacity",1),t(e.animateStyle("opacity",0,n).then(function(){return e.animateStyle(r,0,n)}))})})}u.prototype.subscribe=function(e,t,n){(this.fires[e+","+t]||(this.fires[e+","+t]=[])).push(n),this.refs++},u.prototype.unsubscribe=function(e,t,n){var r=this.fires[e+","+t]||[];r.splice(r.indexOf(n),1),this.refs--,this.refs||this.teardown()},u.prototype.bind=function(){window.PointerEvent||window.navigator.pointerEnabled?this.context.listen("pointerdown",p):window.navigator.msPointerEnabled?this.context.listen("MSPointerDown",p):(this.context.listen("mousedown",p),this.context.listen("touchstart",h)),"A"!==this.node.tagName&&"BUTTON"!==this.node.tagName&&"button"!==this.node.type&&"submit"!==this.node.type||this.context.listen("focus",b)},u.prototype.fire=function(e,t,n,r){var i=this;this.tm?(this.tmCount++,clearTimeout(this.tm)):this.tmCount=1;var o=function(){i.tm=null,(i.fires[i.tmCount+","+!!r]||[]).forEach(function(o){o({node:i.node,original:e,x:t,y:n,hold:!!r})})};return r?o():this.tm=setTimeout(o,this.delay),this.bubble},u.prototype.mousedown=function(e){var t=this;if(!this.preventMousedownEvents&&(void 0===e.which||1===e.which)){var n,r=e.clientX,i=e.clientY,o=e.pointerId,a=function(e){e.pointerId==o&&(t.fire(e,r,i),l())},s=function(e){e.pointerId==o&&(Math.abs(e.clientX-r)>=5||Math.abs(e.clientY-i)>=5)&&l()},l=function(){n&&clearTimeout(n),t.node.removeEventListener("MSPointerUp",a,!1),document.removeEventListener("MSPointerMove",s,!1),document.removeEventListener("MSPointerCancel",l,!1),t.node.removeEventListener("pointerup",a,!1),document.removeEventListener("pointermove",s,!1),document.removeEventListener("pointercancel",l,!1),t.node.removeEventListener("click",a,!1),document.removeEventListener("mousemove",s,!1)};return window.PointerEvent||window.navigator.pointerEnabled?(this.node.addEventListener("pointerup",a,!1),document.addEventListener("pointermove",s,!1),document.addEventListener("pointercancel",l,!1)):window.navigator.msPointerEnabled?(this.node.addEventListener("MSPointerUp",a,!1),document.addEventListener("MSPointerMove",s,!1),document.addEventListener("MSPointerCancel",l,!1)):(this.node.addEventListener("click",a,!1),document.addEventListener("mousemove",s,!1)),n=setTimeout(function(){l(),t.fire(e,r,i,!0)},400),this.bubble||e.stopPropagation(),this.bubble}},u.prototype.touchdown=function(e){var t,n=this,r=e.touches[0],i=r.clientX,o=r.clientY,a=r.identifier,s=function(e){e.changedTouches[0].identifier===a?(e.preventDefault(),n.preventMousedownEvents=!0,clearTimeout(n.preventMousedownTimeout),n.preventMousedownTimeout=setTimeout(function(){n.preventMousedownEvents=!1},400),n.fire(e,i,o),c()):c()},l=function(e){1===e.touches.length&&e.touches[0].identifier===a||c();var t=e.touches[0];(Math.abs(t.clientX-i)>=5||Math.abs(t.clientY-o)>=5)&&c()},c=function(){t&&clearTimeout(t),n.node.removeEventListener("touchend",s,!1),window.removeEventListener("touchmove",l,!1),window.removeEventListener("touchcancel",c,!1)};return this.node.addEventListener("touchend",s,!1),window.addEventListener("touchmove",l,!1),window.addEventListener("touchcancel",c,!1),t=setTimeout(function(){c(),n.fire(e,i,o,!0)},400),this.bubble||e.stopPropagation(),this.bubble},u.prototype.teardown=function(){var e=this.context;e.unlisten("pointerdown",p),e.unlisten("MSPointerDown",p),e.unlisten("mousedown",p),e.unlisten("touchstart",h),e.unlisten("focus",b),delete this.node.__r_clicks__},i("expand","transitions",m);var _=/^([-+])?([^\s]+)$/;function w(e){return"string"==typeof e}function x(e){return"number"==typeof e}function y(e){return"object"==typeof e}function k(e){return"object"==typeof e&&"RegExp"===Object.prototype.toString.call(e)}var O,S,A=function(e){function t(t){e.call(this,t)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.allSelected=function(){for(var e=this.get("selections"),t="virtual"===this.get("paginate")?this.get("rows"):this.get("visibleRows"),n=0;n<t.length;n++)if(!~e.indexOf(t[n]))return!1;return t.length&&!0},t.prototype.nodeSet=function(e,t,n){e[t]=n},t.prototype._expand=function(e){var t=this,n=this.get("visibleRows")[e],r=this.get("expanded"),i=this.find(".rtable-row-expand");i?this.transition("expand",i,{outro:!0}).then(function(){r===n?t.set("expanded",null):(t.set("expanded",n),t.transition("expand",t.find(".rtable-row-expand"),{intro:!0}))}):n===r?this.set("expanded",null):(this.set("expanded",n),this.transition("expand",this.find(".rtable-row-expand"),{intro:!0}))},t.prototype._setSort=function(e,t){var n=this.get("columns."+e);if(n&&(n.sort||n.filter)){var r=n.sort||n.filter;w(r)&&"~"===r[0]&&(r=this.get(r));var i=t.ctrlKey,o=this.get("sort");if(Array.isArray(r)||(r=[r]),o?Array.isArray(o)||(o=[o]):o=[],o.length){var a=o.map(function(e){return _.exec(e).slice(1)}),s=r.reduce(function(e,t){return e&&!!a.find(function(e){return e[1]===t})},!0);s&&o.length!==r.length&&!i?this.set("sort",r.map(function(e){return"+"+r})):i?s?this.set("sort",a.map(function(e){return~r.indexOf(e[1])?("+"===e[0]?"-":"+")+e[1]:e[0]+e[1]})):this.set("sort",o.concat(r.map(function(e){return"+"+e}))):s?this.set("sort",a.map(function(e){return("+"===e[0]?"-":"+")+e[1]})):this.set("sort",r.map(function(e){return"+"+e}))}else this.set("sort",r.map(function(e){return"+"+e}))}},t.prototype._select=function(e,t){var n=this.get("selections");n||(n=[],this.set("selections",n));var r=n.indexOf(e);~r?this.splice("selections",r,1):this.push("selections",e),(r>=n.length||1===n.length)&&this.set("selected",n[n.length-1]),this.fire("selection",{},{item:n[n.length-1],items:n}),setTimeout(function(){return t.target.checked=!~r})},t.prototype.select=function(){var e=this.get("selected");e&&this.fire("selected",{},e,this.get("rows").indexOf(e),this.get("visibleRows").indexOf(e))},t.prototype.selectionOffset=function(e){var t=this.get("selected"),n=this.get("visibleRows");if(t&&~n.indexOf(t)){var r=n.indexOf(t);if(e>0?r+e>=n.length:r+e<0){var i=e<1?-1:1;(i<0&&this.get("page")+i>=0||i>0&&this.get("page")+i<this.get("pagination.total"))&&this.add("page",i),n=this.get("visibleRows");var o=e>0?n[0]:n[n.length-1];this.set({selected:o,selections:[o]})}else this.set({selected:n[r+e],selections:[n[r+e]]})}else{var a=e>0?n[0]:n[n.length-1];this.set({selected:a,selections:[a]})}this.fire("selection",{},{item:this.get("selected"),items:this.get("selections")})},t.prototype.selectionDown=function(){this.selectionOffset(1)},t.prototype.selectionUp=function(){this.selectionOffset(-1)},t.prototype._selectGroup=function(e){var t=e;this.get("page")&&(t+=this.get("page")*this.get("pagination.per"));var n,r=this.get("rows"),i=this.get("groups"),o=this.get("selections"),a=r[t++],s=["selections"],l=[];for(~(n=o.indexOf(a))?l.push(n):s.push(a);t<r.length&&!(t in i);)a=r[t++],~(n=o.indexOf(a))?l.push(n):s.push(a);if(1===s.length)for(n=l.length;n--;)this.splice("selections",l[n],1);else this.push.apply(this,s)},t.prototype._groupSelected=function(e){var t=e;this.get("page")&&(t+=this.get("page")*this.get("pagination.per"));var n=this.get("rows"),r=this.get("groups"),i=this.get("selections");if(!~i.indexOf(n[t++]))return!1;for(;t<n.length&&!(t in r);)if(!~i.indexOf(n[t++]))return!1;return!0},t}(t);function E(e,n){if(e&&n){var r=e._getters||(e._getters={}),i=n.filter;w(i)&&0===i.indexOf("~/")&&(i=e.get(i));var o=Array.isArray(i)?i.join("."):!!w(i)&&i;if(o)return r[o]||(w(i)&&(i=t.splitKeypath(i)),r[o]=function(e){return L(e,i)}),r[o]}}function P(e,n){if(e&&n){var r=e._getters||(e._getters={}),i=n.path;w(i)&&0===i.indexOf("~/")&&(i=e.get(i));var o=Array.isArray(i)?i.join("."):!!w(i)&&i;return o?(r[o]||(w(i)&&(i=t.splitKeypath(i)),r[o]=function(e){return L(e,i)}),r[o]):(w(i=n.value)&&0===i.indexOf("~/")&&(i=e.get(i)),"function"==typeof i?i:void 0)}}function L(e,t){if(!t.length||"object"==typeof e){for(var n=e,r=0;r<t.length;r++)if("object"!=typeof(n=n[t[r]]))return r+1<t.length?void 0:n;return n}}function j(e,t){return e<t?-1:e>t?1:e==t?0:!e&&t?-1:e&&!t?1:0}t.extendWith(A,{template:{v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable",g:1},{n:"class-rtable-virtual",t:13,f:[{t:2,x:{r:["~/paginate"],s:'_0==="virtual"'}}]},{n:"class-rtable-auto",t:13,f:[{t:2,x:{r:["~/paginate"],s:'_0==="auto"'}}]},{n:"class-rtable-fixed",t:13,f:[{t:2,r:"~/fixed"}]},{n:"class-rtable-border",t:13,f:[{t:2,r:"~/border"}]},{n:"class-rtable-fixed-header",t:13,f:[{t:2,r:"~/fixedHeader"}]},{n:"class-rtable-scrolled",t:13,f:[{t:2,x:{r:["~/scroll"],s:'!~(_0||"").indexOf("top")'}}]},{n:"class-rtable-with-select",t:13,f:[{t:2,r:"~/allowSelect"}]}],f:[{t:4,f:[{t:7,e:"div",m:[{n:"grid",t:71}],f:[{t:8,r:"grid-head"}]}],n:50,x:{r:["~/fixedHeader","~/display"],s:'_0&&_1==="grid"'}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-top",g:1},{t:4,f:[{n:["scroll"],t:70,f:"scroll"}],n:50,x:{r:["~/paginate"],s:'_0==="virtual"'}},{t:4,f:[{n:"scrolled",t:71,f:{r:[],s:'["~/scroll"]'}}],n:50,x:{r:["~/fixedHeader","~/display"],s:'_0&&_1==="grid"'}}],f:[{t:4,f:[{t:8,r:"grid"}],n:50,x:{r:["~/display"],s:'_0==="grid"'}},{t:4,f:[{t:8,r:"table"}],n:51,l:1}]}," ",{t:4,f:[{t:8,r:"pagination"}],n:50,x:{r:["~/paginate"],s:'_0!=="virtual"'}}]}],e:{'_0==="virtual"':function(e){return"virtual"===e},'_0==="auto"':function(e){return"auto"===e},'!~(_0||"").indexOf("top")':function(e){return!~(e||"").indexOf("top")},'_0&&_1==="grid"':function(e,t){return e&&"grid"===t},'["~/scroll"]':function(){return["~/scroll"]},'_0==="grid"':function(e){return"grid"===e},'_0!=="virtual"':function(e){return"virtual"!==e},"[_0._setSort(_1,_2)]":function(e,t,n){return[e._setSort(t,n)]},"[_0._select(_1,_2),false]":function(e,t,n){return[e._select(t,n),!1]},'[["select",_2,_0.indexOf(_2),_1.indexOf(_2)]]':function(e,t,n){return[["select",n,e.indexOf(n),t.indexOf(n)]]},"[_0._expand(_1)]":function(e,t){return[e._expand(t)]},"[_0.stopPropagation()]":function(e){return[e.stopPropagation()]},"_0.indexOf(_1)":function(e,t){return e.indexOf(t)},"_0===_1":function(e,t){return e===t},"_0>0":function(e){return e>0},"!_0&&_1>0":function(e,t){return!e&&t>0},'_0==="boolean"':function(e){return"boolean"===e},"_0*_1+1":function(e,t){return e*t+1},"_2+1===_0?_1:(_2+1)*_3":function(e,t,n,r){return n+1===e?t:(n+1)*r},"_0&&_1":function(e,t){return e&&t},"_0===1":function(e){return 1===e},"_0.allSelected()&&_1<_2":function(e,t,n){return e.allSelected()&&t<n},'[_0.set("page",_1-1)]':function(e,t){return[e.set("page",t-1)]},'[(/^\\d+$/.test(_1)&&+_1>0&&+_1<=_0&&_2.set("page",+_1-1))||_2.nodeSet(_3,"value",_4+1)]':function(e,t,n,r,i){return[/^\d+$/.test(t)&&+t>0&&+t<=e&&n.set("page",+t-1)||n.nodeSet(r,"value",i+1)]},"_0==_1+1":function(e,t){return e==t+1},'[_0.set("page",_2[_1-1])]':function(e,t,n){return[e.set("page",n[t-1])]},'_0==="..."':function(e){return"..."===e},'[_0.set("page",_1+1)]':function(e,t){return[e.set("page",t+1)]},"_0<_1-1":function(e,t){return e<t-1},"_0%2===1":function(e){return e%2==1},true:function(){return!0},"!_0":function(e){return!e},"_0+(_1?1:0)":function(e,t){return e+(t?1:0)}},p:{"csp-dummy":[{t:7,e:"div",m:[{n:["click"],t:70,f:{r:["@this",".index","@event"],s:"[_0._setSort(_1,_2)]"}},{n:["click"],t:70,f:{r:["@this",".","@event"],s:"[_0._select(_1,_2),false]"}},{n:["click"],t:70,f:{r:["~/rows","~/visibleRows","."],s:'[["select",_2,_0.indexOf(_2),_1.indexOf(_2)]]'}},{n:["click"],t:70,f:{r:["@this","@index"],s:"[_0._expand(_1)]"}},{n:["click"],t:70,f:{r:["@event"],s:"[_0.stopPropagation()]"}}]}," ",{t:4,f:["..."],n:50,x:{r:["~/selections","."],s:"_0.indexOf(_1)"}}," ",{t:4,f:["..."],n:50,x:{r:[".","~/expanded"],s:"_0===_1"}}," ",{t:4,f:["..."],n:50,x:{r:["~/virtual.offset"],s:"_0>0"}}," ",{t:4,f:["..."],n:50,x:{r:["~/fixedHeader","~/virtual.offset"],s:"!_0&&_1>0"}}," ",{t:4,f:["..."],n:50,x:{r:["~/columns.0.type"],s:'_0==="boolean"'}}],empty:[{t:7,e:"div",f:[{t:7,e:"div",f:["No data."]}]}],pagination:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-bottom",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-info",g:1}],f:[{t:4,f:[{t:2,x:{r:["~/page","~/pagination.per"],s:"_0*_1+1"}}," - ",{t:2,x:{r:["~/pagination.total","~/rows.length","~/page","~/pagination.per"],s:"_2+1===_0?_1:(_2+1)*_3"}}," of ",{t:2,r:"~/rows.length"},{t:4,f:[" (",{t:2,r:"~/items.length"}," total)"],n:50,r:"~/isFiltered"}],n:50,x:{r:["pagination","rows.length"],s:"_0&&_1"}}," ",{t:4,f:[""],n:50,x:{r:["_paginate"],s:"_0===1"}}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-select-all-all",g:1}],f:[{t:4,f:[{t:2,r:"selections.length"}," of ",{t:2,r:"rows.length"}," selected",{t:4,f:[" - ",{t:7,e:"a",m:[{n:"href",f:"#",t:13,g:1},{n:["click"],t:70,f:"selectAllAll"}],f:["Select All"]}],n:50,x:{r:["@this","selections.length","rows.length"],s:"_0.allSelected()&&_1<_2"}}],n:50,x:{r:["selections.length"],s:"_0>0"}}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-pages",g:1}],f:[{t:4,f:[{t:7,e:"span",m:[{n:["click"],t:70,f:{r:["@this","~/page"],s:'[_0.set("page",_1-1)]'}}],f:["Previous"]}],n:50,x:{r:["~/page"],s:"_0>0"}}," ",{t:4,f:[{t:4,f:[{t:7,e:"input",m:[{n:["change"],t:70,f:{r:["~/pagination.total","@node.value","@this","@node","~/page"],s:'[(/^\\d+$/.test(_1)&&+_1>0&&+_1<=_0&&_2.set("page",+_1-1))||_2.nodeSet(_3,"value",_4+1)]'}},{n:"value",f:[{t:2,r:"."}],t:13},{t:73,v:"t",f:"false"}]}],n:50,x:{r:[".","~/page"],s:"_0==_1+1"}},{t:4,f:[{t:7,e:"span",m:[{n:["click"],t:70,f:{r:["@this","@index","../"],s:'[_0.set("page",_2[_1-1])]'}}],f:["..."]}," "],n:50,x:{r:["."],s:'_0==="..."'},l:1},{t:4,f:[" ",{t:7,e:"span",m:[{n:["click"],t:70,f:{r:["@this","."],s:'[_0.set("page",_1-1)]'}}],f:[{t:2,r:"."}]}],n:51,l:1}],n:52,r:"~/pagination.array"}," ",{t:4,f:[{t:7,e:"span",m:[{n:["click"],t:70,f:{r:["@this","~/page"],s:'[_0.set("page",_1+1)]'}}],f:["Next"]}],n:50,x:{r:["~/page","~/pagination.total"],s:"_0<_1-1"}}]}]}],grid:[{t:7,e:"div",m:[{t:16,r:"extra-attributes"},{n:"grid",t:71},{t:4,f:[{n:"style-margin-top",f:[{t:2,r:"~/virtual.above"},"px"],t:13},{n:"style-margin-bottom",f:[{t:2,r:"~/virtual.below"},"px"],t:13}],n:50,x:{r:["~/paginate"],s:'_0==="virtual"'}}],f:[{t:4,f:[{t:8,r:"grid-head"}],n:51,r:"~/fixedHeader"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"style",f:"display: none;",g:1},{t:13,n:"class",f:"rtable-row-wrap",g:1}]}],n:50,x:{r:["~/virtual.offset"],s:"_0%2===1"}}," ",{t:4,f:[{t:8,r:"grid-row"}],n:52,z:[{n:"source",x:{r:"~/items"}},{n:"shuffle",x:{x:{r:[],s:"true"}}}],r:"~/visibleRows"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-row row t1",g:1}],f:[{t:16,r:"empty"}]}],n:50,x:{r:["~/rows.length"],s:"!_0"}}]}],table:[{t:7,e:"table",m:[{t:16,r:"extra-attributes"},{t:4,f:[{n:"style-margin-top",f:[{t:2,r:"~/virtual.above"},"px"],t:13},{n:"style-margin-bottom",f:[{t:2,r:"~/virtual.below"},"px"],t:13}],n:50,x:{r:["~/paginate"],s:'_0==="virtual"'}}],f:[{t:8,r:"table-head"}," ",{t:4,f:[{t:8,r:"table-row"}],n:52,z:[{n:"source",x:{r:"~/items"}},{n:"shuffle",x:{x:{r:[],s:"true"}}}],r:"~/visibleRows"}," ",{t:4,f:[{t:7,e:"tr",m:[{t:13,n:"class",f:"rtable-row",g:1}],f:[{t:7,e:"td",m:[{n:"colspan",f:[{t:2,x:{r:["~/columns.length","~/allowSelect"],s:"_0+(_1?1:0)"}}],t:13}],f:[{t:16,r:"empty"}]}]}],n:50,x:{r:["~/rows.length"],s:"!_0"}}]}]}},css:function(e){return[function(e){var t=Object.assign({},e("raui.primary"),e("raui.table.primary")),n=Object.assign({},t,e("raui.primary.active"),e("raui.table.primary.active")),r=Object.assign({selected:{}},e("raui.table"));return"\n .rtable {\n display: flex;\n flex-direction: column;\n overflow: auto;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n flex-grow: 2;\n }\n \n .rtable > div > table {\n width: 100%;\n border-collapse: collapse;\n display: table;\n }\n \n .rtable-auto > div > table,\n .rtable-fixed > div > table {\n table-layout: fixed;\n }\n \n .rtable td {\n padding: 0.5em;\n }\n .rtable-group > div > div,\n .rtable-header > div > div,\n .rtable-row > div > div {\n padding: 0.5em;\n overflow: inherit;\n text-overflow: inherit;\n line-height: 1em;\n }\n .rtable-row > .rtable-no-pad > div {\n padding: 0;\n }\n \n .rtable-auto td,\n .rtable-auto .row > *,\n .rtable-fixed td,\n .rtable-fixed .row > *\n {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n \n .rtable-header > div > div, .rtable-column {\n overflow: hidden;\n }\n \n .rtable-number-column {\n text-align: right;\n }\n .rtable-date-column {\n text-align: right;\n }\n \n .rtable-sortable {\n cursor: pointer;\n user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n }\n \n .grid .row.rtable-row, .grid .rtable-header > .row {\n width: auto;\n min-width: min-content;\n flex-grow: 1;\n }\n \n .rtable-row-wrap {\n color: "+(t.fg||"#222")+";\n border-style: solid;\n border-color: "+(r.divider||t.bc||"#ccc")+";\n border-width: 0 0 1px 0;\n background-color: "+(r.even||t.bga||"#f4f4f4")+";\n }\n .rtable-row-wrap:nth-child(odd) {\n background-color: "+(r.odd||t.bg||"#fff")+";\n }\n .rtable-row-wrap:hover, .rtable-row-wrap.rtable-selected:hover {\n background-color: "+(r.over||n.bg||"rgba(128, 182, 229, 0.2)")+";\n position: relative;\n box-shadow: inset 1px 0 0 #dadce0,inset -1px 0 0 #dadce0, 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n z-index: 1;\n }\n \n .rtable-row-wrap.rtable-selected {\n background-color: "+(r.selected.bg||"rgba(0, 119, 238, 0.12)")+";\n color: "+(r.selected.fg||t.fg||"#222")+";\n }\n .rtable-row-wrap.rtable-selected:nth-child(odd) {\n background-color: "+(r.selected.odd||"rgba(0, 119, 238, 0.1)")+";\n }\n \n .rtable-row-wrap {\n display: flex;\n flex-grow: 1;\n align-items: center;\n }\n \n .rtable-border .rtable-row .rtable-column,\n .rtable-border .rtable-group .rtable-column {\n border-color: "+(r.divider||t.bc||"#ccc")+";\n border-style: solid;\n border-width: 0 0 1px 1px;\n margin: 0 0 -1px -1px;\n }\n \n .rtable-border .rtable-row-wrap {\n border-width: 0 1px 1px 1px;\n }\n \n .rtable-border .rtable-row-expand {\n border-color: "+(r.divider||t.bc||"#ccc")+";\n border-style: solid;\n border-width: 1px 0 0 1px;\n margin-left: -1px;\n width: 100%;\n }\n \n .rtable-group {\n border-bottom: 2px solid "+(r.divider||t.bc||"#ccc")+";\n }\n \n .rtable-header.rtable-row-wrap, .rtable-header.rtable-row-wrap:hover {\n font-weight: bold;\n background-color: "+(r.divider||t.bc||"#ccc")+";\n }\n \n .rtable-header.rtable-row-wrap {\n border-bottom: 2px solid "+(r.divider||t.bc||"#ccc")+";\n text-align: left;\n }\n \n .rtable-header > th {\n padding: 0.5em;\n }\n \n .rtable-top {\n flex-grow: 5;\n flex-shrink: 1;\n overflow-y: auto;\n margin: 0.5em 0;\n position: relative;\n }\n .rtable-fixed-header .rtable-header {\n margin-top: 0.5em;\n position: relative;\n z-index: 1;\n }\n .rtable-fixed-header.rtable-scrolled .rtable-header {\n box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n }\n .rtable-fixed-header .rtable-top {\n margin-top: 0;\n }\n \n .rtable-bottom {\n display: flex;\n flex-wrap: wrap;\n flex-shrink: 0;\n padding: 0 0.5em 0.5em 0.5em;\n justify-content: space-between;\n user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n }\n \n .rtable-bottom > * {\n padding: 0.5em;\n }\n \n .rtable-pages span {\n margin: 0.3em;\n cursor: pointer;\n }\n .rtable-pages span:first-of-type {\n margin-left: 0;\n }\n .rtable-pages input {\n text-align: center;\n width: 2.5em;\n font-size: 1em;\n background-color: transparent;\n border: none;\n padding: 0;\n font-weight: bold;\n text-decoration: underline;\n }\n \n .rtable-select {\n width: 0;\n height: 0;\n outline: none;\n margin-left: -1em;\n }\n .rtable-select:before {\n content: '';\n display: block;\n border: 2px solid "+(t.fg||"#222")+";\n width: 1em;\n height: 1em;\n margin-left: 0.1em;\n margin-top: -0.9em;\n box-sizing: border-box;\n transition: 0.2s ease-in-out;\n transition-property: transform, border-color, height, width;\n }\n .rtable-select:checked:before {\n height: 0.7em;\n width: 1.3em;\n border-color: "+(t.fga||"#07e")+";\n border-top-color: transparent;\n border-right-color: transparent;\n transform: rotate(-50deg);\n }\n .rtable-row-wrap > .rtable-select-header,\n .rtable-row-wrap > .rtable-select-row {\n text-align: center;\n width: 1.5em;\n flex-shrink: 0;\n }\n .rtable-select-header .rtable-select:before {\n margin-top: -1em;\n }\n .rtable-select-header .rtable-select:checked:before {\n border-color: "+(t.fg||"#222")+";\n border-top-color: transparent;\n border-right-color: transparent;\n }\n \n .rtable-column button, .rtable-column .btn {\n padding: 0 0.5em;\n margin: 0.2em 0.5em;\n min-height: 0;\n }\n \n .rtable-column.rtable-editing {\n padding: 0;\n }\n .rtable-column.rtable-editing input {\n width: 100%;\n box-sizing: border-box;\n height: 100%;\n margin: 0;\n border: none;\n background-color: transparent;\n padding: 0.25em 0.5em;\n }\n "+(!1!==e("table.includeGrid")?c(e):"")}.call(this,e)].join(" ")},cssId:"rtable",noCssTransform:!0,attributes:["paginate","items","filter","sort","helpers","fixed","display","allowSelect","allowSelectAll","border","fixedHeader"],components:{table:!1,Table:!1},syncComputedChildren:!0,decorators:{grid:l},events:{},use:[d({name:"clickd",count:1}),d({name:"dblclickd",count:2}),(void 0===S&&(S={}),function(e){e.instance.transitions[S.name||"expand"]=m}),(void 0===O&&(O={}),function(e){e.instance.decorators[O.name||"scrolled"]=function(e,t){void 0===t&&(t={});var n="string"==typeof t?t:t.bind;if("string"!=typeof n)return{teardown:function(){}};var r=this.getContext(e);function i(){var t="";e.scrollHeight>e.clientHeight&&(t+="vscroll"),e.scrollWidth>e.clientWidth&&(t+=(t?" ":"")+"hscroll"),0===e.scrollTop?t+=" top":e.scrollTop===e.scrollHeight-e.clientHeight?t+=" bottom":t+=" vmiddle",0===e.scrollLeft?t+=" left":e.scrollLeft===e.scrollWidth-e.clientWidth?t+=" right":t+="hmiddle",r.set(n,t)}return e.addEventListener("scroll",i,{passive:!0}),requestAnimationFrame(i),{teardown:function(){e.removeEventListener("scroll",i)}}}})],on:{construct:function(){var e,t,n,r=this.component;if(!r)return;var i=r.template.f||[],o=r.template.m?r.template.m.slice():[],a=r.template;r.template={e:a.e,f:a.f,t:a.t,m:o};var s=0;function l(e,t){if(e&&e.f&&1===e.f.length&&2===e.f[0].t){var n="_a"+s++;return o.push({t:13,n:n,f:e.f}),t?{t:[{t:2,r:"~/"+n}]}:{t:2,r:"~/"+n}}return e&&e.f}function c(e){var t=[],n=[];return e.forEach(function(e){if("column"===e.e||"col"===e.e){var r,i={},o=e.m||R;i.index=t.length,t.push(i),i.content=(e.f||[]).filter(function(e){return"edit"!==e.e}),(r=o.find(function(e){return"id"===e.n}))&&w(r.f)&&(i.id=r.f),i.label=o.find(function(e){return"label"===e.n}),i.label&&i.label.f&&(i.label=l(i.label)),i.label||(i.label=""),i.id||(i.id=i.label),Array.isArray(i.label)||(i.label=[i.label]),i.type=o.find(function(e){return"type"===e.n}),i.type&&i.type.f&&(i.type=i.type.f),i.type||(i.type="string"),i.filter=o.find(function(e){return"filter"===e.n}),i.filter&&i.filter.f&&(i.filter=l(i.filter),i.filter.r&&(i.filter=i.filter.r)),i.sort=o.find(function(e){return"sort"===e.n}),i.sort&&i.sort.f&&(i.sort=l(i.sort),i.sort.r&&(i.sort=i.sort.r)),i.hidden=o.find(function(e){return"hidden"===e.n}),i.hidden&&0===i.hidden.f?i.hidden=!0:i.hidden&&y(i.hidden.f)?i.hidden=l(i.hidden):i.hidden=!1,w(i.hidden)&&(i.hidden=!1),i.noPad=o.find(function(e){return"no-pad"===e.n}),i.noPad&&0===i.noPad.f?i.noPad=0:i.noPad&&y(i.noPad.f)?i.noPad=l(i.noPad):delete i.noPad,i.editable=o.find(function(e){return"editable"===e.n}),i.editable&&0===i.editable.f?i.editable=!0:i.editable&&y(i.editable.f)?i.editable=l(i.editable):i.editable=!1,i.attrs=o.filter(function(e){return!~T.indexOf(e.n)}),i.attrs.forEach(function(e,t){M.test(e.n)&&(i.attrs[t]={t:13,n:"class-"+e.n})})}else if("field"===e.e){var a,s={},c=e.m||R;w(a=c.find(function(e){return"path"===e.n}))?s.path=a:a&&a.f&&(s.path=l(a)),(a=c.find(function(e){return"value"===e.n}))&&a.f&&(s.value=l(a)),w(a=c.find(function(e){return"type"===e.n}))?s.type=a:a&&a.f&&(s.type=l(a)),w((a=c.find(function(e){return"id"===e.n})).f)&&(s.id=a.f),w(a=c.find(function(e){return"label"===e.n}))?s.label=a:a&&a.f&&(s.label=l(a)),s.id||(s.id=s.label),s.path||(s.path=s.id),n.push(s)}}),{fields:n,columns:t}}e=i.find(function(e){return"row"===e.e}),t=i.find(function(e){return"group"===e.e}),this._init={sets:c(i),partials:{}};var f=this._init.sets.columns;this._init.sets["meta.expand"]=e&&e.f;var d="[_0._setSort(_1,_2)]",u=[{t:7,e:"tr",m:[{t:13,n:"class-rtable-header"},{t:4,f:[{n:"style-opacity",f:"0",t:13}],n:50,x:{r:["~/virtual.offset"],s:"_0>0"}}],f:f.filter(function(e){return!0!==e.hidden}).map(function(e){var t={t:7,e:"th",f:e.label,m:[{t:13,n:"class-rtable-header"},{t:4,n:53,r:"~/columns."+e.index,f:[{t:70,n:["click"],f:{r:["@this",".index","@event"],s:d}}]}].concat(e.attrs)};e.type&&t.m.push({t:13,n:"class-rtable-"+e.type+"-column"}),(e.filter||e.sort)&&t.m.push({t:13,n:"class-rtable-sortable"});var n=t;return e.hidden&&e.hidden.r&&(n={t:4,n:51,r:e.hidden.r,f:[t]}),n})}];u[0].f.unshift({t:4,n:50,r:"~/allowSelect",f:[{t:7,e:"th",m:[{t:13,n:"class-rtable-select-header"},{t:13,n:"title",f:[{t:2,r:"selections.length"}," items selected"]}],f:[{t:4,n:50,r:"~/allowSelectAll",f:[{t:7,e:"input",m:[{t:73,v:"t",f:"false"},{t:13,n:"type",f:"checkbox"},{t:13,n:"checked",f:[{t:2,x:{r:["@this"],s:"_0.allSelected()"}}]},{t:70,n:["click"],f:"selectAll"},{t:13,n:"class-rtable-select"}]}]}]}]});var p=[{t:7,e:"tr",f:f.filter(function(e){return!0!==e.hidden}).map(function(e){var t={t:7,e:"td",f:[{t:16,r:"~/columns."+f.indexOf(e)+".content",c:{r:"."}}],m:e.attrs.slice()};e.type&&t.m.unshift({t:13,n:"class-rtable-"+e.type+"-column"},{t:13,n:"class-rtable-column"}),t.m.find(function(e){return"title"===e.n})||t.m.unshift({t:13,n:"title",f:e.content.find(function(e){return e.e})?e.label:e.content}),0===e.noPad?t.m.push({t:13,n:"class-rtable-no-pad"}):e.noPad&&t.m.push({t:13,n:"class-rtable-no-pad",f:e.noPad});var n=t;return e.hidden&&e.hidden.r&&(n={t:4,n:51,r:e.hidden.r,f:[t]}),n}),m:[{t:13,n:"class-rtable-row"},{t:13,n:"class-rtable-selected",f:[{t:2,x:{r:["~/selections","."],s:"~_0.indexOf(_1)"}}]},{t:70,n:["click"],f:{r:["~/rows","~/visibleRows","."],s:"[['selected',_2,_0.indexOf(_2),_1.indexOf(_2)]]"}}].concat(e&&e.m||R)}];p[0].f.unshift({t:4,n:50,r:"~/allowSelect",f:[{t:7,e:"th",m:[{t:13,n:"class-rtable-select-row"},{t:70,n:["click"],f:{r:["@this",".","@event"],s:"[_0._select(_1,_2),false]"}}],f:[{t:7,e:"input",m:[{t:73,v:"t",f:"false"},{t:13,n:"type",f:"checkbox"},{t:13,n:"checked",f:[{t:2,x:{r:["~/selections","."],s:"~_0.indexOf(_1)"}}]},{t:13,n:"class-rtable-select"}]}]}]}),this._init.partials["table-row"]=p,this._init.partials["table-head"]=u;var h=[{t:7,e:"div",m:[{t:13,n:"class-rtable-row-wrap"},{t:13,n:"class-row-wrap"},{t:13,n:"class-rtable-header"},{t:4,f:[{n:"style-opacity",f:"0",t:13}],n:50,x:{r:["~/fixedHeader","~/virtual.offset"],s:"!_0&&_1>0"}}],f:[{t:7,e:"div",f:f.filter(function(e){return!0!==e.hidden}).map(function(e){var t={t:7,e:"div",f:[{t:7,e:"div",f:e.label}],m:[{t:4,n:53,r:"~/columns."+e.index,f:[{t:70,n:["click"],f:{r:["@this",".index","@event"],s:d}}]},{t:13,n:"title",f:e.label}].concat(e.attrs.filter(function(e){return"title"!==e.n}))};e.type&&t.m.push({t:13,n:"class-rtable-"+e.type+"-column"}),(e.filter||e.sort)&&t.m.push({t:13,n:"class-rtable-sortable"}),t.m.push({t:13,n:"class-rtable-column"});var n=t;return e.hidden&&e.hidden.r&&(n={t:4,n:51,r:e.hidden.r,f:[t]}),n}),m:[{t:13,n:"class-row"}]}]}];h[0].f.unshift({t:4,n:50,r:"~/allowSelect",f:[{t:7,e:"div",m:[{t:13,n:"class-rtable-select-header"},{t:13,n:"class-rtable-column"},{t:13,n:"title",f:[{t:2,r:"selections.length"}," items selected"]}],f:[{t:7,e:"div",f:[{t:4,n:50,r:"~/allowSelectAll",f:[{t:7,e:"input",m:[{t:73,v:"t",f:"false"},{t:13,n:"type",f:"checkbox"},{t:13,n:"checked",f:[{t:2,x:{r:["@this"],s:"_0.allSelected()"}}]},{t:70,n:["click"],f:"selectAll"},{t:13,n:"class-rtable-select"}]}]}]}]}]});var b,g=[{t:7,e:"div",m:[{t:13,n:"class-rtable-row-wrap"},{t:13,n:"class-row-wrap"},{t:13,n:"class-rtable-live"},{t:13,n:"class-rtable-selected",f:[{t:2,x:{r:["~/selections","."],s:"~_0.indexOf(_1)"}}]}],f:[{t:7,e:"div",f:f.filter(function(e){return!0!==e.hidden}).map(function(e){var t=[{t:7,e:"div",f:[{t:16,r:"~/columns."+f.indexOf(e)+".content",c:{r:"."}}]}],n=e.attrs.slice();if(e.editable&&e.filter){var r={t:70,n:["click","mousedown","pointerdown","MSPointerDown","touchstart"],f:{r:["@event"],s:"[_0.stopPropagation()]"}},i=[{t:4,n:50,x:{r:["~/columns."+f.indexOf(e)+".type"],s:"_0==='boolean'"},f:[{t:7,e:"input",m:[{t:13,n:"type",f:"checkbox"},{t:13,n:"checked",f:[{t:2,r:e.filter}]},r]}]},{t:4,n:51,l:1,f:[{t:7,e:"input",m:[{t:13,n:"value",f:[{t:2,r:e.filter}]},r]}]}];"object"==typeof e.editable?(n.push({t:13,n:"class-rtable-editing",f:e.editable}),t=[Object.assign({},e.editable,{t:4,n:50,f:i}),{t:4,n:51,l:1,f:t}]):(n.push({t:13,n:"class-rtable-editing"}),t=i)}var o={t:7,e:"div",f:t,m:n};e.type&&n.unshift({t:13,n:"class-rtable-"+e.type+"-column"}),n.push({t:13,n:"class-rtable-column"}),o.m.find(function(e){return"title"===e.n})||n.unshift({t:13,n:"title",f:e.content.find(function(e){return e.e})?e.label:e.content}),0===e.noPad?n.push({t:13,n:"class-rtable-no-pad"}):e.noPad&&n.push({t:13,n:"class-rtable-no-pad",f:e.noPad});var a=o;return e.hidden&&e.hidden.r&&(a={t:4,n:51,r:e.hidden.r,f:[o]}),a}),m:[{t:13,n:"class-row"},{t:13,n:"class-rtable-row"},{t:70,n:e&&e.f?["dblclickd"]:["click","dblclick"],f:{r:["~/rows","~/visibleRows","."],s:"[['selected',_2,_0.indexOf(_2),_1.indexOf(_2)]]"}}].concat(e&&e.m||R)}]}];e&&e.f&&(g[0].f[0].f.push({t:4,n:50,x:{r:[".","~/expanded"],s:"_0===_1"},f:[{t:7,e:"div",f:[{t:7,e:"div",f:[{t:16,r:"~/meta.expand",c:{r:"."}}]}],m:[{t:13,n:"class-t1"},{t:13,n:"class-rtable-row-expand"}]}]}),g[0].f[0].m.push({t:70,n:["clickd"],f:{r:["@this","@index"],s:"[_0._expand(_1)]"}}));if(g[0].f.unshift({t:4,n:50,r:"~/allowSelect",f:[{t:7,e:"div",m:[{t:13,n:"class-rtable-select-row"},{t:13,n:"class-rtable-column"},{t:70,n:["clickd"],f:{r:["@this",".","@event"],s:"[_0._select(_1,_2),false]"}}],f:[{t:7,e:"div",f:[{t:7,e:"input",m:[{t:73,v:"t",f:"false"},{t:13,n:"type",f:"checkbox"},{t:13,n:"checked",f:[{t:2,x:{r:["~/selections","."],s:"~_0.indexOf(_1)"}}]},{t:13,n:"class-rtable-select"},{t:70,n:["click"],f:{r:[],s:"[false]"}}]}]}]}]}),t&&t.m&&(b=t.m.find(function(e){return"by"===e.n}))&&(w(b.f)||1===b.length&&2===b[0].t)){var v={t:4,n:50,f:[{t:7,e:"div",m:[{t:13,n:"class-row"},{t:13,n:"class-rtable-group"},{t:13,n:"class-rtable-selected",f:[{t:2,x:{r:["~/selections","."],s:"~_0.indexOf(_1)"}}]},{t:70,n:e&&e.f?["dblclickd"]:["click","dblclick"],f:{r:["~/rows","~/visibleRows","."],s:"[['selected',_2,_0.indexOf(_2),_1.indexOf(_2)]]"}}].concat(t.m.filter(function(e){return"by"!==e.n&&"select"!==e.n}))}],x:{s:"_0&&_1[(_1&&(_2*_3+_4))||_4]",r:["~/showGroups","~/groups","~/page","~/pagination.per","@index"]}};g.unshift(v),this._init.by=b.f;var m,_=c(t.f).columns.filter(function(e){return!0!==e.hidden}).map(function(e){var t={t:7,e:"div",f:[{t:7,e:"div",f:e.content}],m:e.attrs};e.type&&t.m.unshift({t:13,n:"class-rtable-"+e.type+"-column"}),t.m.push({t:13,n:"class-rtable-column"}),t.m.find(function(e){return"title"===e.n})||t.m.unshift({t:13,n:"title",f:e.content});var n=t;return e.hidden&&e.hidden.r&&(n={t:4,n:51,r:e.hidden.r,f:[t]}),n});_.unshift({t:4,n:50,r:"~/allowGroupSelect",f:[{t:7,e:"div",m:[{t:13,n:"class-rtable-select-row"},{t:13,n:"class-rtable-column"},{t:70,n:["clickd"],f:{r:["@this","@index"],s:"[_0._selectGroup(_1),false]"}}],f:[{t:7,e:"div",f:[{t:7,e:"input",m:[{t:73,v:"t",f:"false"},{t:13,n:"type",f:"checkbox"},{t:13,n:"checked",f:[{t:2,x:{r:["@this","@index"],s:"_0._groupSelected(_1)"}}]},{t:13,n:"class-rtable-select"},{t:70,n:["click"],f:{r:[],s:"[false]"}}]}]}]}]}),(m=t.m.find(function(e){return"select"===e.n}))&&(n||(n=[])).push(Object.assign({},m,{n:"allowGroupSelect"})),(m=t.m.find(function(e){return"show"===e.n}))&&(n||(n=[])).push(Object.assign({},m,{n:"showGroups"})),v.f[0].f=_}this._init.partials["grid-row"]=g,this._init.partials["grid-head"]=h,n&&this.component&&(this.component.mappings=n)},config:function(){this.set(this._init.sets),Object.assign(this.partials,this._init.partials)},render:function(){this._autoObserver&&this._autoObserver.fire()},selectAll:function(){var e,t;this.allSelected()?(t=null,e=[],this.set({selections:e,selected:t})):(t=(e=("virtual"===this.get("paginate")?this.get("rows"):this.get("visibleRows")).slice())[0],this.set({selections:e,selected:t})),this.fire("selection",{},{item:t,items:e})},selectAllAll:function(){var e=this.get("rows").slice();return this.set({selections:e,selected:null}),this.fire("selection",{},{item:null,items:e}),!1}},observe:{paginate:{handler:function(e){var n=this;if("auto"===e||"virtual"===e||e instanceof t){this._autoObserver&&this._autoObserver.cancel(),this._scrollListener&&this._scrollListener.cancel();var r,i="auto"===e||"virtual"===e?this.root:e,o=function(){if(n.rendered){var t=n.find(".rtable-top");if(t)if(n.get("items.length")){var r=t.clientHeight+","+t.clientWidth;if(o.last!==r){var i=n.find(".rtable-header");if(i){var a=Array.apply(null,n.findAll(".rtable-live")).map(function(e){return e.offsetHeight});if(a.length<5){var s=Math.floor(t.clientHeight/i.offsetHeight);s<5&&(s=5),n.set("_paginate",s),a=Array.apply(null,n.findAll(".rtable-live")).map(function(e){return e.offsetHeight})}var l=Math.ceil(a.reduce(function(e,t){return e+t},0)/a.length);n._avgSize=l;var c=Math.floor((t.clientHeight-i.offsetHeight)/l);"virtual"===e&&(c*=5)<50&&(c=50),n.set("_paginate",c),o.last=r}}}else n._autoLenObserver||(n._autoLenObserver=n.observeOnce("items",function(){n._autoLenObserver=0,setTimeout(o)}))}},a=function(){r&&clearTimeout(r),r=setTimeout(function(){o(),r=null,n._scrollListener&&n._scrollListener.fn()},300)};if(this._autoObserver=i.on("*.resize",a),this._autoObserver.fire=a,"virtual"===e){var s=!0,l=!1,c=!1,f=function(){if(n.rendered){var e=n.find(".rtable-top");if(!s)return s=!0,setTimeout(f,14);if(!c)return c=!0,requestAnimationFrame(f);c=!1,s=!1;var t=e.scrollTop,r=n.get("virtual")||{},i=r.offset,o=n.get("_paginate"),a=o/5,d=n.get("rows.length");o>d&&(o=d);var u=n._avgSize,p=a*u,h=Math.floor(t/u)-a;h<0&&(h=0);var b=h;if(h+o>d&&(h=d-o),!x(i)||isNaN(i)||t<r.top+p||t>r.bottom-p-p||i>0&&t<u*a){var g=b,v=d-b-o;g<0?(v+=-1*g,g=0):g>d-o&&(g=d-o),v<0&&(v=0);var m,_,w=g*u,y=v*u;h<i+o&&h>i-o&&(m=h>i?n.findAll(".rtable-live")[h-i]:n.findAll(".rtable-live")[i-h]),m&&h>0&&(_=m.offsetTop),n.set({"virtual.above":w,"virtual.below":y,"virtual.offset":h}),"number"==typeof _&&_!==m.offsetTop&&n.set("virtual.above",w+Math.abs(_-m.offsetTop)),n.set({"virtual.top":n.get("virtual.above"),"virtual.bottom":e.scrollHeight-y})}l=!1}},d=this._scrollListener=this.on("scroll",function(e){e.node;s?s=!1:l||(s=!0,l=!0,setTimeout(f,15))});this._scrollListener.fn=f,d.observer=this.observe("rows.length",function(){n.set("virtual.offset",null),f()},{init:!1,strict:!0});var u=d.cancel;d.cancel=function(){u(),d.observer.cancel()}}a()}else this._autoObserver&&this._autoObserver.cancel(),this._scrollListener&&this._scrollListener.cancel();x(e)&&this.set("_paginate",e)},defer:!0}},data:function(){return{display:"grid",page:0,selections:[],allowSelect:!0,allowSelectAll:!0,showGroups:!0,allowGroupSelect:!0,expanded:null,minPerPage:10}},computed:{rows:{get:function(){var e=this,t=this.viewmodel.value.columns,n=this.viewmodel.value.fields,r=t.filter(function(e){return e.filter}).map(function(t){return E(e,t)}).filter(function(e){return e}),i=this.get("items")||[],o=i,a=this.get("filter"),s=this.get("sort");if(y(a)&&!Array.isArray(a)&&(a=[a]),a instanceof RegExp||w(a)){var l=a===""+a.toLowerCase()||a===""+a.toUpperCase();try{var c=w(a)?new RegExp(a,l?"i":""):a;i=i.filter(function(e){for(var t=r.length;t--;){var n=e&&r[t](e);if(n&&w(n)&&c.test(n))return!0}})}catch(e){}}else if(Array.isArray(a)){var f=function e(t,n,r,i){return n.map(function(n){var o={op:n.op||"=",value:n.value||""};if(n.id){var a=r.find(function(e){return e.id===n.id||e.filter===n.id});a&&(o.get=E(t,a),o.get?o.type=a.type||"string":a=0),a||(a=i.find(function(e){return e.id===n.id}))&&(o.get=P(t,a),o.type=a.type||"string")}else o.op="skip";return"and"!==n.op&&"or"!==n.op&&"&&"!==n.op&&"||"!==n.op||(o.op=n.op,Array.isArray(n.value)&&(o.value=e(t,n.value,r,i))),o}).filter(function(e){return"skip"!==e.op})}(this,a,t,n),d={};try{i=i.filter(function(e){return f.reduce(function(t,n){return t&&function e(t,n,r){if(!n||!t.get&&"and"!==t.op&&"or"!==t.op&&"&&"!==t.op&&"||"!==t.op)return!1;var i=t.get&&t.get(n);if("="===t.op||"=="===t.op||"is"===t.op)return"number"===t.type||"date"===t.type?+i==+t.value:i==t.value;if("!="===t.op||"<>"===t.op||"not"===t.op)return"number"===t.type||"date"===t.type?+i!=+t.value:i!=t.value;if(">"===t.op||"gt"===t.op)return i>t.value;if(">="===t.op||"gte"===t.op)return i>=t.value;if("<"===t.op||"lt"===t.op)return i<t.value;if("<="===t.op||"lte"===t.op)return i<=t.value;if("like"===t.op||"notlike"===t.op||"~"===t.op||"!~"===t.op){var o="like"===t.op||"~"===t.op;if(w(t.value)){if(!t.value)return!0;var a=r[t.value]||(r[t.value]=new RegExp(".*"+t.value.replace(/%/g,".*")+".*","gi"));o=a.test(i)}else k(t.value)&&(o=t.value.test(i));return"like"===t.op||"~"===t.op?o:!o}if("contains"===t.op||"@"===t.op){if(Array.isArray(i))return!!~i.indexOf(t.value)}else if("containslike"===t.op||"@~"===t.op||"containsnotlike"===t.op||"@!~"===t.op){if(Array.isArray(i)){var s=k(t.value)?t.value:w(t.value)?r[t.value]||(r[t.value]=new RegExp(".*"+t.value.replace(/%/g,".*")+".*","gi")):null;if(!s)return!1;var l=i.findIndex(function(e){return s.test((e||"").toString())});return"containslike"===t.op||"@~"===t.op?l>=0:l<0}}else{if(("or"===t.op||"||"===t.op)&&Array.isArray(t.value))return t.value.reduce(function(t,i){return t||e(i,n,r)},!1);if(("and"===t.op||"&&"===t.op)&&Array.isArray(t.value))return t.value.reduce(function(t,i){return t&&e(i,n,r)},!0)}return!0}(n,e,d)},!0)})}catch(e){}}return(w(s)||y(s)&&!Array.isArray(s))&&(s=[s]),Array.isArray(s)&&(s=s.map(function(r){return w(r)?{dir:"-"===r[0]?-1:1,get:P(e,{path:"-"===r[0]||"+"===r[0]?r.substr(1):r})}:r?{dir:x(r.dir)?r.dir:"desc"===r.dir?-1:1,get:r.id&&(E(e,t.find(function(e){return e.id===r.id}))||P(e,n.find(function(e){return e.id===r.id})))||r.path&&P(e,{path:r.path,value:r.value})}:void 0}).filter(function(e){return e&&e.get}),i.sort(function(e,t){for(var n,r,i,o=0;o<s.length;o++)if(n=s[o].get(e),r=s[o].get(t),0!==(i=s[o].dir*j(n,r)))return i;return i})),this.set("isFiltered",o.length!==i.length),i}},visibleRows:{get:function(){var e=this,n=this.get("rows"),r=this.get("paginate"),i=r,o=this.get("_paginate"),a=this.get("page")||0,s=this.get("virtual");return i?("number"!=typeof i&&isNaN(+i)&&(i="auto"===i||"virtual"===i||i instanceof t?o||1:30),i<this.get("minPerPage")&&(i=this.get("minPerPage")),"virtual"===r?(a=s&&s.offset||0,n.slice(a,a+i)):(a*i>n.length&&setTimeout(function(){return e.set("page",0)},0),n.slice(i*a,i*a+i))):n}},pagination:{get:function(){var e=this.get("items")||R,t=this.get("rows"),n=this.get("paginate"),r=n,i=this.get("page")||0;if("number"!=typeof r&&isNaN(r)&&(r=this.get("_paginate")),r<this.get("minPerPage")&&(r=this.get("minPerPage")),r){var o=Math.ceil(t.length/r),a={max:Math.ceil(e.length/r),total:o,per:r};if("virtual"===n&&(a.height=this._avg*t.length),a.total>14){var s=a.array=[];i>5?s.push(1,2,3,"..."):s.push(1,2,3,4,5,6,7,8),i>5&&i+6<o?s.push(i-1,i,i+1,i+2,i+3,"...",o-2,o-1,o):i+6<o?s.push("...",o-2,o-1,o):s.push(o-7,o-6,o-5,o-4,o-3,o-2,o-1,o)}else a.array=Array.apply(null,{length:a.total}).map(function(e,t){return t+1});return a}}},groups:{get:function(){for(var e,t,n=this.get("rows"),r={},i=0;i<n.length;i++)(t=n[i][this._init.by])!=e&&(r[i]=1),e=t;return r}}}});var T=["label","type","filter","hidden","sort","no-pad","id","editable"],M=/^[a-z]{1,3}[0-9]+(?:-[0-9]+)?$/,R=[];function N(e){return void 0===e&&(e={}),function(t){var n=t.Ractive,r=t.instance;"includeGrid"in e&&n.styleSet("table.inclideGrid",e.includeGrid),r.components[e.name||"data-table"]=A}}i("RMTable","components",A),e.Table=A,e.plugin=N,e.default=N,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("ractive")):"function"==typeof define&&define.amd?define(["exports","ractive"],t):t(e.RMTable={},e.Ractive)}(this,function(e,t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var n,r="undefined"!=typeof window?window:null;function i(e,t,n){if(r&&r.Ractive&&"object"==typeof r.Ractive[t]){var i=document.currentScript;if(i||(i=(i=document.querySelectorAll("script"))[i.length-1]),i){var o=i.getAttribute("data-alias");o&&(o=(o=o.split("&")).reduce(function(e,t){var n=t.split("="),r=n[0],i=n[1];return e[r]=i,e},{})),Ractive[t][o&&o[e]||e]=n}}}var o={tiny:{units:[2,3,4,5,6,8],max:"0",value:0},xsmall:{units:[2,3,4,5,6,8,10,12],max:"20em",prefix:"xs",value:10},small:{units:[2,3,4,5,6,8,10,12],max:"36em",value:20},medium:{units:[2,3,4,5,6,8,10,12],max:"48em",value:30},large:{units:[2,3,4,5,6,8,10,12,20,24],max:"64em",value:40},xlarge:{units:[2,3,4,5,6,8,10,12,20,24,32],max:"100em",value:50},ginormous:{units:[2,3,4,5,6,8,10,12,20,24,32,64],max:"150em",value:60}},a={"grid grid-root":/\bgrid grid-root\b/g},s=/\s+/g;function l(e,t){var r,i,l=this.getContext(e),c=this,f=t||{};function d(){var t=e.clientWidth;if(!f.type||"class"===f.type){var n,o=-1;for(var c in r)r[c]<=t&&(a[c].lastIndex=-1,r[c]>o&&(n=c,o=r[c])),e.className=e.className.replace(a[c],"").trim();a[n].test(e.className)||(e.className+=" "+n),f.value&&l.set(f.value,i[n].value),f.name&&l.set(f.name,n),e.className=e.className.replace(s," ")}}function u(){var e=(n||(n=document.createElement("div"),document.body.appendChild(n)),n);for(var t in i=c.get("@style.break")||o,r={},i)e.style.width=i[t].max,r[t]=e.clientWidth,a[t]||(a[t]=new RegExp("\\b"+t+"\\b","g"));e.style.width=0,d()}var p=function(){return requestAnimationFrame(d)},h=this.root.on("*.resize",p),b=this.observe("@style.break",u,{init:!1});return window.addEventListener("resize",p),e.className+=" grid grid-root",f.immediate?u():requestAnimationFrame(u),{update:function(e){f=e||{},requestAnimationFrame(d)},teardown:function(){e.className=e.className.replace(a["grid grid-root"],"").trim(),h.cancel(),b.cancel(),window.removeEventListener("resize",p)}}}function c(e,t){var n=e("raui.grid.break")||t||o,r=(e("raui.grid.wrappers")||[".row-wrap > ",".row-wrap > .row-wrap > "]).slice();r.unshift("");var i,a=".row > * { position: relative; width: 100%; transition-duration: 0.2s; transition-timing-function: ease-in-out; transition-property: width, padding, margin; box-sizing: border-box; }\n.grid { display: block; }\n.grid .row { display: flex; flex-wrap: wrap; min-height: fit-content; width: 100%; }\n.grid .row.row-pad > * { padding: "+(e("raui.grid.padding")||"0.5em")+"; }\n.grid .row > .pad { display: flex; flex-direction: column; padding: "+(e("raui.grid.padding")||"0.5em")+"; box-sizing: border-box; }",s=Object.keys(n).map(function(e){return(n[e].key=e)&&n[e]});s.sort(function(e,t){return e.value>t.value?1:e.value<t.value?-1:0});var l={};s.reverse().reduce(function(e,t){return e.push(t.key),l[t.key]=e.slice(),e},[]);var c="",f="";return s.reverse().forEach(function(t){var n=t.prefix||t.key[0];t.units.forEach(function(o){f+="\n"+l[t.key].map(function(e){return r.map(function(t){return"."+e+" > "+t+"."+n+"1, ."+e+" > "+t+".row > ."+n+"1, ."+e+" ."+n+"-n1, ."+e+" .row-"+n+"-n1 > *"}).join(", ")}).join(", ")+" { display: "+(e("raui.grid.display")||"inline-block")+"; width: 100%; flex-grow: 0; flex-shrink: 0; }\n"+l[t.key].map(function(e){return r.map(function(t){return"."+e+" > "+t+"."+n+"0, ."+e+" > "+t+".row > ."+n+"0, ."+e+" ."+n+"-n0, ."+e+" .row-"+n+"-n0 > *"}).join(", ")}).join(", ")+" { display: none; flex-grow: 0; flex-shrink: 0; }",c+="\n"+l[t.key].map(function(e){return"."+e+" .row-"+n+"-n1 > *"}).join(", ")+" { display: "+(e("raui.grid.display")||"inline-block")+"; width: 100%; }\n"+l[t.key].map(function(e){return"."+e+" .row-"+n+"-n0 > *"}).join(", ")+" { display: none; }";for(var a=function(a){i=(i=""+a/o*100).substr(0,i.indexOf(".")+3),c+="\n"+l[t.key].map(function(e){return r.map(function(t){return"."+e+" > "+t+".row-"+n+a+"-"+o+" > *, ."+e+" .row-"+n+"-n"+a+"-"+o+" > *, ."+e+" .row > ."+n+"-n"+a+"-"+o}).join(", ")}).join(", ")+" { display: "+(e("raui.grid.display")||"inline-block")+"; width: "+i+"%; }",f+="\n"+l[t.key].map(function(e){return r.map(function(t){return"."+e+" > "+t+"."+n+a+"-"+o+", ."+e+" > "+t+".row > ."+n+a+"-"+o+", ."+e+" ."+n+"-n"+a+"-"+o+", ."+e+" .row-"+n+"-n"+a+"-"+o+" > *"}).join(", ")}).join(", ")+" { display: "+(e("raui.grid.display")||"inline-block")+"; width: "+i+"%; flex-grow: 0; flex-shrink: 0; }"},s=1;s<o;s++)a(s)}),l[t.key].forEach(function(e){return f+=r.map(function(t){return"."+e+" > "+t+".row > ."+n+"-fill"}).join(", ")+", ."+e+" ."+n+"-nfill { width: auto; flex-grow: 2; flex-shink: 2; }\n"+r.map(function(t){return"."+e+" > "+t+".row > ."+n+"-auto"}).join(", ")+", ."+e+" ."+n+"-nauto { width: auto; flex-shrink: 2; }"})}),a+=c+f}l.style=c,i("grid","decorators",l);var f=250;function d(e){return void 0===e&&(e={}),function(t){var n=t.Ractive;t.instance.events[e.name||(e.count||"")+"clicks"]=function(t,r,i){var o,a=Object.assign({},e,i);return(o=t.__r_clicks__)?o.subscribe(a.count||1,!!a.hold,r):(o=new u(n.getContext(t),a.delay||f,a.bubble||!1),t.__r_clicks__=o,o.subscribe(a.count||1,!!a.hold,r)),{teardown:function(){o.unsubscribe(a.count||1,!!a.hold,r)}}}}}d({name:"click",count:1}),d({name:"dblclick",count:2}),d({name:"trpclick",count:3});var u=function(e,t,n){this.context=e,this.node=e.node,this.delay=t,this.fires={},this.refs=0,this.bubble=n,this.bind()};function p(e){return this.__r_clicks__.mousedown(e)}function h(e){return this.__r_clicks__.touchdown(e)}function b(){this.addEventListener("keydown",v,!1),this.addEventListener("blur",g,!1)}function g(){this.removeEventListener("keydown",v,!1),this.removeEventListener("blur",g,!1)}function v(e){if(32===e.which||10===e.which||13===e.which)return this.__r_clicks__.fire()}function m(e,t){var n=e.processParams(t,{duration:200,easing:"easeInOut"});return new Promise(function(t){requestAnimationFrame(function(){e.setStyle("overflow","hidden");var r="x"===n.axis?"width":"height";if(e.isIntro||n.intro){var i=e.getStyle(r);e.setStyle(r,0),e.setStyle("opacity",0),t(e.animateStyle(r,i,n).then(function(){return e.animateStyle("opacity",1,n)}).then(function(){e.setStyle(r,""),e.setStyle("overflow","")}))}else e.setStyle(r,e.getStyle(r)),e.setStyle("opacity",1),t(e.animateStyle("opacity",0,n).then(function(){return e.animateStyle(r,0,n)}))})})}u.prototype.subscribe=function(e,t,n){(this.fires[e+","+t]||(this.fires[e+","+t]=[])).push(n),this.refs++},u.prototype.unsubscribe=function(e,t,n){var r=this.fires[e+","+t]||[];r.splice(r.indexOf(n),1),this.refs--,this.refs||this.teardown()},u.prototype.bind=function(){window.PointerEvent||window.navigator.pointerEnabled?this.context.listen("pointerdown",p):window.navigator.msPointerEnabled?this.context.listen("MSPointerDown",p):(this.context.listen("mousedown",p),this.context.listen("touchstart",h)),"A"!==this.node.tagName&&"BUTTON"!==this.node.tagName&&"button"!==this.node.type&&"submit"!==this.node.type||this.context.listen("focus",b)},u.prototype.fire=function(e,t,n,r){var i=this;this.tm?(this.tmCount++,clearTimeout(this.tm)):this.tmCount=1;var o=function(){i.tm=null,(i.fires[i.tmCount+","+!!r]||[]).forEach(function(o){o({node:i.node,original:e,x:t,y:n,hold:!!r})})};return r?o():this.tm=setTimeout(o,this.delay),this.bubble},u.prototype.mousedown=function(e){var t=this;if(!this.preventMousedownEvents&&(void 0===e.which||1===e.which)){var n,r=e.clientX,i=e.clientY,o=e.pointerId,a=function(e){e.pointerId==o&&(t.fire(e,r,i),l())},s=function(e){e.pointerId==o&&(Math.abs(e.clientX-r)>=5||Math.abs(e.clientY-i)>=5)&&l()},l=function(){n&&clearTimeout(n),t.node.removeEventListener("MSPointerUp",a,!1),document.removeEventListener("MSPointerMove",s,!1),document.removeEventListener("MSPointerCancel",l,!1),t.node.removeEventListener("pointerup",a,!1),document.removeEventListener("pointermove",s,!1),document.removeEventListener("pointercancel",l,!1),t.node.removeEventListener("click",a,!1),document.removeEventListener("mousemove",s,!1)};return window.PointerEvent||window.navigator.pointerEnabled?(this.node.addEventListener("pointerup",a,!1),document.addEventListener("pointermove",s,!1),document.addEventListener("pointercancel",l,!1)):window.navigator.msPointerEnabled?(this.node.addEventListener("MSPointerUp",a,!1),document.addEventListener("MSPointerMove",s,!1),document.addEventListener("MSPointerCancel",l,!1)):(this.node.addEventListener("click",a,!1),document.addEventListener("mousemove",s,!1)),n=setTimeout(function(){l(),t.fire(e,r,i,!0)},400),this.bubble||e.stopPropagation(),this.bubble}},u.prototype.touchdown=function(e){var t,n=this,r=e.touches[0],i=r.clientX,o=r.clientY,a=r.identifier,s=function(e){e.changedTouches[0].identifier===a?(e.preventDefault(),n.preventMousedownEvents=!0,clearTimeout(n.preventMousedownTimeout),n.preventMousedownTimeout=setTimeout(function(){n.preventMousedownEvents=!1},400),n.fire(e,i,o),c()):c()},l=function(e){1===e.touches.length&&e.touches[0].identifier===a||c();var t=e.touches[0];(Math.abs(t.clientX-i)>=5||Math.abs(t.clientY-o)>=5)&&c()},c=function(){t&&clearTimeout(t),n.node.removeEventListener("touchend",s,!1),window.removeEventListener("touchmove",l,!1),window.removeEventListener("touchcancel",c,!1)};return this.node.addEventListener("touchend",s,!1),window.addEventListener("touchmove",l,!1),window.addEventListener("touchcancel",c,!1),t=setTimeout(function(){c(),n.fire(e,i,o,!0)},400),this.bubble||e.stopPropagation(),this.bubble},u.prototype.teardown=function(){var e=this.context;e.unlisten("pointerdown",p),e.unlisten("MSPointerDown",p),e.unlisten("mousedown",p),e.unlisten("touchstart",h),e.unlisten("focus",b),delete this.node.__r_clicks__},i("expand","transitions",m);var _=/^([-+])?([^\s]+)$/;function w(e){return"string"==typeof e}function x(e){return"number"==typeof e}function y(e){return"object"==typeof e}function k(e){return"object"==typeof e&&"RegExp"===Object.prototype.toString.call(e)}var O,S,A=function(e){function t(t){e.call(this,t)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.allSelected=function(){for(var e=this.get("selections"),t="virtual"===this.get("paginate")?this.get("rows"):this.get("visibleRows"),n=0;n<t.length;n++)if(!~e.indexOf(t[n]))return!1;return t.length&&!0},t.prototype.nodeSet=function(e,t,n){e[t]=n},t.prototype._expand=function(e){var t=this,n=this.get("visibleRows")[e],r=this.get("expanded"),i=this.find(".rtable-row-expand");i?this.transition("expand",i,{outro:!0}).then(function(){r===n?t.set("expanded",null):(t.set("expanded",n),t.transition("expand",t.find(".rtable-row-expand"),{intro:!0}))}):n===r?this.set("expanded",null):(this.set("expanded",n),this.transition("expand",this.find(".rtable-row-expand"),{intro:!0}))},t.prototype._setSort=function(e,t){var n=this.get("columns."+e);if(n&&(n.sort||n.filter)){var r=n.sort||n.filter;w(r)&&"~"===r[0]&&(r=this.get(r));var i=t.ctrlKey,o=this.get("sort");if(Array.isArray(r)||(r=[r]),o?Array.isArray(o)||(o=[o]):o=[],o.length){var a=o.map(function(e){return _.exec(e).slice(1)}),s=r.reduce(function(e,t){return e&&!!a.find(function(e){return e[1]===t})},!0);s&&o.length!==r.length&&!i?this.set("sort",r.map(function(e){return"+"+r})):i?s?this.set("sort",a.map(function(e){return~r.indexOf(e[1])?("+"===e[0]?"-":"+")+e[1]:e[0]+e[1]})):this.set("sort",o.concat(r.map(function(e){return"+"+e}))):s?this.set("sort",a.map(function(e){return("+"===e[0]?"-":"+")+e[1]})):this.set("sort",r.map(function(e){return"+"+e}))}else this.set("sort",r.map(function(e){return"+"+e}))}},t.prototype._select=function(e,t){var n=this.get("selections");n||(n=[],this.set("selections",n));var r=n.indexOf(e);~r?this.splice("selections",r,1):this.push("selections",e),(r>=n.length||1===n.length)&&this.set("selected",n[n.length-1]),this.fire("selection",{},{item:n[n.length-1],items:n}),setTimeout(function(){return t.target.checked=!~r})},t.prototype.select=function(){var e=this.get("selected");e&&this.fire("selected",{},e,this.get("rows").indexOf(e),this.get("visibleRows").indexOf(e))},t.prototype.selectionOffset=function(e){var t=this.get("selected"),n=this.get("visibleRows");if(t&&~n.indexOf(t)){var r=n.indexOf(t);if(e>0?r+e>=n.length:r+e<0){var i=e<1?-1:1;(i<0&&this.get("page")+i>=0||i>0&&this.get("page")+i<this.get("pagination.total"))&&this.add("page",i),n=this.get("visibleRows");var o=e>0?n[0]:n[n.length-1];this.set({selected:o,selections:[o]})}else this.set({selected:n[r+e],selections:[n[r+e]]})}else{var a=e>0?n[0]:n[n.length-1];this.set({selected:a,selections:[a]})}this.fire("selection",{},{item:this.get("selected"),items:this.get("selections")})},t.prototype.selectionDown=function(){this.selectionOffset(1)},t.prototype.selectionUp=function(){this.selectionOffset(-1)},t.prototype._selectGroup=function(e){var t=e;this.get("page")&&(t+=this.get("page")*this.get("pagination.per"));var n,r=this.get("rows"),i=this.get("groups"),o=this.get("selections"),a=r[t++],s=["selections"],l=[];for(~(n=o.indexOf(a))?l.push(n):s.push(a);t<r.length&&!(t in i);)a=r[t++],~(n=o.indexOf(a))?l.push(n):s.push(a);if(1===s.length)for(n=l.length;n--;)this.splice("selections",l[n],1);else this.push.apply(this,s)},t.prototype._groupSelected=function(e){var t=e;this.get("page")&&(t+=this.get("page")*this.get("pagination.per"));var n=this.get("rows"),r=this.get("groups"),i=this.get("selections");if(!~i.indexOf(n[t++]))return!1;for(;t<n.length&&!(t in r);)if(!~i.indexOf(n[t++]))return!1;return!0},t}(t);function E(e,n){if(e&&n){var r=e._getters||(e._getters={}),i=n.filter;w(i)&&0===i.indexOf("~/")&&(i=e.get(i));var o=Array.isArray(i)?i.join("."):!!w(i)&&i;if(o)return r[o]||(w(i)&&(i=t.splitKeypath(i)),r[o]=function(e){return L(e,i)}),r[o]}}function P(e,n){if(e&&n){var r=e._getters||(e._getters={}),i=n.path;w(i)&&0===i.indexOf("~/")&&(i=e.get(i));var o=Array.isArray(i)?i.join("."):!!w(i)&&i;return o?(r[o]||(w(i)&&(i=t.splitKeypath(i)),r[o]=function(e){return L(e,i)}),r[o]):(w(i=n.value)&&0===i.indexOf("~/")&&(i=e.get(i)),"function"==typeof i?i:void 0)}}function L(e,t){if(!t.length||"object"==typeof e){for(var n=e,r=0;r<t.length;r++)if("object"!=typeof(n=n[t[r]]))return r+1<t.length?void 0:n;return n}}function j(e,t){return e<t?-1:e>t?1:e==t?0:!e&&t?-1:e&&!t?1:0}t.extendWith(A,{template:{v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable",g:1},{n:"class-rtable-virtual",t:13,f:[{t:2,x:{r:["~/paginate"],s:'_0==="virtual"'}}]},{n:"class-rtable-auto",t:13,f:[{t:2,x:{r:["~/paginate"],s:'_0==="auto"'}}]},{n:"class-rtable-fixed",t:13,f:[{t:2,r:"~/fixed"}]},{n:"class-rtable-border",t:13,f:[{t:2,r:"~/border"}]},{n:"class-rtable-fixed-header",t:13,f:[{t:2,r:"~/fixedHeader"}]},{n:"class-rtable-scrolled",t:13,f:[{t:2,x:{r:["~/scroll"],s:'!~(_0||"").indexOf("top")'}}]},{n:"class-rtable-with-select",t:13,f:[{t:2,r:"~/allowSelect"}]}],f:[{t:4,f:[{t:7,e:"div",m:[{n:"grid",t:71}],f:[{t:8,r:"grid-head"}]}],n:50,x:{r:["~/fixedHeader","~/display"],s:'_0&&_1==="grid"'}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-top",g:1},{t:4,f:[{n:["scroll"],t:70,f:"scroll"}],n:50,x:{r:["~/paginate"],s:'_0==="virtual"'}},{t:4,f:[{n:"scrolled",t:71,f:{r:[],s:'["~/scroll"]'}}],n:50,x:{r:["~/fixedHeader","~/display"],s:'_0&&_1==="grid"'}}],f:[{t:4,f:[{t:8,r:"grid"}],n:50,x:{r:["~/display"],s:'_0==="grid"'}},{t:4,f:[{t:8,r:"table"}],n:51,l:1}]}," ",{t:4,f:[{t:8,r:"pagination"}],n:50,x:{r:["~/paginate"],s:'_0!=="virtual"'}}]}],e:{'_0==="virtual"':function(e){return"virtual"===e},'_0==="auto"':function(e){return"auto"===e},'!~(_0||"").indexOf("top")':function(e){return!~(e||"").indexOf("top")},'_0&&_1==="grid"':function(e,t){return e&&"grid"===t},'["~/scroll"]':function(){return["~/scroll"]},'_0==="grid"':function(e){return"grid"===e},'_0!=="virtual"':function(e){return"virtual"!==e},"[_0._setSort(_1,_2)]":function(e,t,n){return[e._setSort(t,n)]},"[_0._select(_1,_2),false]":function(e,t,n){return[e._select(t,n),!1]},'[["select",_2,_0.indexOf(_2),_1.indexOf(_2)]]':function(e,t,n){return[["select",n,e.indexOf(n),t.indexOf(n)]]},"[_0._expand(_1)]":function(e,t){return[e._expand(t)]},"[_0.stopPropagation()]":function(e){return[e.stopPropagation()]},"_0.indexOf(_1)":function(e,t){return e.indexOf(t)},"_0===_1":function(e,t){return e===t},"_0>0":function(e){return e>0},"!_0&&_1>0":function(e,t){return!e&&t>0},'_0==="boolean"':function(e){return"boolean"===e},"_0*_1+1":function(e,t){return e*t+1},"_2+1===_0?_1:(_2+1)*_3":function(e,t,n,r){return n+1===e?t:(n+1)*r},"_0&&_1":function(e,t){return e&&t},"_0===1":function(e){return 1===e},"_0.allSelected()&&_1<_2":function(e,t,n){return e.allSelected()&&t<n},'[_0.set("page",_1-1)]':function(e,t){return[e.set("page",t-1)]},'[(/^\\d+$/.test(_1)&&+_1>0&&+_1<=_0&&_2.set("page",+_1-1))||_2.nodeSet(_3,"value",_4+1)]':function(e,t,n,r,i){return[/^\d+$/.test(t)&&+t>0&&+t<=e&&n.set("page",+t-1)||n.nodeSet(r,"value",i+1)]},"_0==_1+1":function(e,t){return e==t+1},'[_0.set("page",_2[_1-1])]':function(e,t,n){return[e.set("page",n[t-1])]},'_0==="..."':function(e){return"..."===e},'[_0.set("page",_1+1)]':function(e,t){return[e.set("page",t+1)]},"_0<_1-1":function(e,t){return e<t-1},"_0%2===1":function(e){return e%2==1},true:function(){return!0},"!_0":function(e){return!e},"_0+(_1?1:0)":function(e,t){return e+(t?1:0)}},p:{"csp-dummy":[{t:7,e:"div",m:[{n:["click"],t:70,f:{r:["@this",".index","@event"],s:"[_0._setSort(_1,_2)]"}},{n:["click"],t:70,f:{r:["@this",".","@event"],s:"[_0._select(_1,_2),false]"}},{n:["click"],t:70,f:{r:["~/rows","~/visibleRows","."],s:'[["select",_2,_0.indexOf(_2),_1.indexOf(_2)]]'}},{n:["click"],t:70,f:{r:["@this","@index"],s:"[_0._expand(_1)]"}},{n:["click"],t:70,f:{r:["@event"],s:"[_0.stopPropagation()]"}}]}," ",{t:4,f:["..."],n:50,x:{r:["~/selections","."],s:"_0.indexOf(_1)"}}," ",{t:4,f:["..."],n:50,x:{r:[".","~/expanded"],s:"_0===_1"}}," ",{t:4,f:["..."],n:50,x:{r:["~/virtual.offset"],s:"_0>0"}}," ",{t:4,f:["..."],n:50,x:{r:["~/fixedHeader","~/virtual.offset"],s:"!_0&&_1>0"}}," ",{t:4,f:["..."],n:50,x:{r:["~/columns.0.type"],s:'_0==="boolean"'}}],empty:[{t:7,e:"div",f:[{t:7,e:"div",f:["No data."]}]}],pagination:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-bottom",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-info",g:1}],f:[{t:4,f:[{t:2,x:{r:["~/page","~/pagination.per"],s:"_0*_1+1"}}," - ",{t:2,x:{r:["~/pagination.total","~/rows.length","~/page","~/pagination.per"],s:"_2+1===_0?_1:(_2+1)*_3"}}," of ",{t:2,r:"~/rows.length"},{t:4,f:[" (",{t:2,r:"~/items.length"}," total)"],n:50,r:"~/isFiltered"}],n:50,x:{r:["pagination","rows.length"],s:"_0&&_1"}}," ",{t:4,f:[""],n:50,x:{r:["_paginate"],s:"_0===1"}}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-select-all-all",g:1}],f:[{t:4,f:[{t:2,r:"selections.length"}," of ",{t:2,r:"rows.length"}," selected",{t:4,f:[" - ",{t:7,e:"a",m:[{n:"href",f:"#",t:13,g:1},{n:["click"],t:70,f:"selectAllAll"}],f:["Select All"]}],n:50,x:{r:["@this","selections.length","rows.length"],s:"_0.allSelected()&&_1<_2"}}],n:50,x:{r:["selections.length"],s:"_0>0"}}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-pages",g:1}],f:[{t:4,f:[{t:7,e:"span",m:[{n:["click"],t:70,f:{r:["@this","~/page"],s:'[_0.set("page",_1-1)]'}}],f:["Previous"]}],n:50,x:{r:["~/page"],s:"_0>0"}}," ",{t:4,f:[{t:4,f:[{t:7,e:"input",m:[{n:["change"],t:70,f:{r:["~/pagination.total","@node.value","@this","@node","~/page"],s:'[(/^\\d+$/.test(_1)&&+_1>0&&+_1<=_0&&_2.set("page",+_1-1))||_2.nodeSet(_3,"value",_4+1)]'}},{n:"value",f:[{t:2,r:"."}],t:13},{t:73,v:"t",f:"false"}]}],n:50,x:{r:[".","~/page"],s:"_0==_1+1"}},{t:4,f:[{t:7,e:"span",m:[{n:["click"],t:70,f:{r:["@this","@index","../"],s:'[_0.set("page",_2[_1-1])]'}}],f:["..."]}," "],n:50,x:{r:["."],s:'_0==="..."'},l:1},{t:4,f:[" ",{t:7,e:"span",m:[{n:["click"],t:70,f:{r:["@this","."],s:'[_0.set("page",_1-1)]'}}],f:[{t:2,r:"."}]}],n:51,l:1}],n:52,r:"~/pagination.array"}," ",{t:4,f:[{t:7,e:"span",m:[{n:["click"],t:70,f:{r:["@this","~/page"],s:'[_0.set("page",_1+1)]'}}],f:["Next"]}],n:50,x:{r:["~/page","~/pagination.total"],s:"_0<_1-1"}}]}]}],grid:[{t:7,e:"div",m:[{t:16,r:"extra-attributes"},{n:"grid",t:71},{t:4,f:[{n:"style-margin-top",f:[{t:2,r:"~/virtual.above"},"px"],t:13},{n:"style-margin-bottom",f:[{t:2,r:"~/virtual.below"},"px"],t:13}],n:50,x:{r:["~/paginate"],s:'_0==="virtual"'}}],f:[{t:4,f:[{t:8,r:"grid-head"}],n:51,r:"~/fixedHeader"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"style",f:"display: none;",g:1},{t:13,n:"class",f:"rtable-row-wrap",g:1}]}],n:50,x:{r:["~/virtual.offset"],s:"_0%2===1"}}," ",{t:4,f:[{t:8,r:"grid-row"}],n:52,z:[{n:"source",x:{r:"~/items"}},{n:"shuffle",x:{x:{r:[],s:"true"}}}],r:"~/visibleRows"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-row row t1",g:1}],f:[{t:16,r:"empty"}]}],n:50,x:{r:["~/rows.length"],s:"!_0"}}]}],table:[{t:7,e:"table",m:[{t:16,r:"extra-attributes"},{t:4,f:[{n:"style-margin-top",f:[{t:2,r:"~/virtual.above"},"px"],t:13},{n:"style-margin-bottom",f:[{t:2,r:"~/virtual.below"},"px"],t:13}],n:50,x:{r:["~/paginate"],s:'_0==="virtual"'}}],f:[{t:8,r:"table-head"}," ",{t:4,f:[{t:8,r:"table-row"}],n:52,z:[{n:"source",x:{r:"~/items"}},{n:"shuffle",x:{x:{r:[],s:"true"}}}],r:"~/visibleRows"}," ",{t:4,f:[{t:7,e:"tr",m:[{t:13,n:"class",f:"rtable-row",g:1}],f:[{t:7,e:"td",m:[{n:"colspan",f:[{t:2,x:{r:["~/columns.length","~/allowSelect"],s:"_0+(_1?1:0)"}}],t:13}],f:[{t:16,r:"empty"}]}]}],n:50,x:{r:["~/rows.length"],s:"!_0"}}]}]}},css:function(e){return[function(e){var t=Object.assign({},e("raui.primary"),e("raui.table.primary")),n=Object.assign({},t,e("raui.primary.active"),e("raui.table.primary.active")),r=Object.assign({selected:{}},e("raui.table"));return"\n .rtable {\n display: flex;\n flex-direction: column;\n overflow: auto;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n flex-grow: 2;\n }\n \n .rtable > div > table {\n width: 100%;\n border-collapse: collapse;\n display: table;\n }\n \n .rtable-auto > div > table,\n .rtable-fixed > div > table {\n table-layout: fixed;\n }\n \n .rtable td {\n padding: 0.5em;\n }\n .rtable-group > div > div,\n .rtable-header > div > div,\n .rtable-row > div > div {\n padding: 0.5em;\n overflow: inherit;\n text-overflow: inherit;\n line-height: 1em;\n }\n .rtable-row > .rtable-no-pad > div {\n padding: 0;\n }\n \n .rtable-auto td,\n .rtable-auto .row > *,\n .rtable-fixed td,\n .rtable-fixed .row > *\n {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n \n .rtable-header > div > div, .rtable-column {\n overflow: hidden;\n }\n \n .rtable-number-column {\n text-align: right;\n }\n .rtable-date-column {\n text-align: right;\n }\n \n .rtable-sortable {\n cursor: pointer;\n user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n }\n \n .grid .row.rtable-row, .grid .rtable-header > .row {\n width: auto;\n min-width: min-content;\n flex-grow: 1;\n }\n \n .rtable-row-wrap {\n color: "+(t.fg||"#222")+";\n border-style: solid;\n border-color: "+(r.divider||t.bc||"#ccc")+";\n border-width: 0 0 1px 0;\n background-color: "+(r.even||t.bga||"#f4f4f4")+";\n }\n .rtable-row-wrap:nth-child(odd) {\n background-color: "+(r.odd||t.bg||"#fff")+";\n }\n .rtable-row-wrap:hover, .rtable-row-wrap.rtable-selected:hover {\n background-color: "+(r.over||n.bg||"rgba(128, 182, 229, 0.2)")+";\n position: relative;\n box-shadow: inset 1px 0 0 #dadce0,inset -1px 0 0 #dadce0, 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n z-index: 1;\n }\n \n .rtable-row-wrap.rtable-selected {\n background-color: "+(r.selected.bg||"rgba(0, 119, 238, 0.12)")+";\n color: "+(r.selected.fg||t.fg||"#222")+";\n }\n .rtable-row-wrap.rtable-selected:nth-child(odd) {\n background-color: "+(r.selected.odd||"rgba(0, 119, 238, 0.1)")+";\n }\n \n .rtable-row-wrap {\n display: flex;\n flex-grow: 1;\n align-items: center;\n }\n \n .rtable-border .rtable-row .rtable-column,\n .rtable-border .rtable-group .rtable-column {\n border-color: "+(r.divider||t.bc||"#ccc")+";\n border-style: solid;\n border-width: 0 0 1px 1px;\n margin: 0 0 -1px -1px;\n }\n \n .rtable-border .rtable-row-wrap {\n border-width: 0 1px 1px 1px;\n }\n \n .rtable-border .rtable-row-expand {\n border-color: "+(r.divider||t.bc||"#ccc")+";\n border-style: solid;\n border-width: 1px 0 0 1px;\n margin-left: -1px;\n width: 100%;\n }\n \n .rtable-group {\n border-bottom: 2px solid "+(r.divider||t.bc||"#ccc")+";\n }\n \n .rtable-header.rtable-row-wrap, .rtable-header.rtable-row-wrap:hover {\n font-weight: bold;\n background-color: "+(r.divider||t.bc||"#ccc")+";\n }\n \n .rtable-header.rtable-row-wrap {\n border-bottom: 2px solid "+(r.divider||t.bc||"#ccc")+";\n text-align: left;\n }\n \n .rtable-header > th {\n padding: 0.5em;\n }\n \n .rtable-top {\n flex-grow: 5;\n flex-shrink: 1;\n overflow-y: auto;\n margin: 0.5em 0;\n position: relative;\n }\n .rtable-fixed-header .rtable-header {\n margin-top: 0.5em;\n position: relative;\n z-index: 1;\n }\n .rtable-fixed-header.rtable-scrolled .rtable-header {\n box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n }\n .rtable-fixed-header .rtable-top {\n margin-top: 0;\n }\n \n .rtable-bottom {\n display: flex;\n flex-wrap: wrap;\n flex-shrink: 0;\n padding: 0 0.5em 0.5em 0.5em;\n justify-content: space-between;\n user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n }\n \n .rtable-bottom > * {\n padding: 0.5em;\n }\n \n .rtable-pages span {\n margin: 0.3em;\n cursor: pointer;\n }\n .rtable-pages span:first-of-type {\n margin-left: 0;\n }\n .rtable-pages input {\n text-align: center;\n width: 2.5em;\n font-size: 1em;\n background-color: transparent;\n border: none;\n padding: 0;\n font-weight: bold;\n text-decoration: underline;\n }\n \n .rtable-select {\n width: 0;\n height: 0;\n outline: none;\n margin-left: -1em;\n }\n .rtable-select:before {\n content: '';\n display: block;\n border: 2px solid "+(t.fg||"#222")+";\n width: 1em;\n height: 1em;\n margin-left: 0.1em;\n margin-top: -0.9em;\n box-sizing: border-box;\n transition: 0.2s ease-in-out;\n transition-property: transform, border-color, height, width;\n }\n .rtable-select:checked:before {\n height: 0.7em;\n width: 1.3em;\n border-color: "+(t.fga||"#07e")+";\n border-top-color: transparent;\n border-right-color: transparent;\n transform: rotate(-50deg);\n }\n .rtable-row-wrap > .rtable-select-header,\n .rtable-row-wrap > .rtable-select-row {\n text-align: center;\n width: 1.5em;\n flex-shrink: 0;\n }\n .rtable-select-header .rtable-select:before {\n margin-top: -1em;\n }\n .rtable-select-header .rtable-select:checked:before {\n border-color: "+(t.fg||"#222")+";\n border-top-color: transparent;\n border-right-color: transparent;\n }\n \n .rtable-column button, .rtable-column .btn {\n padding: 0 0.5em;\n margin: 0.2em 0.5em;\n min-height: 0;\n }\n \n .rtable-column.rtable-editing {\n padding: 0;\n }\n .rtable-column.rtable-editing input {\n width: 100%;\n box-sizing: border-box;\n height: 100%;\n margin: 0;\n border: none;\n background-color: transparent;\n padding: 0.25em 0.5em;\n }\n "+(!1!==e("table.includeGrid")?c(e):"")}.call(this,e)].join(" ")},cssId:"rtable",noCssTransform:!0,attributes:["paginate","items","filter","sort","helpers","fixed","display","allowSelect","allowSelectAll","border","fixedHeader"],components:{table:!1,Table:!1},syncComputedChildren:!0,decorators:{grid:l},events:{},use:[d({name:"clickd",count:1}),d({name:"dblclickd",count:2}),(void 0===S&&(S={}),function(e){e.instance.transitions[S.name||"expand"]=m}),(void 0===O&&(O={}),function(e){e.instance.decorators[O.name||"scrolled"]=function(e,t){void 0===t&&(t={});var n="string"==typeof t?t:t.bind;if("string"!=typeof n)return{teardown:function(){}};var r=this.getContext(e);function i(){var t="";e.scrollHeight>e.clientHeight&&(t+="vscroll"),e.scrollWidth>e.clientWidth&&(t+=(t?" ":"")+"hscroll"),0===e.scrollTop?t+=" top":e.scrollTop===e.scrollHeight-e.clientHeight?t+=" bottom":t+=" vmiddle",0===e.scrollLeft?t+=" left":e.scrollLeft===e.scrollWidth-e.clientWidth?t+=" right":t+="hmiddle",r.set(n,t)}return e.addEventListener("scroll",i,{passive:!0}),requestAnimationFrame(i),{teardown:function(){e.removeEventListener("scroll",i)}}}})],on:{construct:function(){var e,t,n,r=this.component;if(!r)return;var i=r.template.f||[],o=r.template.m?r.template.m.slice():[],a=r.template;r.template={e:a.e,f:a.f,t:a.t,m:o};var s=0;function l(e,t){if(e&&e.f&&1===e.f.length&&2===e.f[0].t){var n="_a"+s++;return o.push({t:13,n:n,f:e.f}),t?{t:[{t:2,r:"~/"+n}]}:{t:2,r:"~/"+n}}return e&&e.f}function c(e){var t=[],n=[];return e.forEach(function(e){if("column"===e.e||"col"===e.e){var r,i={},o=e.m||R;i.index=t.length,t.push(i),i.content=(e.f||[]).filter(function(e){return"edit"!==e.e}),(r=o.find(function(e){return"id"===e.n}))&&w(r.f)&&(i.id=r.f),i.label=o.find(function(e){return"label"===e.n}),i.label&&i.label.f&&(i.label=l(i.label)),i.label||(i.label=""),i.id||(i.id=i.label),Array.isArray(i.label)||(i.label=[i.label]),i.type=o.find(function(e){return"type"===e.n}),i.type&&i.type.f&&(i.type=i.type.f),i.type||(i.type="string"),i.filter=o.find(function(e){return"filter"===e.n}),i.filter&&i.filter.f&&(i.filter=l(i.filter),i.filter.r&&(i.filter=i.filter.r)),i.sort=o.find(function(e){return"sort"===e.n}),i.sort&&i.sort.f&&(i.sort=l(i.sort),i.sort.r&&(i.sort=i.sort.r)),i.hidden=o.find(function(e){return"hidden"===e.n}),i.hidden&&0===i.hidden.f?i.hidden=!0:i.hidden&&y(i.hidden.f)?i.hidden=l(i.hidden):i.hidden=!1,w(i.hidden)&&(i.hidden=!1),i.noPad=o.find(function(e){return"no-pad"===e.n}),i.noPad&&0===i.noPad.f?i.noPad=0:i.noPad&&y(i.noPad.f)?i.noPad=l(i.noPad):delete i.noPad,i.editable=o.find(function(e){return"editable"===e.n}),i.editable&&0===i.editable.f?i.editable=!0:i.editable&&y(i.editable.f)?i.editable=l(i.editable):i.editable=!1,i.attrs=o.filter(function(e){return!~T.indexOf(e.n)}),i.attrs.forEach(function(e,t){M.test(e.n)&&(i.attrs[t]={t:13,n:"class-"+e.n})})}else if("field"===e.e){var a,s={},c=e.m||R;w(a=c.find(function(e){return"path"===e.n}))?s.path=a:a&&a.f&&(s.path=l(a)),(a=c.find(function(e){return"value"===e.n}))&&a.f&&(s.value=l(a)),w(a=c.find(function(e){return"type"===e.n}))?s.type=a:a&&a.f&&(s.type=l(a)),w((a=c.find(function(e){return"id"===e.n})).f)&&(s.id=a.f),w(a=c.find(function(e){return"label"===e.n}))?s.label=a:a&&a.f&&(s.label=l(a)),s.id||(s.id=s.label),s.path||(s.path=s.id),n.push(s)}}),{fields:n,columns:t}}e=i.find(function(e){return"row"===e.e}),t=i.find(function(e){return"group"===e.e}),this._init={sets:c(i),partials:{}};var f=this._init.sets.columns;this._init.sets["meta.expand"]=e&&e.f;var d="[_0._setSort(_1,_2)]",u=[{t:7,e:"tr",m:[{t:13,n:"class-rtable-header"},{t:4,f:[{n:"style-opacity",f:"0",t:13}],n:50,x:{r:["~/virtual.offset"],s:"_0>0"}}],f:f.filter(function(e){return!0!==e.hidden}).map(function(e){var t={t:7,e:"th",f:e.label,m:[{t:13,n:"class-rtable-header"},{t:4,n:53,r:"~/columns."+e.index,f:[{t:70,n:["click"],f:{r:["@this",".index","@event"],s:d}}]}].concat(e.attrs)};e.type&&t.m.push({t:13,n:"class-rtable-"+e.type+"-column"}),(e.filter||e.sort)&&t.m.push({t:13,n:"class-rtable-sortable"});var n=t;return e.hidden&&e.hidden.r&&(n={t:4,n:51,r:e.hidden.r,f:[t]}),n})}];u[0].f.unshift({t:4,n:50,r:"~/allowSelect",f:[{t:7,e:"th",m:[{t:13,n:"class-rtable-select-header"},{t:13,n:"title",f:[{t:2,r:"selections.length"}," items selected"]}],f:[{t:4,n:50,r:"~/allowSelectAll",f:[{t:7,e:"input",m:[{t:73,v:"t",f:"false"},{t:13,n:"type",f:"checkbox"},{t:13,n:"checked",f:[{t:2,x:{r:["@this"],s:"_0.allSelected()"}}]},{t:70,n:["click"],f:"selectAll"},{t:13,n:"class-rtable-select"}]}]}]}]});var p=[{t:7,e:"tr",f:f.filter(function(e){return!0!==e.hidden}).map(function(e){var t={t:7,e:"td",f:[{t:16,r:"~/columns."+f.indexOf(e)+".content",c:{r:"."}}],m:e.attrs.slice()};e.type&&t.m.unshift({t:13,n:"class-rtable-"+e.type+"-column"},{t:13,n:"class-rtable-column"}),t.m.find(function(e){return"title"===e.n})||t.m.unshift({t:13,n:"title",f:e.content.find(function(e){return e.e})?e.label:e.content}),0===e.noPad?t.m.push({t:13,n:"class-rtable-no-pad"}):e.noPad&&t.m.push({t:13,n:"class-rtable-no-pad",f:e.noPad});var n=t;return e.hidden&&e.hidden.r&&(n={t:4,n:51,r:e.hidden.r,f:[t]}),n}),m:[{t:13,n:"class-rtable-row"},{t:13,n:"class-rtable-selected",f:[{t:2,x:{r:["~/selections","."],s:"~_0.indexOf(_1)"}}]},{t:70,n:["click"],f:{r:["~/rows","~/visibleRows","."],s:"[['selected',_2,_0.indexOf(_2),_1.indexOf(_2)]]"}}].concat(e&&e.m||R)}];p[0].f.unshift({t:4,n:50,r:"~/allowSelect",f:[{t:7,e:"th",m:[{t:13,n:"class-rtable-select-row"},{t:70,n:["click"],f:{r:["@this",".","@event"],s:"[_0._select(_1,_2),false]"}}],f:[{t:7,e:"input",m:[{t:73,v:"t",f:"false"},{t:13,n:"type",f:"checkbox"},{t:13,n:"checked",f:[{t:2,x:{r:["~/selections","."],s:"~_0.indexOf(_1)"}}]},{t:13,n:"class-rtable-select"}]}]}]}),this._init.partials["table-row"]=p,this._init.partials["table-head"]=u;var h=[{t:7,e:"div",m:[{t:13,n:"class-rtable-row-wrap"},{t:13,n:"class-row-wrap"},{t:13,n:"class-rtable-header"},{t:4,f:[{n:"style-opacity",f:"0",t:13}],n:50,x:{r:["~/fixedHeader","~/virtual.offset"],s:"!_0&&_1>0"}}],f:[{t:7,e:"div",f:f.filter(function(e){return!0!==e.hidden}).map(function(e){var t={t:7,e:"div",f:[{t:7,e:"div",f:e.label}],m:[{t:4,n:53,r:"~/columns."+e.index,f:[{t:70,n:["click"],f:{r:["@this",".index","@event"],s:d}}]},{t:13,n:"title",f:e.label}].concat(e.attrs.filter(function(e){return"title"!==e.n}))};e.type&&t.m.push({t:13,n:"class-rtable-"+e.type+"-column"}),(e.filter||e.sort)&&t.m.push({t:13,n:"class-rtable-sortable"}),t.m.push({t:13,n:"class-rtable-column"});var n=t;return e.hidden&&e.hidden.r&&(n={t:4,n:51,r:e.hidden.r,f:[t]}),n}),m:[{t:13,n:"class-row"}]}]}];h[0].f.unshift({t:4,n:50,r:"~/allowSelect",f:[{t:7,e:"div",m:[{t:13,n:"class-rtable-select-header"},{t:13,n:"class-rtable-column"},{t:13,n:"title",f:[{t:2,r:"selections.length"}," items selected"]}],f:[{t:7,e:"div",f:[{t:4,n:50,r:"~/allowSelectAll",f:[{t:7,e:"input",m:[{t:73,v:"t",f:"false"},{t:13,n:"type",f:"checkbox"},{t:13,n:"checked",f:[{t:2,x:{r:["@this"],s:"_0.allSelected()"}}]},{t:70,n:["click"],f:"selectAll"},{t:13,n:"class-rtable-select"}]}]}]}]}]});var b,g=[{t:7,e:"div",m:[{t:13,n:"class-rtable-row-wrap"},{t:13,n:"class-row-wrap"},{t:13,n:"class-rtable-live"},{t:13,n:"class-rtable-selected",f:[{t:2,x:{r:["~/selections","."],s:"~_0.indexOf(_1)"}}]}],f:[{t:7,e:"div",f:f.filter(function(e){return!0!==e.hidden}).map(function(e){var t=[{t:7,e:"div",f:[{t:16,r:"~/columns."+f.indexOf(e)+".content",c:{r:"."}}]}],n=e.attrs.slice();if(e.editable&&e.filter){var r={t:70,n:["click","mousedown","pointerdown","MSPointerDown","touchstart"],f:{r:["@event"],s:"[_0.stopPropagation()]"}},i=[{t:4,n:50,x:{r:["~/columns."+f.indexOf(e)+".type"],s:"_0==='boolean'"},f:[{t:7,e:"input",m:[{t:13,n:"type",f:"checkbox"},{t:13,n:"checked",f:[{t:2,r:e.filter}]},r]}]},{t:4,n:51,l:1,f:[{t:7,e:"input",m:[{t:13,n:"value",f:[{t:2,r:e.filter}]},r]}]}];"object"==typeof e.editable?(n.push({t:13,n:"class-rtable-editing",f:e.editable}),t=[Object.assign({},e.editable,{t:4,n:50,f:i}),{t:4,n:51,l:1,f:t}]):(n.push({t:13,n:"class-rtable-editing"}),t=i)}var o={t:7,e:"div",f:t,m:n};e.type&&n.unshift({t:13,n:"class-rtable-"+e.type+"-column"}),n.push({t:13,n:"class-rtable-column"}),o.m.find(function(e){return"title"===e.n})||n.unshift({t:13,n:"title",f:e.content.find(function(e){return e.e})?e.label:e.content}),0===e.noPad?n.push({t:13,n:"class-rtable-no-pad"}):e.noPad&&n.push({t:13,n:"class-rtable-no-pad",f:e.noPad});var a=o;return e.hidden&&e.hidden.r&&(a={t:4,n:51,r:e.hidden.r,f:[o]}),a}),m:[{t:13,n:"class-row"},{t:13,n:"class-rtable-row"},{t:70,n:e&&e.f?["dblclickd"]:["click","dblclick"],f:{r:["~/rows","~/visibleRows","."],s:"[['selected',_2,_0.indexOf(_2),_1.indexOf(_2)]]"}}].concat(e&&e.m||R)}]}];e&&e.f&&(g[0].f[0].f.push({t:4,n:50,x:{r:[".","~/expanded"],s:"_0===_1"},f:[{t:7,e:"div",f:[{t:7,e:"div",f:[{t:16,r:"~/meta.expand",c:{r:"."}}]}],m:[{t:13,n:"class-t1"},{t:13,n:"class-rtable-row-expand"}]}]}),g[0].f[0].m.push({t:70,n:["clickd"],f:{r:["@this","@index"],s:"[_0._expand(_1)]"}}));if(g[0].f.unshift({t:4,n:50,r:"~/allowSelect",f:[{t:7,e:"div",m:[{t:13,n:"class-rtable-select-row"},{t:13,n:"class-rtable-column"},{t:70,n:["clickd"],f:{r:["@this",".","@event"],s:"[_0._select(_1,_2),false]"}}],f:[{t:7,e:"div",f:[{t:7,e:"input",m:[{t:73,v:"t",f:"false"},{t:13,n:"type",f:"checkbox"},{t:13,n:"checked",f:[{t:2,x:{r:["~/selections","."],s:"~_0.indexOf(_1)"}}]},{t:13,n:"class-rtable-select"},{t:70,n:["click"],f:{r:[],s:"[false]"}}]}]}]}]}),t&&t.m&&(b=t.m.find(function(e){return"by"===e.n}))&&(w(b.f)||1===b.length&&2===b[0].t)){var v={t:4,n:50,f:[{t:7,e:"div",m:[{t:13,n:"class-row"},{t:13,n:"class-rtable-group"},{t:13,n:"class-rtable-selected",f:[{t:2,x:{r:["~/selections","."],s:"~_0.indexOf(_1)"}}]},{t:70,n:e&&e.f?["dblclickd"]:["click","dblclick"],f:{r:["~/rows","~/visibleRows","."],s:"[['selected',_2,_0.indexOf(_2),_1.indexOf(_2)]]"}}].concat(t.m.filter(function(e){return"by"!==e.n&&"select"!==e.n}))}],x:{s:"_0&&_1[(_1&&(_2*_3+_4))||_4]",r:["~/showGroups","~/groups","~/page","~/pagination.per","@index"]}};g.unshift(v),this._init.by=b.f;var m,_=c(t.f).columns.filter(function(e){return!0!==e.hidden}).map(function(e){var t={t:7,e:"div",f:[{t:7,e:"div",f:e.content}],m:e.attrs};e.type&&t.m.unshift({t:13,n:"class-rtable-"+e.type+"-column"}),t.m.push({t:13,n:"class-rtable-column"}),t.m.find(function(e){return"title"===e.n})||t.m.unshift({t:13,n:"title",f:e.content});var n=t;return e.hidden&&e.hidden.r&&(n={t:4,n:51,r:e.hidden.r,f:[t]}),n});_.unshift({t:4,n:50,r:"~/allowGroupSelect",f:[{t:7,e:"div",m:[{t:13,n:"class-rtable-select-row"},{t:13,n:"class-rtable-column"},{t:70,n:["clickd"],f:{r:["@this","@index"],s:"[_0._selectGroup(_1),false]"}}],f:[{t:7,e:"div",f:[{t:7,e:"input",m:[{t:73,v:"t",f:"false"},{t:13,n:"type",f:"checkbox"},{t:13,n:"checked",f:[{t:2,x:{r:["@this","@index"],s:"_0._groupSelected(_1)"}}]},{t:13,n:"class-rtable-select"},{t:70,n:["click"],f:{r:[],s:"[false]"}}]}]}]}]}),(m=t.m.find(function(e){return"select"===e.n}))&&(n||(n=[])).push(Object.assign({},m,{n:"allowGroupSelect"})),(m=t.m.find(function(e){return"show"===e.n}))&&(n||(n=[])).push(Object.assign({},m,{n:"showGroups"})),v.f[0].f=_}this._init.partials["grid-row"]=g,this._init.partials["grid-head"]=h,n&&this.component&&(this.component.mappings=n)},config:function(){this.set(this._init.sets),Object.assign(this.partials,this._init.partials)},render:function(){this._autoObserver&&this._autoObserver.fire()},selectAll:function(){var e,t;this.allSelected()?(t=null,e=[],this.set({selections:e,selected:t})):(t=(e=("virtual"===this.get("paginate")?this.get("rows"):this.get("visibleRows")).slice())[0],this.set({selections:e,selected:t})),this.fire("selection",{},{item:t,items:e})},selectAllAll:function(){var e=this.get("rows").slice();return this.set({selections:e,selected:null}),this.fire("selection",{},{item:null,items:e}),!1}},observe:{paginate:{handler:function(e){var n=this;if("auto"===e||"virtual"===e||e instanceof t){this._autoObserver&&this._autoObserver.cancel(),this._scrollListener&&this._scrollListener.cancel();var r,i="auto"===e||"virtual"===e?this.root:e,o=function(){if(n.rendered){var t=n.find(".rtable-top");if(t)if(n.get("items.length")){var r=t.clientHeight+","+t.clientWidth;if(o.last!==r){var i=n.find(".rtable-header");if(i){var a=Array.apply(null,n.findAll(".rtable-live")).map(function(e){return e.offsetHeight});if(a.length<5){var s=Math.floor(t.clientHeight/i.offsetHeight);s<5&&(s=5),n.set("_paginate",s),a=Array.apply(null,n.findAll(".rtable-live")).map(function(e){return e.offsetHeight})}var l=Math.ceil(a.reduce(function(e,t){return e+t},0)/a.length);n._avgSize=l;var c=Math.floor((t.clientHeight-i.offsetHeight)/l);"virtual"===e&&(c*=5)<50&&(c=50),n.set("_paginate",c),o.last=r}}}else n._autoLenObserver||(n._autoLenObserver=n.observeOnce("items",function(){n._autoLenObserver=0,setTimeout(o)}))}},a=function(){r&&clearTimeout(r),r=setTimeout(function(){o(),r=null,n._scrollListener&&n._scrollListener.fn()},300)};if(this._autoObserver=i.on("*.resize",a),this._autoObserver.fire=a,"virtual"===e){var s=!0,l=!1,c=!1,f=function(){if(n.rendered){var e=n.find(".rtable-top");if(!s)return s=!0,setTimeout(f,14);if(!c)return c=!0,requestAnimationFrame(f);c=!1,s=!1;var t=e.scrollTop,r=n.get("virtual")||{},i=r.offset,o=n.get("_paginate"),a=o/5,d=n.get("rows.length");o>d&&(o=d);var u=n._avgSize,p=a*u,h=Math.floor(t/u)-a;h<0&&(h=0);var b=h;if(h+o>d&&(h=d-o),!x(i)||isNaN(i)||t<r.top+p||t>r.bottom-p-p||i>0&&t<u*a){var g=b,v=d-b-o;g<0?(v+=-1*g,g=0):g>d-o&&(g=d-o),v<0&&(v=0);var m,_,w=g*u,y=v*u;h<i+o&&h>i-o&&(m=h>i?n.findAll(".rtable-live")[h-i]:n.findAll(".rtable-live")[i-h]),m&&h>0&&(_=m.offsetTop),n.set({"virtual.above":w,"virtual.below":y,"virtual.offset":h}),"number"==typeof _&&_!==m.offsetTop&&n.set("virtual.above",w+Math.abs(_-m.offsetTop)),n.set({"virtual.top":n.get("virtual.above"),"virtual.bottom":e.scrollHeight-y})}l=!1}},d=this._scrollListener=this.on("scroll",function(e){e.node;s?s=!1:l||(s=!0,l=!0,setTimeout(f,15))});this._scrollListener.fn=f,d.observer=this.observe("rows.length",function(){n.set("virtual.offset",null),f()},{init:!1,strict:!0});var u=d.cancel;d.cancel=function(){u(),d.observer.cancel()}}a()}else this._autoObserver&&this._autoObserver.cancel(),this._scrollListener&&this._scrollListener.cancel();x(e)&&this.set("_paginate",e)},defer:!0}},data:function(){return{display:"grid",page:0,selections:[],allowSelect:!0,allowSelectAll:!0,showGroups:!0,allowGroupSelect:!0,expanded:null,minPerPage:10}},computed:{rows:{get:function(){var e=this,t=this.viewmodel.value.columns,n=this.viewmodel.value.fields,r=t.filter(function(e){return e.filter}).map(function(t){return E(e,t)}).filter(function(e){return e}),i=this.get("items")||[],o=i,a=this.get("filter"),s=this.get("sort");if(y(a)&&!Array.isArray(a)&&(a=[a]),(a instanceof RegExp||w(a))&&a){var l=a===""+a.toLowerCase()||a===""+a.toUpperCase();try{var c=w(a)?new RegExp(a,l?"i":""):a;i=i.filter(function(e){for(var t=r.length;t--;){var n=e&&r[t](e);if(n&&w(n)&&c.test(n))return!0}})}catch(e){}}else if(Array.isArray(a)){var f=function e(t,n,r,i){return n.map(function(n){var o={op:n.op||"=",value:n.value||""};if(n.id){var a=r.find(function(e){return e.id===n.id||e.filter===n.id});a&&(o.get=E(t,a),o.get?o.type=a.type||"string":a=0),a||(a=i.find(function(e){return e.id===n.id}))&&(o.get=P(t,a),o.type=a.type||"string")}else o.op="skip";return"and"!==n.op&&"or"!==n.op&&"&&"!==n.op&&"||"!==n.op||(o.op=n.op,Array.isArray(n.value)&&(o.value=e(t,n.value,r,i))),o}).filter(function(e){return"skip"!==e.op})}(this,a,t,n),d={};try{i=i.filter(function(e){return f.reduce(function(t,n){return t&&function e(t,n,r){if(!n||!t.get&&"and"!==t.op&&"or"!==t.op&&"&&"!==t.op&&"||"!==t.op)return!1;var i=t.get&&t.get(n);if("="===t.op||"=="===t.op||"is"===t.op)return"number"===t.type||"date"===t.type?+i==+t.value:i==t.value;if("!="===t.op||"<>"===t.op||"not"===t.op)return"number"===t.type||"date"===t.type?+i!=+t.value:i!=t.value;if(">"===t.op||"gt"===t.op)return i>t.value;if(">="===t.op||"gte"===t.op)return i>=t.value;if("<"===t.op||"lt"===t.op)return i<t.value;if("<="===t.op||"lte"===t.op)return i<=t.value;if("like"===t.op||"notlike"===t.op||"~"===t.op||"!~"===t.op){var o="like"===t.op||"~"===t.op;if(w(t.value)){if(!t.value)return!0;var a=r[t.value]||(r[t.value]=new RegExp(".*"+t.value.replace(/%/g,".*")+".*","gi"));o=a.test(i)}else k(t.value)&&(o=t.value.test(i));return"like"===t.op||"~"===t.op?o:!o}if("contains"===t.op||"@"===t.op){if(Array.isArray(i))return!!~i.indexOf(t.value)}else if("containslike"===t.op||"@~"===t.op||"containsnotlike"===t.op||"@!~"===t.op){if(Array.isArray(i)){var s=k(t.value)?t.value:w(t.value)?r[t.value]||(r[t.value]=new RegExp(".*"+t.value.replace(/%/g,".*")+".*","gi")):null;if(!s)return!1;var l=i.findIndex(function(e){return s.test((e||"").toString())});return"containslike"===t.op||"@~"===t.op?l>=0:l<0}}else{if(("or"===t.op||"||"===t.op)&&Array.isArray(t.value))return t.value.reduce(function(t,i){return t||e(i,n,r)},!1);if(("and"===t.op||"&&"===t.op)&&Array.isArray(t.value))return t.value.reduce(function(t,i){return t&&e(i,n,r)},!0)}return!0}(n,e,d)},!0)})}catch(e){}}return(w(s)||y(s)&&!Array.isArray(s))&&(s=[s]),Array.isArray(s)&&(s=s.map(function(r){return w(r)?{dir:"-"===r[0]?-1:1,get:P(e,{path:"-"===r[0]||"+"===r[0]?r.substr(1):r})}:r?{dir:x(r.dir)?r.dir:"desc"===r.dir?-1:1,get:r.id&&(E(e,t.find(function(e){return e.id===r.id}))||P(e,n.find(function(e){return e.id===r.id})))||r.path&&P(e,{path:r.path,value:r.value})}:void 0}).filter(function(e){return e&&e.get}),i.sort(function(e,t){for(var n,r,i,o=0;o<s.length;o++)if(n=s[o].get(e),r=s[o].get(t),0!==(i=s[o].dir*j(n,r)))return i;return i})),this.set("isFiltered",o.length!==i.length),i}},visibleRows:{get:function(){var e=this,n=this.get("rows"),r=this.get("paginate"),i=r,o=this.get("_paginate"),a=this.get("page")||0,s=this.get("virtual");return i?("number"!=typeof i&&isNaN(+i)&&(i="auto"===i||"virtual"===i||i instanceof t?o||1:30),i<this.get("minPerPage")&&(i=this.get("minPerPage")),"virtual"===r?(a=s&&s.offset||0,n.slice(a,a+i)):(a*i>n.length&&setTimeout(function(){return e.set("page",0)},0),n.slice(i*a,i*a+i))):n}},pagination:{get:function(){var e=this.get("items")||R,t=this.get("rows"),n=this.get("paginate"),r=n,i=this.get("page")||0;if("number"!=typeof r&&isNaN(r)&&(r=this.get("_paginate")),r<this.get("minPerPage")&&(r=this.get("minPerPage")),r){var o=Math.ceil(t.length/r),a={max:Math.ceil(e.length/r),total:o,per:r};if("virtual"===n&&(a.height=this._avg*t.length),a.total>14){var s=a.array=[];i>5?s.push(1,2,3,"..."):s.push(1,2,3,4,5,6,7,8),i>5&&i+6<o?s.push(i-1,i,i+1,i+2,i+3,"...",o-2,o-1,o):i+6<o?s.push("...",o-2,o-1,o):s.push(o-7,o-6,o-5,o-4,o-3,o-2,o-1,o)}else a.array=Array.apply(null,{length:a.total}).map(function(e,t){return t+1});return a}}},groups:{get:function(){for(var e,t,n=this.get("rows"),r={},i=0;i<n.length;i++)(t=n[i][this._init.by])!=e&&(r[i]=1),e=t;return r}}}});var T=["label","type","filter","hidden","sort","no-pad","id","editable"],M=/^[a-z]{1,3}[0-9]+(?:-[0-9]+)?$/,R=[];function N(e){return void 0===e&&(e={}),function(t){var n=t.Ractive,r=t.instance;"includeGrid"in e&&n.styleSet("table.inclideGrid",e.includeGrid),r.components[e.name||"data-table"]=A}}i("RMTable","components",A),e.Table=A,e.plugin=N,e.default=N,Object.defineProperty(e,"__esModule",{value:!0})}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1676623
21356
27