@e280/shiny 0.1.0-10 → 0.1.0-12
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/README.md +13 -8
- package/package.json +3 -3
- package/s/components/button/component.ts +30 -0
- package/s/components/button/showcase.ts +119 -0
- package/s/components/button/style.css.ts +63 -0
- package/s/components/copy/component.ts +3 -1
- package/s/components/copy/showcase.ts +51 -0
- package/s/components/drawer/component.ts +30 -32
- package/s/components/drawer/showcase.ts +93 -0
- package/s/components/drawer/style.css.ts +9 -4
- package/s/components/raw-components.ts +2 -0
- package/s/components/tabs/component.ts +13 -2
- package/s/components/tabs/control.ts +3 -3
- package/s/components/tabs/showcase.ts +73 -0
- package/s/components/tabs/style.css.ts +38 -1
- package/s/demo/demo.bundle.ts +14 -199
- package/s/demo/demo.css +1 -0
- package/s/demo/lipsum.ts +6 -0
- package/s/demo/utils/lipsum.ts +1 -1
- package/s/demo/views/demonstration/style.css.ts +8 -0
- package/s/demo/views/demonstration/view.ts +10 -6
- package/s/demo/views/exhibit/style.css.ts +82 -0
- package/s/demo/views/exhibit/view.ts +59 -0
- package/s/demo/views/showcase/style.css.ts +50 -0
- package/s/demo/views/showcase/view.ts +54 -0
- package/s/demo/viewsets.ts +12 -0
- package/s/index.html.ts +4 -7
- package/s/themes/aura.css.ts +52 -14
- package/s/themes/infra/css-vars.ts +19 -6
- package/s/themes/plain.css.ts +0 -1
- package/x/components/button/component.d.ts +6 -0
- package/x/components/button/component.js +25 -0
- package/x/components/button/component.js.map +1 -0
- package/x/components/button/showcase.d.ts +1 -0
- package/x/components/button/showcase.js +116 -0
- package/x/components/button/showcase.js.map +1 -0
- package/x/components/button/style.css.d.ts +2 -0
- package/x/components/button/style.css.js +62 -0
- package/x/components/button/style.css.js.map +1 -0
- package/x/components/copy/component.d.ts +2 -2
- package/x/components/copy/component.js +3 -1
- package/x/components/copy/component.js.map +1 -1
- package/x/components/copy/showcase.d.ts +1 -0
- package/x/components/copy/showcase.js +48 -0
- package/x/components/copy/showcase.js.map +1 -0
- package/x/components/drawer/component.d.ts +3 -3
- package/x/components/drawer/component.js +28 -31
- package/x/components/drawer/component.js.map +1 -1
- package/x/components/drawer/showcase.d.ts +1 -0
- package/x/components/drawer/showcase.js +87 -0
- package/x/components/drawer/showcase.js.map +1 -0
- package/x/components/drawer/style.css.js +9 -4
- package/x/components/drawer/style.css.js.map +1 -1
- package/x/components/example/component.d.ts +1 -1
- package/x/components/raw-components.d.ts +2 -0
- package/x/components/raw-components.js +2 -0
- package/x/components/raw-components.js.map +1 -1
- package/x/components/tabs/component.d.ts +1 -1
- package/x/components/tabs/component.js +13 -2
- package/x/components/tabs/component.js.map +1 -1
- package/x/components/tabs/control.d.ts +1 -1
- package/x/components/tabs/control.js +3 -3
- package/x/components/tabs/control.js.map +1 -1
- package/x/components/tabs/showcase.d.ts +1 -0
- package/x/components/tabs/showcase.js +69 -0
- package/x/components/tabs/showcase.js.map +1 -0
- package/x/components/tabs/style.css.js +38 -1
- package/x/components/tabs/style.css.js.map +1 -1
- package/x/demo/demo.bundle.js +14 -193
- package/x/demo/demo.bundle.js.map +1 -1
- package/x/demo/demo.bundle.min.js +497 -311
- package/x/demo/demo.bundle.min.js.map +4 -4
- package/x/demo/demo.css +1 -0
- package/x/demo/lipsum.d.ts +2 -0
- package/x/demo/lipsum.js +4 -0
- package/x/demo/lipsum.js.map +1 -0
- package/x/demo/utils/lipsum.js +1 -1
- package/x/demo/views/demonstration/style.css.js +8 -0
- package/x/demo/views/demonstration/style.css.js.map +1 -1
- package/x/demo/views/demonstration/view.js +8 -6
- package/x/demo/views/demonstration/view.js.map +1 -1
- package/x/demo/views/exhibit/style.css.d.ts +2 -0
- package/x/demo/views/exhibit/style.css.js +81 -0
- package/x/demo/views/exhibit/style.css.js.map +1 -0
- package/x/demo/views/exhibit/view.d.ts +29 -0
- package/x/demo/views/exhibit/view.js +38 -0
- package/x/demo/views/exhibit/view.js.map +1 -0
- package/x/demo/views/showcase/style.css.d.ts +2 -0
- package/x/demo/views/showcase/style.css.js +49 -0
- package/x/demo/views/showcase/style.css.js.map +1 -0
- package/x/demo/views/showcase/view.d.ts +7 -0
- package/x/demo/views/showcase/view.js +40 -0
- package/x/demo/views/showcase/view.js.map +1 -0
- package/x/demo/{aura-views.d.ts → viewsets.d.ts} +5 -2
- package/x/demo/viewsets.js +9 -0
- package/x/demo/viewsets.js.map +1 -0
- package/x/index.html +5 -4
- package/x/index.html.js +4 -7
- package/x/index.html.js.map +1 -1
- package/x/install/aura.bundle.min.js +210 -65
- package/x/install/aura.bundle.min.js.map +4 -4
- package/x/install/plain.bundle.min.js +159 -53
- package/x/install/plain.bundle.min.js.map +4 -4
- package/x/shiny.d.ts +8 -3
- package/x/themes/aura.css.js +52 -14
- package/x/themes/aura.css.js.map +1 -1
- package/x/themes/infra/css-vars.d.ts +6 -2
- package/x/themes/infra/css-vars.js +7 -3
- package/x/themes/infra/css-vars.js.map +1 -1
- package/x/themes/plain.css.js +0 -1
- package/x/themes/plain.css.js.map +1 -1
- package/s/demo/aura-views.ts +0 -6
- package/x/demo/aura-views.js +0 -4
- package/x/demo/aura-views.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var wt=globalThis,vt=wt.ShadowRoot&&(wt.ShadyCSS===void 0||wt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,
|
|
2
|
-
\f\r]`,
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
1
|
+
var wt=globalThis,vt=wt.ShadowRoot&&(wt.ShadyCSS===void 0||wt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,oe=Symbol(),$e=new WeakMap,it=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==oe)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(vt&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=$e.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&$e.set(e,t))}return t}toString(){return this.cssText}},$t=r=>new it(typeof r=="string"?r:r+"",void 0,oe),p=(r,...t)=>{let e=r.length===1?r[0]:t.reduce(((s,o,i)=>s+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+r[i+1]),r[0]);return new it(e,r,oe)},_t=(r,t)=>{if(vt)r.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(let e of t){let s=document.createElement("style"),o=wt.litNonce;o!==void 0&&s.setAttribute("nonce",o),s.textContent=e.cssText,r.appendChild(s)}},W=vt?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return $t(e)})(r):r;var{is:kr,defineProperty:Cr,getOwnPropertyDescriptor:Er,getOwnPropertyNames:Tr,getOwnPropertySymbols:zr,getPrototypeOf:Pr}=Object,At=globalThis,_e=At.trustedTypes,Or=_e?_e.emptyScript:"",Rr=At.reactiveElementPolyfillSupport,nt=(r,t)=>r,ie={toAttribute(r,t){switch(t){case Boolean:r=r?Or:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},Se=(r,t)=>!kr(r,t),Ae={attribute:!0,type:String,converter:ie,reflect:!1,useDefault:!1,hasChanged:Se};Symbol.metadata??=Symbol("metadata"),At.litPropertyMetadata??=new WeakMap;var z=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Ae){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),o=this.getPropertyDescriptor(t,s,e);o!==void 0&&Cr(this.prototype,t,o)}}static getPropertyDescriptor(t,e,s){let{get:o,set:i}=Er(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get:o,set(n){let l=o?.call(this);i?.call(this,n),this.requestUpdate(t,l,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Ae}static _$Ei(){if(this.hasOwnProperty(nt("elementProperties")))return;let t=Pr(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(nt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(nt("properties"))){let e=this.properties,s=[...Tr(e),...zr(e)];for(let o of s)this.createProperty(o,e[o])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,o]of e)this.elementProperties.set(s,o)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let o=this._$Eu(e,s);o!==void 0&&this._$Eh.set(o,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let o of s)e.unshift(W(o))}else t!==void 0&&e.push(W(t));return e}static _$Eu(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return _t(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){let s=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,s);if(o!==void 0&&s.reflect===!0){let i=(s.converter?.toAttribute!==void 0?s.converter:ie).toAttribute(e,s.type);this._$Em=t,i==null?this.removeAttribute(o):this.setAttribute(o,i),this._$Em=null}}_$AK(t,e){let s=this.constructor,o=s._$Eh.get(t);if(o!==void 0&&this._$Em!==o){let i=s.getPropertyOptions(o),n=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:ie;this._$Em=o;let l=n.fromAttribute(e,i.type);this[o]=l??this._$Ej?.get(o)??l,this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){let o=this.constructor,i=this[t];if(s??=o.getPropertyOptions(t),!((s.hasChanged??Se)(i,e)||s.useDefault&&s.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:o,wrapped:i},n){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??e??this[t]),i!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),o===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[o,i]of this._$Ep)this[o]=i;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[o,i]of s){let{wrapped:n}=i,l=this[o];n!==!0||this._$AL.has(o)||l===void 0||this.C(o,void 0,i,l)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((s=>s.hostUpdate?.())),this.update(e)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((e=>this._$ET(e,this[e]))),this._$EM()}updated(t){}firstUpdated(t){}};z.elementStyles=[],z.shadowRootOptions={mode:"open"},z[nt("elementProperties")]=new Map,z[nt("finalized")]=new Map,Rr?.({ReactiveElement:z}),(At.reactiveElementVersions??=[]).push("2.1.1");var ae=globalThis,St=ae.trustedTypes,ke=St?St.createPolicy("lit-html",{createHTML:r=>r}):void 0,le="$lit$",P=`lit$${Math.random().toFixed(9).slice(2)}$`,ce="?"+P,Mr=`<${ce}>`,D=document,lt=()=>D.createComment(""),ct=r=>r===null||typeof r!="object"&&typeof r!="function",pe=Array.isArray,Oe=r=>pe(r)||typeof r?.[Symbol.iterator]=="function",ne=`[
|
|
2
|
+
\f\r]`,at=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ce=/-->/g,Ee=/>/g,U=RegExp(`>|${ne}(?:([^\\s"'>=/]+)(${ne}*=${ne}*(?:[^
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Te=/'/g,ze=/"/g,Re=/^(?:script|style|textarea|title)$/i,he=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),h=he(1),C=he(2),us=he(3),q=Symbol.for("lit-noChange"),x=Symbol.for("lit-nothing"),Pe=new WeakMap,j=D.createTreeWalker(D,129);function Me(r,t){if(!pe(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return ke!==void 0?ke.createHTML(t):t}var Be=(r,t)=>{let e=r.length-1,s=[],o,i=t===2?"<svg>":t===3?"<math>":"",n=at;for(let l=0;l<e;l++){let a=r[l],d,b,c=-1,g=0;for(;g<a.length&&(n.lastIndex=g,b=n.exec(a),b!==null);)g=n.lastIndex,n===at?b[1]==="!--"?n=Ce:b[1]!==void 0?n=Ee:b[2]!==void 0?(Re.test(b[2])&&(o=RegExp("</"+b[2],"g")),n=U):b[3]!==void 0&&(n=U):n===U?b[0]===">"?(n=o??at,c=-1):b[1]===void 0?c=-2:(c=n.lastIndex-b[2].length,d=b[1],n=b[3]===void 0?U:b[3]==='"'?ze:Te):n===ze||n===Te?n=U:n===Ce||n===Ee?n=at:(n=U,o=void 0);let v=n===U&&r[l+1].startsWith("/>")?" ":"";i+=n===at?a+Mr:c>=0?(s.push(d),a.slice(0,c)+le+a.slice(c)+P+v):a+P+(c===-2?l:v)}return[Me(r,i+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},pt=class r{constructor({strings:t,_$litType$:e},s){let o;this.parts=[];let i=0,n=0,l=t.length-1,a=this.parts,[d,b]=Be(t,e);if(this.el=r.createElement(d,s),j.currentNode=this.el.content,e===2||e===3){let c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(o=j.nextNode())!==null&&a.length<l;){if(o.nodeType===1){if(o.hasAttributes())for(let c of o.getAttributeNames())if(c.endsWith(le)){let g=b[n++],v=o.getAttribute(c).split(P),k=/([.?@])?(.*)/.exec(g);a.push({type:1,index:i,name:k[2],strings:v,ctor:k[1]==="."?Ct:k[1]==="?"?Et:k[1]==="@"?Tt:V}),o.removeAttribute(c)}else c.startsWith(P)&&(a.push({type:6,index:i}),o.removeAttribute(c));if(Re.test(o.tagName)){let c=o.textContent.split(P),g=c.length-1;if(g>0){o.textContent=St?St.emptyScript:"";for(let v=0;v<g;v++)o.append(c[v],lt()),j.nextNode(),a.push({type:2,index:++i});o.append(c[g],lt())}}}else if(o.nodeType===8)if(o.data===ce)a.push({type:2,index:i});else{let c=-1;for(;(c=o.data.indexOf(P,c+1))!==-1;)a.push({type:7,index:i}),c+=P.length-1}i++}}static createElement(t,e){let s=D.createElement("template");return s.innerHTML=t,s}};function L(r,t,e=r,s){if(t===q)return t;let o=s!==void 0?e._$Co?.[s]:e._$Cl,i=ct(t)?void 0:t._$litDirective$;return o?.constructor!==i&&(o?._$AO?.(!1),i===void 0?o=void 0:(o=new i(r),o._$AT(r,e,s)),s!==void 0?(e._$Co??=[])[s]=o:e._$Cl=o),o!==void 0&&(t=L(r,o._$AS(r,t.values),o,s)),t}var kt=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:s}=this._$AD,o=(t?.creationScope??D).importNode(e,!0);j.currentNode=o;let i=j.nextNode(),n=0,l=0,a=s[0];for(;a!==void 0;){if(n===a.index){let d;a.type===2?d=new F(i,i.nextSibling,this,t):a.type===1?d=new a.ctor(i,a.name,a.strings,this,t):a.type===6&&(d=new zt(i,this,t)),this._$AV.push(d),a=s[++l]}n!==a?.index&&(i=j.nextNode(),n++)}return j.currentNode=D,o}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},F=class r{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,o){this.type=2,this._$AH=x,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=o,this._$Cv=o?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=L(this,t,e),ct(t)?t===x||t==null||t===""?(this._$AH!==x&&this._$AR(),this._$AH=x):t!==this._$AH&&t!==q&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Oe(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==x&&ct(this._$AH)?this._$AA.nextSibling.data=t:this.T(D.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:s}=t,o=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=pt.createElement(Me(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===o)this._$AH.p(e);else{let i=new kt(o,this),n=i.u(this.options);i.p(e),this.T(n),this._$AH=i}}_$AC(t){let e=Pe.get(t.strings);return e===void 0&&Pe.set(t.strings,e=new pt(t)),e}k(t){pe(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,o=0;for(let i of t)o===e.length?e.push(s=new r(this.O(lt()),this.O(lt()),this,this.options)):s=e[o],s._$AI(i),o++;o<e.length&&(this._$AR(s&&s._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let s=t.nextSibling;t.remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},V=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,o,i){this.type=1,this._$AH=x,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=i,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=x}_$AI(t,e=this,s,o){let i=this.strings,n=!1;if(i===void 0)t=L(this,t,e,0),n=!ct(t)||t!==this._$AH&&t!==q,n&&(this._$AH=t);else{let l=t,a,d;for(t=i[0],a=0;a<i.length-1;a++)d=L(this,l[s+a],e,a),d===q&&(d=this._$AH[a]),n||=!ct(d)||d!==this._$AH[a],d===x?t=x:t!==x&&(t+=(d??"")+i[a+1]),this._$AH[a]=d}n&&!o&&this.j(t)}j(t){t===x?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},Ct=class extends V{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===x?void 0:t}},Et=class extends V{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==x)}},Tt=class extends V{constructor(t,e,s,o,i){super(t,e,s,o,i),this.type=5}_$AI(t,e=this){if((t=L(this,t,e,0)??x)===q)return;let s=this._$AH,o=t===x&&s!==x||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,i=t!==x&&(s===x||o);o&&this.element.removeEventListener(this.name,this,s),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},zt=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){L(this,t)}},Ne={M:le,P,A:ce,C:1,L:Be,R:kt,D:Oe,V:L,I:F,H:V,N:Et,U:Tt,B:Ct,F:zt},Br=ae.litHtmlPolyfillSupport;Br?.(pt,F),(ae.litHtmlVersions??=[]).push("3.3.1");var ht=(r,t,e)=>{let s=e?.renderBefore??t,o=s._$litPart$;if(o===void 0){let i=e?.renderBefore??null;s._$litPart$=o=new F(t.insertBefore(lt(),i),i,void 0,e??{})}return o._$AI(r),o};var de=globalThis,X=class extends z{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=ht(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return q}};X._$litElement$=!0,X.finalized=!0,de.litElementHydrateSupport?.({LitElement:X});var Nr=de.litElementPolyfillSupport;Nr?.({LitElement:X});(de.litElementVersions??=[]).push("4.2.1");var Y=p`
|
|
4
4
|
@layer reset {
|
|
5
5
|
* {
|
|
6
6
|
margin: 0;
|
|
@@ -16,19 +16,227 @@ var wt=globalThis,vt=wt.ShadowRoot&&(wt.ShadyCSS===void 0||wt.ShadyCSS.nativeSha
|
|
|
16
16
|
::-webkit-scrollbar-thumb { background: #333; border-radius: 1em; }
|
|
17
17
|
::-webkit-scrollbar-thumb:hover { background: #444; }
|
|
18
18
|
}
|
|
19
|
-
`;function
|
|
20
|
-
`)}function Cr(r,t,e){e==null?r.removeAttribute(t):typeof e=="string"?r.setAttribute(t,e):typeof e=="number"?r.setAttribute(t,e.toString()):typeof e=="boolean"?e===!0?r.setAttribute(t,""):r.removeAttribute(t):console.warn(`invalid attribute "${t}" type is "${typeof e}"`)}function Mt(r,t){for(let[e,s]of t)Cr(r,e,s)}function Le(r,t){let e=document.createElement(r);return Mt(e,Object.entries(t)),e}function qe(r,t){let e=new MutationObserver(t);return e.observe(r,{attributes:!0}),()=>e.disconnect()}var v={get:{string:(r,t)=>r.getAttribute(t)??void 0,number:(r,t)=>{let e=r.getAttribute(t);return e===null||!e?void 0:Number(e)},boolean:(r,t)=>r.getAttribute(t)!==null},set:{string:(r,t,e)=>(e===void 0?r.removeAttribute(t):r.setAttribute(t,e),!0),number:(r,t,e)=>(e===void 0?r.removeAttribute(t):r.setAttribute(t,e.toString()),!0),boolean:(r,t,e)=>(e?r.setAttribute(t,""):r.removeAttribute(t),!0)}};var Be=(r,t)=>new Proxy(t,{get:(e,s)=>{switch(t[s]){case String:return v.get.string(r,s);case Number:return v.get.number(r,s);case Boolean:return v.get.boolean(r,s);default:throw new Error(`invalid attribute type for "${s}"`)}},set:(e,s,o)=>{switch(t[s]){case String:return v.set.string(r,s,o);case Number:return v.set.number(r,s,o);case Boolean:return v.set.boolean(r,s,o);default:throw new Error(`invalid attribute type for "${s}"`)}}});var Ht=class{element;constructor(t){this.element=t}strings=new Proxy({},{get:(t,e)=>v.get.string(this.element,e),set:(t,e,s)=>v.set.string(this.element,e,s)});numbers=new Proxy({},{get:(t,e)=>v.get.number(this.element,e),set:(t,e,s)=>v.set.number(this.element,e,s)});booleans=new Proxy({},{get:(t,e)=>v.get.boolean(this.element,e),set:(t,e,s)=>v.set.boolean(this.element,e,s)})};function ut(r){let t=new Ht(r);return{strings:t.strings,numbers:t.numbers,booleans:t.booleans,on:e=>qe(r,e),spec:e=>Be(r,e)}}ut.get=v.get;ut.set=v.set;function fe(r,t){let e=[];for(let[s,o]of Object.entries(t))if(typeof o=="function")r.addEventListener(s,o),e.push(()=>r.removeEventListener(s,o));else{let[i,n]=o;r.addEventListener(s,n,i),e.push(()=>r.removeEventListener(s,n))}return()=>e.forEach(s=>s())}function Ve(r){return r.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}function Ie(r,t={}){let{soft:e=!1,upgrade:s=!0}=t;for(let[o,i]of Object.entries(r)){let n=Ve(o),l=customElements.get(n);e&&l||(customElements.define(n,i),s&&document.querySelectorAll(n).forEach(a=>{a.constructor===HTMLElement&&customElements.upgrade(a)}))}}function We(r,t){let e=r.querySelector(t);if(!e)throw new Error(`element not found (${t})`);return e}var Nt=class r{element;constructor(t){this.element=t}in(t){return new r(typeof t=="string"?We(this.element,t):t)}require(t){let e=this.element.querySelector(t);if(!e)throw new Error(`element not found (${t})`);return e}maybe(t){return this.element.querySelector(t)}all(t){return Array.from(this.element.querySelectorAll(t))}render(...t){return pt(t,this.element)}attrs(){return ut(this.element)}events(t){return fe(this.element,t)}};function p(r){return typeof r=="string"?We(document,r):new Nt(r)}var O=new Nt(document);p.in=O.in.bind(O);p.require=O.require.bind(O);p.maybe=O.maybe.bind(O);p.all=O.all.bind(O);p.el=Le;p.events=fe;p.attrs=ut;p.register=Ie;p.render=(r,...t)=>pt(t,r);var ge=class{#t=[];#e=new WeakMap;#r=[];#s=new Set;notifyRead(t){this.#t.at(-1)?.add(t)}async notifyWrite(t){if(this.#s.has(t))throw new Error("circularity forbidden");let e=this.#o(t).pub();return this.#r.at(-1)?.add(e),e}observe(t){this.#t.push(new Set);let e=t();return{seen:this.#t.pop(),result:e}}subscribe(t,e){return this.#o(t)(async()=>{let s=new Set;this.#r.push(s),this.#s.add(t),s.add(e()),this.#s.delete(t),await Promise.all(s),this.#r.pop()})}#o(t){let e=this.#e.get(t);return e||(e=zt(),this.#e.set(t,e)),e}},$=globalThis[Symbol.for("e280.tracker")]??=new ge;var X=class{sneak;constructor(t){this.sneak=t}get(){return $.notifyRead(this),this.sneak}get value(){return this.get()}};var Y=class extends X{on=zt();dispose(){this.on.clear()}};function Ut(r,t=r){let{seen:e,result:s}=$.observe(r),o=P(0,t),i=[],n=()=>i.forEach(l=>l());for(let l of e){let a=$.subscribe(l,o);i.push(a)}return{result:s,dispose:n}}function Z(r,t){return r===t}var jt=class extends Y{#t;constructor(t,e){let s=e?.compare??Z,{result:o,dispose:i}=Ut(t,async()=>{let n=t();!s(this.sneak,n)&&(this.sneak=n,await Promise.all([$.notifyWrite(this),this.on.pub(n)]))});super(o),this.#t=i}toString(){return`(derived "${String(this.get())}")`}dispose(){super.dispose(),this.#t()}get core(){return this}fn(){let t=this;function e(){return t.get()}return e.core=t,e.get=t.get.bind(t),e.on=t.on,e.dispose=t.dispose.bind(t),e.fn=t.fn.bind(t),Object.defineProperty(e,"value",{get:()=>t.value}),Object.defineProperty(e,"sneak",{get:()=>t.sneak}),e}};var Dt=class extends X{#t;#e;#r=!1;#s;constructor(t,e){super(void 0),this.#t=t,this.#e=e?.compare??Z}toString(){return`($lazy "${String(this.get())}")`}get(){if(!this.#s){let{result:t,dispose:e}=Ut(this.#t,()=>this.#r=!0);this.#s=e,this.sneak=t}if(this.#r){this.#r=!1;let t=this.#t();!this.#e(this.sneak,t)&&(this.sneak=t,$.notifyWrite(this))}return super.get()}dispose(){this.#s&&this.#s()}get core(){return this}fn(){let t=this;function e(){return t.get()}return e.core=t,e.get=t.get.bind(t),e.dispose=t.dispose.bind(t),e.fn=t.fn.bind(t),Object.defineProperty(e,"value",{get:()=>t.value}),Object.defineProperty(e,"sneak",{get:()=>t.sneak}),e}};var Lt=class extends Y{#t=!1;#e;constructor(t,e){super(t),this.#e=e?.compare??Z}toString(){return`($signal "${String(this.get())}")`}async set(t,e=!1){let s=this.sneak;return this.sneak=t,(e||!this.#e(s,t))&&await this.publish(),t}get value(){return this.get()}set value(t){this.set(t)}async publish(){if(this.#t)throw new Error("forbid circularity");let t=this.sneak,e=Promise.resolve();try{this.#t=!0,e=Promise.all([$.notifyWrite(this),this.on.publish(t)])}finally{this.#t=!1}return await e,t}get core(){return this}fn(){let t=this;function e(s){return arguments.length===0?t.get():t.set(arguments[0])}return e.core=t,e.get=t.get.bind(t),e.set=t.set.bind(t),e.on=t.on,e.dispose=t.dispose.bind(t),e.publish=t.publish.bind(t),e.fn=t.fn.bind(t),Object.defineProperty(e,"value",{get:()=>t.value,set:s=>t.value=s}),Object.defineProperty(e,"sneak",{get:()=>t.sneak,set:s=>t.sneak=s}),e}};function Tr(r,t){return new Dt(r,t).fn()}function Fe(r,t){return new jt(r,t).fn()}function w(r,t){return new Lt(r,t).fn()}w.lazy=Tr;w.derived=Fe;var R=class{#t=new F;effect(t,e){let{seen:s,result:o}=$.observe(t);for(let i of s)this.#t.guarantee(i,()=>$.subscribe(i,e));for(let[i,n]of this.#t)s.has(i)||(n(),this.#t.delete(i));return o}clear(){for(let t of this.#t.values())t();this.#t.clear()}};var J=class{element;response;#t;constructor(t,e){this.element=t,this.response=e}start(){this.#t||(this.#t=p.attrs(this.element).on(this.response))}stop(){this.#t&&this.#t(),this.#t=void 0}};function qt(r,t){_t(r,Or(t))}function Or(r){let t=[];if(Array.isArray(r)){let e=new Set(r.flat(1/0).reverse());for(let s of e)t.unshift(B(s))}else r!==void 0&&t.push(B(r));return t}var L={status:r=>r[0],value:r=>r[0]==="ready"?r[1]:void 0,error:r=>r[0]==="error"?r[1]:void 0,select:(r,t)=>{switch(r[0]){case"loading":return t.loading();case"error":return t.error(r[1]);case"ready":return t.ready(r[1]);default:throw new Error("unknown op status")}},morph:(r,t)=>L.select(r,{loading:()=>["loading"],error:e=>["error",e],ready:e=>["ready",t(e)]}),all:(...r)=>{let t=[],e=[],s=0;for(let o of r)switch(o[0]){case"loading":s++;break;case"ready":t.push(o[1]);break;case"error":e.push(o[1]);break}return e.length>0?["error",e]:s===0?["ready",t]:["loading"]}};var K=class{static loading(){return new this}static ready(t){return new this(["ready",t])}static error(t){return new this(["error",t])}static promise(t){let e=new this;return e.promise(t),e}static load(t){return this.promise(t())}static all(...t){let e=t.map(s=>s.pod);return L.all(...e)}signal;#t=0;#e=me();#r=me();constructor(t=["loading"]){this.signal=w(t)}get wait(){return new Promise((t,e)=>{this.#e.next().then(([s])=>t(s)),this.#r.next().then(([s])=>e(s))})}get then(){return this.wait.then.bind(this.wait)}get catch(){return this.wait.catch.bind(this.wait)}get finally(){return this.wait.finally.bind(this.wait)}async setLoading(){await this.signal.set(["loading"])}async setReady(t){await this.signal.set(["ready",t]),await this.#e(t)}async setError(t){await this.signal.set(["error",t]),await this.#r(t)}async promise(t){let e=++this.#t;await this.setLoading();try{let s=await t;return e===this.#t&&await this.setReady(s),s}catch(s){console.error(s),e===this.#t&&await this.setError(s)}}async load(t){return this.promise(t())}get pod(){return this.signal.get()}set pod(t){this.signal.set(t)}get status(){return this.signal.get()[0]}get value(){return L.value(this.signal.get())}get error(){return L.error(this.signal.get())}get isLoading(){return this.status==="loading"}get isReady(){return this.status==="ready"}get isError(){return this.status==="error"}require(){let t=this.signal.get();if(t[0]!=="ready")throw new Error("required value not ready");return t[1]}select(t){return L.select(this.signal.get(),t)}morph(t){return L.morph(this.pod,t)}};var Bt=class{#t=[];#e=[];mount(t){this.#t.push(t),this.#e.push(t())}unmountAll(){for(let t of this.#e)t();this.#e=[]}remountAll(){for(let t of this.#t)this.#e.push(t())}};var Vt=class{#t;#e;constructor(t){this.#t=t,this.#e=p.attrs(t.element)}get strings(){return this.#e.strings}get numbers(){return this.#e.numbers}get booleans(){return this.#e.booleans}spec(t){return this.#t.once(()=>this.#e.spec(t))}on(t){return this.#t.mount(()=>this.#e.on(t))}};var dt=Symbol(),mt=Symbol(),ft=Symbol(),Q=class{element;shadow;renderNow;render;attrs;#t=0;#e=0;#r=new F;#s=ht();#o=new Bt;[dt](t){this.#t++,this.#e=0,this.#s=ht();let e=t();return this.#s.resolve(),e}[mt](){this.#o.unmountAll()}[ft](){this.#o.remountAll()}constructor(t,e,s,o){this.element=t,this.shadow=e,this.renderNow=s,this.render=o,this.attrs=new Vt(this)}get renderCount(){return this.#t}get rendered(){return this.#s.promise}name(t){this.once(()=>this.element.setAttribute("view",t))}styles(...t){this.once(()=>qt(this.shadow,t))}css(...t){return this.styles(...t)}once(t){return this.#r.guarantee(this.#e++,t)}mount(t){return this.once(()=>this.#o.mount(t))}life(t){let e;return this.mount(()=>{let[s,o]=t();return e=s,o}),e}wake(t){return this.life(()=>[t(),()=>{}])}op=(()=>{let t=this;function e(s){return t.once(()=>K.load(s))}return e.load=e,e.promise=s=>this.once(()=>K.promise(s)),e})();signal=(()=>{let t=this;function e(s,o){return t.once(()=>w(s,o))}return e.derived=function(o,i){return t.once(()=>w.derived(o,i))},e.lazy=function(o,i){return t.once(()=>w.lazy(o,i))},e})();derived(t,e){return this.once(()=>w.derived(t,e))}lazy(t,e){return this.once(()=>w.lazy(t,e))}};var z=class extends HTMLElement{static styles;shadow;#t;#e=0;#r=new R;#s=new J(this,()=>this.update());createShadow(){return this.attachShadow({mode:"open"})}constructor(){super(),this.shadow=this.createShadow(),this.#t=new Q(this,this.shadow,this.updateNow,this.update)}render(t){}updateNow=()=>{this.#t[dt](()=>{p.render(this.shadow,this.#r.effect(()=>this.render(this.#t),this.update))})};update=P(0,this.updateNow);connectedCallback(){if(this.#e===0){let t=this.constructor.styles;t&&qt(this.shadow,t),this.updateNow()}else this.#t[ft]();this.#s.start(),this.#e++}disconnectedCallback(){this.#t[mt](),this.#r.clear(),this.#s.stop()}};var It=class{#t;#e;constructor(t,e){this.#e=t,this.#t=e}attr(t,e){return this.#e.attrs.set(t,e),this}children(...t){return this.#e.children.push(...t),this}render(){return this.#t(this.#e)}};var gt=class{props;attrs=new Map;children=[];constructor(t){this.props=t}};function Xe(r,t,e,s){return class extends t{static view=G(s,r);#t=new R;createShadow(){return this.attachShadow(r)}render(i){return s(i)(...this.#t.effect(()=>e(this),()=>this.update()))}}}var{I:rn}=ze;var Ye=r=>r.strings===void 0;var Ze={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},be=r=>(...t)=>({_$litDirective$:r,values:t}),Wt=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var bt=(r,t)=>{let e=r._$AN;if(e===void 0)return!1;for(let s of e)s._$AO?.(t,!1),bt(s,t);return!0},Ft=r=>{let t,e;do{if((t=r._$AM)===void 0)break;e=t._$AN,e.delete(r),r=t}while(e?.size===0)},Je=r=>{for(let t;t=r._$AM;r=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(r))break;e.add(r),Mr(t)}};function Rr(r){this._$AN!==void 0?(Ft(this),this._$AM=r,Je(this)):this._$AM=r}function zr(r,t=!1,e=0){let s=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(t)if(Array.isArray(s))for(let i=e;i<s.length;i++)bt(s[i],!1),Ft(s[i]);else s!=null&&(bt(s,!1),Ft(s));else bt(this,r)}var Mr=r=>{r.type==Ze.CHILD&&(r._$AP??=zr,r._$AQ??=Rr)},Xt=class extends Wt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),Je(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(bt(this,t),Ft(this))}setValue(t){if(Ye(this._$Ct))this._$Ct._$AI(t,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var Yt=class r extends HTMLElement{static#t=!1;static make(){return this.#t||(p.register({SlyView:r},{soft:!0,upgrade:!0}),this.#t=!0),document.createElement("sly-view")}};var Zt=class{viewFn;settings;#t=Yt.make();#e=new R;#r;#s;#o;#i=new J(this.#t,()=>this.#a());constructor(t,e){this.viewFn=t,this.settings=e,this.#s=this.#t.attachShadow(this.settings),this.#r=new Q(this.#t,this.#s,this.#n,this.#a)}update(t){return this.#o=t,this.#n(),this.#t}#n=()=>{this.#r[dt](()=>{let t=this.#e.effect(()=>this.viewFn(this.#r)(...this.#o.props),()=>this.#a());Mt(this.#t,[...this.#o.attrs]),p.render(this.#s,t),p.render(this.#t,this.#o.children),this.#i.start()})};#a=P(0,this.#n);disconnected(){this.#r[mt](),this.#e.clear(),this.#i.stop()}reconnected(){this.#r[ft](),this.#i.start()}};function Ke(r,t){return be(class extends Xt{#t=new Zt(r,t);render(s){return this.#t.update(s)}disconnected(){this.#t.disconnected()}reconnected(){this.#t.reconnected()}})}function G(r,t){let e=Ke(r,t);function s(...o){return e(new gt(o))}return s.props=(...o)=>new It(new gt(o),e),s.transmute=o=>G(n=>{let l=r(n);return(...a)=>l(...o(...a))},t),s.component=(o=z)=>({props:i=>Xe(t,o,i,r)}),s}function g(r){return G(r,{mode:"open"})}g.settings=r=>({render:t=>G(t,r)});g.render=g;g.component=r=>g(t=>()=>r(t)).component(z).props(()=>[]);function h(r,t){return()=>Hr({hz:r,frames:t})}var Hr=g(r=>({hz:t,frames:e})=>{r.name("loading"),r.styles(W,Nr);let s=r.signal(0);return r.mount(()=>Me(async()=>{await He(1e3/t);let o=s.get()+1;s.set(o>=e.length?0:o)})),e.at(s.get())}),Nr=m`
|
|
19
|
+
`;function O(r,t){let e,s,o=[];function i(){e=[],s&&clearTimeout(s),s=void 0,o=[]}return i(),((...n)=>{e=n,s&&clearTimeout(s);let l=new Promise((a,d)=>{o.push({resolve:a,reject:d})});return s=setTimeout(()=>{Promise.resolve().then(()=>t(...e)).then(a=>{for(let{resolve:d}of o)d(a);i()}).catch(a=>{for(let{reject:d}of o)d(a);i()})},r),l})}function Hr(r){let t,e=!1,s=()=>{e=!0,clearTimeout(t)},o=async()=>{e||(await r(s),!e&&(t=setTimeout(o,0)))};return o(),s}var He=Hr;function dt(){let r,t,e=new Promise((o,i)=>{r=o,t=i});function s(o){return o.then(r).catch(t),e}return{promise:e,resolve:r,reject:t,entangle:s}}var Pt=class{getRefill;#t=[];constructor(t){this.getRefill=t,this.#e()}get currentStock(){return[...this.#t]}#e(){if(this.#t.length===0&&(this.#t=[...this.getRefill()]),this.#t.length===0)throw new Error("dispenser's getRefill returned an empty array")}takeAll(){let t=this.#t;return this.#t=[...this.getRefill()],t}takeRandom(){this.#e();let t=Math.floor(Math.random()*this.#t.length),[e]=this.#t.splice(t,1);return e}takeFirst(){return this.#e(),this.#t.shift()}takeLast(){return this.#e(),this.#t.pop()}shift=this.takeFirst.bind(this);pop=this.takeLast.bind(this)};var Z=class r extends Map{static require(t,e){if(t.has(e))return t.get(e);throw new Error(`required key not found: "${e}"`)}static guarantee(t,e,s){if(t.has(e))return t.get(e);{let o=s();return t.set(e,o),o}}array(){return[...this]}require(t){return r.require(this,t)}guarantee(t,e){return r.guarantee(this,t,e)}};var Ue=(r=0)=>new Promise(t=>setTimeout(t,r));function Ot(r){return{map:t=>je(r,t),filter:t=>De(r,t)}}Ot.pipe=Object.freeze({map:r=>(t=>je(t,r)),filter:r=>(t=>De(t,r))});var je=(r,t)=>Object.fromEntries(Object.entries(r).map(([e,s])=>[e,t(s,e)])),De=(r,t)=>Object.fromEntries(Object.entries(r).filter(([e,s])=>t(s,e)));function qe(){let r=new Set;async function t(...a){await Promise.all([...r].map(d=>d(...a)))}function e(a){return r.add(a),()=>{r.delete(a)}}async function s(...a){return t(...a)}function o(a){return e(a)}async function i(a){let{promise:d,resolve:b}=dt(),c=o(async(...g)=>{a&&await a(...g),b(g),c()});return d}function n(){r.clear()}let l={pub:s,sub:o,publish:t,subscribe:e,on:e,next:i,clear:n};return Object.assign(o,l),Object.assign(s,l),l}function Rt(r){let t=qe();return r&&t.sub(r),t.sub}function ue(r){let t=qe();return r&&t.sub(r),t.pub}function Le(r){let t=r.split(/\r|\n/),e;for(let o of t)if(!/^\s+$/.test(o)){let n=o.match(/^(\t+).+/);if(n){let l=n[1].length;if(e=e===void 0||l<e?l:e,e===0)break}}let s=new RegExp(`^\\t{${e}}`);return t.map(o=>/^\s+$/.test(o)?"":o).map(o=>o.replace(s,"")).join(`
|
|
20
|
+
`)}function Ur(r,t,e){e==null?r.removeAttribute(t):typeof e=="string"?r.setAttribute(t,e):typeof e=="number"?r.setAttribute(t,e.toString()):typeof e=="boolean"?e===!0?r.setAttribute(t,""):r.removeAttribute(t):console.warn(`invalid attribute "${t}" type is "${typeof e}"`)}function Mt(r,t){for(let[e,s]of t)Ur(r,e,s)}function Ve(r,t){let e=document.createElement(r);return Mt(e,Object.entries(t)),e}function Ie(r,t){let e=new MutationObserver(t);return e.observe(r,{attributes:!0}),()=>e.disconnect()}var $={get:{string:(r,t)=>r.getAttribute(t)??void 0,number:(r,t)=>{let e=r.getAttribute(t);return e===null||!e?void 0:Number(e)},boolean:(r,t)=>r.getAttribute(t)!==null},set:{string:(r,t,e)=>(e===void 0?r.removeAttribute(t):r.setAttribute(t,e),!0),number:(r,t,e)=>(e===void 0?r.removeAttribute(t):r.setAttribute(t,e.toString()),!0),boolean:(r,t,e)=>(e?r.setAttribute(t,""):r.removeAttribute(t),!0)}};var We=(r,t)=>new Proxy(t,{get:(e,s)=>{switch(t[s]){case String:return $.get.string(r,s);case Number:return $.get.number(r,s);case Boolean:return $.get.boolean(r,s);default:throw new Error(`invalid attribute type for "${s}"`)}},set:(e,s,o)=>{switch(t[s]){case String:return $.set.string(r,s,o);case Number:return $.set.number(r,s,o);case Boolean:return $.set.boolean(r,s,o);default:throw new Error(`invalid attribute type for "${s}"`)}}});var Bt=class{element;constructor(t){this.element=t}strings=new Proxy({},{get:(t,e)=>$.get.string(this.element,e),set:(t,e,s)=>$.set.string(this.element,e,s)});numbers=new Proxy({},{get:(t,e)=>$.get.number(this.element,e),set:(t,e,s)=>$.set.number(this.element,e,s)});booleans=new Proxy({},{get:(t,e)=>$.get.boolean(this.element,e),set:(t,e,s)=>$.set.boolean(this.element,e,s)})};function ut(r){let t=new Bt(r);return{strings:t.strings,numbers:t.numbers,booleans:t.booleans,on:e=>Ie(r,e),spec:e=>We(r,e)}}ut.get=$.get;ut.set=$.set;function me(r,t){let e=[];for(let[s,o]of Object.entries(t))if(typeof o=="function")r.addEventListener(s,o),e.push(()=>r.removeEventListener(s,o));else{let[i,n]=o;r.addEventListener(s,n,i),e.push(()=>r.removeEventListener(s,n))}return()=>e.forEach(s=>s())}function Fe(r){return r.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}function Xe(r,t={}){let{soft:e=!1,upgrade:s=!0}=t;for(let[o,i]of Object.entries(r)){let n=Fe(o),l=customElements.get(n);e&&l||(customElements.define(n,i),s&&document.querySelectorAll(n).forEach(a=>{a.constructor===HTMLElement&&customElements.upgrade(a)}))}}function Ye(r,t){let e=r.querySelector(t);if(!e)throw new Error(`element not found (${t})`);return e}var Nt=class r{element;constructor(t){this.element=t}in(t){return new r(typeof t=="string"?Ye(this.element,t):t)}require(t){let e=this.element.querySelector(t);if(!e)throw new Error(`element not found (${t})`);return e}maybe(t){return this.element.querySelector(t)}all(t){return Array.from(this.element.querySelectorAll(t))}render(...t){return ht(t,this.element)}attrs(){return ut(this.element)}events(t){return me(this.element,t)}};function u(r){return typeof r=="string"?Ye(document,r):new Nt(r)}var R=new Nt(document);u.in=R.in.bind(R);u.require=R.require.bind(R);u.maybe=R.maybe.bind(R);u.all=R.all.bind(R);u.el=Ve;u.events=me;u.attrs=ut;u.register=Xe;u.render=(r,...t)=>ht(t,r);var fe=class{#t=[];#e=new WeakMap;#r=[];#s=new Set;notifyRead(t){this.#t.at(-1)?.add(t)}async notifyWrite(t){if(this.#s.has(t))throw new Error("circularity forbidden");let e=this.#o(t).pub();return this.#r.at(-1)?.add(e),e}observe(t){this.#t.push(new Set);let e=t();return{seen:this.#t.pop(),result:e}}subscribe(t,e){return this.#o(t)(async()=>{let s=new Set;this.#r.push(s),this.#s.add(t),s.add(e()),this.#s.delete(t),await Promise.all(s),this.#r.pop()})}#o(t){let e=this.#e.get(t);return e||(e=Rt(),this.#e.set(t,e)),e}},_=globalThis[Symbol.for("e280.tracker")]??=new fe;var J=class{sneak;constructor(t){this.sneak=t}get(){return _.notifyRead(this),this.sneak}get value(){return this.get()}};var K=class extends J{on=Rt();dispose(){this.on.clear()}};function Ht(r,t=r){let{seen:e,result:s}=_.observe(r),o=O(0,t),i=[],n=()=>i.forEach(l=>l());for(let l of e){let a=_.subscribe(l,o);i.push(a)}return{result:s,dispose:n}}function Q(r,t){return r===t}var Ut=class extends K{#t;constructor(t,e){let s=e?.compare??Q,{result:o,dispose:i}=Ht(t,async()=>{let n=t();!s(this.sneak,n)&&(this.sneak=n,await Promise.all([_.notifyWrite(this),this.on.pub(n)]))});super(o),this.#t=i}toString(){return`(derived "${String(this.get())}")`}dispose(){super.dispose(),this.#t()}get core(){return this}fn(){let t=this;function e(){return t.get()}return e.core=t,e.get=t.get.bind(t),e.on=t.on,e.dispose=t.dispose.bind(t),e.fn=t.fn.bind(t),Object.defineProperty(e,"value",{get:()=>t.value}),Object.defineProperty(e,"sneak",{get:()=>t.sneak}),e}};var jt=class extends J{#t;#e;#r=!1;#s;constructor(t,e){super(void 0),this.#t=t,this.#e=e?.compare??Q}toString(){return`($lazy "${String(this.get())}")`}get(){if(!this.#s){let{result:t,dispose:e}=Ht(this.#t,()=>this.#r=!0);this.#s=e,this.sneak=t}if(this.#r){this.#r=!1;let t=this.#t();!this.#e(this.sneak,t)&&(this.sneak=t,_.notifyWrite(this))}return super.get()}dispose(){this.#s&&this.#s()}get core(){return this}fn(){let t=this;function e(){return t.get()}return e.core=t,e.get=t.get.bind(t),e.dispose=t.dispose.bind(t),e.fn=t.fn.bind(t),Object.defineProperty(e,"value",{get:()=>t.value}),Object.defineProperty(e,"sneak",{get:()=>t.sneak}),e}};var Dt=class extends K{#t=!1;#e;constructor(t,e){super(t),this.#e=e?.compare??Q}toString(){return`($signal "${String(this.get())}")`}async set(t,e=!1){let s=this.sneak;return this.sneak=t,(e||!this.#e(s,t))&&await this.publish(),t}get value(){return this.get()}set value(t){this.set(t)}async publish(){if(this.#t)throw new Error("forbid circularity");let t=this.sneak,e=Promise.resolve();try{this.#t=!0,e=Promise.all([_.notifyWrite(this),this.on.publish(t)])}finally{this.#t=!1}return await e,t}get core(){return this}fn(){let t=this;function e(s){return arguments.length===0?t.get():t.set(arguments[0])}return e.core=t,e.get=t.get.bind(t),e.set=t.set.bind(t),e.on=t.on,e.dispose=t.dispose.bind(t),e.publish=t.publish.bind(t),e.fn=t.fn.bind(t),Object.defineProperty(e,"value",{get:()=>t.value,set:s=>t.value=s}),Object.defineProperty(e,"sneak",{get:()=>t.sneak,set:s=>t.sneak=s}),e}};function jr(r,t){return new jt(r,t).fn()}function Ze(r,t){return new Ut(r,t).fn()}function w(r,t){return new Dt(r,t).fn()}w.lazy=jr;w.derived=Ze;var M=class{#t=new Z;effect(t,e){let{seen:s,result:o}=_.observe(t);for(let i of s)this.#t.guarantee(i,()=>_.subscribe(i,e));for(let[i,n]of this.#t)s.has(i)||(n(),this.#t.delete(i));return o}clear(){for(let t of this.#t.values())t();this.#t.clear()}};var G=class{element;response;#t;constructor(t,e){this.element=t,this.response=e}start(){this.#t||(this.#t=u.attrs(this.element).on(this.response))}stop(){this.#t&&this.#t(),this.#t=void 0}};function qt(r,t){_t(r,qr(t))}function qr(r){let t=[];if(Array.isArray(r)){let e=new Set(r.flat(1/0).reverse());for(let s of e)t.unshift(W(s))}else r!==void 0&&t.push(W(r));return t}var I={status:r=>r[0],value:r=>r[0]==="ready"?r[1]:void 0,error:r=>r[0]==="error"?r[1]:void 0,select:(r,t)=>{switch(r[0]){case"loading":return t.loading();case"error":return t.error(r[1]);case"ready":return t.ready(r[1]);default:throw new Error("unknown op status")}},morph:(r,t)=>I.select(r,{loading:()=>["loading"],error:e=>["error",e],ready:e=>["ready",t(e)]}),all:(...r)=>{let t=[],e=[],s=0;for(let o of r)switch(o[0]){case"loading":s++;break;case"ready":t.push(o[1]);break;case"error":e.push(o[1]);break}return e.length>0?["error",e]:s===0?["ready",t]:["loading"]}};var tt=class{static loading(){return new this}static ready(t){return new this(["ready",t])}static error(t){return new this(["error",t])}static promise(t){let e=new this;return e.promise(t),e}static load(t){return this.promise(t())}static all(...t){let e=t.map(s=>s.pod);return I.all(...e)}signal;#t=0;#e=ue();#r=ue();constructor(t=["loading"]){this.signal=w(t)}get wait(){return new Promise((t,e)=>{this.#e.next().then(([s])=>t(s)),this.#r.next().then(([s])=>e(s))})}get then(){return this.wait.then.bind(this.wait)}get catch(){return this.wait.catch.bind(this.wait)}get finally(){return this.wait.finally.bind(this.wait)}async setLoading(){await this.signal.set(["loading"])}async setReady(t){await this.signal.set(["ready",t]),await this.#e(t)}async setError(t){await this.signal.set(["error",t]),await this.#r(t)}async promise(t){let e=++this.#t;await this.setLoading();try{let s=await t;return e===this.#t&&await this.setReady(s),s}catch(s){console.error(s),e===this.#t&&await this.setError(s)}}async load(t){return this.promise(t())}get pod(){return this.signal.get()}set pod(t){this.signal.set(t)}get status(){return this.signal.get()[0]}get value(){return I.value(this.signal.get())}get error(){return I.error(this.signal.get())}get isLoading(){return this.status==="loading"}get isReady(){return this.status==="ready"}get isError(){return this.status==="error"}require(){let t=this.signal.get();if(t[0]!=="ready")throw new Error("required value not ready");return t[1]}select(t){return I.select(this.signal.get(),t)}morph(t){return I.morph(this.pod,t)}};var Lt=class{#t=[];#e=[];mount(t){this.#t.push(t),this.#e.push(t())}unmountAll(){for(let t of this.#e)t();this.#e=[]}remountAll(){for(let t of this.#t)this.#e.push(t())}};var Vt=class{#t;#e;constructor(t){this.#t=t,this.#e=u.attrs(t.element)}get strings(){return this.#e.strings}get numbers(){return this.#e.numbers}get booleans(){return this.#e.booleans}spec(t){return this.#t.once(()=>this.#e.spec(t))}on(t){return this.#t.mount(()=>this.#e.on(t))}};var mt=Symbol(),ft=Symbol(),gt=Symbol(),et=class{element;shadow;renderNow;render;attrs;#t=0;#e=0;#r=new Z;#s=dt();#o=new Lt;[mt](t){this.#t++,this.#e=0,this.#s=dt();let e=t();return this.#s.resolve(),e}[ft](){this.#o.unmountAll()}[gt](){this.#o.remountAll()}constructor(t,e,s,o){this.element=t,this.shadow=e,this.renderNow=s,this.render=o,this.attrs=new Vt(this)}get renderCount(){return this.#t}get rendered(){return this.#s.promise}name(t){this.once(()=>this.element.setAttribute("view",t))}styles(...t){this.once(()=>qt(this.shadow,t))}css(...t){return this.styles(...t)}once(t){return this.#r.guarantee(this.#e++,t)}mount(t){return this.once(()=>this.#o.mount(t))}life(t){let e;return this.mount(()=>{let[s,o]=t();return e=s,o}),e}wake(t){return this.life(()=>[t(),()=>{}])}op=(()=>{let t=this;function e(s){return t.once(()=>tt.load(s))}return e.load=e,e.promise=s=>this.once(()=>tt.promise(s)),e})();signal=(()=>{let t=this;function e(s,o){return t.once(()=>w(s,o))}return e.derived=function(o,i){return t.once(()=>w.derived(o,i))},e.lazy=function(o,i){return t.once(()=>w.lazy(o,i))},e})();derived(t,e){return this.once(()=>w.derived(t,e))}lazy(t,e){return this.once(()=>w.lazy(t,e))}};var B=class extends HTMLElement{static styles;shadow;#t;#e=0;#r=new M;#s=new G(this,()=>this.update());createShadow(){return this.attachShadow({mode:"open"})}constructor(){super(),this.shadow=this.createShadow(),this.#t=new et(this,this.shadow,this.updateNow,this.update)}render(t){}updateNow=()=>{this.#t[mt](()=>{u.render(this.shadow,this.#r.effect(()=>this.render(this.#t),this.update))})};update=O(0,this.updateNow);connectedCallback(){if(this.#e===0){let t=this.constructor.styles;t&&qt(this.shadow,t),this.updateNow()}else this.#t[gt]();this.#s.start(),this.#e++}disconnectedCallback(){this.#t[ft](),this.#r.clear(),this.#s.stop()}};var It=class{#t;#e;constructor(t,e){this.#e=t,this.#t=e}attr(t,e=!0){return this.#e.attrs.set(t,e),this}attrs(t){for(let[e,s]of Object.entries(t))this.#e.attrs.set(e,s);return this}children(...t){return this.#e.children.push(...t),this}render(){return this.#t(this.#e)}};var bt=class{props;attrs=new Map;children=[];constructor(t){this.props=t}};function Je(r,t,e,s){return class extends t{static view=rt(s,r);#t=new M;createShadow(){return this.attachShadow(r)}render(i){return s(i)(...this.#t.effect(()=>e(this),()=>this.update()))}}}var{I:vn}=Ne;var Ke=r=>r.strings===void 0;var Qe={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},ge=r=>(...t)=>({_$litDirective$:r,values:t}),Wt=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var yt=(r,t)=>{let e=r._$AN;if(e===void 0)return!1;for(let s of e)s._$AO?.(t,!1),yt(s,t);return!0},Ft=r=>{let t,e;do{if((t=r._$AM)===void 0)break;e=t._$AN,e.delete(r),r=t}while(e?.size===0)},Ge=r=>{for(let t;t=r._$AM;r=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(r))break;e.add(r),Ir(t)}};function Lr(r){this._$AN!==void 0?(Ft(this),this._$AM=r,Ge(this)):this._$AM=r}function Vr(r,t=!1,e=0){let s=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(t)if(Array.isArray(s))for(let i=e;i<s.length;i++)yt(s[i],!1),Ft(s[i]);else s!=null&&(yt(s,!1),Ft(s));else yt(this,r)}var Ir=r=>{r.type==Qe.CHILD&&(r._$AP??=Vr,r._$AQ??=Lr)},Xt=class extends Wt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),Ge(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(yt(this,t),Ft(this))}setValue(t){if(Ke(this._$Ct))this._$Ct._$AI(t,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var Yt=class r extends HTMLElement{static#t=!1;static make(){return this.#t||(u.register({SlyView:r},{soft:!0,upgrade:!0}),this.#t=!0),document.createElement("sly-view")}};var Zt=class{viewFn;settings;#t=Yt.make();#e=new M;#r;#s;#o;#i=new G(this.#t,()=>this.#a());constructor(t,e){this.viewFn=t,this.settings=e,this.#s=this.#t.attachShadow(this.settings),this.#r=new et(this.#t,this.#s,this.#n,this.#a)}update(t){return this.#o=t,this.#n(),this.#t}#n=()=>{this.#r[mt](()=>{let t=this.#e.effect(()=>this.viewFn(this.#r)(...this.#o.props),()=>this.#a());Mt(this.#t,[...this.#o.attrs]),u.render(this.#s,t),u.render(this.#t,this.#o.children),this.#i.start()})};#a=O(0,this.#n);disconnected(){this.#r[ft](),this.#e.clear(),this.#i.stop()}reconnected(){this.#r[gt](),this.#i.start()}};function tr(r,t){return ge(class extends Xt{#t=new Zt(r,t);render(s){return this.#t.update(s)}disconnected(){this.#t.disconnected()}reconnected(){this.#t.reconnected()}})}function rt(r,t){let e=tr(r,t);function s(...o){return e(new bt(o))}return s.props=(...o)=>new It(new bt(o),e),s.transmute=o=>rt(n=>{let l=r(n);return(...a)=>l(...o(...a))},t),s.component=(o=B)=>({props:i=>Je(t,o,i,r)}),s}function f(r){return rt(r,{mode:"open"})}f.settings=r=>({render:t=>rt(t,r)});f.render=f;f.component=r=>f(t=>()=>r(t)).component(B).props(()=>[]);function m(r,t){return()=>Wr({hz:r,frames:t})}var Wr=f(r=>({hz:t,frames:e})=>{r.name("loading"),r.styles(Y,Fr);let s=r.signal(0);return r.mount(()=>He(async()=>{await Ue(1e3/t);let o=s.get()+1;s.set(o>=e.length?0:o)})),e.at(s.get())}),Fr=p`
|
|
21
21
|
:host {
|
|
22
22
|
font-family: monospace;
|
|
23
23
|
white-space: pre;
|
|
24
24
|
user-select: none;
|
|
25
25
|
}
|
|
26
|
-
`;var
|
|
26
|
+
`;var y=20,st=10,ot=4,ia=m(y,["|","/","-","\\"]),na=m(y,["\u2808","\u2810","\u2820","\u2880","\u2840","\u2804","\u2802","\u2801"]),aa=m(y,["\u2B06\uFE0F","\u2197\uFE0F","\u27A1\uFE0F","\u2198\uFE0F","\u2B07\uFE0F","\u2199\uFE0F","\u2B05\uFE0F","\u2196\uFE0F"]),la=m(y,["\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B1\u25B0\u25B1\u25B1\u25B1","\u25B1\u25B1\u25B0\u25B1\u25B1","\u25B1\u25B1\u25B1\u25B0\u25B1","\u25B1\u25B1\u25B1\u25B1\u25B0","\u25B1\u25B1\u25B1\u25B1\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B1","\u25B1\u25B1\u25B0\u25B1\u25B1","\u25B1\u25B0\u25B1\u25B1\u25B1"]),ca=m(y,["\u25B1\u25B1\u25B0\u25B1\u25B1","\u25B1\u25B1\u25B1\u25B0\u25B1","\u25B1\u25B1\u25B1\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B1\u25B0","\u25B1\u25B1\u25B1\u25B1\u25B0","\u25B1\u25B1\u25B1\u25B1\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B1","\u25B1\u25B1\u25B0\u25B1\u25B1","\u25B1\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B1\u25B0\u25B1\u25B1\u25B1"]),pa=m(y,["\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B1\u25B0\u25B0\u25B0\u25B1","\u25B1\u25B1\u25B0\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B1\u25B0","\u25B1\u25B1\u25B1\u25B1\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B0","\u25B1\u25B1\u25B0\u25B0\u25B0","\u25B1\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1"]),ha=m(y,["\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B1\u25B0\u25B0\u25B0\u25B0","\u25B1\u25B1\u25B0\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B1\u25B0"]),da=m(y,["\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581","\u2588\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581","\u2588\u2588\u2588\u2588\u2581","\u2588\u2588\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2588","\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2588"]),ua=m(y,["\u2588\u2581\u2581\u2581\u2581","\u2588\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581","\u2588\u2588\u2588\u2588\u2581","\u2588\u2588\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2588","\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2588\u2588\u2588","\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581","\u2588\u2588\u2588\u2581\u2581","\u2588\u2588\u2581\u2581\u2581"]),ma=m(ot,["\u{1F6B6}","\u{1F3C3}"]),fa=m(st,["\u25F7","\u25F6","\u25F5","\u25F4"]),ga=m(y,["=----","-=---","--=--","---=-","----=","----=","---=-","--=--","-=---","=----"]),ba=m(y,["o----","-o---","--o--","---o-","----o","----o","---o-","--o--","-o---","o----"]),ya=m(st,["[ ]","[ ]","[= ]","[== ]","[===]","[ ==]","[ =]"]),xa=m(st,["[ ]","[ ]","[= ]","[== ]","[===]","[ ==]","[ =]","[ ]","[ ]","[ =]","[ ==]","[===]","[== ]","[= ]"]),wa=m(st,[" "," ",". ",".. ","..."," .."," ."]),va=m(y,[". ",". ",".. ","..."," .."," ."," ."," ..","...",".. "]),$a=m(y,[".....",".....",":....","::...",":::..","::::.",":::::",":::::",".::::","..:::","...::","....:"]),_a=m(y,[":....",":....","::...",".::..","..::.","...::","....:","....:","...::","..::.",".::..","::..."]),Aa=m(y,[".....",".....","..:..",".:::.",".:::.",":::::",":::::","::.::",":...:"]),Sa=m(y,[".....",".....","..:..",".:::.",".:::.",":::::",":::::","::.::",":...:",".....",".....",":...:","::.::",":::::",":::::",".:::.",".:::.","..:.."]),ka=m(y,["000","100","110","111","011","001"]),Ca=m(y,["11111","01111","00111","10011","11001","01100","00110","10011","11001","11100","11110"]),Ea=m(y,["11111","01111","10111","11011","11101","11110","11111","11110","11101","11011","10111","01111"]),Ta=m(ot,["\u{1F539}","\u{1F535}"]),za=m(st,["\u{1F642}","\u{1F642}","\u{1F617}","\u{1F619}","\u{1F618}","\u{1F618}","\u{1F619}"]),Pa=m(y,["\u{1F550}","\u{1F551}","\u{1F552}","\u{1F553}","\u{1F554}","\u{1F555}","\u{1F556}","\u{1F557}","\u{1F558}","\u{1F559}","\u{1F55A}","\u{1F55B}"]),Oa=m(y,["\u{1F91C} \u{1F91B}","\u{1F91C} \u{1F91B}","\u{1F91C} \u{1F91B}"," \u{1F91C} \u{1F91B} "," \u{1F91C}\u{1F91B} "," \u{1F91C}\u{1F91B} "," \u{1F91C}\u{1F4A5}\u{1F91B} ","\u{1F91C} \u{1F4A5} \u{1F91B}","\u{1F91C} \u2728 \u{1F91B}","\u{1F91C} \u2728 \u{1F91B}"]),Xr=m(ot,["\u{1F30E}","\u{1F30F}","\u{1F30D}"]),Ra=m(ot,["\u{1F513}","\u{1F512}"]),Ma=m(ot,["\u{1F505}","\u{1F506}"]),Ba=m(ot,["\u{1F508}","\u{1F508}","\u{1F509}","\u{1F50A}","\u{1F50A}","\u{1F509}"]),Na=m(st,["\u{1F311}","\u{1F311}","\u{1F311}","\u{1F318}","\u{1F317}","\u{1F316}","\u{1F315}","\u{1F314}","\u{1F313}","\u{1F312}"]);var Zr=f(r=>t=>(r.name("error"),r.styles(Y,Jr),typeof t=="string"?t:t instanceof Error?h`<strong>${t.name}:</strong> <span>${t.message}</span>`:"error")),Jr=p`
|
|
27
27
|
:host {
|
|
28
28
|
font-family: monospace;
|
|
29
29
|
color: red;
|
|
30
30
|
}
|
|
31
|
-
`;function
|
|
31
|
+
`;function ts(r,t){return t.transmute((...e)=>[r,...e])}function rr(r){return Ot(r).map(t=>t.view)}function sr(r,t){return Ot(t).map(e=>class extends e{context=r;static view=ts(r,super.view)})}var or=()=>new Pt(()=>["lorem kettlebell dolor sit amet, mountain squats consectetur trail-running. adipiscing deadlift elit, sed do 45lb turkish get-up eiusmod tempor incididunt ut hike magna aliqua. ut enim ad minim clean & press, quis nostrud exercitation lunges ullamco kettlebell snatch trailhead nisi ut aliquip ex dolore summit irure dolor.","lorem protein dolor sit amet, creatine scoop elit shaker bottle tempor. grilled steak magna keto-fasting culpa, carb-loading perspiciatis cheat day. whey isolate dolor sit macros elit, intermittent fasting tempor electrolyte magna; barefoot shoes culpa, liver perspiciatis ancestral squat rack gospel. lorem bulking dolor sit cut elit, tdee tracker tempor calorie deficit magna; chicken breast culpa gatorade perspiciatis meal prep.","lorem caffeine dolor sit amet, double espresso elit cold brew tempor jitter. adderall magna focus culpa, lion\u2019s mane perspiciatis nootropic. nicotine gum dolor sit vape elit, dopamine hit tempor buzz magna; lsd microdosing culpa, productivity perspiciatis agile sprint. lorem latte dolor sit drip elit, french press tempor aeropress magna; insomnia culpa, circadian rhythm perspiciatis blue light filter.","lorem arch dolor sit amet, pacman -Syu elit rolling release tempor breakage. i3-gaps commodo tiling, bspwm magna culpa xinitrc. alias neovim configs in .dotfiles forest, r/unixporn veniam rice showcase perspiciatis.","lorem authlocal dolor sit amet, user-sovereign identity elit, cryptographic tempor signatures. ed25519 magna keypair culpa, elliptic perspiciatis handshake ut zero-knowledge proof. decentralized login elit mnemonic seed tempor recovery phrase. did magna alias culpa federation, lorem oauth2 perspiciatis antiquated.","lorem webgpu dolor sit amet, fragment shader elit vertex buffer tempor pipeline; bindgroup magna sampler culpa, wgsl perspiciatis alignment bug. compute pass workgroup barrier magna, mipmap cascade culpa drawcall instancing overflow. spir-v dolor sit wasm elit, canvas context lost magna; fallback webgl2 perspiciatis, polyfill slowpath dolore, glsl antique culpa extension hell 144hz tearing. command encoder perspiciatis out-of-memory, chromium nightly.","lorem sedentary dolor sit amet, infinite scroll elit chair-bound tempor. commit marathon magna carpal tunnel culpa, caffeine perspiciatis heartbeat irregular. lorem backlog dolor sit ticket elit, jira sprint tempor sedentary slump magna; gym membership culpa expired, standing desk perspiciatis unused. lorem procrastination dolor sit youtube elit, keyboard crumbs tempor pizza box magna; cardio avoidant culpa, hike someday perspiciatis maybe."]);var be=or(),N=()=>be.takeFirst();var ir=p`@layer view {
|
|
32
|
+
|
|
33
|
+
:host {
|
|
34
|
+
position: relative;
|
|
35
|
+
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
|
|
39
|
+
padding: 1em;
|
|
40
|
+
border-radius: 0.5em;
|
|
41
|
+
gap: 1em;
|
|
42
|
+
|
|
43
|
+
background: linear-gradient(to right top, #252dd985, #aa6affbd);
|
|
44
|
+
backdrop-filter: blur(0.5em);
|
|
45
|
+
|
|
46
|
+
box-shadow: 0 0 5em #5d1fadaa;
|
|
47
|
+
border-top: 2px solid #fff4;
|
|
48
|
+
|
|
49
|
+
&::before {
|
|
50
|
+
content: "";
|
|
51
|
+
display: block;
|
|
52
|
+
position: absolute;
|
|
53
|
+
inset: 0;
|
|
54
|
+
border-radius: 0.5em;
|
|
55
|
+
background: #0007;
|
|
56
|
+
width: calc(100% - 0.3em);
|
|
57
|
+
height: calc(100% - 0.3em);
|
|
58
|
+
margin: auto;
|
|
59
|
+
z-index: 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
> * {
|
|
63
|
+
position: relative;
|
|
64
|
+
z-index: 1;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
header {
|
|
69
|
+
display: flex;
|
|
70
|
+
|
|
71
|
+
h2 {
|
|
72
|
+
flex: 1 1 auto;
|
|
73
|
+
color: var(--prime);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
}`;function Jt(){return{bg:"#111",alpha:"#def",lame:"#8888",angry:"#f50",zesty:"#cf0",happy:"#0fa",calm:"#0af",sad:"#74f",quirky:"#f49","inactive-opacity":"0.5","anim-duration":"300ms"}}function Kt(r){return $t(Object.entries(r).map(([t,e])=>`--${t}: var(--shiny-${t}, ${e});`).join(`
|
|
78
|
+
`))}var nr=p`@layer overlay {
|
|
79
|
+
|
|
80
|
+
:host {
|
|
81
|
+
${Kt({...Jt()})}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
:host([view="shiny-button"]:not([plain])) {
|
|
85
|
+
position: relative;
|
|
86
|
+
|
|
87
|
+
--buttoncolor: var(--calm);
|
|
88
|
+
--padding: 0.3em 0.7em;
|
|
89
|
+
|
|
90
|
+
color: white;
|
|
91
|
+
border-radius: 2em;
|
|
92
|
+
background: var(--buttoncolor);
|
|
93
|
+
border: none;
|
|
94
|
+
|
|
95
|
+
font-weight: medium;
|
|
96
|
+
text-shadow: 0.1em 0.1em 0.1em #0004;
|
|
97
|
+
box-shadow: 0.1em 0.2em 0.3em #0002;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
:host([view="shiny-button"][lame]) { --buttoncolor: var(--lame); }
|
|
101
|
+
:host([view="shiny-button"][angry]) { --buttoncolor: var(--angry); }
|
|
102
|
+
:host([view="shiny-button"][zesty]) { --buttoncolor: var(--zesty); }
|
|
103
|
+
:host([view="shiny-button"][happy]) { --buttoncolor: var(--happy); }
|
|
104
|
+
:host([view="shiny-button"][calm]) { --buttoncolor: var(--calm); }
|
|
105
|
+
:host([view="shiny-button"][sad]) { --buttoncolor: var(--sad); }
|
|
106
|
+
:host([view="shiny-button"][quirky]) { --buttoncolor: var(--quirky); }
|
|
107
|
+
|
|
108
|
+
:host([view="shiny-button"][gradient]:not([plain])) {
|
|
109
|
+
border: none;
|
|
110
|
+
background: linear-gradient(
|
|
111
|
+
to bottom right,
|
|
112
|
+
color-mix(in oklab, var(--buttoncolor), white 40%),
|
|
113
|
+
color-mix(in oklab, var(--buttoncolor), black 20%)
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
&::before {
|
|
117
|
+
content: "";
|
|
118
|
+
display: block;
|
|
119
|
+
position: absolute;
|
|
120
|
+
z-index: 0;
|
|
121
|
+
inset: 0.15em;
|
|
122
|
+
border-radius: inherit;
|
|
123
|
+
background: color-mix(in oklab, var(--buttoncolor), #0004 50%);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
> * {
|
|
127
|
+
position: relative;
|
|
128
|
+
z-index: 1;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
:host([view="shiny-drawer"]:not([plain])) {
|
|
133
|
+
display: block;
|
|
134
|
+
|
|
135
|
+
&::part(slate) {
|
|
136
|
+
padding: 1em;
|
|
137
|
+
background: linear-gradient(
|
|
138
|
+
to top right,
|
|
139
|
+
#00a9dd69,
|
|
140
|
+
#70ffd77a
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
:host([view="shiny-drawer"]:state(left)) {
|
|
146
|
+
&::part(slate) {
|
|
147
|
+
border-bottom-right-radius: 0.5em;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
:host([view="shiny-drawer"]:state(right)) {
|
|
152
|
+
&::part(slate) {
|
|
153
|
+
border-bottom-left-radius: 0.5em;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
}`;var ar=p`@layer overlay {
|
|
158
|
+
|
|
159
|
+
:host {
|
|
160
|
+
${Kt(Jt())}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
}`;var lr=p`@layer view {
|
|
164
|
+
|
|
165
|
+
:host {
|
|
166
|
+
opacity: 0.8;
|
|
167
|
+
display: inline-flex;
|
|
168
|
+
width: max-content;
|
|
169
|
+
height: max-content;
|
|
170
|
+
|
|
171
|
+
--padding: 0.3em;
|
|
172
|
+
border-radius: 0.2em;
|
|
173
|
+
border: 0.1em solid currentColor;
|
|
174
|
+
|
|
175
|
+
cursor: pointer;
|
|
176
|
+
background: transparent;
|
|
177
|
+
user-select: none;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
:host(:not([disabled]):is(:hover, :focus-visible)) { opacity: 1; }
|
|
181
|
+
:host(:not([disabled]):active) { opacity: 0.6; }
|
|
182
|
+
|
|
183
|
+
:host([disabled]) {
|
|
184
|
+
cursor: default;
|
|
185
|
+
color: var(--lame);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
:host([hidden]) {
|
|
189
|
+
display: none !important;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
:host([lame]) { color: var(--lame); }
|
|
193
|
+
:host([angry]) { color: var(--angry); }
|
|
194
|
+
:host([zesty]) { color: var(--zesty); }
|
|
195
|
+
:host([happy]) { color: var(--happy); }
|
|
196
|
+
:host([calm]) { color: var(--calm); }
|
|
197
|
+
:host([sad]) { color: var(--sad); }
|
|
198
|
+
:host([quirky]) { color: var(--quirky); }
|
|
199
|
+
|
|
200
|
+
button {
|
|
201
|
+
background: transparent;
|
|
202
|
+
border: none;
|
|
203
|
+
|
|
204
|
+
font: inherit;
|
|
205
|
+
color: inherit;
|
|
206
|
+
cursor: inherit;
|
|
207
|
+
text-shadow: inherit;
|
|
208
|
+
|
|
209
|
+
display: inline-flex;
|
|
210
|
+
justify-content: center;
|
|
211
|
+
align-items: center;
|
|
212
|
+
|
|
213
|
+
width: 100%;
|
|
214
|
+
height: 100%;
|
|
215
|
+
padding: var(--padding);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
slot {
|
|
219
|
+
display: contents;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
}`;var A=p`
|
|
223
|
+
|
|
224
|
+
@layer reset, underlay, view, overlay;
|
|
225
|
+
|
|
226
|
+
${Y}
|
|
227
|
+
|
|
228
|
+
@layer overlay {
|
|
229
|
+
[hidden] { display: none !important; }
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
`;var S=class extends B{context};var Qt=class extends f(t=>(e,s)=>{t.name("shiny-button"),t.styles(A,e.theme,lr);let o=t.attrs.spec({disabled:Boolean,hidden:Boolean});return h`
|
|
233
|
+
<button
|
|
234
|
+
part=button
|
|
235
|
+
?disabled="${o.disabled}"
|
|
236
|
+
?hidden="${o.hidden}">
|
|
237
|
+
<slot>${s}</slot>
|
|
238
|
+
</button>
|
|
239
|
+
`}).component(S).props(t=>[t.context]){};var cr=p`@layer view {
|
|
32
240
|
|
|
33
241
|
button {
|
|
34
242
|
background: transparent;
|
|
@@ -70,29 +278,19 @@ svg {
|
|
|
70
278
|
height: 1em;
|
|
71
279
|
}
|
|
72
280
|
|
|
73
|
-
}`;var A=
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
${W}
|
|
78
|
-
|
|
79
|
-
@layer overlay {
|
|
80
|
-
[hidden] { display: none !important; }
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
`;var k=class extends z{context};var ye=_`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-clipboard"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2" /><path d="M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z" /></svg>`;var rr=_`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" class="icon icon-tabler icons-tabler-filled icon-tabler-clipboard-x"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M17.997 4.17a3 3 0 0 1 2.003 2.83v12a3 3 0 0 1 -3 3h-10a3 3 0 0 1 -3 -3v-12a3 3 0 0 1 2.003 -2.83a4 4 0 0 0 3.997 3.83h4a4 4 0 0 0 3.98 -3.597zm-7.29 7.123a1 1 0 0 0 -1.414 0l-.083 .094a1 1 0 0 0 .083 1.32l1.292 1.293l-1.292 1.293a1 1 0 0 0 0 1.414l.094 .083a1 1 0 0 0 1.32 -.083l1.293 -1.293l1.293 1.293a1 1 0 0 0 1.414 0l.083 -.094a1 1 0 0 0 -.083 -1.32l-1.293 -1.293l1.293 -1.293a1 1 0 0 0 0 -1.414l-.094 -.083a1 1 0 0 0 -1.32 .083l-1.293 1.292zm3.293 -9.293a2 2 0 1 1 0 4h-4a2 2 0 1 1 0 -4z" /></svg>`;var sr=_`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" class="icon icon-tabler icons-tabler-filled icon-tabler-clipboard-check"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M17.997 4.17a3 3 0 0 1 2.003 2.83v12a3 3 0 0 1 -3 3h-10a3 3 0 0 1 -3 -3v-12a3 3 0 0 1 2.003 -2.83a4 4 0 0 0 3.997 3.83h4a4 4 0 0 0 3.98 -3.597zm-3.704 7.123l-3.293 3.292l-1.293 -1.292a1 1 0 1 0 -1.414 1.414l2 2a1 1 0 0 0 1.414 0l4 -4a1 1 0 0 0 -1.414 -1.414m-.293 -9.293a2 2 0 1 1 0 4h-4a2 2 0 1 1 0 -4z" /></svg>`;var Jt=class extends g(t=>(e,s,o=1e3)=>{t.name("shiny-copy"),t.styles(A,e.theme,er);let i=()=>s===void 0?"invalid":"neutral",n=t.signal(i()),l=t.once(()=>P(o,()=>n.set(i()))),a=t.once(()=>async c=>{await n.set(c),await l()});async function u(){if(s!==void 0)try{await navigator.clipboard.writeText(s),await a("good")}catch(c){console.error(c),await a("bad")}}let d=(()=>{switch(n.get()){case"neutral":return ye;case"invalid":return ye;case"good":return sr;case"bad":return rr;default:throw new Error("invalid copy status")}})();return f`
|
|
84
|
-
<button data-status="${n.get()}" @click="${u}">
|
|
85
|
-
${d}
|
|
281
|
+
}`;var ye=C`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-clipboard"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2" /><path d="M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z" /></svg>`;var pr=C`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" class="icon icon-tabler icons-tabler-filled icon-tabler-clipboard-x"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M17.997 4.17a3 3 0 0 1 2.003 2.83v12a3 3 0 0 1 -3 3h-10a3 3 0 0 1 -3 -3v-12a3 3 0 0 1 2.003 -2.83a4 4 0 0 0 3.997 3.83h4a4 4 0 0 0 3.98 -3.597zm-7.29 7.123a1 1 0 0 0 -1.414 0l-.083 .094a1 1 0 0 0 .083 1.32l1.292 1.293l-1.292 1.293a1 1 0 0 0 0 1.414l.094 .083a1 1 0 0 0 1.32 -.083l1.293 -1.293l1.293 1.293a1 1 0 0 0 1.414 0l.083 -.094a1 1 0 0 0 -.083 -1.32l-1.293 -1.293l1.293 -1.293a1 1 0 0 0 0 -1.414l-.094 -.083a1 1 0 0 0 -1.32 .083l-1.293 1.292zm3.293 -9.293a2 2 0 1 1 0 4h-4a2 2 0 1 1 0 -4z" /></svg>`;var hr=C`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" class="icon icon-tabler icons-tabler-filled icon-tabler-clipboard-check"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M17.997 4.17a3 3 0 0 1 2.003 2.83v12a3 3 0 0 1 -3 3h-10a3 3 0 0 1 -3 -3v-12a3 3 0 0 1 2.003 -2.83a4 4 0 0 0 3.997 3.83h4a4 4 0 0 0 3.98 -3.597zm-3.704 7.123l-3.293 3.292l-1.293 -1.292a1 1 0 1 0 -1.414 1.414l2 2a1 1 0 0 0 1.414 0l4 -4a1 1 0 0 0 -1.414 -1.414m-.293 -9.293a2 2 0 1 1 0 4h-4a2 2 0 1 1 0 -4z" /></svg>`;var Gt=class extends f(t=>(e,s,o=1e3)=>{t.name("shiny-copy"),t.styles(A,e.theme,cr);let i=()=>s===void 0?"invalid":"neutral",n=t.signal(i()),l=t.once(()=>O(o,()=>n.set(i()))),a=t.once(()=>async c=>{await n.set(c),await l()});async function d(){if(s!==void 0)try{if(t.attrs.booleans.fail)throw new Error("copy failed on purpose for testing purposes");await navigator.clipboard.writeText(s),await a("good")}catch(c){console.error(c),await a("bad")}}let b=(()=>{switch(n.get()){case"neutral":return ye;case"invalid":return ye;case"good":return hr;case"bad":return pr;default:throw new Error("unknown copy status")}})();return h`
|
|
282
|
+
<button data-status="${n.get()}" @click="${d}">
|
|
283
|
+
${b}
|
|
86
284
|
</button>
|
|
87
|
-
`}).component(class extends
|
|
285
|
+
`}).component(class extends S{#t=u.attrs(this).spec({text:String,ms:Number});get text(){return this.#t.text}set text(t){this.#t.text=t}get ms(){return this.#t.ms}set ms(t){this.#t.ms=t}}).props(t=>[t.context,t.text,t.ms]){};var dr=p`@layer view {
|
|
88
286
|
|
|
89
287
|
:host {
|
|
90
288
|
display: block;
|
|
91
289
|
width: 100%;
|
|
92
290
|
height: 100%;
|
|
93
291
|
--button-size: 2em;
|
|
94
|
-
--anim-duration: 200ms;
|
|
95
292
|
--blanket-backdrop-filter: blur(0.5em);
|
|
293
|
+
--slate-hidden-opacity: 1;
|
|
96
294
|
--blanket-bg: color-mix(in oklab, transparent, var(--bg));
|
|
97
295
|
}
|
|
98
296
|
|
|
@@ -136,12 +334,15 @@ ${W}
|
|
|
136
334
|
height: auto;
|
|
137
335
|
max-height: 100%;
|
|
138
336
|
|
|
139
|
-
opacity: 1;
|
|
140
337
|
transform: translateX(-100%);
|
|
141
338
|
will-change: opacity, transform;
|
|
142
339
|
transition: all var(--anim-duration) ease;
|
|
143
340
|
|
|
144
|
-
>
|
|
341
|
+
> [part="slate"] {
|
|
342
|
+
opacity: var(--slate-hidden-opacity);
|
|
343
|
+
will-change: opacity;
|
|
344
|
+
transition: opacity var(--anim-duration) ease;
|
|
345
|
+
|
|
145
346
|
display: block;
|
|
146
347
|
height: 100%;
|
|
147
348
|
overflow-y: auto;
|
|
@@ -194,239 +395,349 @@ ${W}
|
|
|
194
395
|
opacity: 1;
|
|
195
396
|
}
|
|
196
397
|
[part="tray"] {
|
|
197
|
-
opacity: 1;
|
|
198
398
|
transform: translateX(0%);
|
|
399
|
+
> [part="slate"] {
|
|
400
|
+
opacity: 1;
|
|
401
|
+
}
|
|
199
402
|
}
|
|
200
403
|
}
|
|
201
404
|
}
|
|
202
405
|
|
|
203
|
-
}`;var
|
|
204
|
-
|
|
205
|
-
|
|
406
|
+
}`;var xt=class{$open=w(!1);constructor(t=!1){t&&this.$open.set(!0)}get isOpen(){return this.$open.get()}async setOpen(t){return this.$open.set(t)}open=async()=>{await this.setOpen(!0)};close=async()=>{await this.setOpen(!1)};toggle=async()=>this.setOpen(!this.isOpen)};var te=class{#t;constructor(t){this.#t=t.attachInternals().states}assign(...t){this.#t.forEach(e=>this.#t.delete(e));for(let e of t)this.#t.add(e);return this}};var ur=C`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-x"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 6l-12 12" /><path d="M6 6l12 12" /></svg>`;var mr=C`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-menu-2"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 6l16 0" /><path d="M4 12l16 0" /><path d="M4 18l16 0" /></svg>`;var ee=class extends f(t=>(e,s)=>{t.name("shiny-drawer"),t.styles(A,e.theme,dr);let o=t.once(()=>new te(t.element)),i=s.button??t.attrs.booleans.button,n=s.side??(t.attrs.strings.side==="right"?"right":"left"),l=t.once(()=>s.control??new xt);o.assign(n),t.mount(()=>u.events(window,{keydown:d=>{d.code==="Escape"&&l.close()}})),u.attrs(t.element).booleans.open=l.isOpen;function a(){return h`
|
|
407
|
+
<button @click="${l.toggle}">
|
|
408
|
+
${l.isOpen?h`
|
|
409
|
+
<slot name=button-x>
|
|
410
|
+
${ur}
|
|
411
|
+
</slot>
|
|
412
|
+
`:h`
|
|
413
|
+
<slot name=button>
|
|
414
|
+
${mr}
|
|
415
|
+
</slot>
|
|
416
|
+
`}
|
|
417
|
+
</button>
|
|
418
|
+
`}return h`
|
|
419
|
+
<div class=shell ?data-open="${l.isOpen}" data-side="${n}">
|
|
420
|
+
<slot name=plate ?inert="${l.isOpen}"></slot>
|
|
206
421
|
|
|
207
422
|
<div class=clipper>
|
|
208
|
-
<div part=blanket @click="${
|
|
423
|
+
<div part=blanket @click="${l.close}" ?inert="${!l.isOpen}"></div>
|
|
209
424
|
|
|
210
425
|
<div part=tray>
|
|
211
|
-
<slot ?inert="${!
|
|
212
|
-
|
|
213
|
-
${s.button?f`
|
|
214
|
-
<button @click="${n.toggle}">
|
|
215
|
-
${n.isOpen?f`
|
|
216
|
-
<slot name=button-x>
|
|
217
|
-
${ir}
|
|
218
|
-
</slot>
|
|
219
|
-
`:f`
|
|
220
|
-
<slot name=button>
|
|
221
|
-
${nr}
|
|
222
|
-
</slot>
|
|
223
|
-
`}
|
|
224
|
-
</button>
|
|
225
|
-
`:null}
|
|
426
|
+
<slot part=slate ?inert="${!l.isOpen}"></slot>
|
|
427
|
+
${i?a():null}
|
|
226
428
|
</div>
|
|
227
429
|
</div>
|
|
228
430
|
</div>
|
|
229
|
-
`}).component(class extends
|
|
431
|
+
`}).component(class extends S{#t=u.attrs(this).spec({open:Boolean,button:Boolean,side:String});get button(){return this.#t.button}set button(t){this.#t.button=t}get side(){return this.#t.side==="right"?"right":"left"}set side(t){this.#t.side=t}control=new xt(this.#t.open);get isOpen(){return this.control.isOpen}get toggle(){return this.control.toggle}get open(){return this.control.open}get close(){return this.control.close}}).props(t=>[t.context,{control:t.control}]){};var fr=p`@layer view {
|
|
230
432
|
|
|
231
433
|
button {
|
|
232
434
|
padding: 1em;
|
|
233
435
|
min-width: 4em;
|
|
234
436
|
}
|
|
235
437
|
|
|
236
|
-
}`;var
|
|
438
|
+
}`;var re=class extends f(t=>(e,s)=>{t.name("shiny-example"),t.styles(A,e.theme,fr);let o=t.signal(s);return h`
|
|
237
439
|
<button @click="${()=>{o.value++}}">
|
|
238
440
|
${o()}
|
|
239
441
|
</button>
|
|
240
|
-
`}).component(class extends
|
|
241
|
-
|
|
242
|
-
}`;var q=class{length=1;$index=w(0);constructor(t=0){this.$index.value=t}#t(t){return t=Math.min(t,this.length-1),t=Math.max(t,0),t}get index(){return this.#t(this.$index.get())}async setIndex(t){return this.$index.set(t)}async shimmy(t){let e=this.#t(this.index+t);return this.setIndex(e)}};var te=class extends g(t=>(e,s)=>{t.name("shiny-tabs"),t.styles(A,e.theme,lr);let o=t.attrs.spec({index:Number}),i=t.once(()=>s??new q(o.index??0)),n=t.signal([]),l=t.signal([]);async function a(d){let c=d.currentTarget;await n.set(c.assignedElements())}async function u(d){let c=d.currentTarget;await l.set(c.assignedElements())}o.index=i.$index(),i.length=n().length;for(let[d,c]of n().entries()){let y=d===i.index;p.attrs(c).booleans.active=y,p.attrs(c).booleans.disabled=y,c.onclick=()=>i.setIndex(d)}for(let[d,c]of l().entries()){let y=d===i.index;p.attrs(c).booleans.active=y,p.attrs(c).booleans.hidden=!y}return f`
|
|
243
|
-
<slot part=tabs @slotchange="${a}"></slot>
|
|
244
|
-
<slot part=panels name=panel @slotchange="${u}"></slot>
|
|
245
|
-
`}).component(class extends k{control=new q;get index(){return this.control.index}get length(){return this.control.length}setIndex=this.control.setIndex.bind(this.control);shimmy=this.control.shimmy.bind(this.control)}).props(t=>[t.context,t.control]){};var cr={ShinyCopy:Jt,ShinyDrawer:Qt,ShinyExample:Gt,ShinyTabs:te};function ee(r){let t=tr(r,cr),e=Ge(t);return{components:t,views:e}}function re(){return{bg:"#111",alpha:"#afa",happy:"#0fa",sad:"#74f",angry:"#f50",lame:"#8888","inactive-opacity":"0.5"}}function se(r){return $t(Object.entries(r).map(([t,e])=>`--${t}: var(--shiny-${t}, ${e});`).join(`
|
|
246
|
-
`))}var pr=m`@layer overlay {
|
|
442
|
+
`}).component(class extends S{attrs=u.attrs(this).spec({start:Number})}).props(t=>[t.context,t.attrs.start??1]){};var gr=p`@layer view {
|
|
247
443
|
|
|
248
444
|
:host {
|
|
249
|
-
display:
|
|
250
|
-
|
|
251
|
-
${se({...re()})}
|
|
445
|
+
display: inline-flex;
|
|
446
|
+
flex-direction: column;
|
|
252
447
|
}
|
|
253
448
|
|
|
254
|
-
|
|
255
|
-
display:
|
|
449
|
+
slot[part="tabs"] {
|
|
450
|
+
display: flex;
|
|
256
451
|
|
|
257
|
-
&::
|
|
258
|
-
|
|
259
|
-
background: linear-gradient(
|
|
260
|
-
to top right,
|
|
261
|
-
#00a9dd69,
|
|
262
|
-
#70ffd77a
|
|
263
|
-
);
|
|
452
|
+
&::slotted(*) {
|
|
453
|
+
border-radius: 0.3em;
|
|
264
454
|
}
|
|
265
|
-
}
|
|
266
455
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
456
|
+
&::slotted([data-active]) {
|
|
457
|
+
opacity: 1;
|
|
458
|
+
color: currentColor;
|
|
459
|
+
text-decoration: underline;
|
|
270
460
|
}
|
|
271
|
-
}
|
|
272
461
|
|
|
273
|
-
:
|
|
274
|
-
|
|
275
|
-
border-bottom-left-radius: 0.5em;
|
|
462
|
+
&::slotted(:not([data-last], [data-next-is-active])) {
|
|
463
|
+
border-right: none;
|
|
276
464
|
}
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
:host([view="shiny-tabs"]) {
|
|
280
|
-
display: block;
|
|
281
465
|
|
|
282
|
-
&::
|
|
283
|
-
|
|
466
|
+
&::slotted([data-active]:not([data-first])) {
|
|
467
|
+
border-left: none;
|
|
284
468
|
}
|
|
285
|
-
}
|
|
286
469
|
|
|
287
|
-
|
|
470
|
+
&::slotted(:not([data-last])) {
|
|
471
|
+
border-top-right-radius: 0;
|
|
472
|
+
border-bottom-right-radius: 0;
|
|
473
|
+
}
|
|
288
474
|
|
|
289
|
-
:
|
|
290
|
-
|
|
291
|
-
|
|
475
|
+
&::slotted(:not([data-first])) {
|
|
476
|
+
border-top-left-radius: 0;
|
|
477
|
+
border-bottom-left-radius: 0;
|
|
478
|
+
}
|
|
292
479
|
}
|
|
293
480
|
|
|
294
|
-
}`;var
|
|
481
|
+
} `;var E=class{length=1;$index=w(0);constructor(t=0){this.$index.value=t}clamp(t){return t=Math.min(t,this.length-1),t=Math.max(t,0),t}get index(){return this.clamp(this.$index.get())}async setIndex(t){return this.$index.set(t)}async shimmy(t){let e=this.clamp(this.index+t);return this.setIndex(e)}};var se=class extends f(t=>(e,s)=>{t.name("shiny-tabs"),t.styles(A,e.theme,gr);let o=t.attrs.spec({index:Number}),i=t.once(()=>s??new E(o.index??0)),n=t.signal([]),l=t.signal([]);async function a(c){let g=c.currentTarget;await n.set(g.assignedElements())}async function d(c){let g=c.currentTarget;await l.set(g.assignedElements())}o.index=i.$index(),i.length=n().length;function b(c,g){let v=i.clamp(c+g);return v===c?!1:v===i.index}for(let[c,g]of n().entries()){let v=c===i.index,k=u.attrs(g);k.booleans.disabled=v,k.booleans["data-active"]=v,k.booleans["data-first"]=c===0,k.booleans["data-last"]=c===i.length-1,k.booleans["data-next-is-active"]=b(c,1),k.booleans["data-previous-is-active"]=b(c,-1),g.onclick=()=>i.setIndex(c)}for(let[c,g]of l().entries()){let v=c===i.index;u.attrs(g).booleans.active=v,u.attrs(g).booleans.hidden=!v}return h`
|
|
482
|
+
<slot part=tabs @slotchange="${a}"></slot>
|
|
483
|
+
<slot part=panels name=panel @slotchange="${d}"></slot>
|
|
484
|
+
`}).component(class extends S{control=new E;get index(){return this.control.index}get length(){return this.control.length}setIndex=this.control.setIndex.bind(this.control);shimmy=this.control.shimmy.bind(this.control)}).props(t=>[t.context,t.control]){};var br={ShinyButton:Qt,ShinyCopy:Gt,ShinyDrawer:ee,ShinyExample:re,ShinyTabs:se};function xe(r){let t=sr(r,br),e=rr(t);return{components:t,views:e}}var T=xe({theme:nr}).views,we=[["aura",T],["plain",xe({theme:ar}).views]];var yr=p`@layer view {
|
|
295
485
|
|
|
296
486
|
:host {
|
|
297
|
-
position: relative;
|
|
298
|
-
|
|
299
487
|
display: flex;
|
|
300
488
|
flex-wrap: wrap;
|
|
301
|
-
|
|
302
|
-
padding: 1em;
|
|
303
|
-
border-radius: 0.5em;
|
|
304
|
-
gap: 1em;
|
|
305
|
-
|
|
306
|
-
background: linear-gradient(to right top, #252dd985, #aa6affbd);
|
|
307
|
-
backdrop-filter: blur(0.5em);
|
|
308
|
-
|
|
309
|
-
box-shadow: 0 0 5em #5d1fadaa;
|
|
310
|
-
border-top: 2px solid #fff4;
|
|
311
|
-
|
|
312
|
-
&::before {
|
|
313
|
-
content: "";
|
|
314
|
-
display: block;
|
|
315
|
-
position: absolute;
|
|
316
|
-
inset: 0;
|
|
317
|
-
border-radius: 0.5em;
|
|
318
|
-
background: #0007;
|
|
319
|
-
width: calc(100% - 0.3em);
|
|
320
|
-
height: calc(100% - 0.3em);
|
|
321
|
-
margin: auto;
|
|
322
|
-
z-index: 0;
|
|
323
|
-
}
|
|
489
|
+
gap: 0.5em;
|
|
324
490
|
|
|
325
491
|
> * {
|
|
326
|
-
|
|
327
|
-
|
|
492
|
+
flex: 1 1 0;
|
|
493
|
+
min-width: 0;
|
|
328
494
|
}
|
|
329
495
|
}
|
|
330
496
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
497
|
+
.meta {
|
|
498
|
+
display: flex;
|
|
499
|
+
flex-direction: column;
|
|
500
|
+
gap: 1em;
|
|
335
501
|
}
|
|
336
502
|
|
|
337
|
-
.
|
|
338
|
-
flex: 1
|
|
503
|
+
.snippet {
|
|
504
|
+
flex: 1 0 auto;
|
|
339
505
|
display: flex;
|
|
340
506
|
flex-direction: column;
|
|
341
507
|
gap: 0.5em;
|
|
508
|
+
padding: 0.5em;
|
|
342
509
|
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
.codes {
|
|
348
|
-
display: flex;
|
|
349
|
-
flex-direction: column;
|
|
350
|
-
gap: 0.2em;
|
|
351
|
-
}
|
|
510
|
+
background: #0002;
|
|
511
|
+
box-shadow: inset 0.2em 0.3em 2em #0004;
|
|
512
|
+
border-radius: 0.5em;
|
|
352
513
|
|
|
353
|
-
|
|
514
|
+
> header {
|
|
354
515
|
display: flex;
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
border-bottom: 1px solid #fff2;
|
|
358
|
-
box-shadow: inset 0.2em 0.3em 2em #0004;
|
|
516
|
+
flex-wrap: wrap;
|
|
517
|
+
align-items: center;
|
|
359
518
|
|
|
360
|
-
.
|
|
519
|
+
[view="shiny-copy"] { font-size: 1.5em; }
|
|
520
|
+
[view="shiny-tabs"] {
|
|
361
521
|
flex: 1 1 auto;
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
h3 {
|
|
367
|
-
opacity: 0.4;
|
|
368
|
-
font-size: 0.7em;
|
|
369
|
-
font-weight: normal;
|
|
370
|
-
font-style: italic;
|
|
371
|
-
}
|
|
522
|
+
font-size: 0.8em;
|
|
523
|
+
color: color-mix(in oklab, transparent, currentColor 50%);
|
|
524
|
+
}
|
|
525
|
+
}
|
|
372
526
|
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
white-space: pre;
|
|
376
|
-
text-wrap: wrap;
|
|
377
|
-
tab-size: 2;
|
|
378
|
-
word-break: break-word;
|
|
527
|
+
> code {
|
|
528
|
+
display: block;
|
|
379
529
|
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
530
|
+
white-space: pre;
|
|
531
|
+
text-wrap: wrap;
|
|
532
|
+
tab-size: 2;
|
|
533
|
+
word-break: keep-all;
|
|
534
|
+
overflow: auto;
|
|
385
535
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
padding: 0.2em;
|
|
390
|
-
}
|
|
536
|
+
color: var(--code);
|
|
537
|
+
font-size: 0.8em;
|
|
538
|
+
font-family: monospace;
|
|
391
539
|
}
|
|
392
540
|
}
|
|
393
541
|
|
|
394
|
-
.
|
|
395
|
-
flex: 1 1 10rem;
|
|
542
|
+
.box {
|
|
396
543
|
display: flex;
|
|
397
|
-
flex-
|
|
544
|
+
flex-wrap: wrap;
|
|
398
545
|
justify-content: center;
|
|
399
546
|
align-items: center;
|
|
547
|
+
align-content: center;
|
|
548
|
+
|
|
549
|
+
gap: 0.5em;
|
|
550
|
+
padding: 1em;
|
|
400
551
|
|
|
401
|
-
padding: 1rem;
|
|
402
552
|
border-radius: 0.5rem;
|
|
403
|
-
border: 1px dashed
|
|
553
|
+
border: 1px dashed color-mix(in oklab, transparent, currentColor 30%);
|
|
554
|
+
|
|
555
|
+
p.lipsum {
|
|
556
|
+
opacity: 0.7;
|
|
557
|
+
font-family: serif;
|
|
558
|
+
font-style: italic;
|
|
559
|
+
}
|
|
404
560
|
}
|
|
405
561
|
|
|
406
|
-
}`;var
|
|
407
|
-
<div class=codeblock slot=panel>
|
|
408
|
-
<div class=zone>
|
|
409
|
-
<h3>${s}</h3>
|
|
410
|
-
<code>${i}</code>
|
|
411
|
-
</div>
|
|
412
|
-
${rt.ShinyCopy(i)}
|
|
413
|
-
</div>
|
|
414
|
-
`}return f`
|
|
562
|
+
}`;var xr=f(r=>(t,e,s)=>{r.name(`exhibit-${t.label}`),r.styles(A,yr,s,t.style);let o=r.once(()=>new E),i=t.snippets.at(o.index),n=i?Le(i.code).trim():"";return h`
|
|
415
563
|
<div class=meta>
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
564
|
+
${t.explain}
|
|
565
|
+
|
|
566
|
+
<div class=snippet>
|
|
567
|
+
<header>
|
|
568
|
+
${T.ShinyTabs.props(o).children(t.snippets.map(l=>T.ShinyButton.props().attr("plain").children(l.label).render())).render()}
|
|
569
|
+
${T.ShinyCopy(n)}
|
|
570
|
+
</header>
|
|
571
|
+
<code>${n}</code>
|
|
572
|
+
</div>
|
|
424
573
|
</div>
|
|
425
574
|
|
|
426
|
-
<div class=
|
|
427
|
-
${t.
|
|
575
|
+
<div class=box>
|
|
576
|
+
${t.presentation(e)}
|
|
428
577
|
</div>
|
|
429
|
-
`});var
|
|
578
|
+
`});var H=f(r=>t=>{r.name(`showcase-${t.name}`),r.styles(A,ir);let e=r.once(()=>new E),s=r.once(()=>new E),o=we.at(s.index)[1],i=t.exhibits.at(e.index);return h`
|
|
579
|
+
<header>
|
|
580
|
+
<h2>✨shiny-${t.name}✨</h2>
|
|
581
|
+
<nav>
|
|
582
|
+
${T.ShinyTabs.props(e).children(t.exhibits.map(n=>T.ShinyButton.props().attr("sad").children(n.label).render())).render()}
|
|
583
|
+
${T.ShinyTabs.props(s).children(we.map(([n])=>T.ShinyButton.props().children(n).render())).render()}
|
|
584
|
+
</nav>
|
|
585
|
+
</header>
|
|
586
|
+
|
|
587
|
+
${xr(i,o,t.style)}
|
|
588
|
+
`});var wr=`
|
|
589
|
+
shiny-copy {
|
|
590
|
+
font-size: 1em;
|
|
591
|
+
--happy: #0fa;
|
|
592
|
+
--angry: #f50;
|
|
593
|
+
--lame: #8888;
|
|
594
|
+
--inactive-opacity: 0.5;
|
|
595
|
+
}
|
|
596
|
+
`,vr=()=>H({name:"copy",style:p`
|
|
597
|
+
.box {
|
|
598
|
+
> * { font-size: 4em; }
|
|
599
|
+
}
|
|
600
|
+
`,exhibits:[{label:"succeed",explain:h`<p>click-to-copy text button.</p>`,snippets:[{label:"html",code:'<shiny-copy text="hello world"></shiny-button>'},{label:"view",code:'ShinyCopy("hello world")'},{label:"css",code:wr}],style:p``,presentation:r=>h`
|
|
601
|
+
${r.ShinyCopy("hello world")}
|
|
602
|
+
`},{label:"fail",explain:h`<p>copy text button, deliberately fails so you can see.</p>`,snippets:[{label:"html",code:"<shiny-copy fail></shiny-button>"},{label:"view",code:'ShinyCopy.props("").attr("fail").render()'},{label:"css",code:wr}],style:p``,presentation:r=>h`
|
|
603
|
+
${r.ShinyCopy.props("").attr("fail").render()}
|
|
604
|
+
`}]});var es=N(),rs=N(),ss=N(),os=`
|
|
605
|
+
shiny-tabs {
|
|
606
|
+
&::part(tabs) {}
|
|
607
|
+
&::part(panels) {}
|
|
608
|
+
> shiny-button {}
|
|
609
|
+
}
|
|
610
|
+
`,$r=()=>H({name:"tabs",style:p`
|
|
611
|
+
.box {
|
|
612
|
+
place-content: start start;
|
|
613
|
+
p { margin-top: 0.5em; }
|
|
614
|
+
}
|
|
615
|
+
`,exhibits:[{label:"tabs",explain:h`<p>button bar. panels optional.</p>`,snippets:[{label:"html",code:`
|
|
616
|
+
<shiny-tabs>
|
|
617
|
+
<shiny-button>tab1</shiny-button>
|
|
618
|
+
<shiny-button>tab2</shiny-button>
|
|
619
|
+
<shiny-button>tab3</shiny-button>
|
|
620
|
+
<div slot=panel>panel1</div>
|
|
621
|
+
<div slot=panel>panel2</div>
|
|
622
|
+
<div slot=panel>panel3</div>
|
|
623
|
+
</shiny-tabs>
|
|
624
|
+
`},{label:"view",code:`
|
|
625
|
+
ShinyTabs
|
|
626
|
+
.props()
|
|
627
|
+
.children(html\`
|
|
628
|
+
\${ShinyButton.props().children("tab1").render()}
|
|
629
|
+
\${ShinyButton.props().children("tab2").render()}
|
|
630
|
+
\${ShinyButton.props().children("tab3").render()}
|
|
631
|
+
<div slot=panel>panel1</div>
|
|
632
|
+
<div slot=panel>panel2</div>
|
|
633
|
+
<div slot=panel>panel3</div>
|
|
634
|
+
\`)
|
|
635
|
+
.render()
|
|
636
|
+
`},{label:"css",code:os}],style:p``,presentation:r=>h`
|
|
637
|
+
${r.ShinyTabs.props().children(h`
|
|
638
|
+
${r.ShinyButton.props().children("tab1").render()}
|
|
639
|
+
${r.ShinyButton.props().children("tab2").render()}
|
|
640
|
+
${r.ShinyButton.props().children("tab3").render()}
|
|
641
|
+
<p slot=panel class=lipsum>${es}</p>
|
|
642
|
+
<p slot=panel class=lipsum>${rs}</p>
|
|
643
|
+
<p slot=panel class=lipsum>${ss}</p>
|
|
644
|
+
`).render()}
|
|
645
|
+
`}]});var ve=`
|
|
646
|
+
shiny-button {
|
|
647
|
+
--padding: 0.3em;
|
|
648
|
+
font-size: 1em;
|
|
649
|
+
color: currentColor;
|
|
650
|
+
background: transparent;
|
|
651
|
+
}
|
|
652
|
+
`,_r=()=>H({name:"button",style:p`
|
|
653
|
+
.box {
|
|
654
|
+
> * { font-size: 1.5em; }
|
|
655
|
+
}
|
|
656
|
+
`,exhibits:[{label:"basic",explain:h`<p>clicky-clacky pressy button.</p>`,snippets:[{label:"html",code:"<shiny-button>button</shiny-button>"},{label:"view",code:'ShinyButton("button")'},{label:"css",code:ve}],style:p``,presentation:r=>h`
|
|
657
|
+
${r.ShinyButton.props().children("button").render()}
|
|
658
|
+
`},{label:"gradient",explain:h`<p>added <code>gradient</code> attribute.</p>`,snippets:[{label:"html",code:"<shiny-button gradient>button</shiny-button>"},{label:"view",code:`
|
|
659
|
+
ShinyButton
|
|
660
|
+
.props("button")
|
|
661
|
+
.attr("gradient")
|
|
662
|
+
.render()
|
|
663
|
+
`},{label:"css",code:ve}],style:p``,presentation:r=>h`
|
|
664
|
+
${r.ShinyButton.props().attr("gradient").children("button").render()}
|
|
665
|
+
`},{label:"catalog",explain:h`<p>clicky-clacky pressy buttons.</p>`,snippets:[{label:"html",code:`
|
|
666
|
+
<shiny-button calm gradient>calm</shiny-button>
|
|
667
|
+
<shiny-button angry gradient>angry</shiny-button>
|
|
668
|
+
<shiny-button happy gradient>happy</shiny-button>
|
|
669
|
+
<shiny-button zesty gradient>zesty</shiny-button>
|
|
670
|
+
<shiny-button sad gradient>sad</shiny-button>
|
|
671
|
+
<shiny-button quirky gradient>quirky</shiny-button>
|
|
672
|
+
<shiny-button plain gradient>plain</shiny-button>
|
|
673
|
+
`},{label:"view",code:`
|
|
674
|
+
[
|
|
675
|
+
ShinyButton.props().attr("calm").attr("gradient").children("calm").render(),
|
|
676
|
+
ShinyButton.props().attr("angry").attr("gradient").children("angry").render(),
|
|
677
|
+
ShinyButton.props().attr("happy").attr("gradient").children("happy").render(),
|
|
678
|
+
ShinyButton.props().attr("zesty").attr("gradient").children("zesty").render(),
|
|
679
|
+
ShinyButton.props().attr("sad").attr("gradient").children("sad").render(),
|
|
680
|
+
ShinyButton.props().attr("quirky").attr("gradient").children("quirky").render(),
|
|
681
|
+
ShinyButton.props().attr("plain").children("plain").render(),
|
|
682
|
+
]
|
|
683
|
+
`},{label:"css",code:ve}],style:p``,presentation:r=>[r.ShinyButton.props().attr("calm").attr("gradient").children("calm").render(),r.ShinyButton.props().attr("angry").attr("gradient").children("angry").render(),r.ShinyButton.props().attr("happy").attr("gradient").children("happy").render(),r.ShinyButton.props().attr("zesty").attr("gradient").children("zesty").render(),r.ShinyButton.props().attr("sad").attr("gradient").children("sad").render(),r.ShinyButton.props().attr("quirky").attr("gradient").children("quirky").render(),r.ShinyButton.props().attr("plain").children("plain").render()]}]});var is=N(),ns=N(),as=N(),ls=`
|
|
684
|
+
shiny-drawer {
|
|
685
|
+
--button-size: 2em;
|
|
686
|
+
--anim-duration: 200ms;
|
|
687
|
+
--slate-hidden-opacity: 1;
|
|
688
|
+
--blanket-backdrop-filter: blur(0.5em);
|
|
689
|
+
--blanket-bg: color-mix(
|
|
690
|
+
in oklab,
|
|
691
|
+
transparent,
|
|
692
|
+
var(--bg)
|
|
693
|
+
);
|
|
694
|
+
}
|
|
695
|
+
`,Ar=r=>({label:r,explain:h`<p>slide-out panel. button optional.</p>`,snippets:[{label:"html",code:`
|
|
696
|
+
<shiny-drawer button side=${r}>
|
|
697
|
+
<header>example</header>
|
|
698
|
+
<section slot=plate>lorem kettlebell..</section>
|
|
699
|
+
</shiny-drawer>
|
|
700
|
+
`},{label:"view",code:`
|
|
701
|
+
ShinyDrawer
|
|
702
|
+
.props({button: true, side: "${r}"})
|
|
703
|
+
.children(html\`
|
|
704
|
+
<header>example</header>
|
|
705
|
+
<section slot=plate>lorem kettlebell..</section>
|
|
706
|
+
\`)
|
|
707
|
+
.render()
|
|
708
|
+
`},{label:"css",code:ls}],style:p``,presentation:t=>h`
|
|
709
|
+
${t.ShinyDrawer.props({button:!0,side:r}).children(h`
|
|
710
|
+
<header>
|
|
711
|
+
<h2>example drawer</h2>
|
|
712
|
+
<p>you can put any content in here.</p>
|
|
713
|
+
<p class=lipsum>${is}</p>
|
|
714
|
+
</header>
|
|
715
|
+
<section slot=plate>
|
|
716
|
+
<p class=lipsum>${ns}</p>
|
|
717
|
+
<p class=lipsum>${as}</p>
|
|
718
|
+
</section>
|
|
719
|
+
`).render()}
|
|
720
|
+
`}),Sr=()=>H({name:"drawer",style:p`
|
|
721
|
+
.box sly-view {
|
|
722
|
+
border-radius: 0.5em;
|
|
723
|
+
overflow: hidden;
|
|
724
|
+
--button-size: 3em;
|
|
725
|
+
|
|
726
|
+
header {
|
|
727
|
+
> * + * { margin-top: 0.5em; }
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
section {
|
|
731
|
+
display: flex;
|
|
732
|
+
flex-direction: column;
|
|
733
|
+
justify-content: center;
|
|
734
|
+
min-height: 100%;
|
|
735
|
+
padding: 1em;
|
|
736
|
+
padding-top: 3em;
|
|
737
|
+
> * + * { margin-top: 0.5em; }
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
`,exhibits:[Ar("left"),Ar("right")]});u.register({ShinyDemo:f.component(r=>(r.styles(p`
|
|
430
741
|
:host {
|
|
431
742
|
display: flex;
|
|
432
743
|
flex-direction: column;
|
|
@@ -445,136 +756,11 @@ p.lipsum {
|
|
|
445
756
|
font-style: italic;
|
|
446
757
|
}
|
|
447
758
|
|
|
448
|
-
[view="
|
|
759
|
+
[view="demo-tabs"] {
|
|
449
760
|
display: flex;
|
|
450
761
|
}
|
|
451
762
|
}
|
|
452
|
-
`)
|
|
453
|
-
<p>click-to-copy text button.</p>
|
|
454
|
-
`,snippets:[[C.html,`
|
|
455
|
-
<shiny-copy text="hello world"></shiny-copy>
|
|
456
|
-
`],[C.view,`
|
|
457
|
-
ShinyCopy("hello world")
|
|
458
|
-
`],[C.css,`
|
|
459
|
-
shiny-copy {
|
|
460
|
-
font-size: 1em;
|
|
461
|
-
--happy: #0fa;
|
|
462
|
-
--angry: #f50;
|
|
463
|
-
--lame: #8888;
|
|
464
|
-
--inactive-opacity: 0.5;
|
|
465
|
-
}
|
|
466
|
-
`]],content:s.ShinyCopy("hello world"),style:m`
|
|
467
|
-
.content sly-view {
|
|
468
|
-
font-size: 4em;
|
|
469
|
-
}
|
|
470
|
-
`}),oe({name:"shiny-drawer",explain:f`
|
|
471
|
-
<p>slide-out panel. button optional.</p>
|
|
472
|
-
`,snippets:[[C.html,`
|
|
473
|
-
<shiny-drawer button side=left>
|
|
474
|
-
<header>example</header>
|
|
475
|
-
<section slot=plate>
|
|
476
|
-
lorem kettlebell..
|
|
477
|
-
</section>
|
|
478
|
-
</shiny-drawer>
|
|
479
|
-
`],[C.view,`
|
|
480
|
-
ShinyDrawer
|
|
481
|
-
.props({button: true, side: "left"})
|
|
482
|
-
.children(html\`
|
|
483
|
-
<header>example</header>
|
|
484
|
-
<section slot=plate>
|
|
485
|
-
lorem kettlebell..
|
|
486
|
-
</section>
|
|
487
|
-
\`)
|
|
488
|
-
.render()
|
|
489
|
-
`],[C.css,`
|
|
490
|
-
shiny-drawer {
|
|
491
|
-
--button-size: 2em;
|
|
492
|
-
--anim-duration: 200ms;
|
|
493
|
-
--blanket-backdrop-filter: blur(0.5em);
|
|
494
|
-
--blanket-bg: color-mix(
|
|
495
|
-
in oklab,
|
|
496
|
-
transparent,
|
|
497
|
-
var(--bg)
|
|
498
|
-
);
|
|
499
|
-
}
|
|
500
|
-
`]],content:s.ShinyDrawer.props({button:!0}).children(f`
|
|
501
|
-
<header>
|
|
502
|
-
<h2>example drawer</h2>
|
|
503
|
-
<p>you can put any content in here.</p>
|
|
504
|
-
<p class=lipsum>${st()}</p>
|
|
505
|
-
</header>
|
|
506
|
-
<section slot=plate>
|
|
507
|
-
<p class=lipsum>${st()}</p>
|
|
508
|
-
<p class=lipsum>${st()}</p>
|
|
509
|
-
</section>
|
|
510
|
-
`).render(),style:m`
|
|
511
|
-
.content sly-view {
|
|
512
|
-
border-radius: 0.5em;
|
|
513
|
-
overflow: hidden;
|
|
514
|
-
--button-size: 3em;
|
|
515
|
-
|
|
516
|
-
header {
|
|
517
|
-
> * + * { margin-top: 0.5em; }
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
section {
|
|
521
|
-
display: flex;
|
|
522
|
-
flex-direction: column;
|
|
523
|
-
justify-content: center;
|
|
524
|
-
min-height: 100%;
|
|
525
|
-
padding: 1em;
|
|
526
|
-
padding-top: 3em;
|
|
527
|
-
> * + * { margin-top: 0.5em; }
|
|
528
|
-
}
|
|
529
|
-
}
|
|
530
|
-
`}),oe({name:"shiny-tabs",explain:f`
|
|
531
|
-
<p>button bar. panels optional.</p>
|
|
532
|
-
`,snippets:[[C.html,`
|
|
533
|
-
<shiny-tabs>
|
|
534
|
-
<button>tab1</button>
|
|
535
|
-
<button>tab2</button>
|
|
536
|
-
<button>tab3</button>
|
|
537
|
-
<div slot=panel>panel1</div>
|
|
538
|
-
<div slot=panel>panel2</div>
|
|
539
|
-
<div slot=panel>panel3</div>
|
|
540
|
-
</shiny-tabs>
|
|
541
|
-
`],[C.view,`
|
|
542
|
-
ShinyTabs
|
|
543
|
-
.props()
|
|
544
|
-
.children(html\`
|
|
545
|
-
<button>tab1</button>
|
|
546
|
-
<button>tab2</button>
|
|
547
|
-
<button>tab3</button>
|
|
548
|
-
<div slot=panel>panel1</div>
|
|
549
|
-
<div slot=panel>panel2</div>
|
|
550
|
-
<div slot=panel>panel3</div>
|
|
551
|
-
\`)
|
|
552
|
-
.render()
|
|
553
|
-
`],[C.css,`
|
|
554
|
-
shiny-tabs::part(tabs) {}
|
|
555
|
-
shiny-tabs::part(panels) {}
|
|
556
|
-
`]],content:s.ShinyTabs.props().children(f`
|
|
557
|
-
<button>tab1</button>
|
|
558
|
-
<button>tab2</button>
|
|
559
|
-
<button>tab3</button>
|
|
560
|
-
<p slot=panel class=lipsum>${st()}</p>
|
|
561
|
-
<p slot=panel class=lipsum>${st()}</p>
|
|
562
|
-
<p slot=panel class=lipsum>${st()}</p>
|
|
563
|
-
`).render(),style:m`
|
|
564
|
-
.content {
|
|
565
|
-
justify-content: start;
|
|
566
|
-
p { margin-top: 0.5em; }
|
|
567
|
-
}
|
|
568
|
-
`})];return f`
|
|
569
|
-
<div class=themes>
|
|
570
|
-
<span>theme</span>
|
|
571
|
-
${rt.ShinyTabs.props(t).children(mr.map(i=>f`
|
|
572
|
-
<button>${i.label}</button>
|
|
573
|
-
`)).render()}
|
|
574
|
-
</div>
|
|
575
|
-
|
|
576
|
-
${o}
|
|
577
|
-
`})});console.log("\u2728shiny");
|
|
763
|
+
`),be.takeAll(),[_r(),vr(),Sr(),$r()]))});console.log("\u2728shiny\u2728");
|
|
578
764
|
/*! Bundled license information:
|
|
579
765
|
|
|
580
766
|
@lit/reactive-element/css-tag.js:
|