UNPKG

mbio-ui

Version:

Web components library containing lightweight, ready-to-use and framework-agnostic User Interface elements.

94 lines 21.1 kB
!function(t){var e={};function __webpack_require__(s){if(e[s])return e[s].exports;var r=e[s]={i:s,l:!1,exports:{}};return t[s].call(r.exports,r,r.exports,__webpack_require__),r.l=!0,r.exports}__webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,s){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s})},__webpack_require__.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__webpack_require__.t=function(t,e){if(1&e&&(t=__webpack_require__(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(__webpack_require__.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)__webpack_require__.d(s,r,function(e){return t[e]}.bind(null,r));return s},__webpack_require__.n=function(t){var e=t&&t.__esModule?function getDefault(){return t.default}:function getModuleExports(){return t};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=27)}({0:function(t,e,s){"use strict";s.d(e,"b",(function(){return css_tag_r})),s.d(e,"c",(function(){return r.a})),s.d(e,"a",(function(){return lit_element_h}));var r=s(3);const o=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,l=Symbol();class n{constructor(t,e){if(e!==l)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){return o&&void 0===this.t&&(this.t=new CSSStyleSheet,this.t.replaceSync(this.cssText)),this.t}toString(){return this.cssText}}const h=new Map,css_tag_r=(t,...e)=>{const s=e.reduce((e,s,r)=>e+(t=>{if(t instanceof n)return t.cssText;if("number"==typeof t)return t;throw Error(`Value passed to 'css' function must be a 'css' function result: ${t}. Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security.`)})(s)+t[r+1],t[0]);let r=h.get(s);return void 0===r&&h.set(s,r=new n(s,l)),r},u=o?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return(t=>new n(t+"",l))(e)})(t):t;var p,v,f,g;const m={toAttribute(t,e){switch(e){case Boolean:t=t?"":null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},reactive_element_n=(t,e)=>e!==t&&(e==e||t==t),y={attribute:!0,type:String,converter:m,reflect:!1,hasChanged:reactive_element_n};class reactive_element_a extends HTMLElement{constructor(){super(),this.Πi=new Map,this.Πo=void 0,this.Πl=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this.Πh=null,this.u()}static addInitializer(t){var e;null!==(e=this.v)&&void 0!==e||(this.v=[]),this.v.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,s)=>{const r=this.Πp(s,e);void 0!==r&&(this.Πm.set(r,s),t.push(r))}),t}static createProperty(t,e=y){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const s="symbol"==typeof t?Symbol():"__"+t,r=this.getPropertyDescriptor(t,s,e);void 0!==r&&Object.defineProperty(this.prototype,t,r)}}static getPropertyDescriptor(t,e,s){return{get(){return this[e]},set(r){const o=this[t];this[e]=r,this.requestUpdate(t,o,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||y}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this.Πm=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of e)this.createProperty(s,t[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(u(t))}else void 0!==t&&e.push(u(t));return e}static"Πp"(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this.Πg=new Promise(t=>this.enableUpdating=t),this.L=new Map,this.Π_(),this.requestUpdate(),null===(t=this.constructor.v)||void 0===t||t.forEach(t=>t(this))}addController(t){var e,s;(null!==(e=this.ΠU)&&void 0!==e?e:this.ΠU=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(s=t.hostConnected)||void 0===s||s.call(t))}removeController(t){var e;null===(e=this.ΠU)||void 0===e||e.splice(this.ΠU.indexOf(t)>>>0,1)}"Π_"(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this.Πi.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{o?t.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet):e.forEach(e=>{const s=document.createElement("style");s.textContent=e.cssText,t.appendChild(s)})})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this.ΠU)||void 0===t||t.forEach(t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}),this.Πl&&(this.Πl(),this.Πo=this.Πl=void 0)}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this.ΠU)||void 0===t||t.forEach(t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}),this.Πo=new Promise(t=>this.Πl=t)}attributeChangedCallback(t,e,s){this.K(t,s)}"Πj"(t,e,s=y){var r,o;const l=this.constructor.Πp(t,s);if(void 0!==l&&!0===s.reflect){const h=(null!==(o=null===(r=s.converter)||void 0===r?void 0:r.toAttribute)&&void 0!==o?o:m.toAttribute)(e,s.type);this.Πh=t,null==h?this.removeAttribute(l):this.setAttribute(l,h),this.Πh=null}}K(t,e){var s,r,o;const l=this.constructor,h=l.Πm.get(t);if(void 0!==h&&this.Πh!==h){const t=l.getPropertyOptions(h),u=t.converter,p=null!==(o=null!==(r=null===(s=u)||void 0===s?void 0:s.fromAttribute)&&void 0!==r?r:"function"==typeof u?u:null)&&void 0!==o?o:m.fromAttribute;this.Πh=h,this[h]=p(e,t.type),this.Πh=null}}requestUpdate(t,e,s){let r=!0;void 0!==t&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||reactive_element_n)(this[t],e)?(this.L.has(t)||this.L.set(t,e),!0===s.reflect&&this.Πh!==t&&(void 0===this.Πk&&(this.Πk=new Map),this.Πk.set(t,s))):r=!1),!this.isUpdatePending&&r&&(this.Πg=this.Πq())}async"Πq"(){this.isUpdatePending=!0;try{for(await this.Πg;this.Πo;)await this.Πo}catch(t){Promise.reject(t)}const t=this.performUpdate();return null!=t&&await t,!this.isUpdatePending}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this.Πi&&(this.Πi.forEach((t,e)=>this[e]=t),this.Πi=void 0);let e=!1;const s=this.L;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),null===(t=this.ΠU)||void 0===t||t.forEach(t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)}),this.update(s)):this.Π$()}catch(t){throw e=!1,this.Π$(),t}e&&this.E(s)}willUpdate(t){}E(t){var e;null===(e=this.ΠU)||void 0===e||e.forEach(t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}"Π$"(){this.L=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this.Πg}shouldUpdate(t){return!0}update(t){void 0!==this.Πk&&(this.Πk.forEach((t,e)=>this.Πj(e,this[e],t)),this.Πk=void 0),this.Π$()}updated(t){}firstUpdated(t){}}var _,w,x,P,$,E;reactive_element_a.finalized=!0,reactive_element_a.shadowRootOptions={mode:"open"},null===(v=(p=globalThis).reactiveElementPlatformSupport)||void 0===v||v.call(p,{ReactiveElement:reactive_element_a}),(null!==(f=(g=globalThis).reactiveElementVersions)&&void 0!==f?f:g.reactiveElementVersions=[]).push("1.0.0-rc.1");(null!==(_=(E=globalThis).litElementVersions)&&void 0!==_?_:E.litElementVersions=[]).push("3.0.0-rc.1");class lit_element_h extends reactive_element_a{constructor(){super(...arguments),this.renderOptions={host:this},this.Φt=void 0}createRenderRoot(){var t,e;const s=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=s.firstChild),s}update(t){const e=this.render();super.update(t),this.Φt=Object(r.d)(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this.Φt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.Φt)||void 0===t||t.setConnected(!1)}render(){return r.b}}lit_element_h.finalized=!0,lit_element_h._$litElement$=!0,null===(x=(w=globalThis).litElementHydrateSupport)||void 0===x||x.call(w,{LitElement:lit_element_h}),null===($=(P=globalThis).litElementPlatformSupport)||void 0===$||$.call(P,{LitElement:lit_element_h})},1:function(t,e,s){"use strict";s.d(e,"a",(function(){return property_e})),s.d(e,"b",(function(){return state_r}));const i=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(s){s.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(s){s.createProperty(e.key,t)}};function property_e(t){return(e,s)=>void 0!==s?((t,e,s)=>{e.constructor.createProperty(s,t)})(t,e,s):i(t,e)}function state_r(t){return property_e({...t,state:!0,attribute:!1})}const r=Element.prototype;r.msMatchesSelector||r.webkitMatchesSelector},10:function(t,e,s){"use strict";s.d(e,"a",(function(){return mbioAppBar}));var r=s(0),o=s(1),l=s(2),__decorate=function(t,e,s,r){var o,l=arguments.length,h=l<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,s):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,s,r);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(h=(l<3?o(h):l>3?o(e,s,h):o(e,s))||h);return l>3&&h&&Object.defineProperty(e,s,h),h};class mbioAppBar extends r.a{static get styles(){return[l.a,r.b` :host { z-index: 3; height: calc(24px + var(--spacing-l) * 2); padding: 0 var(--spacing-l); display: flex; align-items: center; overflow: hidden; background-color: rgb(var(--base-0)); box-shadow: var(--shadow-1); transition: var(--transition-1); gap: calc(var(--spacing-l) * 2); /* css properties */ --functions-gap: var(--spacing-m); } .logo { height: 24px; } .label { font: var(--header-1); color: var(--text-1); max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* mobile */ :host[mobile] { gap: var(--spacing-l); } :host([mobile]) .label { flex: 1; max-width: unset; text-align: center; } /* slots */ slot { display: flex; align-items: center; } slot:not([name]) { flex: 1; } slot[name='functions'] { gap: var(--functions-gap); } ::slotted(mbio-tabs) { border-bottom: unset; } slot[name='right'], slot[name='left'] { min-width: 24px; } slot[name='right'] { margin-left: auto; } `]}render(){return r.c` ${this.mobile?r.c` <slot name="left"></slot> ${this.label?r.c` <div class="label">${this.label}</div> `:""} <slot name="right"></slot> `:r.c` ${this.logo?r.c` <img class="logo" src="${this.logo}" @click="${()=>this.handleLogoClick()}" /> `:""} ${this.label?r.c` <div class="label">${this.label}</div> `:""} <slot></slot> <slot name="functions"></slot> `} `}attributeChangedCallback(t,e,s){super.attributeChangedCallback(t,e,s),this.dispatchEvent(new Event(t+"-changed"))}handleLogoClick(){this.dispatchEvent(new Event("logo-clicked"))}}__decorate([Object(o.a)({type:String,reflect:!0})],mbioAppBar.prototype,"label",void 0),__decorate([Object(o.a)({type:String,reflect:!0})],mbioAppBar.prototype,"logo",void 0),__decorate([Object(o.a)({type:Boolean,reflect:!0})],mbioAppBar.prototype,"mobile",void 0),window.customElements.get("mbio-app-bar")||window.customElements.define("mbio-app-bar",mbioAppBar)},2:function(t,e,s){"use strict";s.d(e,"a",(function(){return r}));const r=s(0).b` /* scrollbar */ *::-webkit-scrollbar { width: 8px; height: 8px; background-color: transparent; visibility: hidden; } *::-webkit-scrollbar-track { background-color: rgba(var(--neutral-1), 0.05); border-radius: 8px; } *::-webkit-scrollbar-thumb { background-color: rgba(var(--neutral-1), 0.1); border-radius: 8px; } *::-webkit-scrollbar-thumb:active, *::-webkit-scrollbar-thumb:hover { background-color: rgba(var(--neutral-1), 0.2); } `},27:function(t,e,s){"use strict";s.r(e);var r=s(10);s.d(e,"mbioAppBar",(function(){return r.a}))},3:function(t,e,s){"use strict";var r,o,l,h;s.d(e,"a",(function(){return O})),s.d(e,"b",(function(){return U})),s.d(e,"c",(function(){return T})),s.d(e,"d",(function(){return V}));const u=globalThis.trustedTypes,p=u?u.createPolicy("lit-html",{createHTML:t=>t}):void 0,v=`lit$${(Math.random()+"").slice(9)}$`,f="?"+v,g=`<${f}>`,m=document,c=(t="")=>m.createComment(t),d=t=>null===t||"object"!=typeof t&&"function"!=typeof t,y=Array.isArray,a=t=>{var e;return y(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])},_=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,w=/-->/g,x=/>/g,P=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,$=/'/g,E=/"/g,A=/^(?:script|style|textarea)$/i,b=t=>(e,...s)=>({_$litType$:t,strings:e,values:s}),O=b(1),U=(b(2),Symbol.for("lit-noChange")),T=Symbol.for("lit-nothing"),j=new WeakMap,V=(t,e,s)=>{var r,o;const l=null!==(r=null==s?void 0:s.renderBefore)&&void 0!==r?r:e;let h=l._$litPart$;if(void 0===h){const t=null!==(o=null==s?void 0:s.renderBefore)&&void 0!==o?o:null;l._$litPart$=h=new C(e.insertBefore(c(),t),t,void 0,s)}return h.I(t),h},B=m.createTreeWalker(m,129,null,!1),M=(t,e)=>{const s=t.length-1,r=[];let o,l=2===e?"<svg>":"",h=_;for(let e=0;e<s;e++){const s=t[e];let u,p,f=-1,m=0;for(;m<s.length&&(h.lastIndex=m,p=h.exec(s),null!==p);)m=h.lastIndex,h===_?"!--"===p[1]?h=w:void 0!==p[1]?h=x:void 0!==p[2]?(A.test(p[2])&&(o=RegExp("</"+p[2],"g")),h=P):void 0!==p[3]&&(h=P):h===P?">"===p[0]?(h=null!=o?o:_,f=-1):void 0===p[1]?f=-2:(f=h.lastIndex-p[2].length,u=p[1],h=void 0===p[3]?P:'"'===p[3]?E:$):h===E||h===$?h=P:h===w||h===x?h=_:(h=P,o=void 0);const y=h===P&&t[e+1].startsWith("/>")?" ":"";l+=h===_?s+g:f>=0?(r.push(u),s.slice(0,f)+"$lit$"+s.slice(f)+v+y):s+v+(-2===f?(r.push(void 0),e):y)}const u=l+(t[s]||"<?>")+(2===e?"</svg>":"");return[void 0!==p?p.createHTML(u):u,r]};class N{constructor({strings:t,_$litType$:e},s){let r;this.parts=[];let o=0,l=0;const h=t.length-1,p=this.parts,[g,m]=M(t,e);if(this.el=N.createElement(g,s),B.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(r=B.nextNode())&&p.length<h;){if(1===r.nodeType){if(r.hasAttributes()){const t=[];for(const e of r.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(v)){const s=m[l++];if(t.push(e),void 0!==s){const t=r.getAttribute(s.toLowerCase()+"$lit$").split(v),e=/([.?@])?(.*)/.exec(s);p.push({type:1,index:o,name:e[2],strings:t,ctor:"."===e[1]?I:"?"===e[1]?L:"@"===e[1]?R:H})}else p.push({type:6,index:o})}for(const e of t)r.removeAttribute(e)}if(A.test(r.tagName)){const t=r.textContent.split(v),e=t.length-1;if(e>0){r.textContent=u?u.emptyScript:"";for(let s=0;s<e;s++)r.append(t[s],c()),B.nextNode(),p.push({type:2,index:++o});r.append(t[e],c())}}}else if(8===r.nodeType)if(r.data===f)p.push({type:2,index:o});else{let t=-1;for(;-1!==(t=r.data.indexOf(v,t+1));)p.push({type:7,index:o}),t+=v.length-1}o++}}static createElement(t,e){const s=m.createElement("template");return s.innerHTML=t,s}}function S(t,e,s=t,r){var o,l,h,u;if(e===U)return e;let p=void 0!==r?null===(o=s.Σi)||void 0===o?void 0:o[r]:s.Σo;const v=d(e)?void 0:e._$litDirective$;return(null==p?void 0:p.constructor)!==v&&(null===(l=null==p?void 0:p.O)||void 0===l||l.call(p,!1),void 0===v?p=void 0:(p=new v(t),p.T(t,s,r)),void 0!==r?(null!==(h=(u=s).Σi)&&void 0!==h?h:u.Σi=[])[r]=p:s.Σo=p),void 0!==p&&(e=S(t,p.S(t,e.values),p,r)),e}class k{constructor(t,e){this.l=[],this.N=void 0,this.D=t,this.M=e}u(t){var e;const{el:{content:s},parts:r}=this.D,o=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:m).importNode(s,!0);B.currentNode=o;let l=B.nextNode(),h=0,u=0,p=r[0];for(;void 0!==p;){if(h===p.index){let e;2===p.type?e=new C(l,l.nextSibling,this,t):1===p.type?e=new p.ctor(l,p.name,p.strings,this,t):6===p.type&&(e=new z(l,this,t)),this.l.push(e),p=r[++u]}h!==(null==p?void 0:p.index)&&(l=B.nextNode(),h++)}return o}v(t){let e=0;for(const s of this.l)void 0!==s&&(void 0!==s.strings?(s.I(t,s,e),e+=s.strings.length-2):s.I(t[e])),e++}}class C{constructor(t,e,s,r){this.type=2,this.N=void 0,this.A=t,this.B=e,this.M=s,this.options=r}setConnected(t){var e;null===(e=this.P)||void 0===e||e.call(this,t)}get parentNode(){return this.A.parentNode}get startNode(){return this.A}get endNode(){return this.B}I(t,e=this){t=S(this,t,e),d(t)?t===T||null==t||""===t?(this.H!==T&&this.R(),this.H=T):t!==this.H&&t!==U&&this.m(t):void 0!==t._$litType$?this._(t):void 0!==t.nodeType?this.$(t):a(t)?this.g(t):this.m(t)}k(t,e=this.B){return this.A.parentNode.insertBefore(t,e)}$(t){this.H!==t&&(this.R(),this.H=this.k(t))}m(t){const e=this.A.nextSibling;null!==e&&3===e.nodeType&&(null===this.B?null===e.nextSibling:e===this.B.previousSibling)?e.data=t:this.$(m.createTextNode(t)),this.H=t}_(t){var e;const{values:s,_$litType$:r}=t,o="number"==typeof r?this.C(t):(void 0===r.el&&(r.el=N.createElement(r.h,this.options)),r);if((null===(e=this.H)||void 0===e?void 0:e.D)===o)this.H.v(s);else{const t=new k(o,this),e=t.u(this.options);t.v(s),this.$(e),this.H=t}}C(t){let e=j.get(t.strings);return void 0===e&&j.set(t.strings,e=new N(t)),e}g(t){y(this.H)||(this.H=[],this.R());const e=this.H;let s,r=0;for(const o of t)r===e.length?e.push(s=new C(this.k(c()),this.k(c()),this,this.options)):s=e[r],s.I(o),r++;r<e.length&&(this.R(s&&s.B.nextSibling,r),e.length=r)}R(t=this.A.nextSibling,e){var s;for(null===(s=this.P)||void 0===s||s.call(this,!1,!0,e);t&&t!==this.B;){const e=t.nextSibling;t.remove(),t=e}}}class H{constructor(t,e,s,r,o){this.type=1,this.H=T,this.N=void 0,this.V=void 0,this.element=t,this.name=e,this.M=r,this.options=o,s.length>2||""!==s[0]||""!==s[1]?(this.H=Array(s.length-1).fill(T),this.strings=s):this.H=T}get tagName(){return this.element.tagName}I(t,e=this,s,r){const o=this.strings;let l=!1;if(void 0===o)t=S(this,t,e,0),l=!d(t)||t!==this.H&&t!==U,l&&(this.H=t);else{const r=t;let h,u;for(t=o[0],h=0;h<o.length-1;h++)u=S(this,r[s+h],e,h),u===U&&(u=this.H[h]),l||(l=!d(u)||u!==this.H[h]),u===T?t=T:t!==T&&(t+=(null!=u?u:"")+o[h+1]),this.H[h]=u}l&&!r&&this.W(t)}W(t){t===T?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class I extends H{constructor(){super(...arguments),this.type=3}W(t){this.element[this.name]=t===T?void 0:t}}class L extends H{constructor(){super(...arguments),this.type=4}W(t){t&&t!==T?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name)}}class R extends H{constructor(){super(...arguments),this.type=5}I(t,e=this){var s;if((t=null!==(s=S(this,t,e,0))&&void 0!==s?s:T)===U)return;const r=this.H,o=t===T&&r!==T||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,l=t!==T&&(r===T||o);o&&this.element.removeEventListener(this.name,this,r),l&&this.element.addEventListener(this.name,this,t),this.H=t}handleEvent(t){var e,s;"function"==typeof this.H?this.H.call(null!==(s=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==s?s:this.element,t):this.H.handleEvent(t)}}class z{constructor(t,e,s){this.element=t,this.type=6,this.N=void 0,this.V=void 0,this.M=e,this.options=s}I(t){S(this,t)}}null===(o=(r=globalThis).litHtmlPlatformSupport)||void 0===o||o.call(r,N,C),(null!==(l=(h=globalThis).litHtmlVersions)&&void 0!==l?l:h.litHtmlVersions=[]).push("2.0.0-rc.2")}});