/** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const O=window,Z=O.ShadowRoot&&(O.ShadyCSS===void 0||O.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,J=Symbol(),F=new WeakMap;let lt=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==J)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(Z&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=F.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&F.set(e,t))}return t}toString(){return this.cssText}};const mt=n=>new lt(typeof n=="string"?n:n+"",void 0,J),ht=(n,...t)=>{const e=n.length===1?n[0]:t.reduce((i,s,r)=>i+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+n[r+1],n[0]);return new lt(e,n,J)},yt=(n,t)=>{Z?n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const i=document.createElement("style"),s=O.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=e.cssText,n.appendChild(i)})},G=Z?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return mt(e)})(n):n;/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */var z;const k=window,Q=k.trustedTypes,At=Q?Q.emptyScript:"",X=k.reactiveElementPolyfillSupport,W={toAttribute(n,t){switch(t){case Boolean:n=n?At:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,t){let e=n;switch(t){case Boolean:e=n!==null;break;case Number:e=n===null?null:Number(n);break;case Object:case Array:try{e=JSON.parse(n)}catch{e=null}}return e}},at=(n,t)=>t!==n&&(t==t||n==n),L={attribute:!0,type:String,converter:W,reflect:!1,hasChanged:at},q="finalized";let m=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,i)=>{const s=this._$Ep(i,e);s!==void 0&&(this._$Ev.set(s,i),t.push(s))}),t}static createProperty(t,e=L){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i=typeof t=="symbol"?Symbol():"__"+t,s=this.getPropertyDescriptor(t,i,e);s!==void 0&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(s){const r=this[t];this[e]=s,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||L}static finalize(){if(this.hasOwnProperty(q))return!1;this[q]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,i=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const s of i)this.createProperty(s,e[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const s of i)e.unshift(G(s))}else t!==void 0&&e.push(G(t));return e}static _$Ep(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,i;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((i=t.hostConnected)===null||i===void 0||i.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;const e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return yt(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostConnected)===null||i===void 0?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostDisconnected)===null||i===void 0?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=L){var s;const r=this.constructor._$Ep(t,i);if(r!==void 0&&i.reflect===!0){const o=(((s=i.converter)===null||s===void 0?void 0:s.toAttribute)!==void 0?i.converter:W).toAttribute(e,i.type);this._$El=t,o==null?this.removeAttribute(r):this.setAttribute(r,o),this._$El=null}}_$AK(t,e){var i;const s=this.constructor,r=s._$Ev.get(t);if(r!==void 0&&this._$El!==r){const o=s.getPropertyOptions(r),a=typeof o.converter=="function"?{fromAttribute:o.converter}:((i=o.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?o.converter:W;this._$El=r,this[r]=a.fromAttribute(e,o.type),this._$El=null}}requestUpdate(t,e,i){let s=!0;t!==void 0&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||at)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,i))):s=!1),!this.isUpdatePending&&s&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((s,r)=>this[r]=s),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),(t=this._$ES)===null||t===void 0||t.forEach(s=>{var r;return(r=s.hostUpdate)===null||r===void 0?void 0:r.call(s)}),this.update(i)):this._$Ek()}catch(s){throw e=!1,this._$Ek(),s}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(i=>{var s;return(s=i.hostUpdated)===null||s===void 0?void 0:s.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,i)=>this._$EO(i,this[i],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}};m[q]=!0,m.elementProperties=new Map,m.elementStyles=[],m.shadowRootOptions={mode:"open"},X?.({ReactiveElement:m}),((z=k.reactiveElementVersions)!==null&&z!==void 0?z:k.reactiveElementVersions=[]).push("1.6.3");/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */var j;const H=window,b=H.trustedTypes,Y=b?b.createPolicy("lit-html",{createHTML:n=>n}):void 0,K="$lit$",v=`lit$${(Math.random()+"").slice(9)}$`,ct="?"+v,bt=`<${ct}>`,g=document,C=()=>g.createComment(""),x=n=>n===null||typeof n!="object"&&typeof n!="function",dt=Array.isArray,Et=n=>dt(n)||typeof n?.[Symbol.iterator]=="function",D=`[ \f\r]`,w=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,tt=/-->/g,et=/>/g,_=RegExp(`>|${D}(?:([^\\s"'>=/]+)(${D}*=${D}*(?:[^ \f\r"'\`<>=]|("|')|))|$)`,"g"),it=/'/g,st=/"/g,ut=/^(?:script|style|textarea|title)$/i,St=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),y=St(1),E=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),nt=new WeakMap,f=g.createTreeWalker(g,129,null,!1);function pt(n,t){if(!Array.isArray(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Y!==void 0?Y.createHTML(t):t}const wt=(n,t)=>{const e=n.length-1,i=[];let s,r=t===2?"":"",o=w;for(let a=0;a"?(o=s??w,d=-1):c[1]===void 0?d=-2:(d=o.lastIndex-c[2].length,h=c[1],o=c[3]===void 0?_:c[3]==='"'?st:it):o===st||o===it?o=_:o===tt||o===et?o=w:(o=_,s=void 0);const $=o===_&&n[a+1].startsWith("/>")?" ":"";r+=o===w?l+bt:d>=0?(i.push(h),l.slice(0,d)+K+l.slice(d)+v+$):l+v+(d===-2?(i.push(void 0),a):$)}return[pt(n,r+(n[e]||"")+(t===2?"":"")),i]};class P{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let r=0,o=0;const a=t.length-1,l=this.parts,[h,c]=wt(t,e);if(this.el=P.createElement(h,i),f.currentNode=this.el.content,e===2){const d=this.el.content,p=d.firstChild;p.remove(),d.append(...p.childNodes)}for(;(s=f.nextNode())!==null&&l.length0){s.textContent=b?b.emptyScript:"";for(let $=0;$2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=u}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,s){const r=this.strings;let o=!1;if(r===void 0)t=S(this,t,e,0),o=!x(t)||t!==this._$AH&&t!==E,o&&(this._$AH=t);else{const a=t;let l,h;for(t=r[0],l=0;l{var i,s;const r=(i=e?.renderBefore)!==null&&i!==void 0?i:t;let o=r._$litPart$;if(o===void 0){const a=(s=e?.renderBefore)!==null&&s!==void 0?s:null;r._$litPart$=o=new T(t.insertBefore(C(),a),a,void 0,e??{})}return o._$AI(n),o};/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */var B,I;class A extends m{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=kt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!1)}render(){return E}}A.finalized=!0,A._$litElement$=!0,(B=globalThis.litElementHydrateSupport)===null||B===void 0||B.call(globalThis,{LitElement:A});const rt=globalThis.litElementPolyfillSupport;rt?.({LitElement:A});((I=globalThis.litElementVersions)!==null&&I!==void 0?I:globalThis.litElementVersions=[]).push("3.3.3");/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const $t=n=>t=>typeof t=="function"?((e,i)=>(customElements.define(e,i),i))(n,t):((e,i)=>{const{kind:s,elements:r}=i;return{kind:s,elements:r,finisher(o){customElements.define(e,o)}}})(n,t);/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const Ht=(n,t)=>t.kind==="method"&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(e){e.createProperty(t.key,n)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){typeof t.initializer=="function"&&(this[t.key]=t.initializer.call(this))},finisher(e){e.createProperty(t.key,n)}},Mt=(n,t,e)=>{t.constructor.createProperty(e,n)};function vt(n){return(t,e)=>e!==void 0?Mt(n,t,e):Ht(n,t)}/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */function Nt(n){return vt({...n,state:!0})}/** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause */var V;((V=window.HTMLSlotElement)===null||V===void 0?void 0:V.prototype.assignedElements)!=null;var Rt=Object.defineProperty,zt=Object.getOwnPropertyDescriptor,_t=(n,t,e,i)=>{for(var s=i>1?void 0:i?zt(t,e):t,r=n.length-1,o;r>=0;r--)(o=n[r])&&(s=(i?o(t,e,s):o(s))||s);return i&&s&&Rt(t,e,s),s};let M=class extends A{constructor(){super(...arguments),this._isCopied=!1}copyCode(){this._isCopied=!0;let t=this.parentElement.querySelector("code");const e=document.createRange();if(e.selectNode(t),window.getSelection().removeAllRanges(),window.getSelection().addRange(e),!navigator.clipboard)document.execCommand("copy");else try{navigator.clipboard.writeText(e.toString())}catch(i){console.error(i)}window.getSelection().removeAllRanges(),setTimeout(()=>{this._isCopied=!1},1e3)}render(){return y` `}};M.styles=[ht` :host { display: inline-flex; } button { display: inline-flex; align-items: center; justify-content: center; width: fit-content; margin: 0; padding: 0.5rem; background: #e2e8f022; border: none; border-radius: 0.25rem; color: #fff; cursor: pointer; font-weight: 600; /* font-size: var(--step--2); */ /* line-height: 1; */ } `];_t([Nt()],M.prototype,"_isCopied",2);M=_t([$t("copy-code-button")],M);const Lt=y` `,jt=y` `;var Dt=Object.defineProperty,Bt=Object.getOwnPropertyDescriptor,ft=(n,t,e,i)=>{for(var s=i>1?void 0:i?Bt(t,e):t,r=n.length-1,o;r>=0;r--)(o=n[r])&&(s=(i?o(t,e,s):o(s))||s);return i&&s&&Dt(t,e,s),s};let N=class extends A{constructor(){super(...arguments),this._doc=document.firstElementChild,this.theme=null}_getCurrentTheme(){const n=localStorage.getItem("theme");n!==null?this._setTheme(n):this._setTheme("light")}firstUpdated(){this._getCurrentTheme()}_setTheme(n){this.theme=n,this._doc.setAttribute("color-scheme",n),localStorage.setItem("theme",n)}_toggleTheme(){this.theme==="dark"?this._setTheme("light"):this._setTheme("dark")}render(){return y` `}};N.styles=ht` :host { display: inline-block; } button { width: 28px; height: 28px; padding: 0.25rem; display: flex; align-items: center; justify-content: center; position: relative; box-sizing: border-box; border: none; outline: none; background-color: var(--theme-surface-1); fill: currentcolor; color: var(--theme-on-surface-1); text-decoration: none; cursor: pointer; vertical-align: middle; -webkit-tap-highlight-color: transparent; border-radius: 50%; border: 1px solid var(--theme-primary); transition: background-color 100ms cubic-bezier(0.6, -0.28, 0.735, 0.045); } `;ft([vt({type:String})],N.prototype,"theme",2);N=ft([$t("theme-toggle-button")],N);let It=document.querySelectorAll("pre");It.forEach(n=>{let t=document.createElement("copy-code-button");n.appendChild(t)});