New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@evs-chris/raui

Package Overview
Dependencies
Maintainers
1
Versions
175
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@evs-chris/raui - npm Package Compare versions

Comparing version 0.3.2 to 0.3.3

29

es/Menu.js

@@ -75,2 +75,15 @@ import Ractive from 'ractive';

Menu.prototype.popSiblingsIn = function popSiblingsIn (ctx) {
var items = ctx.get('../');
var me = ctx.resolve();
if (items) {
for (var i = 0; i < items.length; i++) {
if (me === ctx.resolve(("../" + i))) { continue; }
if (items[i].open) {
ctx.toggle(("../" + i + ".open"));
}
}
}
};
Menu.prototype._actioned = function _actioned () {

@@ -88,2 +101,14 @@ this.fire('action');

// TODO: handle active fn with context param
Menu.prototype.childActive = function childActive (path) {
var this$1 = this;
var item = this.get(path);
if (item && item.items) {
for (var i = 0; i < item.items.length; i++) {
if (this$1.get((path + ".items." + i + ".active")) === true || (typeof item.items[i].active === 'function' && item.items[i].active()) || (this$1.get((path + ".items." + i + ".activeRef")) && this$1.get(item.items[i].activeRef)) || this$1.childActive((path + ".items." + i))) { return true; }
}
}
};
return Menu;

@@ -94,6 +119,6 @@ }(Ractive));

Ractive.extendWith(Menu, {
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 (_0){return(!_0);},"_0&&(_1||_2===\"section\")":function (_0,_1,_2){return(_0&&(_1||_2==="section"));},"_0?_3.active(_1.getHandle((_2))):_3.active()":function (_0,_1,_2,_3){return(_0?_3.active(_1.getHandle((_2))):_3.active());},"typeof _0===\"function\"":function (_0){return(typeof _0==="function");},"typeof _0===\"boolean\"":function (_0){return(typeof _0==="boolean");},"_0!=null":function (_0){return(_0!=null);},"[_0.action()]":function (_0){return([_0.action()]);},"[_0._actioned()]":function (_0){return([_0._actioned()]);},"[(_0).toggle(\".open\"),false]":function (_0){return([(_0).toggle(".open"),false]);},"_0||(_1&&_2[_1])":function (_0,_1,_2){return(_0||(_1&&_2[_1]));},"[{axis:\"x\"}]":function (){return([{axis:"x"}]);},"_2&&_0&&_1.visibleItems(_2)":function (_0,_1,_2){return(_2&&_0&&_1.visibleItems(_2));},"!_0||_0===\"item\"":function (_0){return(!_0||_0==="item");},"_0===\"section\"":function (_0){return(_0==="section");},"_0===\"container\"":function (_0){return(_0==="container");},"(!_0||_0===\"item\")&&_1":function (_0,_1){return((!_0||_0==="item")&&_1);},"[_0.popAllIn((_1))]":function (_0,_1){return([_0.popAllIn((_1))]);},"[_0]":function (_0){return([_0]);},"typeof _0===\"string\"":function (_0){return(typeof _0==="string");},"_0||\"item\"":function (_0){return(_0||"item");},"_0._itemRendered((_1))":function (_0,_1){return(_0._itemRendered((_1)));},"_1===undefined||(typeof _1===\"boolean\"&&_1)||(typeof _1===\"string\"&&_0[_1])||(typeof _1===\"function\"&&_2.condition())":function (_0,_1,_2){return(_1===undefined||(typeof _1==="boolean"&&_1)||(typeof _1==="string"&&_0[_1])||(typeof _1==="function"&&_2.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}],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-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:["."],s:"[_0.action()]"}},{n:["click"],t:70,f:{r:["@this"],s:"[_0._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:["@context"],s:"[(_0).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:["@context"],s:"[(_0).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:["@context"],s:"[(_0).toggle(\".open\"),false]"}}]}],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","@context"],s:"[_0.popAllIn((_1))]"}}],n:50,r:".open"}],n:50,r:".popout"},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:51,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:".attrsPartial"}],n:50,r:".attrsPartial"}],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"}]}},
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 (_0){return(!_0);},"_0&&(_1||_2===\"section\")":function (_0,_1,_2){return(_0&&(_1||_2==="section"));},"_0?_3.active(_1.getHandle((_2))):_3.active()":function (_0,_1,_2,_3){return(_0?_3.active(_1.getHandle((_2))):_3.active());},"typeof _0===\"function\"":function (_0){return(typeof _0==="function");},"typeof _0===\"boolean\"":function (_0){return(typeof _0==="boolean");},"_0.childActive(_1)":function (_0,_1){return(_0.childActive(_1));},"_0!=null":function (_0){return(_0!=null);},"[_0.action()]":function (_0){return([_0.action()]);},"[_0._actioned()]":function (_0){return([_0._actioned()]);},"[_0.popSiblingsIn((_1)),(_1).toggle(\".open\"),false]":function (_0,_1){return([_0.popSiblingsIn((_1)),(_1).toggle(".open"),false]);},"_0||(_1&&_2[_1])":function (_0,_1,_2){return(_0||(_1&&_2[_1]));},"[{axis:\"x\"}]":function (){return([{axis:"x"}]);},"_2&&_0&&_1.visibleItems(_2)":function (_0,_1,_2){return(_2&&_0&&_1.visibleItems(_2));},"[(_0).toggle(\".open\"),false]":function (_0){return([(_0).toggle(".open"),false]);},"!_0||_0===\"item\"":function (_0){return(!_0||_0==="item");},"_0===\"section\"":function (_0){return(_0==="section");},"_0===\"container\"":function (_0){return(_0==="container");},"(!_0||_0===\"item\")&&_1":function (_0,_1){return((!_0||_0==="item")&&_1);},"[_0.popAllIn((_1))]":function (_0,_1){return([_0.popAllIn((_1))]);},"[_0]":function (_0){return([_0]);},"typeof _0===\"string\"":function (_0){return(typeof _0==="string");},"_0||\"item\"":function (_0){return(_0||"item");},"_0._itemRendered((_1))":function (_0,_1){return(_0._itemRendered((_1)));},"_1===undefined||(typeof _1===\"boolean\"&&_1)||(typeof _1===\"string\"&&_0[_1])||(typeof _1===\"function\"&&_2.condition())":function (_0,_1,_2){return(_1===undefined||(typeof _1==="boolean"&&_1)||(typeof _1==="string"&&_0[_1])||(typeof _1==="function"&&_2.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}],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:["."],s:"[_0.action()]"}},{n:["click"],t:70,f:{r:["@this"],s:"[_0._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:["@this","@context"],s:"[_0.popSiblingsIn((_1)),(_1).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:["@this","@context"],s:"[_0.popSiblingsIn((_1)),(_1).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:["@context"],s:"[(_0).toggle(\".open\"),false]"}}]}],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","@context"],s:"[_0.popAllIn((_1))]"}}],n:50,r:".open"}],n:50,r:".popout"},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:51,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:".attrsPartial"}],n:50,r:".attrsPartial"}],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(data) { return [(function(data) {
var primary = Object.assign({}, data('raui.primary'), data('raui.menu.primary'));
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.fga || '#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-disabled {\n opacity: 0.5;\n cursor: not-allowed;\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-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 padding: 0.2em 0;\n min-height: 2em;\n }\n .rmenu-main.rmenu-active {\n color: " + (primary.fga || '#07e') + ";\n background-color: " + (primary.bg || '#fff') + ";\n }\n .rmenu-wrapper.alt .rmenu-main.rmenu.active {\n color: " + (primary.bg || '#fff') + ";\n background-color: " + (primary.fga || '#07e') + ";\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.bg || '#fff') + ";\n color: " + (primary.fg || '#222') + ";\n box-sizing: border-box;\n border: 1px solid;\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 \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 \n .rmenu-popout-close:after {\n color: " + (primary.bc || '#ccc') + ";\n content: '\\274c Close';\n display: block;\n padding: 0.5em 0.5em 0.1em 0.5em;\n }\n \n .rmenu-title {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n cursor: pointer;\n padding: 0 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.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 \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.fga || '#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-disabled {\n opacity: 0.5;\n cursor: not-allowed;\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-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 padding: 0.2em 0;\n min-height: 2em;\n }\n .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 {\n color: " + (primary.bg || '#fff') + ";\n background-color: " + (primary.fg || '#222') + ";\n }\n .rmenu-wrapper.alt .rmenu-main.rmenu.active {\n color: " + (primary.bg || '#fff') + ";\n background-color: " + (primary.fga || '#07e') + ";\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.bg || '#fff') + ";\n color: " + (primary.fg || '#222') + ";\n box-sizing: border-box;\n border: 1px solid;\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 \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 \n .rmenu-popout-close:after {\n color: " + (primary.bc || '#ccc') + ";\n content: '\\274c Close';\n display: block;\n padding: 0.5em 0.5em 0.1em 0.5em;\n }\n \n .rmenu-title {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n cursor: pointer;\n padding: 0 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.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 \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

@@ -100,0 +125,0 @@ return base;

@@ -9,2 +9,5 @@ import Ractive from 'ractive';

// TODO: filters and sorts bound in and with type-specific ops
// TODO: working virtual table
export var Table = (function (Ractive) {

@@ -192,3 +195,3 @@ function Table(opts) { Ractive.call(this, opts); }

var table = Object.assign({ selected: {} }, data('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 }\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 {\n font-weight: bold;\n }\n \n .rtable-number-column {\n text-align: right;\n }\n .rtable-date-column {\n text-align: right;\n }\n \n .rtable-header {\n border-bottom: 1px solid " + (table.divider || primary.bc || '#ccc') + ";\n text-align: left;\n }\n \n .rtable-header > th {\n padding: 0.3em 0.5em 1em 0.5em;\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 .rtable-row {\n color: " + (primary.fg || '#222') + ";\n border-bottom: 1px solid " + (table.divider || primary.bc || '#ccc') + ";\n background-color: " + (table.even || primary.bga || '#f4f4f4') + ";\n transition: 0.2s ease-in-out;\n transition-property: background-color, color;\n }\n .rtable-row:nth-child(odd) {\n background-color: " + (table.odd || primary.bg || '#fff') + ";\n }\n .rtable-row:last-of-type {\n border-bottom: none;\n }\n .rtable-row:hover {\n background-color: " + (table.over || active.bg || '#eee') + ";\n }\n \n .rtable-row.rtable-selected {\n background-color: " + (table.selected.bg || 'rgba(0, 119, 238, 0.12)') + ";\n color: " + (table.selected.fg || primary.fg || '#222') + ";\n }\n .rtable-row.rtable-selected:nth-child(odd) {\n background-color: " + (table.selected.odd || 'rgba(0, 119, 238, 0.1)') + ";\n }\n \n .rtable-border .rtable-row .rtable-column:nth-child(n+2),\n .rtable-border .rtable-group .rtable-column:nth-child(n+2) {\n border-left: 1px solid " + (table.divider || primary.bc || '#ccc') + ";\n }\n \n .rtable-border .rtable-row-expand {\n border-top: 1px solid " + (table.divider || primary.bc || '#ccc') + ";\n }\n \n .rtable-group {\n border-bottom: 2px solid " + (table.divider || primary.bc || '#ccc') + ";\n }\n \n .rtable-top {\n flex-grow: 5;\n flex-shrink: 1;\n overflow-y: auto;\n margin: 0.5em 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 outline: none;\n margin-left: -1em;\n }\n .rtable-select:before {\n content: '';\n display: block;\n border: 2px solid " + (primary.fg || '#222') + ";\n width: 1em;\n height: 1em;\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: " + (primary.fga || '#07e') + ";\n border-top-color: transparent;\n border-right-color: transparent;\n transform: rotate(-50deg);\n }\n .row > .rtable-select-header,\n .row > .rtable-select-row {\n text-align: center;\n width: 2.5em;\n }\n .rtable-select-header .rtable-select:checked:before {\n border-color: " + (primary.fg || '#222') + ";\n border-top-color: transparent;\n border-right-color: transparent;\n }\n \n .rtable-column button, .rtable-column .btn {\n font-size: 0.8em;\n padding: 0.25em 0.5em;\n }\n " + (data('table.includeGrid') !== false ? gridStyle(data) : '');
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.4em 0.3em 0.2em 0.3em;\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 {\n font-weight: bold;\n }\n \n .rtable-number-column {\n text-align: right;\n }\n .rtable-date-column {\n text-align: right;\n }\n \n .rtable-header {\n border-bottom: 1px solid " + (table.divider || primary.bc || '#ccc') + ";\n text-align: left;\n }\n \n .rtable-header > th {\n padding: 0.3em 0.5em 1em 0.5em;\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 .rtable-row {\n color: " + (primary.fg || '#222') + ";\n border-bottom: 1px solid " + (table.divider || primary.bc || '#ccc') + ";\n background-color: " + (table.even || primary.bga || '#f4f4f4') + ";\n transition: 0.2s ease-in-out;\n transition-property: background-color, color;\n }\n .rtable-row:nth-child(odd) {\n background-color: " + (table.odd || primary.bg || '#fff') + ";\n }\n .rtable-row:last-of-type {\n border-bottom: none;\n }\n .rtable-row:hover {\n background-color: " + (table.over || active.bg || '#eee') + ";\n }\n \n .rtable-row.rtable-selected {\n background-color: " + (table.selected.bg || 'rgba(0, 119, 238, 0.12)') + ";\n color: " + (table.selected.fg || primary.fg || '#222') + ";\n }\n .rtable-row.rtable-selected:nth-child(odd) {\n background-color: " + (table.selected.odd || 'rgba(0, 119, 238, 0.1)') + ";\n }\n \n .rtable-border .rtable-row .rtable-column:nth-child(n+2),\n .rtable-border .rtable-group .rtable-column:nth-child(n+2) {\n border-left: 1px solid " + (table.divider || primary.bc || '#ccc') + ";\n }\n \n .rtable-border .rtable-row-expand {\n border-top: 1px solid " + (table.divider || primary.bc || '#ccc') + ";\n }\n \n .rtable-group {\n border-bottom: 2px solid " + (table.divider || primary.bc || '#ccc') + ";\n }\n \n .rtable-top {\n flex-grow: 5;\n flex-shrink: 1;\n overflow-y: auto;\n margin: 0.5em 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 " + (primary.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: " + (primary.fga || '#07e') + ";\n border-top-color: transparent;\n border-right-color: transparent;\n transform: rotate(-50deg);\n }\n .row > .rtable-select-header,\n .row > .rtable-select-row {\n text-align: center;\n width: 1.5em;\n }\n .rtable-select-header .rtable-select:before {\n margin-top: -1em;\n }\n .rtable-select-header .rtable-select:checked:before {\n border-color: " + (primary.fg || '#222') + ";\n border-top-color: transparent;\n border-right-color: transparent;\n }\n \n .rtable-column button, .rtable-column .btn {\n font-size: 0.75em;\n padding: 0 0.5em;\n margin: 0.2em 0.5em;\n min-height: 0;\n }\n " + (data('table.includeGrid') !== false ? gridStyle(data) : '');
}).call(this, data)].join(' '); },

@@ -322,3 +325,4 @@ cssId: 'rtable',

allowGroupSelect: true,
expanded: null
expanded: null,
minPerPage: 10
}

@@ -408,2 +412,4 @@ },

if (per < this.get('minPerPage')) { per = this.get('minPerPage'); }
if (offset * per > rows.length) { setTimeout(function () { return this$1.set('page', 0); }, 0); }

@@ -424,2 +430,3 @@

}
if (per < this.get('minPerPage')) { per = this.get('minPerPage'); }

@@ -426,0 +433,0 @@ if (!per) { return; }

2

es/Window.d.ts

@@ -1,1 +0,1 @@

export { default, InitOpts, ExtendOpts, Window, WindowOpts, Control, Position, Placement, Host, PluginOpts } from '../src/Window';
export { default, InitOpts, ExtendOpts, Window, WindowOpts, WindowButton, Control, Position, Placement, Host, PluginOpts } from '../src/Window';

@@ -23,3 +23,3 @@ import Ractive from 'ractive';

var window = Object.assign({ host: {}, title: {} }, data('raui.window'));
return ("\n .rwhost {\n position: relative;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n \n .rwhost-sizer {\n position: absolute;\n }\n \n .rwhost-pane {\n display: flex;\n position: relative;\n width: 100%;\n box-sizing: border-box;\n flex-grow: 2;\n overflow: auto;\n background-color: " + (window.host.bg || primary.bg || '#fff') + ";\n z-index: 1;\n }\n \n .rwhost-pane-content {\n flex-grow: 1;\n }\n \n .rwhost-modal {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n z-index: -1;\n opacity: 0;\n transition: opacity 0.2s ease-in-out, z-index 0s linear 0.2s;\n background-color: #000;\n }\n .rwhost-modal-active {\n opacity: 0.5;\n z-index: 1;\n transition: opacity 0.2s ease-in-out, z-index 0s linear;\n }\n \n .rwindow-wrapper {\n display: inline-block;\n box-sizing: border-box;\n position: absolute;\n }\n .rwindow-wrapper.rwindow-resizing {\n transition: none;\n }\n \n .rwindow-wrapper.rwindow-resizable {\n padding: " + (window.handleSize || 7) + "px;\n }\n \n .rwindow-topmost > .rwindow {\n box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12), 0 3px 5px -1px rgba(0, 0, 0, 0.3);\n opacity: 1;\n }\n \n .rwindow-modal {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background-color: rgba(0, 0, 0, 0.5);\n opacity: 0;\n z-index: -1;\n transition: opacity 0.4s ease-in-out, z-index 0s linear 0.4s;\n }\n .rwindow-modal.rwindow-blocked {\n opacity: 1;\n z-index: 10;\n transition: opacity 0.4s ease-in-out, z-index 0s linear;\n }\n \n .rwindow {\n position: relative;\n box-sizing: border-box;\n background-color: " + (window.bg || primary.bg || '#fff') + ";\n color: " + (window.fg || primary.fg || '#222') + ";\n box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n border-radius: 2px;\n overflow: hidden;\n width: 100%;\n height: 100%;\n opacity: 0.8;\n min-width: " + (window.minWidth || '6em') + ";\n min-height: " + (window.minHeight || '6em') + ";\n transition: box-shadow 0.4s ease-in-out, opacity 0.4s ease-in-out;\n }\n .rwindow-max > .rwindow {\n border-radius: 0;\n box-shadow: none;\n }\n \n .rwindow-pane-top,\n .rwindow-max-top {\n background-color: " + (window.title.bg || primary.fga || '#07e') + ";\n color: " + (window.title.fg || primary.bg || '#fff') + ";\n flex-shrink: 0;\n }\n \n .rwindow-max-top {\n flex-shrink: 2;\n }\n \n .rwindow-pane-top {\n display: flex;\n align-items: center;\n }\n \n .rwindow-pane {\n display: flex;\n flex-direction: column;\n table-layout: fixed;\n width: 100%;\n height: 100%;\n }\n .rwindow-autosizing {\n display: block;\n box-sizing: border-box;\n }\n .rwindow-content {\n overflow: auto;\n flex-grow: 2;\n position: relative;\n box-sizing: border-box;\n }\n .rwindow-content.rwindow-pad {\n padding: 1em;\n }\n .rwindow-content.rwindow-flex {\n display: flex;\n flex-direction: column;\n }\n \n .rwindow-buttons {\n display: flex;\n flex-shrink: 0;\n padding: 0.5em;\n border-top: 1px solid " + (window.title.bg || primary.fga || '#07e') + ";\n }\n .rwindow-buttons.no-buttons {\n display: none;\n }\n .rwindow-left-buttons {\n text-align: left;\n flex-grow: 2;\n }\n .rwindow-left-buttons button {\n margin-right: 0.5em;\n }\n .rwindow-center-buttons {\n text-align: center;\n flex-shrink: 2;\n }\n .rwindow-center-buttons button {\n margin: 0 0.25em;\n }\n .rwindow-right-buttons {\n text-align: right;\n flex-grow: 2;\n }\n .rwindow-right-buttons button {\n margin-left: 0.5em;\n }\n \n .rwindow-title {\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 0.5em;\n white-space: nowrap;\n box-sizing: border-box;\n flex-grow: 1;\n }\n \n .rwindow-controls {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n flex-grow: 1;\n }\n .rwindow-controls > div {\n margin: 0 1em 0 0;\n width: 0.7em;\n height: 0.7em;\n cursor: pointer;\n }\n .rwindow-minimize {\n border-bottom: 2px solid;\n }\n .rwindow-maximize {\n border: 2px solid;\n }\n .rwindow-controls > .rwindow-close {\n width: 0.5em;\n height: 1em;\n border-right: 2px solid;\n transform: rotate(45deg);\n transform-origin: center right;\n position: relative;\n margin-right: 1.5em;\n }\n .rwindow-close:before {\n cursor: pointer;\n height: 1.2em;\n width: 1.2em;\n top: 0.3em;\n left: 0.1em;\n content: ' ';\n transform: rotate(-45deg);\n transform-origin: center left;\n position: absolute;\n }\n .rwindow-close:after {\n cursor: pointer;\n height: 100%;\n width: 100%;\n top: 1px;\n left: calc(100% + 1px);\n content: ' ';\n border-left: 2px solid;\n transform: rotate(-90deg);\n transform-origin: center left;\n position: absolute;\n }\n " + (typeof data('raui.window.extra') === 'function' ? data('raui.window.extra').call(this, data) : '') + "\n ");
return ("\n .rwhost {\n position: relative;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n \n .rwhost-sizer {\n position: absolute;\n }\n \n .rwhost-pane {\n display: flex;\n position: relative;\n width: 100%;\n box-sizing: border-box;\n flex-grow: 2;\n overflow: auto;\n background-color: " + (window.host.bg || primary.bg || '#fff') + ";\n z-index: 1;\n }\n \n .rwhost-pane-content {\n flex-grow: 1;\n }\n \n .rwhost-modal {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n z-index: -1;\n opacity: 0;\n transition: opacity 0.2s ease-in-out, z-index 0s linear 0.2s;\n background-color: #000;\n }\n .rwhost-modal-active {\n opacity: 0.5;\n z-index: 1;\n transition: opacity 0.2s ease-in-out, z-index 0s linear;\n }\n \n .rwindow-wrapper {\n display: inline-block;\n box-sizing: border-box;\n position: absolute;\n }\n .rwindow-wrapper.rwindow-resizing {\n transition: none;\n }\n \n .rwindow-wrapper.rwindow-resizable {\n padding: " + (window.handleSize || 7) + "px;\n }\n \n .rwindow-topmost > .rwindow {\n box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12), 0 3px 5px -1px rgba(0, 0, 0, 0.3);\n opacity: 1;\n }\n \n .rwindow-modal {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background-color: rgba(0, 0, 0, 0.5);\n opacity: 0;\n z-index: -1;\n transition: opacity 0.4s ease-in-out, z-index 0s linear 0.4s;\n }\n .rwindow-modal.rwindow-blocked {\n opacity: 1;\n z-index: 10;\n transition: opacity 0.4s ease-in-out, z-index 0s linear;\n }\n \n .rwindow {\n position: relative;\n box-sizing: border-box;\n background-color: " + (window.bg || primary.bg || '#fff') + ";\n color: " + (window.fg || primary.fg || '#222') + ";\n box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n border-radius: 2px;\n overflow: hidden;\n width: 100%;\n height: 100%;\n min-width: " + (window.minWidth || '6em') + ";\n min-height: " + (window.minHeight || '6em') + ";\n transition: box-shadow 0.4s ease-in-out, opacity 0.4s ease-in-out;\n }\n .rwindow-max > .rwindow {\n border-radius: 0;\n box-shadow: none;\n }\n \n .rwindow-pane-top,\n .rwindow-max-top {\n background-color: " + (window.title.bg || primary.fga || '#07e') + ";\n color: " + (window.title.fg || primary.bg || '#fff') + ";\n flex-shrink: 0;\n }\n \n .rwindow-max-top {\n flex-shrink: 2;\n }\n \n .rwindow-pane-top {\n display: flex;\n align-items: center;\n }\n \n .rwindow-pane {\n display: flex;\n flex-direction: column;\n table-layout: fixed;\n width: 100%;\n height: 100%;\n }\n .rwindow-autosizing {\n display: block;\n box-sizing: border-box;\n }\n .rwindow-content {\n overflow: auto;\n flex-grow: 2;\n position: relative;\n box-sizing: border-box;\n }\n .rwindow-content.rwindow-pad {\n padding: 1em;\n }\n .rwindow-content.rwindow-flex {\n display: flex;\n flex-direction: column;\n }\n \n .rwindow-buttons {\n display: flex;\n flex-shrink: 0;\n padding: 0.5em;\n border-top: 1px solid " + (window.title.bg || primary.fga || '#07e') + ";\n }\n .rwindow-buttons.no-buttons {\n display: none;\n }\n .rwindow-left-buttons {\n text-align: left;\n flex-grow: 2;\n }\n .rwindow-left-buttons button {\n margin-right: 0.5em;\n }\n .rwindow-center-buttons {\n text-align: center;\n flex-shrink: 2;\n }\n .rwindow-center-buttons button {\n margin: 0 0.25em;\n }\n .rwindow-right-buttons {\n text-align: right;\n flex-grow: 2;\n }\n .rwindow-right-buttons button {\n margin-left: 0.5em;\n }\n \n .rwindow-title {\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 0.5em;\n white-space: nowrap;\n box-sizing: border-box;\n flex-grow: 1;\n }\n \n .rwindow-controls {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n flex-grow: 1;\n }\n .rwindow-controls > div {\n margin: 0 1em 0 0;\n width: 0.7em;\n height: 0.7em;\n cursor: pointer;\n }\n .rwindow-minimize {\n border-bottom: 2px solid;\n }\n .rwindow-maximize {\n border: 2px solid;\n }\n .rwindow-controls > .rwindow-close {\n width: 0.5em;\n height: 1em;\n border-right: 2px solid;\n transform: rotate(45deg);\n transform-origin: center right;\n position: relative;\n margin-right: 1.5em;\n }\n .rwindow-close:before {\n cursor: pointer;\n height: 1.2em;\n width: 1.2em;\n top: 0.3em;\n left: 0.1em;\n content: ' ';\n transform: rotate(-45deg);\n transform-origin: center left;\n position: absolute;\n }\n .rwindow-close:after {\n cursor: pointer;\n height: 100%;\n width: 100%;\n top: 1px;\n left: calc(100% + 1px);\n content: ' ';\n border-left: 2px solid;\n transform: rotate(-90deg);\n transform-origin: center left;\n position: absolute;\n }\n " + (typeof data('raui.window.extra') === 'function' ? data('raui.window.extra').call(this, data) : '') + "\n ");
}).call(this, data)].join(' '); },

@@ -162,5 +162,6 @@ cssId: 'rwindow',

this$1.detachChild(window).then(function () { return window.teardown(); });
this$1.set(("windows." + (escape(window.id)) + ".index"), -1);
this$1.raise();
this$1.set(("windows." + (escape(window.id))), undefined);
delete this$1.get('windows')[window.id];
this$1.raise();
});

@@ -170,3 +171,3 @@

return promise;
return promise.then(function () { return window; });
};

@@ -242,4 +243,5 @@

if (top && top !== last && this.get('currentMax') && this.rendered) {
var leaving = this.get(("windows." + (escape(last))));
wnd = this.getWindow(top);
wnd.transition('window', wnd.find('div'), { intro: true });
if (!leaving || !leaving.dialog || (leaving.blocking && leaving.blocking !== top)) { wnd.transition('window', wnd.find('div'), { intro: true }); }
}

@@ -266,6 +268,11 @@ };

var blocked = this.get(key);
var max = (this.get('max') || blocked.max) && !blocked.dialog;
var max = local.max || (!local.dialog && (this.get('max') || this.get('userMax')));
var bmax = blocked.max || this.get('userMax') || this.get('max');
var bw = bmax ? this.host.clientWidth : this.sizeInPx(((blocked.width) + "em"));
var bh = bmax ? this.host.clientHeight : this.sizeInPax(((blocked.height) + "em"));
var bl = bmax ? 0 : blocked.left;
var bt = bmax ? 0 : blocked.top;
left = ((max ? maxw : this.sizeInPx(blocked.width + 'em')) / 2) + (max ? 0 : blocked.left) - (this.sizeInPx(local.width + 'em') / 2);
top = ((max ? maxh : this.sizeInPx(blocked.height + 'em')) / 2) + (max ? 0 : blocked.top) - (this.sizeInPx(local.height + 'em') / 2);
left = (max ? maxw : bw / 2) + (max ? 0 : bl) - (this.sizeInPx(((local.width) + "em")) / 2);
top = (max ? maxh : bh / 2) + (max ? 0 : bt) - (this.sizeInPx(((local.height) + "em")) / 2);
}

@@ -429,3 +436,3 @@

Base.extendWith(Host, {
template: {v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwhost",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"host\"]"}}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwhost-sizer",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"sizer\"]"}}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-max-top",g:1},{t:4,f:[{t:16,r:"~/_maxAttrsP"}],n:50,r:"~/_maxAttrsP"}],f:[{t:16,r:"~/_maxP",z:[{n:"window",x:{r:"~/current"}},{n:"windowControls",x:{x:{r:["@this.partials.windowControls"],s:"{t:_0}"}}},{n:"host",x:{r:"@this"}}]}]}],n:50,x:{r:["~/currentMax","~/_maxP"],s:"_0&&_1"}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwhost-pane",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwhost-pane-content",g:1}],f:[{t:16}]}," ",{t:4,f:[{t:11,n:"window",m:[{n:"control",f:[{t:2,rx:{r:"~/windows",m:[{t:30,n:".instance.id"}]}}],t:13},{n:"root",t:13,f:[{t:2,r:"~/"}]}]}],n:52,r:"@this.children.byName.window"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwhost-modal",g:1},{t:4,f:[{n:"class-rwhost-modal-active",t:13},{n:"style-z-index",f:[{t:2,r:"~/blocked"}],t:13}],n:50,r:"~/blocked"}]}]}," ",{t:8,r:"toast"}]}],e:{"[\"host\"]":function (){return(["host"]);},"[\"sizer\"]":function (){return(["sizer"]);},"{t:_0}":function (_0){return({t:_0});},"_0&&_1":function (_0,_1){return(_0&&_1);},"[_0.getWindow(_1).hide()]":function (_0,_1){return([_0.getWindow(_1).hide()]);},"[_0.getWindow(_1).maximize()]":function (_0,_1){return([_0.getWindow(_1).maximize()]);},"!_0&&_1&&_2":function (_0,_1,_2){return(!_0&&_1&&_2);},"[_0.getWindow(_1).close()]":function (_0,_1){return([_0.getWindow(_1).close()]);},"[\"top\"]":function (){return(["top"]);},"[_0.hide()]":function (_0){return([_0.hide()]);},"[_0.maximize()]":function (_0){return([_0.maximize()]);},"!_0&&_1":function (_0,_1){return(!_0&&_1);},"[_0.close()]":function (_0){return([_0.close()]);},"(_0||_1||_2)&&_3&&!_4":function (_0,_1,_2,_3,_4){return((_0||_1||_2)&&_3&&!_4);},"[\"content\"]":function (){return(["content"]);},"!_0":function (_0){return(!_0);},"[_0.action()]":function (_0){return([_0.action()]);},"[\"wrapper\"]":function (){return(["wrapper"]);},"_0||_1":function (_0,_1){return(_0||_1);},"_0||_1||_2":function (_0,_1,_2){return(_0||_1||_2);},"[_0._startResize(_1)]":function (_0,_1){return([_0._startResize(_1)]);},"[_0._sizeHandle(_1)]":function (_0,_1){return([_0._sizeHandle(_1)]);},"[_0._startMove(_1)]":function (_0,_1){return([_0._startMove(_1)]);},"!(_0===false||_1||_2||_3)&&!_4":function (_0,_1,_2,_3,_4){return(!(_0===false||_1||_2||_3)&&!_4);},"[_0.raise()]":function (_0){return([_0.raise()]);},"[\"pane\"]":function (){return(["pane"]);}},p:{title:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-title",g:1}],f:[{t:3,r:"~/control.title"}]}],n:50,r:"~/control.title"}],windowControls:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-controls",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-minimize",g:1},{n:["click"],t:70,f:{r:["host","window.id"],s:"[_0.getWindow(_1).hide()]"}}]}],n:50,r:"window.minimize"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-maximize",g:1},{n:["click"],t:70,f:{r:["host","window.id"],s:"[_0.getWindow(_1).maximize()]"}}]}],n:50,x:{r:["~/window.dialog","window.maximize","host.data.userMax"],s:"!_0&&_1&&_2"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-close",g:1},{n:["click"],t:70,f:{r:["host","window.id"],s:"[_0.getWindow(_1).close()]"}}]}],n:50,r:"window.close"}]}],pane:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-pane-top",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"top\"]"}}],f:[{t:8,r:"title"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-controls",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-minimize",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.hide()]"}}]}],n:50,r:"~/control.minimize"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-maximize",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.maximize()]"}}]}],n:50,x:{r:["~/control.dialog","~/control.maximize"],s:"!_0&&_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-close",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.close()]"}}]}],n:50,r:"~/control.close"}]}]}],n:51,x:{r:["~/control.max","~/root.userMax","~/root.max","~/root.hideTitleMax","~/control.dialog"],s:"(_0||_1||_2)&&_3&&!_4"}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-content",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"content\"]"}},{n:"class-rwindow-pad",t:13,f:[{t:2,r:"~/control.pad"}]},{n:"class-rwindow-flex",t:13,f:[{t:2,r:"~/control.flex"}]},{t:4,f:[{n:"style-overflow",f:"visible",t:13}],n:50,r:"~/control.autosize"}],f:[{t:8,r:"contents"}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-buttons",g:1},{n:"class-no-buttons",t:13,f:[{t:2,x:{r:["~/visibleButtons"],s:"!_0"}}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-left-buttons",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:".partial"}],n:50,r:".partial"},{t:4,f:[{t:7,e:"button",m:[{n:["click"],t:70,f:{r:["."],s:"[_0.action()]"}},{t:4,f:[{n:"class",f:[{t:2,r:".class"}],t:13}],n:50,r:".class"}],f:[{t:2,r:".label"}]}],n:51,l:1}],n:52,r:"~/leftButtons"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-center-buttons",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:".partial"}],n:50,r:".partial"},{t:4,f:[{t:7,e:"button",m:[{n:["click"],t:70,f:{r:["."],s:"[_0.action()]"}},{t:4,f:[{n:"class",f:[{t:2,r:".class"}],t:13}],n:50,r:".class"}],f:[{t:2,r:".label"}]}],n:51,l:1}],n:52,r:"~/centerButtons"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-right-buttons",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:".partial"}],n:50,r:".partial"},{t:4,f:[{t:7,e:"button",m:[{n:["click"],t:70,f:{r:["."],s:"[_0.action()]"}},{t:4,f:[{n:"class",f:[{t:2,r:".class"}],t:13}],n:50,r:".class"}],f:[{t:2,r:".label"}]}],n:51,l:1}],n:52,r:"~/rightButtons"}]}]}],n:50,r:"~/buttons"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-pane-bottom",g:1}],f:[{t:8,r:"status"}]}],window:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-wrapper",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"wrapper\"]"}},{t:4,f:[" ",{t:4,f:[{n:"style-top",f:"0",t:13},{n:"style-left",f:"0",t:13},{n:"style-width",f:"100%",t:13},{n:"style-height",f:"100%",t:13}],n:51,x:{r:["~/control.autosize","~/control.dialog"],s:"_0||_1"}},{n:"class-rwindow-max",t:13,f:[{t:2,x:{r:["~/control.dialog"],s:"!_0"}}]},{n:"window",t:72,v:"t2"}],n:50,x:{r:["~/root.max","~/root.userMax","~/control.max"],s:"_0||_1||_2"}},{t:4,f:[{t:4,f:[{n:"class-rwindow-resizable",t:13},{n:["mousedown","touchstart"],t:70,f:{r:["@this","@event"],s:"[_0._startResize(_1)]"}},{n:["mousemove","mouseout"],t:70,f:{r:["@this","@event"],s:"[_0._sizeHandle(_1)]"}}],n:50,r:"~/control.resizable"}," ",{t:4,f:[{n:"class-rwindow-resizing",t:13}],n:50,r:"~/control.resizing"},{n:"modal",t:72,v:"t0"},{n:"style-top",f:[{t:2,r:"~/control.top"},"px"],t:13},{n:"style-left",f:[{t:2,r:"~/control.left"},"px"],t:13},{t:4,f:[{n:"style-width",f:[{t:2,r:"~/control.width"},"em"],t:13},{n:"style-height",f:[{t:2,r:"~/control.height"},"em"],t:13}],n:51,r:"~/control.autosize"}],n:51,l:1},{n:"style-z-index",f:[{t:2,r:"~/control.index"}],t:13},{n:"class-rwindow-topmost",t:13,f:[{t:2,r:"~/control.topmost"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow",g:1},{t:4,f:[{n:["mousedown","touchstart"],t:70,f:{r:["@this","@event"],s:"[_0._startMove(_1)]"}}],n:50,x:{r:["~/control.movable","~/root.max","~/root.userMax","~/control.max","~/control.dialog"],s:"!(_0===false||_1||_2||_3)&&!_4"}},{t:4,f:[{n:["mousedown","touchstart"],t:70,f:{r:["@this"],s:"[_0.raise()]"}}],n:50,x:{r:["~/control.topmost"],s:"!_0"},l:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-modal",g:1},{n:"class-rwindow-blocked",t:13,f:[{t:2,r:"~/control.blockers.length"}]}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-pane",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"pane\"]"}},{t:4,f:[{n:"class-rwindow-autosizing",t:13}],n:50,r:"~/control.autosize"}],f:[{t:8,r:"pane"}]}]}]}],n:50,r:"~/control.show"}]}},
template: {v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwhost",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"host\"]"}}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwhost-sizer",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"sizer\"]"}}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-max-top",g:1},{t:4,f:[{t:16,r:"~/_maxAttrsP"}],n:50,r:"~/_maxAttrsP"}],f:[{t:16,r:"~/_maxP",z:[{n:"window",x:{r:"~/current"}},{n:"windowControls",x:{x:{r:["@this.partials.windowControls"],s:"{t:_0}"}}},{n:"host",x:{r:"@this"}}]}]}],n:50,x:{r:["~/currentMax","~/_maxP"],s:"_0&&_1"}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwhost-pane",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwhost-pane-content",g:1}],f:[{t:16}]}," ",{t:4,f:[{t:11,n:"window",m:[{n:"control",f:[{t:2,rx:{r:"~/windows",m:[{t:30,n:".instance.id"}]}}],t:13},{n:"root",t:13,f:[{t:2,r:"~/"}]}]}],n:52,r:"@this.children.byName.window"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwhost-modal",g:1},{t:4,f:[{n:"class-rwhost-modal-active",t:13},{n:"style-z-index",f:[{t:2,r:"~/blocked"}],t:13}],n:50,r:"~/blocked"}]}]}," ",{t:8,r:"toast"}]}],e:{"[\"host\"]":function (){return(["host"]);},"[\"sizer\"]":function (){return(["sizer"]);},"{t:_0}":function (_0){return({t:_0});},"_0&&_1":function (_0,_1){return(_0&&_1);},"[_0.getWindow(_1).hide()]":function (_0,_1){return([_0.getWindow(_1).hide()]);},"[_0.getWindow(_1).maximize()]":function (_0,_1){return([_0.getWindow(_1).maximize()]);},"!_0&&_1&&_2":function (_0,_1,_2){return(!_0&&_1&&_2);},"[_0.getWindow(_1).close()]":function (_0,_1){return([_0.getWindow(_1).close()]);},"[\"top\"]":function (){return(["top"]);},"[_0.hide()]":function (_0){return([_0.hide()]);},"!_0&&_1":function (_0,_1){return(!_0&&_1);},"[_0.maximize()]":function (_0){return([_0.maximize()]);},"[_0.close()]":function (_0){return([_0.close()]);},"(_0||_1||_2)&&_3&&!_4":function (_0,_1,_2,_3,_4){return((_0||_1||_2)&&_3&&!_4);},"[\"content\"]":function (){return(["content"]);},"!_0":function (_0){return(!_0);},"[_0.call(_1)]":function (_0,_1){return([_0.call(_1)]);},"[\"wrapper\"]":function (){return(["wrapper"]);},"_0||_1":function (_0,_1){return(_0||_1);},"(_0||_1||_2)&&!_3":function (_0,_1,_2,_3){return((_0||_1||_2)&&!_3);},"[_0._startResize(_1)]":function (_0,_1){return([_0._startResize(_1)]);},"[_0._sizeHandle(_1)]":function (_0,_1){return([_0._sizeHandle(_1)]);},"[_0._startMove(_1)]":function (_0,_1){return([_0._startMove(_1)]);},"!(_0===false||_1||_2||_3)&&!_4":function (_0,_1,_2,_3,_4){return(!(_0===false||_1||_2||_3)&&!_4);},"[_0.raise()]":function (_0){return([_0.raise()]);},"[\"pane\"]":function (){return(["pane"]);}},p:{title:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-title",g:1}],f:[{t:3,r:"~/control.title"}]}],n:50,r:"~/control.title"}],windowControls:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-controls",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-minimize",g:1},{n:["click"],t:70,f:{r:["host","window.id"],s:"[_0.getWindow(_1).hide()]"}}]}],n:50,r:"window.minimize"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-maximize",g:1},{n:["click"],t:70,f:{r:["host","window.id"],s:"[_0.getWindow(_1).maximize()]"}}]}],n:50,x:{r:["~/window.dialog","window.maximize","host.data.userMax"],s:"!_0&&_1&&_2"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-close",g:1},{n:["click"],t:70,f:{r:["host","window.id"],s:"[_0.getWindow(_1).close()]"}}]}],n:50,r:"window.close"}]}],pane:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-pane-top",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"top\"]"}}],f:[{t:8,r:"title"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-controls",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-minimize",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.hide()]"}}]}],n:50,x:{r:["~/control.dialog","~/control.minimize"],s:"!_0&&_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-maximize",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.maximize()]"}}]}],n:50,x:{r:["~/control.dialog","~/control.maximize"],s:"!_0&&_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-close",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.close()]"}}]}],n:50,r:"~/control.close"}]}]}],n:51,x:{r:["~/control.max","~/root.userMax","~/root.max","~/root.hideTitleMax","~/control.dialog"],s:"(_0||_1||_2)&&_3&&!_4"}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-content",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"content\"]"}},{n:"class-rwindow-pad",t:13,f:[{t:2,r:"~/control.pad"}]},{n:"class-rwindow-flex",t:13,f:[{t:2,r:"~/control.flex"}]},{t:4,f:[{n:"style-overflow",f:"visible",t:13}],n:50,r:"~/control.autosize"}],f:[{t:8,r:"contents"}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-buttons",g:1},{n:"class-no-buttons",t:13,f:[{t:2,x:{r:["~/visibleButtons"],s:"!_0"}}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-left-buttons",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:".partial"}],n:50,r:".partial"},{t:4,f:[{t:7,e:"button",m:[{n:"button",t:71},{n:["click"],t:70,f:{r:[".action","@"],s:"[_0.call(_1)]"}},{t:4,f:[{n:"class",f:[{t:2,r:".class"}],t:13}],n:50,r:".class"}],f:[{t:2,r:".label"}]}],n:51,l:1}],n:52,r:"~/leftButtons"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-center-buttons",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:".partial"}],n:50,r:".partial"},{t:4,f:[{t:7,e:"button",m:[{n:"button",t:71},{n:["click"],t:70,f:{r:[".action","@"],s:"[_0.call(_1)]"}},{t:4,f:[{n:"class",f:[{t:2,r:".class"}],t:13}],n:50,r:".class"}],f:[{t:2,r:".label"}]}],n:51,l:1}],n:52,r:"~/centerButtons"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-right-buttons",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:".partial"}],n:50,r:".partial"},{t:4,f:[{t:7,e:"button",m:[{n:"button",t:71},{n:["click"],t:70,f:{r:[".action","@"],s:"[_0.call(_1)]"}},{t:4,f:[{n:"class",f:[{t:2,r:".class"}],t:13}],n:50,r:".class"}],f:[{t:2,r:".label"}]}],n:51,l:1}],n:52,r:"~/rightButtons"}]}]}],n:50,r:"~/buttons"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-pane-bottom",g:1}],f:[{t:8,r:"status"}]}],window:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-wrapper",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"wrapper\"]"}},{t:4,f:[" ",{t:4,f:[{n:"style-top",f:"0",t:13},{n:"style-left",f:"0",t:13},{n:"style-width",f:"100%",t:13},{n:"style-height",f:"100%",t:13}],n:51,x:{r:["~/control.autosize","~/control.dialog"],s:"_0||_1"}},{n:"class-rwindow-max",t:13},{n:"window",t:72,v:"t2"}],n:50,x:{r:["~/root.max","~/root.userMax","~/control.max","~/control.dialog"],s:"(_0||_1||_2)&&!_3"}},{t:4,f:[{t:4,f:[{n:"class-rwindow-resizable",t:13},{n:["mousedown","touchstart"],t:70,f:{r:["@this","@event"],s:"[_0._startResize(_1)]"}},{n:["mousemove","mouseout"],t:70,f:{r:["@this","@event"],s:"[_0._sizeHandle(_1)]"}}],n:50,r:"~/control.resizable"}," ",{t:4,f:[{n:"class-rwindow-resizing",t:13}],n:50,r:"~/control.resizing"},{n:"modal",t:72,v:"t0"},{n:"style-top",f:[{t:2,r:"~/control.top"},"px"],t:13},{n:"style-left",f:[{t:2,r:"~/control.left"},"px"],t:13},{t:4,f:[{n:"style-width",f:[{t:2,r:"~/control.width"},"em"],t:13},{n:"style-height",f:[{t:2,r:"~/control.height"},"em"],t:13}],n:51,r:"~/control.autosize"}],n:51,l:1},{n:"style-z-index",f:[{t:2,r:"~/control.index"}],t:13},{n:"class-rwindow-topmost",t:13,f:[{t:2,r:"~/control.topmost"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow",g:1},{t:4,f:[{n:["mousedown","touchstart"],t:70,f:{r:["@this","@event"],s:"[_0._startMove(_1)]"}}],n:50,x:{r:["~/control.movable","~/root.max","~/root.userMax","~/control.max","~/control.dialog"],s:"!(_0===false||_1||_2||_3)&&!_4"}},{t:4,f:[{n:["mousedown","touchstart"],t:70,f:{r:["@this"],s:"[_0.raise()]"}}],n:50,x:{r:["~/control.topmost"],s:"!_0"},l:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-modal",g:1},{n:"class-rwindow-blocked",t:13,f:[{t:2,r:"~/control.blockers.length"}]}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-pane",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"pane\"]"}},{t:4,f:[{n:"class-rwindow-autosizing",t:13}],n:50,r:"~/control.autosize"}],f:[{t:8,r:"pane"}]}]}]}],n:50,r:"~/control.show"}]}},
use: [toast(), expand()],

@@ -585,3 +592,3 @@ cssId: 'window-host',

var prototypeAccessors$1 = { resizable: { configurable: true },title: { configurable: true },visible: { configurable: true },pad: { configurable: true } };
var prototypeAccessors$1 = { resizable: { configurable: true },title: { configurable: true },visible: { configurable: true },pad: { configurable: true },buttons: { configurable: true } };

@@ -600,2 +607,4 @@ prototypeAccessors$1.resizable.get = function () { return this.get('control.resizable'); };

prototypeAccessors$1.pad.set = function (v) { this.set('pad', v); };
prototypeAccessors$1.buttons.get = function () { return this.get('buttons'); };
prototypeAccessors$1.buttons.set = function (v) { return this.set('buttons', v); };

@@ -890,6 +899,6 @@ Window.prototype.close = function close (force) {

Base.extendWith(Window, {
template: {v:4,t:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-wrapper",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"wrapper\"]"}},{t:4,f:[" ",{t:4,f:[{n:"style-top",f:"0",t:13},{n:"style-left",f:"0",t:13},{n:"style-width",f:"100%",t:13},{n:"style-height",f:"100%",t:13}],n:51,x:{r:["~/control.autosize","~/control.dialog"],s:"_0||_1"}},{n:"class-rwindow-max",t:13,f:[{t:2,x:{r:["~/control.dialog"],s:"!_0"}}]},{n:"window",t:72,v:"t2"}],n:50,x:{r:["~/root.max","~/root.userMax","~/control.max"],s:"_0||_1||_2"}},{t:4,f:[{t:4,f:[{n:"class-rwindow-resizable",t:13},{n:["mousedown","touchstart"],t:70,f:{r:["@this","@event"],s:"[_0._startResize(_1)]"}},{n:["mousemove","mouseout"],t:70,f:{r:["@this","@event"],s:"[_0._sizeHandle(_1)]"}}],n:50,r:"~/control.resizable"}," ",{t:4,f:[{n:"class-rwindow-resizing",t:13}],n:50,r:"~/control.resizing"},{n:"modal",t:72,v:"t0"},{n:"style-top",f:[{t:2,r:"~/control.top"},"px"],t:13},{n:"style-left",f:[{t:2,r:"~/control.left"},"px"],t:13},{t:4,f:[{n:"style-width",f:[{t:2,r:"~/control.width"},"em"],t:13},{n:"style-height",f:[{t:2,r:"~/control.height"},"em"],t:13}],n:51,r:"~/control.autosize"}],n:51,l:1},{n:"style-z-index",f:[{t:2,r:"~/control.index"}],t:13},{n:"class-rwindow-topmost",t:13,f:[{t:2,r:"~/control.topmost"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow",g:1},{t:4,f:[{n:["mousedown","touchstart"],t:70,f:{r:["@this","@event"],s:"[_0._startMove(_1)]"}}],n:50,x:{r:["~/control.movable","~/root.max","~/root.userMax","~/control.max","~/control.dialog"],s:"!(_0===false||_1||_2||_3)&&!_4"}},{t:4,f:[{n:["mousedown","touchstart"],t:70,f:{r:["@this"],s:"[_0.raise()]"}}],n:50,x:{r:["~/control.topmost"],s:"!_0"},l:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-modal",g:1},{n:"class-rwindow-blocked",t:13,f:[{t:2,r:"~/control.blockers.length"}]}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-pane",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"pane\"]"}},{t:4,f:[{n:"class-rwindow-autosizing",t:13}],n:50,r:"~/control.autosize"}],f:[{t:8,r:"pane"}]}]}]}],n:50,r:"~/control.show"}]},
template: {v:4,t:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-wrapper",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"wrapper\"]"}},{t:4,f:[" ",{t:4,f:[{n:"style-top",f:"0",t:13},{n:"style-left",f:"0",t:13},{n:"style-width",f:"100%",t:13},{n:"style-height",f:"100%",t:13}],n:51,x:{r:["~/control.autosize","~/control.dialog"],s:"_0||_1"}},{n:"class-rwindow-max",t:13},{n:"window",t:72,v:"t2"}],n:50,x:{r:["~/root.max","~/root.userMax","~/control.max","~/control.dialog"],s:"(_0||_1||_2)&&!_3"}},{t:4,f:[{t:4,f:[{n:"class-rwindow-resizable",t:13},{n:["mousedown","touchstart"],t:70,f:{r:["@this","@event"],s:"[_0._startResize(_1)]"}},{n:["mousemove","mouseout"],t:70,f:{r:["@this","@event"],s:"[_0._sizeHandle(_1)]"}}],n:50,r:"~/control.resizable"}," ",{t:4,f:[{n:"class-rwindow-resizing",t:13}],n:50,r:"~/control.resizing"},{n:"modal",t:72,v:"t0"},{n:"style-top",f:[{t:2,r:"~/control.top"},"px"],t:13},{n:"style-left",f:[{t:2,r:"~/control.left"},"px"],t:13},{t:4,f:[{n:"style-width",f:[{t:2,r:"~/control.width"},"em"],t:13},{n:"style-height",f:[{t:2,r:"~/control.height"},"em"],t:13}],n:51,r:"~/control.autosize"}],n:51,l:1},{n:"style-z-index",f:[{t:2,r:"~/control.index"}],t:13},{n:"class-rwindow-topmost",t:13,f:[{t:2,r:"~/control.topmost"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow",g:1},{t:4,f:[{n:["mousedown","touchstart"],t:70,f:{r:["@this","@event"],s:"[_0._startMove(_1)]"}}],n:50,x:{r:["~/control.movable","~/root.max","~/root.userMax","~/control.max","~/control.dialog"],s:"!(_0===false||_1||_2||_3)&&!_4"}},{t:4,f:[{n:["mousedown","touchstart"],t:70,f:{r:["@this"],s:"[_0.raise()]"}}],n:50,x:{r:["~/control.topmost"],s:"!_0"},l:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-modal",g:1},{n:"class-rwindow-blocked",t:13,f:[{t:2,r:"~/control.blockers.length"}]}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-pane",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"pane\"]"}},{t:4,f:[{n:"class-rwindow-autosizing",t:13}],n:50,r:"~/control.autosize"}],f:[{t:8,r:"pane"}]}]}]}],n:50,r:"~/control.show"}]},
cssId: 'window',
partials: {
pane: {v:4,t:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-pane-top",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"top\"]"}}],f:[{t:8,r:"title"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-controls",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-minimize",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.hide()]"}}]}],n:50,r:"~/control.minimize"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-maximize",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.maximize()]"}}]}],n:50,x:{r:["~/control.dialog","~/control.maximize"],s:"!_0&&_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-close",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.close()]"}}]}],n:50,r:"~/control.close"}]}]}],n:51,x:{r:["~/control.max","~/root.userMax","~/root.max","~/root.hideTitleMax","~/control.dialog"],s:"(_0||_1||_2)&&_3&&!_4"}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-content",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"content\"]"}},{n:"class-rwindow-pad",t:13,f:[{t:2,r:"~/control.pad"}]},{n:"class-rwindow-flex",t:13,f:[{t:2,r:"~/control.flex"}]},{t:4,f:[{n:"style-overflow",f:"visible",t:13}],n:50,r:"~/control.autosize"}],f:[{t:8,r:"contents"}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-buttons",g:1},{n:"class-no-buttons",t:13,f:[{t:2,x:{r:["~/visibleButtons"],s:"!_0"}}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-left-buttons",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:".partial"}],n:50,r:".partial"},{t:4,f:[{t:7,e:"button",m:[{n:["click"],t:70,f:{r:["."],s:"[_0.action()]"}},{t:4,f:[{n:"class",f:[{t:2,r:".class"}],t:13}],n:50,r:".class"}],f:[{t:2,r:".label"}]}],n:51,l:1}],n:52,r:"~/leftButtons"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-center-buttons",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:".partial"}],n:50,r:".partial"},{t:4,f:[{t:7,e:"button",m:[{n:["click"],t:70,f:{r:["."],s:"[_0.action()]"}},{t:4,f:[{n:"class",f:[{t:2,r:".class"}],t:13}],n:50,r:".class"}],f:[{t:2,r:".label"}]}],n:51,l:1}],n:52,r:"~/centerButtons"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-right-buttons",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:".partial"}],n:50,r:".partial"},{t:4,f:[{t:7,e:"button",m:[{n:["click"],t:70,f:{r:["."],s:"[_0.action()]"}},{t:4,f:[{n:"class",f:[{t:2,r:".class"}],t:13}],n:50,r:".class"}],f:[{t:2,r:".label"}]}],n:51,l:1}],n:52,r:"~/rightButtons"}]}]}],n:50,r:"~/buttons"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-pane-bottom",g:1}],f:[{t:8,r:"status"}]}]}.t,
pane: {v:4,t:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-pane-top",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"top\"]"}}],f:[{t:8,r:"title"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-controls",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-minimize",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.hide()]"}}]}],n:50,x:{r:["~/control.dialog","~/control.minimize"],s:"!_0&&_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-maximize",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.maximize()]"}}]}],n:50,x:{r:["~/control.dialog","~/control.maximize"],s:"!_0&&_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-close",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.close()]"}}]}],n:50,r:"~/control.close"}]}]}],n:51,x:{r:["~/control.max","~/root.userMax","~/root.max","~/root.hideTitleMax","~/control.dialog"],s:"(_0||_1||_2)&&_3&&!_4"}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-content",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"content\"]"}},{n:"class-rwindow-pad",t:13,f:[{t:2,r:"~/control.pad"}]},{n:"class-rwindow-flex",t:13,f:[{t:2,r:"~/control.flex"}]},{t:4,f:[{n:"style-overflow",f:"visible",t:13}],n:50,r:"~/control.autosize"}],f:[{t:8,r:"contents"}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-buttons",g:1},{n:"class-no-buttons",t:13,f:[{t:2,x:{r:["~/visibleButtons"],s:"!_0"}}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-left-buttons",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:".partial"}],n:50,r:".partial"},{t:4,f:[{t:7,e:"button",m:[{n:"button",t:71},{n:["click"],t:70,f:{r:[".action","@"],s:"[_0.call(_1)]"}},{t:4,f:[{n:"class",f:[{t:2,r:".class"}],t:13}],n:50,r:".class"}],f:[{t:2,r:".label"}]}],n:51,l:1}],n:52,r:"~/leftButtons"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-center-buttons",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:".partial"}],n:50,r:".partial"},{t:4,f:[{t:7,e:"button",m:[{n:"button",t:71},{n:["click"],t:70,f:{r:[".action","@"],s:"[_0.call(_1)]"}},{t:4,f:[{n:"class",f:[{t:2,r:".class"}],t:13}],n:50,r:".class"}],f:[{t:2,r:".label"}]}],n:51,l:1}],n:52,r:"~/centerButtons"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-right-buttons",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:".partial"}],n:50,r:".partial"},{t:4,f:[{t:7,e:"button",m:[{n:"button",t:71},{n:["click"],t:70,f:{r:[".action","@"],s:"[_0.call(_1)]"}},{t:4,f:[{n:"class",f:[{t:2,r:".class"}],t:13}],n:50,r:".class"}],f:[{t:2,r:".label"}]}],n:51,l:1}],n:52,r:"~/rightButtons"}]}]}],n:50,r:"~/buttons"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-pane-bottom",g:1}],f:[{t:8,r:"status"}]}]}.t,
title: {v:4,t:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-title",g:1}],f:[{t:3,r:"~/control.title"}]}],n:50,r:"~/control.title"}]}.t,

@@ -896,0 +905,0 @@ contents: {v:4,t:""}.t,

{
"name": "@evs-chris/raui",
"version": "0.3.2",
"version": "0.3.3",
"description": "Components, decorators, and helpers for Ractive apps that are generally Material-ish",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/evs-chris/raui",

@@ -1,2 +0,2 @@

import Ractive, { InitOpts as BaseInitOpts, ExtendOpts as BaseExtendOpts, Plugin } from 'ractive';
import Ractive, { InitOpts as BaseInitOpts, ExtendOpts as BaseExtendOpts, Plugin, Static, Constructor } from 'ractive';
import { Toast, Options as ToastOptions } from './Toast';

@@ -11,2 +11,9 @@

export interface WindowButton {
label: string;
action: (this: Window) => void;
class?: string;
where?: 'left'|'right'|'center';
}
export class Window<T extends Window<T> = Window<any>> extends Ractive<T> {

@@ -21,2 +28,3 @@ constructor(opts?: InitOpts<T>);

pad?: boolean;
buttons?: WindowButton[];

@@ -30,2 +38,5 @@ close(force?: boolean): void;

move(top: string | number, left: string | number): void;
static extend<T extends Window<T>>(opts?: ExtendOpts<T>): Static<Ractive<Ractive & T>>;
static extendWith<U extends Window<U>, V extends InitOpts<U> = InitOpts<U>, W extends ExtendOpts<U> = ExtendOpts<U>>(c: Constructor<U, V>, opts?: W): void;
}

@@ -43,4 +54,10 @@

pad?: boolean;
show?: boolean;
width?: string;
height?: string;
size?: 'fill'|'auto';
block?: boolean|Window;
dialog?: boolean;
top?: string;
left?: string;
}

@@ -65,4 +82,4 @@

addWindow(window: Window, opts?: WindowOpts)
getWindow(id: string): Window
addWindow<T extends Window>(window: T, opts?: WindowOpts): Promise<T>;
getWindow(id: string): Window;
rasie(window: string | Window, show: boolean);

@@ -69,0 +86,0 @@ sizeInPx(size: number | string): number;

@@ -165,2 +165,15 @@ (function (global, factory) {

Menu.prototype.popSiblingsIn = function popSiblingsIn (ctx) {
var items = ctx.get('../');
var me = ctx.resolve();
if (items) {
for (var i = 0; i < items.length; i++) {
if (me === ctx.resolve(("../" + i))) { continue; }
if (items[i].open) {
ctx.toggle(("../" + i + ".open"));
}
}
}
};
Menu.prototype._actioned = function _actioned () {

@@ -178,2 +191,14 @@ this.fire('action');

// TODO: handle active fn with context param
Menu.prototype.childActive = function childActive (path) {
var this$1 = this;
var item = this.get(path);
if (item && item.items) {
for (var i = 0; i < item.items.length; i++) {
if (this$1.get((path + ".items." + i + ".active")) === true || (typeof item.items[i].active === 'function' && item.items[i].active()) || (this$1.get((path + ".items." + i + ".activeRef")) && this$1.get(item.items[i].activeRef)) || this$1.childActive((path + ".items." + i))) { return true; }
}
}
};
return Menu;

@@ -184,6 +209,6 @@ }(Ractive$1));

Ractive$1.extendWith(Menu, {
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 (_0){return(!_0);},"_0&&(_1||_2===\"section\")":function (_0,_1,_2){return(_0&&(_1||_2==="section"));},"_0?_3.active(_1.getHandle((_2))):_3.active()":function (_0,_1,_2,_3){return(_0?_3.active(_1.getHandle((_2))):_3.active());},"typeof _0===\"function\"":function (_0){return(typeof _0==="function");},"typeof _0===\"boolean\"":function (_0){return(typeof _0==="boolean");},"_0!=null":function (_0){return(_0!=null);},"[_0.action()]":function (_0){return([_0.action()]);},"[_0._actioned()]":function (_0){return([_0._actioned()]);},"[(_0).toggle(\".open\"),false]":function (_0){return([(_0).toggle(".open"),false]);},"_0||(_1&&_2[_1])":function (_0,_1,_2){return(_0||(_1&&_2[_1]));},"[{axis:\"x\"}]":function (){return([{axis:"x"}]);},"_2&&_0&&_1.visibleItems(_2)":function (_0,_1,_2){return(_2&&_0&&_1.visibleItems(_2));},"!_0||_0===\"item\"":function (_0){return(!_0||_0==="item");},"_0===\"section\"":function (_0){return(_0==="section");},"_0===\"container\"":function (_0){return(_0==="container");},"(!_0||_0===\"item\")&&_1":function (_0,_1){return((!_0||_0==="item")&&_1);},"[_0.popAllIn((_1))]":function (_0,_1){return([_0.popAllIn((_1))]);},"[_0]":function (_0){return([_0]);},"typeof _0===\"string\"":function (_0){return(typeof _0==="string");},"_0||\"item\"":function (_0){return(_0||"item");},"_0._itemRendered((_1))":function (_0,_1){return(_0._itemRendered((_1)));},"_1===undefined||(typeof _1===\"boolean\"&&_1)||(typeof _1===\"string\"&&_0[_1])||(typeof _1===\"function\"&&_2.condition())":function (_0,_1,_2){return(_1===undefined||(typeof _1==="boolean"&&_1)||(typeof _1==="string"&&_0[_1])||(typeof _1==="function"&&_2.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}],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-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:["."],s:"[_0.action()]"}},{n:["click"],t:70,f:{r:["@this"],s:"[_0._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:["@context"],s:"[(_0).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:["@context"],s:"[(_0).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:["@context"],s:"[(_0).toggle(\".open\"),false]"}}]}],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","@context"],s:"[_0.popAllIn((_1))]"}}],n:50,r:".open"}],n:50,r:".popout"},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:51,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:".attrsPartial"}],n:50,r:".attrsPartial"}],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"}]}},
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 (_0){return(!_0);},"_0&&(_1||_2===\"section\")":function (_0,_1,_2){return(_0&&(_1||_2==="section"));},"_0?_3.active(_1.getHandle((_2))):_3.active()":function (_0,_1,_2,_3){return(_0?_3.active(_1.getHandle((_2))):_3.active());},"typeof _0===\"function\"":function (_0){return(typeof _0==="function");},"typeof _0===\"boolean\"":function (_0){return(typeof _0==="boolean");},"_0.childActive(_1)":function (_0,_1){return(_0.childActive(_1));},"_0!=null":function (_0){return(_0!=null);},"[_0.action()]":function (_0){return([_0.action()]);},"[_0._actioned()]":function (_0){return([_0._actioned()]);},"[_0.popSiblingsIn((_1)),(_1).toggle(\".open\"),false]":function (_0,_1){return([_0.popSiblingsIn((_1)),(_1).toggle(".open"),false]);},"_0||(_1&&_2[_1])":function (_0,_1,_2){return(_0||(_1&&_2[_1]));},"[{axis:\"x\"}]":function (){return([{axis:"x"}]);},"_2&&_0&&_1.visibleItems(_2)":function (_0,_1,_2){return(_2&&_0&&_1.visibleItems(_2));},"[(_0).toggle(\".open\"),false]":function (_0){return([(_0).toggle(".open"),false]);},"!_0||_0===\"item\"":function (_0){return(!_0||_0==="item");},"_0===\"section\"":function (_0){return(_0==="section");},"_0===\"container\"":function (_0){return(_0==="container");},"(!_0||_0===\"item\")&&_1":function (_0,_1){return((!_0||_0==="item")&&_1);},"[_0.popAllIn((_1))]":function (_0,_1){return([_0.popAllIn((_1))]);},"[_0]":function (_0){return([_0]);},"typeof _0===\"string\"":function (_0){return(typeof _0==="string");},"_0||\"item\"":function (_0){return(_0||"item");},"_0._itemRendered((_1))":function (_0,_1){return(_0._itemRendered((_1)));},"_1===undefined||(typeof _1===\"boolean\"&&_1)||(typeof _1===\"string\"&&_0[_1])||(typeof _1===\"function\"&&_2.condition())":function (_0,_1,_2){return(_1===undefined||(typeof _1==="boolean"&&_1)||(typeof _1==="string"&&_0[_1])||(typeof _1==="function"&&_2.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}],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:["."],s:"[_0.action()]"}},{n:["click"],t:70,f:{r:["@this"],s:"[_0._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:["@this","@context"],s:"[_0.popSiblingsIn((_1)),(_1).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:["@this","@context"],s:"[_0.popSiblingsIn((_1)),(_1).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:["@context"],s:"[(_0).toggle(\".open\"),false]"}}]}],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","@context"],s:"[_0.popAllIn((_1))]"}}],n:50,r:".open"}],n:50,r:".popout"},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:51,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:".attrsPartial"}],n:50,r:".attrsPartial"}],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(data) { return [(function(data) {
var primary = Object.assign({}, data('raui.primary'), data('raui.menu.primary'));
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.fga || '#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-disabled {\n opacity: 0.5;\n cursor: not-allowed;\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-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 padding: 0.2em 0;\n min-height: 2em;\n }\n .rmenu-main.rmenu-active {\n color: " + (primary.fga || '#07e') + ";\n background-color: " + (primary.bg || '#fff') + ";\n }\n .rmenu-wrapper.alt .rmenu-main.rmenu.active {\n color: " + (primary.bg || '#fff') + ";\n background-color: " + (primary.fga || '#07e') + ";\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.bg || '#fff') + ";\n color: " + (primary.fg || '#222') + ";\n box-sizing: border-box;\n border: 1px solid;\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 \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 \n .rmenu-popout-close:after {\n color: " + (primary.bc || '#ccc') + ";\n content: '\\274c Close';\n display: block;\n padding: 0.5em 0.5em 0.1em 0.5em;\n }\n \n .rmenu-title {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n cursor: pointer;\n padding: 0 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.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 \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.fga || '#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-disabled {\n opacity: 0.5;\n cursor: not-allowed;\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-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 padding: 0.2em 0;\n min-height: 2em;\n }\n .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 {\n color: " + (primary.bg || '#fff') + ";\n background-color: " + (primary.fg || '#222') + ";\n }\n .rmenu-wrapper.alt .rmenu-main.rmenu.active {\n color: " + (primary.bg || '#fff') + ";\n background-color: " + (primary.fga || '#07e') + ";\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.bg || '#fff') + ";\n color: " + (primary.fg || '#222') + ";\n box-sizing: border-box;\n border: 1px solid;\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 \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 \n .rmenu-popout-close:after {\n color: " + (primary.bc || '#ccc') + ";\n content: '\\274c Close';\n display: block;\n padding: 0.5em 0.5em 0.1em 0.5em;\n }\n \n .rmenu-title {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n cursor: pointer;\n padding: 0 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.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 \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

@@ -190,0 +215,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"});t.setStyle("overflow","hidden");var i="x"===n.axis?"width":"height";if(t.isIntro){var r=t.getStyle(i);return t.setStyle(i,0),t.setStyle("opacity",0),t.animateStyle(i,r,n).then(function(){return t.animateStyle("opacity",1,n)})}return t.setStyle(i,t.getStyle(i)),t.setStyle("opacity",1),t.animateStyle("opacity",0,n).then(function(){return t.animateStyle(i,0,n)})}function o(t,e){function n(n){for(var i=n.target;i;){if(i===t)return!1;i=i.parentNode}e(n)}return document.body.addEventListener("click",n),document.body.addEventListener("touchstop",n),{teardown:function(){document.body.removeEventListener("click",n),document.body.removeEventListener("touchstop",n)}}}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);i&&(e=this.getContext(i))}else t&&t.parentNode?e=this.getContext(t):t&&t.decorators&&(e=t);if(e){for(var r=[e.get()],o="../../";""!==e.resolve(o);)r.unshift(e.get(o)),o+="../../";return r.reduce(function(t,e){return new a(n,t,e)},null)}},e.prototype.popAllIn=function(t){var e=(t=t||this.getContext()).get("items");t.get("open")&&t.set("open",!1);for(var n=t.resolve("items"),i=0;i<e.length;i++)u(this,n+"."+i)},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}(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!=null":function(t){return null!=t},"[_0.action()]":function(t){return[t.action()]},"[_0._actioned()]":function(t){return[t._actioned()]},'[(_0).toggle(".open"),false]':function(t){return[t.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||_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}],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-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:["."],s:"[_0.action()]"}},{n:["click"],t:70,f:{r:["@this"],s:"[_0._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:["@context"],s:'[(_0).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:["@context"],s:'[(_0).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:["@context"],s:'[(_0).toggle(".open"),false]'}}]}],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","@context"],s:"[_0.popAllIn((_1))]"}}],n:50,r:".open"}],n:50,r:".popout"},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:51,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:".attrsPartial"}],n:50,r:".attrsPartial"}],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"\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.fga||"#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-disabled {\n opacity: 0.5;\n cursor: not-allowed;\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-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 padding: 0.2em 0;\n min-height: 2em;\n }\n .rmenu-main.rmenu-active {\n color: "+(e.fga||"#07e")+";\n background-color: "+(e.bg||"#fff")+";\n }\n .rmenu-wrapper.alt .rmenu-main.rmenu.active {\n color: "+(e.bg||"#fff")+";\n background-color: "+(e.fga||"#07e")+";\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.bg||"#fff")+";\n color: "+(e.fg||"#222")+";\n box-sizing: border-box;\n border: 1px solid;\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 \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 \n .rmenu-popout-close:after {\n color: "+(e.bc||"#ccc")+";\n content: '\\274c Close';\n display: block;\n padding: 0.5em 0.5em 0.1em 0.5em;\n }\n \n .rmenu-title {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n cursor: pointer;\n padding: 0 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.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 \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.attrsPartial={t:r});if("container"===e.e)return i.contentPartial={t:e.f},i.attrsPartial=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:[],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,i=this,r=t.processParams(e,{duration:200,easing:"easeInOut"});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?(t.node.classList.add("rmenu-shrink"),n=!0,setTimeout(function(){return i.getContext(t.node).set(".shrink",!0)}),s().style.overflowX="hidden"):t.node.classList.contains("rmenu-shrink")?(setTimeout(function(){return i.getContext(t.node).set(".shrink",!1)}),s().style.overflowX=""):s().style.overflowX=""}else n=t.node.classList.contains("rmenu-shrink");return t.isIntro?n?(t.setStyle("left","100%"),t.animateStyle("left",0,r)):(t.setStyle("left",0),t.setStyle("z-index",-1),t.animateStyle("left","100%",r)):n?(t.setStyle("left",0),t.animateStyle("left","100%",r)):(t.setStyle("left","100%"),t.setStyle("z-index",-1),t.animateStyle("left",0,r))}}});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,e){var n,i=t.get(e);if(i.open&&i.popout&&t.toggle(e+".open"),n=t.get(e+".items"))for(var r=0;r<n.length;r++)u(t,e+".items."+r)}function c(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=c,t.default=c,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 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"});t.setStyle("overflow","hidden");var i="x"===n.axis?"width":"height";if(t.isIntro){var r=t.getStyle(i);return t.setStyle(i,0),t.setStyle("opacity",0),t.animateStyle(i,r,n).then(function(){return t.animateStyle("opacity",1,n)})}return t.setStyle(i,t.getStyle(i)),t.setStyle("opacity",1),t.animateStyle("opacity",0,n).then(function(){return t.animateStyle(i,0,n)})}function o(t,e){function n(n){for(var i=n.target;i;){if(i===t)return!1;i=i.parentNode}e(n)}return document.body.addEventListener("click",n),document.body.addEventListener("touchstop",n),{teardown:function(){document.body.removeEventListener("click",n),document.body.removeEventListener("touchstop",n)}}}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);i&&(e=this.getContext(i))}else t&&t.parentNode?e=this.getContext(t):t&&t.decorators&&(e=t);if(e){for(var r=[e.get()],o="../../";""!==e.resolve(o);)r.unshift(e.get(o)),o+="../../";return r.reduce(function(t,e){return new a(n,t,e)},null)}},e.prototype.popAllIn=function(t){var e=(t=t||this.getContext()).get("items");t.get("open")&&t.set("open",!1);for(var n=t.resolve("items"),i=0;i<e.length;i++)u(this,n+"."+i)},e.prototype.popSiblingsIn=function(t){var e=t.get("../"),n=t.resolve();if(e)for(var i=0;i<e.length;i++)n!==t.resolve("../"+i)&&e[i].open&&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()]":function(t){return[t.action()]},"[_0._actioned()]":function(t){return[t._actioned()]},'[_0.popSiblingsIn((_1)),(_1).toggle(".open"),false]':function(t,e){return[t.popSiblingsIn(e),e.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).toggle(".open"),false]':function(t){return[t.toggle(".open"),!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}],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:["."],s:"[_0.action()]"}},{n:["click"],t:70,f:{r:["@this"],s:"[_0._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:["@this","@context"],s:'[_0.popSiblingsIn((_1)),(_1).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:["@this","@context"],s:'[_0.popSiblingsIn((_1)),(_1).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:["@context"],s:'[(_0).toggle(".open"),false]'}}]}],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","@context"],s:"[_0.popAllIn((_1))]"}}],n:50,r:".open"}],n:50,r:".popout"},{t:4,f:[{n:"expand",t:72,v:"t0"}],n:51,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:".attrsPartial"}],n:50,r:".attrsPartial"}],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"\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.fga||"#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-disabled {\n opacity: 0.5;\n cursor: not-allowed;\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-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 padding: 0.2em 0;\n min-height: 2em;\n }\n .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 {\n color: "+(e.bg||"#fff")+";\n background-color: "+(e.fg||"#222")+";\n }\n .rmenu-wrapper.alt .rmenu-main.rmenu.active {\n color: "+(e.bg||"#fff")+";\n background-color: "+(e.fga||"#07e")+";\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.bg||"#fff")+";\n color: "+(e.fg||"#222")+";\n box-sizing: border-box;\n border: 1px solid;\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 \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 \n .rmenu-popout-close:after {\n color: "+(e.bc||"#ccc")+";\n content: '\\274c Close';\n display: block;\n padding: 0.5em 0.5em 0.1em 0.5em;\n }\n \n .rmenu-title {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n cursor: pointer;\n padding: 0 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.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 \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.attrsPartial={t:r});if("container"===e.e)return i.contentPartial={t:e.f},i.attrsPartial=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:[],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,i=this,r=t.processParams(e,{duration:200,easing:"easeInOut"});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?(t.node.classList.add("rmenu-shrink"),n=!0,setTimeout(function(){return i.getContext(t.node).set(".shrink",!0)}),s().style.overflowX="hidden"):t.node.classList.contains("rmenu-shrink")?(setTimeout(function(){return i.getContext(t.node).set(".shrink",!1)}),s().style.overflowX=""):s().style.overflowX=""}else n=t.node.classList.contains("rmenu-shrink");return t.isIntro?n?(t.setStyle("left","100%"),t.animateStyle("left",0,r)):(t.setStyle("left",0),t.setStyle("z-index",-1),t.animateStyle("left","100%",r)):n?(t.setStyle("left",0),t.animateStyle("left","100%",r)):(t.setStyle("left","100%"),t.setStyle("z-index",-1),t.animateStyle("left",0,r))}}});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,e){var n,i=t.get(e);if(i.open&&i.popout&&t.toggle(e+".open"),n=t.get(e+".items"))for(var r=0;r<n.length;r++)u(t,e+".items."+r)}function c(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=c,t.default=c,Object.defineProperty(t,"__esModule",{value:!0})});

@@ -497,2 +497,5 @@ (function (global, factory) {

// TODO: filters and sorts bound in and with type-specific ops
// TODO: working virtual table
var Table = (function (Ractive) {

@@ -680,3 +683,3 @@ function Table(opts) { Ractive.call(this, opts); }

var table = Object.assign({ selected: {} }, data('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 }\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 {\n font-weight: bold;\n }\n \n .rtable-number-column {\n text-align: right;\n }\n .rtable-date-column {\n text-align: right;\n }\n \n .rtable-header {\n border-bottom: 1px solid " + (table.divider || primary.bc || '#ccc') + ";\n text-align: left;\n }\n \n .rtable-header > th {\n padding: 0.3em 0.5em 1em 0.5em;\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 .rtable-row {\n color: " + (primary.fg || '#222') + ";\n border-bottom: 1px solid " + (table.divider || primary.bc || '#ccc') + ";\n background-color: " + (table.even || primary.bga || '#f4f4f4') + ";\n transition: 0.2s ease-in-out;\n transition-property: background-color, color;\n }\n .rtable-row:nth-child(odd) {\n background-color: " + (table.odd || primary.bg || '#fff') + ";\n }\n .rtable-row:last-of-type {\n border-bottom: none;\n }\n .rtable-row:hover {\n background-color: " + (table.over || active.bg || '#eee') + ";\n }\n \n .rtable-row.rtable-selected {\n background-color: " + (table.selected.bg || 'rgba(0, 119, 238, 0.12)') + ";\n color: " + (table.selected.fg || primary.fg || '#222') + ";\n }\n .rtable-row.rtable-selected:nth-child(odd) {\n background-color: " + (table.selected.odd || 'rgba(0, 119, 238, 0.1)') + ";\n }\n \n .rtable-border .rtable-row .rtable-column:nth-child(n+2),\n .rtable-border .rtable-group .rtable-column:nth-child(n+2) {\n border-left: 1px solid " + (table.divider || primary.bc || '#ccc') + ";\n }\n \n .rtable-border .rtable-row-expand {\n border-top: 1px solid " + (table.divider || primary.bc || '#ccc') + ";\n }\n \n .rtable-group {\n border-bottom: 2px solid " + (table.divider || primary.bc || '#ccc') + ";\n }\n \n .rtable-top {\n flex-grow: 5;\n flex-shrink: 1;\n overflow-y: auto;\n margin: 0.5em 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 outline: none;\n margin-left: -1em;\n }\n .rtable-select:before {\n content: '';\n display: block;\n border: 2px solid " + (primary.fg || '#222') + ";\n width: 1em;\n height: 1em;\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: " + (primary.fga || '#07e') + ";\n border-top-color: transparent;\n border-right-color: transparent;\n transform: rotate(-50deg);\n }\n .row > .rtable-select-header,\n .row > .rtable-select-row {\n text-align: center;\n width: 2.5em;\n }\n .rtable-select-header .rtable-select:checked:before {\n border-color: " + (primary.fg || '#222') + ";\n border-top-color: transparent;\n border-right-color: transparent;\n }\n \n .rtable-column button, .rtable-column .btn {\n font-size: 0.8em;\n padding: 0.25em 0.5em;\n }\n " + (data('table.includeGrid') !== false ? style(data) : '');
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.4em 0.3em 0.2em 0.3em;\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 {\n font-weight: bold;\n }\n \n .rtable-number-column {\n text-align: right;\n }\n .rtable-date-column {\n text-align: right;\n }\n \n .rtable-header {\n border-bottom: 1px solid " + (table.divider || primary.bc || '#ccc') + ";\n text-align: left;\n }\n \n .rtable-header > th {\n padding: 0.3em 0.5em 1em 0.5em;\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 .rtable-row {\n color: " + (primary.fg || '#222') + ";\n border-bottom: 1px solid " + (table.divider || primary.bc || '#ccc') + ";\n background-color: " + (table.even || primary.bga || '#f4f4f4') + ";\n transition: 0.2s ease-in-out;\n transition-property: background-color, color;\n }\n .rtable-row:nth-child(odd) {\n background-color: " + (table.odd || primary.bg || '#fff') + ";\n }\n .rtable-row:last-of-type {\n border-bottom: none;\n }\n .rtable-row:hover {\n background-color: " + (table.over || active.bg || '#eee') + ";\n }\n \n .rtable-row.rtable-selected {\n background-color: " + (table.selected.bg || 'rgba(0, 119, 238, 0.12)') + ";\n color: " + (table.selected.fg || primary.fg || '#222') + ";\n }\n .rtable-row.rtable-selected:nth-child(odd) {\n background-color: " + (table.selected.odd || 'rgba(0, 119, 238, 0.1)') + ";\n }\n \n .rtable-border .rtable-row .rtable-column:nth-child(n+2),\n .rtable-border .rtable-group .rtable-column:nth-child(n+2) {\n border-left: 1px solid " + (table.divider || primary.bc || '#ccc') + ";\n }\n \n .rtable-border .rtable-row-expand {\n border-top: 1px solid " + (table.divider || primary.bc || '#ccc') + ";\n }\n \n .rtable-group {\n border-bottom: 2px solid " + (table.divider || primary.bc || '#ccc') + ";\n }\n \n .rtable-top {\n flex-grow: 5;\n flex-shrink: 1;\n overflow-y: auto;\n margin: 0.5em 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 " + (primary.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: " + (primary.fga || '#07e') + ";\n border-top-color: transparent;\n border-right-color: transparent;\n transform: rotate(-50deg);\n }\n .row > .rtable-select-header,\n .row > .rtable-select-row {\n text-align: center;\n width: 1.5em;\n }\n .rtable-select-header .rtable-select:before {\n margin-top: -1em;\n }\n .rtable-select-header .rtable-select:checked:before {\n border-color: " + (primary.fg || '#222') + ";\n border-top-color: transparent;\n border-right-color: transparent;\n }\n \n .rtable-column button, .rtable-column .btn {\n font-size: 0.75em;\n padding: 0 0.5em;\n margin: 0.2em 0.5em;\n min-height: 0;\n }\n " + (data('table.includeGrid') !== false ? style(data) : '');
}).call(this, data)].join(' '); },

@@ -810,3 +813,4 @@ cssId: 'rtable',

allowGroupSelect: true,
expanded: null
expanded: null,
minPerPage: 10
}

@@ -896,2 +900,4 @@ },

if (per < this.get('minPerPage')) { per = this.get('minPerPage'); }
if (offset * per > rows.length) { setTimeout(function () { return this$1.set('page', 0); }, 0); }

@@ -912,2 +918,3 @@

}
if (per < this.get('minPerPage')) { per = this.get('minPerPage'); }

@@ -914,0 +921,0 @@ if (!per) { return; }

@@ -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.RMTable={},t.Ractive)}(this,function(t,e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var n,r="undefined"!=typeof window?window:null;function i(t,e,n){if(r&&r.Ractive&&"object"==typeof r.Ractive[e]){var i=document.currentScript;if(i||(i=(i=document.querySelectorAll("script"))[i.length-1]),i){var s=i.getAttribute("data-alias");s&&(s=(s=s.split("&")).reduce(function(t,e){var n=e.split("="),r=n[0],i=n[1];return t[r]=i,t},{})),Ractive[e][s&&s[t]||t]=n}}}var s={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}},o={"grid grid-root":/\bgrid grid-root\b/g},a=/\s+/g;function l(t,e){var r,i,l=this.getContext(t),c=this,d=e||{};function f(){var e=t.clientWidth;if(!d.type||"class"===d.type){var n,s=-1;for(var c in r)r[c]<=e&&(o[c].lastIndex=-1,r[c]>s&&(n=c,s=r[c])),t.className=t.className.replace(o[c],"").trim();o[n].test(t.className)||(t.className+=" "+n),d.value&&l.set(d.value,i[n].value),d.name&&l.set(d.name,n),t.className=t.className.replace(a," ")}}function u(){var t=(n||(n=document.createElement("div"),document.body.appendChild(n)),n);for(var e in i=c.get("@style.break")||s,r={},i)t.style.width=i[e].max,r[e]=t.clientWidth,o[e]||(o[e]=new RegExp("\\b"+e+"\\b","g"));t.style.width=0,f()}var h=this.root.on("*.resize",f),p=this.observe("@style.break",u);return t.className+=" grid grid-root",u(),{update:function(t){d=t||{},f()},teardown:function(){t.className=t.className.replace(o["grid grid-root"],"").trim(),h.cancel(),p.cancel()}}}function c(t,e){var n,r=t("raui.grid.break")||e||s,i=".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: "+(t("raui.grid.padding")||"0.5em")+"; }\n.grid .row > .pad { display: flex; flex-direction: column; padding: "+(t("raui.grid.padding")||"0.5em")+"; box-sizing: border-box; }",o=Object.keys(r).map(function(t){return(r[t].key=t)&&r[t]});o.sort(function(t,e){return t.value>e.value?1:t.value<e.value?-1:0});var a={};o.reverse().reduce(function(t,e){return t.push(e.key),a[e.key]=t.slice(),t},[]);var l="",c="";return o.reverse().forEach(function(t){var e=t.prefix||t.key[0];i+="\n"+a[t.key].map(function(t){return"."+t+" > ."+e+"0, ."+t+" > .row > ."+e+"0, ."+t+" ."+e+"-n0"}).join(", ")+" { width: 0; overflow: hidden; }",t.units.forEach(function(r){c+="\n"+a[t.key].map(function(t){return"."+t+" > "+e+"1, ."+t+" > .row > ."+e+"1, ."+t+" "+e+"-n1"}).join(", ")+" { width: 100%; }";for(var i=function(i){n=(n=""+i/r*100).substr(0,n.indexOf(".")+3),l+="\n"+a[t.key].map(function(t){return"."+t+" > .row-"+e+i+"-"+r+" > *, ."+t+" .row-"+e+"-n"+i+"-"+r+" > *, ."+t+" .row-"+e+"-n"+i+"-"+r+" > *"}).join(", ")+" { width: "+n+"%; }",c+="\n"+a[t.key].map(function(t){return"."+t+" > ."+e+i+"-"+r+", ."+t+" > .row > ."+e+i+"-"+r+", ."+t+" ."+e+"-n"+i+"-"+r+", ."+t+" .row > ."+e+"-n"+i+"-"+r}).join(", ")+" { width: "+n+"%; }"},s=1;s<r;s++)i(s)})}),i+=l+c}l.style=c,i("grid","decorators",l);var d=250;function f(t){return void 0===t&&(t={}),function(e){var n=e.Ractive;e.instance.events[t.name||(t.count||"")+"clicks"]=function(e,r,i){var s,o=Object.assign({},t,i);return(s=e.__r_clicks__)?s.subscribe(o.count||1,!!o.hold,r):(s=new u(n.getContext(e),o.delay||d,o.bubble||!1),e.__r_clicks__=s,s.subscribe(o.count||1,!!o.hold,r)),{teardown:function(){s.unsubscribe(o.count||1,!!o.hold,r)}}}}}f({name:"click",count:1}),f({name:"dblclick",count:2}),f({name:"trpclick",count:3});var u=function(t,e,n){this.context=t,this.node=t.node,this.delay=e,this.fires={},this.refs=0,this.bubble=n,this.bind()};function h(t){return this.__r_clicks__.mousedown(t)}function p(t){return this.__r_clicks__.touchdown(t)}function b(){this.addEventListener("keydown",m,!1),this.addEventListener("blur",g,!1)}function g(){this.removeEventListener("keydown",m,!1),this.removeEventListener("blur",g,!1)}function m(t){if(32===t.which||10===t.which||13===t.which)return this.__r_clicks__.fire()}function v(t,e){var n=t.processParams(e,{duration:200,easing:"easeInOut"});t.setStyle("overflow","hidden");var r="x"===n.axis?"width":"height";if(t.isIntro){var i=t.getStyle(r);return t.setStyle(r,0),t.setStyle("opacity",0),t.animateStyle(r,i,n).then(function(){return t.animateStyle("opacity",1,n)})}return t.setStyle(r,t.getStyle(r)),t.setStyle("opacity",1),t.animateStyle("opacity",0,n).then(function(){return t.animateStyle(r,0,n)})}u.prototype.subscribe=function(t,e,n){(this.fires[t+","+e]||(this.fires[t+","+e]=[])).push(n),this.refs++},u.prototype.unsubscribe=function(t,e,n){var r=this.fires[t+","+e]||[];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",h):window.navigator.msPointerEnabled?this.context.listen("MSPointerDown",h):(this.context.listen("mousedown",h),this.context.listen("touchstart",p)),"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(t,e,n,r){var i=this;this.tm?(this.tmCount++,clearTimeout(this.tm)):this.tmCount=1;var s=function(){i.tm=null,(i.fires[i.tmCount+","+!!r]||[]).forEach(function(s){s({node:i.node,original:t,x:e,y:n,hold:!!r})})};return r?s():this.tm=setTimeout(s,this.delay),this.bubble},u.prototype.mousedown=function(t){var e=this;if(!this.preventMousedownEvents&&(void 0===t.which||1===t.which)){var n,r=t.clientX,i=t.clientY,s=t.pointerId,o=function(t){t.pointerId==s&&(e.fire(t,r,i),l())},a=function(t){t.pointerId==s&&(Math.abs(t.clientX-r)>=5||Math.abs(t.clientY-i)>=5)&&l()},l=function(){n&&clearTimeout(n),e.node.removeEventListener("MSPointerUp",o,!1),document.removeEventListener("MSPointerMove",a,!1),document.removeEventListener("MSPointerCancel",l,!1),e.node.removeEventListener("pointerup",o,!1),document.removeEventListener("pointermove",a,!1),document.removeEventListener("pointercancel",l,!1),e.node.removeEventListener("click",o,!1),document.removeEventListener("mousemove",a,!1)};return window.PointerEvent||window.navigator.pointerEnabled?(this.node.addEventListener("pointerup",o,!1),document.addEventListener("pointermove",a,!1),document.addEventListener("pointercancel",l,!1)):window.navigator.msPointerEnabled?(this.node.addEventListener("MSPointerUp",o,!1),document.addEventListener("MSPointerMove",a,!1),document.addEventListener("MSPointerCancel",l,!1)):(this.node.addEventListener("click",o,!1),document.addEventListener("mousemove",a,!1)),n=setTimeout(function(){l(),e.fire(t,r,i,!0)},400),this.bubble||t.stopPropagation(),this.bubble}},u.prototype.touchdown=function(t){var e,n=this,r=t.touches[0],i=r.clientX,s=r.clientY,o=r.identifier,a=function(t){t.changedTouches[0].identifier===o?(t.preventDefault(),n.preventMousedownEvents=!0,clearTimeout(n.preventMousedownTimeout),n.preventMousedownTimeout=setTimeout(function(){n.preventMousedownEvents=!1},400),n.fire(t,i,s),c()):c()},l=function(t){1===t.touches.length&&t.touches[0].identifier===o||c();var e=t.touches[0];(Math.abs(e.clientX-i)>=5||Math.abs(e.clientY-s)>=5)&&c()},c=function(){e&&clearTimeout(e),n.node.removeEventListener("touchend",a,!1),window.removeEventListener("touchmove",l,!1),window.removeEventListener("touchcancel",c,!1)};return this.node.addEventListener("touchend",a,!1),window.addEventListener("touchmove",l,!1),window.addEventListener("touchcancel",c,!1),e=setTimeout(function(){c(),n.fire(t,i,s,!0)},400),this.bubble||t.stopPropagation(),this.bubble},u.prototype.teardown=function(){var t=this.context;t.unlisten("pointerdown",h),t.unlisten("MSPointerDown",h),t.unlisten("mousedown",h),t.unlisten("touchstart",p),t.unlisten("focus",b),delete this.node.__r_clicks__},i("expand","transitions",v);var _,w=/^([-+])?([^\s]+)$/,x=function(t){function e(e){t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.allSelected=function(){for(var t=this.get("selections"),e=this.get("visibleRows"),n=0;n<e.length;n++)if(!~t.indexOf(e[n]))return!1;return e.length&&!0},e.prototype.nodeSet=function(t,e,n){t[e]=n},e.prototype._expand=function(t){var e=this.get("visibleRows")[t];this.get("expanded")===e?this.set("expanded",null):this.set("expanded",e)},e.prototype._setSort=function(t,e){var n=this.get("columns."+t);if(n&&(n.sort||n.filter)){var r=n.sort||n.filter;"string"==typeof r&&"~"===r[0]&&(r=this.get(r));var i=e.ctrlKey,s=this.get("sort");if(Array.isArray(r)||(r=[r]),s?Array.isArray(s)||(s=[s]):s=[],s.length){var o=s.map(function(t){return w.exec(t).slice(1)}),a=r.reduce(function(t,e){return t&&!!o.find(function(t){return t[1]===e})},!0);a&&s.length!==r.length&&!i?this.set("sort",r.map(function(t){return"+"+r})):i?a?this.set("sort",o.map(function(t){return~r.indexOf(t[1])?("+"===t[0]?"-":"+")+t[1]:t[0]+t[1]})):this.set("sort",s.concat(r.map(function(t){return"+"+t}))):a?this.set("sort",o.map(function(t){return("+"===t[0]?"-":"+")+t[1]})):this.set("sort",r.map(function(t){return"+"+t}))}else this.set("sort",r.map(function(t){return"+"+t}))}},e.prototype._select=function(t,e){var n=this.get("selections");n||(n=[],this.set("selections",n));var r=n.indexOf(t);~r?this.splice("selections",r,1):this.push("selections",t),(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 e.target.checked=!~r})},e.prototype.select=function(){var t=this.get("selected");t&&this.fire("selected",{},t,this.get("rows").indexOf(t),this.get("visibleRows").indexOf(t))},e.prototype.selectionOffset=function(t){var e=this.get("selected"),n=this.get("visibleRows");if(e&&~n.indexOf(e)){var r=n.indexOf(e);if(t>0?r+t>=n.length:r+t<0){var i=t<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 s=t>0?n[0]:n[n.length-1];this.set({selected:s,selections:[s]})}else this.set({selected:n[r+t],selections:[n[r+t]]})}else{var o=t>0?n[0]:n[n.length-1];this.set({selected:o,selections:[o]})}this.fire("selection",{},{item:this.get("selected"),items:this.get("selections")})},e.prototype.selectionDown=function(){this.selectionOffset(1)},e.prototype.selectionUp=function(){this.selectionOffset(-1)},e.prototype._selectGroup=function(t){var e=t;this.get("page")&&(e+=this.get("page")*this.get("pagination.per"));var n,r=this.get("rows"),i=this.get("groups"),s=this.get("selections"),o=r[e++],a=["selections"],l=[];for(~(n=s.indexOf(o))?l.push(n):a.push(o);e<r.length&&!(e in i);)o=r[e++],~(n=s.indexOf(o))?l.push(n):a.push(o);if(1===a.length)for(n=l.length;n--;)this.splice("selections",l[n],1);else this.push.apply(this,a)},e.prototype._groupSelected=function(t){var e=t;this.get("page")&&(e+=this.get("page")*this.get("pagination.per"));var n=this.get("rows"),r=this.get("groups"),i=this.get("selections");if(!~i.indexOf(n[e++]))return!1;for(;e<n.length&&!(e in r);)if(!~i.indexOf(n[e++]))return!1;return!0},e}(e);function y(t,e){if(!e.length||"object"==typeof t){for(var n=t,r=0;r<e.length;r++)if("object"!=typeof(n=n[e[r]]))return r+1<e.length?void 0:n;return n}}function k(t,e){return t<e?-1:t>e?1:t==e?0:!t&&e?-1:t&&!e?1:0}e.extendWith(x,{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"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-top",g:1}],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:8,r:"pagination"}]}],e:{'_0==="virtual"':function(t){return"virtual"===t},'_0==="auto"':function(t){return"auto"===t},'_0==="grid"':function(t){return"grid"===t},"[_0._setSort(_1,_2)]":function(t,e,n){return[t._setSort(e,n)]},"[_0._select(_1,_2),false]":function(t,e,n){return[t._select(e,n),!1]},'[["select",_2,_0.indexOf(_2),_1.indexOf(_2)]]':function(t,e,n){return[["select",n,t.indexOf(n),e.indexOf(n)]]},"[_0._expand(_1)]":function(t,e){return[t._expand(e)]},"_0.indexOf(_1)":function(t,e){return t.indexOf(e)},"_0===_1":function(t,e){return t===e},"_0*_1+1":function(t,e){return t*e+1},"_2+1===_0?_1:(_2+1)*_3":function(t,e,n,r){return n+1===t?e:(n+1)*r},"_0&&_1":function(t,e){return t&&e},"_0===1":function(t){return 1===t},"_0.allSelected()&&_1<_2":function(t,e,n){return t.allSelected()&&e<n},"_0>0":function(t){return t>0},'[_0.set("page",_1-1)]':function(t,e){return[t.set("page",e-1)]},'[(/^\\d+$/.test(_1)&&+_1>0&&+_1<=_0&&_2.set("page",+_1-1))||_2.nodeSet(_3,"value",_4+1)]':function(t,e,n,r,i){return[/^\d+$/.test(e)&&+e>0&&+e<=t&&n.set("page",+e-1)||n.nodeSet(r,"value",i+1)]},"_0==_1+1":function(t,e){return t==e+1},'[_0.set("page",_2[_1-1])]':function(t,e,n){return[t.set("page",n[e-1])]},'_0==="..."':function(t){return"..."===t},'[_0.set("page",_1+1)]':function(t,e){return[t.set("page",e+1)]},"_0<_1-1":function(t,e){return t<e-1},"!_0":function(t){return!t},"_0+(_1?1:0)":function(t,e){return t+(e?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)]"}}]}," ",{t:4,f:["..."],n:50,x:{r:["~/selections","."],s:"_0.indexOf(_1)"}}," ",{t:4,f:["..."],n:50,x:{r:[".","~/expanded"],s:"_0===_1"}}],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}],f:[{t:8,r:"grid-head"}," ",{t:4,f:[{t:8,r:"grid-row"}],n:52,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"}],f:[{t:8,r:"table-head"}," ",{t:4,f:[{t:8,r:"table-row"}],n:52,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(t){return[function(t){var e=Object.assign({},t("raui.primary"),t("raui.table.primary")),n=Object.assign({},e,t("raui.primary.active"),t("raui.table.primary.active")),r=Object.assign({selected:{}},t("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 }\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 {\n font-weight: bold;\n }\n \n .rtable-number-column {\n text-align: right;\n }\n .rtable-date-column {\n text-align: right;\n }\n \n .rtable-header {\n border-bottom: 1px solid "+(r.divider||e.bc||"#ccc")+";\n text-align: left;\n }\n \n .rtable-header > th {\n padding: 0.3em 0.5em 1em 0.5em;\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 .rtable-row {\n color: "+(e.fg||"#222")+";\n border-bottom: 1px solid "+(r.divider||e.bc||"#ccc")+";\n background-color: "+(r.even||e.bga||"#f4f4f4")+";\n transition: 0.2s ease-in-out;\n transition-property: background-color, color;\n }\n .rtable-row:nth-child(odd) {\n background-color: "+(r.odd||e.bg||"#fff")+";\n }\n .rtable-row:last-of-type {\n border-bottom: none;\n }\n .rtable-row:hover {\n background-color: "+(r.over||n.bg||"#eee")+";\n }\n \n .rtable-row.rtable-selected {\n background-color: "+(r.selected.bg||"rgba(0, 119, 238, 0.12)")+";\n color: "+(r.selected.fg||e.fg||"#222")+";\n }\n .rtable-row.rtable-selected:nth-child(odd) {\n background-color: "+(r.selected.odd||"rgba(0, 119, 238, 0.1)")+";\n }\n \n .rtable-border .rtable-row .rtable-column:nth-child(n+2),\n .rtable-border .rtable-group .rtable-column:nth-child(n+2) {\n border-left: 1px solid "+(r.divider||e.bc||"#ccc")+";\n }\n \n .rtable-border .rtable-row-expand {\n border-top: 1px solid "+(r.divider||e.bc||"#ccc")+";\n }\n \n .rtable-group {\n border-bottom: 2px solid "+(r.divider||e.bc||"#ccc")+";\n }\n \n .rtable-top {\n flex-grow: 5;\n flex-shrink: 1;\n overflow-y: auto;\n margin: 0.5em 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 outline: none;\n margin-left: -1em;\n }\n .rtable-select:before {\n content: '';\n display: block;\n border: 2px solid "+(e.fg||"#222")+";\n width: 1em;\n height: 1em;\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: "+(e.fga||"#07e")+";\n border-top-color: transparent;\n border-right-color: transparent;\n transform: rotate(-50deg);\n }\n .row > .rtable-select-header,\n .row > .rtable-select-row {\n text-align: center;\n width: 2.5em;\n }\n .rtable-select-header .rtable-select:checked:before {\n border-color: "+(e.fg||"#222")+";\n border-top-color: transparent;\n border-right-color: transparent;\n }\n \n .rtable-column button, .rtable-column .btn {\n font-size: 0.8em;\n padding: 0.25em 0.5em;\n }\n "+(!1!==t("table.includeGrid")?c(t):"")}.call(this,t)].join(" ")},cssId:"rtable",noCssTransform:!0,attributes:["paginate","items","filter","sort","helpers","fixed","display","allowSelect","allowSelectAll","border"],components:{table:!1,Table:!1},syncComputedChildren:!0,decorators:{grid:l},events:{},use:[f({name:"clickd",count:1}),f({name:"dblclickd",count:2}),(void 0===_&&(_={}),function(t){t.instance.transitions[_.name||"expand"]=v})],on:{construct:function(){var t,e,n,r=this.component;if(!r)return;var i=r.template.f||[],s=r.template.m?r.template.m.slice():[],o=r.template;r.template={e:o.e,f:o.f,t:o.t,m:s};var a=0;function l(t,e){if(t&&t.f&&1===t.f.length&&2===t.f[0].t){var n="_a"+a++;return s.push({t:13,n:n,f:t.f}),e?{t:[{t:2,r:"~/"+n}]}:{t:2,r:"~/"+n}}return t&&t.f}function c(t){var e=[];return t.forEach(function(t){if("column"===t.e){var n={},r=t.m||E;n.index=e.length,e.push(n),n.content=(t.f||[]).filter(function(t){return"edit"!==t.e}),n.label=r.find(function(t){return"label"===t.n}),n.label&&n.label.f&&(n.label=l(n.label)),n.label||(n.label=""),Array.isArray(n.label)||(n.label=[n.label]),n.type=r.find(function(t){return"type"===t.n}),n.type&&n.type.f&&(n.type=n.type.f),n.type||(n.type="string"),n.filter=r.find(function(t){return"filter"===t.n}),n.filter&&n.filter.f&&(n.filter=l(n.filter),n.filter.r&&(n.filter=n.filter.r)),n.sort=r.find(function(t){return"sort"===t.n}),n.sort&&n.sort.f&&(n.sort=l(n.sort),n.sort.r&&(n.sort=n.sort.r)),n.hidden=r.find(function(t){return"hidden"===t.n}),n.hidden&&0===n.hidden.f?n.hidden=!0:n.hidden&&"object"==typeof n.hidden.f?n.hidden=l(n.hidden):n.hidden=!1,"string"==typeof n.hidden&&(n.hidden=!1),n.noPad=r.find(function(t){return"no-pad"===t.n}),n.noPad&&0===n.noPad.f?n.noPad=0:n.noPad&&"object"==typeof n.noPad.f?n.noPad=l(n.noPad):delete n.noPad,n.attrs=r.filter(function(t){return!~O.indexOf(t.n)}),n.attrs.forEach(function(t,e){S.test(t.n)&&(n.attrs[e]={t:13,n:"class-"+t.n})})}}),e}t=i.find(function(t){return"row"===t.e}),e=i.find(function(t){return"group"===t.e});var d=c(i);this._items={columns:d};var f="[_0._setSort(_1,_2)]",u=[{t:7,e:"tr",m:[{t:13,n:"class-rtable-header"}],f:d.filter(function(t){return!0!==t.hidden}).map(function(t){var e={t:7,e:"th",f:t.label,m:[{t:13,n:"class-rtable-header"},{t:4,n:53,r:"~/columns."+t.index,f:[{t:70,n:["click"],f:{r:["@this",".index","@event"],s:f}}]}].concat(t.attrs)};t.type&&e.m.push({t:13,n:"class-rtable-"+t.type+"-column"}),(t.filter||t.sort)&&e.m.push({t:13,n:"class-rtable-sortable"});var n=e;return t.hidden&&t.hidden.r&&(n={t:4,n:51,r:t.hidden.r,f:[e]}),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 h=[{t:7,e:"tr",f:d.filter(function(t){return!0!==t.hidden}).map(function(t){var e={t:7,e:"td",f:[{t:16,r:"~/columns."+d.indexOf(t)+".content",c:{r:"."}}],m:t.attrs.slice()};t.type&&e.m.unshift({t:13,n:"class-rtable-"+t.type+"-column"},{t:13,n:"class-rtable-column"}),e.m.find(function(t){return"title"===t.n})||e.m.unshift({t:13,n:"title",f:t.content.find(function(t){return t.e})?t.label:t.content}),0===t.noPad?e.m.push({t:13,n:"class-rtable-no-pad"}):t.noPad&&e.m.push({t:13,n:"class-rtable-no-pad",f:t.noPad});var n=e;return t.hidden&&t.hidden.r&&(n={t:4,n:51,r:t.hidden.r,f:[e]}),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(t&&t.m||E)}];h[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._table_row=h,this._table_head=u;var p=[{t:7,e:"div",f:d.filter(function(t){return!0!==t.hidden}).map(function(t){var e={t:7,e:"div",f:[{t:7,e:"div",f:t.label}],m:[{t:4,n:53,r:"~/columns."+t.index,f:[{t:70,n:["click"],f:{r:["@this",".index","@event"],s:f}}]},{t:13,n:"title",f:t.label}].concat(t.attrs.filter(function(t){return"title"!==t.n}))};t.type&&e.m.push({t:13,n:"class-rtable-"+t.type+"-column"}),(t.filter||t.sort)&&e.m.push({t:13,n:"class-rtable-sortable"}),e.m.push({t:13,n:"class-rtable-column"});var n=e;return t.hidden&&t.hidden.r&&(n={t:4,n:51,r:t.hidden.r,f:[e]}),n}),m:[{t:13,n:"class-row"},{t:13,n:"class-rtable-header"}]}];p[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",f:d.filter(function(t){return!0!==t.hidden}).map(function(t){var e={t:7,e:"div",f:[{t:7,e:"div",f:[{t:16,r:"~/columns."+d.indexOf(t)+".content",c:{r:"."}}]}],m:t.attrs.slice()};t.type&&e.m.unshift({t:13,n:"class-rtable-"+t.type+"-column"}),e.m.push({t:13,n:"class-rtable-column"}),e.m.find(function(t){return"title"===t.n})||e.m.unshift({t:13,n:"title",f:t.content.find(function(t){return t.e})?t.label:t.content}),0===t.noPad?e.m.push({t:13,n:"class-rtable-no-pad"}):t.noPad&&e.m.push({t:13,n:"class-rtable-no-pad",f:t.noPad});var n=e;return t.hidden&&t.hidden.r&&(n={t:4,n:51,r:t.hidden.r,f:[e]}),n}),m:[{t:13,n:"class-row"},{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:t&&t.f?["dblclickd"]:["click","dblclick"],f:{r:["~/rows","~/visibleRows","."],s:"[['selected',_2,_0.indexOf(_2),_1.indexOf(_2)]]"}}].concat(t&&t.m||E)}];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.f&&(g[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.f}],m:[{t:13,n:"class-t1"},{t:13,n:"class-rtable-row-expand"},{t:72,n:"expand",v:"t0"}]}]}),g[0].m.push({t:70,n:["clickd"],f:{r:["@this","@index"],s:"[_0._expand(_1)]"}}));if(e&&e.m&&(b=e.m.find(function(t){return"by"===t.n}))&&("string"==typeof b.f||1===b.length&&2===b[0].t)){var m={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:t&&t.f?["dblclickd"]:["click","dblclick"],f:{r:["~/rows","~/visibleRows","."],s:"[['selected',_2,_0.indexOf(_2),_1.indexOf(_2)]]"}}].concat(e.m.filter(function(t){return"by"!==t.n&&"select"!==t.n}))}],x:{s:"_0&&_1[(_1&&(_2*_3+_4))||_4]",r:["~/showGroups","~/groups","~/page","~/pagination.per","@index"]}};g.unshift(m),this._by=b.f;var v,_=c(e.f).filter(function(t){return!0!==t.hidden}).map(function(t){var e={t:7,e:"div",f:[{t:7,e:"div",f:t.content}],m:t.attrs};t.type&&e.m.unshift({t:13,n:"class-rtable-"+t.type+"-column"}),e.m.push({t:13,n:"class-rtable-column"}),e.m.find(function(t){return"title"===t.n})||e.m.unshift({t:13,n:"title",f:t.content});var n=e;return t.hidden&&t.hidden.r&&(n={t:4,n:51,r:t.hidden.r,f:[e]}),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]"}}]}]}]}]}),(v=e.m.find(function(t){return"select"===t.n}))&&(n||(n=[])).push(Object.assign({},v,{n:"allowGroupSelect"})),(v=e.m.find(function(t){return"show"===t.n}))&&(n||(n=[])).push(Object.assign({},v,{n:"showGroups"})),m.f[0].f=_}this._grid_row=g,this._grid_head=p,n&&this.component&&(this.component.mappings=n)},config:function(){this._items&&this.set(this._items),this._table_row&&(this.partials["table-row"]=this._table_row),this._table_head&&(this.partials["table-head"]=this._table_head),this._grid_row&&(this.partials["grid-row"]=this._grid_row),this._grid_head&&(this.partials["grid-head"]=this._grid_head)},render:function(){this._autoObserver&&this._autoObserver.fire()},selectAll:function(){var t,e;this.allSelected()?(e=null,t=[],this.set({selections:t,selected:e})):(e=(t=this.get("visibleRows").slice())[0],this.set({selections:t,selected:e})),this.fire("selection",{},{item:e,items:t})},selectAllAll:function(){var t=this.get("rows").slice();return this.set({selections:t,selected:null}),this.fire("selection",{},{item:null,items:t}),!1}},observe:{paginate:{handler:function(t){var n=this;if("auto"===t||t instanceof e){this._autoObserver&&this._autoObserver.cancel();var r,i="auto"===t?this.root:t,s=function(){if(n.fragment.rendered){var t=n.find(".rtable-top");if(t)if(n.get("items.length")){var e=t.clientHeight+","+t.clientWidth;if(s.last!==e){var r=n.find(".rtable-header");if(r){var i=Array.apply(null,n.findAll(".rtable-row")).map(function(t){return t.offsetHeight});i.length<2&&(n.set("_paginate",Math.floor(t.clientHeight/r.offsetHeight)),i=Array.apply(null,n.findAll(".rtable-row")).map(function(t){return t.offsetHeight}));var o=Math.ceil(i.reduce(function(t,e){return t+e},0)/i.length);n.set("_paginate",Math.floor((t.clientHeight-r.offsetHeight)/o)),s.last=e}}}else n._autoLenObserver||(n._autoLenObserver=n.observeOnce("items",function(){n._autoLenObserver=0,setTimeout(s)}))}},o=function(){r&&clearTimeout(r),r=setTimeout(function(){s(),r=null},300)};this._autoObserver=i.on("*.resize",o),this._autoObserver.fire=o}else this._autoObserver&&this._autoObserver.cancel();"number"==typeof t&&this.set("_paginate",t)},defer:!0}},data:function(){return{display:"grid",page:0,selections:[],allowSelect:!0,allowSelectAll:!0,showGroups:!0,allowGroupSelect:!0,expanded:null}},computed:{rows:{get:function(){var t=this,n=this.viewmodel.value.columns.filter(function(t){return t.filter}).map(function(n){var r=n.filter;if(0===r.indexOf("~/")&&(r=t.get(r)),"string"==typeof r&&(r=e.splitKeypath(r)),Array.isArray(r))return r}).filter(function(t){return t}),r=this.get("items")||[],i=r,s=this.get("filter"),o=this.get("sort");if("string"==typeof s){var a=s===s.toLowerCase()||s===s.toUpperCase(),l=new RegExp(s,a?"i":"");r=r.filter(function(t){for(var e=n.length;e--;){var r=y(t,n[e]);if(l.test(r))return!0}return!1})}else s instanceof RegExp&&(r=r.filter(function(t){for(var e=n.length;e--;){var r=y(t,n[e]);if(t&&"string"==typeof r&&s.test(r))return!0}}));return"string"==typeof o&&(o=[o]),Array.isArray(o)&&(o=o.map(function(t){return{dir:"-"===t[0]?-1:1,path:e.splitKeypath("-"===t[0]||"+"===t[0]?t.substr(1):t)}}),r.sort(function(t,e){for(var n,r,i,s=0;s<o.length;s++)if(n=y(t,o[s].path),r=y(e,o[s].path),0!==(i=o[s].dir*k(n,r)))return i;return i})),this.set("isFiltered",i.length!==r.length),r}},visibleRows:{get:function(){var t=this,n=this.get("rows"),r=this.get("paginate"),i=this.get("_paginate"),s=this.get("page")||0;return r?("number"!=typeof r&&isNaN(+r)&&(r="auto"===r||r instanceof e?i||1:30),s*r>n.length&&setTimeout(function(){return t.set("page",0)},0),n.slice(r*s,r*s+r)):n}},pagination:{get:function(){var t=this.get("items")||E,e=this.get("rows"),n=this.get("paginate"),r=this.get("page")||0;if("number"!=typeof n&&isNaN(n)&&(n=this.get("_paginate")),n){var i=Math.ceil(e.length/n),s={max:Math.ceil(t.length/n),total:i,per:n};if(s.total>14){var o=s.array=[];r>5?o.push(1,2,3,"..."):o.push(1,2,3,4,5,6,7,8),r>5&&r+6<i?o.push(r-1,r,r+1,r+2,r+3,"...",i-2,i-1,i):r+6<i?o.push("...",i-2,i-1,i):o.push(i-7,i-6,i-5,i-4,i-3,i-2,i-1,i)}else s.array=Array.apply(null,{length:s.total}).map(function(t,e){return e+1});return s}}},groups:{get:function(){for(var t,e,n=this.get("rows"),r={},i=0;i<n.length;i++)(e=n[i][this._by])!=t&&(r[i]=1),t=e;return r}}}});var O=["label","type","filter","hidden","sort","no-pad"],S=/^[a-z]{1,3}[0-9]+(?:-[0-9]+)?$/,E=[];function P(t){return void 0===t&&(t={}),function(e){var n=e.Ractive,r=e.instance;"includeGrid"in t&&n.styleSet("table.inclideGrid",t.includeGrid),r.components[t.name||"data-table"]=x}}i("RMTable","components",x),t.Table=x,t.plugin=P,t.default=P,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.RMTable={},t.Ractive)}(this,function(t,e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var n,r="undefined"!=typeof window?window:null;function i(t,e,n){if(r&&r.Ractive&&"object"==typeof r.Ractive[e]){var i=document.currentScript;if(i||(i=(i=document.querySelectorAll("script"))[i.length-1]),i){var s=i.getAttribute("data-alias");s&&(s=(s=s.split("&")).reduce(function(t,e){var n=e.split("="),r=n[0],i=n[1];return t[r]=i,t},{})),Ractive[e][s&&s[t]||t]=n}}}var s={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}},o={"grid grid-root":/\bgrid grid-root\b/g},a=/\s+/g;function l(t,e){var r,i,l=this.getContext(t),c=this,d=e||{};function f(){var e=t.clientWidth;if(!d.type||"class"===d.type){var n,s=-1;for(var c in r)r[c]<=e&&(o[c].lastIndex=-1,r[c]>s&&(n=c,s=r[c])),t.className=t.className.replace(o[c],"").trim();o[n].test(t.className)||(t.className+=" "+n),d.value&&l.set(d.value,i[n].value),d.name&&l.set(d.name,n),t.className=t.className.replace(a," ")}}function u(){var t=(n||(n=document.createElement("div"),document.body.appendChild(n)),n);for(var e in i=c.get("@style.break")||s,r={},i)t.style.width=i[e].max,r[e]=t.clientWidth,o[e]||(o[e]=new RegExp("\\b"+e+"\\b","g"));t.style.width=0,f()}var h=this.root.on("*.resize",f),p=this.observe("@style.break",u);return t.className+=" grid grid-root",u(),{update:function(t){d=t||{},f()},teardown:function(){t.className=t.className.replace(o["grid grid-root"],"").trim(),h.cancel(),p.cancel()}}}function c(t,e){var n,r=t("raui.grid.break")||e||s,i=".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: "+(t("raui.grid.padding")||"0.5em")+"; }\n.grid .row > .pad { display: flex; flex-direction: column; padding: "+(t("raui.grid.padding")||"0.5em")+"; box-sizing: border-box; }",o=Object.keys(r).map(function(t){return(r[t].key=t)&&r[t]});o.sort(function(t,e){return t.value>e.value?1:t.value<e.value?-1:0});var a={};o.reverse().reduce(function(t,e){return t.push(e.key),a[e.key]=t.slice(),t},[]);var l="",c="";return o.reverse().forEach(function(t){var e=t.prefix||t.key[0];i+="\n"+a[t.key].map(function(t){return"."+t+" > ."+e+"0, ."+t+" > .row > ."+e+"0, ."+t+" ."+e+"-n0"}).join(", ")+" { width: 0; overflow: hidden; }",t.units.forEach(function(r){c+="\n"+a[t.key].map(function(t){return"."+t+" > "+e+"1, ."+t+" > .row > ."+e+"1, ."+t+" "+e+"-n1"}).join(", ")+" { width: 100%; }";for(var i=function(i){n=(n=""+i/r*100).substr(0,n.indexOf(".")+3),l+="\n"+a[t.key].map(function(t){return"."+t+" > .row-"+e+i+"-"+r+" > *, ."+t+" .row-"+e+"-n"+i+"-"+r+" > *, ."+t+" .row-"+e+"-n"+i+"-"+r+" > *"}).join(", ")+" { width: "+n+"%; }",c+="\n"+a[t.key].map(function(t){return"."+t+" > ."+e+i+"-"+r+", ."+t+" > .row > ."+e+i+"-"+r+", ."+t+" ."+e+"-n"+i+"-"+r+", ."+t+" .row > ."+e+"-n"+i+"-"+r}).join(", ")+" { width: "+n+"%; }"},s=1;s<r;s++)i(s)})}),i+=l+c}l.style=c,i("grid","decorators",l);var d=250;function f(t){return void 0===t&&(t={}),function(e){var n=e.Ractive;e.instance.events[t.name||(t.count||"")+"clicks"]=function(e,r,i){var s,o=Object.assign({},t,i);return(s=e.__r_clicks__)?s.subscribe(o.count||1,!!o.hold,r):(s=new u(n.getContext(e),o.delay||d,o.bubble||!1),e.__r_clicks__=s,s.subscribe(o.count||1,!!o.hold,r)),{teardown:function(){s.unsubscribe(o.count||1,!!o.hold,r)}}}}}f({name:"click",count:1}),f({name:"dblclick",count:2}),f({name:"trpclick",count:3});var u=function(t,e,n){this.context=t,this.node=t.node,this.delay=e,this.fires={},this.refs=0,this.bubble=n,this.bind()};function h(t){return this.__r_clicks__.mousedown(t)}function p(t){return this.__r_clicks__.touchdown(t)}function m(){this.addEventListener("keydown",b,!1),this.addEventListener("blur",g,!1)}function g(){this.removeEventListener("keydown",b,!1),this.removeEventListener("blur",g,!1)}function b(t){if(32===t.which||10===t.which||13===t.which)return this.__r_clicks__.fire()}function v(t,e){var n=t.processParams(e,{duration:200,easing:"easeInOut"});t.setStyle("overflow","hidden");var r="x"===n.axis?"width":"height";if(t.isIntro){var i=t.getStyle(r);return t.setStyle(r,0),t.setStyle("opacity",0),t.animateStyle(r,i,n).then(function(){return t.animateStyle("opacity",1,n)})}return t.setStyle(r,t.getStyle(r)),t.setStyle("opacity",1),t.animateStyle("opacity",0,n).then(function(){return t.animateStyle(r,0,n)})}u.prototype.subscribe=function(t,e,n){(this.fires[t+","+e]||(this.fires[t+","+e]=[])).push(n),this.refs++},u.prototype.unsubscribe=function(t,e,n){var r=this.fires[t+","+e]||[];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",h):window.navigator.msPointerEnabled?this.context.listen("MSPointerDown",h):(this.context.listen("mousedown",h),this.context.listen("touchstart",p)),"A"!==this.node.tagName&&"BUTTON"!==this.node.tagName&&"button"!==this.node.type&&"submit"!==this.node.type||this.context.listen("focus",m)},u.prototype.fire=function(t,e,n,r){var i=this;this.tm?(this.tmCount++,clearTimeout(this.tm)):this.tmCount=1;var s=function(){i.tm=null,(i.fires[i.tmCount+","+!!r]||[]).forEach(function(s){s({node:i.node,original:t,x:e,y:n,hold:!!r})})};return r?s():this.tm=setTimeout(s,this.delay),this.bubble},u.prototype.mousedown=function(t){var e=this;if(!this.preventMousedownEvents&&(void 0===t.which||1===t.which)){var n,r=t.clientX,i=t.clientY,s=t.pointerId,o=function(t){t.pointerId==s&&(e.fire(t,r,i),l())},a=function(t){t.pointerId==s&&(Math.abs(t.clientX-r)>=5||Math.abs(t.clientY-i)>=5)&&l()},l=function(){n&&clearTimeout(n),e.node.removeEventListener("MSPointerUp",o,!1),document.removeEventListener("MSPointerMove",a,!1),document.removeEventListener("MSPointerCancel",l,!1),e.node.removeEventListener("pointerup",o,!1),document.removeEventListener("pointermove",a,!1),document.removeEventListener("pointercancel",l,!1),e.node.removeEventListener("click",o,!1),document.removeEventListener("mousemove",a,!1)};return window.PointerEvent||window.navigator.pointerEnabled?(this.node.addEventListener("pointerup",o,!1),document.addEventListener("pointermove",a,!1),document.addEventListener("pointercancel",l,!1)):window.navigator.msPointerEnabled?(this.node.addEventListener("MSPointerUp",o,!1),document.addEventListener("MSPointerMove",a,!1),document.addEventListener("MSPointerCancel",l,!1)):(this.node.addEventListener("click",o,!1),document.addEventListener("mousemove",a,!1)),n=setTimeout(function(){l(),e.fire(t,r,i,!0)},400),this.bubble||t.stopPropagation(),this.bubble}},u.prototype.touchdown=function(t){var e,n=this,r=t.touches[0],i=r.clientX,s=r.clientY,o=r.identifier,a=function(t){t.changedTouches[0].identifier===o?(t.preventDefault(),n.preventMousedownEvents=!0,clearTimeout(n.preventMousedownTimeout),n.preventMousedownTimeout=setTimeout(function(){n.preventMousedownEvents=!1},400),n.fire(t,i,s),c()):c()},l=function(t){1===t.touches.length&&t.touches[0].identifier===o||c();var e=t.touches[0];(Math.abs(e.clientX-i)>=5||Math.abs(e.clientY-s)>=5)&&c()},c=function(){e&&clearTimeout(e),n.node.removeEventListener("touchend",a,!1),window.removeEventListener("touchmove",l,!1),window.removeEventListener("touchcancel",c,!1)};return this.node.addEventListener("touchend",a,!1),window.addEventListener("touchmove",l,!1),window.addEventListener("touchcancel",c,!1),e=setTimeout(function(){c(),n.fire(t,i,s,!0)},400),this.bubble||t.stopPropagation(),this.bubble},u.prototype.teardown=function(){var t=this.context;t.unlisten("pointerdown",h),t.unlisten("MSPointerDown",h),t.unlisten("mousedown",h),t.unlisten("touchstart",p),t.unlisten("focus",m),delete this.node.__r_clicks__},i("expand","transitions",v);var _,w=/^([-+])?([^\s]+)$/,x=function(t){function e(e){t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.allSelected=function(){for(var t=this.get("selections"),e=this.get("visibleRows"),n=0;n<e.length;n++)if(!~t.indexOf(e[n]))return!1;return e.length&&!0},e.prototype.nodeSet=function(t,e,n){t[e]=n},e.prototype._expand=function(t){var e=this.get("visibleRows")[t];this.get("expanded")===e?this.set("expanded",null):this.set("expanded",e)},e.prototype._setSort=function(t,e){var n=this.get("columns."+t);if(n&&(n.sort||n.filter)){var r=n.sort||n.filter;"string"==typeof r&&"~"===r[0]&&(r=this.get(r));var i=e.ctrlKey,s=this.get("sort");if(Array.isArray(r)||(r=[r]),s?Array.isArray(s)||(s=[s]):s=[],s.length){var o=s.map(function(t){return w.exec(t).slice(1)}),a=r.reduce(function(t,e){return t&&!!o.find(function(t){return t[1]===e})},!0);a&&s.length!==r.length&&!i?this.set("sort",r.map(function(t){return"+"+r})):i?a?this.set("sort",o.map(function(t){return~r.indexOf(t[1])?("+"===t[0]?"-":"+")+t[1]:t[0]+t[1]})):this.set("sort",s.concat(r.map(function(t){return"+"+t}))):a?this.set("sort",o.map(function(t){return("+"===t[0]?"-":"+")+t[1]})):this.set("sort",r.map(function(t){return"+"+t}))}else this.set("sort",r.map(function(t){return"+"+t}))}},e.prototype._select=function(t,e){var n=this.get("selections");n||(n=[],this.set("selections",n));var r=n.indexOf(t);~r?this.splice("selections",r,1):this.push("selections",t),(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 e.target.checked=!~r})},e.prototype.select=function(){var t=this.get("selected");t&&this.fire("selected",{},t,this.get("rows").indexOf(t),this.get("visibleRows").indexOf(t))},e.prototype.selectionOffset=function(t){var e=this.get("selected"),n=this.get("visibleRows");if(e&&~n.indexOf(e)){var r=n.indexOf(e);if(t>0?r+t>=n.length:r+t<0){var i=t<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 s=t>0?n[0]:n[n.length-1];this.set({selected:s,selections:[s]})}else this.set({selected:n[r+t],selections:[n[r+t]]})}else{var o=t>0?n[0]:n[n.length-1];this.set({selected:o,selections:[o]})}this.fire("selection",{},{item:this.get("selected"),items:this.get("selections")})},e.prototype.selectionDown=function(){this.selectionOffset(1)},e.prototype.selectionUp=function(){this.selectionOffset(-1)},e.prototype._selectGroup=function(t){var e=t;this.get("page")&&(e+=this.get("page")*this.get("pagination.per"));var n,r=this.get("rows"),i=this.get("groups"),s=this.get("selections"),o=r[e++],a=["selections"],l=[];for(~(n=s.indexOf(o))?l.push(n):a.push(o);e<r.length&&!(e in i);)o=r[e++],~(n=s.indexOf(o))?l.push(n):a.push(o);if(1===a.length)for(n=l.length;n--;)this.splice("selections",l[n],1);else this.push.apply(this,a)},e.prototype._groupSelected=function(t){var e=t;this.get("page")&&(e+=this.get("page")*this.get("pagination.per"));var n=this.get("rows"),r=this.get("groups"),i=this.get("selections");if(!~i.indexOf(n[e++]))return!1;for(;e<n.length&&!(e in r);)if(!~i.indexOf(n[e++]))return!1;return!0},e}(e);function y(t,e){if(!e.length||"object"==typeof t){for(var n=t,r=0;r<e.length;r++)if("object"!=typeof(n=n[e[r]]))return r+1<e.length?void 0:n;return n}}function k(t,e){return t<e?-1:t>e?1:t==e?0:!t&&e?-1:t&&!e?1:0}e.extendWith(x,{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"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtable-top",g:1}],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:8,r:"pagination"}]}],e:{'_0==="virtual"':function(t){return"virtual"===t},'_0==="auto"':function(t){return"auto"===t},'_0==="grid"':function(t){return"grid"===t},"[_0._setSort(_1,_2)]":function(t,e,n){return[t._setSort(e,n)]},"[_0._select(_1,_2),false]":function(t,e,n){return[t._select(e,n),!1]},'[["select",_2,_0.indexOf(_2),_1.indexOf(_2)]]':function(t,e,n){return[["select",n,t.indexOf(n),e.indexOf(n)]]},"[_0._expand(_1)]":function(t,e){return[t._expand(e)]},"_0.indexOf(_1)":function(t,e){return t.indexOf(e)},"_0===_1":function(t,e){return t===e},"_0*_1+1":function(t,e){return t*e+1},"_2+1===_0?_1:(_2+1)*_3":function(t,e,n,r){return n+1===t?e:(n+1)*r},"_0&&_1":function(t,e){return t&&e},"_0===1":function(t){return 1===t},"_0.allSelected()&&_1<_2":function(t,e,n){return t.allSelected()&&e<n},"_0>0":function(t){return t>0},'[_0.set("page",_1-1)]':function(t,e){return[t.set("page",e-1)]},'[(/^\\d+$/.test(_1)&&+_1>0&&+_1<=_0&&_2.set("page",+_1-1))||_2.nodeSet(_3,"value",_4+1)]':function(t,e,n,r,i){return[/^\d+$/.test(e)&&+e>0&&+e<=t&&n.set("page",+e-1)||n.nodeSet(r,"value",i+1)]},"_0==_1+1":function(t,e){return t==e+1},'[_0.set("page",_2[_1-1])]':function(t,e,n){return[t.set("page",n[e-1])]},'_0==="..."':function(t){return"..."===t},'[_0.set("page",_1+1)]':function(t,e){return[t.set("page",e+1)]},"_0<_1-1":function(t,e){return t<e-1},"!_0":function(t){return!t},"_0+(_1?1:0)":function(t,e){return t+(e?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)]"}}]}," ",{t:4,f:["..."],n:50,x:{r:["~/selections","."],s:"_0.indexOf(_1)"}}," ",{t:4,f:["..."],n:50,x:{r:[".","~/expanded"],s:"_0===_1"}}],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}],f:[{t:8,r:"grid-head"}," ",{t:4,f:[{t:8,r:"grid-row"}],n:52,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"}],f:[{t:8,r:"table-head"}," ",{t:4,f:[{t:8,r:"table-row"}],n:52,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(t){return[function(t){var e=Object.assign({},t("raui.primary"),t("raui.table.primary")),n=Object.assign({},e,t("raui.primary.active"),t("raui.table.primary.active")),r=Object.assign({selected:{}},t("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.4em 0.3em 0.2em 0.3em;\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 {\n font-weight: bold;\n }\n \n .rtable-number-column {\n text-align: right;\n }\n .rtable-date-column {\n text-align: right;\n }\n \n .rtable-header {\n border-bottom: 1px solid "+(r.divider||e.bc||"#ccc")+";\n text-align: left;\n }\n \n .rtable-header > th {\n padding: 0.3em 0.5em 1em 0.5em;\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 .rtable-row {\n color: "+(e.fg||"#222")+";\n border-bottom: 1px solid "+(r.divider||e.bc||"#ccc")+";\n background-color: "+(r.even||e.bga||"#f4f4f4")+";\n transition: 0.2s ease-in-out;\n transition-property: background-color, color;\n }\n .rtable-row:nth-child(odd) {\n background-color: "+(r.odd||e.bg||"#fff")+";\n }\n .rtable-row:last-of-type {\n border-bottom: none;\n }\n .rtable-row:hover {\n background-color: "+(r.over||n.bg||"#eee")+";\n }\n \n .rtable-row.rtable-selected {\n background-color: "+(r.selected.bg||"rgba(0, 119, 238, 0.12)")+";\n color: "+(r.selected.fg||e.fg||"#222")+";\n }\n .rtable-row.rtable-selected:nth-child(odd) {\n background-color: "+(r.selected.odd||"rgba(0, 119, 238, 0.1)")+";\n }\n \n .rtable-border .rtable-row .rtable-column:nth-child(n+2),\n .rtable-border .rtable-group .rtable-column:nth-child(n+2) {\n border-left: 1px solid "+(r.divider||e.bc||"#ccc")+";\n }\n \n .rtable-border .rtable-row-expand {\n border-top: 1px solid "+(r.divider||e.bc||"#ccc")+";\n }\n \n .rtable-group {\n border-bottom: 2px solid "+(r.divider||e.bc||"#ccc")+";\n }\n \n .rtable-top {\n flex-grow: 5;\n flex-shrink: 1;\n overflow-y: auto;\n margin: 0.5em 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 "+(e.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: "+(e.fga||"#07e")+";\n border-top-color: transparent;\n border-right-color: transparent;\n transform: rotate(-50deg);\n }\n .row > .rtable-select-header,\n .row > .rtable-select-row {\n text-align: center;\n width: 1.5em;\n }\n .rtable-select-header .rtable-select:before {\n margin-top: -1em;\n }\n .rtable-select-header .rtable-select:checked:before {\n border-color: "+(e.fg||"#222")+";\n border-top-color: transparent;\n border-right-color: transparent;\n }\n \n .rtable-column button, .rtable-column .btn {\n font-size: 0.75em;\n padding: 0 0.5em;\n margin: 0.2em 0.5em;\n min-height: 0;\n }\n "+(!1!==t("table.includeGrid")?c(t):"")}.call(this,t)].join(" ")},cssId:"rtable",noCssTransform:!0,attributes:["paginate","items","filter","sort","helpers","fixed","display","allowSelect","allowSelectAll","border"],components:{table:!1,Table:!1},syncComputedChildren:!0,decorators:{grid:l},events:{},use:[f({name:"clickd",count:1}),f({name:"dblclickd",count:2}),(void 0===_&&(_={}),function(t){t.instance.transitions[_.name||"expand"]=v})],on:{construct:function(){var t,e,n,r=this.component;if(!r)return;var i=r.template.f||[],s=r.template.m?r.template.m.slice():[],o=r.template;r.template={e:o.e,f:o.f,t:o.t,m:s};var a=0;function l(t,e){if(t&&t.f&&1===t.f.length&&2===t.f[0].t){var n="_a"+a++;return s.push({t:13,n:n,f:t.f}),e?{t:[{t:2,r:"~/"+n}]}:{t:2,r:"~/"+n}}return t&&t.f}function c(t){var e=[];return t.forEach(function(t){if("column"===t.e){var n={},r=t.m||E;n.index=e.length,e.push(n),n.content=(t.f||[]).filter(function(t){return"edit"!==t.e}),n.label=r.find(function(t){return"label"===t.n}),n.label&&n.label.f&&(n.label=l(n.label)),n.label||(n.label=""),Array.isArray(n.label)||(n.label=[n.label]),n.type=r.find(function(t){return"type"===t.n}),n.type&&n.type.f&&(n.type=n.type.f),n.type||(n.type="string"),n.filter=r.find(function(t){return"filter"===t.n}),n.filter&&n.filter.f&&(n.filter=l(n.filter),n.filter.r&&(n.filter=n.filter.r)),n.sort=r.find(function(t){return"sort"===t.n}),n.sort&&n.sort.f&&(n.sort=l(n.sort),n.sort.r&&(n.sort=n.sort.r)),n.hidden=r.find(function(t){return"hidden"===t.n}),n.hidden&&0===n.hidden.f?n.hidden=!0:n.hidden&&"object"==typeof n.hidden.f?n.hidden=l(n.hidden):n.hidden=!1,"string"==typeof n.hidden&&(n.hidden=!1),n.noPad=r.find(function(t){return"no-pad"===t.n}),n.noPad&&0===n.noPad.f?n.noPad=0:n.noPad&&"object"==typeof n.noPad.f?n.noPad=l(n.noPad):delete n.noPad,n.attrs=r.filter(function(t){return!~O.indexOf(t.n)}),n.attrs.forEach(function(t,e){S.test(t.n)&&(n.attrs[e]={t:13,n:"class-"+t.n})})}}),e}t=i.find(function(t){return"row"===t.e}),e=i.find(function(t){return"group"===t.e});var d=c(i);this._items={columns:d};var f="[_0._setSort(_1,_2)]",u=[{t:7,e:"tr",m:[{t:13,n:"class-rtable-header"}],f:d.filter(function(t){return!0!==t.hidden}).map(function(t){var e={t:7,e:"th",f:t.label,m:[{t:13,n:"class-rtable-header"},{t:4,n:53,r:"~/columns."+t.index,f:[{t:70,n:["click"],f:{r:["@this",".index","@event"],s:f}}]}].concat(t.attrs)};t.type&&e.m.push({t:13,n:"class-rtable-"+t.type+"-column"}),(t.filter||t.sort)&&e.m.push({t:13,n:"class-rtable-sortable"});var n=e;return t.hidden&&t.hidden.r&&(n={t:4,n:51,r:t.hidden.r,f:[e]}),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 h=[{t:7,e:"tr",f:d.filter(function(t){return!0!==t.hidden}).map(function(t){var e={t:7,e:"td",f:[{t:16,r:"~/columns."+d.indexOf(t)+".content",c:{r:"."}}],m:t.attrs.slice()};t.type&&e.m.unshift({t:13,n:"class-rtable-"+t.type+"-column"},{t:13,n:"class-rtable-column"}),e.m.find(function(t){return"title"===t.n})||e.m.unshift({t:13,n:"title",f:t.content.find(function(t){return t.e})?t.label:t.content}),0===t.noPad?e.m.push({t:13,n:"class-rtable-no-pad"}):t.noPad&&e.m.push({t:13,n:"class-rtable-no-pad",f:t.noPad});var n=e;return t.hidden&&t.hidden.r&&(n={t:4,n:51,r:t.hidden.r,f:[e]}),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(t&&t.m||E)}];h[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._table_row=h,this._table_head=u;var p=[{t:7,e:"div",f:d.filter(function(t){return!0!==t.hidden}).map(function(t){var e={t:7,e:"div",f:[{t:7,e:"div",f:t.label}],m:[{t:4,n:53,r:"~/columns."+t.index,f:[{t:70,n:["click"],f:{r:["@this",".index","@event"],s:f}}]},{t:13,n:"title",f:t.label}].concat(t.attrs.filter(function(t){return"title"!==t.n}))};t.type&&e.m.push({t:13,n:"class-rtable-"+t.type+"-column"}),(t.filter||t.sort)&&e.m.push({t:13,n:"class-rtable-sortable"}),e.m.push({t:13,n:"class-rtable-column"});var n=e;return t.hidden&&t.hidden.r&&(n={t:4,n:51,r:t.hidden.r,f:[e]}),n}),m:[{t:13,n:"class-row"},{t:13,n:"class-rtable-header"}]}];p[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 m,g=[{t:7,e:"div",f:d.filter(function(t){return!0!==t.hidden}).map(function(t){var e={t:7,e:"div",f:[{t:7,e:"div",f:[{t:16,r:"~/columns."+d.indexOf(t)+".content",c:{r:"."}}]}],m:t.attrs.slice()};t.type&&e.m.unshift({t:13,n:"class-rtable-"+t.type+"-column"}),e.m.push({t:13,n:"class-rtable-column"}),e.m.find(function(t){return"title"===t.n})||e.m.unshift({t:13,n:"title",f:t.content.find(function(t){return t.e})?t.label:t.content}),0===t.noPad?e.m.push({t:13,n:"class-rtable-no-pad"}):t.noPad&&e.m.push({t:13,n:"class-rtable-no-pad",f:t.noPad});var n=e;return t.hidden&&t.hidden.r&&(n={t:4,n:51,r:t.hidden.r,f:[e]}),n}),m:[{t:13,n:"class-row"},{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:t&&t.f?["dblclickd"]:["click","dblclick"],f:{r:["~/rows","~/visibleRows","."],s:"[['selected',_2,_0.indexOf(_2),_1.indexOf(_2)]]"}}].concat(t&&t.m||E)}];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.f&&(g[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.f}],m:[{t:13,n:"class-t1"},{t:13,n:"class-rtable-row-expand"},{t:72,n:"expand",v:"t0"}]}]}),g[0].m.push({t:70,n:["clickd"],f:{r:["@this","@index"],s:"[_0._expand(_1)]"}}));if(e&&e.m&&(m=e.m.find(function(t){return"by"===t.n}))&&("string"==typeof m.f||1===m.length&&2===m[0].t)){var b={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:t&&t.f?["dblclickd"]:["click","dblclick"],f:{r:["~/rows","~/visibleRows","."],s:"[['selected',_2,_0.indexOf(_2),_1.indexOf(_2)]]"}}].concat(e.m.filter(function(t){return"by"!==t.n&&"select"!==t.n}))}],x:{s:"_0&&_1[(_1&&(_2*_3+_4))||_4]",r:["~/showGroups","~/groups","~/page","~/pagination.per","@index"]}};g.unshift(b),this._by=m.f;var v,_=c(e.f).filter(function(t){return!0!==t.hidden}).map(function(t){var e={t:7,e:"div",f:[{t:7,e:"div",f:t.content}],m:t.attrs};t.type&&e.m.unshift({t:13,n:"class-rtable-"+t.type+"-column"}),e.m.push({t:13,n:"class-rtable-column"}),e.m.find(function(t){return"title"===t.n})||e.m.unshift({t:13,n:"title",f:t.content});var n=e;return t.hidden&&t.hidden.r&&(n={t:4,n:51,r:t.hidden.r,f:[e]}),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]"}}]}]}]}]}),(v=e.m.find(function(t){return"select"===t.n}))&&(n||(n=[])).push(Object.assign({},v,{n:"allowGroupSelect"})),(v=e.m.find(function(t){return"show"===t.n}))&&(n||(n=[])).push(Object.assign({},v,{n:"showGroups"})),b.f[0].f=_}this._grid_row=g,this._grid_head=p,n&&this.component&&(this.component.mappings=n)},config:function(){this._items&&this.set(this._items),this._table_row&&(this.partials["table-row"]=this._table_row),this._table_head&&(this.partials["table-head"]=this._table_head),this._grid_row&&(this.partials["grid-row"]=this._grid_row),this._grid_head&&(this.partials["grid-head"]=this._grid_head)},render:function(){this._autoObserver&&this._autoObserver.fire()},selectAll:function(){var t,e;this.allSelected()?(e=null,t=[],this.set({selections:t,selected:e})):(e=(t=this.get("visibleRows").slice())[0],this.set({selections:t,selected:e})),this.fire("selection",{},{item:e,items:t})},selectAllAll:function(){var t=this.get("rows").slice();return this.set({selections:t,selected:null}),this.fire("selection",{},{item:null,items:t}),!1}},observe:{paginate:{handler:function(t){var n=this;if("auto"===t||t instanceof e){this._autoObserver&&this._autoObserver.cancel();var r,i="auto"===t?this.root:t,s=function(){if(n.fragment.rendered){var t=n.find(".rtable-top");if(t)if(n.get("items.length")){var e=t.clientHeight+","+t.clientWidth;if(s.last!==e){var r=n.find(".rtable-header");if(r){var i=Array.apply(null,n.findAll(".rtable-row")).map(function(t){return t.offsetHeight});i.length<2&&(n.set("_paginate",Math.floor(t.clientHeight/r.offsetHeight)),i=Array.apply(null,n.findAll(".rtable-row")).map(function(t){return t.offsetHeight}));var o=Math.ceil(i.reduce(function(t,e){return t+e},0)/i.length);n.set("_paginate",Math.floor((t.clientHeight-r.offsetHeight)/o)),s.last=e}}}else n._autoLenObserver||(n._autoLenObserver=n.observeOnce("items",function(){n._autoLenObserver=0,setTimeout(s)}))}},o=function(){r&&clearTimeout(r),r=setTimeout(function(){s(),r=null},300)};this._autoObserver=i.on("*.resize",o),this._autoObserver.fire=o}else this._autoObserver&&this._autoObserver.cancel();"number"==typeof t&&this.set("_paginate",t)},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 t=this,n=this.viewmodel.value.columns.filter(function(t){return t.filter}).map(function(n){var r=n.filter;if(0===r.indexOf("~/")&&(r=t.get(r)),"string"==typeof r&&(r=e.splitKeypath(r)),Array.isArray(r))return r}).filter(function(t){return t}),r=this.get("items")||[],i=r,s=this.get("filter"),o=this.get("sort");if("string"==typeof s){var a=s===s.toLowerCase()||s===s.toUpperCase(),l=new RegExp(s,a?"i":"");r=r.filter(function(t){for(var e=n.length;e--;){var r=y(t,n[e]);if(l.test(r))return!0}return!1})}else s instanceof RegExp&&(r=r.filter(function(t){for(var e=n.length;e--;){var r=y(t,n[e]);if(t&&"string"==typeof r&&s.test(r))return!0}}));return"string"==typeof o&&(o=[o]),Array.isArray(o)&&(o=o.map(function(t){return{dir:"-"===t[0]?-1:1,path:e.splitKeypath("-"===t[0]||"+"===t[0]?t.substr(1):t)}}),r.sort(function(t,e){for(var n,r,i,s=0;s<o.length;s++)if(n=y(t,o[s].path),r=y(e,o[s].path),0!==(i=o[s].dir*k(n,r)))return i;return i})),this.set("isFiltered",i.length!==r.length),r}},visibleRows:{get:function(){var t=this,n=this.get("rows"),r=this.get("paginate"),i=this.get("_paginate"),s=this.get("page")||0;return r?("number"!=typeof r&&isNaN(+r)&&(r="auto"===r||r instanceof e?i||1:30),r<this.get("minPerPage")&&(r=this.get("minPerPage")),s*r>n.length&&setTimeout(function(){return t.set("page",0)},0),n.slice(r*s,r*s+r)):n}},pagination:{get:function(){var t=this.get("items")||E,e=this.get("rows"),n=this.get("paginate"),r=this.get("page")||0;if("number"!=typeof n&&isNaN(n)&&(n=this.get("_paginate")),n<this.get("minPerPage")&&(n=this.get("minPerPage")),n){var i=Math.ceil(e.length/n),s={max:Math.ceil(t.length/n),total:i,per:n};if(s.total>14){var o=s.array=[];r>5?o.push(1,2,3,"..."):o.push(1,2,3,4,5,6,7,8),r>5&&r+6<i?o.push(r-1,r,r+1,r+2,r+3,"...",i-2,i-1,i):r+6<i?o.push("...",i-2,i-1,i):o.push(i-7,i-6,i-5,i-4,i-3,i-2,i-1,i)}else s.array=Array.apply(null,{length:s.total}).map(function(t,e){return e+1});return s}}},groups:{get:function(){for(var t,e,n=this.get("rows"),r={},i=0;i<n.length;i++)(e=n[i][this._by])!=t&&(r[i]=1),t=e;return r}}}});var O=["label","type","filter","hidden","sort","no-pad"],S=/^[a-z]{1,3}[0-9]+(?:-[0-9]+)?$/,E=[];function P(t){return void 0===t&&(t={}),function(e){var n=e.Ractive,r=e.instance;"includeGrid"in t&&n.styleSet("table.inclideGrid",t.includeGrid),r.components[t.name||"data-table"]=x}}i("RMTable","components",x),t.Table=x,t.plugin=P,t.default=P,Object.defineProperty(t,"__esModule",{value:!0})});

@@ -183,3 +183,3 @@ (function (global, factory) {

var window = Object.assign({ host: {}, title: {} }, data('raui.window'));
return ("\n .rwhost {\n position: relative;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n \n .rwhost-sizer {\n position: absolute;\n }\n \n .rwhost-pane {\n display: flex;\n position: relative;\n width: 100%;\n box-sizing: border-box;\n flex-grow: 2;\n overflow: auto;\n background-color: " + (window.host.bg || primary.bg || '#fff') + ";\n z-index: 1;\n }\n \n .rwhost-pane-content {\n flex-grow: 1;\n }\n \n .rwhost-modal {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n z-index: -1;\n opacity: 0;\n transition: opacity 0.2s ease-in-out, z-index 0s linear 0.2s;\n background-color: #000;\n }\n .rwhost-modal-active {\n opacity: 0.5;\n z-index: 1;\n transition: opacity 0.2s ease-in-out, z-index 0s linear;\n }\n \n .rwindow-wrapper {\n display: inline-block;\n box-sizing: border-box;\n position: absolute;\n }\n .rwindow-wrapper.rwindow-resizing {\n transition: none;\n }\n \n .rwindow-wrapper.rwindow-resizable {\n padding: " + (window.handleSize || 7) + "px;\n }\n \n .rwindow-topmost > .rwindow {\n box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12), 0 3px 5px -1px rgba(0, 0, 0, 0.3);\n opacity: 1;\n }\n \n .rwindow-modal {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background-color: rgba(0, 0, 0, 0.5);\n opacity: 0;\n z-index: -1;\n transition: opacity 0.4s ease-in-out, z-index 0s linear 0.4s;\n }\n .rwindow-modal.rwindow-blocked {\n opacity: 1;\n z-index: 10;\n transition: opacity 0.4s ease-in-out, z-index 0s linear;\n }\n \n .rwindow {\n position: relative;\n box-sizing: border-box;\n background-color: " + (window.bg || primary.bg || '#fff') + ";\n color: " + (window.fg || primary.fg || '#222') + ";\n box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n border-radius: 2px;\n overflow: hidden;\n width: 100%;\n height: 100%;\n opacity: 0.8;\n min-width: " + (window.minWidth || '6em') + ";\n min-height: " + (window.minHeight || '6em') + ";\n transition: box-shadow 0.4s ease-in-out, opacity 0.4s ease-in-out;\n }\n .rwindow-max > .rwindow {\n border-radius: 0;\n box-shadow: none;\n }\n \n .rwindow-pane-top,\n .rwindow-max-top {\n background-color: " + (window.title.bg || primary.fga || '#07e') + ";\n color: " + (window.title.fg || primary.bg || '#fff') + ";\n flex-shrink: 0;\n }\n \n .rwindow-max-top {\n flex-shrink: 2;\n }\n \n .rwindow-pane-top {\n display: flex;\n align-items: center;\n }\n \n .rwindow-pane {\n display: flex;\n flex-direction: column;\n table-layout: fixed;\n width: 100%;\n height: 100%;\n }\n .rwindow-autosizing {\n display: block;\n box-sizing: border-box;\n }\n .rwindow-content {\n overflow: auto;\n flex-grow: 2;\n position: relative;\n box-sizing: border-box;\n }\n .rwindow-content.rwindow-pad {\n padding: 1em;\n }\n .rwindow-content.rwindow-flex {\n display: flex;\n flex-direction: column;\n }\n \n .rwindow-buttons {\n display: flex;\n flex-shrink: 0;\n padding: 0.5em;\n border-top: 1px solid " + (window.title.bg || primary.fga || '#07e') + ";\n }\n .rwindow-buttons.no-buttons {\n display: none;\n }\n .rwindow-left-buttons {\n text-align: left;\n flex-grow: 2;\n }\n .rwindow-left-buttons button {\n margin-right: 0.5em;\n }\n .rwindow-center-buttons {\n text-align: center;\n flex-shrink: 2;\n }\n .rwindow-center-buttons button {\n margin: 0 0.25em;\n }\n .rwindow-right-buttons {\n text-align: right;\n flex-grow: 2;\n }\n .rwindow-right-buttons button {\n margin-left: 0.5em;\n }\n \n .rwindow-title {\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 0.5em;\n white-space: nowrap;\n box-sizing: border-box;\n flex-grow: 1;\n }\n \n .rwindow-controls {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n flex-grow: 1;\n }\n .rwindow-controls > div {\n margin: 0 1em 0 0;\n width: 0.7em;\n height: 0.7em;\n cursor: pointer;\n }\n .rwindow-minimize {\n border-bottom: 2px solid;\n }\n .rwindow-maximize {\n border: 2px solid;\n }\n .rwindow-controls > .rwindow-close {\n width: 0.5em;\n height: 1em;\n border-right: 2px solid;\n transform: rotate(45deg);\n transform-origin: center right;\n position: relative;\n margin-right: 1.5em;\n }\n .rwindow-close:before {\n cursor: pointer;\n height: 1.2em;\n width: 1.2em;\n top: 0.3em;\n left: 0.1em;\n content: ' ';\n transform: rotate(-45deg);\n transform-origin: center left;\n position: absolute;\n }\n .rwindow-close:after {\n cursor: pointer;\n height: 100%;\n width: 100%;\n top: 1px;\n left: calc(100% + 1px);\n content: ' ';\n border-left: 2px solid;\n transform: rotate(-90deg);\n transform-origin: center left;\n position: absolute;\n }\n " + (typeof data('raui.window.extra') === 'function' ? data('raui.window.extra').call(this, data) : '') + "\n ");
return ("\n .rwhost {\n position: relative;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n \n .rwhost-sizer {\n position: absolute;\n }\n \n .rwhost-pane {\n display: flex;\n position: relative;\n width: 100%;\n box-sizing: border-box;\n flex-grow: 2;\n overflow: auto;\n background-color: " + (window.host.bg || primary.bg || '#fff') + ";\n z-index: 1;\n }\n \n .rwhost-pane-content {\n flex-grow: 1;\n }\n \n .rwhost-modal {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n z-index: -1;\n opacity: 0;\n transition: opacity 0.2s ease-in-out, z-index 0s linear 0.2s;\n background-color: #000;\n }\n .rwhost-modal-active {\n opacity: 0.5;\n z-index: 1;\n transition: opacity 0.2s ease-in-out, z-index 0s linear;\n }\n \n .rwindow-wrapper {\n display: inline-block;\n box-sizing: border-box;\n position: absolute;\n }\n .rwindow-wrapper.rwindow-resizing {\n transition: none;\n }\n \n .rwindow-wrapper.rwindow-resizable {\n padding: " + (window.handleSize || 7) + "px;\n }\n \n .rwindow-topmost > .rwindow {\n box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12), 0 3px 5px -1px rgba(0, 0, 0, 0.3);\n opacity: 1;\n }\n \n .rwindow-modal {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background-color: rgba(0, 0, 0, 0.5);\n opacity: 0;\n z-index: -1;\n transition: opacity 0.4s ease-in-out, z-index 0s linear 0.4s;\n }\n .rwindow-modal.rwindow-blocked {\n opacity: 1;\n z-index: 10;\n transition: opacity 0.4s ease-in-out, z-index 0s linear;\n }\n \n .rwindow {\n position: relative;\n box-sizing: border-box;\n background-color: " + (window.bg || primary.bg || '#fff') + ";\n color: " + (window.fg || primary.fg || '#222') + ";\n box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n border-radius: 2px;\n overflow: hidden;\n width: 100%;\n height: 100%;\n min-width: " + (window.minWidth || '6em') + ";\n min-height: " + (window.minHeight || '6em') + ";\n transition: box-shadow 0.4s ease-in-out, opacity 0.4s ease-in-out;\n }\n .rwindow-max > .rwindow {\n border-radius: 0;\n box-shadow: none;\n }\n \n .rwindow-pane-top,\n .rwindow-max-top {\n background-color: " + (window.title.bg || primary.fga || '#07e') + ";\n color: " + (window.title.fg || primary.bg || '#fff') + ";\n flex-shrink: 0;\n }\n \n .rwindow-max-top {\n flex-shrink: 2;\n }\n \n .rwindow-pane-top {\n display: flex;\n align-items: center;\n }\n \n .rwindow-pane {\n display: flex;\n flex-direction: column;\n table-layout: fixed;\n width: 100%;\n height: 100%;\n }\n .rwindow-autosizing {\n display: block;\n box-sizing: border-box;\n }\n .rwindow-content {\n overflow: auto;\n flex-grow: 2;\n position: relative;\n box-sizing: border-box;\n }\n .rwindow-content.rwindow-pad {\n padding: 1em;\n }\n .rwindow-content.rwindow-flex {\n display: flex;\n flex-direction: column;\n }\n \n .rwindow-buttons {\n display: flex;\n flex-shrink: 0;\n padding: 0.5em;\n border-top: 1px solid " + (window.title.bg || primary.fga || '#07e') + ";\n }\n .rwindow-buttons.no-buttons {\n display: none;\n }\n .rwindow-left-buttons {\n text-align: left;\n flex-grow: 2;\n }\n .rwindow-left-buttons button {\n margin-right: 0.5em;\n }\n .rwindow-center-buttons {\n text-align: center;\n flex-shrink: 2;\n }\n .rwindow-center-buttons button {\n margin: 0 0.25em;\n }\n .rwindow-right-buttons {\n text-align: right;\n flex-grow: 2;\n }\n .rwindow-right-buttons button {\n margin-left: 0.5em;\n }\n \n .rwindow-title {\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 0.5em;\n white-space: nowrap;\n box-sizing: border-box;\n flex-grow: 1;\n }\n \n .rwindow-controls {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n flex-grow: 1;\n }\n .rwindow-controls > div {\n margin: 0 1em 0 0;\n width: 0.7em;\n height: 0.7em;\n cursor: pointer;\n }\n .rwindow-minimize {\n border-bottom: 2px solid;\n }\n .rwindow-maximize {\n border: 2px solid;\n }\n .rwindow-controls > .rwindow-close {\n width: 0.5em;\n height: 1em;\n border-right: 2px solid;\n transform: rotate(45deg);\n transform-origin: center right;\n position: relative;\n margin-right: 1.5em;\n }\n .rwindow-close:before {\n cursor: pointer;\n height: 1.2em;\n width: 1.2em;\n top: 0.3em;\n left: 0.1em;\n content: ' ';\n transform: rotate(-45deg);\n transform-origin: center left;\n position: absolute;\n }\n .rwindow-close:after {\n cursor: pointer;\n height: 100%;\n width: 100%;\n top: 1px;\n left: calc(100% + 1px);\n content: ' ';\n border-left: 2px solid;\n transform: rotate(-90deg);\n transform-origin: center left;\n position: absolute;\n }\n " + (typeof data('raui.window.extra') === 'function' ? data('raui.window.extra').call(this, data) : '') + "\n ");
}).call(this, data)].join(' '); },

@@ -321,5 +321,6 @@ cssId: 'rwindow',

this$1.detachChild(window).then(function () { return window.teardown(); });
this$1.set(("windows." + (escape(window.id)) + ".index"), -1);
this$1.raise();
this$1.set(("windows." + (escape(window.id))), undefined);
delete this$1.get('windows')[window.id];
this$1.raise();
});

@@ -329,3 +330,3 @@

return promise;
return promise.then(function () { return window; });
};

@@ -401,4 +402,5 @@

if (top && top !== last && this.get('currentMax') && this.rendered) {
var leaving = this.get(("windows." + (escape(last))));
wnd = this.getWindow(top);
wnd.transition('window', wnd.find('div'), { intro: true });
if (!leaving || !leaving.dialog || (leaving.blocking && leaving.blocking !== top)) { wnd.transition('window', wnd.find('div'), { intro: true }); }
}

@@ -425,6 +427,11 @@ };

var blocked = this.get(key);
var max = (this.get('max') || blocked.max) && !blocked.dialog;
var max = local.max || (!local.dialog && (this.get('max') || this.get('userMax')));
var bmax = blocked.max || this.get('userMax') || this.get('max');
var bw = bmax ? this.host.clientWidth : this.sizeInPx(((blocked.width) + "em"));
var bh = bmax ? this.host.clientHeight : this.sizeInPax(((blocked.height) + "em"));
var bl = bmax ? 0 : blocked.left;
var bt = bmax ? 0 : blocked.top;
left = ((max ? maxw : this.sizeInPx(blocked.width + 'em')) / 2) + (max ? 0 : blocked.left) - (this.sizeInPx(local.width + 'em') / 2);
top = ((max ? maxh : this.sizeInPx(blocked.height + 'em')) / 2) + (max ? 0 : blocked.top) - (this.sizeInPx(local.height + 'em') / 2);
left = (max ? maxw : bw / 2) + (max ? 0 : bl) - (this.sizeInPx(((local.width) + "em")) / 2);
top = (max ? maxh : bh / 2) + (max ? 0 : bt) - (this.sizeInPx(((local.height) + "em")) / 2);
}

@@ -588,3 +595,3 @@

Base.extendWith(Host, {
template: {v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwhost",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"host\"]"}}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwhost-sizer",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"sizer\"]"}}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-max-top",g:1},{t:4,f:[{t:16,r:"~/_maxAttrsP"}],n:50,r:"~/_maxAttrsP"}],f:[{t:16,r:"~/_maxP",z:[{n:"window",x:{r:"~/current"}},{n:"windowControls",x:{x:{r:["@this.partials.windowControls"],s:"{t:_0}"}}},{n:"host",x:{r:"@this"}}]}]}],n:50,x:{r:["~/currentMax","~/_maxP"],s:"_0&&_1"}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwhost-pane",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwhost-pane-content",g:1}],f:[{t:16}]}," ",{t:4,f:[{t:11,n:"window",m:[{n:"control",f:[{t:2,rx:{r:"~/windows",m:[{t:30,n:".instance.id"}]}}],t:13},{n:"root",t:13,f:[{t:2,r:"~/"}]}]}],n:52,r:"@this.children.byName.window"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwhost-modal",g:1},{t:4,f:[{n:"class-rwhost-modal-active",t:13},{n:"style-z-index",f:[{t:2,r:"~/blocked"}],t:13}],n:50,r:"~/blocked"}]}]}," ",{t:8,r:"toast"}]}],e:{"[\"host\"]":function (){return(["host"]);},"[\"sizer\"]":function (){return(["sizer"]);},"{t:_0}":function (_0){return({t:_0});},"_0&&_1":function (_0,_1){return(_0&&_1);},"[_0.getWindow(_1).hide()]":function (_0,_1){return([_0.getWindow(_1).hide()]);},"[_0.getWindow(_1).maximize()]":function (_0,_1){return([_0.getWindow(_1).maximize()]);},"!_0&&_1&&_2":function (_0,_1,_2){return(!_0&&_1&&_2);},"[_0.getWindow(_1).close()]":function (_0,_1){return([_0.getWindow(_1).close()]);},"[\"top\"]":function (){return(["top"]);},"[_0.hide()]":function (_0){return([_0.hide()]);},"[_0.maximize()]":function (_0){return([_0.maximize()]);},"!_0&&_1":function (_0,_1){return(!_0&&_1);},"[_0.close()]":function (_0){return([_0.close()]);},"(_0||_1||_2)&&_3&&!_4":function (_0,_1,_2,_3,_4){return((_0||_1||_2)&&_3&&!_4);},"[\"content\"]":function (){return(["content"]);},"!_0":function (_0){return(!_0);},"[_0.action()]":function (_0){return([_0.action()]);},"[\"wrapper\"]":function (){return(["wrapper"]);},"_0||_1":function (_0,_1){return(_0||_1);},"_0||_1||_2":function (_0,_1,_2){return(_0||_1||_2);},"[_0._startResize(_1)]":function (_0,_1){return([_0._startResize(_1)]);},"[_0._sizeHandle(_1)]":function (_0,_1){return([_0._sizeHandle(_1)]);},"[_0._startMove(_1)]":function (_0,_1){return([_0._startMove(_1)]);},"!(_0===false||_1||_2||_3)&&!_4":function (_0,_1,_2,_3,_4){return(!(_0===false||_1||_2||_3)&&!_4);},"[_0.raise()]":function (_0){return([_0.raise()]);},"[\"pane\"]":function (){return(["pane"]);}},p:{title:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-title",g:1}],f:[{t:3,r:"~/control.title"}]}],n:50,r:"~/control.title"}],windowControls:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-controls",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-minimize",g:1},{n:["click"],t:70,f:{r:["host","window.id"],s:"[_0.getWindow(_1).hide()]"}}]}],n:50,r:"window.minimize"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-maximize",g:1},{n:["click"],t:70,f:{r:["host","window.id"],s:"[_0.getWindow(_1).maximize()]"}}]}],n:50,x:{r:["~/window.dialog","window.maximize","host.data.userMax"],s:"!_0&&_1&&_2"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-close",g:1},{n:["click"],t:70,f:{r:["host","window.id"],s:"[_0.getWindow(_1).close()]"}}]}],n:50,r:"window.close"}]}],pane:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-pane-top",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"top\"]"}}],f:[{t:8,r:"title"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-controls",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-minimize",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.hide()]"}}]}],n:50,r:"~/control.minimize"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-maximize",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.maximize()]"}}]}],n:50,x:{r:["~/control.dialog","~/control.maximize"],s:"!_0&&_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-close",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.close()]"}}]}],n:50,r:"~/control.close"}]}]}],n:51,x:{r:["~/control.max","~/root.userMax","~/root.max","~/root.hideTitleMax","~/control.dialog"],s:"(_0||_1||_2)&&_3&&!_4"}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-content",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"content\"]"}},{n:"class-rwindow-pad",t:13,f:[{t:2,r:"~/control.pad"}]},{n:"class-rwindow-flex",t:13,f:[{t:2,r:"~/control.flex"}]},{t:4,f:[{n:"style-overflow",f:"visible",t:13}],n:50,r:"~/control.autosize"}],f:[{t:8,r:"contents"}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-buttons",g:1},{n:"class-no-buttons",t:13,f:[{t:2,x:{r:["~/visibleButtons"],s:"!_0"}}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-left-buttons",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:".partial"}],n:50,r:".partial"},{t:4,f:[{t:7,e:"button",m:[{n:["click"],t:70,f:{r:["."],s:"[_0.action()]"}},{t:4,f:[{n:"class",f:[{t:2,r:".class"}],t:13}],n:50,r:".class"}],f:[{t:2,r:".label"}]}],n:51,l:1}],n:52,r:"~/leftButtons"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-center-buttons",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:".partial"}],n:50,r:".partial"},{t:4,f:[{t:7,e:"button",m:[{n:["click"],t:70,f:{r:["."],s:"[_0.action()]"}},{t:4,f:[{n:"class",f:[{t:2,r:".class"}],t:13}],n:50,r:".class"}],f:[{t:2,r:".label"}]}],n:51,l:1}],n:52,r:"~/centerButtons"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-right-buttons",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:".partial"}],n:50,r:".partial"},{t:4,f:[{t:7,e:"button",m:[{n:["click"],t:70,f:{r:["."],s:"[_0.action()]"}},{t:4,f:[{n:"class",f:[{t:2,r:".class"}],t:13}],n:50,r:".class"}],f:[{t:2,r:".label"}]}],n:51,l:1}],n:52,r:"~/rightButtons"}]}]}],n:50,r:"~/buttons"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-pane-bottom",g:1}],f:[{t:8,r:"status"}]}],window:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-wrapper",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"wrapper\"]"}},{t:4,f:[" ",{t:4,f:[{n:"style-top",f:"0",t:13},{n:"style-left",f:"0",t:13},{n:"style-width",f:"100%",t:13},{n:"style-height",f:"100%",t:13}],n:51,x:{r:["~/control.autosize","~/control.dialog"],s:"_0||_1"}},{n:"class-rwindow-max",t:13,f:[{t:2,x:{r:["~/control.dialog"],s:"!_0"}}]},{n:"window",t:72,v:"t2"}],n:50,x:{r:["~/root.max","~/root.userMax","~/control.max"],s:"_0||_1||_2"}},{t:4,f:[{t:4,f:[{n:"class-rwindow-resizable",t:13},{n:["mousedown","touchstart"],t:70,f:{r:["@this","@event"],s:"[_0._startResize(_1)]"}},{n:["mousemove","mouseout"],t:70,f:{r:["@this","@event"],s:"[_0._sizeHandle(_1)]"}}],n:50,r:"~/control.resizable"}," ",{t:4,f:[{n:"class-rwindow-resizing",t:13}],n:50,r:"~/control.resizing"},{n:"modal",t:72,v:"t0"},{n:"style-top",f:[{t:2,r:"~/control.top"},"px"],t:13},{n:"style-left",f:[{t:2,r:"~/control.left"},"px"],t:13},{t:4,f:[{n:"style-width",f:[{t:2,r:"~/control.width"},"em"],t:13},{n:"style-height",f:[{t:2,r:"~/control.height"},"em"],t:13}],n:51,r:"~/control.autosize"}],n:51,l:1},{n:"style-z-index",f:[{t:2,r:"~/control.index"}],t:13},{n:"class-rwindow-topmost",t:13,f:[{t:2,r:"~/control.topmost"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow",g:1},{t:4,f:[{n:["mousedown","touchstart"],t:70,f:{r:["@this","@event"],s:"[_0._startMove(_1)]"}}],n:50,x:{r:["~/control.movable","~/root.max","~/root.userMax","~/control.max","~/control.dialog"],s:"!(_0===false||_1||_2||_3)&&!_4"}},{t:4,f:[{n:["mousedown","touchstart"],t:70,f:{r:["@this"],s:"[_0.raise()]"}}],n:50,x:{r:["~/control.topmost"],s:"!_0"},l:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-modal",g:1},{n:"class-rwindow-blocked",t:13,f:[{t:2,r:"~/control.blockers.length"}]}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-pane",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"pane\"]"}},{t:4,f:[{n:"class-rwindow-autosizing",t:13}],n:50,r:"~/control.autosize"}],f:[{t:8,r:"pane"}]}]}]}],n:50,r:"~/control.show"}]}},
template: {v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwhost",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"host\"]"}}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwhost-sizer",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"sizer\"]"}}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-max-top",g:1},{t:4,f:[{t:16,r:"~/_maxAttrsP"}],n:50,r:"~/_maxAttrsP"}],f:[{t:16,r:"~/_maxP",z:[{n:"window",x:{r:"~/current"}},{n:"windowControls",x:{x:{r:["@this.partials.windowControls"],s:"{t:_0}"}}},{n:"host",x:{r:"@this"}}]}]}],n:50,x:{r:["~/currentMax","~/_maxP"],s:"_0&&_1"}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwhost-pane",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwhost-pane-content",g:1}],f:[{t:16}]}," ",{t:4,f:[{t:11,n:"window",m:[{n:"control",f:[{t:2,rx:{r:"~/windows",m:[{t:30,n:".instance.id"}]}}],t:13},{n:"root",t:13,f:[{t:2,r:"~/"}]}]}],n:52,r:"@this.children.byName.window"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwhost-modal",g:1},{t:4,f:[{n:"class-rwhost-modal-active",t:13},{n:"style-z-index",f:[{t:2,r:"~/blocked"}],t:13}],n:50,r:"~/blocked"}]}]}," ",{t:8,r:"toast"}]}],e:{"[\"host\"]":function (){return(["host"]);},"[\"sizer\"]":function (){return(["sizer"]);},"{t:_0}":function (_0){return({t:_0});},"_0&&_1":function (_0,_1){return(_0&&_1);},"[_0.getWindow(_1).hide()]":function (_0,_1){return([_0.getWindow(_1).hide()]);},"[_0.getWindow(_1).maximize()]":function (_0,_1){return([_0.getWindow(_1).maximize()]);},"!_0&&_1&&_2":function (_0,_1,_2){return(!_0&&_1&&_2);},"[_0.getWindow(_1).close()]":function (_0,_1){return([_0.getWindow(_1).close()]);},"[\"top\"]":function (){return(["top"]);},"[_0.hide()]":function (_0){return([_0.hide()]);},"!_0&&_1":function (_0,_1){return(!_0&&_1);},"[_0.maximize()]":function (_0){return([_0.maximize()]);},"[_0.close()]":function (_0){return([_0.close()]);},"(_0||_1||_2)&&_3&&!_4":function (_0,_1,_2,_3,_4){return((_0||_1||_2)&&_3&&!_4);},"[\"content\"]":function (){return(["content"]);},"!_0":function (_0){return(!_0);},"[_0.call(_1)]":function (_0,_1){return([_0.call(_1)]);},"[\"wrapper\"]":function (){return(["wrapper"]);},"_0||_1":function (_0,_1){return(_0||_1);},"(_0||_1||_2)&&!_3":function (_0,_1,_2,_3){return((_0||_1||_2)&&!_3);},"[_0._startResize(_1)]":function (_0,_1){return([_0._startResize(_1)]);},"[_0._sizeHandle(_1)]":function (_0,_1){return([_0._sizeHandle(_1)]);},"[_0._startMove(_1)]":function (_0,_1){return([_0._startMove(_1)]);},"!(_0===false||_1||_2||_3)&&!_4":function (_0,_1,_2,_3,_4){return(!(_0===false||_1||_2||_3)&&!_4);},"[_0.raise()]":function (_0){return([_0.raise()]);},"[\"pane\"]":function (){return(["pane"]);}},p:{title:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-title",g:1}],f:[{t:3,r:"~/control.title"}]}],n:50,r:"~/control.title"}],windowControls:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-controls",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-minimize",g:1},{n:["click"],t:70,f:{r:["host","window.id"],s:"[_0.getWindow(_1).hide()]"}}]}],n:50,r:"window.minimize"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-maximize",g:1},{n:["click"],t:70,f:{r:["host","window.id"],s:"[_0.getWindow(_1).maximize()]"}}]}],n:50,x:{r:["~/window.dialog","window.maximize","host.data.userMax"],s:"!_0&&_1&&_2"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-close",g:1},{n:["click"],t:70,f:{r:["host","window.id"],s:"[_0.getWindow(_1).close()]"}}]}],n:50,r:"window.close"}]}],pane:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-pane-top",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"top\"]"}}],f:[{t:8,r:"title"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-controls",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-minimize",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.hide()]"}}]}],n:50,x:{r:["~/control.dialog","~/control.minimize"],s:"!_0&&_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-maximize",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.maximize()]"}}]}],n:50,x:{r:["~/control.dialog","~/control.maximize"],s:"!_0&&_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-close",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.close()]"}}]}],n:50,r:"~/control.close"}]}]}],n:51,x:{r:["~/control.max","~/root.userMax","~/root.max","~/root.hideTitleMax","~/control.dialog"],s:"(_0||_1||_2)&&_3&&!_4"}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-content",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"content\"]"}},{n:"class-rwindow-pad",t:13,f:[{t:2,r:"~/control.pad"}]},{n:"class-rwindow-flex",t:13,f:[{t:2,r:"~/control.flex"}]},{t:4,f:[{n:"style-overflow",f:"visible",t:13}],n:50,r:"~/control.autosize"}],f:[{t:8,r:"contents"}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-buttons",g:1},{n:"class-no-buttons",t:13,f:[{t:2,x:{r:["~/visibleButtons"],s:"!_0"}}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-left-buttons",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:".partial"}],n:50,r:".partial"},{t:4,f:[{t:7,e:"button",m:[{n:"button",t:71},{n:["click"],t:70,f:{r:[".action","@"],s:"[_0.call(_1)]"}},{t:4,f:[{n:"class",f:[{t:2,r:".class"}],t:13}],n:50,r:".class"}],f:[{t:2,r:".label"}]}],n:51,l:1}],n:52,r:"~/leftButtons"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-center-buttons",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:".partial"}],n:50,r:".partial"},{t:4,f:[{t:7,e:"button",m:[{n:"button",t:71},{n:["click"],t:70,f:{r:[".action","@"],s:"[_0.call(_1)]"}},{t:4,f:[{n:"class",f:[{t:2,r:".class"}],t:13}],n:50,r:".class"}],f:[{t:2,r:".label"}]}],n:51,l:1}],n:52,r:"~/centerButtons"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-right-buttons",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:".partial"}],n:50,r:".partial"},{t:4,f:[{t:7,e:"button",m:[{n:"button",t:71},{n:["click"],t:70,f:{r:[".action","@"],s:"[_0.call(_1)]"}},{t:4,f:[{n:"class",f:[{t:2,r:".class"}],t:13}],n:50,r:".class"}],f:[{t:2,r:".label"}]}],n:51,l:1}],n:52,r:"~/rightButtons"}]}]}],n:50,r:"~/buttons"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-pane-bottom",g:1}],f:[{t:8,r:"status"}]}],window:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-wrapper",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"wrapper\"]"}},{t:4,f:[" ",{t:4,f:[{n:"style-top",f:"0",t:13},{n:"style-left",f:"0",t:13},{n:"style-width",f:"100%",t:13},{n:"style-height",f:"100%",t:13}],n:51,x:{r:["~/control.autosize","~/control.dialog"],s:"_0||_1"}},{n:"class-rwindow-max",t:13},{n:"window",t:72,v:"t2"}],n:50,x:{r:["~/root.max","~/root.userMax","~/control.max","~/control.dialog"],s:"(_0||_1||_2)&&!_3"}},{t:4,f:[{t:4,f:[{n:"class-rwindow-resizable",t:13},{n:["mousedown","touchstart"],t:70,f:{r:["@this","@event"],s:"[_0._startResize(_1)]"}},{n:["mousemove","mouseout"],t:70,f:{r:["@this","@event"],s:"[_0._sizeHandle(_1)]"}}],n:50,r:"~/control.resizable"}," ",{t:4,f:[{n:"class-rwindow-resizing",t:13}],n:50,r:"~/control.resizing"},{n:"modal",t:72,v:"t0"},{n:"style-top",f:[{t:2,r:"~/control.top"},"px"],t:13},{n:"style-left",f:[{t:2,r:"~/control.left"},"px"],t:13},{t:4,f:[{n:"style-width",f:[{t:2,r:"~/control.width"},"em"],t:13},{n:"style-height",f:[{t:2,r:"~/control.height"},"em"],t:13}],n:51,r:"~/control.autosize"}],n:51,l:1},{n:"style-z-index",f:[{t:2,r:"~/control.index"}],t:13},{n:"class-rwindow-topmost",t:13,f:[{t:2,r:"~/control.topmost"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow",g:1},{t:4,f:[{n:["mousedown","touchstart"],t:70,f:{r:["@this","@event"],s:"[_0._startMove(_1)]"}}],n:50,x:{r:["~/control.movable","~/root.max","~/root.userMax","~/control.max","~/control.dialog"],s:"!(_0===false||_1||_2||_3)&&!_4"}},{t:4,f:[{n:["mousedown","touchstart"],t:70,f:{r:["@this"],s:"[_0.raise()]"}}],n:50,x:{r:["~/control.topmost"],s:"!_0"},l:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-modal",g:1},{n:"class-rwindow-blocked",t:13,f:[{t:2,r:"~/control.blockers.length"}]}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-pane",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"pane\"]"}},{t:4,f:[{n:"class-rwindow-autosizing",t:13}],n:50,r:"~/control.autosize"}],f:[{t:8,r:"pane"}]}]}]}],n:50,r:"~/control.show"}]}},
use: [plugin$1(), plugin()],

@@ -736,3 +743,3 @@ cssId: 'window-host',

var prototypeAccessors$1 = { resizable: { configurable: true },title: { configurable: true },visible: { configurable: true },pad: { configurable: true } };
var prototypeAccessors$1 = { resizable: { configurable: true },title: { configurable: true },visible: { configurable: true },pad: { configurable: true },buttons: { configurable: true } };

@@ -751,2 +758,4 @@ prototypeAccessors$1.resizable.get = function () { return this.get('control.resizable'); };

prototypeAccessors$1.pad.set = function (v) { this.set('pad', v); };
prototypeAccessors$1.buttons.get = function () { return this.get('buttons'); };
prototypeAccessors$1.buttons.set = function (v) { return this.set('buttons', v); };

@@ -1041,6 +1050,6 @@ Window.prototype.close = function close (force) {

Base.extendWith(Window, {
template: {v:4,t:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-wrapper",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"wrapper\"]"}},{t:4,f:[" ",{t:4,f:[{n:"style-top",f:"0",t:13},{n:"style-left",f:"0",t:13},{n:"style-width",f:"100%",t:13},{n:"style-height",f:"100%",t:13}],n:51,x:{r:["~/control.autosize","~/control.dialog"],s:"_0||_1"}},{n:"class-rwindow-max",t:13,f:[{t:2,x:{r:["~/control.dialog"],s:"!_0"}}]},{n:"window",t:72,v:"t2"}],n:50,x:{r:["~/root.max","~/root.userMax","~/control.max"],s:"_0||_1||_2"}},{t:4,f:[{t:4,f:[{n:"class-rwindow-resizable",t:13},{n:["mousedown","touchstart"],t:70,f:{r:["@this","@event"],s:"[_0._startResize(_1)]"}},{n:["mousemove","mouseout"],t:70,f:{r:["@this","@event"],s:"[_0._sizeHandle(_1)]"}}],n:50,r:"~/control.resizable"}," ",{t:4,f:[{n:"class-rwindow-resizing",t:13}],n:50,r:"~/control.resizing"},{n:"modal",t:72,v:"t0"},{n:"style-top",f:[{t:2,r:"~/control.top"},"px"],t:13},{n:"style-left",f:[{t:2,r:"~/control.left"},"px"],t:13},{t:4,f:[{n:"style-width",f:[{t:2,r:"~/control.width"},"em"],t:13},{n:"style-height",f:[{t:2,r:"~/control.height"},"em"],t:13}],n:51,r:"~/control.autosize"}],n:51,l:1},{n:"style-z-index",f:[{t:2,r:"~/control.index"}],t:13},{n:"class-rwindow-topmost",t:13,f:[{t:2,r:"~/control.topmost"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow",g:1},{t:4,f:[{n:["mousedown","touchstart"],t:70,f:{r:["@this","@event"],s:"[_0._startMove(_1)]"}}],n:50,x:{r:["~/control.movable","~/root.max","~/root.userMax","~/control.max","~/control.dialog"],s:"!(_0===false||_1||_2||_3)&&!_4"}},{t:4,f:[{n:["mousedown","touchstart"],t:70,f:{r:["@this"],s:"[_0.raise()]"}}],n:50,x:{r:["~/control.topmost"],s:"!_0"},l:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-modal",g:1},{n:"class-rwindow-blocked",t:13,f:[{t:2,r:"~/control.blockers.length"}]}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-pane",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"pane\"]"}},{t:4,f:[{n:"class-rwindow-autosizing",t:13}],n:50,r:"~/control.autosize"}],f:[{t:8,r:"pane"}]}]}]}],n:50,r:"~/control.show"}]},
template: {v:4,t:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-wrapper",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"wrapper\"]"}},{t:4,f:[" ",{t:4,f:[{n:"style-top",f:"0",t:13},{n:"style-left",f:"0",t:13},{n:"style-width",f:"100%",t:13},{n:"style-height",f:"100%",t:13}],n:51,x:{r:["~/control.autosize","~/control.dialog"],s:"_0||_1"}},{n:"class-rwindow-max",t:13},{n:"window",t:72,v:"t2"}],n:50,x:{r:["~/root.max","~/root.userMax","~/control.max","~/control.dialog"],s:"(_0||_1||_2)&&!_3"}},{t:4,f:[{t:4,f:[{n:"class-rwindow-resizable",t:13},{n:["mousedown","touchstart"],t:70,f:{r:["@this","@event"],s:"[_0._startResize(_1)]"}},{n:["mousemove","mouseout"],t:70,f:{r:["@this","@event"],s:"[_0._sizeHandle(_1)]"}}],n:50,r:"~/control.resizable"}," ",{t:4,f:[{n:"class-rwindow-resizing",t:13}],n:50,r:"~/control.resizing"},{n:"modal",t:72,v:"t0"},{n:"style-top",f:[{t:2,r:"~/control.top"},"px"],t:13},{n:"style-left",f:[{t:2,r:"~/control.left"},"px"],t:13},{t:4,f:[{n:"style-width",f:[{t:2,r:"~/control.width"},"em"],t:13},{n:"style-height",f:[{t:2,r:"~/control.height"},"em"],t:13}],n:51,r:"~/control.autosize"}],n:51,l:1},{n:"style-z-index",f:[{t:2,r:"~/control.index"}],t:13},{n:"class-rwindow-topmost",t:13,f:[{t:2,r:"~/control.topmost"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow",g:1},{t:4,f:[{n:["mousedown","touchstart"],t:70,f:{r:["@this","@event"],s:"[_0._startMove(_1)]"}}],n:50,x:{r:["~/control.movable","~/root.max","~/root.userMax","~/control.max","~/control.dialog"],s:"!(_0===false||_1||_2||_3)&&!_4"}},{t:4,f:[{n:["mousedown","touchstart"],t:70,f:{r:["@this"],s:"[_0.raise()]"}}],n:50,x:{r:["~/control.topmost"],s:"!_0"},l:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-modal",g:1},{n:"class-rwindow-blocked",t:13,f:[{t:2,r:"~/control.blockers.length"}]}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-pane",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"pane\"]"}},{t:4,f:[{n:"class-rwindow-autosizing",t:13}],n:50,r:"~/control.autosize"}],f:[{t:8,r:"pane"}]}]}]}],n:50,r:"~/control.show"}]},
cssId: 'window',
partials: {
pane: {v:4,t:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-pane-top",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"top\"]"}}],f:[{t:8,r:"title"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-controls",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-minimize",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.hide()]"}}]}],n:50,r:"~/control.minimize"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-maximize",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.maximize()]"}}]}],n:50,x:{r:["~/control.dialog","~/control.maximize"],s:"!_0&&_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-close",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.close()]"}}]}],n:50,r:"~/control.close"}]}]}],n:51,x:{r:["~/control.max","~/root.userMax","~/root.max","~/root.hideTitleMax","~/control.dialog"],s:"(_0||_1||_2)&&_3&&!_4"}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-content",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"content\"]"}},{n:"class-rwindow-pad",t:13,f:[{t:2,r:"~/control.pad"}]},{n:"class-rwindow-flex",t:13,f:[{t:2,r:"~/control.flex"}]},{t:4,f:[{n:"style-overflow",f:"visible",t:13}],n:50,r:"~/control.autosize"}],f:[{t:8,r:"contents"}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-buttons",g:1},{n:"class-no-buttons",t:13,f:[{t:2,x:{r:["~/visibleButtons"],s:"!_0"}}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-left-buttons",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:".partial"}],n:50,r:".partial"},{t:4,f:[{t:7,e:"button",m:[{n:["click"],t:70,f:{r:["."],s:"[_0.action()]"}},{t:4,f:[{n:"class",f:[{t:2,r:".class"}],t:13}],n:50,r:".class"}],f:[{t:2,r:".label"}]}],n:51,l:1}],n:52,r:"~/leftButtons"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-center-buttons",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:".partial"}],n:50,r:".partial"},{t:4,f:[{t:7,e:"button",m:[{n:["click"],t:70,f:{r:["."],s:"[_0.action()]"}},{t:4,f:[{n:"class",f:[{t:2,r:".class"}],t:13}],n:50,r:".class"}],f:[{t:2,r:".label"}]}],n:51,l:1}],n:52,r:"~/centerButtons"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-right-buttons",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:".partial"}],n:50,r:".partial"},{t:4,f:[{t:7,e:"button",m:[{n:["click"],t:70,f:{r:["."],s:"[_0.action()]"}},{t:4,f:[{n:"class",f:[{t:2,r:".class"}],t:13}],n:50,r:".class"}],f:[{t:2,r:".label"}]}],n:51,l:1}],n:52,r:"~/rightButtons"}]}]}],n:50,r:"~/buttons"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-pane-bottom",g:1}],f:[{t:8,r:"status"}]}]}.t,
pane: {v:4,t:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-pane-top",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"top\"]"}}],f:[{t:8,r:"title"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-controls",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-minimize",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.hide()]"}}]}],n:50,x:{r:["~/control.dialog","~/control.minimize"],s:"!_0&&_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-maximize",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.maximize()]"}}]}],n:50,x:{r:["~/control.dialog","~/control.maximize"],s:"!_0&&_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-close",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.close()]"}}]}],n:50,r:"~/control.close"}]}]}],n:51,x:{r:["~/control.max","~/root.userMax","~/root.max","~/root.hideTitleMax","~/control.dialog"],s:"(_0||_1||_2)&&_3&&!_4"}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-content",g:1},{n:"tracked",t:71,f:{r:[],s:"[\"content\"]"}},{n:"class-rwindow-pad",t:13,f:[{t:2,r:"~/control.pad"}]},{n:"class-rwindow-flex",t:13,f:[{t:2,r:"~/control.flex"}]},{t:4,f:[{n:"style-overflow",f:"visible",t:13}],n:50,r:"~/control.autosize"}],f:[{t:8,r:"contents"}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-buttons",g:1},{n:"class-no-buttons",t:13,f:[{t:2,x:{r:["~/visibleButtons"],s:"!_0"}}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-left-buttons",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:".partial"}],n:50,r:".partial"},{t:4,f:[{t:7,e:"button",m:[{n:"button",t:71},{n:["click"],t:70,f:{r:[".action","@"],s:"[_0.call(_1)]"}},{t:4,f:[{n:"class",f:[{t:2,r:".class"}],t:13}],n:50,r:".class"}],f:[{t:2,r:".label"}]}],n:51,l:1}],n:52,r:"~/leftButtons"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-center-buttons",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:".partial"}],n:50,r:".partial"},{t:4,f:[{t:7,e:"button",m:[{n:"button",t:71},{n:["click"],t:70,f:{r:[".action","@"],s:"[_0.call(_1)]"}},{t:4,f:[{n:"class",f:[{t:2,r:".class"}],t:13}],n:50,r:".class"}],f:[{t:2,r:".label"}]}],n:51,l:1}],n:52,r:"~/centerButtons"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-right-buttons",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:".partial"}],n:50,r:".partial"},{t:4,f:[{t:7,e:"button",m:[{n:"button",t:71},{n:["click"],t:70,f:{r:[".action","@"],s:"[_0.call(_1)]"}},{t:4,f:[{n:"class",f:[{t:2,r:".class"}],t:13}],n:50,r:".class"}],f:[{t:2,r:".label"}]}],n:51,l:1}],n:52,r:"~/rightButtons"}]}]}],n:50,r:"~/buttons"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-pane-bottom",g:1}],f:[{t:8,r:"status"}]}]}.t,
title: {v:4,t:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-title",g:1}],f:[{t:3,r:"~/control.title"}]}],n:50,r:"~/control.title"}]}.t,

@@ -1047,0 +1056,0 @@ contents: {v:4,t:""}.t,

@@ -1,1 +0,1 @@

!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("ractive")):"function"==typeof define&&define.amd?define(["exports","ractive"],n):n(t.RMWindow={},t.Ractive)}(this,function(t,n){"use strict";n=n&&n.hasOwnProperty("default")?n.default:n;var e="undefined"!=typeof window?window:null;function o(t,n,o){if(e&&e.Ractive&&"object"==typeof e.Ractive[n]){var i=document.currentScript;if(i||(i=(i=document.querySelectorAll("script"))[i.length-1]),i){var r=i.getAttribute("data-alias");r&&(r=(r=r.split("&")).reduce(function(t,n){var e=n.split("="),o=e[0],i=e[1];return t[o]=i,t},{})),Ractive[n][r&&r[t]||t]=o}}}function i(t,n){var e=t.processParams(n,{duration:200,easing:"easeInOut"});t.setStyle("overflow","hidden");var o="x"===e.axis?"width":"height";if(t.isIntro){var i=t.getStyle(o);return t.setStyle(o,0),t.setStyle("opacity",0),t.animateStyle(o,i,e).then(function(){return t.animateStyle("opacity",1,e)})}return t.setStyle(o,t.getStyle(o)),t.setStyle("opacity",1),t.animateStyle("opacity",0,e).then(function(){return t.animateStyle(o,0,e)})}o("expand","transitions",i);var r={timeout:6e3,top:!0};var s,a=n.escapeKey,l=function(t){function n(n){t.call(this,n)}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n}(n);n.extendWith(l,{css:function(t){return[function(t){var n=Object.assign({},t("raui.primary"),t("raui.window.primary")),e=Object.assign({host:{},title:{}},t("raui.window"));return"\n .rwhost {\n position: relative;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n \n .rwhost-sizer {\n position: absolute;\n }\n \n .rwhost-pane {\n display: flex;\n position: relative;\n width: 100%;\n box-sizing: border-box;\n flex-grow: 2;\n overflow: auto;\n background-color: "+(e.host.bg||n.bg||"#fff")+";\n z-index: 1;\n }\n \n .rwhost-pane-content {\n flex-grow: 1;\n }\n \n .rwhost-modal {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n z-index: -1;\n opacity: 0;\n transition: opacity 0.2s ease-in-out, z-index 0s linear 0.2s;\n background-color: #000;\n }\n .rwhost-modal-active {\n opacity: 0.5;\n z-index: 1;\n transition: opacity 0.2s ease-in-out, z-index 0s linear;\n }\n \n .rwindow-wrapper {\n display: inline-block;\n box-sizing: border-box;\n position: absolute;\n }\n .rwindow-wrapper.rwindow-resizing {\n transition: none;\n }\n \n .rwindow-wrapper.rwindow-resizable {\n padding: "+(e.handleSize||7)+"px;\n }\n \n .rwindow-topmost > .rwindow {\n box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12), 0 3px 5px -1px rgba(0, 0, 0, 0.3);\n opacity: 1;\n }\n \n .rwindow-modal {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background-color: rgba(0, 0, 0, 0.5);\n opacity: 0;\n z-index: -1;\n transition: opacity 0.4s ease-in-out, z-index 0s linear 0.4s;\n }\n .rwindow-modal.rwindow-blocked {\n opacity: 1;\n z-index: 10;\n transition: opacity 0.4s ease-in-out, z-index 0s linear;\n }\n \n .rwindow {\n position: relative;\n box-sizing: border-box;\n background-color: "+(e.bg||n.bg||"#fff")+";\n color: "+(e.fg||n.fg||"#222")+";\n box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n border-radius: 2px;\n overflow: hidden;\n width: 100%;\n height: 100%;\n opacity: 0.8;\n min-width: "+(e.minWidth||"6em")+";\n min-height: "+(e.minHeight||"6em")+";\n transition: box-shadow 0.4s ease-in-out, opacity 0.4s ease-in-out;\n }\n .rwindow-max > .rwindow {\n border-radius: 0;\n box-shadow: none;\n }\n \n .rwindow-pane-top,\n .rwindow-max-top {\n background-color: "+(e.title.bg||n.fga||"#07e")+";\n color: "+(e.title.fg||n.bg||"#fff")+";\n flex-shrink: 0;\n }\n \n .rwindow-max-top {\n flex-shrink: 2;\n }\n \n .rwindow-pane-top {\n display: flex;\n align-items: center;\n }\n \n .rwindow-pane {\n display: flex;\n flex-direction: column;\n table-layout: fixed;\n width: 100%;\n height: 100%;\n }\n .rwindow-autosizing {\n display: block;\n box-sizing: border-box;\n }\n .rwindow-content {\n overflow: auto;\n flex-grow: 2;\n position: relative;\n box-sizing: border-box;\n }\n .rwindow-content.rwindow-pad {\n padding: 1em;\n }\n .rwindow-content.rwindow-flex {\n display: flex;\n flex-direction: column;\n }\n \n .rwindow-buttons {\n display: flex;\n flex-shrink: 0;\n padding: 0.5em;\n border-top: 1px solid "+(e.title.bg||n.fga||"#07e")+";\n }\n .rwindow-buttons.no-buttons {\n display: none;\n }\n .rwindow-left-buttons {\n text-align: left;\n flex-grow: 2;\n }\n .rwindow-left-buttons button {\n margin-right: 0.5em;\n }\n .rwindow-center-buttons {\n text-align: center;\n flex-shrink: 2;\n }\n .rwindow-center-buttons button {\n margin: 0 0.25em;\n }\n .rwindow-right-buttons {\n text-align: right;\n flex-grow: 2;\n }\n .rwindow-right-buttons button {\n margin-left: 0.5em;\n }\n \n .rwindow-title {\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 0.5em;\n white-space: nowrap;\n box-sizing: border-box;\n flex-grow: 1;\n }\n \n .rwindow-controls {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n flex-grow: 1;\n }\n .rwindow-controls > div {\n margin: 0 1em 0 0;\n width: 0.7em;\n height: 0.7em;\n cursor: pointer;\n }\n .rwindow-minimize {\n border-bottom: 2px solid;\n }\n .rwindow-maximize {\n border: 2px solid;\n }\n .rwindow-controls > .rwindow-close {\n width: 0.5em;\n height: 1em;\n border-right: 2px solid;\n transform: rotate(45deg);\n transform-origin: center right;\n position: relative;\n margin-right: 1.5em;\n }\n .rwindow-close:before {\n cursor: pointer;\n height: 1.2em;\n width: 1.2em;\n top: 0.3em;\n left: 0.1em;\n content: ' ';\n transform: rotate(-45deg);\n transform-origin: center left;\n position: absolute;\n }\n .rwindow-close:after {\n cursor: pointer;\n height: 100%;\n width: 100%;\n top: 1px;\n left: calc(100% + 1px);\n content: ' ';\n border-left: 2px solid;\n transform: rotate(-90deg);\n transform-origin: center left;\n position: absolute;\n }\n "+("function"==typeof t("raui.window.extra")?t("raui.window.extra").call(this,t):"")+"\n "}.call(this,t)].join(" ")},cssId:"rwindow",noCssTransform:!0,delegate:!1,decorators:{tracked:function(t,n){return this[n]=t,{teardown:function(){this[n]===t&&(this[n]=null)}}}},transitions:{window:function(t,n){if(s)return t.complete();s=t;var e=t.processParams(n,{duration:400,easing:"easeInOut"}),o=t.node.parentNode,i=o.style?o.style.overflow:"";o.style&&(o.style.overflow="hidden"),t.isIntro||e.intro?(t.setStyle({transform:"translate(30%, 0px) scale(1.1, 1.1)",opacity:0}),t.animateStyle({transform:"none",opacity:1},e).then(function(){s=!1,t.complete(),o.style&&(o.style.overflow=i)})):(t.setStyle({transform:"none",opacity:1}),t.animateStyle({transform:"translate(30%, 0px) scale(1.1, 1.1)",opacity:0},e).then(function(){s=!1,t.complete(),o.style&&(o.style.overflow=i)}))}}});var c,f=0,d=function(t){function n(n){t.call(this,n),this.defaults={}}t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n;var e={current:{configurable:!0},currentId:{configurable:!0},placement:{configurable:!0}};return e.current.get=function(){var t=this.get("topLevel");return this.getWindow(this.get("windows")[t].id)},e.currentId.get=function(){var t=this.get("topLevel");return this.get("windows."+a(t)+".id")},e.placement.get=function(){return this.get("placement")},e.placement.set=function(t){return this.set("placement",t)},n.prototype.addWindow=function(t,n){var e=this,o=Object.assign({},this.defaults,t.options,t.get("options"),n);if(!(t instanceof w))throw new Error("Windows must be instances of Window");t.id||t.set("@.id",o.id||"window"+f++),this.get("windows."+a(t.id))||this.set("windows."+a(t.id),Object.assign({show:!1!==o.show,autosize:!0,id:t.id,blockers:[],close:!0,minimize:!0,maximize:!0},o,{id:t.id})),t.host=this;var i,r,s=this.attachChild(t,{target:"window"});(o.block&&("string"==typeof(i=o.block.id||o.block)&&i in this.get("windows")?(this.push("windows."+a(i)+".blockers",t.id),t.set("control.blocking",i)):i=!1),"fill"===o.size&&(i||o.block))?(!0===o.block?r=this.find(".rwhost-pane"):(r=this.getWindow(i))&&(r=r.find(".rwindow")),r&&(t.size(r.clientWidth-(o.fillPad||20),r.clientHeight-(o.fillPad||20)),!0!==o.block||o.top||o.left||(o.top=o.left=Math.floor((o.fillPad||20)/2)))):o.width&&o.height?t.size(o.width,o.height):t.size("auto");return o.top&&o.left?t.move(o.top,o.left):this.place(t),this.raise(t,!1!==o.show),t.on("close",function(){var n=t.get("control.blocking");if(n){var o=e.windowGet(n,"blockers");e.splice("windows."+a(n)+".blockers",o.indexOf(t.id),1)}e.detachChild(t).then(function(){return t.teardown()}),e.set("windows."+a(t.id),void 0),delete e.get("windows")[t.id],e.raise()}),this.update("windows."+a(t.id)+".id",{force:!0}),s},n.prototype.getWindow=function(t){return this.children.byName.window&&this.children.byName.window.filter(function(n){return n.instance.id===t}).map(function(t){return t.instance})[0]},n.prototype.windowGet=function(t,n){return this.get("windows."+a(t)+"."+n)},n.prototype.windowSet=function(t,n,e){return this.set("windows."+a(t)+"."+n,e)},n.prototype.raise=function(t,n){var e=this,o=t instanceof w?t:this.children.byName.window.filter(function(n){return n.instance.id===t}).map(function(t){return t.instance})[0],i=this.get("windows"),r=this,s=Object.keys(i).map(function(t){return i[t]}),l=s.length+1,c=this.get("topLevel");this.get("blocked");function f(t){var n=r.get("windows."+a(t)+".blockers");n&&(n.forEach(function(t){return r.add("windows."+a(t)+".index",l++)}),n.forEach(function(t){return f(t)}))}o&&(o.set("control.index",!1===n?-1:l++),!1===n||o.visible||o.show(),f(o.id)),s.filter(function(t){return!1!==t.show&&!0===t.block}).forEach(function(t){e.set("windows."+a(t.id)+".index",(t.index||0)+l),f(t.id)});var d=s.sort(function(t,n){return t.show?n.show&&t.index<n.index?-1:1:-1}),u=d.filter(function(t){return t.show});l=d.indexOf(u[u.length-1]);var h={},p=null;d.forEach(function(t,n){var e=a(t.id);!0===t.block&&null===p&&(p=n),h["windows."+e+".index"]=null!==p?n+2:n,h["windows."+e+".topmost"]=n===l,h["windows."+e+".stack"]=d.length-n}),h.blocked=null!==p?p+1:0,~l&&d.length?h.topLevel=d[l].id:h.topLevel=null,this.set(h),(l=h.topLevel)&&l!==c&&this.get("currentMax")&&this.rendered&&(o=this.getWindow(l)).transition("window",o.find("div"),{intro:!0})},n.prototype.place=function(t){if(t.get("control.show")){var n=t.get("control");void 0===n.width&&t.size("auto");var e=0,o=0;if(this.fragment&&this.fragment.rendered){var i=this.find(".rwhost"),r=i.clientWidth,s=i.clientHeight,l=t.get("control.blocking");if(l){var c="windows."+a(l),f=this.get(c),d=(this.get("max")||f.max)&&!f.dialog;e=(d?r:this.sizeInPx(f.width+"em"))/2+(d?0:f.left)-this.sizeInPx(n.width+"em")/2,o=(d?s:this.sizeInPx(f.height+"em"))/2+(d?0:f.top)-this.sizeInPx(n.height+"em")/2}else{var h,w=this.get("placement");if("function"==typeof w)try{h=w(this,i,n)}catch(t){h=u(this,i,n)}else if("string"==typeof w)switch(w){case"smart":h=function(t,n,e){var o,i,r=n.clientWidth-10,s=n.clientHeight-10,a=Math.floor(s/16),l=Math.floor(r/16),c=new Array(a*l),f=new Array(a*l);for(o=0;o<c.length;o++)c[o]=0;var d,u,h,w,p,g,m,x,b=0,y=t.get("windows");for(var v in y)for(b++,d=y[v],u=Math.floor(d.top/16),h=Math.floor(d.left/16),p=Math.ceil(t.sizeInPx(d.height+"em")/16),w=Math.ceil(t.sizeInPx(d.width+"em")/16),o=u;o<u+p&&o<a;o++)for(i=h;i<h+w&&i<l;i++)c[o*l+i]++;for(w=Math.ceil(t.sizeInPx(e.width+"em")/16),p=Math.ceil(t.sizeInPx(e.height+"em")/16),o=0;o<a;o++)for(i=0;i<l;i++){if(o+p>a||i+w>l)g=b*w*p;else for(g=0,m=0;m<p;m++)for(x=0;x<w;x++)g+=c[(o+m)*l+i+x];if(0===g)return{top:16*o+5,left:16*i+5};f[o*l+i]=g}for(g=b*w*p,m=0,o=0;o<f.length;o++)f[o]<g&&(g=f[o],m=o);return{top:16*Math.floor(m/l)+5,left:m%l*16+5}}(this,i,n);break;default:h=u(this,i,n)}else h=u(this,i,n);o=h.top,e=h.left}(isNaN(e)||e<0)&&(e=10),(isNaN(o)||o<0)&&(o=10),t.set({"control.top":o,"control.left":e})}}},n.prototype.sizeInPx=function(t){return this.sizer.style.width="number"==typeof t?t+"px":t,this.sizer.clientWidth},n.prototype.sizeInEm=function(t){return this.sizeInPx(t)/this.sizeInPx("1em")},Object.defineProperties(n.prototype,e),n}(l);function u(t,n,e){var o=n.clientWidth,i=n.clientHeight,r=0,s=0,a=void 0===t._grid1?t._grid1=0:t._grid1>7?t._grid1=0:++t._grid1,l=Math.floor(o/3),c=Math.floor(i/3),f=t.sizeInPx(e.width+"em"),d=t.sizeInPx(e.height+"em");switch(a){case 5:case 7:case 8:r=i-d-10;break;case 2:case 4:case 6:r=c+Math.floor((c-d)/2);break;case 0:case 1:case 3:r=10}switch(a){case 3:case 6:case 8:s=o-f-10;break;case 1:case 4:case 7:s=l+Math.floor((l-f)/2);break;case 0:case 2:case 5:s=10}return s+f>o&&(s=o-f-10),r+d>i&&(r=i-d-10),{top:r,left:s}}l.extendWith(d,{template:{v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwhost",g:1},{n:"tracked",t:71,f:{r:[],s:'["host"]'}}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwhost-sizer",g:1},{n:"tracked",t:71,f:{r:[],s:'["sizer"]'}}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-max-top",g:1},{t:4,f:[{t:16,r:"~/_maxAttrsP"}],n:50,r:"~/_maxAttrsP"}],f:[{t:16,r:"~/_maxP",z:[{n:"window",x:{r:"~/current"}},{n:"windowControls",x:{x:{r:["@this.partials.windowControls"],s:"{t:_0}"}}},{n:"host",x:{r:"@this"}}]}]}],n:50,x:{r:["~/currentMax","~/_maxP"],s:"_0&&_1"}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwhost-pane",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwhost-pane-content",g:1}],f:[{t:16}]}," ",{t:4,f:[{t:11,n:"window",m:[{n:"control",f:[{t:2,rx:{r:"~/windows",m:[{t:30,n:".instance.id"}]}}],t:13},{n:"root",t:13,f:[{t:2,r:"~/"}]}]}],n:52,r:"@this.children.byName.window"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwhost-modal",g:1},{t:4,f:[{n:"class-rwhost-modal-active",t:13},{n:"style-z-index",f:[{t:2,r:"~/blocked"}],t:13}],n:50,r:"~/blocked"}]}]}," ",{t:8,r:"toast"}]}],e:{'["host"]':function(){return["host"]},'["sizer"]':function(){return["sizer"]},"{t:_0}":function(t){return{t:t}},"_0&&_1":function(t,n){return t&&n},"[_0.getWindow(_1).hide()]":function(t,n){return[t.getWindow(n).hide()]},"[_0.getWindow(_1).maximize()]":function(t,n){return[t.getWindow(n).maximize()]},"!_0&&_1&&_2":function(t,n,e){return!t&&n&&e},"[_0.getWindow(_1).close()]":function(t,n){return[t.getWindow(n).close()]},'["top"]':function(){return["top"]},"[_0.hide()]":function(t){return[t.hide()]},"[_0.maximize()]":function(t){return[t.maximize()]},"!_0&&_1":function(t,n){return!t&&n},"[_0.close()]":function(t){return[t.close()]},"(_0||_1||_2)&&_3&&!_4":function(t,n,e,o,i){return(t||n||e)&&o&&!i},'["content"]':function(){return["content"]},"!_0":function(t){return!t},"[_0.action()]":function(t){return[t.action()]},'["wrapper"]':function(){return["wrapper"]},"_0||_1":function(t,n){return t||n},"_0||_1||_2":function(t,n,e){return t||n||e},"[_0._startResize(_1)]":function(t,n){return[t._startResize(n)]},"[_0._sizeHandle(_1)]":function(t,n){return[t._sizeHandle(n)]},"[_0._startMove(_1)]":function(t,n){return[t._startMove(n)]},"!(_0===false||_1||_2||_3)&&!_4":function(t,n,e,o,i){return!(!1===t||n||e||o||i)},"[_0.raise()]":function(t){return[t.raise()]},'["pane"]':function(){return["pane"]}},p:{title:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-title",g:1}],f:[{t:3,r:"~/control.title"}]}],n:50,r:"~/control.title"}],windowControls:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-controls",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-minimize",g:1},{n:["click"],t:70,f:{r:["host","window.id"],s:"[_0.getWindow(_1).hide()]"}}]}],n:50,r:"window.minimize"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-maximize",g:1},{n:["click"],t:70,f:{r:["host","window.id"],s:"[_0.getWindow(_1).maximize()]"}}]}],n:50,x:{r:["~/window.dialog","window.maximize","host.data.userMax"],s:"!_0&&_1&&_2"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-close",g:1},{n:["click"],t:70,f:{r:["host","window.id"],s:"[_0.getWindow(_1).close()]"}}]}],n:50,r:"window.close"}]}],pane:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-pane-top",g:1},{n:"tracked",t:71,f:{r:[],s:'["top"]'}}],f:[{t:8,r:"title"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-controls",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-minimize",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.hide()]"}}]}],n:50,r:"~/control.minimize"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-maximize",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.maximize()]"}}]}],n:50,x:{r:["~/control.dialog","~/control.maximize"],s:"!_0&&_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-close",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.close()]"}}]}],n:50,r:"~/control.close"}]}]}],n:51,x:{r:["~/control.max","~/root.userMax","~/root.max","~/root.hideTitleMax","~/control.dialog"],s:"(_0||_1||_2)&&_3&&!_4"}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-content",g:1},{n:"tracked",t:71,f:{r:[],s:'["content"]'}},{n:"class-rwindow-pad",t:13,f:[{t:2,r:"~/control.pad"}]},{n:"class-rwindow-flex",t:13,f:[{t:2,r:"~/control.flex"}]},{t:4,f:[{n:"style-overflow",f:"visible",t:13}],n:50,r:"~/control.autosize"}],f:[{t:8,r:"contents"}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-buttons",g:1},{n:"class-no-buttons",t:13,f:[{t:2,x:{r:["~/visibleButtons"],s:"!_0"}}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-left-buttons",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:".partial"}],n:50,r:".partial"},{t:4,f:[{t:7,e:"button",m:[{n:["click"],t:70,f:{r:["."],s:"[_0.action()]"}},{t:4,f:[{n:"class",f:[{t:2,r:".class"}],t:13}],n:50,r:".class"}],f:[{t:2,r:".label"}]}],n:51,l:1}],n:52,r:"~/leftButtons"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-center-buttons",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:".partial"}],n:50,r:".partial"},{t:4,f:[{t:7,e:"button",m:[{n:["click"],t:70,f:{r:["."],s:"[_0.action()]"}},{t:4,f:[{n:"class",f:[{t:2,r:".class"}],t:13}],n:50,r:".class"}],f:[{t:2,r:".label"}]}],n:51,l:1}],n:52,r:"~/centerButtons"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-right-buttons",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:".partial"}],n:50,r:".partial"},{t:4,f:[{t:7,e:"button",m:[{n:["click"],t:70,f:{r:["."],s:"[_0.action()]"}},{t:4,f:[{n:"class",f:[{t:2,r:".class"}],t:13}],n:50,r:".class"}],f:[{t:2,r:".label"}]}],n:51,l:1}],n:52,r:"~/rightButtons"}]}]}],n:50,r:"~/buttons"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-pane-bottom",g:1}],f:[{t:8,r:"status"}]}],window:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-wrapper",g:1},{n:"tracked",t:71,f:{r:[],s:'["wrapper"]'}},{t:4,f:[" ",{t:4,f:[{n:"style-top",f:"0",t:13},{n:"style-left",f:"0",t:13},{n:"style-width",f:"100%",t:13},{n:"style-height",f:"100%",t:13}],n:51,x:{r:["~/control.autosize","~/control.dialog"],s:"_0||_1"}},{n:"class-rwindow-max",t:13,f:[{t:2,x:{r:["~/control.dialog"],s:"!_0"}}]},{n:"window",t:72,v:"t2"}],n:50,x:{r:["~/root.max","~/root.userMax","~/control.max"],s:"_0||_1||_2"}},{t:4,f:[{t:4,f:[{n:"class-rwindow-resizable",t:13},{n:["mousedown","touchstart"],t:70,f:{r:["@this","@event"],s:"[_0._startResize(_1)]"}},{n:["mousemove","mouseout"],t:70,f:{r:["@this","@event"],s:"[_0._sizeHandle(_1)]"}}],n:50,r:"~/control.resizable"}," ",{t:4,f:[{n:"class-rwindow-resizing",t:13}],n:50,r:"~/control.resizing"},{n:"modal",t:72,v:"t0"},{n:"style-top",f:[{t:2,r:"~/control.top"},"px"],t:13},{n:"style-left",f:[{t:2,r:"~/control.left"},"px"],t:13},{t:4,f:[{n:"style-width",f:[{t:2,r:"~/control.width"},"em"],t:13},{n:"style-height",f:[{t:2,r:"~/control.height"},"em"],t:13}],n:51,r:"~/control.autosize"}],n:51,l:1},{n:"style-z-index",f:[{t:2,r:"~/control.index"}],t:13},{n:"class-rwindow-topmost",t:13,f:[{t:2,r:"~/control.topmost"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow",g:1},{t:4,f:[{n:["mousedown","touchstart"],t:70,f:{r:["@this","@event"],s:"[_0._startMove(_1)]"}}],n:50,x:{r:["~/control.movable","~/root.max","~/root.userMax","~/control.max","~/control.dialog"],s:"!(_0===false||_1||_2||_3)&&!_4"}},{t:4,f:[{n:["mousedown","touchstart"],t:70,f:{r:["@this"],s:"[_0.raise()]"}}],n:50,x:{r:["~/control.topmost"],s:"!_0"},l:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-modal",g:1},{n:"class-rwindow-blocked",t:13,f:[{t:2,r:"~/control.blockers.length"}]}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-pane",g:1},{n:"tracked",t:71,f:{r:[],s:'["pane"]'}},{t:4,f:[{n:"class-rwindow-autosizing",t:13}],n:50,r:"~/control.autosize"}],f:[{t:8,r:"pane"}]}]}]}],n:50,r:"~/control.show"}]}},use:[function(t){void 0===t&&(t={});var n=function(t){return[function(t){var n=Object.assign({},t("raui.primary"),t("raui.toast.primary"));return"\n .rtoast {\n position: absolute;\n display: flex;\n justify-content: center;\n left: 1em;\n right: 1em;\n top: 1em;\n bottom: auto;\n z-index: 5;\n }\n .rtoast-message {\n padding: 0.5em 0.5em 0.5em 1em;\n flex-grow: 2;\n }\n .rtoast-buttons {\n display: inline-block;\n padding: 0.5em 1em 0.5em 0.5em;\n flex-shrink: 1;\n }\n .rtoast-button {\n background-color: transparent;\n border: none;\n color: inherit;\n padding: 0.5em 1em;\n margin: 0 0 0 1em;\n line-height: 1em;\n box-shadow: none;\n }\n .rtoast-bottom {\n bottom: 1em;\n top: auto;\n }\n .rtoast-left {\n justify-content: flex-start;\n }\n .rtoast-right {\n justify-content: flex-end;\n }\n .rtoast-body {\n display: flex;\n flex-shrink: 2;\n align-items: center;\n border-radius: 2px;\n color: "+(n.bg||"#fff")+";\n background-color: "+(n.fg||"#222")+";\n box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n opacity: 0.95;\n }\n \n .rtoast-success {\n color: "+(t("raui.toast.success.fg")||"#f9f9f9")+";\n background-color: "+(t("raui.toast.success.bg")||"#4caf50")+";\n }\n .rtoast-info {\n color: "+(t("raui.toast.info.fg")||"#f9f9f9")+";\n background-color: "+(t("raui.toast.info.bg")||"#07e")+";\n }\n .rtoast-warn {\n color: "+(t("raui.toast.warn.fg")||"#222")+";\n background-color: "+(t("raui.warn.success.bg")||"#ffc107")+";\n }\n .rtoast-error {\n color: "+(t("raui.toast.error.fg")||"#f9f9f9")+";\n background-color: "+(t("raui.toast.error.bg")||"#ff5252")+";\n }\n "}.call(this,t)].join(" ")},e={v:4,t:[{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtoast",g:1},{n:"class-rtoast-bottom",t:13,f:[{t:2,r:".bottom"}]},{n:"class-rtoast-left",t:13,f:[{t:2,r:".left"}]},{n:"class-rtoast-right",t:13,f:[{t:2,r:".right"}]}],f:[{t:7,e:"div",m:[{n:"toast",t:72,v:"t0"},{n:"class",f:["rtoast-body",{t:4,f:[" rtoast-",{t:2,r:".type"}],n:50,r:".type"},{t:4,f:[{t:2,r:".class"}],n:50,r:".class"}],t:13},{t:4,f:[{n:["click"],t:70,f:{r:["@this"],s:"[_0._closeToast()]"}}],n:50,x:{r:[".dismissable"],s:"_0!==false"}}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtoast-message",g:1}],f:[{t:2,r:".message"}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtoast-buttons",g:1}],f:[{t:4,f:[{t:7,e:"button",m:[{n:"class",f:["rtoast-button",{t:4,f:[" ",{t:2,r:".class"}],n:50,r:".class"}],t:13},{t:4,f:[{n:["click"],t:70,f:{r:["."],s:"[_0.action()]"}}],n:50,x:{r:[".action"],s:'typeof _0==="function"'}}],f:[{t:2,r:".label"}]}],n:52,r:".buttons"},{t:4,f:[{t:7,e:"button",m:[{t:13,n:"class",f:"rtoast-button",g:1}],f:["Close"]}],n:50,x:{r:[".dismissable"],s:"_0!==false"},l:1}]}],n:50,x:{r:[".dismissable",".buttons.length"],s:"_0!==false||_1"}}]}]}],n:54,r:"~/_toast"}],n:50,r:"~/_toast"}],e:{"[_0._closeToast()]":function(t){return[t._closeToast()]},"_0!==false":function(t){return!1!==t},"[_0.action()]":function(t){return[t.action()]},'typeof _0==="function"':function(t){return"function"==typeof t},"_0!==false||_1":function(t,n){return!1!==t||n}}};return function(o){var i=o.Ractive,s=o.instance,a=o.proto;s.partials[t.name||"toast"]=e;var l,c,f=Object.assign({},r,t),d=[];function u(){(c=d.shift()).instance.set("_toast",c).then(function(){c.timeout&&(l=setTimeout(function(){c.instance._closeToast()},c.timeout))})}if(a.toast=function(t,n){var e=Object.assign({message:t,instance:this},f,this.toastDefaults,n);d.push(e),c||u()},a._closeToast=function(){l&&(clearTimeout(l),l=null),c.instance.set("_toast",null).then(function(){c=null,d.length&&u()})},a.on=a.on||{},s.transitions.toast=function(t,n){var e=t.processParams({duration:200},n),o=t.getStyle("opacity");return t.isIntro?(t.setStyle({opacity:0,transform:"translateY("+(c.bottom?"":"-")+"1em)"}),t.animateStyle({opacity:o,transform:"none"},e)):(t.setStyle({opacity:o,transform:"none"}),t.animateStyle({opacity:0,transform:"translateY("+(c.bottom?"":"-")+"1em)"},e))},a.on["close-toast"]=function(){this._closeToast()},s===i||i.isInstance(s))i.hasCSS("toast-css")||i.addCSS("toast",n);else{var h=s.css;s.css=function(t){var e="";return"string"==typeof h?e+=h:"function"==typeof h&&(e+=h(t)),n(t)+e}}return a}}(),(void 0===c&&(c={}),function(t){t.instance.transitions[c.name||"expand"]=i})],cssId:"window-host",noIntro:!0,observe:{"@style":function(){var t;(t=this)._media?t._media.fn():t.get("@style.window.maxFrom")&&(t._media={},t._media.fn=function(){var n=t.sizeInPx(t.get("@style.window.maxFrom")),e=t.transitionsEnabled;t.transitionsEnabled=!1,t.set("max",t.host.clientWidth<=n),t.transitionsEnabled=e},t._media.handle=t.root.on("*.resize",t._media.fn),setTimeout(t._media.fn,0))},topLevel:function(t){t?this.link("windows."+a(t),"current"):this.unlink("current")},currentMax:{handler:function(t){(this.children.byName.window||[]).forEach(function(t){return t.instance.fire("resize")})},defer:!0}},computed:{currentMax:function(){var t=this.get("topLevel"),n=this.get("windows."+a(t)+".max");return this.get("userMax")||this.get("max")||n}},on:{config:function(){var t,n=this,e=this.partials.content;if(e&&Array.isArray(e))for(var o=(e=this.partials.content=e.slice()).length;o--;){var i=e[o];"max-top"===i.e&&(e.splice(o,1),n.set({_maxP:{t:i.f},hideTitleMax:!0}),i.m&&n.set({_maxAttrsP:{t:i.m}}))}"undefined"!=typeof window&&(this._resizeListener=function(){t||(t=setTimeout(function(){t=null,n.fire("resize")},300))},window.addEventListener("resize",this._resizeListener))},teardown:function(){this._resizeListener&&window.removeEventListener("resize",this._resizeListener)}}}),n.transitions.modal=function(t,n){var e,o=t.processParams(n,{duration:400,easing:"easeOut",x:0,y:-50,event:!0}),i=t.node.offsetLeft,r=t.node.offsetTop,s=t.node.parentNode.style?t.node.parentNode.style.overflow:"hidden";if(t.node._modalSrc){var a=t.node._modalSrc||{x:i+o.x,y:r+o.y},l={x:a.x-Math.round(t.node.clientWidth/2)-i,y:a.y-Math.round(t.node.clientHeight/2)-r};t.node.parentNode.style&&(t.node.parentNode.style.overflow="hidden"),t.isIntro?(t.node._modalSrc=a,e={transform:"translate(0, 0) scale(1, 1)",opacity:1},t.setStyle({transform:"translate("+l.x+"px, "+l.y+"px) scale(0.5, 0.5)",opacity:0})):e={transform:"translate("+l.x+"px, "+l.y+"px) scale(0.5, 0.5)",opacity:0}}else t.isIntro?(e={transform:"translate(0, 0) scale(1, 1)",opacity:1},t.setStyle({transform:"translate("+o.x+"px, "+o.y+"px) scale(0.5, 0.5)",opacity:0})):e={transform:"translate("+o.x+"px, "+o.y+"px) scale(0.5, 0.5)",opacity:0};t.animateStyle(e,o).then(function(){t.node.parentNode.style&&(t.node.parentNode.style.overflow=s),t.complete()})};var h=["mousemove","mouseup","touchmove","touchend"],w=function(t){function n(n){t.call(this,n)}t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n;var e={resizable:{configurable:!0},title:{configurable:!0},visible:{configurable:!0},pad:{configurable:!0}};return e.resizable.get=function(){return this.get("control.resizable")},e.resizable.set=function(t){return this.set("control.resizable",t)},e.title.get=function(){return this.get("control.title")},e.title.set=function(t){return this.set("control.title",t)},e.visible.get=function(){return this.get("control.show")},e.visible.set=function(t){t?this.show():this.set("control.show",t,{keep:!0}),this.host.raise(this,t)},e.pad.get=function(){return this.get("pad")},e.pad.set=function(t){this.set("pad",t)},n.prototype.close=function(t){if(!0!==t){if(!this.parent)return!1;if(this.get("control.blockers.length"))return!1;if("function"==typeof this.beforeClose&&!1===this.beforeClose())return!1;if(!1===this.fire("beforeClose"))return!1}this.fire("close")},n.prototype.maximize=function(){this.toggle("root.userMax")},n.prototype.hide=function(){this.visible=!1},n.prototype.raise=function(t){this.host.raise(this,t)},n.prototype.show=function(){this.set("control.show",!0),void 0===this.get("control.top")&&this.host.place(this)},n.prototype.size=function(t,n){if(this.visible){var e=this.wrapper;if(e){if("auto"===t){this.set("control.autosize",!0);var o=this.host.sizeInEm(e.clientWidth+16),i=this.host.sizeInEm(e.clientHeight);this.set({"control.width":o,"control.height":i,"control.naturalWidth":o,"control.naturalHeight":i,"control.autosize":!1})}else if("number"==typeof t&&"number"==typeof n)this.set({"control.width":this.host.sizeInEm(t),"control.height":this.host.sizeInEm(n),"control.naturalWidth":this.host.sizeInEm(t),"control.naturalHeight":this.host.sizeInEm(n),"control.autosize":!1});else if("string"==typeof t&&"string"==typeof n){var r=e.style.width,s=e.style.height;e.style.width=t,e.style.height=n;var a=e.clientWidth,l=e.clientHeight;e.style.width=r,e.style.height=s,this.set({"control.width":this.host.sizeInEm(a),"control.height":this.host.sizeInEm(l),"control.naturalWidth":this.host.sizeInEm(a),"control.naturalHeight":this.host.sizeInEm(l),"control.autosize":!1})}this.fire("resize")}}else"number"==typeof t&&"number"==typeof n&&this.set({"control.width":this.host.sizeInEm(t),"control.height":this.host.sizeInEm(n),"control.naturalWidth":this.host.sizeInEm(t),"control.naturalHeight":this.host.sizeInEm(n),"control.autosize":!1})},n.prototype.move=function(t,n){"string"==typeof t&&(t=this.host.sizeInEm(t)),"string"==typeof n&&(t=this.host.sizeInEm(n));var e={};"number"==typeof t&&(e["control.top"]=t),"number"==typeof n&&(e["control.left"]=n),this.set(e)},n.prototype._startMove=function(t){var n=this;if("mousedown"!==t.type||0===t.button){if(this.get("control.topmost")||this.raise(),~t.type.indexOf("mouse")){if(!t.ctrlKey&&t.target!==this.content&&t.target!==this.top&&!this.top.contains(t.target))return}else if(t.targetTouches&&1===t.targetTouches.length&&t.target!==this.content&&t.target!==this.top&&!this.top.contains(t.target))return;var e=this.pane,o=e.style.cursor;e.style.cursor="move",e.style.userSelect="none";var i=t.x||t.clientX||t.targetTouches&&t.targetTouches[0].clientX||0,r=t.y||t.clientY||t.targetTouches&&t.targetTouches[0].clientY||0,s=this.get("control.left")||0,a=this.get("control.top")||0,l=e.clientWidth,c=e.clientHeight,f=function(t){var d=t.x||t.clientX||t.targetTouches&&t.targetTouches[0]&&t.targetTouches[0].clientX||t.changedTouches&&t.changedTouches[0].clientX||0,u=t.y||t.clientY||t.targetTouches&&t.targetTouches[0]&&t.targetTouches[0].clientY||t.changedTouches&&t.changedTouches[0].clientY||0,w=s+(d-i),p=a+(u-r);w<(l<30?0:30-l)&&(w=l<30?0:30-l),p<(c<30?0:30-c)&&(p=c<30?0:30-c),w<0&&(w=0),p<0&&(p=0),n.set({"control.top":p,"control.left":w}),"touchend"===t.type||"mouseup"===t.type?(h.forEach(function(t){return document.removeEventListener(t,f,{passive:!1})}),e.style.cursor=o,e.style.userSelect=""):t.preventDefault()};return h.forEach(function(t){return document.addEventListener(t,f,{passive:!1})}),0!==t.type.indexOf("mouse")&&void 0}},n.prototype._startResize=function(t){var n=this;if(t.target===this.wrapper&&("mousedown"!==t.type||0===t.button)){this.get("control.autosize")&&this.size("auto"),this.get("control.topmost")||this.raise(),this.set("control.resizing",!0);var e,o=this.wrapper,i=t.offsetX||t.targetTouches&&t.targetTouches[0].pageX-o.getBoundingClientRect().left,r=t.offsetY||t.targetTouches&&t.targetTouches[0].pageY-o.getBoundingClientRect().top,s=this.get("@style.window.handleSize")||7,a=o.clientWidth-2*s,l=o.clientHeight-2*s,c=2*s,f=i<=c||i>=a,d=r<=c||r>=l,u=t.x||t.clientX||t.targetTouches&&t.targetTouches[0].clientX||0,w=t.y||t.clientY||t.targetTouches&&t.targetTouches[0].clientY||0,p=this.get("control.left")||0,g=this.get("control.top")||0,m=this.host.sizeInPx(this.get("control.width")+"em"),x=this.host.sizeInPx(this.get("control.height")+"em"),b=this.host.sizeInPx(this.get("control.naturalHeight")+"em"),y=this.host.sizeInPx(this.get("control.naturalWidth")+"em"),v=function(t){t.preventDefault();var o=t.x||t.clientX||t.targetTouches&&t.targetTouches[0]&&t.targetTouches[0].clientX||t.changedTouches&&t.changedTouches[0].clientX||0,a=t.y||t.clientY||t.targetTouches&&t.targetTouches[0]&&t.targetTouches[0].clientY||t.changedTouches&&t.changedTouches[0].clientY||0,l=f?o-u:0,c=d?a-w:0,_={};r<=s?(_["control.top"]=g+c,_["control.height"]=x-c):_["control.height"]=x+c,i<=s?(_["control.left"]=p+l,_["control.width"]=m-l):_["control.width"]=m+l,_["control.width"]<y&&(delete _["control.width"],delete _["control.left"]),_["control.height"]<b&&(delete _["control.height"],delete _["control.top"]),_["control.left"]<0&&(_["control.left"]=0),_["control.top"]<0&&(_["control.top"]=0),_["control.width"]&&(_["control.width"]=n.host.sizeInEm(_["control.width"])),_["control.height"]&&(_["control.height"]=n.host.sizeInEm(_["control.height"])),n.set(_),"touchend"===t.type||"mouseup"===t.type?(h.forEach(function(t){return document.removeEventListener(t,v,{passive:!1})}),n.set("control.resizing",!1),m===n.get("control.width")&&x===n.get("control.height")||(e&&clearTimeout(e),e=null,n.fire("resize"))):e||(e=setTimeout(function(){n.fire("resize"),e=null},200))};return h.forEach(function(t){return document.addEventListener(t,v,{passive:!1})}),!1}},n.prototype._sizeHandle=function(t){if(t.target===this.wrapper){var n=this.wrapper;if("mouseout"===t.type)return n.style.cursor="auto";var e=t.offsetX,o=t.offsetY,i=this.get("@style.window.handleSize")||7,r=n.clientWidth-i,s=n.clientHeight-i,a=n.style;a.cursor=e<=i+i&&o<=i+i||e>=r-i&&o>=s-i?"nwse-resize":e>=r-i&&o<=i+i||e<=i+i&&o>=s-i?"nesw-resize":(e<=i||e>=r)&&(o<s||o>i)?"ew-resize":(o<=i||o>=s)&&(e<r||e>i)?"ns-resize":"auto"}},Object.defineProperties(n.prototype,e),n}(l),p=["left","right","center","condition"];function g(t){return void 0===t&&(t={}),function(n){n.instance.components[t.name||"host"]=d}}l.extendWith(w,{template:{v:4,t:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-wrapper",g:1},{n:"tracked",t:71,f:{r:[],s:'["wrapper"]'}},{t:4,f:[" ",{t:4,f:[{n:"style-top",f:"0",t:13},{n:"style-left",f:"0",t:13},{n:"style-width",f:"100%",t:13},{n:"style-height",f:"100%",t:13}],n:51,x:{r:["~/control.autosize","~/control.dialog"],s:"_0||_1"}},{n:"class-rwindow-max",t:13,f:[{t:2,x:{r:["~/control.dialog"],s:"!_0"}}]},{n:"window",t:72,v:"t2"}],n:50,x:{r:["~/root.max","~/root.userMax","~/control.max"],s:"_0||_1||_2"}},{t:4,f:[{t:4,f:[{n:"class-rwindow-resizable",t:13},{n:["mousedown","touchstart"],t:70,f:{r:["@this","@event"],s:"[_0._startResize(_1)]"}},{n:["mousemove","mouseout"],t:70,f:{r:["@this","@event"],s:"[_0._sizeHandle(_1)]"}}],n:50,r:"~/control.resizable"}," ",{t:4,f:[{n:"class-rwindow-resizing",t:13}],n:50,r:"~/control.resizing"},{n:"modal",t:72,v:"t0"},{n:"style-top",f:[{t:2,r:"~/control.top"},"px"],t:13},{n:"style-left",f:[{t:2,r:"~/control.left"},"px"],t:13},{t:4,f:[{n:"style-width",f:[{t:2,r:"~/control.width"},"em"],t:13},{n:"style-height",f:[{t:2,r:"~/control.height"},"em"],t:13}],n:51,r:"~/control.autosize"}],n:51,l:1},{n:"style-z-index",f:[{t:2,r:"~/control.index"}],t:13},{n:"class-rwindow-topmost",t:13,f:[{t:2,r:"~/control.topmost"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow",g:1},{t:4,f:[{n:["mousedown","touchstart"],t:70,f:{r:["@this","@event"],s:"[_0._startMove(_1)]"}}],n:50,x:{r:["~/control.movable","~/root.max","~/root.userMax","~/control.max","~/control.dialog"],s:"!(_0===false||_1||_2||_3)&&!_4"}},{t:4,f:[{n:["mousedown","touchstart"],t:70,f:{r:["@this"],s:"[_0.raise()]"}}],n:50,x:{r:["~/control.topmost"],s:"!_0"},l:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-modal",g:1},{n:"class-rwindow-blocked",t:13,f:[{t:2,r:"~/control.blockers.length"}]}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-pane",g:1},{n:"tracked",t:71,f:{r:[],s:'["pane"]'}},{t:4,f:[{n:"class-rwindow-autosizing",t:13}],n:50,r:"~/control.autosize"}],f:[{t:8,r:"pane"}]}]}]}],n:50,r:"~/control.show"}]},cssId:"window",partials:{pane:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-pane-top",g:1},{n:"tracked",t:71,f:{r:[],s:'["top"]'}}],f:[{t:8,r:"title"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-controls",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-minimize",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.hide()]"}}]}],n:50,r:"~/control.minimize"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-maximize",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.maximize()]"}}]}],n:50,x:{r:["~/control.dialog","~/control.maximize"],s:"!_0&&_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-close",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.close()]"}}]}],n:50,r:"~/control.close"}]}]}],n:51,x:{r:["~/control.max","~/root.userMax","~/root.max","~/root.hideTitleMax","~/control.dialog"],s:"(_0||_1||_2)&&_3&&!_4"}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-content",g:1},{n:"tracked",t:71,f:{r:[],s:'["content"]'}},{n:"class-rwindow-pad",t:13,f:[{t:2,r:"~/control.pad"}]},{n:"class-rwindow-flex",t:13,f:[{t:2,r:"~/control.flex"}]},{t:4,f:[{n:"style-overflow",f:"visible",t:13}],n:50,r:"~/control.autosize"}],f:[{t:8,r:"contents"}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-buttons",g:1},{n:"class-no-buttons",t:13,f:[{t:2,x:{r:["~/visibleButtons"],s:"!_0"}}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-left-buttons",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:".partial"}],n:50,r:".partial"},{t:4,f:[{t:7,e:"button",m:[{n:["click"],t:70,f:{r:["."],s:"[_0.action()]"}},{t:4,f:[{n:"class",f:[{t:2,r:".class"}],t:13}],n:50,r:".class"}],f:[{t:2,r:".label"}]}],n:51,l:1}],n:52,r:"~/leftButtons"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-center-buttons",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:".partial"}],n:50,r:".partial"},{t:4,f:[{t:7,e:"button",m:[{n:["click"],t:70,f:{r:["."],s:"[_0.action()]"}},{t:4,f:[{n:"class",f:[{t:2,r:".class"}],t:13}],n:50,r:".class"}],f:[{t:2,r:".label"}]}],n:51,l:1}],n:52,r:"~/centerButtons"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-right-buttons",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:".partial"}],n:50,r:".partial"},{t:4,f:[{t:7,e:"button",m:[{n:["click"],t:70,f:{r:["."],s:"[_0.action()]"}},{t:4,f:[{n:"class",f:[{t:2,r:".class"}],t:13}],n:50,r:".class"}],f:[{t:2,r:".label"}]}],n:51,l:1}],n:52,r:"~/rightButtons"}]}]}],n:50,r:"~/buttons"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-pane-bottom",g:1}],f:[{t:8,r:"status"}]}],title:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-title",g:1}],f:[{t:3,r:"~/control.title"}]}],n:50,r:"~/control.title"}],contents:"",status:""},data:function(){return{buttons:[],visibleButtons:0}},computed:{leftButtons:function(){return(this.get("buttons")||[]).filter(function(t){return"left"===t.where})},centerButtons:function(){return(this.get("buttons")||[]).filter(function(t){return"center"===t.where})},rightButtons:function(){return(this.get("buttons")||[]).filter(function(t){return!t.where||"right"===t.where})}},decorators:{button:function(t){var n=this.getContext(t);return n.add("visibleButtons"),{update:function(){},teardown:function(){n.subtract("visibleButtons")}}}},on:{config:function(){var t=w.prototype.template,n=this.template;"string"!=typeof t&&!Array.isArray(t)&&t.t&&(t=t.t),"string"!=typeof n&&!Array.isArray(n)&&n.t&&(n=n.t),t!==n&&(this.partials.hasOwnProperty("contents")||(this.partials.contents=n),this.template=t)},construct:function(){var t=this.constructor;if(!t._constructed){t._constructed=1;var n=t.prototype.template.t.slice(),e=n.find(function(t){return"buttons"===t.e});function o(t){var n=t.m||[],e={partial:{t:[{t:t.t,e:t.e,f:t.f,m:n.filter(function(t){return!~p.indexOf(t.n)})}]},where:n.find(function(t){return"left"===t.n})?"left":n.find(function(t){return"center"===t.n})?"center":"right"};return e.partial.t[0].m.push({t:71,n:"button"}),e}t.prototype.template.t=n.filter(function(t){return"buttons"!==t.e}),e&&(t._btns=e.f.filter(function(t){return"button"===t.e||4===t.t&&(50===t.n||51===t.n)&&t.f.find(function(t){return"button"===t.e})}).map(function(t){if(4===t.t){var n=o(t.f.find(function(t){return"button"===t.e})),e={t:t.t,n:t.n,f:[n.partial.t[0]]};return t.r&&(e.r=t.r),t.rx&&(e.rx=t.rx),t.x&&(e.x=t.x),n.partial={t:[e]},n}return o(t)}))}},init:function(){var t=this.constructor;t._btns&&!this.get("buttons.length")&&this.set("buttons",t._btns)}}}),o("RMWindowHost","components",d),o("RMWindow","components",w),d.prototype.Window=w,t.Base=l,t.Host=d,t.Window=w,t.plugin=g,t.default=g,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("ractive")):"function"==typeof define&&define.amd?define(["exports","ractive"],n):n(t.RMWindow={},t.Ractive)}(this,function(t,n){"use strict";n=n&&n.hasOwnProperty("default")?n.default:n;var e="undefined"!=typeof window?window:null;function o(t,n,o){if(e&&e.Ractive&&"object"==typeof e.Ractive[n]){var i=document.currentScript;if(i||(i=(i=document.querySelectorAll("script"))[i.length-1]),i){var r=i.getAttribute("data-alias");r&&(r=(r=r.split("&")).reduce(function(t,n){var e=n.split("="),o=e[0],i=e[1];return t[o]=i,t},{})),Ractive[n][r&&r[t]||t]=o}}}function i(t,n){var e=t.processParams(n,{duration:200,easing:"easeInOut"});t.setStyle("overflow","hidden");var o="x"===e.axis?"width":"height";if(t.isIntro){var i=t.getStyle(o);return t.setStyle(o,0),t.setStyle("opacity",0),t.animateStyle(o,i,e).then(function(){return t.animateStyle("opacity",1,e)})}return t.setStyle(o,t.getStyle(o)),t.setStyle("opacity",1),t.animateStyle("opacity",0,e).then(function(){return t.animateStyle(o,0,e)})}o("expand","transitions",i);var r={timeout:6e3,top:!0};var s,a=n.escapeKey,l=function(t){function n(n){t.call(this,n)}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n}(n);n.extendWith(l,{css:function(t){return[function(t){var n=Object.assign({},t("raui.primary"),t("raui.window.primary")),e=Object.assign({host:{},title:{}},t("raui.window"));return"\n .rwhost {\n position: relative;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n \n .rwhost-sizer {\n position: absolute;\n }\n \n .rwhost-pane {\n display: flex;\n position: relative;\n width: 100%;\n box-sizing: border-box;\n flex-grow: 2;\n overflow: auto;\n background-color: "+(e.host.bg||n.bg||"#fff")+";\n z-index: 1;\n }\n \n .rwhost-pane-content {\n flex-grow: 1;\n }\n \n .rwhost-modal {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n z-index: -1;\n opacity: 0;\n transition: opacity 0.2s ease-in-out, z-index 0s linear 0.2s;\n background-color: #000;\n }\n .rwhost-modal-active {\n opacity: 0.5;\n z-index: 1;\n transition: opacity 0.2s ease-in-out, z-index 0s linear;\n }\n \n .rwindow-wrapper {\n display: inline-block;\n box-sizing: border-box;\n position: absolute;\n }\n .rwindow-wrapper.rwindow-resizing {\n transition: none;\n }\n \n .rwindow-wrapper.rwindow-resizable {\n padding: "+(e.handleSize||7)+"px;\n }\n \n .rwindow-topmost > .rwindow {\n box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12), 0 3px 5px -1px rgba(0, 0, 0, 0.3);\n opacity: 1;\n }\n \n .rwindow-modal {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background-color: rgba(0, 0, 0, 0.5);\n opacity: 0;\n z-index: -1;\n transition: opacity 0.4s ease-in-out, z-index 0s linear 0.4s;\n }\n .rwindow-modal.rwindow-blocked {\n opacity: 1;\n z-index: 10;\n transition: opacity 0.4s ease-in-out, z-index 0s linear;\n }\n \n .rwindow {\n position: relative;\n box-sizing: border-box;\n background-color: "+(e.bg||n.bg||"#fff")+";\n color: "+(e.fg||n.fg||"#222")+";\n box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n border-radius: 2px;\n overflow: hidden;\n width: 100%;\n height: 100%;\n min-width: "+(e.minWidth||"6em")+";\n min-height: "+(e.minHeight||"6em")+";\n transition: box-shadow 0.4s ease-in-out, opacity 0.4s ease-in-out;\n }\n .rwindow-max > .rwindow {\n border-radius: 0;\n box-shadow: none;\n }\n \n .rwindow-pane-top,\n .rwindow-max-top {\n background-color: "+(e.title.bg||n.fga||"#07e")+";\n color: "+(e.title.fg||n.bg||"#fff")+";\n flex-shrink: 0;\n }\n \n .rwindow-max-top {\n flex-shrink: 2;\n }\n \n .rwindow-pane-top {\n display: flex;\n align-items: center;\n }\n \n .rwindow-pane {\n display: flex;\n flex-direction: column;\n table-layout: fixed;\n width: 100%;\n height: 100%;\n }\n .rwindow-autosizing {\n display: block;\n box-sizing: border-box;\n }\n .rwindow-content {\n overflow: auto;\n flex-grow: 2;\n position: relative;\n box-sizing: border-box;\n }\n .rwindow-content.rwindow-pad {\n padding: 1em;\n }\n .rwindow-content.rwindow-flex {\n display: flex;\n flex-direction: column;\n }\n \n .rwindow-buttons {\n display: flex;\n flex-shrink: 0;\n padding: 0.5em;\n border-top: 1px solid "+(e.title.bg||n.fga||"#07e")+";\n }\n .rwindow-buttons.no-buttons {\n display: none;\n }\n .rwindow-left-buttons {\n text-align: left;\n flex-grow: 2;\n }\n .rwindow-left-buttons button {\n margin-right: 0.5em;\n }\n .rwindow-center-buttons {\n text-align: center;\n flex-shrink: 2;\n }\n .rwindow-center-buttons button {\n margin: 0 0.25em;\n }\n .rwindow-right-buttons {\n text-align: right;\n flex-grow: 2;\n }\n .rwindow-right-buttons button {\n margin-left: 0.5em;\n }\n \n .rwindow-title {\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 0.5em;\n white-space: nowrap;\n box-sizing: border-box;\n flex-grow: 1;\n }\n \n .rwindow-controls {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n flex-grow: 1;\n }\n .rwindow-controls > div {\n margin: 0 1em 0 0;\n width: 0.7em;\n height: 0.7em;\n cursor: pointer;\n }\n .rwindow-minimize {\n border-bottom: 2px solid;\n }\n .rwindow-maximize {\n border: 2px solid;\n }\n .rwindow-controls > .rwindow-close {\n width: 0.5em;\n height: 1em;\n border-right: 2px solid;\n transform: rotate(45deg);\n transform-origin: center right;\n position: relative;\n margin-right: 1.5em;\n }\n .rwindow-close:before {\n cursor: pointer;\n height: 1.2em;\n width: 1.2em;\n top: 0.3em;\n left: 0.1em;\n content: ' ';\n transform: rotate(-45deg);\n transform-origin: center left;\n position: absolute;\n }\n .rwindow-close:after {\n cursor: pointer;\n height: 100%;\n width: 100%;\n top: 1px;\n left: calc(100% + 1px);\n content: ' ';\n border-left: 2px solid;\n transform: rotate(-90deg);\n transform-origin: center left;\n position: absolute;\n }\n "+("function"==typeof t("raui.window.extra")?t("raui.window.extra").call(this,t):"")+"\n "}.call(this,t)].join(" ")},cssId:"rwindow",noCssTransform:!0,delegate:!1,decorators:{tracked:function(t,n){return this[n]=t,{teardown:function(){this[n]===t&&(this[n]=null)}}}},transitions:{window:function(t,n){if(s)return t.complete();s=t;var e=t.processParams(n,{duration:400,easing:"easeInOut"}),o=t.node.parentNode,i=o.style?o.style.overflow:"";o.style&&(o.style.overflow="hidden"),t.isIntro||e.intro?(t.setStyle({transform:"translate(30%, 0px) scale(1.1, 1.1)",opacity:0}),t.animateStyle({transform:"none",opacity:1},e).then(function(){s=!1,t.complete(),o.style&&(o.style.overflow=i)})):(t.setStyle({transform:"none",opacity:1}),t.animateStyle({transform:"translate(30%, 0px) scale(1.1, 1.1)",opacity:0},e).then(function(){s=!1,t.complete(),o.style&&(o.style.overflow=i)}))}}});var c,f=0,d=function(t){function n(n){t.call(this,n),this.defaults={}}t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n;var e={current:{configurable:!0},currentId:{configurable:!0},placement:{configurable:!0}};return e.current.get=function(){var t=this.get("topLevel");return this.getWindow(this.get("windows")[t].id)},e.currentId.get=function(){var t=this.get("topLevel");return this.get("windows."+a(t)+".id")},e.placement.get=function(){return this.get("placement")},e.placement.set=function(t){return this.set("placement",t)},n.prototype.addWindow=function(t,n){var e=this,o=Object.assign({},this.defaults,t.options,t.get("options"),n);if(!(t instanceof w))throw new Error("Windows must be instances of Window");t.id||t.set("@.id",o.id||"window"+f++),this.get("windows."+a(t.id))||this.set("windows."+a(t.id),Object.assign({show:!1!==o.show,autosize:!0,id:t.id,blockers:[],close:!0,minimize:!0,maximize:!0},o,{id:t.id})),t.host=this;var i,r,s=this.attachChild(t,{target:"window"});(o.block&&("string"==typeof(i=o.block.id||o.block)&&i in this.get("windows")?(this.push("windows."+a(i)+".blockers",t.id),t.set("control.blocking",i)):i=!1),"fill"===o.size&&(i||o.block))?(!0===o.block?r=this.find(".rwhost-pane"):(r=this.getWindow(i))&&(r=r.find(".rwindow")),r&&(t.size(r.clientWidth-(o.fillPad||20),r.clientHeight-(o.fillPad||20)),!0!==o.block||o.top||o.left||(o.top=o.left=Math.floor((o.fillPad||20)/2)))):o.width&&o.height?t.size(o.width,o.height):t.size("auto");return o.top&&o.left?t.move(o.top,o.left):this.place(t),this.raise(t,!1!==o.show),t.on("close",function(){var n=t.get("control.blocking");if(n){var o=e.windowGet(n,"blockers");e.splice("windows."+a(n)+".blockers",o.indexOf(t.id),1)}e.detachChild(t).then(function(){return t.teardown()}),e.set("windows."+a(t.id)+".index",-1),e.raise(),e.set("windows."+a(t.id),void 0),delete e.get("windows")[t.id]}),this.update("windows."+a(t.id)+".id",{force:!0}),s.then(function(){return t})},n.prototype.getWindow=function(t){return this.children.byName.window&&this.children.byName.window.filter(function(n){return n.instance.id===t}).map(function(t){return t.instance})[0]},n.prototype.windowGet=function(t,n){return this.get("windows."+a(t)+"."+n)},n.prototype.windowSet=function(t,n,e){return this.set("windows."+a(t)+"."+n,e)},n.prototype.raise=function(t,n){var e=this,o=t instanceof w?t:this.children.byName.window.filter(function(n){return n.instance.id===t}).map(function(t){return t.instance})[0],i=this.get("windows"),r=this,s=Object.keys(i).map(function(t){return i[t]}),l=s.length+1,c=this.get("topLevel");this.get("blocked");function f(t){var n=r.get("windows."+a(t)+".blockers");n&&(n.forEach(function(t){return r.add("windows."+a(t)+".index",l++)}),n.forEach(function(t){return f(t)}))}o&&(o.set("control.index",!1===n?-1:l++),!1===n||o.visible||o.show(),f(o.id)),s.filter(function(t){return!1!==t.show&&!0===t.block}).forEach(function(t){e.set("windows."+a(t.id)+".index",(t.index||0)+l),f(t.id)});var d=s.sort(function(t,n){return t.show?n.show&&t.index<n.index?-1:1:-1}),u=d.filter(function(t){return t.show});l=d.indexOf(u[u.length-1]);var h={},p=null;if(d.forEach(function(t,n){var e=a(t.id);!0===t.block&&null===p&&(p=n),h["windows."+e+".index"]=null!==p?n+2:n,h["windows."+e+".topmost"]=n===l,h["windows."+e+".stack"]=d.length-n}),h.blocked=null!==p?p+1:0,~l&&d.length?h.topLevel=d[l].id:h.topLevel=null,this.set(h),(l=h.topLevel)&&l!==c&&this.get("currentMax")&&this.rendered){var g=this.get("windows."+a(c));o=this.getWindow(l),(!g||!g.dialog||g.blocking&&g.blocking!==l)&&o.transition("window",o.find("div"),{intro:!0})}},n.prototype.place=function(t){if(t.get("control.show")){var n=t.get("control");void 0===n.width&&t.size("auto");var e=0,o=0;if(this.fragment&&this.fragment.rendered){var i=this.find(".rwhost"),r=i.clientWidth,s=i.clientHeight,l=t.get("control.blocking");if(l){var c="windows."+a(l),f=this.get(c),d=n.max||!n.dialog&&(this.get("max")||this.get("userMax")),h=f.max||this.get("userMax")||this.get("max"),w=h?this.host.clientWidth:this.sizeInPx(f.width+"em"),p=h?this.host.clientHeight:this.sizeInPax(f.height+"em"),g=h?0:f.left,m=h?0:f.top;e=(d?r:w/2)+(d?0:g)-this.sizeInPx(n.width+"em")/2,o=(d?s:p/2)+(d?0:m)-this.sizeInPx(n.height+"em")/2}else{var x,b=this.get("placement");if("function"==typeof b)try{x=b(this,i,n)}catch(t){x=u(this,i,n)}else if("string"==typeof b)switch(b){case"smart":x=function(t,n,e){var o,i,r=n.clientWidth-10,s=n.clientHeight-10,a=Math.floor(s/16),l=Math.floor(r/16),c=new Array(a*l),f=new Array(a*l);for(o=0;o<c.length;o++)c[o]=0;var d,u,h,w,p,g,m,x,b=0,y=t.get("windows");for(var v in y)for(b++,d=y[v],u=Math.floor(d.top/16),h=Math.floor(d.left/16),p=Math.ceil(t.sizeInPx(d.height+"em")/16),w=Math.ceil(t.sizeInPx(d.width+"em")/16),o=u;o<u+p&&o<a;o++)for(i=h;i<h+w&&i<l;i++)c[o*l+i]++;for(w=Math.ceil(t.sizeInPx(e.width+"em")/16),p=Math.ceil(t.sizeInPx(e.height+"em")/16),o=0;o<a;o++)for(i=0;i<l;i++){if(o+p>a||i+w>l)g=b*w*p;else for(g=0,m=0;m<p;m++)for(x=0;x<w;x++)g+=c[(o+m)*l+i+x];if(0===g)return{top:16*o+5,left:16*i+5};f[o*l+i]=g}for(g=b*w*p,m=0,o=0;o<f.length;o++)f[o]<g&&(g=f[o],m=o);return{top:16*Math.floor(m/l)+5,left:m%l*16+5}}(this,i,n);break;default:x=u(this,i,n)}else x=u(this,i,n);o=x.top,e=x.left}(isNaN(e)||e<0)&&(e=10),(isNaN(o)||o<0)&&(o=10),t.set({"control.top":o,"control.left":e})}}},n.prototype.sizeInPx=function(t){return this.sizer.style.width="number"==typeof t?t+"px":t,this.sizer.clientWidth},n.prototype.sizeInEm=function(t){return this.sizeInPx(t)/this.sizeInPx("1em")},Object.defineProperties(n.prototype,e),n}(l);function u(t,n,e){var o=n.clientWidth,i=n.clientHeight,r=0,s=0,a=void 0===t._grid1?t._grid1=0:t._grid1>7?t._grid1=0:++t._grid1,l=Math.floor(o/3),c=Math.floor(i/3),f=t.sizeInPx(e.width+"em"),d=t.sizeInPx(e.height+"em");switch(a){case 5:case 7:case 8:r=i-d-10;break;case 2:case 4:case 6:r=c+Math.floor((c-d)/2);break;case 0:case 1:case 3:r=10}switch(a){case 3:case 6:case 8:s=o-f-10;break;case 1:case 4:case 7:s=l+Math.floor((l-f)/2);break;case 0:case 2:case 5:s=10}return s+f>o&&(s=o-f-10),r+d>i&&(r=i-d-10),{top:r,left:s}}l.extendWith(d,{template:{v:4,t:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwhost",g:1},{n:"tracked",t:71,f:{r:[],s:'["host"]'}}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwhost-sizer",g:1},{n:"tracked",t:71,f:{r:[],s:'["sizer"]'}}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-max-top",g:1},{t:4,f:[{t:16,r:"~/_maxAttrsP"}],n:50,r:"~/_maxAttrsP"}],f:[{t:16,r:"~/_maxP",z:[{n:"window",x:{r:"~/current"}},{n:"windowControls",x:{x:{r:["@this.partials.windowControls"],s:"{t:_0}"}}},{n:"host",x:{r:"@this"}}]}]}],n:50,x:{r:["~/currentMax","~/_maxP"],s:"_0&&_1"}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwhost-pane",g:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwhost-pane-content",g:1}],f:[{t:16}]}," ",{t:4,f:[{t:11,n:"window",m:[{n:"control",f:[{t:2,rx:{r:"~/windows",m:[{t:30,n:".instance.id"}]}}],t:13},{n:"root",t:13,f:[{t:2,r:"~/"}]}]}],n:52,r:"@this.children.byName.window"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwhost-modal",g:1},{t:4,f:[{n:"class-rwhost-modal-active",t:13},{n:"style-z-index",f:[{t:2,r:"~/blocked"}],t:13}],n:50,r:"~/blocked"}]}]}," ",{t:8,r:"toast"}]}],e:{'["host"]':function(){return["host"]},'["sizer"]':function(){return["sizer"]},"{t:_0}":function(t){return{t:t}},"_0&&_1":function(t,n){return t&&n},"[_0.getWindow(_1).hide()]":function(t,n){return[t.getWindow(n).hide()]},"[_0.getWindow(_1).maximize()]":function(t,n){return[t.getWindow(n).maximize()]},"!_0&&_1&&_2":function(t,n,e){return!t&&n&&e},"[_0.getWindow(_1).close()]":function(t,n){return[t.getWindow(n).close()]},'["top"]':function(){return["top"]},"[_0.hide()]":function(t){return[t.hide()]},"!_0&&_1":function(t,n){return!t&&n},"[_0.maximize()]":function(t){return[t.maximize()]},"[_0.close()]":function(t){return[t.close()]},"(_0||_1||_2)&&_3&&!_4":function(t,n,e,o,i){return(t||n||e)&&o&&!i},'["content"]':function(){return["content"]},"!_0":function(t){return!t},"[_0.call(_1)]":function(t,n){return[t.call(n)]},'["wrapper"]':function(){return["wrapper"]},"_0||_1":function(t,n){return t||n},"(_0||_1||_2)&&!_3":function(t,n,e,o){return(t||n||e)&&!o},"[_0._startResize(_1)]":function(t,n){return[t._startResize(n)]},"[_0._sizeHandle(_1)]":function(t,n){return[t._sizeHandle(n)]},"[_0._startMove(_1)]":function(t,n){return[t._startMove(n)]},"!(_0===false||_1||_2||_3)&&!_4":function(t,n,e,o,i){return!(!1===t||n||e||o||i)},"[_0.raise()]":function(t){return[t.raise()]},'["pane"]':function(){return["pane"]}},p:{title:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-title",g:1}],f:[{t:3,r:"~/control.title"}]}],n:50,r:"~/control.title"}],windowControls:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-controls",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-minimize",g:1},{n:["click"],t:70,f:{r:["host","window.id"],s:"[_0.getWindow(_1).hide()]"}}]}],n:50,r:"window.minimize"}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-maximize",g:1},{n:["click"],t:70,f:{r:["host","window.id"],s:"[_0.getWindow(_1).maximize()]"}}]}],n:50,x:{r:["~/window.dialog","window.maximize","host.data.userMax"],s:"!_0&&_1&&_2"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-close",g:1},{n:["click"],t:70,f:{r:["host","window.id"],s:"[_0.getWindow(_1).close()]"}}]}],n:50,r:"window.close"}]}],pane:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-pane-top",g:1},{n:"tracked",t:71,f:{r:[],s:'["top"]'}}],f:[{t:8,r:"title"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-controls",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-minimize",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.hide()]"}}]}],n:50,x:{r:["~/control.dialog","~/control.minimize"],s:"!_0&&_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-maximize",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.maximize()]"}}]}],n:50,x:{r:["~/control.dialog","~/control.maximize"],s:"!_0&&_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-close",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.close()]"}}]}],n:50,r:"~/control.close"}]}]}],n:51,x:{r:["~/control.max","~/root.userMax","~/root.max","~/root.hideTitleMax","~/control.dialog"],s:"(_0||_1||_2)&&_3&&!_4"}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-content",g:1},{n:"tracked",t:71,f:{r:[],s:'["content"]'}},{n:"class-rwindow-pad",t:13,f:[{t:2,r:"~/control.pad"}]},{n:"class-rwindow-flex",t:13,f:[{t:2,r:"~/control.flex"}]},{t:4,f:[{n:"style-overflow",f:"visible",t:13}],n:50,r:"~/control.autosize"}],f:[{t:8,r:"contents"}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-buttons",g:1},{n:"class-no-buttons",t:13,f:[{t:2,x:{r:["~/visibleButtons"],s:"!_0"}}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-left-buttons",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:".partial"}],n:50,r:".partial"},{t:4,f:[{t:7,e:"button",m:[{n:"button",t:71},{n:["click"],t:70,f:{r:[".action","@"],s:"[_0.call(_1)]"}},{t:4,f:[{n:"class",f:[{t:2,r:".class"}],t:13}],n:50,r:".class"}],f:[{t:2,r:".label"}]}],n:51,l:1}],n:52,r:"~/leftButtons"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-center-buttons",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:".partial"}],n:50,r:".partial"},{t:4,f:[{t:7,e:"button",m:[{n:"button",t:71},{n:["click"],t:70,f:{r:[".action","@"],s:"[_0.call(_1)]"}},{t:4,f:[{n:"class",f:[{t:2,r:".class"}],t:13}],n:50,r:".class"}],f:[{t:2,r:".label"}]}],n:51,l:1}],n:52,r:"~/centerButtons"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-right-buttons",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:".partial"}],n:50,r:".partial"},{t:4,f:[{t:7,e:"button",m:[{n:"button",t:71},{n:["click"],t:70,f:{r:[".action","@"],s:"[_0.call(_1)]"}},{t:4,f:[{n:"class",f:[{t:2,r:".class"}],t:13}],n:50,r:".class"}],f:[{t:2,r:".label"}]}],n:51,l:1}],n:52,r:"~/rightButtons"}]}]}],n:50,r:"~/buttons"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-pane-bottom",g:1}],f:[{t:8,r:"status"}]}],window:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-wrapper",g:1},{n:"tracked",t:71,f:{r:[],s:'["wrapper"]'}},{t:4,f:[" ",{t:4,f:[{n:"style-top",f:"0",t:13},{n:"style-left",f:"0",t:13},{n:"style-width",f:"100%",t:13},{n:"style-height",f:"100%",t:13}],n:51,x:{r:["~/control.autosize","~/control.dialog"],s:"_0||_1"}},{n:"class-rwindow-max",t:13},{n:"window",t:72,v:"t2"}],n:50,x:{r:["~/root.max","~/root.userMax","~/control.max","~/control.dialog"],s:"(_0||_1||_2)&&!_3"}},{t:4,f:[{t:4,f:[{n:"class-rwindow-resizable",t:13},{n:["mousedown","touchstart"],t:70,f:{r:["@this","@event"],s:"[_0._startResize(_1)]"}},{n:["mousemove","mouseout"],t:70,f:{r:["@this","@event"],s:"[_0._sizeHandle(_1)]"}}],n:50,r:"~/control.resizable"}," ",{t:4,f:[{n:"class-rwindow-resizing",t:13}],n:50,r:"~/control.resizing"},{n:"modal",t:72,v:"t0"},{n:"style-top",f:[{t:2,r:"~/control.top"},"px"],t:13},{n:"style-left",f:[{t:2,r:"~/control.left"},"px"],t:13},{t:4,f:[{n:"style-width",f:[{t:2,r:"~/control.width"},"em"],t:13},{n:"style-height",f:[{t:2,r:"~/control.height"},"em"],t:13}],n:51,r:"~/control.autosize"}],n:51,l:1},{n:"style-z-index",f:[{t:2,r:"~/control.index"}],t:13},{n:"class-rwindow-topmost",t:13,f:[{t:2,r:"~/control.topmost"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow",g:1},{t:4,f:[{n:["mousedown","touchstart"],t:70,f:{r:["@this","@event"],s:"[_0._startMove(_1)]"}}],n:50,x:{r:["~/control.movable","~/root.max","~/root.userMax","~/control.max","~/control.dialog"],s:"!(_0===false||_1||_2||_3)&&!_4"}},{t:4,f:[{n:["mousedown","touchstart"],t:70,f:{r:["@this"],s:"[_0.raise()]"}}],n:50,x:{r:["~/control.topmost"],s:"!_0"},l:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-modal",g:1},{n:"class-rwindow-blocked",t:13,f:[{t:2,r:"~/control.blockers.length"}]}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-pane",g:1},{n:"tracked",t:71,f:{r:[],s:'["pane"]'}},{t:4,f:[{n:"class-rwindow-autosizing",t:13}],n:50,r:"~/control.autosize"}],f:[{t:8,r:"pane"}]}]}]}],n:50,r:"~/control.show"}]}},use:[function(t){void 0===t&&(t={});var n=function(t){return[function(t){var n=Object.assign({},t("raui.primary"),t("raui.toast.primary"));return"\n .rtoast {\n position: absolute;\n display: flex;\n justify-content: center;\n left: 1em;\n right: 1em;\n top: 1em;\n bottom: auto;\n z-index: 5;\n }\n .rtoast-message {\n padding: 0.5em 0.5em 0.5em 1em;\n flex-grow: 2;\n }\n .rtoast-buttons {\n display: inline-block;\n padding: 0.5em 1em 0.5em 0.5em;\n flex-shrink: 1;\n }\n .rtoast-button {\n background-color: transparent;\n border: none;\n color: inherit;\n padding: 0.5em 1em;\n margin: 0 0 0 1em;\n line-height: 1em;\n box-shadow: none;\n }\n .rtoast-bottom {\n bottom: 1em;\n top: auto;\n }\n .rtoast-left {\n justify-content: flex-start;\n }\n .rtoast-right {\n justify-content: flex-end;\n }\n .rtoast-body {\n display: flex;\n flex-shrink: 2;\n align-items: center;\n border-radius: 2px;\n color: "+(n.bg||"#fff")+";\n background-color: "+(n.fg||"#222")+";\n box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n opacity: 0.95;\n }\n \n .rtoast-success {\n color: "+(t("raui.toast.success.fg")||"#f9f9f9")+";\n background-color: "+(t("raui.toast.success.bg")||"#4caf50")+";\n }\n .rtoast-info {\n color: "+(t("raui.toast.info.fg")||"#f9f9f9")+";\n background-color: "+(t("raui.toast.info.bg")||"#07e")+";\n }\n .rtoast-warn {\n color: "+(t("raui.toast.warn.fg")||"#222")+";\n background-color: "+(t("raui.warn.success.bg")||"#ffc107")+";\n }\n .rtoast-error {\n color: "+(t("raui.toast.error.fg")||"#f9f9f9")+";\n background-color: "+(t("raui.toast.error.bg")||"#ff5252")+";\n }\n "}.call(this,t)].join(" ")},e={v:4,t:[{t:4,f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtoast",g:1},{n:"class-rtoast-bottom",t:13,f:[{t:2,r:".bottom"}]},{n:"class-rtoast-left",t:13,f:[{t:2,r:".left"}]},{n:"class-rtoast-right",t:13,f:[{t:2,r:".right"}]}],f:[{t:7,e:"div",m:[{n:"toast",t:72,v:"t0"},{n:"class",f:["rtoast-body",{t:4,f:[" rtoast-",{t:2,r:".type"}],n:50,r:".type"},{t:4,f:[{t:2,r:".class"}],n:50,r:".class"}],t:13},{t:4,f:[{n:["click"],t:70,f:{r:["@this"],s:"[_0._closeToast()]"}}],n:50,x:{r:[".dismissable"],s:"_0!==false"}}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtoast-message",g:1}],f:[{t:2,r:".message"}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rtoast-buttons",g:1}],f:[{t:4,f:[{t:7,e:"button",m:[{n:"class",f:["rtoast-button",{t:4,f:[" ",{t:2,r:".class"}],n:50,r:".class"}],t:13},{t:4,f:[{n:["click"],t:70,f:{r:["."],s:"[_0.action()]"}}],n:50,x:{r:[".action"],s:'typeof _0==="function"'}}],f:[{t:2,r:".label"}]}],n:52,r:".buttons"},{t:4,f:[{t:7,e:"button",m:[{t:13,n:"class",f:"rtoast-button",g:1}],f:["Close"]}],n:50,x:{r:[".dismissable"],s:"_0!==false"},l:1}]}],n:50,x:{r:[".dismissable",".buttons.length"],s:"_0!==false||_1"}}]}]}],n:54,r:"~/_toast"}],n:50,r:"~/_toast"}],e:{"[_0._closeToast()]":function(t){return[t._closeToast()]},"_0!==false":function(t){return!1!==t},"[_0.action()]":function(t){return[t.action()]},'typeof _0==="function"':function(t){return"function"==typeof t},"_0!==false||_1":function(t,n){return!1!==t||n}}};return function(o){var i=o.Ractive,s=o.instance,a=o.proto;s.partials[t.name||"toast"]=e;var l,c,f=Object.assign({},r,t),d=[];function u(){(c=d.shift()).instance.set("_toast",c).then(function(){c.timeout&&(l=setTimeout(function(){c.instance._closeToast()},c.timeout))})}if(a.toast=function(t,n){var e=Object.assign({message:t,instance:this},f,this.toastDefaults,n);d.push(e),c||u()},a._closeToast=function(){l&&(clearTimeout(l),l=null),c.instance.set("_toast",null).then(function(){c=null,d.length&&u()})},a.on=a.on||{},s.transitions.toast=function(t,n){var e=t.processParams({duration:200},n),o=t.getStyle("opacity");return t.isIntro?(t.setStyle({opacity:0,transform:"translateY("+(c.bottom?"":"-")+"1em)"}),t.animateStyle({opacity:o,transform:"none"},e)):(t.setStyle({opacity:o,transform:"none"}),t.animateStyle({opacity:0,transform:"translateY("+(c.bottom?"":"-")+"1em)"},e))},a.on["close-toast"]=function(){this._closeToast()},s===i||i.isInstance(s))i.hasCSS("toast-css")||i.addCSS("toast",n);else{var h=s.css;s.css=function(t){var e="";return"string"==typeof h?e+=h:"function"==typeof h&&(e+=h(t)),n(t)+e}}return a}}(),(void 0===c&&(c={}),function(t){t.instance.transitions[c.name||"expand"]=i})],cssId:"window-host",noIntro:!0,observe:{"@style":function(){var t;(t=this)._media?t._media.fn():t.get("@style.window.maxFrom")&&(t._media={},t._media.fn=function(){var n=t.sizeInPx(t.get("@style.window.maxFrom")),e=t.transitionsEnabled;t.transitionsEnabled=!1,t.set("max",t.host.clientWidth<=n),t.transitionsEnabled=e},t._media.handle=t.root.on("*.resize",t._media.fn),setTimeout(t._media.fn,0))},topLevel:function(t){t?this.link("windows."+a(t),"current"):this.unlink("current")},currentMax:{handler:function(t){(this.children.byName.window||[]).forEach(function(t){return t.instance.fire("resize")})},defer:!0}},computed:{currentMax:function(){var t=this.get("topLevel"),n=this.get("windows."+a(t)+".max");return this.get("userMax")||this.get("max")||n}},on:{config:function(){var t,n=this,e=this.partials.content;if(e&&Array.isArray(e))for(var o=(e=this.partials.content=e.slice()).length;o--;){var i=e[o];"max-top"===i.e&&(e.splice(o,1),n.set({_maxP:{t:i.f},hideTitleMax:!0}),i.m&&n.set({_maxAttrsP:{t:i.m}}))}"undefined"!=typeof window&&(this._resizeListener=function(){t||(t=setTimeout(function(){t=null,n.fire("resize")},300))},window.addEventListener("resize",this._resizeListener))},teardown:function(){this._resizeListener&&window.removeEventListener("resize",this._resizeListener)}}}),n.transitions.modal=function(t,n){var e,o=t.processParams(n,{duration:400,easing:"easeOut",x:0,y:-50,event:!0}),i=t.node.offsetLeft,r=t.node.offsetTop,s=t.node.parentNode.style?t.node.parentNode.style.overflow:"hidden";if(t.node._modalSrc){var a=t.node._modalSrc||{x:i+o.x,y:r+o.y},l={x:a.x-Math.round(t.node.clientWidth/2)-i,y:a.y-Math.round(t.node.clientHeight/2)-r};t.node.parentNode.style&&(t.node.parentNode.style.overflow="hidden"),t.isIntro?(t.node._modalSrc=a,e={transform:"translate(0, 0) scale(1, 1)",opacity:1},t.setStyle({transform:"translate("+l.x+"px, "+l.y+"px) scale(0.5, 0.5)",opacity:0})):e={transform:"translate("+l.x+"px, "+l.y+"px) scale(0.5, 0.5)",opacity:0}}else t.isIntro?(e={transform:"translate(0, 0) scale(1, 1)",opacity:1},t.setStyle({transform:"translate("+o.x+"px, "+o.y+"px) scale(0.5, 0.5)",opacity:0})):e={transform:"translate("+o.x+"px, "+o.y+"px) scale(0.5, 0.5)",opacity:0};t.animateStyle(e,o).then(function(){t.node.parentNode.style&&(t.node.parentNode.style.overflow=s),t.complete()})};var h=["mousemove","mouseup","touchmove","touchend"],w=function(t){function n(n){t.call(this,n)}t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n;var e={resizable:{configurable:!0},title:{configurable:!0},visible:{configurable:!0},pad:{configurable:!0},buttons:{configurable:!0}};return e.resizable.get=function(){return this.get("control.resizable")},e.resizable.set=function(t){return this.set("control.resizable",t)},e.title.get=function(){return this.get("control.title")},e.title.set=function(t){return this.set("control.title",t)},e.visible.get=function(){return this.get("control.show")},e.visible.set=function(t){t?this.show():this.set("control.show",t,{keep:!0}),this.host.raise(this,t)},e.pad.get=function(){return this.get("pad")},e.pad.set=function(t){this.set("pad",t)},e.buttons.get=function(){return this.get("buttons")},e.buttons.set=function(t){return this.set("buttons",t)},n.prototype.close=function(t){if(!0!==t){if(!this.parent)return!1;if(this.get("control.blockers.length"))return!1;if("function"==typeof this.beforeClose&&!1===this.beforeClose())return!1;if(!1===this.fire("beforeClose"))return!1}this.fire("close")},n.prototype.maximize=function(){this.toggle("root.userMax")},n.prototype.hide=function(){this.visible=!1},n.prototype.raise=function(t){this.host.raise(this,t)},n.prototype.show=function(){this.set("control.show",!0),void 0===this.get("control.top")&&this.host.place(this)},n.prototype.size=function(t,n){if(this.visible){var e=this.wrapper;if(e){if("auto"===t){this.set("control.autosize",!0);var o=this.host.sizeInEm(e.clientWidth+16),i=this.host.sizeInEm(e.clientHeight);this.set({"control.width":o,"control.height":i,"control.naturalWidth":o,"control.naturalHeight":i,"control.autosize":!1})}else if("number"==typeof t&&"number"==typeof n)this.set({"control.width":this.host.sizeInEm(t),"control.height":this.host.sizeInEm(n),"control.naturalWidth":this.host.sizeInEm(t),"control.naturalHeight":this.host.sizeInEm(n),"control.autosize":!1});else if("string"==typeof t&&"string"==typeof n){var r=e.style.width,s=e.style.height;e.style.width=t,e.style.height=n;var a=e.clientWidth,l=e.clientHeight;e.style.width=r,e.style.height=s,this.set({"control.width":this.host.sizeInEm(a),"control.height":this.host.sizeInEm(l),"control.naturalWidth":this.host.sizeInEm(a),"control.naturalHeight":this.host.sizeInEm(l),"control.autosize":!1})}this.fire("resize")}}else"number"==typeof t&&"number"==typeof n&&this.set({"control.width":this.host.sizeInEm(t),"control.height":this.host.sizeInEm(n),"control.naturalWidth":this.host.sizeInEm(t),"control.naturalHeight":this.host.sizeInEm(n),"control.autosize":!1})},n.prototype.move=function(t,n){"string"==typeof t&&(t=this.host.sizeInEm(t)),"string"==typeof n&&(t=this.host.sizeInEm(n));var e={};"number"==typeof t&&(e["control.top"]=t),"number"==typeof n&&(e["control.left"]=n),this.set(e)},n.prototype._startMove=function(t){var n=this;if("mousedown"!==t.type||0===t.button){if(this.get("control.topmost")||this.raise(),~t.type.indexOf("mouse")){if(!t.ctrlKey&&t.target!==this.content&&t.target!==this.top&&!this.top.contains(t.target))return}else if(t.targetTouches&&1===t.targetTouches.length&&t.target!==this.content&&t.target!==this.top&&!this.top.contains(t.target))return;var e=this.pane,o=e.style.cursor;e.style.cursor="move",e.style.userSelect="none";var i=t.x||t.clientX||t.targetTouches&&t.targetTouches[0].clientX||0,r=t.y||t.clientY||t.targetTouches&&t.targetTouches[0].clientY||0,s=this.get("control.left")||0,a=this.get("control.top")||0,l=e.clientWidth,c=e.clientHeight,f=function(t){var d=t.x||t.clientX||t.targetTouches&&t.targetTouches[0]&&t.targetTouches[0].clientX||t.changedTouches&&t.changedTouches[0].clientX||0,u=t.y||t.clientY||t.targetTouches&&t.targetTouches[0]&&t.targetTouches[0].clientY||t.changedTouches&&t.changedTouches[0].clientY||0,w=s+(d-i),p=a+(u-r);w<(l<30?0:30-l)&&(w=l<30?0:30-l),p<(c<30?0:30-c)&&(p=c<30?0:30-c),w<0&&(w=0),p<0&&(p=0),n.set({"control.top":p,"control.left":w}),"touchend"===t.type||"mouseup"===t.type?(h.forEach(function(t){return document.removeEventListener(t,f,{passive:!1})}),e.style.cursor=o,e.style.userSelect=""):t.preventDefault()};return h.forEach(function(t){return document.addEventListener(t,f,{passive:!1})}),0!==t.type.indexOf("mouse")&&void 0}},n.prototype._startResize=function(t){var n=this;if(t.target===this.wrapper&&("mousedown"!==t.type||0===t.button)){this.get("control.autosize")&&this.size("auto"),this.get("control.topmost")||this.raise(),this.set("control.resizing",!0);var e,o=this.wrapper,i=t.offsetX||t.targetTouches&&t.targetTouches[0].pageX-o.getBoundingClientRect().left,r=t.offsetY||t.targetTouches&&t.targetTouches[0].pageY-o.getBoundingClientRect().top,s=this.get("@style.window.handleSize")||7,a=o.clientWidth-2*s,l=o.clientHeight-2*s,c=2*s,f=i<=c||i>=a,d=r<=c||r>=l,u=t.x||t.clientX||t.targetTouches&&t.targetTouches[0].clientX||0,w=t.y||t.clientY||t.targetTouches&&t.targetTouches[0].clientY||0,p=this.get("control.left")||0,g=this.get("control.top")||0,m=this.host.sizeInPx(this.get("control.width")+"em"),x=this.host.sizeInPx(this.get("control.height")+"em"),b=this.host.sizeInPx(this.get("control.naturalHeight")+"em"),y=this.host.sizeInPx(this.get("control.naturalWidth")+"em"),v=function(t){t.preventDefault();var o=t.x||t.clientX||t.targetTouches&&t.targetTouches[0]&&t.targetTouches[0].clientX||t.changedTouches&&t.changedTouches[0].clientX||0,a=t.y||t.clientY||t.targetTouches&&t.targetTouches[0]&&t.targetTouches[0].clientY||t.changedTouches&&t.changedTouches[0].clientY||0,l=f?o-u:0,c=d?a-w:0,_={};r<=s?(_["control.top"]=g+c,_["control.height"]=x-c):_["control.height"]=x+c,i<=s?(_["control.left"]=p+l,_["control.width"]=m-l):_["control.width"]=m+l,_["control.width"]<y&&(delete _["control.width"],delete _["control.left"]),_["control.height"]<b&&(delete _["control.height"],delete _["control.top"]),_["control.left"]<0&&(_["control.left"]=0),_["control.top"]<0&&(_["control.top"]=0),_["control.width"]&&(_["control.width"]=n.host.sizeInEm(_["control.width"])),_["control.height"]&&(_["control.height"]=n.host.sizeInEm(_["control.height"])),n.set(_),"touchend"===t.type||"mouseup"===t.type?(h.forEach(function(t){return document.removeEventListener(t,v,{passive:!1})}),n.set("control.resizing",!1),m===n.get("control.width")&&x===n.get("control.height")||(e&&clearTimeout(e),e=null,n.fire("resize"))):e||(e=setTimeout(function(){n.fire("resize"),e=null},200))};return h.forEach(function(t){return document.addEventListener(t,v,{passive:!1})}),!1}},n.prototype._sizeHandle=function(t){if(t.target===this.wrapper){var n=this.wrapper;if("mouseout"===t.type)return n.style.cursor="auto";var e=t.offsetX,o=t.offsetY,i=this.get("@style.window.handleSize")||7,r=n.clientWidth-i,s=n.clientHeight-i,a=n.style;a.cursor=e<=i+i&&o<=i+i||e>=r-i&&o>=s-i?"nwse-resize":e>=r-i&&o<=i+i||e<=i+i&&o>=s-i?"nesw-resize":(e<=i||e>=r)&&(o<s||o>i)?"ew-resize":(o<=i||o>=s)&&(e<r||e>i)?"ns-resize":"auto"}},Object.defineProperties(n.prototype,e),n}(l),p=["left","right","center","condition"];function g(t){return void 0===t&&(t={}),function(n){n.instance.components[t.name||"host"]=d}}l.extendWith(w,{template:{v:4,t:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-wrapper",g:1},{n:"tracked",t:71,f:{r:[],s:'["wrapper"]'}},{t:4,f:[" ",{t:4,f:[{n:"style-top",f:"0",t:13},{n:"style-left",f:"0",t:13},{n:"style-width",f:"100%",t:13},{n:"style-height",f:"100%",t:13}],n:51,x:{r:["~/control.autosize","~/control.dialog"],s:"_0||_1"}},{n:"class-rwindow-max",t:13},{n:"window",t:72,v:"t2"}],n:50,x:{r:["~/root.max","~/root.userMax","~/control.max","~/control.dialog"],s:"(_0||_1||_2)&&!_3"}},{t:4,f:[{t:4,f:[{n:"class-rwindow-resizable",t:13},{n:["mousedown","touchstart"],t:70,f:{r:["@this","@event"],s:"[_0._startResize(_1)]"}},{n:["mousemove","mouseout"],t:70,f:{r:["@this","@event"],s:"[_0._sizeHandle(_1)]"}}],n:50,r:"~/control.resizable"}," ",{t:4,f:[{n:"class-rwindow-resizing",t:13}],n:50,r:"~/control.resizing"},{n:"modal",t:72,v:"t0"},{n:"style-top",f:[{t:2,r:"~/control.top"},"px"],t:13},{n:"style-left",f:[{t:2,r:"~/control.left"},"px"],t:13},{t:4,f:[{n:"style-width",f:[{t:2,r:"~/control.width"},"em"],t:13},{n:"style-height",f:[{t:2,r:"~/control.height"},"em"],t:13}],n:51,r:"~/control.autosize"}],n:51,l:1},{n:"style-z-index",f:[{t:2,r:"~/control.index"}],t:13},{n:"class-rwindow-topmost",t:13,f:[{t:2,r:"~/control.topmost"}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow",g:1},{t:4,f:[{n:["mousedown","touchstart"],t:70,f:{r:["@this","@event"],s:"[_0._startMove(_1)]"}}],n:50,x:{r:["~/control.movable","~/root.max","~/root.userMax","~/control.max","~/control.dialog"],s:"!(_0===false||_1||_2||_3)&&!_4"}},{t:4,f:[{n:["mousedown","touchstart"],t:70,f:{r:["@this"],s:"[_0.raise()]"}}],n:50,x:{r:["~/control.topmost"],s:"!_0"},l:1}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-modal",g:1},{n:"class-rwindow-blocked",t:13,f:[{t:2,r:"~/control.blockers.length"}]}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-pane",g:1},{n:"tracked",t:71,f:{r:[],s:'["pane"]'}},{t:4,f:[{n:"class-rwindow-autosizing",t:13}],n:50,r:"~/control.autosize"}],f:[{t:8,r:"pane"}]}]}]}],n:50,r:"~/control.show"}]},cssId:"window",partials:{pane:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-pane-top",g:1},{n:"tracked",t:71,f:{r:[],s:'["top"]'}}],f:[{t:8,r:"title"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-controls",g:1}],f:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-minimize",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.hide()]"}}]}],n:50,x:{r:["~/control.dialog","~/control.minimize"],s:"!_0&&_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-maximize",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.maximize()]"}}]}],n:50,x:{r:["~/control.dialog","~/control.maximize"],s:"!_0&&_1"}}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-close",g:1},{n:["click"],t:70,f:{r:["@this"],s:"[_0.close()]"}}]}],n:50,r:"~/control.close"}]}]}],n:51,x:{r:["~/control.max","~/root.userMax","~/root.max","~/root.hideTitleMax","~/control.dialog"],s:"(_0||_1||_2)&&_3&&!_4"}}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-content",g:1},{n:"tracked",t:71,f:{r:[],s:'["content"]'}},{n:"class-rwindow-pad",t:13,f:[{t:2,r:"~/control.pad"}]},{n:"class-rwindow-flex",t:13,f:[{t:2,r:"~/control.flex"}]},{t:4,f:[{n:"style-overflow",f:"visible",t:13}],n:50,r:"~/control.autosize"}],f:[{t:8,r:"contents"}]}," ",{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-buttons",g:1},{n:"class-no-buttons",t:13,f:[{t:2,x:{r:["~/visibleButtons"],s:"!_0"}}]}],f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-left-buttons",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:".partial"}],n:50,r:".partial"},{t:4,f:[{t:7,e:"button",m:[{n:"button",t:71},{n:["click"],t:70,f:{r:[".action","@"],s:"[_0.call(_1)]"}},{t:4,f:[{n:"class",f:[{t:2,r:".class"}],t:13}],n:50,r:".class"}],f:[{t:2,r:".label"}]}],n:51,l:1}],n:52,r:"~/leftButtons"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-center-buttons",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:".partial"}],n:50,r:".partial"},{t:4,f:[{t:7,e:"button",m:[{n:"button",t:71},{n:["click"],t:70,f:{r:[".action","@"],s:"[_0.call(_1)]"}},{t:4,f:[{n:"class",f:[{t:2,r:".class"}],t:13}],n:50,r:".class"}],f:[{t:2,r:".label"}]}],n:51,l:1}],n:52,r:"~/centerButtons"}]}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-right-buttons",g:1}],f:[{t:4,f:[{t:4,f:[{t:8,r:".partial"}],n:50,r:".partial"},{t:4,f:[{t:7,e:"button",m:[{n:"button",t:71},{n:["click"],t:70,f:{r:[".action","@"],s:"[_0.call(_1)]"}},{t:4,f:[{n:"class",f:[{t:2,r:".class"}],t:13}],n:50,r:".class"}],f:[{t:2,r:".label"}]}],n:51,l:1}],n:52,r:"~/rightButtons"}]}]}],n:50,r:"~/buttons"}," ",{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-pane-bottom",g:1}],f:[{t:8,r:"status"}]}],title:[{t:4,f:[{t:7,e:"div",m:[{t:13,n:"class",f:"rwindow-title",g:1}],f:[{t:3,r:"~/control.title"}]}],n:50,r:"~/control.title"}],contents:"",status:""},data:function(){return{buttons:[],visibleButtons:0}},computed:{leftButtons:function(){return(this.get("buttons")||[]).filter(function(t){return"left"===t.where})},centerButtons:function(){return(this.get("buttons")||[]).filter(function(t){return"center"===t.where})},rightButtons:function(){return(this.get("buttons")||[]).filter(function(t){return!t.where||"right"===t.where})}},decorators:{button:function(t){var n=this.getContext(t);return n.add("visibleButtons"),{update:function(){},teardown:function(){n.subtract("visibleButtons")}}}},on:{config:function(){var t=w.prototype.template,n=this.template;"string"!=typeof t&&!Array.isArray(t)&&t.t&&(t=t.t),"string"!=typeof n&&!Array.isArray(n)&&n.t&&(n=n.t),t!==n&&(this.partials.hasOwnProperty("contents")||(this.partials.contents=n),this.template=t)},construct:function(){var t=this.constructor;if(!t._constructed){t._constructed=1;var n=t.prototype.template.t.slice(),e=n.find(function(t){return"buttons"===t.e});function o(t){var n=t.m||[],e={partial:{t:[{t:t.t,e:t.e,f:t.f,m:n.filter(function(t){return!~p.indexOf(t.n)})}]},where:n.find(function(t){return"left"===t.n})?"left":n.find(function(t){return"center"===t.n})?"center":"right"};return e.partial.t[0].m.push({t:71,n:"button"}),e}t.prototype.template.t=n.filter(function(t){return"buttons"!==t.e}),e&&(t._btns=e.f.filter(function(t){return"button"===t.e||4===t.t&&(50===t.n||51===t.n)&&t.f.find(function(t){return"button"===t.e})}).map(function(t){if(4===t.t){var n=o(t.f.find(function(t){return"button"===t.e})),e={t:t.t,n:t.n,f:[n.partial.t[0]]};return t.r&&(e.r=t.r),t.rx&&(e.rx=t.rx),t.x&&(e.x=t.x),n.partial={t:[e]},n}return o(t)}))}},init:function(){var t=this.constructor;t._btns&&!this.get("buttons.length")&&this.set("buttons",t._btns)}}}),o("RMWindowHost","components",d),o("RMWindow","components",w),d.prototype.Window=w,t.Base=l,t.Host=d,t.Window=w,t.plugin=g,t.default=g,Object.defineProperty(t,"__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 not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc