@axel669/windstorm 0.4.5 → 0.4.6-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/browser.js CHANGED
@@ -1 +1,568 @@
1
- var ws=function(){"use strict";var e=[{name:"baseline",style:'@import url(https://fonts.googleapis.com/css2?family=Share+Tech+Mono:wght@400;500;600;700;800;900&family=Roboto:ital,wght@0,400;0,500;0,700;0,900;1,400;1,500;1,700;1,900&display=swap);@import url(https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css);*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}:where([ws-x]){border-style:solid;border-width:0;border-color:var(--text-color-normal)}body,html{padding:0;margin:0;width:100%;height:100%;-webkit-tap-highlight-color:transparent}body[ws-x*="@@theme:"]{background-color:var(--background)}[ws-x*="@@theme:"]{color:var(--text-color-normal);font-family:var(--font);font-size:var(--font-size-normal)}body[ws-x~="@@app"]{overflow:hidden;position:fixed;touch-action:pan-x pan-y}'},{name:"avatar",style:"ws-avatar,ws-avatar>object{align-items:center;justify-content:center}ws-avatar{--color:transparent;--size:36px;display:inline-flex;overflow:hidden;border-radius:500px;width:var(--size);height:var(--size);background-color:var(--color);color:var(--text-color-fill);vertical-align:text-bottom}ws-avatar>img{width:100%}ws-avatar>object{width:100%;height:100%;display:flex}"},{name:"badge",style:"ws-badge{--color:var(--primary);position:relative;display:inline-grid;overflow:visible}ws-badge::after{position:absolute;content:attr(ws-text);right:-10px;top:0;transform:translateY(-50%);background-color:var(--color);pointer-events:none;border-radius:20px;padding:4px;min-width:20px;height:20px;box-sizing:border-box;text-align:center;font-size:var(--text-size-subtitle);color:var(--text-color-fill);line-height:14px;z-index:5}"},{name:"button",style:':is(label,a):where([ws-x~="@@button"]),button:where([ws-x~="[$flat]"],[ws-x~="[$fill]"],[ws-x~="[$outline]"]){--color:var(--text-color-normal);--fill-color:transaprent;--text-color:var(--color);border:0 solid var(--text-color);color:var(--text-color);font-family:var(--font);background-color:var(--fill-color);border-radius:4px;cursor:pointer;padding:8px 16px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;--ripple-color:unset;--ripple-base-color:var(--ripple-normal);overflow:hidden;position:relative;user-select:none}:is(label,a):where([ws-x~="@@button"]):where(:not([disabled]))::after,button:where([ws-x~="[$flat]"],[ws-x~="[$fill]"],[ws-x~="[$outline]"]):where(:not([disabled]))::after{content:"";position:absolute;top:0;left:0;bottom:0;right:0;transition:background-color 150ms linear;pointer-events:none}:is(label,a):where([ws-x~="@@button"]):where(:not([disabled])):active::after,button:where([ws-x~="[$flat]"],[ws-x~="[$fill]"],[ws-x~="[$outline]"]):where(:not([disabled])):active::after{transition:none;background-color:var(--ripple-color, var(--ripple-base-color))}:is(label,a):where([ws-x~="@@button"]):where([disabled]),button:where([ws-x~="[$flat]"],[ws-x~="[$fill]"],[ws-x~="[$outline]"]):where([disabled]){filter:saturate(10%) brightness(.7)}'},{name:"chip",style:'ws-chip{--color:var(--text-color-normal);--fill-color:transaprent;--text-color:var(--color);display:inline-flex;align-items:center;justify-content:center;border-radius:100px;padding:4px 12px;user-select:none;vertical-align:text-bottom;color:var(--text-color);background:var(--fill-color)}ws-chip:where([ws-x~="@@click"]){cursor:pointer;--ripple-color:unset;--ripple-base-color:var(--ripple-normal);overflow:hidden;position:relative;user-select:none}ws-chip:where([ws-x~="@@click"]):where(:not([disabled]))::after{content:"";position:absolute;top:0;left:0;bottom:0;right:0;transition:background-color 150ms linear;pointer-events:none}ws-chip:where([ws-x~="@@click"]):where(:not([disabled])):active::after{transition:none;background-color:var(--ripple-color, var(--ripple-base-color))}'},{name:"control",style:'label:where([ws-x~="@@control"]){--color:var(--default);--border-color:var(--layer-border-color);--border-size:1px;position:relative;display:inline-grid;grid-template-areas:"label label label""start control end""extra extra extra";grid-template-rows:minmax(0,min-content) auto minmax(0,min-content);grid-template-columns:minmax(0,min-content) auto minmax(0,min-content);user-select:none;overflow:hidden;border:var(--border-size) solid var(--border-color);border-bottom:1px solid var(--border-color);background-color:var(--background-element);border-radius:4px}label:where([ws-x~="@@control"]):focus-within{--border-color:var(--color)}label:where([ws-x~="@@control"]) :is(input,select,textarea){background-color:transparent;min-width:16px;font-family:var(--font);font-size:var(--text-size-normal)}label:where([ws-x~="@@control"]) :is(input,select,textarea):disabled{background-color:var(--disabled-background);opacity:1}label:where([ws-x~="@@control"])>:where(select){--color:var(--text-color-normal);border-width:0;padding:8px;min-height:36px;background-color:transparent;color:var(--color);cursor:pointer;grid-area:control}label:where([ws-x~="@@control"])>:where(input,textarea):focus,label:where([ws-x~="@@control"])>:where(select):focus{outline:0}label:where([ws-x~="@@control"])>:where(select) optgroup,label:where([ws-x~="@@control"])>:where(select) option{background-color:var(--background-layer);border-color:var(--background-layer);color:var(--text-color-normal);font-size:var(--text-size-normal);font-family:Arial}label:where([ws-x~="@@control"])>:where(input,textarea){border-width:0;color:var(--text-normal-color);min-height:28px;width:100%;height:100%;grid-area:control;padding:4px}label:where([ws-x~="@@control"])>input[type=file]{position:relative;padding:0}label:where([ws-x~="@@control"])>input[type=file]::file-selector-button{font-family:var(--font);height:100%;margin:0 4px 0 0;padding:4px;color:var(--text-normal-color);background-color:transparent;border-width:0;text-decoration:underline}label:where([ws-x~="@@control"])>:where([ws-x~="[$label]"]){grid-area:label;padding:4px;display:flex;flex-direction:column;align-items:start;color:var(--color);white-space:nowrap;font-size:var(--text-size-subtitle)}label:where([ws-x~="@@control"])>:where([ws-x~="[$start]"]){grid-area:start}label:where([ws-x~="@@control"])>:where([ws-x~="[$end]"]){grid-area:end}label:where([ws-x~="@@control"])>:where([ws-x~="[$extra]"]){grid-area:extra;font-size:var(--text-size-subtitle);padding:4px}'},{name:"details",style:'details:where([ws-x]){--color:var(--default);border:0 solid var(--color);padding-left:1em;border-radius:4px;overflow:hidden}details:where([ws-x])>summary{color:var(--color);padding:4px 4px 4px 1.1em;margin-left:-1em;cursor:pointer;--ripple-color:unset;--ripple-base-color:var(--ripple-normal);overflow:hidden;position:relative;user-select:none}details:where([ws-x])>summary:where(:not([disabled]))::after{content:"";position:absolute;top:0;left:0;bottom:0;right:0;transition:background-color 150ms linear;pointer-events:none}details:where([ws-x])>summary:where(:not([disabled])):active::after{transition:none;background-color:var(--ripple-color, var(--ripple-base-color))}details:where([ws-x])>summary::before{position:absolute;left:0;top:50%;bottom:0;width:1em;display:flex;align-items:center;justify-content:center;font-family:bootstrap-icons!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;content:"";transform:translateY(-50%);transition:transform 100ms linear}details:where([ws-x])>summary::-webkit-details-marker,details:where([ws-x])>summary::marker{content:"";display:none}details:where([ws-x])[open]>summary::before{transform:translateY(-50%) rotate(90deg)}'},{name:"flex",style:"ws-flex{display:flex;flex-direction:column;gap:4px;padding:4px;overflow:hidden}ws-flex>*{flex-shrink:0}"},{name:"grid",style:"ws-grid{display:grid;overflow:hidden;gap:4px;padding:4px;grid-auto-rows:min-content}"},{name:"icon",style:"ws-icon{display:inline-block}"},{name:"link",style:"a:where([ws-x]){--color:var(--text-color-normal);--text-color:var(--color)}a:where([ws-x]),a:where([ws-x]):hover,a:where([ws-x]):visited{color:var(--text-color)}a:where([ws-x])[disabled]{pointer-events:none}"},{name:"modal",style:'ws-modal{--text-color:var(--text-color-normal);position:fixed;top:0;left:0;bottom:0;right:0;background-color:rgba(0,0,0,.55);z-index:100;cursor:default;visibility:hidden;transition:visibility var(--anim-time, 200ms) linear}ws-modal>label:first-child{position:absolute;width:100%;height:100%;cursor:pointer}ws-modal[ws-x~="[$show]"]{visibility:visible!important}ws-modal[ws-x~="[$show]"]>:where([ws-x~="@@action"]),ws-modal[ws-x~="[$show]"]>:where([ws-x~="@@menu"]){transform:translateX(0)}ws-modal[ws-x~="[$show]"]>:where([ws-x~="@@select"]){transform:translateX(-50%) translateY(0)}ws-modal[ws-x~="[$show]"]>:where([ws-x~="@@dialog"]){opacity:1}input[type=checkbox]:not(:checked)+ws-modal{visibility:hidden}input[type=checkbox]:checked+ws-modal{visibility:visible}ws-modal>:where(:not(label:first-child)){position:absolute}ws-modal>:where(:not(label:first-child)):where([ws-x~="@@menu"]){top:0;left:0;height:100%;transform:translateX(-100%);transition:transform var(--anim-time, 250ms) linear;max-width:100%}input[type=checkbox]:checked+ws-modal>:where(:not(label:first-child)):where([ws-x~="@@action"]),input[type=checkbox]:checked+ws-modal>:where(:not(label:first-child)):where([ws-x~="@@menu"]){transform:translateX(0)}ws-modal>:where(:not(label:first-child)):where([ws-x~="@@action"]){top:0;right:0;height:100%;transform:translateX(100%);transition:transform var(--anim-time, 250ms) linear;max-width:100%}ws-modal>:where(:not(label:first-child)):where([ws-x~="@@select"]){top:0;left:50%;transform:translateX(-50%) translateY(-100%);max-height:75vh;max-width:min(90vw,720px);transition:transform var(--anim-time, 250ms) linear}input[type=checkbox]:checked+ws-modal>:where(:not(label:first-child)):where([ws-x~="@@select"]){transform:translateX(-50%) translateY(0)}ws-modal>:where(:not(label:first-child)):where([ws-x~="@@dialog"]){top:50%;left:50%;transform:translate(-50%,-50%);opacity:0;transition:opacity var(--anim-time, 250ms) linear}input[type=checkbox]:checked+ws-modal>:where(:not(label:first-child)):where([ws-x~="@@dialog"]){opacity:1}'},{name:"notification",style:'ws-notification{--color:var(--layer-border-color);position:relative;display:inline-grid;grid-template-columns:auto 1fr auto;grid-template-areas:"start text end";border-radius:4px;cursor:pointer;user-select:none;border:2px solid var(--color);min-height:48px;z-index:0}ws-notification::after,ws-notification::before{content:"";position:relative;display:block;min-width:20px;background-color:var(--color);z-index:-1}ws-notification::before{grid-area:start}ws-notification::after{grid-area:end}ws-notification>:where([ws-x~="[$notif-text]"]){display:flex;flex-direction:row;align-items:center;padding:4px;background-color:var(--background-element)}ws-notification>:where([ws-x~="[$start]"]){grid-area:start}ws-notification>:where([ws-x~="[$end]"]){grid-area:end}ws-notification>:where([ws-x~="[$start]"],[ws-x~="[$end]"]),ws-notification>:where([ws-x~="[$start]"],[ws-x~="[$end]"]) button{--ripple-color:var(--ripple-invert);--color:var(--text-color-invert);color:var(--text-color-invert)}'},{name:"paper",style:'ws-paper{--color:var(--layer-border-color);display:grid;border-radius:4px;box-shadow:0 2px 4px var(--shadow-color);overflow:hidden;grid-template-columns:1fr;grid-template-rows:min-content auto min-content;grid-template-areas:"header""content""footer";background-color:var(--background-layer)}ws-paper::before{content:"";grid-area:header}ws-paper::after{content:"";grid-area:footer;pointer-events:none}ws-paper>:where([ws-x~="[$content]"]){grid-area:content}ws-paper>:where([ws-x~="[$header]"]){grid-area:header}ws-paper>:where([ws-x~="[$footer]"]){grid-area:footer}'},{name:"popover",style:'ws-popover{display:grid;position:relative}ws-popover:not(:visibile)>:where([ws-x~="[$content]"]){display:none}ws-popover>:where([ws-x~="[$content]"]){position:absolute;z-index:25;display:none}ws-popover[ws-x~="[$show]"]>:where([ws-x~="[$content]"]){display:block}ws-popover>input:where([type=checkbox]):checked+:where([ws-x~="[$content]"]){display:block}ws-popover>input:where([type=checkbox]):not(:checked)+:where([ws-x~="[$content]"]){display:none}'},{name:"progress",style:'label[ws-x~="@@progress"]{--color:var(--text-color-normal);display:inline-grid;grid-template-columns:1fr;grid-template-rows:min-content auto;border-radius:4px;overflow:hidden;user-select:none}label[ws-x~="@@progress"][ws-x~="[$row]"]{grid-template-columns:min-content auto;grid-template-rows:1fr}label[ws-x~="@@progress"]>[ws-x~="[$progress-label]"]{padding:4px;display:flex;color:var(--color)}label[ws-x~="@@progress"]>progress{min-height:20px;height:100%;width:100%;border:0;background-color:var(--background-layer)}label[ws-x~="@@progress"]>progress::-moz-progress-bar{background-color:var(--color);border-radius:0}label[ws-x~="@@progress"]>progress::-webkit-progress-bar{background-color:var(--background-layer);border-radius:0}label[ws-x~="@@progress"]>progress::-webkit-progress-value{background-color:var(--color);border-radius:0}'},{name:"screen",style:'ws-screen{--stack:0;--screen-width:min(720px, 100%);display:grid;width:calc(100% - var(--sub-pixel-offset));height:calc(100% - 1px);overflow:hidden;position:fixed;top:0;left:0;z-index:200;background-color:rgba(0,0,0,.4);grid-template-columns:auto calc(var(--screen-width) - 16px*var(--stack)) auto;grid-template-areas:". content .";padding-top:calc(8px*var(--stack))}ws-screen[ws-x~="[$left]"]{grid-template-columns:calc(8px*var(--stack)) calc(var(--screen-width) - 16px*var(--stack)) auto}ws-screen>:where(*){grid-area:content;height:100%;overflow:hidden}'},{name:"spinner",style:"ws-circle-spinner,ws-hexagon-spinner{--size:100px;--color:var(--primary);--ripple-color:var(--primary-ripple);width:var(--size);height:var(--size);display:inline-block}"},{name:"table",style:'table:where([ws-x]){--border-color:var(--color);border-spacing:0;position:relative;border-top:1px solid var(--color)}table:where([ws-x]) thead :is(td,th){color:var(--color);font-weight:700}table:where([ws-x]):where([ws-x~="[$header-fill]"]) thead :is(td,th){background-color:var(--color);color:var(--text-color-fill)}table:where([ws-x]) :is(td,th){padding:8px;white-space:nowrap;background-color:var(--background-layer);border-bottom:1px solid var(--color)}table:where([ws-x]) :where(th:first-child){position:sticky;left:0;z-index:10}table:where([ws-x]) :where(td:first-child,th:first-child){border-left:1px solid var(--color)}table:where([ws-x]) :where(td:last-child,th:last-child){border-right:1px solid var(--color)}'},{name:"tabs",style:'ws-tabs{--color:var(--primary);display:flex;flex-direction:row;justify-content:stretch;align-items:stretch;user-select:none;gap:2px}ws-tabs[ws-x~="[$vert]"]{flex-direction:column;justify-content:flex-start}ws-tabs[ws-x~="[$vert]"] ws-tab{border-bottom-width:0;border-right-width:2px;flex-grow:0}ws-tabs[ws-x~="[$fill]"]>label>input[type=radio]:checked+ws-tab{color:var(--text-color-fill);background-color:var(--color)}ws-tabs>label{display:grid;flex-grow:1}ws-tabs>label>input[type=radio]{display:none}ws-tabs>label>input[type=radio]:checked+ws-tab{color:var(--color);border-color:var(--color)}ws-tabs>label>ws-tab{display:flex;justify-content:center;align-items:center;padding:8px;border-color:var(--text-color-secondary);border-width:0 0 2px;border-style:solid;cursor:pointer;--ripple-color:unset;--ripple-base-color:var(--ripple-normal);overflow:hidden;position:relative;user-select:none}ws-tabs>label>ws-tab:where(:not([disabled]))::after{content:"";position:absolute;top:0;left:0;bottom:0;right:0;transition:background-color 150ms linear;pointer-events:none}ws-tabs>label>ws-tab:where(:not([disabled])):active::after{transition:none;background-color:var(--ripple-color, var(--ripple-base-color))}'},{name:"titlebar",style:'ws-titlebar{display:grid;min-height:52px;grid-template-columns:auto 1fr auto;grid-template-areas:"menu title action";user-select:none;position:relative}ws-titlebar>:where(button,[ws-x~="@@button"]){border-radius:0}ws-titlebar>:where([ws-x~="[$title]"]){--color:var(--text-color-normal);--text-color:var(--color);--border-color:var(--layer-border-color);--border-size:2px;--fill-color:transparent;grid-area:title;color:var(--text-color);border-bottom:1px solid transparent;z-index:0;display:flex;flex-direction:column;justify-content:center}ws-titlebar>:where([ws-x~="[$title]"]):where([ws-x~="[$color"]){--border-color:var(--color)}ws-titlebar>:where([ws-x~="[$title]"])::before{content:"";background-color:var(--fill-color);position:absolute;top:0;left:0;right:0;bottom:0;z-index:-1;border-bottom:var(--border-size) solid var(--border-color);border-top:var(--border-size) solid var(--border-color)}ws-titlebar>:where([ws-x~="[$title]"])~:where([ws-x~="[$menu]"],[ws-x~="[$action]"])>:where(button,[ws-x~="@@button"]),ws-titlebar>:where([ws-x~="[$title]"])~:where(button,[ws-x~="@@button"]){--ripple-normal:var(--ripple-dark)}ws-titlebar>:where([ws-x~="[$title]"]):where([ws-x~="[$fill]"])~:where([ws-x~="[$menu]"],[ws-x~="[$action]"])>:where(button,[ws-x~="@@button"]),ws-titlebar>:where([ws-x~="[$title]"]):where([ws-x~="[$fill]"])~:where(button,[ws-x~="@@button"]){--color:var(--text-color-invert)}ws-titlebar>:where([ws-x~="[$menu]"]){grid-area:menu}ws-titlebar>:where([ws-x~="[$action]"]){grid-area:action}'},{name:"toaster",style:'ws-toaster{position:fixed;z-index:100;display:inline-flex;flex-direction:column;padding:4px;gap:4px;height:min-content!important}ws-toaster[ws-x~="[$tl]"]{top:0;left:0}ws-toaster[ws-x~="[$tc]"]{top:0;left:50%;transform:translateX(-50%)}ws-toaster[ws-x~="[$tr]"]{top:0;right:0}ws-toaster[ws-x~="[$ml]"]{top:50%;left:0;transform:translateY(-50%)}ws-toaster[ws-x~="[$mr]"]{top:50%;right:0;transform:translateY(-50%)}ws-toaster[ws-x~="[$bl]"]{bottom:0;left:0}ws-toaster[ws-x~="[$bc]"]{bottom:0;left:50%;transform:translateX(-50%)}ws-toaster[ws-x~="[$br]"]{bottom:0;right:0}'},{name:"toggle",style:'label:where([ws-x~="@@toggle"]){--color:var(--default);--ripple-color:var(--default-ripple);--border-color:var(--layer-border-color);--border-size:1px;cursor:pointer;display:inline-flex;align-items:center;justify-content:space-between;padding:4px;border:var(--border-size) solid var(--border-color);border-bottom:1px solid var(--border-color);background-color:var(--background-element);border-radius:4px;--ripple-color:unset;--ripple-base-color:var(--ripple-normal);overflow:hidden;position:relative;user-select:none}label:where([ws-x~="@@toggle"]):where(:not([disabled]))::after{content:"";position:absolute;top:0;left:0;bottom:0;right:0;transition:background-color 150ms linear;pointer-events:none}label:where([ws-x~="@@toggle"]):where(:not([disabled])):active::after{transition:none;background-color:var(--ripple-color, var(--ripple-base-color))}label:where([ws-x~="@@toggle"]):focus-within{--border-color:var(--color)}label:where([ws-x~="@@toggle"])>input{position:relative;min-width:20px;min-height:20px;-webkit-appearance:none;appearance:none;margin:0;color:var(--color)}label:where([ws-x~="@@toggle"])>input:focus{outline:0}label:where([ws-x~="@@toggle"])>input:disabled{--color:var(--disabled-background)}label:where([ws-x~="@@toggle"])>input::after{content:"";position:absolute;font-size:18px;font-family:bootstrap-icons!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;top:50%;left:50%;width:20px;height:20px;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;overflow:hidden}label:where([ws-x~="@@toggle"])>input[type=radio]::after{content:""}label:where([ws-x~="@@toggle"])>input[type=radio]:checked::after{content:""}label:where([ws-x~="@@toggle"])>input[type=checkbox]::after{content:""}label:where([ws-x~="@@toggle"])>input[type=checkbox]:checked::after{content:""}label:where([ws-x~="@@toggle"])>input[type=checkbox]:where([ws-x~="@@switch"]){position:relative;border:1px solid var(--color);height:24px;width:44px;border-radius:12px}label:where([ws-x~="@@toggle"])>input[type=checkbox]:where([ws-x~="@@switch"]):disabled{background-color:var(--disabled-background)}label:where([ws-x~="@@toggle"])>input[type=checkbox]:where([ws-x~="@@switch"])::after{color:var(--text-dark);content:"";background-color:var(--text-color-secondary);position:absolute;width:18px;height:18px;border-radius:10px;top:2px;left:2px;transform:none;border-width:0;transition:left 100ms linear,color 100ms linear}label:where([ws-x~="@@toggle"])>input[type=checkbox]:where([ws-x~="@@switch"]):checked::after{background-color:var(--color);content:"";left:22px}'},{name:"tooltip",style:'ws-tooltip{position:relative;display:inline-grid;overflow:visible}ws-tooltip::after{position:absolute;content:attr(ws-text);left:50%;bottom:calc(100% + 2px);transform:translateX(-50%);height:20px;background-color:var(--background-layer);opacity:0;transition:opacity 100ms linear;pointer-events:none;border-radius:4px;border:1px solid var(--text-color-secondary);padding:2px 8px;font-size:var(--text-size-subtitle);width:60%;display:flex;align-items:center;justify-content:center;z-index:5}ws-tooltip:hover::after{opacity:1}ws-tooltip[ws-x~="[$bottom]"]::after{bottom:unset;top:calc(100% + 2px)}'},{name:"dark",style:'[ws-x~="@@theme:dark"]{--font:Roboto;--text-light:white;--text-dark:black;--text-color-normal:var(--text-light);--text-color-secondary:#cccccc;--text-color-invert:var(--text-dark);--text-color-fill:var(--text-dark);--text-size-normal:14px;--text-size-title:18px;--text-size-header:16px;--text-size-info:13px;--text-size-subtitle:12px;--text-size-data:10px;--background:#161616;--background-layer:#333333;--background-element:#242424;--layer-border-width:1px;--layer-border-color:#505050;--default:var(--text-color-normal);--default-ripple:var(--ripple-normal);--primary:#00aaff;--primary-ripple:#00aaff60;--secondary:#2fbc2f;--secondary-ripple:#2fbc2f60;--danger:#df5348;--danger-ripple:#df534860;--warning:#ffff00;--warning-ripple:#ffff0060;--accent:#ff4dff;--accent-ripple:#ff4dff60;--ripple-dark:#00000060;--ripple-light:#FFFFFF60;--ripple-normal:var(--ripple-light);--ripple-invert:var(--ripple-dark);--shadow-color:rgb(0, 0, 0, 0.25);--disabled-background:#606060;color-scheme:dark}'},{name:"light",style:'[ws-x~="@@theme:light"]{--font:Roboto;--text-light:white;--text-dark:black;--text-color-normal:var(--text-dark);--text-color-secondary:#505050;--text-color-invert:var(--text-light);--text-color-fill:var(--text-light);--text-size-normal:14px;--text-size-title:18px;--text-size-header:16px;--text-size-info:13px;--text-size-subtitle:12px;--text-size-data:10px;--background:#e9e9e9;--background-layer:#ffffff;--background-element:#f3f3f3;--layer-border-width:1px;--layer-border-color:#aaaaaa;--default:var(--text-color-normal);--default-ripple:var(--ripple-normal);--primary:#1d62d5;--primary-ripple:#1d62d560;--secondary:#128f12;--secondary-ripple:#128f1260;--danger:#F44336;--danger-ripple:#F4433660;--warning:#db990d;--warning-ripple:#db990d60;--accent:#cf00cf;--accent-ripple:#cf00cf60;--ripple-dark:#00000060;--ripple-light:#FFFFFF60;--ripple-normal:var(--ripple-dark);--ripple-invert:var(--ripple-light);--shadow-color:rgb(0, 0, 0, 0.25);--disabled-background:#c7c7c7}'},{name:"tron",style:'[ws-x~="@@theme:tron"]{--font:Share Tech Mono;--text-light:white;--text-dark:black;--text-color-normal:var(--text-light);--text-color-secondary:#a0a0a0;--text-color-invert:var(--text-dark);--text-color-fill:var(--text-dark);--text-size-normal:15px;--text-size-title:19px;--text-size-header:17px;--text-size-info:14px;--text-size-subtitle:13px;--text-size-data:11px;--background:#020202;--background-layer:#060d19;--background-element:#04080F;--layer-border-width:1px;--layer-border-color:#00EEEE;--default:var(--text-color-normal);--default-ripple:var(--ripple-normal);--primary:#00aaff;--primary-ripple:#00aaff60;--secondary:#2fbc2f;--secondary-ripple:#2fbc2f60;--danger:#df5348;--danger-ripple:#df534860;--warning:#ffff00;--warning-ripple:#ffff0060;--accent:#ff4dff;--accent-ripple:#ff4dff60;--ripple-dark:#00000060;--ripple-light:#FFFFFF60;--ripple-normal:var(--ripple-light);--ripple-invert:var(--ripple-dark);--shadow-color:rgb(255, 255, 255, 0.25);--disabled-background:#606060;color-scheme:dark}'}];const r={attr:"ws-x",...window.windstormConfig},t=document.head,o=Math.ceil(screen.width*devicePixelRatio*10)%10>=5;e.push({name:"correction",style:`body {--sub-pixel-offset:${o?1:0}px}`});for(const{name:o,style:a}of e){const e=document.createElement("style");e.setAttribute("ws-name",o),e.innerHTML=a.replaceAll("ws-x",r.attr),t.append(e)}const a=document.createElement("style");document.head.append(a);const i=a.sheet;a.setAttribute("ws-name","windstorm-generated");const l=document.createElement("style");l.setAttribute("ws-name","core macros"),l.setAttribute("ws-root",""),l.innerHTML='.ws-style {\n --b: "border: {$}";--b\\.c: "border-color: {$}";--b\\.s: "border-style: {$}";--b\\.w: "border-width: {$}";--b\\.b: "border-bottom: {$}";--b\\.b\\.c: "border-bottom-color: {$}";--b\\.b\\.s: "border-bottom-style: {$}";--b\\.b\\.w: "border-bottom-width: {$}";--b\\.t: "border-top: {$}";--b\\.t\\.c: "border-top-color: {$}";--b\\.t\\.s: "border-top-style: {$}";--b\\.t\\.w: "border-top-width: {$}";--b\\.l: "border-left: {$}";--b\\.l\\.c: "border-left-color: {$}";--b\\.l\\.s: "border-left-style: {$}";--b\\.l\\.w: "border-left-width: {$}";--b\\.r: "border-right: {$}";--b\\.r\\.c: "border-right-color: {$}";--b\\.r\\.s: "border-right-style: {$}";--b\\.r\\.w: "border-right-width: {$}";--b\\.x: "border-left: {$}" "border-right: {$}";--b\\.x\\.c: "border-left-color: {$}" "border-right-color: {$}";--b\\.x\\.s: "border-left-style: {$}" "border-right-style: {$}";--b\\.x\\.w: "border-left-width: {$}" "border-right-width: {$}";--b\\.y: "border-top: {$}" "border-bottom: {$}";--b\\.y\\.c: "border-top-color: {$}" "border-bottom-color: {$}";--b\\.y\\.s: "border-top-style: {$}" "border-bottom-style: {$}";--b\\.y\\.w: "border-top-width: {$}" "border-bottom-width: {$}";--bg: "background: {$}";--bg\\.att: "background-attachment: {$}";--bg\\.c: "background-color: {$}";--bg\\.img: "background-image: {$}";--bg\\.rep: "background-repeat: {$}";--bg\\.pos: "background-position: {$}";--bg\\.sz: "background-size: {$}";--c: "color: {$}";--col: "grid-column: {$}";--cur: "cursor: {$}";--disp: "display: {$}";--fl\\.basis: "flex-basis: {$}";--fl\\.cross: "align-items: {$}";--fl\\.dir: "flex-direction: {$}";--fl\\.flow: "flex-flow: {$}";--fl\\.grow: "flex-grow: {$}";--fl\\.main: "justify-content: {$}";--fl\\.shrink: "flex-shrink: {$}";--fl\\.size: "flex: {$}";--fl\\.wr: "flex-wrap: {$}";--font: "font-family: {$}";--gap: "gap: {$}";--gr\\.cols: "grid-template-columns: {$}";--gr\\.cols\\.a: "grid-auto-columns: {$}";--gr\\.flow: "grid-auto-flow: {$}";--gr\\.rows: "grid-template-rows: {$}";--gr\\.rows\\.a: "grid-auto-rows: {$}";--h: "height: {$}";--h\\.min: "min-height: {$}";--h\\.max: "max-height: {$}";--inset: "top: {$}" "left: {$}" "bottom: {$}" "right: {$}";--inset\\.x: "left: {$}" "right: {$}";--inset\\.y: "top: {$}" "bottom: {$}";--m: "margin: {$}";--m\\.b: "margin-bottom: {$}";--m\\.l: "margin-left: {$}";--m\\.r: "margin-right: {$}";--m\\.t: "margin-top: {$}";--m\\.x: "margin-left: {$}" "margin-right: {$}";--m\\.y: "margin-bottom: {$}" "margin-top: {$}";--o: "opacity: {$}";--outln: "outline: {$}";--over: "overflow: {$}";--over\\.x: "overflow-x: {$}";--over\\.y: "overflow-y: {$}";--p: "padding: {$}";--p\\.b: "padding-bottom: {$}";--p\\.l: "padding-left: {$}";--p\\.r: "padding-right: {$}";--p\\.t: "padding-top: {$}";--p\\.x: "padding-left: {$}" "padding-right: {$}";--p\\.y: "padding-top: {$}" "padding-bottom: {$}";--pos: "position: {$}";--r: "border-radius: {$}";--r\\.b: "border-bottom-left-radius: {$}" "border-bottom-right-radius: {$}";--r\\.bl: "border-bottom-left-radius: {$}";--r\\.br: "border-bottom-right-radius: {$}";--r\\.l: "border-top-left-radius: {$}" "border-bottom-left-radius: {$}";--r\\.r: "border-top-right-radius: {$}" "border-bottom-right-radius: {$}";--r\\.t: "border-top-left-radius: {$}" "border-top-right-radius: {$}";--r\\.tl: "border-top-left-radius: {$}";--r\\.tr: "border-top-right-radius: {$}";--row: "grid-row: {$}";--sel: "user-select: {$}";--sh\\.box: "box-shadow: {$}";--sh\\.text: "text-shadow: {$}";--t\\.a: "text-align: {$}";--t\\.br: "word-break: {$}";--t\\.c: "color: {$}";--t\\.dec: "text-decoration: {$}";--t\\.lh: "line-height: {$}";--t\\.over: "text-overflow: {$}";--t\\.sz: "font-size: {$}";--t\\.tf: "text-transform: {$}";--t\\.ws: "white-space: {$}";--t\\.wt: "font-weight: {$}";--tf: "transform: {$}";--tf\\.o: "transform-origin: {$}";--tf\\.p: "perspective: {$}";--tr: "transition: {$}";--vis: "visibility: {$}";--w: "width: {$}";--w\\.min: "min-width: {$}";--w\\.max: "max-width: {$}";--x: "left: {$}";---x: "right: {$}";--y: "top: {$}";---y: "bottom: {$}";--z: "z-index: {$}";\n --fl-center: [fl.cross center] [fl.main center];\n --flex: $="column" [disp flex] [fl.dir {$}];\n --grid: $="row" [disp grid] [gr.flow {$}];\n --hide: [disp none];\n --invis: [vis hidden];\n --\\$adorn: [disp flex] [fl-center] [p 4px];\n --\\$outline: [b.w 1px] [b.c @color];\n --\\$color: [@color {$}] [@ripple-base-color {$}-ripple];\n --\\$compact: [p 0px 8px];\n --\\$fill: [@text-color @text-color-fill] [@fill-color @color] [@ripple-color @ripple-invert];\n --\\$flat: [@border-size 0px];\n --gr\\.cols-fit: "grid-template-columns: repeat(auto-fit, minmax({$}))";\n --gr\\.cols-fill: "grid-template-columns: repeat(auto-fill, minmax({$}))";\n --\\$subtitle-text: [t.sz @text-size-subtitle] [flex] [fl.main center] [p 0px 4px];\n --\\$title-text: [t.sz @text-size-title] [flex] [fl.main center] [p 4px];\n}',document.head.insertBefore(l,document.head.firstChild);const n=new RegExp([/\$="(?<def>[^"]+)"/,/\[(?<func>[\w\-\.]+)(\s+(?<arg>[^\]]+))?\]/,/\[(?<variable>@[\w\-\.]+)(\s+(?<string>[^\]]+))?\]/,/"(?<name>[\w\-]+)\s*:\s*(?<value>[^"]+?)"/].map((e=>e.source)).join("|"),"g"),s={},d={},c={},p=e=>void 0===e?"undefined":null===e?"null":`\`${e.replace(/\{\$\}/g,"${arg}")}\``,w=document.querySelectorAll("[ws-root]"),b=Array.from(w).flatMap((e=>[...e.sheet.cssRules])).filter((e=>".ws-style"===e.selectorText)).flatMap((e=>Array.from(e.style,(r=>[r,e.style.getPropertyValue(r)]))));for(const[e,t]of b){const o=e.slice(2),a=[...t.matchAll(n)].map((({groups:e})=>({...e}))),i=a.find((e=>void 0!==e.def)),l=a.filter((e=>e!==i)),w=l.map((({name:e,variable:r})=>{if(void 0!==r){return`--${r.slice(1)}: var(--wsx\\\\.\\\\${r}\${varState}\\\\.\${size ?? ""}) !important`}return void 0===e?null:`${e}: var(--wsx\\\\.${e}\${varState}\\\\.\${size ?? ""}) !important`})).filter((e=>null!==e)),b=`:where([${r.attr}~="[${o}\${state}"], [${r.attr}~="[${o}\${state}]"])`,h=[...w,...l.filter((e=>void 0!==e.func)).map((e=>{const r=c[e.func];if(void 0===r)throw new Error(`Rule "${e.func}" was not defined before rule "${o}"`);return r})).flat(1)];s[o]=new Function('{ state = "", varState, sheet, size }',"sizer",`const selectorBase = \`${b}\${state}\`\n const selector =\n (size === undefined)\n ? selectorBase\n : selectorBase.replace(/ws-x~="\\[/g, s => \`\${s}\${size}|\`)\n const css = sizer(size, \`\${selector} {\n${h.join(";")}\n}\`)\n const rules = Array.from(sheet.cssRules)\n const index =\n (size === undefined)\n ? rules.findLastIndex(rule => rule.media === undefined)\n : rules.findLastIndex(\n rule => {\n return (\n rule.media !== undefined\n && rule.cssRules[0].selectorText > selector\n )\n }\n )\n sheet.insertRule(css, (index === -1) ? sheet.cssRules.length : index)`);const x=l.map((({name:e,value:r,func:t,arg:o,variable:a,string:i})=>{if(void 0!==e||void 0!==a){return`list.push([\`${void 0!==e?`--wsx.${e}\${varState}.\${size ?? ""}`:`--wsx.\\${a}\${varState}.\${size ?? ""}`}\`, format(${p(r??i)})])`}return`macro["${t}"]({list, format, macro, varState, arg: ${p(o)}, size})`})),f=new Function(`{ list, format, macro, varState = "", arg = ${JSON.stringify(i?.def)}, size }`,x.join("\n"));c[o]=h,d[o]=f}const h=document.createElement("template");h.innerHTML='\n<style>\n@keyframes hi{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}\ncircle{animation-name:hi;animation-iteration-count:infinite;animation-timing-function:linear;transform-origin:50% 50%;}\ncircle:nth-child(1){animation-duration:4s;}\ncircle:nth-child(2){animation-duration:3s;animation-direction:reverse;}\ncircle:nth-child(3){animation-duration:2s;}\n</style>\n<svg style="width:var(--size);height:var(--size)" viewBox="0 0 100 100"><circle stroke="var(--color)" cx="50" cy="50" stroke-width="4" fill="transparent" r="48" stroke-dasharray="0 37.7 75.4 75.4 75.4 75.4"/><circle stroke="var(--ripple-base-color)" cx="50" cy="50" stroke-width="4" fill="transparent" r="40" stroke-dasharray="0 31.4 62.83 62.83 62.83 62.83"/><circle stroke="var(--color)" cx="50" cy="50" stroke-width="4" fill="transparent" r="32" stroke-dasharray="0 12.57 25.13 25.13 25.13 25.13 25.13 25.13 25.13 25.13"/></svg>',customElements.define("ws-circle-spinner",class extends HTMLElement{constructor(){super();const e=h.content.cloneNode(!0);this.attachShadow({mode:"closed"}).appendChild(e)}});const x=document.createElement("template");x.innerHTML='\n<style>\n@keyframes hi{from{transform:rotateY(0deg)}to{transform:rotateY(360deg)}}\npath{animation-name:hi;animation-iteration-count:infinite;animation-timing-function:linear;transform-origin:50% 50%;}\npath:nth-child(1){animation-duration:3s;}\npath:nth-child(2){animation-duration:2s;animation-direction:reverse;}\npath:nth-child(3){animation-duration:1s;}\n</style><svg style="width: var(--size); height: var(--size);" viewBox="0 0 100 100"><path stroke="var(--color)" stroke-width="4" fill="none" d="M91.57 26v48L50 98 8.43 74V26L50 2l41.57 24Z"/><path stroke="var(--ripple-base-color)" stroke-width="4" fill="none" d="M81.177 32v36L50 86 18.823 68V32L50 14l31.177 18Z"/><path stroke="var(--color)" stroke-width="4" fill="none" d="M70.785 38v24L50 74 29.215 62V38L50 26l20.785 12Z"/></svg>',customElements.define("ws-hexagon-spinner",class extends HTMLElement{constructor(){super();const e=x.content.cloneNode(!0);this.attachShadow({mode:"closed"}).appendChild(e)}});const f={},m={sm:"(max-width: 600px)",md:"(max-width: 1024px)",lg:"(min-width: 1025px)",lnd:"(orientation: landscape)",prt:"(orientation: portrait)"},g=e=>e?.replace(/@([\w\-]+)/g,((e,r)=>`var(--${r})`)),u=(e,r)=>void 0===e?r:`@media screen and ${m[e]} { ${r} }`,v=new WeakMap,$=(e,r,t)=>{const{name:o,state:a,arg:l,size:n}=e.groups,c=`${o}${a??""}`;if(!0===o.startsWith("@"))return void r.push([`--${o.slice(1)}`,l]);if(void 0===d[o]){if(!0===o.startsWith("$"))return;return void console.warn(`No macro defined for ${o} on`,t)}const p=a?.replace(/:|\|/g,"_")??"";((e,r,t)=>{const o=`${t.size??""}|${e}`;!0!==f[o]&&(s[r](t,u),f[o]=!0)})(c,o,{sheet:i,state:a,varState:p,size:n}),d[o]({list:r,format:g,macro:d,varState:p,arg:l?.trim(),size:n})},y=e=>{if(void 0===e.tagName)return;const t=e.getAttribute(r.attr),o=t?.matchAll(k)??[],a=v.get(e)??[],i=[];for(const r of o)$(r,i,e);const l=i.map((e=>e[0])),n=a.filter((e=>!1===l.includes(e)));for(const r of n)e.style.removeProperty(r);for(const[r,t]of i)e.style.setProperty(r,t);v.set(e,l)},k=/\[((?<size>\w+)\|)?(?<name>[\$@\w\-\.]+)(?<state>:[^\s\]]+)?(?<arg>[^\]]+?)?\]/g,z={childList(e){0!==e.addedNodes.length&&e.addedNodes.forEach((e=>{if(void 0===e.tagName)return;[e,...e.querySelectorAll("*")].forEach(y)}))},attributes(e){y(e.target)}};new MutationObserver((e=>e.forEach((e=>z[e.type](e))))).observe(document.body,{subtree:!0,attributes:!0,childList:!0,attributeFilter:[r.attr]});return[document.body,...document.body.querySelectorAll("*")].forEach(y),{x:e=>Object.entries(e).reduce(((e,[r,t])=>(null==t||!1===t||e.push(((e,r)=>!0===e.startsWith("@@")?!0===r?e:`${e}:${r}`:!0===r?`[${e}]`:`[${e} ${r}]`)(r,t)),e)),[]).join(" "),attr:r.attr}}();
1
+ var ws = (function () {
2
+ 'use strict';
3
+
4
+ var componentStyles = [{"name":"baseline","style":"@import url(https://fonts.googleapis.com/css2?family=Share+Tech+Mono:wght@400;500;600;700;800;900&family=Roboto:ital,wght@0,400;0,500;0,700;0,900;1,400;1,500;1,700;1,900&display=swap);@import url(https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css);*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}:where([ws-x]){border-style:solid;border-width:0;border-color:var(--text-color-normal)}body,html{padding:0;margin:0;width:100%;height:100%;-webkit-tap-highlight-color:transparent}body[ws-x*=\"@@theme:\"]{background-color:var(--background)}[ws-x*=\"@@theme:\"]{color:var(--text-color-normal);font-family:var(--font);font-size:var(--font-size-normal);--base-radius:4px}body[ws-x~=\"@@app\"]{overflow:hidden;position:fixed;touch-action:pan-x pan-y}"},{"name":"avatar","style":"ws-avatar,ws-avatar>object{align-items:center;justify-content:center}ws-avatar{--color:transparent;--size:36px;display:inline-flex;overflow:hidden;border-radius:500px;width:var(--size);height:var(--size);background-color:var(--color);color:var(--text-color-fill);vertical-align:text-bottom}ws-avatar>img{width:100%}ws-avatar>object{width:100%;height:100%;display:flex}"},{"name":"badge","style":"ws-badge{--color:var(--primary);position:relative;display:inline-grid;overflow:visible}ws-badge::after{position:absolute;content:attr(ws-text);right:-10px;top:0;transform:translateY(-50%);background-color:var(--color);pointer-events:none;border-radius:20px;padding:4px;min-width:20px;height:20px;box-sizing:border-box;text-align:center;font-size:var(--text-size-subtitle);color:var(--text-color-fill);line-height:14px;z-index:5}"},{"name":"button","style":":is(label,a):where([ws-x~=\"@@button\"]),button:where([ws-x~=\"[$flat]\"],[ws-x~=\"[$fill]\"],[ws-x~=\"[$outline]\"]){--color:var(--text-color-normal);--fill-color:transaprent;--text-color:var(--color);border:0 solid var(--text-color);color:var(--text-color);font-family:var(--font);background-color:var(--fill-color);border-radius:4px;cursor:pointer;padding:8px 16px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;--ripple-color:unset;--ripple-base-color:var(--ripple-normal);overflow:hidden;position:relative;user-select:none;--shadow:0px 2px 4px var(--shadow-color);box-shadow:var(--shadow)}:is(label,a):where([ws-x~=\"@@button\"]):where(:not([disabled]))::after,button:where([ws-x~=\"[$flat]\"],[ws-x~=\"[$fill]\"],[ws-x~=\"[$outline]\"]):where(:not([disabled]))::after{content:\"\";position:absolute;top:0;left:0;bottom:0;right:0;transition:background-color 150ms linear;pointer-events:none}:is(label,a):where([ws-x~=\"@@button\"]):where(:not([disabled])):active::after,button:where([ws-x~=\"[$flat]\"],[ws-x~=\"[$fill]\"],[ws-x~=\"[$outline]\"]):where(:not([disabled])):active::after{transition:none;background-color:var(--ripple-color, var(--ripple-base-color))}:is(label,a):where([ws-x~=\"@@button\"])[disabled],button:where([ws-x~=\"[$flat]\"],[ws-x~=\"[$fill]\"],[ws-x~=\"[$outline]\"])[disabled]{box-shadow:none}:is(label,a):where([ws-x~=\"@@button\"]):hover,button:where([ws-x~=\"[$flat]\"],[ws-x~=\"[$fill]\"],[ws-x~=\"[$outline]\"]):hover{--shadow:1px 3px 6px var(--shadow-color)}:is(label,a):where([ws-x~=\"@@button\"]):where([disabled]),button:where([ws-x~=\"[$flat]\"],[ws-x~=\"[$fill]\"],[ws-x~=\"[$outline]\"]):where([disabled]){filter:saturate(10%) brightness(.7)}"},{"name":"chip","style":"ws-chip{--color:var(--text-color-normal);--fill-color:transaprent;--text-color:var(--color);display:inline-flex;align-items:center;justify-content:center;border-radius:100px;padding:4px 12px;user-select:none;vertical-align:text-bottom;color:var(--text-color);background:var(--fill-color)}ws-chip:where([ws-x~=\"@@click\"]){cursor:pointer;--ripple-color:unset;--ripple-base-color:var(--ripple-normal);overflow:hidden;position:relative;user-select:none}ws-chip:where([ws-x~=\"@@click\"]):where(:not([disabled]))::after{content:\"\";position:absolute;top:0;left:0;bottom:0;right:0;transition:background-color 150ms linear;pointer-events:none}ws-chip:where([ws-x~=\"@@click\"]):where(:not([disabled])):active::after{transition:none;background-color:var(--ripple-color, var(--ripple-base-color))}"},{"name":"control","style":"label:where([ws-x~=\"@@control\"]){--color:var(--default);--border-color:var(--layer-border-color);--border-size:1px;position:relative;display:inline-grid;grid-template-areas:\"label label label\"\"start control end\"\"extra extra extra\";grid-template-rows:minmax(0,min-content) auto minmax(0,min-content);grid-template-columns:minmax(0,min-content) auto minmax(0,min-content);user-select:none;overflow:hidden;border:var(--border-size) solid var(--border-color);background-color:var(--background-element);border-radius:var(--base-radius)}label:where([ws-x~=\"@@control\"]):focus-within{--border-color:var(--color)}label:where([ws-x~=\"@@control\"]) :is(input,select,textarea){background-color:transparent;min-width:16px;font-family:var(--font);font-size:var(--text-size-normal)}label:where([ws-x~=\"@@control\"]) :is(input,select,textarea):disabled{background-color:var(--disabled-background);opacity:1}label:where([ws-x~=\"@@control\"])>:where(select){--color:var(--text-color-normal);border-width:0;padding:8px;min-height:36px;background-color:transparent;color:var(--color);cursor:pointer;grid-area:control}label:where([ws-x~=\"@@control\"])>:where(input,textarea):focus,label:where([ws-x~=\"@@control\"])>:where(select):focus{outline:0}label:where([ws-x~=\"@@control\"])>:where(select) optgroup,label:where([ws-x~=\"@@control\"])>:where(select) option{background-color:var(--background-layer);border-color:var(--background-layer);color:var(--text-color-normal);font-size:var(--text-size-normal);font-family:Arial}label:where([ws-x~=\"@@control\"])>:where(input,textarea){border-width:0;color:var(--text-normal-color);min-height:28px;width:100%;height:100%;grid-area:control;padding:4px}label:where([ws-x~=\"@@control\"])>input[type=file]{position:relative;padding:0}label:where([ws-x~=\"@@control\"])>input[type=file]::file-selector-button{font-family:var(--font);height:100%;margin:0 4px 0 0;padding:4px;color:var(--text-normal-color);background-color:transparent;border-width:0;text-decoration:underline}label:where([ws-x~=\"@@control\"])>:where([ws-x~=\"[$label]\"]){grid-area:label;padding:4px;display:flex;flex-direction:column;align-items:start;color:var(--color);white-space:nowrap;font-size:var(--text-size-subtitle)}label:where([ws-x~=\"@@control\"])>:where([ws-x~=\"[$start]\"]){grid-area:start}label:where([ws-x~=\"@@control\"])>:where([ws-x~=\"[$end]\"]){grid-area:end}label:where([ws-x~=\"@@control\"])>:where([ws-x~=\"[$extra]\"]){grid-area:extra;font-size:var(--text-size-subtitle);padding:4px}"},{"name":"details","style":"details:where([ws-x]){--color:var(--default);border:0 solid var(--color);padding-left:1em;border-radius:4px;overflow:hidden}details:where([ws-x])>summary{color:var(--color);padding:4px 4px 4px 1.1em;margin-left:-1em;cursor:pointer;--ripple-color:unset;--ripple-base-color:var(--ripple-normal);overflow:hidden;position:relative;user-select:none}details:where([ws-x])>summary:where(:not([disabled]))::after{content:\"\";position:absolute;top:0;left:0;bottom:0;right:0;transition:background-color 150ms linear;pointer-events:none}details:where([ws-x])>summary:where(:not([disabled])):active::after{transition:none;background-color:var(--ripple-color, var(--ripple-base-color))}details:where([ws-x])>summary::before{position:absolute;left:0;top:50%;bottom:0;width:1em;display:flex;align-items:center;justify-content:center;font-family:bootstrap-icons!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;content:\"\";transform:translateY(-50%);transition:transform 100ms linear}details:where([ws-x])>summary::-webkit-details-marker,details:where([ws-x])>summary::marker{content:\"\";display:none}details:where([ws-x])[open]>summary::before{transform:translateY(-50%) rotate(90deg)}"},{"name":"flex","style":"ws-flex{display:flex;flex-direction:column;gap:8px;padding:4px;overflow:hidden}ws-flex>*{flex-shrink:0}"},{"name":"grid","style":"ws-grid{display:grid;overflow:hidden;gap:8px;padding:4px;grid-auto-rows:min-content}"},{"name":"icon","style":"ws-icon{display:inline-block}"},{"name":"link","style":"a:where([ws-x]){--color:var(--text-color-normal);--text-color:var(--color)}a:where([ws-x]),a:where([ws-x]):hover,a:where([ws-x]):visited{color:var(--text-color)}a:where([ws-x])[disabled]{pointer-events:none}"},{"name":"modal","style":"ws-modal{--text-color:var(--text-color-normal);position:fixed;top:0;left:0;bottom:0;right:0;background-color:rgba(0,0,0,.55);z-index:100;cursor:default;visibility:hidden;transition:visibility var(--anim-time, 200ms) linear}ws-modal>label:first-child{position:absolute;width:100%;height:100%;cursor:pointer}ws-modal[ws-x~=\"[$show]\"]{visibility:visible!important}ws-modal[ws-x~=\"[$show]\"]>:where([ws-x~=\"@@action\"]),ws-modal[ws-x~=\"[$show]\"]>:where([ws-x~=\"@@menu\"]){transform:translateX(0)}ws-modal[ws-x~=\"[$show]\"]>:where([ws-x~=\"@@select\"]){transform:translateX(-50%) translateY(0)}ws-modal[ws-x~=\"[$show]\"]>:where([ws-x~=\"@@dialog\"]){opacity:1}input[type=checkbox]:not(:checked)+ws-modal{visibility:hidden}input[type=checkbox]:checked+ws-modal{visibility:visible}ws-modal>:where(:not(label:first-child)){position:absolute}ws-modal>:where(:not(label:first-child)):where([ws-x~=\"@@menu\"]){top:0;left:0;height:100%;transform:translateX(-100%);transition:transform var(--anim-time, 250ms) linear;max-width:100%}input[type=checkbox]:checked+ws-modal>:where(:not(label:first-child)):where([ws-x~=\"@@action\"]),input[type=checkbox]:checked+ws-modal>:where(:not(label:first-child)):where([ws-x~=\"@@menu\"]){transform:translateX(0)}ws-modal>:where(:not(label:first-child)):where([ws-x~=\"@@action\"]){top:0;right:0;height:100%;transform:translateX(100%);transition:transform var(--anim-time, 250ms) linear;max-width:100%}ws-modal>:where(:not(label:first-child)):where([ws-x~=\"@@select\"]){top:0;left:50%;transform:translateX(-50%) translateY(-100%);max-height:75vh;max-width:min(90vw,720px);transition:transform var(--anim-time, 250ms) linear}input[type=checkbox]:checked+ws-modal>:where(:not(label:first-child)):where([ws-x~=\"@@select\"]){transform:translateX(-50%) translateY(0)}ws-modal>:where(:not(label:first-child)):where([ws-x~=\"@@dialog\"]){top:50%;left:50%;transform:translate(-50%,-50%);opacity:0;transition:opacity var(--anim-time, 250ms) linear}input[type=checkbox]:checked+ws-modal>:where(:not(label:first-child)):where([ws-x~=\"@@dialog\"]){opacity:1}"},{"name":"notification","style":"ws-notification{--color:var(--layer-border-color);position:relative;display:inline-grid;grid-template-columns:auto 1fr auto;grid-template-areas:\"start text end\";border-radius:4px;cursor:pointer;user-select:none;border:2px solid var(--color);min-height:48px;z-index:0}ws-notification::after,ws-notification::before{content:\"\";position:relative;display:block;min-width:20px;background-color:var(--color);z-index:-1}ws-notification::before{grid-area:start}ws-notification::after{grid-area:end}ws-notification>:where([ws-x~=\"[$notif-text]\"]){display:flex;flex-direction:row;align-items:center;padding:4px;background-color:var(--background-element)}ws-notification>:where([ws-x~=\"[$start]\"]){grid-area:start}ws-notification>:where([ws-x~=\"[$end]\"]){grid-area:end}ws-notification>:where([ws-x~=\"[$start]\"],[ws-x~=\"[$end]\"]),ws-notification>:where([ws-x~=\"[$start]\"],[ws-x~=\"[$end]\"]) button{--ripple-color:var(--ripple-invert);--color:var(--text-color-invert);color:var(--text-color-invert)}"},{"name":"paper","style":"ws-paper{--color:var(--layer-border-color);display:grid;border-radius:var(--base-radius);box-shadow:0 2px 4px var(--shadow-color);overflow:hidden;grid-template-columns:1fr;grid-template-rows:min-content auto min-content;grid-template-areas:\"header\"\"content\"\"footer\";background-color:var(--background-layer)}ws-paper::before{content:\"\";grid-area:header}ws-paper::after{content:\"\";grid-area:footer;pointer-events:none}ws-paper>:where([ws-x~=\"[$content]\"]){grid-area:content}ws-paper>:where([ws-x~=\"[$header]\"]){grid-area:header}ws-paper>:where([ws-x~=\"[$footer]\"]){grid-area:footer}"},{"name":"popover","style":"ws-popover{display:grid;position:relative}ws-popover:not(:visibile)>:where([ws-x~=\"[$content]\"]){display:none}ws-popover>:where([ws-x~=\"[$content]\"]){position:absolute;z-index:25;display:none}ws-popover[ws-x~=\"[$show]\"]>:where([ws-x~=\"[$content]\"]){display:block}ws-popover>input:where([type=checkbox]):checked+:where([ws-x~=\"[$content]\"]){display:block}ws-popover>input:where([type=checkbox]):not(:checked)+:where([ws-x~=\"[$content]\"]){display:none}"},{"name":"screen","style":"ws-screen{--stack:0;--screen-width:min(720px, 100%);display:grid;width:calc(100% - var(--sub-pixel-offset));height:calc(100% - 1px);overflow:hidden;position:fixed;top:0;left:0;z-index:200;background-color:rgba(0,0,0,.4);grid-template-columns:auto calc(var(--screen-width) - 16px*var(--stack)) auto;grid-template-areas:\". content .\";padding-top:calc(8px*var(--stack))}ws-screen[ws-x~=\"[$left]\"]{grid-template-columns:calc(8px*var(--stack)) calc(var(--screen-width) - 16px*var(--stack)) auto}ws-screen>:where(*){grid-area:content;height:100%;overflow:hidden}"},{"name":"spinner","style":"ws-circle-spinner,ws-hexagon-spinner{--size:100px;--color:var(--primary);--ripple-color:var(--primary-ripple);width:var(--size);height:var(--size);display:inline-block}"},{"name":"table","style":"table:where([ws-x]){--border-color:var(--color);border-spacing:0;position:relative;border-top:1px solid var(--color)}table:where([ws-x]) thead :is(td,th){color:var(--color);font-weight:700}table:where([ws-x]):where([ws-x~=\"[$header-fill]\"]) thead :is(td,th){background-color:var(--color);color:var(--text-color-fill)}table:where([ws-x]) :is(td,th){padding:8px;white-space:nowrap;background-color:var(--background-layer);border-bottom:1px solid var(--color)}table:where([ws-x]) :where(th:first-child){position:sticky;left:0;z-index:10}table:where([ws-x]) :where(td:first-child,th:first-child){border-left:1px solid var(--color)}table:where([ws-x]) :where(td:last-child,th:last-child){border-right:1px solid var(--color)}"},{"name":"tabs","style":"ws-tabs{--color:var(--primary);display:flex;flex-direction:row;justify-content:stretch;align-items:stretch;user-select:none;gap:2px}ws-tabs[ws-x~=\"[$vert]\"]{flex-direction:column;justify-content:flex-start}ws-tabs[ws-x~=\"[$vert]\"] ws-tab{border-bottom-width:0;border-right-width:2px;flex-grow:0}ws-tabs[ws-x~=\"[$fill]\"]>label>input[type=radio]:checked+ws-tab{color:var(--text-color-fill);background-color:var(--color)}ws-tabs>label{display:grid;flex-grow:1}ws-tabs>label>input[type=radio]{display:none}ws-tabs>label>input[type=radio]:checked+ws-tab{color:var(--color);border-color:var(--color)}ws-tabs>label>ws-tab{display:flex;justify-content:center;align-items:center;padding:8px;border-color:var(--text-color-secondary);border-width:0 0 2px;border-style:solid;cursor:pointer;--ripple-color:unset;--ripple-base-color:var(--ripple-normal);overflow:hidden;position:relative;user-select:none}ws-tabs>label>ws-tab:where(:not([disabled]))::after{content:\"\";position:absolute;top:0;left:0;bottom:0;right:0;transition:background-color 150ms linear;pointer-events:none}ws-tabs>label>ws-tab:where(:not([disabled])):active::after{transition:none;background-color:var(--ripple-color, var(--ripple-base-color))}"},{"name":"titlebar","style":"ws-titlebar{display:grid;min-height:52px;grid-template-columns:auto 1fr auto;grid-template-areas:\"menu title action\";user-select:none;position:relative}ws-titlebar>:where(button,[ws-x~=\"@@button\"]){border-radius:0}ws-titlebar>:where([ws-x~=\"[$title]\"]){--color:var(--text-color-normal);--text-color:var(--color);--border-color:var(--layer-border-color);--border-size:2px;--fill-color:transparent;grid-area:title;color:var(--text-color);border-bottom:1px solid transparent;z-index:0;display:flex;flex-direction:column;justify-content:center}ws-titlebar>:where([ws-x~=\"[$title]\"]):where([ws-x~=\"[$color\"]){--border-color:var(--color)}ws-titlebar>:where([ws-x~=\"[$title]\"])::before{content:\"\";background-color:var(--fill-color);position:absolute;top:0;left:0;right:0;bottom:0;z-index:-1;border-bottom:var(--border-size) solid var(--border-color);border-top:var(--border-size) solid var(--border-color)}ws-titlebar>:where([ws-x~=\"[$title]\"])~:where([ws-x~=\"[$menu]\"],[ws-x~=\"[$action]\"])>:where(button,[ws-x~=\"@@button\"]),ws-titlebar>:where([ws-x~=\"[$title]\"])~:where(button,[ws-x~=\"@@button\"]){--ripple-normal:var(--ripple-dark)}ws-titlebar>:where([ws-x~=\"[$title]\"]):where([ws-x~=\"[$fill]\"])~:where([ws-x~=\"[$menu]\"],[ws-x~=\"[$action]\"])>:where(button,[ws-x~=\"@@button\"]),ws-titlebar>:where([ws-x~=\"[$title]\"]):where([ws-x~=\"[$fill]\"])~:where(button,[ws-x~=\"@@button\"]){--color:var(--text-color-invert)}ws-titlebar>:where([ws-x~=\"[$menu]\"]){grid-area:menu}ws-titlebar>:where([ws-x~=\"[$action]\"]){grid-area:action}"},{"name":"toaster","style":"ws-toaster{position:fixed;z-index:100;display:inline-flex;flex-direction:column;padding:4px;gap:4px;height:min-content!important}ws-toaster[ws-x~=\"[$tl]\"]{top:0;left:0}ws-toaster[ws-x~=\"[$tc]\"]{top:0;left:50%;transform:translateX(-50%)}ws-toaster[ws-x~=\"[$tr]\"]{top:0;right:0}ws-toaster[ws-x~=\"[$ml]\"]{top:50%;left:0;transform:translateY(-50%)}ws-toaster[ws-x~=\"[$mr]\"]{top:50%;right:0;transform:translateY(-50%)}ws-toaster[ws-x~=\"[$bl]\"]{bottom:0;left:0}ws-toaster[ws-x~=\"[$bc]\"]{bottom:0;left:50%;transform:translateX(-50%)}ws-toaster[ws-x~=\"[$br]\"]{bottom:0;right:0}"},{"name":"toggle","style":"label:where([ws-x~=\"@@toggle\"]){--color:var(--default);--ripple-color:var(--default-ripple);--border-color:var(--layer-border-color);--border-size:1px;cursor:pointer;display:inline-flex;align-items:center;justify-content:space-between;padding:4px;border:var(--border-size) solid var(--border-color);background-color:var(--background-element);border-radius:var(--base-radius);--ripple-color:unset;--ripple-base-color:var(--ripple-normal);overflow:hidden;position:relative;user-select:none}label:where([ws-x~=\"@@toggle\"]):where(:not([disabled]))::after{content:\"\";position:absolute;top:0;left:0;bottom:0;right:0;transition:background-color 150ms linear;pointer-events:none}label:where([ws-x~=\"@@toggle\"]):where(:not([disabled])):active::after{transition:none;background-color:var(--ripple-color, var(--ripple-base-color))}label:where([ws-x~=\"@@toggle\"]):focus-within{--border-color:var(--color)}label:where([ws-x~=\"@@toggle\"])>input{position:relative;min-width:20px;min-height:20px;-webkit-appearance:none;appearance:none;margin:0;color:var(--color)}label:where([ws-x~=\"@@toggle\"])>input:focus{outline:0}label:where([ws-x~=\"@@toggle\"])>input:disabled{--color:var(--disabled-background)}label:where([ws-x~=\"@@toggle\"])>input::after{content:\"\";position:absolute;font-size:18px;font-family:bootstrap-icons!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;top:50%;left:50%;width:20px;height:20px;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;overflow:hidden}label:where([ws-x~=\"@@toggle\"])>input[type=radio]::after{content:\"\"}label:where([ws-x~=\"@@toggle\"])>input[type=radio]:checked::after{content:\"\"}label:where([ws-x~=\"@@toggle\"])>input[type=checkbox]::after{content:\"\"}label:where([ws-x~=\"@@toggle\"])>input[type=checkbox]:checked::after{content:\"\"}label:where([ws-x~=\"@@toggle\"])>input[type=checkbox]:where([ws-x~=\"@@switch\"]){position:relative;border:1px solid var(--color);height:24px;width:44px;border-radius:12px}label:where([ws-x~=\"@@toggle\"])>input[type=checkbox]:where([ws-x~=\"@@switch\"]):disabled{background-color:var(--disabled-background)}label:where([ws-x~=\"@@toggle\"])>input[type=checkbox]:where([ws-x~=\"@@switch\"])::after{color:var(--text-dark);content:\"\";background-color:var(--text-color-secondary);position:absolute;width:18px;height:18px;border-radius:10px;top:2px;left:2px;transform:none;border-width:0;transition:left 100ms linear,color 100ms linear}label:where([ws-x~=\"@@toggle\"])>input[type=checkbox]:where([ws-x~=\"@@switch\"]):checked::after{background-color:var(--color);content:\"\";left:22px}"},{"name":"tooltip","style":"ws-tooltip{position:relative;display:inline-grid;overflow:visible}ws-tooltip::after{position:absolute;content:attr(ws-text);left:50%;bottom:calc(100% + 2px);transform:translateX(-50%);height:20px;background-color:var(--background-layer);opacity:0;transition:opacity 100ms linear;pointer-events:none;border-radius:4px;border:1px solid var(--text-color-secondary);padding:2px 8px;font-size:var(--text-size-subtitle);width:60%;display:flex;align-items:center;justify-content:center;z-index:5}ws-tooltip:hover::after{opacity:1}ws-tooltip[ws-x~=\"[$bottom]\"]::after{bottom:unset;top:calc(100% + 2px)}"},{"name":"dark","style":"[ws-x~=\"@@theme:dark\"]{--font:Roboto;--text-light:white;--text-dark:black;--text-color-normal:var(--text-light);--text-color-secondary:#cccccc;--text-color-invert:var(--text-dark);--text-color-fill:var(--text-dark);--text-size-normal:14px;--text-size-title:18px;--text-size-header:16px;--text-size-info:13px;--text-size-subtitle:12px;--text-size-data:10px;--background:#161616;--background-layer:#333333;--background-element:#242424;--layer-border-width:1px;--layer-border-color:#505050;--default:var(--text-color-normal);--default-ripple:var(--ripple-normal);--primary:#00aaff;--primary-ripple:#00aaff60;--secondary:#2fbc2f;--secondary-ripple:#2fbc2f60;--danger:#df5348;--danger-ripple:#df534860;--warning:#ffff00;--warning-ripple:#ffff0060;--accent:#ff4dff;--accent-ripple:#ff4dff60;--ripple-dark:#00000060;--ripple-light:#FFFFFF60;--ripple-normal:var(--ripple-light);--ripple-invert:var(--ripple-dark);--shadow-color:rgb(0, 0, 0, 0.25);--disabled-background:#606060;color-scheme:dark}"},{"name":"light","style":"[ws-x~=\"@@theme:light\"]{--font:Roboto;--text-light:white;--text-dark:black;--text-color-normal:var(--text-dark);--text-color-secondary:#505050;--text-color-invert:var(--text-light);--text-color-fill:var(--text-light);--text-size-normal:14px;--text-size-title:18px;--text-size-header:16px;--text-size-info:13px;--text-size-subtitle:12px;--text-size-data:10px;--background:#e9e9e9;--background-layer:#ffffff;--background-element:#f3f3f3;--layer-border-width:1px;--layer-border-color:#aaaaaa;--default:var(--text-color-normal);--default-ripple:var(--ripple-normal);--primary:#1d62d5;--primary-ripple:#1d62d560;--secondary:#128f12;--secondary-ripple:#128f1260;--danger:#F44336;--danger-ripple:#F4433660;--warning:#db990d;--warning-ripple:#db990d60;--accent:#cf00cf;--accent-ripple:#cf00cf60;--ripple-dark:#00000060;--ripple-light:#FFFFFF60;--ripple-normal:var(--ripple-dark);--ripple-invert:var(--ripple-light);--shadow-color:rgb(0, 0, 0, 0.25);--disabled-background:#c7c7c7}"},{"name":"tron","style":"[ws-x~=\"@@theme:tron\"]{--font:Share Tech Mono;--text-light:white;--text-dark:black;--text-color-normal:var(--text-light);--text-color-secondary:#a0a0a0;--text-color-invert:var(--text-dark);--text-color-fill:var(--text-dark);--text-size-normal:15px;--text-size-title:19px;--text-size-header:17px;--text-size-info:14px;--text-size-subtitle:13px;--text-size-data:11px;--background:#020202;--background-layer:#060d19;--background-element:#04080F;--layer-border-width:1px;--layer-border-color:#00EEEE;--default:var(--text-color-normal);--default-ripple:var(--ripple-normal);--primary:#00aaff;--primary-ripple:#00aaff60;--secondary:#2fbc2f;--secondary-ripple:#2fbc2f60;--danger:#df5348;--danger-ripple:#df534860;--warning:#ffff00;--warning-ripple:#ffff0060;--accent:#ff4dff;--accent-ripple:#ff4dff60;--ripple-dark:#00000060;--ripple-light:#FFFFFF60;--ripple-normal:var(--ripple-light);--ripple-invert:var(--ripple-dark);--shadow-color:rgb(255, 255, 255, 0.25);--disabled-background:#606060;color-scheme:dark}"}];
5
+
6
+ var coreMacros = `--b: "border: {$}";--b\\.c: "border-color: {$}";--b\\.s: "border-style: {$}";--b\\.w: "border-width: {$}";--b\\.b: "border-bottom: {$}";--b\\.b\\.c: "border-bottom-color: {$}";--b\\.b\\.s: "border-bottom-style: {$}";--b\\.b\\.w: "border-bottom-width: {$}";--b\\.t: "border-top: {$}";--b\\.t\\.c: "border-top-color: {$}";--b\\.t\\.s: "border-top-style: {$}";--b\\.t\\.w: "border-top-width: {$}";--b\\.l: "border-left: {$}";--b\\.l\\.c: "border-left-color: {$}";--b\\.l\\.s: "border-left-style: {$}";--b\\.l\\.w: "border-left-width: {$}";--b\\.r: "border-right: {$}";--b\\.r\\.c: "border-right-color: {$}";--b\\.r\\.s: "border-right-style: {$}";--b\\.r\\.w: "border-right-width: {$}";--b\\.x: "border-left: {$}" "border-right: {$}";--b\\.x\\.c: "border-left-color: {$}" "border-right-color: {$}";--b\\.x\\.s: "border-left-style: {$}" "border-right-style: {$}";--b\\.x\\.w: "border-left-width: {$}" "border-right-width: {$}";--b\\.y: "border-top: {$}" "border-bottom: {$}";--b\\.y\\.c: "border-top-color: {$}" "border-bottom-color: {$}";--b\\.y\\.s: "border-top-style: {$}" "border-bottom-style: {$}";--b\\.y\\.w: "border-top-width: {$}" "border-bottom-width: {$}";--bg: "background: {$}";--bg\\.att: "background-attachment: {$}";--bg\\.c: "background-color: {$}";--bg\\.img: "background-image: {$}";--bg\\.rep: "background-repeat: {$}";--bg\\.pos: "background-position: {$}";--bg\\.sz: "background-size: {$}";--c: "color: {$}";--col: "grid-column: {$}";--cur: "cursor: {$}";--disp: "display: {$}";--fl\\.basis: "flex-basis: {$}";--fl\\.cross: "align-items: {$}";--fl\\.dir: "flex-direction: {$}";--fl\\.flow: "flex-flow: {$}";--fl\\.grow: "flex-grow: {$}";--fl\\.main: "justify-content: {$}";--fl\\.shrink: "flex-shrink: {$}";--fl\\.size: "flex: {$}";--fl\\.wr: "flex-wrap: {$}";--font: "font-family: {$}";--gap: "gap: {$}";--gr\\.cols: "grid-template-columns: {$}";--gr\\.cols\\.a: "grid-auto-columns: {$}";--gr\\.flow: "grid-auto-flow: {$}";--gr\\.rows: "grid-template-rows: {$}";--gr\\.rows\\.a: "grid-auto-rows: {$}";--h: "height: {$}";--h\\.min: "min-height: {$}";--h\\.max: "max-height: {$}";--inset: "top: {$}" "left: {$}" "bottom: {$}" "right: {$}";--inset\\.x: "left: {$}" "right: {$}";--inset\\.y: "top: {$}" "bottom: {$}";--m: "margin: {$}";--m\\.b: "margin-bottom: {$}";--m\\.l: "margin-left: {$}";--m\\.r: "margin-right: {$}";--m\\.t: "margin-top: {$}";--m\\.x: "margin-left: {$}" "margin-right: {$}";--m\\.y: "margin-bottom: {$}" "margin-top: {$}";--o: "opacity: {$}";--outln: "outline: {$}";--over: "overflow: {$}";--over\\.x: "overflow-x: {$}";--over\\.y: "overflow-y: {$}";--p: "padding: {$}";--p\\.b: "padding-bottom: {$}";--p\\.l: "padding-left: {$}";--p\\.r: "padding-right: {$}";--p\\.t: "padding-top: {$}";--p\\.x: "padding-left: {$}" "padding-right: {$}";--p\\.y: "padding-top: {$}" "padding-bottom: {$}";--pos: "position: {$}";--r: "border-radius: {$}";--r\\.b: "border-bottom-left-radius: {$}" "border-bottom-right-radius: {$}";--r\\.bl: "border-bottom-left-radius: {$}";--r\\.br: "border-bottom-right-radius: {$}";--r\\.l: "border-top-left-radius: {$}" "border-bottom-left-radius: {$}";--r\\.r: "border-top-right-radius: {$}" "border-bottom-right-radius: {$}";--r\\.t: "border-top-left-radius: {$}" "border-top-right-radius: {$}";--r\\.tl: "border-top-left-radius: {$}";--r\\.tr: "border-top-right-radius: {$}";--row: "grid-row: {$}";--sel: "user-select: {$}";--sh\\.box: "box-shadow: {$}";--sh\\.text: "text-shadow: {$}";--t\\.a: "text-align: {$}";--t\\.br: "word-break: {$}";--t\\.c: "color: {$}";--t\\.dec: "text-decoration: {$}";--t\\.lh: "line-height: {$}";--t\\.over: "text-overflow: {$}";--t\\.sz: "font-size: {$}";--t\\.tf: "text-transform: {$}";--t\\.ws: "white-space: {$}";--t\\.wt: "font-weight: {$}";--tf: "transform: {$}";--tf\\.o: "transform-origin: {$}";--tf\\.p: "perspective: {$}";--tr: "transition: {$}";--vis: "visibility: {$}";--w: "width: {$}";--w\\.min: "min-width: {$}";--w\\.max: "max-width: {$}";--x: "left: {$}";---x: "right: {$}";--y: "top: {$}";---y: "bottom: {$}";--z: "z-index: {$}";`;
7
+
8
+ /**
9
+ @type {{
10
+ attr: string
11
+ }}
12
+ */
13
+ const config = {
14
+ attr: "ws-x",
15
+ // Using a window variable is not the coolest method, but when a script is
16
+ // loaded in an async tag, it's much more difficult to get the tag details
17
+ // to pull out config in a cooler way.
18
+ ...window.windstormConfig
19
+ };
20
+
21
+ // The component styles and yml file are both loaded using custom rollup
22
+
23
+ const head = document.head;
24
+
25
+ // When devices scale screens, sometimes the edges are off by a pixel because
26
+ // of rounding errors. I do the math with integers to prevent weird floating
27
+ // point errors from breaking my check, since it's already breaking the scale.
28
+ const lastDigit = Math.ceil(screen.width * devicePixelRatio * 10) % 10;
29
+ const roundDown = lastDigit >= 5;
30
+
31
+ componentStyles.push({
32
+ name: "correction",
33
+ style: `body {--sub-pixel-offset:${roundDown ? 1 : 0}px}`
34
+ });
35
+ for (const { name, style } of componentStyles) {
36
+ const st = document.createElement("style");
37
+ st.setAttribute("ws-name", name);
38
+ st.innerHTML = style.replaceAll("ws-x", config.attr);
39
+ head.append(st);
40
+ }
41
+
42
+ const style = document.createElement("style");
43
+ document.head.append(style);
44
+ const sheet = style.sheet;
45
+
46
+ style.setAttribute("ws-name", "windstorm-generated");
47
+
48
+ const baseMacros = document.createElement("style");
49
+ baseMacros.setAttribute("ws-name", "core macros");
50
+ baseMacros.setAttribute("ws-root", "");
51
+ baseMacros.innerHTML = `.ws-style {
52
+ ${coreMacros}
53
+ --fl-center: [fl.cross center] [fl.main center];
54
+ --flex: $="column" [disp flex] [fl.dir {$}];
55
+ --grid: $="row" [disp grid] [gr.flow {$}];
56
+ --hide: [disp none];
57
+ --invis: [vis hidden];
58
+ --\\$adorn: [disp flex] [fl-center] [p 4px];
59
+ --\\$outline: [b.w 1px] [b.c @color];
60
+ --\\$color: [@color {$}] [@ripple-base-color {$}-ripple];
61
+ --\\$compact: [p 0px 8px];
62
+ --\\$fill: [@text-color @text-color-fill] [@fill-color @color] [@ripple-color @ripple-invert];
63
+ --\\$flat: [@border-size 0px] [bg.c transparent];
64
+ --\\$lined: [b.w 0px] [b.b.w @border-size] [bg.c transparent] [r 0px];
65
+ --\\$lined-fill: [b.w 0px] [b.b.w @border-size] [r.b 0px];
66
+ --\\$ground: [sh.box none];
67
+ --gr\\.cols-fit: "grid-template-columns: repeat(auto-fit, minmax({$}))";
68
+ --gr\\.cols-fill: "grid-template-columns: repeat(auto-fill, minmax({$}))";
69
+ --\\$subtitle-text: [t.sz @text-size-subtitle] [flex] [fl.main center] [p 0px 4px];
70
+ --\\$title-text: [t.sz @text-size-title] [flex] [fl.main center] [p 4px];
71
+ }`;
72
+ document.head.insertBefore(baseMacros, document.head.firstChild);
73
+
74
+ // Style setup also creates the built-in macros, so it needs to run first
75
+
76
+ // Split the regex into parts so that I can edit them easier (the one liner is
77
+ // a huge mess to look at).
78
+ const regexParts = [
79
+ // default value
80
+ /\$="(?<def>[^"]+)"/,
81
+ // windstorm macro
82
+ /\[(?<func>[\w\-\.]+)(\s+(?<arg>[^\]]+))?\]/,
83
+ // variable set macro
84
+ /\[(?<variable>@[\w\-\.]+)(\s+(?<string>[^\]]+))?\]/,
85
+ // css property
86
+ /"(?<name>[\w\-]+)\s*:\s*(?<value>[^"]+?)"/
87
+ ];
88
+ const partsRegex = new RegExp(
89
+ regexParts.map(part => part.source).join("|"),
90
+ "g"
91
+ );
92
+
93
+ const styleMacro = {};
94
+ const macro = {};
95
+ const cssLineCache = {};
96
+
97
+ // Uncomment these and rebuild for some helpful debugging variables dumped into
98
+ // the window.
99
+ // window.styleMacro = styleMacro
100
+ // window.macro = macro
101
+ // window.wsxSheet = sheet
102
+
103
+ // Takes the {$} string in the macro defs and converts it into an interpolated
104
+ // string for JS code gen, with fallbacks that don't cause JS parse errors.
105
+ const argReplace = (source) => {
106
+ if (source === undefined) {
107
+ return "undefined"
108
+ }
109
+ if (source === null) {
110
+ return "null"
111
+ }
112
+ return `\`${source.replace(/\{\$\}/g, "${arg}")}\``
113
+ };
114
+
115
+ // Use an attribute to mark tags that should be processed for macros.
116
+ // Since both style and link tags ahve the same attributes, specific tag names
117
+ // aren't used in the query selecor.
118
+ // REFACTOR: use :where() for the tags to make sure it's only those?
119
+ const roots = document.querySelectorAll("[ws-root]");
120
+ const rules = Array.from(roots)
121
+ .flatMap(source => [...source.sheet.cssRules])
122
+ .filter(rule => rule.selectorText === ".ws-style")
123
+ .flatMap(rule => Array.from(
124
+ rule.style,
125
+ (name) => [name, rule.style.getPropertyValue(name)]
126
+ ));
127
+
128
+ for (const [key, value] of rules) {
129
+ // Custom css props all start with -- and that's what allows the custom
130
+ // macros to be defined without the CSS parser throwing them away, so the
131
+ // -- gets removed before processing the name.
132
+ const ruleName = key.slice(2);
133
+ const parts = [...value.matchAll(partsRegex)].map(
134
+ // RegExp.groups isn't a real object, this converts it to one.
135
+ ({ groups }) => ({ ...groups })
136
+ );
137
+
138
+ const def = parts.find(
139
+ prop => prop.def !== undefined
140
+ );
141
+ const props = parts.filter(item => item !== def);
142
+
143
+ const cssProps =
144
+ props.map(
145
+ ({ name, variable }) => {
146
+ // Have to escape the escape sequences so that when it's
147
+ // interpolated into the template string it produces the
148
+ // correct sequence for the function to parse.
149
+ // I don't know why I did this to myself.
150
+ if (variable !== undefined) {
151
+ const varname = variable.slice(1);
152
+ return `--${varname}: var(--wsx\\\\.\\\\${variable}\${varState}\\\\.\${size ?? ""}) !important`
153
+ }
154
+ if (name === undefined) {
155
+ return null
156
+ }
157
+ return `${name}: var(--wsx\\\\.${name}\${varState}\\\\.\${size ?? ""}) !important`
158
+ }
159
+ )
160
+ .filter(prop => prop !== null);
161
+ // Selector uses both [key] and [key as checks instead of trying to to
162
+ // figure out if each macro takes an argument or not. Both of those
163
+ // sequences will be unique to a macro, so using both works.
164
+ const baseSelector = `:where([${config.attr}~="[${ruleName}\${state}"], [${config.attr}~="[${ruleName}\${state}]"])`;
165
+
166
+ // The lines of CSS that setup styles for macros are cached as each macro
167
+ // is created, so that any macros using other macros can use a copy of the
168
+ // raw CSS for the setup, rather than trying to do complex css rule sharing.
169
+ const extras = props.filter(prop => prop.func !== undefined);
170
+ const cssLines = [
171
+ ...cssProps,
172
+ ...extras.map(
173
+ ex => {
174
+ const lines = cssLineCache[ex.func];
175
+ if (lines === undefined) {
176
+ throw new Error(`Rule "${ex.func}" was not defined before rule "${ruleName}"`)
177
+ }
178
+ return lines
179
+ }
180
+ ).flat(1)
181
+ ];
182
+
183
+ // Style macros are used to create teh CSS for a macro when it get's used.
184
+ // This serves 2 purposes:
185
+ // - Unused macros don't generate any CSS that needs to get processed
186
+ // - States can be added at any time with new CSS generated for that state
187
+ // so that any CSS state combinations can be used.
188
+ // The extra bit of code for the insertion point calculation are there so
189
+ // that size-based CSS gets inserted in such a way that it always overrides
190
+ // CSS not related to specific screen sizes.
191
+ styleMacro[ruleName] = new Function(
192
+ `{ state = "", varState, sheet, size }`,
193
+ "sizer",
194
+ `const selectorBase = \`${baseSelector}\${state}\`
195
+ const selector =
196
+ (size === undefined)
197
+ ? selectorBase
198
+ : selectorBase.replace(/ws-x~="\\[/g, s => \`\${s}\${size}|\`)
199
+ const css = sizer(size, \`\${selector} {\n${cssLines.join(";")}\n}\`)
200
+ const rules = Array.from(sheet.cssRules)
201
+ const index =
202
+ (size === undefined)
203
+ ? rules.findLastIndex(rule => rule.media === undefined)
204
+ : rules.findLastIndex(
205
+ rule => {
206
+ return (
207
+ rule.media !== undefined
208
+ && rule.cssRules[0].selectorText > selector
209
+ )
210
+ }
211
+ )
212
+ sheet.insertRule(css, (index === -1) ? sheet.cssRules.length : index)`
213
+ );
214
+
215
+ // Macro function lines get generated in order of the definitions, ensuring
216
+ // that the application of variables that affect styles is deterministic
217
+ // regardless of what the browser might normally try and do.
218
+ const applyLines = props.map(
219
+ ({ name, value, func, arg, variable, string }) => {
220
+ if (name !== undefined || variable !== undefined) {
221
+ const valueTemplate = argReplace(value ?? string);
222
+ const varName =
223
+ (name !== undefined)
224
+ ? `--wsx.${name}\${varState}.\${size ?? ""}`
225
+ : `--wsx.\\${variable}\${varState}.\${size ?? ""}`;
226
+ return `list.push([\`${varName}\`, format(${valueTemplate})])`
227
+ }
228
+ const argTemplate = argReplace(arg);
229
+ return `macro["${func}"]({list, format, macro, varState, arg: ${argTemplate}, size})`
230
+ }
231
+ );
232
+ const apply = new Function(
233
+ `{ list, format, macro, varState = "", arg = ${JSON.stringify(def?.def)}, size }`,
234
+ applyLines.join("\n")
235
+ );
236
+ cssLineCache[ruleName] = cssLines;
237
+ macro[ruleName] = apply;
238
+ }
239
+
240
+ const base$2 = `
241
+ <style>
242
+ @keyframes hi{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}
243
+ circle{animation-name:hi;animation-iteration-count:infinite;animation-timing-function:linear;transform-origin:50% 50%;}
244
+ circle:nth-child(1){animation-duration:4s;}
245
+ circle:nth-child(2){animation-duration:3s;animation-direction:reverse;}
246
+ circle:nth-child(3){animation-duration:2s;}
247
+ </style>
248
+ <svg style="width:var(--size);height:var(--size)" viewBox="0 0 100 100"><circle stroke="var(--color)" cx="50" cy="50" stroke-width="4" fill="transparent" r="48" stroke-dasharray="0 37.7 75.4 75.4 75.4 75.4"/><circle stroke="var(--ripple-base-color)" cx="50" cy="50" stroke-width="4" fill="transparent" r="40" stroke-dasharray="0 31.4 62.83 62.83 62.83 62.83"/><circle stroke="var(--color)" cx="50" cy="50" stroke-width="4" fill="transparent" r="32" stroke-dasharray="0 12.57 25.13 25.13 25.13 25.13 25.13 25.13 25.13 25.13"/></svg>`;
249
+ const template$2 = document.createElement("template");
250
+ template$2.innerHTML = base$2;
251
+ customElements.define(
252
+ "ws-circle-spinner",
253
+ class WSHex extends HTMLElement {
254
+ constructor() {
255
+ super();
256
+
257
+ const root = template$2.content.cloneNode(true);
258
+ const shadow = this.attachShadow({ mode: "closed" });
259
+ shadow.appendChild(root);
260
+ }
261
+ }
262
+ );
263
+
264
+ const base$1 = `
265
+ <style>
266
+ @keyframes hi{from{transform:rotateY(0deg)}to{transform:rotateY(360deg)}}
267
+ path{animation-name:hi;animation-iteration-count:infinite;animation-timing-function:linear;transform-origin:50% 50%;}
268
+ path:nth-child(1){animation-duration:3s;}
269
+ path:nth-child(2){animation-duration:2s;animation-direction:reverse;}
270
+ path:nth-child(3){animation-duration:1s;}
271
+ </style><svg style="width: var(--size); height: var(--size);" viewBox="0 0 100 100"><path stroke="var(--color)" stroke-width="4" fill="none" d="M91.57 26v48L50 98 8.43 74V26L50 2l41.57 24Z"/><path stroke="var(--ripple-base-color)" stroke-width="4" fill="none" d="M81.177 32v36L50 86 18.823 68V32L50 14l31.177 18Z"/><path stroke="var(--color)" stroke-width="4" fill="none" d="M70.785 38v24L50 74 29.215 62V38L50 26l20.785 12Z"/></svg>`;
272
+ const template$1 = document.createElement("template");
273
+ template$1.innerHTML = base$1;
274
+ customElements.define(
275
+ "ws-hexagon-spinner",
276
+ class WSHex extends HTMLElement {
277
+ constructor() {
278
+ super();
279
+
280
+ const root = template$1.content.cloneNode(true);
281
+ const shadow = this.attachShadow({ mode: "closed" });
282
+ shadow.appendChild(root);
283
+ }
284
+ }
285
+ );
286
+
287
+ const base = `
288
+ <style>
289
+ @keyframes busy-load {
290
+ from {
291
+ transform: translateX(-100%);
292
+ }
293
+ to {
294
+ transform: translateX(400%);
295
+ }
296
+ }
297
+ :host {
298
+ display: block;
299
+ height: 8px;
300
+ border-radius: 4px;
301
+ background-color: var(--background-element);
302
+ position: relative;
303
+ overflow: hidden;
304
+ --color: var(--default);
305
+ --ripple-base-color: var(--default-ripple);
306
+ }
307
+ div::before, div::after {
308
+ content: "";
309
+ position: absolute;
310
+ top: 0px;
311
+ left: 0px;
312
+ height: 100%;
313
+ --range: calc(var(--max) - var(--min));
314
+ --bar-width: calc(100% * var(--value) / var(--range));
315
+ --buffer-width: calc(100% * var(--buffer) / var(--range));
316
+ }
317
+ div::before {
318
+ background-color: var(--color);
319
+ }
320
+ div::after {
321
+ background-color: var(--ripple-base-color);
322
+ }
323
+ :host(:not([busy])) div::before {
324
+ width: var(--bar-width);
325
+ }
326
+ :host(:not([busy])) div::after {
327
+ width: var(--buffer-width);
328
+ }
329
+ :host([busy]) div::before {
330
+ width: 25%;
331
+ animation-name: busy-load;
332
+ animation-iteration-count: infinite;
333
+ animation-duration: 2s;
334
+ }
335
+ </style>
336
+ <div></div>
337
+ `;
338
+ const template = document.createElement("template");
339
+ template.innerHTML = base;
340
+ customElements.define(
341
+ "ws-progress",
342
+ class WSProgress extends HTMLElement {
343
+ static observedAttributes = ["min", "max", "value", "buffer"]
344
+
345
+ constructor() {
346
+ super();
347
+
348
+ const root = template.content.cloneNode(true);
349
+ const shadow = this.attachShadow({ mode: "closed" });
350
+ shadow.appendChild(root);
351
+ this.core = shadow.querySelector("div");
352
+ }
353
+
354
+ get value() {
355
+ return parseFloat(this.getAttribute("value") ?? "0")
356
+ }
357
+ get buffer() {
358
+ return parseFloat(this.getAttribute("buffer") ?? "0")
359
+ }
360
+ get min() {
361
+ return parseFloat(this.getAttribute("min") ?? "0")
362
+ }
363
+ get max() {
364
+ return parseFloat(this.getAttribute("max") ?? "1")
365
+ }
366
+ get busy() {
367
+ return this.getAttribute("busy") !== null
368
+ }
369
+
370
+ set value(next) { this.setAttribute("value", next.toString()); }
371
+ set buffer(next) { this.setAttribute("buffer", next.toString()); }
372
+ set min(next) { this.setAttribute("min", next.toString()); }
373
+ set max(next) { this.setAttribute("max", next.toString()); }
374
+ set busy(next) { this.setAttribute("busy", next.toString()); }
375
+
376
+ #setSize(attr, defValue) {
377
+ this.core.style.setProperty(
378
+ `--${attr}`,
379
+ this.getAttribute(attr) || defValue
380
+ );
381
+ }
382
+
383
+ connectedCallback() {
384
+ this.#setSize("value", "0");
385
+ this.#setSize("buffer", "0");
386
+ this.#setSize("min", "0");
387
+ this.#setSize("max", "1");
388
+ }
389
+
390
+ attributeChangedCallback(name, prev, next) {
391
+ this.#setSize(name, next);
392
+ }
393
+ }
394
+ );
395
+
396
+ const formatPart = (key, value) => {
397
+ if (key.startsWith("@@") === true) {
398
+ if (value === true) {
399
+ return key
400
+ }
401
+ return `${key}:${value}`
402
+ }
403
+ if (value === true) {
404
+ return `[${key}]`
405
+ }
406
+ return `[${key} ${value}]`
407
+ };
408
+ /**
409
+ Takes an object and generates the ws-x string.
410
+ @param {{
411
+ [name: string]: string | string[] | null
412
+ }} obj
413
+ @return {string}
414
+ */
415
+ const x = (obj) =>
416
+ Object.entries(obj)
417
+ .reduce(
418
+ (list, [key, value]) => {
419
+ if (value === null || value === undefined || value === false) {
420
+ return list
421
+ }
422
+ list.push(
423
+ formatPart(key, value)
424
+ );
425
+ return list
426
+ },
427
+ []
428
+ )
429
+ .join(" ");
430
+
431
+ const styleCache = {};
432
+ const sizeLims = {
433
+ sm: "(max-width: 600px)",
434
+ md: "(max-width: 1024px)",
435
+ lg: "(min-width: 1025px)",
436
+ lnd: "(orientation: landscape)",
437
+ prt: "(orientation: portrait)",
438
+ };
439
+ const format = (value) => value?.replace(
440
+ /@([\w\-]+)/g,
441
+ (_, varName) => `var(--${varName})`
442
+ );
443
+ const sizer = (size, rule) => {
444
+ if (size === undefined) {
445
+ return rule
446
+ }
447
+ return `@media screen and ${sizeLims[size]} { ${rule} }`
448
+ };
449
+ const generateStyle = (key, name, args) => {
450
+ const cacheKey = `${args.size ?? ""}|${key}`;
451
+ if (styleCache[cacheKey] === true) {
452
+ return
453
+ }
454
+ styleMacro[name](args, sizer);
455
+ styleCache[cacheKey] = true;
456
+ };
457
+
458
+ const varCache = new WeakMap();
459
+ const processMacro = (attr, next, node) => {
460
+ const { name, state, arg, size } = attr.groups;
461
+ const key = `${name}${state ?? ""}`;
462
+
463
+ if (name.startsWith("@") === true) {
464
+ next.push([ `--${name.slice(1)}`, arg ]);
465
+ return
466
+ }
467
+ if (macro[name] === undefined) {
468
+ if (name.startsWith("$") === true) {
469
+ return
470
+ }
471
+ console.warn(`No macro defined for ${name} on`, node);
472
+ return
473
+ }
474
+
475
+ const varState = state?.replace(/:|\|/g, "_") ?? "";
476
+ generateStyle(
477
+ key,
478
+ name,
479
+ { sheet, state, varState, size }
480
+ );
481
+ macro[name]({
482
+ list: next,
483
+ format,
484
+ macro,
485
+ varState,
486
+ arg: arg?.trim(),
487
+ size,
488
+ });
489
+ };
490
+ const processNode = (node) => {
491
+ if (node.tagName === undefined) {
492
+ return
493
+ }
494
+ const attr = node.getAttribute(config.attr);
495
+ const funcs = attr?.matchAll(attrRegex) ?? [];
496
+
497
+ const prev = varCache.get(node) ?? [];
498
+ const next = [];
499
+ for (const match of funcs) {
500
+ processMacro(match, next, node);
501
+ }
502
+ const nextKeys = next.map(pair => pair[0]);
503
+ const remove = prev.filter(key => nextKeys.includes(key) === false);
504
+
505
+ for (const key of remove) {
506
+ node.style.removeProperty(key);
507
+ }
508
+ for (const [key, value] of next) {
509
+ node.style.setProperty(key, value);
510
+ }
511
+ varCache.set(node, nextKeys);
512
+ };
513
+ // This horrible regex parses each macro inside of an attribute string with the
514
+ // advantage that any incorrectly formatted macro is ignored instead of causing
515
+ // errors to fill the console.
516
+ const attrRegex = /\[((?<size>\w+)\|)?(?<name>[\$@\w\-\.]+)(?<state>:[^\s\]]+)?(?<arg>[^\]]+?)?\]/g;
517
+ const mut = {
518
+ childList(evt) {
519
+ if (evt.addedNodes.length === 0) {
520
+ return
521
+ }
522
+ evt.addedNodes.forEach(
523
+ (node) => {
524
+ if (node.tagName === undefined) {
525
+ return
526
+ }
527
+ const nodes = [node, ...node.querySelectorAll("*")];
528
+ nodes.forEach(processNode);
529
+ }
530
+ );
531
+ },
532
+ attributes(evt) {
533
+ processNode(evt.target);
534
+ }
535
+ };
536
+ // MutationObserver is quite fast even over the whole DOM tree.
537
+ const observer = new MutationObserver(
538
+ (muts) => muts.forEach(
539
+ evt => mut[evt.type](evt)
540
+ )
541
+ );
542
+
543
+ observer.observe(
544
+ document.body,
545
+ {
546
+ subtree: true,
547
+ attributes: true,
548
+ childList: true,
549
+ attributeFilter: [config.attr]
550
+ }
551
+ );
552
+ // Set of nodes that already exists in the DOM that should be processed. Any
553
+ // DOM element that was loaded before the script isn't caught by the
554
+ // MutationObserver. Ignores anything outside the body.
555
+ const initialNodes = [
556
+ document.body,
557
+ ...document.body.querySelectorAll("*")
558
+ ];
559
+ initialNodes.forEach(processNode);
560
+
561
+ var main = {
562
+ x,
563
+ attr: config.attr
564
+ };
565
+
566
+ return main;
567
+
568
+ })();