@zywave/customelement-manifest-element 1.6.1 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -165,6 +165,11 @@ a:active {
165
165
 
166
166
  code {
167
167
  font-family: monospace;
168
+ background-color: hsla(var(--schema-primary-color-h), var(--schema-primary-color-s), var(--schema-primary-color-l), 0.08);
169
+ color: var(--schema-primary-color);
170
+ padding: 0.125rem 0.375rem;
171
+ border-radius: 0.1875rem;
172
+ font-size: 0.9em;
168
173
  }
169
174
 
170
175
  select {
@@ -12,6 +12,10 @@ import type { PropertyValues, TemplateResult } from "lit";
12
12
  * @csspart cssprops - Select the section that pertains to the CSS Custom Properties documentation
13
13
  * @csspart methods - Select the section that pertains to the Methods documentation
14
14
  * @csspart cssstates - Select the section that pertains to the CSS Custom States documentation
15
+ * @csspart markdown-bold - Style bold text rendered from markdown (`**text**`)
16
+ * @csspart markdown-italic - Style italic text rendered from markdown (`*text*`)
17
+ * @csspart markdown-code - Style inline code rendered from markdown (`` `code` ``)
18
+ * @csspart markdown-link - Style links rendered from markdown (`[text](url)` or plain URLs)
15
19
  *
16
20
  * @cssState loading - Applied when the element is in the process of loading the schema resource
17
21
  *
@@ -1,11 +1,11 @@
1
- import { __decorate } from "tslib";
2
1
  /* eslint-disable lit/no-invalid-html */
3
2
  /* eslint-disable lit/binding-positions */
3
+ import { __decorate } from "tslib";
4
4
  import { LitElement, nothing } from "lit";
5
5
  import { customElement, property } from "lit/decorators.js";
6
- import styles from "./customelement-manifest-element.css" with { type: "css" }; // eslint-disable-line
6
+ import styles from "./customelement-manifest-element.css" with { type: "css" };
7
7
  import { html, unsafeStatic } from "lit/static-html.js";
8
- import { findDefinition, getElementNames } from "./manifest-helpers";
8
+ import { findDefinition, getElementNames } from "./manifest-helpers.js";
9
9
  function publicMembersFilter(classMember) {
10
10
  return ((!classMember.privacy || classMember.privacy === "public") &&
11
11
  !classMember.name.startsWith("_") &&
@@ -40,12 +40,7 @@ function renderDescription(str) {
40
40
  if (str.startsWith("-")) {
41
41
  str = str.substring(1);
42
42
  }
43
- const parts = str.split(" ");
44
- let result = html ``;
45
- for (const part of parts) {
46
- result = html `${result} ${prettify(part)}`;
47
- }
48
- return result;
43
+ return parseMarkdown(str);
49
44
  }
50
45
  function renderMethodSignature(obj) {
51
46
  const methodReturn = () => {
@@ -78,21 +73,66 @@ function renderMethodSignature(obj) {
78
73
  return html `${obj.name}(): ${methodReturn()}`;
79
74
  }
80
75
  }
81
- function prettify(str) {
82
- let regexMatch;
83
- const linkRegex = /^https?:\/\//;
84
- const codeBlockRegex = /`(?<contents>.*)`/;
85
- if ((regexMatch = str.match(linkRegex))) {
86
- return html `<a href="${str}">${str}</a>`;
87
- }
88
- else if ((regexMatch = str.match(codeBlockRegex))) {
89
- const innerContents = regexMatch.groups?.["contents"];
90
- const parts = str.split(`\`${innerContents}\``);
91
- return innerContents ? html `${parts[0] ?? ""}<code>${innerContents}</code>${parts[1] ?? ""}` : str;
92
- }
93
- else {
94
- return str;
76
+ /**
77
+ * Lightweight markdown parser that handles common patterns without dependencies.
78
+ * Supports: inline code, bold, italic, links, and plain URLs.
79
+ * Patterns are processed in order to avoid conflicts (e.g., code blocks processed first).
80
+ * Each markdown element is given a CSS part for styling customization.
81
+ */
82
+ function parseMarkdown(str) {
83
+ const tokens = [];
84
+ const remaining = str;
85
+ let position = 0;
86
+ while (position < remaining.length) {
87
+ let matched = false;
88
+ // Pattern 1: Inline code `text` (process first to avoid parsing markdown inside code)
89
+ const codeMatch = remaining.slice(position).match(/^`([^`]+)`/);
90
+ if (codeMatch) {
91
+ tokens.push(html `<code part="markdown-code">${codeMatch[1]}</code>`);
92
+ position += codeMatch[0].length;
93
+ matched = true;
94
+ continue;
95
+ }
96
+ // Pattern 2: Markdown links [text](url)
97
+ const linkMatch = remaining.slice(position).match(/^\[([^\]]+)\]\(([^)]+)\)/);
98
+ if (linkMatch) {
99
+ tokens.push(html `<a part="markdown-link" href="${linkMatch[2]}">${linkMatch[1]}</a>`);
100
+ position += linkMatch[0].length;
101
+ matched = true;
102
+ continue;
103
+ }
104
+ // Pattern 3: Plain URLs (http:// or https://)
105
+ const urlMatch = remaining.slice(position).match(/^(https?:\/\/[^\s]+)/);
106
+ if (urlMatch) {
107
+ tokens.push(html `<a part="markdown-link" href="${urlMatch[1]}">${urlMatch[1]}</a>`);
108
+ position += urlMatch[0].length;
109
+ matched = true;
110
+ continue;
111
+ }
112
+ // Pattern 4: Bold **text**
113
+ const boldMatch = remaining.slice(position).match(/^\*\*([^*]+)\*\*/);
114
+ if (boldMatch) {
115
+ tokens.push(html `<strong part="markdown-bold">${boldMatch[1]}</strong>`);
116
+ position += boldMatch[0].length;
117
+ matched = true;
118
+ continue;
119
+ }
120
+ // Pattern 5: Italic *text* (but not ** which is bold)
121
+ const italicMatch = remaining.slice(position).match(/^\*([^*]+)\*/);
122
+ if (italicMatch) {
123
+ tokens.push(html `<em part="markdown-italic">${italicMatch[1]}</em>`);
124
+ position += italicMatch[0].length;
125
+ matched = true;
126
+ continue;
127
+ }
128
+ // No pattern matched, consume one character as plain text
129
+ if (!matched) {
130
+ tokens.push(remaining[position]);
131
+ position++;
132
+ }
95
133
  }
134
+ // Combine all tokens into a single template result
135
+ return html `${tokens}`;
96
136
  }
97
137
  function getBasePath() {
98
138
  return window.location.href.replace(window.location.hash, "");
@@ -109,6 +149,10 @@ function getBasePath() {
109
149
  * @csspart cssprops - Select the section that pertains to the CSS Custom Properties documentation
110
150
  * @csspart methods - Select the section that pertains to the Methods documentation
111
151
  * @csspart cssstates - Select the section that pertains to the CSS Custom States documentation
152
+ * @csspart markdown-bold - Style bold text rendered from markdown (`**text**`)
153
+ * @csspart markdown-italic - Style italic text rendered from markdown (`*text*`)
154
+ * @csspart markdown-code - Style inline code rendered from markdown (`` `code` ``)
155
+ * @csspart markdown-link - Style links rendered from markdown (`[text](url)` or plain URLs)
112
156
  *
113
157
  * @cssState loading - Applied when the element is in the process of loading the schema resource
114
158
  *
@@ -135,7 +179,6 @@ let CustomElementManifestElement = class CustomElementManifestElement extends Li
135
179
  #schema;
136
180
  #activeElementName;
137
181
  #failedLoad;
138
- // eslint-disable-next-line no-undef
139
182
  #internals;
140
183
  #basePath;
141
184
  get #elementNames() {
@@ -208,11 +251,12 @@ let CustomElementManifestElement = class CustomElementManifestElement extends Li
208
251
  }
209
252
  return this.#activeElement
210
253
  ? html `<article>
211
- <div class="header-row">${this.#renderElementChooser()}</div>
212
- <div>${renderDescription(this.#activeElement.description)}</div>
213
- ${this.#renderAttributes()} ${this.#renderProperties()} ${this.#renderCssProperties()}
214
- ${this.#renderCssShadowParts()} ${this.#renderEvents()} ${this.#renderMethods()} ${this.#renderSlots()} ${this.#renderCssCustomStates()} </article
215
- >`
254
+ <div class="header-row">${this.#renderElementChooser()}</div>
255
+ <div>${renderDescription(this.#activeElement.description)}</div>
256
+ ${this.#renderAttributes()} ${this.#renderProperties()} ${this.#renderCssProperties()}
257
+ ${this.#renderCssShadowParts()} ${this.#renderEvents()} ${this.#renderMethods()} ${this.#renderSlots()}
258
+ ${this.#renderCssCustomStates()}
259
+ </article>`
216
260
  : nothing;
217
261
  }
218
262
  #renderElementChooser() {
package/index.bundle.js CHANGED
@@ -4,104 +4,104 @@ import t from"./customelement-manifest-element.css"with{type:"css"};function e(t
4
4
  * Copyright 2019 Google LLC
5
5
  * SPDX-License-Identifier: BSD-3-Clause
6
6
  */
7
- const s=globalThis,i=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,r=Symbol(),n=new WeakMap;let a=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==r)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(i&&void 0===t){const s=void 0!==e&&1===e.length;s&&(t=n.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&n.set(e,t))}return t}toString(){return this.cssText}};const o=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return(t=>new a("string"==typeof t?t:t+"",void 0,r))(e)})(t):t
7
+ const s=globalThis,i=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,r=Symbol(),n=new WeakMap;let a=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==r)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(i&&void 0===t){const s=void 0!==e&&1===e.length;s&&(t=n.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&n.set(e,t))}return t}toString(){return this.cssText}};const o=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return(t=>new a("string"==typeof t?t:t+"",void 0,r))(e)})(t):t,{is:h,defineProperty:l,getOwnPropertyDescriptor:c,getOwnPropertyNames:d,getOwnPropertySymbols:p,getPrototypeOf:u}=Object,m=globalThis,$=m.trustedTypes,f=$?$.emptyScript:"",v=m.reactiveElementPolyfillSupport,y=(t,e)=>t,_={toAttribute(t,e){switch(e){case Boolean:t=t?f: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}},g=(t,e)=>!h(t,e),A={attribute:!0,type:String,converter:_,reflect:!1,useDefault:!1,hasChanged:g};
8
8
  /**
9
9
  * @license
10
10
  * Copyright 2017 Google LLC
11
11
  * SPDX-License-Identifier: BSD-3-Clause
12
- */,{is:h,defineProperty:l,getOwnPropertyDescriptor:c,getOwnPropertyNames:d,getOwnPropertySymbols:p,getPrototypeOf:u}=Object,$=globalThis,m=$.trustedTypes,f=m?m.emptyScript:"",v=$.reactiveElementPolyfillSupport,y=(t,e)=>t,_={toAttribute(t,e){switch(e){case Boolean:t=t?f: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}},g=(t,e)=>!h(t,e),A={attribute:!0,type:String,converter:_,reflect:!1,hasChanged:g};Symbol.metadata??=Symbol("metadata"),$.litPropertyMetadata??=new WeakMap;class b 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=A){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);void 0!==i&&l(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:r}=c(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return i?.call(this)},set(e){const n=i?.call(this);r.call(this,e),this.requestUpdate(t,n,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??A}static _$Ei(){if(this.hasOwnProperty(y("elementProperties")))return;const t=u(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(y("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(y("properties"))){const t=this.properties,e=[...d(t),...p(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const s=this._$Eu(t,e);void 0!==s&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}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(o(t))}else void 0!==t&&e.push(o(t));return e}static _$Eu(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?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),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(i)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),r=s.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=i.cssText,t.appendChild(e)}})(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)}_$EC(t,e){const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(void 0!==i&&!0===s.reflect){const r=(void 0!==s.converter?.toAttribute?s.converter:_).toAttribute(e,s.type);this._$Em=t,null==r?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(t,e){const s=this.constructor,i=s._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=s.getPropertyOptions(i),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:_;this._$Em=i,this[i]=r.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,s){if(void 0!==t){if(s??=this.constructor.getPropertyOptions(t),!(s.hasChanged??g)(this[t],e))return;this.P(t,e,s)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),!0===s.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,s]of t)!0!==s.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],s)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}b.elementStyles=[],b.shadowRootOptions={mode:"open"},b[y("elementProperties")]=new Map,b[y("finalized")]=new Map,v?.({ReactiveElement:b}),($.reactiveElementVersions??=[]).push("2.0.4");
12
+ */Symbol.metadata??=Symbol("metadata"),m.litPropertyMetadata??=new WeakMap;let E=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=A){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){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);void 0!==i&&l(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:r}=c(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:i,set(e){const n=i?.call(this);r?.call(this,e),this.requestUpdate(t,n,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??A}static _$Ei(){if(this.hasOwnProperty(y("elementProperties")))return;const t=u(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(y("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(y("properties"))){const t=this.properties,e=[...d(t),...p(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const s=this._$Eu(t,e);void 0!==s&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}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(o(t))}else void 0!==t&&e.push(o(t));return e}static _$Eu(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?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),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(i)t.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const i of e){const e=document.createElement("style"),r=s.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=i.cssText,t.appendChild(e)}})(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){const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(void 0!==i&&!0===s.reflect){const r=(void 0!==s.converter?.toAttribute?s.converter:_).toAttribute(e,s.type);this._$Em=t,null==r?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(t,e){const s=this.constructor,i=s._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=s.getPropertyOptions(i),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:_;this._$Em=i;const n=r.fromAttribute(e,t.type);this[i]=n??this._$Ej?.get(i)??n,this._$Em=null}}requestUpdate(t,e,s){if(void 0!==t){const i=this.constructor,r=this[t];if(s??=i.getPropertyOptions(t),!((s.hasChanged??g)(r,e)||s.useDefault&&s.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,s))))return;this.C(t,e,s)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:i,wrapped:r},n){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??e??this[t]),!0!==r||void 0!==n)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),!0===i&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,s]of t){const{wrapped:t}=s,i=this[e];!0!==t||this._$AL.has(e)||void 0===i||this.C(e,void 0,s,i)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.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(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}};E.elementStyles=[],E.shadowRootOptions={mode:"open"},E[y("elementProperties")]=new Map,E[y("finalized")]=new Map,v?.({ReactiveElement:E}),(m.reactiveElementVersions??=[]).push("2.1.1");
13
13
  /**
14
14
  * @license
15
15
  * Copyright 2017 Google LLC
16
16
  * SPDX-License-Identifier: BSD-3-Clause
17
17
  */
18
- const E=globalThis,S=E.trustedTypes,P=S?S.createPolicy("lit-html",{createHTML:t=>t}):void 0,w="$lit$",C=`lit$${Math.random().toFixed(9).slice(2)}$`,H="?"+C,N=`<${H}>`,x=document,L=()=>x.createComment(""),U=t=>null===t||"object"!=typeof t&&"function"!=typeof t,O=Array.isArray,I="[ \t\n\f\r]",T=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,M=/-->/g,k=/>/g,R=RegExp(`>|${I}(?:([^\\s"'>=/]+)(${I}*=${I}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),D=/'/g,j=/"/g,z=/^(?:script|style|textarea|title)$/i,B=(t=>(e,...s)=>({_$litType$:t,strings:e,values:s}))(1),W=Symbol.for("lit-noChange"),q=Symbol.for("lit-nothing"),V=new WeakMap,J=x.createTreeWalker(x,129);function K(t,e){if(!O(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==P?P.createHTML(e):e}const Z=(t,e)=>{const s=t.length-1,i=[];let r,n=2===e?"<svg>":3===e?"<math>":"",a=T;for(let e=0;e<s;e++){const s=t[e];let o,h,l=-1,c=0;for(;c<s.length&&(a.lastIndex=c,h=a.exec(s),null!==h);)c=a.lastIndex,a===T?"!--"===h[1]?a=M:void 0!==h[1]?a=k:void 0!==h[2]?(z.test(h[2])&&(r=RegExp("</"+h[2],"g")),a=R):void 0!==h[3]&&(a=R):a===R?">"===h[0]?(a=r??T,l=-1):void 0===h[1]?l=-2:(l=a.lastIndex-h[2].length,o=h[1],a=void 0===h[3]?R:'"'===h[3]?j:D):a===j||a===D?a=R:a===M||a===k?a=T:(a=R,r=void 0);const d=a===R&&t[e+1].startsWith("/>")?" ":"";n+=a===T?s+N:l>=0?(i.push(o),s.slice(0,l)+w+s.slice(l)+C+d):s+C+(-2===l?e:d)}return[K(t,n+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]};class F{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let r=0,n=0;const a=t.length-1,o=this.parts,[h,l]=Z(t,e);if(this.el=F.createElement(h,s),J.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=J.nextNode())&&o.length<a;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(w)){const e=l[n++],s=i.getAttribute(t).split(C),a=/([.?@])?(.*)/.exec(e);o.push({type:1,index:r,name:a[2],strings:s,ctor:"."===a[1]?tt:"?"===a[1]?et:"@"===a[1]?st:Y}),i.removeAttribute(t)}else t.startsWith(C)&&(o.push({type:6,index:r}),i.removeAttribute(t));if(z.test(i.tagName)){const t=i.textContent.split(C),e=t.length-1;if(e>0){i.textContent=S?S.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],L()),J.nextNode(),o.push({type:2,index:++r});i.append(t[e],L())}}}else if(8===i.nodeType)if(i.data===H)o.push({type:2,index:r});else{let t=-1;for(;-1!==(t=i.data.indexOf(C,t+1));)o.push({type:7,index:r}),t+=C.length-1}r++}}static createElement(t,e){const s=x.createElement("template");return s.innerHTML=t,s}}function G(t,e,s=t,i){if(e===W)return e;let r=void 0!==i?s._$Co?.[i]:s._$Cl;const n=U(e)?void 0:e._$litDirective$;return r?.constructor!==n&&(r?._$AO?.(!1),void 0===n?r=void 0:(r=new n(t),r._$AT(t,s,i)),void 0!==i?(s._$Co??=[])[i]=r:s._$Cl=r),void 0!==r&&(e=G(t,r._$AS(t,e.values),r,i)),e}class Q{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){const{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??x).importNode(e,!0);J.currentNode=i;let r=J.nextNode(),n=0,a=0,o=s[0];for(;void 0!==o;){if(n===o.index){let e;2===o.type?e=new X(r,r.nextSibling,this,t):1===o.type?e=new o.ctor(r,o.name,o.strings,this,t):6===o.type&&(e=new it(r,this,t)),this._$AV.push(e),o=s[++a]}n!==o?.index&&(r=J.nextNode(),n++)}return J.currentNode=x,i}p(t){let e=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class X{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=q,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=G(this,t,e),U(t)?t===q||null==t||""===t?(this._$AH!==q&&this._$AR(),this._$AH=q):t!==this._$AH&&t!==W&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>O(t)||"function"==typeof t?.[Symbol.iterator])(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!==q&&U(this._$AH)?this._$AA.nextSibling.data=t:this.T(x.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,i="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=F.createElement(K(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new Q(i,this),s=t.u(this.options);t.p(e),this.T(s),this._$AH=t}}_$AC(t){let e=V.get(t.strings);return void 0===e&&V.set(t.strings,e=new F(t)),e}k(t){O(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const r of t)i===e.length?e.push(s=new X(this.O(L()),this.O(L()),this,this.options)):s=e[i],s._$AI(r),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class Y{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,r){this.type=1,this._$AH=q,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=r,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=q}_$AI(t,e=this,s,i){const r=this.strings;let n=!1;if(void 0===r)t=G(this,t,e,0),n=!U(t)||t!==this._$AH&&t!==W,n&&(this._$AH=t);else{const i=t;let a,o;for(t=r[0],a=0;a<r.length-1;a++)o=G(this,i[s+a],e,a),o===W&&(o=this._$AH[a]),n||=!U(o)||o!==this._$AH[a],o===q?t=q:t!==q&&(t+=(o??"")+r[a+1]),this._$AH[a]=o}n&&!i&&this.j(t)}j(t){t===q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class tt extends Y{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===q?void 0:t}}class et extends Y{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==q)}}class st extends Y{constructor(t,e,s,i,r){super(t,e,s,i,r),this.type=5}_$AI(t,e=this){if((t=G(this,t,e,0)??q)===W)return;const s=this._$AH,i=t===q&&s!==q||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==q&&(s===q||i);i&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class it{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){G(this,t)}}const rt=E.litHtmlPolyfillSupport;rt?.(F,X),(E.litHtmlVersions??=[]).push("3.2.1");
18
+ const b=globalThis,S=b.trustedTypes,w=S?S.createPolicy("lit-html",{createHTML:t=>t}):void 0,P="$lit$",C=`lit$${Math.random().toFixed(9).slice(2)}$`,H="?"+C,N=`<${H}>`,x=document,L=()=>x.createComment(""),U=t=>null===t||"object"!=typeof t&&"function"!=typeof t,O=Array.isArray,M="[ \t\n\f\r]",k=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,I=/-->/g,T=/>/g,R=RegExp(`>|${M}(?:([^\\s"'>=/]+)(${M}*=${M}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),D=/'/g,j=/"/g,z=/^(?:script|style|textarea|title)$/i,q=(t=>(e,...s)=>({_$litType$:t,strings:e,values:s}))(1),B=Symbol.for("lit-noChange"),W=Symbol.for("lit-nothing"),V=new WeakMap,J=x.createTreeWalker(x,129);function K(t,e){if(!O(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==w?w.createHTML(e):e}const Z=(t,e)=>{const s=t.length-1,i=[];let r,n=2===e?"<svg>":3===e?"<math>":"",a=k;for(let e=0;e<s;e++){const s=t[e];let o,h,l=-1,c=0;for(;c<s.length&&(a.lastIndex=c,h=a.exec(s),null!==h);)c=a.lastIndex,a===k?"!--"===h[1]?a=I:void 0!==h[1]?a=T:void 0!==h[2]?(z.test(h[2])&&(r=RegExp("</"+h[2],"g")),a=R):void 0!==h[3]&&(a=R):a===R?">"===h[0]?(a=r??k,l=-1):void 0===h[1]?l=-2:(l=a.lastIndex-h[2].length,o=h[1],a=void 0===h[3]?R:'"'===h[3]?j:D):a===j||a===D?a=R:a===I||a===T?a=k:(a=R,r=void 0);const d=a===R&&t[e+1].startsWith("/>")?" ":"";n+=a===k?s+N:l>=0?(i.push(o),s.slice(0,l)+P+s.slice(l)+C+d):s+C+(-2===l?e:d)}return[K(t,n+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]};class F{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let r=0,n=0;const a=t.length-1,o=this.parts,[h,l]=Z(t,e);if(this.el=F.createElement(h,s),J.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=J.nextNode())&&o.length<a;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(P)){const e=l[n++],s=i.getAttribute(t).split(C),a=/([.?@])?(.*)/.exec(e);o.push({type:1,index:r,name:a[2],strings:s,ctor:"."===a[1]?tt:"?"===a[1]?et:"@"===a[1]?st:Y}),i.removeAttribute(t)}else t.startsWith(C)&&(o.push({type:6,index:r}),i.removeAttribute(t));if(z.test(i.tagName)){const t=i.textContent.split(C),e=t.length-1;if(e>0){i.textContent=S?S.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],L()),J.nextNode(),o.push({type:2,index:++r});i.append(t[e],L())}}}else if(8===i.nodeType)if(i.data===H)o.push({type:2,index:r});else{let t=-1;for(;-1!==(t=i.data.indexOf(C,t+1));)o.push({type:7,index:r}),t+=C.length-1}r++}}static createElement(t,e){const s=x.createElement("template");return s.innerHTML=t,s}}function G(t,e,s=t,i){if(e===B)return e;let r=void 0!==i?s._$Co?.[i]:s._$Cl;const n=U(e)?void 0:e._$litDirective$;return r?.constructor!==n&&(r?._$AO?.(!1),void 0===n?r=void 0:(r=new n(t),r._$AT(t,s,i)),void 0!==i?(s._$Co??=[])[i]=r:s._$Cl=r),void 0!==r&&(e=G(t,r._$AS(t,e.values),r,i)),e}class Q{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){const{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??x).importNode(e,!0);J.currentNode=i;let r=J.nextNode(),n=0,a=0,o=s[0];for(;void 0!==o;){if(n===o.index){let e;2===o.type?e=new X(r,r.nextSibling,this,t):1===o.type?e=new o.ctor(r,o.name,o.strings,this,t):6===o.type&&(e=new it(r,this,t)),this._$AV.push(e),o=s[++a]}n!==o?.index&&(r=J.nextNode(),n++)}return J.currentNode=x,i}p(t){let e=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class X{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=W,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=G(this,t,e),U(t)?t===W||null==t||""===t?(this._$AH!==W&&this._$AR(),this._$AH=W):t!==this._$AH&&t!==B&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>O(t)||"function"==typeof t?.[Symbol.iterator])(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!==W&&U(this._$AH)?this._$AA.nextSibling.data=t:this.T(x.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,i="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=F.createElement(K(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new Q(i,this),s=t.u(this.options);t.p(e),this.T(s),this._$AH=t}}_$AC(t){let e=V.get(t.strings);return void 0===e&&V.set(t.strings,e=new F(t)),e}k(t){O(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const r of t)i===e.length?e.push(s=new X(this.O(L()),this.O(L()),this,this.options)):s=e[i],s._$AI(r),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class Y{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,r){this.type=1,this._$AH=W,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=r,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=W}_$AI(t,e=this,s,i){const r=this.strings;let n=!1;if(void 0===r)t=G(this,t,e,0),n=!U(t)||t!==this._$AH&&t!==B,n&&(this._$AH=t);else{const i=t;let a,o;for(t=r[0],a=0;a<r.length-1;a++)o=G(this,i[s+a],e,a),o===B&&(o=this._$AH[a]),n||=!U(o)||o!==this._$AH[a],o===W?t=W:t!==W&&(t+=(o??"")+r[a+1]),this._$AH[a]=o}n&&!i&&this.j(t)}j(t){t===W?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class tt extends Y{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===W?void 0:t}}class et extends Y{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==W)}}class st extends Y{constructor(t,e,s,i,r){super(t,e,s,i,r),this.type=5}_$AI(t,e=this){if((t=G(this,t,e,0)??W)===B)return;const s=this._$AH,i=t===W&&s!==W||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==W&&(s===W||i);i&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class it{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){G(this,t)}}const rt=b.litHtmlPolyfillSupport;rt?.(F,X),(b.litHtmlVersions??=[]).push("3.3.1");const nt=globalThis;
19
19
  /**
20
20
  * @license
21
21
  * Copyright 2017 Google LLC
22
22
  * SPDX-License-Identifier: BSD-3-Clause
23
- */
24
- let nt=class extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,s)=>{const i=s?.renderBefore??e;let r=i._$litPart$;if(void 0===r){const t=s?.renderBefore??null;i._$litPart$=r=new X(e.insertBefore(L(),t),t,void 0,s??{})}return r._$AI(t),r})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return W}};nt._$litElement$=!0,nt.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:nt});const at=globalThis.litElementPolyfillSupport;at?.({LitElement:nt}),(globalThis.litElementVersions??=[]).push("4.1.1");
23
+ */class at extends E{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,s)=>{const i=s?.renderBefore??e;let r=i._$litPart$;if(void 0===r){const t=s?.renderBefore??null;i._$litPart$=r=new X(e.insertBefore(L(),t),t,void 0,s??{})}return r._$AI(t),r})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return B}}at._$litElement$=!0,at.finalized=!0,nt.litElementHydrateSupport?.({LitElement:at});const ot=nt.litElementPolyfillSupport;ot?.({LitElement:at}),(nt.litElementVersions??=[]).push("4.2.1");
25
24
  /**
26
25
  * @license
27
26
  * Copyright 2017 Google LLC
28
27
  * SPDX-License-Identifier: BSD-3-Clause
29
28
  */
30
- const ot={attribute:!0,type:String,converter:_,reflect:!1,hasChanged:g},ht=(t=ot,e,s)=>{const{kind:i,metadata:r}=s;let n=globalThis.litPropertyMetadata.get(r);if(void 0===n&&globalThis.litPropertyMetadata.set(r,n=new Map),n.set(s.name,t),"accessor"===i){const{name:i}=s;return{set(s){const r=e.get.call(this);e.set.call(this,s),this.requestUpdate(i,r,t)},init(e){return void 0!==e&&this.P(i,void 0,t),e}}}if("setter"===i){const{name:i}=s;return function(s){const r=this[i];e.call(this,s),this.requestUpdate(i,r,t)}}throw Error("Unsupported decorator location: "+i)};
29
+ const ht={attribute:!0,type:String,converter:_,reflect:!1,hasChanged:g},lt=(t=ht,e,s)=>{const{kind:i,metadata:r}=s;let n=globalThis.litPropertyMetadata.get(r);if(void 0===n&&globalThis.litPropertyMetadata.set(r,n=new Map),"setter"===i&&((t=Object.create(t)).wrapped=!0),n.set(s.name,t),"accessor"===i){const{name:i}=s;return{set(s){const r=e.get.call(this);e.set.call(this,s),this.requestUpdate(i,r,t)},init(e){return void 0!==e&&this.C(i,void 0,t,e),e}}}if("setter"===i){const{name:i}=s;return function(s){const r=this[i];e.call(this,s),this.requestUpdate(i,r,t)}}throw Error("Unsupported decorator location: "+i)};
31
30
  /**
32
31
  * @license
33
32
  * Copyright 2017 Google LLC
34
33
  * SPDX-License-Identifier: BSD-3-Clause
35
- */function lt(t){return(e,s)=>"object"==typeof s?ht(t,e,s):((t,e,s)=>{const i=e.hasOwnProperty(s);return e.constructor.createProperty(s,i?{...t,wrapped:!0}:t),i?Object.getOwnPropertyDescriptor(e,s):void 0})(t,e,s)
34
+ */function ct(t){return(e,s)=>"object"==typeof s?lt(t,e,s):((t,e,s)=>{const i=e.hasOwnProperty(s);return e.constructor.createProperty(s,t),i?Object.getOwnPropertyDescriptor(e,s):void 0})(t,e,s)}
36
35
  /**
37
36
  * @license
38
37
  * Copyright 2020 Google LLC
39
38
  * SPDX-License-Identifier: BSD-3-Clause
40
- */}const ct=Symbol.for(""),dt=t=>{if(t?.r===ct)return t?._$litStatic$},pt=new Map,ut=(t=>(e,...s)=>{const i=s.length;let r,n;const a=[],o=[];let h,l=0,c=!1;for(;l<i;){for(h=e[l];l<i&&void 0!==(n=s[l],r=dt(n));)h+=r+e[++l],c=!0;l!==i&&o.push(n),a.push(h),l++}if(l===i&&a.push(e[i]),c){const t=a.join("$$lit$$");void 0===(e=pt.get(t))&&(a.raw=a,pt.set(t,e=a)),s=o}return t(e,...s)})(B);function $t(t){return t.modules.flatMap((t=>t.exports)).filter((t=>"custom-element-definition"===t?.kind))}function mt(t){return!(t.privacy&&"public"!==t.privacy||t.name.startsWith("_")||t.name.startsWith("#"))}function ft(t){return(t=>({_$litStatic$:t,r:ct}))(`h${t}`)}function vt(t,e){const s=t.map((t=>{let s=ut``;for(const i of e){const e=`${i.type}`,r=i.valueAccessor(t);s=ut`${s}${ut`<td class="${e}">${r?ut`<span>${r}</span>`:q}</td>`}`}return ut`<tr>${s}</tr>`})),i=e.map((t=>ut`<th class="${t.type}">${t.header}</th>`));return ut`<table cellpadding="0" cellspacing="0">
39
+ */const dt=Symbol.for(""),pt=t=>{if(t?.r===dt)return t?._$litStatic$},ut=new Map,mt=(t=>(e,...s)=>{const i=s.length;let r,n;const a=[],o=[];let h,l=0,c=!1;for(;l<i;){for(h=e[l];l<i&&void 0!==(n=s[l],r=pt(n));)h+=r+e[++l],c=!0;l!==i&&o.push(n),a.push(h),l++}if(l===i&&a.push(e[i]),c){const t=a.join("$$lit$$");void 0===(e=ut.get(t))&&(a.raw=a,ut.set(t,e=a)),s=o}return t(e,...s)})(q);function $t(t){return t.modules.flatMap(t=>t.exports).filter(t=>"custom-element-definition"===t?.kind)}function ft(t){return!(t.privacy&&"public"!==t.privacy||t.name.startsWith("_")||t.name.startsWith("#"))}function vt(t){return(t=>({_$litStatic$:t,r:dt}))(`h${t}`)}function yt(t,e){const s=t.map(t=>{let s=mt``;for(const i of e){const e=`${i.type}`,r=i.valueAccessor(t);s=mt`${s}${mt`<td class="${e}">${r?mt`<span>${r}</span>`:W}</td>`}`}return mt`<tr>${s}</tr>`}),i=e.map(t=>mt`<th class="${t.type}">${t.header}</th>`);return mt`<table cellpadding="0" cellspacing="0">
41
40
  <thead>
42
41
  <tr> ${i} </tr>
43
42
  </thead>
44
43
  <tbody> ${s} </tbody>
45
- </table>`}function yt(t){if(!t)return t;t.startsWith("-")&&(t=t.substring(1));const e=t.split(" ");let s=ut``;for(const t of e)s=ut`${s} ${_t(t)}`;return s}function _t(t){let e;if(e=t.match(/^https?:\/\//))return ut`<a href="${t}">${t}</a>`;if(e=t.match(/`(?<contents>.*)`/)){const s=e.groups?.contents,i=t.split(`\`${s}\``);return s?ut`${i[0]??""}<code>${s}</code>${i[1]??""}`:t}return t}let gt=class extends nt{get initialHeaderLevel(){return this.#t}set initialHeaderLevel(t){t>3&&(t=3);const e=this.#t;this.#t=t,this.requestUpdate("initialHeaderLevel",e)}static{this.styles=[t]}#t;#e;#s;#i;#r;#n;#a;get#o(){if(!this.#s)return[];let t=$t(this.#s).map((t=>t?.name)).filter((t=>t));return this.elementNames&&(t=t.filter((t=>this.elementNames.includes(t)))),t.sort(((t,e)=>t.localeCompare(e)))}get#h(){if(this.#s&&(this.#i??=this.#o[0],this.#i))return function(t,e){const s=$t(t).find((t=>t?.name===e));if(!s)return;const i=t.modules.find((t=>t.path===s.declaration.module));if(!i)return;const r=i.declarations?.find((t=>"class"===t.kind&&t.name===s.declaration.name));return r}(this.#s,this.#i)}constructor(){super(),this.src=null,this.elementNames=null,this.initialElementName=null,this.headerIdPrefix=null,this.#t=1,this.#e=!1,this.#a=window.location.href.replace(window.location.hash,""),this.attachInternals&&(this.#n=this.attachInternals())}firstUpdated(t){super.firstUpdated(t),this.#e||this.#s||!this.src||this.#l(),this.#c(),window.addEventListener("hashchange",(()=>this.#c),{capture:!0})}update(t){super.update(t),t.has("src")&&this.#l()}render(){return this.#e?ut`Loading...`:this.#r?ut`An error was encountered trying to load schema from ${this.src}`:this.#h?ut`<article>
46
- <div class="header-row">${this.#d()}</div>
47
- <div>${yt(this.#h.description)}</div>
48
- ${this.#p()} ${this.#u()} ${this.#$()}
49
- ${this.#m()} ${this.#f()} ${this.#v()} ${this.#y()} ${this.#_()} </article
50
- >`:q}#d(){if(this.#o.length>1){let t=this.#o.find((t=>t===this.#i));t||(t=this.#o[0]);const e=this.#o.map((e=>ut`<option ?selected="${e===t}" value="${e}">${e}</option>`));return ut`
51
- <${ft(this.initialHeaderLevel)}>
44
+ </table>`}function _t(t){return t?(t.startsWith("-")&&(t=t.substring(1)),function(t){const e=[],s=t;let i=0;for(;i<s.length;){let t=!1;const r=s.slice(i).match(/^`([^`]+)`/);if(r){e.push(mt`<code part="markdown-code">${r[1]}</code>`),i+=r[0].length,t=!0;continue}const n=s.slice(i).match(/^\[([^\]]+)\]\(([^)]+)\)/);if(n){e.push(mt`<a part="markdown-link" href="${n[2]}">${n[1]}</a>`),i+=n[0].length,t=!0;continue}const a=s.slice(i).match(/^(https?:\/\/[^\s]+)/);if(a){e.push(mt`<a part="markdown-link" href="${a[1]}">${a[1]}</a>`),i+=a[0].length,t=!0;continue}const o=s.slice(i).match(/^\*\*([^*]+)\*\*/);if(o){e.push(mt`<strong part="markdown-bold">${o[1]}</strong>`),i+=o[0].length,t=!0;continue}const h=s.slice(i).match(/^\*([^*]+)\*/);h?(e.push(mt`<em part="markdown-italic">${h[1]}</em>`),i+=h[0].length,t=!0):t||(e.push(s[i]),i++)}return mt`${e}`}(t)):t}let gt=class extends at{get initialHeaderLevel(){return this.#t}set initialHeaderLevel(t){t>3&&(t=3);const e=this.#t;this.#t=t,this.requestUpdate("initialHeaderLevel",e)}static{this.styles=[t]}#t;#e;#s;#i;#r;#n;#a;get#o(){if(!this.#s)return[];let t=$t(this.#s).map(t=>t?.name).filter(t=>t);return this.elementNames&&(t=t.filter(t=>this.elementNames.includes(t))),t.sort((t,e)=>t.localeCompare(e))}get#h(){if(this.#s&&(this.#i??=this.#o[0],this.#i))return function(t,e){const s=$t(t).find(t=>t?.name===e);if(!s)return;const i=t.modules.find(t=>t.path===s.declaration.module);if(!i)return;const r=i.declarations?.find(t=>"class"===t.kind&&t.name===s.declaration.name);return r}(this.#s,this.#i)}constructor(){super(),this.src=null,this.elementNames=null,this.initialElementName=null,this.headerIdPrefix=null,this.#t=1,this.#e=!1,this.#a=window.location.href.replace(window.location.hash,""),this.attachInternals&&(this.#n=this.attachInternals())}firstUpdated(t){super.firstUpdated(t),this.#e||this.#s||!this.src||this.#l(),this.#c(),window.addEventListener("hashchange",()=>this.#c,{capture:!0})}update(t){super.update(t),t.has("src")&&this.#l()}render(){return this.#e?mt`Loading...`:this.#r?mt`An error was encountered trying to load schema from ${this.src}`:this.#h?mt`<article>
45
+ <div class="header-row">${this.#d()}</div>
46
+ <div>${_t(this.#h.description)}</div>
47
+ ${this.#p()} ${this.#u()} ${this.#m()}
48
+ ${this.#$()} ${this.#f()} ${this.#v()} ${this.#y()}
49
+ ${this.#_()}
50
+ </article>`:W}#d(){if(this.#o.length>1){let t=this.#o.find(t=>t===this.#i);t||(t=this.#o[0]);const e=this.#o.map(e=>mt`<option ?selected="${e===t}" value="${e}">${e}</option>`);return mt`
51
+ <${vt(this.initialHeaderLevel)}>
52
52
  <select part="chooser" @change="${this.#g}">${e}</select>
53
- </${ft(this.initialHeaderLevel)}>`}return ut`<${ft(this.initialHeaderLevel)}>${this.#i}</${ft(this.initialHeaderLevel)}>`}#p(){const t=this.#h?.attributes;if(t?.length){const e=vt(t,[{header:"Attribute",valueAccessor:t=>t.name,type:"name"},{header:"Description",type:"summary",valueAccessor:t=>yt(t.description)},{header:"Type",valueAccessor:t=>t.type?.text,type:"type"},{header:"Default",valueAccessor:t=>t.default,type:"default"}]);return ut`
53
+ </${vt(this.initialHeaderLevel)}>`}return mt`<${vt(this.initialHeaderLevel)}>${this.#i}</${vt(this.initialHeaderLevel)}>`}#p(){const t=this.#h?.attributes;if(t?.length){const e=yt(t,[{header:"Attribute",valueAccessor:t=>t.name,type:"name"},{header:"Description",type:"summary",valueAccessor:t=>_t(t.description)},{header:"Type",valueAccessor:t=>t.type?.text,type:"type"},{header:"Default",valueAccessor:t=>t.default,type:"default"}]);return mt`
54
54
  <section part="attributes">
55
55
  <a class="header-link" id="${this.#A("attributes")}" href="${this.#a}#${this.#A("attributes")}">
56
- <${ft(this.initialHeaderLevel+1)}>Attributes</${ft(this.initialHeaderLevel+1)}></a>
56
+ <${vt(this.initialHeaderLevel+1)}>Attributes</${vt(this.initialHeaderLevel+1)}></a>
57
57
  ${e}
58
58
  </section>
59
- `}return q}#u(){const t=this.#h?.members?.filter((t=>"field"===t.kind&&mt(t)));if(t?.length){const e=vt(t,[{header:"Property",valueAccessor:t=>t.name,type:"name"},{header:"Description",valueAccessor:t=>yt(t.description),type:"summary"},{header:"Type",valueAccessor:t=>t.type?.text,type:"type"},{header:"Default",valueAccessor:t=>t.default,type:"default"}]);return ut`
59
+ `}return W}#u(){const t=this.#h?.members?.filter(t=>"field"===t.kind&&ft(t));if(t?.length){const e=yt(t,[{header:"Property",valueAccessor:t=>t.name,type:"name"},{header:"Description",valueAccessor:t=>_t(t.description),type:"summary"},{header:"Type",valueAccessor:t=>t.type?.text,type:"type"},{header:"Default",valueAccessor:t=>t.default,type:"default"}]);return mt`
60
60
  <section part="properties">
61
61
  <a class="header-link" id="${this.#A("properties")}" href="${this.#a}#${this.#A("properties")}">
62
- <${ft(this.initialHeaderLevel+1)}>Properties</${ft(this.initialHeaderLevel+1)}></a>
62
+ <${vt(this.initialHeaderLevel+1)}>Properties</${vt(this.initialHeaderLevel+1)}></a>
63
63
  ${e}
64
64
  </section>
65
- `}return q}#$(){const t=this.#h?.cssProperties;if(t?.length){const e=vt(t,[{header:"CSS Property",valueAccessor:t=>t.name,type:"name"},{header:"Description",valueAccessor:t=>yt(t.description),type:"summary"},{header:"Default",valueAccessor:t=>t.default,type:"default"}]);return ut`
65
+ `}return W}#m(){const t=this.#h?.cssProperties;if(t?.length){const e=yt(t,[{header:"CSS Property",valueAccessor:t=>t.name,type:"name"},{header:"Description",valueAccessor:t=>_t(t.description),type:"summary"},{header:"Default",valueAccessor:t=>t.default,type:"default"}]);return mt`
66
66
  <section part="cssprops">
67
- <a class="header-link" id="${this.#A("cssprops")}" href="${this.#a}#${this.#A("cssprops")}"> <${ft(this.initialHeaderLevel+1)} )}">CSS Custom Properties</${ft(this.initialHeaderLevel+1)}></a>
67
+ <a class="header-link" id="${this.#A("cssprops")}" href="${this.#a}#${this.#A("cssprops")}"> <${vt(this.initialHeaderLevel+1)} )}">CSS Custom Properties</${vt(this.initialHeaderLevel+1)}></a>
68
68
  ${e}
69
69
  </section>
70
- `}return q}#m(){const t=this.#h?.cssParts;if(t?.length){const e=vt(t,[{header:"CSS Part",valueAccessor:t=>t.name,type:"name"},{header:"Description",valueAccessor:t=>yt(t.description),type:"summary"}]);return ut`
70
+ `}return W}#$(){const t=this.#h?.cssParts;if(t?.length){const e=yt(t,[{header:"CSS Part",valueAccessor:t=>t.name,type:"name"},{header:"Description",valueAccessor:t=>_t(t.description),type:"summary"}]);return mt`
71
71
  <section part="cssparts">
72
- <a class="header-link" id="${this.#A("parts")}" href="${this.#a}#${this.#A("parts")}"> <${ft(this.initialHeaderLevel+1)}>CSS Shadow Parts</${ft(this.initialHeaderLevel+1)}></a>
72
+ <a class="header-link" id="${this.#A("parts")}" href="${this.#a}#${this.#A("parts")}"> <${vt(this.initialHeaderLevel+1)}>CSS Shadow Parts</${vt(this.initialHeaderLevel+1)}></a>
73
73
  ${e}
74
74
  </section>
75
- `}return q}#f(){const t=this.#h?.events;if(t?.length){const e=vt(t,[{header:"Event",valueAccessor:t=>t.name,type:"name"},{header:"Description",valueAccessor:t=>yt(t.description),type:"summary"},{header:"Type",valueAccessor:t=>t.type?.text,type:"type"}]);return ut`
75
+ `}return W}#f(){const t=this.#h?.events;if(t?.length){const e=yt(t,[{header:"Event",valueAccessor:t=>t.name,type:"name"},{header:"Description",valueAccessor:t=>_t(t.description),type:"summary"},{header:"Type",valueAccessor:t=>t.type?.text,type:"type"}]);return mt`
76
76
  <section part="events">
77
77
  <a class="header-link" id="${this.#A("events")}" href="${this.#a}#${this.#A("events")}">
78
- <${ft(this.initialHeaderLevel+1)}>Events</${ft(this.initialHeaderLevel+1)}></a>
78
+ <${vt(this.initialHeaderLevel+1)}>Events</${vt(this.initialHeaderLevel+1)}></a>
79
79
  ${e}
80
80
  </section>
81
- `}return q}#v(){const t=this.#h?.members?.filter((t=>"method"===t.kind&&mt(t)));if(t?.length){const e=vt(t,[{header:"Method",valueAccessor:t=>t.name,type:"name"},{header:"Description",valueAccessor:t=>yt(t.description),type:"summary"},{header:"Signature",valueAccessor:t=>function(t){const e=()=>{const e=t.return?.type?.text;return 0===e?.length?"void":e??"unknown"};if(t.parameters){const s=t.parameters?.map((t=>t.name+(t.optional?"?":""))).join(", "),i=t.parameters?.map((t=>{const e=`: ${t?.type?.text}${t.default?` = ${t.default}`:""}`,s=t.name+(t.optional?"?":"")+e;return ut`
81
+ `}return W}#v(){const t=this.#h?.members?.filter(t=>"method"===t.kind&&ft(t));if(t?.length){const e=yt(t,[{header:"Method",valueAccessor:t=>t.name,type:"name"},{header:"Description",valueAccessor:t=>_t(t.description),type:"summary"},{header:"Signature",valueAccessor:t=>function(t){const e=()=>{const e=t.return?.type?.text;return 0===e?.length?"void":e??"unknown"};if(t.parameters){const s=t.parameters?.map(t=>t.name+(t.optional?"?":"")).join(", "),i=t.parameters?.map(t=>{const e=`: ${t?.type?.text}${t.default?` = ${t.default}`:""}`,s=t.name+(t.optional?"?":"")+e;return mt`
82
82
  <div class="param-container">
83
83
  <div class="param">${s}</div>
84
- ${t.description?ut`<div class="param-description">${yt(t.description)}</div>`:q}
84
+ ${t.description?mt`<div class="param-description">${_t(t.description)}</div>`:W}
85
85
  </div>
86
- `}));return ut`<details>
86
+ `});return mt`<details>
87
87
  <summary>${t.name}(${s}): ${e()}</summary>
88
88
  <div class="expanded-details">${i}</div>
89
- </details>`}return ut`${t.name}(): ${e()}`}(t),type:"signature"}]);return ut`
89
+ </details>`}return mt`${t.name}(): ${e()}`}(t),type:"signature"}]);return mt`
90
90
  <section part="methods">
91
91
  <a class="header-link" id="${this.#A("methods")}" href="${this.#a}#${this.#A("methods")}">
92
- <${ft(this.initialHeaderLevel+1)}>Methods</${ft(this.initialHeaderLevel+1)}></a>
92
+ <${vt(this.initialHeaderLevel+1)}>Methods</${vt(this.initialHeaderLevel+1)}></a>
93
93
  ${e}
94
94
  </section>
95
- `}return q}#y(){const t=this.#h?.slots;if(t?.length){const e=vt(t,[{header:"Slot",valueAccessor(t){let e=t.name;return e.startsWith("-")&&(e=e.substring(1)),e},type:"name"},{header:"Description",valueAccessor:t=>yt(t.description),type:"summary"}]);return ut`
95
+ `}return W}#y(){const t=this.#h?.slots;if(t?.length){const e=yt(t,[{header:"Slot",valueAccessor(t){let e=t.name;return e.startsWith("-")&&(e=e.substring(1)),e},type:"name"},{header:"Description",valueAccessor:t=>_t(t.description),type:"summary"}]);return mt`
96
96
  <section part="slots">
97
97
  <a class="header-link" id="${this.#A("slots")}" href="${this.#a}#${this.#A("slots")}">
98
- <${ft(this.initialHeaderLevel+1)}>Slots</${ft(this.initialHeaderLevel+1)}></a>
98
+ <${vt(this.initialHeaderLevel+1)}>Slots</${vt(this.initialHeaderLevel+1)}></a>
99
99
  ${e}
100
100
  </section>
101
- `}return q}#_(){const t=this.#h?.cssStates;if(t?.length){const e=vt(t,[{header:"State",valueAccessor:t=>t.name,type:"name"},{header:"Description",valueAccessor:t=>yt(t.description),type:"summary"}]);return ut`
101
+ `}return W}#_(){const t=this.#h?.cssStates;if(t?.length){const e=yt(t,[{header:"State",valueAccessor:t=>t.name,type:"name"},{header:"Description",valueAccessor:t=>_t(t.description),type:"summary"}]);return mt`
102
102
  <section part="cssstates">
103
103
  <a class="header-link" id="${this.#A("states")}" href="${this.#a}#${this.#A("states")}">
104
- <${ft(this.initialHeaderLevel+1)}>CSS Custom States</${ft(this.initialHeaderLevel+1)}></a>
104
+ <${vt(this.initialHeaderLevel+1)}>CSS Custom States</${vt(this.initialHeaderLevel+1)}></a>
105
105
  ${e}
106
106
  </section>
107
- `}return q}#g(t){this.#i=t.target.value||void 0,this.requestUpdate()}async#l(){if(this.src){this.#e=!0,this.#n?.states?.add("loading");const t=await fetch(this.src);if(t.ok){const e=await t.json();this.#s=e,this.initialElementName&&this.#o.includes(this.initialElementName)?this.#i=this.initialElementName:this.#i=this.#o[0],this.requestUpdate()}else this.#r=!0;this.#e=!1,this.#n?.states?.delete("loading"),this.#c(),this.dispatchEvent(new CustomEvent("load",{detail:{success:!this.#r}}))}}#A(t,e=!1){let s=t;return this.#i&&(s=`${this.#i}${e?"\\":""}~${s}`),this.headerIdPrefix&&(s=`${this.headerIdPrefix}_${s}`),s}async#c(){if(!window.location.hash)return;const t=window.location.hash.substring(1),e=new RegExp((this.headerIdPrefix?`(?<prefix>${this.headerIdPrefix})_`:"")+"(?<element>.*)~(?<id>.*)").exec(t);e&&this.#o?.includes(e.groups?.element)&&(this.#i=e.groups?.element,this.requestUpdate(),await this.updateComplete,this.renderRoot.querySelector(`#${this.#A(e.groups.id,!0)}`)?.scrollIntoView({behavior:"smooth",block:"start"}))}};e([lt({type:String})],gt.prototype,"src",void 0),e([lt({type:Array})],gt.prototype,"elementNames",void 0),e([lt({type:String})],gt.prototype,"initialElementName",void 0),e([lt({type:Number})],gt.prototype,"initialHeaderLevel",null),e([lt({type:String})],gt.prototype,"headerIdPrefix",void 0),gt=e([(t=>(e,s)=>{void 0!==s?s.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)})("customelement-manifest-element")],gt);export{gt as CustomElementManifestElement};
107
+ `}return W}#g(t){this.#i=t.target.value||void 0,this.requestUpdate()}async#l(){if(this.src){this.#e=!0,this.#n?.states?.add("loading");const t=await fetch(this.src);if(t.ok){const e=await t.json();this.#s=e,this.initialElementName&&this.#o.includes(this.initialElementName)?this.#i=this.initialElementName:this.#i=this.#o[0],this.requestUpdate()}else this.#r=!0;this.#e=!1,this.#n?.states?.delete("loading"),this.#c(),this.dispatchEvent(new CustomEvent("load",{detail:{success:!this.#r}}))}}#A(t,e=!1){let s=t;return this.#i&&(s=`${this.#i}${e?"\\":""}~${s}`),this.headerIdPrefix&&(s=`${this.headerIdPrefix}_${s}`),s}async#c(){if(!window.location.hash)return;const t=window.location.hash.substring(1),e=new RegExp((this.headerIdPrefix?`(?<prefix>${this.headerIdPrefix})_`:"")+"(?<element>.*)~(?<id>.*)").exec(t);e&&this.#o?.includes(e.groups?.element)&&(this.#i=e.groups?.element,this.requestUpdate(),await this.updateComplete,this.renderRoot.querySelector(`#${this.#A(e.groups.id,!0)}`)?.scrollIntoView({behavior:"smooth",block:"start"}))}};e([ct({type:String})],gt.prototype,"src",void 0),e([ct({type:Array})],gt.prototype,"elementNames",void 0),e([ct({type:String})],gt.prototype,"initialElementName",void 0),e([ct({type:Number})],gt.prototype,"initialHeaderLevel",null),e([ct({type:String})],gt.prototype,"headerIdPrefix",void 0),gt=e([(t=>(e,s)=>{void 0!==s?s.addInitializer(()=>{customElements.define(t,e)}):customElements.define(t,e)})("customelement-manifest-element")],gt);export{gt as CustomElementManifestElement};
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@zywave/customelement-manifest-element",
3
- "version": "1.6.1",
3
+ "version": "1.7.0",
4
4
  "main": "index.js",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
7
7
  "dependencies": {
8
- "lit": "^3.1.0"
8
+ "lit": "^3.3.1"
9
9
  },
10
10
  "publishConfig": {
11
11
  "access": "public"
@@ -18,40 +18,43 @@
18
18
  "custom-elements.json"
19
19
  ],
20
20
  "devDependencies": {
21
- "@custom-elements-manifest/analyzer": "^0.10.0",
21
+ "@custom-elements-manifest/analyzer": "^0.11.0",
22
22
  "@custom-elements-manifest/to-markdown": "^0.1.0",
23
+ "@eslint/eslintrc": "^3.3.3",
24
+ "@eslint/js": "^9.39.2",
23
25
  "@esm-bundle/chai": "^4.3.4",
24
- "@rollup/plugin-node-resolve": "^15.2.3",
26
+ "@rollup/plugin-node-resolve": "^16.0.3",
25
27
  "@rollup/plugin-terser": "^0.4.4",
26
- "@semantic-release/gitlab": "^13.2.3",
28
+ "@semantic-release/gitlab": "^13.3.0",
27
29
  "@semantic-release/gitlab-config": "^14.0.1",
28
- "@types/mocha": "^10.0.6",
29
- "@types/node": "^22.10.2",
30
- "@typescript-eslint/eslint-plugin": "^6.12.0",
31
- "@typescript-eslint/parser": "^6.12.0",
32
- "@web/test-runner": "^0.19.0",
33
- "@web/test-runner-junit-reporter": "^0.7.0",
34
- "@web/test-runner-playwright": "^0.11.0",
35
- "@zywave/zui-sass-scripts": "^4.0.15",
36
- "chai": "^5.1.2",
37
- "chokidar": "^4.0.3",
38
- "custom-elements-manifest": "^2.0.0",
39
- "es-dev-server": "^2.1.0",
40
- "es-module-shims": "^1.8.2",
41
- "eslint": "^8.54.0",
42
- "eslint-config-prettier": "^9.0.0",
43
- "eslint-plugin-lit": "^1.10.1",
44
- "eslint-plugin-prettier": "^5.0.1",
45
- "mocha": "^10.2.0",
46
- "playwright": "^1.45.3",
47
- "prettier": "^3.1.0",
48
- "rollup": "^4.29.1",
49
- "sass": "^1.69.5",
50
- "semantic-release": "^24.2.0",
51
- "sinon": "^17.0.1",
52
- "terser": "^5.37.0",
30
+ "@types/mocha": "^10.0.10",
31
+ "@types/node": "^25.2.3",
32
+ "@typescript-eslint/eslint-plugin": "^8.55.0",
33
+ "@typescript-eslint/parser": "^8.55.0",
34
+ "@web/dev-server": "0.4.6",
35
+ "@web/test-runner": "^0.20.2",
36
+ "@web/test-runner-junit-reporter": "^0.8.0",
37
+ "@web/test-runner-playwright": "^0.11.1",
38
+ "@zywave/zui-sass-scripts": "^4.0.18",
39
+ "chai": "^6.2.2",
40
+ "chokidar": "^5.0.0",
41
+ "custom-elements-manifest": "^2.1.0",
42
+ "es-module-shims": "^2.8.0",
43
+ "eslint": "^9.39.2",
44
+ "eslint-config-prettier": "^10.1.8",
45
+ "eslint-plugin-lit": "^2.2.1",
46
+ "eslint-plugin-prettier": "^5.5.5",
47
+ "globals": "^17.3.0",
48
+ "mocha": "^11.7.5",
49
+ "playwright": "^1.58.2",
50
+ "prettier": "^3.8.1",
51
+ "rollup": "^4.57.1",
52
+ "sass": "^1.97.3",
53
+ "semantic-release": "^25.0.3",
54
+ "sinon": "^21.0.1",
55
+ "terser": "^5.46.0",
53
56
  "tslib": "^2.8.1",
54
- "typescript": "^5.7.2"
57
+ "typescript": "^5.9.3"
55
58
  },
56
59
  "scripts": {
57
60
  "analyze": "cem analyze --globs \"src/customelement-manifest-element.ts\" --litelement",
@@ -59,9 +62,9 @@
59
62
  "build:ts": "tsc -p tsconfig.json",
60
63
  "build:scss": "sass src/customelement-manifest-element.scss customelement-manifest-element.css",
61
64
  "clean": "git clean -dfX",
62
- "demo": "es-dev-server --app-index demo/index.html --node-resolve --watch --open",
65
+ "demo": "web-dev-server --app-index demo/index.html --node-resolve --watch --open",
63
66
  "docs": "npm run analyze && node scripts/docs.js",
64
- "lint": "eslint \"{src,test}/**/*.ts\"",
67
+ "lint": "eslint",
65
68
  "test": "npm run test:build && npm run test:run",
66
69
  "test:build": "tsc --build tsconfig.test.json && cd test/schemas && cem analyze --globs \"element.js\" && cd ../..",
67
70
  "test:run": "wtr test/**/*.test.js --node-resolve",