@enegelai/bot-widget 1.2.4 → 1.2.5

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.
@@ -1,50 +1,68 @@
1
- var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,configurable:!0,writable:!0,value:dt}):R[ut]=dt;var _t=(R,ut,dt)=>(Cg(R,typeof ut!="symbol"?ut+"":ut,dt),dt);(function(R,ut){typeof exports=="object"&&typeof module<"u"?ut(exports):typeof define=="function"&&define.amd?define(["exports"],ut):(R=typeof globalThis<"u"?globalThis:R||self,ut(R.EnegelaiBot={}))})(this,function(R){var dl;"use strict";function ut(e){return typeof e=="function"?e():e}const kr=class kr extends Event{constructor(o,r,s){super(kr.eventName,{cancelable:!1});_t(this,"key");_t(this,"state");_t(this,"value");this.key=o,this.value=r,this.state=s}};_t(kr,"eventName","lit-state-changed");let dt=kr;const fl=(e,t)=>t!==e&&(t===t||e===e);class So extends EventTarget{constructor(){super();_t(this,"hookMap",new Map);this.constructor.finalize(),this.propertyMap&&[...this.propertyMap].forEach(([o,r])=>{if(r.initialValue!==void 0){const s=ut(r.initialValue);this[o]=s,r.value=s}})}get propertyMap(){return this.constructor.propertyMap}get stateValue(){return Object.fromEntries([...this.propertyMap].map(([o])=>[o,this[o]]))}static finalize(){if(this.finalized)return!1;this.finalized=!0;const o=Object.keys(this.properties||{});for(const r of o)this.createProperty(r,this.properties[r]);return!0}static createProperty(o,r){this.finalize();const s=typeof o=="symbol"?Symbol():`__${o}`,n=this.getPropertyDescriptor(o,s,r);Object.defineProperty(this.prototype,o,n)}static getPropertyDescriptor(o,r,s){const n=(s==null?void 0:s.hasChanged)||fl;return{get(){return this[r]},set(i){const a=this[o];this[r]=i,n(i,a)===!0&&this.dispatchStateEvent(o,i,this)},configurable:!0,enumerable:!0}}reset(){this.hookMap.forEach(o=>o.reset()),[...this.propertyMap].filter(([o,r])=>!(r.skipReset===!0||r.resetValue===void 0)).forEach(([o,r])=>{this[o]=r.resetValue})}subscribe(o,r,s){r&&!Array.isArray(r)&&(r=[r]);const n=i=>{(!r||r.includes(i.key))&&o(i.key,i.value,this)};return this.addEventListener(dt.eventName,n,s),()=>this.removeEventListener(dt.eventName,n)}dispatchStateEvent(o,r,s){this.dispatchEvent(new dt(o,r,s))}}_t(So,"propertyMap"),_t(So,"properties"),_t(So,"finalized",!1);class gl{constructor(t,o,r){_t(this,"host");_t(this,"state");_t(this,"callback");this.host=t,this.state=o,this.host.addController(this),this.callback=r||(()=>this.host.requestUpdate())}hostConnected(){this.state.addEventListener(dt.eventName,this.callback),this.callback()}hostDisconnected(){this.state.removeEventListener(dt.eventName,this.callback)}}/**
1
+ var tb=Object.defineProperty;var eb=(M,lt,ct)=>lt in M?tb(M,lt,{enumerable:!0,configurable:!0,writable:!0,value:ct}):M[lt]=ct;var wt=(M,lt,ct)=>(eb(M,typeof lt!="symbol"?lt+"":lt,ct),ct);(function(M,lt){typeof exports=="object"&&typeof module<"u"?lt(exports):typeof define=="function"&&define.amd?define(["exports"],lt):(M=typeof globalThis<"u"?globalThis:M||self,lt(M.EnegelaiBot={}))})(this,function(M){var Dl;"use strict";function lt(e){return typeof e=="function"?e():e}const Lr=class Lr extends Event{constructor(o,r,s){super(Lr.eventName,{cancelable:!1});wt(this,"key");wt(this,"state");wt(this,"value");this.key=o,this.value=r,this.state=s}};wt(Lr,"eventName","lit-state-changed");let ct=Lr;const Pl=(e,t)=>t!==e&&(t===t||e===e);class zo extends EventTarget{constructor(){super();wt(this,"hookMap",new Map);this.constructor.finalize(),this.propertyMap&&[...this.propertyMap].forEach(([o,r])=>{if(r.initialValue!==void 0){const s=lt(r.initialValue);this[o]=s,r.value=s}})}get propertyMap(){return this.constructor.propertyMap}get stateValue(){return Object.fromEntries([...this.propertyMap].map(([o])=>[o,this[o]]))}static finalize(){if(this.finalized)return!1;this.finalized=!0;const o=Object.keys(this.properties||{});for(const r of o)this.createProperty(r,this.properties[r]);return!0}static createProperty(o,r){this.finalize();const s=typeof o=="symbol"?Symbol():`__${o}`,n=this.getPropertyDescriptor(o,s,r);Object.defineProperty(this.prototype,o,n)}static getPropertyDescriptor(o,r,s){const n=(s==null?void 0:s.hasChanged)||Pl;return{get(){return this[r]},set(i){const a=this[o];this[r]=i,n(i,a)===!0&&this.dispatchStateEvent(o,i,this)},configurable:!0,enumerable:!0}}reset(){this.hookMap.forEach(o=>o.reset()),[...this.propertyMap].filter(([o,r])=>!(r.skipReset===!0||r.resetValue===void 0)).forEach(([o,r])=>{this[o]=r.resetValue})}subscribe(o,r,s){r&&!Array.isArray(r)&&(r=[r]);const n=i=>{(!r||r.includes(i.key))&&o(i.key,i.value,this)};return this.addEventListener(ct.eventName,n,s),()=>this.removeEventListener(ct.eventName,n)}dispatchStateEvent(o,r,s){this.dispatchEvent(new ct(o,r,s))}}wt(zo,"propertyMap"),wt(zo,"properties"),wt(zo,"finalized",!1);class pn{constructor(t,o,r){wt(this,"host");wt(this,"state");wt(this,"callback");this.host=t,this.state=o,this.host.addController(this),this.callback=r||(()=>this.host.requestUpdate())}hostConnected(){this.state.addEventListener(ct.eventName,this.callback),this.callback()}hostDisconnected(){this.state.removeEventListener(ct.eventName,this.callback)}}/**
2
2
  * @license
3
3
  * Copyright 2017 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
- */const Ge=({finisher:e,descriptor:t})=>(o,r)=>{var s;if(r===void 0){const n=(s=o.originalKey)!==null&&s!==void 0?s:o.key,i=t!=null?{kind:"method",placement:"prototype",key:n,descriptor:t(o.key)}:{...o,key:n};return e!=null&&(i.finisher=function(a){e(a,n)}),i}{const n=o.constructor;t!==void 0&&Object.defineProperty(o,r,t(r)),e==null||e(n,r)}};function Bt(e){return Ge({finisher:(t,o)=>{if(Object.getOwnPropertyDescriptor(t.prototype,o))throw new Error("@property must be called before all state decorators");return t.propertyMap||(t.propertyMap=new Map),t.propertyMap.set(o,{...e,initialValue:e==null?void 0:e.value,resetValue:e==null?void 0:e.value}),t.createProperty(o,e)}})}function bl(e,t){if(e!==null&&(t===Boolean||t===Number||t===Array||t===Object))try{e=JSON.parse(e)}catch{console.warn("cannot parse value",e)}return e}new URL(window.location.href);const ml={prefix:"_ls"};function xe(e){return e={...ml,...e},Ge({finisher:(t,o)=>{const r=Object.getOwnPropertyDescriptor(t.prototype,o);if(!r)throw new Error("@local-storage decorator need to be called after @property");const s=`${(e==null?void 0:e.prefix)||""}_${(e==null?void 0:e.key)||String(o)}`,n=t.propertyMap.get(o),i=n==null?void 0:n.type;if(n){const u=n.initialValue;n.initialValue=()=>bl(localStorage.getItem(s),i)??ut(u),t.propertyMap.set(o,{...n,...e})}const a=r==null?void 0:r.set,c={...r,set:function(u){u!==void 0&&localStorage.setItem(s,i===Object||i===Array?JSON.stringify(u):u),a&&a.call(this,u)}};Object.defineProperty(t.prototype,o,c)}})}/**
5
+ */const fn=({finisher:e,descriptor:t})=>(o,r)=>{var s;if(r===void 0){const n=(s=o.originalKey)!==null&&s!==void 0?s:o.key,i=t!=null?{kind:"method",placement:"prototype",key:n,descriptor:t(o.key)}:{...o,key:n};return e!=null&&(i.finisher=function(a){e(a,n)}),i}{const n=o.constructor;t!==void 0&&Object.defineProperty(o,r,t(r)),e==null||e(n,r)}};function _t(e){return fn({finisher:(t,o)=>{if(Object.getOwnPropertyDescriptor(t.prototype,o))throw new Error("@property must be called before all state decorators");return t.propertyMap||(t.propertyMap=new Map),t.propertyMap.set(o,{...e,initialValue:e==null?void 0:e.value,resetValue:e==null?void 0:e.value}),t.createProperty(o,e)}})}function Ml(e,t){if(e!==null&&(t===Boolean||t===Number||t===Array||t===Object))try{e=JSON.parse(e)}catch{console.warn("cannot parse value",e)}return e}new URL(window.location.href);const Il={prefix:"_ls"};function le(e){return e={...Il,...e},fn({finisher:(t,o)=>{const r=Object.getOwnPropertyDescriptor(t.prototype,o);if(!r)throw new Error("@local-storage decorator need to be called after @property");const s=`${(e==null?void 0:e.prefix)||""}_${(e==null?void 0:e.key)||String(o)}`,n=t.propertyMap.get(o),i=n==null?void 0:n.type;if(n){const u=n.initialValue;n.initialValue=()=>Ml(localStorage.getItem(s),i)??lt(u),t.propertyMap.set(o,{...n,...e})}const a=r==null?void 0:r.set,c={...r,set:function(u){u!==void 0&&localStorage.setItem(s,i===Object||i===Array?JSON.stringify(u):u),a&&a.call(this,u)}};Object.defineProperty(t.prototype,o,c)}})}/**
6
6
  * @license
7
7
  * Copyright 2019 Google LLC
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
- */const qo=window,Ar=qo.ShadowRoot&&(qo.ShadyCSS===void 0||qo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,$r=Symbol(),sn=new WeakMap;let nn=class{constructor(t,o,r){if(this._$cssResult$=!0,r!==$r)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=o}get styleSheet(){let t=this.o;const o=this.t;if(Ar&&t===void 0){const r=o!==void 0&&o.length===1;r&&(t=sn.get(o)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&sn.set(o,t))}return t}toString(){return this.cssText}};const vl=e=>new nn(typeof e=="string"?e:e+"",void 0,$r),X=(e,...t)=>{const o=e.length===1?e[0]:t.reduce((r,s,n)=>r+(i=>{if(i._$cssResult$===!0)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+e[n+1],e[0]);return new nn(o,e,$r)},yl=(e,t)=>{Ar?e.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):t.forEach(o=>{const r=document.createElement("style"),s=qo.litNonce;s!==void 0&&r.setAttribute("nonce",s),r.textContent=o.cssText,e.appendChild(r)})},an=Ar?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let o="";for(const r of t.cssRules)o+=r.cssText;return vl(o)})(e):e;/**
9
+ */const Ro=globalThis,Rr=Ro.ShadowRoot&&(Ro.ShadyCSS===void 0||Ro.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,gn=Symbol(),bn=new WeakMap;let Fl=class{constructor(t,o,r){if(this._$cssResult$=!0,r!==gn)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=o}get styleSheet(){let t=this.o;const o=this.t;if(Rr&&t===void 0){const r=o!==void 0&&o.length===1;r&&(t=bn.get(o)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&bn.set(o,t))}return t}toString(){return this.cssText}};const Bl=e=>new Fl(typeof e=="string"?e:e+"",void 0,gn),Ol=(e,t)=>{if(Rr)e.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(const o of t){const r=document.createElement("style"),s=Ro.litNonce;s!==void 0&&r.setAttribute("nonce",s),r.textContent=o.cssText,e.appendChild(r)}},mn=Rr?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let o="";for(const r of t.cssRules)o+=r.cssText;return Bl(o)})(e):e;/**
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
- */var Er;const Do=window,ln=Do.trustedTypes,wl=ln?ln.emptyScript:"",cn=Do.reactiveElementPolyfillSupport,Sr={toAttribute(e,t){switch(t){case Boolean:e=e?wl:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let o=e;switch(t){case Boolean:o=e!==null;break;case Number:o=e===null?null:Number(e);break;case Object:case Array:try{o=JSON.parse(e)}catch{o=null}}return o}},un=(e,t)=>t!==e&&(t==t||e==e),qr={attribute:!0,type:String,converter:Sr,reflect:!1,hasChanged:un},Dr="finalized";let ke=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var o;this.finalize(),((o=this.h)!==null&&o!==void 0?o:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((o,r)=>{const s=this._$Ep(r,o);s!==void 0&&(this._$Ev.set(s,r),t.push(s))}),t}static createProperty(t,o=qr){if(o.state&&(o.attribute=!1),this.finalize(),this.elementProperties.set(t,o),!o.noAccessor&&!this.prototype.hasOwnProperty(t)){const r=typeof t=="symbol"?Symbol():"__"+t,s=this.getPropertyDescriptor(t,r,o);s!==void 0&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,o,r){return{get(){return this[o]},set(s){const n=this[t];this[o]=s,this.requestUpdate(t,n,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||qr}static finalize(){if(this.hasOwnProperty(Dr))return!1;this[Dr]=!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 o=this.properties,r=[...Object.getOwnPropertyNames(o),...Object.getOwnPropertySymbols(o)];for(const s of r)this.createProperty(s,o[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const o=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const s of r)o.unshift(an(s))}else t!==void 0&&o.push(an(t));return o}static _$Ep(t,o){const r=o.attribute;return r===!1?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise(o=>this.enableUpdating=o),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(o=>o(this))}addController(t){var o,r;((o=this._$ES)!==null&&o!==void 0?o:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((r=t.hostConnected)===null||r===void 0||r.call(t))}removeController(t){var o;(o=this._$ES)===null||o===void 0||o.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,o)=>{this.hasOwnProperty(o)&&(this._$Ei.set(o,this[o]),delete this[o])})}createRenderRoot(){var t;const o=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return yl(o,this.constructor.elementStyles),o}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(o=>{var r;return(r=o.hostConnected)===null||r===void 0?void 0:r.call(o)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(o=>{var r;return(r=o.hostDisconnected)===null||r===void 0?void 0:r.call(o)})}attributeChangedCallback(t,o,r){this._$AK(t,r)}_$EO(t,o,r=qr){var s;const n=this.constructor._$Ep(t,r);if(n!==void 0&&r.reflect===!0){const i=(((s=r.converter)===null||s===void 0?void 0:s.toAttribute)!==void 0?r.converter:Sr).toAttribute(o,r.type);this._$El=t,i==null?this.removeAttribute(n):this.setAttribute(n,i),this._$El=null}}_$AK(t,o){var r;const s=this.constructor,n=s._$Ev.get(t);if(n!==void 0&&this._$El!==n){const i=s.getPropertyOptions(n),a=typeof i.converter=="function"?{fromAttribute:i.converter}:((r=i.converter)===null||r===void 0?void 0:r.fromAttribute)!==void 0?i.converter:Sr;this._$El=n,this[n]=a.fromAttribute(o,i.type),this._$El=null}}requestUpdate(t,o,r){let s=!0;t!==void 0&&(((r=r||this.constructor.getPropertyOptions(t)).hasChanged||un)(this[t],o)?(this._$AL.has(t)||this._$AL.set(t,o),r.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,r))):s=!1),!this.isUpdatePending&&s&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(o){Promise.reject(o)}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,n)=>this[n]=s),this._$Ei=void 0);let o=!1;const r=this._$AL;try{o=this.shouldUpdate(r),o?(this.willUpdate(r),(t=this._$ES)===null||t===void 0||t.forEach(s=>{var n;return(n=s.hostUpdate)===null||n===void 0?void 0:n.call(s)}),this.update(r)):this._$Ek()}catch(s){throw o=!1,this._$Ek(),s}o&&this._$AE(r)}willUpdate(t){}_$AE(t){var o;(o=this._$ES)===null||o===void 0||o.forEach(r=>{var s;return(s=r.hostUpdated)===null||s===void 0?void 0:s.call(r)}),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((o,r)=>this._$EO(r,this[r],o)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}};ke[Dr]=!0,ke.elementProperties=new Map,ke.elementStyles=[],ke.shadowRootOptions={mode:"open"},cn==null||cn({ReactiveElement:ke}),((Er=Do.reactiveElementVersions)!==null&&Er!==void 0?Er:Do.reactiveElementVersions=[]).push("1.6.3");/**
13
+ */const{is:Nl,defineProperty:Vl,getOwnPropertyDescriptor:Hl,getOwnPropertyNames:Ul,getOwnPropertySymbols:jl,getPrototypeOf:Gl}=Object,Gt=globalThis,vn=Gt.trustedTypes,Zl=vn?vn.emptyScript:"",Pr=Gt.reactiveElementPolyfillSupport,Ye=(e,t)=>e,Po={toAttribute(e,t){switch(t){case Boolean:e=e?Zl:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let o=e;switch(t){case Boolean:o=e!==null;break;case Number:o=e===null?null:Number(e);break;case Object:case Array:try{o=JSON.parse(e)}catch{o=null}}return o}},Mr=(e,t)=>!Nl(e,t),yn={attribute:!0,type:String,converter:Po,reflect:!1,hasChanged:Mr};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Gt.litPropertyMetadata??(Gt.litPropertyMetadata=new WeakMap);let Je=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,o=yn){if(o.state&&(o.attribute=!1),this._$Ei(),this.elementProperties.set(t,o),!o.noAccessor){const r=Symbol(),s=this.getPropertyDescriptor(t,r,o);s!==void 0&&Vl(this.prototype,t,s)}}static getPropertyDescriptor(t,o,r){const{get:s,set:n}=Hl(this.prototype,t)??{get(){return this[o]},set(i){this[o]=i}};return{get(){return s==null?void 0:s.call(this)},set(i){const a=s==null?void 0:s.call(this);n.call(this,i),this.requestUpdate(t,a,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??yn}static _$Ei(){if(this.hasOwnProperty(Ye("elementProperties")))return;const t=Gl(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Ye("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ye("properties"))){const o=this.properties,r=[...Ul(o),...jl(o)];for(const s of r)this.createProperty(s,o[s])}const t=this[Symbol.metadata];if(t!==null){const o=litPropertyMetadata.get(t);if(o!==void 0)for(const[r,s]of o)this.elementProperties.set(r,s)}this._$Eh=new Map;for(const[o,r]of this.elementProperties){const s=this._$Eu(o,r);s!==void 0&&this._$Eh.set(s,o)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const o=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const s of r)o.unshift(mn(s))}else t!==void 0&&o.push(mn(t));return o}static _$Eu(t,o){const r=o.attribute;return r===!1?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$Eg=new Promise(o=>this.enableUpdating=o),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(o=>o(this))}addController(t){var o;(this._$ES??(this._$ES=[])).push(t),this.renderRoot!==void 0&&this.isConnected&&((o=t.hostConnected)==null||o.call(t))}removeController(t){var o;(o=this._$ES)==null||o.splice(this._$ES.indexOf(t)>>>0,1)}_$E_(){const t=new Map,o=this.constructor.elementProperties;for(const r of o.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ol(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)==null||t.forEach(o=>{var r;return(r=o.hostConnected)==null?void 0:r.call(o)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)==null||t.forEach(o=>{var r;return(r=o.hostDisconnected)==null?void 0:r.call(o)})}attributeChangedCallback(t,o,r){this._$AK(t,r)}_$EO(t,o){var n;const r=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,r);if(s!==void 0&&r.reflect===!0){const i=(((n=r.converter)==null?void 0:n.toAttribute)!==void 0?r.converter:Po).toAttribute(o,r.type);this._$Em=t,i==null?this.removeAttribute(s):this.setAttribute(s,i),this._$Em=null}}_$AK(t,o){var n;const r=this.constructor,s=r._$Eh.get(t);if(s!==void 0&&this._$Em!==s){const i=r.getPropertyOptions(s),a=typeof i.converter=="function"?{fromAttribute:i.converter}:((n=i.converter)==null?void 0:n.fromAttribute)!==void 0?i.converter:Po;this._$Em=s,this[s]=a.fromAttribute(o,i.type),this._$Em=null}}requestUpdate(t,o,r,s=!1,n){if(t!==void 0){if(r??(r=this.constructor.getPropertyOptions(t)),!(r.hasChanged??Mr)(s?n:this[t],o))return;this.C(t,o,r)}this.isUpdatePending===!1&&(this._$Eg=this._$EP())}C(t,o,r){this._$AL.has(t)||this._$AL.set(t,o),r.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(o){Promise.reject(o)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var r;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this._$Ep){for(const[n,i]of this._$Ep)this[n]=i;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[n,i]of s)i.wrapped!==!0||this._$AL.has(n)||this[n]===void 0||this.C(n,this[n],i)}let t=!1;const o=this._$AL;try{t=this.shouldUpdate(o),t?(this.willUpdate(o),(r=this._$ES)==null||r.forEach(s=>{var n;return(n=s.hostUpdate)==null?void 0:n.call(s)}),this.update(o)):this._$ET()}catch(s){throw t=!1,this._$ET(),s}t&&this._$AE(o)}willUpdate(t){}_$AE(t){var o;(o=this._$ES)==null||o.forEach(r=>{var s;return(s=r.hostUpdated)==null?void 0:s.call(r)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(o=>this._$EO(o,this[o]))),this._$ET()}updated(t){}firstUpdated(t){}};Je.elementStyles=[],Je.shadowRootOptions={mode:"open"},Je[Ye("elementProperties")]=new Map,Je[Ye("finalized")]=new Map,Pr==null||Pr({ReactiveElement:Je}),(Gt.reactiveElementVersions??(Gt.reactiveElementVersions=[])).push("2.0.1");/**
14
14
  * @license
15
15
  * Copyright 2017 Google LLC
16
16
  * SPDX-License-Identifier: BSD-3-Clause
17
- */var Tr;const To=window,Ce=To.trustedTypes,dn=Ce?Ce.createPolicy("lit-html",{createHTML:e=>e}):void 0,Lo="$lit$",Ot=`lit$${(Math.random()+"").slice(9)}$`,Lr="?"+Ot,_l=`<${Lr}>`,ae=document,Ze=()=>ae.createComment(""),We=e=>e===null||typeof e!="object"&&typeof e!="function",hn=Array.isArray,pn=e=>hn(e)||typeof(e==null?void 0:e[Symbol.iterator])=="function",zr=`[
18
- \f\r]`,Ke=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,fn=/-->/g,gn=/>/g,le=RegExp(`>|${zr}(?:([^\\s"'>=/]+)(${zr}*=${zr}*(?:[^
19
- \f\r"'\`<>=]|("|')|))|$)`,"g"),bn=/'/g,mn=/"/g,vn=/^(?:script|style|textarea|title)$/i,yn=e=>(t,...o)=>({_$litType$:e,strings:t,values:o}),T=yn(1),wn=yn(2),$t=Symbol.for("lit-noChange"),W=Symbol.for("lit-nothing"),_n=new WeakMap,ce=ae.createTreeWalker(ae,129,null,!1);function xn(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return dn!==void 0?dn.createHTML(t):t}const kn=(e,t)=>{const o=e.length-1,r=[];let s,n=t===2?"<svg>":"",i=Ke;for(let a=0;a<o;a++){const l=e[a];let c,u,d=-1,f=0;for(;f<l.length&&(i.lastIndex=f,u=i.exec(l),u!==null);)f=i.lastIndex,i===Ke?u[1]==="!--"?i=fn:u[1]!==void 0?i=gn:u[2]!==void 0?(vn.test(u[2])&&(s=RegExp("</"+u[2],"g")),i=le):u[3]!==void 0&&(i=le):i===le?u[0]===">"?(i=s??Ke,d=-1):u[1]===void 0?d=-2:(d=i.lastIndex-u[2].length,c=u[1],i=u[3]===void 0?le:u[3]==='"'?mn:bn):i===mn||i===bn?i=le:i===fn||i===gn?i=Ke:(i=le,s=void 0);const h=i===le&&e[a+1].startsWith("/>")?" ":"";n+=i===Ke?l+_l:d>=0?(r.push(c),l.slice(0,d)+Lo+l.slice(d)+Ot+h):l+Ot+(d===-2?(r.push(void 0),a):h)}return[xn(e,n+(e[o]||"<?>")+(t===2?"</svg>":"")),r]};let Rr=class hl{constructor({strings:t,_$litType$:o},r){let s;this.parts=[];let n=0,i=0;const a=t.length-1,l=this.parts,[c,u]=kn(t,o);if(this.el=hl.createElement(c,r),ce.currentNode=this.el.content,o===2){const d=this.el.content,f=d.firstChild;f.remove(),d.append(...f.childNodes)}for(;(s=ce.nextNode())!==null&&l.length<a;){if(s.nodeType===1){if(s.hasAttributes()){const d=[];for(const f of s.getAttributeNames())if(f.endsWith(Lo)||f.startsWith(Ot)){const h=u[i++];if(d.push(f),h!==void 0){const b=s.getAttribute(h.toLowerCase()+Lo).split(Ot),m=/([.?@])?(.*)/.exec(h);l.push({type:1,index:n,name:m[2],strings:b,ctor:m[1]==="."?An:m[1]==="?"?$n:m[1]==="@"?En:Ye})}else l.push({type:6,index:n})}for(const f of d)s.removeAttribute(f)}if(vn.test(s.tagName)){const d=s.textContent.split(Ot),f=d.length-1;if(f>0){s.textContent=Ce?Ce.emptyScript:"";for(let h=0;h<f;h++)s.append(d[h],Ze()),ce.nextNode(),l.push({type:2,index:++n});s.append(d[f],Ze())}}}else if(s.nodeType===8)if(s.data===Lr)l.push({type:2,index:n});else{let d=-1;for(;(d=s.data.indexOf(Ot,d+1))!==-1;)l.push({type:7,index:n}),d+=Ot.length-1}n++}}static createElement(t,o){const r=ae.createElement("template");return r.innerHTML=t,r}};function ue(e,t,o=e,r){var s,n,i,a;if(t===$t)return t;let l=r!==void 0?(s=o._$Co)===null||s===void 0?void 0:s[r]:o._$Cl;const c=We(t)?void 0:t._$litDirective$;return(l==null?void 0:l.constructor)!==c&&((n=l==null?void 0:l._$AO)===null||n===void 0||n.call(l,!1),c===void 0?l=void 0:(l=new c(e),l._$AT(e,o,r)),r!==void 0?((i=(a=o)._$Co)!==null&&i!==void 0?i:a._$Co=[])[r]=l:o._$Cl=l),l!==void 0&&(t=ue(e,l._$AS(e,t.values),l,r)),t}let Cn=class{constructor(t,o){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=o}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var o;const{el:{content:r},parts:s}=this._$AD,n=((o=t==null?void 0:t.creationScope)!==null&&o!==void 0?o:ae).importNode(r,!0);ce.currentNode=n;let i=ce.nextNode(),a=0,l=0,c=s[0];for(;c!==void 0;){if(a===c.index){let u;c.type===2?u=new zo(i,i.nextSibling,this,t):c.type===1?u=new c.ctor(i,c.name,c.strings,this,t):c.type===6&&(u=new Sn(i,this,t)),this._$AV.push(u),c=s[++l]}a!==(c==null?void 0:c.index)&&(i=ce.nextNode(),a++)}return ce.currentNode=ae,n}v(t){let o=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,o),o+=r.strings.length-2):r._$AI(t[o])),o++}},zo=class pl{constructor(t,o,r,s){var n;this.type=2,this._$AH=W,this._$AN=void 0,this._$AA=t,this._$AB=o,this._$AM=r,this.options=s,this._$Cp=(n=s==null?void 0:s.isConnected)===null||n===void 0||n}get _$AU(){var t,o;return(o=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&o!==void 0?o:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const o=this._$AM;return o!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=o.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,o=this){t=ue(this,t,o),We(t)?t===W||t==null||t===""?(this._$AH!==W&&this._$AR(),this._$AH=W):t!==this._$AH&&t!==$t&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):pn(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==W&&We(this._$AH)?this._$AA.nextSibling.data=t:this.$(ae.createTextNode(t)),this._$AH=t}g(t){var o;const{values:r,_$litType$:s}=t,n=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=Rr.createElement(xn(s.h,s.h[0]),this.options)),s);if(((o=this._$AH)===null||o===void 0?void 0:o._$AD)===n)this._$AH.v(r);else{const i=new Cn(n,this),a=i.u(this.options);i.v(r),this.$(a),this._$AH=i}}_$AC(t){let o=_n.get(t.strings);return o===void 0&&_n.set(t.strings,o=new Rr(t)),o}T(t){hn(this._$AH)||(this._$AH=[],this._$AR());const o=this._$AH;let r,s=0;for(const n of t)s===o.length?o.push(r=new pl(this.k(Ze()),this.k(Ze()),this,this.options)):r=o[s],r._$AI(n),s++;s<o.length&&(this._$AR(r&&r._$AB.nextSibling,s),o.length=s)}_$AR(t=this._$AA.nextSibling,o){var r;for((r=this._$AP)===null||r===void 0||r.call(this,!1,!0,o);t&&t!==this._$AB;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){var o;this._$AM===void 0&&(this._$Cp=t,(o=this._$AP)===null||o===void 0||o.call(this,t))}},Ye=class{constructor(t,o,r,s,n){this.type=1,this._$AH=W,this._$AN=void 0,this.element=t,this.name=o,this._$AM=s,this.options=n,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=W}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,o=this,r,s){const n=this.strings;let i=!1;if(n===void 0)t=ue(this,t,o,0),i=!We(t)||t!==this._$AH&&t!==$t,i&&(this._$AH=t);else{const a=t;let l,c;for(t=n[0],l=0;l<n.length-1;l++)c=ue(this,a[r+l],o,l),c===$t&&(c=this._$AH[l]),i||(i=!We(c)||c!==this._$AH[l]),c===W?t=W:t!==W&&(t+=(c??"")+n[l+1]),this._$AH[l]=c}i&&!s&&this.j(t)}j(t){t===W?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},An=class extends Ye{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===W?void 0:t}};const xl=Ce?Ce.emptyScript:"";let $n=class extends Ye{constructor(){super(...arguments),this.type=4}j(t){t&&t!==W?this.element.setAttribute(this.name,xl):this.element.removeAttribute(this.name)}};class En extends Ye{constructor(t,o,r,s,n){super(t,o,r,s,n),this.type=5}_$AI(t,o=this){var r;if((t=(r=ue(this,t,o,0))!==null&&r!==void 0?r:W)===$t)return;const s=this._$AH,n=t===W&&s!==W||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,i=t!==W&&(s===W||n);n&&this.element.removeEventListener(this.name,this,s),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var o,r;typeof this._$AH=="function"?this._$AH.call((r=(o=this.options)===null||o===void 0?void 0:o.host)!==null&&r!==void 0?r:this.element,t):this._$AH.handleEvent(t)}}let Sn=class{constructor(t,o,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=o,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){ue(this,t)}};const kl={O:Lo,P:Ot,A:Lr,C:1,M:kn,L:Cn,R:pn,D:ue,I:zo,V:Ye,H:$n,N:En,U:An,F:Sn},qn=To.litHtmlPolyfillSupport;qn==null||qn(Rr,zo),((Tr=To.litHtmlVersions)!==null&&Tr!==void 0?Tr:To.litHtmlVersions=[]).push("2.8.0");const Cl=(e,t,o)=>{var r,s;const n=(r=o==null?void 0:o.renderBefore)!==null&&r!==void 0?r:t;let i=n._$litPart$;if(i===void 0){const a=(s=o==null?void 0:o.renderBefore)!==null&&s!==void 0?s:null;n._$litPart$=i=new zo(t.insertBefore(Ze(),a),a,void 0,o??{})}return i._$AI(e),i};/**
17
+ */const Qe=globalThis,Mo=Qe.trustedTypes,wn=Mo?Mo.createPolicy("lit-html",{createHTML:e=>e}):void 0,Ir="$lit$",Ft=`lit$${(Math.random()+"").slice(9)}$`,Fr="?"+Ft,Wl=`<${Fr}>`,ce=document,Io=()=>ce.createComment(""),Xe=e=>e===null||typeof e!="object"&&typeof e!="function",_n=Array.isArray,xn=e=>_n(e)||typeof(e==null?void 0:e[Symbol.iterator])=="function",Br=`[
18
+ \f\r]`,to=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,kn=/-->/g,An=/>/g,ue=RegExp(`>|${Br}(?:([^\\s"'>=/]+)(${Br}*=${Br}*(?:[^
19
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Cn=/'/g,$n=/"/g,En=/^(?:script|style|textarea|title)$/i,Kl=e=>(t,...o)=>({_$litType$:e,strings:t,values:o}),Yl=Kl(1),xt=Symbol.for("lit-noChange"),G=Symbol.for("lit-nothing"),Sn=new WeakMap,de=ce.createTreeWalker(ce,129);function qn(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return wn!==void 0?wn.createHTML(t):t}const Dn=(e,t)=>{const o=e.length-1,r=[];let s,n=t===2?"<svg>":"",i=to;for(let a=0;a<o;a++){const l=e[a];let c,u,d=-1,p=0;for(;p<l.length&&(i.lastIndex=p,u=i.exec(l),u!==null);)p=i.lastIndex,i===to?u[1]==="!--"?i=kn:u[1]!==void 0?i=An:u[2]!==void 0?(En.test(u[2])&&(s=RegExp("</"+u[2],"g")),i=ue):u[3]!==void 0&&(i=ue):i===ue?u[0]===">"?(i=s??to,d=-1):u[1]===void 0?d=-2:(d=i.lastIndex-u[2].length,c=u[1],i=u[3]===void 0?ue:u[3]==='"'?$n:Cn):i===$n||i===Cn?i=ue:i===kn||i===An?i=to:(i=ue,s=void 0);const h=i===ue&&e[a+1].startsWith("/>")?" ":"";n+=i===to?l+Wl:d>=0?(r.push(c),l.slice(0,d)+Ir+l.slice(d)+Ft+h):l+Ft+(d===-2?a:h)}return[qn(e,n+(e[o]||"<?>")+(t===2?"</svg>":"")),r]};let Or=class Tl{constructor({strings:t,_$litType$:o},r){let s;this.parts=[];let n=0,i=0;const a=t.length-1,l=this.parts,[c,u]=Dn(t,o);if(this.el=Tl.createElement(c,r),de.currentNode=this.el.content,o===2){const d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(s=de.nextNode())!==null&&l.length<a;){if(s.nodeType===1){if(s.hasAttributes())for(const d of s.getAttributeNames())if(d.endsWith(Ir)){const p=u[i++],h=s.getAttribute(d).split(Ft),b=/([.?@])?(.*)/.exec(p);l.push({type:1,index:n,name:b[2],strings:h,ctor:b[1]==="."?Ln:b[1]==="?"?zn:b[1]==="@"?Rn:eo}),s.removeAttribute(d)}else d.startsWith(Ft)&&(l.push({type:6,index:n}),s.removeAttribute(d));if(En.test(s.tagName)){const d=s.textContent.split(Ft),p=d.length-1;if(p>0){s.textContent=Mo?Mo.emptyScript:"";for(let h=0;h<p;h++)s.append(d[h],Io()),de.nextNode(),l.push({type:2,index:++n});s.append(d[p],Io())}}}else if(s.nodeType===8)if(s.data===Fr)l.push({type:2,index:n});else{let d=-1;for(;(d=s.data.indexOf(Ft,d+1))!==-1;)l.push({type:7,index:n}),d+=Ft.length-1}n++}}static createElement(t,o){const r=ce.createElement("template");return r.innerHTML=t,r}};function he(e,t,o=e,r){var i,a;if(t===xt)return t;let s=r!==void 0?(i=o._$Co)==null?void 0:i[r]:o._$Cl;const n=Xe(t)?void 0:t._$litDirective$;return(s==null?void 0:s.constructor)!==n&&((a=s==null?void 0:s._$AO)==null||a.call(s,!1),n===void 0?s=void 0:(s=new n(e),s._$AT(e,o,r)),r!==void 0?(o._$Co??(o._$Co=[]))[r]=s:o._$Cl=s),s!==void 0&&(t=he(e,s._$AS(e,t.values),s,r)),t}let Tn=class{constructor(t,o){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=o}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:o},parts:r}=this._$AD,s=((t==null?void 0:t.creationScope)??ce).importNode(o,!0);de.currentNode=s;let n=de.nextNode(),i=0,a=0,l=r[0];for(;l!==void 0;){if(i===l.index){let c;l.type===2?c=new Nr(n,n.nextSibling,this,t):l.type===1?c=new l.ctor(n,l.name,l.strings,this,t):l.type===6&&(c=new Pn(n,this,t)),this._$AV.push(c),l=r[++a]}i!==(l==null?void 0:l.index)&&(n=de.nextNode(),i++)}return de.currentNode=ce,s}p(t){let o=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,o),o+=r.strings.length-2):r._$AI(t[o])),o++}},Nr=class Ll{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,o,r,s){this.type=2,this._$AH=G,this._$AN=void 0,this._$AA=t,this._$AB=o,this._$AM=r,this.options=s,this._$Cv=(s==null?void 0:s.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const o=this._$AM;return o!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=o.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,o=this){t=he(this,t,o),Xe(t)?t===G||t==null||t===""?(this._$AH!==G&&this._$AR(),this._$AH=G):t!==this._$AH&&t!==xt&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):xn(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==G&&Xe(this._$AH)?this._$AA.nextSibling.data=t:this.$(ce.createTextNode(t)),this._$AH=t}g(t){var n;const{values:o,_$litType$:r}=t,s=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=Or.createElement(qn(r.h,r.h[0]),this.options)),r);if(((n=this._$AH)==null?void 0:n._$AD)===s)this._$AH.p(o);else{const i=new Tn(s,this),a=i.u(this.options);i.p(o),this.$(a),this._$AH=i}}_$AC(t){let o=Sn.get(t.strings);return o===void 0&&Sn.set(t.strings,o=new Or(t)),o}T(t){_n(this._$AH)||(this._$AH=[],this._$AR());const o=this._$AH;let r,s=0;for(const n of t)s===o.length?o.push(r=new Ll(this.k(Io()),this.k(Io()),this,this.options)):r=o[s],r._$AI(n),s++;s<o.length&&(this._$AR(r&&r._$AB.nextSibling,s),o.length=s)}_$AR(t=this._$AA.nextSibling,o){var r;for((r=this._$AP)==null?void 0:r.call(this,!1,!0,o);t&&t!==this._$AB;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){var o;this._$AM===void 0&&(this._$Cv=t,(o=this._$AP)==null||o.call(this,t))}},eo=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,o,r,s,n){this.type=1,this._$AH=G,this._$AN=void 0,this.element=t,this.name=o,this._$AM=s,this.options=n,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=G}_$AI(t,o=this,r,s){const n=this.strings;let i=!1;if(n===void 0)t=he(this,t,o,0),i=!Xe(t)||t!==this._$AH&&t!==xt,i&&(this._$AH=t);else{const a=t;let l,c;for(t=n[0],l=0;l<n.length-1;l++)c=he(this,a[r+l],o,l),c===xt&&(c=this._$AH[l]),i||(i=!Xe(c)||c!==this._$AH[l]),c===G?t=G:t!==G&&(t+=(c??"")+n[l+1]),this._$AH[l]=c}i&&!s&&this.j(t)}j(t){t===G?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},Ln=class extends eo{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===G?void 0:t}},zn=class extends eo{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==G)}},Rn=class extends eo{constructor(t,o,r,s,n){super(t,o,r,s,n),this.type=5}_$AI(t,o=this){if((t=he(this,t,o,0)??G)===xt)return;const r=this._$AH,s=t===G&&r!==G||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,n=t!==G&&(r===G||s);s&&this.element.removeEventListener(this.name,this,r),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var o;typeof this._$AH=="function"?this._$AH.call(((o=this.options)==null?void 0:o.host)??this.element,t):this._$AH.handleEvent(t)}},Pn=class{constructor(t,o,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=o,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){he(this,t)}};const Jl={S:Ir,A:Ft,P:Fr,C:1,M:Dn,L:Tn,R:xn,V:he,D:Nr,I:eo,H:zn,N:Rn,U:Ln,B:Pn},Vr=Qe.litHtmlPolyfillSupport;Vr==null||Vr(Or,Nr),(Qe.litHtmlVersions??(Qe.litHtmlVersions=[])).push("3.0.1");/**
20
+ * @license
21
+ * Copyright 2019 Google LLC
22
+ * SPDX-License-Identifier: BSD-3-Clause
23
+ */const Fo=globalThis,Hr=Fo.ShadowRoot&&(Fo.ShadyCSS===void 0||Fo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ur=Symbol(),Mn=new WeakMap;let In=class{constructor(t,o,r){if(this._$cssResult$=!0,r!==Ur)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=o}get styleSheet(){let t=this.o;const o=this.t;if(Hr&&t===void 0){const r=o!==void 0&&o.length===1;r&&(t=Mn.get(o)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&Mn.set(o,t))}return t}toString(){return this.cssText}};const Ql=e=>new In(typeof e=="string"?e:e+"",void 0,Ur),z=(e,...t)=>{const o=e.length===1?e[0]:t.reduce((r,s,n)=>r+(i=>{if(i._$cssResult$===!0)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+e[n+1],e[0]);return new In(o,e,Ur)},Xl=(e,t)=>{if(Hr)e.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(const o of t){const r=document.createElement("style"),s=Fo.litNonce;s!==void 0&&r.setAttribute("nonce",s),r.textContent=o.cssText,e.appendChild(r)}},Fn=Hr?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let o="";for(const r of t.cssRules)o+=r.cssText;return Ql(o)})(e):e;/**
20
24
  * @license
21
25
  * Copyright 2017 Google LLC
22
26
  * SPDX-License-Identifier: BSD-3-Clause
23
- */var Pr,Mr;let Wt=class extends ke{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,o;const r=super.createRenderRoot();return(t=(o=this.renderOptions).renderBefore)!==null&&t!==void 0||(o.renderBefore=r.firstChild),r}update(t){const o=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Cl(o,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 $t}};Wt.finalized=!0,Wt._$litElement$=!0,(Pr=globalThis.litElementHydrateSupport)===null||Pr===void 0||Pr.call(globalThis,{LitElement:Wt});const Dn=globalThis.litElementPolyfillSupport;Dn==null||Dn({LitElement:Wt}),((Mr=globalThis.litElementVersions)!==null&&Mr!==void 0?Mr:globalThis.litElementVersions=[]).push("3.3.3");/**
27
+ */const{is:tc,defineProperty:ec,getOwnPropertyDescriptor:oc,getOwnPropertyNames:rc,getOwnPropertySymbols:sc,getPrototypeOf:nc}=Object,Zt=globalThis,Bn=Zt.trustedTypes,ic=Bn?Bn.emptyScript:"",jr=Zt.reactiveElementPolyfillSupport,oo=(e,t)=>e,ro={toAttribute(e,t){switch(t){case Boolean:e=e?ic:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let o=e;switch(t){case Boolean:o=e!==null;break;case Number:o=e===null?null:Number(e);break;case Object:case Array:try{o=JSON.parse(e)}catch{o=null}}return o}},On=(e,t)=>!tc(e,t),Nn={attribute:!0,type:String,converter:ro,reflect:!1,hasChanged:On};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Zt.litPropertyMetadata??(Zt.litPropertyMetadata=new WeakMap);let Ee=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,o=Nn){if(o.state&&(o.attribute=!1),this._$Ei(),this.elementProperties.set(t,o),!o.noAccessor){const r=Symbol(),s=this.getPropertyDescriptor(t,r,o);s!==void 0&&ec(this.prototype,t,s)}}static getPropertyDescriptor(t,o,r){const{get:s,set:n}=oc(this.prototype,t)??{get(){return this[o]},set(i){this[o]=i}};return{get(){return s==null?void 0:s.call(this)},set(i){const a=s==null?void 0:s.call(this);n.call(this,i),this.requestUpdate(t,a,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Nn}static _$Ei(){if(this.hasOwnProperty(oo("elementProperties")))return;const t=nc(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(oo("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(oo("properties"))){const o=this.properties,r=[...rc(o),...sc(o)];for(const s of r)this.createProperty(s,o[s])}const t=this[Symbol.metadata];if(t!==null){const o=litPropertyMetadata.get(t);if(o!==void 0)for(const[r,s]of o)this.elementProperties.set(r,s)}this._$Eh=new Map;for(const[o,r]of this.elementProperties){const s=this._$Eu(o,r);s!==void 0&&this._$Eh.set(s,o)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const o=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const s of r)o.unshift(Fn(s))}else t!==void 0&&o.push(Fn(t));return o}static _$Eu(t,o){const r=o.attribute;return r===!1?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$Eg=new Promise(o=>this.enableUpdating=o),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(o=>o(this))}addController(t){var o;(this._$ES??(this._$ES=[])).push(t),this.renderRoot!==void 0&&this.isConnected&&((o=t.hostConnected)==null||o.call(t))}removeController(t){var o;(o=this._$ES)==null||o.splice(this._$ES.indexOf(t)>>>0,1)}_$E_(){const t=new Map,o=this.constructor.elementProperties;for(const r of o.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Xl(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)==null||t.forEach(o=>{var r;return(r=o.hostConnected)==null?void 0:r.call(o)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)==null||t.forEach(o=>{var r;return(r=o.hostDisconnected)==null?void 0:r.call(o)})}attributeChangedCallback(t,o,r){this._$AK(t,r)}_$EO(t,o){var n;const r=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,r);if(s!==void 0&&r.reflect===!0){const i=(((n=r.converter)==null?void 0:n.toAttribute)!==void 0?r.converter:ro).toAttribute(o,r.type);this._$Em=t,i==null?this.removeAttribute(s):this.setAttribute(s,i),this._$Em=null}}_$AK(t,o){var n;const r=this.constructor,s=r._$Eh.get(t);if(s!==void 0&&this._$Em!==s){const i=r.getPropertyOptions(s),a=typeof i.converter=="function"?{fromAttribute:i.converter}:((n=i.converter)==null?void 0:n.fromAttribute)!==void 0?i.converter:ro;this._$Em=s,this[s]=a.fromAttribute(o,i.type),this._$Em=null}}requestUpdate(t,o,r,s=!1,n){if(t!==void 0){if(r??(r=this.constructor.getPropertyOptions(t)),!(r.hasChanged??On)(s?n:this[t],o))return;this.C(t,o,r)}this.isUpdatePending===!1&&(this._$Eg=this._$EP())}C(t,o,r){this._$AL.has(t)||this._$AL.set(t,o),r.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(o){Promise.reject(o)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var r;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this._$Ep){for(const[n,i]of this._$Ep)this[n]=i;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[n,i]of s)i.wrapped!==!0||this._$AL.has(n)||this[n]===void 0||this.C(n,this[n],i)}let t=!1;const o=this._$AL;try{t=this.shouldUpdate(o),t?(this.willUpdate(o),(r=this._$ES)==null||r.forEach(s=>{var n;return(n=s.hostUpdate)==null?void 0:n.call(s)}),this.update(o)):this._$ET()}catch(s){throw t=!1,this._$ET(),s}t&&this._$AE(o)}willUpdate(t){}_$AE(t){var o;(o=this._$ES)==null||o.forEach(r=>{var s;return(s=r.hostUpdated)==null?void 0:s.call(r)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(o=>this._$EO(o,this[o]))),this._$ET()}updated(t){}firstUpdated(t){}};Ee.elementStyles=[],Ee.shadowRootOptions={mode:"open"},Ee[oo("elementProperties")]=new Map,Ee[oo("finalized")]=new Map,jr==null||jr({ReactiveElement:Ee}),(Zt.reactiveElementVersions??(Zt.reactiveElementVersions=[])).push("2.0.1");/**
24
28
  * @license
25
29
  * Copyright 2017 Google LLC
26
30
  * SPDX-License-Identifier: BSD-3-Clause
27
- */const ot=e=>t=>typeof t=="function"?((o,r)=>(customElements.define(o,r),r))(e,t):((o,r)=>{const{kind:s,elements:n}=r;return{kind:s,elements:n,finisher(i){customElements.define(o,i)}}})(e,t);/**
31
+ */const so=globalThis,Bo=so.trustedTypes,Vn=Bo?Bo.createPolicy("lit-html",{createHTML:e=>e}):void 0,Hn="$lit$",Wt=`lit$${(Math.random()+"").slice(9)}$`,Un="?"+Wt,ac=`<${Un}>`,pe=document,no=()=>pe.createComment(""),io=e=>e===null||typeof e!="object"&&typeof e!="function",jn=Array.isArray,lc=e=>jn(e)||typeof(e==null?void 0:e[Symbol.iterator])=="function",Gr=`[
32
+ \f\r]`,ao=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Gn=/-->/g,Zn=/>/g,fe=RegExp(`>|${Gr}(?:([^\\s"'>=/]+)(${Gr}*=${Gr}*(?:[^
33
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Wn=/'/g,Kn=/"/g,Yn=/^(?:script|style|textarea|title)$/i,Jn=e=>(t,...o)=>({_$litType$:e,strings:t,values:o}),A=Jn(1),Zr=Jn(2),Se=Symbol.for("lit-noChange"),J=Symbol.for("lit-nothing"),Qn=new WeakMap,ge=pe.createTreeWalker(pe,129);function Xn(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Vn!==void 0?Vn.createHTML(t):t}const cc=(e,t)=>{const o=e.length-1,r=[];let s,n=t===2?"<svg>":"",i=ao;for(let a=0;a<o;a++){const l=e[a];let c,u,d=-1,p=0;for(;p<l.length&&(i.lastIndex=p,u=i.exec(l),u!==null);)p=i.lastIndex,i===ao?u[1]==="!--"?i=Gn:u[1]!==void 0?i=Zn:u[2]!==void 0?(Yn.test(u[2])&&(s=RegExp("</"+u[2],"g")),i=fe):u[3]!==void 0&&(i=fe):i===fe?u[0]===">"?(i=s??ao,d=-1):u[1]===void 0?d=-2:(d=i.lastIndex-u[2].length,c=u[1],i=u[3]===void 0?fe:u[3]==='"'?Kn:Wn):i===Kn||i===Wn?i=fe:i===Gn||i===Zn?i=ao:(i=fe,s=void 0);const h=i===fe&&e[a+1].startsWith("/>")?" ":"";n+=i===ao?l+ac:d>=0?(r.push(c),l.slice(0,d)+Hn+l.slice(d)+Wt+h):l+Wt+(d===-2?a:h)}return[Xn(e,n+(e[o]||"<?>")+(t===2?"</svg>":"")),r]};let Wr=class zl{constructor({strings:t,_$litType$:o},r){let s;this.parts=[];let n=0,i=0;const a=t.length-1,l=this.parts,[c,u]=cc(t,o);if(this.el=zl.createElement(c,r),ge.currentNode=this.el.content,o===2){const d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(s=ge.nextNode())!==null&&l.length<a;){if(s.nodeType===1){if(s.hasAttributes())for(const d of s.getAttributeNames())if(d.endsWith(Hn)){const p=u[i++],h=s.getAttribute(d).split(Wt),b=/([.?@])?(.*)/.exec(p);l.push({type:1,index:n,name:b[2],strings:h,ctor:b[1]==="."?dc:b[1]==="?"?hc:b[1]==="@"?pc:Oo}),s.removeAttribute(d)}else d.startsWith(Wt)&&(l.push({type:6,index:n}),s.removeAttribute(d));if(Yn.test(s.tagName)){const d=s.textContent.split(Wt),p=d.length-1;if(p>0){s.textContent=Bo?Bo.emptyScript:"";for(let h=0;h<p;h++)s.append(d[h],no()),ge.nextNode(),l.push({type:2,index:++n});s.append(d[p],no())}}}else if(s.nodeType===8)if(s.data===Un)l.push({type:2,index:n});else{let d=-1;for(;(d=s.data.indexOf(Wt,d+1))!==-1;)l.push({type:7,index:n}),d+=Wt.length-1}n++}}static createElement(t,o){const r=pe.createElement("template");return r.innerHTML=t,r}};function qe(e,t,o=e,r){var i,a;if(t===Se)return t;let s=r!==void 0?(i=o._$Co)==null?void 0:i[r]:o._$Cl;const n=io(t)?void 0:t._$litDirective$;return(s==null?void 0:s.constructor)!==n&&((a=s==null?void 0:s._$AO)==null||a.call(s,!1),n===void 0?s=void 0:(s=new n(e),s._$AT(e,o,r)),r!==void 0?(o._$Co??(o._$Co=[]))[r]=s:o._$Cl=s),s!==void 0&&(t=qe(e,s._$AS(e,t.values),s,r)),t}let uc=class{constructor(t,o){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=o}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:o},parts:r}=this._$AD,s=((t==null?void 0:t.creationScope)??pe).importNode(o,!0);ge.currentNode=s;let n=ge.nextNode(),i=0,a=0,l=r[0];for(;l!==void 0;){if(i===l.index){let c;l.type===2?c=new Kr(n,n.nextSibling,this,t):l.type===1?c=new l.ctor(n,l.name,l.strings,this,t):l.type===6&&(c=new fc(n,this,t)),this._$AV.push(c),l=r[++a]}i!==(l==null?void 0:l.index)&&(n=ge.nextNode(),i++)}return ge.currentNode=pe,s}p(t){let o=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,o),o+=r.strings.length-2):r._$AI(t[o])),o++}},Kr=class Rl{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,o,r,s){this.type=2,this._$AH=J,this._$AN=void 0,this._$AA=t,this._$AB=o,this._$AM=r,this.options=s,this._$Cv=(s==null?void 0:s.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const o=this._$AM;return o!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=o.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,o=this){t=qe(this,t,o),io(t)?t===J||t==null||t===""?(this._$AH!==J&&this._$AR(),this._$AH=J):t!==this._$AH&&t!==Se&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):lc(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==J&&io(this._$AH)?this._$AA.nextSibling.data=t:this.$(pe.createTextNode(t)),this._$AH=t}g(t){var n;const{values:o,_$litType$:r}=t,s=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=Wr.createElement(Xn(r.h,r.h[0]),this.options)),r);if(((n=this._$AH)==null?void 0:n._$AD)===s)this._$AH.p(o);else{const i=new uc(s,this),a=i.u(this.options);i.p(o),this.$(a),this._$AH=i}}_$AC(t){let o=Qn.get(t.strings);return o===void 0&&Qn.set(t.strings,o=new Wr(t)),o}T(t){jn(this._$AH)||(this._$AH=[],this._$AR());const o=this._$AH;let r,s=0;for(const n of t)s===o.length?o.push(r=new Rl(this.k(no()),this.k(no()),this,this.options)):r=o[s],r._$AI(n),s++;s<o.length&&(this._$AR(r&&r._$AB.nextSibling,s),o.length=s)}_$AR(t=this._$AA.nextSibling,o){var r;for((r=this._$AP)==null?void 0:r.call(this,!1,!0,o);t&&t!==this._$AB;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){var o;this._$AM===void 0&&(this._$Cv=t,(o=this._$AP)==null||o.call(this,t))}},Oo=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,o,r,s,n){this.type=1,this._$AH=J,this._$AN=void 0,this.element=t,this.name=o,this._$AM=s,this.options=n,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=J}_$AI(t,o=this,r,s){const n=this.strings;let i=!1;if(n===void 0)t=qe(this,t,o,0),i=!io(t)||t!==this._$AH&&t!==Se,i&&(this._$AH=t);else{const a=t;let l,c;for(t=n[0],l=0;l<n.length-1;l++)c=qe(this,a[r+l],o,l),c===Se&&(c=this._$AH[l]),i||(i=!io(c)||c!==this._$AH[l]),c===J?t=J:t!==J&&(t+=(c??"")+n[l+1]),this._$AH[l]=c}i&&!s&&this.j(t)}j(t){t===J?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},dc=class extends Oo{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===J?void 0:t}},hc=class extends Oo{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==J)}},pc=class extends Oo{constructor(t,o,r,s,n){super(t,o,r,s,n),this.type=5}_$AI(t,o=this){if((t=qe(this,t,o,0)??J)===Se)return;const r=this._$AH,s=t===J&&r!==J||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,n=t!==J&&(r===J||s);s&&this.element.removeEventListener(this.name,this,r),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var o;typeof this._$AH=="function"?this._$AH.call(((o=this.options)==null?void 0:o.host)??this.element,t):this._$AH.handleEvent(t)}},fc=class{constructor(t,o,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=o,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){qe(this,t)}};const Yr=so.litHtmlPolyfillSupport;Yr==null||Yr(Wr,Kr),(so.litHtmlVersions??(so.litHtmlVersions=[])).push("3.0.1");const gc=(e,t,o)=>{const r=(o==null?void 0:o.renderBefore)??t;let s=r._$litPart$;if(s===void 0){const n=(o==null?void 0:o.renderBefore)??null;r._$litPart$=s=new Kr(t.insertBefore(no(),n),n,void 0,o??{})}return s._$AI(e),s};/**
28
34
  * @license
29
35
  * Copyright 2017 Google LLC
30
36
  * SPDX-License-Identifier: BSD-3-Clause
31
- */const Al=(e,t)=>t.kind==="method"&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(o){o.createProperty(t.key,e)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){typeof t.initializer=="function"&&(this[t.key]=t.initializer.call(this))},finisher(o){o.createProperty(t.key,e)}},$l=(e,t,o)=>{t.constructor.createProperty(o,e)};function $(e){return(t,o)=>o!==void 0?$l(e,t,o):Al(e,t)}/**
37
+ */let Bt=class extends Ee{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var o;const t=super.createRenderRoot();return(o=this.renderOptions).renderBefore??(o.renderBefore=t.firstChild),t}update(t){const o=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=gc(o,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return Se}};Bt._$litElement$=!0,Bt.finalized=!0,(Dl=globalThis.litElementHydrateSupport)==null||Dl.call(globalThis,{LitElement:Bt});const Jr=globalThis.litElementPolyfillSupport;Jr==null||Jr({LitElement:Bt}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.0.1");/**
32
38
  * @license
33
39
  * Copyright 2017 Google LLC
34
40
  * SPDX-License-Identifier: BSD-3-Clause
35
- */function Tn(e){return Ge({finisher:(t,o)=>{Object.assign(t.prototype[o],e)}})}/**
41
+ */const tt=e=>(t,o)=>{o!==void 0?o.addInitializer(()=>{customElements.define(e,t)}):customElements.define(e,t)};/**
36
42
  * @license
37
43
  * Copyright 2017 Google LLC
38
44
  * SPDX-License-Identifier: BSD-3-Clause
39
- */function Ro(e,t){return Ge({descriptor:o=>{const r={get(){var s,n;return(n=(s=this.renderRoot)===null||s===void 0?void 0:s.querySelector(e))!==null&&n!==void 0?n:null},enumerable:!0,configurable:!0};if(t){const s=typeof o=="symbol"?Symbol():"__"+o;r.get=function(){var n,i;return this[s]===void 0&&(this[s]=(i=(n=this.renderRoot)===null||n===void 0?void 0:n.querySelector(e))!==null&&i!==void 0?i:null),this[s]}}return r}})}/**
45
+ */const bc={attribute:!0,type:String,converter:Po,reflect:!1,hasChanged:Mr},mc=(e=bc,t,o)=>{const{kind:r,metadata:s}=o;let n=globalThis.litPropertyMetadata.get(s);if(n===void 0&&globalThis.litPropertyMetadata.set(s,n=new Map),n.set(o.name,e),r==="accessor"){const{name:i}=o;return{set(a){const l=t.get.call(this);t.set.call(this,a),this.requestUpdate(i,l,e)},init(a){return a!==void 0&&this.C(i,void 0,e),a}}}if(r==="setter"){const{name:i}=o;return function(a){const l=this[i];t.call(this,a),this.requestUpdate(i,l,e)}}throw Error("Unsupported decorator location: "+r)};function g(e){return(t,o)=>typeof o=="object"?mc(e,t,o):((r,s,n)=>{const i=s.hasOwnProperty(n);return s.constructor.createProperty(n,i?{...r,wrapped:!0}:r),i?Object.getOwnPropertyDescriptor(s,n):void 0})(e,t,o)}/**
40
46
  * @license
41
47
  * Copyright 2017 Google LLC
42
48
  * SPDX-License-Identifier: BSD-3-Clause
43
- */function El(e){return Ge({descriptor:t=>({get(){var o,r;return(r=(o=this.renderRoot)===null||o===void 0?void 0:o.querySelectorAll(e))!==null&&r!==void 0?r:[]},enumerable:!0,configurable:!0})})}/**
49
+ */function rt(e){return g({...e,state:!0,attribute:!1})}/**
44
50
  * @license
45
- * Copyright 2021 Google LLC
51
+ * Copyright 2017 Google LLC
52
+ * SPDX-License-Identifier: BSD-3-Clause
53
+ */function ti(e){return(t,o)=>{const r=typeof t=="function"?t:t[o];Object.assign(r,e)}}/**
54
+ * @license
55
+ * Copyright 2017 Google LLC
46
56
  * SPDX-License-Identifier: BSD-3-Clause
47
- */var Fr;((Fr=window.HTMLSlotElement)===null||Fr===void 0?void 0:Fr.prototype.assignedElements)!=null;var Sl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ir(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ql(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var o=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};o.prototype=t.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(o,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}),o}var Ln={exports:{}};(function(e){(function(t,o){e.exports?e.exports=o():t.log=o()})(Sl,function(){var t=function(){},o="undefined",r=typeof window!==o&&typeof window.navigator!==o&&/Trident\/|MSIE /.test(window.navigator.userAgent),s=["trace","debug","info","warn","error"];function n(m,w){var y=m[w];if(typeof y.bind=="function")return y.bind(m);try{return Function.prototype.bind.call(y,m)}catch{return function(){return Function.prototype.apply.apply(y,[m,arguments])}}}function i(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function a(m){return m==="debug"&&(m="log"),typeof console===o?!1:m==="trace"&&r?i:console[m]!==void 0?n(console,m):console.log!==void 0?n(console,"log"):t}function l(m,w){for(var y=0;y<s.length;y++){var v=s[y];this[v]=y<m?t:this.methodFactory(v,m,w)}this.log=this.debug}function c(m,w,y){return function(){typeof console!==o&&(l.call(this,w,y),this[m].apply(this,arguments))}}function u(m,w,y){return a(m)||c.apply(this,arguments)}function d(m,w,y){var v=this,k;w=w??"WARN";var C="loglevel";typeof m=="string"?C+=":"+m:typeof m=="symbol"&&(C=void 0);function A(S){var q=(s[S]||"silent").toUpperCase();if(!(typeof window===o||!C)){try{window.localStorage[C]=q;return}catch{}try{window.document.cookie=encodeURIComponent(C)+"="+q+";"}catch{}}}function _(){var S;if(!(typeof window===o||!C)){try{S=window.localStorage[C]}catch{}if(typeof S===o)try{var q=window.document.cookie,F=q.indexOf(encodeURIComponent(C)+"=");F!==-1&&(S=/^([^;]+)/.exec(q.slice(F))[1])}catch{}return v.levels[S]===void 0&&(S=void 0),S}}function D(){if(!(typeof window===o||!C)){try{window.localStorage.removeItem(C);return}catch{}try{window.document.cookie=encodeURIComponent(C)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}v.name=m,v.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},v.methodFactory=y||u,v.getLevel=function(){return k},v.setLevel=function(S,q){if(typeof S=="string"&&v.levels[S.toUpperCase()]!==void 0&&(S=v.levels[S.toUpperCase()]),typeof S=="number"&&S>=0&&S<=v.levels.SILENT){if(k=S,q!==!1&&A(S),l.call(v,S,m),typeof console===o&&S<v.levels.SILENT)return"No console available for logging"}else throw"log.setLevel() called with invalid level: "+S},v.setDefaultLevel=function(S){w=S,_()||v.setLevel(S,!1)},v.resetLevel=function(){v.setLevel(w,!1),D()},v.enableAll=function(S){v.setLevel(v.levels.TRACE,S)},v.disableAll=function(S){v.setLevel(v.levels.SILENT,S)};var M=_();M==null&&(M=w),v.setLevel(M,!1)}var f=new d,h={};f.getLogger=function(w){if(typeof w!="symbol"&&typeof w!="string"||w==="")throw new TypeError("You must supply a name when creating a logger.");var y=h[w];return y||(y=h[w]=new d(w,f.getLevel(),f.methodFactory)),y};var b=typeof window!==o?window.log:void 0;return f.noConflict=function(){return typeof window!==o&&window.log===f&&(window.log=b),f},f.getLoggers=function(){return h},f.default=f,f})})(Ln);var Dl=Ln.exports;const Po=Ir(Dl),Tl=X`
57
+ */const Qr=(e,t,o)=>(o.configurable=!0,o.enumerable=!0,Reflect.decorate&&typeof t!="object"&&Object.defineProperty(e,t,o),o);/**
58
+ * @license
59
+ * Copyright 2017 Google LLC
60
+ * SPDX-License-Identifier: BSD-3-Clause
61
+ */function V(e,t){return(o,r,s)=>{const n=i=>{var a;return((a=i.renderRoot)==null?void 0:a.querySelector(e))??null};if(t){const{get:i,set:a}=typeof r=="object"?o:s??(()=>{const l=Symbol();return{get(){return this[l]},set(c){this[l]=c}}})();return Qr(o,r,{get(){if(t){let l=i.call(this);return l===void 0&&(l=n(this),a.call(this,l)),l}return n(this)}})}return Qr(o,r,{get(){return n(this)}})}}/**
62
+ * @license
63
+ * Copyright 2017 Google LLC
64
+ * SPDX-License-Identifier: BSD-3-Clause
65
+ */let vc;function yc(e){return(t,o)=>Qr(t,o,{get(){return(this.renderRoot??vc??(vc=document.createDocumentFragment())).querySelectorAll(e)}})}var wc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function _c(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var o=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};o.prototype=t.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(o,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}),o}var ei={exports:{}};(function(e){(function(t,o){e.exports?e.exports=o():t.log=o()})(wc,function(){var t=function(){},o="undefined",r=typeof window!==o&&typeof window.navigator!==o&&/Trident\/|MSIE /.test(window.navigator.userAgent),s=["trace","debug","info","warn","error"];function n(m,w){var y=m[w];if(typeof y.bind=="function")return y.bind(m);try{return Function.prototype.bind.call(y,m)}catch{return function(){return Function.prototype.apply.apply(y,[m,arguments])}}}function i(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function a(m){return m==="debug"&&(m="log"),typeof console===o?!1:m==="trace"&&r?i:console[m]!==void 0?n(console,m):console.log!==void 0?n(console,"log"):t}function l(m,w){for(var y=0;y<s.length;y++){var v=s[y];this[v]=y<m?t:this.methodFactory(v,m,w)}this.log=this.debug}function c(m,w,y){return function(){typeof console!==o&&(l.call(this,w,y),this[m].apply(this,arguments))}}function u(m,w,y){return a(m)||c.apply(this,arguments)}function d(m,w,y){var v=this,k;w=w??"WARN";var C="loglevel";typeof m=="string"?C+=":"+m:typeof m=="symbol"&&(C=void 0);function $(S){var q=(s[S]||"silent").toUpperCase();if(!(typeof window===o||!C)){try{window.localStorage[C]=q;return}catch{}try{window.document.cookie=encodeURIComponent(C)+"="+q+";"}catch{}}}function _(){var S;if(!(typeof window===o||!C)){try{S=window.localStorage[C]}catch{}if(typeof S===o)try{var q=window.document.cookie,I=q.indexOf(encodeURIComponent(C)+"=");I!==-1&&(S=/^([^;]+)/.exec(q.slice(I))[1])}catch{}return v.levels[S]===void 0&&(S=void 0),S}}function D(){if(!(typeof window===o||!C)){try{window.localStorage.removeItem(C);return}catch{}try{window.document.cookie=encodeURIComponent(C)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}v.name=m,v.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},v.methodFactory=y||u,v.getLevel=function(){return k},v.setLevel=function(S,q){if(typeof S=="string"&&v.levels[S.toUpperCase()]!==void 0&&(S=v.levels[S.toUpperCase()]),typeof S=="number"&&S>=0&&S<=v.levels.SILENT){if(k=S,q!==!1&&$(S),l.call(v,S,m),typeof console===o&&S<v.levels.SILENT)return"No console available for logging"}else throw"log.setLevel() called with invalid level: "+S},v.setDefaultLevel=function(S){w=S,_()||v.setLevel(S,!1)},v.resetLevel=function(){v.setLevel(w,!1),D()},v.enableAll=function(S){v.setLevel(v.levels.TRACE,S)},v.disableAll=function(S){v.setLevel(v.levels.SILENT,S)};var P=_();P==null&&(P=w),v.setLevel(P,!1)}var p=new d,h={};p.getLogger=function(w){if(typeof w!="symbol"&&typeof w!="string"||w==="")throw new TypeError("You must supply a name when creating a logger.");var y=h[w];return y||(y=h[w]=new d(w,p.getLevel(),p.methodFactory)),y};var b=typeof window!==o?window.log:void 0;return p.noConflict=function(){return typeof window!==o&&window.log===p&&(window.log=b),p},p.getLoggers=function(){return h},p.default=p,p})})(ei);var xc=ei.exports;const No=Xr(xc),kc=z`
48
66
  :host {
49
67
  }
50
68
  .cb-wrapper {
@@ -115,71 +133,84 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
115
133
  * @license
116
134
  * Copyright 2017 Google LLC
117
135
  * SPDX-License-Identifier: BSD-3-Clause
118
- */const Br={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Or=e=>(...t)=>({_$litDirective$:e,values:t});let Nr=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,o,r){this._$Ct=t,this._$AM=o,this._$Ci=r}_$AS(t,o){return this.update(t,o)}update(t,o){return this.render(...o)}};/**
136
+ */var ts;const Vo=window,De=Vo.trustedTypes,oi=De?De.createPolicy("lit-html",{createHTML:e=>e}):void 0,es="$lit$",Kt=`lit$${(Math.random()+"").slice(9)}$`,ri="?"+Kt,Ac=`<${ri}>`,be=document,Ho=()=>be.createComment(""),lo=e=>e===null||typeof e!="object"&&typeof e!="function",si=Array.isArray,Cc=e=>si(e)||typeof(e==null?void 0:e[Symbol.iterator])=="function",os=`[
137
+ \f\r]`,co=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ni=/-->/g,ii=/>/g,me=RegExp(`>|${os}(?:([^\\s"'>=/]+)(${os}*=${os}*(?:[^
138
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),ai=/'/g,li=/"/g,ci=/^(?:script|style|textarea|title)$/i,Yt=Symbol.for("lit-noChange"),Z=Symbol.for("lit-nothing"),ui=new WeakMap,ve=be.createTreeWalker(be,129,null,!1);function di(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return oi!==void 0?oi.createHTML(t):t}const $c=(e,t)=>{const o=e.length-1,r=[];let s,n=t===2?"<svg>":"",i=co;for(let a=0;a<o;a++){const l=e[a];let c,u,d=-1,p=0;for(;p<l.length&&(i.lastIndex=p,u=i.exec(l),u!==null);)p=i.lastIndex,i===co?u[1]==="!--"?i=ni:u[1]!==void 0?i=ii:u[2]!==void 0?(ci.test(u[2])&&(s=RegExp("</"+u[2],"g")),i=me):u[3]!==void 0&&(i=me):i===me?u[0]===">"?(i=s??co,d=-1):u[1]===void 0?d=-2:(d=i.lastIndex-u[2].length,c=u[1],i=u[3]===void 0?me:u[3]==='"'?li:ai):i===li||i===ai?i=me:i===ni||i===ii?i=co:(i=me,s=void 0);const h=i===me&&e[a+1].startsWith("/>")?" ":"";n+=i===co?l+Ac:d>=0?(r.push(c),l.slice(0,d)+es+l.slice(d)+Kt+h):l+Kt+(d===-2?(r.push(void 0),a):h)}return[di(e,n+(e[o]||"<?>")+(t===2?"</svg>":"")),r]};class uo{constructor({strings:t,_$litType$:o},r){let s;this.parts=[];let n=0,i=0;const a=t.length-1,l=this.parts,[c,u]=$c(t,o);if(this.el=uo.createElement(c,r),ve.currentNode=this.el.content,o===2){const d=this.el.content,p=d.firstChild;p.remove(),d.append(...p.childNodes)}for(;(s=ve.nextNode())!==null&&l.length<a;){if(s.nodeType===1){if(s.hasAttributes()){const d=[];for(const p of s.getAttributeNames())if(p.endsWith(es)||p.startsWith(Kt)){const h=u[i++];if(d.push(p),h!==void 0){const b=s.getAttribute(h.toLowerCase()+es).split(Kt),m=/([.?@])?(.*)/.exec(h);l.push({type:1,index:n,name:m[2],strings:b,ctor:m[1]==="."?Sc:m[1]==="?"?Dc:m[1]==="@"?Tc:jo})}else l.push({type:6,index:n})}for(const p of d)s.removeAttribute(p)}if(ci.test(s.tagName)){const d=s.textContent.split(Kt),p=d.length-1;if(p>0){s.textContent=De?De.emptyScript:"";for(let h=0;h<p;h++)s.append(d[h],Ho()),ve.nextNode(),l.push({type:2,index:++n});s.append(d[p],Ho())}}}else if(s.nodeType===8)if(s.data===ri)l.push({type:2,index:n});else{let d=-1;for(;(d=s.data.indexOf(Kt,d+1))!==-1;)l.push({type:7,index:n}),d+=Kt.length-1}n++}}static createElement(t,o){const r=be.createElement("template");return r.innerHTML=t,r}}function Te(e,t,o=e,r){var s,n,i,a;if(t===Yt)return t;let l=r!==void 0?(s=o._$Co)===null||s===void 0?void 0:s[r]:o._$Cl;const c=lo(t)?void 0:t._$litDirective$;return(l==null?void 0:l.constructor)!==c&&((n=l==null?void 0:l._$AO)===null||n===void 0||n.call(l,!1),c===void 0?l=void 0:(l=new c(e),l._$AT(e,o,r)),r!==void 0?((i=(a=o)._$Co)!==null&&i!==void 0?i:a._$Co=[])[r]=l:o._$Cl=l),l!==void 0&&(t=Te(e,l._$AS(e,t.values),l,r)),t}class Ec{constructor(t,o){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=o}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var o;const{el:{content:r},parts:s}=this._$AD,n=((o=t==null?void 0:t.creationScope)!==null&&o!==void 0?o:be).importNode(r,!0);ve.currentNode=n;let i=ve.nextNode(),a=0,l=0,c=s[0];for(;c!==void 0;){if(a===c.index){let u;c.type===2?u=new Uo(i,i.nextSibling,this,t):c.type===1?u=new c.ctor(i,c.name,c.strings,this,t):c.type===6&&(u=new Lc(i,this,t)),this._$AV.push(u),c=s[++l]}a!==(c==null?void 0:c.index)&&(i=ve.nextNode(),a++)}return ve.currentNode=be,n}v(t){let o=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,o),o+=r.strings.length-2):r._$AI(t[o])),o++}}class Uo{constructor(t,o,r,s){var n;this.type=2,this._$AH=Z,this._$AN=void 0,this._$AA=t,this._$AB=o,this._$AM=r,this.options=s,this._$Cp=(n=s==null?void 0:s.isConnected)===null||n===void 0||n}get _$AU(){var t,o;return(o=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&o!==void 0?o:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const o=this._$AM;return o!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=o.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,o=this){t=Te(this,t,o),lo(t)?t===Z||t==null||t===""?(this._$AH!==Z&&this._$AR(),this._$AH=Z):t!==this._$AH&&t!==Yt&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):Cc(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==Z&&lo(this._$AH)?this._$AA.nextSibling.data=t:this.$(be.createTextNode(t)),this._$AH=t}g(t){var o;const{values:r,_$litType$:s}=t,n=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=uo.createElement(di(s.h,s.h[0]),this.options)),s);if(((o=this._$AH)===null||o===void 0?void 0:o._$AD)===n)this._$AH.v(r);else{const i=new Ec(n,this),a=i.u(this.options);i.v(r),this.$(a),this._$AH=i}}_$AC(t){let o=ui.get(t.strings);return o===void 0&&ui.set(t.strings,o=new uo(t)),o}T(t){si(this._$AH)||(this._$AH=[],this._$AR());const o=this._$AH;let r,s=0;for(const n of t)s===o.length?o.push(r=new Uo(this.k(Ho()),this.k(Ho()),this,this.options)):r=o[s],r._$AI(n),s++;s<o.length&&(this._$AR(r&&r._$AB.nextSibling,s),o.length=s)}_$AR(t=this._$AA.nextSibling,o){var r;for((r=this._$AP)===null||r===void 0||r.call(this,!1,!0,o);t&&t!==this._$AB;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){var o;this._$AM===void 0&&(this._$Cp=t,(o=this._$AP)===null||o===void 0||o.call(this,t))}}class jo{constructor(t,o,r,s,n){this.type=1,this._$AH=Z,this._$AN=void 0,this.element=t,this.name=o,this._$AM=s,this.options=n,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=Z}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,o=this,r,s){const n=this.strings;let i=!1;if(n===void 0)t=Te(this,t,o,0),i=!lo(t)||t!==this._$AH&&t!==Yt,i&&(this._$AH=t);else{const a=t;let l,c;for(t=n[0],l=0;l<n.length-1;l++)c=Te(this,a[r+l],o,l),c===Yt&&(c=this._$AH[l]),i||(i=!lo(c)||c!==this._$AH[l]),c===Z?t=Z:t!==Z&&(t+=(c??"")+n[l+1]),this._$AH[l]=c}i&&!s&&this.j(t)}j(t){t===Z?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Sc extends jo{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Z?void 0:t}}const qc=De?De.emptyScript:"";class Dc extends jo{constructor(){super(...arguments),this.type=4}j(t){t&&t!==Z?this.element.setAttribute(this.name,qc):this.element.removeAttribute(this.name)}}class Tc extends jo{constructor(t,o,r,s,n){super(t,o,r,s,n),this.type=5}_$AI(t,o=this){var r;if((t=(r=Te(this,t,o,0))!==null&&r!==void 0?r:Z)===Yt)return;const s=this._$AH,n=t===Z&&s!==Z||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,i=t!==Z&&(s===Z||n);n&&this.element.removeEventListener(this.name,this,s),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var o,r;typeof this._$AH=="function"?this._$AH.call((r=(o=this.options)===null||o===void 0?void 0:o.host)!==null&&r!==void 0?r:this.element,t):this._$AH.handleEvent(t)}}class Lc{constructor(t,o,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=o,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){Te(this,t)}}const hi=Vo.litHtmlPolyfillSupport;hi==null||hi(uo,Uo),((ts=Vo.litHtmlVersions)!==null&&ts!==void 0?ts:Vo.litHtmlVersions=[]).push("2.8.0");/**
119
139
  * @license
120
140
  * Copyright 2017 Google LLC
121
141
  * SPDX-License-Identifier: BSD-3-Clause
122
- */let Vr=class extends Nr{constructor(t){if(super(t),this.et=W,t.type!==Br.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===W||t==null)return this.ft=void 0,this.et=t;if(t===$t)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.ft;this.et=t;const o=[t];return o.raw=o,this.ft={_$litType$:this.constructor.resultType,strings:o,values:[]}}};Vr.directiveName="unsafeHTML",Vr.resultType=1;const Je=Or(Vr),Et=X`
123
- :host {
124
- --primary-color: var(--sl-color-primary-600);
125
- }
142
+ */const pi={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},fi=e=>(...t)=>({_$litDirective$:e,values:t});let gi=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,o,r){this._$Ct=t,this._$AM=o,this._$Ci=r}_$AS(t,o){return this.update(t,o)}update(t,o){return this.render(...o)}};/**
143
+ * @license
144
+ * Copyright 2017 Google LLC
145
+ * SPDX-License-Identifier: BSD-3-Clause
146
+ */let rs=class extends gi{constructor(t){if(super(t),this.et=Z,t.type!==pi.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===Z||t==null)return this.ft=void 0,this.et=t;if(t===Yt)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.ft;this.et=t;const o=[t];return o.raw=o,this.ft={_$litType$:this.constructor.resultType,strings:o,values:[]}}};rs.directiveName="unsafeHTML",rs.resultType=1;const Le=fi(rs),Et=z`
147
+ :host {
148
+ --primary-color: var(--sl-color-primary-600);
149
+ }
126
150
 
127
- .link__item,
128
- .link__item:visited,
129
- .link__item:active {
130
- color: var(--primary-color);
131
- }
151
+ .link__item,
152
+ .link__item:visited,
153
+ .link__item:active {
154
+ color: var(--primary-color);
155
+ }
132
156
 
133
- .link__item.inverse,
134
- .link__item.inverse:visited,
135
- .link__item.inverse:active {
136
- color: white;
137
- }
157
+ .link__item.inverse,
158
+ .link__item.inverse:visited,
159
+ .link__item.inverse:active {
160
+ color: white;
161
+ }
138
162
 
139
- sl-button.icon {
140
- display: flex;
141
- justify-content: center;
142
- align-items: center;
143
- }
163
+ /*
164
+ sl-button.cb-icon {
165
+ display: flex;
166
+ justify-content: center;
167
+ align-items: center;
168
+ }
169
+ */
170
+ sl-button {
171
+ display: flex;
172
+ justify-content: center;
173
+ align-items: center;
174
+ }
144
175
 
145
- .color-white {
146
- color: white;
147
- }
176
+ .color-white {
177
+ color: white;
178
+ }
148
179
 
149
- .color-default {
150
- color: var(--sl-color-neutral-600);
151
- }
180
+ .color-default {
181
+ color: var(--sl-color-neutral-600);
182
+ }
152
183
 
153
- .color-primary {
154
- color: var(--sl-color-primary-600);
155
- }
184
+ .color-primary {
185
+ color: var(--sl-color-primary-600);
186
+ }
156
187
 
157
- .color-success,
158
- .color-green {
159
- color: var(--sl-color-success-600);
160
- }
188
+ .color-success,
189
+ .color-green {
190
+ color: var(--sl-color-success-600);
191
+ }
161
192
 
162
- .color-warning {
163
- color: var(--sl-color-warning-600);
164
- }
193
+ .color-warning {
194
+ color: var(--sl-color-warning-600);
195
+ }
165
196
 
166
- .color-danger,
167
- .color-error {
168
- color: var(--sl-color-danger-600);
169
- }
197
+ .color-danger,
198
+ .color-error {
199
+ color: var(--sl-color-danger-600);
200
+ }
170
201
 
171
- .color-default {
172
- color: var(--sl-color-neutral-600);
173
- }
202
+ .color-default {
203
+ color: var(--sl-color-neutral-600);
204
+ }
174
205
 
175
- .text-button {
176
- cursor: pointer;
177
- }
206
+ .text-button {
207
+ cursor: pointer;
208
+ }
178
209
 
179
- .text-button:hover {
180
- text-decoration: underline;
181
- }
182
- `,zn=X`
210
+ .text-button:hover {
211
+ text-decoration: underline;
212
+ }
213
+ `,bi=z`
183
214
  ${Et}
184
215
 
185
216
  :host {
@@ -201,9 +232,9 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
201
232
  .color-white {
202
233
  color: white;
203
234
  }
204
- `;var Ll=Object.defineProperty,zl=Object.getOwnPropertyDescriptor,Ur=(e,t,o,r)=>{for(var s=r>1?void 0:r?zl(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&Ll(t,o,s),s};let Qe=class extends Wt{constructor(){super(...arguments),this.color="primary",this.svg=""}render(){return T`<span class="cb-icon color-${this.color}" part="base"
205
- >${Je(this.svg)}</span
206
- >`}};Qe.styles=zn,Ur([$({type:String})],Qe.prototype,"color",2),Ur([$({type:String})],Qe.prototype,"svg",2),Qe=Ur([ot("cb-icon")],Qe);let Rl=e=>crypto.getRandomValues(new Uint8Array(e)),Pl=(e,t,o)=>{let r=(2<<Math.log(e.length-1)/Math.LN2)-1,s=-~(1.6*r*t/e.length);return(n=t)=>{let i="";for(;;){let a=o(s),l=s;for(;l--;)if(i+=e[a[l]&r]||"",i.length===n)return i}}};const Ml=((e,t=21)=>Pl(e,t,Rl))("1234567890abcdefghijklmnopqrstuvwxyz",10);function Hr(e=10){return Ml(e)}function Fl(e){return new Promise((t,o)=>{try{navigator.clipboard.writeText(e).then(()=>{t(e)})}catch(r){o(r)}})}function Il(e=!0){return new Promise(t=>{const o=document.createElement("input");o.type="file",e&&(o.multiple=!0),o.style.display="none",o.addEventListener("change",()=>{const r=Array.prototype.slice.call(o.files);t(r)}),o.click()})}const nt=Po.noConflict();nt.setLevel("info");class Bl{constructor(t={}){this.id=0,this.url=(t==null?void 0:t.url)||null,this.orgId=(t==null?void 0:t.orgId)||null,this.botId=(t==null?void 0:t.botId)||null,this.convId=(t==null?void 0:t.convId)||null,this._options=t||{},this._ws=null,this.started=!1,this.connected=!1,this.onMessage=(t==null?void 0:t.onMessage)||null,this.queue=[],this.pause=o=>new Promise(r=>setTimeout(r,o)),nt.info(`WSC: Created, url: ${this.url}`)}connect(t={}){if(this.url=(t==null?void 0:t.url)||this.url,this.connected=!1,!this.url)return nt.error("WSC: URL must be provided to connect"),null;const o=this.url;nt.info(`WSC: Connecting to ${o} ...`),this._ws=new WebSocket(o);let r=setTimeout(()=>{nt.error("WSC: connected message not received in time - terminating"),this._ws.close(),this._ws=null,this.connected=!1},15e3);this._ws.onopen=()=>{nt.info(`WSC: Connection to ${o} opened`)},this._ws.onmessage=s=>{let n=(s==null?void 0:s.data)||null;if(!n)return;let i=null;try{i=JSON.parse(n)}catch{nt.error(`Failed to parse message: ${n}`);return}(i==null?void 0:i.type)==="connected"&&(nt.info(`WS[${this.id}] Connected`),clearTimeout(r),this.connected=!0,this.sendQueuedMessages()),this.handleWscMessage(i)},this._ws.onerror=s=>{nt.error("WSC: Socket error"),clearTimeout(r),this.connected=!1,this._ws=null},this._ws.onclose=s=>{nt.info(`WSC: Closed - code:${s.code}, reason:"${s.reason}"`),this.connected=!1,this._ws=null,this.reconnect()}}reconnect(){this.started&&setTimeout(()=>{this.connect()},1e3)}disconnect(){if(!this._ws){nt.info("WSC: already disconnected");return}nt.info("WSC: disconnect"),this._ws.close()}async start(){this.started=!0,this.connect()}async stop(){this.started=!1,this.disconnect()}async startOld(){let t=1,o=!0;for(;o;){if(nt.info(`WSC: start: connecting, attempt ${t}`),await this.connect(),this.connected)return nt.info("WSC: connected"),!0;t++,o=t<=4,o&&await this.pause(1e3)}return nt.error(`WSC: start: failed to connect after ${t} attempts, exiting`),!1}handleWscMessage(t){this.onMessage&&typeof this.onMessage=="function"&&this.onMessage(t)}sendMessage(t){if(!this.connected){this.queue.push(JSON.stringify(t));return}this._ws.send(JSON.stringify(t))}sendQueuedMessages(){if(Array.isArray(this.queue)&&this.queue.length>0)for(let t=0;t<this.queue.length;t++)nt.info("Sending queued message",this.queue[t]),this._ws.send(this.queue[t]);this.queue=[]}}var Ol=Object.defineProperty,Nl=Object.getOwnPropertyDescriptor,Nt=(e,t,o,r)=>{for(var s=r>1?void 0:r?Nl(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&Ol(t,o,s),s};const mt=Po.noConflict();mt.setLevel("info");const Ae="cb_";class St extends So{constructor(){super(...arguments),this.actionIdCounter=0,this.wsClient=null,this.replyMessage=null}setSetting(t){mt.info("appState: Startup: setSetting"),this.setting=t,this.initBot().catch(o=>{mt.info(`Exception during bot initialization: ${o.message}`)})}clearConversation(){this.wsClient&&(this.wsClient.stop().then(()=>{}),this.wsClient=null),this.conversationId=Hr(),this.connectWs="false",this.messages=[],this.actions=[],this.addMessage({author:"assistant",type:"text",data:{text:this.setting.welcomeMessage}})}setLanguage(t){this.language=t}setTheme(t){this.theme=t}async initBot(){if(!this.botSettingsInitialized){const o=`${this.setting.url.startsWith("localhost")?"http":"https"}://${this.setting.url}/api/bot/settings/${this.setting.orgId}/${this.setting.botId}`;mt.info(`Getting bot settings at ${o} ...`);let r=null,s=null;try{r=await fetch(o,{headers:{"Access-Control-Allow-Origin":"null","X-Enegel-Signature":this.setting.botId}}),!r.ok||r.status!==200?mt.error(`Failed to get bot ${this.setting.botId} settings: ${r.status} ${r.statusText}`):s=await r.json()}catch(n){mt.error(`Failed to get bot ${this.setting.botId} settings: ${n.message}`),s=null}if(this.botSettingsInitialized=!0,!s){mt.error("No bot settings available - bot disabled"),this.disabled=!0;return}this.setting.welcomeMessage=(s==null?void 0:s.welcomeMessage)||"How can I help ?"}Array.isArray(this.messages)&&this.messages.length<=0&&this.addMessage({author:"assistant",type:"text",data:{text:this.setting.welcomeMessage}}),this.connectWs==="true"&&(mt.info("appState: connectWs is true"),this.getWsClient().catch(t=>{mt.error(`Exception during ws client startup: ${t.message}`)}))}async getWsClient(){if(this.wsClient)return this.wsClient;const o=`${this.setting.url.startsWith("localhost")?"ws":"wss"}://${this.setting.url}/api/bot/connect/${this.setting.orgId}/${this.setting.botId}/${this.conversationId}`;return mt.info(`Initiating ws connection to ${o} ...`),this.wsClient=new Bl({url:o,orgId:this.setting.orgId,botId:this.setting.botId,convId:this.conversationId}),await this.wsClient.start(),this.wsClient.onMessage=r=>{this.handleWscMessage(r)},this.wsClient}handleWscMessage(t){switch(t==null?void 0:t.type){case"message":{if(this.replyMessage)this.replyMessage.data.text=t.text,this.updateMessage(this.replyMessage,""),this.replyMessage=null;else{const o={type:"text",author:"assistant",data:{text:t.text}};"userName"in t&&(o.data.userName=t.userName,this.connectWs="true"),"userAvatar"in t&&(o.data.userAvatar=t.userAvatar,this.connectWs="true");const r=this.formatMessage(o);this.messages=this.messages.concat([r])}break}case"message-chunk":{this.replyMessage&&(this.replyMessage=this.updateMessage(this.replyMessage,t.text));break}case"typing":{this.replyMessage={author:"assistant",type:"text",isThinking:!0,data:{text:""}},this.addMessage(this.replyMessage);break}case"actions":{this.addActions((t==null?void 0:t.actions)||[]);break}}}addActions(t){if(Array.isArray(t)&&t.length>0){const o=t.map(r=>Object.assign(r,{internalId:this.actionIdCounter++}));this.actions=this.actions.concat(o)}}removeAction(t){const o=this.actions.findIndex(r=>r.internalId===t);if(o!==-1){this.actions.splice(o,1);const r=[];this.actions=r.concat(this.actions)}}async sendMessage(t){t=this.formatMessage(t),mt.info("Send Message:",t),this.messages=this.messages.concat([t]);const o=await this.getWsClient();if(!o){mt.error("Error - failed to obtain ws client"),this.replyMessage=null;return}o.sendMessage({type:"message",id:t.id,text:t.data.text})}formatMessage(t){var o;return t.id||(t.id=Hr()),t.timestamp=Date.now(),t.author==="assistant"&&(t.replyId=(o=this.messages[this.messages.length-1])==null?void 0:o.id),t}addMessage(t){t=this.formatMessage(t),this.messages=this.messages.concat([t])}addSystemMessage(t){this.addMessage({type:"text",author:"system",data:{text:t}})}updateMessage(t,o){const r=this.formatMessage(t);return r.isThinking=!1,o&&(r.data.text+=o),this.messages=this.messages.map(s=>s.id===r.id?r:s),r}removeMessage(t){this.messages=this.messages.filter(o=>o.id!==t)}clearMessages(){this.messages=[]}}Nt([xe({prefix:Ae}),Bt({value:"en"})],St.prototype,"language",2),Nt([xe({prefix:Ae}),Bt({value:"light"})],St.prototype,"theme",2),Nt([xe({prefix:Ae}),Bt({value:"false"})],St.prototype,"connectWs",2),Nt([xe({prefix:Ae}),Bt({value:Hr()})],St.prototype,"conversationId",2),Nt([xe({prefix:Ae}),Bt({type:Array,value:[]})],St.prototype,"messages",2),Nt([Bt({type:Array,value:[]})],St.prototype,"actions",2),Nt([Bt({type:Boolean,value:!1})],St.prototype,"botSettingsInitialized",2),Nt([Bt({type:Boolean,value:!1})],St.prototype,"disabled",2),Nt([xe({prefix:Ae}),Bt({type:Object,value:{orgId:null,botId:null,url:null,welcomeMessage:null}})],St.prototype,"setting",2);const V=new St,Vl=X`
235
+ `;var zc=Object.defineProperty,Rc=Object.getOwnPropertyDescriptor,ss=(e,t,o,r)=>{for(var s=r>1?void 0:r?Rc(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&zc(t,o,s),s};let ho=class extends Bt{constructor(){super(...arguments),this.color="primary",this.svg=""}render(){return A`<span class="cb-icon color-${this.color}" part="base"
236
+ >${Le(this.svg)}</span
237
+ >`}};ho.styles=bi,ss([g({type:String})],ho.prototype,"color",2),ss([g({type:String})],ho.prototype,"svg",2),ho=ss([tt("cb-icon")],ho);let Pc=e=>crypto.getRandomValues(new Uint8Array(e)),Mc=(e,t,o)=>{let r=(2<<Math.log(e.length-1)/Math.LN2)-1,s=-~(1.6*r*t/e.length);return(n=t)=>{let i="";for(;;){let a=o(s),l=s;for(;l--;)if(i+=e[a[l]&r]||"",i.length===n)return i}}};const Ic=((e,t=21)=>Mc(e,t,Pc))("1234567890abcdefghijklmnopqrstuvwxyz",10);function ns(e=10){return Ic(e)}function Fc(e){return new Promise((t,o)=>{try{navigator.clipboard.writeText(e).then(()=>{t(e)})}catch(r){o(r)}})}function Bc(e=!0){return new Promise(t=>{const o=document.createElement("input");o.type="file",e&&(o.multiple=!0),o.style.display="none",o.addEventListener("change",()=>{const r=Array.prototype.slice.call(o.files);t(r)}),o.click()})}const st=No.noConflict();st.setLevel("info");class Oc{constructor(t={}){this.id=0,this.url=(t==null?void 0:t.url)||null,this.orgId=(t==null?void 0:t.orgId)||null,this.botId=(t==null?void 0:t.botId)||null,this.convId=(t==null?void 0:t.convId)||null,this._options=t||{},this._ws=null,this.started=!1,this.connected=!1,this.onMessage=(t==null?void 0:t.onMessage)||null,this.queue=[],this.pause=o=>new Promise(r=>setTimeout(r,o)),st.info(`WSC: Created, url: ${this.url}`)}connect(t={}){if(this.url=(t==null?void 0:t.url)||this.url,this.connected=!1,!this.url)return st.error("WSC: URL must be provided to connect"),null;const o=this.url;st.info(`WSC: Connecting to ${o} ...`),this._ws=new WebSocket(o);let r=setTimeout(()=>{st.error("WSC: connected message not received in time - terminating"),this._ws.close(),this._ws=null,this.connected=!1},15e3);this._ws.onopen=()=>{st.info(`WSC: Connection to ${o} opened`)},this._ws.onmessage=s=>{let n=(s==null?void 0:s.data)||null;if(!n)return;let i=null;try{i=JSON.parse(n)}catch{st.error(`Failed to parse message: ${n}`);return}(i==null?void 0:i.type)==="connected"&&(st.info(`WS[${this.id}] Connected`),clearTimeout(r),this.connected=!0,this.sendQueuedMessages()),this.handleWscMessage(i)},this._ws.onerror=s=>{st.error("WSC: Socket error"),clearTimeout(r),this.connected=!1,this._ws=null},this._ws.onclose=s=>{st.info(`WSC: Closed - code:${s.code}, reason:"${s.reason}"`),this.connected=!1,this._ws=null,this.reconnect()}}reconnect(){this.started&&setTimeout(()=>{this.connect()},1e3)}disconnect(){if(!this._ws){st.info("WSC: already disconnected");return}st.info("WSC: disconnect"),this._ws.close()}async start(){this.started=!0,this.connect()}async stop(){this.started=!1,this.disconnect()}async startOld(){let t=1,o=!0;for(;o;){if(st.info(`WSC: start: connecting, attempt ${t}`),await this.connect(),this.connected)return st.info("WSC: connected"),!0;t++,o=t<=4,o&&await this.pause(1e3)}return st.error(`WSC: start: failed to connect after ${t} attempts, exiting`),!1}handleWscMessage(t){this.onMessage&&typeof this.onMessage=="function"&&this.onMessage(t)}sendMessage(t){if(!this.connected){this.queue.push(JSON.stringify(t));return}this._ws.send(JSON.stringify(t))}sendQueuedMessages(){if(Array.isArray(this.queue)&&this.queue.length>0)for(let t=0;t<this.queue.length;t++)st.info("Sending queued message",this.queue[t]),this._ws.send(this.queue[t]);this.queue=[]}}var Nc=Object.defineProperty,Vc=Object.getOwnPropertyDescriptor,kt=(e,t,o,r)=>{for(var s=r>1?void 0:r?Vc(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&Nc(t,o,s),s};const ut=No.noConflict();ut.setLevel("info");const ye="cb_";class bt extends zo{constructor(){super(...arguments),this.actionIdCounter=0,this.wsClient=null,this.replyMessage=null}setSetting(t){ut.info("appState: Startup: setSetting",t),this.setting=t,this.initBot().catch(o=>{ut.info(`Exception during bot initialization: ${o.message}`)})}clearConversation(){this.wsClient&&(this.wsClient.stop().then(()=>{}),this.wsClient=null),this.conversationId=ns(),this.connectWs="false",this.messages=[],this.actions=[],this.addMessage({author:"assistant",type:"text",data:{text:this.setting.welcomeMessage}})}setLanguage(t){this.language=t}setTheme(t){this.theme=t}async initBot(){if(!this.botSettingsInitialized){const o=`${this.setting.url.startsWith("localhost")?"http":"https"}://${this.setting.url}/api/bot/settings/${this.setting.orgId}/${this.setting.botId}`;ut.info(`Getting bot settings at ${o} ...`);let r=null,s=null;try{r=await fetch(o,{headers:{"Access-Control-Allow-Origin":"null","X-Enegel-Signature":this.setting.botId}}),!r.ok||r.status!==200?ut.error(`Failed to get bot ${this.setting.botId} settings: ${r.status} ${r.statusText}`):s=await r.json()}catch(n){ut.error(`Failed to get bot ${this.setting.botId} settings: ${n.message}`),s=null}if(this.botSettingsInitialized=!0,!s){ut.error("No bot settings available - bot disabled"),this.disabled=!0;return}this.setting.welcomeMessage=(s==null?void 0:s.welcomeMessage)||"How can I help ?",this.setting.engageMessage=(s==null?void 0:s.engageMessage)||"How can I help ?",this.setting.engageTimeout=(s==null?void 0:s.engageTimeout)||5,setTimeout(()=>{this.open||(ut.info("Engaging User !"),this.engage=!0)},this.setting.engageTimeout*1e3)}Array.isArray(this.messages)&&this.messages.length<=0&&this.addMessage({author:"assistant",type:"text",data:{text:this.setting.welcomeMessage}}),this.connectWs==="true"&&(ut.info("appState: connectWs is true"),this.getWsClient().catch(t=>{ut.error(`Exception during ws client startup: ${t.message}`)}))}async getWsClient(){if(this.wsClient)return this.wsClient;const o=`${this.setting.url.startsWith("localhost")?"ws":"wss"}://${this.setting.url}/api/bot/connect/${this.setting.orgId}/${this.setting.botId}/${this.conversationId}`;return ut.info(`Initiating ws connection to ${o} ...`),this.wsClient=new Oc({url:o,orgId:this.setting.orgId,botId:this.setting.botId,convId:this.conversationId}),await this.wsClient.start(),this.wsClient.onMessage=r=>{this.handleWscMessage(r)},this.wsClient}handleWscMessage(t){switch(t==null?void 0:t.type){case"message":{if(this.replyMessage)this.replyMessage.data.text=t.text,this.updateMessage(this.replyMessage,""),this.replyMessage=null;else{const o={type:"text",author:"assistant",data:{text:t.text}};"userName"in t&&(o.data.userName=t.userName,this.connectWs="true"),"userAvatar"in t&&(o.data.userAvatar=t.userAvatar,this.connectWs="true");const r=this.formatMessage(o);this.messages=this.messages.concat([r])}break}case"message-chunk":{this.replyMessage&&(this.replyMessage=this.updateMessage(this.replyMessage,t.text));break}case"typing":{this.replyMessage={author:"assistant",type:"text",isThinking:!0,data:{text:""}},this.addMessage(this.replyMessage);break}case"actions":{this.addActions((t==null?void 0:t.actions)||[]);break}}}addActions(t){if(Array.isArray(t)&&t.length>0){const o=t.map(r=>Object.assign(r,{internalId:this.actionIdCounter++}));this.actions=this.actions.concat(o)}}removeAction(t){const o=this.actions.findIndex(r=>r.internalId===t);if(o!==-1){this.actions.splice(o,1);const r=[];this.actions=r.concat(this.actions)}}async sendMessage(t){t=this.formatMessage(t),ut.info("Send Message:",t),this.messages=this.messages.concat([t]);const o=await this.getWsClient();if(!o){ut.error("Error - failed to obtain ws client"),this.replyMessage=null;return}o.sendMessage({type:"message",id:t.id,text:t.data.text})}formatMessage(t){var o;return t.id||(t.id=ns()),t.timestamp=Date.now(),t.author==="assistant"&&(t.replyId=(o=this.messages[this.messages.length-1])==null?void 0:o.id),t}addMessage(t){t=this.formatMessage(t),this.messages=this.messages.concat([t])}addSystemMessage(t){this.addMessage({type:"text",author:"system",data:{text:t}})}updateMessage(t,o){const r=this.formatMessage(t);return r.isThinking=!1,o&&(r.data.text+=o),this.messages=this.messages.map(s=>s.id===r.id?r:s),r}removeMessage(t){this.messages=this.messages.filter(o=>o.id!==t)}clearMessages(){this.messages=[]}}kt([le({prefix:ye}),_t({value:"en"})],bt.prototype,"language",2),kt([le({prefix:ye}),_t({value:"light"})],bt.prototype,"theme",2),kt([le({prefix:ye}),_t({type:Boolean,value:!1})],bt.prototype,"open",2),kt([le({prefix:ye}),_t({value:"false"})],bt.prototype,"connectWs",2),kt([le({prefix:ye}),_t({value:ns()})],bt.prototype,"conversationId",2),kt([le({prefix:ye}),_t({type:Array,value:[]})],bt.prototype,"messages",2),kt([_t({type:Array,value:[]})],bt.prototype,"actions",2),kt([_t({type:Boolean,value:!1})],bt.prototype,"botSettingsInitialized",2),kt([_t({type:Boolean,value:!1})],bt.prototype,"disabled",2),kt([_t({type:Boolean,value:!1})],bt.prototype,"engage",2),kt([le({prefix:ye}),_t({type:Object,value:{orgId:null,botId:null,url:null,welcomeMessage:null}})],bt.prototype,"setting",2);const R=new bt,Hc=z`
207
238
  ${Et}
208
239
  :host {
209
240
  position: relative;
@@ -244,25 +275,11 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
244
275
  font-size: 1.5rem;
245
276
  color: white;
246
277
  }
247
- `,$g="",Eg="";/**
248
- * @license
249
- * Copyright 2019 Google LLC
250
- * SPDX-License-Identifier: BSD-3-Clause
251
- */const Mo=globalThis,jr=Mo.ShadowRoot&&(Mo.ShadyCSS===void 0||Mo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Gr=Symbol(),Rn=new WeakMap;let Pn=class{constructor(t,o,r){if(this._$cssResult$=!0,r!==Gr)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=o}get styleSheet(){let t=this.o;const o=this.t;if(jr&&t===void 0){const r=o!==void 0&&o.length===1;r&&(t=Rn.get(o)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&Rn.set(o,t))}return t}toString(){return this.cssText}};const Ul=e=>new Pn(typeof e=="string"?e:e+"",void 0,Gr),Z=(e,...t)=>{const o=e.length===1?e[0]:t.reduce((r,s,n)=>r+(i=>{if(i._$cssResult$===!0)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+e[n+1],e[0]);return new Pn(o,e,Gr)},Hl=(e,t)=>{if(jr)e.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(const o of t){const r=document.createElement("style"),s=Mo.litNonce;s!==void 0&&r.setAttribute("nonce",s),r.textContent=o.cssText,e.appendChild(r)}},Mn=jr?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let o="";for(const r of t.cssRules)o+=r.cssText;return Ul(o)})(e):e;/**
252
- * @license
253
- * Copyright 2017 Google LLC
254
- * SPDX-License-Identifier: BSD-3-Clause
255
- */const{is:jl,defineProperty:Gl,getOwnPropertyDescriptor:Zl,getOwnPropertyNames:Wl,getOwnPropertySymbols:Kl,getPrototypeOf:Yl}=Object,Kt=globalThis,Fn=Kt.trustedTypes,Jl=Fn?Fn.emptyScript:"",Zr=Kt.reactiveElementPolyfillSupport,Xe=(e,t)=>e,$e={toAttribute(e,t){switch(t){case Boolean:e=e?Jl:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let o=e;switch(t){case Boolean:o=e!==null;break;case Number:o=e===null?null:Number(e);break;case Object:case Array:try{o=JSON.parse(e)}catch{o=null}}return o}},Wr=(e,t)=>!jl(e,t),In={attribute:!0,type:String,converter:$e,reflect:!1,hasChanged:Wr};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Kt.litPropertyMetadata??(Kt.litPropertyMetadata=new WeakMap);class Ee extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,o=In){if(o.state&&(o.attribute=!1),this._$Ei(),this.elementProperties.set(t,o),!o.noAccessor){const r=Symbol(),s=this.getPropertyDescriptor(t,r,o);s!==void 0&&Gl(this.prototype,t,s)}}static getPropertyDescriptor(t,o,r){const{get:s,set:n}=Zl(this.prototype,t)??{get(){return this[o]},set(i){this[o]=i}};return{get(){return s==null?void 0:s.call(this)},set(i){const a=s==null?void 0:s.call(this);n.call(this,i),this.requestUpdate(t,a,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??In}static _$Ei(){if(this.hasOwnProperty(Xe("elementProperties")))return;const t=Yl(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Xe("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Xe("properties"))){const o=this.properties,r=[...Wl(o),...Kl(o)];for(const s of r)this.createProperty(s,o[s])}const t=this[Symbol.metadata];if(t!==null){const o=litPropertyMetadata.get(t);if(o!==void 0)for(const[r,s]of o)this.elementProperties.set(r,s)}this._$Eh=new Map;for(const[o,r]of this.elementProperties){const s=this._$Eu(o,r);s!==void 0&&this._$Eh.set(s,o)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const o=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const s of r)o.unshift(Mn(s))}else t!==void 0&&o.push(Mn(t));return o}static _$Eu(t,o){const r=o.attribute;return r===!1?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$Eg=new Promise(o=>this.enableUpdating=o),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(o=>o(this))}addController(t){var o;(this._$ES??(this._$ES=[])).push(t),this.renderRoot!==void 0&&this.isConnected&&((o=t.hostConnected)==null||o.call(t))}removeController(t){var o;(o=this._$ES)==null||o.splice(this._$ES.indexOf(t)>>>0,1)}_$E_(){const t=new Map,o=this.constructor.elementProperties;for(const r of o.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Hl(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)==null||t.forEach(o=>{var r;return(r=o.hostConnected)==null?void 0:r.call(o)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)==null||t.forEach(o=>{var r;return(r=o.hostDisconnected)==null?void 0:r.call(o)})}attributeChangedCallback(t,o,r){this._$AK(t,r)}_$EO(t,o){var n;const r=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,r);if(s!==void 0&&r.reflect===!0){const i=(((n=r.converter)==null?void 0:n.toAttribute)!==void 0?r.converter:$e).toAttribute(o,r.type);this._$Em=t,i==null?this.removeAttribute(s):this.setAttribute(s,i),this._$Em=null}}_$AK(t,o){var n;const r=this.constructor,s=r._$Eh.get(t);if(s!==void 0&&this._$Em!==s){const i=r.getPropertyOptions(s),a=typeof i.converter=="function"?{fromAttribute:i.converter}:((n=i.converter)==null?void 0:n.fromAttribute)!==void 0?i.converter:$e;this._$Em=s,this[s]=a.fromAttribute(o,i.type),this._$Em=null}}requestUpdate(t,o,r,s=!1,n){if(t!==void 0){if(r??(r=this.constructor.getPropertyOptions(t)),!(r.hasChanged??Wr)(s?n:this[t],o))return;this.C(t,o,r)}this.isUpdatePending===!1&&(this._$Eg=this._$EP())}C(t,o,r){this._$AL.has(t)||this._$AL.set(t,o),r.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(o){Promise.reject(o)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var r;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this._$Ep){for(const[n,i]of this._$Ep)this[n]=i;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[n,i]of s)i.wrapped!==!0||this._$AL.has(n)||this[n]===void 0||this.C(n,this[n],i)}let t=!1;const o=this._$AL;try{t=this.shouldUpdate(o),t?(this.willUpdate(o),(r=this._$ES)==null||r.forEach(s=>{var n;return(n=s.hostUpdate)==null?void 0:n.call(s)}),this.update(o)):this._$ET()}catch(s){throw t=!1,this._$ET(),s}t&&this._$AE(o)}willUpdate(t){}_$AE(t){var o;(o=this._$ES)==null||o.forEach(r=>{var s;return(s=r.hostUpdated)==null?void 0:s.call(r)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(o=>this._$EO(o,this[o]))),this._$ET()}updated(t){}firstUpdated(t){}}Ee.elementStyles=[],Ee.shadowRootOptions={mode:"open"},Ee[Xe("elementProperties")]=new Map,Ee[Xe("finalized")]=new Map,Zr==null||Zr({ReactiveElement:Ee}),(Kt.reactiveElementVersions??(Kt.reactiveElementVersions=[])).push("2.0.0");/**
256
- * @license
257
- * Copyright 2017 Google LLC
258
- * SPDX-License-Identifier: BSD-3-Clause
259
- */const to=globalThis,Fo=to.trustedTypes,Bn=Fo?Fo.createPolicy("lit-html",{createHTML:e=>e}):void 0,On="$lit$",Yt=`lit$${(Math.random()+"").slice(9)}$`,Nn="?"+Yt,Ql=`<${Nn}>`,de=document,eo=()=>de.createComment(""),oo=e=>e===null||typeof e!="object"&&typeof e!="function",Vn=Array.isArray,Xl=e=>Vn(e)||typeof(e==null?void 0:e[Symbol.iterator])=="function",Kr=`[
260
- \f\r]`,ro=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Un=/-->/g,Hn=/>/g,he=RegExp(`>|${Kr}(?:([^\\s"'>=/]+)(${Kr}*=${Kr}*(?:[^
261
- \f\r"'\`<>=]|("|')|))|$)`,"g"),jn=/'/g,Gn=/"/g,Zn=/^(?:script|style|textarea|title)$/i,tc=e=>(t,...o)=>({_$litType$:e,strings:t,values:o}),P=tc(1),xt=Symbol.for("lit-noChange"),K=Symbol.for("lit-nothing"),Wn=new WeakMap,pe=de.createTreeWalker(de,129);function Kn(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Bn!==void 0?Bn.createHTML(t):t}const ec=(e,t)=>{const o=e.length-1,r=[];let s,n=t===2?"<svg>":"",i=ro;for(let a=0;a<o;a++){const l=e[a];let c,u,d=-1,f=0;for(;f<l.length&&(i.lastIndex=f,u=i.exec(l),u!==null);)f=i.lastIndex,i===ro?u[1]==="!--"?i=Un:u[1]!==void 0?i=Hn:u[2]!==void 0?(Zn.test(u[2])&&(s=RegExp("</"+u[2],"g")),i=he):u[3]!==void 0&&(i=he):i===he?u[0]===">"?(i=s??ro,d=-1):u[1]===void 0?d=-2:(d=i.lastIndex-u[2].length,c=u[1],i=u[3]===void 0?he:u[3]==='"'?Gn:jn):i===Gn||i===jn?i=he:i===Un||i===Hn?i=ro:(i=he,s=void 0);const h=i===he&&e[a+1].startsWith("/>")?" ":"";n+=i===ro?l+Ql:d>=0?(r.push(c),l.slice(0,d)+On+l.slice(d)+Yt+h):l+Yt+(d===-2?a:h)}return[Kn(e,n+(e[o]||"<?>")+(t===2?"</svg>":"")),r]};class so{constructor({strings:t,_$litType$:o},r){let s;this.parts=[];let n=0,i=0;const a=t.length-1,l=this.parts,[c,u]=ec(t,o);if(this.el=so.createElement(c,r),pe.currentNode=this.el.content,o===2){const d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(s=pe.nextNode())!==null&&l.length<a;){if(s.nodeType===1){if(s.hasAttributes())for(const d of s.getAttributeNames())if(d.endsWith(On)){const f=u[i++],h=s.getAttribute(d).split(Yt),b=/([.?@])?(.*)/.exec(f);l.push({type:1,index:n,name:b[2],strings:h,ctor:b[1]==="."?rc:b[1]==="?"?sc:b[1]==="@"?nc:Io}),s.removeAttribute(d)}else d.startsWith(Yt)&&(l.push({type:6,index:n}),s.removeAttribute(d));if(Zn.test(s.tagName)){const d=s.textContent.split(Yt),f=d.length-1;if(f>0){s.textContent=Fo?Fo.emptyScript:"";for(let h=0;h<f;h++)s.append(d[h],eo()),pe.nextNode(),l.push({type:2,index:++n});s.append(d[f],eo())}}}else if(s.nodeType===8)if(s.data===Nn)l.push({type:2,index:n});else{let d=-1;for(;(d=s.data.indexOf(Yt,d+1))!==-1;)l.push({type:7,index:n}),d+=Yt.length-1}n++}}static createElement(t,o){const r=de.createElement("template");return r.innerHTML=t,r}}function Se(e,t,o=e,r){var i,a;if(t===xt)return t;let s=r!==void 0?(i=o._$Co)==null?void 0:i[r]:o._$Cl;const n=oo(t)?void 0:t._$litDirective$;return(s==null?void 0:s.constructor)!==n&&((a=s==null?void 0:s._$AO)==null||a.call(s,!1),n===void 0?s=void 0:(s=new n(e),s._$AT(e,o,r)),r!==void 0?(o._$Co??(o._$Co=[]))[r]=s:o._$Cl=s),s!==void 0&&(t=Se(e,s._$AS(e,t.values),s,r)),t}class oc{constructor(t,o){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=o}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:o},parts:r}=this._$AD,s=((t==null?void 0:t.creationScope)??de).importNode(o,!0);pe.currentNode=s;let n=pe.nextNode(),i=0,a=0,l=r[0];for(;l!==void 0;){if(i===l.index){let c;l.type===2?c=new no(n,n.nextSibling,this,t):l.type===1?c=new l.ctor(n,l.name,l.strings,this,t):l.type===6&&(c=new ic(n,this,t)),this._$AV.push(c),l=r[++a]}i!==(l==null?void 0:l.index)&&(n=pe.nextNode(),i++)}return pe.currentNode=de,s}p(t){let o=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,o),o+=r.strings.length-2):r._$AI(t[o])),o++}}class no{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,o,r,s){this.type=2,this._$AH=K,this._$AN=void 0,this._$AA=t,this._$AB=o,this._$AM=r,this.options=s,this._$Cv=(s==null?void 0:s.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const o=this._$AM;return o!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=o.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,o=this){t=Se(this,t,o),oo(t)?t===K||t==null||t===""?(this._$AH!==K&&this._$AR(),this._$AH=K):t!==this._$AH&&t!==xt&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):Xl(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==K&&oo(this._$AH)?this._$AA.nextSibling.data=t:this.$(de.createTextNode(t)),this._$AH=t}g(t){var n;const{values:o,_$litType$:r}=t,s=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=so.createElement(Kn(r.h,r.h[0]),this.options)),r);if(((n=this._$AH)==null?void 0:n._$AD)===s)this._$AH.p(o);else{const i=new oc(s,this),a=i.u(this.options);i.p(o),this.$(a),this._$AH=i}}_$AC(t){let o=Wn.get(t.strings);return o===void 0&&Wn.set(t.strings,o=new so(t)),o}T(t){Vn(this._$AH)||(this._$AH=[],this._$AR());const o=this._$AH;let r,s=0;for(const n of t)s===o.length?o.push(r=new no(this.k(eo()),this.k(eo()),this,this.options)):r=o[s],r._$AI(n),s++;s<o.length&&(this._$AR(r&&r._$AB.nextSibling,s),o.length=s)}_$AR(t=this._$AA.nextSibling,o){var r;for((r=this._$AP)==null?void 0:r.call(this,!1,!0,o);t&&t!==this._$AB;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){var o;this._$AM===void 0&&(this._$Cv=t,(o=this._$AP)==null||o.call(this,t))}}class Io{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,o,r,s,n){this.type=1,this._$AH=K,this._$AN=void 0,this.element=t,this.name=o,this._$AM=s,this.options=n,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=K}_$AI(t,o=this,r,s){const n=this.strings;let i=!1;if(n===void 0)t=Se(this,t,o,0),i=!oo(t)||t!==this._$AH&&t!==xt,i&&(this._$AH=t);else{const a=t;let l,c;for(t=n[0],l=0;l<n.length-1;l++)c=Se(this,a[r+l],o,l),c===xt&&(c=this._$AH[l]),i||(i=!oo(c)||c!==this._$AH[l]),c===K?t=K:t!==K&&(t+=(c??"")+n[l+1]),this._$AH[l]=c}i&&!s&&this.j(t)}j(t){t===K?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class rc extends Io{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===K?void 0:t}}class sc extends Io{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==K)}}class nc extends Io{constructor(t,o,r,s,n){super(t,o,r,s,n),this.type=5}_$AI(t,o=this){if((t=Se(this,t,o,0)??K)===xt)return;const r=this._$AH,s=t===K&&r!==K||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,n=t!==K&&(r===K||s);s&&this.element.removeEventListener(this.name,this,r),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var o;typeof this._$AH=="function"?this._$AH.call(((o=this.options)==null?void 0:o.host)??this.element,t):this._$AH.handleEvent(t)}}class ic{constructor(t,o,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=o,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){Se(this,t)}}const Yr=to.litHtmlPolyfillSupport;Yr==null||Yr(so,no),(to.litHtmlVersions??(to.litHtmlVersions=[])).push("3.0.0");const ac=(e,t,o)=>{const r=(o==null?void 0:o.renderBefore)??t;let s=r._$litPart$;if(s===void 0){const n=(o==null?void 0:o.renderBefore)??null;r._$litPart$=s=new no(t.insertBefore(eo(),n),n,void 0,o??{})}return s._$AI(e),s};/**
262
- * @license
263
- * Copyright 2017 Google LLC
264
- * SPDX-License-Identifier: BSD-3-Clause
265
- */let io=class extends Ee{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var o;const t=super.createRenderRoot();return(o=this.renderOptions).renderBefore??(o.renderBefore=t.firstChild),t}update(t){const o=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=ac(o,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return xt}};io._$litElement$=!0,io.finalized=!0,(dl=globalThis.litElementHydrateSupport)==null||dl.call(globalThis,{LitElement:io});const Jr=globalThis.litElementPolyfillSupport;Jr==null||Jr({LitElement:io}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.0.0");var tt=Z`
278
+
279
+ .cb-setting-button cb-icon {
280
+ display: inline;
281
+ }
282
+ `,rb="",sb="";var Q=z`
266
283
  :host {
267
284
  box-sizing: border-box;
268
285
  }
@@ -276,8 +293,8 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
276
293
  [hidden] {
277
294
  display: none !important;
278
295
  }
279
- `,lc=Z`
280
- ${tt}
296
+ `,Uc=z`
297
+ ${Q}
281
298
 
282
299
  :host {
283
300
  --track-width: 2px;
@@ -334,29 +351,13 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
334
351
  stroke-dasharray: 0.01em, 2.75em;
335
352
  }
336
353
  }
337
- `;const Qr=new Set,cc=new MutationObserver(Qn),qe=new Map;let Yn=document.documentElement.dir||"ltr",Jn=document.documentElement.lang||navigator.language,fe;cc.observe(document.documentElement,{attributes:!0,attributeFilter:["dir","lang"]});function uc(...e){e.map(t=>{const o=t.$code.toLowerCase();qe.has(o)?qe.set(o,Object.assign(Object.assign({},qe.get(o)),t)):qe.set(o,t),fe||(fe=t)}),Qn()}function Qn(){Yn=document.documentElement.dir||"ltr",Jn=document.documentElement.lang||navigator.language,[...Qr.keys()].map(e=>{typeof e.requestUpdate=="function"&&e.requestUpdate()})}let dc=class{constructor(t){this.host=t,this.host.addController(this)}hostConnected(){Qr.add(this.host)}hostDisconnected(){Qr.delete(this.host)}dir(){return`${this.host.dir||Yn}`.toLowerCase()}lang(){return`${this.host.lang||Jn}`.toLowerCase()}getTranslationData(t){var o,r;const s=new Intl.Locale(t.replace(/_/g,"-")),n=s==null?void 0:s.language.toLowerCase(),i=(r=(o=s==null?void 0:s.region)===null||o===void 0?void 0:o.toLowerCase())!==null&&r!==void 0?r:"",a=qe.get(`${n}-${i}`),l=qe.get(n);return{locale:s,language:n,region:i,primary:a,secondary:l}}exists(t,o){var r;const{primary:s,secondary:n}=this.getTranslationData((r=o.lang)!==null&&r!==void 0?r:this.lang());return o=Object.assign({includeFallback:!1},o),!!(s&&s[t]||n&&n[t]||o.includeFallback&&fe&&fe[t])}term(t,...o){const{primary:r,secondary:s}=this.getTranslationData(this.lang());let n;if(r&&r[t])n=r[t];else if(s&&s[t])n=s[t];else if(fe&&fe[t])n=fe[t];else return console.error(`No translation found for: ${String(t)}`),String(t);return typeof n=="function"?n(...o):n}date(t,o){return t=new Date(t),new Intl.DateTimeFormat(this.lang(),o).format(t)}number(t,o){return t=Number(t),isNaN(t)?"":new Intl.NumberFormat(this.lang(),o).format(t)}relativeTime(t,o,r){return new Intl.RelativeTimeFormat(this.lang(),r).format(t,o)}};var Jt=class extends dc{},Xn=Object.defineProperty,hc=Object.defineProperties,pc=Object.getOwnPropertyDescriptor,fc=Object.getOwnPropertyDescriptors,ti=Object.getOwnPropertySymbols,gc=Object.prototype.hasOwnProperty,bc=Object.prototype.propertyIsEnumerable,Xr=(e,t)=>{if(t=Symbol[e])return t;throw Error("Symbol."+e+" is not defined")},ei=(e,t,o)=>t in e?Xn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Qt=(e,t)=>{for(var o in t||(t={}))gc.call(t,o)&&ei(e,o,t[o]);if(ti)for(var o of ti(t))bc.call(t,o)&&ei(e,o,t[o]);return e},Bo=(e,t)=>hc(e,fc(t)),p=(e,t,o,r)=>{for(var s=r>1?void 0:r?pc(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&Xn(t,o,s),s},mc=function(e,t){this[0]=e,this[1]=t},vc=e=>{var t=e[Xr("asyncIterator")],o=!1,r,s={};return t==null?(t=e[Xr("iterator")](),r=n=>s[n]=i=>t[n](i)):(t=t.call(e),r=n=>s[n]=i=>{if(o){if(o=!1,n==="throw")throw i;return i}return o=!0,{done:!1,value:new mc(new Promise(a=>{var l=t[n](i);if(!(l instanceof Object))throw TypeError("Object expected");a(l)}),1)}}),s[Xr("iterator")]=()=>s,r("next"),"throw"in t?r("throw"):s.throw=n=>{throw n},"return"in t&&r("return"),s};/**
338
- * @license
339
- * Copyright 2017 Google LLC
340
- * SPDX-License-Identifier: BSD-3-Clause
341
- */const yc={attribute:!0,type:String,converter:$e,reflect:!1,hasChanged:Wr},wc=(e=yc,t,o)=>{const{kind:r,metadata:s}=o;let n=globalThis.litPropertyMetadata.get(s);if(n===void 0&&globalThis.litPropertyMetadata.set(s,n=new Map),n.set(o.name,e),r==="accessor"){const{name:i}=o;return{set(a){const l=t.get.call(this);t.set.call(this,a),this.requestUpdate(i,l,e)},init(a){return a!==void 0&&this.C(i,void 0,e),a}}}if(r==="setter"){const{name:i}=o;return function(a){const l=this[i];t.call(this,a),this.requestUpdate(i,l,e)}}throw Error("Unsupported decorator location: "+r)};function g(e){return(t,o)=>typeof o=="object"?wc(e,t,o):((r,s,n)=>{const i=s.hasOwnProperty(n);return s.constructor.createProperty(n,i?{...r,wrapped:!0}:r),i?Object.getOwnPropertyDescriptor(s,n):void 0})(e,t,o)}/**
342
- * @license
343
- * Copyright 2017 Google LLC
344
- * SPDX-License-Identifier: BSD-3-Clause
345
- */function it(e){return g({...e,state:!0,attribute:!1})}/**
346
- * @license
347
- * Copyright 2017 Google LLC
348
- * SPDX-License-Identifier: BSD-3-Clause
349
- */const oi=(e,t,o)=>(o.configurable=!0,o.enumerable=!0,Reflect.decorate&&typeof t!="object"&&Object.defineProperty(e,t,o),o);/**
350
- * @license
351
- * Copyright 2017 Google LLC
352
- * SPDX-License-Identifier: BSD-3-Clause
353
- */function j(e,t){return(o,r,s)=>{const n=i=>{var a;return((a=i.renderRoot)==null?void 0:a.querySelector(e))??null};if(t){const{get:i,set:a}=typeof r=="object"?o:s??(()=>{const l=Symbol();return{get(){return this[l]},set(c){this[l]=c}}})();return oi(o,r,{get(){if(t){let l=i.call(this);return l===void 0&&(l=n(this),a.call(this,l)),l}return n(this)}})}return oi(o,r,{get(){return n(this)}})}}var G=class extends io{constructor(){super(),Object.entries(this.constructor.dependencies).forEach(([e,t])=>{this.constructor.define(e,t)})}emit(e,t){const o=new CustomEvent(e,Qt({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(o),o}static define(e,t=this,o={}){const r=customElements.get(e);if(!r){customElements.define(e,class extends t{},o);return}let s=" (unknown version)",n=s;"version"in t&&t.version&&(s=" v"+t.version),"version"in r&&r.version&&(n=" v"+r.version),!(s&&n&&s===n)&&console.warn(`Attempted to register <${e}>${s}, but <${e}>${n} has already been registered.`)}};G.version="2.11.2",G.dependencies={},p([g()],G.prototype,"dir",2),p([g()],G.prototype,"lang",2);var ts=class extends G{constructor(){super(...arguments),this.localize=new Jt(this)}render(){return P`
354
+ `;const is=new Set,jc=new MutationObserver(yi),ze=new Map;let mi=document.documentElement.dir||"ltr",vi=document.documentElement.lang||navigator.language,we;jc.observe(document.documentElement,{attributes:!0,attributeFilter:["dir","lang"]});function Gc(...e){e.map(t=>{const o=t.$code.toLowerCase();ze.has(o)?ze.set(o,Object.assign(Object.assign({},ze.get(o)),t)):ze.set(o,t),we||(we=t)}),yi()}function yi(){mi=document.documentElement.dir||"ltr",vi=document.documentElement.lang||navigator.language,[...is.keys()].map(e=>{typeof e.requestUpdate=="function"&&e.requestUpdate()})}let Zc=class{constructor(t){this.host=t,this.host.addController(this)}hostConnected(){is.add(this.host)}hostDisconnected(){is.delete(this.host)}dir(){return`${this.host.dir||mi}`.toLowerCase()}lang(){return`${this.host.lang||vi}`.toLowerCase()}getTranslationData(t){var o,r;const s=new Intl.Locale(t.replace(/_/g,"-")),n=s==null?void 0:s.language.toLowerCase(),i=(r=(o=s==null?void 0:s.region)===null||o===void 0?void 0:o.toLowerCase())!==null&&r!==void 0?r:"",a=ze.get(`${n}-${i}`),l=ze.get(n);return{locale:s,language:n,region:i,primary:a,secondary:l}}exists(t,o){var r;const{primary:s,secondary:n}=this.getTranslationData((r=o.lang)!==null&&r!==void 0?r:this.lang());return o=Object.assign({includeFallback:!1},o),!!(s&&s[t]||n&&n[t]||o.includeFallback&&we&&we[t])}term(t,...o){const{primary:r,secondary:s}=this.getTranslationData(this.lang());let n;if(r&&r[t])n=r[t];else if(s&&s[t])n=s[t];else if(we&&we[t])n=we[t];else return console.error(`No translation found for: ${String(t)}`),String(t);return typeof n=="function"?n(...o):n}date(t,o){return t=new Date(t),new Intl.DateTimeFormat(this.lang(),o).format(t)}number(t,o){return t=Number(t),isNaN(t)?"":new Intl.NumberFormat(this.lang(),o).format(t)}relativeTime(t,o,r){return new Intl.RelativeTimeFormat(this.lang(),r).format(t,o)}};var Jt=class extends Zc{},wi=Object.defineProperty,Wc=Object.defineProperties,Kc=Object.getOwnPropertyDescriptor,Yc=Object.getOwnPropertyDescriptors,_i=Object.getOwnPropertySymbols,Jc=Object.prototype.hasOwnProperty,Qc=Object.prototype.propertyIsEnumerable,as=(e,t)=>{if(t=Symbol[e])return t;throw Error("Symbol."+e+" is not defined")},xi=(e,t,o)=>t in e?wi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Qt=(e,t)=>{for(var o in t||(t={}))Jc.call(t,o)&&xi(e,o,t[o]);if(_i)for(var o of _i(t))Qc.call(t,o)&&xi(e,o,t[o]);return e},Go=(e,t)=>Wc(e,Yc(t)),f=(e,t,o,r)=>{for(var s=r>1?void 0:r?Kc(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&wi(t,o,s),s},Xc=function(e,t){this[0]=e,this[1]=t},tu=e=>{var t=e[as("asyncIterator")],o=!1,r,s={};return t==null?(t=e[as("iterator")](),r=n=>s[n]=i=>t[n](i)):(t=t.call(e),r=n=>s[n]=i=>{if(o){if(o=!1,n==="throw")throw i;return i}return o=!0,{done:!1,value:new Xc(new Promise(a=>{var l=t[n](i);if(!(l instanceof Object))throw TypeError("Object expected");a(l)}),1)}}),s[as("iterator")]=()=>s,r("next"),"throw"in t?r("throw"):s.throw=n=>{throw n},"return"in t&&r("return"),s},j=class extends Bt{constructor(){super(),Object.entries(this.constructor.dependencies).forEach(([e,t])=>{this.constructor.define(e,t)})}emit(e,t){const o=new CustomEvent(e,Qt({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(o),o}static define(e,t=this,o={}){const r=customElements.get(e);if(!r){customElements.define(e,class extends t{},o);return}let s=" (unknown version)",n=s;"version"in t&&t.version&&(s=" v"+t.version),"version"in r&&r.version&&(n=" v"+r.version),!(s&&n&&s===n)&&console.warn(`Attempted to register <${e}>${s}, but <${e}>${n} has already been registered.`)}};j.version="2.11.2",j.dependencies={},f([g()],j.prototype,"dir",2),f([g()],j.prototype,"lang",2);var ls=class extends j{constructor(){super(...arguments),this.localize=new Jt(this)}render(){return A`
354
355
  <svg part="base" class="spinner" role="progressbar" aria-label=${this.localize.term("loading")}>
355
356
  <circle class="spinner__track"></circle>
356
357
  <circle class="spinner__indicator"></circle>
357
358
  </svg>
358
- `}};ts.styles=lc;var ao=new WeakMap,lo=new WeakMap,es=new WeakSet,Oo=new WeakMap,co=class{constructor(e,t){this.handleFormData=o=>{const r=this.options.disabled(this.host),s=this.options.name(this.host),n=this.options.value(this.host),i=this.host.tagName.toLowerCase()==="sl-button";!r&&!i&&typeof s=="string"&&s.length>0&&typeof n<"u"&&(Array.isArray(n)?n.forEach(a=>{o.formData.append(s,a.toString())}):o.formData.append(s,n.toString()))},this.handleFormSubmit=o=>{var r;const s=this.options.disabled(this.host),n=this.options.reportValidity;this.form&&!this.form.noValidate&&((r=ao.get(this.form))==null||r.forEach(i=>{this.setUserInteracted(i,!0)})),this.form&&!this.form.noValidate&&!s&&!n(this.host)&&(o.preventDefault(),o.stopImmediatePropagation())},this.handleFormReset=()=>{this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1),Oo.set(this.host,[])},this.handleInteraction=o=>{const r=Oo.get(this.host);r.includes(o.type)||r.push(o.type),r.length===this.options.assumeInteractionOn.length&&this.setUserInteracted(this.host,!0)},this.reportFormValidity=()=>{if(this.form&&!this.form.noValidate){const o=this.form.querySelectorAll("*");for(const r of o)if(typeof r.reportValidity=="function"&&!r.reportValidity())return!1}return!0},(this.host=e).addController(this),this.options=Qt({form:o=>{if(o.hasAttribute("form")&&o.getAttribute("form")!==""){const r=o.getRootNode(),s=o.getAttribute("form");if(s)return r.getElementById(s)}return o.closest("form")},name:o=>o.name,value:o=>o.value,defaultValue:o=>o.defaultValue,disabled:o=>{var r;return(r=o.disabled)!=null?r:!1},reportValidity:o=>typeof o.reportValidity=="function"?o.reportValidity():!0,setValue:(o,r)=>o.value=r,assumeInteractionOn:["sl-input"]},t)}hostConnected(){const e=this.options.form(this.host);e&&this.attachForm(e),Oo.set(this.host,[]),this.options.assumeInteractionOn.forEach(t=>{this.host.addEventListener(t,this.handleInteraction)})}hostDisconnected(){this.detachForm(),Oo.delete(this.host),this.options.assumeInteractionOn.forEach(e=>{this.host.removeEventListener(e,this.handleInteraction)})}hostUpdated(){const e=this.options.form(this.host);e||this.detachForm(),e&&this.form!==e&&(this.detachForm(),this.attachForm(e)),this.host.hasUpdated&&this.setValidity(this.host.validity.valid)}attachForm(e){e?(this.form=e,ao.has(this.form)?ao.get(this.form).add(this.host):ao.set(this.form,new Set([this.host])),this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit),this.form.addEventListener("reset",this.handleFormReset),lo.has(this.form)||(lo.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity())):this.form=void 0}detachForm(){var e;this.form&&((e=ao.get(this.form))==null||e.delete(this.host),this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form.removeEventListener("reset",this.handleFormReset),lo.has(this.form)&&(this.form.reportValidity=lo.get(this.form),lo.delete(this.form))),this.form=void 0}setUserInteracted(e,t){t?es.add(e):es.delete(e),e.requestUpdate()}doAction(e,t){if(this.form){const o=document.createElement("button");o.type=e,o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.clipPath="inset(50%)",o.style.overflow="hidden",o.style.whiteSpace="nowrap",t&&(o.name=t.name,o.value=t.value,["formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach(r=>{t.hasAttribute(r)&&o.setAttribute(r,t.getAttribute(r))})),this.form.append(o),o.click(),o.remove()}}getForm(){var e;return(e=this.form)!=null?e:null}reset(e){this.doAction("reset",e)}submit(e){this.doAction("submit",e)}setValidity(e){const t=this.host,o=!!es.has(t),r=!!t.required;t.toggleAttribute("data-required",r),t.toggleAttribute("data-optional",!r),t.toggleAttribute("data-invalid",!e),t.toggleAttribute("data-valid",e),t.toggleAttribute("data-user-invalid",!e&&o),t.toggleAttribute("data-user-valid",e&&o)}updateValidity(){const e=this.host;this.setValidity(e.validity.valid)}emitInvalidEvent(e){const t=new CustomEvent("sl-invalid",{bubbles:!1,composed:!1,cancelable:!0,detail:{}});e||t.preventDefault(),this.host.dispatchEvent(t)||e==null||e.preventDefault()}},No=Object.freeze({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1}),_c=Object.freeze(Bo(Qt({},No),{valid:!1,valueMissing:!0})),xc=Object.freeze(Bo(Qt({},No),{valid:!1,customError:!0})),ri=Z`
359
- ${tt}
359
+ `}};ls.styles=Uc;var po=new WeakMap,fo=new WeakMap,cs=new WeakSet,Zo=new WeakMap,go=class{constructor(e,t){this.handleFormData=o=>{const r=this.options.disabled(this.host),s=this.options.name(this.host),n=this.options.value(this.host),i=this.host.tagName.toLowerCase()==="sl-button";!r&&!i&&typeof s=="string"&&s.length>0&&typeof n<"u"&&(Array.isArray(n)?n.forEach(a=>{o.formData.append(s,a.toString())}):o.formData.append(s,n.toString()))},this.handleFormSubmit=o=>{var r;const s=this.options.disabled(this.host),n=this.options.reportValidity;this.form&&!this.form.noValidate&&((r=po.get(this.form))==null||r.forEach(i=>{this.setUserInteracted(i,!0)})),this.form&&!this.form.noValidate&&!s&&!n(this.host)&&(o.preventDefault(),o.stopImmediatePropagation())},this.handleFormReset=()=>{this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1),Zo.set(this.host,[])},this.handleInteraction=o=>{const r=Zo.get(this.host);r.includes(o.type)||r.push(o.type),r.length===this.options.assumeInteractionOn.length&&this.setUserInteracted(this.host,!0)},this.reportFormValidity=()=>{if(this.form&&!this.form.noValidate){const o=this.form.querySelectorAll("*");for(const r of o)if(typeof r.reportValidity=="function"&&!r.reportValidity())return!1}return!0},(this.host=e).addController(this),this.options=Qt({form:o=>{if(o.hasAttribute("form")&&o.getAttribute("form")!==""){const r=o.getRootNode(),s=o.getAttribute("form");if(s)return r.getElementById(s)}return o.closest("form")},name:o=>o.name,value:o=>o.value,defaultValue:o=>o.defaultValue,disabled:o=>{var r;return(r=o.disabled)!=null?r:!1},reportValidity:o=>typeof o.reportValidity=="function"?o.reportValidity():!0,setValue:(o,r)=>o.value=r,assumeInteractionOn:["sl-input"]},t)}hostConnected(){const e=this.options.form(this.host);e&&this.attachForm(e),Zo.set(this.host,[]),this.options.assumeInteractionOn.forEach(t=>{this.host.addEventListener(t,this.handleInteraction)})}hostDisconnected(){this.detachForm(),Zo.delete(this.host),this.options.assumeInteractionOn.forEach(e=>{this.host.removeEventListener(e,this.handleInteraction)})}hostUpdated(){const e=this.options.form(this.host);e||this.detachForm(),e&&this.form!==e&&(this.detachForm(),this.attachForm(e)),this.host.hasUpdated&&this.setValidity(this.host.validity.valid)}attachForm(e){e?(this.form=e,po.has(this.form)?po.get(this.form).add(this.host):po.set(this.form,new Set([this.host])),this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit),this.form.addEventListener("reset",this.handleFormReset),fo.has(this.form)||(fo.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity())):this.form=void 0}detachForm(){var e;this.form&&((e=po.get(this.form))==null||e.delete(this.host),this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form.removeEventListener("reset",this.handleFormReset),fo.has(this.form)&&(this.form.reportValidity=fo.get(this.form),fo.delete(this.form))),this.form=void 0}setUserInteracted(e,t){t?cs.add(e):cs.delete(e),e.requestUpdate()}doAction(e,t){if(this.form){const o=document.createElement("button");o.type=e,o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.clipPath="inset(50%)",o.style.overflow="hidden",o.style.whiteSpace="nowrap",t&&(o.name=t.name,o.value=t.value,["formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach(r=>{t.hasAttribute(r)&&o.setAttribute(r,t.getAttribute(r))})),this.form.append(o),o.click(),o.remove()}}getForm(){var e;return(e=this.form)!=null?e:null}reset(e){this.doAction("reset",e)}submit(e){this.doAction("submit",e)}setValidity(e){const t=this.host,o=!!cs.has(t),r=!!t.required;t.toggleAttribute("data-required",r),t.toggleAttribute("data-optional",!r),t.toggleAttribute("data-invalid",!e),t.toggleAttribute("data-valid",e),t.toggleAttribute("data-user-invalid",!e&&o),t.toggleAttribute("data-user-valid",e&&o)}updateValidity(){const e=this.host;this.setValidity(e.validity.valid)}emitInvalidEvent(e){const t=new CustomEvent("sl-invalid",{bubbles:!1,composed:!1,cancelable:!0,detail:{}});e||t.preventDefault(),this.host.dispatchEvent(t)||e==null||e.preventDefault()}},Wo=Object.freeze({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1}),eu=Object.freeze(Go(Qt({},Wo),{valid:!1,valueMissing:!0})),ou=Object.freeze(Go(Qt({},Wo),{valid:!1,customError:!0})),ki=z`
360
+ ${Q}
360
361
 
361
362
  :host {
362
363
  display: inline-block;
@@ -950,8 +951,8 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
950
951
  :host(.sl-button-group__button[checked]) {
951
952
  z-index: 2;
952
953
  }
953
- `,ge=class{constructor(e,...t){this.slotNames=[],this.handleSlotChange=o=>{const r=o.target;(this.slotNames.includes("[default]")&&!r.name||r.name&&this.slotNames.includes(r.name))&&this.host.requestUpdate()},(this.host=e).addController(this),this.slotNames=t}hasDefaultSlot(){return[...this.host.childNodes].some(e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent.trim()!=="")return!0;if(e.nodeType===e.ELEMENT_NODE){const t=e;if(t.tagName.toLowerCase()==="sl-visually-hidden")return!1;if(!t.hasAttribute("slot"))return!0}return!1})}hasNamedSlot(e){return this.host.querySelector(`:scope > [slot="${e}"]`)!==null}test(e){return e==="[default]"?this.hasDefaultSlot():this.hasNamedSlot(e)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}},kc=Z`
954
- ${tt}
954
+ `,_e=class{constructor(e,...t){this.slotNames=[],this.handleSlotChange=o=>{const r=o.target;(this.slotNames.includes("[default]")&&!r.name||r.name&&this.slotNames.includes(r.name))&&this.host.requestUpdate()},(this.host=e).addController(this),this.slotNames=t}hasDefaultSlot(){return[...this.host.childNodes].some(e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent.trim()!=="")return!0;if(e.nodeType===e.ELEMENT_NODE){const t=e;if(t.tagName.toLowerCase()==="sl-visually-hidden")return!1;if(!t.hasAttribute("slot"))return!0}return!1})}hasNamedSlot(e){return this.host.querySelector(`:scope > [slot="${e}"]`)!==null}test(e){return e==="[default]"?this.hasDefaultSlot():this.hasNamedSlot(e)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}},ru=z`
955
+ ${Q}
955
956
 
956
957
  :host {
957
958
  display: inline-block;
@@ -965,7 +966,7 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
965
966
  height: 100%;
966
967
  width: 100%;
967
968
  }
968
- `,os="";function si(e){os=e}function Cc(e=""){if(!os){const t=[...document.getElementsByTagName("script")],o=t.find(r=>r.hasAttribute("data-shoelace"));if(o)si(o.getAttribute("data-shoelace"));else{const r=t.find(n=>/shoelace(\.min)?\.js($|\?)/.test(n.src)||/shoelace-autoloader(\.min)?\.js($|\?)/.test(n.src));let s="";r&&(s=r.getAttribute("src")),si(s.split("/").slice(0,-1).join("/"))}}return os.replace(/\/$/,"")+(e?`/${e.replace(/^\//,"")}`:"")}var Ac={name:"default",resolver:e=>Cc(`assets/icons/${e}.svg`)},$c=Ac,ni={caret:`
969
+ `,us="";function Ai(e){us=e}function su(e=""){if(!us){const t=[...document.getElementsByTagName("script")],o=t.find(r=>r.hasAttribute("data-shoelace"));if(o)Ai(o.getAttribute("data-shoelace"));else{const r=t.find(n=>/shoelace(\.min)?\.js($|\?)/.test(n.src)||/shoelace-autoloader(\.min)?\.js($|\?)/.test(n.src));let s="";r&&(s=r.getAttribute("src")),Ai(s.split("/").slice(0,-1).join("/"))}}return us.replace(/\/$/,"")+(e?`/${e.replace(/^\//,"")}`:"")}var nu={name:"default",resolver:e=>su(`assets/icons/${e}.svg`)},iu=nu,Ci={caret:`
969
970
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
970
971
  <polyline points="6 9 12 15 18 9"></polyline>
971
972
  </svg>
@@ -1057,33 +1058,33 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
1057
1058
  <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-circle-fill" viewBox="0 0 16 16">
1058
1059
  <path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293 5.354 4.646z"></path>
1059
1060
  </svg>
1060
- `},Ec={name:"system",resolver:e=>e in ni?`data:image/svg+xml,${encodeURIComponent(ni[e])}`:""},Sc=Ec,qc=[$c,Sc],rs=[];function Dc(e){rs.push(e)}function Tc(e){rs=rs.filter(t=>t!==e)}function ii(e){return qc.find(t=>t.name===e)}function U(e,t){const o=Qt({waitUntilFirstUpdate:!1},t);return(r,s)=>{const{update:n}=r,i=Array.isArray(e)?e:[e];r.update=function(a){i.forEach(l=>{const c=l;if(a.has(c)){const u=a.get(c),d=this[c];u!==d&&(!o.waitUntilFirstUpdate||this.hasUpdated)&&this[s](u,d)}}),n.call(this,a)}}}/**
1061
+ `},au={name:"system",resolver:e=>e in Ci?`data:image/svg+xml,${encodeURIComponent(Ci[e])}`:""},lu=au,cu=[iu,lu],ds=[];function uu(e){ds.push(e)}function du(e){ds=ds.filter(t=>t!==e)}function $i(e){return cu.find(t=>t.name===e)}function H(e,t){const o=Qt({waitUntilFirstUpdate:!1},t);return(r,s)=>{const{update:n}=r,i=Array.isArray(e)?e:[e];r.update=function(a){i.forEach(l=>{const c=l;if(a.has(c)){const u=a.get(c),d=this[c];u!==d&&(!o.waitUntilFirstUpdate||this.hasUpdated)&&this[s](u,d)}}),n.call(this,a)}}}/**
1061
1062
  * @license
1062
1063
  * Copyright 2020 Google LLC
1063
1064
  * SPDX-License-Identifier: BSD-3-Clause
1064
- */const Lc=(e,t)=>t===void 0?(e==null?void 0:e._$litType$)!==void 0:(e==null?void 0:e._$litType$)===t,zc=e=>e.strings===void 0,Rc={},Pc=(e,t=Rc)=>e._$AH=t;var uo=Symbol(),Vo=Symbol(),ss,ns=new Map,ht=class extends G{constructor(){super(...arguments),this.initialRender=!1,this.svg=null,this.label="",this.library="default"}async resolveIcon(e,t){var o;let r;if(t!=null&&t.spriteSheet)return P`<svg part="svg">
1065
+ */const{D:hu}=Jl,pu=(e,t)=>t===void 0?(e==null?void 0:e._$litType$)!==void 0:(e==null?void 0:e._$litType$)===t,fu=e=>e.strings===void 0,Ei=()=>document.createComment(""),bo=(e,t,o)=>{var n;const r=e._$AA.parentNode,s=t===void 0?e._$AB:t._$AA;if(o===void 0){const i=r.insertBefore(Ei(),s),a=r.insertBefore(Ei(),s);o=new hu(i,a,e,e.options)}else{const i=o._$AB.nextSibling,a=o._$AM,l=a!==e;if(l){let c;(n=o._$AQ)==null||n.call(o,e),o._$AM=e,o._$AP!==void 0&&(c=e._$AU)!==a._$AU&&o._$AP(c)}if(i!==s||l){let c=o._$AA;for(;c!==i;){const u=c.nextSibling;r.insertBefore(c,s),c=u}}}return o},xe=(e,t,o=e)=>(e._$AI(t,o),e),gu={},Si=(e,t=gu)=>e._$AH=t,bu=e=>e._$AH,hs=e=>{var r;(r=e._$AP)==null||r.call(e,!1,!0);let t=e._$AA;const o=e._$AB.nextSibling;for(;t!==o;){const s=t.nextSibling;t.remove(),t=s}};var mo=Symbol(),Ko=Symbol(),ps,fs=new Map,dt=class extends j{constructor(){super(...arguments),this.initialRender=!1,this.svg=null,this.label="",this.library="default"}async resolveIcon(e,t){var o;let r;if(t!=null&&t.spriteSheet)return A`<svg part="svg">
1065
1066
  <use part="use" href="${e}"></use>
1066
- </svg>`;try{if(r=await fetch(e,{mode:"cors"}),!r.ok)return r.status===410?uo:Vo}catch{return Vo}try{const s=document.createElement("div");s.innerHTML=await r.text();const n=s.firstElementChild;if(((o=n==null?void 0:n.tagName)==null?void 0:o.toLowerCase())!=="svg")return uo;ss||(ss=new DOMParser);const a=ss.parseFromString(n.outerHTML,"text/html").body.querySelector("svg");return a?(a.part.add("svg"),document.adoptNode(a)):uo}catch{return uo}}connectedCallback(){super.connectedCallback(),Dc(this)}firstUpdated(){this.initialRender=!0,this.setIcon()}disconnectedCallback(){super.disconnectedCallback(),Tc(this)}getIconSource(){const e=ii(this.library);return this.name&&e?{url:e.resolver(this.name),fromLibrary:!0}:{url:this.src,fromLibrary:!1}}handleLabelChange(){typeof this.label=="string"&&this.label.length>0?(this.setAttribute("role","img"),this.setAttribute("aria-label",this.label),this.removeAttribute("aria-hidden")):(this.removeAttribute("role"),this.removeAttribute("aria-label"),this.setAttribute("aria-hidden","true"))}async setIcon(){var e;const{url:t,fromLibrary:o}=this.getIconSource(),r=o?ii(this.library):void 0;if(!t){this.svg=null;return}let s=ns.get(t);if(s||(s=this.resolveIcon(t,r),ns.set(t,s)),!this.initialRender)return;const n=await s;if(n===Vo&&ns.delete(t),t===this.getIconSource().url){if(Lc(n)){this.svg=n;return}switch(n){case Vo:case uo:this.svg=null,this.emit("sl-error");break;default:this.svg=n.cloneNode(!0),(e=r==null?void 0:r.mutator)==null||e.call(r,this.svg),this.emit("sl-load")}}}render(){return this.svg}};ht.styles=kc,p([it()],ht.prototype,"svg",2),p([g({reflect:!0})],ht.prototype,"name",2),p([g()],ht.prototype,"src",2),p([g()],ht.prototype,"label",2),p([g({reflect:!0})],ht.prototype,"library",2),p([U("label")],ht.prototype,"handleLabelChange",1),p([U(["name","src","library"])],ht.prototype,"setIcon",1);/**
1067
+ </svg>`;try{if(r=await fetch(e,{mode:"cors"}),!r.ok)return r.status===410?mo:Ko}catch{return Ko}try{const s=document.createElement("div");s.innerHTML=await r.text();const n=s.firstElementChild;if(((o=n==null?void 0:n.tagName)==null?void 0:o.toLowerCase())!=="svg")return mo;ps||(ps=new DOMParser);const a=ps.parseFromString(n.outerHTML,"text/html").body.querySelector("svg");return a?(a.part.add("svg"),document.adoptNode(a)):mo}catch{return mo}}connectedCallback(){super.connectedCallback(),uu(this)}firstUpdated(){this.initialRender=!0,this.setIcon()}disconnectedCallback(){super.disconnectedCallback(),du(this)}getIconSource(){const e=$i(this.library);return this.name&&e?{url:e.resolver(this.name),fromLibrary:!0}:{url:this.src,fromLibrary:!1}}handleLabelChange(){typeof this.label=="string"&&this.label.length>0?(this.setAttribute("role","img"),this.setAttribute("aria-label",this.label),this.removeAttribute("aria-hidden")):(this.removeAttribute("role"),this.removeAttribute("aria-label"),this.setAttribute("aria-hidden","true"))}async setIcon(){var e;const{url:t,fromLibrary:o}=this.getIconSource(),r=o?$i(this.library):void 0;if(!t){this.svg=null;return}let s=fs.get(t);if(s||(s=this.resolveIcon(t,r),fs.set(t,s)),!this.initialRender)return;const n=await s;if(n===Ko&&fs.delete(t),t===this.getIconSource().url){if(pu(n)){this.svg=n;return}switch(n){case Ko:case mo:this.svg=null,this.emit("sl-error");break;default:this.svg=n.cloneNode(!0),(e=r==null?void 0:r.mutator)==null||e.call(r,this.svg),this.emit("sl-load")}}}render(){return this.svg}};dt.styles=ru,f([rt()],dt.prototype,"svg",2),f([g({reflect:!0})],dt.prototype,"name",2),f([g()],dt.prototype,"src",2),f([g()],dt.prototype,"label",2),f([g({reflect:!0})],dt.prototype,"library",2),f([H("label")],dt.prototype,"handleLabelChange",1),f([H(["name","src","library"])],dt.prototype,"setIcon",1);/**
1067
1068
  * @license
1068
1069
  * Copyright 2017 Google LLC
1069
1070
  * SPDX-License-Identifier: BSD-3-Clause
1070
- */const be={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},ai=e=>(...t)=>({_$litDirective$:e,values:t});let li=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,o,r){this._$Ct=t,this._$AM=o,this._$Ci=r}_$AS(t,o){return this.update(t,o)}update(t,o){return this.render(...o)}};/**
1071
+ */const Xt={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},gs=e=>(...t)=>({_$litDirective$:e,values:t});let bs=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,o,r){this._$Ct=t,this._$AM=o,this._$Ci=r}_$AS(t,o){return this.update(t,o)}update(t,o){return this.render(...o)}};/**
1071
1072
  * @license
1072
1073
  * Copyright 2018 Google LLC
1073
1074
  * SPDX-License-Identifier: BSD-3-Clause
1074
- */const Q=ai(class extends li{constructor(e){var t;if(super(e),e.type!==be.ATTRIBUTE||e.name!=="class"||((t=e.strings)==null?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){var r,s;if(this.it===void 0){this.it=new Set,e.strings!==void 0&&(this.st=new Set(e.strings.join(" ").split(/\s/).filter(n=>n!=="")));for(const n in t)t[n]&&!((r=this.st)!=null&&r.has(n))&&this.it.add(n);return this.render(t)}const o=e.element.classList;for(const n of this.it)n in t||(o.remove(n),this.it.delete(n));for(const n in t){const i=!!t[n];i===this.it.has(n)||(s=this.st)!=null&&s.has(n)||(i?(o.add(n),this.it.add(n)):(o.remove(n),this.it.delete(n)))}return xt}});/**
1075
+ */const K=gs(class extends bs{constructor(e){var t;if(super(e),e.type!==Xt.ATTRIBUTE||e.name!=="class"||((t=e.strings)==null?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){var r,s;if(this.it===void 0){this.it=new Set,e.strings!==void 0&&(this.st=new Set(e.strings.join(" ").split(/\s/).filter(n=>n!=="")));for(const n in t)t[n]&&!((r=this.st)!=null&&r.has(n))&&this.it.add(n);return this.render(t)}const o=e.element.classList;for(const n of this.it)n in t||(o.remove(n),this.it.delete(n));for(const n in t){const i=!!t[n];i===this.it.has(n)||(s=this.st)!=null&&s.has(n)||(i?(o.add(n),this.it.add(n)):(o.remove(n),this.it.delete(n)))}return xt}});/**
1075
1076
  * @license
1076
1077
  * Copyright 2020 Google LLC
1077
1078
  * SPDX-License-Identifier: BSD-3-Clause
1078
- */const ci=Symbol.for(""),Mc=e=>{if((e==null?void 0:e.r)===ci)return e==null?void 0:e._$litStatic$},Uo=(e,...t)=>({_$litStatic$:t.reduce((o,r,s)=>o+(n=>{if(n._$litStatic$!==void 0)return n._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${n}. Use 'unsafeStatic' to pass non-literal values, but
1079
- take care to ensure page security.`)})(r)+e[s+1],e[0]),r:ci}),ui=new Map,Fc=e=>(t,...o)=>{const r=o.length;let s,n;const i=[],a=[];let l,c=0,u=!1;for(;c<r;){for(l=t[c];c<r&&(n=o[c],(s=Mc(n))!==void 0);)l+=s+t[++c],u=!0;c!==r&&a.push(n),i.push(l),c++}if(c===r&&i.push(t[r]),u){const d=i.join("$$lit$$");(t=ui.get(d))===void 0&&(i.raw=i,ui.set(d,t=i)),o=a}return e(t,...o)},ho=Fc(P);/**
1079
+ */const qi=Symbol.for(""),mu=e=>{if((e==null?void 0:e.r)===qi)return e==null?void 0:e._$litStatic$},Yo=(e,...t)=>({_$litStatic$:t.reduce((o,r,s)=>o+(n=>{if(n._$litStatic$!==void 0)return n._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${n}. Use 'unsafeStatic' to pass non-literal values, but
1080
+ take care to ensure page security.`)})(r)+e[s+1],e[0]),r:qi}),Di=new Map,vu=e=>(t,...o)=>{const r=o.length;let s,n;const i=[],a=[];let l,c=0,u=!1;for(;c<r;){for(l=t[c];c<r&&(n=o[c],(s=mu(n))!==void 0);)l+=s+t[++c],u=!0;c!==r&&a.push(n),i.push(l),c++}if(c===r&&i.push(t[r]),u){const d=i.join("$$lit$$");(t=Di.get(d))===void 0&&(i.raw=i,Di.set(d,t=i)),o=a}return e(t,...o)},vo=vu(Yl);/**
1080
1081
  * @license
1081
1082
  * Copyright 2018 Google LLC
1082
1083
  * SPDX-License-Identifier: BSD-3-Clause
1083
- */const E=e=>e??K;var N=class extends G{constructor(){super(...arguments),this.formControlController=new co(this,{form:e=>{if(e.hasAttribute("form")){const t=e.getRootNode(),o=e.getAttribute("form");return t.getElementById(o)}return e.closest("form")},assumeInteractionOn:["click"]}),this.hasSlotController=new ge(this,"[default]","prefix","suffix"),this.localize=new Jt(this),this.hasFocus=!1,this.invalid=!1,this.title="",this.variant="default",this.size="medium",this.caret=!1,this.disabled=!1,this.loading=!1,this.outline=!1,this.pill=!1,this.circle=!1,this.type="button",this.name="",this.value="",this.href="",this.rel="noreferrer noopener"}get validity(){return this.isButton()?this.button.validity:No}get validationMessage(){return this.isButton()?this.button.validationMessage:""}firstUpdated(){this.isButton()&&this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleClick(){this.type==="submit"&&this.formControlController.submit(this),this.type==="reset"&&this.formControlController.reset(this)}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}isButton(){return!this.href}isLink(){return!!this.href}handleDisabledChange(){this.isButton()&&this.formControlController.setValidity(this.disabled)}click(){this.button.click()}focus(e){this.button.focus(e)}blur(){this.button.blur()}checkValidity(){return this.isButton()?this.button.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.isButton()?this.button.reportValidity():!0}setCustomValidity(e){this.isButton()&&(this.button.setCustomValidity(e),this.formControlController.updateValidity())}render(){const e=this.isLink(),t=e?Uo`a`:Uo`button`;return ho`
1084
+ */const E=e=>e??G;var N=class extends j{constructor(){super(...arguments),this.formControlController=new go(this,{form:e=>{if(e.hasAttribute("form")){const t=e.getRootNode(),o=e.getAttribute("form");return t.getElementById(o)}return e.closest("form")},assumeInteractionOn:["click"]}),this.hasSlotController=new _e(this,"[default]","prefix","suffix"),this.localize=new Jt(this),this.hasFocus=!1,this.invalid=!1,this.title="",this.variant="default",this.size="medium",this.caret=!1,this.disabled=!1,this.loading=!1,this.outline=!1,this.pill=!1,this.circle=!1,this.type="button",this.name="",this.value="",this.href="",this.rel="noreferrer noopener"}get validity(){return this.isButton()?this.button.validity:Wo}get validationMessage(){return this.isButton()?this.button.validationMessage:""}firstUpdated(){this.isButton()&&this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleClick(){this.type==="submit"&&this.formControlController.submit(this),this.type==="reset"&&this.formControlController.reset(this)}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}isButton(){return!this.href}isLink(){return!!this.href}handleDisabledChange(){this.isButton()&&this.formControlController.setValidity(this.disabled)}click(){this.button.click()}focus(e){this.button.focus(e)}blur(){this.button.blur()}checkValidity(){return this.isButton()?this.button.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.isButton()?this.button.reportValidity():!0}setCustomValidity(e){this.isButton()&&(this.button.setCustomValidity(e),this.formControlController.updateValidity())}render(){const e=this.isLink(),t=e?Yo`a`:Yo`button`;return vo`
1084
1085
  <${t}
1085
1086
  part="base"
1086
- class=${Q({button:!0,"button--default":this.variant==="default","button--primary":this.variant==="primary","button--success":this.variant==="success","button--neutral":this.variant==="neutral","button--warning":this.variant==="warning","button--danger":this.variant==="danger","button--text":this.variant==="text","button--small":this.size==="small","button--medium":this.size==="medium","button--large":this.size==="large","button--caret":this.caret,"button--circle":this.circle,"button--disabled":this.disabled,"button--focused":this.hasFocus,"button--loading":this.loading,"button--standard":!this.outline,"button--outline":this.outline,"button--pill":this.pill,"button--rtl":this.localize.dir()==="rtl","button--has-label":this.hasSlotController.test("[default]"),"button--has-prefix":this.hasSlotController.test("prefix"),"button--has-suffix":this.hasSlotController.test("suffix")})}
1087
+ class=${K({button:!0,"button--default":this.variant==="default","button--primary":this.variant==="primary","button--success":this.variant==="success","button--neutral":this.variant==="neutral","button--warning":this.variant==="warning","button--danger":this.variant==="danger","button--text":this.variant==="text","button--small":this.size==="small","button--medium":this.size==="medium","button--large":this.size==="large","button--caret":this.caret,"button--circle":this.circle,"button--disabled":this.disabled,"button--focused":this.hasFocus,"button--loading":this.loading,"button--standard":!this.outline,"button--outline":this.outline,"button--pill":this.pill,"button--rtl":this.localize.dir()==="rtl","button--has-label":this.hasSlotController.test("[default]"),"button--has-prefix":this.hasSlotController.test("prefix"),"button--has-suffix":this.hasSlotController.test("suffix")})}
1087
1088
  ?disabled=${E(e?void 0:this.disabled)}
1088
1089
  type=${E(e?void 0:this.type)}
1089
1090
  title=${this.title}
@@ -1104,11 +1105,11 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
1104
1105
  <slot name="prefix" part="prefix" class="button__prefix"></slot>
1105
1106
  <slot part="label" class="button__label"></slot>
1106
1107
  <slot name="suffix" part="suffix" class="button__suffix"></slot>
1107
- ${this.caret?ho` <sl-icon part="caret" class="button__caret" library="system" name="caret"></sl-icon> `:""}
1108
- ${this.loading?ho`<sl-spinner part="spinner"></sl-spinner>`:""}
1108
+ ${this.caret?vo` <sl-icon part="caret" class="button__caret" library="system" name="caret"></sl-icon> `:""}
1109
+ ${this.loading?vo`<sl-spinner part="spinner"></sl-spinner>`:""}
1109
1110
  </${t}>
1110
- `}};N.styles=ri,N.dependencies={"sl-icon":ht,"sl-spinner":ts},p([j(".button")],N.prototype,"button",2),p([it()],N.prototype,"hasFocus",2),p([it()],N.prototype,"invalid",2),p([g()],N.prototype,"title",2),p([g({reflect:!0})],N.prototype,"variant",2),p([g({reflect:!0})],N.prototype,"size",2),p([g({type:Boolean,reflect:!0})],N.prototype,"caret",2),p([g({type:Boolean,reflect:!0})],N.prototype,"disabled",2),p([g({type:Boolean,reflect:!0})],N.prototype,"loading",2),p([g({type:Boolean,reflect:!0})],N.prototype,"outline",2),p([g({type:Boolean,reflect:!0})],N.prototype,"pill",2),p([g({type:Boolean,reflect:!0})],N.prototype,"circle",2),p([g()],N.prototype,"type",2),p([g()],N.prototype,"name",2),p([g()],N.prototype,"value",2),p([g()],N.prototype,"href",2),p([g()],N.prototype,"target",2),p([g()],N.prototype,"rel",2),p([g()],N.prototype,"download",2),p([g()],N.prototype,"form",2),p([g({attribute:"formaction"})],N.prototype,"formAction",2),p([g({attribute:"formenctype"})],N.prototype,"formEnctype",2),p([g({attribute:"formmethod"})],N.prototype,"formMethod",2),p([g({attribute:"formnovalidate",type:Boolean})],N.prototype,"formNoValidate",2),p([g({attribute:"formtarget"})],N.prototype,"formTarget",2),p([U("disabled",{waitUntilFirstUpdate:!0})],N.prototype,"handleDisabledChange",1),N.define("sl-button");var Ic={$code:"en",$name:"English",$dir:"ltr",carousel:"Carousel",clearEntry:"Clear entry",close:"Close",copied:"Copied",copy:"Copy",currentValue:"Current value",error:"Error",goToSlide:(e,t)=>`Go to slide ${e} of ${t}`,hidePassword:"Hide password",loading:"Loading",nextSlide:"Next slide",numOptionsSelected:e=>e===0?"No options selected":e===1?"1 option selected":`${e} options selected`,previousSlide:"Previous slide",progress:"Progress",remove:"Remove",resize:"Resize",scrollToEnd:"Scroll to end",scrollToStart:"Scroll to start",selectAColorFromTheScreen:"Select a color from the screen",showPassword:"Show password",slideNum:e=>`Slide ${e}`,toggleColorFormat:"Toggle color format"};uc(Ic);var Bc=Z`
1111
- ${tt}
1111
+ `}};N.styles=ki,N.dependencies={"sl-icon":dt,"sl-spinner":ls},f([V(".button")],N.prototype,"button",2),f([rt()],N.prototype,"hasFocus",2),f([rt()],N.prototype,"invalid",2),f([g()],N.prototype,"title",2),f([g({reflect:!0})],N.prototype,"variant",2),f([g({reflect:!0})],N.prototype,"size",2),f([g({type:Boolean,reflect:!0})],N.prototype,"caret",2),f([g({type:Boolean,reflect:!0})],N.prototype,"disabled",2),f([g({type:Boolean,reflect:!0})],N.prototype,"loading",2),f([g({type:Boolean,reflect:!0})],N.prototype,"outline",2),f([g({type:Boolean,reflect:!0})],N.prototype,"pill",2),f([g({type:Boolean,reflect:!0})],N.prototype,"circle",2),f([g()],N.prototype,"type",2),f([g()],N.prototype,"name",2),f([g()],N.prototype,"value",2),f([g()],N.prototype,"href",2),f([g()],N.prototype,"target",2),f([g()],N.prototype,"rel",2),f([g()],N.prototype,"download",2),f([g()],N.prototype,"form",2),f([g({attribute:"formaction"})],N.prototype,"formAction",2),f([g({attribute:"formenctype"})],N.prototype,"formEnctype",2),f([g({attribute:"formmethod"})],N.prototype,"formMethod",2),f([g({attribute:"formnovalidate",type:Boolean})],N.prototype,"formNoValidate",2),f([g({attribute:"formtarget"})],N.prototype,"formTarget",2),f([H("disabled",{waitUntilFirstUpdate:!0})],N.prototype,"handleDisabledChange",1),N.define("sl-button");var yu={$code:"en",$name:"English",$dir:"ltr",carousel:"Carousel",clearEntry:"Clear entry",close:"Close",copied:"Copied",copy:"Copy",currentValue:"Current value",error:"Error",goToSlide:(e,t)=>`Go to slide ${e} of ${t}`,hidePassword:"Hide password",loading:"Loading",nextSlide:"Next slide",numOptionsSelected:e=>e===0?"No options selected":e===1?"1 option selected":`${e} options selected`,previousSlide:"Previous slide",progress:"Progress",remove:"Remove",resize:"Resize",scrollToEnd:"Scroll to end",scrollToStart:"Scroll to start",selectAColorFromTheScreen:"Select a color from the screen",showPassword:"Show password",slideNum:e=>`Slide ${e}`,toggleColorFormat:"Toggle color format"};Gc(yu);var wu=z`
1112
+ ${Q}
1112
1113
 
1113
1114
  :host {
1114
1115
  display: inline-block;
@@ -1172,7 +1173,7 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
1172
1173
  object-fit: cover;
1173
1174
  overflow: hidden;
1174
1175
  }
1175
- `,qt=class extends G{constructor(){super(...arguments),this.hasError=!1,this.image="",this.label="",this.initials="",this.loading="eager",this.shape="circle"}handleImageChange(){this.hasError=!1}render(){const e=P`
1176
+ `,St=class extends j{constructor(){super(...arguments),this.hasError=!1,this.image="",this.label="",this.initials="",this.loading="eager",this.shape="circle"}handleImageChange(){this.hasError=!1}render(){const e=A`
1176
1177
  <img
1177
1178
  part="image"
1178
1179
  class="avatar__image"
@@ -1181,22 +1182,22 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
1181
1182
  alt=""
1182
1183
  @error="${()=>this.hasError=!0}"
1183
1184
  />
1184
- `;let t=P``;return this.initials?t=P`<div part="initials" class="avatar__initials">${this.initials}</div>`:t=P`
1185
+ `;let t=A``;return this.initials?t=A`<div part="initials" class="avatar__initials">${this.initials}</div>`:t=A`
1185
1186
  <div part="icon" class="avatar__icon" aria-hidden="true">
1186
1187
  <slot name="icon">
1187
1188
  <sl-icon name="person-fill" library="system"></sl-icon>
1188
1189
  </slot>
1189
1190
  </div>
1190
- `,P`
1191
+ `,A`
1191
1192
  <div
1192
1193
  part="base"
1193
- class=${Q({avatar:!0,"avatar--circle":this.shape==="circle","avatar--rounded":this.shape==="rounded","avatar--square":this.shape==="square"})}
1194
+ class=${K({avatar:!0,"avatar--circle":this.shape==="circle","avatar--rounded":this.shape==="rounded","avatar--square":this.shape==="square"})}
1194
1195
  role="img"
1195
1196
  aria-label=${this.label}
1196
1197
  >
1197
1198
  ${this.image&&!this.hasError?e:t}
1198
1199
  </div>
1199
- `}};qt.styles=Bc,qt.dependencies={"sl-icon":ht},p([it()],qt.prototype,"hasError",2),p([g()],qt.prototype,"image",2),p([g()],qt.prototype,"label",2),p([g()],qt.prototype,"initials",2),p([g()],qt.prototype,"loading",2),p([g({reflect:!0})],qt.prototype,"shape",2),p([U("image")],qt.prototype,"handleImageChange",1),qt.define("sl-avatar");var is=Z`
1200
+ `}};St.styles=wu,St.dependencies={"sl-icon":dt},f([rt()],St.prototype,"hasError",2),f([g()],St.prototype,"image",2),f([g()],St.prototype,"label",2),f([g()],St.prototype,"initials",2),f([g()],St.prototype,"loading",2),f([g({reflect:!0})],St.prototype,"shape",2),f([H("image")],St.prototype,"handleImageChange",1),St.define("sl-avatar");var ms=z`
1200
1201
  .form-control .form-control__label {
1201
1202
  display: none;
1202
1203
  }
@@ -1252,9 +1253,9 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
1252
1253
  .form-control--has-help-text.form-control--radio-group .form-control__help-text {
1253
1254
  margin-top: var(--sl-spacing-2x-small);
1254
1255
  }
1255
- `,Oc=Z`
1256
- ${tt}
1257
- ${is}
1256
+ `,_u=z`
1257
+ ${Q}
1258
+ ${ms}
1258
1259
 
1259
1260
  :host {
1260
1261
  display: block;
@@ -1549,14 +1550,14 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
1549
1550
  .input--no-spin-buttons input[type='number'] {
1550
1551
  -moz-appearance: textfield;
1551
1552
  }
1552
- `,as=(e="value")=>(t,o)=>{const r=t.constructor,s=r.prototype.attributeChangedCallback;r.prototype.attributeChangedCallback=function(n,i,a){var l;const c=r.getPropertyOptions(e),u=typeof c.attribute=="string"?c.attribute:e;if(n===u){const d=c.converter||$e,h=(typeof d=="function"?d:(l=d==null?void 0:d.fromAttribute)!=null?l:$e.fromAttribute)(a,c.type);this[e]!==h&&(this[o]=h)}s.call(this,n,i,a)}};/**
1553
+ `,vs=(e="value")=>(t,o)=>{const r=t.constructor,s=r.prototype.attributeChangedCallback;r.prototype.attributeChangedCallback=function(n,i,a){var l;const c=r.getPropertyOptions(e),u=typeof c.attribute=="string"?c.attribute:e;if(n===u){const d=c.converter||ro,h=(typeof d=="function"?d:(l=d==null?void 0:d.fromAttribute)!=null?l:ro.fromAttribute)(a,c.type);this[e]!==h&&(this[o]=h)}s.call(this,n,i,a)}};/**
1553
1554
  * @license
1554
1555
  * Copyright 2020 Google LLC
1555
1556
  * SPDX-License-Identifier: BSD-3-Clause
1556
- */const ls=ai(class extends li{constructor(e){if(super(e),e.type!==be.PROPERTY&&e.type!==be.ATTRIBUTE&&e.type!==be.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!zc(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===xt||t===K)return t;const o=e.element,r=e.name;if(e.type===be.PROPERTY){if(t===o[r])return xt}else if(e.type===be.BOOLEAN_ATTRIBUTE){if(!!t===o.hasAttribute(r))return xt}else if(e.type===be.ATTRIBUTE&&o.getAttribute(r)===t+"")return xt;return Pc(e),t}});var z=class extends G{constructor(){super(...arguments),this.formControlController=new co(this,{assumeInteractionOn:["sl-blur","sl-input"]}),this.hasSlotController=new ge(this,"help-text","label"),this.localize=new Jt(this),this.hasFocus=!1,this.title="",this.__numberInput=Object.assign(document.createElement("input"),{type:"number"}),this.__dateInput=Object.assign(document.createElement("input"),{type:"date"}),this.type="text",this.name="",this.value="",this.defaultValue="",this.size="medium",this.filled=!1,this.pill=!1,this.label="",this.helpText="",this.clearable=!1,this.disabled=!1,this.placeholder="",this.readonly=!1,this.passwordToggle=!1,this.passwordVisible=!1,this.noSpinButtons=!1,this.form="",this.required=!1,this.spellcheck=!0}get valueAsDate(){var e;return this.__dateInput.type=this.type,this.__dateInput.value=this.value,((e=this.input)==null?void 0:e.valueAsDate)||this.__dateInput.valueAsDate}set valueAsDate(e){this.__dateInput.type=this.type,this.__dateInput.valueAsDate=e,this.value=this.__dateInput.value}get valueAsNumber(){var e;return this.__numberInput.value=this.value,((e=this.input)==null?void 0:e.valueAsNumber)||this.__numberInput.valueAsNumber}set valueAsNumber(e){this.__numberInput.valueAsNumber=e,this.value=this.__numberInput.value}get validity(){return this.input.validity}get validationMessage(){return this.input.validationMessage}firstUpdated(){this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleChange(){this.value=this.input.value,this.emit("sl-change")}handleClearClick(e){this.value="",this.emit("sl-clear"),this.emit("sl-input"),this.emit("sl-change"),this.input.focus(),e.stopPropagation()}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleInput(){this.value=this.input.value,this.formControlController.updateValidity(),this.emit("sl-input")}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}handleKeyDown(e){const t=e.metaKey||e.ctrlKey||e.shiftKey||e.altKey;e.key==="Enter"&&!t&&setTimeout(()=>{!e.defaultPrevented&&!e.isComposing&&this.formControlController.submit()})}handlePasswordToggle(){this.passwordVisible=!this.passwordVisible}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStepChange(){this.input.step=String(this.step),this.formControlController.updateValidity()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}focus(e){this.input.focus(e)}blur(){this.input.blur()}select(){this.input.select()}setSelectionRange(e,t,o="none"){this.input.setSelectionRange(e,t,o)}setRangeText(e,t,o,r){this.input.setRangeText(e,t,o,r),this.value!==this.input.value&&(this.value=this.input.value)}showPicker(){"showPicker"in HTMLInputElement.prototype&&this.input.showPicker()}stepUp(){this.input.stepUp(),this.value!==this.input.value&&(this.value=this.input.value)}stepDown(){this.input.stepDown(),this.value!==this.input.value&&(this.value=this.input.value)}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}render(){const e=this.hasSlotController.test("label"),t=this.hasSlotController.test("help-text"),o=this.label?!0:!!e,r=this.helpText?!0:!!t,s=this.clearable&&!this.disabled&&!this.readonly,n=s&&(typeof this.value=="number"||this.value.length>0);return P`
1557
+ */const ys=gs(class extends bs{constructor(e){if(super(e),e.type!==Xt.PROPERTY&&e.type!==Xt.ATTRIBUTE&&e.type!==Xt.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!fu(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===xt||t===G)return t;const o=e.element,r=e.name;if(e.type===Xt.PROPERTY){if(t===o[r])return xt}else if(e.type===Xt.BOOLEAN_ATTRIBUTE){if(!!t===o.hasAttribute(r))return xt}else if(e.type===Xt.ATTRIBUTE&&o.getAttribute(r)===t+"")return xt;return Si(e),t}});var L=class extends j{constructor(){super(...arguments),this.formControlController=new go(this,{assumeInteractionOn:["sl-blur","sl-input"]}),this.hasSlotController=new _e(this,"help-text","label"),this.localize=new Jt(this),this.hasFocus=!1,this.title="",this.__numberInput=Object.assign(document.createElement("input"),{type:"number"}),this.__dateInput=Object.assign(document.createElement("input"),{type:"date"}),this.type="text",this.name="",this.value="",this.defaultValue="",this.size="medium",this.filled=!1,this.pill=!1,this.label="",this.helpText="",this.clearable=!1,this.disabled=!1,this.placeholder="",this.readonly=!1,this.passwordToggle=!1,this.passwordVisible=!1,this.noSpinButtons=!1,this.form="",this.required=!1,this.spellcheck=!0}get valueAsDate(){var e;return this.__dateInput.type=this.type,this.__dateInput.value=this.value,((e=this.input)==null?void 0:e.valueAsDate)||this.__dateInput.valueAsDate}set valueAsDate(e){this.__dateInput.type=this.type,this.__dateInput.valueAsDate=e,this.value=this.__dateInput.value}get valueAsNumber(){var e;return this.__numberInput.value=this.value,((e=this.input)==null?void 0:e.valueAsNumber)||this.__numberInput.valueAsNumber}set valueAsNumber(e){this.__numberInput.valueAsNumber=e,this.value=this.__numberInput.value}get validity(){return this.input.validity}get validationMessage(){return this.input.validationMessage}firstUpdated(){this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleChange(){this.value=this.input.value,this.emit("sl-change")}handleClearClick(e){this.value="",this.emit("sl-clear"),this.emit("sl-input"),this.emit("sl-change"),this.input.focus(),e.stopPropagation()}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleInput(){this.value=this.input.value,this.formControlController.updateValidity(),this.emit("sl-input")}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}handleKeyDown(e){const t=e.metaKey||e.ctrlKey||e.shiftKey||e.altKey;e.key==="Enter"&&!t&&setTimeout(()=>{!e.defaultPrevented&&!e.isComposing&&this.formControlController.submit()})}handlePasswordToggle(){this.passwordVisible=!this.passwordVisible}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStepChange(){this.input.step=String(this.step),this.formControlController.updateValidity()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}focus(e){this.input.focus(e)}blur(){this.input.blur()}select(){this.input.select()}setSelectionRange(e,t,o="none"){this.input.setSelectionRange(e,t,o)}setRangeText(e,t,o,r){this.input.setRangeText(e,t,o,r),this.value!==this.input.value&&(this.value=this.input.value)}showPicker(){"showPicker"in HTMLInputElement.prototype&&this.input.showPicker()}stepUp(){this.input.stepUp(),this.value!==this.input.value&&(this.value=this.input.value)}stepDown(){this.input.stepDown(),this.value!==this.input.value&&(this.value=this.input.value)}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}render(){const e=this.hasSlotController.test("label"),t=this.hasSlotController.test("help-text"),o=this.label?!0:!!e,r=this.helpText?!0:!!t,s=this.clearable&&!this.disabled&&!this.readonly,n=s&&(typeof this.value=="number"||this.value.length>0);return A`
1557
1558
  <div
1558
1559
  part="form-control"
1559
- class=${Q({"form-control":!0,"form-control--small":this.size==="small","form-control--medium":this.size==="medium","form-control--large":this.size==="large","form-control--has-label":o,"form-control--has-help-text":r})}
1560
+ class=${K({"form-control":!0,"form-control--small":this.size==="small","form-control--medium":this.size==="medium","form-control--large":this.size==="large","form-control--has-label":o,"form-control--has-help-text":r})}
1560
1561
  >
1561
1562
  <label
1562
1563
  part="form-control-label"
@@ -1570,7 +1571,7 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
1570
1571
  <div part="form-control-input" class="form-control-input">
1571
1572
  <div
1572
1573
  part="base"
1573
- class=${Q({input:!0,"input--small":this.size==="small","input--medium":this.size==="medium","input--large":this.size==="large","input--pill":this.pill,"input--standard":!this.filled,"input--filled":this.filled,"input--disabled":this.disabled,"input--focused":this.hasFocus,"input--empty":!this.value,"input--no-spin-buttons":this.noSpinButtons})}
1574
+ class=${K({input:!0,"input--small":this.size==="small","input--medium":this.size==="medium","input--large":this.size==="large","input--pill":this.pill,"input--standard":!this.filled,"input--filled":this.filled,"input--disabled":this.disabled,"input--focused":this.hasFocus,"input--empty":!this.value,"input--no-spin-buttons":this.noSpinButtons})}
1574
1575
  >
1575
1576
  <span part="prefix" class="input__prefix">
1576
1577
  <slot name="prefix"></slot>
@@ -1592,7 +1593,7 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
1592
1593
  min=${E(this.min)}
1593
1594
  max=${E(this.max)}
1594
1595
  step=${E(this.step)}
1595
- .value=${ls(this.value)}
1596
+ .value=${ys(this.value)}
1596
1597
  autocapitalize=${E(this.autocapitalize)}
1597
1598
  autocomplete=${E(this.autocomplete)}
1598
1599
  autocorrect=${E(this.autocorrect)}
@@ -1610,10 +1611,10 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
1610
1611
  @blur=${this.handleBlur}
1611
1612
  />
1612
1613
 
1613
- ${s?P`
1614
+ ${s?A`
1614
1615
  <button
1615
1616
  part="clear-button"
1616
- class=${Q({input__clear:!0,"input__clear--visible":n})}
1617
+ class=${K({input__clear:!0,"input__clear--visible":n})}
1617
1618
  type="button"
1618
1619
  aria-label=${this.localize.term("clearEntry")}
1619
1620
  @click=${this.handleClearClick}
@@ -1624,7 +1625,7 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
1624
1625
  </slot>
1625
1626
  </button>
1626
1627
  `:""}
1627
- ${this.passwordToggle&&!this.disabled?P`
1628
+ ${this.passwordToggle&&!this.disabled?A`
1628
1629
  <button
1629
1630
  part="password-toggle-button"
1630
1631
  class="input__password-toggle"
@@ -1633,11 +1634,11 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
1633
1634
  @click=${this.handlePasswordToggle}
1634
1635
  tabindex="-1"
1635
1636
  >
1636
- ${this.passwordVisible?P`
1637
+ ${this.passwordVisible?A`
1637
1638
  <slot name="show-password-icon">
1638
1639
  <sl-icon name="eye-slash" library="system"></sl-icon>
1639
1640
  </slot>
1640
- `:P`
1641
+ `:A`
1641
1642
  <slot name="hide-password-icon">
1642
1643
  <sl-icon name="eye" library="system"></sl-icon>
1643
1644
  </slot>
@@ -1660,9 +1661,9 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
1660
1661
  <slot name="help-text">${this.helpText}</slot>
1661
1662
  </div>
1662
1663
  </div>
1663
- `}};z.styles=Oc,z.dependencies={"sl-icon":ht},p([j(".input__control")],z.prototype,"input",2),p([it()],z.prototype,"hasFocus",2),p([g()],z.prototype,"title",2),p([g({reflect:!0})],z.prototype,"type",2),p([g()],z.prototype,"name",2),p([g()],z.prototype,"value",2),p([as()],z.prototype,"defaultValue",2),p([g({reflect:!0})],z.prototype,"size",2),p([g({type:Boolean,reflect:!0})],z.prototype,"filled",2),p([g({type:Boolean,reflect:!0})],z.prototype,"pill",2),p([g()],z.prototype,"label",2),p([g({attribute:"help-text"})],z.prototype,"helpText",2),p([g({type:Boolean})],z.prototype,"clearable",2),p([g({type:Boolean,reflect:!0})],z.prototype,"disabled",2),p([g()],z.prototype,"placeholder",2),p([g({type:Boolean,reflect:!0})],z.prototype,"readonly",2),p([g({attribute:"password-toggle",type:Boolean})],z.prototype,"passwordToggle",2),p([g({attribute:"password-visible",type:Boolean})],z.prototype,"passwordVisible",2),p([g({attribute:"no-spin-buttons",type:Boolean})],z.prototype,"noSpinButtons",2),p([g({reflect:!0})],z.prototype,"form",2),p([g({type:Boolean,reflect:!0})],z.prototype,"required",2),p([g()],z.prototype,"pattern",2),p([g({type:Number})],z.prototype,"minlength",2),p([g({type:Number})],z.prototype,"maxlength",2),p([g()],z.prototype,"min",2),p([g()],z.prototype,"max",2),p([g()],z.prototype,"step",2),p([g()],z.prototype,"autocapitalize",2),p([g()],z.prototype,"autocorrect",2),p([g()],z.prototype,"autocomplete",2),p([g({type:Boolean})],z.prototype,"autofocus",2),p([g()],z.prototype,"enterkeyhint",2),p([g({type:Boolean,converter:{fromAttribute:e=>!(!e||e==="false"),toAttribute:e=>e?"true":"false"}})],z.prototype,"spellcheck",2),p([g()],z.prototype,"inputmode",2),p([U("disabled",{waitUntilFirstUpdate:!0})],z.prototype,"handleDisabledChange",1),p([U("step",{waitUntilFirstUpdate:!0})],z.prototype,"handleStepChange",1),p([U("value",{waitUntilFirstUpdate:!0})],z.prototype,"handleValueChange",1),z.define("sl-input");var Nc=Z`
1664
- ${tt}
1665
- ${is}
1664
+ `}};L.styles=_u,L.dependencies={"sl-icon":dt},f([V(".input__control")],L.prototype,"input",2),f([rt()],L.prototype,"hasFocus",2),f([g()],L.prototype,"title",2),f([g({reflect:!0})],L.prototype,"type",2),f([g()],L.prototype,"name",2),f([g()],L.prototype,"value",2),f([vs()],L.prototype,"defaultValue",2),f([g({reflect:!0})],L.prototype,"size",2),f([g({type:Boolean,reflect:!0})],L.prototype,"filled",2),f([g({type:Boolean,reflect:!0})],L.prototype,"pill",2),f([g()],L.prototype,"label",2),f([g({attribute:"help-text"})],L.prototype,"helpText",2),f([g({type:Boolean})],L.prototype,"clearable",2),f([g({type:Boolean,reflect:!0})],L.prototype,"disabled",2),f([g()],L.prototype,"placeholder",2),f([g({type:Boolean,reflect:!0})],L.prototype,"readonly",2),f([g({attribute:"password-toggle",type:Boolean})],L.prototype,"passwordToggle",2),f([g({attribute:"password-visible",type:Boolean})],L.prototype,"passwordVisible",2),f([g({attribute:"no-spin-buttons",type:Boolean})],L.prototype,"noSpinButtons",2),f([g({reflect:!0})],L.prototype,"form",2),f([g({type:Boolean,reflect:!0})],L.prototype,"required",2),f([g()],L.prototype,"pattern",2),f([g({type:Number})],L.prototype,"minlength",2),f([g({type:Number})],L.prototype,"maxlength",2),f([g()],L.prototype,"min",2),f([g()],L.prototype,"max",2),f([g()],L.prototype,"step",2),f([g()],L.prototype,"autocapitalize",2),f([g()],L.prototype,"autocorrect",2),f([g()],L.prototype,"autocomplete",2),f([g({type:Boolean})],L.prototype,"autofocus",2),f([g()],L.prototype,"enterkeyhint",2),f([g({type:Boolean,converter:{fromAttribute:e=>!(!e||e==="false"),toAttribute:e=>e?"true":"false"}})],L.prototype,"spellcheck",2),f([g()],L.prototype,"inputmode",2),f([H("disabled",{waitUntilFirstUpdate:!0})],L.prototype,"handleDisabledChange",1),f([H("step",{waitUntilFirstUpdate:!0})],L.prototype,"handleStepChange",1),f([H("value",{waitUntilFirstUpdate:!0})],L.prototype,"handleValueChange",1),L.define("sl-input");var xu=z`
1665
+ ${Q}
1666
+ ${ms}
1666
1667
 
1667
1668
  :host {
1668
1669
  display: block;
@@ -1828,10 +1829,10 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
1828
1829
  resize: none;
1829
1830
  overflow-y: hidden;
1830
1831
  }
1831
- `,B=class extends G{constructor(){super(...arguments),this.formControlController=new co(this,{assumeInteractionOn:["sl-blur","sl-input"]}),this.hasSlotController=new ge(this,"help-text","label"),this.hasFocus=!1,this.title="",this.name="",this.value="",this.size="medium",this.filled=!1,this.label="",this.helpText="",this.placeholder="",this.rows=4,this.resize="vertical",this.disabled=!1,this.readonly=!1,this.form="",this.required=!1,this.spellcheck=!0,this.defaultValue=""}get validity(){return this.input.validity}get validationMessage(){return this.input.validationMessage}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>this.setTextareaHeight()),this.updateComplete.then(()=>{this.setTextareaHeight(),this.resizeObserver.observe(this.input)})}firstUpdated(){this.formControlController.updateValidity()}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this.input)}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleChange(){this.value=this.input.value,this.setTextareaHeight(),this.emit("sl-change")}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleInput(){this.value=this.input.value,this.emit("sl-input")}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}setTextareaHeight(){this.resize==="auto"?(this.input.style.height="auto",this.input.style.height=`${this.input.scrollHeight}px`):this.input.style.height=void 0}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleRowsChange(){this.setTextareaHeight()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity(),this.setTextareaHeight()}focus(e){this.input.focus(e)}blur(){this.input.blur()}select(){this.input.select()}scrollPosition(e){if(e){typeof e.top=="number"&&(this.input.scrollTop=e.top),typeof e.left=="number"&&(this.input.scrollLeft=e.left);return}return{top:this.input.scrollTop,left:this.input.scrollTop}}setSelectionRange(e,t,o="none"){this.input.setSelectionRange(e,t,o)}setRangeText(e,t,o,r){this.input.setRangeText(e,t,o,r),this.value!==this.input.value&&(this.value=this.input.value),this.value!==this.input.value&&(this.value=this.input.value,this.setTextareaHeight())}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}render(){const e=this.hasSlotController.test("label"),t=this.hasSlotController.test("help-text"),o=this.label?!0:!!e,r=this.helpText?!0:!!t;return P`
1832
+ `,B=class extends j{constructor(){super(...arguments),this.formControlController=new go(this,{assumeInteractionOn:["sl-blur","sl-input"]}),this.hasSlotController=new _e(this,"help-text","label"),this.hasFocus=!1,this.title="",this.name="",this.value="",this.size="medium",this.filled=!1,this.label="",this.helpText="",this.placeholder="",this.rows=4,this.resize="vertical",this.disabled=!1,this.readonly=!1,this.form="",this.required=!1,this.spellcheck=!0,this.defaultValue=""}get validity(){return this.input.validity}get validationMessage(){return this.input.validationMessage}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>this.setTextareaHeight()),this.updateComplete.then(()=>{this.setTextareaHeight(),this.resizeObserver.observe(this.input)})}firstUpdated(){this.formControlController.updateValidity()}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this.input)}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleChange(){this.value=this.input.value,this.setTextareaHeight(),this.emit("sl-change")}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleInput(){this.value=this.input.value,this.emit("sl-input")}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}setTextareaHeight(){this.resize==="auto"?(this.input.style.height="auto",this.input.style.height=`${this.input.scrollHeight}px`):this.input.style.height=void 0}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleRowsChange(){this.setTextareaHeight()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity(),this.setTextareaHeight()}focus(e){this.input.focus(e)}blur(){this.input.blur()}select(){this.input.select()}scrollPosition(e){if(e){typeof e.top=="number"&&(this.input.scrollTop=e.top),typeof e.left=="number"&&(this.input.scrollLeft=e.left);return}return{top:this.input.scrollTop,left:this.input.scrollTop}}setSelectionRange(e,t,o="none"){this.input.setSelectionRange(e,t,o)}setRangeText(e,t,o,r){this.input.setRangeText(e,t,o,r),this.value!==this.input.value&&(this.value=this.input.value),this.value!==this.input.value&&(this.value=this.input.value,this.setTextareaHeight())}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}render(){const e=this.hasSlotController.test("label"),t=this.hasSlotController.test("help-text"),o=this.label?!0:!!e,r=this.helpText?!0:!!t;return A`
1832
1833
  <div
1833
1834
  part="form-control"
1834
- class=${Q({"form-control":!0,"form-control--small":this.size==="small","form-control--medium":this.size==="medium","form-control--large":this.size==="large","form-control--has-label":o,"form-control--has-help-text":r})}
1835
+ class=${K({"form-control":!0,"form-control--small":this.size==="small","form-control--medium":this.size==="medium","form-control--large":this.size==="large","form-control--has-label":o,"form-control--has-help-text":r})}
1835
1836
  >
1836
1837
  <label
1837
1838
  part="form-control-label"
@@ -1845,7 +1846,7 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
1845
1846
  <div part="form-control-input" class="form-control-input">
1846
1847
  <div
1847
1848
  part="base"
1848
- class=${Q({textarea:!0,"textarea--small":this.size==="small","textarea--medium":this.size==="medium","textarea--large":this.size==="large","textarea--standard":!this.filled,"textarea--filled":this.filled,"textarea--disabled":this.disabled,"textarea--focused":this.hasFocus,"textarea--empty":!this.value,"textarea--resize-none":this.resize==="none","textarea--resize-vertical":this.resize==="vertical","textarea--resize-auto":this.resize==="auto"})}
1849
+ class=${K({textarea:!0,"textarea--small":this.size==="small","textarea--medium":this.size==="medium","textarea--large":this.size==="large","textarea--standard":!this.filled,"textarea--filled":this.filled,"textarea--disabled":this.disabled,"textarea--focused":this.hasFocus,"textarea--empty":!this.value,"textarea--resize-none":this.resize==="none","textarea--resize-vertical":this.resize==="vertical","textarea--resize-auto":this.resize==="auto"})}
1849
1850
  >
1850
1851
  <textarea
1851
1852
  part="textarea"
@@ -1853,7 +1854,7 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
1853
1854
  class="textarea__control"
1854
1855
  title=${this.title}
1855
1856
  name=${E(this.name)}
1856
- .value=${ls(this.value)}
1857
+ .value=${ys(this.value)}
1857
1858
  ?disabled=${this.disabled}
1858
1859
  ?readonly=${this.readonly}
1859
1860
  ?required=${this.required}
@@ -1886,8 +1887,8 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
1886
1887
  <slot name="help-text">${this.helpText}</slot>
1887
1888
  </div>
1888
1889
  </div>
1889
- `}};B.styles=Nc,p([j(".textarea__control")],B.prototype,"input",2),p([it()],B.prototype,"hasFocus",2),p([g()],B.prototype,"title",2),p([g()],B.prototype,"name",2),p([g()],B.prototype,"value",2),p([g({reflect:!0})],B.prototype,"size",2),p([g({type:Boolean,reflect:!0})],B.prototype,"filled",2),p([g()],B.prototype,"label",2),p([g({attribute:"help-text"})],B.prototype,"helpText",2),p([g()],B.prototype,"placeholder",2),p([g({type:Number})],B.prototype,"rows",2),p([g()],B.prototype,"resize",2),p([g({type:Boolean,reflect:!0})],B.prototype,"disabled",2),p([g({type:Boolean,reflect:!0})],B.prototype,"readonly",2),p([g({reflect:!0})],B.prototype,"form",2),p([g({type:Boolean,reflect:!0})],B.prototype,"required",2),p([g({type:Number})],B.prototype,"minlength",2),p([g({type:Number})],B.prototype,"maxlength",2),p([g()],B.prototype,"autocapitalize",2),p([g()],B.prototype,"autocorrect",2),p([g()],B.prototype,"autocomplete",2),p([g({type:Boolean})],B.prototype,"autofocus",2),p([g()],B.prototype,"enterkeyhint",2),p([g({type:Boolean,converter:{fromAttribute:e=>!(!e||e==="false"),toAttribute:e=>e?"true":"false"}})],B.prototype,"spellcheck",2),p([g()],B.prototype,"inputmode",2),p([as()],B.prototype,"defaultValue",2),p([U("disabled",{waitUntilFirstUpdate:!0})],B.prototype,"handleDisabledChange",1),p([U("rows",{waitUntilFirstUpdate:!0})],B.prototype,"handleRowsChange",1),p([U("value",{waitUntilFirstUpdate:!0})],B.prototype,"handleValueChange",1),B.define("sl-textarea");function Vc(e){return!!(e.offsetParent||e.offsetWidth||e.offsetHeight||e.getClientRects().length)}function Uc(e){const t=e.tagName.toLowerCase();return e.getAttribute("tabindex")==="-1"||e.hasAttribute("disabled")||t==="input"&&e.getAttribute("type")==="radio"&&!e.hasAttribute("checked")||!Vc(e)||window.getComputedStyle(e).visibility==="hidden"?!1:(t==="audio"||t==="video")&&e.hasAttribute("controls")||e.hasAttribute("tabindex")||e.hasAttribute("contenteditable")&&e.getAttribute("contenteditable")!=="false"?!0:["button","input","select","textarea","a","audio","video","summary"].includes(t)}function di(e){const t=[];function o(r){if(r instanceof Element){if(r.hasAttribute("inert"))return;!t.includes(r)&&Uc(r)&&t.push(r);const s=n=>{var i;return((i=n.getRootNode({composed:!0}))==null?void 0:i.host)!==e};r instanceof HTMLSlotElement&&s(r)&&r.assignedElements({flatten:!0}).forEach(n=>{o(n)}),r.shadowRoot!==null&&r.shadowRoot.mode==="open"&&o(r.shadowRoot)}[...r.children].forEach(s=>o(s))}return o(e),t.sort((r,s)=>{const n=Number(r.getAttribute("tabindex"))||0;return(Number(s.getAttribute("tabindex"))||0)-n})}function*hi(e=document.activeElement){e!=null&&(yield e,"shadowRoot"in e&&e.shadowRoot&&e.shadowRoot.mode!=="closed"&&(yield*vc(hi(e.shadowRoot.activeElement))))}function Hc(){return[...hi()].pop()}var po=[],jc=class{constructor(e){this.tabDirection="forward",this.handleFocusIn=()=>{this.checkFocus()},this.handleKeyDown=t=>{var o,r;if(t.key!=="Tab"||this.isExternalActivated)return;t.shiftKey?this.tabDirection="backward":this.tabDirection="forward",t.preventDefault();const s=di(this.element),n=Hc();let i=s.findIndex(l=>l===n);if(i===-1){this.currentFocus=s[0],(o=this.currentFocus)==null||o.focus({preventScroll:!0});return}const a=this.tabDirection==="forward"?1:-1;i+a>=s.length?i=0:i+a<0?i=s.length-1:i+=a,this.currentFocus=s[i],(r=this.currentFocus)==null||r.focus({preventScroll:!0}),setTimeout(()=>this.checkFocus())},this.handleKeyUp=()=>{this.tabDirection="forward"},this.element=e}activate(){po.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){po=po.filter(e=>e!==this.element),this.currentFocus=null,document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return po[po.length-1]===this.element}activateExternal(){this.isExternalActivated=!0}deactivateExternal(){this.isExternalActivated=!1}checkFocus(){if(this.isActive()&&!this.isExternalActivated){const e=di(this.element);if(!this.element.matches(":focus-within")){const t=e[0],o=e[e.length-1],r=this.tabDirection==="forward"?t:o;typeof(r==null?void 0:r.focus)=="function"&&(this.currentFocus=r,r.focus({preventScroll:!0}))}}}};function Gc(e,t){return{top:Math.round(e.getBoundingClientRect().top-t.getBoundingClientRect().top),left:Math.round(e.getBoundingClientRect().left-t.getBoundingClientRect().left)}}var cs=new Set;function Zc(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}function pi(e){if(cs.add(e),!document.body.classList.contains("sl-scroll-lock")){const t=Zc();document.body.classList.add("sl-scroll-lock"),document.body.style.setProperty("--sl-scroll-lock-size",`${t}px`)}}function fi(e){cs.delete(e),cs.size===0&&(document.body.classList.remove("sl-scroll-lock"),document.body.style.removeProperty("--sl-scroll-lock-size"))}function gi(e,t,o="vertical",r="smooth"){const s=Gc(e,t),n=s.top+t.scrollTop,i=s.left+t.scrollLeft,a=t.scrollLeft,l=t.scrollLeft+t.offsetWidth,c=t.scrollTop,u=t.scrollTop+t.offsetHeight;(o==="horizontal"||o==="both")&&(i<a?t.scrollTo({left:i,behavior:r}):i+e.clientWidth>l&&t.scrollTo({left:i-t.offsetWidth+e.clientWidth,behavior:r})),(o==="vertical"||o==="both")&&(n<c?t.scrollTo({top:n,behavior:r}):n+e.clientHeight>u&&t.scrollTo({top:n-t.offsetHeight+e.clientHeight,behavior:r}))}var Wc=Z`
1890
- ${tt}
1890
+ `}};B.styles=xu,f([V(".textarea__control")],B.prototype,"input",2),f([rt()],B.prototype,"hasFocus",2),f([g()],B.prototype,"title",2),f([g()],B.prototype,"name",2),f([g()],B.prototype,"value",2),f([g({reflect:!0})],B.prototype,"size",2),f([g({type:Boolean,reflect:!0})],B.prototype,"filled",2),f([g()],B.prototype,"label",2),f([g({attribute:"help-text"})],B.prototype,"helpText",2),f([g()],B.prototype,"placeholder",2),f([g({type:Number})],B.prototype,"rows",2),f([g()],B.prototype,"resize",2),f([g({type:Boolean,reflect:!0})],B.prototype,"disabled",2),f([g({type:Boolean,reflect:!0})],B.prototype,"readonly",2),f([g({reflect:!0})],B.prototype,"form",2),f([g({type:Boolean,reflect:!0})],B.prototype,"required",2),f([g({type:Number})],B.prototype,"minlength",2),f([g({type:Number})],B.prototype,"maxlength",2),f([g()],B.prototype,"autocapitalize",2),f([g()],B.prototype,"autocorrect",2),f([g()],B.prototype,"autocomplete",2),f([g({type:Boolean})],B.prototype,"autofocus",2),f([g()],B.prototype,"enterkeyhint",2),f([g({type:Boolean,converter:{fromAttribute:e=>!(!e||e==="false"),toAttribute:e=>e?"true":"false"}})],B.prototype,"spellcheck",2),f([g()],B.prototype,"inputmode",2),f([vs()],B.prototype,"defaultValue",2),f([H("disabled",{waitUntilFirstUpdate:!0})],B.prototype,"handleDisabledChange",1),f([H("rows",{waitUntilFirstUpdate:!0})],B.prototype,"handleRowsChange",1),f([H("value",{waitUntilFirstUpdate:!0})],B.prototype,"handleValueChange",1),B.define("sl-textarea");function ku(e){return!!(e.offsetParent||e.offsetWidth||e.offsetHeight||e.getClientRects().length)}function Au(e){const t=e.tagName.toLowerCase();return e.getAttribute("tabindex")==="-1"||e.hasAttribute("disabled")||t==="input"&&e.getAttribute("type")==="radio"&&!e.hasAttribute("checked")||!ku(e)||window.getComputedStyle(e).visibility==="hidden"?!1:(t==="audio"||t==="video")&&e.hasAttribute("controls")||e.hasAttribute("tabindex")||e.hasAttribute("contenteditable")&&e.getAttribute("contenteditable")!=="false"?!0:["button","input","select","textarea","a","audio","video","summary"].includes(t)}function Ti(e){const t=[];function o(r){if(r instanceof Element){if(r.hasAttribute("inert"))return;!t.includes(r)&&Au(r)&&t.push(r);const s=n=>{var i;return((i=n.getRootNode({composed:!0}))==null?void 0:i.host)!==e};r instanceof HTMLSlotElement&&s(r)&&r.assignedElements({flatten:!0}).forEach(n=>{o(n)}),r.shadowRoot!==null&&r.shadowRoot.mode==="open"&&o(r.shadowRoot)}[...r.children].forEach(s=>o(s))}return o(e),t.sort((r,s)=>{const n=Number(r.getAttribute("tabindex"))||0;return(Number(s.getAttribute("tabindex"))||0)-n})}function*Li(e=document.activeElement){e!=null&&(yield e,"shadowRoot"in e&&e.shadowRoot&&e.shadowRoot.mode!=="closed"&&(yield*tu(Li(e.shadowRoot.activeElement))))}function Cu(){return[...Li()].pop()}var yo=[],$u=class{constructor(e){this.tabDirection="forward",this.handleFocusIn=()=>{this.checkFocus()},this.handleKeyDown=t=>{var o,r;if(t.key!=="Tab"||this.isExternalActivated)return;t.shiftKey?this.tabDirection="backward":this.tabDirection="forward",t.preventDefault();const s=Ti(this.element),n=Cu();let i=s.findIndex(l=>l===n);if(i===-1){this.currentFocus=s[0],(o=this.currentFocus)==null||o.focus({preventScroll:!0});return}const a=this.tabDirection==="forward"?1:-1;i+a>=s.length?i=0:i+a<0?i=s.length-1:i+=a,this.currentFocus=s[i],(r=this.currentFocus)==null||r.focus({preventScroll:!0}),setTimeout(()=>this.checkFocus())},this.handleKeyUp=()=>{this.tabDirection="forward"},this.element=e}activate(){yo.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){yo=yo.filter(e=>e!==this.element),this.currentFocus=null,document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return yo[yo.length-1]===this.element}activateExternal(){this.isExternalActivated=!0}deactivateExternal(){this.isExternalActivated=!1}checkFocus(){if(this.isActive()&&!this.isExternalActivated){const e=Ti(this.element);if(!this.element.matches(":focus-within")){const t=e[0],o=e[e.length-1],r=this.tabDirection==="forward"?t:o;typeof(r==null?void 0:r.focus)=="function"&&(this.currentFocus=r,r.focus({preventScroll:!0}))}}}};function Eu(e,t){return{top:Math.round(e.getBoundingClientRect().top-t.getBoundingClientRect().top),left:Math.round(e.getBoundingClientRect().left-t.getBoundingClientRect().left)}}var ws=new Set;function Su(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}function zi(e){if(ws.add(e),!document.body.classList.contains("sl-scroll-lock")){const t=Su();document.body.classList.add("sl-scroll-lock"),document.body.style.setProperty("--sl-scroll-lock-size",`${t}px`)}}function Ri(e){ws.delete(e),ws.size===0&&(document.body.classList.remove("sl-scroll-lock"),document.body.style.removeProperty("--sl-scroll-lock-size"))}function Pi(e,t,o="vertical",r="smooth"){const s=Eu(e,t),n=s.top+t.scrollTop,i=s.left+t.scrollLeft,a=t.scrollLeft,l=t.scrollLeft+t.offsetWidth,c=t.scrollTop,u=t.scrollTop+t.offsetHeight;(o==="horizontal"||o==="both")&&(i<a?t.scrollTo({left:i,behavior:r}):i+e.clientWidth>l&&t.scrollTo({left:i-t.offsetWidth+e.clientWidth,behavior:r})),(o==="vertical"||o==="both")&&(n<c?t.scrollTo({top:n,behavior:r}):n+e.clientHeight>u&&t.scrollTo({top:n-t.offsetHeight+e.clientHeight,behavior:r}))}var qu=z`
1891
+ ${Q}
1891
1892
 
1892
1893
  :host {
1893
1894
  --width: 31rem;
@@ -2005,8 +2006,8 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
2005
2006
  border: solid 1px var(--sl-color-neutral-0);
2006
2007
  }
2007
2008
  }
2008
- `,Kc=Z`
2009
- ${tt}
2009
+ `,Du=z`
2010
+ ${Q}
2010
2011
 
2011
2012
  :host {
2012
2013
  display: inline-block;
@@ -2054,10 +2055,10 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
2054
2055
  .icon-button__icon {
2055
2056
  pointer-events: none;
2056
2057
  }
2057
- `,at=class extends G{constructor(){super(...arguments),this.hasFocus=!1,this.label="",this.disabled=!1}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleClick(e){this.disabled&&(e.preventDefault(),e.stopPropagation())}click(){this.button.click()}focus(e){this.button.focus(e)}blur(){this.button.blur()}render(){const e=!!this.href,t=e?Uo`a`:Uo`button`;return ho`
2058
+ `,nt=class extends j{constructor(){super(...arguments),this.hasFocus=!1,this.label="",this.disabled=!1}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleClick(e){this.disabled&&(e.preventDefault(),e.stopPropagation())}click(){this.button.click()}focus(e){this.button.focus(e)}blur(){this.button.blur()}render(){const e=!!this.href,t=e?Yo`a`:Yo`button`;return vo`
2058
2059
  <${t}
2059
2060
  part="base"
2060
- class=${Q({"icon-button":!0,"icon-button--disabled":!e&&this.disabled,"icon-button--focused":this.hasFocus})}
2061
+ class=${K({"icon-button":!0,"icon-button--disabled":!e&&this.disabled,"icon-button--focused":this.hasFocus})}
2061
2062
  ?disabled=${E(e?void 0:this.disabled)}
2062
2063
  type=${E(e?void 0:"button")}
2063
2064
  href=${E(e?this.href:void 0)}
@@ -2080,10 +2081,10 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
2080
2081
  aria-hidden="true"
2081
2082
  ></sl-icon>
2082
2083
  </${t}>
2083
- `}};at.styles=Kc,at.dependencies={"sl-icon":ht},p([j(".icon-button")],at.prototype,"button",2),p([it()],at.prototype,"hasFocus",2),p([g()],at.prototype,"name",2),p([g()],at.prototype,"library",2),p([g()],at.prototype,"src",2),p([g()],at.prototype,"href",2),p([g()],at.prototype,"target",2),p([g()],at.prototype,"download",2),p([g()],at.prototype,"label",2),p([g({type:Boolean,reflect:!0})],at.prototype,"disabled",2);var bi=new Map,Yc=new WeakMap;function Jc(e){return e??{keyframes:[],options:{duration:0}}}function mi(e,t){return t.toLowerCase()==="rtl"?{keyframes:e.rtlKeyframes||e.keyframes,options:e.options}:e}function Vt(e,t){bi.set(e,Jc(t))}function Ut(e,t,o){const r=Yc.get(e);if(r!=null&&r[t])return mi(r[t],o.dir);const s=bi.get(t);return s?mi(s,o.dir):{keyframes:[],options:{duration:0}}}function De(e,t){return new Promise(o=>{function r(s){s.target===e&&(e.removeEventListener(t,r),o())}e.addEventListener(t,r)})}function Ht(e,t,o){return new Promise(r=>{if((o==null?void 0:o.duration)===1/0)throw new Error("Promise-based animations must be finite.");const s=e.animate(t,Bo(Qt({},o),{duration:Qc()?0:o.duration}));s.addEventListener("cancel",r,{once:!0}),s.addEventListener("finish",r,{once:!0})})}function vi(e){return e=e.toString().toLowerCase(),e.indexOf("ms")>-1?parseFloat(e):e.indexOf("s")>-1?parseFloat(e)*1e3:parseFloat(e)}function Qc(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Xt(e){return Promise.all(e.getAnimations().map(t=>new Promise(o=>{const r=requestAnimationFrame(o);t.addEventListener("cancel",()=>r,{once:!0}),t.addEventListener("finish",()=>r,{once:!0}),t.cancel()})))}var Dt=class extends G{constructor(){super(...arguments),this.hasSlotController=new ge(this,"footer"),this.localize=new Jt(this),this.modal=new jc(this),this.open=!1,this.label="",this.noHeader=!1,this.handleDocumentKeyDown=e=>{e.key==="Escape"&&this.modal.isActive()&&this.open&&(e.stopPropagation(),this.requestClose("keyboard"))}}firstUpdated(){this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),pi(this))}disconnectedCallback(){super.disconnectedCallback(),this.modal.deactivate(),fi(this)}requestClose(e){if(this.emit("sl-request-close",{cancelable:!0,detail:{source:e}}).defaultPrevented){const o=Ut(this,"dialog.denyClose",{dir:this.localize.dir()});Ht(this.panel,o.keyframes,o.options);return}this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}async handleOpenChange(){if(this.open){this.emit("sl-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.modal.activate(),pi(this);const e=this.querySelector("[autofocus]");e&&e.removeAttribute("autofocus"),await Promise.all([Xt(this.dialog),Xt(this.overlay)]),this.dialog.hidden=!1,requestAnimationFrame(()=>{this.emit("sl-initial-focus",{cancelable:!0}).defaultPrevented||(e?e.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),e&&e.setAttribute("autofocus","")});const t=Ut(this,"dialog.show",{dir:this.localize.dir()}),o=Ut(this,"dialog.overlay.show",{dir:this.localize.dir()});await Promise.all([Ht(this.panel,t.keyframes,t.options),Ht(this.overlay,o.keyframes,o.options)]),this.emit("sl-after-show")}else{this.emit("sl-hide"),this.removeOpenListeners(),this.modal.deactivate(),await Promise.all([Xt(this.dialog),Xt(this.overlay)]);const e=Ut(this,"dialog.hide",{dir:this.localize.dir()}),t=Ut(this,"dialog.overlay.hide",{dir:this.localize.dir()});await Promise.all([Ht(this.overlay,t.keyframes,t.options).then(()=>{this.overlay.hidden=!0}),Ht(this.panel,e.keyframes,e.options).then(()=>{this.panel.hidden=!0})]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,fi(this);const o=this.originalTrigger;typeof(o==null?void 0:o.focus)=="function"&&setTimeout(()=>o.focus()),this.emit("sl-after-hide")}}async show(){if(!this.open)return this.open=!0,De(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,De(this,"sl-after-hide")}render(){return P`
2084
+ `}};nt.styles=Du,nt.dependencies={"sl-icon":dt},f([V(".icon-button")],nt.prototype,"button",2),f([rt()],nt.prototype,"hasFocus",2),f([g()],nt.prototype,"name",2),f([g()],nt.prototype,"library",2),f([g()],nt.prototype,"src",2),f([g()],nt.prototype,"href",2),f([g()],nt.prototype,"target",2),f([g()],nt.prototype,"download",2),f([g()],nt.prototype,"label",2),f([g({type:Boolean,reflect:!0})],nt.prototype,"disabled",2);var Mi=new Map,Tu=new WeakMap;function Lu(e){return e??{keyframes:[],options:{duration:0}}}function Ii(e,t){return t.toLowerCase()==="rtl"?{keyframes:e.rtlKeyframes||e.keyframes,options:e.options}:e}function Ot(e,t){Mi.set(e,Lu(t))}function Nt(e,t,o){const r=Tu.get(e);if(r!=null&&r[t])return Ii(r[t],o.dir);const s=Mi.get(t);return s?Ii(s,o.dir):{keyframes:[],options:{duration:0}}}function Re(e,t){return new Promise(o=>{function r(s){s.target===e&&(e.removeEventListener(t,r),o())}e.addEventListener(t,r)})}function Vt(e,t,o){return new Promise(r=>{if((o==null?void 0:o.duration)===1/0)throw new Error("Promise-based animations must be finite.");const s=e.animate(t,Go(Qt({},o),{duration:zu()?0:o.duration}));s.addEventListener("cancel",r,{once:!0}),s.addEventListener("finish",r,{once:!0})})}function Fi(e){return e=e.toString().toLowerCase(),e.indexOf("ms")>-1?parseFloat(e):e.indexOf("s")>-1?parseFloat(e)*1e3:parseFloat(e)}function zu(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function te(e){return Promise.all(e.getAnimations().map(t=>new Promise(o=>{const r=requestAnimationFrame(o);t.addEventListener("cancel",()=>r,{once:!0}),t.addEventListener("finish",()=>r,{once:!0}),t.cancel()})))}var qt=class extends j{constructor(){super(...arguments),this.hasSlotController=new _e(this,"footer"),this.localize=new Jt(this),this.modal=new $u(this),this.open=!1,this.label="",this.noHeader=!1,this.handleDocumentKeyDown=e=>{e.key==="Escape"&&this.modal.isActive()&&this.open&&(e.stopPropagation(),this.requestClose("keyboard"))}}firstUpdated(){this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),zi(this))}disconnectedCallback(){super.disconnectedCallback(),this.modal.deactivate(),Ri(this)}requestClose(e){if(this.emit("sl-request-close",{cancelable:!0,detail:{source:e}}).defaultPrevented){const o=Nt(this,"dialog.denyClose",{dir:this.localize.dir()});Vt(this.panel,o.keyframes,o.options);return}this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}async handleOpenChange(){if(this.open){this.emit("sl-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.modal.activate(),zi(this);const e=this.querySelector("[autofocus]");e&&e.removeAttribute("autofocus"),await Promise.all([te(this.dialog),te(this.overlay)]),this.dialog.hidden=!1,requestAnimationFrame(()=>{this.emit("sl-initial-focus",{cancelable:!0}).defaultPrevented||(e?e.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),e&&e.setAttribute("autofocus","")});const t=Nt(this,"dialog.show",{dir:this.localize.dir()}),o=Nt(this,"dialog.overlay.show",{dir:this.localize.dir()});await Promise.all([Vt(this.panel,t.keyframes,t.options),Vt(this.overlay,o.keyframes,o.options)]),this.emit("sl-after-show")}else{this.emit("sl-hide"),this.removeOpenListeners(),this.modal.deactivate(),await Promise.all([te(this.dialog),te(this.overlay)]);const e=Nt(this,"dialog.hide",{dir:this.localize.dir()}),t=Nt(this,"dialog.overlay.hide",{dir:this.localize.dir()});await Promise.all([Vt(this.overlay,t.keyframes,t.options).then(()=>{this.overlay.hidden=!0}),Vt(this.panel,e.keyframes,e.options).then(()=>{this.panel.hidden=!0})]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,Ri(this);const o=this.originalTrigger;typeof(o==null?void 0:o.focus)=="function"&&setTimeout(()=>o.focus()),this.emit("sl-after-hide")}}async show(){if(!this.open)return this.open=!0,Re(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,Re(this,"sl-after-hide")}render(){return A`
2084
2085
  <div
2085
2086
  part="base"
2086
- class=${Q({dialog:!0,"dialog--open":this.open,"dialog--has-footer":this.hasSlotController.test("footer")})}
2087
+ class=${K({dialog:!0,"dialog--open":this.open,"dialog--has-footer":this.hasSlotController.test("footer")})}
2087
2088
  >
2088
2089
  <div part="overlay" class="dialog__overlay" @click=${()=>this.requestClose("overlay")} tabindex="-1"></div>
2089
2090
 
@@ -2097,7 +2098,7 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
2097
2098
  aria-labelledby=${E(this.noHeader?void 0:"title")}
2098
2099
  tabindex="-1"
2099
2100
  >
2100
- ${this.noHeader?"":P`
2101
+ ${this.noHeader?"":A`
2101
2102
  <header part="header" class="dialog__header">
2102
2103
  <h2 part="title" class="dialog__title" id="title">
2103
2104
  <slot name="label"> ${this.label.length>0?this.label:String.fromCharCode(65279)} </slot>
@@ -2124,8 +2125,8 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
2124
2125
  </footer>
2125
2126
  </div>
2126
2127
  </div>
2127
- `}};Dt.styles=Wc,Dt.dependencies={"sl-icon-button":at},p([j(".dialog")],Dt.prototype,"dialog",2),p([j(".dialog__panel")],Dt.prototype,"panel",2),p([j(".dialog__overlay")],Dt.prototype,"overlay",2),p([g({type:Boolean,reflect:!0})],Dt.prototype,"open",2),p([g({reflect:!0})],Dt.prototype,"label",2),p([g({attribute:"no-header",type:Boolean,reflect:!0})],Dt.prototype,"noHeader",2),p([U("open",{waitUntilFirstUpdate:!0})],Dt.prototype,"handleOpenChange",1),Vt("dialog.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),Vt("dialog.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}}),Vt("dialog.denyClose",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}}),Vt("dialog.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}}),Vt("dialog.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}}),Dt.define("sl-dialog");var Xc=Z`
2128
- ${tt}
2128
+ `}};qt.styles=qu,qt.dependencies={"sl-icon-button":nt},f([V(".dialog")],qt.prototype,"dialog",2),f([V(".dialog__panel")],qt.prototype,"panel",2),f([V(".dialog__overlay")],qt.prototype,"overlay",2),f([g({type:Boolean,reflect:!0})],qt.prototype,"open",2),f([g({reflect:!0})],qt.prototype,"label",2),f([g({attribute:"no-header",type:Boolean,reflect:!0})],qt.prototype,"noHeader",2),f([H("open",{waitUntilFirstUpdate:!0})],qt.prototype,"handleOpenChange",1),Ot("dialog.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),Ot("dialog.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}}),Ot("dialog.denyClose",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}}),Ot("dialog.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}}),Ot("dialog.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}}),qt.define("sl-dialog");var Ru=z`
2129
+ ${Q}
2129
2130
 
2130
2131
  :host {
2131
2132
  --indicator-color: var(--sl-color-primary-600);
@@ -2355,15 +2356,15 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
2355
2356
  .tab-group--end ::slotted(sl-tab-panel) {
2356
2357
  --padding: 0 var(--sl-spacing-medium);
2357
2358
  }
2358
- `,pt=class extends G{constructor(){super(...arguments),this.localize=new Jt(this),this.tabs=[],this.panels=[],this.hasScrollControls=!1,this.placement="top",this.activation="auto",this.noScrollControls=!1}connectedCallback(){const e=Promise.all([customElements.whenDefined("sl-tab"),customElements.whenDefined("sl-tab-panel")]);super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>{this.repositionIndicator(),this.updateScrollControls()}),this.mutationObserver=new MutationObserver(t=>{t.some(o=>!["aria-labelledby","aria-controls"].includes(o.attributeName))&&setTimeout(()=>this.setAriaLabels()),t.some(o=>o.attributeName==="disabled")&&this.syncTabsAndPanels()}),this.updateComplete.then(()=>{this.syncTabsAndPanels(),this.mutationObserver.observe(this,{attributes:!0,childList:!0,subtree:!0}),this.resizeObserver.observe(this.nav),e.then(()=>{new IntersectionObserver((o,r)=>{var s;o[0].intersectionRatio>0&&(this.setAriaLabels(),this.setActiveTab((s=this.getActiveTab())!=null?s:this.tabs[0],{emitEvents:!1}),r.unobserve(o[0].target))}).observe(this.tabGroup)})})}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver.disconnect(),this.resizeObserver.unobserve(this.nav)}getAllTabs(e={includeDisabled:!0}){return[...this.shadowRoot.querySelector('slot[name="nav"]').assignedElements()].filter(o=>e.includeDisabled?o.tagName.toLowerCase()==="sl-tab":o.tagName.toLowerCase()==="sl-tab"&&!o.disabled)}getAllPanels(){return[...this.body.assignedElements()].filter(e=>e.tagName.toLowerCase()==="sl-tab-panel")}getActiveTab(){return this.tabs.find(e=>e.active)}handleClick(e){const o=e.target.closest("sl-tab");(o==null?void 0:o.closest("sl-tab-group"))===this&&o!==null&&this.setActiveTab(o,{scrollBehavior:"smooth"})}handleKeyDown(e){const o=e.target.closest("sl-tab");if((o==null?void 0:o.closest("sl-tab-group"))===this&&(["Enter"," "].includes(e.key)&&o!==null&&(this.setActiveTab(o,{scrollBehavior:"smooth"}),e.preventDefault()),["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(e.key))){const s=this.tabs.find(i=>i.matches(":focus")),n=this.localize.dir()==="rtl";if((s==null?void 0:s.tagName.toLowerCase())==="sl-tab"){let i=this.tabs.indexOf(s);e.key==="Home"?i=0:e.key==="End"?i=this.tabs.length-1:["top","bottom"].includes(this.placement)&&e.key===(n?"ArrowRight":"ArrowLeft")||["start","end"].includes(this.placement)&&e.key==="ArrowUp"?i--:(["top","bottom"].includes(this.placement)&&e.key===(n?"ArrowLeft":"ArrowRight")||["start","end"].includes(this.placement)&&e.key==="ArrowDown")&&i++,i<0&&(i=this.tabs.length-1),i>this.tabs.length-1&&(i=0),this.tabs[i].focus({preventScroll:!0}),this.activation==="auto"&&this.setActiveTab(this.tabs[i],{scrollBehavior:"smooth"}),["top","bottom"].includes(this.placement)&&gi(this.tabs[i],this.nav,"horizontal"),e.preventDefault()}}}handleScrollToStart(){this.nav.scroll({left:this.localize.dir()==="rtl"?this.nav.scrollLeft+this.nav.clientWidth:this.nav.scrollLeft-this.nav.clientWidth,behavior:"smooth"})}handleScrollToEnd(){this.nav.scroll({left:this.localize.dir()==="rtl"?this.nav.scrollLeft-this.nav.clientWidth:this.nav.scrollLeft+this.nav.clientWidth,behavior:"smooth"})}setActiveTab(e,t){if(t=Qt({emitEvents:!0,scrollBehavior:"auto"},t),e!==this.activeTab&&!e.disabled){const o=this.activeTab;this.activeTab=e,this.tabs.forEach(r=>r.active=r===this.activeTab),this.panels.forEach(r=>{var s;return r.active=r.name===((s=this.activeTab)==null?void 0:s.panel)}),this.syncIndicator(),["top","bottom"].includes(this.placement)&&gi(this.activeTab,this.nav,"horizontal",t.scrollBehavior),t.emitEvents&&(o&&this.emit("sl-tab-hide",{detail:{name:o.panel}}),this.emit("sl-tab-show",{detail:{name:this.activeTab.panel}}))}}setAriaLabels(){this.tabs.forEach(e=>{const t=this.panels.find(o=>o.name===e.panel);t&&(e.setAttribute("aria-controls",t.getAttribute("id")),t.setAttribute("aria-labelledby",e.getAttribute("id")))})}repositionIndicator(){const e=this.getActiveTab();if(!e)return;const t=e.clientWidth,o=e.clientHeight,r=this.localize.dir()==="rtl",s=this.getAllTabs(),i=s.slice(0,s.indexOf(e)).reduce((a,l)=>({left:a.left+l.clientWidth,top:a.top+l.clientHeight}),{left:0,top:0});switch(this.placement){case"top":case"bottom":this.indicator.style.width=`${t}px`,this.indicator.style.height="auto",this.indicator.style.translate=r?`${-1*i.left}px`:`${i.left}px`;break;case"start":case"end":this.indicator.style.width="auto",this.indicator.style.height=`${o}px`,this.indicator.style.translate=`0 ${i.top}px`;break}}syncTabsAndPanels(){this.tabs=this.getAllTabs({includeDisabled:!1}),this.panels=this.getAllPanels(),this.syncIndicator(),this.updateComplete.then(()=>this.updateScrollControls())}updateScrollControls(){this.noScrollControls?this.hasScrollControls=!1:this.hasScrollControls=["top","bottom"].includes(this.placement)&&this.nav.scrollWidth>this.nav.clientWidth}syncIndicator(){this.getActiveTab()?(this.indicator.style.display="block",this.repositionIndicator()):this.indicator.style.display="none"}show(e){const t=this.tabs.find(o=>o.panel===e);t&&this.setActiveTab(t,{scrollBehavior:"smooth"})}render(){const e=this.localize.dir()==="rtl";return P`
2359
+ `,ht=class extends j{constructor(){super(...arguments),this.localize=new Jt(this),this.tabs=[],this.panels=[],this.hasScrollControls=!1,this.placement="top",this.activation="auto",this.noScrollControls=!1}connectedCallback(){const e=Promise.all([customElements.whenDefined("sl-tab"),customElements.whenDefined("sl-tab-panel")]);super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>{this.repositionIndicator(),this.updateScrollControls()}),this.mutationObserver=new MutationObserver(t=>{t.some(o=>!["aria-labelledby","aria-controls"].includes(o.attributeName))&&setTimeout(()=>this.setAriaLabels()),t.some(o=>o.attributeName==="disabled")&&this.syncTabsAndPanels()}),this.updateComplete.then(()=>{this.syncTabsAndPanels(),this.mutationObserver.observe(this,{attributes:!0,childList:!0,subtree:!0}),this.resizeObserver.observe(this.nav),e.then(()=>{new IntersectionObserver((o,r)=>{var s;o[0].intersectionRatio>0&&(this.setAriaLabels(),this.setActiveTab((s=this.getActiveTab())!=null?s:this.tabs[0],{emitEvents:!1}),r.unobserve(o[0].target))}).observe(this.tabGroup)})})}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver.disconnect(),this.resizeObserver.unobserve(this.nav)}getAllTabs(e={includeDisabled:!0}){return[...this.shadowRoot.querySelector('slot[name="nav"]').assignedElements()].filter(o=>e.includeDisabled?o.tagName.toLowerCase()==="sl-tab":o.tagName.toLowerCase()==="sl-tab"&&!o.disabled)}getAllPanels(){return[...this.body.assignedElements()].filter(e=>e.tagName.toLowerCase()==="sl-tab-panel")}getActiveTab(){return this.tabs.find(e=>e.active)}handleClick(e){const o=e.target.closest("sl-tab");(o==null?void 0:o.closest("sl-tab-group"))===this&&o!==null&&this.setActiveTab(o,{scrollBehavior:"smooth"})}handleKeyDown(e){const o=e.target.closest("sl-tab");if((o==null?void 0:o.closest("sl-tab-group"))===this&&(["Enter"," "].includes(e.key)&&o!==null&&(this.setActiveTab(o,{scrollBehavior:"smooth"}),e.preventDefault()),["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(e.key))){const s=this.tabs.find(i=>i.matches(":focus")),n=this.localize.dir()==="rtl";if((s==null?void 0:s.tagName.toLowerCase())==="sl-tab"){let i=this.tabs.indexOf(s);e.key==="Home"?i=0:e.key==="End"?i=this.tabs.length-1:["top","bottom"].includes(this.placement)&&e.key===(n?"ArrowRight":"ArrowLeft")||["start","end"].includes(this.placement)&&e.key==="ArrowUp"?i--:(["top","bottom"].includes(this.placement)&&e.key===(n?"ArrowLeft":"ArrowRight")||["start","end"].includes(this.placement)&&e.key==="ArrowDown")&&i++,i<0&&(i=this.tabs.length-1),i>this.tabs.length-1&&(i=0),this.tabs[i].focus({preventScroll:!0}),this.activation==="auto"&&this.setActiveTab(this.tabs[i],{scrollBehavior:"smooth"}),["top","bottom"].includes(this.placement)&&Pi(this.tabs[i],this.nav,"horizontal"),e.preventDefault()}}}handleScrollToStart(){this.nav.scroll({left:this.localize.dir()==="rtl"?this.nav.scrollLeft+this.nav.clientWidth:this.nav.scrollLeft-this.nav.clientWidth,behavior:"smooth"})}handleScrollToEnd(){this.nav.scroll({left:this.localize.dir()==="rtl"?this.nav.scrollLeft-this.nav.clientWidth:this.nav.scrollLeft+this.nav.clientWidth,behavior:"smooth"})}setActiveTab(e,t){if(t=Qt({emitEvents:!0,scrollBehavior:"auto"},t),e!==this.activeTab&&!e.disabled){const o=this.activeTab;this.activeTab=e,this.tabs.forEach(r=>r.active=r===this.activeTab),this.panels.forEach(r=>{var s;return r.active=r.name===((s=this.activeTab)==null?void 0:s.panel)}),this.syncIndicator(),["top","bottom"].includes(this.placement)&&Pi(this.activeTab,this.nav,"horizontal",t.scrollBehavior),t.emitEvents&&(o&&this.emit("sl-tab-hide",{detail:{name:o.panel}}),this.emit("sl-tab-show",{detail:{name:this.activeTab.panel}}))}}setAriaLabels(){this.tabs.forEach(e=>{const t=this.panels.find(o=>o.name===e.panel);t&&(e.setAttribute("aria-controls",t.getAttribute("id")),t.setAttribute("aria-labelledby",e.getAttribute("id")))})}repositionIndicator(){const e=this.getActiveTab();if(!e)return;const t=e.clientWidth,o=e.clientHeight,r=this.localize.dir()==="rtl",s=this.getAllTabs(),i=s.slice(0,s.indexOf(e)).reduce((a,l)=>({left:a.left+l.clientWidth,top:a.top+l.clientHeight}),{left:0,top:0});switch(this.placement){case"top":case"bottom":this.indicator.style.width=`${t}px`,this.indicator.style.height="auto",this.indicator.style.translate=r?`${-1*i.left}px`:`${i.left}px`;break;case"start":case"end":this.indicator.style.width="auto",this.indicator.style.height=`${o}px`,this.indicator.style.translate=`0 ${i.top}px`;break}}syncTabsAndPanels(){this.tabs=this.getAllTabs({includeDisabled:!1}),this.panels=this.getAllPanels(),this.syncIndicator(),this.updateComplete.then(()=>this.updateScrollControls())}updateScrollControls(){this.noScrollControls?this.hasScrollControls=!1:this.hasScrollControls=["top","bottom"].includes(this.placement)&&this.nav.scrollWidth>this.nav.clientWidth}syncIndicator(){this.getActiveTab()?(this.indicator.style.display="block",this.repositionIndicator()):this.indicator.style.display="none"}show(e){const t=this.tabs.find(o=>o.panel===e);t&&this.setActiveTab(t,{scrollBehavior:"smooth"})}render(){const e=this.localize.dir()==="rtl";return A`
2359
2360
  <div
2360
2361
  part="base"
2361
- class=${Q({"tab-group":!0,"tab-group--top":this.placement==="top","tab-group--bottom":this.placement==="bottom","tab-group--start":this.placement==="start","tab-group--end":this.placement==="end","tab-group--rtl":this.localize.dir()==="rtl","tab-group--has-scroll-controls":this.hasScrollControls})}
2362
+ class=${K({"tab-group":!0,"tab-group--top":this.placement==="top","tab-group--bottom":this.placement==="bottom","tab-group--start":this.placement==="start","tab-group--end":this.placement==="end","tab-group--rtl":this.localize.dir()==="rtl","tab-group--has-scroll-controls":this.hasScrollControls})}
2362
2363
  @click=${this.handleClick}
2363
2364
  @keydown=${this.handleKeyDown}
2364
2365
  >
2365
2366
  <div class="tab-group__nav-container" part="nav">
2366
- ${this.hasScrollControls?P`
2367
+ ${this.hasScrollControls?A`
2367
2368
  <sl-icon-button
2368
2369
  part="scroll-button scroll-button--start"
2369
2370
  exportparts="base:scroll-button__base"
@@ -2382,7 +2383,7 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
2382
2383
  </div>
2383
2384
  </div>
2384
2385
 
2385
- ${this.hasScrollControls?P`
2386
+ ${this.hasScrollControls?A`
2386
2387
  <sl-icon-button
2387
2388
  part="scroll-button scroll-button--end"
2388
2389
  exportparts="base:scroll-button__base"
@@ -2397,8 +2398,8 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
2397
2398
 
2398
2399
  <slot part="body" class="tab-group__body" @slotchange=${this.syncTabsAndPanels}></slot>
2399
2400
  </div>
2400
- `}};pt.styles=Xc,pt.dependencies={"sl-icon-button":at},p([j(".tab-group")],pt.prototype,"tabGroup",2),p([j(".tab-group__body")],pt.prototype,"body",2),p([j(".tab-group__nav")],pt.prototype,"nav",2),p([j(".tab-group__indicator")],pt.prototype,"indicator",2),p([it()],pt.prototype,"hasScrollControls",2),p([g()],pt.prototype,"placement",2),p([g()],pt.prototype,"activation",2),p([g({attribute:"no-scroll-controls",type:Boolean})],pt.prototype,"noScrollControls",2),p([U("noScrollControls",{waitUntilFirstUpdate:!0})],pt.prototype,"updateScrollControls",1),p([U("placement",{waitUntilFirstUpdate:!0})],pt.prototype,"syncIndicator",1),pt.define("sl-tab-group");var tu=Z`
2401
- ${tt}
2401
+ `}};ht.styles=Ru,ht.dependencies={"sl-icon-button":nt},f([V(".tab-group")],ht.prototype,"tabGroup",2),f([V(".tab-group__body")],ht.prototype,"body",2),f([V(".tab-group__nav")],ht.prototype,"nav",2),f([V(".tab-group__indicator")],ht.prototype,"indicator",2),f([rt()],ht.prototype,"hasScrollControls",2),f([g()],ht.prototype,"placement",2),f([g()],ht.prototype,"activation",2),f([g({attribute:"no-scroll-controls",type:Boolean})],ht.prototype,"noScrollControls",2),f([H("noScrollControls",{waitUntilFirstUpdate:!0})],ht.prototype,"updateScrollControls",1),f([H("placement",{waitUntilFirstUpdate:!0})],ht.prototype,"syncIndicator",1),ht.define("sl-tab-group");var Pu=z`
2402
+ ${Q}
2402
2403
 
2403
2404
  :host {
2404
2405
  display: inline-block;
@@ -2467,14 +2468,14 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
2467
2468
  outline-offset: -3px;
2468
2469
  }
2469
2470
  }
2470
- `,eu=0,Tt=class extends G{constructor(){super(...arguments),this.localize=new Jt(this),this.attrId=++eu,this.componentId=`sl-tab-${this.attrId}`,this.panel="",this.active=!1,this.closable=!1,this.disabled=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","tab")}handleCloseClick(e){e.stopPropagation(),this.emit("sl-close")}handleActiveChange(){this.setAttribute("aria-selected",this.active?"true":"false")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}focus(e){this.tab.focus(e)}blur(){this.tab.blur()}render(){return this.id=this.id.length>0?this.id:this.componentId,P`
2471
+ `,Mu=0,Dt=class extends j{constructor(){super(...arguments),this.localize=new Jt(this),this.attrId=++Mu,this.componentId=`sl-tab-${this.attrId}`,this.panel="",this.active=!1,this.closable=!1,this.disabled=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","tab")}handleCloseClick(e){e.stopPropagation(),this.emit("sl-close")}handleActiveChange(){this.setAttribute("aria-selected",this.active?"true":"false")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}focus(e){this.tab.focus(e)}blur(){this.tab.blur()}render(){return this.id=this.id.length>0?this.id:this.componentId,A`
2471
2472
  <div
2472
2473
  part="base"
2473
- class=${Q({tab:!0,"tab--active":this.active,"tab--closable":this.closable,"tab--disabled":this.disabled})}
2474
+ class=${K({tab:!0,"tab--active":this.active,"tab--closable":this.closable,"tab--disabled":this.disabled})}
2474
2475
  tabindex=${this.disabled?"-1":"0"}
2475
2476
  >
2476
2477
  <slot></slot>
2477
- ${this.closable?P`
2478
+ ${this.closable?A`
2478
2479
  <sl-icon-button
2479
2480
  part="close-button"
2480
2481
  exportparts="base:close-button__base"
@@ -2487,8 +2488,8 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
2487
2488
  ></sl-icon-button>
2488
2489
  `:""}
2489
2490
  </div>
2490
- `}};Tt.styles=tu,Tt.dependencies={"sl-icon-button":at},p([j(".tab")],Tt.prototype,"tab",2),p([g({reflect:!0})],Tt.prototype,"panel",2),p([g({type:Boolean,reflect:!0})],Tt.prototype,"active",2),p([g({type:Boolean})],Tt.prototype,"closable",2),p([g({type:Boolean,reflect:!0})],Tt.prototype,"disabled",2),p([U("active")],Tt.prototype,"handleActiveChange",1),p([U("disabled")],Tt.prototype,"handleDisabledChange",1),Tt.define("sl-tab");var ou=Z`
2491
- ${tt}
2491
+ `}};Dt.styles=Pu,Dt.dependencies={"sl-icon-button":nt},f([V(".tab")],Dt.prototype,"tab",2),f([g({reflect:!0})],Dt.prototype,"panel",2),f([g({type:Boolean,reflect:!0})],Dt.prototype,"active",2),f([g({type:Boolean})],Dt.prototype,"closable",2),f([g({type:Boolean,reflect:!0})],Dt.prototype,"disabled",2),f([H("active")],Dt.prototype,"handleActiveChange",1),f([H("disabled")],Dt.prototype,"handleDisabledChange",1),Dt.define("sl-tab");var Iu=z`
2492
+ ${Q}
2492
2493
 
2493
2494
  :host {
2494
2495
  --padding: 0;
@@ -2504,13 +2505,13 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
2504
2505
  display: block;
2505
2506
  padding: var(--padding);
2506
2507
  }
2507
- `,ru=0,fo=class extends G{constructor(){super(...arguments),this.attrId=++ru,this.componentId=`sl-tab-panel-${this.attrId}`,this.name="",this.active=!1}connectedCallback(){super.connectedCallback(),this.id=this.id.length>0?this.id:this.componentId,this.setAttribute("role","tabpanel")}handleActiveChange(){this.setAttribute("aria-hidden",this.active?"false":"true")}render(){return P`
2508
+ `,Fu=0,wo=class extends j{constructor(){super(...arguments),this.attrId=++Fu,this.componentId=`sl-tab-panel-${this.attrId}`,this.name="",this.active=!1}connectedCallback(){super.connectedCallback(),this.id=this.id.length>0?this.id:this.componentId,this.setAttribute("role","tabpanel")}handleActiveChange(){this.setAttribute("aria-hidden",this.active?"false":"true")}render(){return A`
2508
2509
  <slot
2509
2510
  part="base"
2510
- class=${Q({"tab-panel":!0,"tab-panel--active":this.active})}
2511
+ class=${K({"tab-panel":!0,"tab-panel--active":this.active})}
2511
2512
  ></slot>
2512
- `}};fo.styles=ou,p([g({reflect:!0})],fo.prototype,"name",2),p([g({type:Boolean,reflect:!0})],fo.prototype,"active",2),p([U("active")],fo.prototype,"handleActiveChange",1),fo.define("sl-tab-panel");var su=Z`
2513
- ${tt}
2513
+ `}};wo.styles=Iu,f([g({reflect:!0})],wo.prototype,"name",2),f([g({type:Boolean,reflect:!0})],wo.prototype,"active",2),f([H("active")],wo.prototype,"handleActiveChange",1),wo.define("sl-tab-panel");var Bu=z`
2514
+ ${Q}
2514
2515
 
2515
2516
  :host {
2516
2517
  display: block;
@@ -2623,20 +2624,20 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
2623
2624
  user-select: none;
2624
2625
  -webkit-user-select: none;
2625
2626
  }
2626
- `,Lt=class extends G{constructor(){super(),this.checked=!1,this.hasFocus=!1,this.size="medium",this.disabled=!1,this.handleBlur=()=>{this.hasFocus=!1,this.emit("sl-blur")},this.handleClick=()=>{this.disabled||(this.checked=!0)},this.handleFocus=()=>{this.hasFocus=!0,this.emit("sl-focus")},this.addEventListener("blur",this.handleBlur),this.addEventListener("click",this.handleClick),this.addEventListener("focus",this.handleFocus)}connectedCallback(){super.connectedCallback(),this.setInitialAttributes()}setInitialAttributes(){this.setAttribute("role","radio"),this.setAttribute("tabindex","-1"),this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleCheckedChange(){this.setAttribute("aria-checked",this.checked?"true":"false"),this.setAttribute("tabindex",this.checked?"0":"-1")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}render(){return P`
2627
+ `,Tt=class extends j{constructor(){super(),this.checked=!1,this.hasFocus=!1,this.size="medium",this.disabled=!1,this.handleBlur=()=>{this.hasFocus=!1,this.emit("sl-blur")},this.handleClick=()=>{this.disabled||(this.checked=!0)},this.handleFocus=()=>{this.hasFocus=!0,this.emit("sl-focus")},this.addEventListener("blur",this.handleBlur),this.addEventListener("click",this.handleClick),this.addEventListener("focus",this.handleFocus)}connectedCallback(){super.connectedCallback(),this.setInitialAttributes()}setInitialAttributes(){this.setAttribute("role","radio"),this.setAttribute("tabindex","-1"),this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleCheckedChange(){this.setAttribute("aria-checked",this.checked?"true":"false"),this.setAttribute("tabindex",this.checked?"0":"-1")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}render(){return A`
2627
2628
  <span
2628
2629
  part="base"
2629
- class=${Q({radio:!0,"radio--checked":this.checked,"radio--disabled":this.disabled,"radio--focused":this.hasFocus,"radio--small":this.size==="small","radio--medium":this.size==="medium","radio--large":this.size==="large"})}
2630
+ class=${K({radio:!0,"radio--checked":this.checked,"radio--disabled":this.disabled,"radio--focused":this.hasFocus,"radio--small":this.size==="small","radio--medium":this.size==="medium","radio--large":this.size==="large"})}
2630
2631
  >
2631
2632
  <span part="${`control${this.checked?" control--checked":""}`}" class="radio__control">
2632
- ${this.checked?P` <sl-icon part="checked-icon" class="radio__checked-icon" library="system" name="radio"></sl-icon> `:""}
2633
+ ${this.checked?A` <sl-icon part="checked-icon" class="radio__checked-icon" library="system" name="radio"></sl-icon> `:""}
2633
2634
  </span>
2634
2635
 
2635
2636
  <slot part="label" class="radio__label"></slot>
2636
2637
  </span>
2637
- `}};Lt.styles=su,Lt.dependencies={"sl-icon":ht},p([it()],Lt.prototype,"checked",2),p([it()],Lt.prototype,"hasFocus",2),p([g()],Lt.prototype,"value",2),p([g({reflect:!0})],Lt.prototype,"size",2),p([g({type:Boolean,reflect:!0})],Lt.prototype,"disabled",2),p([U("checked")],Lt.prototype,"handleCheckedChange",1),p([U("disabled",{waitUntilFirstUpdate:!0})],Lt.prototype,"handleDisabledChange",1),Lt.define("sl-radio");var nu=Z`
2638
- ${tt}
2639
- ${is}
2638
+ `}};Tt.styles=Bu,Tt.dependencies={"sl-icon":dt},f([rt()],Tt.prototype,"checked",2),f([rt()],Tt.prototype,"hasFocus",2),f([g()],Tt.prototype,"value",2),f([g({reflect:!0})],Tt.prototype,"size",2),f([g({type:Boolean,reflect:!0})],Tt.prototype,"disabled",2),f([H("checked")],Tt.prototype,"handleCheckedChange",1),f([H("disabled",{waitUntilFirstUpdate:!0})],Tt.prototype,"handleDisabledChange",1),Tt.define("sl-radio");var Ou=z`
2639
+ ${Q}
2640
+ ${ms}
2640
2641
 
2641
2642
  :host {
2642
2643
  display: block;
@@ -2669,8 +2670,8 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
2669
2670
  white-space: nowrap;
2670
2671
  border: 0;
2671
2672
  }
2672
- `,iu=Z`
2673
- ${tt}
2673
+ `,Nu=z`
2674
+ ${Q}
2674
2675
 
2675
2676
  :host {
2676
2677
  display: inline-block;
@@ -2680,7 +2681,7 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
2680
2681
  display: flex;
2681
2682
  flex-wrap: nowrap;
2682
2683
  }
2683
- `,go=class extends G{constructor(){super(...arguments),this.disableRole=!1,this.label=""}handleFocus(e){const t=bo(e.target);t==null||t.classList.add("sl-button-group__button--focus")}handleBlur(e){const t=bo(e.target);t==null||t.classList.remove("sl-button-group__button--focus")}handleMouseOver(e){const t=bo(e.target);t==null||t.classList.add("sl-button-group__button--hover")}handleMouseOut(e){const t=bo(e.target);t==null||t.classList.remove("sl-button-group__button--hover")}handleSlotChange(){const e=[...this.defaultSlot.assignedElements({flatten:!0})];e.forEach(t=>{const o=e.indexOf(t),r=bo(t);r&&(r.classList.add("sl-button-group__button"),r.classList.toggle("sl-button-group__button--first",o===0),r.classList.toggle("sl-button-group__button--inner",o>0&&o<e.length-1),r.classList.toggle("sl-button-group__button--last",o===e.length-1),r.classList.toggle("sl-button-group__button--radio",r.tagName.toLowerCase()==="sl-radio-button"))})}render(){return P`
2684
+ `,_o=class extends j{constructor(){super(...arguments),this.disableRole=!1,this.label=""}handleFocus(e){const t=xo(e.target);t==null||t.classList.add("sl-button-group__button--focus")}handleBlur(e){const t=xo(e.target);t==null||t.classList.remove("sl-button-group__button--focus")}handleMouseOver(e){const t=xo(e.target);t==null||t.classList.add("sl-button-group__button--hover")}handleMouseOut(e){const t=xo(e.target);t==null||t.classList.remove("sl-button-group__button--hover")}handleSlotChange(){const e=[...this.defaultSlot.assignedElements({flatten:!0})];e.forEach(t=>{const o=e.indexOf(t),r=xo(t);r&&(r.classList.add("sl-button-group__button"),r.classList.toggle("sl-button-group__button--first",o===0),r.classList.toggle("sl-button-group__button--inner",o>0&&o<e.length-1),r.classList.toggle("sl-button-group__button--last",o===e.length-1),r.classList.toggle("sl-button-group__button--radio",r.tagName.toLowerCase()==="sl-radio-button"))})}render(){return A`
2684
2685
  <div
2685
2686
  part="base"
2686
2687
  class="button-group"
@@ -2693,12 +2694,12 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
2693
2694
  >
2694
2695
  <slot @slotchange=${this.handleSlotChange}></slot>
2695
2696
  </div>
2696
- `}};go.styles=iu,p([j("slot")],go.prototype,"defaultSlot",2),p([it()],go.prototype,"disableRole",2),p([g()],go.prototype,"label",2);function bo(e){var t;const o="sl-button, sl-radio-button";return(t=e.closest(o))!=null?t:e.querySelector(o)}var rt=class extends G{constructor(){super(...arguments),this.formControlController=new co(this),this.hasSlotController=new ge(this,"help-text","label"),this.customValidityMessage="",this.hasButtonGroup=!1,this.errorMessage="",this.defaultValue="",this.label="",this.helpText="",this.name="option",this.value="",this.size="medium",this.form="",this.required=!1}get validity(){const e=this.required&&!this.value;return this.customValidityMessage!==""?xc:e?_c:No}get validationMessage(){const e=this.required&&!this.value;return this.customValidityMessage!==""?this.customValidityMessage:e?this.validationInput.validationMessage:""}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value}firstUpdated(){this.formControlController.updateValidity()}getAllRadios(){return[...this.querySelectorAll("sl-radio, sl-radio-button")]}handleRadioClick(e){const t=e.target.closest("sl-radio, sl-radio-button"),o=this.getAllRadios(),r=this.value;t.disabled||(this.value=t.value,o.forEach(s=>s.checked=s===t),this.value!==r&&(this.emit("sl-change"),this.emit("sl-input")))}handleKeyDown(e){var t;if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(e.key))return;const o=this.getAllRadios().filter(a=>!a.disabled),r=(t=o.find(a=>a.checked))!=null?t:o[0],s=e.key===" "?0:["ArrowUp","ArrowLeft"].includes(e.key)?-1:1,n=this.value;let i=o.indexOf(r)+s;i<0&&(i=o.length-1),i>o.length-1&&(i=0),this.getAllRadios().forEach(a=>{a.checked=!1,this.hasButtonGroup||(a.tabIndex=-1)}),this.value=o[i].value,o[i].checked=!0,this.hasButtonGroup?o[i].shadowRoot.querySelector("button").focus():(o[i].tabIndex=0,o[i].focus()),this.value!==n&&(this.emit("sl-change"),this.emit("sl-input")),e.preventDefault()}handleLabelClick(){const e=this.getAllRadios(),o=e.find(r=>r.checked)||e[0];o&&o.focus()}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}async syncRadioElements(){var e,t;const o=this.getAllRadios();if(await Promise.all(o.map(async r=>{await r.updateComplete,r.checked=r.value===this.value,r.size=this.size})),this.hasButtonGroup=o.some(r=>r.tagName.toLowerCase()==="sl-radio-button"),!o.some(r=>r.checked))if(this.hasButtonGroup){const r=(e=o[0].shadowRoot)==null?void 0:e.querySelector("button");r&&(r.tabIndex=0)}else o[0].tabIndex=0;if(this.hasButtonGroup){const r=(t=this.shadowRoot)==null?void 0:t.querySelector("sl-button-group");r&&(r.disableRole=!0)}}syncRadios(){if(customElements.get("sl-radio")&&customElements.get("sl-radio-button")){this.syncRadioElements();return}customElements.get("sl-radio")?this.syncRadioElements():customElements.whenDefined("sl-radio").then(()=>this.syncRadios()),customElements.get("sl-radio-button")?this.syncRadioElements():customElements.whenDefined("sl-radio-button").then(()=>this.syncRadios())}updateCheckedRadio(){this.getAllRadios().forEach(t=>t.checked=t.value===this.value),this.formControlController.setValidity(this.validity.valid)}handleSizeChange(){this.syncRadios()}handleValueChange(){this.hasUpdated&&this.updateCheckedRadio()}checkValidity(){const e=this.required&&!this.value,t=this.customValidityMessage!=="";return e||t?(this.formControlController.emitInvalidEvent(),!1):!0}getForm(){return this.formControlController.getForm()}reportValidity(){const e=this.validity.valid;return this.errorMessage=this.customValidityMessage||e?"":this.validationInput.validationMessage,this.formControlController.setValidity(e),this.validationInput.hidden=!0,clearTimeout(this.validationTimeout),e||(this.validationInput.hidden=!1,this.validationInput.reportValidity(),this.validationTimeout=setTimeout(()=>this.validationInput.hidden=!0,1e4)),e}setCustomValidity(e=""){this.customValidityMessage=e,this.errorMessage=e,this.validationInput.setCustomValidity(e),this.formControlController.updateValidity()}render(){const e=this.hasSlotController.test("label"),t=this.hasSlotController.test("help-text"),o=this.label?!0:!!e,r=this.helpText?!0:!!t,s=P`
2697
+ `}};_o.styles=Nu,f([V("slot")],_o.prototype,"defaultSlot",2),f([rt()],_o.prototype,"disableRole",2),f([g()],_o.prototype,"label",2);function xo(e){var t;const o="sl-button, sl-radio-button";return(t=e.closest(o))!=null?t:e.querySelector(o)}var et=class extends j{constructor(){super(...arguments),this.formControlController=new go(this),this.hasSlotController=new _e(this,"help-text","label"),this.customValidityMessage="",this.hasButtonGroup=!1,this.errorMessage="",this.defaultValue="",this.label="",this.helpText="",this.name="option",this.value="",this.size="medium",this.form="",this.required=!1}get validity(){const e=this.required&&!this.value;return this.customValidityMessage!==""?ou:e?eu:Wo}get validationMessage(){const e=this.required&&!this.value;return this.customValidityMessage!==""?this.customValidityMessage:e?this.validationInput.validationMessage:""}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value}firstUpdated(){this.formControlController.updateValidity()}getAllRadios(){return[...this.querySelectorAll("sl-radio, sl-radio-button")]}handleRadioClick(e){const t=e.target.closest("sl-radio, sl-radio-button"),o=this.getAllRadios(),r=this.value;t.disabled||(this.value=t.value,o.forEach(s=>s.checked=s===t),this.value!==r&&(this.emit("sl-change"),this.emit("sl-input")))}handleKeyDown(e){var t;if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(e.key))return;const o=this.getAllRadios().filter(a=>!a.disabled),r=(t=o.find(a=>a.checked))!=null?t:o[0],s=e.key===" "?0:["ArrowUp","ArrowLeft"].includes(e.key)?-1:1,n=this.value;let i=o.indexOf(r)+s;i<0&&(i=o.length-1),i>o.length-1&&(i=0),this.getAllRadios().forEach(a=>{a.checked=!1,this.hasButtonGroup||(a.tabIndex=-1)}),this.value=o[i].value,o[i].checked=!0,this.hasButtonGroup?o[i].shadowRoot.querySelector("button").focus():(o[i].tabIndex=0,o[i].focus()),this.value!==n&&(this.emit("sl-change"),this.emit("sl-input")),e.preventDefault()}handleLabelClick(){const e=this.getAllRadios(),o=e.find(r=>r.checked)||e[0];o&&o.focus()}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}async syncRadioElements(){var e,t;const o=this.getAllRadios();if(await Promise.all(o.map(async r=>{await r.updateComplete,r.checked=r.value===this.value,r.size=this.size})),this.hasButtonGroup=o.some(r=>r.tagName.toLowerCase()==="sl-radio-button"),!o.some(r=>r.checked))if(this.hasButtonGroup){const r=(e=o[0].shadowRoot)==null?void 0:e.querySelector("button");r&&(r.tabIndex=0)}else o[0].tabIndex=0;if(this.hasButtonGroup){const r=(t=this.shadowRoot)==null?void 0:t.querySelector("sl-button-group");r&&(r.disableRole=!0)}}syncRadios(){if(customElements.get("sl-radio")&&customElements.get("sl-radio-button")){this.syncRadioElements();return}customElements.get("sl-radio")?this.syncRadioElements():customElements.whenDefined("sl-radio").then(()=>this.syncRadios()),customElements.get("sl-radio-button")?this.syncRadioElements():customElements.whenDefined("sl-radio-button").then(()=>this.syncRadios())}updateCheckedRadio(){this.getAllRadios().forEach(t=>t.checked=t.value===this.value),this.formControlController.setValidity(this.validity.valid)}handleSizeChange(){this.syncRadios()}handleValueChange(){this.hasUpdated&&this.updateCheckedRadio()}checkValidity(){const e=this.required&&!this.value,t=this.customValidityMessage!=="";return e||t?(this.formControlController.emitInvalidEvent(),!1):!0}getForm(){return this.formControlController.getForm()}reportValidity(){const e=this.validity.valid;return this.errorMessage=this.customValidityMessage||e?"":this.validationInput.validationMessage,this.formControlController.setValidity(e),this.validationInput.hidden=!0,clearTimeout(this.validationTimeout),e||(this.validationInput.hidden=!1,this.validationInput.reportValidity(),this.validationTimeout=setTimeout(()=>this.validationInput.hidden=!0,1e4)),e}setCustomValidity(e=""){this.customValidityMessage=e,this.errorMessage=e,this.validationInput.setCustomValidity(e),this.formControlController.updateValidity()}render(){const e=this.hasSlotController.test("label"),t=this.hasSlotController.test("help-text"),o=this.label?!0:!!e,r=this.helpText?!0:!!t,s=A`
2697
2698
  <slot @slotchange=${this.syncRadios} @click=${this.handleRadioClick} @keydown=${this.handleKeyDown}></slot>
2698
- `;return P`
2699
+ `;return A`
2699
2700
  <fieldset
2700
2701
  part="form-control"
2701
- class=${Q({"form-control":!0,"form-control--small":this.size==="small","form-control--medium":this.size==="medium","form-control--large":this.size==="large","form-control--radio-group":!0,"form-control--has-label":o,"form-control--has-help-text":r})}
2702
+ class=${K({"form-control":!0,"form-control--small":this.size==="small","form-control--medium":this.size==="medium","form-control--large":this.size==="large","form-control--radio-group":!0,"form-control--has-label":o,"form-control--has-help-text":r})}
2702
2703
  role="radiogroup"
2703
2704
  aria-labelledby="label"
2704
2705
  aria-describedby="help-text"
@@ -2729,7 +2730,7 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
2729
2730
  </label>
2730
2731
  </div>
2731
2732
 
2732
- ${this.hasButtonGroup?P`
2733
+ ${this.hasButtonGroup?A`
2733
2734
  <sl-button-group part="button-group" exportparts="base:button-group__base" role="presentation">
2734
2735
  ${s}
2735
2736
  </sl-button-group>
@@ -2745,8 +2746,8 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
2745
2746
  <slot name="help-text">${this.helpText}</slot>
2746
2747
  </div>
2747
2748
  </fieldset>
2748
- `}};rt.styles=nu,rt.dependencies={"sl-button-group":go},p([j("slot:not([name])")],rt.prototype,"defaultSlot",2),p([j(".radio-group__validation-input")],rt.prototype,"validationInput",2),p([it()],rt.prototype,"hasButtonGroup",2),p([it()],rt.prototype,"errorMessage",2),p([it()],rt.prototype,"defaultValue",2),p([g()],rt.prototype,"label",2),p([g({attribute:"help-text"})],rt.prototype,"helpText",2),p([g()],rt.prototype,"name",2),p([g({reflect:!0})],rt.prototype,"value",2),p([g({reflect:!0})],rt.prototype,"size",2),p([g({reflect:!0})],rt.prototype,"form",2),p([g({type:Boolean,reflect:!0})],rt.prototype,"required",2),p([U("size",{waitUntilFirstUpdate:!0})],rt.prototype,"handleSizeChange",1),p([U("value")],rt.prototype,"handleValueChange",1),rt.define("sl-radio-group");var au=Z`
2749
- ${ri}
2749
+ `}};et.styles=Ou,et.dependencies={"sl-button-group":_o},f([V("slot:not([name])")],et.prototype,"defaultSlot",2),f([V(".radio-group__validation-input")],et.prototype,"validationInput",2),f([rt()],et.prototype,"hasButtonGroup",2),f([rt()],et.prototype,"errorMessage",2),f([rt()],et.prototype,"defaultValue",2),f([g()],et.prototype,"label",2),f([g({attribute:"help-text"})],et.prototype,"helpText",2),f([g()],et.prototype,"name",2),f([g({reflect:!0})],et.prototype,"value",2),f([g({reflect:!0})],et.prototype,"size",2),f([g({reflect:!0})],et.prototype,"form",2),f([g({type:Boolean,reflect:!0})],et.prototype,"required",2),f([H("size",{waitUntilFirstUpdate:!0})],et.prototype,"handleSizeChange",1),f([H("value")],et.prototype,"handleValueChange",1),et.define("sl-radio-group");var Vu=z`
2750
+ ${ki}
2750
2751
 
2751
2752
  .button__prefix,
2752
2753
  .button__suffix,
@@ -2769,13 +2770,13 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
2769
2770
  opacity: 0;
2770
2771
  z-index: -1;
2771
2772
  }
2772
- `,kt=class extends G{constructor(){super(...arguments),this.hasSlotController=new ge(this,"[default]","prefix","suffix"),this.hasFocus=!1,this.checked=!1,this.disabled=!1,this.size="medium",this.pill=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","presentation")}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleClick(e){if(this.disabled){e.preventDefault(),e.stopPropagation();return}this.checked=!0}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}focus(e){this.input.focus(e)}blur(){this.input.blur()}render(){return ho`
2773
+ `,At=class extends j{constructor(){super(...arguments),this.hasSlotController=new _e(this,"[default]","prefix","suffix"),this.hasFocus=!1,this.checked=!1,this.disabled=!1,this.size="medium",this.pill=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","presentation")}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleClick(e){if(this.disabled){e.preventDefault(),e.stopPropagation();return}this.checked=!0}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}focus(e){this.input.focus(e)}blur(){this.input.blur()}render(){return vo`
2773
2774
  <div part="base" role="presentation">
2774
2775
  <button
2775
2776
  part="${`button${this.checked?" button--checked":""}`}"
2776
2777
  role="radio"
2777
2778
  aria-checked="${this.checked}"
2778
- class=${Q({button:!0,"button--default":!0,"button--small":this.size==="small","button--medium":this.size==="medium","button--large":this.size==="large","button--checked":this.checked,"button--disabled":this.disabled,"button--focused":this.hasFocus,"button--outline":!0,"button--pill":this.pill,"button--has-label":this.hasSlotController.test("[default]"),"button--has-prefix":this.hasSlotController.test("prefix"),"button--has-suffix":this.hasSlotController.test("suffix")})}
2779
+ class=${K({button:!0,"button--default":!0,"button--small":this.size==="small","button--medium":this.size==="medium","button--large":this.size==="large","button--checked":this.checked,"button--disabled":this.disabled,"button--focused":this.hasFocus,"button--outline":!0,"button--pill":this.pill,"button--has-label":this.hasSlotController.test("[default]"),"button--has-prefix":this.hasSlotController.test("prefix"),"button--has-suffix":this.hasSlotController.test("suffix")})}
2779
2780
  aria-disabled=${this.disabled}
2780
2781
  type="button"
2781
2782
  value=${E(this.value)}
@@ -2789,8 +2790,8 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
2789
2790
  <slot name="suffix" part="suffix" class="button__suffix"></slot>
2790
2791
  </button>
2791
2792
  </div>
2792
- `}};kt.styles=au,p([j(".button")],kt.prototype,"input",2),p([j(".hidden-input")],kt.prototype,"hiddenInput",2),p([it()],kt.prototype,"hasFocus",2),p([g({type:Boolean,reflect:!0})],kt.prototype,"checked",2),p([g()],kt.prototype,"value",2),p([g({type:Boolean,reflect:!0})],kt.prototype,"disabled",2),p([g({reflect:!0})],kt.prototype,"size",2),p([g({type:Boolean,reflect:!0})],kt.prototype,"pill",2),p([U("disabled",{waitUntilFirstUpdate:!0})],kt.prototype,"handleDisabledChange",1),kt.define("sl-radio-button");var lu=Z`
2793
- ${tt}
2793
+ `}};At.styles=Vu,f([V(".button")],At.prototype,"input",2),f([V(".hidden-input")],At.prototype,"hiddenInput",2),f([rt()],At.prototype,"hasFocus",2),f([g({type:Boolean,reflect:!0})],At.prototype,"checked",2),f([g()],At.prototype,"value",2),f([g({type:Boolean,reflect:!0})],At.prototype,"disabled",2),f([g({reflect:!0})],At.prototype,"size",2),f([g({type:Boolean,reflect:!0})],At.prototype,"pill",2),f([H("disabled",{waitUntilFirstUpdate:!0})],At.prototype,"handleDisabledChange",1),At.define("sl-radio-button");var Hu=z`
2794
+ ${Q}
2794
2795
 
2795
2796
  :host {
2796
2797
  display: inline-block;
@@ -2955,10 +2956,10 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
2955
2956
  background-color: ButtonText;
2956
2957
  }
2957
2958
  }
2958
- `,lt=class extends G{constructor(){super(...arguments),this.formControlController=new co(this,{value:e=>e.checked?e.value||"on":void 0,defaultValue:e=>e.defaultChecked,setValue:(e,t)=>e.checked=t}),this.hasFocus=!1,this.title="",this.name="",this.size="medium",this.disabled=!1,this.checked=!1,this.defaultChecked=!1,this.form="",this.required=!1}get validity(){return this.input.validity}get validationMessage(){return this.input.validationMessage}firstUpdated(){this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleInput(){this.emit("sl-input")}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}handleClick(){this.checked=!this.checked,this.emit("sl-change")}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleKeyDown(e){e.key==="ArrowLeft"&&(e.preventDefault(),this.checked=!1,this.emit("sl-change"),this.emit("sl-input")),e.key==="ArrowRight"&&(e.preventDefault(),this.checked=!0,this.emit("sl-change"),this.emit("sl-input"))}handleCheckedChange(){this.input.checked=this.checked,this.formControlController.updateValidity()}handleDisabledChange(){this.formControlController.setValidity(!0)}click(){this.input.click()}focus(e){this.input.focus(e)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}render(){return P`
2959
+ `,it=class extends j{constructor(){super(...arguments),this.formControlController=new go(this,{value:e=>e.checked?e.value||"on":void 0,defaultValue:e=>e.defaultChecked,setValue:(e,t)=>e.checked=t}),this.hasFocus=!1,this.title="",this.name="",this.size="medium",this.disabled=!1,this.checked=!1,this.defaultChecked=!1,this.form="",this.required=!1}get validity(){return this.input.validity}get validationMessage(){return this.input.validationMessage}firstUpdated(){this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleInput(){this.emit("sl-input")}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}handleClick(){this.checked=!this.checked,this.emit("sl-change")}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleKeyDown(e){e.key==="ArrowLeft"&&(e.preventDefault(),this.checked=!1,this.emit("sl-change"),this.emit("sl-input")),e.key==="ArrowRight"&&(e.preventDefault(),this.checked=!0,this.emit("sl-change"),this.emit("sl-input"))}handleCheckedChange(){this.input.checked=this.checked,this.formControlController.updateValidity()}handleDisabledChange(){this.formControlController.setValidity(!0)}click(){this.input.click()}focus(e){this.input.focus(e)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}render(){return A`
2959
2960
  <label
2960
2961
  part="base"
2961
- class=${Q({switch:!0,"switch--checked":this.checked,"switch--disabled":this.disabled,"switch--focused":this.hasFocus,"switch--small":this.size==="small","switch--medium":this.size==="medium","switch--large":this.size==="large"})}
2962
+ class=${K({switch:!0,"switch--checked":this.checked,"switch--disabled":this.disabled,"switch--focused":this.hasFocus,"switch--small":this.size==="small","switch--medium":this.size==="medium","switch--large":this.size==="large"})}
2962
2963
  >
2963
2964
  <input
2964
2965
  class="switch__input"
@@ -2966,7 +2967,7 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
2966
2967
  title=${this.title}
2967
2968
  name=${this.name}
2968
2969
  value=${E(this.value)}
2969
- .checked=${ls(this.checked)}
2970
+ .checked=${ys(this.checked)}
2970
2971
  .disabled=${this.disabled}
2971
2972
  .required=${this.required}
2972
2973
  role="switch"
@@ -2987,8 +2988,8 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
2987
2988
  <slot></slot>
2988
2989
  </div>
2989
2990
  </label>
2990
- `}};lt.styles=lu,p([j('input[type="checkbox"]')],lt.prototype,"input",2),p([it()],lt.prototype,"hasFocus",2),p([g()],lt.prototype,"title",2),p([g()],lt.prototype,"name",2),p([g()],lt.prototype,"value",2),p([g({reflect:!0})],lt.prototype,"size",2),p([g({type:Boolean,reflect:!0})],lt.prototype,"disabled",2),p([g({type:Boolean,reflect:!0})],lt.prototype,"checked",2),p([as("checked")],lt.prototype,"defaultChecked",2),p([g({reflect:!0})],lt.prototype,"form",2),p([g({type:Boolean,reflect:!0})],lt.prototype,"required",2),p([U("checked",{waitUntilFirstUpdate:!0})],lt.prototype,"handleCheckedChange",1),p([U("disabled",{waitUntilFirstUpdate:!0})],lt.prototype,"handleDisabledChange",1),lt.define("sl-switch");var cu=Z`
2991
- ${tt}
2991
+ `}};it.styles=Hu,f([V('input[type="checkbox"]')],it.prototype,"input",2),f([rt()],it.prototype,"hasFocus",2),f([g()],it.prototype,"title",2),f([g()],it.prototype,"name",2),f([g()],it.prototype,"value",2),f([g({reflect:!0})],it.prototype,"size",2),f([g({type:Boolean,reflect:!0})],it.prototype,"disabled",2),f([g({type:Boolean,reflect:!0})],it.prototype,"checked",2),f([vs("checked")],it.prototype,"defaultChecked",2),f([g({reflect:!0})],it.prototype,"form",2),f([g({type:Boolean,reflect:!0})],it.prototype,"required",2),f([H("checked",{waitUntilFirstUpdate:!0})],it.prototype,"handleCheckedChange",1),f([H("disabled",{waitUntilFirstUpdate:!0})],it.prototype,"handleDisabledChange",1),it.define("sl-switch");var Uu=z`
2992
+ ${Q}
2992
2993
 
2993
2994
  :host {
2994
2995
  --max-width: 20rem;
@@ -3040,8 +3041,8 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
3040
3041
  user-select: none;
3041
3042
  -webkit-user-select: none;
3042
3043
  }
3043
- `,uu=Z`
3044
- ${tt}
3044
+ `,ju=z`
3045
+ ${Q}
3045
3046
 
3046
3047
  :host {
3047
3048
  --arrow-color: var(--sl-color-neutral-1000);
@@ -3080,24 +3081,24 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
3080
3081
  background: var(--arrow-color);
3081
3082
  z-index: -1;
3082
3083
  }
3083
- `;const te=Math.min,ft=Math.max,Ho=Math.round,jo=Math.floor,ee=e=>({x:e,y:e}),du={left:"right",right:"left",bottom:"top",top:"bottom"},hu={start:"end",end:"start"};function us(e,t,o){return ft(e,te(t,o))}function Te(e,t){return typeof e=="function"?e(t):e}function oe(e){return e.split("-")[0]}function Le(e){return e.split("-")[1]}function yi(e){return e==="x"?"y":"x"}function ds(e){return e==="y"?"height":"width"}function mo(e){return["top","bottom"].includes(oe(e))?"y":"x"}function hs(e){return yi(mo(e))}function pu(e,t,o){o===void 0&&(o=!1);const r=Le(e),s=hs(e),n=ds(s);let i=s==="x"?r===(o?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[n]>t.floating[n]&&(i=Go(i)),[i,Go(i)]}function fu(e){const t=Go(e);return[ps(e),t,ps(t)]}function ps(e){return e.replace(/start|end/g,t=>hu[t])}function gu(e,t,o){const r=["left","right"],s=["right","left"],n=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return o?t?s:r:t?r:s;case"left":case"right":return t?n:i;default:return[]}}function bu(e,t,o,r){const s=Le(e);let n=gu(oe(e),o==="start",r);return s&&(n=n.map(i=>i+"-"+s),t&&(n=n.concat(n.map(ps)))),n}function Go(e){return e.replace(/left|right|bottom|top/g,t=>du[t])}function mu(e){return{top:0,right:0,bottom:0,left:0,...e}}function wi(e){return typeof e!="number"?mu(e):{top:e,right:e,bottom:e,left:e}}function Zo(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function _i(e,t,o){let{reference:r,floating:s}=e;const n=mo(t),i=hs(t),a=ds(i),l=oe(t),c=n==="y",u=r.x+r.width/2-s.width/2,d=r.y+r.height/2-s.height/2,f=r[a]/2-s[a]/2;let h;switch(l){case"top":h={x:u,y:r.y-s.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-s.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Le(t)){case"start":h[i]-=f*(o&&c?-1:1);break;case"end":h[i]+=f*(o&&c?-1:1);break}return h}const vu=async(e,t,o)=>{const{placement:r="bottom",strategy:s="absolute",middleware:n=[],platform:i}=o,a=n.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:s}),{x:u,y:d}=_i(c,r,l),f=r,h={},b=0;for(let m=0;m<a.length;m++){const{name:w,fn:y}=a[m],{x:v,y:k,data:C,reset:A}=await y({x:u,y:d,initialPlacement:r,placement:f,strategy:s,middlewareData:h,rects:c,platform:i,elements:{reference:e,floating:t}});if(u=v??u,d=k??d,h={...h,[w]:{...h[w],...C}},A&&b<=50){b++,typeof A=="object"&&(A.placement&&(f=A.placement),A.rects&&(c=A.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:s}):A.rects),{x:u,y:d}=_i(c,f,l)),m=-1;continue}}return{x:u,y:d,placement:f,strategy:s,middlewareData:h}};async function fs(e,t){var o;t===void 0&&(t={});const{x:r,y:s,platform:n,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=Te(t,e),b=wi(h),w=a[f?d==="floating"?"reference":"floating":d],y=Zo(await n.getClippingRect({element:(o=await(n.isElement==null?void 0:n.isElement(w)))==null||o?w:w.contextElement||await(n.getDocumentElement==null?void 0:n.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),v=d==="floating"?{...i.floating,x:r,y:s}:i.reference,k=await(n.getOffsetParent==null?void 0:n.getOffsetParent(a.floating)),C=await(n.isElement==null?void 0:n.isElement(k))?await(n.getScale==null?void 0:n.getScale(k))||{x:1,y:1}:{x:1,y:1},A=Zo(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:k,strategy:l}):v);return{top:(y.top-A.top+b.top)/C.y,bottom:(A.bottom-y.bottom+b.bottom)/C.y,left:(y.left-A.left+b.left)/C.x,right:(A.right-y.right+b.right)/C.x}}const yu=e=>({name:"arrow",options:e,async fn(t){const{x:o,y:r,placement:s,rects:n,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=Te(e,t)||{};if(c==null)return{};const d=wi(u),f={x:o,y:r},h=hs(s),b=ds(h),m=await i.getDimensions(c),w=h==="y",y=w?"top":"left",v=w?"bottom":"right",k=w?"clientHeight":"clientWidth",C=n.reference[b]+n.reference[h]-f[h]-n.floating[b],A=f[h]-n.reference[h],_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let D=_?_[k]:0;(!D||!await(i.isElement==null?void 0:i.isElement(_)))&&(D=a.floating[k]||n.floating[b]);const M=C/2-A/2,S=D/2-m[b]/2-1,q=te(d[y],S),F=te(d[v],S),J=q,wt=D-m[b]-F,x=D/2-m[b]/2+M,I=us(J,x,wt),L=!l.arrow&&Le(s)!=null&&x!=I&&n.reference[b]/2-(x<J?q:F)-m[b]/2<0,et=L?x<J?x-J:x-wt:0;return{[h]:f[h]+et,data:{[h]:I,centerOffset:x-I-et,...L&&{alignmentOffset:et}},reset:L}}}),wu=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var o,r;const{placement:s,middlewareData:n,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:m=!0,...w}=Te(e,t);if((o=n.arrow)!=null&&o.alignmentOffset)return{};const y=oe(s),v=oe(a)===a,k=await(l.isRTL==null?void 0:l.isRTL(c.floating)),C=f||(v||!m?[Go(a)]:fu(a));!f&&b!=="none"&&C.push(...bu(a,m,b,k));const A=[a,...C],_=await fs(t,w),D=[];let M=((r=n.flip)==null?void 0:r.overflows)||[];if(u&&D.push(_[y]),d){const J=pu(s,i,k);D.push(_[J[0]],_[J[1]])}if(M=[...M,{placement:s,overflows:D}],!D.every(J=>J<=0)){var S,q;const J=(((S=n.flip)==null?void 0:S.index)||0)+1,wt=A[J];if(wt)return{data:{index:J,overflows:M},reset:{placement:wt}};let x=(q=M.filter(I=>I.overflows[0]<=0).sort((I,L)=>I.overflows[1]-L.overflows[1])[0])==null?void 0:q.placement;if(!x)switch(h){case"bestFit":{var F;const I=(F=M.map(L=>[L.placement,L.overflows.filter(et=>et>0).reduce((et,Cr)=>et+Cr,0)]).sort((L,et)=>L[1]-et[1])[0])==null?void 0:F[0];I&&(x=I);break}case"initialPlacement":x=a;break}if(s!==x)return{reset:{placement:x}}}return{}}}};async function _u(e,t){const{placement:o,platform:r,elements:s}=e,n=await(r.isRTL==null?void 0:r.isRTL(s.floating)),i=oe(o),a=Le(o),l=mo(o)==="y",c=["left","top"].includes(i)?-1:1,u=n&&l?-1:1,d=Te(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof b=="number"&&(h=a==="end"?b*-1:b),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const xu=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:o,y:r}=t,s=await _u(t,e);return{x:o+s.x,y:r+s.y,data:s}}}},ku=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:r,placement:s}=t,{mainAxis:n=!0,crossAxis:i=!1,limiter:a={fn:w=>{let{x:y,y:v}=w;return{x:y,y:v}}},...l}=Te(e,t),c={x:o,y:r},u=await fs(t,l),d=mo(oe(s)),f=yi(d);let h=c[f],b=c[d];if(n){const w=f==="y"?"top":"left",y=f==="y"?"bottom":"right",v=h+u[w],k=h-u[y];h=us(v,h,k)}if(i){const w=d==="y"?"top":"left",y=d==="y"?"bottom":"right",v=b+u[w],k=b-u[y];b=us(v,b,k)}const m=a.fn({...t,[f]:h,[d]:b});return{...m,data:{x:m.x-o,y:m.y-r}}}}},xi=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:o,rects:r,platform:s,elements:n}=t,{apply:i=()=>{},...a}=Te(e,t),l=await fs(t,a),c=oe(o),u=Le(o),d=mo(o)==="y",{width:f,height:h}=r.floating;let b,m;c==="top"||c==="bottom"?(b=c,m=u===(await(s.isRTL==null?void 0:s.isRTL(n.floating))?"start":"end")?"left":"right"):(m=c,b=u==="end"?"top":"bottom");const w=h-l[b],y=f-l[m],v=!t.middlewareData.shift;let k=w,C=y;if(d){const _=f-l.left-l.right;C=u||v?te(y,_):_}else{const _=h-l.top-l.bottom;k=u||v?te(w,_):_}if(v&&!u){const _=ft(l.left,0),D=ft(l.right,0),M=ft(l.top,0),S=ft(l.bottom,0);d?C=f-2*(_!==0||D!==0?_+D:ft(l.left,l.right)):k=h-2*(M!==0||S!==0?M+S:ft(l.top,l.bottom))}await i({...t,availableWidth:C,availableHeight:k});const A=await s.getDimensions(n.floating);return f!==A.width||h!==A.height?{reset:{rects:!0}}:{}}}};function re(e){return ki(e)?(e.nodeName||"").toLowerCase():"#document"}function gt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function jt(e){var t;return(t=(ki(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ki(e){return e instanceof Node||e instanceof gt(e).Node}function Gt(e){return e instanceof Element||e instanceof gt(e).Element}function zt(e){return e instanceof HTMLElement||e instanceof gt(e).HTMLElement}function Ci(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof gt(e).ShadowRoot}function vo(e){const{overflow:t,overflowX:o,overflowY:r,display:s}=vt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+o)&&!["inline","contents"].includes(s)}function Cu(e){return["table","td","th"].includes(re(e))}function gs(e){const t=bs(),o=vt(e);return o.transform!=="none"||o.perspective!=="none"||(o.containerType?o.containerType!=="normal":!1)||!t&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!t&&(o.filter?o.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(o.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(o.contain||"").includes(r))}function Au(e){let t=ze(e);for(;zt(t)&&!Wo(t);){if(gs(t))return t;t=ze(t)}return null}function bs(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Wo(e){return["html","body","#document"].includes(re(e))}function vt(e){return gt(e).getComputedStyle(e)}function Ko(e){return Gt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ze(e){if(re(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ci(e)&&e.host||jt(e);return Ci(t)?t.host:t}function Ai(e){const t=ze(e);return Wo(t)?e.ownerDocument?e.ownerDocument.body:e.body:zt(t)&&vo(t)?t:Ai(t)}function yo(e,t,o){var r;t===void 0&&(t=[]),o===void 0&&(o=!0);const s=Ai(e),n=s===((r=e.ownerDocument)==null?void 0:r.body),i=gt(s);return n?t.concat(i,i.visualViewport||[],vo(s)?s:[],i.frameElement&&o?yo(i.frameElement):[]):t.concat(s,yo(s))}function $i(e){const t=vt(e);let o=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=zt(e),n=s?e.offsetWidth:o,i=s?e.offsetHeight:r,a=Ho(o)!==n||Ho(r)!==i;return a&&(o=n,r=i),{width:o,height:r,$:a}}function ms(e){return Gt(e)?e:e.contextElement}function Re(e){const t=ms(e);if(!zt(t))return ee(1);const o=t.getBoundingClientRect(),{width:r,height:s,$:n}=$i(t);let i=(n?Ho(o.width):o.width)/r,a=(n?Ho(o.height):o.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const $u=ee(0);function Ei(e){const t=gt(e);return!bs()||!t.visualViewport?$u:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Eu(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==gt(e)?!1:t}function me(e,t,o,r){t===void 0&&(t=!1),o===void 0&&(o=!1);const s=e.getBoundingClientRect(),n=ms(e);let i=ee(1);t&&(r?Gt(r)&&(i=Re(r)):i=Re(e));const a=Eu(n,o,r)?Ei(n):ee(0);let l=(s.left+a.x)/i.x,c=(s.top+a.y)/i.y,u=s.width/i.x,d=s.height/i.y;if(n){const f=gt(n),h=r&&Gt(r)?gt(r):r;let b=f.frameElement;for(;b&&r&&h!==f;){const m=Re(b),w=b.getBoundingClientRect(),y=vt(b),v=w.left+(b.clientLeft+parseFloat(y.paddingLeft))*m.x,k=w.top+(b.clientTop+parseFloat(y.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,d*=m.y,l+=v,c+=k,b=gt(b).frameElement}}return Zo({width:u,height:d,x:l,y:c})}function Su(e){let{rect:t,offsetParent:o,strategy:r}=e;const s=zt(o),n=jt(o);if(o===n)return t;let i={scrollLeft:0,scrollTop:0},a=ee(1);const l=ee(0);if((s||!s&&r!=="fixed")&&((re(o)!=="body"||vo(n))&&(i=Ko(o)),zt(o))){const c=me(o);a=Re(o),l.x=c.x+o.clientLeft,l.y=c.y+o.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-i.scrollLeft*a.x+l.x,y:t.y*a.y-i.scrollTop*a.y+l.y}}function qu(e){return Array.from(e.getClientRects())}function Si(e){return me(jt(e)).left+Ko(e).scrollLeft}function Du(e){const t=jt(e),o=Ko(e),r=e.ownerDocument.body,s=ft(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),n=ft(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-o.scrollLeft+Si(e);const a=-o.scrollTop;return vt(r).direction==="rtl"&&(i+=ft(t.clientWidth,r.clientWidth)-s),{width:s,height:n,x:i,y:a}}function Tu(e,t){const o=gt(e),r=jt(e),s=o.visualViewport;let n=r.clientWidth,i=r.clientHeight,a=0,l=0;if(s){n=s.width,i=s.height;const c=bs();(!c||c&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:n,height:i,x:a,y:l}}function Lu(e,t){const o=me(e,!0,t==="fixed"),r=o.top+e.clientTop,s=o.left+e.clientLeft,n=zt(e)?Re(e):ee(1),i=e.clientWidth*n.x,a=e.clientHeight*n.y,l=s*n.x,c=r*n.y;return{width:i,height:a,x:l,y:c}}function qi(e,t,o){let r;if(t==="viewport")r=Tu(e,o);else if(t==="document")r=Du(jt(e));else if(Gt(t))r=Lu(t,o);else{const s=Ei(e);r={...t,x:t.x-s.x,y:t.y-s.y}}return Zo(r)}function Di(e,t){const o=ze(e);return o===t||!Gt(o)||Wo(o)?!1:vt(o).position==="fixed"||Di(o,t)}function zu(e,t){const o=t.get(e);if(o)return o;let r=yo(e,[],!1).filter(a=>Gt(a)&&re(a)!=="body"),s=null;const n=vt(e).position==="fixed";let i=n?ze(e):e;for(;Gt(i)&&!Wo(i);){const a=vt(i),l=gs(i);!l&&a.position==="fixed"&&(s=null),(n?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||vo(i)&&!l&&Di(e,i))?r=r.filter(u=>u!==i):s=a,i=ze(i)}return t.set(e,r),r}function Ru(e){let{element:t,boundary:o,rootBoundary:r,strategy:s}=e;const i=[...o==="clippingAncestors"?zu(t,this._c):[].concat(o),r],a=i[0],l=i.reduce((c,u)=>{const d=qi(t,u,s);return c.top=ft(d.top,c.top),c.right=te(d.right,c.right),c.bottom=te(d.bottom,c.bottom),c.left=ft(d.left,c.left),c},qi(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Pu(e){return $i(e)}function Mu(e,t,o){const r=zt(t),s=jt(t),n=o==="fixed",i=me(e,!0,n,t);let a={scrollLeft:0,scrollTop:0};const l=ee(0);if(r||!r&&!n)if((re(t)!=="body"||vo(s))&&(a=Ko(t)),r){const c=me(t,!0,n,t);l.x=c.x+t.clientLeft,l.y=c.y+t.clientTop}else s&&(l.x=Si(s));return{x:i.left+a.scrollLeft-l.x,y:i.top+a.scrollTop-l.y,width:i.width,height:i.height}}function Ti(e,t){return!zt(e)||vt(e).position==="fixed"?null:t?t(e):e.offsetParent}function Li(e,t){const o=gt(e);if(!zt(e))return o;let r=Ti(e,t);for(;r&&Cu(r)&&vt(r).position==="static";)r=Ti(r,t);return r&&(re(r)==="html"||re(r)==="body"&&vt(r).position==="static"&&!gs(r))?o:r||Au(e)||o}const Fu=async function(e){let{reference:t,floating:o,strategy:r}=e;const s=this.getOffsetParent||Li,n=this.getDimensions;return{reference:Mu(t,await s(o),r),floating:{x:0,y:0,...await n(o)}}};function Iu(e){return vt(e).direction==="rtl"}const Yo={convertOffsetParentRelativeRectToViewportRelativeRect:Su,getDocumentElement:jt,getClippingRect:Ru,getOffsetParent:Li,getElementRects:Fu,getClientRects:qu,getDimensions:Pu,getScale:Re,isElement:Gt,isRTL:Iu};function Bu(e,t){let o=null,r;const s=jt(e);function n(){clearTimeout(r),o&&o.disconnect(),o=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),n();const{left:c,top:u,width:d,height:f}=e.getBoundingClientRect();if(a||t(),!d||!f)return;const h=jo(u),b=jo(s.clientWidth-(c+d)),m=jo(s.clientHeight-(u+f)),w=jo(c),v={rootMargin:-h+"px "+-b+"px "+-m+"px "+-w+"px",threshold:ft(0,te(1,l))||1};let k=!0;function C(A){const _=A[0].intersectionRatio;if(_!==l){if(!k)return i();_?i(!1,_):r=setTimeout(()=>{i(!1,1e-7)},100)}k=!1}try{o=new IntersectionObserver(C,{...v,root:s.ownerDocument})}catch{o=new IntersectionObserver(C,v)}o.observe(e)}return i(!0),n}function Ou(e,t,o,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:n=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=ms(e),u=s||n?[...c?yo(c):[],...yo(t)]:[];u.forEach(y=>{s&&y.addEventListener("scroll",o,{passive:!0}),n&&y.addEventListener("resize",o)});const d=c&&a?Bu(c,o):null;let f=-1,h=null;i&&(h=new ResizeObserver(y=>{let[v]=y;v&&v.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{h&&h.observe(t)})),o()}),c&&!l&&h.observe(c),h.observe(t));let b,m=l?me(e):null;l&&w();function w(){const y=me(e);m&&(y.x!==m.x||y.y!==m.y||y.width!==m.width||y.height!==m.height)&&o(),m=y,b=requestAnimationFrame(w)}return o(),()=>{u.forEach(y=>{s&&y.removeEventListener("scroll",o),n&&y.removeEventListener("resize",o)}),d&&d(),h&&h.disconnect(),h=null,l&&cancelAnimationFrame(b)}}const Nu=(e,t,o)=>{const r=new Map,s={platform:Yo,...o},n={...s.platform,_c:r};return vu(e,t,{...s,platform:n})};function Vu(e){return Uu(e)}function vs(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function Uu(e){for(let t=e;t;t=vs(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=vs(e);t;t=vs(t)){if(!(t instanceof Element))continue;const o=getComputedStyle(t);if(o.display!=="contents"&&(o.position!=="static"||o.filter!=="none"||t.tagName==="BODY"))return t}return null}function Hu(e){return e!==null&&typeof e=="object"&&"getBoundingClientRect"in e}var H=class extends G{constructor(){super(...arguments),this.active=!1,this.placement="top",this.strategy="absolute",this.distance=0,this.skidding=0,this.arrow=!1,this.arrowPlacement="anchor",this.arrowPadding=10,this.flip=!1,this.flipFallbackPlacements="",this.flipFallbackStrategy="best-fit",this.flipPadding=0,this.shift=!1,this.shiftPadding=0,this.autoSizePadding=0}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start()}disconnectedCallback(){super.disconnectedCallback(),this.stop()}async updated(e){super.updated(e),e.has("active")&&(this.active?this.start():this.stop()),e.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}async handleAnchorChange(){if(await this.stop(),this.anchor&&typeof this.anchor=="string"){const e=this.getRootNode();this.anchorEl=e.getElementById(this.anchor)}else this.anchor instanceof Element||Hu(this.anchor)?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),this.anchorEl&&this.start()}start(){this.anchorEl&&(this.cleanup=Ou(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(e=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame(()=>e())):e()})}reposition(){if(!this.active||!this.anchorEl)return;const e=[xu({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?e.push(xi({apply:({rects:o})=>{const r=this.sync==="width"||this.sync==="both",s=this.sync==="height"||this.sync==="both";this.popup.style.width=r?`${o.reference.width}px`:"",this.popup.style.height=s?`${o.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&e.push(wu({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&e.push(ku({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?e.push(xi({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:o,availableHeight:r})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${r}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${o}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&e.push(yu({element:this.arrowEl,padding:this.arrowPadding}));const t=this.strategy==="absolute"?o=>Yo.getOffsetParent(o,Vu):Yo.getOffsetParent;Nu(this.anchorEl,this.popup,{placement:this.placement,middleware:e,strategy:this.strategy,platform:Bo(Qt({},Yo),{getOffsetParent:t})}).then(({x:o,y:r,middlewareData:s,placement:n})=>{const i=getComputedStyle(this).direction==="rtl",a={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]];if(this.setAttribute("data-current-placement",n),Object.assign(this.popup.style,{left:`${o}px`,top:`${r}px`}),this.arrow){const l=s.arrow.x,c=s.arrow.y;let u="",d="",f="",h="";if(this.arrowPlacement==="start"){const b=typeof l=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";u=typeof c=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",d=i?b:"",h=i?"":b}else if(this.arrowPlacement==="end"){const b=typeof l=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";d=i?"":b,h=i?b:"",f=typeof c=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else this.arrowPlacement==="center"?(h=typeof l=="number"?"calc(50% - var(--arrow-size-diagonal))":"",u=typeof c=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(h=typeof l=="number"?`${l}px`:"",u=typeof c=="number"?`${c}px`:"");Object.assign(this.arrowEl.style,{top:u,right:d,bottom:f,left:h,[a]:"calc(var(--arrow-size-diagonal) * -1)"})}}),this.emit("sl-reposition")}render(){return P`
3084
+ `;const ee=Math.min,pt=Math.max,Jo=Math.round,Qo=Math.floor,oe=e=>({x:e,y:e}),Gu={left:"right",right:"left",bottom:"top",top:"bottom"},Zu={start:"end",end:"start"};function _s(e,t,o){return pt(e,ee(t,o))}function Pe(e,t){return typeof e=="function"?e(t):e}function re(e){return e.split("-")[0]}function Me(e){return e.split("-")[1]}function Bi(e){return e==="x"?"y":"x"}function xs(e){return e==="y"?"height":"width"}function ko(e){return["top","bottom"].includes(re(e))?"y":"x"}function ks(e){return Bi(ko(e))}function Wu(e,t,o){o===void 0&&(o=!1);const r=Me(e),s=ks(e),n=xs(s);let i=s==="x"?r===(o?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[n]>t.floating[n]&&(i=Xo(i)),[i,Xo(i)]}function Ku(e){const t=Xo(e);return[As(e),t,As(t)]}function As(e){return e.replace(/start|end/g,t=>Zu[t])}function Yu(e,t,o){const r=["left","right"],s=["right","left"],n=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return o?t?s:r:t?r:s;case"left":case"right":return t?n:i;default:return[]}}function Ju(e,t,o,r){const s=Me(e);let n=Yu(re(e),o==="start",r);return s&&(n=n.map(i=>i+"-"+s),t&&(n=n.concat(n.map(As)))),n}function Xo(e){return e.replace(/left|right|bottom|top/g,t=>Gu[t])}function Qu(e){return{top:0,right:0,bottom:0,left:0,...e}}function Oi(e){return typeof e!="number"?Qu(e):{top:e,right:e,bottom:e,left:e}}function tr(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Ni(e,t,o){let{reference:r,floating:s}=e;const n=ko(t),i=ks(t),a=xs(i),l=re(t),c=n==="y",u=r.x+r.width/2-s.width/2,d=r.y+r.height/2-s.height/2,p=r[a]/2-s[a]/2;let h;switch(l){case"top":h={x:u,y:r.y-s.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-s.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Me(t)){case"start":h[i]-=p*(o&&c?-1:1);break;case"end":h[i]+=p*(o&&c?-1:1);break}return h}const Xu=async(e,t,o)=>{const{placement:r="bottom",strategy:s="absolute",middleware:n=[],platform:i}=o,a=n.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:s}),{x:u,y:d}=Ni(c,r,l),p=r,h={},b=0;for(let m=0;m<a.length;m++){const{name:w,fn:y}=a[m],{x:v,y:k,data:C,reset:$}=await y({x:u,y:d,initialPlacement:r,placement:p,strategy:s,middlewareData:h,rects:c,platform:i,elements:{reference:e,floating:t}});if(u=v??u,d=k??d,h={...h,[w]:{...h[w],...C}},$&&b<=50){b++,typeof $=="object"&&($.placement&&(p=$.placement),$.rects&&(c=$.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:s}):$.rects),{x:u,y:d}=Ni(c,p,l)),m=-1;continue}}return{x:u,y:d,placement:p,strategy:s,middlewareData:h}};async function Cs(e,t){var o;t===void 0&&(t={});const{x:r,y:s,platform:n,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=Pe(t,e),b=Oi(h),w=a[p?d==="floating"?"reference":"floating":d],y=tr(await n.getClippingRect({element:(o=await(n.isElement==null?void 0:n.isElement(w)))==null||o?w:w.contextElement||await(n.getDocumentElement==null?void 0:n.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),v=d==="floating"?{...i.floating,x:r,y:s}:i.reference,k=await(n.getOffsetParent==null?void 0:n.getOffsetParent(a.floating)),C=await(n.isElement==null?void 0:n.isElement(k))?await(n.getScale==null?void 0:n.getScale(k))||{x:1,y:1}:{x:1,y:1},$=tr(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:k,strategy:l}):v);return{top:(y.top-$.top+b.top)/C.y,bottom:($.bottom-y.bottom+b.bottom)/C.y,left:(y.left-$.left+b.left)/C.x,right:($.right-y.right+b.right)/C.x}}const td=e=>({name:"arrow",options:e,async fn(t){const{x:o,y:r,placement:s,rects:n,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=Pe(e,t)||{};if(c==null)return{};const d=Oi(u),p={x:o,y:r},h=ks(s),b=xs(h),m=await i.getDimensions(c),w=h==="y",y=w?"top":"left",v=w?"bottom":"right",k=w?"clientHeight":"clientWidth",C=n.reference[b]+n.reference[h]-p[h]-n.floating[b],$=p[h]-n.reference[h],_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let D=_?_[k]:0;(!D||!await(i.isElement==null?void 0:i.isElement(_)))&&(D=a.floating[k]||n.floating[b]);const P=C/2-$/2,S=D/2-m[b]/2-1,q=ee(d[y],S),I=ee(d[v],S),W=q,yt=D-m[b]-I,x=D/2-m[b]/2+P,F=_s(W,x,yt),T=!l.arrow&&Me(s)!=null&&x!=F&&n.reference[b]/2-(x<W?q:I)-m[b]/2<0,X=T?x<W?x-W:x-yt:0;return{[h]:p[h]+X,data:{[h]:F,centerOffset:x-F-X,...T&&{alignmentOffset:X}},reset:T}}}),ed=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var o,r;const{placement:s,middlewareData:n,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:m=!0,...w}=Pe(e,t);if((o=n.arrow)!=null&&o.alignmentOffset)return{};const y=re(s),v=re(a)===a,k=await(l.isRTL==null?void 0:l.isRTL(c.floating)),C=p||(v||!m?[Xo(a)]:Ku(a));!p&&b!=="none"&&C.push(...Ju(a,m,b,k));const $=[a,...C],_=await Cs(t,w),D=[];let P=((r=n.flip)==null?void 0:r.overflows)||[];if(u&&D.push(_[y]),d){const W=Wu(s,i,k);D.push(_[W[0]],_[W[1]])}if(P=[...P,{placement:s,overflows:D}],!D.every(W=>W<=0)){var S,q;const W=(((S=n.flip)==null?void 0:S.index)||0)+1,yt=$[W];if(yt)return{data:{index:W,overflows:P},reset:{placement:yt}};let x=(q=P.filter(F=>F.overflows[0]<=0).sort((F,T)=>F.overflows[1]-T.overflows[1])[0])==null?void 0:q.placement;if(!x)switch(h){case"bestFit":{var I;const F=(I=P.map(T=>[T.placement,T.overflows.filter(X=>X>0).reduce((X,zr)=>X+zr,0)]).sort((T,X)=>T[1]-X[1])[0])==null?void 0:I[0];F&&(x=F);break}case"initialPlacement":x=a;break}if(s!==x)return{reset:{placement:x}}}return{}}}};async function od(e,t){const{placement:o,platform:r,elements:s}=e,n=await(r.isRTL==null?void 0:r.isRTL(s.floating)),i=re(o),a=Me(o),l=ko(o)==="y",c=["left","top"].includes(i)?-1:1,u=n&&l?-1:1,d=Pe(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof b=="number"&&(h=a==="end"?b*-1:b),l?{x:h*u,y:p*c}:{x:p*c,y:h*u}}const rd=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:o,y:r}=t,s=await od(t,e);return{x:o+s.x,y:r+s.y,data:s}}}},sd=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:r,placement:s}=t,{mainAxis:n=!0,crossAxis:i=!1,limiter:a={fn:w=>{let{x:y,y:v}=w;return{x:y,y:v}}},...l}=Pe(e,t),c={x:o,y:r},u=await Cs(t,l),d=ko(re(s)),p=Bi(d);let h=c[p],b=c[d];if(n){const w=p==="y"?"top":"left",y=p==="y"?"bottom":"right",v=h+u[w],k=h-u[y];h=_s(v,h,k)}if(i){const w=d==="y"?"top":"left",y=d==="y"?"bottom":"right",v=b+u[w],k=b-u[y];b=_s(v,b,k)}const m=a.fn({...t,[p]:h,[d]:b});return{...m,data:{x:m.x-o,y:m.y-r}}}}},Vi=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:o,rects:r,platform:s,elements:n}=t,{apply:i=()=>{},...a}=Pe(e,t),l=await Cs(t,a),c=re(o),u=Me(o),d=ko(o)==="y",{width:p,height:h}=r.floating;let b,m;c==="top"||c==="bottom"?(b=c,m=u===(await(s.isRTL==null?void 0:s.isRTL(n.floating))?"start":"end")?"left":"right"):(m=c,b=u==="end"?"top":"bottom");const w=h-l[b],y=p-l[m],v=!t.middlewareData.shift;let k=w,C=y;if(d){const _=p-l.left-l.right;C=u||v?ee(y,_):_}else{const _=h-l.top-l.bottom;k=u||v?ee(w,_):_}if(v&&!u){const _=pt(l.left,0),D=pt(l.right,0),P=pt(l.top,0),S=pt(l.bottom,0);d?C=p-2*(_!==0||D!==0?_+D:pt(l.left,l.right)):k=h-2*(P!==0||S!==0?P+S:pt(l.top,l.bottom))}await i({...t,availableWidth:C,availableHeight:k});const $=await s.getDimensions(n.floating);return p!==$.width||h!==$.height?{reset:{rects:!0}}:{}}}};function se(e){return Hi(e)?(e.nodeName||"").toLowerCase():"#document"}function ft(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ht(e){var t;return(t=(Hi(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Hi(e){return e instanceof Node||e instanceof ft(e).Node}function Ut(e){return e instanceof Element||e instanceof ft(e).Element}function Lt(e){return e instanceof HTMLElement||e instanceof ft(e).HTMLElement}function Ui(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ft(e).ShadowRoot}function Ao(e){const{overflow:t,overflowX:o,overflowY:r,display:s}=mt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+o)&&!["inline","contents"].includes(s)}function nd(e){return["table","td","th"].includes(se(e))}function $s(e){const t=Es(),o=mt(e);return o.transform!=="none"||o.perspective!=="none"||(o.containerType?o.containerType!=="normal":!1)||!t&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!t&&(o.filter?o.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(o.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(o.contain||"").includes(r))}function id(e){let t=Ie(e);for(;Lt(t)&&!er(t);){if($s(t))return t;t=Ie(t)}return null}function Es(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function er(e){return["html","body","#document"].includes(se(e))}function mt(e){return ft(e).getComputedStyle(e)}function or(e){return Ut(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ie(e){if(se(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ui(e)&&e.host||Ht(e);return Ui(t)?t.host:t}function ji(e){const t=Ie(e);return er(t)?e.ownerDocument?e.ownerDocument.body:e.body:Lt(t)&&Ao(t)?t:ji(t)}function Co(e,t,o){var r;t===void 0&&(t=[]),o===void 0&&(o=!0);const s=ji(e),n=s===((r=e.ownerDocument)==null?void 0:r.body),i=ft(s);return n?t.concat(i,i.visualViewport||[],Ao(s)?s:[],i.frameElement&&o?Co(i.frameElement):[]):t.concat(s,Co(s))}function Gi(e){const t=mt(e);let o=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Lt(e),n=s?e.offsetWidth:o,i=s?e.offsetHeight:r,a=Jo(o)!==n||Jo(r)!==i;return a&&(o=n,r=i),{width:o,height:r,$:a}}function Ss(e){return Ut(e)?e:e.contextElement}function Fe(e){const t=Ss(e);if(!Lt(t))return oe(1);const o=t.getBoundingClientRect(),{width:r,height:s,$:n}=Gi(t);let i=(n?Jo(o.width):o.width)/r,a=(n?Jo(o.height):o.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const ad=oe(0);function Zi(e){const t=ft(e);return!Es()||!t.visualViewport?ad:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ld(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==ft(e)?!1:t}function ke(e,t,o,r){t===void 0&&(t=!1),o===void 0&&(o=!1);const s=e.getBoundingClientRect(),n=Ss(e);let i=oe(1);t&&(r?Ut(r)&&(i=Fe(r)):i=Fe(e));const a=ld(n,o,r)?Zi(n):oe(0);let l=(s.left+a.x)/i.x,c=(s.top+a.y)/i.y,u=s.width/i.x,d=s.height/i.y;if(n){const p=ft(n),h=r&&Ut(r)?ft(r):r;let b=p.frameElement;for(;b&&r&&h!==p;){const m=Fe(b),w=b.getBoundingClientRect(),y=mt(b),v=w.left+(b.clientLeft+parseFloat(y.paddingLeft))*m.x,k=w.top+(b.clientTop+parseFloat(y.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,d*=m.y,l+=v,c+=k,b=ft(b).frameElement}}return tr({width:u,height:d,x:l,y:c})}function cd(e){let{rect:t,offsetParent:o,strategy:r}=e;const s=Lt(o),n=Ht(o);if(o===n)return t;let i={scrollLeft:0,scrollTop:0},a=oe(1);const l=oe(0);if((s||!s&&r!=="fixed")&&((se(o)!=="body"||Ao(n))&&(i=or(o)),Lt(o))){const c=ke(o);a=Fe(o),l.x=c.x+o.clientLeft,l.y=c.y+o.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-i.scrollLeft*a.x+l.x,y:t.y*a.y-i.scrollTop*a.y+l.y}}function ud(e){return Array.from(e.getClientRects())}function Wi(e){return ke(Ht(e)).left+or(e).scrollLeft}function dd(e){const t=Ht(e),o=or(e),r=e.ownerDocument.body,s=pt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),n=pt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-o.scrollLeft+Wi(e);const a=-o.scrollTop;return mt(r).direction==="rtl"&&(i+=pt(t.clientWidth,r.clientWidth)-s),{width:s,height:n,x:i,y:a}}function hd(e,t){const o=ft(e),r=Ht(e),s=o.visualViewport;let n=r.clientWidth,i=r.clientHeight,a=0,l=0;if(s){n=s.width,i=s.height;const c=Es();(!c||c&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:n,height:i,x:a,y:l}}function pd(e,t){const o=ke(e,!0,t==="fixed"),r=o.top+e.clientTop,s=o.left+e.clientLeft,n=Lt(e)?Fe(e):oe(1),i=e.clientWidth*n.x,a=e.clientHeight*n.y,l=s*n.x,c=r*n.y;return{width:i,height:a,x:l,y:c}}function Ki(e,t,o){let r;if(t==="viewport")r=hd(e,o);else if(t==="document")r=dd(Ht(e));else if(Ut(t))r=pd(t,o);else{const s=Zi(e);r={...t,x:t.x-s.x,y:t.y-s.y}}return tr(r)}function Yi(e,t){const o=Ie(e);return o===t||!Ut(o)||er(o)?!1:mt(o).position==="fixed"||Yi(o,t)}function fd(e,t){const o=t.get(e);if(o)return o;let r=Co(e,[],!1).filter(a=>Ut(a)&&se(a)!=="body"),s=null;const n=mt(e).position==="fixed";let i=n?Ie(e):e;for(;Ut(i)&&!er(i);){const a=mt(i),l=$s(i);!l&&a.position==="fixed"&&(s=null),(n?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||Ao(i)&&!l&&Yi(e,i))?r=r.filter(u=>u!==i):s=a,i=Ie(i)}return t.set(e,r),r}function gd(e){let{element:t,boundary:o,rootBoundary:r,strategy:s}=e;const i=[...o==="clippingAncestors"?fd(t,this._c):[].concat(o),r],a=i[0],l=i.reduce((c,u)=>{const d=Ki(t,u,s);return c.top=pt(d.top,c.top),c.right=ee(d.right,c.right),c.bottom=ee(d.bottom,c.bottom),c.left=pt(d.left,c.left),c},Ki(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function bd(e){return Gi(e)}function md(e,t,o){const r=Lt(t),s=Ht(t),n=o==="fixed",i=ke(e,!0,n,t);let a={scrollLeft:0,scrollTop:0};const l=oe(0);if(r||!r&&!n)if((se(t)!=="body"||Ao(s))&&(a=or(t)),r){const c=ke(t,!0,n,t);l.x=c.x+t.clientLeft,l.y=c.y+t.clientTop}else s&&(l.x=Wi(s));return{x:i.left+a.scrollLeft-l.x,y:i.top+a.scrollTop-l.y,width:i.width,height:i.height}}function Ji(e,t){return!Lt(e)||mt(e).position==="fixed"?null:t?t(e):e.offsetParent}function Qi(e,t){const o=ft(e);if(!Lt(e))return o;let r=Ji(e,t);for(;r&&nd(r)&&mt(r).position==="static";)r=Ji(r,t);return r&&(se(r)==="html"||se(r)==="body"&&mt(r).position==="static"&&!$s(r))?o:r||id(e)||o}const vd=async function(e){let{reference:t,floating:o,strategy:r}=e;const s=this.getOffsetParent||Qi,n=this.getDimensions;return{reference:md(t,await s(o),r),floating:{x:0,y:0,...await n(o)}}};function yd(e){return mt(e).direction==="rtl"}const rr={convertOffsetParentRelativeRectToViewportRelativeRect:cd,getDocumentElement:Ht,getClippingRect:gd,getOffsetParent:Qi,getElementRects:vd,getClientRects:ud,getDimensions:bd,getScale:Fe,isElement:Ut,isRTL:yd};function wd(e,t){let o=null,r;const s=Ht(e);function n(){clearTimeout(r),o&&o.disconnect(),o=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),n();const{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(a||t(),!d||!p)return;const h=Qo(u),b=Qo(s.clientWidth-(c+d)),m=Qo(s.clientHeight-(u+p)),w=Qo(c),v={rootMargin:-h+"px "+-b+"px "+-m+"px "+-w+"px",threshold:pt(0,ee(1,l))||1};let k=!0;function C($){const _=$[0].intersectionRatio;if(_!==l){if(!k)return i();_?i(!1,_):r=setTimeout(()=>{i(!1,1e-7)},100)}k=!1}try{o=new IntersectionObserver(C,{...v,root:s.ownerDocument})}catch{o=new IntersectionObserver(C,v)}o.observe(e)}return i(!0),n}function _d(e,t,o,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:n=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Ss(e),u=s||n?[...c?Co(c):[],...Co(t)]:[];u.forEach(y=>{s&&y.addEventListener("scroll",o,{passive:!0}),n&&y.addEventListener("resize",o)});const d=c&&a?wd(c,o):null;let p=-1,h=null;i&&(h=new ResizeObserver(y=>{let[v]=y;v&&v.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{h&&h.observe(t)})),o()}),c&&!l&&h.observe(c),h.observe(t));let b,m=l?ke(e):null;l&&w();function w(){const y=ke(e);m&&(y.x!==m.x||y.y!==m.y||y.width!==m.width||y.height!==m.height)&&o(),m=y,b=requestAnimationFrame(w)}return o(),()=>{u.forEach(y=>{s&&y.removeEventListener("scroll",o),n&&y.removeEventListener("resize",o)}),d&&d(),h&&h.disconnect(),h=null,l&&cancelAnimationFrame(b)}}const xd=(e,t,o)=>{const r=new Map,s={platform:rr,...o},n={...s.platform,_c:r};return Xu(e,t,{...s,platform:n})};function kd(e){return Ad(e)}function qs(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function Ad(e){for(let t=e;t;t=qs(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=qs(e);t;t=qs(t)){if(!(t instanceof Element))continue;const o=getComputedStyle(t);if(o.display!=="contents"&&(o.position!=="static"||o.filter!=="none"||t.tagName==="BODY"))return t}return null}function Cd(e){return e!==null&&typeof e=="object"&&"getBoundingClientRect"in e}var U=class extends j{constructor(){super(...arguments),this.active=!1,this.placement="top",this.strategy="absolute",this.distance=0,this.skidding=0,this.arrow=!1,this.arrowPlacement="anchor",this.arrowPadding=10,this.flip=!1,this.flipFallbackPlacements="",this.flipFallbackStrategy="best-fit",this.flipPadding=0,this.shift=!1,this.shiftPadding=0,this.autoSizePadding=0}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start()}disconnectedCallback(){super.disconnectedCallback(),this.stop()}async updated(e){super.updated(e),e.has("active")&&(this.active?this.start():this.stop()),e.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}async handleAnchorChange(){if(await this.stop(),this.anchor&&typeof this.anchor=="string"){const e=this.getRootNode();this.anchorEl=e.getElementById(this.anchor)}else this.anchor instanceof Element||Cd(this.anchor)?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),this.anchorEl&&this.start()}start(){this.anchorEl&&(this.cleanup=_d(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(e=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame(()=>e())):e()})}reposition(){if(!this.active||!this.anchorEl)return;const e=[rd({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?e.push(Vi({apply:({rects:o})=>{const r=this.sync==="width"||this.sync==="both",s=this.sync==="height"||this.sync==="both";this.popup.style.width=r?`${o.reference.width}px`:"",this.popup.style.height=s?`${o.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&e.push(ed({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&e.push(sd({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?e.push(Vi({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:o,availableHeight:r})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${r}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${o}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&e.push(td({element:this.arrowEl,padding:this.arrowPadding}));const t=this.strategy==="absolute"?o=>rr.getOffsetParent(o,kd):rr.getOffsetParent;xd(this.anchorEl,this.popup,{placement:this.placement,middleware:e,strategy:this.strategy,platform:Go(Qt({},rr),{getOffsetParent:t})}).then(({x:o,y:r,middlewareData:s,placement:n})=>{const i=getComputedStyle(this).direction==="rtl",a={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]];if(this.setAttribute("data-current-placement",n),Object.assign(this.popup.style,{left:`${o}px`,top:`${r}px`}),this.arrow){const l=s.arrow.x,c=s.arrow.y;let u="",d="",p="",h="";if(this.arrowPlacement==="start"){const b=typeof l=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";u=typeof c=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",d=i?b:"",h=i?"":b}else if(this.arrowPlacement==="end"){const b=typeof l=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";d=i?"":b,h=i?b:"",p=typeof c=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else this.arrowPlacement==="center"?(h=typeof l=="number"?"calc(50% - var(--arrow-size-diagonal))":"",u=typeof c=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(h=typeof l=="number"?`${l}px`:"",u=typeof c=="number"?`${c}px`:"");Object.assign(this.arrowEl.style,{top:u,right:d,bottom:p,left:h,[a]:"calc(var(--arrow-size-diagonal) * -1)"})}}),this.emit("sl-reposition")}render(){return A`
3084
3085
  <slot name="anchor" @slotchange=${this.handleAnchorChange}></slot>
3085
3086
 
3086
3087
  <div
3087
3088
  part="popup"
3088
- class=${Q({popup:!0,"popup--active":this.active,"popup--fixed":this.strategy==="fixed","popup--has-arrow":this.arrow})}
3089
+ class=${K({popup:!0,"popup--active":this.active,"popup--fixed":this.strategy==="fixed","popup--has-arrow":this.arrow})}
3089
3090
  >
3090
3091
  <slot></slot>
3091
- ${this.arrow?P`<div part="arrow" class="popup__arrow" role="presentation"></div>`:""}
3092
+ ${this.arrow?A`<div part="arrow" class="popup__arrow" role="presentation"></div>`:""}
3092
3093
  </div>
3093
- `}};H.styles=uu,p([j(".popup")],H.prototype,"popup",2),p([j(".popup__arrow")],H.prototype,"arrowEl",2),p([g()],H.prototype,"anchor",2),p([g({type:Boolean,reflect:!0})],H.prototype,"active",2),p([g({reflect:!0})],H.prototype,"placement",2),p([g({reflect:!0})],H.prototype,"strategy",2),p([g({type:Number})],H.prototype,"distance",2),p([g({type:Number})],H.prototype,"skidding",2),p([g({type:Boolean})],H.prototype,"arrow",2),p([g({attribute:"arrow-placement"})],H.prototype,"arrowPlacement",2),p([g({attribute:"arrow-padding",type:Number})],H.prototype,"arrowPadding",2),p([g({type:Boolean})],H.prototype,"flip",2),p([g({attribute:"flip-fallback-placements",converter:{fromAttribute:e=>e.split(" ").map(t=>t.trim()).filter(t=>t!==""),toAttribute:e=>e.join(" ")}})],H.prototype,"flipFallbackPlacements",2),p([g({attribute:"flip-fallback-strategy"})],H.prototype,"flipFallbackStrategy",2),p([g({type:Object})],H.prototype,"flipBoundary",2),p([g({attribute:"flip-padding",type:Number})],H.prototype,"flipPadding",2),p([g({type:Boolean})],H.prototype,"shift",2),p([g({type:Object})],H.prototype,"shiftBoundary",2),p([g({attribute:"shift-padding",type:Number})],H.prototype,"shiftPadding",2),p([g({attribute:"auto-size"})],H.prototype,"autoSize",2),p([g()],H.prototype,"sync",2),p([g({type:Object})],H.prototype,"autoSizeBoundary",2),p([g({attribute:"auto-size-padding",type:Number})],H.prototype,"autoSizePadding",2);var st=class extends G{constructor(){super(),this.localize=new Jt(this),this.content="",this.placement="top",this.disabled=!1,this.distance=8,this.open=!1,this.skidding=0,this.trigger="hover focus",this.hoist=!1,this.handleBlur=()=>{this.hasTrigger("focus")&&this.hide()},this.handleClick=()=>{this.hasTrigger("click")&&(this.open?this.hide():this.show())},this.handleFocus=()=>{this.hasTrigger("focus")&&this.show()},this.handleKeyDown=e=>{this.open&&!this.disabled&&e.key==="Escape"&&(e.stopPropagation(),this.hide())},this.handleMouseOver=()=>{if(this.hasTrigger("hover")){const e=vi(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),e)}},this.handleMouseOut=()=>{if(this.hasTrigger("hover")){const e=vi(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.hide(),e)}},this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)}connectedCallback(){super.connectedCallback()}firstUpdated(){this.body.hidden=!this.open,this.open&&(this.popup.active=!0,this.popup.reposition())}hasTrigger(e){return this.trigger.split(" ").includes(e)}async handleOpenChange(){if(this.open){if(this.disabled)return;this.emit("sl-show"),await Xt(this.body),this.body.hidden=!1,this.popup.active=!0;const{keyframes:e,options:t}=Ut(this,"tooltip.show",{dir:this.localize.dir()});await Ht(this.popup.popup,e,t),this.emit("sl-after-show")}else{this.emit("sl-hide"),await Xt(this.body);const{keyframes:e,options:t}=Ut(this,"tooltip.hide",{dir:this.localize.dir()});await Ht(this.popup.popup,e,t),this.popup.active=!1,this.body.hidden=!0,this.emit("sl-after-hide")}}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,De(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,De(this,"sl-after-hide")}render(){return P`
3094
+ `}};U.styles=ju,f([V(".popup")],U.prototype,"popup",2),f([V(".popup__arrow")],U.prototype,"arrowEl",2),f([g()],U.prototype,"anchor",2),f([g({type:Boolean,reflect:!0})],U.prototype,"active",2),f([g({reflect:!0})],U.prototype,"placement",2),f([g({reflect:!0})],U.prototype,"strategy",2),f([g({type:Number})],U.prototype,"distance",2),f([g({type:Number})],U.prototype,"skidding",2),f([g({type:Boolean})],U.prototype,"arrow",2),f([g({attribute:"arrow-placement"})],U.prototype,"arrowPlacement",2),f([g({attribute:"arrow-padding",type:Number})],U.prototype,"arrowPadding",2),f([g({type:Boolean})],U.prototype,"flip",2),f([g({attribute:"flip-fallback-placements",converter:{fromAttribute:e=>e.split(" ").map(t=>t.trim()).filter(t=>t!==""),toAttribute:e=>e.join(" ")}})],U.prototype,"flipFallbackPlacements",2),f([g({attribute:"flip-fallback-strategy"})],U.prototype,"flipFallbackStrategy",2),f([g({type:Object})],U.prototype,"flipBoundary",2),f([g({attribute:"flip-padding",type:Number})],U.prototype,"flipPadding",2),f([g({type:Boolean})],U.prototype,"shift",2),f([g({type:Object})],U.prototype,"shiftBoundary",2),f([g({attribute:"shift-padding",type:Number})],U.prototype,"shiftPadding",2),f([g({attribute:"auto-size"})],U.prototype,"autoSize",2),f([g()],U.prototype,"sync",2),f([g({type:Object})],U.prototype,"autoSizeBoundary",2),f([g({attribute:"auto-size-padding",type:Number})],U.prototype,"autoSizePadding",2);var ot=class extends j{constructor(){super(),this.localize=new Jt(this),this.content="",this.placement="top",this.disabled=!1,this.distance=8,this.open=!1,this.skidding=0,this.trigger="hover focus",this.hoist=!1,this.handleBlur=()=>{this.hasTrigger("focus")&&this.hide()},this.handleClick=()=>{this.hasTrigger("click")&&(this.open?this.hide():this.show())},this.handleFocus=()=>{this.hasTrigger("focus")&&this.show()},this.handleKeyDown=e=>{this.open&&!this.disabled&&e.key==="Escape"&&(e.stopPropagation(),this.hide())},this.handleMouseOver=()=>{if(this.hasTrigger("hover")){const e=Fi(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),e)}},this.handleMouseOut=()=>{if(this.hasTrigger("hover")){const e=Fi(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.hide(),e)}},this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)}connectedCallback(){super.connectedCallback()}firstUpdated(){this.body.hidden=!this.open,this.open&&(this.popup.active=!0,this.popup.reposition())}hasTrigger(e){return this.trigger.split(" ").includes(e)}async handleOpenChange(){if(this.open){if(this.disabled)return;this.emit("sl-show"),await te(this.body),this.body.hidden=!1,this.popup.active=!0;const{keyframes:e,options:t}=Nt(this,"tooltip.show",{dir:this.localize.dir()});await Vt(this.popup.popup,e,t),this.emit("sl-after-show")}else{this.emit("sl-hide"),await te(this.body);const{keyframes:e,options:t}=Nt(this,"tooltip.hide",{dir:this.localize.dir()});await Vt(this.popup.popup,e,t),this.popup.active=!1,this.body.hidden=!0,this.emit("sl-after-hide")}}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,Re(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,Re(this,"sl-after-hide")}render(){return A`
3094
3095
  <sl-popup
3095
3096
  part="base"
3096
3097
  exportparts="
3097
3098
  popup:base__popup,
3098
3099
  arrow:base__arrow
3099
3100
  "
3100
- class=${Q({tooltip:!0,"tooltip--open":this.open})}
3101
+ class=${K({tooltip:!0,"tooltip--open":this.open})}
3101
3102
  placement=${this.placement}
3102
3103
  distance=${this.distance}
3103
3104
  skidding=${this.skidding}
@@ -3114,8 +3115,8 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
3114
3115
  <slot name="content">${this.content}</slot>
3115
3116
  </div>
3116
3117
  </sl-popup>
3117
- `}};st.styles=cu,st.dependencies={"sl-popup":H},p([j("slot:not([name])")],st.prototype,"defaultSlot",2),p([j(".tooltip__body")],st.prototype,"body",2),p([j("sl-popup")],st.prototype,"popup",2),p([g()],st.prototype,"content",2),p([g()],st.prototype,"placement",2),p([g({type:Boolean,reflect:!0})],st.prototype,"disabled",2),p([g({type:Number})],st.prototype,"distance",2),p([g({type:Boolean,reflect:!0})],st.prototype,"open",2),p([g({type:Number})],st.prototype,"skidding",2),p([g()],st.prototype,"trigger",2),p([g({type:Boolean})],st.prototype,"hoist",2),p([U("open",{waitUntilFirstUpdate:!0})],st.prototype,"handleOpenChange",1),p([U(["content","distance","hoist","placement","skidding"])],st.prototype,"handleOptionsChange",1),p([U("disabled")],st.prototype,"handleDisabledChange",1),Vt("tooltip.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:150,easing:"ease"}}),Vt("tooltip.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:150,easing:"ease"}}),st.define("sl-tooltip"),ts.define("sl-spinner");var ju=Z`
3118
- ${tt}
3118
+ `}};ot.styles=Uu,ot.dependencies={"sl-popup":U},f([V("slot:not([name])")],ot.prototype,"defaultSlot",2),f([V(".tooltip__body")],ot.prototype,"body",2),f([V("sl-popup")],ot.prototype,"popup",2),f([g()],ot.prototype,"content",2),f([g()],ot.prototype,"placement",2),f([g({type:Boolean,reflect:!0})],ot.prototype,"disabled",2),f([g({type:Number})],ot.prototype,"distance",2),f([g({type:Boolean,reflect:!0})],ot.prototype,"open",2),f([g({type:Number})],ot.prototype,"skidding",2),f([g()],ot.prototype,"trigger",2),f([g({type:Boolean})],ot.prototype,"hoist",2),f([H("open",{waitUntilFirstUpdate:!0})],ot.prototype,"handleOpenChange",1),f([H(["content","distance","hoist","placement","skidding"])],ot.prototype,"handleOptionsChange",1),f([H("disabled")],ot.prototype,"handleDisabledChange",1),Ot("tooltip.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:150,easing:"ease"}}),Ot("tooltip.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:150,easing:"ease"}}),ot.define("sl-tooltip"),ls.define("sl-spinner");var $d=z`
3119
+ ${Q}
3119
3120
 
3120
3121
  :host {
3121
3122
  display: contents;
@@ -3207,10 +3208,10 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
3207
3208
  font-size: var(--sl-font-size-medium);
3208
3209
  padding-inline-end: var(--sl-spacing-medium);
3209
3210
  }
3210
- `,Pe=Object.assign(document.createElement("div"),{className:"sl-toast-stack"}),Rt=class extends G{constructor(){super(...arguments),this.hasSlotController=new ge(this,"icon","suffix"),this.localize=new Jt(this),this.open=!1,this.closable=!1,this.variant="primary",this.duration=1/0}firstUpdated(){this.base.hidden=!this.open}restartAutoHide(){clearTimeout(this.autoHideTimeout),this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout(()=>this.hide(),this.duration))}handleCloseClick(){this.hide()}handleMouseMove(){this.restartAutoHide()}async handleOpenChange(){if(this.open){this.emit("sl-show"),this.duration<1/0&&this.restartAutoHide(),await Xt(this.base),this.base.hidden=!1;const{keyframes:e,options:t}=Ut(this,"alert.show",{dir:this.localize.dir()});await Ht(this.base,e,t),this.emit("sl-after-show")}else{this.emit("sl-hide"),clearTimeout(this.autoHideTimeout),await Xt(this.base);const{keyframes:e,options:t}=Ut(this,"alert.hide",{dir:this.localize.dir()});await Ht(this.base,e,t),this.base.hidden=!0,this.emit("sl-after-hide")}}handleDurationChange(){this.restartAutoHide()}async show(){if(!this.open)return this.open=!0,De(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,De(this,"sl-after-hide")}async toast(){return new Promise(e=>{Pe.parentElement===null&&document.body.append(Pe),Pe.appendChild(this),requestAnimationFrame(()=>{this.clientWidth,this.show()}),this.addEventListener("sl-after-hide",()=>{Pe.removeChild(this),e(),Pe.querySelector("sl-alert")===null&&Pe.remove()},{once:!0})})}render(){return P`
3211
+ `,Be=Object.assign(document.createElement("div"),{className:"sl-toast-stack"}),zt=class extends j{constructor(){super(...arguments),this.hasSlotController=new _e(this,"icon","suffix"),this.localize=new Jt(this),this.open=!1,this.closable=!1,this.variant="primary",this.duration=1/0}firstUpdated(){this.base.hidden=!this.open}restartAutoHide(){clearTimeout(this.autoHideTimeout),this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout(()=>this.hide(),this.duration))}handleCloseClick(){this.hide()}handleMouseMove(){this.restartAutoHide()}async handleOpenChange(){if(this.open){this.emit("sl-show"),this.duration<1/0&&this.restartAutoHide(),await te(this.base),this.base.hidden=!1;const{keyframes:e,options:t}=Nt(this,"alert.show",{dir:this.localize.dir()});await Vt(this.base,e,t),this.emit("sl-after-show")}else{this.emit("sl-hide"),clearTimeout(this.autoHideTimeout),await te(this.base);const{keyframes:e,options:t}=Nt(this,"alert.hide",{dir:this.localize.dir()});await Vt(this.base,e,t),this.base.hidden=!0,this.emit("sl-after-hide")}}handleDurationChange(){this.restartAutoHide()}async show(){if(!this.open)return this.open=!0,Re(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,Re(this,"sl-after-hide")}async toast(){return new Promise(e=>{Be.parentElement===null&&document.body.append(Be),Be.appendChild(this),requestAnimationFrame(()=>{this.clientWidth,this.show()}),this.addEventListener("sl-after-hide",()=>{Be.removeChild(this),e(),Be.querySelector("sl-alert")===null&&Be.remove()},{once:!0})})}render(){return A`
3211
3212
  <div
3212
3213
  part="base"
3213
- class=${Q({alert:!0,"alert--open":this.open,"alert--closable":this.closable,"alert--has-icon":this.hasSlotController.test("icon"),"alert--primary":this.variant==="primary","alert--success":this.variant==="success","alert--neutral":this.variant==="neutral","alert--warning":this.variant==="warning","alert--danger":this.variant==="danger"})}
3214
+ class=${K({alert:!0,"alert--open":this.open,"alert--closable":this.closable,"alert--has-icon":this.hasSlotController.test("icon"),"alert--primary":this.variant==="primary","alert--success":this.variant==="success","alert--neutral":this.variant==="neutral","alert--warning":this.variant==="warning","alert--danger":this.variant==="danger"})}
3214
3215
  role="alert"
3215
3216
  aria-hidden=${this.open?"false":"true"}
3216
3217
  @mousemove=${this.handleMouseMove}
@@ -3223,7 +3224,7 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
3223
3224
  <slot></slot>
3224
3225
  </div>
3225
3226
 
3226
- ${this.closable?P`
3227
+ ${this.closable?A`
3227
3228
  <sl-icon-button
3228
3229
  part="close-button"
3229
3230
  exportparts="base:close-button__base"
@@ -3235,19 +3236,19 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
3235
3236
  ></sl-icon-button>
3236
3237
  `:""}
3237
3238
  </div>
3238
- `}};Rt.styles=ju,Rt.dependencies={"sl-icon-button":at},p([j('[part~="base"]')],Rt.prototype,"base",2),p([g({type:Boolean,reflect:!0})],Rt.prototype,"open",2),p([g({type:Boolean,reflect:!0})],Rt.prototype,"closable",2),p([g({reflect:!0})],Rt.prototype,"variant",2),p([g({type:Number})],Rt.prototype,"duration",2),p([U("open",{waitUntilFirstUpdate:!0})],Rt.prototype,"handleOpenChange",1),p([U("duration")],Rt.prototype,"handleDurationChange",1),Vt("alert.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),Vt("alert.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}}),Rt.define("sl-alert");var Gu=Object.defineProperty,Zu=Object.getOwnPropertyDescriptor,Wu=(e,t,o,r)=>{for(var s=r>1?void 0:r?Zu(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&Gu(t,o,s),s};class ct extends Wt{constructor(){super(...arguments),this.lang="en"}emit(t,o){const r=new CustomEvent(t,{bubbles:!0,cancelable:!1,composed:!0,detail:{},...o});return this.dispatchEvent(r),r}}Wu([$({type:String})],ct.prototype,"lang",2);const ys='<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8L2.146 2.854Z"/></svg>';var Ku=Object.defineProperty,Yu=Object.getOwnPropertyDescriptor,zi=(e,t,o,r)=>{for(var s=r>1?void 0:r?Yu(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&Ku(t,o,s),s};let Jo=class extends ct{constructor(){super(...arguments),this.title="ChatBot"}render(){return T` <header class="cb-header" part="header">
3239
+ `}};zt.styles=$d,zt.dependencies={"sl-icon-button":nt},f([V('[part~="base"]')],zt.prototype,"base",2),f([g({type:Boolean,reflect:!0})],zt.prototype,"open",2),f([g({type:Boolean,reflect:!0})],zt.prototype,"closable",2),f([g({reflect:!0})],zt.prototype,"variant",2),f([g({type:Number})],zt.prototype,"duration",2),f([H("open",{waitUntilFirstUpdate:!0})],zt.prototype,"handleOpenChange",1),f([H("duration")],zt.prototype,"handleDurationChange",1),Ot("alert.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),Ot("alert.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}}),zt.define("sl-alert");var Ed=Object.defineProperty,Sd=Object.getOwnPropertyDescriptor,qd=(e,t,o,r)=>{for(var s=r>1?void 0:r?Sd(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&Ed(t,o,s),s};class at extends Bt{constructor(){super(...arguments),this.lang="en"}emit(t,o){const r=new CustomEvent(t,{bubbles:!0,cancelable:!1,composed:!0,detail:{},...o});return this.dispatchEvent(r),r}}qd([g({type:String})],at.prototype,"lang",2);const sr='<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8L2.146 2.854Z"/></svg>';var Dd=Object.defineProperty,Td=Object.getOwnPropertyDescriptor,Xi=(e,t,o,r)=>{for(var s=r>1?void 0:r?Td(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&Dd(t,o,s),s};let nr=class extends at{constructor(){super(...arguments),this.title="ChatBot"}render(){return A` <header class="cb-header" part="header">
3239
3240
  <span class="left">
3240
3241
  <sl-button @click=${this._clickHandler} class="cb-setting-button" variant="text" circle>
3241
- <cb-icon color="white" svg="${V.setting.logoSvg}"></cb-icon>
3242
+ <cb-icon color="white" svg="${R.setting.logoSvg}"></cb-icon>
3242
3243
  </sl-button>
3243
3244
  </span>
3244
3245
  <span class="center title">${this.title}</span>
3245
3246
  <span class="right">
3246
3247
  <sl-button @click=${this._clickCloseHandler} class="cb-setting-button" variant="text" circle>
3247
- <cb-icon color="white" svg="${ys}"></cb-icon>
3248
+ <cb-icon color="white" svg="${sr}"></cb-icon>
3248
3249
  </sl-button>
3249
3250
  </span>
3250
- </header>`}_clickHandler(){this.emit("setting:show")}_clickCloseHandler(){this.emit("chatbot:toggle",{detail:{open:!1}})}};Jo.styles=Vl,zi([$({type:String,attribute:"title"})],Jo.prototype,"title",2),Jo=zi([ot("cb-header")],Jo);const Ju=X`
3251
+ </header>`}_clickHandler(){this.emit("setting:show")}_clickCloseHandler(){this.emit("chatbot:toggle",{detail:{open:!1}})}};nr.styles=Hc,Xi([g({type:String,attribute:"title"})],nr.prototype,"title",2),nr=Xi([tt("cb-header")],nr);const Ld=z`
3251
3252
  ${Et}
3252
3253
  .cb-footer {
3253
3254
  line-height: 60px;
@@ -3261,7 +3262,7 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
3261
3262
  .link__item {
3262
3263
  color: var(--primary-color);
3263
3264
  }
3264
- `;var Qu=Object.defineProperty,Xu=Object.getOwnPropertyDescriptor,td=(e,t,o,r)=>{for(var s=r>1?void 0:r?Xu(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&Qu(t,o,s),s};let ws=class extends ct{constructor(){super(...arguments),this.year=new Date().getFullYear()}render(){return T`
3265
+ `;var zd=Object.defineProperty,Rd=Object.getOwnPropertyDescriptor,Pd=(e,t,o,r)=>{for(var s=r>1?void 0:r?Rd(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&zd(t,o,s),s};let Ds=class extends at{constructor(){super(...arguments),this.year=new Date().getFullYear()}render(){return A`
3265
3266
  <div class="cb-footer" part="footer">
3266
3267
  yugasun@${this.year}
3267
3268
  <a
@@ -3288,15 +3289,11 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
3288
3289
  Vite
3289
3290
  </a>
3290
3291
  </div>
3291
- `}};ws.styles=Ju,ws=td([ot("cb-footer")],ws);/**
3292
- * @license
3293
- * Copyright 2020 Google LLC
3294
- * SPDX-License-Identifier: BSD-3-Clause
3295
- */const{I:ed}=kl,od=e=>e===null||typeof e!="object"&&typeof e!="function",rd=e=>e.strings===void 0,Ri=()=>document.createComment(""),wo=(e,t,o)=>{var r;const s=e._$AA.parentNode,n=t===void 0?e._$AB:t._$AA;if(o===void 0){const i=s.insertBefore(Ri(),n),a=s.insertBefore(Ri(),n);o=new ed(i,a,e,e.options)}else{const i=o._$AB.nextSibling,a=o._$AM,l=a!==e;if(l){let c;(r=o._$AQ)===null||r===void 0||r.call(o,e),o._$AM=e,o._$AP!==void 0&&(c=e._$AU)!==a._$AU&&o._$AP(c)}if(i!==n||l){let c=o._$AA;for(;c!==i;){const u=c.nextSibling;s.insertBefore(c,n),c=u}}}return o},ve=(e,t,o=e)=>(e._$AI(t,o),e),sd={},nd=(e,t=sd)=>e._$AH=t,id=e=>e._$AH,_s=e=>{var t;(t=e._$AP)===null||t===void 0||t.call(e,!1,!0);let o=e._$AA;const r=e._$AB.nextSibling;for(;o!==r;){const s=o.nextSibling;o.remove(),o=s}};/**
3292
+ `}};Ds.styles=Ld,Ds=Pd([tt("cb-footer")],Ds);/**
3296
3293
  * @license
3297
3294
  * Copyright 2017 Google LLC
3298
3295
  * SPDX-License-Identifier: BSD-3-Clause
3299
- */const Pi=(e,t,o)=>{const r=new Map;for(let s=t;s<=o;s++)r.set(e[s],s);return r},xs=Or(class extends Nr{constructor(e){if(super(e),e.type!==Br.CHILD)throw Error("repeat() can only be used in text expressions")}ct(e,t,o){let r;o===void 0?o=t:t!==void 0&&(r=t);const s=[],n=[];let i=0;for(const a of e)s[i]=r?r(a,i):i,n[i]=o(a,i),i++;return{values:n,keys:s}}render(e,t,o){return this.ct(e,t,o).values}update(e,[t,o,r]){var s;const n=id(e),{values:i,keys:a}=this.ct(t,o,r);if(!Array.isArray(n))return this.ut=a,i;const l=(s=this.ut)!==null&&s!==void 0?s:this.ut=[],c=[];let u,d,f=0,h=n.length-1,b=0,m=i.length-1;for(;f<=h&&b<=m;)if(n[f]===null)f++;else if(n[h]===null)h--;else if(l[f]===a[b])c[b]=ve(n[f],i[b]),f++,b++;else if(l[h]===a[m])c[m]=ve(n[h],i[m]),h--,m--;else if(l[f]===a[m])c[m]=ve(n[f],i[m]),wo(e,c[m+1],n[f]),f++,m--;else if(l[h]===a[b])c[b]=ve(n[h],i[b]),wo(e,n[f],n[h]),h--,b++;else if(u===void 0&&(u=Pi(a,b,m),d=Pi(l,f,h)),u.has(l[f]))if(u.has(l[h])){const w=d.get(a[b]),y=w!==void 0?n[w]:null;if(y===null){const v=wo(e,n[f]);ve(v,i[b]),c[b]=v}else c[b]=ve(y,i[b]),wo(e,n[f],y),n[w]=null;b++}else _s(n[h]),h--;else _s(n[f]),f++;for(;b<=m;){const w=wo(e,c[m+1]);ve(w,i[b]),c[b++]=w}for(;f<=h;){const w=n[f++];w!==null&&_s(w)}return this.ut=a,nd(e,c),$t}}),ad=X`
3296
+ */const ta=(e,t,o)=>{const r=new Map;for(let s=t;s<=o;s++)r.set(e[s],s);return r},Ts=gs(class extends bs{constructor(e){if(super(e),e.type!==Xt.CHILD)throw Error("repeat() can only be used in text expressions")}ht(e,t,o){let r;o===void 0?o=t:t!==void 0&&(r=t);const s=[],n=[];let i=0;for(const a of e)s[i]=r?r(a,i):i,n[i]=o(a,i),i++;return{values:n,keys:s}}render(e,t,o){return this.ht(e,t,o).values}update(e,[t,o,r]){const s=bu(e),{values:n,keys:i}=this.ht(t,o,r);if(!Array.isArray(s))return this.dt=i,n;const a=this.dt??(this.dt=[]),l=[];let c,u,d=0,p=s.length-1,h=0,b=n.length-1;for(;d<=p&&h<=b;)if(s[d]===null)d++;else if(s[p]===null)p--;else if(a[d]===i[h])l[h]=xe(s[d],n[h]),d++,h++;else if(a[p]===i[b])l[b]=xe(s[p],n[b]),p--,b--;else if(a[d]===i[b])l[b]=xe(s[d],n[b]),bo(e,l[b+1],s[d]),d++,b--;else if(a[p]===i[h])l[h]=xe(s[p],n[h]),bo(e,s[d],s[p]),p--,h++;else if(c===void 0&&(c=ta(i,h,b),u=ta(a,d,p)),c.has(a[d]))if(c.has(a[p])){const m=u.get(i[h]),w=m!==void 0?s[m]:null;if(w===null){const y=bo(e,s[d]);xe(y,n[h]),l[h]=y}else l[h]=xe(w,n[h]),bo(e,s[d],w),s[m]=null;h++}else hs(s[p]),p--;else hs(s[d]),d++;for(;h<=b;){const m=bo(e,l[b+1]);xe(m,n[h]),l[h++]=m}for(;d<=p;){const m=s[d++];m!==null&&hs(m)}return this.dt=i,Si(e,l),xt}}),Md=z`
3300
3297
  ${Et}
3301
3298
 
3302
3299
  :host {
@@ -3342,15 +3339,16 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
3342
3339
 
3343
3340
  .cb-actions-list {
3344
3341
  margin: 10px 0px 0px 0px;
3345
- padding: 10px 0px;
3342
+ padding: 0px 0px;
3346
3343
  //border-top: 1px solid rgba(0, 0, 0, 0.1);
3347
3344
  display: flex;
3348
3345
  justify-content: center;
3346
+ flex-wrap: wrap;
3349
3347
  }
3350
3348
 
3351
3349
  .cb-action {
3352
3350
  padding: 6px 6px;
3353
- margin: 1px 4px;
3351
+ margin: 1px 2px;
3354
3352
  border-radius: 6px;
3355
3353
  cursor: pointer;
3356
3354
  color: rgba(255, 255, 255, 1);
@@ -3395,19 +3393,23 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
3395
3393
  * @license
3396
3394
  * Copyright 2021 Google LLC
3397
3395
  * SPDX-License-Identifier: BSD-3-Clause
3398
- */function Me(e,t,o){return e?t():o==null?void 0:o()}/**
3396
+ */function Oe(e,t,o){return e?t(e):o==null?void 0:o(e)}/**
3397
+ * @license
3398
+ * Copyright 2020 Google LLC
3399
+ * SPDX-License-Identifier: BSD-3-Clause
3400
+ */const Id=e=>e===null||typeof e!="object"&&typeof e!="function",Fd=e=>e.strings===void 0;/**
3399
3401
  * @license
3400
3402
  * Copyright 2017 Google LLC
3401
3403
  * SPDX-License-Identifier: BSD-3-Clause
3402
- */const _o=(e,t)=>{var o,r;const s=e._$AN;if(s===void 0)return!1;for(const n of s)(r=(o=n)._$AO)===null||r===void 0||r.call(o,t,!1),_o(n,t);return!0},Qo=e=>{let t,o;do{if((t=e._$AM)===void 0)break;o=t._$AN,o.delete(e),e=t}while((o==null?void 0:o.size)===0)},Mi=e=>{for(let t;t=e._$AM;e=t){let o=t._$AN;if(o===void 0)t._$AN=o=new Set;else if(o.has(e))break;o.add(e),ud(t)}};function ld(e){this._$AN!==void 0?(Qo(this),this._$AM=e,Mi(this)):this._$AM=e}function cd(e,t=!1,o=0){const r=this._$AH,s=this._$AN;if(s!==void 0&&s.size!==0)if(t)if(Array.isArray(r))for(let n=o;n<r.length;n++)_o(r[n],!1),Qo(r[n]);else r!=null&&(_o(r,!1),Qo(r));else _o(this,e)}const ud=e=>{var t,o,r,s;e.type==Br.CHILD&&((t=(r=e)._$AP)!==null&&t!==void 0||(r._$AP=cd),(o=(s=e)._$AQ)!==null&&o!==void 0||(s._$AQ=ld))};let dd=class extends Nr{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,o,r){super._$AT(t,o,r),Mi(this),this.isConnected=t._$AU}_$AO(t,o=!0){var r,s;t!==this.isConnected&&(this.isConnected=t,t?(r=this.reconnected)===null||r===void 0||r.call(this):(s=this.disconnected)===null||s===void 0||s.call(this)),o&&(_o(this,t),Qo(this))}setValue(t){if(rd(this._$Ct))this._$Ct._$AI(t,this);else{const o=[...this._$Ct._$AH];o[this._$Ci]=t,this._$Ct._$AI(o,this,0)}}disconnected(){}reconnected(){}};/**
3404
+ */const $o=(e,t)=>{var o,r;const s=e._$AN;if(s===void 0)return!1;for(const n of s)(r=(o=n)._$AO)===null||r===void 0||r.call(o,t,!1),$o(n,t);return!0},ir=e=>{let t,o;do{if((t=e._$AM)===void 0)break;o=t._$AN,o.delete(e),e=t}while((o==null?void 0:o.size)===0)},ea=e=>{for(let t;t=e._$AM;e=t){let o=t._$AN;if(o===void 0)t._$AN=o=new Set;else if(o.has(e))break;o.add(e),Nd(t)}};function Bd(e){this._$AN!==void 0?(ir(this),this._$AM=e,ea(this)):this._$AM=e}function Od(e,t=!1,o=0){const r=this._$AH,s=this._$AN;if(s!==void 0&&s.size!==0)if(t)if(Array.isArray(r))for(let n=o;n<r.length;n++)$o(r[n],!1),ir(r[n]);else r!=null&&($o(r,!1),ir(r));else $o(this,e)}const Nd=e=>{var t,o,r,s;e.type==pi.CHILD&&((t=(r=e)._$AP)!==null&&t!==void 0||(r._$AP=Od),(o=(s=e)._$AQ)!==null&&o!==void 0||(s._$AQ=Bd))};let Vd=class extends gi{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,o,r){super._$AT(t,o,r),ea(this),this.isConnected=t._$AU}_$AO(t,o=!0){var r,s;t!==this.isConnected&&(this.isConnected=t,t?(r=this.reconnected)===null||r===void 0||r.call(this):(s=this.disconnected)===null||s===void 0||s.call(this)),o&&($o(this,t),ir(this))}setValue(t){if(Fd(this._$Ct))this._$Ct._$AI(t,this);else{const o=[...this._$Ct._$AH];o[this._$Ci]=t,this._$Ct._$AI(o,this,0)}}disconnected(){}reconnected(){}};/**
3403
3405
  * @license
3404
3406
  * Copyright 2021 Google LLC
3405
3407
  * SPDX-License-Identifier: BSD-3-Clause
3406
- */class hd{constructor(t){this.G=t}disconnect(){this.G=void 0}reconnect(t){this.G=t}deref(){return this.G}}let pd=class{constructor(){this.Y=void 0,this.Z=void 0}get(){return this.Y}pause(){var t;(t=this.Y)!==null&&t!==void 0||(this.Y=new Promise(o=>this.Z=o))}resume(){var t;(t=this.Z)===null||t===void 0||t.call(this),this.Y=this.Z=void 0}};/**
3408
+ */class Hd{constructor(t){this.G=t}disconnect(){this.G=void 0}reconnect(t){this.G=t}deref(){return this.G}}let Ud=class{constructor(){this.Y=void 0,this.Z=void 0}get(){return this.Y}pause(){var t;(t=this.Y)!==null&&t!==void 0||(this.Y=new Promise(o=>this.Z=o))}resume(){var t;(t=this.Z)===null||t===void 0||t.call(this),this.Y=this.Z=void 0}};/**
3407
3409
  * @license
3408
3410
  * Copyright 2017 Google LLC
3409
3411
  * SPDX-License-Identifier: BSD-3-Clause
3410
- */const Fi=e=>!od(e)&&typeof e.then=="function",Ii=1073741823;class fd extends dd{constructor(){super(...arguments),this._$C_t=Ii,this._$Cwt=[],this._$Cq=new hd(this),this._$CK=new pd}render(...t){var o;return(o=t.find(r=>!Fi(r)))!==null&&o!==void 0?o:$t}update(t,o){const r=this._$Cwt;let s=r.length;this._$Cwt=o;const n=this._$Cq,i=this._$CK;this.isConnected||this.disconnected();for(let a=0;a<o.length&&!(a>this._$C_t);a++){const l=o[a];if(!Fi(l))return this._$C_t=a,l;a<s&&l===r[a]||(this._$C_t=Ii,s=0,Promise.resolve(l).then(async c=>{for(;i.get();)await i.get();const u=n.deref();if(u!==void 0){const d=u._$Cwt.indexOf(l);d>-1&&d<u._$C_t&&(u._$C_t=d,u.setValue(c))}}))}return $t}disconnected(){this._$Cq.disconnect(),this._$CK.pause()}reconnected(){this._$Cq.reconnect(this),this._$CK.resume()}}const Bi=Or(fd);var gd=Object.defineProperty,bd=Object.getOwnPropertyDescriptor,md=(e,t,o,r)=>{for(var s=r>1?void 0:r?bd(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&gd(t,o,s),s};let ks=class extends Wt{render(){return T` <div class="cb-thinking" style="color: rgb(34, 34, 34);"><span></span><span></span><span></span></div>`}};ks.styles=X`
3412
+ */const oa=e=>!Id(e)&&typeof e.then=="function",ra=1073741823;class jd extends Vd{constructor(){super(...arguments),this._$C_t=ra,this._$Cwt=[],this._$Cq=new Hd(this),this._$CK=new Ud}render(...t){var o;return(o=t.find(r=>!oa(r)))!==null&&o!==void 0?o:Yt}update(t,o){const r=this._$Cwt;let s=r.length;this._$Cwt=o;const n=this._$Cq,i=this._$CK;this.isConnected||this.disconnected();for(let a=0;a<o.length&&!(a>this._$C_t);a++){const l=o[a];if(!oa(l))return this._$C_t=a,l;a<s&&l===r[a]||(this._$C_t=ra,s=0,Promise.resolve(l).then(async c=>{for(;i.get();)await i.get();const u=n.deref();if(u!==void 0){const d=u._$Cwt.indexOf(l);d>-1&&d<u._$C_t&&(u._$C_t=d,u.setValue(c))}}))}return Yt}disconnected(){this._$Cq.disconnect(),this._$CK.pause()}reconnected(){this._$Cq.reconnect(this),this._$CK.resume()}}const sa=fi(jd);var Gd=Object.defineProperty,Zd=Object.getOwnPropertyDescriptor,Wd=(e,t,o,r)=>{for(var s=r>1?void 0:r?Zd(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&Gd(t,o,s),s};let Ls=class extends Bt{render(){return A` <div class="cb-thinking" style="color: rgb(34, 34, 34);"><span></span><span></span><span></span></div>`}};Ls.styles=z`
3411
3413
  .cb-thinking {
3412
3414
  text-align: center;
3413
3415
  }
@@ -3444,15 +3446,15 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
3444
3446
  opacity: 1;
3445
3447
  }
3446
3448
  }
3447
- `,ks=md([ot("cb-thinking")],ks);var vd=Object.defineProperty,yd=Object.getOwnPropertyDescriptor,Oi=(e,t,o,r)=>{for(var s=r>1?void 0:r?yd(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&vd(t,o,s),s};let Xo=class extends ct{constructor(){super(...arguments),this.files=[]}render(){return T` <div class="cb-uploading">
3449
+ `,Ls=Wd([tt("cb-thinking")],Ls);var Kd=Object.defineProperty,Yd=Object.getOwnPropertyDescriptor,na=(e,t,o,r)=>{for(var s=r>1?void 0:r?Yd(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&Kd(t,o,s),s};let ar=class extends at{constructor(){super(...arguments),this.files=[]}render(){return A` <div class="cb-uploading">
3448
3450
  <div class="cb-uploading__title">
3449
3451
  <sl-spinner class="cb-spinner"></sl-spinner>
3450
3452
  <span>Uploading...</span>
3451
3453
  </div>
3452
3454
  <div class="cb-uploading__filelist">
3453
- ${this.files.map(e=>T`${e.name}<br />`)}
3455
+ ${this.files.map(e=>A`${e.name}<br />`)}
3454
3456
  </div>
3455
- </div>`}};Xo.styles=X`
3457
+ </div>`}};ar.styles=z`
3456
3458
  .cb-uploading {
3457
3459
  text-align: left;
3458
3460
  }
@@ -3469,7 +3471,7 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
3469
3471
  --track-color: white;
3470
3472
  margin-right: 5px;
3471
3473
  }
3472
- `,Oi([$({type:Array})],Xo.prototype,"files",2),Xo=Oi([ot("cb-uploading")],Xo);const wd=X`
3474
+ `,na([g({type:Array})],ar.prototype,"files",2),ar=na([tt("cb-uploading")],ar);const Jd=z`
3473
3475
  ${Et}
3474
3476
  :host {
3475
3477
  }
@@ -3489,7 +3491,7 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
3489
3491
  font-size: 2em;
3490
3492
  margin-right: 0.2em;
3491
3493
  }
3492
- `;var _d=Object.defineProperty,xd=Object.getOwnPropertyDescriptor,Cs=(e,t,o,r)=>{for(var s=r>1?void 0:r?xd(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&_d(t,o,s),s};let xo=class extends Wt{constructor(){super(...arguments),this.url="",this.inverse=!1}render(){return T`
3494
+ `;var Qd=Object.defineProperty,Xd=Object.getOwnPropertyDescriptor,zs=(e,t,o,r)=>{for(var s=r>1?void 0:r?Xd(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&Qd(t,o,s),s};let Eo=class extends Bt{constructor(){super(...arguments),this.url="",this.inverse=!1}render(){return A`
3493
3495
  <a
3494
3496
  class="
3495
3497
  cb-external-link link__item
@@ -3501,7 +3503,7 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
3501
3503
  >
3502
3504
  <slot></slot>
3503
3505
  </a>
3504
- `}};xo.styles=X`
3506
+ `}};Eo.styles=z`
3505
3507
  :host {
3506
3508
  --primary-color: var(--sl-color-primary-600);
3507
3509
  }
@@ -3525,19 +3527,19 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
3525
3527
  .cb-external-link:hover {
3526
3528
  text-decoration: underline;
3527
3529
  }
3528
- `,Cs([$({type:String})],xo.prototype,"url",2),Cs([$({type:Boolean})],xo.prototype,"inverse",2),xo=Cs([ot("cb-external-link")],xo);const kd='<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2h-2v-1h2a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5L14 4.5ZM1.928 15.849v-3.337h1.136v-.662H0v.662h1.134v3.337h.794Zm4.689-3.999h-.894L4.9 13.289h-.035l-.832-1.439h-.932l1.228 1.983l-1.24 2.016h.862l.853-1.415h.035l.85 1.415h.907l-1.253-1.992l1.274-2.007Zm1.93.662v3.337h-.794v-3.337H6.619v-.662h3.064v.662H8.546Z"/></svg>',Cd='<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2h-1v-1h1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5L14 4.5ZM1.6 11.85H0v3.999h.791v-1.342h.803c.287 0 .531-.057.732-.173c.203-.117.358-.275.463-.474a1.42 1.42 0 0 0 .161-.677c0-.25-.053-.476-.158-.677a1.176 1.176 0 0 0-.46-.477c-.2-.12-.443-.179-.732-.179Zm.545 1.333a.795.795 0 0 1-.085.38a.574.574 0 0 1-.238.241a.794.794 0 0 1-.375.082H.788V12.48h.66c.218 0 .389.06.512.181c.123.122.185.296.185.522Zm1.217-1.333v3.999h1.46c.401 0 .734-.08.998-.237a1.45 1.45 0 0 0 .595-.689c.13-.3.196-.662.196-1.084c0-.42-.065-.778-.196-1.075a1.426 1.426 0 0 0-.589-.68c-.264-.156-.599-.234-1.005-.234H3.362Zm.791.645h.563c.248 0 .45.05.609.152a.89.89 0 0 1 .354.454c.079.201.118.452.118.753a2.3 2.3 0 0 1-.068.592a1.14 1.14 0 0 1-.196.422a.8.8 0 0 1-.334.252a1.298 1.298 0 0 1-.483.082h-.563v-2.707Zm3.743 1.763v1.591h-.79V11.85h2.548v.653H7.896v1.117h1.606v.638H7.896Z"/></svg>',Ad='<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2H9v-1h3a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5L14 4.5ZM.706 13.189v2.66H0V11.85h.806l1.14 2.596h.026l1.14-2.596h.8v3.999h-.716v-2.66h-.038l-.946 2.159h-.516l-.952-2.16H.706Zm3.919 2.66V11.85h1.459c.406 0 .741.078 1.005.234c.263.157.46.383.589.68c.13.297.196.655.196 1.075c0 .422-.066.784-.196 1.084c-.131.301-.33.53-.595.689c-.264.158-.597.237-1 .237H4.626Zm1.353-3.354h-.562v2.707h.562c.186 0 .347-.028.484-.082a.8.8 0 0 0 .334-.252a1.14 1.14 0 0 0 .196-.422c.045-.168.067-.365.067-.592a2.1 2.1 0 0 0-.117-.753a.89.89 0 0 0-.354-.454c-.159-.102-.362-.152-.61-.152Z"/></svg>',$d='<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2h-1v-1h1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5L14 4.5ZM3.517 14.841a1.13 1.13 0 0 0 .401.823c.13.108.289.192.478.252c.19.061.411.091.665.091c.338 0 .624-.053.859-.158c.236-.105.416-.252.539-.44c.125-.189.187-.408.187-.656c0-.224-.045-.41-.134-.56a1.001 1.001 0 0 0-.375-.357a2.027 2.027 0 0 0-.566-.21l-.621-.144a.97.97 0 0 1-.404-.176a.37.37 0 0 1-.144-.299c0-.156.062-.284.185-.384c.125-.101.296-.152.512-.152c.143 0 .266.023.37.068a.624.624 0 0 1 .246.181a.56.56 0 0 1 .12.258h.75a1.092 1.092 0 0 0-.2-.566a1.21 1.21 0 0 0-.5-.41a1.813 1.813 0 0 0-.78-.152c-.293 0-.551.05-.776.15c-.225.099-.4.24-.527.421c-.127.182-.19.395-.19.639c0 .201.04.376.122.524c.082.149.2.27.352.367c.152.095.332.167.539.213l.618.144c.207.049.361.113.463.193a.387.387 0 0 1 .152.326a.505.505 0 0 1-.085.29a.559.559 0 0 1-.255.193c-.111.047-.249.07-.413.07c-.117 0-.223-.013-.32-.04a.838.838 0 0 1-.248-.115a.578.578 0 0 1-.255-.384h-.765ZM.806 13.693c0-.248.034-.46.102-.633a.868.868 0 0 1 .302-.399a.814.814 0 0 1 .475-.137c.15 0 .283.032.398.097a.7.7 0 0 1 .272.26a.85.85 0 0 1 .12.381h.765v-.072a1.33 1.33 0 0 0-.466-.964a1.441 1.441 0 0 0-.489-.272a1.838 1.838 0 0 0-.606-.097c-.356 0-.66.074-.911.223c-.25.148-.44.359-.572.632c-.13.274-.196.6-.196.979v.498c0 .379.064.704.193.976c.131.271.322.48.572.626c.25.145.554.217.914.217c.293 0 .554-.055.785-.164c.23-.11.414-.26.55-.454a1.27 1.27 0 0 0 .226-.674v-.076h-.764a.799.799 0 0 1-.118.363a.7.7 0 0 1-.272.25a.874.874 0 0 1-.401.087a.845.845 0 0 1-.478-.132a.833.833 0 0 1-.299-.392a1.699 1.699 0 0 1-.102-.627v-.495Zm8.239 2.238h-.953l-1.338-3.999h.917l.896 3.138h.038l.888-3.138h.879l-1.327 4Z"/></svg>',Ed='<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2h-1v-1h1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5L14 4.5ZM1.6 11.85H0v3.999h.791v-1.342h.803c.287 0 .531-.057.732-.173c.203-.117.358-.275.463-.474a1.42 1.42 0 0 0 .161-.677c0-.25-.053-.476-.158-.677a1.176 1.176 0 0 0-.46-.477c-.2-.12-.443-.179-.732-.179Zm.545 1.333a.795.795 0 0 1-.085.38a.574.574 0 0 1-.238.241a.794.794 0 0 1-.375.082H.788V12.48h.66c.218 0 .389.06.512.181c.123.122.185.296.185.522Zm2.817-1.333h-1.6v3.999h.791v-1.342h.803c.287 0 .531-.057.732-.173c.203-.117.358-.275.463-.474c.108-.201.161-.427.161-.677c0-.25-.052-.476-.158-.677a1.176 1.176 0 0 0-.46-.477c-.2-.12-.443-.179-.732-.179Zm.545 1.333a.795.795 0 0 1-.085.38a.574.574 0 0 1-.238.241a.793.793 0 0 1-.375.082H4.15V12.48h.66c.218 0 .389.06.512.181c.123.122.185.296.185.522Zm2.767-.67v3.336H7.48v-3.337H6.346v-.662h3.065v.662H8.274Z"/></svg>',Sd='<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2v-1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5L14 4.5Zm-7.839 9.166v.522c0 .256-.039.47-.117.641a.861.861 0 0 1-.322.387a.877.877 0 0 1-.469.126a.883.883 0 0 1-.471-.126a.868.868 0 0 1-.32-.386a1.55 1.55 0 0 1-.117-.642v-.522c0-.257.04-.471.117-.641a.868.868 0 0 1 .32-.387a.868.868 0 0 1 .471-.129c.176 0 .332.043.469.13a.861.861 0 0 1 .322.386c.078.17.117.384.117.641Zm.803.519v-.513c0-.377-.068-.7-.205-.972a1.46 1.46 0 0 0-.589-.63c-.254-.147-.56-.22-.917-.22c-.355 0-.662.073-.92.22a1.441 1.441 0 0 0-.589.627c-.136.271-.205.596-.205.975v.513c0 .375.069.7.205.973c.137.271.333.48.59.627c.257.144.564.216.92.216c.357 0 .662-.072.916-.216c.256-.147.452-.356.59-.627c.136-.274.204-.598.204-.973ZM0 11.926v4h1.459c.402 0 .735-.08.999-.238a1.45 1.45 0 0 0 .595-.689c.13-.3.196-.662.196-1.084c0-.42-.065-.778-.196-1.075a1.426 1.426 0 0 0-.59-.68c-.263-.156-.598-.234-1.004-.234H0Zm.791.645h.563c.248 0 .45.05.609.152a.89.89 0 0 1 .354.454c.079.201.118.452.118.753a2.3 2.3 0 0 1-.068.592a1.141 1.141 0 0 1-.196.422a.8.8 0 0 1-.334.252a1.298 1.298 0 0 1-.483.082H.79V12.57Zm7.422.483a1.732 1.732 0 0 0-.103.633v.495c0 .246.034.455.103.627a.834.834 0 0 0 .298.393a.845.845 0 0 0 .478.131a.868.868 0 0 0 .401-.088a.699.699 0 0 0 .273-.248a.8.8 0 0 0 .117-.364h.765v.076a1.268 1.268 0 0 1-.226.674c-.137.194-.32.345-.55.454a1.81 1.81 0 0 1-.786.164c-.36 0-.664-.072-.914-.216a1.424 1.424 0 0 1-.571-.627c-.13-.272-.194-.597-.194-.976v-.498c0-.379.066-.705.197-.978c.13-.274.321-.485.571-.633c.252-.149.556-.223.911-.223c.219 0 .421.032.607.097c.187.062.35.153.489.272a1.326 1.326 0 0 1 .466.964v.073H9.78a.85.85 0 0 0-.12-.38a.7.7 0 0 0-.273-.261a.802.802 0 0 0-.398-.097a.814.814 0 0 0-.475.138a.868.868 0 0 0-.301.398Z"/></svg>',qd='<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" fill-rule="evenodd" d="M14 4.5V11h-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5L14 4.5Zm-6.839 9.688v-.522a1.54 1.54 0 0 0-.117-.641a.861.861 0 0 0-.322-.387a.862.862 0 0 0-.469-.129a.868.868 0 0 0-.471.13a.868.868 0 0 0-.32.386a1.54 1.54 0 0 0-.117.641v.522c0 .256.04.47.117.641a.868.868 0 0 0 .32.387a.883.883 0 0 0 .471.126a.877.877 0 0 0 .469-.126a.861.861 0 0 0 .322-.386a1.55 1.55 0 0 0 .117-.642Zm.803-.516v.513c0 .375-.068.7-.205.973a1.47 1.47 0 0 1-.589.627c-.254.144-.56.216-.917.216a1.86 1.86 0 0 1-.92-.216a1.463 1.463 0 0 1-.589-.627a2.151 2.151 0 0 1-.205-.973v-.513c0-.379.069-.704.205-.975c.137-.274.333-.483.59-.627c.257-.147.564-.22.92-.22c.357 0 .662.073.916.22c.256.146.452.356.59.63c.136.271.204.595.204.972ZM1 15.925v-3.999h1.459c.406 0 .741.078 1.005.235c.264.156.46.382.589.68c.13.296.196.655.196 1.074c0 .422-.065.784-.196 1.084c-.131.301-.33.53-.595.689c-.264.158-.597.237-.999.237H1Zm1.354-3.354H1.79v2.707h.563c.185 0 .346-.028.483-.082a.8.8 0 0 0 .334-.252c.088-.114.153-.254.196-.422a2.3 2.3 0 0 0 .068-.592c0-.3-.04-.552-.118-.753a.89.89 0 0 0-.354-.454c-.158-.102-.361-.152-.61-.152Zm6.756 1.116c0-.248.034-.46.103-.633a.868.868 0 0 1 .301-.398a.814.814 0 0 1 .475-.138c.15 0 .283.032.398.097a.7.7 0 0 1 .273.26a.85.85 0 0 1 .12.381h.765v-.073a1.33 1.33 0 0 0-.466-.964a1.44 1.44 0 0 0-.49-.272a1.836 1.836 0 0 0-.606-.097c-.355 0-.66.074-.911.223c-.25.148-.44.359-.571.633c-.131.273-.197.6-.197.978v.498c0 .379.065.704.194.976c.13.271.321.48.571.627c.25.144.555.216.914.216c.293 0 .555-.054.785-.164c.23-.11.414-.26.551-.454a1.27 1.27 0 0 0 .226-.674v-.076h-.765a.8.8 0 0 1-.117.364a.699.699 0 0 1-.273.248a.874.874 0 0 1-.401.088a.845.845 0 0 1-.478-.131a.834.834 0 0 1-.298-.393a1.7 1.7 0 0 1-.103-.627v-.495Zm5.092-1.76h.894l-1.275 2.006l1.254 1.992h-.908l-.85-1.415h-.035l-.852 1.415h-.862l1.24-2.015l-1.228-1.984h.932l.832 1.439h.035l.823-1.439Z"/></svg>';var Dd=Object.defineProperty,Td=Object.getOwnPropertyDescriptor,As=(e,t,o,r)=>{for(var s=r>1?void 0:r?Td(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&Dd(t,o,s),s};const Ni={pdf:Cd,txt:kd,md:Ad,csv:$d,ppd:Ed,doc:Sd,docx:qd};let ko=class extends ct{constructor(){super(...arguments),this.filename="",this.url=""}get type(){const e="txt";if(!this.filename)return e;const t=this.filename.split(".").pop();return t?t.toLowerCase():e}render(){return T`
3530
+ `,zs([g({type:String})],Eo.prototype,"url",2),zs([g({type:Boolean})],Eo.prototype,"inverse",2),Eo=zs([tt("cb-external-link")],Eo);const th='<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2h-2v-1h2a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5L14 4.5ZM1.928 15.849v-3.337h1.136v-.662H0v.662h1.134v3.337h.794Zm4.689-3.999h-.894L4.9 13.289h-.035l-.832-1.439h-.932l1.228 1.983l-1.24 2.016h.862l.853-1.415h.035l.85 1.415h.907l-1.253-1.992l1.274-2.007Zm1.93.662v3.337h-.794v-3.337H6.619v-.662h3.064v.662H8.546Z"/></svg>',eh='<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2h-1v-1h1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5L14 4.5ZM1.6 11.85H0v3.999h.791v-1.342h.803c.287 0 .531-.057.732-.173c.203-.117.358-.275.463-.474a1.42 1.42 0 0 0 .161-.677c0-.25-.053-.476-.158-.677a1.176 1.176 0 0 0-.46-.477c-.2-.12-.443-.179-.732-.179Zm.545 1.333a.795.795 0 0 1-.085.38a.574.574 0 0 1-.238.241a.794.794 0 0 1-.375.082H.788V12.48h.66c.218 0 .389.06.512.181c.123.122.185.296.185.522Zm1.217-1.333v3.999h1.46c.401 0 .734-.08.998-.237a1.45 1.45 0 0 0 .595-.689c.13-.3.196-.662.196-1.084c0-.42-.065-.778-.196-1.075a1.426 1.426 0 0 0-.589-.68c-.264-.156-.599-.234-1.005-.234H3.362Zm.791.645h.563c.248 0 .45.05.609.152a.89.89 0 0 1 .354.454c.079.201.118.452.118.753a2.3 2.3 0 0 1-.068.592a1.14 1.14 0 0 1-.196.422a.8.8 0 0 1-.334.252a1.298 1.298 0 0 1-.483.082h-.563v-2.707Zm3.743 1.763v1.591h-.79V11.85h2.548v.653H7.896v1.117h1.606v.638H7.896Z"/></svg>',oh='<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2H9v-1h3a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5L14 4.5ZM.706 13.189v2.66H0V11.85h.806l1.14 2.596h.026l1.14-2.596h.8v3.999h-.716v-2.66h-.038l-.946 2.159h-.516l-.952-2.16H.706Zm3.919 2.66V11.85h1.459c.406 0 .741.078 1.005.234c.263.157.46.383.589.68c.13.297.196.655.196 1.075c0 .422-.066.784-.196 1.084c-.131.301-.33.53-.595.689c-.264.158-.597.237-1 .237H4.626Zm1.353-3.354h-.562v2.707h.562c.186 0 .347-.028.484-.082a.8.8 0 0 0 .334-.252a1.14 1.14 0 0 0 .196-.422c.045-.168.067-.365.067-.592a2.1 2.1 0 0 0-.117-.753a.89.89 0 0 0-.354-.454c-.159-.102-.362-.152-.61-.152Z"/></svg>',rh='<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2h-1v-1h1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5L14 4.5ZM3.517 14.841a1.13 1.13 0 0 0 .401.823c.13.108.289.192.478.252c.19.061.411.091.665.091c.338 0 .624-.053.859-.158c.236-.105.416-.252.539-.44c.125-.189.187-.408.187-.656c0-.224-.045-.41-.134-.56a1.001 1.001 0 0 0-.375-.357a2.027 2.027 0 0 0-.566-.21l-.621-.144a.97.97 0 0 1-.404-.176a.37.37 0 0 1-.144-.299c0-.156.062-.284.185-.384c.125-.101.296-.152.512-.152c.143 0 .266.023.37.068a.624.624 0 0 1 .246.181a.56.56 0 0 1 .12.258h.75a1.092 1.092 0 0 0-.2-.566a1.21 1.21 0 0 0-.5-.41a1.813 1.813 0 0 0-.78-.152c-.293 0-.551.05-.776.15c-.225.099-.4.24-.527.421c-.127.182-.19.395-.19.639c0 .201.04.376.122.524c.082.149.2.27.352.367c.152.095.332.167.539.213l.618.144c.207.049.361.113.463.193a.387.387 0 0 1 .152.326a.505.505 0 0 1-.085.29a.559.559 0 0 1-.255.193c-.111.047-.249.07-.413.07c-.117 0-.223-.013-.32-.04a.838.838 0 0 1-.248-.115a.578.578 0 0 1-.255-.384h-.765ZM.806 13.693c0-.248.034-.46.102-.633a.868.868 0 0 1 .302-.399a.814.814 0 0 1 .475-.137c.15 0 .283.032.398.097a.7.7 0 0 1 .272.26a.85.85 0 0 1 .12.381h.765v-.072a1.33 1.33 0 0 0-.466-.964a1.441 1.441 0 0 0-.489-.272a1.838 1.838 0 0 0-.606-.097c-.356 0-.66.074-.911.223c-.25.148-.44.359-.572.632c-.13.274-.196.6-.196.979v.498c0 .379.064.704.193.976c.131.271.322.48.572.626c.25.145.554.217.914.217c.293 0 .554-.055.785-.164c.23-.11.414-.26.55-.454a1.27 1.27 0 0 0 .226-.674v-.076h-.764a.799.799 0 0 1-.118.363a.7.7 0 0 1-.272.25a.874.874 0 0 1-.401.087a.845.845 0 0 1-.478-.132a.833.833 0 0 1-.299-.392a1.699 1.699 0 0 1-.102-.627v-.495Zm8.239 2.238h-.953l-1.338-3.999h.917l.896 3.138h.038l.888-3.138h.879l-1.327 4Z"/></svg>',sh='<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2h-1v-1h1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5L14 4.5ZM1.6 11.85H0v3.999h.791v-1.342h.803c.287 0 .531-.057.732-.173c.203-.117.358-.275.463-.474a1.42 1.42 0 0 0 .161-.677c0-.25-.053-.476-.158-.677a1.176 1.176 0 0 0-.46-.477c-.2-.12-.443-.179-.732-.179Zm.545 1.333a.795.795 0 0 1-.085.38a.574.574 0 0 1-.238.241a.794.794 0 0 1-.375.082H.788V12.48h.66c.218 0 .389.06.512.181c.123.122.185.296.185.522Zm2.817-1.333h-1.6v3.999h.791v-1.342h.803c.287 0 .531-.057.732-.173c.203-.117.358-.275.463-.474c.108-.201.161-.427.161-.677c0-.25-.052-.476-.158-.677a1.176 1.176 0 0 0-.46-.477c-.2-.12-.443-.179-.732-.179Zm.545 1.333a.795.795 0 0 1-.085.38a.574.574 0 0 1-.238.241a.793.793 0 0 1-.375.082H4.15V12.48h.66c.218 0 .389.06.512.181c.123.122.185.296.185.522Zm2.767-.67v3.336H7.48v-3.337H6.346v-.662h3.065v.662H8.274Z"/></svg>',nh='<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2v-1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5L14 4.5Zm-7.839 9.166v.522c0 .256-.039.47-.117.641a.861.861 0 0 1-.322.387a.877.877 0 0 1-.469.126a.883.883 0 0 1-.471-.126a.868.868 0 0 1-.32-.386a1.55 1.55 0 0 1-.117-.642v-.522c0-.257.04-.471.117-.641a.868.868 0 0 1 .32-.387a.868.868 0 0 1 .471-.129c.176 0 .332.043.469.13a.861.861 0 0 1 .322.386c.078.17.117.384.117.641Zm.803.519v-.513c0-.377-.068-.7-.205-.972a1.46 1.46 0 0 0-.589-.63c-.254-.147-.56-.22-.917-.22c-.355 0-.662.073-.92.22a1.441 1.441 0 0 0-.589.627c-.136.271-.205.596-.205.975v.513c0 .375.069.7.205.973c.137.271.333.48.59.627c.257.144.564.216.92.216c.357 0 .662-.072.916-.216c.256-.147.452-.356.59-.627c.136-.274.204-.598.204-.973ZM0 11.926v4h1.459c.402 0 .735-.08.999-.238a1.45 1.45 0 0 0 .595-.689c.13-.3.196-.662.196-1.084c0-.42-.065-.778-.196-1.075a1.426 1.426 0 0 0-.59-.68c-.263-.156-.598-.234-1.004-.234H0Zm.791.645h.563c.248 0 .45.05.609.152a.89.89 0 0 1 .354.454c.079.201.118.452.118.753a2.3 2.3 0 0 1-.068.592a1.141 1.141 0 0 1-.196.422a.8.8 0 0 1-.334.252a1.298 1.298 0 0 1-.483.082H.79V12.57Zm7.422.483a1.732 1.732 0 0 0-.103.633v.495c0 .246.034.455.103.627a.834.834 0 0 0 .298.393a.845.845 0 0 0 .478.131a.868.868 0 0 0 .401-.088a.699.699 0 0 0 .273-.248a.8.8 0 0 0 .117-.364h.765v.076a1.268 1.268 0 0 1-.226.674c-.137.194-.32.345-.55.454a1.81 1.81 0 0 1-.786.164c-.36 0-.664-.072-.914-.216a1.424 1.424 0 0 1-.571-.627c-.13-.272-.194-.597-.194-.976v-.498c0-.379.066-.705.197-.978c.13-.274.321-.485.571-.633c.252-.149.556-.223.911-.223c.219 0 .421.032.607.097c.187.062.35.153.489.272a1.326 1.326 0 0 1 .466.964v.073H9.78a.85.85 0 0 0-.12-.38a.7.7 0 0 0-.273-.261a.802.802 0 0 0-.398-.097a.814.814 0 0 0-.475.138a.868.868 0 0 0-.301.398Z"/></svg>',ih='<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" fill-rule="evenodd" d="M14 4.5V11h-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5L14 4.5Zm-6.839 9.688v-.522a1.54 1.54 0 0 0-.117-.641a.861.861 0 0 0-.322-.387a.862.862 0 0 0-.469-.129a.868.868 0 0 0-.471.13a.868.868 0 0 0-.32.386a1.54 1.54 0 0 0-.117.641v.522c0 .256.04.47.117.641a.868.868 0 0 0 .32.387a.883.883 0 0 0 .471.126a.877.877 0 0 0 .469-.126a.861.861 0 0 0 .322-.386a1.55 1.55 0 0 0 .117-.642Zm.803-.516v.513c0 .375-.068.7-.205.973a1.47 1.47 0 0 1-.589.627c-.254.144-.56.216-.917.216a1.86 1.86 0 0 1-.92-.216a1.463 1.463 0 0 1-.589-.627a2.151 2.151 0 0 1-.205-.973v-.513c0-.379.069-.704.205-.975c.137-.274.333-.483.59-.627c.257-.147.564-.22.92-.22c.357 0 .662.073.916.22c.256.146.452.356.59.63c.136.271.204.595.204.972ZM1 15.925v-3.999h1.459c.406 0 .741.078 1.005.235c.264.156.46.382.589.68c.13.296.196.655.196 1.074c0 .422-.065.784-.196 1.084c-.131.301-.33.53-.595.689c-.264.158-.597.237-.999.237H1Zm1.354-3.354H1.79v2.707h.563c.185 0 .346-.028.483-.082a.8.8 0 0 0 .334-.252c.088-.114.153-.254.196-.422a2.3 2.3 0 0 0 .068-.592c0-.3-.04-.552-.118-.753a.89.89 0 0 0-.354-.454c-.158-.102-.361-.152-.61-.152Zm6.756 1.116c0-.248.034-.46.103-.633a.868.868 0 0 1 .301-.398a.814.814 0 0 1 .475-.138c.15 0 .283.032.398.097a.7.7 0 0 1 .273.26a.85.85 0 0 1 .12.381h.765v-.073a1.33 1.33 0 0 0-.466-.964a1.44 1.44 0 0 0-.49-.272a1.836 1.836 0 0 0-.606-.097c-.355 0-.66.074-.911.223c-.25.148-.44.359-.571.633c-.131.273-.197.6-.197.978v.498c0 .379.065.704.194.976c.13.271.321.48.571.627c.25.144.555.216.914.216c.293 0 .555-.054.785-.164c.23-.11.414-.26.551-.454a1.27 1.27 0 0 0 .226-.674v-.076h-.765a.8.8 0 0 1-.117.364a.699.699 0 0 1-.273.248a.874.874 0 0 1-.401.088a.845.845 0 0 1-.478-.131a.834.834 0 0 1-.298-.393a1.7 1.7 0 0 1-.103-.627v-.495Zm5.092-1.76h.894l-1.275 2.006l1.254 1.992h-.908l-.85-1.415h-.035l-.852 1.415h-.862l1.24-2.015l-1.228-1.984h.932l.832 1.439h.035l.823-1.439Z"/></svg>';var ah=Object.defineProperty,lh=Object.getOwnPropertyDescriptor,Rs=(e,t,o,r)=>{for(var s=r>1?void 0:r?lh(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&ah(t,o,s),s};const ia={pdf:eh,txt:th,md:oh,csv:rh,ppd:sh,doc:nh,docx:ih};let So=class extends at{constructor(){super(...arguments),this.filename="",this.url=""}get type(){const e="txt";if(!this.filename)return e;const t=this.filename.split(".").pop();return t?t.toLowerCase():e}render(){return A`
3529
3531
  <cb-external-link url="${this.url}" inverse>
3530
3532
  <div class="cb-file">
3531
3533
  ${this.renderFileIcon()}
3532
3534
  <span class="cb-file-name">${this.filename}</span>
3533
3535
  </div>
3534
3536
  </cb-external-link>
3535
- `}renderFileIcon(){return T`
3537
+ `}renderFileIcon(){return A`
3536
3538
  <cb-icon
3537
3539
  class="cb-file-icon"
3538
- svg="${Ni[this.type]||Ni.txt}"
3540
+ svg="${ia[this.type]||ia.txt}"
3539
3541
  ></cb-icon>
3540
- `}};ko.styles=wd,As([$({type:String})],ko.prototype,"filename",2),As([$({type:String})],ko.prototype,"url",2),ko=As([ot("cb-file")],ko);const Ld='<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5Zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5Zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6Z"/><path d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1ZM4.118 4L4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118ZM2.5 3h11V2h-11v1Z"/></g></svg>',zd='<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M8 8a3 3 0 1 0 0-6a3 3 0 0 0 0 6Zm2-3a2 2 0 1 1-4 0a2 2 0 0 1 4 0Zm4 8c0 1-1 1-1 1H3s-1 0-1-1s1-4 6-4s6 3 6 4Zm-1-.004c-.001-.246-.154-.986-.832-1.664C11.516 10.68 10.289 10 8 10c-2.29 0-3.516.68-4.168 1.332c-.678.678-.83 1.418-.832 1.664h10Z"/></svg>',Rd=X`
3542
+ `}};So.styles=Jd,Rs([g({type:String})],So.prototype,"filename",2),Rs([g({type:String})],So.prototype,"url",2),So=Rs([tt("cb-file")],So);const ch='<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5Zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5Zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6Z"/><path d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1ZM4.118 4L4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118ZM2.5 3h11V2h-11v1Z"/></g></svg>',uh='<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M8 8a3 3 0 1 0 0-6a3 3 0 0 0 0 6Zm2-3a2 2 0 1 1-4 0a2 2 0 0 1 4 0Zm4 8c0 1-1 1-1 1H3s-1 0-1-1s1-4 6-4s6 3 6 4Zm-1-.004c-.001-.246-.154-.986-.832-1.664C11.516 10.68 10.289 10 8 10c-2.29 0-3.516.68-4.168 1.332c-.678.678-.83 1.418-.832 1.664h10Z"/></svg>',dh=z`
3541
3543
  pre code.hljs {
3542
3544
  display: block;
3543
3545
  overflow-x: auto;
@@ -4702,9 +4704,9 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
4702
4704
  pre {
4703
4705
  background-color: #282c34;
4704
4706
  }
4705
- `,Pd=X`
4707
+ `,hh=z`
4706
4708
  ${Et}
4707
- ${Rd}
4709
+ ${dh}
4708
4710
 
4709
4711
  .cb-message-row {
4710
4712
  width: 100%;
@@ -4857,33 +4859,33 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
4857
4859
  cb-icon::part(base) {
4858
4860
  font-size: 1em;
4859
4861
  }
4860
- `;var O={},Vi={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
4861
- `,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"},$s=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,Fe={},Ui={};function Md(e){var t,o,r=Ui[e];if(r)return r;for(r=Ui[e]=[],t=0;t<128;t++)o=String.fromCharCode(t),/^[0-9a-z]$/i.test(o)?r.push(o):r.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t<e.length;t++)r[e.charCodeAt(t)]=e[t];return r}function tr(e,t,o){var r,s,n,i,a,l="";for(typeof t!="string"&&(o=t,t=tr.defaultChars),typeof o>"u"&&(o=!0),a=Md(t),r=0,s=e.length;r<s;r++){if(n=e.charCodeAt(r),o&&n===37&&r+2<s&&/^[0-9a-f]{2}$/i.test(e.slice(r+1,r+3))){l+=e.slice(r,r+3),r+=2;continue}if(n<128){l+=a[n];continue}if(n>=55296&&n<=57343){if(n>=55296&&n<=56319&&r+1<s&&(i=e.charCodeAt(r+1),i>=56320&&i<=57343)){l+=encodeURIComponent(e[r]+e[r+1]),r++;continue}l+="%EF%BF%BD";continue}l+=encodeURIComponent(e[r])}return l}tr.defaultChars=";/?:@&=+$,-_.!~*'()#",tr.componentChars="-_.!~*'()";var Fd=tr,Hi={};function Id(e){var t,o,r=Hi[e];if(r)return r;for(r=Hi[e]=[],t=0;t<128;t++)o=String.fromCharCode(t),r.push(o);for(t=0;t<e.length;t++)o=e.charCodeAt(t),r[o]="%"+("0"+o.toString(16).toUpperCase()).slice(-2);return r}function er(e,t){var o;return typeof t!="string"&&(t=er.defaultChars),o=Id(t),e.replace(/(%[a-f0-9]{2})+/gi,function(r){var s,n,i,a,l,c,u,d="";for(s=0,n=r.length;s<n;s+=3){if(i=parseInt(r.slice(s+1,s+3),16),i<128){d+=o[i];continue}if((i&224)===192&&s+3<n&&(a=parseInt(r.slice(s+4,s+6),16),(a&192)===128)){u=i<<6&1984|a&63,u<128?d+="��":d+=String.fromCharCode(u),s+=3;continue}if((i&240)===224&&s+6<n&&(a=parseInt(r.slice(s+4,s+6),16),l=parseInt(r.slice(s+7,s+9),16),(a&192)===128&&(l&192)===128)){u=i<<12&61440|a<<6&4032|l&63,u<2048||u>=55296&&u<=57343?d+="���":d+=String.fromCharCode(u),s+=6;continue}if((i&248)===240&&s+9<n&&(a=parseInt(r.slice(s+4,s+6),16),l=parseInt(r.slice(s+7,s+9),16),c=parseInt(r.slice(s+10,s+12),16),(a&192)===128&&(l&192)===128&&(c&192)===128)){u=i<<18&1835008|a<<12&258048|l<<6&4032|c&63,u<65536||u>1114111?d+="����":(u-=65536,d+=String.fromCharCode(55296+(u>>10),56320+(u&1023))),s+=9;continue}d+="�"}return d})}er.defaultChars=";/?:@&=+$,#",er.componentChars="";var Bd=er,Od=function(t){var o="";return o+=t.protocol||"",o+=t.slashes?"//":"",o+=t.auth?t.auth+"@":"",t.hostname&&t.hostname.indexOf(":")!==-1?o+="["+t.hostname+"]":o+=t.hostname||"",o+=t.port?":"+t.port:"",o+=t.pathname||"",o+=t.search||"",o+=t.hash||"",o};function or(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var Nd=/^([a-z0-9.+-]+:)/i,Vd=/:[0-9]*$/,Ud=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Hd=["<",">",'"',"`"," ","\r",`
4862
- `," "],jd=["{","}","|","\\","^","`"].concat(Hd),Gd=["'"].concat(jd),ji=["%","/","?",";","#"].concat(Gd),Gi=["/","?","#"],Zd=255,Zi=/^[+a-z0-9A-Z_-]{0,63}$/,Wd=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Wi={javascript:!0,"javascript:":!0},Ki={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Kd(e,t){if(e&&e instanceof or)return e;var o=new or;return o.parse(e,t),o}or.prototype.parse=function(e,t){var o,r,s,n,i,a=e;if(a=a.trim(),!t&&e.split("#").length===1){var l=Ud.exec(a);if(l)return this.pathname=l[1],l[2]&&(this.search=l[2]),this}var c=Nd.exec(a);if(c&&(c=c[0],s=c.toLowerCase(),this.protocol=c,a=a.substr(c.length)),(t||c||a.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=a.substr(0,2)==="//",i&&!(c&&Wi[c])&&(a=a.substr(2),this.slashes=!0)),!Wi[c]&&(i||c&&!Ki[c])){var u=-1;for(o=0;o<Gi.length;o++)n=a.indexOf(Gi[o]),n!==-1&&(u===-1||n<u)&&(u=n);var d,f;for(u===-1?f=a.lastIndexOf("@"):f=a.lastIndexOf("@",u),f!==-1&&(d=a.slice(0,f),a=a.slice(f+1),this.auth=d),u=-1,o=0;o<ji.length;o++)n=a.indexOf(ji[o]),n!==-1&&(u===-1||n<u)&&(u=n);u===-1&&(u=a.length),a[u-1]===":"&&u--;var h=a.slice(0,u);a=a.slice(u),this.parseHost(h),this.hostname=this.hostname||"";var b=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!b){var m=this.hostname.split(/\./);for(o=0,r=m.length;o<r;o++){var w=m[o];if(w&&!w.match(Zi)){for(var y="",v=0,k=w.length;v<k;v++)w.charCodeAt(v)>127?y+="x":y+=w[v];if(!y.match(Zi)){var C=m.slice(0,o),A=m.slice(o+1),_=w.match(Wd);_&&(C.push(_[1]),A.unshift(_[2])),A.length&&(a=A.join(".")+a),this.hostname=C.join(".");break}}}}this.hostname.length>Zd&&(this.hostname=""),b&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var D=a.indexOf("#");D!==-1&&(this.hash=a.substr(D),a=a.slice(0,D));var M=a.indexOf("?");return M!==-1&&(this.search=a.substr(M),a=a.slice(0,M)),a&&(this.pathname=a),Ki[s]&&this.hostname&&!this.pathname&&(this.pathname=""),this},or.prototype.parseHost=function(e){var t=Vd.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var Yd=Kd;Fe.encode=Fd,Fe.decode=Bd,Fe.format=Od,Fe.parse=Yd;var ye={},Es,Yi;function Ji(){return Yi||(Yi=1,Es=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/),Es}var Ss,Qi;function Xi(){return Qi||(Qi=1,Ss=/[\0-\x1F\x7F-\x9F]/),Ss}var qs,ta;function Jd(){return ta||(ta=1,qs=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/),qs}var Ds,ea;function oa(){return ea||(ea=1,Ds=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/),Ds}var ra;function Qd(){return ra||(ra=1,ye.Any=Ji(),ye.Cc=Xi(),ye.Cf=Jd(),ye.P=$s,ye.Z=oa()),ye}(function(e){function t(x){return Object.prototype.toString.call(x)}function o(x){return t(x)==="[object String]"}var r=Object.prototype.hasOwnProperty;function s(x,I){return r.call(x,I)}function n(x){var I=Array.prototype.slice.call(arguments,1);return I.forEach(function(L){if(L){if(typeof L!="object")throw new TypeError(L+"must be object");Object.keys(L).forEach(function(et){x[et]=L[et]})}}),x}function i(x,I,L){return[].concat(x.slice(0,I),L,x.slice(I+1))}function a(x){return!(x>=55296&&x<=57343||x>=64976&&x<=65007||(x&65535)===65535||(x&65535)===65534||x>=0&&x<=8||x===11||x>=14&&x<=31||x>=127&&x<=159||x>1114111)}function l(x){if(x>65535){x-=65536;var I=55296+(x>>10),L=56320+(x&1023);return String.fromCharCode(I,L)}return String.fromCharCode(x)}var c=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,u=/&([a-z#][a-z0-9]{1,31});/gi,d=new RegExp(c.source+"|"+u.source,"gi"),f=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,h=Vi;function b(x,I){var L=0;return s(h,I)?h[I]:I.charCodeAt(0)===35&&f.test(I)&&(L=I[1].toLowerCase()==="x"?parseInt(I.slice(2),16):parseInt(I.slice(1),10),a(L))?l(L):x}function m(x){return x.indexOf("\\")<0?x:x.replace(c,"$1")}function w(x){return x.indexOf("\\")<0&&x.indexOf("&")<0?x:x.replace(d,function(I,L,et){return L||b(I,et)})}var y=/[&<>"]/,v=/[&<>"]/g,k={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function C(x){return k[x]}function A(x){return y.test(x)?x.replace(v,C):x}var _=/[.?*+^$[\]\\(){}|-]/g;function D(x){return x.replace(_,"\\$&")}function M(x){switch(x){case 9:case 32:return!0}return!1}function S(x){if(x>=8192&&x<=8202)return!0;switch(x){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}var q=$s;function F(x){return q.test(x)}function J(x){switch(x){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function wt(x){return x=x.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(x=x.replace(/ẞ/g,"ß")),x.toLowerCase().toUpperCase()}e.lib={},e.lib.mdurl=Fe,e.lib.ucmicro=Qd(),e.assign=n,e.isString=o,e.has=s,e.unescapeMd=m,e.unescapeAll=w,e.isValidEntityCode=a,e.fromCodePoint=l,e.escapeHtml=A,e.arrayReplaceAt=i,e.isSpace=M,e.isWhiteSpace=S,e.isMdAsciiPunct=J,e.isPunctChar=F,e.escapeRE=D,e.normalizeReference=wt})(O);var rr={},Xd=function(t,o,r){var s,n,i,a,l=-1,c=t.posMax,u=t.pos;for(t.pos=o+1,s=1;t.pos<c;){if(i=t.src.charCodeAt(t.pos),i===93&&(s--,s===0)){n=!0;break}if(a=t.pos,t.md.inline.skipToken(t),i===91){if(a===t.pos-1)s++;else if(r)return t.pos=u,-1}}return n&&(l=t.pos),t.pos=u,l},sa=O.unescapeAll,th=function(t,o,r){var s,n,i=0,a=o,l={ok:!1,pos:0,lines:0,str:""};if(t.charCodeAt(o)===60){for(o++;o<r;){if(s=t.charCodeAt(o),s===10||s===60)return l;if(s===62)return l.pos=o+1,l.str=sa(t.slice(a+1,o)),l.ok=!0,l;if(s===92&&o+1<r){o+=2;continue}o++}return l}for(n=0;o<r&&(s=t.charCodeAt(o),!(s===32||s<32||s===127));){if(s===92&&o+1<r){if(t.charCodeAt(o+1)===32)break;o+=2;continue}if(s===40&&(n++,n>32))return l;if(s===41){if(n===0)break;n--}o++}return a===o||n!==0||(l.str=sa(t.slice(a,o)),l.lines=i,l.pos=o,l.ok=!0),l},eh=O.unescapeAll,oh=function(t,o,r){var s,n,i=0,a=o,l={ok:!1,pos:0,lines:0,str:""};if(o>=r||(n=t.charCodeAt(o),n!==34&&n!==39&&n!==40))return l;for(o++,n===40&&(n=41);o<r;){if(s=t.charCodeAt(o),s===n)return l.pos=o+1,l.lines=i,l.str=eh(t.slice(a+1,o)),l.ok=!0,l;if(s===40&&n===41)return l;s===10?i++:s===92&&o+1<r&&(o++,t.charCodeAt(o)===10&&i++),o++}return l};rr.parseLinkLabel=Xd,rr.parseLinkDestination=th,rr.parseLinkTitle=oh;var rh=O.assign,sh=O.unescapeAll,we=O.escapeHtml,Pt={};Pt.code_inline=function(e,t,o,r,s){var n=e[t];return"<code"+s.renderAttrs(n)+">"+we(e[t].content)+"</code>"},Pt.code_block=function(e,t,o,r,s){var n=e[t];return"<pre"+s.renderAttrs(n)+"><code>"+we(e[t].content)+`</code></pre>
4863
- `},Pt.fence=function(e,t,o,r,s){var n=e[t],i=n.info?sh(n.info).trim():"",a="",l="",c,u,d,f,h;return i&&(d=i.split(/(\s+)/g),a=d[0],l=d.slice(2).join("")),o.highlight?c=o.highlight(n.content,a,l)||we(n.content):c=we(n.content),c.indexOf("<pre")===0?c+`
4864
- `:i?(u=n.attrIndex("class"),f=n.attrs?n.attrs.slice():[],u<0?f.push(["class",o.langPrefix+a]):(f[u]=f[u].slice(),f[u][1]+=" "+o.langPrefix+a),h={attrs:f},"<pre><code"+s.renderAttrs(h)+">"+c+`</code></pre>
4862
+ `;var O={},aa={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
4863
+ `,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"},Ps=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,Ne={},la={};function ph(e){var t,o,r=la[e];if(r)return r;for(r=la[e]=[],t=0;t<128;t++)o=String.fromCharCode(t),/^[0-9a-z]$/i.test(o)?r.push(o):r.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t<e.length;t++)r[e.charCodeAt(t)]=e[t];return r}function lr(e,t,o){var r,s,n,i,a,l="";for(typeof t!="string"&&(o=t,t=lr.defaultChars),typeof o>"u"&&(o=!0),a=ph(t),r=0,s=e.length;r<s;r++){if(n=e.charCodeAt(r),o&&n===37&&r+2<s&&/^[0-9a-f]{2}$/i.test(e.slice(r+1,r+3))){l+=e.slice(r,r+3),r+=2;continue}if(n<128){l+=a[n];continue}if(n>=55296&&n<=57343){if(n>=55296&&n<=56319&&r+1<s&&(i=e.charCodeAt(r+1),i>=56320&&i<=57343)){l+=encodeURIComponent(e[r]+e[r+1]),r++;continue}l+="%EF%BF%BD";continue}l+=encodeURIComponent(e[r])}return l}lr.defaultChars=";/?:@&=+$,-_.!~*'()#",lr.componentChars="-_.!~*'()";var fh=lr,ca={};function gh(e){var t,o,r=ca[e];if(r)return r;for(r=ca[e]=[],t=0;t<128;t++)o=String.fromCharCode(t),r.push(o);for(t=0;t<e.length;t++)o=e.charCodeAt(t),r[o]="%"+("0"+o.toString(16).toUpperCase()).slice(-2);return r}function cr(e,t){var o;return typeof t!="string"&&(t=cr.defaultChars),o=gh(t),e.replace(/(%[a-f0-9]{2})+/gi,function(r){var s,n,i,a,l,c,u,d="";for(s=0,n=r.length;s<n;s+=3){if(i=parseInt(r.slice(s+1,s+3),16),i<128){d+=o[i];continue}if((i&224)===192&&s+3<n&&(a=parseInt(r.slice(s+4,s+6),16),(a&192)===128)){u=i<<6&1984|a&63,u<128?d+="��":d+=String.fromCharCode(u),s+=3;continue}if((i&240)===224&&s+6<n&&(a=parseInt(r.slice(s+4,s+6),16),l=parseInt(r.slice(s+7,s+9),16),(a&192)===128&&(l&192)===128)){u=i<<12&61440|a<<6&4032|l&63,u<2048||u>=55296&&u<=57343?d+="���":d+=String.fromCharCode(u),s+=6;continue}if((i&248)===240&&s+9<n&&(a=parseInt(r.slice(s+4,s+6),16),l=parseInt(r.slice(s+7,s+9),16),c=parseInt(r.slice(s+10,s+12),16),(a&192)===128&&(l&192)===128&&(c&192)===128)){u=i<<18&1835008|a<<12&258048|l<<6&4032|c&63,u<65536||u>1114111?d+="����":(u-=65536,d+=String.fromCharCode(55296+(u>>10),56320+(u&1023))),s+=9;continue}d+="�"}return d})}cr.defaultChars=";/?:@&=+$,#",cr.componentChars="";var bh=cr,mh=function(t){var o="";return o+=t.protocol||"",o+=t.slashes?"//":"",o+=t.auth?t.auth+"@":"",t.hostname&&t.hostname.indexOf(":")!==-1?o+="["+t.hostname+"]":o+=t.hostname||"",o+=t.port?":"+t.port:"",o+=t.pathname||"",o+=t.search||"",o+=t.hash||"",o};function ur(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var vh=/^([a-z0-9.+-]+:)/i,yh=/:[0-9]*$/,wh=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,_h=["<",">",'"',"`"," ","\r",`
4864
+ `," "],xh=["{","}","|","\\","^","`"].concat(_h),kh=["'"].concat(xh),ua=["%","/","?",";","#"].concat(kh),da=["/","?","#"],Ah=255,ha=/^[+a-z0-9A-Z_-]{0,63}$/,Ch=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,pa={javascript:!0,"javascript:":!0},fa={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function $h(e,t){if(e&&e instanceof ur)return e;var o=new ur;return o.parse(e,t),o}ur.prototype.parse=function(e,t){var o,r,s,n,i,a=e;if(a=a.trim(),!t&&e.split("#").length===1){var l=wh.exec(a);if(l)return this.pathname=l[1],l[2]&&(this.search=l[2]),this}var c=vh.exec(a);if(c&&(c=c[0],s=c.toLowerCase(),this.protocol=c,a=a.substr(c.length)),(t||c||a.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=a.substr(0,2)==="//",i&&!(c&&pa[c])&&(a=a.substr(2),this.slashes=!0)),!pa[c]&&(i||c&&!fa[c])){var u=-1;for(o=0;o<da.length;o++)n=a.indexOf(da[o]),n!==-1&&(u===-1||n<u)&&(u=n);var d,p;for(u===-1?p=a.lastIndexOf("@"):p=a.lastIndexOf("@",u),p!==-1&&(d=a.slice(0,p),a=a.slice(p+1),this.auth=d),u=-1,o=0;o<ua.length;o++)n=a.indexOf(ua[o]),n!==-1&&(u===-1||n<u)&&(u=n);u===-1&&(u=a.length),a[u-1]===":"&&u--;var h=a.slice(0,u);a=a.slice(u),this.parseHost(h),this.hostname=this.hostname||"";var b=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!b){var m=this.hostname.split(/\./);for(o=0,r=m.length;o<r;o++){var w=m[o];if(w&&!w.match(ha)){for(var y="",v=0,k=w.length;v<k;v++)w.charCodeAt(v)>127?y+="x":y+=w[v];if(!y.match(ha)){var C=m.slice(0,o),$=m.slice(o+1),_=w.match(Ch);_&&(C.push(_[1]),$.unshift(_[2])),$.length&&(a=$.join(".")+a),this.hostname=C.join(".");break}}}}this.hostname.length>Ah&&(this.hostname=""),b&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var D=a.indexOf("#");D!==-1&&(this.hash=a.substr(D),a=a.slice(0,D));var P=a.indexOf("?");return P!==-1&&(this.search=a.substr(P),a=a.slice(0,P)),a&&(this.pathname=a),fa[s]&&this.hostname&&!this.pathname&&(this.pathname=""),this},ur.prototype.parseHost=function(e){var t=yh.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var Eh=$h;Ne.encode=fh,Ne.decode=bh,Ne.format=mh,Ne.parse=Eh;var Ae={},Ms,ga;function ba(){return ga||(ga=1,Ms=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/),Ms}var Is,ma;function va(){return ma||(ma=1,Is=/[\0-\x1F\x7F-\x9F]/),Is}var Fs,ya;function Sh(){return ya||(ya=1,Fs=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/),Fs}var Bs,wa;function _a(){return wa||(wa=1,Bs=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/),Bs}var xa;function qh(){return xa||(xa=1,Ae.Any=ba(),Ae.Cc=va(),Ae.Cf=Sh(),Ae.P=Ps,Ae.Z=_a()),Ae}(function(e){function t(x){return Object.prototype.toString.call(x)}function o(x){return t(x)==="[object String]"}var r=Object.prototype.hasOwnProperty;function s(x,F){return r.call(x,F)}function n(x){var F=Array.prototype.slice.call(arguments,1);return F.forEach(function(T){if(T){if(typeof T!="object")throw new TypeError(T+"must be object");Object.keys(T).forEach(function(X){x[X]=T[X]})}}),x}function i(x,F,T){return[].concat(x.slice(0,F),T,x.slice(F+1))}function a(x){return!(x>=55296&&x<=57343||x>=64976&&x<=65007||(x&65535)===65535||(x&65535)===65534||x>=0&&x<=8||x===11||x>=14&&x<=31||x>=127&&x<=159||x>1114111)}function l(x){if(x>65535){x-=65536;var F=55296+(x>>10),T=56320+(x&1023);return String.fromCharCode(F,T)}return String.fromCharCode(x)}var c=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,u=/&([a-z#][a-z0-9]{1,31});/gi,d=new RegExp(c.source+"|"+u.source,"gi"),p=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,h=aa;function b(x,F){var T=0;return s(h,F)?h[F]:F.charCodeAt(0)===35&&p.test(F)&&(T=F[1].toLowerCase()==="x"?parseInt(F.slice(2),16):parseInt(F.slice(1),10),a(T))?l(T):x}function m(x){return x.indexOf("\\")<0?x:x.replace(c,"$1")}function w(x){return x.indexOf("\\")<0&&x.indexOf("&")<0?x:x.replace(d,function(F,T,X){return T||b(F,X)})}var y=/[&<>"]/,v=/[&<>"]/g,k={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function C(x){return k[x]}function $(x){return y.test(x)?x.replace(v,C):x}var _=/[.?*+^$[\]\\(){}|-]/g;function D(x){return x.replace(_,"\\$&")}function P(x){switch(x){case 9:case 32:return!0}return!1}function S(x){if(x>=8192&&x<=8202)return!0;switch(x){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}var q=Ps;function I(x){return q.test(x)}function W(x){switch(x){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function yt(x){return x=x.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(x=x.replace(/ẞ/g,"ß")),x.toLowerCase().toUpperCase()}e.lib={},e.lib.mdurl=Ne,e.lib.ucmicro=qh(),e.assign=n,e.isString=o,e.has=s,e.unescapeMd=m,e.unescapeAll=w,e.isValidEntityCode=a,e.fromCodePoint=l,e.escapeHtml=$,e.arrayReplaceAt=i,e.isSpace=P,e.isWhiteSpace=S,e.isMdAsciiPunct=W,e.isPunctChar=I,e.escapeRE=D,e.normalizeReference=yt})(O);var dr={},Dh=function(t,o,r){var s,n,i,a,l=-1,c=t.posMax,u=t.pos;for(t.pos=o+1,s=1;t.pos<c;){if(i=t.src.charCodeAt(t.pos),i===93&&(s--,s===0)){n=!0;break}if(a=t.pos,t.md.inline.skipToken(t),i===91){if(a===t.pos-1)s++;else if(r)return t.pos=u,-1}}return n&&(l=t.pos),t.pos=u,l},ka=O.unescapeAll,Th=function(t,o,r){var s,n,i=0,a=o,l={ok:!1,pos:0,lines:0,str:""};if(t.charCodeAt(o)===60){for(o++;o<r;){if(s=t.charCodeAt(o),s===10||s===60)return l;if(s===62)return l.pos=o+1,l.str=ka(t.slice(a+1,o)),l.ok=!0,l;if(s===92&&o+1<r){o+=2;continue}o++}return l}for(n=0;o<r&&(s=t.charCodeAt(o),!(s===32||s<32||s===127));){if(s===92&&o+1<r){if(t.charCodeAt(o+1)===32)break;o+=2;continue}if(s===40&&(n++,n>32))return l;if(s===41){if(n===0)break;n--}o++}return a===o||n!==0||(l.str=ka(t.slice(a,o)),l.lines=i,l.pos=o,l.ok=!0),l},Lh=O.unescapeAll,zh=function(t,o,r){var s,n,i=0,a=o,l={ok:!1,pos:0,lines:0,str:""};if(o>=r||(n=t.charCodeAt(o),n!==34&&n!==39&&n!==40))return l;for(o++,n===40&&(n=41);o<r;){if(s=t.charCodeAt(o),s===n)return l.pos=o+1,l.lines=i,l.str=Lh(t.slice(a+1,o)),l.ok=!0,l;if(s===40&&n===41)return l;s===10?i++:s===92&&o+1<r&&(o++,t.charCodeAt(o)===10&&i++),o++}return l};dr.parseLinkLabel=Dh,dr.parseLinkDestination=Th,dr.parseLinkTitle=zh;var Rh=O.assign,Ph=O.unescapeAll,Ce=O.escapeHtml,Rt={};Rt.code_inline=function(e,t,o,r,s){var n=e[t];return"<code"+s.renderAttrs(n)+">"+Ce(e[t].content)+"</code>"},Rt.code_block=function(e,t,o,r,s){var n=e[t];return"<pre"+s.renderAttrs(n)+"><code>"+Ce(e[t].content)+`</code></pre>
4865
+ `},Rt.fence=function(e,t,o,r,s){var n=e[t],i=n.info?Ph(n.info).trim():"",a="",l="",c,u,d,p,h;return i&&(d=i.split(/(\s+)/g),a=d[0],l=d.slice(2).join("")),o.highlight?c=o.highlight(n.content,a,l)||Ce(n.content):c=Ce(n.content),c.indexOf("<pre")===0?c+`
4866
+ `:i?(u=n.attrIndex("class"),p=n.attrs?n.attrs.slice():[],u<0?p.push(["class",o.langPrefix+a]):(p[u]=p[u].slice(),p[u][1]+=" "+o.langPrefix+a),h={attrs:p},"<pre><code"+s.renderAttrs(h)+">"+c+`</code></pre>
4865
4867
  `):"<pre><code"+s.renderAttrs(n)+">"+c+`</code></pre>
4866
- `},Pt.image=function(e,t,o,r,s){var n=e[t];return n.attrs[n.attrIndex("alt")][1]=s.renderInlineAsText(n.children,o,r),s.renderToken(e,t,o)},Pt.hardbreak=function(e,t,o){return o.xhtmlOut?`<br />
4868
+ `},Rt.image=function(e,t,o,r,s){var n=e[t];return n.attrs[n.attrIndex("alt")][1]=s.renderInlineAsText(n.children,o,r),s.renderToken(e,t,o)},Rt.hardbreak=function(e,t,o){return o.xhtmlOut?`<br />
4867
4869
  `:`<br>
4868
- `},Pt.softbreak=function(e,t,o){return o.breaks?o.xhtmlOut?`<br />
4870
+ `},Rt.softbreak=function(e,t,o){return o.breaks?o.xhtmlOut?`<br />
4869
4871
  `:`<br>
4870
4872
  `:`
4871
- `},Pt.text=function(e,t){return we(e[t].content)},Pt.html_block=function(e,t){return e[t].content},Pt.html_inline=function(e,t){return e[t].content};function Ie(){this.rules=rh({},Pt)}Ie.prototype.renderAttrs=function(t){var o,r,s;if(!t.attrs)return"";for(s="",o=0,r=t.attrs.length;o<r;o++)s+=" "+we(t.attrs[o][0])+'="'+we(t.attrs[o][1])+'"';return s},Ie.prototype.renderToken=function(t,o,r){var s,n="",i=!1,a=t[o];return a.hidden?"":(a.block&&a.nesting!==-1&&o&&t[o-1].hidden&&(n+=`
4873
+ `},Rt.text=function(e,t){return Ce(e[t].content)},Rt.html_block=function(e,t){return e[t].content},Rt.html_inline=function(e,t){return e[t].content};function Ve(){this.rules=Rh({},Rt)}Ve.prototype.renderAttrs=function(t){var o,r,s;if(!t.attrs)return"";for(s="",o=0,r=t.attrs.length;o<r;o++)s+=" "+Ce(t.attrs[o][0])+'="'+Ce(t.attrs[o][1])+'"';return s},Ve.prototype.renderToken=function(t,o,r){var s,n="",i=!1,a=t[o];return a.hidden?"":(a.block&&a.nesting!==-1&&o&&t[o-1].hidden&&(n+=`
4872
4874
  `),n+=(a.nesting===-1?"</":"<")+a.tag,n+=this.renderAttrs(a),a.nesting===0&&r.xhtmlOut&&(n+=" /"),a.block&&(i=!0,a.nesting===1&&o+1<t.length&&(s=t[o+1],(s.type==="inline"||s.hidden||s.nesting===-1&&s.tag===a.tag)&&(i=!1))),n+=i?`>
4873
- `:">",n)},Ie.prototype.renderInline=function(e,t,o){for(var r,s="",n=this.rules,i=0,a=e.length;i<a;i++)r=e[i].type,typeof n[r]<"u"?s+=n[r](e,i,t,o,this):s+=this.renderToken(e,i,t);return s},Ie.prototype.renderInlineAsText=function(e,t,o){for(var r="",s=0,n=e.length;s<n;s++)e[s].type==="text"?r+=e[s].content:e[s].type==="image"?r+=this.renderInlineAsText(e[s].children,t,o):e[s].type==="softbreak"&&(r+=`
4874
- `);return r},Ie.prototype.render=function(e,t,o){var r,s,n,i="",a=this.rules;for(r=0,s=e.length;r<s;r++)n=e[r].type,n==="inline"?i+=this.renderInline(e[r].children,t,o):typeof a[n]<"u"?i+=a[e[r].type](e,r,t,o,this):i+=this.renderToken(e,r,t,o);return i};var nh=Ie;function Ct(){this.__rules__=[],this.__cache__=null}Ct.prototype.__find__=function(e){for(var t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},Ct.prototype.__compile__=function(){var e=this,t=[""];e.__rules__.forEach(function(o){o.enabled&&o.alt.forEach(function(r){t.indexOf(r)<0&&t.push(r)})}),e.__cache__={},t.forEach(function(o){e.__cache__[o]=[],e.__rules__.forEach(function(r){r.enabled&&(o&&r.alt.indexOf(o)<0||e.__cache__[o].push(r.fn))})})},Ct.prototype.at=function(e,t,o){var r=this.__find__(e),s=o||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=s.alt||[],this.__cache__=null},Ct.prototype.before=function(e,t,o,r){var s=this.__find__(e),n=r||{};if(s===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(s,0,{name:t,enabled:!0,fn:o,alt:n.alt||[]}),this.__cache__=null},Ct.prototype.after=function(e,t,o,r){var s=this.__find__(e),n=r||{};if(s===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(s+1,0,{name:t,enabled:!0,fn:o,alt:n.alt||[]}),this.__cache__=null},Ct.prototype.push=function(e,t,o){var r=o||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null},Ct.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);var o=[];return e.forEach(function(r){var s=this.__find__(r);if(s<0){if(t)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[s].enabled=!0,o.push(r)},this),this.__cache__=null,o},Ct.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(o){o.enabled=!1}),this.enable(e,t)},Ct.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);var o=[];return e.forEach(function(r){var s=this.__find__(r);if(s<0){if(t)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[s].enabled=!1,o.push(r)},this),this.__cache__=null,o},Ct.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};var Ts=Ct,ih=/\r\n?|\n/g,ah=/\0/g,lh=function(t){var o;o=t.src.replace(ih,`
4875
- `),o=o.replace(ah,"�"),t.src=o},ch=function(t){var o;t.inlineMode?(o=new t.Token("inline","",0),o.content=t.src,o.map=[0,1],o.children=[],t.tokens.push(o)):t.md.block.parse(t.src,t.md,t.env,t.tokens)},uh=function(t){var o=t.tokens,r,s,n;for(s=0,n=o.length;s<n;s++)r=o[s],r.type==="inline"&&t.md.inline.parse(r.content,t.md,t.env,r.children)},dh=O.arrayReplaceAt;function hh(e){return/^<a[>\s]/i.test(e)}function ph(e){return/^<\/a\s*>/i.test(e)}var fh=function(t){var o,r,s,n,i,a,l,c,u,d,f,h,b,m,w,y,v=t.tokens,k;if(t.md.options.linkify){for(r=0,s=v.length;r<s;r++)if(!(v[r].type!=="inline"||!t.md.linkify.pretest(v[r].content)))for(n=v[r].children,b=0,o=n.length-1;o>=0;o--){if(a=n[o],a.type==="link_close"){for(o--;n[o].level!==a.level&&n[o].type!=="link_open";)o--;continue}if(a.type==="html_inline"&&(hh(a.content)&&b>0&&b--,ph(a.content)&&b++),!(b>0)&&a.type==="text"&&t.md.linkify.test(a.content)){for(u=a.content,k=t.md.linkify.match(u),l=[],h=a.level,f=0,k.length>0&&k[0].index===0&&o>0&&n[o-1].type==="text_special"&&(k=k.slice(1)),c=0;c<k.length;c++)m=k[c].url,w=t.md.normalizeLink(m),t.md.validateLink(w)&&(y=k[c].text,k[c].schema?k[c].schema==="mailto:"&&!/^mailto:/i.test(y)?y=t.md.normalizeLinkText("mailto:"+y).replace(/^mailto:/,""):y=t.md.normalizeLinkText(y):y=t.md.normalizeLinkText("http://"+y).replace(/^http:\/\//,""),d=k[c].index,d>f&&(i=new t.Token("text","",0),i.content=u.slice(f,d),i.level=h,l.push(i)),i=new t.Token("link_open","a",1),i.attrs=[["href",w]],i.level=h++,i.markup="linkify",i.info="auto",l.push(i),i=new t.Token("text","",0),i.content=y,i.level=h,l.push(i),i=new t.Token("link_close","a",-1),i.level=--h,i.markup="linkify",i.info="auto",l.push(i),f=k[c].lastIndex);f<u.length&&(i=new t.Token("text","",0),i.content=u.slice(f),i.level=h,l.push(i)),v[r].children=n=dh(n,o,l)}}}},na=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,gh=/\((c|tm|r)\)/i,bh=/\((c|tm|r)\)/ig,mh={c:"©",r:"®",tm:"™"};function vh(e,t){return mh[t.toLowerCase()]}function yh(e){var t,o,r=0;for(t=e.length-1;t>=0;t--)o=e[t],o.type==="text"&&!r&&(o.content=o.content.replace(bh,vh)),o.type==="link_open"&&o.info==="auto"&&r--,o.type==="link_close"&&o.info==="auto"&&r++}function wh(e){var t,o,r=0;for(t=e.length-1;t>=0;t--)o=e[t],o.type==="text"&&!r&&na.test(o.content)&&(o.content=o.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),o.type==="link_open"&&o.info==="auto"&&r--,o.type==="link_close"&&o.info==="auto"&&r++}var _h=function(t){var o;if(t.md.options.typographer)for(o=t.tokens.length-1;o>=0;o--)t.tokens[o].type==="inline"&&(gh.test(t.tokens[o].content)&&yh(t.tokens[o].children),na.test(t.tokens[o].content)&&wh(t.tokens[o].children))},ia=O.isWhiteSpace,aa=O.isPunctChar,la=O.isMdAsciiPunct,xh=/['"]/,ca=/['"]/g,ua="’";function sr(e,t,o){return e.slice(0,t)+o+e.slice(t+1)}function kh(e,t){var o,r,s,n,i,a,l,c,u,d,f,h,b,m,w,y,v,k,C,A,_;for(C=[],o=0;o<e.length;o++){for(r=e[o],l=e[o].level,v=C.length-1;v>=0&&!(C[v].level<=l);v--);if(C.length=v+1,r.type==="text"){s=r.content,i=0,a=s.length;t:for(;i<a&&(ca.lastIndex=i,n=ca.exec(s),!!n);){if(w=y=!0,i=n.index+1,k=n[0]==="'",u=32,n.index-1>=0)u=s.charCodeAt(n.index-1);else for(v=o-1;v>=0&&!(e[v].type==="softbreak"||e[v].type==="hardbreak");v--)if(e[v].content){u=e[v].content.charCodeAt(e[v].content.length-1);break}if(d=32,i<a)d=s.charCodeAt(i);else for(v=o+1;v<e.length&&!(e[v].type==="softbreak"||e[v].type==="hardbreak");v++)if(e[v].content){d=e[v].content.charCodeAt(0);break}if(f=la(u)||aa(String.fromCharCode(u)),h=la(d)||aa(String.fromCharCode(d)),b=ia(u),m=ia(d),m?w=!1:h&&(b||f||(w=!1)),b?y=!1:f&&(m||h||(y=!1)),d===34&&n[0]==='"'&&u>=48&&u<=57&&(y=w=!1),w&&y&&(w=f,y=h),!w&&!y){k&&(r.content=sr(r.content,n.index,ua));continue}if(y){for(v=C.length-1;v>=0&&(c=C[v],!(C[v].level<l));v--)if(c.single===k&&C[v].level===l){c=C[v],k?(A=t.md.options.quotes[2],_=t.md.options.quotes[3]):(A=t.md.options.quotes[0],_=t.md.options.quotes[1]),r.content=sr(r.content,n.index,_),e[c.token].content=sr(e[c.token].content,c.pos,A),i+=_.length-1,c.token===o&&(i+=A.length-1),s=r.content,a=s.length,C.length=v;continue t}}w?C.push({token:o,pos:n.index,single:k,level:l}):y&&k&&(r.content=sr(r.content,n.index,ua))}}}}var Ch=function(t){var o;if(t.md.options.typographer)for(o=t.tokens.length-1;o>=0;o--)t.tokens[o].type!=="inline"||!xh.test(t.tokens[o].content)||kh(t.tokens[o].children,t)},Ah=function(t){var o,r,s,n,i,a,l=t.tokens;for(o=0,r=l.length;o<r;o++)if(l[o].type==="inline"){for(s=l[o].children,i=s.length,n=0;n<i;n++)s[n].type==="text_special"&&(s[n].type="text");for(n=a=0;n<i;n++)s[n].type==="text"&&n+1<i&&s[n+1].type==="text"?s[n+1].content=s[n].content+s[n+1].content:(n!==a&&(s[a]=s[n]),a++);n!==a&&(s.length=a)}};function Be(e,t,o){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=o,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}Be.prototype.attrIndex=function(t){var o,r,s;if(!this.attrs)return-1;for(o=this.attrs,r=0,s=o.length;r<s;r++)if(o[r][0]===t)return r;return-1},Be.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]},Be.prototype.attrSet=function(t,o){var r=this.attrIndex(t),s=[t,o];r<0?this.attrPush(s):this.attrs[r]=s},Be.prototype.attrGet=function(t){var o=this.attrIndex(t),r=null;return o>=0&&(r=this.attrs[o][1]),r},Be.prototype.attrJoin=function(t,o){var r=this.attrIndex(t);r<0?this.attrPush([t,o]):this.attrs[r][1]=this.attrs[r][1]+" "+o};var Ls=Be,$h=Ls;function da(e,t,o){this.src=e,this.env=o,this.tokens=[],this.inlineMode=!1,this.md=t}da.prototype.Token=$h;var Eh=da,Sh=Ts,zs=[["normalize",lh],["block",ch],["inline",uh],["linkify",fh],["replacements",_h],["smartquotes",Ch],["text_join",Ah]];function Rs(){this.ruler=new Sh;for(var e=0;e<zs.length;e++)this.ruler.push(zs[e][0],zs[e][1])}Rs.prototype.process=function(e){var t,o,r;for(r=this.ruler.getRules(""),t=0,o=r.length;t<o;t++)r[t](e)},Rs.prototype.State=Eh;var qh=Rs,Ps=O.isSpace;function Ms(e,t){var o=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(o,r)}function ha(e){var t=[],o=0,r=e.length,s,n=!1,i=0,a="";for(s=e.charCodeAt(o);o<r;)s===124&&(n?(a+=e.substring(i,o-1),i=o):(t.push(a+e.substring(i,o)),a="",i=o+1)),n=s===92,o++,s=e.charCodeAt(o);return t.push(a+e.substring(i)),t}var Dh=function(t,o,r,s){var n,i,a,l,c,u,d,f,h,b,m,w,y,v,k,C,A,_;if(o+2>r||(u=o+1,t.sCount[u]<t.blkIndent)||t.sCount[u]-t.blkIndent>=4||(a=t.bMarks[u]+t.tShift[u],a>=t.eMarks[u])||(A=t.src.charCodeAt(a++),A!==124&&A!==45&&A!==58)||a>=t.eMarks[u]||(_=t.src.charCodeAt(a++),_!==124&&_!==45&&_!==58&&!Ps(_))||A===45&&Ps(_))return!1;for(;a<t.eMarks[u];){if(n=t.src.charCodeAt(a),n!==124&&n!==45&&n!==58&&!Ps(n))return!1;a++}for(i=Ms(t,o+1),d=i.split("|"),b=[],l=0;l<d.length;l++){if(m=d[l].trim(),!m){if(l===0||l===d.length-1)continue;return!1}if(!/^:?-+:?$/.test(m))return!1;m.charCodeAt(m.length-1)===58?b.push(m.charCodeAt(0)===58?"center":"right"):m.charCodeAt(0)===58?b.push("left"):b.push("")}if(i=Ms(t,o).trim(),i.indexOf("|")===-1||t.sCount[o]-t.blkIndent>=4||(d=ha(i),d.length&&d[0]===""&&d.shift(),d.length&&d[d.length-1]===""&&d.pop(),f=d.length,f===0||f!==b.length))return!1;if(s)return!0;for(v=t.parentType,t.parentType="table",C=t.md.block.ruler.getRules("blockquote"),h=t.push("table_open","table",1),h.map=w=[o,0],h=t.push("thead_open","thead",1),h.map=[o,o+1],h=t.push("tr_open","tr",1),h.map=[o,o+1],l=0;l<d.length;l++)h=t.push("th_open","th",1),b[l]&&(h.attrs=[["style","text-align:"+b[l]]]),h=t.push("inline","",0),h.content=d[l].trim(),h.children=[],h=t.push("th_close","th",-1);for(h=t.push("tr_close","tr",-1),h=t.push("thead_close","thead",-1),u=o+2;u<r&&!(t.sCount[u]<t.blkIndent);u++){for(k=!1,l=0,c=C.length;l<c;l++)if(C[l](t,u,r,!0)){k=!0;break}if(k||(i=Ms(t,u).trim(),!i)||t.sCount[u]-t.blkIndent>=4)break;for(d=ha(i),d.length&&d[0]===""&&d.shift(),d.length&&d[d.length-1]===""&&d.pop(),u===o+2&&(h=t.push("tbody_open","tbody",1),h.map=y=[o+2,0]),h=t.push("tr_open","tr",1),h.map=[u,u+1],l=0;l<f;l++)h=t.push("td_open","td",1),b[l]&&(h.attrs=[["style","text-align:"+b[l]]]),h=t.push("inline","",0),h.content=d[l]?d[l].trim():"",h.children=[],h=t.push("td_close","td",-1);h=t.push("tr_close","tr",-1)}return y&&(h=t.push("tbody_close","tbody",-1),y[1]=u),h=t.push("table_close","table",-1),w[1]=u,t.parentType=v,t.line=u,!0},Th=function(t,o,r){var s,n,i;if(t.sCount[o]-t.blkIndent<4)return!1;for(n=s=o+1;s<r;){if(t.isEmpty(s)){s++;continue}if(t.sCount[s]-t.blkIndent>=4){s++,n=s;continue}break}return t.line=n,i=t.push("code_block","code",0),i.content=t.getLines(o,n,4+t.blkIndent,!1)+`
4876
- `,i.map=[o,t.line],!0},Lh=function(t,o,r,s){var n,i,a,l,c,u,d,f=!1,h=t.bMarks[o]+t.tShift[o],b=t.eMarks[o];if(t.sCount[o]-t.blkIndent>=4||h+3>b||(n=t.src.charCodeAt(h),n!==126&&n!==96)||(c=h,h=t.skipChars(h,n),i=h-c,i<3)||(d=t.src.slice(c,h),a=t.src.slice(h,b),n===96&&a.indexOf(String.fromCharCode(n))>=0))return!1;if(s)return!0;for(l=o;l++,!(l>=r||(h=c=t.bMarks[l]+t.tShift[l],b=t.eMarks[l],h<b&&t.sCount[l]<t.blkIndent));)if(t.src.charCodeAt(h)===n&&!(t.sCount[l]-t.blkIndent>=4)&&(h=t.skipChars(h,n),!(h-c<i)&&(h=t.skipSpaces(h),!(h<b)))){f=!0;break}return i=t.sCount[o],t.line=l+(f?1:0),u=t.push("fence","code",0),u.info=a,u.content=t.getLines(o+1,l,i,!0),u.markup=d,u.map=[o,t.line],!0},pa=O.isSpace,zh=function(t,o,r,s){var n,i,a,l,c,u,d,f,h,b,m,w,y,v,k,C,A,_,D,M,S=t.lineMax,q=t.bMarks[o]+t.tShift[o],F=t.eMarks[o];if(t.sCount[o]-t.blkIndent>=4||t.src.charCodeAt(q++)!==62)return!1;if(s)return!0;for(l=h=t.sCount[o]+1,t.src.charCodeAt(q)===32?(q++,l++,h++,n=!1,C=!0):t.src.charCodeAt(q)===9?(C=!0,(t.bsCount[o]+h)%4===3?(q++,l++,h++,n=!1):n=!0):C=!1,b=[t.bMarks[o]],t.bMarks[o]=q;q<F&&(i=t.src.charCodeAt(q),pa(i));){i===9?h+=4-(h+t.bsCount[o]+(n?1:0))%4:h++;q++}for(m=[t.bsCount[o]],t.bsCount[o]=t.sCount[o]+1+(C?1:0),u=q>=F,v=[t.sCount[o]],t.sCount[o]=h-l,k=[t.tShift[o]],t.tShift[o]=q-t.bMarks[o],_=t.md.block.ruler.getRules("blockquote"),y=t.parentType,t.parentType="blockquote",f=o+1;f<r&&(M=t.sCount[f]<t.blkIndent,q=t.bMarks[f]+t.tShift[f],F=t.eMarks[f],!(q>=F));f++){if(t.src.charCodeAt(q++)===62&&!M){for(l=h=t.sCount[f]+1,t.src.charCodeAt(q)===32?(q++,l++,h++,n=!1,C=!0):t.src.charCodeAt(q)===9?(C=!0,(t.bsCount[f]+h)%4===3?(q++,l++,h++,n=!1):n=!0):C=!1,b.push(t.bMarks[f]),t.bMarks[f]=q;q<F&&(i=t.src.charCodeAt(q),pa(i));){i===9?h+=4-(h+t.bsCount[f]+(n?1:0))%4:h++;q++}u=q>=F,m.push(t.bsCount[f]),t.bsCount[f]=t.sCount[f]+1+(C?1:0),v.push(t.sCount[f]),t.sCount[f]=h-l,k.push(t.tShift[f]),t.tShift[f]=q-t.bMarks[f];continue}if(u)break;for(A=!1,a=0,c=_.length;a<c;a++)if(_[a](t,f,r,!0)){A=!0;break}if(A){t.lineMax=f,t.blkIndent!==0&&(b.push(t.bMarks[f]),m.push(t.bsCount[f]),k.push(t.tShift[f]),v.push(t.sCount[f]),t.sCount[f]-=t.blkIndent);break}b.push(t.bMarks[f]),m.push(t.bsCount[f]),k.push(t.tShift[f]),v.push(t.sCount[f]),t.sCount[f]=-1}for(w=t.blkIndent,t.blkIndent=0,D=t.push("blockquote_open","blockquote",1),D.markup=">",D.map=d=[o,0],t.md.block.tokenize(t,o,f),D=t.push("blockquote_close","blockquote",-1),D.markup=">",t.lineMax=S,t.parentType=y,d[1]=t.line,a=0;a<k.length;a++)t.bMarks[a+o]=b[a],t.tShift[a+o]=k[a],t.sCount[a+o]=v[a],t.bsCount[a+o]=m[a];return t.blkIndent=w,!0},Rh=O.isSpace,Ph=function(t,o,r,s){var n,i,a,l,c=t.bMarks[o]+t.tShift[o],u=t.eMarks[o];if(t.sCount[o]-t.blkIndent>=4||(n=t.src.charCodeAt(c++),n!==42&&n!==45&&n!==95))return!1;for(i=1;c<u;){if(a=t.src.charCodeAt(c++),a!==n&&!Rh(a))return!1;a===n&&i++}return i<3?!1:(s||(t.line=o+1,l=t.push("hr","hr",0),l.map=[o,t.line],l.markup=Array(i+1).join(String.fromCharCode(n))),!0)},fa=O.isSpace;function ga(e,t){var o,r,s,n;return r=e.bMarks[t]+e.tShift[t],s=e.eMarks[t],o=e.src.charCodeAt(r++),o!==42&&o!==45&&o!==43||r<s&&(n=e.src.charCodeAt(r),!fa(n))?-1:r}function ba(e,t){var o,r=e.bMarks[t]+e.tShift[t],s=r,n=e.eMarks[t];if(s+1>=n||(o=e.src.charCodeAt(s++),o<48||o>57))return-1;for(;;){if(s>=n)return-1;if(o=e.src.charCodeAt(s++),o>=48&&o<=57){if(s-r>=10)return-1;continue}if(o===41||o===46)break;return-1}return s<n&&(o=e.src.charCodeAt(s),!fa(o))?-1:s}function Mh(e,t){var o,r,s=e.level+2;for(o=t+2,r=e.tokens.length-2;o<r;o++)e.tokens[o].level===s&&e.tokens[o].type==="paragraph_open"&&(e.tokens[o+2].hidden=!0,e.tokens[o].hidden=!0,o+=2)}var Fh=function(t,o,r,s){var n,i,a,l,c,u,d,f,h,b,m,w,y,v,k,C,A,_,D,M,S,q,F,J,wt,x,I,L,et=!1,Cr=!0;if(t.sCount[o]-t.blkIndent>=4||t.listIndent>=0&&t.sCount[o]-t.listIndent>=4&&t.sCount[o]<t.blkIndent)return!1;if(s&&t.parentType==="paragraph"&&t.sCount[o]>=t.blkIndent&&(et=!0),(F=ba(t,o))>=0){if(d=!0,wt=t.bMarks[o]+t.tShift[o],y=Number(t.src.slice(wt,F-1)),et&&y!==1)return!1}else if((F=ga(t,o))>=0)d=!1;else return!1;if(et&&t.skipSpaces(F)>=t.eMarks[o])return!1;if(w=t.src.charCodeAt(F-1),s)return!0;for(m=t.tokens.length,d?(L=t.push("ordered_list_open","ol",1),y!==1&&(L.attrs=[["start",y]])):L=t.push("bullet_list_open","ul",1),L.map=b=[o,0],L.markup=String.fromCharCode(w),k=o,J=!1,I=t.md.block.ruler.getRules("list"),_=t.parentType,t.parentType="list";k<r;){for(q=F,v=t.eMarks[k],u=C=t.sCount[k]+F-(t.bMarks[o]+t.tShift[o]);q<v;){if(n=t.src.charCodeAt(q),n===9)C+=4-(C+t.bsCount[k])%4;else if(n===32)C++;else break;q++}if(i=q,i>=v?c=1:c=C-u,c>4&&(c=1),l=u+c,L=t.push("list_item_open","li",1),L.markup=String.fromCharCode(w),L.map=f=[o,0],d&&(L.info=t.src.slice(wt,F-1)),S=t.tight,M=t.tShift[o],D=t.sCount[o],A=t.listIndent,t.listIndent=t.blkIndent,t.blkIndent=l,t.tight=!0,t.tShift[o]=i-t.bMarks[o],t.sCount[o]=C,i>=v&&t.isEmpty(o+1)?t.line=Math.min(t.line+2,r):t.md.block.tokenize(t,o,r,!0),(!t.tight||J)&&(Cr=!1),J=t.line-o>1&&t.isEmpty(t.line-1),t.blkIndent=t.listIndent,t.listIndent=A,t.tShift[o]=M,t.sCount[o]=D,t.tight=S,L=t.push("list_item_close","li",-1),L.markup=String.fromCharCode(w),k=o=t.line,f[1]=k,i=t.bMarks[o],k>=r||t.sCount[k]<t.blkIndent||t.sCount[o]-t.blkIndent>=4)break;for(x=!1,a=0,h=I.length;a<h;a++)if(I[a](t,k,r,!0)){x=!0;break}if(x)break;if(d){if(F=ba(t,k),F<0)break;wt=t.bMarks[k]+t.tShift[k]}else if(F=ga(t,k),F<0)break;if(w!==t.src.charCodeAt(F-1))break}return d?L=t.push("ordered_list_close","ol",-1):L=t.push("bullet_list_close","ul",-1),L.markup=String.fromCharCode(w),b[1]=k,t.line=k,t.parentType=_,Cr&&Mh(t,m),!0},Ih=O.normalizeReference,nr=O.isSpace,Bh=function(t,o,r,s){var n,i,a,l,c,u,d,f,h,b,m,w,y,v,k,C,A=0,_=t.bMarks[o]+t.tShift[o],D=t.eMarks[o],M=o+1;if(t.sCount[o]-t.blkIndent>=4||t.src.charCodeAt(_)!==91)return!1;for(;++_<D;)if(t.src.charCodeAt(_)===93&&t.src.charCodeAt(_-1)!==92){if(_+1===D||t.src.charCodeAt(_+1)!==58)return!1;break}for(l=t.lineMax,k=t.md.block.ruler.getRules("reference"),b=t.parentType,t.parentType="reference";M<l&&!t.isEmpty(M);M++)if(!(t.sCount[M]-t.blkIndent>3)&&!(t.sCount[M]<0)){for(v=!1,u=0,d=k.length;u<d;u++)if(k[u](t,M,l,!0)){v=!0;break}if(v)break}for(y=t.getLines(o,M,t.blkIndent,!1).trim(),D=y.length,_=1;_<D;_++){if(n=y.charCodeAt(_),n===91)return!1;if(n===93){h=_;break}else n===10?A++:n===92&&(_++,_<D&&y.charCodeAt(_)===10&&A++)}if(h<0||y.charCodeAt(h+1)!==58)return!1;for(_=h+2;_<D;_++)if(n=y.charCodeAt(_),n===10)A++;else if(!nr(n))break;if(m=t.md.helpers.parseLinkDestination(y,_,D),!m.ok||(c=t.md.normalizeLink(m.str),!t.md.validateLink(c)))return!1;for(_=m.pos,A+=m.lines,i=_,a=A,w=_;_<D;_++)if(n=y.charCodeAt(_),n===10)A++;else if(!nr(n))break;for(m=t.md.helpers.parseLinkTitle(y,_,D),_<D&&w!==_&&m.ok?(C=m.str,_=m.pos,A+=m.lines):(C="",_=i,A=a);_<D&&(n=y.charCodeAt(_),!!nr(n));)_++;if(_<D&&y.charCodeAt(_)!==10&&C)for(C="",_=i,A=a;_<D&&(n=y.charCodeAt(_),!!nr(n));)_++;return _<D&&y.charCodeAt(_)!==10||(f=Ih(y.slice(1,h)),!f)?!1:(s||(typeof t.env.references>"u"&&(t.env.references={}),typeof t.env.references[f]>"u"&&(t.env.references[f]={title:C,href:c}),t.parentType=b,t.line=o+A+1),!0)},Oh=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],ir={},Nh="[a-zA-Z_:][a-zA-Z0-9:._-]*",Vh="[^\"'=<>`\\x00-\\x20]+",Uh="'[^']*'",Hh='"[^"]*"',jh="(?:"+Vh+"|"+Uh+"|"+Hh+")",Gh="(?:\\s+"+Nh+"(?:\\s*=\\s*"+jh+")?)",ma="<[A-Za-z][A-Za-z0-9\\-]*"+Gh+"*\\s*\\/?>",va="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Zh="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",Wh="<[?][\\s\\S]*?[?]>",Kh="<![A-Z]+\\s+[^>]*>",Yh="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",Jh=new RegExp("^(?:"+ma+"|"+va+"|"+Zh+"|"+Wh+"|"+Kh+"|"+Yh+")"),Qh=new RegExp("^(?:"+ma+"|"+va+")");ir.HTML_TAG_RE=Jh,ir.HTML_OPEN_CLOSE_TAG_RE=Qh;var Xh=Oh,tp=ir.HTML_OPEN_CLOSE_TAG_RE,Oe=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+Xh.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(tp.source+"\\s*$"),/^$/,!1]],ep=function(t,o,r,s){var n,i,a,l,c=t.bMarks[o]+t.tShift[o],u=t.eMarks[o];if(t.sCount[o]-t.blkIndent>=4||!t.md.options.html||t.src.charCodeAt(c)!==60)return!1;for(l=t.src.slice(c,u),n=0;n<Oe.length&&!Oe[n][0].test(l);n++);if(n===Oe.length)return!1;if(s)return Oe[n][2];if(i=o+1,!Oe[n][1].test(l)){for(;i<r&&!(t.sCount[i]<t.blkIndent);i++)if(c=t.bMarks[i]+t.tShift[i],u=t.eMarks[i],l=t.src.slice(c,u),Oe[n][1].test(l)){l.length!==0&&i++;break}}return t.line=i,a=t.push("html_block","",0),a.map=[o,i],a.content=t.getLines(o,i,t.blkIndent,!0),!0},ya=O.isSpace,op=function(t,o,r,s){var n,i,a,l,c=t.bMarks[o]+t.tShift[o],u=t.eMarks[o];if(t.sCount[o]-t.blkIndent>=4||(n=t.src.charCodeAt(c),n!==35||c>=u))return!1;for(i=1,n=t.src.charCodeAt(++c);n===35&&c<u&&i<=6;)i++,n=t.src.charCodeAt(++c);return i>6||c<u&&!ya(n)?!1:(s||(u=t.skipSpacesBack(u,c),a=t.skipCharsBack(u,35,c),a>c&&ya(t.src.charCodeAt(a-1))&&(u=a),t.line=o+1,l=t.push("heading_open","h"+String(i),1),l.markup="########".slice(0,i),l.map=[o,t.line],l=t.push("inline","",0),l.content=t.src.slice(c,u).trim(),l.map=[o,t.line],l.children=[],l=t.push("heading_close","h"+String(i),-1),l.markup="########".slice(0,i)),!0)},rp=function(t,o,r){var s,n,i,a,l,c,u,d,f,h=o+1,b,m=t.md.block.ruler.getRules("paragraph");if(t.sCount[o]-t.blkIndent>=4)return!1;for(b=t.parentType,t.parentType="paragraph";h<r&&!t.isEmpty(h);h++)if(!(t.sCount[h]-t.blkIndent>3)){if(t.sCount[h]>=t.blkIndent&&(c=t.bMarks[h]+t.tShift[h],u=t.eMarks[h],c<u&&(f=t.src.charCodeAt(c),(f===45||f===61)&&(c=t.skipChars(c,f),c=t.skipSpaces(c),c>=u)))){d=f===61?1:2;break}if(!(t.sCount[h]<0)){for(n=!1,i=0,a=m.length;i<a;i++)if(m[i](t,h,r,!0)){n=!0;break}if(n)break}}return d?(s=t.getLines(o,h,t.blkIndent,!1).trim(),t.line=h+1,l=t.push("heading_open","h"+String(d),1),l.markup=String.fromCharCode(f),l.map=[o,t.line],l=t.push("inline","",0),l.content=s,l.map=[o,t.line-1],l.children=[],l=t.push("heading_close","h"+String(d),-1),l.markup=String.fromCharCode(f),t.parentType=b,!0):!1},sp=function(t,o){var r,s,n,i,a,l,c=o+1,u=t.md.block.ruler.getRules("paragraph"),d=t.lineMax;for(l=t.parentType,t.parentType="paragraph";c<d&&!t.isEmpty(c);c++)if(!(t.sCount[c]-t.blkIndent>3)&&!(t.sCount[c]<0)){for(s=!1,n=0,i=u.length;n<i;n++)if(u[n](t,c,d,!0)){s=!0;break}if(s)break}return r=t.getLines(o,c,t.blkIndent,!1).trim(),t.line=c,a=t.push("paragraph_open","p",1),a.map=[o,t.line],a=t.push("inline","",0),a.content=r,a.map=[o,t.line],a.children=[],a=t.push("paragraph_close","p",-1),t.parentType=l,!0},wa=Ls,ar=O.isSpace;function Mt(e,t,o,r){var s,n,i,a,l,c,u,d;for(this.src=e,this.md=t,this.env=o,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",n=this.src,d=!1,i=a=c=u=0,l=n.length;a<l;a++){if(s=n.charCodeAt(a),!d)if(ar(s)){c++,s===9?u+=4-u%4:u++;continue}else d=!0;(s===10||a===l-1)&&(s!==10&&a++,this.bMarks.push(i),this.eMarks.push(a),this.tShift.push(c),this.sCount.push(u),this.bsCount.push(0),d=!1,c=0,u=0,i=a+1)}this.bMarks.push(n.length),this.eMarks.push(n.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}Mt.prototype.push=function(e,t,o){var r=new wa(e,t,o);return r.block=!0,o<0&&this.level--,r.level=this.level,o>0&&this.level++,this.tokens.push(r),r},Mt.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]},Mt.prototype.skipEmptyLines=function(t){for(var o=this.lineMax;t<o&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t},Mt.prototype.skipSpaces=function(t){for(var o,r=this.src.length;t<r&&(o=this.src.charCodeAt(t),!!ar(o));t++);return t},Mt.prototype.skipSpacesBack=function(t,o){if(t<=o)return t;for(;t>o;)if(!ar(this.src.charCodeAt(--t)))return t+1;return t},Mt.prototype.skipChars=function(t,o){for(var r=this.src.length;t<r&&this.src.charCodeAt(t)===o;t++);return t},Mt.prototype.skipCharsBack=function(t,o,r){if(t<=r)return t;for(;t>r;)if(o!==this.src.charCodeAt(--t))return t+1;return t},Mt.prototype.getLines=function(t,o,r,s){var n,i,a,l,c,u,d,f=t;if(t>=o)return"";for(u=new Array(o-t),n=0;f<o;f++,n++){for(i=0,d=l=this.bMarks[f],f+1<o||s?c=this.eMarks[f]+1:c=this.eMarks[f];l<c&&i<r;){if(a=this.src.charCodeAt(l),ar(a))a===9?i+=4-(i+this.bsCount[f])%4:i++;else if(l-d<this.tShift[f])i++;else break;l++}i>r?u[n]=new Array(i-r+1).join(" ")+this.src.slice(l,c):u[n]=this.src.slice(l,c)}return u.join("")},Mt.prototype.Token=wa;var np=Mt,ip=Ts,lr=[["table",Dh,["paragraph","reference"]],["code",Th],["fence",Lh,["paragraph","reference","blockquote","list"]],["blockquote",zh,["paragraph","reference","blockquote","list"]],["hr",Ph,["paragraph","reference","blockquote","list"]],["list",Fh,["paragraph","reference","blockquote"]],["reference",Bh],["html_block",ep,["paragraph","reference","blockquote"]],["heading",op,["paragraph","reference","blockquote"]],["lheading",rp],["paragraph",sp]];function cr(){this.ruler=new ip;for(var e=0;e<lr.length;e++)this.ruler.push(lr[e][0],lr[e][1],{alt:(lr[e][2]||[]).slice()})}cr.prototype.tokenize=function(e,t,o){for(var r,s,n=this.ruler.getRules(""),i=n.length,a=t,l=!1,c=e.md.options.maxNesting;a<o&&(e.line=a=e.skipEmptyLines(a),!(a>=o||e.sCount[a]<e.blkIndent));){if(e.level>=c){e.line=o;break}for(s=0;s<i&&(r=n[s](e,a,o,!1),!r);s++);e.tight=!l,e.isEmpty(e.line-1)&&(l=!0),a=e.line,a<o&&e.isEmpty(a)&&(l=!0,a++,e.line=a)}},cr.prototype.parse=function(e,t,o,r){var s;e&&(s=new this.State(e,t,o,r),this.tokenize(s,s.line,s.lineMax))},cr.prototype.State=np;var ap=cr;function lp(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}for(var cp=function(t,o){for(var r=t.pos;r<t.posMax&&!lp(t.src.charCodeAt(r));)r++;return r===t.pos?!1:(o||(t.pending+=t.src.slice(t.pos,r)),t.pos=r,!0)},up=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i,dp=function(t,o){var r,s,n,i,a,l,c,u;return!t.md.options.linkify||t.linkLevel>0||(r=t.pos,s=t.posMax,r+3>s)||t.src.charCodeAt(r)!==58||t.src.charCodeAt(r+1)!==47||t.src.charCodeAt(r+2)!==47||(n=t.pending.match(up),!n)||(i=n[1],a=t.md.linkify.matchAtStart(t.src.slice(r-i.length)),!a)||(l=a.url,l=l.replace(/\*+$/,""),c=t.md.normalizeLink(l),!t.md.validateLink(c))?!1:(o||(t.pending=t.pending.slice(0,-i.length),u=t.push("link_open","a",1),u.attrs=[["href",c]],u.markup="linkify",u.info="auto",u=t.push("text","",0),u.content=t.md.normalizeLinkText(l),u=t.push("link_close","a",-1),u.markup="linkify",u.info="auto"),t.pos+=l.length-i.length,!0)},hp=O.isSpace,pp=function(t,o){var r,s,n,i=t.pos;if(t.src.charCodeAt(i)!==10)return!1;if(r=t.pending.length-1,s=t.posMax,!o)if(r>=0&&t.pending.charCodeAt(r)===32)if(r>=1&&t.pending.charCodeAt(r-1)===32){for(n=r-1;n>=1&&t.pending.charCodeAt(n-1)===32;)n--;t.pending=t.pending.slice(0,n),t.push("hardbreak","br",0)}else t.pending=t.pending.slice(0,-1),t.push("softbreak","br",0);else t.push("softbreak","br",0);for(i++;i<s&&hp(t.src.charCodeAt(i));)i++;return t.pos=i,!0},fp=O.isSpace,Fs=[],_a=0;_a<256;_a++)Fs.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){Fs[e.charCodeAt(0)]=1});var gp=function(t,o){var r,s,n,i,a,l=t.pos,c=t.posMax;if(t.src.charCodeAt(l)!==92||(l++,l>=c))return!1;if(r=t.src.charCodeAt(l),r===10){for(o||t.push("hardbreak","br",0),l++;l<c&&(r=t.src.charCodeAt(l),!!fp(r));)l++;return t.pos=l,!0}return i=t.src[l],r>=55296&&r<=56319&&l+1<c&&(s=t.src.charCodeAt(l+1),s>=56320&&s<=57343&&(i+=t.src[l+1],l++)),n="\\"+i,o||(a=t.push("text_special","",0),r<256&&Fs[r]!==0?a.content=i:a.content=n,a.markup=n,a.info="escape"),t.pos=l+1,!0},bp=function(t,o){var r,s,n,i,a,l,c,u,d=t.pos,f=t.src.charCodeAt(d);if(f!==96)return!1;for(r=d,d++,s=t.posMax;d<s&&t.src.charCodeAt(d)===96;)d++;if(n=t.src.slice(r,d),c=n.length,t.backticksScanned&&(t.backticks[c]||0)<=r)return o||(t.pending+=n),t.pos+=c,!0;for(a=l=d;(a=t.src.indexOf("`",l))!==-1;){for(l=a+1;l<s&&t.src.charCodeAt(l)===96;)l++;if(u=l-a,u===c)return o||(i=t.push("code_inline","code",0),i.markup=n,i.content=t.src.slice(d,a).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),t.pos=l,!0;t.backticks[u]=a}return t.backticksScanned=!0,o||(t.pending+=n),t.pos+=c,!0},ur={};ur.tokenize=function(t,o){var r,s,n,i,a,l=t.pos,c=t.src.charCodeAt(l);if(o||c!==126||(s=t.scanDelims(t.pos,!0),i=s.length,a=String.fromCharCode(c),i<2))return!1;for(i%2&&(n=t.push("text","",0),n.content=a,i--),r=0;r<i;r+=2)n=t.push("text","",0),n.content=a+a,t.delimiters.push({marker:c,length:0,token:t.tokens.length-1,end:-1,open:s.can_open,close:s.can_close});return t.pos+=s.length,!0};function xa(e,t){var o,r,s,n,i,a=[],l=t.length;for(o=0;o<l;o++)s=t[o],s.marker===126&&s.end!==-1&&(n=t[s.end],i=e.tokens[s.token],i.type="s_open",i.tag="s",i.nesting=1,i.markup="~~",i.content="",i=e.tokens[n.token],i.type="s_close",i.tag="s",i.nesting=-1,i.markup="~~",i.content="",e.tokens[n.token-1].type==="text"&&e.tokens[n.token-1].content==="~"&&a.push(n.token-1));for(;a.length;){for(o=a.pop(),r=o+1;r<e.tokens.length&&e.tokens[r].type==="s_close";)r++;r--,o!==r&&(i=e.tokens[r],e.tokens[r]=e.tokens[o],e.tokens[o]=i)}}ur.postProcess=function(t){var o,r=t.tokens_meta,s=t.tokens_meta.length;for(xa(t,t.delimiters),o=0;o<s;o++)r[o]&&r[o].delimiters&&xa(t,r[o].delimiters)};var dr={};dr.tokenize=function(t,o){var r,s,n,i=t.pos,a=t.src.charCodeAt(i);if(o||a!==95&&a!==42)return!1;for(s=t.scanDelims(t.pos,a===42),r=0;r<s.length;r++)n=t.push("text","",0),n.content=String.fromCharCode(a),t.delimiters.push({marker:a,length:s.length,token:t.tokens.length-1,end:-1,open:s.can_open,close:s.can_close});return t.pos+=s.length,!0};function ka(e,t){var o,r,s,n,i,a,l=t.length;for(o=l-1;o>=0;o--)r=t[o],!(r.marker!==95&&r.marker!==42)&&r.end!==-1&&(s=t[r.end],a=o>0&&t[o-1].end===r.end+1&&t[o-1].marker===r.marker&&t[o-1].token===r.token-1&&t[r.end+1].token===s.token+1,i=String.fromCharCode(r.marker),n=e.tokens[r.token],n.type=a?"strong_open":"em_open",n.tag=a?"strong":"em",n.nesting=1,n.markup=a?i+i:i,n.content="",n=e.tokens[s.token],n.type=a?"strong_close":"em_close",n.tag=a?"strong":"em",n.nesting=-1,n.markup=a?i+i:i,n.content="",a&&(e.tokens[t[o-1].token].content="",e.tokens[t[r.end+1].token].content="",o--))}dr.postProcess=function(t){var o,r=t.tokens_meta,s=t.tokens_meta.length;for(ka(t,t.delimiters),o=0;o<s;o++)r[o]&&r[o].delimiters&&ka(t,r[o].delimiters)};var mp=O.normalizeReference,Is=O.isSpace,vp=function(t,o){var r,s,n,i,a,l,c,u,d,f="",h="",b=t.pos,m=t.posMax,w=t.pos,y=!0;if(t.src.charCodeAt(t.pos)!==91||(a=t.pos+1,i=t.md.helpers.parseLinkLabel(t,t.pos,!0),i<0))return!1;if(l=i+1,l<m&&t.src.charCodeAt(l)===40){for(y=!1,l++;l<m&&(s=t.src.charCodeAt(l),!(!Is(s)&&s!==10));l++);if(l>=m)return!1;if(w=l,c=t.md.helpers.parseLinkDestination(t.src,l,t.posMax),c.ok){for(f=t.md.normalizeLink(c.str),t.md.validateLink(f)?l=c.pos:f="",w=l;l<m&&(s=t.src.charCodeAt(l),!(!Is(s)&&s!==10));l++);if(c=t.md.helpers.parseLinkTitle(t.src,l,t.posMax),l<m&&w!==l&&c.ok)for(h=c.str,l=c.pos;l<m&&(s=t.src.charCodeAt(l),!(!Is(s)&&s!==10));l++);}(l>=m||t.src.charCodeAt(l)!==41)&&(y=!0),l++}if(y){if(typeof t.env.references>"u")return!1;if(l<m&&t.src.charCodeAt(l)===91?(w=l+1,l=t.md.helpers.parseLinkLabel(t,l),l>=0?n=t.src.slice(w,l++):l=i+1):l=i+1,n||(n=t.src.slice(a,i)),u=t.env.references[mp(n)],!u)return t.pos=b,!1;f=u.href,h=u.title}return o||(t.pos=a,t.posMax=i,d=t.push("link_open","a",1),d.attrs=r=[["href",f]],h&&r.push(["title",h]),t.linkLevel++,t.md.inline.tokenize(t),t.linkLevel--,d=t.push("link_close","a",-1)),t.pos=l,t.posMax=m,!0},yp=O.normalizeReference,Bs=O.isSpace,wp=function(t,o){var r,s,n,i,a,l,c,u,d,f,h,b,m,w="",y=t.pos,v=t.posMax;if(t.src.charCodeAt(t.pos)!==33||t.src.charCodeAt(t.pos+1)!==91||(l=t.pos+2,a=t.md.helpers.parseLinkLabel(t,t.pos+1,!1),a<0))return!1;if(c=a+1,c<v&&t.src.charCodeAt(c)===40){for(c++;c<v&&(s=t.src.charCodeAt(c),!(!Bs(s)&&s!==10));c++);if(c>=v)return!1;for(m=c,d=t.md.helpers.parseLinkDestination(t.src,c,t.posMax),d.ok&&(w=t.md.normalizeLink(d.str),t.md.validateLink(w)?c=d.pos:w=""),m=c;c<v&&(s=t.src.charCodeAt(c),!(!Bs(s)&&s!==10));c++);if(d=t.md.helpers.parseLinkTitle(t.src,c,t.posMax),c<v&&m!==c&&d.ok)for(f=d.str,c=d.pos;c<v&&(s=t.src.charCodeAt(c),!(!Bs(s)&&s!==10));c++);else f="";if(c>=v||t.src.charCodeAt(c)!==41)return t.pos=y,!1;c++}else{if(typeof t.env.references>"u")return!1;if(c<v&&t.src.charCodeAt(c)===91?(m=c+1,c=t.md.helpers.parseLinkLabel(t,c),c>=0?i=t.src.slice(m,c++):c=a+1):c=a+1,i||(i=t.src.slice(l,a)),u=t.env.references[yp(i)],!u)return t.pos=y,!1;w=u.href,f=u.title}return o||(n=t.src.slice(l,a),t.md.inline.parse(n,t.md,t.env,b=[]),h=t.push("image","img",0),h.attrs=r=[["src",w],["alt",""]],h.children=b,h.content=n,f&&r.push(["title",f])),t.pos=c,t.posMax=v,!0},_p=/^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,xp=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/,kp=function(t,o){var r,s,n,i,a,l,c=t.pos;if(t.src.charCodeAt(c)!==60)return!1;for(a=t.pos,l=t.posMax;;){if(++c>=l||(i=t.src.charCodeAt(c),i===60))return!1;if(i===62)break}return r=t.src.slice(a+1,c),xp.test(r)?(s=t.md.normalizeLink(r),t.md.validateLink(s)?(o||(n=t.push("link_open","a",1),n.attrs=[["href",s]],n.markup="autolink",n.info="auto",n=t.push("text","",0),n.content=t.md.normalizeLinkText(r),n=t.push("link_close","a",-1),n.markup="autolink",n.info="auto"),t.pos+=r.length+2,!0):!1):_p.test(r)?(s=t.md.normalizeLink("mailto:"+r),t.md.validateLink(s)?(o||(n=t.push("link_open","a",1),n.attrs=[["href",s]],n.markup="autolink",n.info="auto",n=t.push("text","",0),n.content=t.md.normalizeLinkText(r),n=t.push("link_close","a",-1),n.markup="autolink",n.info="auto"),t.pos+=r.length+2,!0):!1):!1},Cp=ir.HTML_TAG_RE;function Ap(e){return/^<a[>\s]/i.test(e)}function $p(e){return/^<\/a\s*>/i.test(e)}function Ep(e){var t=e|32;return t>=97&&t<=122}var Sp=function(t,o){var r,s,n,i,a=t.pos;return!t.md.options.html||(n=t.posMax,t.src.charCodeAt(a)!==60||a+2>=n)||(r=t.src.charCodeAt(a+1),r!==33&&r!==63&&r!==47&&!Ep(r))||(s=t.src.slice(a).match(Cp),!s)?!1:(o||(i=t.push("html_inline","",0),i.content=t.src.slice(a,a+s[0].length),Ap(i.content)&&t.linkLevel++,$p(i.content)&&t.linkLevel--),t.pos+=s[0].length,!0)},Ca=Vi,qp=O.has,Dp=O.isValidEntityCode,Aa=O.fromCodePoint,Tp=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Lp=/^&([a-z][a-z0-9]{1,31});/i,zp=function(t,o){var r,s,n,i,a=t.pos,l=t.posMax;if(t.src.charCodeAt(a)!==38||a+1>=l)return!1;if(r=t.src.charCodeAt(a+1),r===35){if(n=t.src.slice(a).match(Tp),n)return o||(s=n[1][0].toLowerCase()==="x"?parseInt(n[1].slice(1),16):parseInt(n[1],10),i=t.push("text_special","",0),i.content=Dp(s)?Aa(s):Aa(65533),i.markup=n[0],i.info="entity"),t.pos+=n[0].length,!0}else if(n=t.src.slice(a).match(Lp),n&&qp(Ca,n[1]))return o||(i=t.push("text_special","",0),i.content=Ca[n[1]],i.markup=n[0],i.info="entity"),t.pos+=n[0].length,!0;return!1};function $a(e,t){var o,r,s,n,i,a,l,c,u={},d=t.length;if(d){var f=0,h=-2,b=[];for(o=0;o<d;o++)if(s=t[o],b.push(0),(t[f].marker!==s.marker||h!==s.token-1)&&(f=o),h=s.token,s.length=s.length||0,!!s.close){for(u.hasOwnProperty(s.marker)||(u[s.marker]=[-1,-1,-1,-1,-1,-1]),i=u[s.marker][(s.open?3:0)+s.length%3],r=f-b[f]-1,a=r;r>i;r-=b[r]+1)if(n=t[r],n.marker===s.marker&&n.open&&n.end<0&&(l=!1,(n.close||s.open)&&(n.length+s.length)%3===0&&(n.length%3!==0||s.length%3!==0)&&(l=!0),!l)){c=r>0&&!t[r-1].open?b[r-1]+1:0,b[o]=o-r+c,b[r]=c,s.open=!1,n.end=o,n.close=!1,a=-1,h=-2;break}a!==-1&&(u[s.marker][(s.open?3:0)+(s.length||0)%3]=a)}}}var Rp=function(t){var o,r=t.tokens_meta,s=t.tokens_meta.length;for($a(t,t.delimiters),o=0;o<s;o++)r[o]&&r[o].delimiters&&$a(t,r[o].delimiters)},Pp=function(t){var o,r,s=0,n=t.tokens,i=t.tokens.length;for(o=r=0;o<i;o++)n[o].nesting<0&&s--,n[o].level=s,n[o].nesting>0&&s++,n[o].type==="text"&&o+1<i&&n[o+1].type==="text"?n[o+1].content=n[o].content+n[o+1].content:(o!==r&&(n[r]=n[o]),r++);o!==r&&(n.length=r)},Os=Ls,Ea=O.isWhiteSpace,Sa=O.isPunctChar,qa=O.isMdAsciiPunct;function Co(e,t,o,r){this.src=e,this.env=o,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}Co.prototype.pushPending=function(){var e=new Os("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},Co.prototype.push=function(e,t,o){this.pending&&this.pushPending();var r=new Os(e,t,o),s=null;return o<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,o>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],s={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(s),r},Co.prototype.scanDelims=function(e,t){var o=e,r,s,n,i,a,l,c,u,d,f=!0,h=!0,b=this.posMax,m=this.src.charCodeAt(e);for(r=e>0?this.src.charCodeAt(e-1):32;o<b&&this.src.charCodeAt(o)===m;)o++;return n=o-e,s=o<b?this.src.charCodeAt(o):32,c=qa(r)||Sa(String.fromCharCode(r)),d=qa(s)||Sa(String.fromCharCode(s)),l=Ea(r),u=Ea(s),u?f=!1:d&&(l||c||(f=!1)),l?h=!1:c&&(u||d||(h=!1)),t?(i=f,a=h):(i=f&&(!h||c),a=h&&(!f||d)),{can_open:i,can_close:a,length:n}},Co.prototype.Token=Os;var Mp=Co,Da=Ts,Ns=[["text",cp],["linkify",dp],["newline",pp],["escape",gp],["backticks",bp],["strikethrough",ur.tokenize],["emphasis",dr.tokenize],["link",vp],["image",wp],["autolink",kp],["html_inline",Sp],["entity",zp]],Vs=[["balance_pairs",Rp],["strikethrough",ur.postProcess],["emphasis",dr.postProcess],["fragments_join",Pp]];function Ao(){var e;for(this.ruler=new Da,e=0;e<Ns.length;e++)this.ruler.push(Ns[e][0],Ns[e][1]);for(this.ruler2=new Da,e=0;e<Vs.length;e++)this.ruler2.push(Vs[e][0],Vs[e][1])}Ao.prototype.skipToken=function(e){var t,o,r=e.pos,s=this.ruler.getRules(""),n=s.length,i=e.md.options.maxNesting,a=e.cache;if(typeof a[r]<"u"){e.pos=a[r];return}if(e.level<i)for(o=0;o<n&&(e.level++,t=s[o](e,!0),e.level--,!t);o++);else e.pos=e.posMax;t||e.pos++,a[r]=e.pos},Ao.prototype.tokenize=function(e){for(var t,o,r=this.ruler.getRules(""),s=r.length,n=e.posMax,i=e.md.options.maxNesting;e.pos<n;){if(e.level<i)for(o=0;o<s&&(t=r[o](e,!1),!t);o++);if(t){if(e.pos>=n)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},Ao.prototype.parse=function(e,t,o,r){var s,n,i,a=new this.State(e,t,o,r);for(this.tokenize(a),n=this.ruler2.getRules(""),i=n.length,s=0;s<i;s++)n[s](a)},Ao.prototype.State=Mp;var Fp=Ao,Us,Ta;function Ip(){return Ta||(Ta=1,Us=function(e){var t={};e=e||{},t.src_Any=Ji().source,t.src_Cc=Xi().source,t.src_Z=oa().source,t.src_P=$s.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");var o="[><|]";return t.src_pseudo_letter="(?:(?!"+o+"|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+o+"|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+o+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+o+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}),Us}function Hs(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach(function(o){o&&Object.keys(o).forEach(function(r){e[r]=o[r]})}),e}function hr(e){return Object.prototype.toString.call(e)}function Bp(e){return hr(e)==="[object String]"}function Op(e){return hr(e)==="[object Object]"}function Np(e){return hr(e)==="[object RegExp]"}function La(e){return hr(e)==="[object Function]"}function Vp(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var za={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function Up(e){return Object.keys(e||{}).reduce(function(t,o){return t||za.hasOwnProperty(o)},!1)}var Hp={"http:":{validate:function(e,t,o){var r=e.slice(t);return o.re.http||(o.re.http=new RegExp("^\\/\\/"+o.re.src_auth+o.re.src_host_port_strict+o.re.src_path,"i")),o.re.http.test(r)?r.match(o.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,o){var r=e.slice(t);return o.re.no_http||(o.re.no_http=new RegExp("^"+o.re.src_auth+"(?:localhost|(?:(?:"+o.re.src_domain+")\\.)+"+o.re.src_domain_root+")"+o.re.src_port+o.re.src_host_terminator+o.re.src_path,"i")),o.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(o.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,o){var r=e.slice(t);return o.re.mailto||(o.re.mailto=new RegExp("^"+o.re.src_email_name+"@"+o.re.src_host_strict,"i")),o.re.mailto.test(r)?r.match(o.re.mailto)[0].length:0}}},jp="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",Gp="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function Zp(e){e.__index__=-1,e.__text_cache__=""}function Wp(e){return function(t,o){var r=t.slice(o);return e.test(r)?r.match(e)[0].length:0}}function Ra(){return function(e,t){t.normalize(e)}}function pr(e){var t=e.re=Ip()(e.__opts__),o=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||o.push(jp),o.push(t.src_xn),t.src_tlds=o.join("|");function r(a){return a.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");var s=[];e.__compiled__={};function n(a,l){throw new Error('(LinkifyIt) Invalid schema "'+a+'": '+l)}Object.keys(e.__schemas__).forEach(function(a){var l=e.__schemas__[a];if(l!==null){var c={validate:null,link:null};if(e.__compiled__[a]=c,Op(l)){Np(l.validate)?c.validate=Wp(l.validate):La(l.validate)?c.validate=l.validate:n(a,l),La(l.normalize)?c.normalize=l.normalize:l.normalize?n(a,l):c.normalize=Ra();return}if(Bp(l)){s.push(a);return}n(a,l)}}),s.forEach(function(a){e.__compiled__[e.__schemas__[a]]&&(e.__compiled__[a].validate=e.__compiled__[e.__schemas__[a]].validate,e.__compiled__[a].normalize=e.__compiled__[e.__schemas__[a]].normalize)}),e.__compiled__[""]={validate:null,normalize:Ra()};var i=Object.keys(e.__compiled__).filter(function(a){return a.length>0&&e.__compiled__[a]}).map(Vp).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+i+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+i+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),Zp(e)}function Kp(e,t){var o=e.__index__,r=e.__last_index__,s=e.__text_cache__.slice(o,r);this.schema=e.__schema__.toLowerCase(),this.index=o+t,this.lastIndex=r+t,this.raw=s,this.text=s,this.url=s}function js(e,t){var o=new Kp(e,t);return e.__compiled__[o.schema].normalize(o,e),o}function bt(e,t){if(!(this instanceof bt))return new bt(e,t);t||Up(e)&&(t=e,e={}),this.__opts__=Hs({},za,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=Hs({},Hp,e),this.__compiled__={},this.__tlds__=Gp,this.__tlds_replaced__=!1,this.re={},pr(this)}bt.prototype.add=function(t,o){return this.__schemas__[t]=o,pr(this),this},bt.prototype.set=function(t){return this.__opts__=Hs(this.__opts__,t),this},bt.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;var o,r,s,n,i,a,l,c,u;if(this.re.schema_test.test(t)){for(l=this.re.schema_search,l.lastIndex=0;(o=l.exec(t))!==null;)if(n=this.testSchemaAt(t,o[2],l.lastIndex),n){this.__schema__=o[2],this.__index__=o.index+o[1].length,this.__last_index__=o.index+o[0].length+n;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(c=t.search(this.re.host_fuzzy_test),c>=0&&(this.__index__<0||c<this.__index__)&&(r=t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(i=r.index+r[1].length,(this.__index__<0||i<this.__index__)&&(this.__schema__="",this.__index__=i,this.__last_index__=r.index+r[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(u=t.indexOf("@"),u>=0&&(s=t.match(this.re.email_fuzzy))!==null&&(i=s.index+s[1].length,a=s.index+s[0].length,(this.__index__<0||i<this.__index__||i===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=i,this.__last_index__=a))),this.__index__>=0},bt.prototype.pretest=function(t){return this.re.pretest.test(t)},bt.prototype.testSchemaAt=function(t,o,r){return this.__compiled__[o.toLowerCase()]?this.__compiled__[o.toLowerCase()].validate(t,r,this):0},bt.prototype.match=function(t){var o=0,r=[];this.__index__>=0&&this.__text_cache__===t&&(r.push(js(this,o)),o=this.__last_index__);for(var s=o?t.slice(o):t;this.test(s);)r.push(js(this,o)),s=s.slice(this.__last_index__),o+=this.__last_index__;return r.length?r:null},bt.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;var o=this.re.schema_at_start.exec(t);if(!o)return null;var r=this.testSchemaAt(t,o[2],o[0].length);return r?(this.__schema__=o[2],this.__index__=o.index+o[1].length,this.__last_index__=o.index+o[0].length+r,js(this,0)):null},bt.prototype.tlds=function(t,o){return t=Array.isArray(t)?t:[t],o?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,s,n){return r!==n[s-1]}).reverse(),pr(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,pr(this),this)},bt.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)},bt.prototype.onCompile=function(){};var Yp=bt;const Ne=2147483647,Ft=36,Gs=1,$o=26,Jp=38,Qp=700,Pa=72,Ma=128,Fa="-",Xp=/^xn--/,tf=/[^\0-\x7F]/,ef=/[\x2E\u3002\uFF0E\uFF61]/g,of={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Zs=Ft-Gs,It=Math.floor,Ws=String.fromCharCode;function se(e){throw new RangeError(of[e])}function rf(e,t){const o=[];let r=e.length;for(;r--;)o[r]=t(e[r]);return o}function Ia(e,t){const o=e.split("@");let r="";o.length>1&&(r=o[0]+"@",e=o[1]),e=e.replace(ef,".");const s=e.split("."),n=rf(s,t).join(".");return r+n}function Ks(e){const t=[];let o=0;const r=e.length;for(;o<r;){const s=e.charCodeAt(o++);if(s>=55296&&s<=56319&&o<r){const n=e.charCodeAt(o++);(n&64512)==56320?t.push(((s&1023)<<10)+(n&1023)+65536):(t.push(s),o--)}else t.push(s)}return t}const Ba=e=>String.fromCodePoint(...e),sf=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:Ft},Oa=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},Na=function(e,t,o){let r=0;for(e=o?It(e/Qp):e>>1,e+=It(e/t);e>Zs*$o>>1;r+=Ft)e=It(e/Zs);return It(r+(Zs+1)*e/(e+Jp))},Ys=function(e){const t=[],o=e.length;let r=0,s=Ma,n=Pa,i=e.lastIndexOf(Fa);i<0&&(i=0);for(let a=0;a<i;++a)e.charCodeAt(a)>=128&&se("not-basic"),t.push(e.charCodeAt(a));for(let a=i>0?i+1:0;a<o;){const l=r;for(let u=1,d=Ft;;d+=Ft){a>=o&&se("invalid-input");const f=sf(e.charCodeAt(a++));f>=Ft&&se("invalid-input"),f>It((Ne-r)/u)&&se("overflow"),r+=f*u;const h=d<=n?Gs:d>=n+$o?$o:d-n;if(f<h)break;const b=Ft-h;u>It(Ne/b)&&se("overflow"),u*=b}const c=t.length+1;n=Na(r-l,c,l==0),It(r/c)>Ne-s&&se("overflow"),s+=It(r/c),r%=c,t.splice(r++,0,s)}return String.fromCodePoint(...t)},Js=function(e){const t=[];e=Ks(e);const o=e.length;let r=Ma,s=0,n=Pa;for(const l of e)l<128&&t.push(Ws(l));const i=t.length;let a=i;for(i&&t.push(Fa);a<o;){let l=Ne;for(const u of e)u>=r&&u<l&&(l=u);const c=a+1;l-r>It((Ne-s)/c)&&se("overflow"),s+=(l-r)*c,r=l;for(const u of e)if(u<r&&++s>Ne&&se("overflow"),u===r){let d=s;for(let f=Ft;;f+=Ft){const h=f<=n?Gs:f>=n+$o?$o:f-n;if(d<h)break;const b=d-h,m=Ft-h;t.push(Ws(Oa(h+b%m,0))),d=It(b/m)}t.push(Ws(Oa(d,0))),n=Na(s,c,a===i),s=0,++a}++s,++r}return t.join("")},Va=function(e){return Ia(e,function(t){return Xp.test(t)?Ys(t.slice(4).toLowerCase()):t})},Ua=function(e){return Ia(e,function(t){return tf.test(t)?"xn--"+Js(t):t})},nf=ql(Object.freeze(Object.defineProperty({__proto__:null,decode:Ys,default:{version:"2.1.0",ucs2:{decode:Ks,encode:Ba},decode:Ys,encode:Js,toASCII:Ua,toUnicode:Va},encode:Js,toASCII:Ua,toUnicode:Va,ucs2decode:Ks,ucs2encode:Ba},Symbol.toStringTag,{value:"Module"})));var af={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},lf={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},cf={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}},Eo=O,uf=rr,df=nh,hf=qh,pf=ap,ff=Fp,gf=Yp,_e=Fe,Ha=nf,bf={default:af,zero:lf,commonmark:cf},mf=/^(vbscript|javascript|file|data):/,vf=/^data:image\/(gif|png|jpeg|webp);/;function yf(e){var t=e.trim().toLowerCase();return mf.test(t)?!!vf.test(t):!0}var ja=["http:","https:","mailto:"];function wf(e){var t=_e.parse(e,!0);if(t.hostname&&(!t.protocol||ja.indexOf(t.protocol)>=0))try{t.hostname=Ha.toASCII(t.hostname)}catch{}return _e.encode(_e.format(t))}function _f(e){var t=_e.parse(e,!0);if(t.hostname&&(!t.protocol||ja.indexOf(t.protocol)>=0))try{t.hostname=Ha.toUnicode(t.hostname)}catch{}return _e.decode(_e.format(t),_e.decode.defaultChars+"%")}function yt(e,t){if(!(this instanceof yt))return new yt(e,t);t||Eo.isString(e)||(t=e||{},e="default"),this.inline=new ff,this.block=new pf,this.core=new hf,this.renderer=new df,this.linkify=new gf,this.validateLink=yf,this.normalizeLink=wf,this.normalizeLinkText=_f,this.utils=Eo,this.helpers=Eo.assign({},uf),this.options={},this.configure(e),t&&this.set(t)}yt.prototype.set=function(e){return Eo.assign(this.options,e),this},yt.prototype.configure=function(e){var t=this,o;if(Eo.isString(e)&&(o=e,e=bf[o],!e))throw new Error('Wrong `markdown-it` preset "'+o+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(r){e.components[r].rules&&t[r].ruler.enableOnly(e.components[r].rules),e.components[r].rules2&&t[r].ruler2.enableOnly(e.components[r].rules2)}),this},yt.prototype.enable=function(e,t){var o=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(s){o=o.concat(this[s].ruler.enable(e,!0))},this),o=o.concat(this.inline.ruler2.enable(e,!0));var r=e.filter(function(s){return o.indexOf(s)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},yt.prototype.disable=function(e,t){var o=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(s){o=o.concat(this[s].ruler.disable(e,!0))},this),o=o.concat(this.inline.ruler2.disable(e,!0));var r=e.filter(function(s){return o.indexOf(s)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},yt.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},yt.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");var o=new this.core.State(e,this,t);return this.core.process(o),o.tokens},yt.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},yt.prototype.parseInline=function(e,t){var o=new this.core.State(e,this,t);return o.inlineMode=!0,this.core.process(o),o.tokens},yt.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var xf=yt,kf=xf;const Cf=Ir(kf);function Af(e,t){var o,r,s=e.attrs[e.attrIndex("href")][1];for(o=0;o<t.length;++o){if(r=t[o],typeof r.matcher=="function"){if(r.matcher(s,r))return r;continue}return r}}function $f(e,t,o){Object.keys(o).forEach(function(r){var s,n=o[r];r==="className"&&(r="class"),s=t[e].attrIndex(r),s<0?t[e].attrPush([r,n]):t[e].attrs[s][1]=n})}function Ga(e,t){t?t=Array.isArray(t)?t:[t]:t=[],Object.freeze(t);var o=e.renderer.rules.link_open||this.defaultRender;e.renderer.rules.link_open=function(r,s,n,i,a){var l=Af(r[s],t),c=l&&l.attrs;return c&&$f(s,r,c),o(r,s,n,i,a)}}Ga.defaultRender=function(e,t,o,r,s){return s.renderToken(e,t,o)};var Ef=Ga;const Sf=Ir(Ef);function qf(){const e=new Cf({linkify:!0});return e.use(Sf,{attrs:{target:"_blank",rel:"noopener"}}),e}async function Za(e){const t=qf();return T`${Je(t.render(e))}`}var Df=Object.defineProperty,Tf=Object.getOwnPropertyDescriptor,fr=(e,t,o,r)=>{for(var s=r>1?void 0:r?Tf(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&Df(t,o,s),s};let Ve=class extends ct{constructor(){super(...arguments),this.type="assistant"}disconnectedCallback(){super.disconnectedCallback(),this._removeCopyEvents()}updated(e){super.updated(e),e.has("message")&&requestIdleCallback(()=>{this._addCopyEvents()})}get _isBot(){return this.message.author==="assistant"||this.message.author==="system"}_removeMessageHandler(){this.emit("message:remove",{detail:this.message})}_addCopyEvents(){this.copyBtns.forEach(e=>{e.addEventListener("click",()=>{var o,r;const t=(r=(o=e.parentElement)==null?void 0:o.nextElementSibling)==null?void 0:r.textContent;t&&Fl(t).then(()=>{e.textContent="Success",setTimeout(()=>{e.textContent="Copy"},500)})})})}_removeCopyEvents(){this.copyBtns.forEach(e=>{e.removeEventListener("click",()=>{})})}render(){return Me(this.message.data||this.message.isThinking,()=>T`
4875
+ `:">",n)},Ve.prototype.renderInline=function(e,t,o){for(var r,s="",n=this.rules,i=0,a=e.length;i<a;i++)r=e[i].type,typeof n[r]<"u"?s+=n[r](e,i,t,o,this):s+=this.renderToken(e,i,t);return s},Ve.prototype.renderInlineAsText=function(e,t,o){for(var r="",s=0,n=e.length;s<n;s++)e[s].type==="text"?r+=e[s].content:e[s].type==="image"?r+=this.renderInlineAsText(e[s].children,t,o):e[s].type==="softbreak"&&(r+=`
4876
+ `);return r},Ve.prototype.render=function(e,t,o){var r,s,n,i="",a=this.rules;for(r=0,s=e.length;r<s;r++)n=e[r].type,n==="inline"?i+=this.renderInline(e[r].children,t,o):typeof a[n]<"u"?i+=a[e[r].type](e,r,t,o,this):i+=this.renderToken(e,r,t,o);return i};var Mh=Ve;function Ct(){this.__rules__=[],this.__cache__=null}Ct.prototype.__find__=function(e){for(var t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},Ct.prototype.__compile__=function(){var e=this,t=[""];e.__rules__.forEach(function(o){o.enabled&&o.alt.forEach(function(r){t.indexOf(r)<0&&t.push(r)})}),e.__cache__={},t.forEach(function(o){e.__cache__[o]=[],e.__rules__.forEach(function(r){r.enabled&&(o&&r.alt.indexOf(o)<0||e.__cache__[o].push(r.fn))})})},Ct.prototype.at=function(e,t,o){var r=this.__find__(e),s=o||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=s.alt||[],this.__cache__=null},Ct.prototype.before=function(e,t,o,r){var s=this.__find__(e),n=r||{};if(s===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(s,0,{name:t,enabled:!0,fn:o,alt:n.alt||[]}),this.__cache__=null},Ct.prototype.after=function(e,t,o,r){var s=this.__find__(e),n=r||{};if(s===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(s+1,0,{name:t,enabled:!0,fn:o,alt:n.alt||[]}),this.__cache__=null},Ct.prototype.push=function(e,t,o){var r=o||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null},Ct.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);var o=[];return e.forEach(function(r){var s=this.__find__(r);if(s<0){if(t)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[s].enabled=!0,o.push(r)},this),this.__cache__=null,o},Ct.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(o){o.enabled=!1}),this.enable(e,t)},Ct.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);var o=[];return e.forEach(function(r){var s=this.__find__(r);if(s<0){if(t)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[s].enabled=!1,o.push(r)},this),this.__cache__=null,o},Ct.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};var Os=Ct,Ih=/\r\n?|\n/g,Fh=/\0/g,Bh=function(t){var o;o=t.src.replace(Ih,`
4877
+ `),o=o.replace(Fh,"�"),t.src=o},Oh=function(t){var o;t.inlineMode?(o=new t.Token("inline","",0),o.content=t.src,o.map=[0,1],o.children=[],t.tokens.push(o)):t.md.block.parse(t.src,t.md,t.env,t.tokens)},Nh=function(t){var o=t.tokens,r,s,n;for(s=0,n=o.length;s<n;s++)r=o[s],r.type==="inline"&&t.md.inline.parse(r.content,t.md,t.env,r.children)},Vh=O.arrayReplaceAt;function Hh(e){return/^<a[>\s]/i.test(e)}function Uh(e){return/^<\/a\s*>/i.test(e)}var jh=function(t){var o,r,s,n,i,a,l,c,u,d,p,h,b,m,w,y,v=t.tokens,k;if(t.md.options.linkify){for(r=0,s=v.length;r<s;r++)if(!(v[r].type!=="inline"||!t.md.linkify.pretest(v[r].content)))for(n=v[r].children,b=0,o=n.length-1;o>=0;o--){if(a=n[o],a.type==="link_close"){for(o--;n[o].level!==a.level&&n[o].type!=="link_open";)o--;continue}if(a.type==="html_inline"&&(Hh(a.content)&&b>0&&b--,Uh(a.content)&&b++),!(b>0)&&a.type==="text"&&t.md.linkify.test(a.content)){for(u=a.content,k=t.md.linkify.match(u),l=[],h=a.level,p=0,k.length>0&&k[0].index===0&&o>0&&n[o-1].type==="text_special"&&(k=k.slice(1)),c=0;c<k.length;c++)m=k[c].url,w=t.md.normalizeLink(m),t.md.validateLink(w)&&(y=k[c].text,k[c].schema?k[c].schema==="mailto:"&&!/^mailto:/i.test(y)?y=t.md.normalizeLinkText("mailto:"+y).replace(/^mailto:/,""):y=t.md.normalizeLinkText(y):y=t.md.normalizeLinkText("http://"+y).replace(/^http:\/\//,""),d=k[c].index,d>p&&(i=new t.Token("text","",0),i.content=u.slice(p,d),i.level=h,l.push(i)),i=new t.Token("link_open","a",1),i.attrs=[["href",w]],i.level=h++,i.markup="linkify",i.info="auto",l.push(i),i=new t.Token("text","",0),i.content=y,i.level=h,l.push(i),i=new t.Token("link_close","a",-1),i.level=--h,i.markup="linkify",i.info="auto",l.push(i),p=k[c].lastIndex);p<u.length&&(i=new t.Token("text","",0),i.content=u.slice(p),i.level=h,l.push(i)),v[r].children=n=Vh(n,o,l)}}}},Aa=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,Gh=/\((c|tm|r)\)/i,Zh=/\((c|tm|r)\)/ig,Wh={c:"©",r:"®",tm:"™"};function Kh(e,t){return Wh[t.toLowerCase()]}function Yh(e){var t,o,r=0;for(t=e.length-1;t>=0;t--)o=e[t],o.type==="text"&&!r&&(o.content=o.content.replace(Zh,Kh)),o.type==="link_open"&&o.info==="auto"&&r--,o.type==="link_close"&&o.info==="auto"&&r++}function Jh(e){var t,o,r=0;for(t=e.length-1;t>=0;t--)o=e[t],o.type==="text"&&!r&&Aa.test(o.content)&&(o.content=o.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),o.type==="link_open"&&o.info==="auto"&&r--,o.type==="link_close"&&o.info==="auto"&&r++}var Qh=function(t){var o;if(t.md.options.typographer)for(o=t.tokens.length-1;o>=0;o--)t.tokens[o].type==="inline"&&(Gh.test(t.tokens[o].content)&&Yh(t.tokens[o].children),Aa.test(t.tokens[o].content)&&Jh(t.tokens[o].children))},Ca=O.isWhiteSpace,$a=O.isPunctChar,Ea=O.isMdAsciiPunct,Xh=/['"]/,Sa=/['"]/g,qa="’";function hr(e,t,o){return e.slice(0,t)+o+e.slice(t+1)}function tp(e,t){var o,r,s,n,i,a,l,c,u,d,p,h,b,m,w,y,v,k,C,$,_;for(C=[],o=0;o<e.length;o++){for(r=e[o],l=e[o].level,v=C.length-1;v>=0&&!(C[v].level<=l);v--);if(C.length=v+1,r.type==="text"){s=r.content,i=0,a=s.length;t:for(;i<a&&(Sa.lastIndex=i,n=Sa.exec(s),!!n);){if(w=y=!0,i=n.index+1,k=n[0]==="'",u=32,n.index-1>=0)u=s.charCodeAt(n.index-1);else for(v=o-1;v>=0&&!(e[v].type==="softbreak"||e[v].type==="hardbreak");v--)if(e[v].content){u=e[v].content.charCodeAt(e[v].content.length-1);break}if(d=32,i<a)d=s.charCodeAt(i);else for(v=o+1;v<e.length&&!(e[v].type==="softbreak"||e[v].type==="hardbreak");v++)if(e[v].content){d=e[v].content.charCodeAt(0);break}if(p=Ea(u)||$a(String.fromCharCode(u)),h=Ea(d)||$a(String.fromCharCode(d)),b=Ca(u),m=Ca(d),m?w=!1:h&&(b||p||(w=!1)),b?y=!1:p&&(m||h||(y=!1)),d===34&&n[0]==='"'&&u>=48&&u<=57&&(y=w=!1),w&&y&&(w=p,y=h),!w&&!y){k&&(r.content=hr(r.content,n.index,qa));continue}if(y){for(v=C.length-1;v>=0&&(c=C[v],!(C[v].level<l));v--)if(c.single===k&&C[v].level===l){c=C[v],k?($=t.md.options.quotes[2],_=t.md.options.quotes[3]):($=t.md.options.quotes[0],_=t.md.options.quotes[1]),r.content=hr(r.content,n.index,_),e[c.token].content=hr(e[c.token].content,c.pos,$),i+=_.length-1,c.token===o&&(i+=$.length-1),s=r.content,a=s.length,C.length=v;continue t}}w?C.push({token:o,pos:n.index,single:k,level:l}):y&&k&&(r.content=hr(r.content,n.index,qa))}}}}var ep=function(t){var o;if(t.md.options.typographer)for(o=t.tokens.length-1;o>=0;o--)t.tokens[o].type!=="inline"||!Xh.test(t.tokens[o].content)||tp(t.tokens[o].children,t)},op=function(t){var o,r,s,n,i,a,l=t.tokens;for(o=0,r=l.length;o<r;o++)if(l[o].type==="inline"){for(s=l[o].children,i=s.length,n=0;n<i;n++)s[n].type==="text_special"&&(s[n].type="text");for(n=a=0;n<i;n++)s[n].type==="text"&&n+1<i&&s[n+1].type==="text"?s[n+1].content=s[n].content+s[n+1].content:(n!==a&&(s[a]=s[n]),a++);n!==a&&(s.length=a)}};function He(e,t,o){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=o,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}He.prototype.attrIndex=function(t){var o,r,s;if(!this.attrs)return-1;for(o=this.attrs,r=0,s=o.length;r<s;r++)if(o[r][0]===t)return r;return-1},He.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]},He.prototype.attrSet=function(t,o){var r=this.attrIndex(t),s=[t,o];r<0?this.attrPush(s):this.attrs[r]=s},He.prototype.attrGet=function(t){var o=this.attrIndex(t),r=null;return o>=0&&(r=this.attrs[o][1]),r},He.prototype.attrJoin=function(t,o){var r=this.attrIndex(t);r<0?this.attrPush([t,o]):this.attrs[r][1]=this.attrs[r][1]+" "+o};var Ns=He,rp=Ns;function Da(e,t,o){this.src=e,this.env=o,this.tokens=[],this.inlineMode=!1,this.md=t}Da.prototype.Token=rp;var sp=Da,np=Os,Vs=[["normalize",Bh],["block",Oh],["inline",Nh],["linkify",jh],["replacements",Qh],["smartquotes",ep],["text_join",op]];function Hs(){this.ruler=new np;for(var e=0;e<Vs.length;e++)this.ruler.push(Vs[e][0],Vs[e][1])}Hs.prototype.process=function(e){var t,o,r;for(r=this.ruler.getRules(""),t=0,o=r.length;t<o;t++)r[t](e)},Hs.prototype.State=sp;var ip=Hs,Us=O.isSpace;function js(e,t){var o=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(o,r)}function Ta(e){var t=[],o=0,r=e.length,s,n=!1,i=0,a="";for(s=e.charCodeAt(o);o<r;)s===124&&(n?(a+=e.substring(i,o-1),i=o):(t.push(a+e.substring(i,o)),a="",i=o+1)),n=s===92,o++,s=e.charCodeAt(o);return t.push(a+e.substring(i)),t}var ap=function(t,o,r,s){var n,i,a,l,c,u,d,p,h,b,m,w,y,v,k,C,$,_;if(o+2>r||(u=o+1,t.sCount[u]<t.blkIndent)||t.sCount[u]-t.blkIndent>=4||(a=t.bMarks[u]+t.tShift[u],a>=t.eMarks[u])||($=t.src.charCodeAt(a++),$!==124&&$!==45&&$!==58)||a>=t.eMarks[u]||(_=t.src.charCodeAt(a++),_!==124&&_!==45&&_!==58&&!Us(_))||$===45&&Us(_))return!1;for(;a<t.eMarks[u];){if(n=t.src.charCodeAt(a),n!==124&&n!==45&&n!==58&&!Us(n))return!1;a++}for(i=js(t,o+1),d=i.split("|"),b=[],l=0;l<d.length;l++){if(m=d[l].trim(),!m){if(l===0||l===d.length-1)continue;return!1}if(!/^:?-+:?$/.test(m))return!1;m.charCodeAt(m.length-1)===58?b.push(m.charCodeAt(0)===58?"center":"right"):m.charCodeAt(0)===58?b.push("left"):b.push("")}if(i=js(t,o).trim(),i.indexOf("|")===-1||t.sCount[o]-t.blkIndent>=4||(d=Ta(i),d.length&&d[0]===""&&d.shift(),d.length&&d[d.length-1]===""&&d.pop(),p=d.length,p===0||p!==b.length))return!1;if(s)return!0;for(v=t.parentType,t.parentType="table",C=t.md.block.ruler.getRules("blockquote"),h=t.push("table_open","table",1),h.map=w=[o,0],h=t.push("thead_open","thead",1),h.map=[o,o+1],h=t.push("tr_open","tr",1),h.map=[o,o+1],l=0;l<d.length;l++)h=t.push("th_open","th",1),b[l]&&(h.attrs=[["style","text-align:"+b[l]]]),h=t.push("inline","",0),h.content=d[l].trim(),h.children=[],h=t.push("th_close","th",-1);for(h=t.push("tr_close","tr",-1),h=t.push("thead_close","thead",-1),u=o+2;u<r&&!(t.sCount[u]<t.blkIndent);u++){for(k=!1,l=0,c=C.length;l<c;l++)if(C[l](t,u,r,!0)){k=!0;break}if(k||(i=js(t,u).trim(),!i)||t.sCount[u]-t.blkIndent>=4)break;for(d=Ta(i),d.length&&d[0]===""&&d.shift(),d.length&&d[d.length-1]===""&&d.pop(),u===o+2&&(h=t.push("tbody_open","tbody",1),h.map=y=[o+2,0]),h=t.push("tr_open","tr",1),h.map=[u,u+1],l=0;l<p;l++)h=t.push("td_open","td",1),b[l]&&(h.attrs=[["style","text-align:"+b[l]]]),h=t.push("inline","",0),h.content=d[l]?d[l].trim():"",h.children=[],h=t.push("td_close","td",-1);h=t.push("tr_close","tr",-1)}return y&&(h=t.push("tbody_close","tbody",-1),y[1]=u),h=t.push("table_close","table",-1),w[1]=u,t.parentType=v,t.line=u,!0},lp=function(t,o,r){var s,n,i;if(t.sCount[o]-t.blkIndent<4)return!1;for(n=s=o+1;s<r;){if(t.isEmpty(s)){s++;continue}if(t.sCount[s]-t.blkIndent>=4){s++,n=s;continue}break}return t.line=n,i=t.push("code_block","code",0),i.content=t.getLines(o,n,4+t.blkIndent,!1)+`
4878
+ `,i.map=[o,t.line],!0},cp=function(t,o,r,s){var n,i,a,l,c,u,d,p=!1,h=t.bMarks[o]+t.tShift[o],b=t.eMarks[o];if(t.sCount[o]-t.blkIndent>=4||h+3>b||(n=t.src.charCodeAt(h),n!==126&&n!==96)||(c=h,h=t.skipChars(h,n),i=h-c,i<3)||(d=t.src.slice(c,h),a=t.src.slice(h,b),n===96&&a.indexOf(String.fromCharCode(n))>=0))return!1;if(s)return!0;for(l=o;l++,!(l>=r||(h=c=t.bMarks[l]+t.tShift[l],b=t.eMarks[l],h<b&&t.sCount[l]<t.blkIndent));)if(t.src.charCodeAt(h)===n&&!(t.sCount[l]-t.blkIndent>=4)&&(h=t.skipChars(h,n),!(h-c<i)&&(h=t.skipSpaces(h),!(h<b)))){p=!0;break}return i=t.sCount[o],t.line=l+(p?1:0),u=t.push("fence","code",0),u.info=a,u.content=t.getLines(o+1,l,i,!0),u.markup=d,u.map=[o,t.line],!0},La=O.isSpace,up=function(t,o,r,s){var n,i,a,l,c,u,d,p,h,b,m,w,y,v,k,C,$,_,D,P,S=t.lineMax,q=t.bMarks[o]+t.tShift[o],I=t.eMarks[o];if(t.sCount[o]-t.blkIndent>=4||t.src.charCodeAt(q++)!==62)return!1;if(s)return!0;for(l=h=t.sCount[o]+1,t.src.charCodeAt(q)===32?(q++,l++,h++,n=!1,C=!0):t.src.charCodeAt(q)===9?(C=!0,(t.bsCount[o]+h)%4===3?(q++,l++,h++,n=!1):n=!0):C=!1,b=[t.bMarks[o]],t.bMarks[o]=q;q<I&&(i=t.src.charCodeAt(q),La(i));){i===9?h+=4-(h+t.bsCount[o]+(n?1:0))%4:h++;q++}for(m=[t.bsCount[o]],t.bsCount[o]=t.sCount[o]+1+(C?1:0),u=q>=I,v=[t.sCount[o]],t.sCount[o]=h-l,k=[t.tShift[o]],t.tShift[o]=q-t.bMarks[o],_=t.md.block.ruler.getRules("blockquote"),y=t.parentType,t.parentType="blockquote",p=o+1;p<r&&(P=t.sCount[p]<t.blkIndent,q=t.bMarks[p]+t.tShift[p],I=t.eMarks[p],!(q>=I));p++){if(t.src.charCodeAt(q++)===62&&!P){for(l=h=t.sCount[p]+1,t.src.charCodeAt(q)===32?(q++,l++,h++,n=!1,C=!0):t.src.charCodeAt(q)===9?(C=!0,(t.bsCount[p]+h)%4===3?(q++,l++,h++,n=!1):n=!0):C=!1,b.push(t.bMarks[p]),t.bMarks[p]=q;q<I&&(i=t.src.charCodeAt(q),La(i));){i===9?h+=4-(h+t.bsCount[p]+(n?1:0))%4:h++;q++}u=q>=I,m.push(t.bsCount[p]),t.bsCount[p]=t.sCount[p]+1+(C?1:0),v.push(t.sCount[p]),t.sCount[p]=h-l,k.push(t.tShift[p]),t.tShift[p]=q-t.bMarks[p];continue}if(u)break;for($=!1,a=0,c=_.length;a<c;a++)if(_[a](t,p,r,!0)){$=!0;break}if($){t.lineMax=p,t.blkIndent!==0&&(b.push(t.bMarks[p]),m.push(t.bsCount[p]),k.push(t.tShift[p]),v.push(t.sCount[p]),t.sCount[p]-=t.blkIndent);break}b.push(t.bMarks[p]),m.push(t.bsCount[p]),k.push(t.tShift[p]),v.push(t.sCount[p]),t.sCount[p]=-1}for(w=t.blkIndent,t.blkIndent=0,D=t.push("blockquote_open","blockquote",1),D.markup=">",D.map=d=[o,0],t.md.block.tokenize(t,o,p),D=t.push("blockquote_close","blockquote",-1),D.markup=">",t.lineMax=S,t.parentType=y,d[1]=t.line,a=0;a<k.length;a++)t.bMarks[a+o]=b[a],t.tShift[a+o]=k[a],t.sCount[a+o]=v[a],t.bsCount[a+o]=m[a];return t.blkIndent=w,!0},dp=O.isSpace,hp=function(t,o,r,s){var n,i,a,l,c=t.bMarks[o]+t.tShift[o],u=t.eMarks[o];if(t.sCount[o]-t.blkIndent>=4||(n=t.src.charCodeAt(c++),n!==42&&n!==45&&n!==95))return!1;for(i=1;c<u;){if(a=t.src.charCodeAt(c++),a!==n&&!dp(a))return!1;a===n&&i++}return i<3?!1:(s||(t.line=o+1,l=t.push("hr","hr",0),l.map=[o,t.line],l.markup=Array(i+1).join(String.fromCharCode(n))),!0)},za=O.isSpace;function Ra(e,t){var o,r,s,n;return r=e.bMarks[t]+e.tShift[t],s=e.eMarks[t],o=e.src.charCodeAt(r++),o!==42&&o!==45&&o!==43||r<s&&(n=e.src.charCodeAt(r),!za(n))?-1:r}function Pa(e,t){var o,r=e.bMarks[t]+e.tShift[t],s=r,n=e.eMarks[t];if(s+1>=n||(o=e.src.charCodeAt(s++),o<48||o>57))return-1;for(;;){if(s>=n)return-1;if(o=e.src.charCodeAt(s++),o>=48&&o<=57){if(s-r>=10)return-1;continue}if(o===41||o===46)break;return-1}return s<n&&(o=e.src.charCodeAt(s),!za(o))?-1:s}function pp(e,t){var o,r,s=e.level+2;for(o=t+2,r=e.tokens.length-2;o<r;o++)e.tokens[o].level===s&&e.tokens[o].type==="paragraph_open"&&(e.tokens[o+2].hidden=!0,e.tokens[o].hidden=!0,o+=2)}var fp=function(t,o,r,s){var n,i,a,l,c,u,d,p,h,b,m,w,y,v,k,C,$,_,D,P,S,q,I,W,yt,x,F,T,X=!1,zr=!0;if(t.sCount[o]-t.blkIndent>=4||t.listIndent>=0&&t.sCount[o]-t.listIndent>=4&&t.sCount[o]<t.blkIndent)return!1;if(s&&t.parentType==="paragraph"&&t.sCount[o]>=t.blkIndent&&(X=!0),(I=Pa(t,o))>=0){if(d=!0,yt=t.bMarks[o]+t.tShift[o],y=Number(t.src.slice(yt,I-1)),X&&y!==1)return!1}else if((I=Ra(t,o))>=0)d=!1;else return!1;if(X&&t.skipSpaces(I)>=t.eMarks[o])return!1;if(w=t.src.charCodeAt(I-1),s)return!0;for(m=t.tokens.length,d?(T=t.push("ordered_list_open","ol",1),y!==1&&(T.attrs=[["start",y]])):T=t.push("bullet_list_open","ul",1),T.map=b=[o,0],T.markup=String.fromCharCode(w),k=o,W=!1,F=t.md.block.ruler.getRules("list"),_=t.parentType,t.parentType="list";k<r;){for(q=I,v=t.eMarks[k],u=C=t.sCount[k]+I-(t.bMarks[o]+t.tShift[o]);q<v;){if(n=t.src.charCodeAt(q),n===9)C+=4-(C+t.bsCount[k])%4;else if(n===32)C++;else break;q++}if(i=q,i>=v?c=1:c=C-u,c>4&&(c=1),l=u+c,T=t.push("list_item_open","li",1),T.markup=String.fromCharCode(w),T.map=p=[o,0],d&&(T.info=t.src.slice(yt,I-1)),S=t.tight,P=t.tShift[o],D=t.sCount[o],$=t.listIndent,t.listIndent=t.blkIndent,t.blkIndent=l,t.tight=!0,t.tShift[o]=i-t.bMarks[o],t.sCount[o]=C,i>=v&&t.isEmpty(o+1)?t.line=Math.min(t.line+2,r):t.md.block.tokenize(t,o,r,!0),(!t.tight||W)&&(zr=!1),W=t.line-o>1&&t.isEmpty(t.line-1),t.blkIndent=t.listIndent,t.listIndent=$,t.tShift[o]=P,t.sCount[o]=D,t.tight=S,T=t.push("list_item_close","li",-1),T.markup=String.fromCharCode(w),k=o=t.line,p[1]=k,i=t.bMarks[o],k>=r||t.sCount[k]<t.blkIndent||t.sCount[o]-t.blkIndent>=4)break;for(x=!1,a=0,h=F.length;a<h;a++)if(F[a](t,k,r,!0)){x=!0;break}if(x)break;if(d){if(I=Pa(t,k),I<0)break;yt=t.bMarks[k]+t.tShift[k]}else if(I=Ra(t,k),I<0)break;if(w!==t.src.charCodeAt(I-1))break}return d?T=t.push("ordered_list_close","ol",-1):T=t.push("bullet_list_close","ul",-1),T.markup=String.fromCharCode(w),b[1]=k,t.line=k,t.parentType=_,zr&&pp(t,m),!0},gp=O.normalizeReference,pr=O.isSpace,bp=function(t,o,r,s){var n,i,a,l,c,u,d,p,h,b,m,w,y,v,k,C,$=0,_=t.bMarks[o]+t.tShift[o],D=t.eMarks[o],P=o+1;if(t.sCount[o]-t.blkIndent>=4||t.src.charCodeAt(_)!==91)return!1;for(;++_<D;)if(t.src.charCodeAt(_)===93&&t.src.charCodeAt(_-1)!==92){if(_+1===D||t.src.charCodeAt(_+1)!==58)return!1;break}for(l=t.lineMax,k=t.md.block.ruler.getRules("reference"),b=t.parentType,t.parentType="reference";P<l&&!t.isEmpty(P);P++)if(!(t.sCount[P]-t.blkIndent>3)&&!(t.sCount[P]<0)){for(v=!1,u=0,d=k.length;u<d;u++)if(k[u](t,P,l,!0)){v=!0;break}if(v)break}for(y=t.getLines(o,P,t.blkIndent,!1).trim(),D=y.length,_=1;_<D;_++){if(n=y.charCodeAt(_),n===91)return!1;if(n===93){h=_;break}else n===10?$++:n===92&&(_++,_<D&&y.charCodeAt(_)===10&&$++)}if(h<0||y.charCodeAt(h+1)!==58)return!1;for(_=h+2;_<D;_++)if(n=y.charCodeAt(_),n===10)$++;else if(!pr(n))break;if(m=t.md.helpers.parseLinkDestination(y,_,D),!m.ok||(c=t.md.normalizeLink(m.str),!t.md.validateLink(c)))return!1;for(_=m.pos,$+=m.lines,i=_,a=$,w=_;_<D;_++)if(n=y.charCodeAt(_),n===10)$++;else if(!pr(n))break;for(m=t.md.helpers.parseLinkTitle(y,_,D),_<D&&w!==_&&m.ok?(C=m.str,_=m.pos,$+=m.lines):(C="",_=i,$=a);_<D&&(n=y.charCodeAt(_),!!pr(n));)_++;if(_<D&&y.charCodeAt(_)!==10&&C)for(C="",_=i,$=a;_<D&&(n=y.charCodeAt(_),!!pr(n));)_++;return _<D&&y.charCodeAt(_)!==10||(p=gp(y.slice(1,h)),!p)?!1:(s||(typeof t.env.references>"u"&&(t.env.references={}),typeof t.env.references[p]>"u"&&(t.env.references[p]={title:C,href:c}),t.parentType=b,t.line=o+$+1),!0)},mp=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],fr={},vp="[a-zA-Z_:][a-zA-Z0-9:._-]*",yp="[^\"'=<>`\\x00-\\x20]+",wp="'[^']*'",_p='"[^"]*"',xp="(?:"+yp+"|"+wp+"|"+_p+")",kp="(?:\\s+"+vp+"(?:\\s*=\\s*"+xp+")?)",Ma="<[A-Za-z][A-Za-z0-9\\-]*"+kp+"*\\s*\\/?>",Ia="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Ap="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",Cp="<[?][\\s\\S]*?[?]>",$p="<![A-Z]+\\s+[^>]*>",Ep="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",Sp=new RegExp("^(?:"+Ma+"|"+Ia+"|"+Ap+"|"+Cp+"|"+$p+"|"+Ep+")"),qp=new RegExp("^(?:"+Ma+"|"+Ia+")");fr.HTML_TAG_RE=Sp,fr.HTML_OPEN_CLOSE_TAG_RE=qp;var Dp=mp,Tp=fr.HTML_OPEN_CLOSE_TAG_RE,Ue=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+Dp.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(Tp.source+"\\s*$"),/^$/,!1]],Lp=function(t,o,r,s){var n,i,a,l,c=t.bMarks[o]+t.tShift[o],u=t.eMarks[o];if(t.sCount[o]-t.blkIndent>=4||!t.md.options.html||t.src.charCodeAt(c)!==60)return!1;for(l=t.src.slice(c,u),n=0;n<Ue.length&&!Ue[n][0].test(l);n++);if(n===Ue.length)return!1;if(s)return Ue[n][2];if(i=o+1,!Ue[n][1].test(l)){for(;i<r&&!(t.sCount[i]<t.blkIndent);i++)if(c=t.bMarks[i]+t.tShift[i],u=t.eMarks[i],l=t.src.slice(c,u),Ue[n][1].test(l)){l.length!==0&&i++;break}}return t.line=i,a=t.push("html_block","",0),a.map=[o,i],a.content=t.getLines(o,i,t.blkIndent,!0),!0},Fa=O.isSpace,zp=function(t,o,r,s){var n,i,a,l,c=t.bMarks[o]+t.tShift[o],u=t.eMarks[o];if(t.sCount[o]-t.blkIndent>=4||(n=t.src.charCodeAt(c),n!==35||c>=u))return!1;for(i=1,n=t.src.charCodeAt(++c);n===35&&c<u&&i<=6;)i++,n=t.src.charCodeAt(++c);return i>6||c<u&&!Fa(n)?!1:(s||(u=t.skipSpacesBack(u,c),a=t.skipCharsBack(u,35,c),a>c&&Fa(t.src.charCodeAt(a-1))&&(u=a),t.line=o+1,l=t.push("heading_open","h"+String(i),1),l.markup="########".slice(0,i),l.map=[o,t.line],l=t.push("inline","",0),l.content=t.src.slice(c,u).trim(),l.map=[o,t.line],l.children=[],l=t.push("heading_close","h"+String(i),-1),l.markup="########".slice(0,i)),!0)},Rp=function(t,o,r){var s,n,i,a,l,c,u,d,p,h=o+1,b,m=t.md.block.ruler.getRules("paragraph");if(t.sCount[o]-t.blkIndent>=4)return!1;for(b=t.parentType,t.parentType="paragraph";h<r&&!t.isEmpty(h);h++)if(!(t.sCount[h]-t.blkIndent>3)){if(t.sCount[h]>=t.blkIndent&&(c=t.bMarks[h]+t.tShift[h],u=t.eMarks[h],c<u&&(p=t.src.charCodeAt(c),(p===45||p===61)&&(c=t.skipChars(c,p),c=t.skipSpaces(c),c>=u)))){d=p===61?1:2;break}if(!(t.sCount[h]<0)){for(n=!1,i=0,a=m.length;i<a;i++)if(m[i](t,h,r,!0)){n=!0;break}if(n)break}}return d?(s=t.getLines(o,h,t.blkIndent,!1).trim(),t.line=h+1,l=t.push("heading_open","h"+String(d),1),l.markup=String.fromCharCode(p),l.map=[o,t.line],l=t.push("inline","",0),l.content=s,l.map=[o,t.line-1],l.children=[],l=t.push("heading_close","h"+String(d),-1),l.markup=String.fromCharCode(p),t.parentType=b,!0):!1},Pp=function(t,o){var r,s,n,i,a,l,c=o+1,u=t.md.block.ruler.getRules("paragraph"),d=t.lineMax;for(l=t.parentType,t.parentType="paragraph";c<d&&!t.isEmpty(c);c++)if(!(t.sCount[c]-t.blkIndent>3)&&!(t.sCount[c]<0)){for(s=!1,n=0,i=u.length;n<i;n++)if(u[n](t,c,d,!0)){s=!0;break}if(s)break}return r=t.getLines(o,c,t.blkIndent,!1).trim(),t.line=c,a=t.push("paragraph_open","p",1),a.map=[o,t.line],a=t.push("inline","",0),a.content=r,a.map=[o,t.line],a.children=[],a=t.push("paragraph_close","p",-1),t.parentType=l,!0},Ba=Ns,gr=O.isSpace;function Pt(e,t,o,r){var s,n,i,a,l,c,u,d;for(this.src=e,this.md=t,this.env=o,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",n=this.src,d=!1,i=a=c=u=0,l=n.length;a<l;a++){if(s=n.charCodeAt(a),!d)if(gr(s)){c++,s===9?u+=4-u%4:u++;continue}else d=!0;(s===10||a===l-1)&&(s!==10&&a++,this.bMarks.push(i),this.eMarks.push(a),this.tShift.push(c),this.sCount.push(u),this.bsCount.push(0),d=!1,c=0,u=0,i=a+1)}this.bMarks.push(n.length),this.eMarks.push(n.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}Pt.prototype.push=function(e,t,o){var r=new Ba(e,t,o);return r.block=!0,o<0&&this.level--,r.level=this.level,o>0&&this.level++,this.tokens.push(r),r},Pt.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]},Pt.prototype.skipEmptyLines=function(t){for(var o=this.lineMax;t<o&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t},Pt.prototype.skipSpaces=function(t){for(var o,r=this.src.length;t<r&&(o=this.src.charCodeAt(t),!!gr(o));t++);return t},Pt.prototype.skipSpacesBack=function(t,o){if(t<=o)return t;for(;t>o;)if(!gr(this.src.charCodeAt(--t)))return t+1;return t},Pt.prototype.skipChars=function(t,o){for(var r=this.src.length;t<r&&this.src.charCodeAt(t)===o;t++);return t},Pt.prototype.skipCharsBack=function(t,o,r){if(t<=r)return t;for(;t>r;)if(o!==this.src.charCodeAt(--t))return t+1;return t},Pt.prototype.getLines=function(t,o,r,s){var n,i,a,l,c,u,d,p=t;if(t>=o)return"";for(u=new Array(o-t),n=0;p<o;p++,n++){for(i=0,d=l=this.bMarks[p],p+1<o||s?c=this.eMarks[p]+1:c=this.eMarks[p];l<c&&i<r;){if(a=this.src.charCodeAt(l),gr(a))a===9?i+=4-(i+this.bsCount[p])%4:i++;else if(l-d<this.tShift[p])i++;else break;l++}i>r?u[n]=new Array(i-r+1).join(" ")+this.src.slice(l,c):u[n]=this.src.slice(l,c)}return u.join("")},Pt.prototype.Token=Ba;var Mp=Pt,Ip=Os,br=[["table",ap,["paragraph","reference"]],["code",lp],["fence",cp,["paragraph","reference","blockquote","list"]],["blockquote",up,["paragraph","reference","blockquote","list"]],["hr",hp,["paragraph","reference","blockquote","list"]],["list",fp,["paragraph","reference","blockquote"]],["reference",bp],["html_block",Lp,["paragraph","reference","blockquote"]],["heading",zp,["paragraph","reference","blockquote"]],["lheading",Rp],["paragraph",Pp]];function mr(){this.ruler=new Ip;for(var e=0;e<br.length;e++)this.ruler.push(br[e][0],br[e][1],{alt:(br[e][2]||[]).slice()})}mr.prototype.tokenize=function(e,t,o){for(var r,s,n=this.ruler.getRules(""),i=n.length,a=t,l=!1,c=e.md.options.maxNesting;a<o&&(e.line=a=e.skipEmptyLines(a),!(a>=o||e.sCount[a]<e.blkIndent));){if(e.level>=c){e.line=o;break}for(s=0;s<i&&(r=n[s](e,a,o,!1),!r);s++);e.tight=!l,e.isEmpty(e.line-1)&&(l=!0),a=e.line,a<o&&e.isEmpty(a)&&(l=!0,a++,e.line=a)}},mr.prototype.parse=function(e,t,o,r){var s;e&&(s=new this.State(e,t,o,r),this.tokenize(s,s.line,s.lineMax))},mr.prototype.State=Mp;var Fp=mr;function Bp(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}for(var Op=function(t,o){for(var r=t.pos;r<t.posMax&&!Bp(t.src.charCodeAt(r));)r++;return r===t.pos?!1:(o||(t.pending+=t.src.slice(t.pos,r)),t.pos=r,!0)},Np=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i,Vp=function(t,o){var r,s,n,i,a,l,c,u;return!t.md.options.linkify||t.linkLevel>0||(r=t.pos,s=t.posMax,r+3>s)||t.src.charCodeAt(r)!==58||t.src.charCodeAt(r+1)!==47||t.src.charCodeAt(r+2)!==47||(n=t.pending.match(Np),!n)||(i=n[1],a=t.md.linkify.matchAtStart(t.src.slice(r-i.length)),!a)||(l=a.url,l=l.replace(/\*+$/,""),c=t.md.normalizeLink(l),!t.md.validateLink(c))?!1:(o||(t.pending=t.pending.slice(0,-i.length),u=t.push("link_open","a",1),u.attrs=[["href",c]],u.markup="linkify",u.info="auto",u=t.push("text","",0),u.content=t.md.normalizeLinkText(l),u=t.push("link_close","a",-1),u.markup="linkify",u.info="auto"),t.pos+=l.length-i.length,!0)},Hp=O.isSpace,Up=function(t,o){var r,s,n,i=t.pos;if(t.src.charCodeAt(i)!==10)return!1;if(r=t.pending.length-1,s=t.posMax,!o)if(r>=0&&t.pending.charCodeAt(r)===32)if(r>=1&&t.pending.charCodeAt(r-1)===32){for(n=r-1;n>=1&&t.pending.charCodeAt(n-1)===32;)n--;t.pending=t.pending.slice(0,n),t.push("hardbreak","br",0)}else t.pending=t.pending.slice(0,-1),t.push("softbreak","br",0);else t.push("softbreak","br",0);for(i++;i<s&&Hp(t.src.charCodeAt(i));)i++;return t.pos=i,!0},jp=O.isSpace,Gs=[],Oa=0;Oa<256;Oa++)Gs.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){Gs[e.charCodeAt(0)]=1});var Gp=function(t,o){var r,s,n,i,a,l=t.pos,c=t.posMax;if(t.src.charCodeAt(l)!==92||(l++,l>=c))return!1;if(r=t.src.charCodeAt(l),r===10){for(o||t.push("hardbreak","br",0),l++;l<c&&(r=t.src.charCodeAt(l),!!jp(r));)l++;return t.pos=l,!0}return i=t.src[l],r>=55296&&r<=56319&&l+1<c&&(s=t.src.charCodeAt(l+1),s>=56320&&s<=57343&&(i+=t.src[l+1],l++)),n="\\"+i,o||(a=t.push("text_special","",0),r<256&&Gs[r]!==0?a.content=i:a.content=n,a.markup=n,a.info="escape"),t.pos=l+1,!0},Zp=function(t,o){var r,s,n,i,a,l,c,u,d=t.pos,p=t.src.charCodeAt(d);if(p!==96)return!1;for(r=d,d++,s=t.posMax;d<s&&t.src.charCodeAt(d)===96;)d++;if(n=t.src.slice(r,d),c=n.length,t.backticksScanned&&(t.backticks[c]||0)<=r)return o||(t.pending+=n),t.pos+=c,!0;for(a=l=d;(a=t.src.indexOf("`",l))!==-1;){for(l=a+1;l<s&&t.src.charCodeAt(l)===96;)l++;if(u=l-a,u===c)return o||(i=t.push("code_inline","code",0),i.markup=n,i.content=t.src.slice(d,a).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),t.pos=l,!0;t.backticks[u]=a}return t.backticksScanned=!0,o||(t.pending+=n),t.pos+=c,!0},vr={};vr.tokenize=function(t,o){var r,s,n,i,a,l=t.pos,c=t.src.charCodeAt(l);if(o||c!==126||(s=t.scanDelims(t.pos,!0),i=s.length,a=String.fromCharCode(c),i<2))return!1;for(i%2&&(n=t.push("text","",0),n.content=a,i--),r=0;r<i;r+=2)n=t.push("text","",0),n.content=a+a,t.delimiters.push({marker:c,length:0,token:t.tokens.length-1,end:-1,open:s.can_open,close:s.can_close});return t.pos+=s.length,!0};function Na(e,t){var o,r,s,n,i,a=[],l=t.length;for(o=0;o<l;o++)s=t[o],s.marker===126&&s.end!==-1&&(n=t[s.end],i=e.tokens[s.token],i.type="s_open",i.tag="s",i.nesting=1,i.markup="~~",i.content="",i=e.tokens[n.token],i.type="s_close",i.tag="s",i.nesting=-1,i.markup="~~",i.content="",e.tokens[n.token-1].type==="text"&&e.tokens[n.token-1].content==="~"&&a.push(n.token-1));for(;a.length;){for(o=a.pop(),r=o+1;r<e.tokens.length&&e.tokens[r].type==="s_close";)r++;r--,o!==r&&(i=e.tokens[r],e.tokens[r]=e.tokens[o],e.tokens[o]=i)}}vr.postProcess=function(t){var o,r=t.tokens_meta,s=t.tokens_meta.length;for(Na(t,t.delimiters),o=0;o<s;o++)r[o]&&r[o].delimiters&&Na(t,r[o].delimiters)};var yr={};yr.tokenize=function(t,o){var r,s,n,i=t.pos,a=t.src.charCodeAt(i);if(o||a!==95&&a!==42)return!1;for(s=t.scanDelims(t.pos,a===42),r=0;r<s.length;r++)n=t.push("text","",0),n.content=String.fromCharCode(a),t.delimiters.push({marker:a,length:s.length,token:t.tokens.length-1,end:-1,open:s.can_open,close:s.can_close});return t.pos+=s.length,!0};function Va(e,t){var o,r,s,n,i,a,l=t.length;for(o=l-1;o>=0;o--)r=t[o],!(r.marker!==95&&r.marker!==42)&&r.end!==-1&&(s=t[r.end],a=o>0&&t[o-1].end===r.end+1&&t[o-1].marker===r.marker&&t[o-1].token===r.token-1&&t[r.end+1].token===s.token+1,i=String.fromCharCode(r.marker),n=e.tokens[r.token],n.type=a?"strong_open":"em_open",n.tag=a?"strong":"em",n.nesting=1,n.markup=a?i+i:i,n.content="",n=e.tokens[s.token],n.type=a?"strong_close":"em_close",n.tag=a?"strong":"em",n.nesting=-1,n.markup=a?i+i:i,n.content="",a&&(e.tokens[t[o-1].token].content="",e.tokens[t[r.end+1].token].content="",o--))}yr.postProcess=function(t){var o,r=t.tokens_meta,s=t.tokens_meta.length;for(Va(t,t.delimiters),o=0;o<s;o++)r[o]&&r[o].delimiters&&Va(t,r[o].delimiters)};var Wp=O.normalizeReference,Zs=O.isSpace,Kp=function(t,o){var r,s,n,i,a,l,c,u,d,p="",h="",b=t.pos,m=t.posMax,w=t.pos,y=!0;if(t.src.charCodeAt(t.pos)!==91||(a=t.pos+1,i=t.md.helpers.parseLinkLabel(t,t.pos,!0),i<0))return!1;if(l=i+1,l<m&&t.src.charCodeAt(l)===40){for(y=!1,l++;l<m&&(s=t.src.charCodeAt(l),!(!Zs(s)&&s!==10));l++);if(l>=m)return!1;if(w=l,c=t.md.helpers.parseLinkDestination(t.src,l,t.posMax),c.ok){for(p=t.md.normalizeLink(c.str),t.md.validateLink(p)?l=c.pos:p="",w=l;l<m&&(s=t.src.charCodeAt(l),!(!Zs(s)&&s!==10));l++);if(c=t.md.helpers.parseLinkTitle(t.src,l,t.posMax),l<m&&w!==l&&c.ok)for(h=c.str,l=c.pos;l<m&&(s=t.src.charCodeAt(l),!(!Zs(s)&&s!==10));l++);}(l>=m||t.src.charCodeAt(l)!==41)&&(y=!0),l++}if(y){if(typeof t.env.references>"u")return!1;if(l<m&&t.src.charCodeAt(l)===91?(w=l+1,l=t.md.helpers.parseLinkLabel(t,l),l>=0?n=t.src.slice(w,l++):l=i+1):l=i+1,n||(n=t.src.slice(a,i)),u=t.env.references[Wp(n)],!u)return t.pos=b,!1;p=u.href,h=u.title}return o||(t.pos=a,t.posMax=i,d=t.push("link_open","a",1),d.attrs=r=[["href",p]],h&&r.push(["title",h]),t.linkLevel++,t.md.inline.tokenize(t),t.linkLevel--,d=t.push("link_close","a",-1)),t.pos=l,t.posMax=m,!0},Yp=O.normalizeReference,Ws=O.isSpace,Jp=function(t,o){var r,s,n,i,a,l,c,u,d,p,h,b,m,w="",y=t.pos,v=t.posMax;if(t.src.charCodeAt(t.pos)!==33||t.src.charCodeAt(t.pos+1)!==91||(l=t.pos+2,a=t.md.helpers.parseLinkLabel(t,t.pos+1,!1),a<0))return!1;if(c=a+1,c<v&&t.src.charCodeAt(c)===40){for(c++;c<v&&(s=t.src.charCodeAt(c),!(!Ws(s)&&s!==10));c++);if(c>=v)return!1;for(m=c,d=t.md.helpers.parseLinkDestination(t.src,c,t.posMax),d.ok&&(w=t.md.normalizeLink(d.str),t.md.validateLink(w)?c=d.pos:w=""),m=c;c<v&&(s=t.src.charCodeAt(c),!(!Ws(s)&&s!==10));c++);if(d=t.md.helpers.parseLinkTitle(t.src,c,t.posMax),c<v&&m!==c&&d.ok)for(p=d.str,c=d.pos;c<v&&(s=t.src.charCodeAt(c),!(!Ws(s)&&s!==10));c++);else p="";if(c>=v||t.src.charCodeAt(c)!==41)return t.pos=y,!1;c++}else{if(typeof t.env.references>"u")return!1;if(c<v&&t.src.charCodeAt(c)===91?(m=c+1,c=t.md.helpers.parseLinkLabel(t,c),c>=0?i=t.src.slice(m,c++):c=a+1):c=a+1,i||(i=t.src.slice(l,a)),u=t.env.references[Yp(i)],!u)return t.pos=y,!1;w=u.href,p=u.title}return o||(n=t.src.slice(l,a),t.md.inline.parse(n,t.md,t.env,b=[]),h=t.push("image","img",0),h.attrs=r=[["src",w],["alt",""]],h.children=b,h.content=n,p&&r.push(["title",p])),t.pos=c,t.posMax=v,!0},Qp=/^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,Xp=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/,tf=function(t,o){var r,s,n,i,a,l,c=t.pos;if(t.src.charCodeAt(c)!==60)return!1;for(a=t.pos,l=t.posMax;;){if(++c>=l||(i=t.src.charCodeAt(c),i===60))return!1;if(i===62)break}return r=t.src.slice(a+1,c),Xp.test(r)?(s=t.md.normalizeLink(r),t.md.validateLink(s)?(o||(n=t.push("link_open","a",1),n.attrs=[["href",s]],n.markup="autolink",n.info="auto",n=t.push("text","",0),n.content=t.md.normalizeLinkText(r),n=t.push("link_close","a",-1),n.markup="autolink",n.info="auto"),t.pos+=r.length+2,!0):!1):Qp.test(r)?(s=t.md.normalizeLink("mailto:"+r),t.md.validateLink(s)?(o||(n=t.push("link_open","a",1),n.attrs=[["href",s]],n.markup="autolink",n.info="auto",n=t.push("text","",0),n.content=t.md.normalizeLinkText(r),n=t.push("link_close","a",-1),n.markup="autolink",n.info="auto"),t.pos+=r.length+2,!0):!1):!1},ef=fr.HTML_TAG_RE;function of(e){return/^<a[>\s]/i.test(e)}function rf(e){return/^<\/a\s*>/i.test(e)}function sf(e){var t=e|32;return t>=97&&t<=122}var nf=function(t,o){var r,s,n,i,a=t.pos;return!t.md.options.html||(n=t.posMax,t.src.charCodeAt(a)!==60||a+2>=n)||(r=t.src.charCodeAt(a+1),r!==33&&r!==63&&r!==47&&!sf(r))||(s=t.src.slice(a).match(ef),!s)?!1:(o||(i=t.push("html_inline","",0),i.content=t.src.slice(a,a+s[0].length),of(i.content)&&t.linkLevel++,rf(i.content)&&t.linkLevel--),t.pos+=s[0].length,!0)},Ha=aa,af=O.has,lf=O.isValidEntityCode,Ua=O.fromCodePoint,cf=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,uf=/^&([a-z][a-z0-9]{1,31});/i,df=function(t,o){var r,s,n,i,a=t.pos,l=t.posMax;if(t.src.charCodeAt(a)!==38||a+1>=l)return!1;if(r=t.src.charCodeAt(a+1),r===35){if(n=t.src.slice(a).match(cf),n)return o||(s=n[1][0].toLowerCase()==="x"?parseInt(n[1].slice(1),16):parseInt(n[1],10),i=t.push("text_special","",0),i.content=lf(s)?Ua(s):Ua(65533),i.markup=n[0],i.info="entity"),t.pos+=n[0].length,!0}else if(n=t.src.slice(a).match(uf),n&&af(Ha,n[1]))return o||(i=t.push("text_special","",0),i.content=Ha[n[1]],i.markup=n[0],i.info="entity"),t.pos+=n[0].length,!0;return!1};function ja(e,t){var o,r,s,n,i,a,l,c,u={},d=t.length;if(d){var p=0,h=-2,b=[];for(o=0;o<d;o++)if(s=t[o],b.push(0),(t[p].marker!==s.marker||h!==s.token-1)&&(p=o),h=s.token,s.length=s.length||0,!!s.close){for(u.hasOwnProperty(s.marker)||(u[s.marker]=[-1,-1,-1,-1,-1,-1]),i=u[s.marker][(s.open?3:0)+s.length%3],r=p-b[p]-1,a=r;r>i;r-=b[r]+1)if(n=t[r],n.marker===s.marker&&n.open&&n.end<0&&(l=!1,(n.close||s.open)&&(n.length+s.length)%3===0&&(n.length%3!==0||s.length%3!==0)&&(l=!0),!l)){c=r>0&&!t[r-1].open?b[r-1]+1:0,b[o]=o-r+c,b[r]=c,s.open=!1,n.end=o,n.close=!1,a=-1,h=-2;break}a!==-1&&(u[s.marker][(s.open?3:0)+(s.length||0)%3]=a)}}}var hf=function(t){var o,r=t.tokens_meta,s=t.tokens_meta.length;for(ja(t,t.delimiters),o=0;o<s;o++)r[o]&&r[o].delimiters&&ja(t,r[o].delimiters)},pf=function(t){var o,r,s=0,n=t.tokens,i=t.tokens.length;for(o=r=0;o<i;o++)n[o].nesting<0&&s--,n[o].level=s,n[o].nesting>0&&s++,n[o].type==="text"&&o+1<i&&n[o+1].type==="text"?n[o+1].content=n[o].content+n[o+1].content:(o!==r&&(n[r]=n[o]),r++);o!==r&&(n.length=r)},Ks=Ns,Ga=O.isWhiteSpace,Za=O.isPunctChar,Wa=O.isMdAsciiPunct;function qo(e,t,o,r){this.src=e,this.env=o,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}qo.prototype.pushPending=function(){var e=new Ks("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},qo.prototype.push=function(e,t,o){this.pending&&this.pushPending();var r=new Ks(e,t,o),s=null;return o<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,o>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],s={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(s),r},qo.prototype.scanDelims=function(e,t){var o=e,r,s,n,i,a,l,c,u,d,p=!0,h=!0,b=this.posMax,m=this.src.charCodeAt(e);for(r=e>0?this.src.charCodeAt(e-1):32;o<b&&this.src.charCodeAt(o)===m;)o++;return n=o-e,s=o<b?this.src.charCodeAt(o):32,c=Wa(r)||Za(String.fromCharCode(r)),d=Wa(s)||Za(String.fromCharCode(s)),l=Ga(r),u=Ga(s),u?p=!1:d&&(l||c||(p=!1)),l?h=!1:c&&(u||d||(h=!1)),t?(i=p,a=h):(i=p&&(!h||c),a=h&&(!p||d)),{can_open:i,can_close:a,length:n}},qo.prototype.Token=Ks;var ff=qo,Ka=Os,Ys=[["text",Op],["linkify",Vp],["newline",Up],["escape",Gp],["backticks",Zp],["strikethrough",vr.tokenize],["emphasis",yr.tokenize],["link",Kp],["image",Jp],["autolink",tf],["html_inline",nf],["entity",df]],Js=[["balance_pairs",hf],["strikethrough",vr.postProcess],["emphasis",yr.postProcess],["fragments_join",pf]];function Do(){var e;for(this.ruler=new Ka,e=0;e<Ys.length;e++)this.ruler.push(Ys[e][0],Ys[e][1]);for(this.ruler2=new Ka,e=0;e<Js.length;e++)this.ruler2.push(Js[e][0],Js[e][1])}Do.prototype.skipToken=function(e){var t,o,r=e.pos,s=this.ruler.getRules(""),n=s.length,i=e.md.options.maxNesting,a=e.cache;if(typeof a[r]<"u"){e.pos=a[r];return}if(e.level<i)for(o=0;o<n&&(e.level++,t=s[o](e,!0),e.level--,!t);o++);else e.pos=e.posMax;t||e.pos++,a[r]=e.pos},Do.prototype.tokenize=function(e){for(var t,o,r=this.ruler.getRules(""),s=r.length,n=e.posMax,i=e.md.options.maxNesting;e.pos<n;){if(e.level<i)for(o=0;o<s&&(t=r[o](e,!1),!t);o++);if(t){if(e.pos>=n)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},Do.prototype.parse=function(e,t,o,r){var s,n,i,a=new this.State(e,t,o,r);for(this.tokenize(a),n=this.ruler2.getRules(""),i=n.length,s=0;s<i;s++)n[s](a)},Do.prototype.State=ff;var gf=Do,Qs,Ya;function bf(){return Ya||(Ya=1,Qs=function(e){var t={};e=e||{},t.src_Any=ba().source,t.src_Cc=va().source,t.src_Z=_a().source,t.src_P=Ps.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");var o="[><|]";return t.src_pseudo_letter="(?:(?!"+o+"|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+o+"|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+o+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+o+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}),Qs}function Xs(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach(function(o){o&&Object.keys(o).forEach(function(r){e[r]=o[r]})}),e}function wr(e){return Object.prototype.toString.call(e)}function mf(e){return wr(e)==="[object String]"}function vf(e){return wr(e)==="[object Object]"}function yf(e){return wr(e)==="[object RegExp]"}function Ja(e){return wr(e)==="[object Function]"}function wf(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var Qa={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function _f(e){return Object.keys(e||{}).reduce(function(t,o){return t||Qa.hasOwnProperty(o)},!1)}var xf={"http:":{validate:function(e,t,o){var r=e.slice(t);return o.re.http||(o.re.http=new RegExp("^\\/\\/"+o.re.src_auth+o.re.src_host_port_strict+o.re.src_path,"i")),o.re.http.test(r)?r.match(o.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,o){var r=e.slice(t);return o.re.no_http||(o.re.no_http=new RegExp("^"+o.re.src_auth+"(?:localhost|(?:(?:"+o.re.src_domain+")\\.)+"+o.re.src_domain_root+")"+o.re.src_port+o.re.src_host_terminator+o.re.src_path,"i")),o.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(o.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,o){var r=e.slice(t);return o.re.mailto||(o.re.mailto=new RegExp("^"+o.re.src_email_name+"@"+o.re.src_host_strict,"i")),o.re.mailto.test(r)?r.match(o.re.mailto)[0].length:0}}},kf="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",Af="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function Cf(e){e.__index__=-1,e.__text_cache__=""}function $f(e){return function(t,o){var r=t.slice(o);return e.test(r)?r.match(e)[0].length:0}}function Xa(){return function(e,t){t.normalize(e)}}function _r(e){var t=e.re=bf()(e.__opts__),o=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||o.push(kf),o.push(t.src_xn),t.src_tlds=o.join("|");function r(a){return a.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");var s=[];e.__compiled__={};function n(a,l){throw new Error('(LinkifyIt) Invalid schema "'+a+'": '+l)}Object.keys(e.__schemas__).forEach(function(a){var l=e.__schemas__[a];if(l!==null){var c={validate:null,link:null};if(e.__compiled__[a]=c,vf(l)){yf(l.validate)?c.validate=$f(l.validate):Ja(l.validate)?c.validate=l.validate:n(a,l),Ja(l.normalize)?c.normalize=l.normalize:l.normalize?n(a,l):c.normalize=Xa();return}if(mf(l)){s.push(a);return}n(a,l)}}),s.forEach(function(a){e.__compiled__[e.__schemas__[a]]&&(e.__compiled__[a].validate=e.__compiled__[e.__schemas__[a]].validate,e.__compiled__[a].normalize=e.__compiled__[e.__schemas__[a]].normalize)}),e.__compiled__[""]={validate:null,normalize:Xa()};var i=Object.keys(e.__compiled__).filter(function(a){return a.length>0&&e.__compiled__[a]}).map(wf).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+i+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+i+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),Cf(e)}function Ef(e,t){var o=e.__index__,r=e.__last_index__,s=e.__text_cache__.slice(o,r);this.schema=e.__schema__.toLowerCase(),this.index=o+t,this.lastIndex=r+t,this.raw=s,this.text=s,this.url=s}function tn(e,t){var o=new Ef(e,t);return e.__compiled__[o.schema].normalize(o,e),o}function gt(e,t){if(!(this instanceof gt))return new gt(e,t);t||_f(e)&&(t=e,e={}),this.__opts__=Xs({},Qa,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=Xs({},xf,e),this.__compiled__={},this.__tlds__=Af,this.__tlds_replaced__=!1,this.re={},_r(this)}gt.prototype.add=function(t,o){return this.__schemas__[t]=o,_r(this),this},gt.prototype.set=function(t){return this.__opts__=Xs(this.__opts__,t),this},gt.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;var o,r,s,n,i,a,l,c,u;if(this.re.schema_test.test(t)){for(l=this.re.schema_search,l.lastIndex=0;(o=l.exec(t))!==null;)if(n=this.testSchemaAt(t,o[2],l.lastIndex),n){this.__schema__=o[2],this.__index__=o.index+o[1].length,this.__last_index__=o.index+o[0].length+n;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(c=t.search(this.re.host_fuzzy_test),c>=0&&(this.__index__<0||c<this.__index__)&&(r=t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(i=r.index+r[1].length,(this.__index__<0||i<this.__index__)&&(this.__schema__="",this.__index__=i,this.__last_index__=r.index+r[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(u=t.indexOf("@"),u>=0&&(s=t.match(this.re.email_fuzzy))!==null&&(i=s.index+s[1].length,a=s.index+s[0].length,(this.__index__<0||i<this.__index__||i===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=i,this.__last_index__=a))),this.__index__>=0},gt.prototype.pretest=function(t){return this.re.pretest.test(t)},gt.prototype.testSchemaAt=function(t,o,r){return this.__compiled__[o.toLowerCase()]?this.__compiled__[o.toLowerCase()].validate(t,r,this):0},gt.prototype.match=function(t){var o=0,r=[];this.__index__>=0&&this.__text_cache__===t&&(r.push(tn(this,o)),o=this.__last_index__);for(var s=o?t.slice(o):t;this.test(s);)r.push(tn(this,o)),s=s.slice(this.__last_index__),o+=this.__last_index__;return r.length?r:null},gt.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;var o=this.re.schema_at_start.exec(t);if(!o)return null;var r=this.testSchemaAt(t,o[2],o[0].length);return r?(this.__schema__=o[2],this.__index__=o.index+o[1].length,this.__last_index__=o.index+o[0].length+r,tn(this,0)):null},gt.prototype.tlds=function(t,o){return t=Array.isArray(t)?t:[t],o?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,s,n){return r!==n[s-1]}).reverse(),_r(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,_r(this),this)},gt.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)},gt.prototype.onCompile=function(){};var Sf=gt;const je=2147483647,Mt=36,en=1,To=26,qf=38,Df=700,tl=72,el=128,ol="-",Tf=/^xn--/,Lf=/[^\0-\x7F]/,zf=/[\x2E\u3002\uFF0E\uFF61]/g,Rf={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},on=Mt-en,It=Math.floor,rn=String.fromCharCode;function ne(e){throw new RangeError(Rf[e])}function Pf(e,t){const o=[];let r=e.length;for(;r--;)o[r]=t(e[r]);return o}function rl(e,t){const o=e.split("@");let r="";o.length>1&&(r=o[0]+"@",e=o[1]),e=e.replace(zf,".");const s=e.split("."),n=Pf(s,t).join(".");return r+n}function sn(e){const t=[];let o=0;const r=e.length;for(;o<r;){const s=e.charCodeAt(o++);if(s>=55296&&s<=56319&&o<r){const n=e.charCodeAt(o++);(n&64512)==56320?t.push(((s&1023)<<10)+(n&1023)+65536):(t.push(s),o--)}else t.push(s)}return t}const sl=e=>String.fromCodePoint(...e),Mf=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:Mt},nl=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},il=function(e,t,o){let r=0;for(e=o?It(e/Df):e>>1,e+=It(e/t);e>on*To>>1;r+=Mt)e=It(e/on);return It(r+(on+1)*e/(e+qf))},nn=function(e){const t=[],o=e.length;let r=0,s=el,n=tl,i=e.lastIndexOf(ol);i<0&&(i=0);for(let a=0;a<i;++a)e.charCodeAt(a)>=128&&ne("not-basic"),t.push(e.charCodeAt(a));for(let a=i>0?i+1:0;a<o;){const l=r;for(let u=1,d=Mt;;d+=Mt){a>=o&&ne("invalid-input");const p=Mf(e.charCodeAt(a++));p>=Mt&&ne("invalid-input"),p>It((je-r)/u)&&ne("overflow"),r+=p*u;const h=d<=n?en:d>=n+To?To:d-n;if(p<h)break;const b=Mt-h;u>It(je/b)&&ne("overflow"),u*=b}const c=t.length+1;n=il(r-l,c,l==0),It(r/c)>je-s&&ne("overflow"),s+=It(r/c),r%=c,t.splice(r++,0,s)}return String.fromCodePoint(...t)},an=function(e){const t=[];e=sn(e);const o=e.length;let r=el,s=0,n=tl;for(const l of e)l<128&&t.push(rn(l));const i=t.length;let a=i;for(i&&t.push(ol);a<o;){let l=je;for(const u of e)u>=r&&u<l&&(l=u);const c=a+1;l-r>It((je-s)/c)&&ne("overflow"),s+=(l-r)*c,r=l;for(const u of e)if(u<r&&++s>je&&ne("overflow"),u===r){let d=s;for(let p=Mt;;p+=Mt){const h=p<=n?en:p>=n+To?To:p-n;if(d<h)break;const b=d-h,m=Mt-h;t.push(rn(nl(h+b%m,0))),d=It(b/m)}t.push(rn(nl(d,0))),n=il(s,c,a===i),s=0,++a}++s,++r}return t.join("")},al=function(e){return rl(e,function(t){return Tf.test(t)?nn(t.slice(4).toLowerCase()):t})},ll=function(e){return rl(e,function(t){return Lf.test(t)?"xn--"+an(t):t})},If=_c(Object.freeze(Object.defineProperty({__proto__:null,decode:nn,default:{version:"2.1.0",ucs2:{decode:sn,encode:sl},decode:nn,encode:an,toASCII:ll,toUnicode:al},encode:an,toASCII:ll,toUnicode:al,ucs2decode:sn,ucs2encode:sl},Symbol.toStringTag,{value:"Module"})));var Ff={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},Bf={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},Of={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}},Lo=O,Nf=dr,Vf=Mh,Hf=ip,Uf=Fp,jf=gf,Gf=Sf,$e=Ne,cl=If,Zf={default:Ff,zero:Bf,commonmark:Of},Wf=/^(vbscript|javascript|file|data):/,Kf=/^data:image\/(gif|png|jpeg|webp);/;function Yf(e){var t=e.trim().toLowerCase();return Wf.test(t)?!!Kf.test(t):!0}var ul=["http:","https:","mailto:"];function Jf(e){var t=$e.parse(e,!0);if(t.hostname&&(!t.protocol||ul.indexOf(t.protocol)>=0))try{t.hostname=cl.toASCII(t.hostname)}catch{}return $e.encode($e.format(t))}function Qf(e){var t=$e.parse(e,!0);if(t.hostname&&(!t.protocol||ul.indexOf(t.protocol)>=0))try{t.hostname=cl.toUnicode(t.hostname)}catch{}return $e.decode($e.format(t),$e.decode.defaultChars+"%")}function vt(e,t){if(!(this instanceof vt))return new vt(e,t);t||Lo.isString(e)||(t=e||{},e="default"),this.inline=new jf,this.block=new Uf,this.core=new Hf,this.renderer=new Vf,this.linkify=new Gf,this.validateLink=Yf,this.normalizeLink=Jf,this.normalizeLinkText=Qf,this.utils=Lo,this.helpers=Lo.assign({},Nf),this.options={},this.configure(e),t&&this.set(t)}vt.prototype.set=function(e){return Lo.assign(this.options,e),this},vt.prototype.configure=function(e){var t=this,o;if(Lo.isString(e)&&(o=e,e=Zf[o],!e))throw new Error('Wrong `markdown-it` preset "'+o+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(r){e.components[r].rules&&t[r].ruler.enableOnly(e.components[r].rules),e.components[r].rules2&&t[r].ruler2.enableOnly(e.components[r].rules2)}),this},vt.prototype.enable=function(e,t){var o=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(s){o=o.concat(this[s].ruler.enable(e,!0))},this),o=o.concat(this.inline.ruler2.enable(e,!0));var r=e.filter(function(s){return o.indexOf(s)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},vt.prototype.disable=function(e,t){var o=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(s){o=o.concat(this[s].ruler.disable(e,!0))},this),o=o.concat(this.inline.ruler2.disable(e,!0));var r=e.filter(function(s){return o.indexOf(s)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},vt.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},vt.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");var o=new this.core.State(e,this,t);return this.core.process(o),o.tokens},vt.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},vt.prototype.parseInline=function(e,t){var o=new this.core.State(e,this,t);return o.inlineMode=!0,this.core.process(o),o.tokens},vt.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var Xf=vt,tg=Xf;const eg=Xr(tg);function og(e,t){var o,r,s=e.attrs[e.attrIndex("href")][1];for(o=0;o<t.length;++o){if(r=t[o],typeof r.matcher=="function"){if(r.matcher(s,r))return r;continue}return r}}function rg(e,t,o){Object.keys(o).forEach(function(r){var s,n=o[r];r==="className"&&(r="class"),s=t[e].attrIndex(r),s<0?t[e].attrPush([r,n]):t[e].attrs[s][1]=n})}function dl(e,t){t?t=Array.isArray(t)?t:[t]:t=[],Object.freeze(t);var o=e.renderer.rules.link_open||this.defaultRender;e.renderer.rules.link_open=function(r,s,n,i,a){var l=og(r[s],t),c=l&&l.attrs;return c&&rg(s,r,c),o(r,s,n,i,a)}}dl.defaultRender=function(e,t,o,r,s){return s.renderToken(e,t,o)};var sg=dl;const ng=Xr(sg);function ig(){const e=new eg({linkify:!0});return e.use(ng,{attrs:{target:"_blank",rel:"noopener"}}),e}async function hl(e){const t=ig();return A`${Le(t.render(e))}`}var ag=Object.defineProperty,lg=Object.getOwnPropertyDescriptor,xr=(e,t,o,r)=>{for(var s=r>1?void 0:r?lg(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&ag(t,o,s),s};let Ge=class extends at{constructor(){super(...arguments),this.type="assistant"}disconnectedCallback(){super.disconnectedCallback(),this._removeCopyEvents()}updated(e){super.updated(e),e.has("message")&&requestIdleCallback(()=>{this._addCopyEvents()})}get _isBot(){return this.message.author==="assistant"||this.message.author==="system"}_removeMessageHandler(){this.emit("message:remove",{detail:this.message})}_addCopyEvents(){this.copyBtns.forEach(e=>{e.addEventListener("click",()=>{var o,r;const t=(r=(o=e.parentElement)==null?void 0:o.nextElementSibling)==null?void 0:r.textContent;t&&Fc(t).then(()=>{e.textContent="Success",setTimeout(()=>{e.textContent="Copy"},500)})})})}_removeCopyEvents(){this.copyBtns.forEach(e=>{e.removeEventListener("click",()=>{})})}render(){return Oe(this.message.data||this.message.isThinking,()=>A`
4877
4879
  <div class="cb-message-row" part="cb-message-row">
4878
4880
  <!-- message -->
4879
- ${Me(this._isBot,()=>this.renderBotMessage(this.message),()=>this.renderUserMessage(this.message))}
4881
+ ${Oe(this._isBot,()=>this.renderBotMessage(this.message),()=>this.renderUserMessage(this.message))}
4880
4882
  </div>
4881
- `,()=>null)}renderButtons(e="left"){return T`<div class="cb-message__buttons ${e}">
4883
+ `,()=>null)}renderButtons(e="left"){return A`<div class="cb-message__buttons ${e}">
4882
4884
  <!-- delete button -->
4883
4885
  <sl-button class="cb-message__delete-button" name="trash" @click=${this._removeMessageHandler} circle variant="text" size="small">
4884
- <cb-icon svg="${Ld}" style="font-size: 1em !important;"></cb-icon>
4886
+ <cb-icon svg="${ch}" style="font-size: 1em !important;"></cb-icon>
4885
4887
  </sl-button>
4886
- </div>`}renderMessage(e){return T`
4888
+ </div>`}renderMessage(e){return A`
4887
4889
  <div
4888
4890
  class="cb-message__content
4889
4891
  ${e.author}-message
@@ -4893,35 +4895,35 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
4893
4895
  >
4894
4896
  ${this.renderMessageContent(e)}
4895
4897
  </div>
4896
- `}async _getMessageText(e){return Za(e.data.text)}renderMessageContent(e){var t;return e.isThinking?T`<cb-thinking></cb-thinking>`:e.isUploading?T`<cb-uploading .files="${e.data.files||[]}"></cb-uploading>`:e.type==="text"?T`<div class="cb-message-text">
4897
- ${Me(e.data.userName,()=>T`<div style="font-size: 12px; color:#9ca3af">${e.data.userName}</div>`,()=>null)}
4898
- ${Bi(this._getMessageText(e).then(o=>T`${o}`))}
4899
- </div>`:e.type==="file"?T`${xs(e.data.files||[],o=>o.id,o=>T`<cb-file filename="${o.name}" url="${o.url}"></cb-file>`)}`:T`<div class="cb-message-text">
4900
- ${Bi(Za(((t=e.data.text)==null?void 0:t.toString())||"").then(o=>T`${o}`))}
4901
- </div>`}renderBotMessageAvatar(e){if(e.data.userName&&e.data.userName!==""){const t=e.data.userAvatar||"";return T` <img src="${t}" style="width: 24px;height: 24px;" /> `}return e.author==="system"?wn`${Je(V.setting.systemIconSvg)}`:wn`${Je(V.setting.botIconSvg)}`}renderBotMessage(e){return T`
4898
+ `}async _getMessageText(e){return hl(e.data.text)}renderMessageContent(e){var t;return e.isThinking?A`<cb-thinking></cb-thinking>`:e.isUploading?A`<cb-uploading .files="${e.data.files||[]}"></cb-uploading>`:e.type==="text"?A`<div class="cb-message-text">
4899
+ ${Oe(e.data.userName,()=>A`<div style="font-size: 12px; color:#9ca3af">${e.data.userName}</div>`,()=>null)}
4900
+ ${sa(this._getMessageText(e).then(o=>A`${o}`))}
4901
+ </div>`:e.type==="file"?A`${Ts(e.data.files||[],o=>o.id,o=>A`<cb-file filename="${o.name}" url="${o.url}"></cb-file>`)}`:A`<div class="cb-message-text">
4902
+ ${sa(hl(((t=e.data.text)==null?void 0:t.toString())||"").then(o=>A`${o}`))}
4903
+ </div>`}renderBotMessageAvatar(e){if(e.data.userName&&e.data.userName!==""){const t=e.data.userAvatar||"";return A` <img src="${t}" style="width: 24px;height: 24px;" /> `}return e.author==="system"?Zr`${Le(R.setting.systemIconSvg)}`:Zr`${Le(R.setting.botIconSvg)}`}renderBotMessage(e){return A`
4902
4904
  <div class="cb-message cb-bot-message-wrapper" part="cb-message">
4903
4905
  <div class="avatar assistant-avatar xsmall" style="margin-top:4px;">${this.renderBotMessageAvatar(e)}</div>
4904
4906
  <div style="margin-left: 4px;width: 100%">${this.renderMessage(e)}</div>
4905
4907
  </div>
4906
- `}renderUserMessage(e){return T`
4908
+ `}renderUserMessage(e){return A`
4907
4909
  <div class="cb-message" part="cb-message" style="display: flex; justify-content: end;align-items: start;">
4908
4910
  <!--<sl-avatar class="avatar user-avatar small" label="User">
4909
- <cb-icon slot="icon" svg="${zd}" color="white"></cb-icon>
4911
+ <cb-icon slot="icon" svg="${uh}" color="white"></cb-icon>
4910
4912
  </sl-avatar>-->
4911
- <div class="avatar user-avatar">${Je(V.setting.userIconSvg)}</div>
4913
+ <div class="avatar user-avatar">${Le(R.setting.userIconSvg)}</div>
4912
4914
  ${this.renderMessage(e)}
4913
4915
  </div>
4914
- `}};Ve.styles=Pd,fr([$({type:Object})],Ve.prototype,"message",2),fr([$({type:String})],Ve.prototype,"type",2),fr([El(".code-block-header__copy")],Ve.prototype,"copyBtns",2),Ve=fr([ot("cb-message")],Ve);var Lf=Object.defineProperty,zf=Object.getOwnPropertyDescriptor,Ue=(e,t,o,r)=>{for(var s=r>1?void 0:r?zf(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&Lf(t,o,s),s};const gr=Po.noConflict();gr.setLevel("info");let ne=class extends ct{constructor(){super(...arguments),this.messages=[],this.actions=[],this.calendlyInjected=!1,this.activeCalendlyAction=-1}render(){return T`
4916
+ `}};Ge.styles=hh,xr([g({type:Object})],Ge.prototype,"message",2),xr([g({type:String})],Ge.prototype,"type",2),xr([yc(".code-block-header__copy")],Ge.prototype,"copyBtns",2),Ge=xr([tt("cb-message")],Ge);var cg=Object.defineProperty,ug=Object.getOwnPropertyDescriptor,Ze=(e,t,o,r)=>{for(var s=r>1?void 0:r?ug(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&cg(t,o,s),s};const kr=No.noConflict();kr.setLevel("info");let ie=class extends at{constructor(){super(...arguments),this.messages=[],this.actions=[],this.calendlyInjected=!1,this.activeCalendlyAction=-1}render(){return A`
4915
4917
  <div class="cb-message-list" part="cb-message-list">
4916
- ${xs(this.messages,e=>e.id+JSON.stringify(e.data),e=>T`<cb-message .message="${e}"></cb-message>`)}
4918
+ ${Ts(this.messages,e=>e.id+JSON.stringify(e.data),e=>A`<cb-message .message="${e}"></cb-message>`)}
4917
4919
  ${this.renderActions()}
4918
4920
  <div id="cb-message-list-bottom-anchor"></div>
4919
4921
  </div>
4920
- `}renderActions(){return!Array.isArray(this.actions)||this.actions.length<=0?null:T`
4922
+ `}renderActions(){return!Array.isArray(this.actions)||this.actions.length<=0?null:A`
4921
4923
  <div class="cb-actions-list">
4922
- ${xs(this.actions,e=>e,e=>this.renderAction(e))}
4924
+ ${Ts(this.actions,e=>e,e=>this.renderAction(e))}
4923
4925
  </div>
4924
- `}scrollToBottom(){this._messageListBottomAnchor.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}renderAction(e){switch(e.type){case"calendlyMeeting":return this.renderCalendlyAction(e);case"link":return this.renderLinkAction(e)}return null}handleCalendlyEvent(e){switch(gr.info("Got Calendly Event:",e.data),e.data.event){case"calendly.event_scheduled":{const t=this.activeCalendlyAction;t>=0&&(V.removeAction(t),V.addSystemMessage("Your meeting has been scheduled!"),this.activeCalendlyAction=-1)}}}invokeLinkAction(e={}){gr.info("invokeLinkAction:",e),window.open(e.url,"_blank")}invokeCalendlyAction(e={}){return gr.info("invokeCalendlyAction:",e),"Calendly"in window&&(this.activeCalendlyAction=e.internalId,window.Calendly.initPopupWidget({url:e.url})),!1}renderCalendlyAction(e){if(!("Calendly"in window)&&!this.calendlyInjected){let t=document.createElement("link");t.href="https://assets.calendly.com/assets/external/widget.css",t.rel="stylesheet",document.body.appendChild(t);let o=document.createElement("script");o.type="text/javascript",o.src="https://assets.calendly.com/assets/external/widget.js",document.body.appendChild(o),console.log("Injected Calendly"),window.addEventListener("message",r=>{r.origin==="https://calendly.com"&&r.data.event&&r.data.event.indexOf("calendly.")!==-1&&this.handleCalendlyEvent(r)}),this.calendlyInjected=!0}return T`
4926
+ `}scrollToBottom(){this._messageListBottomAnchor.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}renderAction(e){switch(e.type){case"calendlyMeeting":return this.renderCalendlyAction(e);case"link":return this.renderLinkAction(e)}return null}handleCalendlyEvent(e){switch(kr.info("Got Calendly Event:",e.data),e.data.event){case"calendly.event_scheduled":{const t=this.activeCalendlyAction;t>=0&&(R.removeAction(t),R.addSystemMessage("Your meeting has been scheduled!"),this.activeCalendlyAction=-1)}}}invokeLinkAction(e={}){kr.info("invokeLinkAction:",e),window.open(e.url,"_blank")}invokeCalendlyAction(e={}){return kr.info("invokeCalendlyAction:",e),"Calendly"in window&&(this.activeCalendlyAction=e.internalId,window.Calendly.initPopupWidget({url:e.url})),!1}renderCalendlyAction(e){if(!("Calendly"in window)&&!this.calendlyInjected){let t=document.createElement("link");t.href="https://assets.calendly.com/assets/external/widget.css",t.rel="stylesheet",document.body.appendChild(t);let o=document.createElement("script");o.type="text/javascript",o.src="https://assets.calendly.com/assets/external/widget.js",document.body.appendChild(o),console.log("Injected Calendly"),window.addEventListener("message",r=>{r.origin==="https://calendly.com"&&r.data.event&&r.data.event.indexOf("calendly.")!==-1&&this.handleCalendlyEvent(r)}),this.calendlyInjected=!0}return A`
4925
4927
  <div class="cb-actions-list">
4926
4928
  <div class="cb-action ripple" @click="${this.invokeCalendlyAction.bind(this,e)}">
4927
4929
  <div class="cb-action-icon">
@@ -4935,7 +4937,7 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
4935
4937
  ${e.title}
4936
4938
  </div>
4937
4939
  </div>
4938
- `}renderLinkAction(e){return T`
4940
+ `}renderLinkAction(e){return A`
4939
4941
  <div class="cb-actions-list">
4940
4942
  <div class="cb-action ripple" @click="${this.invokeLinkAction.bind(this,e)}">
4941
4943
  <div class="cb-action-icon">
@@ -4946,7 +4948,7 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
4946
4948
  ${e.title}
4947
4949
  </div>
4948
4950
  </div>
4949
- `}};ne.styles=ad,Ue([$({type:Array})],ne.prototype,"messages",2),Ue([$({type:Array})],ne.prototype,"actions",2),Ue([Ro("#cb-message-list-bottom-anchor")],ne.prototype,"_messageListBottomAnchor",2),Ue([Tn({capture:!1,passive:!0})],ne.prototype,"invokeLinkAction",1),Ue([Tn({capture:!1,passive:!0})],ne.prototype,"invokeCalendlyAction",1),ne=Ue([ot("cb-message-list")],ne);const Rf=X`
4951
+ `}};ie.styles=Md,Ze([g({type:Array})],ie.prototype,"messages",2),Ze([g({type:Array})],ie.prototype,"actions",2),Ze([V("#cb-message-list-bottom-anchor")],ie.prototype,"_messageListBottomAnchor",2),Ze([ti({capture:!1,passive:!0})],ie.prototype,"invokeLinkAction",1),Ze([ti({capture:!1,passive:!0})],ie.prototype,"invokeCalendlyAction",1),ie=Ze([tt("cb-message-list")],ie);const dg=z`
4950
4952
  ${Et}
4951
4953
 
4952
4954
  :host {
@@ -4989,59 +4991,46 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
4989
4991
  .cb-input-buttons {
4990
4992
  padding: 0 5px;
4991
4993
  }
4992
- `,Pf='<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576L6.636 10.07Zm6.787-8.201L1.591 6.602l4.339 2.76l7.494-7.493Z"/></svg>',Mf='<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M4.5 3a2.5 2.5 0 0 1 5 0v9a1.5 1.5 0 0 1-3 0V5a.5.5 0 0 1 1 0v7a.5.5 0 0 0 1 0V3a1.5 1.5 0 1 0-3 0v9a2.5 2.5 0 0 0 5 0V5a.5.5 0 0 1 1 0v7a3.5 3.5 0 1 1-7 0V3z"/></svg>';var Ff=Object.defineProperty,If=Object.getOwnPropertyDescriptor,Zt=(e,t,o,r)=>{for(var s=r>1?void 0:r?If(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&Ff(t,o,s),s};let At=class extends ct{constructor(){super(...arguments),this.placeholder="Type a message...",this.sendButtonLabel="Send",this.enableFileUpload=!1,this.value="",this.loading=!1,this.disabled=!1,this.currentKey=""}_inputChangeHandler(e){const t=e.target;this.value=t.value}_sendHandler(){this.emit("message:send",{detail:{timestamp:Date.now(),author:"user",type:"text",data:{text:this.value}}}),this.value="",this.inputElement.blur()}async _sendFileHandler(){const e=await Il();this.emit("message:send:file",{detail:{files:e}})}render(){return T`
4993
- <div class="cb-user-input-wrapper" part="user-input-wrapper">
4994
- <sl-textarea
4995
- @sl-input=${this._inputChangeHandler}
4996
- placeholder=${this.placeholder}
4997
- class="cb-user-input"
4998
- clearable="true"
4999
- value=${this.value}
5000
- rows="1"
5001
- resize="auto"
5002
- filled
5003
- ?disabled=${this.disabled}
5004
- enterkeyhint="send"
5005
- @keydown=${this._keyDownHandler}
5006
- ></sl-textarea>
5007
-
5008
- <span class="cb-input-buttons">
5009
- ${Me(this.enableFileUpload,()=>T`
5010
- <sl-button
5011
- @click=${this._sendFileHandler}
5012
- name="paperclip"
5013
- label="Attachment"
5014
- size="large"
5015
- class="paperclip-button"
5016
- variant="text"
5017
- circle
5018
- >
5019
- <cb-icon svg="${Mf}"></cb-icon>
5020
- <!-- select file input -->
5021
- <input
5022
- type="file"
5023
- id="file"
5024
- name="file"
5025
- class="file-input"
5026
- />
5027
- </sl-button>
5028
- `,()=>T``)}
5029
- <sl-button
5030
- @click=${this._sendHandler}
5031
- name="send"
5032
- label="Send"
5033
- size="small"
5034
- class="send-button"
5035
- variant="text"
5036
- ?disabled=${this.value.length===0}
5037
- ?loading=${this.loading}
5038
- circle
5039
- >
5040
- <cb-icon svg="${Pf}"></cb-icon>
5041
- </sl-button>
5042
- </span>
5043
- </div>
5044
- `}_keyDownHandler(e){e.key==="Enter"&&!e.shiftKey&&this._sendHandler()}};At.styles=Rf,Zt([$({type:String,attribute:"placeholder"})],At.prototype,"placeholder",2),Zt([$({type:String,attribute:"send-button-label"})],At.prototype,"sendButtonLabel",2),Zt([$({type:Boolean,attribute:"enable-file-upload"})],At.prototype,"enableFileUpload",2),Zt([$({type:String})],At.prototype,"value",2),Zt([$({type:Boolean})],At.prototype,"loading",2),Zt([$({type:Boolean})],At.prototype,"disabled",2),Zt([$({type:String})],At.prototype,"currentKey",2),Zt([Ro("sl-textarea")],At.prototype,"inputElement",2),At=Zt([ot("cb-user-input")],At);const Bf=X`
4994
+ `,hg='<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576L6.636 10.07Zm6.787-8.201L1.591 6.602l4.339 2.76l7.494-7.493Z"/></svg>',pg='<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M4.5 3a2.5 2.5 0 0 1 5 0v9a1.5 1.5 0 0 1-3 0V5a.5.5 0 0 1 1 0v7a.5.5 0 0 0 1 0V3a1.5 1.5 0 1 0-3 0v9a2.5 2.5 0 0 0 5 0V5a.5.5 0 0 1 1 0v7a3.5 3.5 0 1 1-7 0V3z"/></svg>';var fg=Object.defineProperty,gg=Object.getOwnPropertyDescriptor,jt=(e,t,o,r)=>{for(var s=r>1?void 0:r?gg(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&fg(t,o,s),s};let $t=class extends at{constructor(){super(...arguments),this.placeholder="Type a message...",this.sendButtonLabel="Send",this.enableFileUpload=!1,this.value="",this.loading=!1,this.disabled=!1,this.currentKey=""}_inputChangeHandler(e){const t=e.target;this.value=t.value}_sendHandler(){this.emit("message:send",{detail:{timestamp:Date.now(),author:"user",type:"text",data:{text:this.value}}}),this.value="",this.inputElement.blur(),requestIdleCallback(()=>{this.inputElement.focus()})}async _sendFileHandler(){const e=await Bc();this.emit("message:send:file",{detail:{files:e}})}render(){return A`
4995
+ <div class="cb-user-input-wrapper" part="user-input-wrapper">
4996
+ <sl-textarea
4997
+ @sl-input=${this._inputChangeHandler}
4998
+ placeholder=${this.placeholder}
4999
+ class="cb-user-input"
5000
+ clearable="true"
5001
+ value=${this.value}
5002
+ rows="1"
5003
+ resize="auto"
5004
+ filled
5005
+ ?disabled=${this.disabled}
5006
+ enterkeyhint="send"
5007
+ @keydown=${this._keyDownHandler}
5008
+ ></sl-textarea>
5009
+
5010
+ <span class="cb-input-buttons">
5011
+ ${Oe(this.enableFileUpload,()=>A`
5012
+ <sl-button @click=${this._sendFileHandler} name="paperclip" label="Attachment" size="large" class="paperclip-button" variant="text" circle>
5013
+ <cb-icon svg="${pg}"></cb-icon>
5014
+ <!-- select file input -->
5015
+ <input type="file" id="file" name="file" class="file-input" />
5016
+ </sl-button>
5017
+ `,()=>A``)}
5018
+ <sl-button
5019
+ @click=${this._sendHandler}
5020
+ name="send"
5021
+ label="Send"
5022
+ size="small"
5023
+ class="send-button"
5024
+ variant="text"
5025
+ ?disabled=${this.value.length===0}
5026
+ ?loading=${this.loading}
5027
+ circle
5028
+ >
5029
+ <cb-icon svg="${hg}"></cb-icon>
5030
+ </sl-button>
5031
+ </span>
5032
+ </div>
5033
+ `}_keyDownHandler(e){e.key==="Enter"&&!e.shiftKey&&this._sendHandler()}};$t.styles=dg,jt([g({type:String,attribute:"placeholder"})],$t.prototype,"placeholder",2),jt([g({type:String,attribute:"send-button-label"})],$t.prototype,"sendButtonLabel",2),jt([g({type:Boolean,attribute:"enable-file-upload"})],$t.prototype,"enableFileUpload",2),jt([g({type:String})],$t.prototype,"value",2),jt([g({type:Boolean})],$t.prototype,"loading",2),jt([g({type:Boolean})],$t.prototype,"disabled",2),jt([g({type:String})],$t.prototype,"currentKey",2),jt([V("sl-textarea")],$t.prototype,"inputElement",2),$t=jt([tt("cb-user-input")],$t);const bg=z`
5045
5034
  ${Et}
5046
5035
 
5047
5036
  sl-dialog::part(base) {
@@ -5075,7 +5064,7 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
5075
5064
  justify-content: flex-end;
5076
5065
  gap: 8px;
5077
5066
  }
5078
- `;var Of=Object.defineProperty,Nf=Object.getOwnPropertyDescriptor,br=(e,t,o,r)=>{for(var s=r>1?void 0:r?Nf(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&Of(t,o,s),s};let He=class extends ct{constructor(){super(...arguments),this.open=!1,this.label="Dialog",this.zindex=100}_settingCancelHandler(){this.emit("cancel")}render(){return T` <sl-dialog
5067
+ `;var mg=Object.defineProperty,vg=Object.getOwnPropertyDescriptor,Ar=(e,t,o,r)=>{for(var s=r>1?void 0:r?vg(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&mg(t,o,s),s};let We=class extends at{constructor(){super(...arguments),this.open=!1,this.label="Dialog",this.zindex=100}_settingCancelHandler(){this.emit("cancel")}render(){return A` <sl-dialog
5079
5068
  label="Setting"
5080
5069
  class="cb-dialog"
5081
5070
  style="sl-dialog::part(base) { z-index: ${this.zindex}; }"
@@ -5085,7 +5074,7 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
5085
5074
  >
5086
5075
  <header class="cb-header">
5087
5076
  <div class="cb-header__left">
5088
- ${this.label?T`<span class="title">${this.label}</span>`:""}
5077
+ ${this.label?A`<span class="title">${this.label}</span>`:""}
5089
5078
  </div>
5090
5079
  <sl-button
5091
5080
  @click=${this._settingCancelHandler}
@@ -5098,7 +5087,7 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
5098
5087
  <cb-icon
5099
5088
  color="default"
5100
5089
  style="font-size: 1em;"
5101
- svg="${ys}"
5090
+ svg="${sr}"
5102
5091
  ></cb-icon>
5103
5092
  </sl-button>
5104
5093
  </header>
@@ -5108,7 +5097,7 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
5108
5097
  <div part="footer" class="cb-dialog__footer">
5109
5098
  <slot name="cb-footer"></slot>
5110
5099
  </div>
5111
- </sl-dialog>`}};He.styles=Bf,br([$({type:Boolean})],He.prototype,"open",2),br([$({type:String,attribute:"label"})],He.prototype,"label",2),br([$({type:Number})],He.prototype,"zindex",2),He=br([ot("cb-dialog")],He);var Vf=Object.defineProperty,Uf=Object.getOwnPropertyDescriptor,Wa=(e,t,o,r)=>{for(var s=r>1?void 0:r?Uf(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&Vf(t,o,s),s};let mr=class extends ct{constructor(){super(...arguments),this.open=!1}render(){return T` <cb-dialog
5100
+ </sl-dialog>`}};We.styles=bg,Ar([g({type:Boolean})],We.prototype,"open",2),Ar([g({type:String,attribute:"label"})],We.prototype,"label",2),Ar([g({type:Number})],We.prototype,"zindex",2),We=Ar([tt("cb-dialog")],We);var yg=Object.defineProperty,wg=Object.getOwnPropertyDescriptor,pl=(e,t,o,r)=>{for(var s=r>1?void 0:r?wg(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&yg(t,o,s),s};let Cr=class extends at{constructor(){super(...arguments),this.open=!1}render(){return A` <cb-dialog
5112
5101
  label="Confirm"
5113
5102
  class="cb-clear-message-dialog"
5114
5103
  ?open=${this.open}
@@ -5128,14 +5117,14 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
5128
5117
  @click=${this._cancelHandler}
5129
5118
  >Close</sl-button
5130
5119
  >
5131
- </cb-dialog>`}_confirmHandler(){this.emit("confirm")}_cancelHandler(){this.emit("cancel")}};mr.styles=X`
5120
+ </cb-dialog>`}_confirmHandler(){this.emit("confirm")}_cancelHandler(){this.emit("cancel")}};Cr.styles=z`
5132
5121
  .cb-clear-message-dialog {
5133
5122
  }
5134
5123
 
5135
5124
  sl-dialog::part(base) {
5136
5125
  z-index: 1000;
5137
5126
  }
5138
- `,Wa([$({type:Boolean})],mr.prototype,"open",2),mr=Wa([ot("cb-clear-message-dialog")],mr);const Hf=X`
5127
+ `,pl([g({type:Boolean})],Cr.prototype,"open",2),Cr=pl([tt("cb-clear-message-dialog")],Cr);const _g=z`
5139
5128
  :host {
5140
5129
  // width: 380px;
5141
5130
 
@@ -5194,7 +5183,7 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
5194
5183
  .setting-input::part(form-control-help-text) {
5195
5184
  grid-column-start: 2;
5196
5185
  }
5197
- `;var jf=Object.defineProperty,Gf=Object.getOwnPropertyDescriptor,je=(e,t,o,r)=>{for(var s=r>1?void 0:r?Gf(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&jf(t,o,s),s};let ie=class extends ct{constructor(){super(...arguments),this.open=!1,this.clearMessageDialogOpen=!1,this.customRequest=!1}render(){return this.customRequest=this.setting.customRequest,T`
5186
+ `;var xg=Object.defineProperty,kg=Object.getOwnPropertyDescriptor,Ke=(e,t,o,r)=>{for(var s=r>1?void 0:r?kg(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&xg(t,o,s),s};let ae=class extends at{constructor(){super(...arguments),this.open=!1,this.clearMessageDialogOpen=!1,this.customRequest=!1}render(){return this.customRequest=this.setting.customRequest,A`
5198
5187
  <cb-dialog
5199
5188
  label="Setting"
5200
5189
  class="cb-dialog"
@@ -5226,7 +5215,7 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
5226
5215
  Enable it for your own backend.
5227
5216
  </sl-switch>
5228
5217
  </div> -->
5229
- ${Me(this.customRequest,()=>null,()=>this.renderInternalServices())}
5218
+ ${Oe(this.customRequest,()=>null,()=>this.renderInternalServices())}
5230
5219
 
5231
5220
  <div class="form-item">
5232
5221
  <label class="label">Streaming</label>
@@ -5276,7 +5265,7 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
5276
5265
  @confirm=${this._clearCacheHandler}
5277
5266
  @cancel=${()=>{this.clearMessageDialogOpen=!1}}
5278
5267
  ></cb-clear-message-dialog>
5279
- `}renderInternalServices(){return T`
5268
+ `}renderInternalServices(){return A`
5280
5269
  <div class="form-item">
5281
5270
  <label class="label">Service</label>
5282
5271
  <sl-radio-group name="openai" value="openai" size="small">
@@ -5306,7 +5295,7 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
5306
5295
  @sl-change=${this._inputChangeHandler}
5307
5296
  ></sl-input>
5308
5297
  </div>
5309
- `}_clearCacheHandler(){this.emit("message:clear"),this.clearMessageDialogOpen=!1}_inputChangeHandler(e){const{name:t,value:o}=e.target,[r,s]=t.split(".");s?this.setting[r][s]=o:this.setting[r]=o}_checkChangeHandler(e){const{name:t,checked:o}=e.target,[r,s]=t.split(".");s?this.setting[r][s]=o:this.setting[r]=o,r==="customRequest"&&(this.customRequest=o)}_settingConfirmHandler(){this.emit("setting:confirm",{detail:{setting:this.setting}})}_settingCancelHandler(){this.emit("setting:hide")}updated(e){var t;super.updated(e),(t=this.dialog)==null||t.addEventListener("sl-request-close",o=>{o.detail.source==="overlay"&&o.preventDefault()})}};ie.styles=Hf,je([$({type:Boolean})],ie.prototype,"open",2),je([$({type:Object})],ie.prototype,"setting",2),je([$({type:Boolean})],ie.prototype,"clearMessageDialogOpen",2),je([Ro("sl-dialog")],ie.prototype,"dialog",2),je([$({type:Boolean})],ie.prototype,"customRequest",2),ie=je([ot("cb-setting")],ie),H.define("sl-popup");const Zf=X`
5298
+ `}_clearCacheHandler(){this.emit("message:clear"),this.clearMessageDialogOpen=!1}_inputChangeHandler(e){const{name:t,value:o}=e.target,[r,s]=t.split(".");s?this.setting[r][s]=o:this.setting[r]=o}_checkChangeHandler(e){const{name:t,checked:o}=e.target,[r,s]=t.split(".");s?this.setting[r][s]=o:this.setting[r]=o,r==="customRequest"&&(this.customRequest=o)}_settingConfirmHandler(){this.emit("setting:confirm",{detail:{setting:this.setting}})}_settingCancelHandler(){this.emit("setting:hide")}updated(e){var t;super.updated(e),(t=this.dialog)==null||t.addEventListener("sl-request-close",o=>{o.detail.source==="overlay"&&o.preventDefault()})}};ae.styles=_g,Ke([g({type:Boolean})],ae.prototype,"open",2),Ke([g({type:Object})],ae.prototype,"setting",2),Ke([g({type:Boolean})],ae.prototype,"clearMessageDialogOpen",2),Ke([V("sl-dialog")],ae.prototype,"dialog",2),Ke([g({type:Boolean})],ae.prototype,"customRequest",2),ae=Ke([tt("cb-setting")],ae),U.define("sl-popup");const Ag=z`
5310
5299
  ${Et}
5311
5300
  :host {
5312
5301
  --primary-color: var(--sl-color-primary-600);
@@ -5351,11 +5340,11 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
5351
5340
  }
5352
5341
 
5353
5342
  .cb-engage-popup {
5354
- min-width: 200px;
5343
+ min-width: 250px;
5355
5344
  min-height: 100px;
5356
- color: rgb(34, 34, 34);
5345
+ color: var(--enegelai-bot-popup-color, rgb(0, 0, 0));
5357
5346
  padding: 10px;
5358
- background-color: var(--sl-color-gray-50);
5347
+ background: var(--enegelai-bot-popup-background, var(--sl-color-gray-50));
5359
5348
  //border: 1px solid;
5360
5349
  //border-color: var(--sl-color-gray-100);
5361
5350
  border-radius: 6px;
@@ -5368,25 +5357,49 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
5368
5357
  font-stretch: normal;
5369
5358
  font-variant: normal;
5370
5359
  cursor: pointer;
5371
- box-shadow: rgba(148, 149, 150, 0.2) 20px 20px 40px 20px;
5372
- //box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
5360
+ //box-shadow: rgba(148, 149, 150, 0.4) 20px 20px 20px 20px;
5361
+ box-shadow:
5362
+ 0 4px 8px 0 rgba(0, 0, 0, 0.2),
5363
+ 0 6px 20px 0 rgba(0, 0, 0, 0.19);
5373
5364
  }
5374
5365
 
5375
5366
  .cb-anchor sl-popup {
5376
- --arrow-color: var(--sl-color-gray-300);
5367
+ --arrow-color: var(--sl-color-gray-500);
5377
5368
  }
5378
- `,Wf='<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M16 8c0 3.866-3.582 7-8 7a9.06 9.06 0 0 1-2.347-.306c-.584.296-1.925.864-4.181 1.234c-.2.032-.352-.176-.273-.362c.354-.836.674-1.95.77-2.966C.744 11.37 0 9.76 0 8c0-3.866 3.582-7 8-7s8 3.134 8 7zM5 8a1 1 0 1 0-2 0a1 1 0 0 0 2 0zm4 0a1 1 0 1 0-2 0a1 1 0 0 0 2 0zm3 1a1 1 0 1 0 0-2a1 1 0 0 0 0 2z"/></svg>';var Kf=Object.defineProperty,Yf=Object.getOwnPropertyDescriptor,Ka=(e,t,o,r)=>{for(var s=r>1?void 0:r?Yf(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&Kf(t,o,s),s};let vr=class extends ct{constructor(){super(...arguments),this.open=!1}_clickHandler(){const e=!this.open;this.emit("chatbot:toggle",{detail:{open:e}}),this.open=e}_popupClickHandler(){console.log("Popup clicked!")}render(){return T`
5369
+
5370
+ .cb-engage-popup-close {
5371
+ position: absolute;
5372
+ top: 0;
5373
+ right: 0;
5374
+ margin: 6px;
5375
+ color: var(--enegelai-bot-popup-close-color, var(--sl-color-gray-400));
5376
+ }
5377
+
5378
+ .cb-engage-popup-content {
5379
+ padding: 2px;
5380
+ margin-top: 10px;
5381
+ display: flex;
5382
+ align-items: start;
5383
+ gap: 10px;
5384
+ }
5385
+ `,Cg='<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M16 8c0 3.866-3.582 7-8 7a9.06 9.06 0 0 1-2.347-.306c-.584.296-1.925.864-4.181 1.234c-.2.032-.352-.176-.273-.362c.354-.836.674-1.95.77-2.966C.744 11.37 0 9.76 0 8c0-3.866 3.582-7 8-7s8 3.134 8 7zM5 8a1 1 0 1 0-2 0a1 1 0 0 0 2 0zm4 0a1 1 0 1 0-2 0a1 1 0 0 0 2 0zm3 1a1 1 0 1 0 0-2a1 1 0 0 0 0 2z"/></svg>';var $g=Object.defineProperty,Eg=Object.getOwnPropertyDescriptor,fl=(e,t,o,r)=>{for(var s=r>1?void 0:r?Eg(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&$g(t,o,s),s};let $r=class extends at{constructor(){super(...arguments),this.store=new pn(this,R),this.open=!1}_clickHandler(){const e=!this.open;this.emit("chatbot:toggle",{detail:{open:e}}),this.open=e}_engageClickHandler(e){console.log("engage close clicked!"),R.engage=!1,e.stopPropagation()}render(){return A`
5379
5386
  <div class="cb-anchor ${this.open?"open":""}" part="cb-anchor" @click=${this._clickHandler.bind(this)}>
5380
- <sl-popup placement="top-end" distance="16">
5387
+ <sl-popup placement="top-end" distance="16" ?active="${R.engage&&!R.open}">
5381
5388
  <sl-button slot="anchor" label="Start" size="large" variant="primary" class="icon anchor-button" circle>
5382
- ${Me(this.open,()=>T`<cb-icon color="white" svg="${ys}"></cb-icon>`,()=>T`<cb-icon color="white" svg="${Wf}"></cb-icon>`)}
5389
+ ${Oe(this.open,()=>A`<cb-icon color="white" svg="${sr}"></cb-icon>`,()=>A`<cb-icon color="white" svg="${Cg}"></cb-icon>`)}
5383
5390
  </sl-button>
5384
- <div class="cb-engage-popup">Popup</div>
5391
+ <div class="cb-engage-popup">
5392
+ <div class="cb-engage-popup-close" @click=${this._engageClickHandler.bind(this)}>${Zr`${Le(sr)}`}</div>
5393
+ <div class="cb-engage-popup-content">
5394
+ <cb-icon svg="${R.setting.logoSvg}"></cb-icon>
5395
+ <div>${R.setting.engageMessage}</div>
5396
+ </div>
5397
+ </div>
5385
5398
  </sl-popup>
5386
5399
  </div>
5387
- `}};vr.styles=Zf,Ka([$({type:Boolean})],vr.prototype,"open",2),vr=Ka([ot("cb-anchor")],vr);const Jf=X`
5400
+ `}};$r.styles=Ag,fl([g({type:Boolean})],$r.prototype,"open",2),$r=fl([tt("cb-anchor")],$r);const Sg=z`
5388
5401
  ${Et}
5389
- `,Qs='<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M4.54.146A.5.5 0 0 1 4.893 0h6.214a.5.5 0 0 1 .353.146l4.394 4.394a.5.5 0 0 1 .146.353v6.214a.5.5 0 0 1-.146.353l-4.394 4.394a.5.5 0 0 1-.353.146H4.893a.5.5 0 0 1-.353-.146L.146 11.46A.5.5 0 0 1 0 11.107V4.893a.5.5 0 0 1 .146-.353L4.54.146zM5.1 1L1 5.1v5.8L5.1 15h5.8l4.1-4.1V5.1L10.9 1H5.1z"/><path d="M7.002 11a1 1 0 1 1 2 0a1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995z"/></g></svg>',Ya='<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M7.938 2.016A.13.13 0 0 1 8.002 2a.13.13 0 0 1 .063.016a.146.146 0 0 1 .054.057l6.857 11.667c.036.06.035.124.002.183a.163.163 0 0 1-.054.06a.116.116 0 0 1-.066.017H1.146a.115.115 0 0 1-.066-.017a.163.163 0 0 1-.054-.06a.176.176 0 0 1 .002-.183L7.884 2.073a.147.147 0 0 1 .054-.057zm1.044-.45a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566z"/><path d="M7.002 12a1 1 0 1 1 2 0a1 1 0 0 1-2 0zM7.1 5.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995z"/></g></svg>',Ja='<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M2.5 8a5.5 5.5 0 0 1 8.25-4.764a.5.5 0 0 0 .5-.866A6.5 6.5 0 1 0 14.5 8a.5.5 0 0 0-1 0a5.5 5.5 0 1 1-11 0z"/><path d="M15.354 3.354a.5.5 0 0 0-.708-.708L8 9.293L5.354 6.646a.5.5 0 1 0-.708.708l3 3a.5.5 0 0 0 .708 0l7-7z"/></g></svg>',Qa='<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/><path d="m8.93 6.588l-2.29.287l-.082.38l.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319c.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246c-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0a1 1 0 0 1 2 0z"/></g></svg>';var Qf=Object.defineProperty,Xf=Object.getOwnPropertyDescriptor,Xa=(e,t,o,r)=>{for(var s=r>1?void 0:r?Xf(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&Qf(t,o,s),s};const tl={error:{variant:"danger",icon:Qs},danger:{variant:"danger",icon:Qs},warning:{variant:"warning",icon:Ya},success:{variant:"success",icon:Ja},info:{variant:"primary",icon:Qa}};let yr=class extends ct{constructor(){super(...arguments),this.status="info"}render(){const{variant:e,icon:t}=tl[this.status]||tl.info;return T`<cb-icon svg=${t} color="${e}"></cb-icon>`}};yr.styles=zn,Xa([$({type:String})],yr.prototype,"status",2),yr=Xa([ot("cb-status-icon")],yr);var tg=Object.defineProperty,eg=Object.getOwnPropertyDescriptor,og=(e,t,o,r)=>{for(var s=r>1?void 0:r?eg(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&tg(t,o,s),s};let Xs=class extends ct{render(){return T` <sl-alert variant="danger" open>
5402
+ `,ln='<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M4.54.146A.5.5 0 0 1 4.893 0h6.214a.5.5 0 0 1 .353.146l4.394 4.394a.5.5 0 0 1 .146.353v6.214a.5.5 0 0 1-.146.353l-4.394 4.394a.5.5 0 0 1-.353.146H4.893a.5.5 0 0 1-.353-.146L.146 11.46A.5.5 0 0 1 0 11.107V4.893a.5.5 0 0 1 .146-.353L4.54.146zM5.1 1L1 5.1v5.8L5.1 15h5.8l4.1-4.1V5.1L10.9 1H5.1z"/><path d="M7.002 11a1 1 0 1 1 2 0a1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995z"/></g></svg>',gl='<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M7.938 2.016A.13.13 0 0 1 8.002 2a.13.13 0 0 1 .063.016a.146.146 0 0 1 .054.057l6.857 11.667c.036.06.035.124.002.183a.163.163 0 0 1-.054.06a.116.116 0 0 1-.066.017H1.146a.115.115 0 0 1-.066-.017a.163.163 0 0 1-.054-.06a.176.176 0 0 1 .002-.183L7.884 2.073a.147.147 0 0 1 .054-.057zm1.044-.45a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566z"/><path d="M7.002 12a1 1 0 1 1 2 0a1 1 0 0 1-2 0zM7.1 5.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995z"/></g></svg>',bl='<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M2.5 8a5.5 5.5 0 0 1 8.25-4.764a.5.5 0 0 0 .5-.866A6.5 6.5 0 1 0 14.5 8a.5.5 0 0 0-1 0a5.5 5.5 0 1 1-11 0z"/><path d="M15.354 3.354a.5.5 0 0 0-.708-.708L8 9.293L5.354 6.646a.5.5 0 1 0-.708.708l3 3a.5.5 0 0 0 .708 0l7-7z"/></g></svg>',ml='<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/><path d="m8.93 6.588l-2.29.287l-.082.38l.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319c.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246c-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0a1 1 0 0 1 2 0z"/></g></svg>';var qg=Object.defineProperty,Dg=Object.getOwnPropertyDescriptor,vl=(e,t,o,r)=>{for(var s=r>1?void 0:r?Dg(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&qg(t,o,s),s};const yl={error:{variant:"danger",icon:ln},danger:{variant:"danger",icon:ln},warning:{variant:"warning",icon:gl},success:{variant:"success",icon:bl},info:{variant:"primary",icon:ml}};let Er=class extends at{constructor(){super(...arguments),this.status="info"}render(){const{variant:e,icon:t}=yl[this.status]||yl.info;return A`<cb-icon svg=${t} color="${e}"></cb-icon>`}};Er.styles=bi,vl([g({type:String})],Er.prototype,"status",2),Er=vl([tt("cb-status-icon")],Er);var Tg=Object.defineProperty,Lg=Object.getOwnPropertyDescriptor,zg=(e,t,o,r)=>{for(var s=r>1?void 0:r?Lg(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&Tg(t,o,s),s};let cn=class extends at{render(){return A` <sl-alert variant="danger" open>
5390
5403
  <cb-status-icon status="error" slot="icon"></cb-status-icon>
5391
5404
  Please config openai api key in the settings.
5392
5405
  <span
@@ -5394,22 +5407,22 @@ var kg=Object.defineProperty;var Cg=(R,ut,dt)=>ut in R?kg(R,ut,{enumerable:!0,co
5394
5407
  class="color-primary text-button"
5395
5408
  >Config Now</span
5396
5409
  >
5397
- </sl-alert>`}_handleConfig(){this.emit("setting:show")}};Xs.styles=Jf,Xs=og([ot("cb-auth-alert")],Xs);class el extends Error{constructor(t,o,r){const s=t.status||t.status===0?t.status:"",n=t.statusText||"",i=`${s} ${n}`.trim(),a=i?`status code ${i}`:"an unknown error";super(`Request failed with ${a}`),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="HTTPError",this.response=t,this.request=o,this.options=r}}class ol extends Error{constructor(t){super("Request timed out"),Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="TimeoutError",this.request=t}}const wr=e=>e!==null&&typeof e=="object",_r=(...e)=>{for(const t of e)if((!wr(t)||Array.isArray(t))&&typeof t<"u")throw new TypeError("The `options` argument must be an object");return tn({},...e)},rl=(e={},t={})=>{const o=new globalThis.Headers(e),r=t instanceof globalThis.Headers,s=new globalThis.Headers(t);for(const[n,i]of s.entries())r&&i==="undefined"||i===void 0?o.delete(n):o.set(n,i);return o},tn=(...e)=>{let t={},o={};for(const r of e)if(Array.isArray(r))Array.isArray(t)||(t=[]),t=[...t,...r];else if(wr(r)){for(let[s,n]of Object.entries(r))wr(n)&&s in t&&(n=tn(t[s],n)),t={...t,[s]:n};wr(r.headers)&&(o=rl(o,r.headers),t.headers=o)}return t},rg=(()=>{let e=!1,t=!1;const o=typeof globalThis.ReadableStream=="function",r=typeof globalThis.Request=="function";return o&&r&&(t=new globalThis.Request("https://a.com",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")),e&&!t})(),sg=typeof globalThis.AbortController=="function",ng=typeof globalThis.ReadableStream=="function",ig=typeof globalThis.FormData=="function",sl=["get","post","put","patch","head","delete"],ag={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},en=2147483647,nl=Symbol("stop"),lg=e=>sl.includes(e)?e.toUpperCase():e,cg=["get","put","head","delete","options","trace"],ug=[408,413,429,500,502,503,504],il=[413,429,503],al={limit:2,methods:cg,statusCodes:ug,afterStatusCodes:il,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY},dg=(e={})=>{if(typeof e=="number")return{...al,limit:e};if(e.methods&&!Array.isArray(e.methods))throw new Error("retry.methods must be an array");if(e.statusCodes&&!Array.isArray(e.statusCodes))throw new Error("retry.statusCodes must be an array");return{...al,...e,afterStatusCodes:il}};async function hg(e,t,o){return new Promise((r,s)=>{const n=setTimeout(()=>{t&&t.abort(),s(new ol(e))},o.timeout);o.fetch(e).then(r).catch(s).then(()=>{clearTimeout(n)})})}const pg=!!globalThis.DOMException;function ll(e){if(pg)return new DOMException((e==null?void 0:e.reason)??"The operation was aborted.","AbortError");const t=new Error((e==null?void 0:e.reason)??"The operation was aborted.");return t.name="AbortError",t}async function fg(e,{signal:t}){return new Promise((o,r)=>{if(t){if(t.aborted){r(ll(t));return}t.addEventListener("abort",s,{once:!0})}function s(){r(ll(t)),clearTimeout(n)}const n=setTimeout(()=>{t==null||t.removeEventListener("abort",s),o()},e)})}class xr{static create(t,o){const r=new xr(t,o),s=async()=>{if(r._options.timeout>en)throw new RangeError(`The \`timeout\` option cannot be greater than ${en}`);await Promise.resolve();let a=await r._fetch();for(const l of r._options.hooks.afterResponse){const c=await l(r.request,r._options,r._decorateResponse(a.clone()));c instanceof globalThis.Response&&(a=c)}if(r._decorateResponse(a),!a.ok&&r._options.throwHttpErrors){let l=new el(a,r.request,r._options);for(const c of r._options.hooks.beforeError)l=await c(l);throw l}if(r._options.onDownloadProgress){if(typeof r._options.onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!ng)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return r._stream(a.clone(),r._options.onDownloadProgress)}return a},i=r._options.retry.methods.includes(r.request.method.toLowerCase())?r._retry(s):s();for(const[a,l]of Object.entries(ag))i[a]=async()=>{r.request.headers.set("accept",r.request.headers.get("accept")||l);const u=(await i).clone();if(a==="json"){if(u.status===204||(await u.clone().arrayBuffer()).byteLength===0)return"";if(o.parseJson)return o.parseJson(await u.text())}return u[a]()};return i}constructor(t,o={}){if(Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"abortController",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_retryCount",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_input",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_options",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._input=t,this._options={credentials:this._input.credentials||"same-origin",...o,headers:rl(this._input.headers,o.headers),hooks:tn({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},o.hooks),method:lg(o.method??this._input.method),prefixUrl:String(o.prefixUrl||""),retry:dg(o.retry),throwHttpErrors:o.throwHttpErrors!==!1,timeout:typeof o.timeout>"u"?1e4:o.timeout,fetch:o.fetch??globalThis.fetch.bind(globalThis)},typeof this._input!="string"&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&typeof this._input=="string"){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(sg){if(this.abortController=new globalThis.AbortController,this._options.signal){const r=this._options.signal;this._options.signal.addEventListener("abort",()=>{this.abortController.abort(r.reason)})}this._options.signal=this.abortController.signal}if(rg&&(this._options.duplex="half"),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){const s="?"+(typeof this._options.searchParams=="string"?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),n=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,s);(ig&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)&&!(this._options.headers&&this._options.headers["content-type"])&&this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(n,{...this.request}),this._options)}this._options.json!==void 0&&(this._options.body=JSON.stringify(this._options.json),this.request.headers.set("content-type",this._options.headers.get("content-type")??"application/json"),this.request=new globalThis.Request(this.request,{body:this._options.body}))}_calculateRetryDelay(t){if(this._retryCount++,this._retryCount<this._options.retry.limit&&!(t instanceof ol)){if(t instanceof el){if(!this._options.retry.statusCodes.includes(t.response.status))return 0;const r=t.response.headers.get("Retry-After");if(r&&this._options.retry.afterStatusCodes.includes(t.response.status)){let s=Number(r);return Number.isNaN(s)?s=Date.parse(r)-Date.now():s*=1e3,typeof this._options.retry.maxRetryAfter<"u"&&s>this._options.retry.maxRetryAfter?0:s}if(t.response.status===413)return 0}const o=.3;return Math.min(this._options.retry.backoffLimit,o*2**(this._retryCount-1)*1e3)}return 0}_decorateResponse(t){return this._options.parseJson&&(t.json=async()=>this._options.parseJson(await t.text())),t}async _retry(t){try{return await t()}catch(o){const r=Math.min(this._calculateRetryDelay(o),en);if(r!==0&&this._retryCount>0){await fg(r,{signal:this._options.signal});for(const s of this._options.hooks.beforeRetry)if(await s({request:this.request,options:this._options,error:o,retryCount:this._retryCount})===nl)return;return this._retry(t)}throw o}}async _fetch(){for(const t of this._options.hooks.beforeRequest){const o=await t(this.request,this._options);if(o instanceof Request){this.request=o;break}if(o instanceof Response)return o}return this._options.timeout===!1?this._options.fetch(this.request.clone()):hg(this.request.clone(),this.abortController,this._options)}_stream(t,o){const r=Number(t.headers.get("content-length"))||0;let s=0;return t.status===204?(o&&o({percent:1,totalBytes:r,transferredBytes:s},new Uint8Array),new globalThis.Response(null,{status:t.status,statusText:t.statusText,headers:t.headers})):new globalThis.Response(new globalThis.ReadableStream({async start(n){const i=t.body.getReader();o&&o({percent:0,transferredBytes:0,totalBytes:r},new Uint8Array);async function a(){const{done:l,value:c}=await i.read();if(l){n.close();return}if(o){s+=c.byteLength;const u=r===0?0:s/r;o({percent:u,transferredBytes:s,totalBytes:r},c)}n.enqueue(c),await a()}await a()}}),{status:t.status,statusText:t.statusText,headers:t.headers})}}/*! MIT License © Sindre Sorhus */const on=e=>{const t=(o,r)=>xr.create(o,_r(e,r));for(const o of sl)t[o]=(r,s)=>xr.create(r,_r(e,s,{method:o}));return t.create=o=>on(_r(o)),t.extend=o=>on(_r(e,o)),t.stop=nl,t},cl=on().extend({hooks:{beforeRequest:[()=>{}]}});async function gg(e,t){const{onmessage:o,onclose:r,...s}=t,n=async(i,a)=>{const{value:l,done:c}=await a.read();c?(i.close(),r==null||r()):(o==null||o(l),i.enqueue(l),n(i,a))};return s.body&&typeof s.body=="object"&&(s.body=JSON.stringify(s.body)),console.log("Fetching:",s),fetch(e,s).then(i=>{const a=i.body.getReader();return new ReadableStream({start(c){n(c,a)}})}).then(i=>new Response(i,{headers:{"Content-Type":"text/html"}}).text())}async function bg(e,t){const o=new FormData;for(let s=0;s<t.length;s++)o.append("files",t[s]);const r=await cl.post(e,{body:o});try{return await r.json()}catch(s){return{code:1,url:"",message:s.message}}}const ul={error:{variant:"danger",icon:Qs},warning:{variant:"warning",icon:Ya},success:{variant:"success",icon:Ja},info:{variant:"primary",icon:Qa}};function mg(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}function vg(e="info",t,o=1e8){const{variant:r,icon:s}=ul[e]||ul.info,n=Object.assign(document.createElement("sl-alert"),{variant:r,closable:!0,duration:o,innerHTML:`
5410
+ </sl-alert>`}_handleConfig(){this.emit("setting:show")}};cn.styles=Sg,cn=zg([tt("cb-auth-alert")],cn);class wl extends Error{constructor(t,o,r){const s=t.status||t.status===0?t.status:"",n=t.statusText||"",i=`${s} ${n}`.trim(),a=i?`status code ${i}`:"an unknown error";super(`Request failed with ${a}`),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="HTTPError",this.response=t,this.request=o,this.options=r}}class _l extends Error{constructor(t){super("Request timed out"),Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="TimeoutError",this.request=t}}const Sr=e=>e!==null&&typeof e=="object",qr=(...e)=>{for(const t of e)if((!Sr(t)||Array.isArray(t))&&typeof t<"u")throw new TypeError("The `options` argument must be an object");return un({},...e)},xl=(e={},t={})=>{const o=new globalThis.Headers(e),r=t instanceof globalThis.Headers,s=new globalThis.Headers(t);for(const[n,i]of s.entries())r&&i==="undefined"||i===void 0?o.delete(n):o.set(n,i);return o},un=(...e)=>{let t={},o={};for(const r of e)if(Array.isArray(r))Array.isArray(t)||(t=[]),t=[...t,...r];else if(Sr(r)){for(let[s,n]of Object.entries(r))Sr(n)&&s in t&&(n=un(t[s],n)),t={...t,[s]:n};Sr(r.headers)&&(o=xl(o,r.headers),t.headers=o)}return t},Rg=(()=>{let e=!1,t=!1;const o=typeof globalThis.ReadableStream=="function",r=typeof globalThis.Request=="function";return o&&r&&(t=new globalThis.Request("https://a.com",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")),e&&!t})(),Pg=typeof globalThis.AbortController=="function",Mg=typeof globalThis.ReadableStream=="function",Ig=typeof globalThis.FormData=="function",kl=["get","post","put","patch","head","delete"],Fg={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},dn=2147483647,Al=Symbol("stop"),Bg=e=>kl.includes(e)?e.toUpperCase():e,Og=["get","put","head","delete","options","trace"],Ng=[408,413,429,500,502,503,504],Cl=[413,429,503],$l={limit:2,methods:Og,statusCodes:Ng,afterStatusCodes:Cl,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY},Vg=(e={})=>{if(typeof e=="number")return{...$l,limit:e};if(e.methods&&!Array.isArray(e.methods))throw new Error("retry.methods must be an array");if(e.statusCodes&&!Array.isArray(e.statusCodes))throw new Error("retry.statusCodes must be an array");return{...$l,...e,afterStatusCodes:Cl}};async function Hg(e,t,o){return new Promise((r,s)=>{const n=setTimeout(()=>{t&&t.abort(),s(new _l(e))},o.timeout);o.fetch(e).then(r).catch(s).then(()=>{clearTimeout(n)})})}const Ug=!!globalThis.DOMException;function El(e){if(Ug)return new DOMException((e==null?void 0:e.reason)??"The operation was aborted.","AbortError");const t=new Error((e==null?void 0:e.reason)??"The operation was aborted.");return t.name="AbortError",t}async function jg(e,{signal:t}){return new Promise((o,r)=>{if(t){if(t.aborted){r(El(t));return}t.addEventListener("abort",s,{once:!0})}function s(){r(El(t)),clearTimeout(n)}const n=setTimeout(()=>{t==null||t.removeEventListener("abort",s),o()},e)})}class Dr{static create(t,o){const r=new Dr(t,o),s=async()=>{if(r._options.timeout>dn)throw new RangeError(`The \`timeout\` option cannot be greater than ${dn}`);await Promise.resolve();let a=await r._fetch();for(const l of r._options.hooks.afterResponse){const c=await l(r.request,r._options,r._decorateResponse(a.clone()));c instanceof globalThis.Response&&(a=c)}if(r._decorateResponse(a),!a.ok&&r._options.throwHttpErrors){let l=new wl(a,r.request,r._options);for(const c of r._options.hooks.beforeError)l=await c(l);throw l}if(r._options.onDownloadProgress){if(typeof r._options.onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!Mg)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return r._stream(a.clone(),r._options.onDownloadProgress)}return a},i=r._options.retry.methods.includes(r.request.method.toLowerCase())?r._retry(s):s();for(const[a,l]of Object.entries(Fg))i[a]=async()=>{r.request.headers.set("accept",r.request.headers.get("accept")||l);const u=(await i).clone();if(a==="json"){if(u.status===204||(await u.clone().arrayBuffer()).byteLength===0)return"";if(o.parseJson)return o.parseJson(await u.text())}return u[a]()};return i}constructor(t,o={}){if(Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"abortController",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_retryCount",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_input",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_options",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._input=t,this._options={credentials:this._input.credentials||"same-origin",...o,headers:xl(this._input.headers,o.headers),hooks:un({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},o.hooks),method:Bg(o.method??this._input.method),prefixUrl:String(o.prefixUrl||""),retry:Vg(o.retry),throwHttpErrors:o.throwHttpErrors!==!1,timeout:typeof o.timeout>"u"?1e4:o.timeout,fetch:o.fetch??globalThis.fetch.bind(globalThis)},typeof this._input!="string"&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&typeof this._input=="string"){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(Pg){if(this.abortController=new globalThis.AbortController,this._options.signal){const r=this._options.signal;this._options.signal.addEventListener("abort",()=>{this.abortController.abort(r.reason)})}this._options.signal=this.abortController.signal}if(Rg&&(this._options.duplex="half"),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){const s="?"+(typeof this._options.searchParams=="string"?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),n=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,s);(Ig&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)&&!(this._options.headers&&this._options.headers["content-type"])&&this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(n,{...this.request}),this._options)}this._options.json!==void 0&&(this._options.body=JSON.stringify(this._options.json),this.request.headers.set("content-type",this._options.headers.get("content-type")??"application/json"),this.request=new globalThis.Request(this.request,{body:this._options.body}))}_calculateRetryDelay(t){if(this._retryCount++,this._retryCount<this._options.retry.limit&&!(t instanceof _l)){if(t instanceof wl){if(!this._options.retry.statusCodes.includes(t.response.status))return 0;const r=t.response.headers.get("Retry-After");if(r&&this._options.retry.afterStatusCodes.includes(t.response.status)){let s=Number(r);return Number.isNaN(s)?s=Date.parse(r)-Date.now():s*=1e3,typeof this._options.retry.maxRetryAfter<"u"&&s>this._options.retry.maxRetryAfter?0:s}if(t.response.status===413)return 0}const o=.3;return Math.min(this._options.retry.backoffLimit,o*2**(this._retryCount-1)*1e3)}return 0}_decorateResponse(t){return this._options.parseJson&&(t.json=async()=>this._options.parseJson(await t.text())),t}async _retry(t){try{return await t()}catch(o){const r=Math.min(this._calculateRetryDelay(o),dn);if(r!==0&&this._retryCount>0){await jg(r,{signal:this._options.signal});for(const s of this._options.hooks.beforeRetry)if(await s({request:this.request,options:this._options,error:o,retryCount:this._retryCount})===Al)return;return this._retry(t)}throw o}}async _fetch(){for(const t of this._options.hooks.beforeRequest){const o=await t(this.request,this._options);if(o instanceof Request){this.request=o;break}if(o instanceof Response)return o}return this._options.timeout===!1?this._options.fetch(this.request.clone()):Hg(this.request.clone(),this.abortController,this._options)}_stream(t,o){const r=Number(t.headers.get("content-length"))||0;let s=0;return t.status===204?(o&&o({percent:1,totalBytes:r,transferredBytes:s},new Uint8Array),new globalThis.Response(null,{status:t.status,statusText:t.statusText,headers:t.headers})):new globalThis.Response(new globalThis.ReadableStream({async start(n){const i=t.body.getReader();o&&o({percent:0,transferredBytes:0,totalBytes:r},new Uint8Array);async function a(){const{done:l,value:c}=await i.read();if(l){n.close();return}if(o){s+=c.byteLength;const u=r===0?0:s/r;o({percent:u,transferredBytes:s,totalBytes:r},c)}n.enqueue(c),await a()}await a()}}),{status:t.status,statusText:t.statusText,headers:t.headers})}}/*! MIT License © Sindre Sorhus */const hn=e=>{const t=(o,r)=>Dr.create(o,qr(e,r));for(const o of kl)t[o]=(r,s)=>Dr.create(r,qr(e,s,{method:o}));return t.create=o=>hn(qr(o)),t.extend=o=>hn(qr(e,o)),t.stop=Al,t},Sl=hn().extend({hooks:{beforeRequest:[()=>{}]}});async function Gg(e,t){const{onmessage:o,onclose:r,...s}=t,n=async(i,a)=>{const{value:l,done:c}=await a.read();c?(i.close(),r==null||r()):(o==null||o(l),i.enqueue(l),n(i,a))};return s.body&&typeof s.body=="object"&&(s.body=JSON.stringify(s.body)),console.log("Fetching:",s),fetch(e,s).then(i=>{const a=i.body.getReader();return new ReadableStream({start(c){n(c,a)}})}).then(i=>new Response(i,{headers:{"Content-Type":"text/html"}}).text())}async function Zg(e,t){const o=new FormData;for(let s=0;s<t.length;s++)o.append("files",t[s]);const r=await Sl.post(e,{body:o});try{return await r.json()}catch(s){return{code:1,url:"",message:s.message}}}const ql={error:{variant:"danger",icon:ln},warning:{variant:"warning",icon:gl},success:{variant:"success",icon:bl},info:{variant:"primary",icon:ml}};function Wg(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}function Kg(e="info",t,o=1e8){const{variant:r,icon:s}=ql[e]||ql.info,n=Object.assign(document.createElement("sl-alert"),{variant:r,closable:!0,duration:o,innerHTML:`
5398
5411
  <cb-status-icon slot="icon" status="${e}"></cb-status-icon>
5399
- ${mg(t)}
5400
- `});return document.body.append(n),n.toast()}async function yg(e,t){const o=e.getReader(),r=new TextDecoder("utf-8");let s=!1;for(;!s;){const{value:n,done:i}=await o.read();if(n){let a=r.decode(n);const l=a.lastIndexOf("data:"),c=a.lastIndexOf(`
5412
+ ${Wg(t)}
5413
+ `});return document.body.append(n),n.toast()}async function Yg(e,t){const o=e.getReader(),r=new TextDecoder("utf-8");let s=!1;for(;!s;){const{value:n,done:i}=await o.read();if(n){let a=r.decode(n);const l=a.lastIndexOf("data:"),c=a.lastIndexOf(`
5401
5414
  `);if(l!==-1&&(a=a.slice(l+6)),c!==-1&&(a=a.slice(0,c)),a=a.trim(),a===`
5402
- `||a==="")continue;if(a==="[DONE]"){s=!0;continue}try{const u=JSON.parse(a);t(null,u)}catch(u){console.log("error",u),t(u,null)}}s=i}}async function wg(e){var s;if(!e.apiKey)throw new Error("apiKey is required");const t=e.options??{};t.model||(t.model="gpt-3.5-turbo");const o=await cl.post(e.url,{json:{messages:e.messages,...e.options??{}},headers:{"Content-Type":"application/json",Authorization:`Bearer ${e.apiKey}`},timeout:1e3*60*10,signal:e.signal}),r=o.body;if(!r)throw new Error("No data");if((s=e.options)!=null&&s.stream){await yg(r,e.onMessage);return}return o.json()}var _g=Object.defineProperty,xg=Object.getOwnPropertyDescriptor,Y=(e,t,o,r)=>{for(var s=r>1?void 0:r?xg(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&_g(t,o,s),s};const rn=Po.noConflict();rn.setLevel("info"),R.default=class extends ct{constructor(){super(...arguments),this.store=new gl(this,V),this.displayLicense=!1,this.name="ChatBot",this.orgId="",this.botId="",this.url="ws://localhost:3070",this.welcomeMessage="Hello! How can I help you today ?",this.logoSvg=` <svg width="24" height="24" viewBox="0 0 40 40">
5415
+ `||a==="")continue;if(a==="[DONE]"){s=!0;continue}try{const u=JSON.parse(a);t(null,u)}catch(u){console.log("error",u),t(u,null)}}s=i}}async function Jg(e){var s;if(!e.apiKey)throw new Error("apiKey is required");const t=e.options??{};t.model||(t.model="gpt-3.5-turbo");const o=await Sl.post(e.url,{json:{messages:e.messages,...e.options??{}},headers:{"Content-Type":"application/json",Authorization:`Bearer ${e.apiKey}`},timeout:1e3*60*10,signal:e.signal}),r=o.body;if(!r)throw new Error("No data");if((s=e.options)!=null&&s.stream){await Yg(r,e.onMessage);return}return o.json()}var Qg=Object.defineProperty,Xg=Object.getOwnPropertyDescriptor,Y=(e,t,o,r)=>{for(var s=r>1?void 0:r?Xg(t,o):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(s=(r?i(t,o,s):i(s))||s);return r&&s&&Qg(t,o,s),s};const Tr=No.noConflict();Tr.setLevel("info"),M.default=class extends at{constructor(){super(...arguments),this.store=new pn(this,R),this.displayLicense=!1,this.name="ChatBot",this.orgId="",this.botId="",this.url="ws://localhost:3070",this.logoSvg=` <svg width="24" height="24" viewBox="0 0 40 40">
5403
5416
  <path
5404
5417
  d="M34.728 0.275L2.245 15.267c-3.748 1.749 -2.498 7.246 1.499 7.246h13.743v13.743c0 3.998 5.497 5.248 7.246 1.499l14.992 -32.483c1.249 -2.999 -1.999 -6.248 -4.998 -4.998z"
5405
5418
  fill="#E24D42"
5406
5419
  ></path>
5407
5420
  </svg>
5408
- `,this.botIconSvg='<svg fill="currentColor" width="24" height="24" viewBox="0 0 24 24"> <path d="M16 17V19H2V17S2 13 9 13 16 17 16 17M12.5 7.5A3.5 3.5 0 1 0 9 11A3.5 3.5 0 0 0 12.5 7.5M15.94 13A5.32 5.32 0 0 1 18 17V19H22V17S22 13.37 15.94 13M15 4A3.39 3.39 0 0 0 13.07 4.59A5 5 0 0 1 13.07 10.41A3.39 3.39 0 0 0 15 11A3.5 3.5 0 0 0 15 4Z" /></svg>',this.userIconSvg='<svg fill="currentColor" viewBox="0 0 24 24" width="24" height="24"> <path d="M12 4a4 4 0 0 1 4 4a4 4 0 0 1-4 4a4 4 0 0 1-4-4a4 4 0 0 1 4-4m0 10c4.42 0 8 1.79 8 4v2H4v-2c0-2.21 3.58-4 8-4Z" /></svg>',this.systemIconSvg='<svg fill="currentColor" width="24" height="24" viewBox="0 0 24 24"> <path d="M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z"/></svg>',this.stream=!1,this.customRequest=!1,this.enableFileUpload=!1,this.uploadFileUrl="",this.open=!1,this.loading=!1,this.showSetting=!1,this.showAuthAlert=!1,this.fetchStream=gg}decodeStreamData(t){return new TextDecoder().decode(t)}addMessage(){const t={author:"assistant",type:"text",isThinking:!0,data:{}};return V.addMessage(t),t}addTestMessage(){const t={author:"assistant",type:"text",isThinking:!1,data:{text:"Long text.The element may not be scrolled completely to the top or bottom depending on the layout of other elements.The element may not be scrolled completely to the top or bottom depending on the layout of other elements."}};return V.addMessage(t),t}render(){return T`
5409
- <div class="cb-wrapper" style="${this.open?"display:flex":"display:none"}">
5421
+ `,this.botIconSvg='<svg fill="currentColor" width="24" height="24" viewBox="0 0 24 24"> <path d="M16 17V19H2V17S2 13 9 13 16 17 16 17M12.5 7.5A3.5 3.5 0 1 0 9 11A3.5 3.5 0 0 0 12.5 7.5M15.94 13A5.32 5.32 0 0 1 18 17V19H22V17S22 13.37 15.94 13M15 4A3.39 3.39 0 0 0 13.07 4.59A5 5 0 0 1 13.07 10.41A3.39 3.39 0 0 0 15 11A3.5 3.5 0 0 0 15 4Z" /></svg>',this.userIconSvg='<svg fill="currentColor" viewBox="0 0 24 24" width="24" height="24"> <path d="M12 4a4 4 0 0 1 4 4a4 4 0 0 1-4 4a4 4 0 0 1-4-4a4 4 0 0 1 4-4m0 10c4.42 0 8 1.79 8 4v2H4v-2c0-2.21 3.58-4 8-4Z" /></svg>',this.systemIconSvg='<svg fill="currentColor" width="24" height="24" viewBox="0 0 24 24"> <path d="M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z"/></svg>',this.stream=!1,this.customRequest=!1,this.enableFileUpload=!1,this.uploadFileUrl="",this.open=!1,this.loading=!1,this.showSetting=!1,this.showAuthAlert=!1,this.fetchStream=Gg}decodeStreamData(t){return new TextDecoder().decode(t)}addMessage(){const t={author:"assistant",type:"text",isThinking:!0,data:{}};return R.addMessage(t),t}addTestMessage(){const t={author:"assistant",type:"text",isThinking:!1,data:{text:"Long text.The element may not be scrolled completely to the top or bottom depending on the layout of other elements.The element may not be scrolled completely to the top or bottom depending on the layout of other elements."}};return R.addMessage(t),t}render(){return A`
5422
+ <div class="cb-wrapper" style="${R.open?"display:flex":"display:none"}">
5410
5423
  <cb-header title="${this.name}"></cb-header>
5411
- <cb-message-list .messages=${V.messages} .actions=${V.actions}></cb-message-list>
5424
+ <cb-message-list .messages=${R.messages} .actions=${R.actions}></cb-message-list>
5412
5425
  <cb-user-input ?loading=${this.loading} ?disabled=${this.loading||this.showAuthAlert} ?enable-file-upload=${this.enableFileUpload}></cb-user-input>
5413
5426
  </div>
5414
- <cb-anchor ?open=${this.open}></cb-anchor>
5415
- `}connectedCallback(){super.connectedCallback(),rn.info("connectedCallback"),addEventListener("setting:show",()=>{this.showSetting=!0}),addEventListener("message:send",this._addMessageHandler.bind(this)),addEventListener("message:remove",this._deleteMessageHandler.bind(this)),addEventListener("setting:confirm",this._settingConfirmHandler.bind(this)),addEventListener("setting:hide",()=>{this.showSetting=!1}),addEventListener("chatbot:toggle",t=>{const o=t.detail;this.open=o.open}),addEventListener("message:clear",()=>{V.clearMessages()}),addEventListener("message:send:file",this._sendFileHandler.bind(this)),addEventListener("setting:show",()=>{this.showSetting=!0})}updated(t){super.updated(t),t.size>0&&(rn.info("updated,_changedProperties:",t),this._initSetting()),setTimeout(()=>{this._scrollToBottom()},0)}_initSetting(){const t=V.setting;t.orgId=this.orgId,t.botId=this.botId,t.url=this.url,t.welcomeMessage=this.welcomeMessage,t.logoSvg=this.logoSvg,t.botIconSvg=this.botIconSvg,t.userIconSvg=this.userIconSvg,t.systemIconSvg=this.systemIconSvg,V.setSetting(t)}setLoading(t){this.loading=t}clearConversation(){V.clearConversation()}_checkAuth(){}async _sendToOpenai(t,o){let r="";const s=V.setting.openai.apiBase||"https://api.openai.com/v1",n=await wg({url:`${s}/chat/completions`,apiKey:V.setting.openai.apiKey,messages:o,options:{stream:V.setting.stream,model:V.setting.openai.model},onMessage:(i,a)=>{var l;if(i){console.error(i);return}a&&((l=a.choices[0].delta)!=null&&l.content)&&requestIdleCallback(()=>{r+=a.choices[0].delta.content,V.updateMessage(t,r)})}});!V.setting.stream&&n&&V.updateMessage(t,n.choices[0].message.content)}async _sendHandler(t){this.setLoading(!0);const o={author:"assistant",type:"text",isThinking:!0,data:{}};if(V.addMessage(o),this.customRequest)await this.emit("chatbot:send",{detail:{newMessage:o,messages:t},bubbles:!0,composed:!0});else try{await this._sendToOpenai(o,t)}catch(r){vg("error",r.message),console.error(r)}this.setLoading(!1)}_addMessageHandler(t){const o=t.detail;V.sendMessage(o)}_deleteMessageHandler(t){const o=t.detail;V.removeMessage(o.id)}async _sendFileHandler(t){const o=t.detail,s={author:"user",type:"file",isUploading:!0,data:{files:o.files.map((n,i)=>({id:`${n.name}-${i}`,name:n.name,size:n.size,type:n.type,url:""}))}};if(V.addMessage(s),this.uploadFileUrl){const n=await bg(this.uploadFileUrl,o.files);n.code===0&&n.data&&(s.isUploading=!1,s.data={files:n.data},V.updateMessage(s))}this.emit("chatbot:file:send",{detail:{files:o.files,message:s}})}_settingConfirmHandler(t){const o=t.detail;V.setSetting(o.setting),this.showSetting=!1,this._checkAuth()}_scrollToBottom(t=!1){var o;(o=this._messageList)==null||o.scrollToBottom()}},R.default.styles=Tl,Y([$({type:Boolean,attribute:"display-license"})],R.default.prototype,"displayLicense",2),Y([$({type:String,attribute:"name"})],R.default.prototype,"name",2),Y([$({type:String,attribute:"org-id"})],R.default.prototype,"orgId",2),Y([$({type:String,attribute:"bot-id"})],R.default.prototype,"botId",2),Y([$({type:String,attribute:"url"})],R.default.prototype,"url",2),Y([$({type:String,attribute:"welcome-message"})],R.default.prototype,"welcomeMessage",2),Y([$({type:String,attribute:"logo-svg"})],R.default.prototype,"logoSvg",2),Y([$({type:String,attribute:"bot-icon-svg"})],R.default.prototype,"botIconSvg",2),Y([$({type:String,attribute:"user-icon-svg"})],R.default.prototype,"userIconSvg",2),Y([$({type:String,attribute:"system-icon-svg"})],R.default.prototype,"systemIconSvg",2),Y([$({type:Boolean,attribute:"stream"})],R.default.prototype,"stream",2),Y([$({type:Boolean,attribute:"custom-request"})],R.default.prototype,"customRequest",2),Y([$({type:Boolean,attribute:"enable-file-upload"})],R.default.prototype,"enableFileUpload",2),Y([$({type:String,attribute:"upload-file-url"})],R.default.prototype,"uploadFileUrl",2),Y([$({type:Boolean,attribute:"open"})],R.default.prototype,"open",2),Y([$({type:Boolean})],R.default.prototype,"loading",2),Y([$({type:Boolean})],R.default.prototype,"showSetting",2),Y([$({type:Boolean})],R.default.prototype,"showAuthAlert",2),Y([Ro("cb-message-list")],R.default.prototype,"_messageList",2),R.default=Y([ot("enegelai-bot")],R.default),Object.defineProperties(R,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
5427
+ <cb-anchor ?open=${R.open}></cb-anchor>
5428
+ `}connectedCallback(){super.connectedCallback(),Tr.info("connectedCallback"),addEventListener("setting:show",()=>{this.showSetting=!0}),addEventListener("message:send",this._addMessageHandler.bind(this)),addEventListener("message:remove",this._deleteMessageHandler.bind(this)),addEventListener("setting:confirm",this._settingConfirmHandler.bind(this)),addEventListener("setting:hide",()=>{this.showSetting=!1}),addEventListener("chatbot:toggle",t=>{const o=t.detail;R.open=o.open,R.engage=!1}),addEventListener("message:clear",()=>{R.clearMessages()}),addEventListener("message:send:file",this._sendFileHandler.bind(this)),addEventListener("setting:show",()=>{this.showSetting=!0})}updated(t){super.updated(t),Tr.info("updated,_changedProperties:",t),t.size>0&&(Tr.info("updated,_changedProperties:",t),this._initSetting()),setTimeout(()=>{this._scrollToBottom()},0)}_initSetting(){const t=R.setting;t.orgId=this.orgId,t.botId=this.botId,t.url=this.url,t.logoSvg=this.logoSvg,t.botIconSvg=this.botIconSvg,t.userIconSvg=this.userIconSvg,t.systemIconSvg=this.systemIconSvg,R.setSetting(t)}setLoading(t){this.loading=t}clearConversation(){R.clearConversation()}_checkAuth(){}async _sendToOpenai(t,o){let r="";const s=R.setting.openai.apiBase||"https://api.openai.com/v1",n=await Jg({url:`${s}/chat/completions`,apiKey:R.setting.openai.apiKey,messages:o,options:{stream:R.setting.stream,model:R.setting.openai.model},onMessage:(i,a)=>{var l;if(i){console.error(i);return}a&&((l=a.choices[0].delta)!=null&&l.content)&&requestIdleCallback(()=>{r+=a.choices[0].delta.content,R.updateMessage(t,r)})}});!R.setting.stream&&n&&R.updateMessage(t,n.choices[0].message.content)}async _sendHandler(t){this.setLoading(!0);const o={author:"assistant",type:"text",isThinking:!0,data:{}};if(R.addMessage(o),this.customRequest)await this.emit("chatbot:send",{detail:{newMessage:o,messages:t},bubbles:!0,composed:!0});else try{await this._sendToOpenai(o,t)}catch(r){Kg("error",r.message),console.error(r)}this.setLoading(!1)}_addMessageHandler(t){const o=t.detail;R.sendMessage(o)}_deleteMessageHandler(t){const o=t.detail;R.removeMessage(o.id)}async _sendFileHandler(t){const o=t.detail,s={author:"user",type:"file",isUploading:!0,data:{files:o.files.map((n,i)=>({id:`${n.name}-${i}`,name:n.name,size:n.size,type:n.type,url:""}))}};if(R.addMessage(s),this.uploadFileUrl){const n=await Zg(this.uploadFileUrl,o.files);n.code===0&&n.data&&(s.isUploading=!1,s.data={files:n.data},R.updateMessage(s))}this.emit("chatbot:file:send",{detail:{files:o.files,message:s}})}_settingConfirmHandler(t){const o=t.detail;R.setSetting(o.setting),this.showSetting=!1,this._checkAuth()}_scrollToBottom(t=!1){var o;console.log("Scrolling to bottom ..."),(o=this._messageList)==null||o.scrollToBottom()}},M.default.styles=kc,Y([g({type:Boolean,attribute:"display-license"})],M.default.prototype,"displayLicense",2),Y([g({type:String,attribute:"name"})],M.default.prototype,"name",2),Y([g({type:String,attribute:"org-id"})],M.default.prototype,"orgId",2),Y([g({type:String,attribute:"bot-id"})],M.default.prototype,"botId",2),Y([g({type:String,attribute:"url"})],M.default.prototype,"url",2),Y([g({type:String,attribute:"logo-svg"})],M.default.prototype,"logoSvg",2),Y([g({type:String,attribute:"bot-icon-svg"})],M.default.prototype,"botIconSvg",2),Y([g({type:String,attribute:"user-icon-svg"})],M.default.prototype,"userIconSvg",2),Y([g({type:String,attribute:"system-icon-svg"})],M.default.prototype,"systemIconSvg",2),Y([g({type:Boolean,attribute:"stream"})],M.default.prototype,"stream",2),Y([g({type:Boolean,attribute:"custom-request"})],M.default.prototype,"customRequest",2),Y([g({type:Boolean,attribute:"enable-file-upload"})],M.default.prototype,"enableFileUpload",2),Y([g({type:String,attribute:"upload-file-url"})],M.default.prototype,"uploadFileUrl",2),Y([g({type:Boolean,attribute:"open"})],M.default.prototype,"open",2),Y([g({type:Boolean})],M.default.prototype,"loading",2),Y([g({type:Boolean})],M.default.prototype,"showSetting",2),Y([g({type:Boolean})],M.default.prototype,"showAuthAlert",2),Y([V("cb-message-list")],M.default.prototype,"_messageList",2),M.default=Y([tt("enegelai-bot")],M.default),Object.defineProperties(M,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});