@code-inspector/core 2.0.0-beta.1 → 2.0.0-beta.2

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 +1 @@
1
- var kt,Ct,At,St,Tt,Mt,Pt,Nt,vueInspectorClient=function(C){"use strict";var $t=Object.freeze,Et=Object.defineProperty,ao=Object.defineProperties;var co=Object.getOwnPropertyDescriptors;var xt=Object.getOwnPropertySymbols;var ho=Object.prototype.hasOwnProperty,po=Object.prototype.propertyIsEnumerable;var k=Math.pow,_t=(C,$,_)=>$ in C?Et(C,$,{enumerable:!0,configurable:!0,writable:!0,value:_}):C[$]=_,N=(C,$)=>{for(var _ in $||($={}))ho.call($,_)&&_t(C,_,$[_]);if(xt)for(var _ of xt($))po.call($,_)&&_t(C,_,$[_]);return C},j=(C,$)=>ao(C,co($));var D=(C,$)=>$t(Et(C,"raw",{value:$t($||C.slice())})),K=(C,$,_)=>new Promise((Q,ee)=>{var de=M=>{try{L(_.next(M))}catch(Y){ee(Y)}},pe=M=>{try{L(_.throw(M))}catch(Y){ee(Y)}},L=M=>M.done?Q(M.value):Promise.resolve(M.value).then(de,pe);L((_=_.apply(C,$)).next())});const $=window,_=$.ShadowRoot&&($.ShadyCSS===void 0||$.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Q=Symbol(),ee=new WeakMap;let de=class{constructor(s,e,t){if(this._$cssResult$=!0,t!==Q)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=s,this.t=e}get styleSheet(){let s=this.o;const e=this.t;if(_&&s===void 0){const t=e!==void 0&&e.length===1;t&&(s=ee.get(e)),s===void 0&&((this.o=s=new CSSStyleSheet).replaceSync(this.cssText),t&&ee.set(e,s))}return s}toString(){return this.cssText}};const pe=_?s=>s:s=>s instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return(i=>new de(typeof i=="string"?i:i+"",void 0,Q))(t)})(s):s;var L;const M=window,Y=M.trustedTypes,Ot=Y?Y.emptyScript:"",Ie=M.reactiveElementPolyfillSupport,we={toAttribute(s,e){switch(e){case Boolean:s=s?Ot:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,e){let t=s;switch(e){case Boolean:t=s!==null;break;case Number:t=s===null?null:Number(s);break;case Object:case Array:try{t=JSON.parse(s)}catch(i){t=null}}return t}},Ve=(s,e)=>e!==s&&(e==e||s==s),$e={attribute:!0,type:String,converter:we,reflect:!1,hasChanged:Ve};let W=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(s){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(s)}static get observedAttributes(){this.finalize();const s=[];return this.elementProperties.forEach((e,t)=>{const i=this._$Ep(t,e);i!==void 0&&(this._$Ev.set(i,t),s.push(i))}),s}static createProperty(s,e=$e){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(s,e),!e.noAccessor&&!this.prototype.hasOwnProperty(s)){const t=typeof s=="symbol"?Symbol():"__"+s,i=this.getPropertyDescriptor(s,t,e);i!==void 0&&Object.defineProperty(this.prototype,s,i)}}static getPropertyDescriptor(s,e,t){return{get(){return this[e]},set(i){const o=this[s];this[e]=i,this.requestUpdate(s,o,t)},configurable:!0,enumerable:!0}}static getPropertyOptions(s){return this.elementProperties.get(s)||$e}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const s=Object.getPrototypeOf(this);if(s.finalize(),s.h!==void 0&&(this.h=[...s.h]),this.elementProperties=new Map(s.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,t=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const i of t)this.createProperty(i,e[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(s){const e=[];if(Array.isArray(s)){const t=new Set(s.flat(1/0).reverse());for(const i of t)e.unshift(pe(i))}else s!==void 0&&e.push(pe(s));return e}static _$Ep(s,e){const t=e.attribute;return t===!1?void 0:typeof t=="string"?t:typeof s=="string"?s.toLowerCase():void 0}u(){var s;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(s=this.constructor.h)===null||s===void 0||s.forEach(e=>e(this))}addController(s){var e,t;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(s),this.renderRoot!==void 0&&this.isConnected&&((t=s.hostConnected)===null||t===void 0||t.call(s))}removeController(s){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(s)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((s,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var s;const e=(s=this.shadowRoot)!==null&&s!==void 0?s:this.attachShadow(this.constructor.shadowRootOptions);return((t,i)=>{_?t.adoptedStyleSheets=i.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):i.forEach(o=>{const n=document.createElement("style"),r=$.litNonce;r!==void 0&&n.setAttribute("nonce",r),n.textContent=o.cssText,t.appendChild(n)})})(e,this.constructor.elementStyles),e}connectedCallback(){var s;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(s=this._$ES)===null||s===void 0||s.forEach(e=>{var t;return(t=e.hostConnected)===null||t===void 0?void 0:t.call(e)})}enableUpdating(s){}disconnectedCallback(){var s;(s=this._$ES)===null||s===void 0||s.forEach(e=>{var t;return(t=e.hostDisconnected)===null||t===void 0?void 0:t.call(e)})}attributeChangedCallback(s,e,t){this._$AK(s,t)}_$EO(s,e,t=$e){var i;const o=this.constructor._$Ep(s,t);if(o!==void 0&&t.reflect===!0){const n=(((i=t.converter)===null||i===void 0?void 0:i.toAttribute)!==void 0?t.converter:we).toAttribute(e,t.type);this._$El=s,n==null?this.removeAttribute(o):this.setAttribute(o,n),this._$El=null}}_$AK(s,e){var t;const i=this.constructor,o=i._$Ev.get(s);if(o!==void 0&&this._$El!==o){const n=i.getPropertyOptions(o),r=typeof n.converter=="function"?{fromAttribute:n.converter}:((t=n.converter)===null||t===void 0?void 0:t.fromAttribute)!==void 0?n.converter:we;this._$El=o,this[o]=r.fromAttribute(e,n.type),this._$El=null}}requestUpdate(s,e,t){let i=!0;s!==void 0&&(((t=t||this.constructor.getPropertyOptions(s)).hasChanged||Ve)(this[s],e)?(this._$AL.has(s)||this._$AL.set(s,e),t.reflect===!0&&this._$El!==s&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(s,t))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}_$Ej(){return K(this,null,function*(){this.isUpdatePending=!0;try{yield this._$E_}catch(e){Promise.reject(e)}const s=this.scheduleUpdate();return s!=null&&(yield s),!this.isUpdatePending})}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((i,o)=>this[o]=i),this._$Ei=void 0);let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(s=this._$ES)===null||s===void 0||s.forEach(i=>{var o;return(o=i.hostUpdate)===null||o===void 0?void 0:o.call(i)}),this.update(t)):this._$Ek()}catch(i){throw e=!1,this._$Ek(),i}e&&this._$AE(t)}willUpdate(s){}_$AE(s){var e;(e=this._$ES)===null||e===void 0||e.forEach(t=>{var i;return(i=t.hostUpdated)===null||i===void 0?void 0:i.call(t)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(s)),this.updated(s)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(s){return!0}update(s){this._$EC!==void 0&&(this._$EC.forEach((e,t)=>this._$EO(t,this[t],e)),this._$EC=void 0),this._$Ek()}updated(s){}firstUpdated(s){}};var xe;W.finalized=!0,W.elementProperties=new Map,W.elementStyles=[],W.shadowRootOptions={mode:"open"},Ie==null||Ie({ReactiveElement:W}),((L=M.reactiveElementVersions)!==null&&L!==void 0?L:M.reactiveElementVersions=[]).push("1.6.1");const ue=window,F=ue.trustedTypes,Be=F?F.createPolicy("lit-html",{createHTML:s=>s}):void 0,z="lit$".concat((Math.random()+"").slice(9),"$"),He="?"+z,jt="<".concat(He,">"),q=document,te=(s="")=>q.createComment(s),oe=s=>s===null||typeof s!="object"&&typeof s!="function",Ke=Array.isArray,ne=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ye=/-->/g,We=/>/g,I=RegExp(">|[ \n\f\r](?:([^\\s\"'>=/]+)([ \n\f\r]*=[ \n\f\r]*(?:[^ \n\f\r\"'`<>=]|(\"|')|))|$)","g"),Fe=/'/g,qe=/"/g,Xe=/^(?:script|style|textarea|title)$/i,V=(s=>(e,...t)=>({_$litType$:s,strings:e,values:t}))(1),B=Symbol.for("lit-noChange"),A=Symbol.for("lit-nothing"),Ge=new WeakMap,X=q.createTreeWalker(q,129,null,!1),Dt=(s,e)=>{const t=s.length-1,i=[];let o,n=e===2?"<svg>":"",r=ne;for(let a=0;a<t;a++){const c=s[a];let h,d,p=-1,u=0;for(;u<c.length&&(r.lastIndex=u,d=r.exec(c),d!==null);)u=r.lastIndex,r===ne?d[1]==="!--"?r=Ye:d[1]!==void 0?r=We:d[2]!==void 0?(Xe.test(d[2])&&(o=RegExp("</"+d[2],"g")),r=I):d[3]!==void 0&&(r=I):r===I?d[0]===">"?(r=o!=null?o:ne,p=-1):d[1]===void 0?p=-2:(p=r.lastIndex-d[2].length,h=d[1],r=d[3]===void 0?I:d[3]==='"'?qe:Fe):r===qe||r===Fe?r=I:r===Ye||r===We?r=ne:(r=I,o=void 0);const g=r===I&&s[a+1].startsWith("/>")?" ":"";n+=r===ne?c+jt:p>=0?(i.push(h),c.slice(0,p)+"$lit$"+c.slice(p)+z+g):c+z+(p===-2?(i.push(void 0),a):g)}const l=n+(s[t]||"<?>")+(e===2?"</svg>":"");if(!Array.isArray(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return[Be!==void 0?Be.createHTML(l):l,i]};class ie{constructor({strings:e,_$litType$:t},i){let o;this.parts=[];let n=0,r=0;const l=e.length-1,a=this.parts,[c,h]=Dt(e,t);if(this.el=ie.createElement(c,i),X.currentNode=this.el.content,t===2){const d=this.el.content,p=d.firstChild;p.remove(),d.append(...p.childNodes)}for(;(o=X.nextNode())!==null&&a.length<l;){if(o.nodeType===1){if(o.hasAttributes()){const d=[];for(const p of o.getAttributeNames())if(p.endsWith("$lit$")||p.startsWith(z)){const u=h[r++];if(d.push(p),u!==void 0){const g=o.getAttribute(u.toLowerCase()+"$lit$").split(z),f=/([.?@])?(.*)/.exec(u);a.push({type:1,index:n,name:f[2],strings:g,ctor:f[1]==="."?Rt:f[1]==="?"?Lt:f[1]==="@"?It:ge})}else a.push({type:6,index:n})}for(const p of d)o.removeAttribute(p)}if(Xe.test(o.tagName)){const d=o.textContent.split(z),p=d.length-1;if(p>0){o.textContent=F?F.emptyScript:"";for(let u=0;u<p;u++)o.append(d[u],te()),X.nextNode(),a.push({type:2,index:++n});o.append(d[p],te())}}}else if(o.nodeType===8)if(o.data===He)a.push({type:2,index:n});else{let d=-1;for(;(d=o.data.indexOf(z,d+1))!==-1;)a.push({type:7,index:n}),d+=z.length-1}n++}}static createElement(e,t){const i=q.createElement("template");return i.innerHTML=e,i}}function G(s,e,t=s,i){var o,n,r,l;if(e===B)return e;let a=i!==void 0?(o=t._$Co)===null||o===void 0?void 0:o[i]:t._$Cl;const c=oe(e)?void 0:e._$litDirective$;return(a==null?void 0:a.constructor)!==c&&((n=a==null?void 0:a._$AO)===null||n===void 0||n.call(a,!1),c===void 0?a=void 0:(a=new c(s),a._$AT(s,t,i)),i!==void 0?((r=(l=t)._$Co)!==null&&r!==void 0?r:l._$Co=[])[i]=a:t._$Cl=a),a!==void 0&&(e=G(s,a._$AS(s,e.values),a,i)),e}class zt{constructor(e,t){this.u=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(e){var t;const{el:{content:i},parts:o}=this._$AD,n=((t=e==null?void 0:e.creationScope)!==null&&t!==void 0?t:q).importNode(i,!0);X.currentNode=n;let r=X.nextNode(),l=0,a=0,c=o[0];for(;c!==void 0;){if(l===c.index){let h;c.type===2?h=new se(r,r.nextSibling,this,e):c.type===1?h=new c.ctor(r,c.name,c.strings,this,e):c.type===6&&(h=new Vt(r,this,e)),this.u.push(h),c=o[++a]}l!==(c==null?void 0:c.index)&&(r=X.nextNode(),l++)}return n}p(e){let t=0;for(const i of this.u)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,t),t+=i.strings.length-2):i._$AI(e[t])),t++}}class se{constructor(e,t,i,o){var n;this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=i,this.options=o,this._$Cm=(n=o==null?void 0:o.isConnected)===null||n===void 0||n}get _$AU(){var e,t;return(t=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&t!==void 0?t:this._$Cm}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&e.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=G(this,e,t),oe(e)?e===A||e==null||e===""?(this._$AH!==A&&this._$AR(),this._$AH=A):e!==this._$AH&&e!==B&&this.g(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):(i=>Ke(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function")(e)?this.k(e):this.g(e)}O(e,t=this._$AB){return this._$AA.parentNode.insertBefore(e,t)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}g(e){this._$AH!==A&&oe(this._$AH)?this._$AA.nextSibling.data=e:this.T(q.createTextNode(e)),this._$AH=e}$(e){var t;const{values:i,_$litType$:o}=e,n=typeof o=="number"?this._$AC(e):(o.el===void 0&&(o.el=ie.createElement(o.h,this.options)),o);if(((t=this._$AH)===null||t===void 0?void 0:t._$AD)===n)this._$AH.p(i);else{const r=new zt(n,this),l=r.v(this.options);r.p(i),this.T(l),this._$AH=r}}_$AC(e){let t=Ge.get(e.strings);return t===void 0&&Ge.set(e.strings,t=new ie(e)),t}k(e){Ke(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let i,o=0;for(const n of e)o===t.length?t.push(i=new se(this.O(te()),this.O(te()),this,this.options)):i=t[o],i._$AI(n),o++;o<t.length&&(this._$AR(i&&i._$AB.nextSibling,o),t.length=o)}_$AR(e=this._$AA.nextSibling,t){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,t);e&&e!==this._$AB;){const o=e.nextSibling;e.remove(),e=o}}setConnected(e){var t;this._$AM===void 0&&(this._$Cm=e,(t=this._$AP)===null||t===void 0||t.call(this,e))}}class ge{constructor(e,t,i,o,n){this.type=1,this._$AH=A,this._$AN=void 0,this.element=e,this.name=t,this._$AM=o,this.options=n,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=A}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,i,o){const n=this.strings;let r=!1;if(n===void 0)e=G(this,e,t,0),r=!oe(e)||e!==this._$AH&&e!==B,r&&(this._$AH=e);else{const l=e;let a,c;for(e=n[0],a=0;a<n.length-1;a++)c=G(this,l[i+a],t,a),c===B&&(c=this._$AH[a]),r||(r=!oe(c)||c!==this._$AH[a]),c===A?e=A:e!==A&&(e+=(c!=null?c:"")+n[a+1]),this._$AH[a]=c}r&&!o&&this.j(e)}j(e){e===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e!=null?e:"")}}class Rt extends ge{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===A?void 0:e}}const Ut=F?F.emptyScript:"";class Lt extends ge{constructor(){super(...arguments),this.type=4}j(e){e&&e!==A?this.element.setAttribute(this.name,Ut):this.element.removeAttribute(this.name)}}class It extends ge{constructor(e,t,i,o,n){super(e,t,i,o,n),this.type=5}_$AI(e,t=this){var i;if((e=(i=G(this,e,t,0))!==null&&i!==void 0?i:A)===B)return;const o=this._$AH,n=e===A&&o!==A||e.capture!==o.capture||e.once!==o.once||e.passive!==o.passive,r=e!==A&&(o===A||n);n&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,i;typeof this._$AH=="function"?this._$AH.call((i=(t=this.options)===null||t===void 0?void 0:t.host)!==null&&i!==void 0?i:this.element,e):this._$AH.handleEvent(e)}}class Vt{constructor(e,t,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){G(this,e)}}const Ze=ue.litHtmlPolyfillSupport;Ze==null||Ze(ie,se),((xe=ue.litHtmlVersions)!==null&&xe!==void 0?xe:ue.litHtmlVersions=[]).push("2.6.1");var _e,Ee;class re extends W{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const i=super.createRenderRoot();return(e=(t=this.renderOptions).renderBefore)!==null&&e!==void 0||(t.renderBefore=i.firstChild),i}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=((i,o,n)=>{var r,l;const a=(r=n==null?void 0:n.renderBefore)!==null&&r!==void 0?r:o;let c=a._$litPart$;if(c===void 0){const h=(l=n==null?void 0:n.renderBefore)!==null&&l!==void 0?l:null;a._$litPart$=c=new se(o.insertBefore(te(),h),h,void 0,n!=null?n:{})}return c._$AI(i),c})(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return B}}re.finalized=!0,re._$litElement$=!0,(_e=globalThis.litElementHydrateSupport)===null||_e===void 0||_e.call(globalThis,{LitElement:re});const Je=globalThis.litElementPolyfillSupport;Je==null||Je({LitElement:re}),((Ee=globalThis.litElementVersions)!==null&&Ee!==void 0?Ee:globalThis.litElementVersions=[]).push("3.2.2");const Bt=(s,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?j(N({},e),{finisher(t){t.createProperty(e.key,s)}}):{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(t){t.createProperty(e.key,s)}};function P(s){return(e,t)=>t!==void 0?((i,o,n)=>{o.constructor.createProperty(n,i)})(s,e,t):Bt(s,e)}function x(s){return P(j(N({},s),{state:!0}))}function Z(s,e){return(({finisher:t,descriptor:i})=>(o,n)=>{var r;if(n===void 0){const l=(r=o.originalKey)!==null&&r!==void 0?r:o.key,a=i!=null?{kind:"method",placement:"prototype",key:l,descriptor:i(o.key)}:j(N({},o),{key:l});return t!=null&&(a.finisher=function(c){t(c,l)}),a}{const l=o.constructor;i!==void 0&&Object.defineProperty(o,n,i(n)),t==null||t(l,n)}})({descriptor:t=>{const i={get(){var o,n;return(n=(o=this.renderRoot)===null||o===void 0?void 0:o.querySelector(s))!==null&&n!==void 0?n:null},enumerable:!0,configurable:!0};if(e){const o=typeof t=="symbol"?Symbol():"__"+t;i.get=function(){var n,r;return this[o]===void 0&&(this[o]=(r=(n=this.renderRoot)===null||n===void 0?void 0:n.querySelector(s))!==null&&r!==void 0?r:null),this[o]}}return i}})}var ke;(ke=window.HTMLSlotElement)===null||ke===void 0||ke.prototype.assignedElements;const Ht=1;let Kt=class{constructor(s){}get _$AU(){return this._$AM._$AU}_$AT(s,e,t){this._$Ct=s,this._$AM=e,this._$Ci=t}_$AS(s,e){return this.update(s,e)}update(s,e){return this.render(...e)}};const O=(s=>(...e)=>({_$litDirective$:s,values:e}))(class extends Kt{constructor(s){var e;if(super(s),s.type!==Ht||s.name!=="style"||((e=s.strings)===null||e===void 0?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(s){return Object.keys(s).reduce((e,t)=>{const i=s[t];return i==null?e:e+"".concat(t=t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase(),":").concat(i,";")},"")}update(s,[e]){const{style:t}=s.element;if(this.vt===void 0){this.vt=new Set;for(const i in e)this.vt.add(i);return this.render(e)}this.vt.forEach(i=>{e[i]==null&&(this.vt.delete(i),i.includes("-")?t.removeProperty(i):t[i]="")});for(const i in e){const o=e[i];o!=null&&(this.vt.add(i),i.includes("-")?t.setProperty(i,o):t[i]=o)}return B}}),fe="data-insp-path",Yt=Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}));function Wt(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function i(){if(this instanceof i){var o=[null];return o.push.apply(o,arguments),new(Function.bind.apply(e,o))}return e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(i){var o=Object.getOwnPropertyDescriptor(s,i);Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:function(){return s[i]}})}),t}var Qe,et,Ce,tt,Ae,ot,nt,it,st={exports:{}};function rt(){if(tt)return Ce;tt=1;const s=et?Qe:(et=1,Qe={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),e={};for(const o of Object.keys(s))e[s[o]]=o;const t={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};Ce=t;for(const o of Object.keys(t)){if(!("channels"in t[o]))throw new Error("missing channels property: "+o);if(!("labels"in t[o]))throw new Error("missing channel labels property: "+o);if(t[o].labels.length!==t[o].channels)throw new Error("channel and label counts mismatch: "+o);const{channels:n,labels:r}=t[o];delete t[o].channels,delete t[o].labels,Object.defineProperty(t[o],"channels",{value:n}),Object.defineProperty(t[o],"labels",{value:r})}function i(o,n){return k(o[0]-n[0],2)+k(o[1]-n[1],2)+k(o[2]-n[2],2)}return t.rgb.hsl=function(o){const n=o[0]/255,r=o[1]/255,l=o[2]/255,a=Math.min(n,r,l),c=Math.max(n,r,l),h=c-a;let d,p;c===a?d=0:n===c?d=(r-l)/h:r===c?d=2+(l-n)/h:l===c&&(d=4+(n-r)/h),d=Math.min(60*d,360),d<0&&(d+=360);const u=(a+c)/2;return p=c===a?0:u<=.5?h/(c+a):h/(2-c-a),[d,100*p,100*u]},t.rgb.hsv=function(o){let n,r,l,a,c;const h=o[0]/255,d=o[1]/255,p=o[2]/255,u=Math.max(h,d,p),g=u-Math.min(h,d,p),f=function(y){return(u-y)/6/g+.5};return g===0?(a=0,c=0):(c=g/u,n=f(h),r=f(d),l=f(p),h===u?a=l-r:d===u?a=.3333333333333333+n-l:p===u&&(a=.6666666666666666+r-n),a<0?a+=1:a>1&&(a-=1)),[360*a,100*c,100*u]},t.rgb.hwb=function(o){const n=o[0],r=o[1];let l=o[2];const a=t.rgb.hsl(o)[0],c=1/255*Math.min(n,Math.min(r,l));return l=1-.00392156862745098*Math.max(n,Math.max(r,l)),[a,100*c,100*l]},t.rgb.cmyk=function(o){const n=o[0]/255,r=o[1]/255,l=o[2]/255,a=Math.min(1-n,1-r,1-l);return[100*((1-n-a)/(1-a)||0),100*((1-r-a)/(1-a)||0),100*((1-l-a)/(1-a)||0),100*a]},t.rgb.keyword=function(o){const n=e[o];if(n)return n;let r,l=1/0;for(const a of Object.keys(s)){const c=i(o,s[a]);c<l&&(l=c,r=a)}return r},t.keyword.rgb=function(o){return s[o]},t.rgb.xyz=function(o){let n=o[0]/255,r=o[1]/255,l=o[2]/255;return n=n>.04045?k((n+.055)/1.055,2.4):n/12.92,r=r>.04045?k((r+.055)/1.055,2.4):r/12.92,l=l>.04045?k((l+.055)/1.055,2.4):l/12.92,[100*(.4124*n+.3576*r+.1805*l),100*(.2126*n+.7152*r+.0722*l),100*(.0193*n+.1192*r+.9505*l)]},t.rgb.lab=function(o){const n=t.rgb.xyz(o);let r=n[0],l=n[1],a=n[2];return r/=95.047,l/=100,a/=108.883,r=r>.008856?k(r,.3333333333333333):7.787*r+.13793103448275862,l=l>.008856?k(l,.3333333333333333):7.787*l+.13793103448275862,a=a>.008856?k(a,.3333333333333333):7.787*a+.13793103448275862,[116*l-16,500*(r-l),200*(l-a)]},t.hsl.rgb=function(o){const n=o[0]/360,r=o[1]/100,l=o[2]/100;let a,c,h;if(r===0)return h=255*l,[h,h,h];a=l<.5?l*(1+r):l+r-l*r;const d=2*l-a,p=[0,0,0];for(let u=0;u<3;u++)c=n+.3333333333333333*-(u-1),c<0&&c++,c>1&&c--,h=6*c<1?d+6*(a-d)*c:2*c<1?a:3*c<2?d+(a-d)*(.6666666666666666-c)*6:d,p[u]=255*h;return p},t.hsl.hsv=function(o){const n=o[0];let r=o[1]/100,l=o[2]/100,a=r;const c=Math.max(l,.01);return l*=2,r*=l<=1?l:2-l,a*=c<=1?c:2-c,[n,100*(l===0?2*a/(c+a):2*r/(l+r)),100*((l+r)/2)]},t.hsv.rgb=function(o){const n=o[0]/60,r=o[1]/100;let l=o[2]/100;const a=Math.floor(n)%6,c=n-Math.floor(n),h=255*l*(1-r),d=255*l*(1-r*c),p=255*l*(1-r*(1-c));switch(l*=255,a){case 0:return[l,p,h];case 1:return[d,l,h];case 2:return[h,l,p];case 3:return[h,d,l];case 4:return[p,h,l];case 5:return[l,h,d]}},t.hsv.hsl=function(o){const n=o[0],r=o[1]/100,l=o[2]/100,a=Math.max(l,.01);let c,h;h=(2-r)*l;const d=(2-r)*a;return c=r*a,c/=d<=1?d:2-d,c=c||0,h/=2,[n,100*c,100*h]},t.hwb.rgb=function(o){const n=o[0]/360;let r=o[1]/100,l=o[2]/100;const a=r+l;let c;a>1&&(r/=a,l/=a);const h=Math.floor(6*n),d=1-l;c=6*n-h,1&h&&(c=1-c);const p=r+c*(d-r);let u,g,f;switch(h){default:case 6:case 0:u=d,g=p,f=r;break;case 1:u=p,g=d,f=r;break;case 2:u=r,g=d,f=p;break;case 3:u=r,g=p,f=d;break;case 4:u=p,g=r,f=d;break;case 5:u=d,g=r,f=p}return[255*u,255*g,255*f]},t.cmyk.rgb=function(o){const n=o[0]/100,r=o[1]/100,l=o[2]/100,a=o[3]/100;return[255*(1-Math.min(1,n*(1-a)+a)),255*(1-Math.min(1,r*(1-a)+a)),255*(1-Math.min(1,l*(1-a)+a))]},t.xyz.rgb=function(o){const n=o[0]/100,r=o[1]/100,l=o[2]/100;let a,c,h;return a=3.2406*n+-1.5372*r+-.4986*l,c=-.9689*n+1.8758*r+.0415*l,h=.0557*n+-.204*r+1.057*l,a=a>.0031308?1.055*k(a,.4166666666666667)-.055:12.92*a,c=c>.0031308?1.055*k(c,.4166666666666667)-.055:12.92*c,h=h>.0031308?1.055*k(h,.4166666666666667)-.055:12.92*h,a=Math.min(Math.max(0,a),1),c=Math.min(Math.max(0,c),1),h=Math.min(Math.max(0,h),1),[255*a,255*c,255*h]},t.xyz.lab=function(o){let n=o[0],r=o[1],l=o[2];return n/=95.047,r/=100,l/=108.883,n=n>.008856?k(n,.3333333333333333):7.787*n+.13793103448275862,r=r>.008856?k(r,.3333333333333333):7.787*r+.13793103448275862,l=l>.008856?k(l,.3333333333333333):7.787*l+.13793103448275862,[116*r-16,500*(n-r),200*(r-l)]},t.lab.xyz=function(o){let n,r,l;r=(o[0]+16)/116,n=o[1]/500+r,l=r-o[2]/200;const a=k(r,3),c=k(n,3),h=k(l,3);return r=a>.008856?a:(r-.13793103448275862)/7.787,n=c>.008856?c:(n-.13793103448275862)/7.787,l=h>.008856?h:(l-.13793103448275862)/7.787,n*=95.047,r*=100,l*=108.883,[n,r,l]},t.lab.lch=function(o){const n=o[0],r=o[1],l=o[2];let a;return a=360*Math.atan2(l,r)/2/Math.PI,a<0&&(a+=360),[n,Math.sqrt(r*r+l*l),a]},t.lch.lab=function(o){const n=o[0],r=o[1],l=o[2]/360*2*Math.PI;return[n,r*Math.cos(l),r*Math.sin(l)]},t.rgb.ansi16=function(o,n=null){const[r,l,a]=o;let c=n===null?t.rgb.hsv(o)[2]:n;if(c=Math.round(c/50),c===0)return 30;let h=30+(Math.round(a/255)<<2|Math.round(l/255)<<1|Math.round(r/255));return c===2&&(h+=60),h},t.hsv.ansi16=function(o){return t.rgb.ansi16(t.hsv.rgb(o),o[2])},t.rgb.ansi256=function(o){const n=o[0],r=o[1],l=o[2];return n===r&&r===l?n<8?16:n>248?231:Math.round((n-8)/247*24)+232:16+36*Math.round(n/255*5)+6*Math.round(r/255*5)+Math.round(l/255*5)},t.ansi16.rgb=function(o){let n=o%10;if(n===0||n===7)return o>50&&(n+=3.5),n=n/10.5*255,[n,n,n];const r=.5*(1+~~(o>50));return[(1&n)*r*255,(n>>1&1)*r*255,(n>>2&1)*r*255]},t.ansi256.rgb=function(o){if(o>=232){const r=10*(o-232)+8;return[r,r,r]}let n;return o-=16,[Math.floor(o/36)/5*255,Math.floor((n=o%36)/6)/5*255,n%6/5*255]},t.rgb.hex=function(o){const n=(((255&Math.round(o[0]))<<16)+((255&Math.round(o[1]))<<8)+(255&Math.round(o[2]))).toString(16).toUpperCase();return"000000".substring(n.length)+n},t.hex.rgb=function(o){const n=o.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!n)return[0,0,0];let r=n[0];n[0].length===3&&(r=r.split("").map(a=>a+a).join(""));const l=parseInt(r,16);return[l>>16&255,l>>8&255,255&l]},t.rgb.hcg=function(o){const n=o[0]/255,r=o[1]/255,l=o[2]/255,a=Math.max(Math.max(n,r),l),c=Math.min(Math.min(n,r),l),h=a-c;let d,p;return d=h<1?c/(1-h):0,p=h<=0?0:a===n?(r-l)/h%6:a===r?2+(l-n)/h:4+(n-r)/h,p/=6,p%=1,[360*p,100*h,100*d]},t.hsl.hcg=function(o){const n=o[1]/100,r=o[2]/100,l=r<.5?2*n*r:2*n*(1-r);let a=0;return l<1&&(a=(r-.5*l)/(1-l)),[o[0],100*l,100*a]},t.hsv.hcg=function(o){const n=o[1]/100,r=o[2]/100,l=n*r;let a=0;return l<1&&(a=(r-l)/(1-l)),[o[0],100*l,100*a]},t.hcg.rgb=function(o){const n=o[0]/360,r=o[1]/100,l=o[2]/100;if(r===0)return[255*l,255*l,255*l];const a=[0,0,0],c=n%1*6,h=c%1,d=1-h;let p=0;switch(Math.floor(c)){case 0:a[0]=1,a[1]=h,a[2]=0;break;case 1:a[0]=d,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=h;break;case 3:a[0]=0,a[1]=d,a[2]=1;break;case 4:a[0]=h,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=d}return p=(1-r)*l,[255*(r*a[0]+p),255*(r*a[1]+p),255*(r*a[2]+p)]},t.hcg.hsv=function(o){const n=o[1]/100,r=n+o[2]/100*(1-n);let l=0;return r>0&&(l=n/r),[o[0],100*l,100*r]},t.hcg.hsl=function(o){const n=o[1]/100,r=o[2]/100*(1-n)+.5*n;let l=0;return r>0&&r<.5?l=n/(2*r):r>=.5&&r<1&&(l=n/(2*(1-r))),[o[0],100*l,100*r]},t.hcg.hwb=function(o){const n=o[1]/100,r=n+o[2]/100*(1-n);return[o[0],100*(r-n),100*(1-r)]},t.hwb.hcg=function(o){const n=o[1]/100,r=1-o[2]/100,l=r-n;let a=0;return l<1&&(a=(r-l)/(1-l)),[o[0],100*l,100*a]},t.apple.rgb=function(o){return[o[0]/65535*255,o[1]/65535*255,o[2]/65535*255]},t.rgb.apple=function(o){return[o[0]/255*65535,o[1]/255*65535,o[2]/255*65535]},t.gray.rgb=function(o){return[o[0]/100*255,o[0]/100*255,o[0]/100*255]},t.gray.hsl=function(o){return[0,0,o[0]]},t.gray.hsv=t.gray.hsl,t.gray.hwb=function(o){return[0,100,o[0]]},t.gray.cmyk=function(o){return[0,0,0,o[0]]},t.gray.lab=function(o){return[o[0],0,0]},t.gray.hex=function(o){const n=255&Math.round(o[0]/100*255),r=((n<<16)+(n<<8)+n).toString(16).toUpperCase();return"000000".substring(r.length)+r},t.rgb.gray=function(o){return[(o[0]+o[1]+o[2])/3/255*100]},Ce}function Ft(){if(ot)return Ae;ot=1;const s=rt();function e(o){const n=function(){const l={},a=Object.keys(s);for(let c=a.length,h=0;h<c;h++)l[a[h]]={distance:-1,parent:null};return l}(),r=[o];for(n[o].distance=0;r.length;){const l=r.pop(),a=Object.keys(s[l]);for(let c=a.length,h=0;h<c;h++){const d=a[h],p=n[d];p.distance===-1&&(p.distance=n[l].distance+1,p.parent=l,r.unshift(d))}}return n}function t(o,n){return function(r){return n(o(r))}}function i(o,n){const r=[n[o].parent,o];let l=s[n[o].parent][o],a=n[o].parent;for(;n[a].parent;)r.unshift(n[a].parent),l=t(s[n[a].parent][a],l),a=n[a].parent;return l.conversion=r,l}return Ae=function(o){const n=e(o),r={},l=Object.keys(n);for(let a=l.length,c=0;c<a;c++){const h=l[c];n[h].parent!==null&&(r[h]=i(h,n))}return r},Ae}function qt(){if(it)return nt;it=1;const s=rt(),e=Ft(),t={};return Object.keys(s).forEach(i=>{t[i]={},Object.defineProperty(t[i],"channels",{value:s[i].channels}),Object.defineProperty(t[i],"labels",{value:s[i].labels});const o=e(i);Object.keys(o).forEach(n=>{const r=o[n];t[i][n]=function(l){const a=function(...c){const h=c[0];if(h==null)return h;h.length>1&&(c=h);const d=l(c);if(typeof d=="object")for(let p=d.length,u=0;u<p;u++)d[u]=Math.round(d[u]);return d};return"conversion"in l&&(a.conversion=l.conversion),a}(r),t[i][n].raw=function(l){const a=function(...c){const h=c[0];return h==null?h:(h.length>1&&(c=h),l(c))};return"conversion"in l&&(a.conversion=l.conversion),a}(r)})}),nt=t}(function(s){const e=(c,h)=>(...d)=>"\x1B[".concat(c(...d)+h,"m"),t=(c,h)=>(...d)=>{const p=c(...d);return"\x1B[".concat(38+h,";5;").concat(p,"m")},i=(c,h)=>(...d)=>{const p=c(...d);return"\x1B[".concat(38+h,";2;").concat(p[0],";").concat(p[1],";").concat(p[2],"m")},o=c=>c,n=(c,h,d)=>[c,h,d],r=(c,h,d)=>{Object.defineProperty(c,h,{get:()=>{const p=d();return Object.defineProperty(c,h,{value:p,enumerable:!0,configurable:!0}),p},enumerable:!0,configurable:!0})};let l;const a=(c,h,d,p)=>{l===void 0&&(l=qt());const u=p?10:0,g={};for(const[f,y]of Object.entries(l)){const b=f==="ansi16"?"ansi":f;f===h?g[b]=c(d,u):typeof y=="object"&&(g[b]=c(y[h],u))}return g};Object.defineProperty(s,"exports",{enumerable:!0,get:function(){const c=new Map,h={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};h.color.gray=h.color.blackBright,h.bgColor.bgGray=h.bgColor.bgBlackBright,h.color.grey=h.color.blackBright,h.bgColor.bgGrey=h.bgColor.bgBlackBright;for(const[d,p]of Object.entries(h)){for(const[u,g]of Object.entries(p))h[u]={open:"\x1B[".concat(g[0],"m"),close:"\x1B[".concat(g[1],"m")},p[u]=h[u],c.set(g[0],g[1]);Object.defineProperty(h,d,{value:p,enumerable:!1})}return Object.defineProperty(h,"codes",{value:c,enumerable:!1}),h.color.close="\x1B[39m",h.bgColor.close="\x1B[49m",r(h.color,"ansi",()=>a(e,"ansi16",o,!1)),r(h.color,"ansi256",()=>a(t,"ansi256",o,!1)),r(h.color,"ansi16m",()=>a(i,"rgb",n,!1)),r(h.bgColor,"ansi",()=>a(e,"ansi16",o,!0)),r(h.bgColor,"ansi256",()=>a(t,"ansi256",o,!0)),r(h.bgColor,"ansi16m",()=>a(i,"rgb",n,!0)),h}})})(st);var Se,lt,Xt={stringReplaceAll:(s,e,t)=>{let i=s.indexOf(e);if(i===-1)return s;const o=e.length;let n=0,r="";do r+=s.substr(n,i-n)+e+t,n=i+o,i=s.indexOf(e,n);while(i!==-1);return r+=s.substr(n),r},stringEncaseCRLFWithFirstIndex:(s,e,t,i)=>{let o=0,n="";do{const r=s[i-1]==="\r";n+=s.substr(o,(r?i-1:i)-o)+e+(r?"\r\n":"\n")+t,o=i+1,i=s.indexOf("\n",o)}while(i!==-1);return n+=s.substr(o),n}};const le=st.exports,{stdout:Te,stderr:Me}={stdout:!1,stderr:!1},{stringReplaceAll:Gt,stringEncaseCRLFWithFirstIndex:Zt}=Xt,{isArray:me}=Array,at=["ansi","ansi","ansi256","ansi16m"],J=Object.create(null);class Jt{constructor(e){return ct(e)}}const ct=s=>{const e={};return((t,i={})=>{if(i.level&&!(Number.isInteger(i.level)&&i.level>=0&&i.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const o=Te?Te.level:0;t.level=i.level===void 0?o:i.level})(e,s),e.template=(...t)=>pt(e.template,...t),Object.setPrototypeOf(e,ve.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=Jt,e.template};function ve(s){return ct(s)}for(const[s,e]of Object.entries(le))J[s]={get(){const t=ye(this,Pe(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,s,{value:t}),t}};J.visible={get(){const s=ye(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:s}),s}};const ht=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const s of ht)J[s]={get(){const{level:e}=this;return function(...t){const i=Pe(le.color[at[e]][s](...t),le.color.close,this._styler);return ye(this,i,this._isEmpty)}}};for(const s of ht)J["bg"+s[0].toUpperCase()+s.slice(1)]={get(){const{level:e}=this;return function(...t){const i=Pe(le.bgColor[at[e]][s](...t),le.bgColor.close,this._styler);return ye(this,i,this._isEmpty)}}};const Qt=Object.defineProperties(()=>{},j(N({},J),{level:{enumerable:!0,get(){return this._generator.level},set(s){this._generator.level=s}}})),Pe=(s,e,t)=>{let i,o;return t===void 0?(i=s,o=e):(i=t.openAll+s,o=e+t.closeAll),{open:s,close:e,openAll:i,closeAll:o,parent:t}},ye=(s,e,t)=>{const i=(...o)=>me(o[0])&&me(o[0].raw)?dt(i,pt(i,...o)):dt(i,o.length===1?""+o[0]:o.join(" "));return Object.setPrototypeOf(i,Qt),i._generator=s,i._styler=e,i._isEmpty=t,i},dt=(s,e)=>{if(s.level<=0||!e)return s._isEmpty?"":e;let t=s._styler;if(t===void 0)return e;const{openAll:i,closeAll:o}=t;if(e.indexOf("\x1B")!==-1)for(;t!==void 0;)e=Gt(e,t.close,t.open),t=t.parent;const n=e.indexOf("\n");return n!==-1&&(e=Zt(e,o,i,n)),i+e+o};let Ne;const pt=(s,...e)=>{const[t]=e;if(!me(t)||!me(t.raw))return e.join(" ");const i=e.slice(1),o=[t.raw[0]];for(let n=1;n<t.length;n++)o.push(String(i[n-1]).replace(/[{}\\]/g,"\\$&"),String(t.raw[n]));return Ne===void 0&&(Ne=function(){if(lt)return Se;lt=1;const n=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,r=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,l=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,a=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,c=new Map([["n","\n"],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function h(g){const f=g[0]==="u",y=g[1]==="{";return f&&!y&&g.length===5||g[0]==="x"&&g.length===3?String.fromCharCode(parseInt(g.slice(1),16)):f&&y?String.fromCodePoint(parseInt(g.slice(2,-1),16)):c.get(g)||g}function d(g,f){const y=[],b=f.trim().split(/\s*,\s*/g);let w;for(const T of b){const U=Number(T);if(Number.isNaN(U)){if(!(w=T.match(l)))throw new Error("Invalid Chalk template style argument: ".concat(T," (in style '").concat(g,"')"));y.push(w[2].replace(a,(ce,S,he)=>S?h(S):he))}else y.push(U)}return y}function p(g){r.lastIndex=0;const f=[];let y;for(;(y=r.exec(g))!==null;){const b=y[1];if(y[2]){const w=d(b,y[2]);f.push([b].concat(w))}else f.push([b])}return f}function u(g,f){const y={};for(const w of f)for(const T of w.styles)y[T[0]]=w.inverse?null:T.slice(1);let b=g;for(const[w,T]of Object.entries(y))if(Array.isArray(T)){if(!(w in b))throw new Error("Unknown Chalk style: ".concat(w));b=T.length>0?b[w](...T):b[w]}return b}return Se=(g,f)=>{const y=[],b=[];let w=[];if(f.replace(n,(T,U,ce,S,he,H)=>{if(U)w.push(h(U));else if(S){const wt=w.join("");w=[],b.push(y.length===0?wt:u(g,y)(wt)),y.push({inverse:ce,styles:p(S)})}else if(he){if(y.length===0)throw new Error("Found extraneous } in Chalk template literal");b.push(u(g,y)(w.join(""))),w=[],y.pop()}else w.push(H)}),b.push(w.join("")),y.length>0){const T="Chalk template literal is missing ".concat(y.length," closing bracket").concat(y.length===1?"":"s"," (`}`)");throw new Error(T)}return b.join("")},Se}()),Ne(s,o.join(""))};Object.defineProperties(ve.prototype,J);const Oe=ve();Oe.supportsColor=Te,Oe.stderr=ve({level:Me?Me.level:0}),Oe.stderr.supportsColor=Me;var R={exports:{}};const be=Wt(Yt),je=be,De=be,eo=be,to=be,ze="16.4.5",oo=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;function Re(s){console.log("[dotenv@".concat(ze,"][DEBUG] ").concat(s))}function ut(s){return s&&s.DOTENV_KEY&&s.DOTENV_KEY.length>0?s.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function no(s,e){let t;try{t=new URL(e)}catch(l){if(l.code==="ERR_INVALID_URL"){const a=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw a.code="INVALID_DOTENV_KEY",a}throw l}const i=t.password;if(!i){const l=new Error("INVALID_DOTENV_KEY: Missing key part");throw l.code="INVALID_DOTENV_KEY",l}const o=t.searchParams.get("environment");if(!o){const l=new Error("INVALID_DOTENV_KEY: Missing environment part");throw l.code="INVALID_DOTENV_KEY",l}const n="DOTENV_VAULT_".concat(o.toUpperCase()),r=s.parsed[n];if(!r){const l=new Error("NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ".concat(n," in your .env.vault file."));throw l.code="NOT_FOUND_DOTENV_ENVIRONMENT",l}return{ciphertext:r,key:i}}function gt(s){let e=null;if(s&&s.path&&s.path.length>0)if(Array.isArray(s.path))for(const t of s.path)je.existsSync(t)&&(e=t.endsWith(".vault")?t:"".concat(t,".vault"));else e=s.path.endsWith(".vault")?s.path:"".concat(s.path,".vault");else e=De.resolve(process.cwd(),".env.vault");return je.existsSync(e)?e:null}function ft(s){return s[0]==="~"?De.join(eo.homedir(),s.slice(1)):s}const E={configDotenv:function(s){const e=De.resolve(process.cwd(),".env");let t="utf8";const i=!!(s&&s.debug);s&&s.encoding?t=s.encoding:i&&Re("No encoding is specified. UTF-8 is used by default");let o,n=[e];if(s&&s.path)if(Array.isArray(s.path)){n=[];for(const a of s.path)n.push(ft(a))}else n=[ft(s.path)];const r={};for(const a of n)try{const c=E.parse(je.readFileSync(a,{encoding:t}));E.populate(r,c,s)}catch(c){i&&Re("Failed to load ".concat(a," ").concat(c.message)),o=c}let l=process.env;return s&&s.processEnv!=null&&(l=s.processEnv),E.populate(l,r,s),o?{parsed:r,error:o}:{parsed:r}},_configVault:function(s){var e;e="Loading env from encrypted .env.vault",console.log("[dotenv@".concat(ze,"][INFO] ").concat(e));const t=E._parseVault(s);let i=process.env;return s&&s.processEnv!=null&&(i=s.processEnv),E.populate(i,t,s),{parsed:t}},_parseVault:function(s){const e=gt(s),t=E.configDotenv({path:e});if(!t.parsed){const r=new Error("MISSING_DATA: Cannot parse ".concat(e," for an unknown reason"));throw r.code="MISSING_DATA",r}const i=ut(s).split(","),o=i.length;let n;for(let r=0;r<o;r++)try{const l=no(t,i[r].trim());n=E.decrypt(l.ciphertext,l.key);break}catch(l){if(r+1>=o)throw l}return E.parse(n)},config:function(s){if(ut(s).length===0)return E.configDotenv(s);const e=gt(s);return e?E._configVault(s):(t="You set DOTENV_KEY but you are missing a .env.vault file at ".concat(e,". Did you forget to build it?"),console.log("[dotenv@".concat(ze,"][WARN] ").concat(t)),E.configDotenv(s));var t},decrypt:function(s,e){const t=Buffer.from(e.slice(-64),"hex");let i=Buffer.from(s,"base64");const o=i.subarray(0,12),n=i.subarray(-16);i=i.subarray(12,-16);try{const r=to.createDecipheriv("aes-256-gcm",t,o);return r.setAuthTag(n),"".concat(r.update(i)).concat(r.final())}catch(r){const l=r instanceof RangeError,a=r.message==="Invalid key length",c=r.message==="Unsupported state or unable to authenticate data";if(l||a){const h=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw h.code="INVALID_DOTENV_KEY",h}if(c){const h=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw h.code="DECRYPTION_FAILED",h}throw r}},parse:function(s){const e={};let t,i=s.toString();for(i=i.replace(/\r\n?/gm,"\n");(t=oo.exec(i))!=null;){const o=t[1];let n=t[2]||"";n=n.trim();const r=n[0];n=n.replace(/^(['"`])([\s\S]*)\1$/gm,"$2"),r==='"'&&(n=n.replace(/\\n/g,"\n"),n=n.replace(/\\r/g,"\r")),e[o]=n}return e},populate:function(s,e,t={}){const i=!!(t&&t.debug),o=!!(t&&t.override);if(typeof e!="object"){const n=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw n.code="OBJECT_REQUIRED",n}for(const n of Object.keys(e))Object.prototype.hasOwnProperty.call(s,n)?(o===!0&&(s[n]=e[n]),i&&Re(o===!0?'"'.concat(n,'" is already defined and WAS overwritten'):'"'.concat(n,'" is already defined and was NOT overwritten'))):s[n]=e[n]}};R.exports.configDotenv=E.configDotenv,R.exports._configVault=E._configVault,R.exports._parseVault=E._parseVault,R.exports.config=E.config,R.exports.decrypt=E.decrypt,R.exports.parse=E.parse,R.exports.populate=E.populate,R.exports=E;const mt="{file}",vt="{line}",yt="{column}";var io=Object.defineProperty,so=Object.getOwnPropertyDescriptor,v=(s,e,t,i)=>{for(var o,n=i>1?void 0:i?so(e,t):e,r=s.length-1;r>=0;r--)(o=s[r])&&(n=(i?o(e,t,n):o(n))||n);return i&&n&&io(e,t,n),n};const Ue="__code-inspector-unique-id",Le="data-astro-source-file",ro={ctrlKey:"^control",altKey:"⌥option",metaKey:"⌘command",shiftKey:"shift"},lo={ctrlKey:"Ctrl",altKey:"Alt",metaKey:"⊞Windows",shiftKey:"Shift"},ae=300;function bt(){return new Promise(s=>{requestAnimationFrame(s)})}class m extends re{constructor(){super(...arguments),this.hotKeys="shiftKey,altKey",this.port=5678,this.showSwitch=!1,this.autoToggle=!1,this.hideConsole=!1,this.locate=!0,this.copy=!1,this.target="",this.targetNode=null,this.ip="localhost",this.wheelThrottling=!1,this.modeKey="z",this.position={top:0,right:0,bottom:0,left:0,padding:{top:0,right:0,bottom:0,left:0},border:{top:0,right:0,bottom:0,left:0},margin:{top:0,right:0,bottom:0,left:0}},this.element={name:"",line:0,column:0,path:""},this.elementTipStyle={vertical:"",horizon:"",visibility:""},this.show=!1,this.showNodeTree=!1,this.nodeTreePosition={},this.nodeTree=null,this.dragging=!1,this.mousePosition={baseX:0,baseY:0,moveX:0,moveY:0},this.draggingTarget="switch",this.open=!1,this.moved=!1,this.hoverSwitch=!1,this.preUserSelect="",this.sendType="xhr",this.activeNode={},this.showSettingsModal=!1,this.internalLocate=!0,this.internalCopy=!1,this.internalTarget=!1,this.features=[{label:"Locate Code",description:"Open the editor and locate code",checked:()=>!!this.internalLocate,onChange:()=>this.toggleLocate()},{label:"Copy Path",description:"Copy the code path to clipboard",checked:()=>!!this.internalCopy,onChange:()=>this.toggleCopy()},{label:"Open Target",description:"Open the target url",checked:()=>!!this.internalTarget,onChange:()=>this.toggleTarget()}],this.eventListeners=[],this.isTracking=e=>this.hotKeys&&this.hotKeys.split(",").every(t=>e[t.trim()]),this.getDomPropertyValue=(e,t)=>{const i=window.getComputedStyle(e);return Number(i.getPropertyValue(t).replace("px",""))},this.calculateElementInfoPosition=e=>K(this,null,function*(){var U,ce;const{top:t,right:i,bottom:o,left:n}=e.getBoundingClientRect(),r=document.documentElement.clientHeight,l=document.documentElement.clientWidth,a=this.getDomPropertyValue(e,"margin-top"),c=this.getDomPropertyValue(e,"margin-right"),h=this.getDomPropertyValue(e,"margin-bottom"),d=this.getDomPropertyValue(e,"margin-left");yield bt();const{width:p,height:u}=this.elementInfoRef.getBoundingClientRect(),g=t-a,f=i+c,y=o+h,b=n-d,w=[{vertical:"element-info-bottom",horizon:"element-info-right",top:y,left:b,isExternal:!0},{vertical:"element-info-bottom",horizon:"element-info-left",top:y,left:f-p,isExternal:!0},{vertical:"element-info-top",horizon:"element-info-right",top:g-u,left:b,isExternal:!0},{vertical:"element-info-top",horizon:"element-info-left",top:g-u,left:f-p,isExternal:!0},{vertical:"element-info-bottom-inner",horizon:"element-info-right",top:y-u,left:b,isExternal:!1},{vertical:"element-info-bottom-inner",horizon:"element-info-left",top:y-u,left:f-p,isExternal:!1},{vertical:"element-info-top-inner",horizon:"element-info-right",top:g,left:b,isExternal:!1},{vertical:"element-info-top-inner",horizon:"element-info-left",top:g,left:f-p,isExternal:!1},{vertical:"element-info-top-inner",horizon:"element-info-left",top:Math.max(0,g),left:f-p,isExternal:!1,additionStyle:{transform:"translateY(".concat(Math.max(0,-g),"px)")}},{vertical:"element-info-top-inner",horizon:"element-info-right",top:Math.max(0,g),left:f-p,isExternal:!1,additionStyle:{transform:"translateY(".concat(Math.max(0,-g),"px)")}}],T=S=>S.left<0||S.left+p>l||S.top<0||S.top+u>r;for(const S of w){const he=document.documentElement.clientWidth;if(S.horizon.endsWith("left")){const H=b+p-he;H>0&&(S.additionStyle={transform:"translateX(-".concat(H,"px) ").concat(((U=S.additionStyle)==null?void 0:U.transform)||"")})}else{const H=p-f;H>0&&(S.additionStyle={transform:"translateX(".concat(H,"px) ").concat(((ce=S.additionStyle)==null?void 0:ce.transform)||"")})}if(!T(S))return S}return w[0]}),this.renderCover=e=>K(this,null,function*(){if(e===this.targetNode)return;this.targetNode=e;const{top:t,right:i,bottom:o,left:n}=e.getBoundingClientRect();if(this.position={top:t,right:i,bottom:o,left:n,border:{top:this.getDomPropertyValue(e,"border-top-width"),right:this.getDomPropertyValue(e,"border-right-width"),bottom:this.getDomPropertyValue(e,"border-bottom-width"),left:this.getDomPropertyValue(e,"border-left-width")},padding:{top:this.getDomPropertyValue(e,"padding-top"),right:this.getDomPropertyValue(e,"padding-right"),bottom:this.getDomPropertyValue(e,"padding-bottom"),left:this.getDomPropertyValue(e,"padding-left")},margin:{top:this.getDomPropertyValue(e,"margin-top"),right:this.getDomPropertyValue(e,"margin-right"),bottom:this.getDomPropertyValue(e,"margin-bottom"),left:this.getDomPropertyValue(e,"margin-left")}},this.elementTipStyle={vertical:"",horizon:"",visibility:"hidden"},this.addGlobalCursorStyle(),this.preUserSelect||(this.preUserSelect=getComputedStyle(document.body).userSelect),document.body.style.userSelect="none",this.element=this.getSourceInfo(e),this.show=!0,!this.showNodeTree){const{vertical:r,horizon:l,additionStyle:a}=yield this.calculateElementInfoPosition(e);this.elementTipStyle={vertical:r,horizon:l,visibility:"visible",additionStyle:a}}}),this.getAstroFilePath=e=>{var t;return(t=e.getAttribute)!=null&&t.call(e,Le)?"".concat(e.getAttribute(Le),":").concat(e.getAttribute("data-astro-source-loc"),":").concat(e.tagName.toLowerCase()):""},this.getSourceInfo=e=>{var l;let t=((l=e.getAttribute)==null?void 0:l.call(e,fe))||e[fe]||this.getAstroFilePath(e);if(!t)return null;const i=t.split(":"),o=i[i.length-1],n=Number(i[i.length-2]),r=Number(i[i.length-3]);return{name:o,path:i.slice(0,i.length-3).join(":"),line:r,column:n}},this.removeCover=e=>{e!==!0&&this.nodeTree||(this.targetNode=null,this.show=!1,this.removeGlobalCursorStyle(),document.body.style.userSelect=this.preUserSelect,this.preUserSelect="")},this.renderLayerPanel=(e,{x:t,y:i})=>{const o=document.documentElement.clientWidth,n=document.documentElement.clientHeight,r=o-t,l=n-i;let a={};r<t?(a.right=r+"px",t<ae&&(a.transform="translateX(".concat(ae-t,"px)"))):(a.left=t+"px",r<ae&&(a.transform="translateX(-".concat(ae-r,"px)"))),l<i?(a.bottom=l+"px",a.maxHeight=i-10+"px"):(a.top=i+"px",a.maxHeight=n-i-10+"px"),this.nodeTreePosition=a,this.nodeTree=e,this.showNodeTree=!0},this.removeLayerPanel=()=>{this.showNodeTree=!1,this.nodeTree=null,this.activeNode={}},this.addGlobalCursorStyle=()=>{if(!document.getElementById(Ue)){const e=document.createElement("style");e.setAttribute("id",Ue),e.innerText="body * {\n cursor: pointer !important;\n }",document.body.appendChild(e)}},this.removeGlobalCursorStyle=()=>{const e=document.getElementById(Ue);e&&e.remove()},this.sendXHR=()=>{const e=encodeURIComponent(this.element.path),t="http://".concat(this.ip,":").concat(this.port,"/?file=").concat(e,"&line=").concat(this.element.line,"&column=").concat(this.element.column),i=new XMLHttpRequest;i.open("GET",t,!0),i.send(),i.addEventListener("error",()=>{this.sendType="img",this.sendImg()})},this.sendImg=()=>{const e=encodeURIComponent(this.element.path),t="http://".concat(this.ip,":").concat(this.port,"/?file=").concat(e,"&line=").concat(this.element.line,"&column=").concat(this.element.column);document.createElement("img").src=t},this.buildTargetUrl=()=>{let e=this.target;const{path:t,line:i,column:o}=this.element,n={"{file}":t,"{line}":i,"{column}":o};for(let r in n)e=e.replace(new RegExp(r,"g"),String(n[r]));return e},this.trackCode=()=>{if(this.internalLocate&&(this.sendType==="xhr"?this.sendXHR():this.sendImg()),this.internalCopy){const e=function(t,i,o,n){let r="".concat(t,":").concat(i,":").concat(o);if(typeof n=="string")r=n.replace(mt,t).replace(vt,i.toString()).replace(yt,o.toString());else if(n instanceof Array)return n.map(l=>l.replace(mt,t).replace(vt,i.toString()).replace(yt,o.toString()));return[r]}(this.element.path,String(this.element.line),String(this.element.column),this.copy);this.copyToClipboard(e[0])}this.internalTarget&&window.open(this.buildTargetUrl(),"_blank"),window.dispatchEvent(new CustomEvent("code-inspector:trackCode",{detail:this.element}))},this.handleModeShortcut=e=>{var t,i;this.isTracking(e)&&(((t=e.code)==null?void 0:t.toLowerCase())==="key".concat(this.modeKey)||((i=e.key)==null?void 0:i.toLowerCase())===this.modeKey)&&(this.toggleSettingsModal(),e.preventDefault(),e.stopPropagation())},this.handleDrag=e=>{if(e.composedPath().includes(this)?this.hoverSwitch=!0:this.hoverSwitch=!1,this.dragging){this.moved=!0;const t=this.draggingTarget==="switch"?this.inspectorSwitchRef:this.nodeTreeRef;return t.style.left=this.mousePosition.baseX+(this.getMousePosition(e).x-this.mousePosition.moveX)+"px",t.style.top=this.mousePosition.baseY+(this.getMousePosition(e).y-this.mousePosition.moveY)+"px",void(this.draggingTarget&&(this.nodeTreePosition.left=t.style.left,this.nodeTreePosition.top=t.style.top))}},this.getValidNodeList=e=>{const t=[];for(const i of e)i.hasAttribute&&i.hasAttribute(Le)?t.push({node:i,isAstro:!0}):(i.hasAttribute&&i.hasAttribute(fe)||i[fe])&&t.push({node:i,isAstro:!1});return t},this.isSamePositionNode=(e,t)=>{const i=e.getBoundingClientRect(),o=t.getBoundingClientRect();return i.top===o.top&&i.left===o.left&&i.right===o.right&&i.bottom===o.bottom},this.handleMouseMove=e=>K(this,null,function*(){if((this.isTracking(e)&&!this.dragging||this.open)&&!this.hoverSwitch){const t=e.composedPath(),i=this.getValidNodeList(t);let o;for(const{node:n,isAstro:r}of i){if(r){o=n;break}o?this.isSamePositionNode(o,n)&&(o=n):o=n}o?this.renderCover(o):this.removeCover()}else this.removeCover()}),this.handleWheel=e=>{if(!this.targetNode||(e.stopPropagation(),e.preventDefault(),this.wheelThrottling))return;this.wheelThrottling=!0;const t=e.composedPath(),i=this.getValidNodeList(t);let o=i.findIndex(({node:r})=>r===this.targetNode);if(o===-1)return void(this.wheelThrottling=!1);const n=e.deltaX||e.deltaY;n>0?o--:n<0&&o++,o>=0&&o<i.length&&this.renderCover(i[o].node),setTimeout(()=>{this.wheelThrottling=!1},200)},this.handleMouseClick=e=>{(this.isTracking(e)||this.open)&&this.show&&(e.stopPropagation(),e.preventDefault(),this.trackCode(),this.removeCover(),this.autoToggle&&(this.open=!1)),e.composedPath().includes(this.nodeTreeRef)||this.removeLayerPanel()},this.handleContextMenu=e=>{if((this.isTracking(e)&&!this.dragging||this.open)&&!this.hoverSwitch){e.preventDefault();const t=e.composedPath(),i=this.generateNodeTree(t);this.renderLayerPanel(i,{x:e.clientX,y:e.clientY})}},this.generateNodeTree=e=>{let t,i=1,o=null;for(const n of e.reverse()){const r=this.getSourceInfo(n);if(!r)continue;const l=j(N({},r),{children:[],depth:i++,element:n});o?o.children.push(l):t=l,o=l}return t},this.handlePointerDown=e=>{let t=!1,i=e.target;for(;i;){if(i.disabled){t=!0;break}i=i.parentElement}t&&(this.isTracking(e)||this.open)&&this.show&&(e.stopPropagation(),e.preventDefault(),this.trackCode(),this.removeCover(),this.autoToggle&&(this.open=!1))},this.handleKeyUp=e=>{this.isTracking(e)||this.open||this.removeCover()},this.printTip=()=>{const e=navigator.userAgent.toLowerCase(),t=["windows","win32","wow32","win64","wow64"].some(d=>e.toUpperCase().match(d.toUpperCase()))?lo:ro,i="%c",o=this.hotKeys.split(",").map(d=>i+t[d.trim()]),n=[...o,i+this.modeKey.toUpperCase()],r=this.features.filter(d=>d.checked()).map(d=>"".concat(i).concat(d.label)),l=r.length>0?r.join("".concat(i,"、")):"".concat(i,"None"),a=2*o.length+2*n.length+l.match(/%c/g).length+1,c=Array(a).fill("").map((d,p)=>p%2==0?"color: #00B42A; font-family: PingFang SC; font-size: 12px;":"color: #006aff; font-weight: bold; font-family: PingFang SC; font-size: 12px;"),h=["".concat(i,"[code-inspector-plugin]"),"".concat(i,"• Press and hold ").concat(o.join(" ".concat(i,"+ "))," ").concat(i,"to use the feature."),"• Press ".concat(n.join(" ".concat(i,"+ "))," ").concat(i,"to see and change feature."),"• Current Feature: ".concat(l)].join("\n");console.log(h,"color: #006aff; font-weight: bolder; font-size: 12px;",...c)},this.getMousePosition=e=>{var t,i;return{x:e instanceof MouseEvent?e.pageX:(t=e.touches[0])==null?void 0:t.pageX,y:e instanceof MouseEvent?e.pageY:(i=e.touches[0])==null?void 0:i.pageY}},this.recordMousePosition=(e,t)=>{const i=t==="switch"?this.inspectorSwitchRef:this.nodeTreeRef;this.mousePosition={baseX:i.offsetLeft,baseY:i.offsetTop,moveX:this.getMousePosition(e).x,moveY:this.getMousePosition(e).y},this.dragging=!0,this.draggingTarget=t,e.preventDefault()},this.handleMouseUp=e=>{this.hoverSwitch=!1,this.dragging&&(this.dragging=!1,e instanceof TouchEvent&&this.draggingTarget==="switch"&&this.switch(e))},this.switch=e=>{this.moved||(this.open=!this.open,e.preventDefault(),e.stopPropagation()),this.moved=!1},this.handleClickTreeNode=e=>{this.element=e,this.trackCode(),this.removeLayerPanel()},this.handleMouseEnterNode=(e,t)=>K(this,null,function*(){const{x:i,y:o,width:n,height:r}=e.target.getBoundingClientRect();this.activeNode={width:n-16+"px",left:i+8+"px",visibility:"hidden",top:o-4+"px",bottom:"",content:"".concat(t.path,":").concat(t.line,":").concat(t.column),class:"tooltip-top"},this.renderCover(t.element),yield bt();const{y:l}=this.nodeTreeTooltipRef.getBoundingClientRect();l<0&&(this.activeNode=j(N({},this.activeNode),{bottom:"",top:"".concat(o+r+4,"px"),class:"tooltip-bottom"})),this.activeNode=j(N({},this.activeNode),{visibility:"visible"})}),this.handleMouseLeaveNode=()=>{this.activeNode=j(N({},this.activeNode),{visibility:"hidden"}),this.removeCover(!0)},this.toggleSettingsModal=()=>{this.showSettingsModal=!this.showSettingsModal},this.closeSettingsModal=()=>{this.showSettingsModal=!1},this.toggleLocate=()=>{this.internalLocate=!this.internalLocate},this.toggleCopy=()=>{this.internalCopy=!this.internalCopy},this.toggleTarget=()=>{this.internalTarget=!this.internalTarget},this.renderNodeTree=e=>V(kt||(kt=D(['\n <div\n class="inspector-layer"\n style="padding-left: ','px;"\n @mouseenter="','"\n @mouseleave="','"\n @click="','"\n >\n &lt;',"&gt;\n </div>\n ","\n "])),8*e.depth,t=>K(this,null,function*(){return yield this.handleMouseEnterNode(t,e)}),this.handleMouseLeaveNode,()=>this.handleClickTreeNode(e),e.name,e.children.map(t=>this.renderNodeTree(t)))}showNotification(e,t="success"){const i=document.createElement("div");i.className="code-inspector-notification code-inspector-notification-".concat(t),i.textContent=e,document.body.appendChild(i),requestAnimationFrame(()=>{i.classList.add("code-inspector-notification-show")}),setTimeout(()=>{i.classList.remove("code-inspector-notification-show"),setTimeout(()=>{document.body.removeChild(i)},300)},2e3)}copyToClipboard(e){var t;try{typeof((t=navigator==null?void 0:navigator.clipboard)==null?void 0:t.writeText)=="function"?navigator.clipboard.writeText(e).then(()=>{this.showNotification("✓ Copied to clipboard")}).catch(()=>{this.fallbackCopy(e)}):this.fallbackCopy(e)}catch(i){this.fallbackCopy(e)}}fallbackCopy(e){try{const t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select();const i=document.execCommand("copy");document.body.removeChild(t),i?this.showNotification("✓ Copied to clipboard"):this.showNotification("✗ Copy failed","error")}catch(t){this.showNotification("✗ Copy failed","error")}}attachEventListeners(){this.eventListeners.forEach(({event:e,handler:t,options:i})=>{window.addEventListener(e,t,i)})}detachEventListeners(){this.eventListeners.forEach(({event:e,handler:t,options:i})=>{window.removeEventListener(e,t,i)})}firstUpdated(){this.internalLocate=this.locate,this.internalCopy=!!this.copy,this.internalTarget=!!this.target,this.eventListeners=[{event:"mousemove",handler:this.handleMouseMove,options:!0},{event:"touchmove",handler:this.handleMouseMove,options:!0},{event:"mousemove",handler:this.handleDrag,options:!0},{event:"touchmove",handler:this.handleDrag,options:!0},{event:"click",handler:this.handleMouseClick,options:!0},{event:"pointerdown",handler:this.handlePointerDown,options:!0},{event:"keyup",handler:this.handleKeyUp,options:!0},{event:"keydown",handler:this.handleModeShortcut,options:!0},{event:"mouseleave",handler:this.removeCover,options:!0},{event:"mouseup",handler:this.handleMouseUp,options:!0},{event:"touchend",handler:this.handleMouseUp,options:!0},{event:"contextmenu",handler:this.handleContextMenu,options:!0},{event:"wheel",handler:this.handleWheel,options:{passive:!1}}],this.hideConsole||this.printTip(),this.attachEventListeners()}disconnectedCallback(){this.detachEventListeners()}render(){const e={display:this.show?"block":"none",top:this.position.top-this.position.margin.top+"px",left:this.position.left-this.position.margin.left+"px",height:"".concat(this.position.bottom-this.position.top+this.position.margin.bottom+this.position.margin.top,"px"),width:"".concat(this.position.right-this.position.left+this.position.margin.right+this.position.margin.left,"px")},t={borderTopWidth:"".concat(this.position.margin.top,"px"),borderRightWidth:"".concat(this.position.margin.right,"px"),borderBottomWidth:"".concat(this.position.margin.bottom,"px"),borderLeftWidth:"".concat(this.position.margin.left,"px")},i={borderTopWidth:"".concat(this.position.border.top,"px"),borderRightWidth:"".concat(this.position.border.right,"px"),borderBottomWidth:"".concat(this.position.border.bottom,"px"),borderLeftWidth:"".concat(this.position.border.left,"px")},o={borderTopWidth:"".concat(this.position.padding.top,"px"),borderRightWidth:"".concat(this.position.padding.right,"px"),borderBottomWidth:"".concat(this.position.padding.bottom,"px"),borderLeftWidth:"".concat(this.position.padding.left,"px")},n=N({display:this.showNodeTree?"flex":"none"},this.nodeTreePosition),r={visibility:this.activeNode.visibility,maxWidth:this.activeNode.width,top:this.activeNode.top,left:this.activeNode.left,bottom:this.activeNode.bottom,display:this.showNodeTree?"":"none"};return V(Pt||(Pt=D(['\n <div\n class="code-inspector-container"\n id="code-inspector-container"\n style=','\n >\n <div class="margin-overlay" style=','>\n <div class="border-overlay" style=','>\n <div class="padding-overlay" style=','>\n <div class="content-overlay"></div>\n </div>\n </div>\n </div>\n <div\n id="element-info"\n class="element-info '," "," ",'"\n style=','\n >\n <div class="element-info-content">\n <div class="name-line">\n <div class="element-name">\n <span class="element-title">&lt;','&gt;</span>\n </div>\n </div>\n <div class="path-line">\n ',":",":",'\n </div>\n </div>\n </div>\n </div>\n <div\n id="inspector-switch"\n class="inspector-switch '," ",'"\n style=','\n @mousedown="','"\n @touchstart="','"\n @click="','"\n >\n ','\n </div>\n <div\n id="inspector-node-tree"\n class="element-info-content"\n style=','\n >\n <div\n class="inspector-layer-title"\n @mousedown="','"\n @touchstart="','"\n >\n <div>🔍️ Click node to locate</div>\n ','\n </div>\n\n <div\n class="node-tree-list"\n style="','"\n >\n ','\n <div style="height: 8px"></div>\n </div>\n </div>\n\n <!-- 设置弹窗 -->\n ','\n\n <div\n id="node-tree-tooltip"\n class="','"\n style=',"\n >\n ","\n </div>\n "])),O(e),O(t),O(i),O(o),this.elementTipStyle.vertical,this.elementTipStyle.horizon,this.elementTipStyle.visibility,O(N({width:ae+"px",maxWidth:"100vw"},this.elementTipStyle.additionStyle)),this.element.name,this.element.path,this.element.line,this.element.column,this.open?"active-inspector-switch":"",this.moved?"move-inspector-switch":"",O({display:this.showSwitch?"flex":"none"}),l=>this.recordMousePosition(l,"switch"),l=>this.recordMousePosition(l,"switch"),this.switch,this.open?V(Ct||(Ct=D(['\n <svg\n t="1677801709811"\n class="icon"\n viewBox="0 0 1024 1024"\n version="1.1"\n xmlns="http://www.w3.org/2000/svg"\n p-id="1110"\n xmlns:xlink="http://www.w3.org/1999/xlink"\n width="1em"\n height="1em"\n >\n <path\n d="M546.56 704H128c-19.2 0-32-12.8-32-32V256h704v194.56c10.928 1.552 21.648 3.76 32 6.832V128c0-35.2-28.8-64-64-64H128C92.8 64 64 92.8 64 128v544c0 35.2 28.8 64 64 64h425.392a221.936 221.936 0 0 1-6.848-32zM96 128c0-19.2 12.8-32 32-32h640c19.2 0 32 12.8 32 32v96H96V128z"\n fill="#34495E"\n p-id="1111"\n ></path>\n <path\n d="M416 160m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z"\n fill="#00B42A"\n p-id="1112"\n ></path>\n <path\n d="M288 160m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z"\n fill="#F7BA1E"\n p-id="1113"\n ></path>\n <path\n d="M160 160m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z"\n fill="#F53F3F"\n p-id="1114"\n ></path>\n <path\n d="M382.848 658.928l99.376-370.88 30.912 8.272-99.36 370.88zM318.368 319.2L160 477.6l158.4 158.4 22.64-22.624-135.792-135.776 135.776-135.776zM768 480c-13.088 0-25.888 1.344-38.24 3.84l6.24-6.24-158.4-158.4-22.64 22.624 135.792 135.776-135.776 135.776 22.656 22.624 2.208-2.224a190.768 190.768 0 0 0 30.928 148.08l-116.672 116.656c-10.24 10.24-10.24 26.896 0 37.136l27.76 27.76c5.12 5.12 11.84 7.68 18.56 7.68s13.456-2.56 18.56-7.68l120.992-120.96A190.56 190.56 0 0 0 768 864c105.872 0 192-86.128 192-192s-86.128-192-192-192z m-159.12 193.136c0-88.224 71.776-160 160-160 10.656 0 21.04 1.152 31.12 3.152V672c0 19.2-12.8 32-32 32h-156a160.144 160.144 0 0 1-3.12-30.864z m-68.464 263.584l-19.632-19.632 110.336-110.336c6.464 6.656 13.392 12.848 20.752 18.528l-111.456 111.44z m228.464-103.584c-65.92 0-122.576-40.096-147.056-97.136H768c35.2 0 64-28.8 64-64v-145.776c56.896 24.544 96.88 81.12 96.88 146.912 0 88.224-71.776 160-160 160z"\n fill="#006AFF"\n p-id="1115"\n ></path>\n <path\n d="M864.576 672c0 52.928-43.072 96-96 96v32a128 128 0 0 0 128-128h-32z"\n fill="#34495E"\n p-id="1116"\n ></path>\n </svg>\n ']))):V(At||(At=D(['<svg\n t="1677801709811"\n class="icon"\n viewBox="0 0 1024 1024"\n version="1.1"\n xmlns="http://www.w3.org/2000/svg"\n p-id="1110"\n xmlns:xlink="http://www.w3.org/1999/xlink"\n width="1em"\n height="1em"\n >\n <path\n d="M546.56 704H128c-19.2 0-32-12.8-32-32V256h704v194.56c10.928 1.552 21.648 3.76 32 6.832V128c0-35.2-28.8-64-64-64H128C92.8 64 64 92.8 64 128v544c0 35.2 28.8 64 64 64h425.392a221.936 221.936 0 0 1-6.848-32zM96 128c0-19.2 12.8-32 32-32h640c19.2 0 32 12.8 32 32v96H96V128z"\n fill="currentColor"\n p-id="1111"\n ></path>\n <path\n d="M416 160m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z"\n fill="currentColor"\n p-id="1112"\n ></path>\n <path\n d="M288 160m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z"\n fill="currentColor"\n p-id="1113"\n ></path>\n <path\n d="M160 160m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z"\n fill="currentColor"\n p-id="1114"\n ></path>\n <path\n d="M382.848 658.928l99.376-370.88 30.912 8.272-99.36 370.88zM318.368 319.2L160 477.6l158.4 158.4 22.64-22.624-135.792-135.776 135.776-135.776zM768 480c-13.088 0-25.888 1.344-38.24 3.84l6.24-6.24-158.4-158.4-22.64 22.624 135.792 135.776-135.776 135.776 22.656 22.624 2.208-2.224a190.768 190.768 0 0 0 30.928 148.08l-116.672 116.656c-10.24 10.24-10.24 26.896 0 37.136l27.76 27.76c5.12 5.12 11.84 7.68 18.56 7.68s13.456-2.56 18.56-7.68l120.992-120.96A190.56 190.56 0 0 0 768 864c105.872 0 192-86.128 192-192s-86.128-192-192-192z m-159.12 193.136c0-88.224 71.776-160 160-160 10.656 0 21.04 1.152 31.12 3.152V672c0 19.2-12.8 32-32 32h-156a160.144 160.144 0 0 1-3.12-30.864z m-68.464 263.584l-19.632-19.632 110.336-110.336c6.464 6.656 13.392 12.848 20.752 18.528l-111.456 111.44z m228.464-103.584c-65.92 0-122.576-40.096-147.056-97.136H768c35.2 0 64-28.8 64-64v-145.776c56.896 24.544 96.88 81.12 96.88 146.912 0 88.224-71.776 160-160 160z"\n fill="currentColor"\n p-id="1115"\n ></path>\n <path\n d="M864.576 672c0 52.928-43.072 96-96 96v32a128 128 0 0 0 128-128h-32z"\n fill="currentColor"\n p-id="1116"\n ></path>\n </svg>']))),O(n),l=>this.recordMousePosition(l,"nodeTree"),l=>this.recordMousePosition(l,"nodeTree"),V(St||(St=D(['<svg\n xmlns="http://www.w3.org/2000/svg"\n width="16"\n height="16"\n viewBox="0 0 24 24"\n fill="none"\n stroke="currentColor"\n stroke-width="2"\n stroke-linecap="round"\n stroke-linejoin="round"\n class="close-icon"\n @click="','"\n >\n <path d="M18 6 6 18" />\n <path d="m6 6 12 12" />\n </svg>'])),this.removeLayerPanel),O({pointerEvents:this.dragging?"none":""}),this.nodeTree?this.renderNodeTree(this.nodeTree):"",this.showSettingsModal?V(Mt||(Mt=D(['\n <div\n class="settings-modal-overlay"\n @click="','"\n >\n <div\n class="settings-modal"\n @click="','"\n >\n <div class="settings-modal-header">\n <h3 class="settings-modal-title">Mode Settings</h3>\n <button\n class="settings-modal-close"\n @click="','"\n >\n ×\n </button>\n </div>\n <div class="settings-modal-content">\n ',"\n </div>\n </div>\n </div>\n "])),this.closeSettingsModal,l=>l.stopPropagation(),this.closeSettingsModal,this.features.map(l=>V(Tt||(Tt=D(['\n <div class="settings-item">\n <label class="settings-label">\n <span class="settings-label-text"\n >','</span\n >\n <span class="settings-label-desc"\n >','</span\n >\n </label>\n <label class="settings-switch">\n <input\n type="checkbox"\n .checked="','"\n @change="','"\n />\n <span class="settings-slider"></span>\n </label>\n </div>\n '])),l.label,l.description,l.checked(),l.onChange))):"",this.activeNode.class,O(r),this.activeNode.content)}}if(m.styles=((s,...e)=>{const t=s.length===1?s[0]:e.reduce((i,o,n)=>i+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+s[n+1],s[0]);return new de(t,s,Q)})(Nt||(Nt=D(["\n .code-inspector-container {\n position: fixed;\n pointer-events: none;\n z-index: 9999999999999;\n font-family: 'PingFang SC';\n .margin-overlay {\n position: absolute;\n inset: 0;\n border-style: solid;\n border-color: rgba(255, 155, 0, 0.3);\n .border-overlay {\n position: absolute;\n inset: 0;\n border-style: solid;\n border-color: rgba(255, 200, 50, 0.3);\n .padding-overlay {\n position: absolute;\n inset: 0;\n border-style: solid;\n border-color: rgba(77, 200, 0, 0.3);\n .content-overlay {\n position: absolute;\n inset: 0;\n background: rgba(120, 170, 210, 0.7);\n }\n }\n }\n }\n }\n .element-info {\n position: absolute;\n }\n .element-info.hidden {\n visibility: hidden;\n }\n .element-info-content {\n max-width: 100%;\n font-size: 12px;\n color: #000;\n background-color: #fff;\n word-break: break-all;\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);\n box-sizing: border-box;\n padding: 4px 8px;\n border-radius: 4px;\n }\n .element-info-top {\n top: -4px;\n transform: translateY(-100%);\n }\n .element-info-bottom {\n top: calc(100% + 4px);\n }\n .element-info-top-inner {\n top: 4px;\n }\n .element-info-bottom-inner {\n bottom: 4px;\n }\n .element-info-left {\n left: 0;\n display: flex;\n justify-content: flex-start;\n }\n .element-info-right {\n right: 0;\n display: flex;\n justify-content: flex-end;\n }\n .element-name .element-title {\n color: coral;\n font-weight: bold;\n }\n .path-line {\n color: #333;\n line-height: 12px;\n margin-top: 4px;\n }\n .inspector-switch {\n position: fixed;\n z-index: 9999999999999;\n top: 50%;\n right: 24px;\n font-size: 22px;\n transform: translateY(-100%);\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: rgba(255, 255, 255, 0.8);\n color: #555;\n height: 32px;\n width: 32px;\n border-radius: 50%;\n box-shadow: 0px 1px 2px -2px rgba(0, 0, 0, 0.2),\n 0px 3px 6px 0px rgba(0, 0, 0, 0.16),\n 0px 5px 12px 4px rgba(0, 0, 0, 0.12);\n cursor: pointer;\n }\n .active-inspector-switch {\n color: #006aff;\n }\n .move-inspector-switch {\n cursor: move;\n }\n #inspector-node-tree {\n position: fixed;\n user-select: none;\n z-index: 9999999999999999;\n min-width: 300px;\n max-width: min(max(30vw, 300px), 400px);\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,\n 'Liberation Mono', 'Courier New', monospace;\n display: flex;\n flex-direction: column;\n padding: 0;\n\n .inspector-layer-title {\n border-bottom: 1px solid #eee;\n padding: 8px 8px 4px;\n margin-bottom: 8px;\n flex-shrink: 0;\n display: flex;\n justify-content: space-between;\n align-items: center;\n cursor: move;\n user-select: none;\n &:hover {\n background: rgba(0, 106, 255, 0.1);\n }\n }\n\n .node-tree-list {\n flex: 1;\n overflow-y: auto;\n min-height: 0;\n }\n\n .inspector-layer {\n cursor: pointer;\n position: relative;\n padding-right: 8px;\n &:hover {\n background: #fdf4bf;\n }\n }\n\n .path-line {\n font-size: 9px;\n color: #777;\n margin-top: 1px;\n font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;\n }\n }\n\n #node-tree-tooltip {\n position: fixed;\n box-sizing: border-box;\n z-index: 999999999999999999;\n background: rgba(0, 0, 0, 0.6);\n color: white;\n padding: 2px 6px;\n border-radius: 4px;\n font-size: 12px;\n white-space: wrap;\n pointer-events: none;\n word-break: break-all;\n }\n .tooltip-top {\n transform: translateY(-100%);\n }\n .close-icon {\n cursor: pointer;\n }\n\n /* 设置弹窗样式 */\n .settings-modal-overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 99999999999999999;\n animation: fadeIn 0.2s ease-out;\n }\n\n .settings-modal {\n background: #fff;\n border-radius: 12px;\n box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);\n width: 90%;\n max-width: 480px;\n max-height: 90vh;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n animation: slideUp 0.3s ease-out;\n }\n\n .settings-modal-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 20px 24px;\n border-bottom: 1px solid #eee;\n }\n\n .settings-modal-title {\n margin: 0;\n font-size: 18px;\n font-weight: 600;\n color: #333;\n }\n\n .settings-modal-close {\n background: none;\n border: none;\n font-size: 28px;\n color: #999;\n cursor: pointer;\n padding: 0;\n width: 32px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 4px;\n transition: all 0.2s;\n }\n\n .settings-modal-close:hover {\n background: #f5f5f5;\n color: #333;\n }\n\n .settings-modal-content {\n padding: 16px 24px;\n overflow-y: auto;\n flex: 1;\n }\n\n .settings-item {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 16px 0;\n border-bottom: 1px solid #f5f5f5;\n }\n\n .settings-item:last-child {\n border-bottom: none;\n }\n\n .settings-label {\n display: flex;\n flex-direction: column;\n flex: 1;\n margin-right: 16px;\n cursor: pointer;\n }\n\n .settings-label-text {\n font-size: 15px;\n font-weight: 500;\n color: #333;\n margin-bottom: 4px;\n }\n\n .settings-label-desc {\n font-size: 13px;\n color: #999;\n }\n\n .settings-switch {\n position: relative;\n display: inline-block;\n width: 44px;\n height: 24px;\n flex-shrink: 0;\n }\n\n .settings-switch input {\n opacity: 0;\n width: 0;\n height: 0;\n }\n\n .settings-slider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: #ccc;\n transition: 0.3s;\n border-radius: 24px;\n }\n\n .settings-slider:before {\n position: absolute;\n content: '';\n height: 18px;\n width: 18px;\n left: 3px;\n bottom: 3px;\n background-color: white;\n transition: 0.3s;\n border-radius: 50%;\n }\n\n .settings-switch input:checked + .settings-slider {\n background-color: #006aff;\n }\n\n .settings-switch input:checked + .settings-slider:before {\n transform: translateX(20px);\n }\n\n .settings-switch input:focus + .settings-slider {\n box-shadow: 0 0 1px #006aff;\n }\n\n @keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n @keyframes slideUp {\n from {\n transform: translateY(20px);\n opacity: 0;\n }\n to {\n transform: translateY(0);\n opacity: 1;\n }\n }\n "]))),v([P()],m.prototype,"hotKeys",2),v([P()],m.prototype,"port",2),v([P()],m.prototype,"showSwitch",2),v([P()],m.prototype,"autoToggle",2),v([P()],m.prototype,"hideConsole",2),v([P()],m.prototype,"locate",2),v([P()],m.prototype,"copy",2),v([P()],m.prototype,"target",2),v([P()],m.prototype,"targetNode",2),v([P()],m.prototype,"ip",2),v([P()],m.prototype,"modeKey",2),v([x()],m.prototype,"position",2),v([x()],m.prototype,"element",2),v([x()],m.prototype,"elementTipStyle",2),v([x()],m.prototype,"show",2),v([x()],m.prototype,"showNodeTree",2),v([x()],m.prototype,"nodeTreePosition",2),v([x()],m.prototype,"nodeTree",2),v([x()],m.prototype,"dragging",2),v([x()],m.prototype,"mousePosition",2),v([x()],m.prototype,"draggingTarget",2),v([x()],m.prototype,"open",2),v([x()],m.prototype,"moved",2),v([x()],m.prototype,"hoverSwitch",2),v([x()],m.prototype,"preUserSelect",2),v([x()],m.prototype,"sendType",2),v([x()],m.prototype,"activeNode",2),v([x()],m.prototype,"showSettingsModal",2),v([x()],m.prototype,"internalLocate",2),v([x()],m.prototype,"internalCopy",2),v([x()],m.prototype,"internalTarget",2),v([Z("#inspector-switch")],m.prototype,"inspectorSwitchRef",2),v([Z("#code-inspector-container")],m.prototype,"codeInspectorContainerRef",2),v([Z("#element-info")],m.prototype,"elementInfoRef",2),v([Z("#inspector-node-tree")],m.prototype,"nodeTreeRef",2),v([Z(".inspector-layer-title")],m.prototype,"nodeTreeTitleRef",2),v([Z("#node-tree-tooltip")],m.prototype,"nodeTreeTooltipRef",2),!document.getElementById("code-inspector-notification-styles")){const s=document.createElement("style");s.id="code-inspector-notification-styles",s.textContent="\n .code-inspector-notification {\n position: fixed;\n top: 20px;\n right: 20px;\n z-index: 99999999999999999;\n padding: 12px 16px;\n border-radius: 8px;\n font-size: 14px;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;\n font-weight: 500;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n opacity: 0;\n transform: translateY(-10px);\n transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n pointer-events: none;\n }\n .code-inspector-notification-success {\n background: hsl(143, 85%, 96%);\n color: hsl(140, 100%, 27%);\n border: 1px solid hsl(145, 92%, 91%);\n }\n .code-inspector-notification-error {\n background: hsl(0, 93%, 94%);\n color: hsl(0, 84%, 40%);\n border: 1px solid hsl(0, 93%, 94%);\n }\n .code-inspector-notification-show {\n opacity: 1;\n transform: translateY(0);\n }\n ",document.head.appendChild(s)}return customElements.get("code-inspector-component")||customElements.define("code-inspector-component",m),C.CodeInspectorComponent=m,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"}),C}({});
1
+ var qo,Fo,Wo,Yo,Ko,Xo,Zo,Go,Qo,Jo,ei,ti,ni,oi,ii,ri,si,ai,li,ci,hi,pi,di,ui,gi,fi,mi,bi,yi,xi,vi,wi,ki,$i,Si,Ci,Ti,Ai,vueInspectorClient=function(R){var wt;"use strict";var jo=Object.freeze,Uo=Object.defineProperty,is=Object.defineProperties;var rs=Object.getOwnPropertyDescriptors;var St=Object.getOwnPropertySymbols;var Vo=Object.prototype.hasOwnProperty,Ho=Object.prototype.propertyIsEnumerable;var U=Math.pow,dn=(R,P,I)=>P in R?Uo(R,P,{enumerable:!0,configurable:!0,writable:!0,value:I}):R[P]=I,C=(R,P)=>{for(var I in P||(P={}))Vo.call(P,I)&&dn(R,I,P[I]);if(St)for(var I of St(P))Ho.call(P,I)&&dn(R,I,P[I]);return R},N=(R,P)=>is(R,rs(P));var un=(R,P)=>{var I={};for(var H in R)Vo.call(R,H)&&P.indexOf(H)<0&&(I[H]=R[H]);if(R!=null&&St)for(var H of St(R))P.indexOf(H)<0&&Ho.call(R,H)&&(I[H]=R[H]);return I};var z=(R,P,I)=>(dn(R,typeof P!="symbol"?P+"":P,I),I);var $=(R,P)=>jo(Uo(R,"raw",{value:jo(P||R.slice())})),O=(R,P,I)=>new Promise((H,Le)=>{var Ge=X=>{try{Se(I.next(X))}catch(ue){Le(ue)}},Qe=X=>{try{Se(I.throw(X))}catch(ue){Le(ue)}},Se=X=>X.done?H(X.value):Promise.resolve(X.value).then(Ge,Qe);Se((I=I.apply(R,P)).next())});const P=window,I=P.ShadowRoot&&(P.ShadyCSS===void 0||P.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,H=Symbol(),Le=new WeakMap;let Ge=class{constructor(n,e,t){if(this._$cssResult$=!0,t!==H)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=n,this.t=e}get styleSheet(){let n=this.o;const e=this.t;if(I&&n===void 0){const t=e!==void 0&&e.length===1;t&&(n=Le.get(e)),n===void 0&&((this.o=n=new CSSStyleSheet).replaceSync(this.cssText),t&&Le.set(e,n))}return n}toString(){return this.cssText}};const Qe=(n,...e)=>{const t=n.length===1?n[0]:e.reduce((i,o,r)=>i+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+n[r+1],n[0]);return new Ge(t,n,H)},Se=I?n=>n:n=>n instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return(i=>new Ge(typeof i=="string"?i:i+"",void 0,H))(t)})(n):n;var X;const ue=window,mn=ue.trustedTypes,Mi=mn?mn.emptyScript:"",bn=ue.reactiveElementPolyfillSupport,Ct={toAttribute(n,e){switch(e){case Boolean:n=n?Mi:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,e){let t=n;switch(e){case Boolean:t=n!==null;break;case Number:t=n===null?null:Number(n);break;case Object:case Array:try{t=JSON.parse(n)}catch(i){t=null}}return t}},yn=(n,e)=>e!==n&&(e==e||n==n),Tt={attribute:!0,type:String,converter:Ct,reflect:!1,hasChanged:yn};let Ce=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(n){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(n)}static get observedAttributes(){this.finalize();const n=[];return this.elementProperties.forEach((e,t)=>{const i=this._$Ep(t,e);i!==void 0&&(this._$Ev.set(i,t),n.push(i))}),n}static createProperty(n,e=Tt){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(n,e),!e.noAccessor&&!this.prototype.hasOwnProperty(n)){const t=typeof n=="symbol"?Symbol():"__"+n,i=this.getPropertyDescriptor(n,t,e);i!==void 0&&Object.defineProperty(this.prototype,n,i)}}static getPropertyDescriptor(n,e,t){return{get(){return this[e]},set(i){const o=this[n];this[e]=i,this.requestUpdate(n,o,t)},configurable:!0,enumerable:!0}}static getPropertyOptions(n){return this.elementProperties.get(n)||Tt}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const n=Object.getPrototypeOf(this);if(n.finalize(),n.h!==void 0&&(this.h=[...n.h]),this.elementProperties=new Map(n.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,t=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const i of t)this.createProperty(i,e[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(n){const e=[];if(Array.isArray(n)){const t=new Set(n.flat(1/0).reverse());for(const i of t)e.unshift(Se(i))}else n!==void 0&&e.push(Se(n));return e}static _$Ep(n,e){const t=e.attribute;return t===!1?void 0:typeof t=="string"?t:typeof n=="string"?n.toLowerCase():void 0}u(){var n;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(n=this.constructor.h)===null||n===void 0||n.forEach(e=>e(this))}addController(n){var e,t;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(n),this.renderRoot!==void 0&&this.isConnected&&((t=n.hostConnected)===null||t===void 0||t.call(n))}removeController(n){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(n)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((n,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var n;const e=(n=this.shadowRoot)!==null&&n!==void 0?n:this.attachShadow(this.constructor.shadowRootOptions);return((t,i)=>{I?t.adoptedStyleSheets=i.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):i.forEach(o=>{const r=document.createElement("style"),s=P.litNonce;s!==void 0&&r.setAttribute("nonce",s),r.textContent=o.cssText,t.appendChild(r)})})(e,this.constructor.elementStyles),e}connectedCallback(){var n;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(n=this._$ES)===null||n===void 0||n.forEach(e=>{var t;return(t=e.hostConnected)===null||t===void 0?void 0:t.call(e)})}enableUpdating(n){}disconnectedCallback(){var n;(n=this._$ES)===null||n===void 0||n.forEach(e=>{var t;return(t=e.hostDisconnected)===null||t===void 0?void 0:t.call(e)})}attributeChangedCallback(n,e,t){this._$AK(n,t)}_$EO(n,e,t=Tt){var i;const o=this.constructor._$Ep(n,t);if(o!==void 0&&t.reflect===!0){const r=(((i=t.converter)===null||i===void 0?void 0:i.toAttribute)!==void 0?t.converter:Ct).toAttribute(e,t.type);this._$El=n,r==null?this.removeAttribute(o):this.setAttribute(o,r),this._$El=null}}_$AK(n,e){var t;const i=this.constructor,o=i._$Ev.get(n);if(o!==void 0&&this._$El!==o){const r=i.getPropertyOptions(o),s=typeof r.converter=="function"?{fromAttribute:r.converter}:((t=r.converter)===null||t===void 0?void 0:t.fromAttribute)!==void 0?r.converter:Ct;this._$El=o,this[o]=s.fromAttribute(e,r.type),this._$El=null}}requestUpdate(n,e,t){let i=!0;n!==void 0&&(((t=t||this.constructor.getPropertyOptions(n)).hasChanged||yn)(this[n],e)?(this._$AL.has(n)||this._$AL.set(n,e),t.reflect===!0&&this._$El!==n&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(n,t))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}_$Ej(){return O(this,null,function*(){this.isUpdatePending=!0;try{yield this._$E_}catch(e){Promise.reject(e)}const n=this.scheduleUpdate();return n!=null&&(yield n),!this.isUpdatePending})}scheduleUpdate(){return this.performUpdate()}performUpdate(){var n;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((i,o)=>this[o]=i),this._$Ei=void 0);let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(n=this._$ES)===null||n===void 0||n.forEach(i=>{var o;return(o=i.hostUpdate)===null||o===void 0?void 0:o.call(i)}),this.update(t)):this._$Ek()}catch(i){throw e=!1,this._$Ek(),i}e&&this._$AE(t)}willUpdate(n){}_$AE(n){var e;(e=this._$ES)===null||e===void 0||e.forEach(t=>{var i;return(i=t.hostUpdated)===null||i===void 0?void 0:i.call(t)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(n)),this.updated(n)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(n){return!0}update(n){this._$EC!==void 0&&(this._$EC.forEach((e,t)=>this._$EO(t,this[t],e)),this._$EC=void 0),this._$Ek()}updated(n){}firstUpdated(n){}};var At;Ce.finalized=!0,Ce.elementProperties=new Map,Ce.elementStyles=[],Ce.shadowRootOptions={mode:"open"},bn==null||bn({ReactiveElement:Ce}),((X=ue.reactiveElementVersions)!==null&&X!==void 0?X:ue.reactiveElementVersions=[]).push("1.6.1");const Je=window,Te=Je.trustedTypes,xn=Te?Te.createPolicy("lit-html",{createHTML:n=>n}):void 0,ge="lit$".concat((Math.random()+"").slice(9),"$"),vn="?"+ge,Ri="<".concat(vn,">"),Ae=document,Ne=(n="")=>Ae.createComment(n),Oe=n=>n===null||typeof n!="object"&&typeof n!="function",wn=Array.isArray,Be=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,kn=/-->/g,$n=/>/g,ve=RegExp(">|[ \n\f\r](?:([^\\s\"'>=/]+)([ \n\f\r]*=[ \n\f\r]*(?:[^ \n\f\r\"'`<>=]|(\"|')|))|$)","g"),Sn=/'/g,Cn=/"/g,Tn=/^(?:script|style|textarea|title)$/i,S=(n=>(e,...t)=>({_$litType$:n,strings:e,values:t}))(1),fe=Symbol.for("lit-noChange"),B=Symbol.for("lit-nothing"),An=new WeakMap,_e=Ae.createTreeWalker(Ae,129,null,!1),Pi=(n,e)=>{const t=n.length-1,i=[];let o,r=e===2?"<svg>":"",s=Be;for(let l=0;l<t;l++){const c=n[l];let h,p,d=-1,g=0;for(;g<c.length&&(s.lastIndex=g,p=s.exec(c),p!==null);)g=s.lastIndex,s===Be?p[1]==="!--"?s=kn:p[1]!==void 0?s=$n:p[2]!==void 0?(Tn.test(p[2])&&(o=RegExp("</"+p[2],"g")),s=ve):p[3]!==void 0&&(s=ve):s===ve?p[0]===">"?(s=o!=null?o:Be,d=-1):p[1]===void 0?d=-2:(d=s.lastIndex-p[2].length,h=p[1],s=p[3]===void 0?ve:p[3]==='"'?Cn:Sn):s===Cn||s===Sn?s=ve:s===kn||s===$n?s=Be:(s=ve,o=void 0);const u=s===ve&&n[l+1].startsWith("/>")?" ":"";r+=s===Be?c+Ri:d>=0?(i.push(h),c.slice(0,d)+"$lit$"+c.slice(d)+ge+u):c+ge+(d===-2?(i.push(void 0),l):u)}const a=r+(n[t]||"<?>")+(e===2?"</svg>":"");if(!Array.isArray(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return[xn!==void 0?xn.createHTML(a):a,i]};let _t=class _i{constructor({strings:e,_$litType$:t},i){let o;this.parts=[];let r=0,s=0;const a=e.length-1,l=this.parts,[c,h]=Pi(e,t);if(this.el=_i.createElement(c,i),_e.currentNode=this.el.content,t===2){const p=this.el.content,d=p.firstChild;d.remove(),p.append(...d.childNodes)}for(;(o=_e.nextNode())!==null&&l.length<a;){if(o.nodeType===1){if(o.hasAttributes()){const p=[];for(const d of o.getAttributeNames())if(d.endsWith("$lit$")||d.startsWith(ge)){const g=h[s++];if(p.push(d),g!==void 0){const u=o.getAttribute(g.toLowerCase()+"$lit$").split(ge),m=/([.?@])?(.*)/.exec(g);l.push({type:1,index:r,name:m[2],strings:u,ctor:m[1]==="."?Ii:m[1]==="?"?Li:m[1]==="@"?Ni:et})}else l.push({type:6,index:r})}for(const d of p)o.removeAttribute(d)}if(Tn.test(o.tagName)){const p=o.textContent.split(ge),d=p.length-1;if(d>0){o.textContent=Te?Te.emptyScript:"";for(let g=0;g<d;g++)o.append(p[g],Ne()),_e.nextNode(),l.push({type:2,index:++r});o.append(p[d],Ne())}}}else if(o.nodeType===8)if(o.data===vn)l.push({type:2,index:r});else{let p=-1;for(;(p=o.data.indexOf(ge,p+1))!==-1;)l.push({type:7,index:r}),p+=ge.length-1}r++}}static createElement(e,t){const i=Ae.createElement("template");return i.innerHTML=e,i}};function Ee(n,e,t=n,i){var o,r,s,a;if(e===fe)return e;let l=i!==void 0?(o=t._$Co)===null||o===void 0?void 0:o[i]:t._$Cl;const c=Oe(e)?void 0:e._$litDirective$;return(l==null?void 0:l.constructor)!==c&&((r=l==null?void 0:l._$AO)===null||r===void 0||r.call(l,!1),c===void 0?l=void 0:(l=new c(n),l._$AT(n,t,i)),i!==void 0?((s=(a=t)._$Co)!==null&&s!==void 0?s:a._$Co=[])[i]=l:t._$Cl=l),l!==void 0&&(e=Ee(n,l._$AS(n,e.values),l,i)),e}class zi{constructor(e,t){this.u=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(e){var t;const{el:{content:i},parts:o}=this._$AD,r=((t=e==null?void 0:e.creationScope)!==null&&t!==void 0?t:Ae).importNode(i,!0);_e.currentNode=r;let s=_e.nextNode(),a=0,l=0,c=o[0];for(;c!==void 0;){if(a===c.index){let h;c.type===2?h=new Et(s,s.nextSibling,this,e):c.type===1?h=new c.ctor(s,c.name,c.strings,this,e):c.type===6&&(h=new Oi(s,this,e)),this.u.push(h),c=o[++l]}a!==(c==null?void 0:c.index)&&(s=_e.nextNode(),a++)}return r}p(e){let t=0;for(const i of this.u)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,t),t+=i.strings.length-2):i._$AI(e[t])),t++}}let Et=class Ei{constructor(e,t,i,o){var r;this.type=2,this._$AH=B,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=i,this.options=o,this._$Cm=(r=o==null?void 0:o.isConnected)===null||r===void 0||r}get _$AU(){var e,t;return(t=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&t!==void 0?t:this._$Cm}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&e.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Ee(this,e,t),Oe(e)?e===B||e==null||e===""?(this._$AH!==B&&this._$AR(),this._$AH=B):e!==this._$AH&&e!==fe&&this.g(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):(i=>wn(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function")(e)?this.k(e):this.g(e)}O(e,t=this._$AB){return this._$AA.parentNode.insertBefore(e,t)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}g(e){this._$AH!==B&&Oe(this._$AH)?this._$AA.nextSibling.data=e:this.T(Ae.createTextNode(e)),this._$AH=e}$(e){var t;const{values:i,_$litType$:o}=e,r=typeof o=="number"?this._$AC(e):(o.el===void 0&&(o.el=_t.createElement(o.h,this.options)),o);if(((t=this._$AH)===null||t===void 0?void 0:t._$AD)===r)this._$AH.p(i);else{const s=new zi(r,this),a=s.v(this.options);s.p(i),this.T(a),this._$AH=s}}_$AC(e){let t=An.get(e.strings);return t===void 0&&An.set(e.strings,t=new _t(e)),t}k(e){wn(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let i,o=0;for(const r of e)o===t.length?t.push(i=new Ei(this.O(Ne()),this.O(Ne()),this,this.options)):i=t[o],i._$AI(r),o++;o<t.length&&(this._$AR(i&&i._$AB.nextSibling,o),t.length=o)}_$AR(e=this._$AA.nextSibling,t){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,t);e&&e!==this._$AB;){const o=e.nextSibling;e.remove(),e=o}}setConnected(e){var t;this._$AM===void 0&&(this._$Cm=e,(t=this._$AP)===null||t===void 0||t.call(this,e))}},et=class{constructor(n,e,t,i,o){this.type=1,this._$AH=B,this._$AN=void 0,this.element=n,this.name=e,this._$AM=i,this.options=o,t.length>2||t[0]!==""||t[1]!==""?(this._$AH=Array(t.length-1).fill(new String),this.strings=t):this._$AH=B}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(n,e=this,t,i){const o=this.strings;let r=!1;if(o===void 0)n=Ee(this,n,e,0),r=!Oe(n)||n!==this._$AH&&n!==fe,r&&(this._$AH=n);else{const s=n;let a,l;for(n=o[0],a=0;a<o.length-1;a++)l=Ee(this,s[t+a],e,a),l===fe&&(l=this._$AH[a]),r||(r=!Oe(l)||l!==this._$AH[a]),l===B?n=B:n!==B&&(n+=(l!=null?l:"")+o[a+1]),this._$AH[a]=l}r&&!i&&this.j(n)}j(n){n===B?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,n!=null?n:"")}},Ii=class extends et{constructor(){super(...arguments),this.type=3}j(n){this.element[this.name]=n===B?void 0:n}};const Di=Te?Te.emptyScript:"";let Li=class extends et{constructor(){super(...arguments),this.type=4}j(n){n&&n!==B?this.element.setAttribute(this.name,Di):this.element.removeAttribute(this.name)}};class Ni extends et{constructor(e,t,i,o,r){super(e,t,i,o,r),this.type=5}_$AI(e,t=this){var i;if((e=(i=Ee(this,e,t,0))!==null&&i!==void 0?i:B)===fe)return;const o=this._$AH,r=e===B&&o!==B||e.capture!==o.capture||e.once!==o.once||e.passive!==o.passive,s=e!==B&&(o===B||r);r&&this.element.removeEventListener(this.name,this,o),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,i;typeof this._$AH=="function"?this._$AH.call((i=(t=this.options)===null||t===void 0?void 0:t.host)!==null&&i!==void 0?i:this.element,e):this._$AH.handleEvent(e)}}let Oi=class{constructor(n,e,t){this.element=n,this.type=6,this._$AN=void 0,this._$AM=e,this.options=t}get _$AU(){return this._$AM._$AU}_$AI(n){Ee(this,n)}};const _n=Je.litHtmlPolyfillSupport;_n==null||_n(_t,Et),((At=Je.litHtmlVersions)!==null&&At!==void 0?At:Je.litHtmlVersions=[]).push("2.6.1");var Mt,Rt;class je extends Ce{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const i=super.createRenderRoot();return(e=(t=this.renderOptions).renderBefore)!==null&&e!==void 0||(t.renderBefore=i.firstChild),i}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=((i,o,r)=>{var s,a;const l=(s=r==null?void 0:r.renderBefore)!==null&&s!==void 0?s:o;let c=l._$litPart$;if(c===void 0){const h=(a=r==null?void 0:r.renderBefore)!==null&&a!==void 0?a:null;l._$litPart$=c=new Et(o.insertBefore(Ne(),h),h,void 0,r!=null?r:{})}return c._$AI(i),c})(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return fe}}je.finalized=!0,je._$litElement$=!0,(Mt=globalThis.litElementHydrateSupport)===null||Mt===void 0||Mt.call(globalThis,{LitElement:je});const En=globalThis.litElementPolyfillSupport;En==null||En({LitElement:je}),((Rt=globalThis.litElementVersions)!==null&&Rt!==void 0?Rt:globalThis.litElementVersions=[]).push("3.2.2");const Bi=(n,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?N(C({},e),{finisher(t){t.createProperty(e.key,n)}}):{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(t){t.createProperty(e.key,n)}};function F(n){return(e,t)=>t!==void 0?((i,o,r)=>{o.constructor.createProperty(r,i)})(n,e,t):Bi(n,e)}function T(n){return F(N(C({},n),{state:!0}))}function Me(n,e){return(({finisher:t,descriptor:i})=>(o,r)=>{var s;if(r===void 0){const a=(s=o.originalKey)!==null&&s!==void 0?s:o.key,l=i!=null?{kind:"method",placement:"prototype",key:a,descriptor:i(o.key)}:N(C({},o),{key:a});return t!=null&&(l.finisher=function(c){t(c,a)}),l}{const a=o.constructor;i!==void 0&&Object.defineProperty(o,r,i(r)),t==null||t(a,r)}})({descriptor:t=>{const i={get(){var o,r;return(r=(o=this.renderRoot)===null||o===void 0?void 0:o.querySelector(n))!==null&&r!==void 0?r:null},enumerable:!0,configurable:!0};if(e){const o=typeof t=="symbol"?Symbol():"__"+t;i.get=function(){var r,s;return this[o]===void 0&&(this[o]=(s=(r=this.renderRoot)===null||r===void 0?void 0:r.querySelector(n))!==null&&s!==void 0?s:null),this[o]}}return i}})}var Pt;(Pt=window.HTMLSlotElement)===null||Pt===void 0||Pt.prototype.assignedElements;const ji=1,Ui=2,Mn=n=>(...e)=>({_$litDirective$:n,values:e});let Rn=class{constructor(n){}get _$AU(){return this._$AM._$AU}_$AT(n,e,t){this._$Ct=n,this._$AM=e,this._$Ci=t}_$AS(n,e){return this.update(n,e)}update(n,e){return this.render(...e)}};const le=Mn(class extends Rn{constructor(n){var e;if(super(n),n.type!==ji||n.name!=="style"||((e=n.strings)===null||e===void 0?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(n){return Object.keys(n).reduce((e,t)=>{const i=n[t];return i==null?e:e+"".concat(t=t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase(),":").concat(i,";")},"")}update(n,[e]){const{style:t}=n.element;if(this.vt===void 0){this.vt=new Set;for(const i in e)this.vt.add(i);return this.render(e)}this.vt.forEach(i=>{e[i]==null&&(this.vt.delete(i),i.includes("-")?t.removeProperty(i):t[i]="")});for(const i in e){const o=e[i];o!=null&&(this.vt.add(i),i.includes("-")?t.setProperty(i,o):t[i]=o)}return fe}}),tt="data-insp-path",Vi=Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}));function Hi(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var t=function i(){if(this instanceof i){var o=[null];return o.push.apply(o,arguments),new(Function.bind.apply(e,o))}return e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(i){var o=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:function(){return n[i]}})}),t}var Pn,zn,zt,In,It,Dn,Ln,Nn,On={exports:{}};function Bn(){if(In)return zt;In=1;const n=zn?Pn:(zn=1,Pn={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),e={};for(const o of Object.keys(n))e[n[o]]=o;const t={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};zt=t;for(const o of Object.keys(t)){if(!("channels"in t[o]))throw new Error("missing channels property: "+o);if(!("labels"in t[o]))throw new Error("missing channel labels property: "+o);if(t[o].labels.length!==t[o].channels)throw new Error("channel and label counts mismatch: "+o);const{channels:r,labels:s}=t[o];delete t[o].channels,delete t[o].labels,Object.defineProperty(t[o],"channels",{value:r}),Object.defineProperty(t[o],"labels",{value:s})}function i(o,r){return U(o[0]-r[0],2)+U(o[1]-r[1],2)+U(o[2]-r[2],2)}return t.rgb.hsl=function(o){const r=o[0]/255,s=o[1]/255,a=o[2]/255,l=Math.min(r,s,a),c=Math.max(r,s,a),h=c-l;let p,d;c===l?p=0:r===c?p=(s-a)/h:s===c?p=2+(a-r)/h:a===c&&(p=4+(r-s)/h),p=Math.min(60*p,360),p<0&&(p+=360);const g=(l+c)/2;return d=c===l?0:g<=.5?h/(c+l):h/(2-c-l),[p,100*d,100*g]},t.rgb.hsv=function(o){let r,s,a,l,c;const h=o[0]/255,p=o[1]/255,d=o[2]/255,g=Math.max(h,p,d),u=g-Math.min(h,p,d),m=function(f){return(g-f)/6/u+.5};return u===0?(l=0,c=0):(c=u/g,r=m(h),s=m(p),a=m(d),h===g?l=a-s:p===g?l=.3333333333333333+r-a:d===g&&(l=.6666666666666666+s-r),l<0?l+=1:l>1&&(l-=1)),[360*l,100*c,100*g]},t.rgb.hwb=function(o){const r=o[0],s=o[1];let a=o[2];const l=t.rgb.hsl(o)[0],c=1/255*Math.min(r,Math.min(s,a));return a=1-.00392156862745098*Math.max(r,Math.max(s,a)),[l,100*c,100*a]},t.rgb.cmyk=function(o){const r=o[0]/255,s=o[1]/255,a=o[2]/255,l=Math.min(1-r,1-s,1-a);return[100*((1-r-l)/(1-l)||0),100*((1-s-l)/(1-l)||0),100*((1-a-l)/(1-l)||0),100*l]},t.rgb.keyword=function(o){const r=e[o];if(r)return r;let s,a=1/0;for(const l of Object.keys(n)){const c=i(o,n[l]);c<a&&(a=c,s=l)}return s},t.keyword.rgb=function(o){return n[o]},t.rgb.xyz=function(o){let r=o[0]/255,s=o[1]/255,a=o[2]/255;return r=r>.04045?U((r+.055)/1.055,2.4):r/12.92,s=s>.04045?U((s+.055)/1.055,2.4):s/12.92,a=a>.04045?U((a+.055)/1.055,2.4):a/12.92,[100*(.4124*r+.3576*s+.1805*a),100*(.2126*r+.7152*s+.0722*a),100*(.0193*r+.1192*s+.9505*a)]},t.rgb.lab=function(o){const r=t.rgb.xyz(o);let s=r[0],a=r[1],l=r[2];return s/=95.047,a/=100,l/=108.883,s=s>.008856?U(s,.3333333333333333):7.787*s+.13793103448275862,a=a>.008856?U(a,.3333333333333333):7.787*a+.13793103448275862,l=l>.008856?U(l,.3333333333333333):7.787*l+.13793103448275862,[116*a-16,500*(s-a),200*(a-l)]},t.hsl.rgb=function(o){const r=o[0]/360,s=o[1]/100,a=o[2]/100;let l,c,h;if(s===0)return h=255*a,[h,h,h];l=a<.5?a*(1+s):a+s-a*s;const p=2*a-l,d=[0,0,0];for(let g=0;g<3;g++)c=r+.3333333333333333*-(g-1),c<0&&c++,c>1&&c--,h=6*c<1?p+6*(l-p)*c:2*c<1?l:3*c<2?p+(l-p)*(.6666666666666666-c)*6:p,d[g]=255*h;return d},t.hsl.hsv=function(o){const r=o[0];let s=o[1]/100,a=o[2]/100,l=s;const c=Math.max(a,.01);return a*=2,s*=a<=1?a:2-a,l*=c<=1?c:2-c,[r,100*(a===0?2*l/(c+l):2*s/(a+s)),100*((a+s)/2)]},t.hsv.rgb=function(o){const r=o[0]/60,s=o[1]/100;let a=o[2]/100;const l=Math.floor(r)%6,c=r-Math.floor(r),h=255*a*(1-s),p=255*a*(1-s*c),d=255*a*(1-s*(1-c));switch(a*=255,l){case 0:return[a,d,h];case 1:return[p,a,h];case 2:return[h,a,d];case 3:return[h,p,a];case 4:return[d,h,a];case 5:return[a,h,p]}},t.hsv.hsl=function(o){const r=o[0],s=o[1]/100,a=o[2]/100,l=Math.max(a,.01);let c,h;h=(2-s)*a;const p=(2-s)*l;return c=s*l,c/=p<=1?p:2-p,c=c||0,h/=2,[r,100*c,100*h]},t.hwb.rgb=function(o){const r=o[0]/360;let s=o[1]/100,a=o[2]/100;const l=s+a;let c;l>1&&(s/=l,a/=l);const h=Math.floor(6*r),p=1-a;c=6*r-h,1&h&&(c=1-c);const d=s+c*(p-s);let g,u,m;switch(h){default:case 6:case 0:g=p,u=d,m=s;break;case 1:g=d,u=p,m=s;break;case 2:g=s,u=p,m=d;break;case 3:g=s,u=d,m=p;break;case 4:g=d,u=s,m=p;break;case 5:g=p,u=s,m=d}return[255*g,255*u,255*m]},t.cmyk.rgb=function(o){const r=o[0]/100,s=o[1]/100,a=o[2]/100,l=o[3]/100;return[255*(1-Math.min(1,r*(1-l)+l)),255*(1-Math.min(1,s*(1-l)+l)),255*(1-Math.min(1,a*(1-l)+l))]},t.xyz.rgb=function(o){const r=o[0]/100,s=o[1]/100,a=o[2]/100;let l,c,h;return l=3.2406*r+-1.5372*s+-.4986*a,c=-.9689*r+1.8758*s+.0415*a,h=.0557*r+-.204*s+1.057*a,l=l>.0031308?1.055*U(l,.4166666666666667)-.055:12.92*l,c=c>.0031308?1.055*U(c,.4166666666666667)-.055:12.92*c,h=h>.0031308?1.055*U(h,.4166666666666667)-.055:12.92*h,l=Math.min(Math.max(0,l),1),c=Math.min(Math.max(0,c),1),h=Math.min(Math.max(0,h),1),[255*l,255*c,255*h]},t.xyz.lab=function(o){let r=o[0],s=o[1],a=o[2];return r/=95.047,s/=100,a/=108.883,r=r>.008856?U(r,.3333333333333333):7.787*r+.13793103448275862,s=s>.008856?U(s,.3333333333333333):7.787*s+.13793103448275862,a=a>.008856?U(a,.3333333333333333):7.787*a+.13793103448275862,[116*s-16,500*(r-s),200*(s-a)]},t.lab.xyz=function(o){let r,s,a;s=(o[0]+16)/116,r=o[1]/500+s,a=s-o[2]/200;const l=U(s,3),c=U(r,3),h=U(a,3);return s=l>.008856?l:(s-.13793103448275862)/7.787,r=c>.008856?c:(r-.13793103448275862)/7.787,a=h>.008856?h:(a-.13793103448275862)/7.787,r*=95.047,s*=100,a*=108.883,[r,s,a]},t.lab.lch=function(o){const r=o[0],s=o[1],a=o[2];let l;return l=360*Math.atan2(a,s)/2/Math.PI,l<0&&(l+=360),[r,Math.sqrt(s*s+a*a),l]},t.lch.lab=function(o){const r=o[0],s=o[1],a=o[2]/360*2*Math.PI;return[r,s*Math.cos(a),s*Math.sin(a)]},t.rgb.ansi16=function(o,r=null){const[s,a,l]=o;let c=r===null?t.rgb.hsv(o)[2]:r;if(c=Math.round(c/50),c===0)return 30;let h=30+(Math.round(l/255)<<2|Math.round(a/255)<<1|Math.round(s/255));return c===2&&(h+=60),h},t.hsv.ansi16=function(o){return t.rgb.ansi16(t.hsv.rgb(o),o[2])},t.rgb.ansi256=function(o){const r=o[0],s=o[1],a=o[2];return r===s&&s===a?r<8?16:r>248?231:Math.round((r-8)/247*24)+232:16+36*Math.round(r/255*5)+6*Math.round(s/255*5)+Math.round(a/255*5)},t.ansi16.rgb=function(o){let r=o%10;if(r===0||r===7)return o>50&&(r+=3.5),r=r/10.5*255,[r,r,r];const s=.5*(1+~~(o>50));return[(1&r)*s*255,(r>>1&1)*s*255,(r>>2&1)*s*255]},t.ansi256.rgb=function(o){if(o>=232){const s=10*(o-232)+8;return[s,s,s]}let r;return o-=16,[Math.floor(o/36)/5*255,Math.floor((r=o%36)/6)/5*255,r%6/5*255]},t.rgb.hex=function(o){const r=(((255&Math.round(o[0]))<<16)+((255&Math.round(o[1]))<<8)+(255&Math.round(o[2]))).toString(16).toUpperCase();return"000000".substring(r.length)+r},t.hex.rgb=function(o){const r=o.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!r)return[0,0,0];let s=r[0];r[0].length===3&&(s=s.split("").map(l=>l+l).join(""));const a=parseInt(s,16);return[a>>16&255,a>>8&255,255&a]},t.rgb.hcg=function(o){const r=o[0]/255,s=o[1]/255,a=o[2]/255,l=Math.max(Math.max(r,s),a),c=Math.min(Math.min(r,s),a),h=l-c;let p,d;return p=h<1?c/(1-h):0,d=h<=0?0:l===r?(s-a)/h%6:l===s?2+(a-r)/h:4+(r-s)/h,d/=6,d%=1,[360*d,100*h,100*p]},t.hsl.hcg=function(o){const r=o[1]/100,s=o[2]/100,a=s<.5?2*r*s:2*r*(1-s);let l=0;return a<1&&(l=(s-.5*a)/(1-a)),[o[0],100*a,100*l]},t.hsv.hcg=function(o){const r=o[1]/100,s=o[2]/100,a=r*s;let l=0;return a<1&&(l=(s-a)/(1-a)),[o[0],100*a,100*l]},t.hcg.rgb=function(o){const r=o[0]/360,s=o[1]/100,a=o[2]/100;if(s===0)return[255*a,255*a,255*a];const l=[0,0,0],c=r%1*6,h=c%1,p=1-h;let d=0;switch(Math.floor(c)){case 0:l[0]=1,l[1]=h,l[2]=0;break;case 1:l[0]=p,l[1]=1,l[2]=0;break;case 2:l[0]=0,l[1]=1,l[2]=h;break;case 3:l[0]=0,l[1]=p,l[2]=1;break;case 4:l[0]=h,l[1]=0,l[2]=1;break;default:l[0]=1,l[1]=0,l[2]=p}return d=(1-s)*a,[255*(s*l[0]+d),255*(s*l[1]+d),255*(s*l[2]+d)]},t.hcg.hsv=function(o){const r=o[1]/100,s=r+o[2]/100*(1-r);let a=0;return s>0&&(a=r/s),[o[0],100*a,100*s]},t.hcg.hsl=function(o){const r=o[1]/100,s=o[2]/100*(1-r)+.5*r;let a=0;return s>0&&s<.5?a=r/(2*s):s>=.5&&s<1&&(a=r/(2*(1-s))),[o[0],100*a,100*s]},t.hcg.hwb=function(o){const r=o[1]/100,s=r+o[2]/100*(1-r);return[o[0],100*(s-r),100*(1-s)]},t.hwb.hcg=function(o){const r=o[1]/100,s=1-o[2]/100,a=s-r;let l=0;return a<1&&(l=(s-a)/(1-a)),[o[0],100*a,100*l]},t.apple.rgb=function(o){return[o[0]/65535*255,o[1]/65535*255,o[2]/65535*255]},t.rgb.apple=function(o){return[o[0]/255*65535,o[1]/255*65535,o[2]/255*65535]},t.gray.rgb=function(o){return[o[0]/100*255,o[0]/100*255,o[0]/100*255]},t.gray.hsl=function(o){return[0,0,o[0]]},t.gray.hsv=t.gray.hsl,t.gray.hwb=function(o){return[0,100,o[0]]},t.gray.cmyk=function(o){return[0,0,0,o[0]]},t.gray.lab=function(o){return[o[0],0,0]},t.gray.hex=function(o){const r=255&Math.round(o[0]/100*255),s=((r<<16)+(r<<8)+r).toString(16).toUpperCase();return"000000".substring(s.length)+s},t.rgb.gray=function(o){return[(o[0]+o[1]+o[2])/3/255*100]},zt}function qi(){if(Dn)return It;Dn=1;const n=Bn();function e(o){const r=function(){const a={},l=Object.keys(n);for(let c=l.length,h=0;h<c;h++)a[l[h]]={distance:-1,parent:null};return a}(),s=[o];for(r[o].distance=0;s.length;){const a=s.pop(),l=Object.keys(n[a]);for(let c=l.length,h=0;h<c;h++){const p=l[h],d=r[p];d.distance===-1&&(d.distance=r[a].distance+1,d.parent=a,s.unshift(p))}}return r}function t(o,r){return function(s){return r(o(s))}}function i(o,r){const s=[r[o].parent,o];let a=n[r[o].parent][o],l=r[o].parent;for(;r[l].parent;)s.unshift(r[l].parent),a=t(n[r[l].parent][l],a),l=r[l].parent;return a.conversion=s,a}return It=function(o){const r=e(o),s={},a=Object.keys(r);for(let l=a.length,c=0;c<l;c++){const h=a[c];r[h].parent!==null&&(s[h]=i(h,r))}return s},It}function Fi(){if(Nn)return Ln;Nn=1;const n=Bn(),e=qi(),t={};return Object.keys(n).forEach(i=>{t[i]={},Object.defineProperty(t[i],"channels",{value:n[i].channels}),Object.defineProperty(t[i],"labels",{value:n[i].labels});const o=e(i);Object.keys(o).forEach(r=>{const s=o[r];t[i][r]=function(a){const l=function(...c){const h=c[0];if(h==null)return h;h.length>1&&(c=h);const p=a(c);if(typeof p=="object")for(let d=p.length,g=0;g<d;g++)p[g]=Math.round(p[g]);return p};return"conversion"in a&&(l.conversion=a.conversion),l}(s),t[i][r].raw=function(a){const l=function(...c){const h=c[0];return h==null?h:(h.length>1&&(c=h),a(c))};return"conversion"in a&&(l.conversion=a.conversion),l}(s)})}),Ln=t}(function(n){const e=(c,h)=>(...p)=>"\x1B[".concat(c(...p)+h,"m"),t=(c,h)=>(...p)=>{const d=c(...p);return"\x1B[".concat(38+h,";5;").concat(d,"m")},i=(c,h)=>(...p)=>{const d=c(...p);return"\x1B[".concat(38+h,";2;").concat(d[0],";").concat(d[1],";").concat(d[2],"m")},o=c=>c,r=(c,h,p)=>[c,h,p],s=(c,h,p)=>{Object.defineProperty(c,h,{get:()=>{const d=p();return Object.defineProperty(c,h,{value:d,enumerable:!0,configurable:!0}),d},enumerable:!0,configurable:!0})};let a;const l=(c,h,p,d)=>{a===void 0&&(a=Fi());const g=d?10:0,u={};for(const[m,f]of Object.entries(a)){const b=m==="ansi16"?"ansi":m;m===h?u[b]=c(p,g):typeof f=="object"&&(u[b]=c(f[h],g))}return u};Object.defineProperty(n,"exports",{enumerable:!0,get:function(){const c=new Map,h={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};h.color.gray=h.color.blackBright,h.bgColor.bgGray=h.bgColor.bgBlackBright,h.color.grey=h.color.blackBright,h.bgColor.bgGrey=h.bgColor.bgBlackBright;for(const[p,d]of Object.entries(h)){for(const[g,u]of Object.entries(d))h[g]={open:"\x1B[".concat(u[0],"m"),close:"\x1B[".concat(u[1],"m")},d[g]=h[g],c.set(u[0],u[1]);Object.defineProperty(h,p,{value:d,enumerable:!1})}return Object.defineProperty(h,"codes",{value:c,enumerable:!1}),h.color.close="\x1B[39m",h.bgColor.close="\x1B[49m",s(h.color,"ansi",()=>l(e,"ansi16",o,!1)),s(h.color,"ansi256",()=>l(t,"ansi256",o,!1)),s(h.color,"ansi16m",()=>l(i,"rgb",r,!1)),s(h.bgColor,"ansi",()=>l(e,"ansi16",o,!0)),s(h.bgColor,"ansi256",()=>l(t,"ansi256",o,!0)),s(h.bgColor,"ansi16m",()=>l(i,"rgb",r,!0)),h}})})(On);var Dt,jn,Wi={stringReplaceAll:(n,e,t)=>{let i=n.indexOf(e);if(i===-1)return n;const o=e.length;let r=0,s="";do s+=n.substr(r,i-r)+e+t,r=i+o,i=n.indexOf(e,r);while(i!==-1);return s+=n.substr(r),s},stringEncaseCRLFWithFirstIndex:(n,e,t,i)=>{let o=0,r="";do{const s=n[i-1]==="\r";r+=n.substr(o,(s?i-1:i)-o)+e+(s?"\r\n":"\n")+t,o=i+1,i=n.indexOf("\n",o)}while(i!==-1);return r+=n.substr(o),r}};const Ue=On.exports,{stdout:Lt,stderr:Nt}={stdout:!1,stderr:!1},{stringReplaceAll:Yi,stringEncaseCRLFWithFirstIndex:Ki}=Wi,{isArray:nt}=Array,Un=["ansi","ansi","ansi256","ansi16m"],Re=Object.create(null);class Xi{constructor(e){return Vn(e)}}const Vn=n=>{const e={};return((t,i={})=>{if(i.level&&!(Number.isInteger(i.level)&&i.level>=0&&i.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const o=Lt?Lt.level:0;t.level=i.level===void 0?o:i.level})(e,n),e.template=(...t)=>Fn(e.template,...t),Object.setPrototypeOf(e,ot.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=Xi,e.template};function ot(n){return Vn(n)}for(const[n,e]of Object.entries(Ue))Re[n]={get(){const t=it(this,Ot(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,n,{value:t}),t}};Re.visible={get(){const n=it(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:n}),n}};const Hn=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const n of Hn)Re[n]={get(){const{level:e}=this;return function(...t){const i=Ot(Ue.color[Un[e]][n](...t),Ue.color.close,this._styler);return it(this,i,this._isEmpty)}}};for(const n of Hn)Re["bg"+n[0].toUpperCase()+n.slice(1)]={get(){const{level:e}=this;return function(...t){const i=Ot(Ue.bgColor[Un[e]][n](...t),Ue.bgColor.close,this._styler);return it(this,i,this._isEmpty)}}};const Zi=Object.defineProperties(()=>{},N(C({},Re),{level:{enumerable:!0,get(){return this._generator.level},set(n){this._generator.level=n}}})),Ot=(n,e,t)=>{let i,o;return t===void 0?(i=n,o=e):(i=t.openAll+n,o=e+t.closeAll),{open:n,close:e,openAll:i,closeAll:o,parent:t}},it=(n,e,t)=>{const i=(...o)=>nt(o[0])&&nt(o[0].raw)?qn(i,Fn(i,...o)):qn(i,o.length===1?""+o[0]:o.join(" "));return Object.setPrototypeOf(i,Zi),i._generator=n,i._styler=e,i._isEmpty=t,i},qn=(n,e)=>{if(n.level<=0||!e)return n._isEmpty?"":e;let t=n._styler;if(t===void 0)return e;const{openAll:i,closeAll:o}=t;if(e.indexOf("\x1B")!==-1)for(;t!==void 0;)e=Yi(e,t.close,t.open),t=t.parent;const r=e.indexOf("\n");return r!==-1&&(e=Ki(e,o,i,r)),i+e+o};let Bt;const Fn=(n,...e)=>{const[t]=e;if(!nt(t)||!nt(t.raw))return e.join(" ");const i=e.slice(1),o=[t.raw[0]];for(let r=1;r<t.length;r++)o.push(String(i[r-1]).replace(/[{}\\]/g,"\\$&"),String(t.raw[r]));return Bt===void 0&&(Bt=function(){if(jn)return Dt;jn=1;const r=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,s=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,a=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,l=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,c=new Map([["n","\n"],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function h(u){const m=u[0]==="u",f=u[1]==="{";return m&&!f&&u.length===5||u[0]==="x"&&u.length===3?String.fromCharCode(parseInt(u.slice(1),16)):m&&f?String.fromCodePoint(parseInt(u.slice(2,-1),16)):c.get(u)||u}function p(u,m){const f=[],b=m.trim().split(/\s*,\s*/g);let y;for(const w of b){const _=Number(w);if(Number.isNaN(_)){if(!(y=w.match(a)))throw new Error("Invalid Chalk template style argument: ".concat(w," (in style '").concat(u,"')"));f.push(y[2].replace(l,(E,k,D)=>k?h(k):D))}else f.push(_)}return f}function d(u){s.lastIndex=0;const m=[];let f;for(;(f=s.exec(u))!==null;){const b=f[1];if(f[2]){const y=p(b,f[2]);m.push([b].concat(y))}else m.push([b])}return m}function g(u,m){const f={};for(const y of m)for(const w of y.styles)f[w[0]]=y.inverse?null:w.slice(1);let b=u;for(const[y,w]of Object.entries(f))if(Array.isArray(w)){if(!(y in b))throw new Error("Unknown Chalk style: ".concat(y));b=w.length>0?b[y](...w):b[y]}return b}return Dt=(u,m)=>{const f=[],b=[];let y=[];if(m.replace(r,(w,_,E,k,D,V)=>{if(_)y.push(h(_));else if(k){const ee=y.join("");y=[],b.push(f.length===0?ee:g(u,f)(ee)),f.push({inverse:E,styles:d(k)})}else if(D){if(f.length===0)throw new Error("Found extraneous } in Chalk template literal");b.push(g(u,f)(y.join(""))),y=[],f.pop()}else y.push(V)}),b.push(y.join("")),f.length>0){const w="Chalk template literal is missing ".concat(f.length," closing bracket").concat(f.length===1?"":"s"," (`}`)");throw new Error(w)}return b.join("")},Dt}()),Bt(n,o.join(""))};Object.defineProperties(ot.prototype,Re);const jt=ot();jt.supportsColor=Lt,jt.stderr=ot({level:Nt?Nt.level:0}),jt.stderr.supportsColor=Nt;var me={exports:{}};const rt=Hi(Vi),Ut=rt,Vt=rt,Gi=rt,Qi=rt,Ht="16.4.5",Ji=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;function qt(n){console.log("[dotenv@".concat(Ht,"][DEBUG] ").concat(n))}function Wn(n){return n&&n.DOTENV_KEY&&n.DOTENV_KEY.length>0?n.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function er(n,e){let t;try{t=new URL(e)}catch(a){if(a.code==="ERR_INVALID_URL"){const l=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw l.code="INVALID_DOTENV_KEY",l}throw a}const i=t.password;if(!i){const a=new Error("INVALID_DOTENV_KEY: Missing key part");throw a.code="INVALID_DOTENV_KEY",a}const o=t.searchParams.get("environment");if(!o){const a=new Error("INVALID_DOTENV_KEY: Missing environment part");throw a.code="INVALID_DOTENV_KEY",a}const r="DOTENV_VAULT_".concat(o.toUpperCase()),s=n.parsed[r];if(!s){const a=new Error("NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ".concat(r," in your .env.vault file."));throw a.code="NOT_FOUND_DOTENV_ENVIRONMENT",a}return{ciphertext:s,key:i}}function Yn(n){let e=null;if(n&&n.path&&n.path.length>0)if(Array.isArray(n.path))for(const t of n.path)Ut.existsSync(t)&&(e=t.endsWith(".vault")?t:"".concat(t,".vault"));else e=n.path.endsWith(".vault")?n.path:"".concat(n.path,".vault");else e=Vt.resolve(process.cwd(),".env.vault");return Ut.existsSync(e)?e:null}function Kn(n){return n[0]==="~"?Vt.join(Gi.homedir(),n.slice(1)):n}const j={configDotenv:function(n){const e=Vt.resolve(process.cwd(),".env");let t="utf8";const i=!!(n&&n.debug);n&&n.encoding?t=n.encoding:i&&qt("No encoding is specified. UTF-8 is used by default");let o,r=[e];if(n&&n.path)if(Array.isArray(n.path)){r=[];for(const l of n.path)r.push(Kn(l))}else r=[Kn(n.path)];const s={};for(const l of r)try{const c=j.parse(Ut.readFileSync(l,{encoding:t}));j.populate(s,c,n)}catch(c){i&&qt("Failed to load ".concat(l," ").concat(c.message)),o=c}let a=process.env;return n&&n.processEnv!=null&&(a=n.processEnv),j.populate(a,s,n),o?{parsed:s,error:o}:{parsed:s}},_configVault:function(n){var e;e="Loading env from encrypted .env.vault",console.log("[dotenv@".concat(Ht,"][INFO] ").concat(e));const t=j._parseVault(n);let i=process.env;return n&&n.processEnv!=null&&(i=n.processEnv),j.populate(i,t,n),{parsed:t}},_parseVault:function(n){const e=Yn(n),t=j.configDotenv({path:e});if(!t.parsed){const s=new Error("MISSING_DATA: Cannot parse ".concat(e," for an unknown reason"));throw s.code="MISSING_DATA",s}const i=Wn(n).split(","),o=i.length;let r;for(let s=0;s<o;s++)try{const a=er(t,i[s].trim());r=j.decrypt(a.ciphertext,a.key);break}catch(a){if(s+1>=o)throw a}return j.parse(r)},config:function(n){if(Wn(n).length===0)return j.configDotenv(n);const e=Yn(n);return e?j._configVault(n):(t="You set DOTENV_KEY but you are missing a .env.vault file at ".concat(e,". Did you forget to build it?"),console.log("[dotenv@".concat(Ht,"][WARN] ").concat(t)),j.configDotenv(n));var t},decrypt:function(n,e){const t=Buffer.from(e.slice(-64),"hex");let i=Buffer.from(n,"base64");const o=i.subarray(0,12),r=i.subarray(-16);i=i.subarray(12,-16);try{const s=Qi.createDecipheriv("aes-256-gcm",t,o);return s.setAuthTag(r),"".concat(s.update(i)).concat(s.final())}catch(s){const a=s instanceof RangeError,l=s.message==="Invalid key length",c=s.message==="Unsupported state or unable to authenticate data";if(a||l){const h=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw h.code="INVALID_DOTENV_KEY",h}if(c){const h=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw h.code="DECRYPTION_FAILED",h}throw s}},parse:function(n){const e={};let t,i=n.toString();for(i=i.replace(/\r\n?/gm,"\n");(t=Ji.exec(i))!=null;){const o=t[1];let r=t[2]||"";r=r.trim();const s=r[0];r=r.replace(/^(['"`])([\s\S]*)\1$/gm,"$2"),s==='"'&&(r=r.replace(/\\n/g,"\n"),r=r.replace(/\\r/g,"\r")),e[o]=r}return e},populate:function(n,e,t={}){const i=!!(t&&t.debug),o=!!(t&&t.override);if(typeof e!="object"){const r=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw r.code="OBJECT_REQUIRED",r}for(const r of Object.keys(e))Object.prototype.hasOwnProperty.call(n,r)?(o===!0&&(n[r]=e[r]),i&&qt(o===!0?'"'.concat(r,'" is already defined and WAS overwritten'):'"'.concat(r,'" is already defined and was NOT overwritten'))):n[r]=e[r]}};me.exports.configDotenv=j.configDotenv,me.exports._configVault=j._configVault,me.exports._parseVault=j._parseVault,me.exports.config=j.config,me.exports.decrypt=j.decrypt,me.exports.parse=j.parse,me.exports.populate=j.populate,me.exports=j;const Xn="{file}",Zn="{line}",Gn="{column}";class tr{constructor(){this.parts=[]}push(e,t){return this.parts.push({text:e,style:t}),this}line(){return this.parts.push({text:"\n",style:""}),this}merge(e){return this.parts.push(...e.parts),this}build(){const e=[],t=[];for(const i of this.parts)i.text==="\n"?e.push("\n"):(e.push("%c".concat(i.text)),t.push(i.style));return{text:e.join(""),styles:t}}log(){const{text:e,styles:t}=this.build();console.log(e,...t)}warn(){const{text:e,styles:t}=this.build();console.warn(e,...t)}error(){const{text:e,styles:t}=this.build();console.error(e,...t)}groupCollapsed(e){const{text:t,styles:i}=this.build();console.groupCollapsed(t,...i),e(),console.groupEnd()}group(e){const{text:t,styles:i}=this.build();console.group(t,...i),e(),console.groupEnd()}blue(e){return this.push(e,"color: #006aff; word-break: break-word;")}green(e){return this.push(e,"color: #00B42A; word-break: break-word;")}yellow(e){return this.push(e,"color: #FF7D00; word-break: break-word;")}red(e){return this.push(e,"color: #F53F3F; word-break: break-word;")}gray(e){return this.push(e,"color: #86909C; word-break: break-word;")}text(e){return this.push(e,"")}styled(e,t){return this.push(e,t)}bold(e){return e!==void 0?this.push(e,"font-weight: bold;"):(this.parts.length>0&&(this.parts[this.parts.length-1].style+=" font-weight: bold;"),this)}style(e){return this.parts.length>0&&(this.parts[this.parts.length-1].style+=e),this}}const nr=Object.fromEntries(["blue","green","yellow","red","gray","bold","text","styled"].map(n=>[n,(...e)=>{const t=new tr;return t[n].apply(t,e)}]));class Ft extends Rn{constructor(e){if(super(e),this.it=B,e.type!==Ui)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===B||e==null)return this._t=void 0,this.it=e;if(e===fe)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}}Ft.directiveName="unsafeHTML",Ft.resultType=1;const Qn=Mn(Ft),Wt=Math.min,Pe=Math.max,st=Math.round,ie=n=>({x:n,y:n}),or={left:"right",right:"left",bottom:"top",top:"bottom"},ir={start:"end",end:"start"};function Jn(n,e,t){return Pe(n,Wt(e,t))}function at(n,e){return typeof n=="function"?n(e):n}function we(n){return n.split("-")[0]}function lt(n){return n.split("-")[1]}function eo(n){return n==="x"?"y":"x"}function to(n){return n==="y"?"height":"width"}const rr=new Set(["top","bottom"]);function be(n){return rr.has(we(n))?"y":"x"}function no(n){return eo(be(n))}function Yt(n){return n.replace(/start|end/g,e=>ir[e])}const oo=["left","right"],io=["right","left"],sr=["top","bottom"],ar=["bottom","top"];function lr(n,e,t,i){const o=lt(n);let r=function(s,a,l){switch(s){case"top":case"bottom":return l?a?io:oo:a?oo:io;case"left":case"right":return a?sr:ar;default:return[]}}(we(n),t==="start",i);return o&&(r=r.map(s=>s+"-"+o),e&&(r=r.concat(r.map(Yt)))),r}function ct(n){return n.replace(/left|right|bottom|top/g,e=>or[e])}function ht(n){const{x:e,y:t,width:i,height:o}=n;return{width:i,height:o,top:t,left:e,right:e+i,bottom:t+o,x:e,y:t}}function ro(n,e,t){let{reference:i,floating:o}=n;const r=be(e),s=no(e),a=to(s),l=we(e),c=r==="y",h=i.x+i.width/2-o.width/2,p=i.y+i.height/2-o.height/2,d=i[a]/2-o[a]/2;let g;switch(l){case"top":g={x:h,y:i.y-o.height};break;case"bottom":g={x:h,y:i.y+i.height};break;case"right":g={x:i.x+i.width,y:p};break;case"left":g={x:i.x-o.width,y:p};break;default:g={x:i.x,y:i.y}}switch(lt(e)){case"start":g[s]-=d*(t&&c?-1:1);break;case"end":g[s]+=d*(t&&c?-1:1)}return g}function cr(n,e){return O(this,null,function*(){var t;e===void 0&&(e={});const{x:i,y:o,platform:r,rects:s,elements:a,strategy:l}=n,{boundary:c="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:d=!1,padding:g=0}=at(e,n),u=function(E){return typeof E!="number"?function(k){return C({top:0,right:0,bottom:0,left:0},k)}(E):{top:E,right:E,bottom:E,left:E}}(g),m=a[d?p==="floating"?"reference":"floating":p],f=ht(yield r.getClippingRect({element:(t=yield r.isElement==null?void 0:r.isElement(m))==null||t?m:m.contextElement||(yield r.getDocumentElement==null?void 0:r.getDocumentElement(a.floating)),boundary:c,rootBoundary:h,strategy:l})),b=p==="floating"?{x:i,y:o,width:s.floating.width,height:s.floating.height}:s.reference,y=yield r.getOffsetParent==null?void 0:r.getOffsetParent(a.floating),w=(yield r.isElement==null?void 0:r.isElement(y))&&(yield r.getScale==null?void 0:r.getScale(y))||{x:1,y:1},_=ht(r.convertOffsetParentRelativeRectToViewportRelativeRect?yield r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:y,strategy:l}):b);return{top:(f.top-_.top+u.top)/w.y,bottom:(_.bottom-f.bottom+u.bottom)/w.y,left:(f.left-_.left+u.left)/w.x,right:(_.right-f.right+u.right)/w.x}})}const hr=new Set(["left","top"]);function pt(){return typeof window!="undefined"}function ze(n){return so(n)?(n.nodeName||"").toLowerCase():"#document"}function W(n){var e;return(n==null||(e=n.ownerDocument)==null?void 0:e.defaultView)||window}function ce(n){var e;return(e=(so(n)?n.ownerDocument:n.document)||window.document)==null?void 0:e.documentElement}function so(n){return!!pt()&&(n instanceof Node||n instanceof W(n).Node)}function Z(n){return!!pt()&&(n instanceof Element||n instanceof W(n).Element)}function re(n){return!!pt()&&(n instanceof HTMLElement||n instanceof W(n).HTMLElement)}function ao(n){return!(!pt()||typeof ShadowRoot=="undefined")&&(n instanceof ShadowRoot||n instanceof W(n).ShadowRoot)}const pr=new Set(["inline","contents"]);function Ve(n){const{overflow:e,overflowX:t,overflowY:i,display:o}=G(n);return/auto|scroll|overlay|hidden|clip/.test(e+i+t)&&!pr.has(o)}const dr=new Set(["table","td","th"]);function ur(n){return dr.has(ze(n))}const gr=[":popover-open",":modal"];function dt(n){return gr.some(e=>{try{return n.matches(e)}catch(t){return!1}})}const fr=["transform","translate","scale","rotate","perspective"],mr=["transform","translate","scale","rotate","perspective","filter"],br=["paint","layout","strict","content"];function Kt(n){const e=Xt(),t=Z(n)?G(n):n;return fr.some(i=>!!t[i]&&t[i]!=="none")||!!t.containerType&&t.containerType!=="normal"||!e&&!!t.backdropFilter&&t.backdropFilter!=="none"||!e&&!!t.filter&&t.filter!=="none"||mr.some(i=>(t.willChange||"").includes(i))||br.some(i=>(t.contain||"").includes(i))}function Xt(){return!(typeof CSS=="undefined"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const yr=new Set(["html","body","#document"]);function Ie(n){return yr.has(ze(n))}function G(n){return W(n).getComputedStyle(n)}function ut(n){return Z(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function ye(n){if(ze(n)==="html")return n;const e=n.assignedSlot||n.parentNode||ao(n)&&n.host||ce(n);return ao(e)?e.host:e}function lo(n){const e=ye(n);return Ie(e)?n.ownerDocument?n.ownerDocument.body:n.body:re(e)&&Ve(e)?e:lo(e)}function Zt(n,e,t){var i;e===void 0&&(e=[]),t===void 0&&(t=!0);const o=lo(n),r=o===((i=n.ownerDocument)==null?void 0:i.body),s=W(o);if(r){const a=Gt(s);return e.concat(s,s.visualViewport||[],Ve(o)?o:[],a&&t?Zt(a):[])}return e.concat(o,Zt(o,[],t))}function Gt(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function co(n){const e=G(n);let t=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const o=re(n),r=o?n.offsetWidth:t,s=o?n.offsetHeight:i,a=st(t)!==r||st(i)!==s;return a&&(t=r,i=s),{width:t,height:i,$:a}}function ho(n){return Z(n)?n:n.contextElement}function De(n){const e=ho(n);if(!re(e))return ie(1);const t=e.getBoundingClientRect(),{width:i,height:o,$:r}=co(e);let s=(r?st(t.width):t.width)/i,a=(r?st(t.height):t.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const xr=ie(0);function po(n){const e=W(n);return Xt()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:xr}function He(n,e,t,i){e===void 0&&(e=!1),t===void 0&&(t=!1);const o=n.getBoundingClientRect(),r=ho(n);let s=ie(1);e&&(i?Z(i)&&(s=De(i)):s=De(n));const a=function(d,g,u){return g===void 0&&(g=!1),!(!u||g&&u!==W(d))&&g}(r,t,i)?po(r):ie(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,h=o.width/s.x,p=o.height/s.y;if(r){const d=W(r),g=i&&Z(i)?W(i):i;let u=d,m=Gt(u);for(;m&&i&&g!==u;){const f=De(m),b=m.getBoundingClientRect(),y=G(m),w=b.left+(m.clientLeft+parseFloat(y.paddingLeft))*f.x,_=b.top+(m.clientTop+parseFloat(y.paddingTop))*f.y;l*=f.x,c*=f.y,h*=f.x,p*=f.y,l+=w,c+=_,u=W(m),m=Gt(u)}}return ht({width:h,height:p,x:l,y:c})}function gt(n,e){const t=ut(n).scrollLeft;return e?e.left+t:He(ce(n)).left+t}function uo(n,e){const t=n.getBoundingClientRect();return{x:t.left+e.scrollLeft-gt(n,t),y:t.top+e.scrollTop}}const go=25,vr=new Set(["absolute","fixed"]);function fo(n,e,t){let i;if(e==="viewport")i=function(o,r){const s=W(o),a=ce(o),l=s.visualViewport;let c=a.clientWidth,h=a.clientHeight,p=0,d=0;if(l){c=l.width,h=l.height;const u=Xt();(!u||u&&r==="fixed")&&(p=l.offsetLeft,d=l.offsetTop)}const g=gt(a);if(g<=0){const u=a.ownerDocument,m=u.body,f=getComputedStyle(m),b=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,y=Math.abs(a.clientWidth-m.clientWidth-b);y<=go&&(c-=y)}else g<=go&&(c+=g);return{width:c,height:h,x:p,y:d}}(n,t);else if(e==="document")i=function(o){const r=ce(o),s=ut(o),a=o.ownerDocument.body,l=Pe(r.scrollWidth,r.clientWidth,a.scrollWidth,a.clientWidth),c=Pe(r.scrollHeight,r.clientHeight,a.scrollHeight,a.clientHeight);let h=-s.scrollLeft+gt(o);const p=-s.scrollTop;return G(a).direction==="rtl"&&(h+=Pe(r.clientWidth,a.clientWidth)-l),{width:l,height:c,x:h,y:p}}(ce(n));else if(Z(e))i=function(o,r){const s=He(o,!0,r==="fixed"),a=s.top+o.clientTop,l=s.left+o.clientLeft,c=re(o)?De(o):ie(1);return{width:o.clientWidth*c.x,height:o.clientHeight*c.y,x:l*c.x,y:a*c.y}}(e,t);else{const o=po(n);i={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return ht(i)}function mo(n,e){const t=ye(n);return!(t===e||!Z(t)||Ie(t))&&(G(t).position==="fixed"||mo(t,e))}function wr(n,e,t){const i=re(e),o=ce(e),r=t==="fixed",s=He(n,!0,r,e);let a={scrollLeft:0,scrollTop:0};const l=ie(0);function c(){l.x=gt(o)}if(i||!i&&!r)if((ze(e)!=="body"||Ve(o))&&(a=ut(e)),i){const p=He(e,!0,r,e);l.x=p.x+e.clientLeft,l.y=p.y+e.clientTop}else o&&c();r&&!i&&o&&c();const h=!o||i||r?ie(0):uo(o,a);return{x:s.left+a.scrollLeft-l.x-h.x,y:s.top+a.scrollTop-l.y-h.y,width:s.width,height:s.height}}function Qt(n){return G(n).position==="static"}function bo(n,e){if(!re(n)||G(n).position==="fixed")return null;if(e)return e(n);let t=n.offsetParent;return ce(n)===t&&(t=t.ownerDocument.body),t}function yo(n,e){const t=W(n);if(dt(n))return t;if(!re(n)){let o=ye(n);for(;o&&!Ie(o);){if(Z(o)&&!Qt(o))return o;o=ye(o)}return t}let i=bo(n,e);for(;i&&ur(i)&&Qt(i);)i=bo(i,e);return i&&Ie(i)&&Qt(i)&&!Kt(i)?t:i||function(o){let r=ye(o);for(;re(r)&&!Ie(r);){if(Kt(r))return r;if(dt(r))return null;r=ye(r)}return null}(n)||t}const kr={convertOffsetParentRelativeRectToViewportRelativeRect:function(n){let{elements:e,rect:t,offsetParent:i,strategy:o}=n;const r=o==="fixed",s=ce(i),a=!!e&&dt(e.floating);if(i===s||a&&r)return t;let l={scrollLeft:0,scrollTop:0},c=ie(1);const h=ie(0),p=re(i);if((p||!p&&!r)&&((ze(i)!=="body"||Ve(s))&&(l=ut(i)),re(i))){const g=He(i);c=De(i),h.x=g.x+i.clientLeft,h.y=g.y+i.clientTop}const d=!s||p||r?ie(0):uo(s,l);return{width:t.width*c.x,height:t.height*c.y,x:t.x*c.x-l.scrollLeft*c.x+h.x+d.x,y:t.y*c.y-l.scrollTop*c.y+h.y+d.y}},getDocumentElement:ce,getClippingRect:function(n){let{element:e,boundary:t,rootBoundary:i,strategy:o}=n;const r=[...t==="clippingAncestors"?dt(e)?[]:function(l,c){const h=c.get(l);if(h)return h;let p=Zt(l,[],!1).filter(m=>Z(m)&&ze(m)!=="body"),d=null;const g=G(l).position==="fixed";let u=g?ye(l):l;for(;Z(u)&&!Ie(u);){const m=G(u),f=Kt(u);f||m.position!=="fixed"||(d=null),(g?!f&&!d:!f&&m.position==="static"&&d&&vr.has(d.position)||Ve(u)&&!f&&mo(l,u))?p=p.filter(b=>b!==u):d=m,u=ye(u)}return c.set(l,p),p}(e,this._c):[].concat(t),i],s=r[0],a=r.reduce((l,c)=>{const h=fo(e,c,o);return l.top=Pe(h.top,l.top),l.right=Wt(h.right,l.right),l.bottom=Wt(h.bottom,l.bottom),l.left=Pe(h.left,l.left),l},fo(e,s,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:yo,getElementRects:function(n){return O(this,null,function*(){const e=this.getOffsetParent||yo,t=this.getDimensions,i=yield t(n.floating);return{reference:wr(n.reference,yield e(n.floating),n.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}})},getClientRects:function(n){return Array.from(n.getClientRects())},getDimensions:function(n){const{width:e,height:t}=co(n);return{width:e,height:t}},getScale:De,isElement:Z,isRTL:function(n){return G(n).direction==="rtl"}},$r=function(n){return n===void 0&&(n=0),{name:"offset",options:n,fn(t){return O(this,null,function*(){var i,o;const{x:r,y:s,placement:a,middlewareData:l}=t,c=yield function(h,p){return O(this,null,function*(){const{placement:d,platform:g,elements:u}=h,m=yield g.isRTL==null?void 0:g.isRTL(u.floating),f=we(d),b=lt(d),y=be(d)==="y",w=hr.has(f)?-1:1,_=m&&y?-1:1,E=at(p,h);let{mainAxis:k,crossAxis:D,alignmentAxis:V}=typeof E=="number"?{mainAxis:E,crossAxis:0,alignmentAxis:null}:{mainAxis:E.mainAxis||0,crossAxis:E.crossAxis||0,alignmentAxis:E.alignmentAxis};return b&&typeof V=="number"&&(D=b==="end"?-1*V:V),y?{x:D*_,y:k*w}:{x:k*w,y:D*_}})}(t,n);return a===((i=l.offset)==null?void 0:i.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:r+c.x,y:s+c.y,data:N(C({},c),{placement:a})}})}}},Sr=function(n){return n===void 0&&(n={}),{name:"shift",options:n,fn(t){return O(this,null,function*(){const{x:i,y:o,placement:r,platform:s}=t,y=at(n,t),{mainAxis:a=!0,crossAxis:l=!1,limiter:c={fn:w=>{let{x:_,y:E}=w;return{x:_,y:E}}}}=y,h=un(y,["mainAxis","crossAxis","limiter"]),p={x:i,y:o},d=yield s.detectOverflow(t,h),g=be(we(r)),u=eo(g);let m=p[u],f=p[g];if(a){const w=u==="y"?"bottom":"right";m=Jn(m+d[u==="y"?"top":"left"],m,m-d[w])}if(l){const w=g==="y"?"bottom":"right";f=Jn(f+d[g==="y"?"top":"left"],f,f-d[w])}const b=c.fn(N(C({},t),{[u]:m,[g]:f}));return N(C({},b),{data:{x:b.x-i,y:b.y-o,enabled:{[u]:a,[g]:l}}})})}}},Cr=function(n){return n===void 0&&(n={}),{name:"flip",options:n,fn(t){return O(this,null,function*(){var i,o;const{placement:r,middlewareData:s,rects:a,initialPlacement:l,platform:c,elements:h}=t,Bo=at(n,t),{mainAxis:p=!0,crossAxis:d=!0,fallbackPlacements:g,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:f=!0}=Bo,b=un(Bo,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((i=s.arrow)!=null&&i.alignmentOffset)return{};const y=we(r),w=be(l),_=we(l)===l,E=yield c.isRTL==null?void 0:c.isRTL(h.floating),k=g||(_||!f?[ct(l)]:function(ae){const de=ct(ae);return[Yt(ae),de,Yt(de)]}(l)),D=m!=="none";!g&&D&&k.push(...lr(l,f,m,E));const V=[l,...k],ee=yield c.detectOverflow(t,b),se=[];let te=((o=s.flip)==null?void 0:o.overflows)||[];if(p&&se.push(ee[y]),d){const ae=function(de,xe,K){K===void 0&&(K=!1);const ne=lt(de),oe=no(de),kt=to(oe);let $t=oe==="x"?ne===(K?"end":"start")?"right":"left":ne==="start"?"bottom":"top";return xe.reference[kt]>xe.floating[kt]&&($t=ct($t)),[$t,ct($t)]}(r,a,E);se.push(ee[ae[0]],ee[ae[1]])}if(te=[...te,{placement:r,overflows:se}],!se.every(ae=>ae<=0)){var Y,L;const ae=(((Y=s.flip)==null?void 0:Y.index)||0)+1,de=V[ae];if(de&&(!(d==="alignment"&&w!==be(de))||te.every(K=>be(K.placement)!==w||K.overflows[0]>0)))return{data:{index:ae,overflows:te},reset:{placement:de}};let xe=(L=te.filter(K=>K.overflows[0]<=0).sort((K,ne)=>K.overflows[1]-ne.overflows[1])[0])==null?void 0:L.placement;if(!xe)switch(u){case"bestFit":{var Oo;const K=(Oo=te.filter(ne=>{if(D){const oe=be(ne.placement);return oe===w||oe==="y"}return!0}).map(ne=>[ne.placement,ne.overflows.filter(oe=>oe>0).reduce((oe,kt)=>oe+kt,0)]).sort((ne,oe)=>ne[1]-oe[1])[0])==null?void 0:Oo[0];K&&(xe=K);break}case"initialPlacement":xe=l}if(r!==xe)return{reset:{placement:xe}}}return{}})}}},Tr=(n,e,t)=>{const i=new Map,o=C({platform:kr},t),r=N(C({},o.platform),{_c:i});return((s,a,l)=>O(this,null,function*(){const{placement:c="bottom",strategy:h="absolute",middleware:p=[],platform:d}=l,g=p.filter(Boolean),u=yield d.isRTL==null?void 0:d.isRTL(a);let m=yield d.getElementRects({reference:s,floating:a,strategy:h}),{x:f,y:b}=ro(m,c,u),y=c,w={},_=0;for(let k=0;k<g.length;k++){var E;const{name:D,fn:V}=g[k],{x:ee,y:se,data:te,reset:Y}=yield V({x:f,y:b,initialPlacement:c,placement:y,strategy:h,middlewareData:w,rects:m,platform:N(C({},d),{detectOverflow:(E=d.detectOverflow)!=null?E:cr}),elements:{reference:s,floating:a}});f=ee!=null?ee:f,b=se!=null?se:b,w=N(C({},w),{[D]:C(C({},w[D]),te)}),Y&&_<=50&&(_++,typeof Y=="object"&&(Y.placement&&(y=Y.placement),Y.rects&&(m=Y.rects===!0?yield d.getElementRects({reference:s,floating:a,strategy:h}):Y.rects),{x:f,y:b}=ro(m,y,u)),k=-1)}return{x:f,y:b,placement:y,strategy:h,middlewareData:w}}))(n,e,N(C({},o),{platform:r}))};function Ar(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ke={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function xo(n){ke=n}var qe={exec:()=>null};function A(n,e=""){let t=typeof n=="string"?n:n.source,i={replace:(o,r)=>{let s=typeof r=="string"?r:r.source;return s=s.replace(q.caret,"$1"),t=t.replace(o,s),i},getRegex:()=>new RegExp(t,e)};return i}var _r=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch(n){return!1}})(),q={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:n=>new RegExp("^( {0,3}".concat(n,")((?:[ ][^\\n]*)?(?:\\n|$))")),nextBulletRegex:n=>new RegExp("^ {0,".concat(Math.min(3,n-1),"}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))")),hrRegex:n=>new RegExp("^ {0,".concat(Math.min(3,n-1),"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)")),fencesBeginRegex:n=>new RegExp("^ {0,".concat(Math.min(3,n-1),"}(?:```|~~~)")),headingBeginRegex:n=>new RegExp("^ {0,".concat(Math.min(3,n-1),"}#")),htmlBeginRegex:n=>new RegExp("^ {0,".concat(Math.min(3,n-1),"}<(?:[a-z].*>|!--)"),"i")},Fe=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Jt=/(?:[*+-]|\d{1,9}[.)])/,vo=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,wo=A(vo).replace(/bull/g,Jt).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Er=A(vo).replace(/bull/g,Jt).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),en=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,tn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Mr=A(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",tn).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Rr=A(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Jt).getRegex(),ft="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",nn=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Pr=A("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",nn).replace("tag",ft).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ko=A(en).replace("hr",Fe).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ft).getRegex(),on={blockquote:A(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ko).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:Mr,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:Fe,html:Pr,lheading:wo,list:Rr,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:ko,table:qe,text:/^[^\n]+/},$o=A("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Fe).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ft).getRegex(),zr=N(C({},on),{lheading:Er,table:$o,paragraph:A(en).replace("hr",Fe).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",$o).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ft).getRegex()}),Ir=N(C({},on),{html:A("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",nn).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:qe,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:A(en).replace("hr",Fe).replace("heading"," *#{1,6} *[^\n]").replace("lheading",wo).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),So=/^( {2,}|\\)\n(?!\s*$)/,mt=/[\p{P}\p{S}]/u,rn=/[\s\p{P}\p{S}]/u,Co=/[^\s\p{P}\p{S}]/u,Dr=A(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,rn).getRegex(),To=/(?!~)[\p{P}\p{S}]/u,Lr=A(/link|precode-code|html/,"g").replace("link",new RegExp("\\[(?:[^\\[\\]`]|(?<a>`+)[^`]+\\k<a>(?!`))*?\\]\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)]|\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)])*\\))*\\)")).replace("precode-",_r?"(?<!`)()":"(^^|[^`])").replace("code",new RegExp("(?<b>`+)[^`]+\\k<b>(?!`)")).replace("html",/<(?! )[^<>]*?>/).getRegex(),Ao=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Nr=A(Ao,"u").replace(/punct/g,mt).getRegex(),Or=A(Ao,"u").replace(/punct/g,To).getRegex(),_o="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Br=A(_o,"gu").replace(/notPunctSpace/g,Co).replace(/punctSpace/g,rn).replace(/punct/g,mt).getRegex(),jr=A(_o,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,To).getRegex(),Ur=A("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Co).replace(/punctSpace/g,rn).replace(/punct/g,mt).getRegex(),Vr=A(/\\(punct)/,"gu").replace(/punct/g,mt).getRegex(),Hr=A(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[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])?)+(?![-_])/).getRegex(),qr=A(nn).replace("(?:-->|$)","-->").getRegex(),Fr=A("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",qr).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),bt=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Wr=A(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",bt).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Eo=A(/^!?\[(label)\]\[(ref)\]/).replace("label",bt).replace("ref",tn).getRegex(),Mo=A(/^!?\[(ref)\](?:\[\])?/).replace("ref",tn).getRegex(),Ro=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,sn={_backpedal:qe,anyPunctuation:Vr,autolink:Hr,blockSkip:Lr,br:So,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:qe,emStrongLDelim:Nr,emStrongRDelimAst:Br,emStrongRDelimUnd:Ur,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:Wr,nolink:Mo,punctuation:Dr,reflink:Eo,reflinkSearch:A("reflink|nolink(?!\\()","g").replace("reflink",Eo).replace("nolink",Mo).getRegex(),tag:Fr,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:qe},Yr=N(C({},sn),{link:A(/^!?\[(label)\]\((.*?)\)/).replace("label",bt).getRegex(),reflink:A(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",bt).getRegex()}),an=N(C({},sn),{emStrongRDelimAst:jr,emStrongLDelim:Or,url:A(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Ro).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:A(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Ro).getRegex()}),Kr=N(C({},an),{br:A(So).replace("{2,}","*").getRegex(),text:A(an.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),yt={normal:on,gfm:zr,pedantic:Ir},We={normal:sn,gfm:an,breaks:Kr,pedantic:Yr},Xr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Po=n=>Xr[n];function he(n,e){if(e){if(q.escapeTest.test(n))return n.replace(q.escapeReplace,Po)}else if(q.escapeTestNoEncode.test(n))return n.replace(q.escapeReplaceNoEncode,Po);return n}function zo(n){try{n=encodeURI(n).replace(q.percentDecode,"%")}catch(e){return null}return n}function Io(n,e){var r;let t=n.replace(q.findPipe,(s,a,l)=>{let c=!1,h=a;for(;--h>=0&&l[h]==="\\";)c=!c;return c?"|":" |"}),i=t.split(q.splitPipe),o=0;if(i[0].trim()||i.shift(),i.length>0&&!((r=i.at(-1))!=null&&r.trim())&&i.pop(),e)if(i.length>e)i.splice(e);else for(;i.length<e;)i.push("");for(;o<i.length;o++)i[o]=i[o].trim().replace(q.slashPipe,"|");return i}function Ye(n,e,t){let i=n.length;if(i===0)return"";let o=0;for(;o<i;){let r=n.charAt(i-o-1);if(r!==e||t){if(r===e||!t)break;o++}else o++}return n.slice(0,i-o)}function Do(n,e,t,i,o){let r=e.href,s=e.title||null,a=n[1].replace(o.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:n[0].charAt(0)==="!"?"image":"link",raw:t,href:r,title:s,text:a,tokens:i.inlineTokens(a)};return i.state.inLink=!1,l}var xt=class{constructor(n){z(this,"options");z(this,"rules");z(this,"lexer");this.options=n||ke}space(n){let e=this.rules.block.newline.exec(n);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(n){let e=this.rules.block.code.exec(n);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:Ye(t,"\n")}}}fences(n){let e=this.rules.block.fences.exec(n);if(e){let t=e[0],i=function(o,r,s){let a=o.match(s.other.indentCodeCompensation);if(a===null)return r;let l=a[1];return r.split("\n").map(c=>{let h=c.match(s.other.beginningSpace);if(h===null)return c;let[p]=h;return p.length>=l.length?c.slice(l.length):c}).join("\n")}(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:i}}}heading(n){let e=this.rules.block.heading.exec(n);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let i=Ye(t,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(t=i.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(n){let e=this.rules.block.hr.exec(n);if(e)return{type:"hr",raw:Ye(e[0],"\n")}}blockquote(n){let e=this.rules.block.blockquote.exec(n);if(e){let t=Ye(e[0],"\n").split("\n"),i="",o="",r=[];for(;t.length>0;){let s,a=!1,l=[];for(s=0;s<t.length;s++)if(this.rules.other.blockquoteStart.test(t[s]))l.push(t[s]),a=!0;else{if(a)break;l.push(t[s])}t=t.slice(s);let c=l.join("\n"),h=c.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");i=i?"".concat(i,"\n").concat(c):c,o=o?"".concat(o,"\n").concat(h):h;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,r,!0),this.lexer.state.top=p,t.length===0)break;let d=r.at(-1);if((d==null?void 0:d.type)==="code")break;if((d==null?void 0:d.type)==="blockquote"){let g=d,u=g.raw+"\n"+t.join("\n"),m=this.blockquote(u);r[r.length-1]=m,i=i.substring(0,i.length-g.raw.length)+m.raw,o=o.substring(0,o.length-g.text.length)+m.text;break}if((d==null?void 0:d.type)==="list"){let g=d,u=g.raw+"\n"+t.join("\n"),m=this.list(u);r[r.length-1]=m,i=i.substring(0,i.length-d.raw.length)+m.raw,o=o.substring(0,o.length-g.raw.length)+m.raw,t=u.substring(r.at(-1).raw.length).split("\n")}}return{type:"blockquote",raw:i,tokens:r,text:o}}}list(n){var t,i;let e=this.rules.block.list.exec(n);if(e){let o=e[1].trim(),r=o.length>1,s={type:"list",raw:"",ordered:r,start:r?+o.slice(0,-1):"",loose:!1,items:[]};o=r?"\\d{1,9}\\".concat(o.slice(-1)):"\\".concat(o),this.options.pedantic&&(o=r?o:"[*+-]");let a=this.rules.other.listItemRegex(o),l=!1;for(;n;){let h=!1,p="",d="";if(!(e=a.exec(n))||this.rules.block.hr.test(n))break;p=e[0],n=n.substring(p.length);let g=e[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),u=n.split("\n",1)[0],m=!g.trim(),f=0;if(this.options.pedantic?(f=2,d=g.trimStart()):m?f=e[1].length+1:(f=e[2].search(this.rules.other.nonSpaceChar),f=f>4?1:f,d=g.slice(f),f+=e[1].length),m&&this.rules.other.blankLine.test(u)&&(p+=u+"\n",n=n.substring(u.length+1),h=!0),!h){let b=this.rules.other.nextBulletRegex(f),y=this.rules.other.hrRegex(f),w=this.rules.other.fencesBeginRegex(f),_=this.rules.other.headingBeginRegex(f),E=this.rules.other.htmlBeginRegex(f);for(;n;){let k,D=n.split("\n",1)[0];if(u=D,this.options.pedantic?(u=u.replace(this.rules.other.listReplaceNesting," "),k=u):k=u.replace(this.rules.other.tabCharGlobal," "),w.test(u)||_.test(u)||E.test(u)||b.test(u)||y.test(u))break;if(k.search(this.rules.other.nonSpaceChar)>=f||!u.trim())d+="\n"+k.slice(f);else{if(m||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||w.test(g)||_.test(g)||y.test(g))break;d+="\n"+u}!m&&!u.trim()&&(m=!0),p+=D+"\n",n=n.substring(D.length+1),g=k.slice(f)}}s.loose||(l?s.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(l=!0)),s.items.push({type:"list_item",raw:p,task:!!this.options.gfm&&this.rules.other.listIsTask.test(d),loose:!1,text:d,tokens:[]}),s.raw+=p}let c=s.items.at(-1);if(!c)return;c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd(),s.raw=s.raw.trimEnd();for(let h of s.items){if(this.lexer.state.top=!1,h.tokens=this.lexer.blockTokens(h.text,[]),h.task){if(h.text=h.text.replace(this.rules.other.listReplaceTask,""),((t=h.tokens[0])==null?void 0:t.type)==="text"||((i=h.tokens[0])==null?void 0:i.type)==="paragraph"){h.tokens[0].raw=h.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),h.tokens[0].text=h.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let d=this.lexer.inlineQueue.length-1;d>=0;d--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[d].src)){this.lexer.inlineQueue[d].src=this.lexer.inlineQueue[d].src.replace(this.rules.other.listReplaceTask,"");break}}let p=this.rules.other.listTaskCheckbox.exec(h.raw);if(p){let d={type:"checkbox",raw:p[0]+" ",checked:p[0]!=="[ ]"};h.checked=d.checked,s.loose?h.tokens[0]&&["paragraph","text"].includes(h.tokens[0].type)&&"tokens"in h.tokens[0]&&h.tokens[0].tokens?(h.tokens[0].raw=d.raw+h.tokens[0].raw,h.tokens[0].text=d.raw+h.tokens[0].text,h.tokens[0].tokens.unshift(d)):h.tokens.unshift({type:"paragraph",raw:d.raw,text:d.raw,tokens:[d]}):h.tokens.unshift(d)}}if(!s.loose){let p=h.tokens.filter(g=>g.type==="space"),d=p.length>0&&p.some(g=>this.rules.other.anyLine.test(g.raw));s.loose=d}}if(s.loose)for(let h of s.items){h.loose=!0;for(let p of h.tokens)p.type==="text"&&(p.type="paragraph")}return s}}html(n){let e=this.rules.block.html.exec(n);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(n){let e=this.rules.block.def.exec(n);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:i,title:o}}}table(n){var s;let e=this.rules.block.table.exec(n);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=Io(e[1]),i=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(s=e[3])!=null&&s.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],r={type:"table",raw:e[0],header:[],align:[],rows:[]};if(t.length===i.length){for(let a of i)this.rules.other.tableAlignRight.test(a)?r.align.push("right"):this.rules.other.tableAlignCenter.test(a)?r.align.push("center"):this.rules.other.tableAlignLeft.test(a)?r.align.push("left"):r.align.push(null);for(let a=0;a<t.length;a++)r.header.push({text:t[a],tokens:this.lexer.inline(t[a]),header:!0,align:r.align[a]});for(let a of o)r.rows.push(Io(a,r.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:r.align[c]})));return r}}lheading(n){let e=this.rules.block.lheading.exec(n);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(n){let e=this.rules.block.paragraph.exec(n);if(e){let t=e[1].charAt(e[1].length-1)==="\n"?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(n){let e=this.rules.block.text.exec(n);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(n){let e=this.rules.inline.escape.exec(n);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(n){let e=this.rules.inline.tag.exec(n);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(n){let e=this.rules.inline.link.exec(n);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let r=Ye(t.slice(0,-1),"\\");if((t.length-r.length)%2==0)return}else{let r=function(s,a){if(s.indexOf(a[1])===-1)return-1;let l=0;for(let c=0;c<s.length;c++)if(s[c]==="\\")c++;else if(s[c]===a[0])l++;else if(s[c]===a[1]&&(l--,l<0))return c;return l>0?-2:-1}(e[2],"()");if(r===-2)return;if(r>-1){let s=(e[0].indexOf("!")===0?5:4)+e[1].length+r;e[2]=e[2].substring(0,r),e[0]=e[0].substring(0,s).trim(),e[3]=""}}let i=e[2],o="";if(this.options.pedantic){let r=this.rules.other.pedanticHrefTitle.exec(i);r&&(i=r[1],o=r[3])}else o=e[3]?e[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(i=this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?i.slice(1):i.slice(1,-1)),Do(e,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(n,e){let t;if((t=this.rules.inline.reflink.exec(n))||(t=this.rules.inline.nolink.exec(n))){let i=e[(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!i){let o=t[0].charAt(0);return{type:"text",raw:o,text:o}}return Do(t,i,t[0],this.lexer,this.rules)}}emStrong(n,e,t=""){let i=this.rules.inline.emStrongLDelim.exec(n);if(!(!i||i[3]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!i[1]&&!i[2]||!t||this.rules.inline.punctuation.exec(t))){let o,r,s=[...i[0]].length-1,a=s,l=0,c=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,e=e.slice(-1*n.length+s);(i=c.exec(e))!=null;){if(o=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!o)continue;if(r=[...o].length,i[3]||i[4]){a+=r;continue}if((i[5]||i[6])&&s%3&&!((s+r)%3)){l+=r;continue}if(a-=r,a>0)continue;r=Math.min(r,r+a+l);let h=[...i[0]][0].length,p=n.slice(0,s+i.index+h+r);if(Math.min(s,r)%2){let g=p.slice(1,-1);return{type:"em",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}let d=p.slice(2,-2);return{type:"strong",raw:p,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(n){let e=this.rules.inline.code.exec(n);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(t),o=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return i&&o&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(n){let e=this.rules.inline.br.exec(n);if(e)return{type:"br",raw:e[0]}}del(n){let e=this.rules.inline.del.exec(n);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(n){let e=this.rules.inline.autolink.exec(n);if(e){let t,i;return e[2]==="@"?(t=e[1],i="mailto:"+t):(t=e[1],i=t),{type:"link",raw:e[0],text:t,href:i,tokens:[{type:"text",raw:t,text:t}]}}}url(n){var t,i;let e;if(e=this.rules.inline.url.exec(n)){let o,r;if(e[2]==="@")o=e[0],r="mailto:"+o;else{let s;do s=e[0],e[0]=(i=(t=this.rules.inline._backpedal.exec(e[0]))==null?void 0:t[0])!=null?i:"";while(s!==e[0]);o=e[0],r=e[1]==="www."?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:o,href:r,tokens:[{type:"text",raw:o,text:o}]}}}inlineText(n){let e=this.rules.inline.text.exec(n);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},Q=class gn{constructor(e){z(this,"tokens");z(this,"options");z(this,"state");z(this,"inlineQueue");z(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||ke,this.options.tokenizer=this.options.tokenizer||new xt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:q,block:yt.normal,inline:We.normal};this.options.pedantic?(t.block=yt.pedantic,t.inline=We.pedantic):this.options.gfm&&(t.block=yt.gfm,this.options.breaks?t.inline=We.breaks:t.inline=We.gfm),this.tokenizer.rules=t}static get rules(){return{block:yt,inline:We}}static lex(e,t){return new gn(t).lex(e)}static lexInline(e,t){return new gn(t).inlineTokens(e)}lex(e){e=e.replace(q.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let i=this.inlineQueue[t];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],i=!1){var o,r,s;for(this.options.pedantic&&(e=e.replace(q.tabCharGlobal," ").replace(q.spaceLine,""));e;){let a;if((r=(o=this.options.extensions)==null?void 0:o.block)!=null&&r.some(c=>!!(a=c.call({lexer:this},e,t))&&(e=e.substring(a.raw.length),t.push(a),!0)))continue;if(a=this.tokenizer.space(e)){e=e.substring(a.raw.length);let c=t.at(-1);a.raw.length===1&&c!==void 0?c.raw+="\n":t.push(a);continue}if(a=this.tokenizer.code(e)){e=e.substring(a.raw.length);let c=t.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith("\n")?"":"\n")+a.raw,c.text+="\n"+a.text,this.inlineQueue.at(-1).src=c.text):t.push(a);continue}if(a=this.tokenizer.fences(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.heading(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.hr(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.blockquote(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.list(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.html(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.def(e)){e=e.substring(a.raw.length);let c=t.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith("\n")?"":"\n")+a.raw,c.text+="\n"+a.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title},t.push(a));continue}if(a=this.tokenizer.table(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.lheading(e)){e=e.substring(a.raw.length),t.push(a);continue}let l=e;if((s=this.options.extensions)!=null&&s.startBlock){let c,h=1/0,p=e.slice(1);this.options.extensions.startBlock.forEach(d=>{c=d.call({lexer:this},p),typeof c=="number"&&c>=0&&(h=Math.min(h,c))}),h<1/0&&h>=0&&(l=e.substring(0,h+1))}if(this.state.top&&(a=this.tokenizer.paragraph(l))){let c=t.at(-1);i&&(c==null?void 0:c.type)==="paragraph"?(c.raw+=(c.raw.endsWith("\n")?"":"\n")+a.raw,c.text+="\n"+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):t.push(a),i=l.length!==e.length,e=e.substring(a.raw.length)}else if(a=this.tokenizer.text(e)){e=e.substring(a.raw.length);let c=t.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith("\n")?"":"\n")+a.raw,c.text+="\n"+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):t.push(a)}else if(e){let c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}throw new Error(c)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){var l,c,h,p,d,g;let i,o=e,r=null;if(this.tokens.links){let u=Object.keys(this.tokens.links);if(u.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(o))!=null;)u.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(o))!=null;)o=o.slice(0,r.index)+"++"+o.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(r=this.tokenizer.rules.inline.blockSkip.exec(o))!=null;)i=r[2]?r[2].length:0,o=o.slice(0,r.index+i)+"["+"a".repeat(r[0].length-i-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);o=(h=(c=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:c.call({lexer:this},o))!=null?h:o;let s=!1,a="";for(;e;){let u;if(s||(a=""),s=!1,(d=(p=this.options.extensions)==null?void 0:p.inline)==null?void 0:d.some(f=>!!(u=f.call({lexer:this},e,t))&&(e=e.substring(u.raw.length),t.push(u),!0)))continue;if(u=this.tokenizer.escape(e)){e=e.substring(u.raw.length),t.push(u);continue}if(u=this.tokenizer.tag(e)){e=e.substring(u.raw.length),t.push(u);continue}if(u=this.tokenizer.link(e)){e=e.substring(u.raw.length),t.push(u);continue}if(u=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(u.raw.length);let f=t.at(-1);u.type==="text"&&(f==null?void 0:f.type)==="text"?(f.raw+=u.raw,f.text+=u.text):t.push(u);continue}if(u=this.tokenizer.emStrong(e,o,a)){e=e.substring(u.raw.length),t.push(u);continue}if(u=this.tokenizer.codespan(e)){e=e.substring(u.raw.length),t.push(u);continue}if(u=this.tokenizer.br(e)){e=e.substring(u.raw.length),t.push(u);continue}if(u=this.tokenizer.del(e)){e=e.substring(u.raw.length),t.push(u);continue}if(u=this.tokenizer.autolink(e)){e=e.substring(u.raw.length),t.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(e))){e=e.substring(u.raw.length),t.push(u);continue}let m=e;if((g=this.options.extensions)!=null&&g.startInline){let f,b=1/0,y=e.slice(1);this.options.extensions.startInline.forEach(w=>{f=w.call({lexer:this},y),typeof f=="number"&&f>=0&&(b=Math.min(b,f))}),b<1/0&&b>=0&&(m=e.substring(0,b+1))}if(u=this.tokenizer.inlineText(m)){e=e.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(a=u.raw.slice(-1)),s=!0;let f=t.at(-1);(f==null?void 0:f.type)==="text"?(f.raw+=u.raw,f.text+=u.text):t.push(u)}else if(e){let f="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(f);break}throw new Error(f)}}return t}},vt=class{constructor(n){z(this,"options");z(this,"parser");this.options=n||ke}space(n){return""}code({text:n,lang:e,escaped:t}){var r;let i=(r=(e||"").match(q.notSpaceStart))==null?void 0:r[0],o=n.replace(q.endingNewline,"")+"\n";return i?'<pre><code class="language-'+he(i)+'">'+(t?o:he(o,!0))+"</code></pre>\n":"<pre><code>"+(t?o:he(o,!0))+"</code></pre>\n"}blockquote({tokens:n}){return"<blockquote>\n".concat(this.parser.parse(n),"</blockquote>\n")}html({text:n}){return n}def(n){return""}heading({tokens:n,depth:e}){return"<h".concat(e,">").concat(this.parser.parseInline(n),"</h").concat(e,">\n")}hr(n){return"<hr>\n"}list(n){let e=n.ordered,t=n.start,i="";for(let r=0;r<n.items.length;r++){let s=n.items[r];i+=this.listitem(s)}let o=e?"ol":"ul";return"<"+o+(e&&t!==1?' start="'+t+'"':"")+">\n"+i+"</"+o+">\n"}listitem(n){return"<li>".concat(this.parser.parse(n.tokens),"</li>\n")}checkbox({checked:n}){return"<input "+(n?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:n}){return"<p>".concat(this.parser.parseInline(n),"</p>\n")}table(n){let e="",t="";for(let o=0;o<n.header.length;o++)t+=this.tablecell(n.header[o]);e+=this.tablerow({text:t});let i="";for(let o=0;o<n.rows.length;o++){let r=n.rows[o];t="";for(let s=0;s<r.length;s++)t+=this.tablecell(r[s]);i+=this.tablerow({text:t})}return i&&(i="<tbody>".concat(i,"</tbody>")),"<table>\n<thead>\n"+e+"</thead>\n"+i+"</table>\n"}tablerow({text:n}){return"<tr>\n".concat(n,"</tr>\n")}tablecell(n){let e=this.parser.parseInline(n.tokens),t=n.header?"th":"td";return(n.align?"<".concat(t,' align="').concat(n.align,'">'):"<".concat(t,">"))+e+"</".concat(t,">\n")}strong({tokens:n}){return"<strong>".concat(this.parser.parseInline(n),"</strong>")}em({tokens:n}){return"<em>".concat(this.parser.parseInline(n),"</em>")}codespan({text:n}){return"<code>".concat(he(n,!0),"</code>")}br(n){return"<br>"}del({tokens:n}){return"<del>".concat(this.parser.parseInline(n),"</del>")}link({href:n,title:e,tokens:t}){let i=this.parser.parseInline(t),o=zo(n);if(o===null)return i;let r='<a href="'+(n=o)+'"';return e&&(r+=' title="'+he(e)+'"'),r+=">"+i+"</a>",r}image({href:n,title:e,text:t,tokens:i}){i&&(t=this.parser.parseInline(i,this.parser.textRenderer));let o=zo(n);if(o===null)return he(t);let r='<img src="'.concat(n=o,'" alt="').concat(t,'"');return e&&(r+=' title="'.concat(he(e),'"')),r+=">",r}text(n){return"tokens"in n&&n.tokens?this.parser.parseInline(n.tokens):"escaped"in n&&n.escaped?n.text:he(n.text)}},ln=class{strong({text:n}){return n}em({text:n}){return n}codespan({text:n}){return n}del({text:n}){return n}html({text:n}){return n}text({text:n}){return n}link({text:n}){return""+n}image({text:n}){return""+n}br(){return""}checkbox({raw:n}){return n}},J=class fn{constructor(e){z(this,"options");z(this,"renderer");z(this,"textRenderer");this.options=e||ke,this.options.renderer=this.options.renderer||new vt,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ln}static parse(e,t){return new fn(t).parse(e)}static parseInline(e,t){return new fn(t).parseInline(e)}parse(e){var i,o;let t="";for(let r=0;r<e.length;r++){let s=e[r];if((o=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&o[s.type]){let l=s,c=this.options.extensions.renderers[l.type].call({parser:this},l);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(l.type)){t+=c||"";continue}}let a=s;switch(a.type){case"space":t+=this.renderer.space(a);break;case"hr":t+=this.renderer.hr(a);break;case"heading":t+=this.renderer.heading(a);break;case"code":t+=this.renderer.code(a);break;case"table":t+=this.renderer.table(a);break;case"blockquote":t+=this.renderer.blockquote(a);break;case"list":t+=this.renderer.list(a);break;case"checkbox":t+=this.renderer.checkbox(a);break;case"html":t+=this.renderer.html(a);break;case"def":t+=this.renderer.def(a);break;case"paragraph":t+=this.renderer.paragraph(a);break;case"text":t+=this.renderer.text(a);break;default:{let l='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return t}parseInline(e,t=this.renderer){var o,r;let i="";for(let s=0;s<e.length;s++){let a=e[s];if((r=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&r[a.type]){let c=this.options.extensions.renderers[a.type].call({parser:this},a);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){i+=c||"";continue}}let l=a;switch(l.type){case"escape":case"text":i+=t.text(l);break;case"html":i+=t.html(l);break;case"link":i+=t.link(l);break;case"image":i+=t.image(l);break;case"checkbox":i+=t.checkbox(l);break;case"strong":i+=t.strong(l);break;case"em":i+=t.em(l);break;case"codespan":i+=t.codespan(l);break;case"br":i+=t.br(l);break;case"del":i+=t.del(l);break;default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return i}},Ke=(wt=class{constructor(n){z(this,"options");z(this,"block");this.options=n||ke}preprocess(n){return n}postprocess(n){return n}processAllTokens(n){return n}emStrongMask(n){return n}provideLexer(){return this.block?Q.lex:Q.lexInline}provideParser(){return this.block?J.parse:J.parseInline}},z(wt,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),z(wt,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),wt),$e=new class{constructor(...n){z(this,"defaults",{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null});z(this,"options",this.setOptions);z(this,"parse",this.parseMarkdown(!0));z(this,"parseInline",this.parseMarkdown(!1));z(this,"Parser",J);z(this,"Renderer",vt);z(this,"TextRenderer",ln);z(this,"Lexer",Q);z(this,"Tokenizer",xt);z(this,"Hooks",Ke);this.use(...n)}walkTokens(n,e){var i,o;let t=[];for(let r of n)switch(t=t.concat(e.call(this,r)),r.type){case"table":{let s=r;for(let a of s.header)t=t.concat(this.walkTokens(a.tokens,e));for(let a of s.rows)for(let l of a)t=t.concat(this.walkTokens(l.tokens,e));break}case"list":{let s=r;t=t.concat(this.walkTokens(s.items,e));break}default:{let s=r;(o=(i=this.defaults.extensions)==null?void 0:i.childTokens)!=null&&o[s.type]?this.defaults.extensions.childTokens[s.type].forEach(a=>{let l=s[a].flat(1/0);t=t.concat(this.walkTokens(l,e))}):s.tokens&&(t=t.concat(this.walkTokens(s.tokens,e)))}}return t}use(...n){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return n.forEach(t=>{let i=C({},t);if(i.async=this.defaults.async||i.async||!1,t.extensions&&(t.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let r=e.renderers[o.name];e.renderers[o.name]=r?function(...s){let a=o.renderer.apply(this,s);return a===!1&&(a=r.apply(this,s)),a}:o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let r=e[o.level];r?r.unshift(o.tokenizer):e[o.level]=[o.tokenizer],o.start&&(o.level==="block"?e.startBlock?e.startBlock.push(o.start):e.startBlock=[o.start]:o.level==="inline"&&(e.startInline?e.startInline.push(o.start):e.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(e.childTokens[o.name]=o.childTokens)}),i.extensions=e),t.renderer){let o=this.defaults.renderer||new vt(this.defaults);for(let r in t.renderer){if(!(r in o))throw new Error("renderer '".concat(r,"' does not exist"));if(["options","parser"].includes(r))continue;let s=r,a=t.renderer[s],l=o[s];o[s]=(...c)=>{let h=a.apply(o,c);return h===!1&&(h=l.apply(o,c)),h||""}}i.renderer=o}if(t.tokenizer){let o=this.defaults.tokenizer||new xt(this.defaults);for(let r in t.tokenizer){if(!(r in o))throw new Error("tokenizer '".concat(r,"' does not exist"));if(["options","rules","lexer"].includes(r))continue;let s=r,a=t.tokenizer[s],l=o[s];o[s]=(...c)=>{let h=a.apply(o,c);return h===!1&&(h=l.apply(o,c)),h}}i.tokenizer=o}if(t.hooks){let o=this.defaults.hooks||new Ke;for(let r in t.hooks){if(!(r in o))throw new Error("hook '".concat(r,"' does not exist"));if(["options","block"].includes(r))continue;let s=r,a=t.hooks[s],l=o[s];Ke.passThroughHooks.has(r)?o[s]=c=>{if(this.defaults.async&&Ke.passThroughHooksRespectAsync.has(r))return(()=>O(this,null,function*(){let p=yield a.call(o,c);return l.call(o,p)}))();let h=a.call(o,c);return l.call(o,h)}:o[s]=(...c)=>{if(this.defaults.async)return(()=>O(this,null,function*(){let p=yield a.apply(o,c);return p===!1&&(p=yield l.apply(o,c)),p}))();let h=a.apply(o,c);return h===!1&&(h=l.apply(o,c)),h}}i.hooks=o}if(t.walkTokens){let o=this.defaults.walkTokens,r=t.walkTokens;i.walkTokens=function(s){let a=[];return a.push(r.call(this,s)),o&&(a=a.concat(o.call(this,s))),a}}this.defaults=C(C({},this.defaults),i)}),this}setOptions(n){return this.defaults=C(C({},this.defaults),n),this}lexer(n,e){return Q.lex(n,e!=null?e:this.defaults)}parser(n,e){return J.parse(n,e!=null?e:this.defaults)}parseMarkdown(n){return(e,t)=>{let i=C({},t),o=C(C({},this.defaults),i),r=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&i.async===!1)return r(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return r(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return r(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=n),o.async)return(()=>O(this,null,function*(){let s=o.hooks?yield o.hooks.preprocess(e):e,a=yield(o.hooks?yield o.hooks.provideLexer():n?Q.lex:Q.lexInline)(s,o),l=o.hooks?yield o.hooks.processAllTokens(a):a;o.walkTokens&&(yield Promise.all(this.walkTokens(l,o.walkTokens)));let c=yield(o.hooks?yield o.hooks.provideParser():n?J.parse:J.parseInline)(l,o);return o.hooks?yield o.hooks.postprocess(c):c}))().catch(r);try{o.hooks&&(e=o.hooks.preprocess(e));let s=(o.hooks?o.hooks.provideLexer():n?Q.lex:Q.lexInline)(e,o);o.hooks&&(s=o.hooks.processAllTokens(s)),o.walkTokens&&this.walkTokens(s,o.walkTokens);let a=(o.hooks?o.hooks.provideParser():n?J.parse:J.parseInline)(s,o);return o.hooks&&(a=o.hooks.postprocess(a)),a}catch(s){return r(s)}}}onError(n,e){return t=>{if(t.message+="\nPlease report this to https://github.com/markedjs/marked.",n){let i="<p>An error occurred:</p><pre>"+he(t.message+"",!0)+"</pre>";return e?Promise.resolve(i):i}if(e)return Promise.reject(t);throw t}}};function M(n,e){return $e.parse(n,e)}M.options=M.setOptions=function(n){return $e.setOptions(n),M.defaults=$e.defaults,xo(M.defaults),M},M.getDefaults=Ar,M.defaults=ke,M.use=function(...n){return $e.use(...n),M.defaults=$e.defaults,xo(M.defaults),M},M.walkTokens=function(n,e){return $e.walkTokens(n,e)},M.parseInline=$e.parseInline,M.Parser=J,M.parser=J.parse,M.Renderer=vt,M.TextRenderer=ln,M.Lexer=Q,M.lexer=Q.lex,M.Tokenizer=xt,M.Hooks=Ke,M.parse=M,M.options,M.setOptions,M.use,M.walkTokens,M.parseInline,J.parse,Q.lex;let Xe="";function cn(n){if(!Xe||!n)return n;const e=Xe.endsWith("/")?Xe:Xe+"/";return n.startsWith(e)?n.slice(e.length):n}const Zr=["right-start","left-start","right-end","left-end","bottom-end","top-end","bottom-start","top-start","right","left","bottom","top"],pe=16;function Lo(n){try{return M.parse(n,{async:!1})}catch(e){return n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\n/g,"<br>")}}function Gr(n){const{name:e,summary:t}=function(s){const a=s.name,l=s.input||{};switch(a){case"Read":return{name:"Read",summary:cn(l.file_path||"")};case"Write":return{name:"Write",summary:cn(l.file_path||"")};case"Edit":return{name:"Update",summary:cn(l.file_path||"")};case"Glob":return{name:"List",summary:l.pattern||""};case"Grep":return{name:"Search",summary:l.pattern||""};case"Bash":return{name:"Bash",summary:l.command||""};case"WebFetch":return{name:"Fetch",summary:l.url||""};case"WebSearch":return{name:"Search",summary:l.query||""};default:return{name:a,summary:""}}}(n),i=n.isComplete,o=n.result!==void 0,r=n.name==="Edit"&&n.input&&(n.input.old_string||n.input.new_string);return S(Go||(Go=$(['\n <div class="tool-call-inline">\n <div class="tool-header-inline">\n <span class="tool-bullet ','">●</span>\n <span class="tool-name-inline">',"</span>\n ","\n </div>\n ","\n </div>\n "])),i?"tool-bullet-complete":"tool-bullet-running",e,t?S(qo||(qo=$(['<span class="tool-summary-inline">',"</span>"])),t):"",r?S(Xo||(Xo=$(['<div class="tool-diff-wrapper">\n <span class="tool-result-bracket">⎿</span>\n ',"\n </div>"])),function(s){const a=s.input||{},l=a.old_string||"",c=a.new_string||"";if(!l&&!c)return S(Fo||(Fo=$([""])));const h=l.split("\n"),p=c.split("\n");return S(Ko||(Ko=$(['\n <div class="diff-view">\n ',"\n ","\n </div>\n "])),h.map(d=>S(Wo||(Wo=$(['<div class="diff-line diff-del">- ',"</div>"])),d)),p.map(d=>S(Yo||(Yo=$(['<div class="diff-line diff-add">+ ',"</div>"])),d)))}(n)):o?S(Zo||(Zo=$(['<div class="tool-result-inline">\n <span class="tool-result-bracket">⎿</span>\n <span class="tool-result-text ','"\n >',"</span\n >\n </div>"])),n.isError?"tool-error-text":"",function(s,a){if(!s)return"";let l=s.trim();if(a==="Write")return"Wrote ".concat(l.split("\n").length," lines");if(a==="Read"){const c=l.split("\n").length;if(c>5)return"".concat(c," lines")}return l.length>300&&(l=l.slice(0,300)+"..."),l}(n.result,n.name)):"")}function Qr(n,e){var t;return n.showChatModal?S(bi||(bi=$(['\n <div\n class="chat-modal-overlay"\n @click="','"\n @mousemove="','"\n @mouseup="','"\n >\n <div\n class="chat-modal chat-modal-floating ','"\n id="chat-modal-floating"\n @click="','"\n >\n <div class="chat-modal-header" @mousedown="','">\n <div class="chat-modal-title-wrapper">\n <div class="chat-modal-title-row">\n <h3 class="chat-modal-title">AI Assistant</h3>\n ',"\n </div>\n ",'\n </div>\n <div class="chat-modal-actions">\n <button\n class="chat-modal-theme"\n @click="','"\n title="','"\n >\n ','\n </button>\n <button\n class="chat-modal-clear"\n @click="','"\n title="Clear"\n >\n <svg\n width="14"\n height="14"\n viewBox="0 0 24 24"\n fill="none"\n stroke="currentColor"\n stroke-width="2"\n >\n <path d="M3 6h18" />\n <path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" />\n <path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" />\n </svg>\n </button>\n <button\n class="chat-modal-close"\n @click="','"\n title="Close"\n >\n <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <path d="M18 6 6 18" />\n <path d="m6 6 12 12" />\n </svg>\n </button>\n </div>\n </div>\n <div class="chat-modal-content">\n ',"\n ","\n </div>\n ",'\n <div class="chat-modal-footer">\n <span class="chat-input-prompt">❯</span>\n <textarea\n class="chat-input"\n placeholder="Enter your message..."\n .value="','"\n @input="','"\n @keydown="','"\n ?disabled="','"\n rows="2"\n ></textarea>\n <button\n class="chat-send-btn"\n @click="','"\n ?disabled="','"\n title="Send (Enter)"\n >\n ',"\n </button>\n </div>\n </div>\n </div>\n "])),e.handleOverlayClick,e.handleDragMove,e.handleDragEnd,n.isDragging?"dragging":"",i=>i.stopPropagation(),e.handleDragStart,n.chatModel?S(Qo||(Qo=$(['<span class="chat-model-badge">',"</span>"])),n.chatModel):"",n.chatContext?S(Jo||(Jo=$(['<span class="chat-context-info"\n >&lt;',"&gt; ","#","</span\n >"])),n.chatContext.name,n.chatContext.file,n.chatContext.line):"",e.toggleTheme,n.chatTheme==="dark"?"Switch to light theme":"Switch to dark theme",n.chatTheme==="dark"?S(ei||(ei=$(['<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">\n <circle cx="12" cy="12" r="5" />\n <path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42" />\n </svg>']))):S(ti||(ti=$(['<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">\n <path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" />\n </svg>']))),e.clearChatMessages,e.closeChatModal,n.chatMessages.length===0?S(ni||(ni=$(['<div class="chat-empty">\n <span class="chat-empty-prompt">❯</span>\n <span class="chat-empty-text">Ask me anything about this code...</span>\n </div>']))):n.chatMessages.map(i=>S(pi||(pi=$(['\n <div class="chat-line chat-line-','">\n ','\n <div class="chat-message-content">\n ',"\n </div>\n </div>\n "])),i.role,i.role==="user"?S(oi||(oi=$(['<span class="chat-prompt">❯</span>']))):S(ii||(ii=$(['<span class="chat-indent"></span>']))),function(o){const r=o.role==="assistant";return o.blocks&&o.blocks.length>0?S(li||(li=$(["\n ","\n "])),o.blocks.map(s=>s.type==="text"&&s.content?r?S(ri||(ri=$(['<div class="chat-text-inline chat-markdown">',"</div>"])),Qn(Lo(s.content))):S(si||(si=$(['<div class="chat-text-inline">',"</div>"])),s.content):s.type==="tool"&&s.tool?Gr(s.tool):S(ai||(ai=$([""]))))):r&&o.content?S(ci||(ci=$(['<div class="chat-text-inline chat-markdown">',"</div>"])),Qn(Lo(o.content))):S(hi||(hi=$(['<div class="chat-text-inline">',"</div>"])),o.content)}(i))),!n.chatLoading||n.chatMessages.length&&((t=n.chatMessages[n.chatMessages.length-1])==null?void 0:t.role)!=="user"?"":S(di||(di=$(['<div class="chat-loading">\n <span class="chat-indent"></span>\n <span class="chat-cursor"></span>\n </div>']))),n.turnStatus!=="idle"?S(gi||(gi=$(['<div class="chat-status-bar">\n <div class="chat-status-info">\n <span class="chat-status-icon ','">\n ','\n </span>\n <span class="chat-status-text">\n ','\n </span>\n <span class="chat-status-duration">· ',"</span>\n </div>\n ","\n </div>"])),n.turnStatus,n.turnStatus==="running"?"●":n.turnStatus==="done"?"✓":"■",n.turnStatus==="running"?"Running":n.turnStatus==="done"?"Done":"Interrupt",function(i){const o=Math.floor(i/60),r=Math.floor(i%60);return o>0?"".concat(o,"m ").concat(r.toString().padStart(2,"0"),"s"):"".concat(r,"s")}(n.turnDuration),n.turnStatus==="running"?S(ui||(ui=$(['<button\n class="chat-interrupt-btn"\n @click="','"\n title="Interrupt"\n >\n <svg width="12" height="12" viewBox="0 0 24 24" fill="currentColor">\n <rect x="6" y="6" width="12" height="12" rx="1" />\n </svg>\n </button>'])),e.interruptChat):""):"",n.chatInput,e.handleChatInput,e.handleChatKeyDown,n.chatLoading,e.sendChatMessage,n.chatLoading||!n.chatInput.trim(),n.chatLoading?S(fi||(fi=$(['<svg\n class="chat-send-loading"\n width="16"\n height="16"\n viewBox="0 0 24 24"\n >\n <circle\n cx="12"\n cy="12"\n r="10"\n stroke="currentColor"\n stroke-width="3"\n fill="none"\n stroke-dasharray="31.4"\n stroke-linecap="round"\n />\n </svg>']))):S(mi||(mi=$(['<svg\n width="16"\n height="16"\n viewBox="0 0 24 24"\n fill="none"\n stroke="currentColor"\n stroke-width="2"\n >\n <path d="M5 12h14" />\n <path d="M12 5l7 7-7 7" />\n </svg>'])))):S(yi||(yi=$([""])))}M.setOptions({breaks:!0,gfm:!0});const Jr=Qe(xi||(xi=$(["\n /* 暗色主题变量(默认) */\n :host {\n --chat-bg: #1e1e1e;\n --chat-header-bg: #252526;\n --chat-border: #333;\n --chat-text: #d4d4d4;\n --chat-text-secondary: #ccc;\n --chat-text-muted: #aaa;\n --chat-text-placeholder: #888;\n --chat-accent: #569cd6;\n --chat-accent-hover: #6cb6ff;\n --chat-overlay: rgba(0, 0, 0, 0.3);\n --chat-shadow: rgba(0, 0, 0, 0.4);\n --chat-code-bg: #2d2d2d;\n --chat-code-text: #ce9178;\n --chat-pre-bg: #1a1a1a;\n --chat-pre-text: #d4d4d4;\n --chat-prompt-ai: #c586c0;\n --chat-tool-bg: #252526;\n --chat-tool-border: #555;\n --chat-tool-complete: #4ec9b0;\n --chat-tool-name: #dcdcaa;\n --chat-tool-result: #9cdcfe;\n --chat-tool-error: #f48771;\n --chat-tool-prefix: #555;\n --chat-scrollbar-track: #1e1e1e;\n --chat-scrollbar-thumb: #424242;\n --chat-scrollbar-hover: #555;\n --chat-heading: #e0e0e0;\n --chat-strong: #e0e0e0;\n --chat-em: #b5b5b5;\n --chat-del: #888;\n --chat-blockquote-bg: #252526;\n --chat-blockquote-text: #aaa;\n --chat-table-header-bg: #252526;\n --chat-table-alt-bg: #1a1a1a;\n --chat-input-bg: #1e1e1e;\n --chat-btn-text: #1e1e1e;\n --chat-ai-text: #9cdcfe;\n --chat-user-text: #d4d4d4;\n --chat-hover-bg: #333;\n --chat-diff-add-bg: rgba(35, 134, 54, 0.15);\n --chat-diff-add-text: #4ec9b0;\n --chat-diff-del-bg: rgba(218, 54, 51, 0.15);\n --chat-diff-del-text: #f48771;\n }\n\n /* 亮色主题变量 */\n :host(.chat-theme-light) {\n --chat-bg: #ffffff;\n --chat-header-bg: #f5f5f5;\n --chat-border: #e0e0e0;\n --chat-text: #333333;\n --chat-text-secondary: #555555;\n --chat-text-muted: #666;\n --chat-text-placeholder: #aaaaaa;\n --chat-accent: #0969da;\n --chat-accent-hover: #0550ae;\n --chat-overlay: rgba(0, 0, 0, 0.15);\n --chat-shadow: rgba(0, 0, 0, 0.12);\n --chat-code-bg: #eff1f3;\n --chat-code-text: #d73e1d;\n --chat-pre-bg: #f6f8fa;\n --chat-pre-text: #333333;\n --chat-prompt-ai: #8250df;\n --chat-tool-bg: #f5f5f5;\n --chat-tool-border: #d0d0d0;\n --chat-tool-complete: #1a7f37;\n --chat-tool-name: #953800;\n --chat-tool-result: #0550ae;\n --chat-tool-error: #cf222e;\n --chat-tool-prefix: #bbb;\n --chat-scrollbar-track: #ffffff;\n --chat-scrollbar-thumb: #c8c8c8;\n --chat-scrollbar-hover: #a0a0a0;\n --chat-heading: #1f2328;\n --chat-strong: #1f2328;\n --chat-em: #555555;\n --chat-del: #aaaaaa;\n --chat-blockquote-bg: #f5f5f5;\n --chat-blockquote-text: #666666;\n --chat-table-header-bg: #f5f5f5;\n --chat-table-alt-bg: #f6f8fa;\n --chat-input-bg: #ffffff;\n --chat-btn-text: #ffffff;\n --chat-ai-text: #0550ae;\n --chat-user-text: #333333;\n --chat-hover-bg: #e8e8e8;\n --chat-diff-add-bg: rgba(35, 134, 54, 0.1);\n --chat-diff-add-text: #1a7f37;\n --chat-diff-del-bg: rgba(218, 54, 51, 0.1);\n --chat-diff-del-text: #cf222e;\n }\n\n /* 聊天框样式 */\n .chat-modal-overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: var(--chat-overlay);\n z-index: 99999999999999999;\n animation: fadeIn 0.2s ease-out;\n }\n\n .chat-modal {\n background: var(--chat-bg);\n border-radius: 8px;\n box-shadow: 0 8px 32px var(--chat-shadow);\n width: 90%;\n max-width: 600px;\n height: 70vh;\n max-height: 700px;\n display: flex;\n flex-direction: column;\n animation: slideUp 0.3s ease-out;\n overflow: hidden;\n border: 1px solid var(--chat-border);\n }\n\n .chat-modal-floating {\n position: fixed;\n top: 0;\n left: 0;\n width: 480px;\n min-width: 360px;\n height: min(520px, calc(100vh - 32px));\n animation: slideIn 0.3s ease-out;\n }\n\n .chat-modal-centered {\n animation: fadeInScale 0.3s ease-out;\n }\n\n @keyframes fadeInScale {\n from { opacity: 0; transform: scale(0.95); }\n to { opacity: 1; transform: scale(1); }\n }\n\n @keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n }\n\n @keyframes slideUp {\n from { transform: translateY(20px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n }\n\n @keyframes slideIn {\n from { opacity: 0; transform: scale(0.95); }\n to { opacity: 1; transform: scale(1); }\n }\n\n .chat-modal-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 10px 14px;\n background: var(--chat-header-bg);\n border-bottom: 1px solid var(--chat-border);\n cursor: move;\n user-select: none;\n }\n\n .chat-modal.dragging {\n transition: none;\n user-select: none;\n }\n\n .chat-modal.dragging .chat-modal-content,\n .chat-modal.dragging .chat-modal-footer {\n pointer-events: none;\n }\n\n .chat-modal-title-wrapper {\n display: flex;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n flex: 1;\n }\n\n .chat-modal-title {\n margin: 0;\n font-size: 13px;\n font-weight: 500;\n color: var(--chat-text-secondary);\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;\n }\n\n .chat-modal-title-row {\n display: flex;\n align-items: center;\n gap: 6px;\n }\n\n .chat-model-badge {\n font-size: 10px;\n color: var(--chat-text-muted);\n background: var(--chat-border);\n padding: 1px 6px;\n border-radius: 3px;\n font-family: 'SF Mono', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;\n white-space: nowrap;\n max-width: 160px;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .chat-context-info {\n font-size: 11px;\n color: var(--chat-text-muted);\n font-family: 'SF Mono', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .chat-modal-actions {\n display: flex;\n align-items: center;\n gap: 4px;\n flex-shrink: 0;\n }\n\n .chat-modal-theme,\n .chat-modal-clear {\n background: transparent;\n border: none;\n color: var(--chat-text-muted);\n cursor: pointer;\n padding: 4px;\n border-radius: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.15s;\n }\n\n .chat-modal-theme:hover,\n .chat-modal-clear:hover {\n background: var(--chat-hover-bg);\n color: var(--chat-text-secondary);\n }\n\n .chat-modal-close {\n background: transparent;\n border: none;\n color: var(--chat-text-muted);\n cursor: pointer;\n padding: 0;\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 4px;\n transition: all 0.15s;\n }\n\n .chat-modal-close:hover {\n background: var(--chat-hover-bg);\n color: var(--chat-text-secondary);\n }\n\n .chat-modal-content {\n flex: 1;\n overflow-y: auto;\n padding: 12px 14px;\n display: flex;\n flex-direction: column;\n gap: 0;\n min-height: 0;\n font-family: 'SF Mono', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;\n font-size: 13px;\n line-height: 1.5;\n background: var(--chat-bg);\n }\n\n .chat-empty {\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n color: var(--chat-text-placeholder);\n }\n\n .chat-empty-prompt {\n color: var(--chat-accent);\n font-weight: 600;\n }\n\n .chat-empty-text {\n color: var(--chat-text-placeholder);\n font-style: italic;\n }\n\n /* 终端风格连续消息流 */\n .chat-line {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n word-break: break-word;\n }\n\n .chat-line-user {\n color: var(--chat-user-text);\n margin-top: 12px;\n }\n\n .chat-line-user:first-child {\n margin-top: 0;\n }\n\n .chat-line-assistant {\n color: var(--chat-ai-text);\n margin-top: 2px;\n }\n\n .chat-prompt {\n color: var(--chat-accent);\n font-weight: 600;\n flex-shrink: 0;\n user-select: none;\n }\n\n .chat-indent {\n display: inline-block;\n width: 10px;\n flex-shrink: 0;\n }\n\n .chat-message-content {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 4px;\n }\n\n .chat-text-inline {\n white-space: pre-wrap;\n word-break: break-word;\n }\n\n /* Markdown 渲染样式 */\n .chat-markdown {\n white-space: normal;\n }\n\n .chat-markdown p {\n margin: 0 0 8px 0;\n }\n\n .chat-markdown p:last-child {\n margin-bottom: 0;\n }\n\n .chat-markdown h1,\n .chat-markdown h2,\n .chat-markdown h3,\n .chat-markdown h4,\n .chat-markdown h5,\n .chat-markdown h6 {\n margin: 12px 0 8px 0;\n font-weight: 600;\n line-height: 1.3;\n color: var(--chat-heading);\n }\n\n .chat-markdown h1 { font-size: 1.4em; }\n .chat-markdown h2 { font-size: 1.25em; }\n .chat-markdown h3 { font-size: 1.1em; }\n .chat-markdown h4,\n .chat-markdown h5,\n .chat-markdown h6 { font-size: 1em; }\n\n .chat-markdown code {\n background: var(--chat-code-bg);\n padding: 2px 6px;\n border-radius: 4px;\n font-family: 'SF Mono', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;\n font-size: 0.9em;\n color: var(--chat-code-text);\n }\n\n .chat-markdown pre {\n background: var(--chat-pre-bg);\n border: 1px solid var(--chat-border);\n border-radius: 6px;\n padding: 12px;\n margin: 8px 0;\n overflow-x: auto;\n }\n\n .chat-markdown pre code {\n background: transparent;\n padding: 0;\n color: var(--chat-pre-text);\n font-size: 12px;\n line-height: 1.5;\n }\n\n .chat-markdown ul,\n .chat-markdown ol {\n margin: 8px 0;\n padding-left: 20px;\n }\n\n .chat-markdown li {\n margin: 4px 0;\n }\n\n .chat-markdown li > ul,\n .chat-markdown li > ol {\n margin: 4px 0;\n }\n\n .chat-markdown blockquote {\n margin: 8px 0;\n padding: 8px 12px;\n border-left: 3px solid var(--chat-accent);\n background: var(--chat-blockquote-bg);\n color: var(--chat-blockquote-text);\n }\n\n .chat-markdown blockquote p {\n margin: 0;\n }\n\n .chat-markdown a {\n color: var(--chat-accent);\n text-decoration: none;\n }\n\n .chat-markdown a:hover {\n text-decoration: underline;\n }\n\n .chat-markdown hr {\n border: none;\n border-top: 1px solid var(--chat-border);\n margin: 12px 0;\n }\n\n .chat-markdown table {\n border-collapse: collapse;\n margin: 8px 0;\n width: 100%;\n font-size: 12px;\n }\n\n .chat-markdown th,\n .chat-markdown td {\n border: 1px solid var(--chat-border);\n padding: 6px 10px;\n text-align: left;\n }\n\n .chat-markdown th {\n background: var(--chat-table-header-bg);\n font-weight: 600;\n }\n\n .chat-markdown tr:nth-child(even) {\n background: var(--chat-table-alt-bg);\n }\n\n .chat-markdown strong {\n font-weight: 600;\n color: var(--chat-strong);\n }\n\n .chat-markdown em {\n font-style: italic;\n color: var(--chat-em);\n }\n\n .chat-markdown del {\n text-decoration: line-through;\n color: var(--chat-del);\n }\n\n .chat-line-user {\n color: var(--chat-user-text);\n }\n\n .chat-line-assistant {\n color: var(--chat-ai-text);\n }\n\n /* 加载状态 - 光标闪烁 */\n .chat-loading {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n\n .chat-cursor {\n width: 8px;\n height: 16px;\n background: var(--chat-accent);\n animation: cursorBlink 1s step-end infinite;\n }\n\n @keyframes cursorBlink {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0; }\n }\n\n /* 状态栏 */\n .chat-status-bar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 4px 14px;\n background: var(--chat-header-bg);\n border-top: 1px solid var(--chat-border);\n font-family: 'SF Mono', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;\n font-size: 11px;\n }\n\n .chat-status-info {\n display: flex;\n align-items: center;\n gap: 6px;\n color: var(--chat-text-muted);\n }\n\n .chat-status-icon {\n font-size: 10px;\n }\n\n .chat-status-icon.running {\n color: var(--chat-accent);\n animation: statusPulse 1.5s ease-in-out infinite;\n }\n\n .chat-status-icon.done {\n color: var(--chat-tool-complete);\n }\n\n .chat-status-icon.interrupt {\n color: var(--chat-tool-error);\n }\n\n @keyframes statusPulse {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.4; }\n }\n\n .chat-status-text {\n color: var(--chat-text-muted);\n }\n\n .chat-status-duration {\n color: var(--chat-text-placeholder);\n }\n\n .chat-interrupt-btn {\n background: transparent;\n border: 1px solid var(--chat-border);\n color: var(--chat-text-muted);\n cursor: pointer;\n padding: 0;\n width: 24px;\n height: 24px;\n border-radius: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.15s;\n }\n\n .chat-interrupt-btn:hover {\n background: var(--chat-hover-bg);\n color: var(--chat-tool-error);\n border-color: var(--chat-tool-error);\n }\n\n /* 底部输入区域 */\n .chat-modal-footer {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 10px 14px;\n border-top: 1px solid var(--chat-border);\n background: var(--chat-header-bg);\n }\n\n .chat-input-prompt {\n color: var(--chat-accent);\n font-family: 'SF Mono', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;\n font-size: 13px;\n font-weight: 600;\n flex-shrink: 0;\n user-select: none;\n }\n\n .chat-input {\n flex: 1;\n background: var(--chat-input-bg);\n border: 1px solid var(--chat-border);\n border-radius: 4px;\n padding: 6px 10px;\n font-size: 13px;\n font-family: 'SF Mono', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;\n color: var(--chat-text);\n resize: none;\n line-height: 1.4;\n outline: none;\n transition: border-color 0.15s;\n }\n\n .chat-input::placeholder {\n color: var(--chat-text-placeholder);\n }\n\n .chat-input:focus {\n border-color: var(--chat-accent);\n }\n\n .chat-input:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n\n .chat-send-btn {\n background: var(--chat-accent);\n border: none;\n border-radius: 4px;\n padding: 6px 10px;\n cursor: pointer;\n color: var(--chat-btn-text);\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.15s;\n flex-shrink: 0;\n }\n\n .chat-send-btn:hover:not(:disabled) {\n background: var(--chat-accent-hover);\n }\n\n .chat-send-btn:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n }\n\n .chat-send-loading {\n animation: chatSendSpin 1s linear infinite;\n }\n\n @keyframes chatSendSpin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n }\n\n /* CLI 扁平内联工具调用 */\n .tool-call-inline {\n margin: 4px 0;\n font-size: 13px;\n line-height: 1.5;\n }\n\n .tool-header-inline {\n display: flex;\n align-items: center;\n gap: 6px;\n color: var(--chat-text-secondary);\n }\n\n .tool-bullet {\n font-size: 10px;\n flex-shrink: 0;\n }\n\n .tool-bullet-running {\n color: var(--chat-accent);\n animation: toolPulse 1.5s ease-in-out infinite;\n }\n\n .tool-bullet-complete {\n color: var(--chat-tool-complete);\n }\n\n @keyframes toolPulse {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.3; }\n }\n\n .tool-name-inline {\n color: var(--chat-tool-name);\n font-weight: 600;\n }\n\n .tool-summary-inline {\n color: var(--chat-text-muted);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex: 1;\n direction: rtl;\n text-align: left;\n }\n\n .tool-result-inline {\n display: flex;\n align-items: flex-start;\n gap: 6px;\n padding-left: 16px;\n margin-top: 2px;\n }\n\n .tool-result-bracket {\n color: var(--chat-tool-prefix);\n flex-shrink: 0;\n line-height: 1.4;\n }\n\n .tool-result-text {\n color: var(--chat-tool-result);\n white-space: pre-wrap;\n word-break: break-word;\n line-height: 1.4;\n font-size: 12px;\n }\n\n .tool-error-text {\n color: var(--chat-tool-error);\n }\n\n /* Diff 视图(Edit 工具红绿对比) */\n .tool-diff-wrapper {\n display: flex;\n align-items: flex-start;\n gap: 6px;\n padding-left: 16px;\n margin-top: 2px;\n }\n\n .tool-diff-wrapper > .tool-result-bracket {\n margin-top: 2px;\n }\n\n .diff-view {\n flex: 1;\n min-width: 0;\n font-family: 'SF Mono', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 4px;\n overflow: hidden;\n }\n\n .diff-line {\n padding: 1px 8px;\n white-space: pre-wrap;\n word-break: break-word;\n }\n\n .diff-del {\n background: var(--chat-diff-del-bg);\n color: var(--chat-diff-del-text);\n }\n\n .diff-add {\n background: var(--chat-diff-add-bg);\n color: var(--chat-diff-add-text);\n }\n\n /* 滚动条样式 */\n .chat-modal-content::-webkit-scrollbar {\n width: 8px;\n }\n\n .chat-modal-content::-webkit-scrollbar-track {\n background: var(--chat-scrollbar-track);\n }\n\n .chat-modal-content::-webkit-scrollbar-thumb {\n background: var(--chat-scrollbar-thumb);\n border-radius: 4px;\n }\n\n .chat-modal-content::-webkit-scrollbar-thumb:hover {\n background: var(--chat-scrollbar-hover);\n }\n"])));var es=Object.defineProperty,ts=Object.getOwnPropertyDescriptor,v=(n,e,t,i)=>{for(var o,r=i>1?void 0:i?ts(e,t):e,s=n.length-1;s>=0;s--)(o=n[s])&&(r=(i?o(e,t,r):o(r))||r);return i&&r&&es(e,t,r),r};const hn="__code-inspector-unique-id",pn="data-astro-source-file",ns={ctrlKey:"^control",altKey:"⌥option",metaKey:"⌘command",shiftKey:"shift"},os={ctrlKey:"Ctrl",altKey:"Alt",metaKey:"⊞Windows",shiftKey:"Shift"},Ze=300;function No(){return new Promise(n=>{requestAnimationFrame(n)})}class x extends je{constructor(){super(...arguments),this.hotKeys="shiftKey,altKey",this.port=5678,this.showSwitch=!1,this.autoToggle=!1,this.hideConsole=!1,this.locate=!0,this.copy=void 0,this.target="",this.targetNode=null,this.ip="localhost",this.ai=!1,this.wheelThrottling=!1,this.modeKey="z",this.defaultAction="",this.position={top:0,right:0,bottom:0,left:0,padding:{top:0,right:0,bottom:0,left:0},border:{top:0,right:0,bottom:0,left:0},margin:{top:0,right:0,bottom:0,left:0}},this.element={name:"",line:0,column:0,path:""},this.elementTipStyle={vertical:"",horizon:"",visibility:""},this.show=!1,this.showNodeTree=!1,this.nodeTreePosition={},this.nodeTree=null,this.dragging=!1,this.mousePosition={baseX:0,baseY:0,moveX:0,moveY:0},this.draggingTarget="switch",this.open=!1,this.moved=!1,this.hoverSwitch=!1,this.preUserSelect="",this.sendType="xhr",this.activeNode={},this.showSettingsModal=!1,this.internalLocate=!1,this.internalCopy=!1,this.internalTarget=!1,this.internalAI=!1,this.showChatModal=!1,this.chatMessages=[],this.chatInput="",this.chatLoading=!1,this.chatContext=null,this.currentTools=new Map,this.chatSessionId=null,this.chatTheme="dark",this.turnStatus="idle",this.turnDuration=0,this.chatModel="",this.chatAbortController=null,this.turnTimerInterval=null,this.turnStartTime=0,this.isDragging=!1,this.dragStartX=0,this.dragStartY=0,this.modalStartX=0,this.modalStartY=0,this.wasDragging=!1,this.chatPositionCleanup=null,this.features=[{label:"Locate Code",description:"Open the editor and locate code",checked:()=>!!this.internalLocate,onChange:()=>this.toggleLocate(),action:"locate",fn:()=>this.locateCode(),key:1,available:()=>!!this.locate},{label:"Copy Path",description:"Copy the code path to clipboard",checked:()=>!!this.internalCopy,onChange:()=>this.toggleCopy(),action:"copy",fn:()=>this.copyCode(),key:2,available:()=>this.copy!==!1},{label:"Open Target",description:"Open the target url",checked:()=>!!this.internalTarget,onChange:()=>this.toggleTarget(),action:"target",fn:()=>this.targetCode(),key:3,available:()=>!!this.target},{label:"AI Assistant",description:"Use AI for coding",checked:()=>!!this.internalAI,onChange:()=>this.toggleAICode(),action:"ai",fn:()=>this.openChatModal(),key:4,available:()=>!!this.ai}],this.eventListeners=[],this.isTracking=e=>this.hotKeys&&this.hotKeys.split(",").every(t=>e[t.trim()]),this.getDomPropertyValue=(e,t)=>{const i=window.getComputedStyle(e);return Number(i.getPropertyValue(t).replace("px",""))},this.calculateElementInfoPosition=e=>O(this,null,function*(){var _,E;const{top:t,right:i,bottom:o,left:r}=e.getBoundingClientRect(),s=document.documentElement.clientHeight,a=document.documentElement.clientWidth,l=this.getDomPropertyValue(e,"margin-top"),c=this.getDomPropertyValue(e,"margin-right"),h=this.getDomPropertyValue(e,"margin-bottom"),p=this.getDomPropertyValue(e,"margin-left");yield No();const{width:d,height:g}=this.elementInfoRef.getBoundingClientRect(),u=t-l,m=i+c,f=o+h,b=r-p,y=[{vertical:"element-info-bottom",horizon:"element-info-right",top:f,left:b,isExternal:!0},{vertical:"element-info-bottom",horizon:"element-info-left",top:f,left:m-d,isExternal:!0},{vertical:"element-info-top",horizon:"element-info-right",top:u-g,left:b,isExternal:!0},{vertical:"element-info-top",horizon:"element-info-left",top:u-g,left:m-d,isExternal:!0},{vertical:"element-info-bottom-inner",horizon:"element-info-right",top:f-g,left:b,isExternal:!1},{vertical:"element-info-bottom-inner",horizon:"element-info-left",top:f-g,left:m-d,isExternal:!1},{vertical:"element-info-top-inner",horizon:"element-info-right",top:u,left:b,isExternal:!1},{vertical:"element-info-top-inner",horizon:"element-info-left",top:u,left:m-d,isExternal:!1},{vertical:"element-info-top-inner",horizon:"element-info-left",top:Math.max(0,u),left:m-d,isExternal:!1,additionStyle:{transform:"translateY(".concat(Math.max(0,-u),"px)")}},{vertical:"element-info-top-inner",horizon:"element-info-right",top:Math.max(0,u),left:m-d,isExternal:!1,additionStyle:{transform:"translateY(".concat(Math.max(0,-u),"px)")}}],w=k=>k.left<0||k.left+d>a||k.top<0||k.top+g>s;for(const k of y){const D=document.documentElement.clientWidth;if(k.horizon.endsWith("left")){const V=b+d-D;V>0&&(k.additionStyle={transform:"translateX(-".concat(V,"px) ").concat(((_=k.additionStyle)==null?void 0:_.transform)||"")})}else{const V=d-m;V>0&&(k.additionStyle={transform:"translateX(".concat(V,"px) ").concat(((E=k.additionStyle)==null?void 0:E.transform)||"")})}if(!w(k))return k}return y[0]}),this.renderCover=e=>O(this,null,function*(){if(e===this.targetNode)return;this.targetNode=e;const{top:t,right:i,bottom:o,left:r}=e.getBoundingClientRect();if(this.position={top:t,right:i,bottom:o,left:r,border:{top:this.getDomPropertyValue(e,"border-top-width"),right:this.getDomPropertyValue(e,"border-right-width"),bottom:this.getDomPropertyValue(e,"border-bottom-width"),left:this.getDomPropertyValue(e,"border-left-width")},padding:{top:this.getDomPropertyValue(e,"padding-top"),right:this.getDomPropertyValue(e,"padding-right"),bottom:this.getDomPropertyValue(e,"padding-bottom"),left:this.getDomPropertyValue(e,"padding-left")},margin:{top:this.getDomPropertyValue(e,"margin-top"),right:this.getDomPropertyValue(e,"margin-right"),bottom:this.getDomPropertyValue(e,"margin-bottom"),left:this.getDomPropertyValue(e,"margin-left")}},this.elementTipStyle={vertical:"",horizon:"",visibility:"hidden"},this.addGlobalCursorStyle(),this.preUserSelect||(this.preUserSelect=getComputedStyle(document.body).userSelect),document.body.style.userSelect="none",this.element=this.getSourceInfo(e),this.show=!0,!this.showNodeTree){const{vertical:s,horizon:a,additionStyle:l}=yield this.calculateElementInfoPosition(e);this.elementTipStyle={vertical:s,horizon:a,visibility:"visible",additionStyle:l}}}),this.getAstroFilePath=e=>{var t;return(t=e.getAttribute)!=null&&t.call(e,pn)?"".concat(e.getAttribute(pn),":").concat(e.getAttribute("data-astro-source-loc"),":").concat(e.tagName.toLowerCase()):""},this.getSourceInfo=e=>{var a;let t=((a=e.getAttribute)==null?void 0:a.call(e,tt))||e[tt]||this.getAstroFilePath(e);if(!t)return null;const i=t.split(":"),o=i[i.length-1],r=Number(i[i.length-2]),s=Number(i[i.length-3]);return{name:o,path:i.slice(0,i.length-3).join(":"),line:s,column:r}},this.removeCover=e=>{e!==!0&&this.nodeTree||(this.targetNode=null,this.show=!1,this.removeGlobalCursorStyle(),document.body.style.userSelect=this.preUserSelect,this.preUserSelect="")},this.renderLayerPanel=(e,{x:t,y:i})=>{const o=document.documentElement.clientWidth,r=document.documentElement.clientHeight,s=o-t,a=r-i;let l={};s<t?(l.right=s+"px",t<Ze&&(l.transform="translateX(".concat(Ze-t,"px)"))):(l.left=t+"px",s<Ze&&(l.transform="translateX(-".concat(Ze-s,"px)"))),a<i?(l.bottom=a+"px",l.maxHeight=i-10+"px"):(l.top=i+"px",l.maxHeight=r-i-10+"px"),this.nodeTreePosition=l,this.nodeTree=e,this.showNodeTree=!0},this.removeLayerPanel=()=>{this.showNodeTree=!1,this.nodeTree=null,this.activeNode={}},this.addGlobalCursorStyle=()=>{if(!document.getElementById(hn)){const e=document.createElement("style");e.setAttribute("id",hn),e.innerText="body * {\n cursor: pointer !important;\n }",document.body.appendChild(e)}},this.removeGlobalCursorStyle=()=>{const e=document.getElementById(hn);e&&e.remove()},this.sendXHR=()=>{const e=encodeURIComponent(this.element.path),t="http://".concat(this.ip,":").concat(this.port,"/?file=").concat(e,"&line=").concat(this.element.line,"&column=").concat(this.element.column),i=new XMLHttpRequest;i.open("GET",t,!0),i.send(),i.addEventListener("error",()=>{this.sendType="img",this.sendImg()})},this.sendImg=()=>{const e=encodeURIComponent(this.element.path),t="http://".concat(this.ip,":").concat(this.port,"/?file=").concat(e,"&line=").concat(this.element.line,"&column=").concat(this.element.column);document.createElement("img").src=t},this.buildTargetUrl=()=>{let e=this.target;const{path:t,line:i,column:o}=this.element,r={"{file}":t,"{line}":i,"{column}":o};for(let s in r)e=e.replace(new RegExp(s,"g"),String(r[s]));return e},this.locateCode=()=>{this.sendType==="xhr"?this.sendXHR():this.sendImg()},this.copyCode=()=>{const e=function(t,i,o,r){let s="".concat(t,":").concat(i,":").concat(o);if(typeof r=="string")s=r.replace(Xn,t).replace(Zn,i.toString()).replace(Gn,o.toString());else if(r instanceof Array)return r.map(a=>a.replace(Xn,t).replace(Zn,i.toString()).replace(Gn,o.toString()));return[s]}(this.element.path,String(this.element.line),String(this.element.column),this.copy||!1);this.copyToClipboard(e[0])},this.targetCode=()=>{window.open(this.buildTargetUrl(),"_blank")},this.dispatchCustomEvent=e=>{window.dispatchEvent(new CustomEvent("code-inspector:trackCode",{detail:{action:e,element:this.element}}))},this.trackCode=()=>{this.features.forEach(e=>{e.checked()&&(e.fn(),this.dispatchCustomEvent(e.action))})},this.handleModeShortcut=e=>{var o,r;if(!this.isTracking(e))return;if(((o=e.code)==null?void 0:o.toLowerCase())==="key".concat(this.modeKey)||((r=e.key)==null?void 0:r.toLowerCase())===this.modeKey)return this.toggleSettingsModal(),e.preventDefault(),void e.stopPropagation();const t=e.code.toLowerCase(),i=e.keyCode;this.features.forEach(s=>{const a="digit"+s.key,l="numpad"+s.key,c=48+s.key;if((t===a||t===l||i===c)&&s.available()&&(s.action==="ai"||this.targetNode&&this.element.path))return s.fn(),e.preventDefault(),e.stopPropagation(),void this.dispatchCustomEvent(s.action)})},this.handleDrag=e=>{if(e.composedPath().includes(this)?this.hoverSwitch=!0:this.hoverSwitch=!1,this.dragging){this.moved=!0;const t=this.draggingTarget==="switch"?this.inspectorSwitchRef:this.nodeTreeRef;return t.style.left=this.mousePosition.baseX+(this.getMousePosition(e).x-this.mousePosition.moveX)+"px",t.style.top=this.mousePosition.baseY+(this.getMousePosition(e).y-this.mousePosition.moveY)+"px",void(this.draggingTarget&&(this.nodeTreePosition.left=t.style.left,this.nodeTreePosition.top=t.style.top))}},this.getValidNodeList=e=>{const t=[];for(const i of e)i.hasAttribute&&i.hasAttribute(pn)?t.push({node:i,isAstro:!0}):(i.hasAttribute&&i.hasAttribute(tt)||i[tt])&&t.push({node:i,isAstro:!1});return t},this.isSamePositionNode=(e,t)=>{const i=e.getBoundingClientRect(),o=t.getBoundingClientRect();return i.top===o.top&&i.left===o.left&&i.right===o.right&&i.bottom===o.bottom},this.handleMouseMove=e=>O(this,null,function*(){if((this.isTracking(e)&&!this.dragging||this.open)&&!this.hoverSwitch){document.hasFocus()||window.focus();const t=e.composedPath(),i=this.getValidNodeList(t);let o;for(const{node:r,isAstro:s}of i){if(s){o=r;break}o?this.isSamePositionNode(o,r)&&(o=r):o=r}o?this.renderCover(o):this.removeCover()}else this.removeCover()}),this.handleWheel=e=>{if(!this.targetNode||(e.stopPropagation(),e.preventDefault(),this.wheelThrottling))return;this.wheelThrottling=!0;const t=e.composedPath(),i=this.getValidNodeList(t);let o=i.findIndex(({node:s})=>s===this.targetNode);if(o===-1)return void(this.wheelThrottling=!1);const r=e.deltaX||e.deltaY;r>0?o--:r<0&&o++,o>=0&&o<i.length&&this.renderCover(i[o].node),setTimeout(()=>{this.wheelThrottling=!1},200)},this.handleMouseClick=e=>{(this.isTracking(e)||this.open)&&this.show&&(e.stopPropagation(),e.preventDefault(),this.trackCode(),this.removeCover(),this.autoToggle&&(this.open=!1)),e.composedPath().includes(this.nodeTreeRef)||this.removeLayerPanel()},this.handleContextMenu=e=>{if((this.isTracking(e)&&!this.dragging||this.open)&&!this.hoverSwitch){e.preventDefault();const t=e.composedPath(),i=this.generateNodeTree(t);this.renderLayerPanel(i,{x:e.clientX,y:e.clientY})}},this.generateNodeTree=e=>{let t,i=1,o=null;for(const r of e.reverse()){const s=this.getSourceInfo(r);if(!s)continue;const a=N(C({},s),{children:[],depth:i++,element:r});o?o.children.push(a):t=a,o=a}return t},this.handlePointerDown=e=>{let t=!1,i=e.target;for(;i;){if(i.disabled){t=!0;break}i=i.parentElement}t&&(this.isTracking(e)||this.open)&&this.show&&(e.stopPropagation(),e.preventDefault(),this.trackCode(),this.removeCover(),this.autoToggle&&(this.open=!1))},this.handleKeyUp=e=>{this.isTracking(e)||this.open||this.removeCover()},this.printTip=()=>{const e=navigator.userAgent.toLowerCase(),t=["windows","win32","wow32","win64","wow64"].some(a=>e.toUpperCase().match(a.toUpperCase()))?os:ns,i=this.hotKeys.split(",").map(a=>t[a.trim()]),o=[...i,this.modeKey.toUpperCase()],r=nr,s=a=>{const l=r.yellow(a[0]).bold();for(let c=1;c<a.length;c++)l.green(" + ").yellow(a[c]).bold();return l};r.blue("[code-inspector-plugin] click to expand the guide").groupCollapsed(()=>{s(i.concat("left click")).green(" to use active feature").log(),s(i.concat("right click")).green(" to open node tree").log(),s(i.concat("mouse wheel")).green(" to select parent node or child node").log(),s(o).green(" to change active feature").log(),this.features.forEach(a=>{s(i.concat(a.key.toString())).green(" to use ").yellow(a.label).bold().log()})})},this.getMousePosition=e=>{var t,i;return{x:e instanceof MouseEvent?e.pageX:(t=e.touches[0])==null?void 0:t.pageX,y:e instanceof MouseEvent?e.pageY:(i=e.touches[0])==null?void 0:i.pageY}},this.recordMousePosition=(e,t)=>{const i=t==="switch"?this.inspectorSwitchRef:this.nodeTreeRef;this.mousePosition={baseX:i.offsetLeft,baseY:i.offsetTop,moveX:this.getMousePosition(e).x,moveY:this.getMousePosition(e).y},this.dragging=!0,this.draggingTarget=t,e.preventDefault()},this.handleMouseUp=e=>{this.hoverSwitch=!1,this.dragging&&(this.dragging=!1,e instanceof TouchEvent&&this.draggingTarget==="switch"&&this.switch(e))},this.switch=e=>{this.moved||(this.open=!this.open,e.preventDefault(),e.stopPropagation()),this.moved=!1},this.handleClickTreeNode=e=>{this.element=e,this.trackCode(),this.removeLayerPanel()},this.handleMouseEnterNode=(e,t)=>O(this,null,function*(){const{x:i,y:o,width:r,height:s}=e.target.getBoundingClientRect();this.activeNode={width:r-16+"px",left:i+8+"px",visibility:"hidden",top:o-4+"px",bottom:"",content:"".concat(t.path,":").concat(t.line,":").concat(t.column),class:"tooltip-top"},this.renderCover(t.element),yield No();const{y:a}=this.nodeTreeTooltipRef.getBoundingClientRect();a<0&&(this.activeNode=N(C({},this.activeNode),{bottom:"",top:"".concat(o+s+4,"px"),class:"tooltip-bottom"})),this.activeNode=N(C({},this.activeNode),{visibility:"visible"})}),this.handleMouseLeaveNode=()=>{this.activeNode=N(C({},this.activeNode),{visibility:"hidden"}),this.removeCover(!0)},this.toggleSettingsModal=()=>{this.showSettingsModal=!this.showSettingsModal},this.closeSettingsModal=()=>{this.showSettingsModal=!1},this.clearAllActions=()=>{this.internalLocate=!1,this.internalCopy=!1,this.internalTarget=!1,this.internalAI=!1},this.toggleLocate=()=>{const e=!this.internalLocate;this.clearAllActions(),this.internalLocate=e},this.toggleCopy=()=>{const e=!this.internalCopy;this.clearAllActions(),this.internalCopy=e},this.toggleTarget=()=>{const e=!this.internalTarget;this.clearAllActions(),this.internalTarget=e},this.toggleAICode=()=>{const e=!this.internalAI;this.clearAllActions(),this.internalAI=e},this.openChatModal=()=>{this.element.path?this.chatContext={file:this.element.path,line:this.element.line,column:this.element.column,name:this.element.name}:this.chatContext=null;const e=this.targetNode;this.showChatModal=!0,this.chatModel||function(t,i){return O(this,null,function*(){try{const o=yield fetch("http://".concat(t,":").concat(i,"/ai/model"));return o.ok&&(yield o.json()).model||""}catch(o){return""}})}(this.ip,this.port).then(t=>{t&&this.isConnected&&(this.chatModel=t)}),document.body.style.overflow="hidden",this.updateComplete.then(()=>{requestAnimationFrame(()=>{var r;const t=(r=this.shadowRoot)==null?void 0:r.querySelector("#chat-modal-floating");if(t)if(e)this.chatPositionCleanup=(o=t,(i=e)&&o&&O(this,null,function*(){const s=yield Tr(i,o,{strategy:"fixed",placement:"right-start",middleware:[$r(pe),Cr({fallbackPlacements:Zr.slice(1),padding:pe}),Sr({padding:pe})]}),{x:a,y:l}=s,c=document.documentElement.clientWidth,h=document.documentElement.clientHeight,p=o.getBoundingClientRect(),d=p.width,g=p.height,u=i.getBoundingClientRect(),m=a<pe||l<pe||a+d>c-pe||l+g>h-pe,f=a<u.right&&a+d>u.left&&l<u.bottom&&l+g>u.top;if(m||f){const b=(c-d)/2,y=(h-g)/2;Object.assign(o.style,{left:"".concat(Math.max(pe,b),"px"),top:"".concat(Math.max(pe,y),"px")}),o.classList.add("chat-modal-centered")}else Object.assign(o.style,{left:"".concat(a,"px"),top:"".concat(l,"px")}),o.classList.remove("chat-modal-centered")}),null);else{const s=document.documentElement.clientWidth,a=document.documentElement.clientHeight,l=t.getBoundingClientRect(),c=(s-l.width)/2,h=(a-l.height)/2;t.style.left="".concat(Math.max(16,c),"px"),t.style.top="".concat(Math.max(16,h),"px"),t.classList.add("chat-modal-centered")}var i,o})})},this.closeChatModal=()=>{this.chatPositionCleanup&&(this.chatPositionCleanup(),this.chatPositionCleanup=null),this.showChatModal=!1,document.body.style.overflow=""},this.clearChatMessages=()=>{this.chatMessages=[],this.chatSessionId=null,this.turnStatus="idle",this.turnDuration=0},this.toggleTheme=()=>{this.chatTheme=this.chatTheme==="dark"?"light":"dark",this.chatTheme==="light"?this.classList.add("chat-theme-light"):this.classList.remove("chat-theme-light")},this.handleChatInput=e=>{this.chatInput=e.target.value},this.handleChatKeyDown=e=>{e.key!=="Enter"||e.shiftKey||(e.preventDefault(),this.sendChatMessage())},this.scrollPending=!1,this.scrollChatToBottom=()=>{this.scrollPending||(this.scrollPending=!0,requestAnimationFrame(()=>{var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector(".chat-modal-content");e&&(e.scrollTop=e.scrollHeight),this.scrollPending=!1}))},this.startTurnTimer=()=>{this.turnStartTime=Date.now(),this.turnDuration=0,this.turnStatus="running",this.turnTimerInterval=setInterval(()=>{this.turnDuration=Math.floor((Date.now()-this.turnStartTime)/1e3)},1e3)},this.stopTurnTimer=e=>{this.turnTimerInterval&&(clearInterval(this.turnTimerInterval),this.turnTimerInterval=null),this.turnDuration=Math.floor((Date.now()-this.turnStartTime)/1e3),this.turnStatus=e},this.interruptChat=()=>{this.chatAbortController&&(this.chatAbortController.abort(),this.chatAbortController=null),this.stopTurnTimer("interrupt"),this.chatLoading=!1},this.handleChatDragStart=e=>{var i;if(e.button!==0)return;const t=(i=this.shadowRoot)==null?void 0:i.querySelector("#chat-modal-floating");t&&(this.chatPositionCleanup&&(this.chatPositionCleanup(),this.chatPositionCleanup=null),this.isDragging=!0,this.wasDragging=!0,this.dragStartX=e.clientX,this.dragStartY=e.clientY,this.modalStartX=t.offsetLeft,this.modalStartY=t.offsetTop,e.preventDefault())},this.handleChatDragMove=e=>{var d;if(!this.isDragging)return;const t=(d=this.shadowRoot)==null?void 0:d.querySelector("#chat-modal-floating");if(!t)return;const i=e.clientX-this.dragStartX,o=e.clientY-this.dragStartY,r=this.modalStartX+i,s=this.modalStartY+o,a=document.documentElement.clientWidth,l=document.documentElement.clientHeight,c=t.getBoundingClientRect(),h=Math.max(0,Math.min(r,a-c.width)),p=Math.max(0,Math.min(s,l-c.height));t.style.left="".concat(h,"px"),t.style.top="".concat(p,"px")},this.handleChatDragEnd=()=>{this.isDragging=!1,setTimeout(()=>{this.wasDragging=!1},100)},this.handleOverlayClick=()=>{this.wasDragging||this.closeChatModal()},this.sendChatMessage=()=>O(this,null,function*(){if(!this.chatInput.trim()||this.chatLoading)return;const e=this.chatInput.trim();this.chatInput="",this.chatMessages=[...this.chatMessages,{role:"user",content:e}],this.chatLoading=!0,this.scrollChatToBottom(),this.startTurnTimer(),this.chatAbortController=new AbortController,this.chatMessages=[...this.chatMessages,{role:"assistant",content:"",blocks:[]}];let t="";const i=[],o=new Map,r=()=>{this.chatMessages=[...this.chatMessages.slice(0,-1),{role:"assistant",content:t,blocks:[...i]}],this.scrollChatToBottom()};let s=null;const a=()=>{s&&(clearTimeout(s),s=null),r()};try{yield function(l,c,h,p,d,g,u,m){return O(this,null,function*(){var w,_,E,k;const f=yield fetch("http://".concat(l,":").concat(c,"/ai"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(C({message:h,context:p,history:d},m&&{sessionId:m})),signal:u});if(!f.ok)throw new Error("Chat request failed");const b=(w=f.body)==null?void 0:w.getReader(),y=new TextDecoder;if(b){let D="";for(;;){const{done:V,value:ee}=yield b.read();if(V)break;D+=y.decode(ee,{stream:!0});const se=D.split("\n");D=se.pop()||"";for(const te of se)if(te.startsWith("data: ")){const Y=te.slice(6);if(Y==="[DONE]")continue;try{const L=JSON.parse(Y);switch(L.type){case"text":default:L.content&&g.onText(L.content);break;case"tool_start":g.onToolStart(L.toolId,L.toolName,L.index);break;case"tool_input":g.onToolInput(L.index,L.input);break;case"tool_result":g.onToolResult(L.toolUseId,L.content,L.isError);break;case"session":L.sessionId&&((_=g.onSessionId)==null||_.call(g,L.sessionId));break;case"info":L.cwd&&((E=g.onProjectRoot)==null||E.call(g,L.cwd)),L.model&&((k=g.onModel)==null||k.call(g,L.model))}L.error&&g.onError(new Error(L.error))}catch(L){}}}}})}(this.ip,this.port,e,this.chatContext,this.chatMessages.slice(0,-1),{onText:l=>{t+=l;const c=i[i.length-1];c&&c.type==="text"?c.content=(c.content||"")+l:i.push({type:"text",content:l}),s||(s=setTimeout(()=>{s=null,r()},50))},onToolStart:(l,c,h)=>{const p={id:l,name:c,isComplete:!1},d=i.length;i.push({type:"tool",tool:p}),o.set(l,d),a()},onToolInput:(l,c)=>{for(let h=i.length-1;h>=0;h--)if(i[h].type==="tool"&&i[h].tool&&!i[h].tool.isComplete){i[h].tool.input=c,a();break}},onToolResult:(l,c,h)=>{var d;const p=o.get(l);p!==void 0&&((d=i[p])!=null&&d.tool)&&(i[p].tool.result=c,i[p].tool.isError=h,i[p].tool.isComplete=!0,a())},onError:l=>{console.error("Chat error:",l)},onSessionId:l=>{this.chatSessionId=l},onProjectRoot:l=>{Xe=l},onModel:l=>{this.chatModel=l}},this.chatAbortController.signal,this.chatSessionId),a(),this.stopTurnTimer("done")}catch(l){l instanceof Error&&l.name==="AbortError"||(this.chatMessages=this.chatMessages.slice(0,-1),this.showNotification("Failed to send message","error"),this.stopTurnTimer("interrupt"))}finally{this.chatLoading=!1,this.chatAbortController=null}}),this.renderNodeTree=e=>S(vi||(vi=$(['\n <div\n class="inspector-layer"\n style="padding-left: ','px;"\n @mouseenter="','"\n @mouseleave="','"\n @click="','"\n >\n &lt;',"&gt;\n </div>\n ","\n "])),8*e.depth,t=>O(this,null,function*(){return yield this.handleMouseEnterNode(t,e)}),this.handleMouseLeaveNode,()=>this.handleClickTreeNode(e),e.name,e.children.map(t=>this.renderNodeTree(t)))}showNotification(e,t="success"){const i=document.createElement("div");i.className="code-inspector-notification code-inspector-notification-".concat(t),i.textContent=e,document.body.appendChild(i),requestAnimationFrame(()=>{i.classList.add("code-inspector-notification-show")}),setTimeout(()=>{i.classList.remove("code-inspector-notification-show"),setTimeout(()=>{document.body.removeChild(i)},300)},2e3)}copyToClipboard(e){var t;try{typeof((t=navigator==null?void 0:navigator.clipboard)==null?void 0:t.writeText)=="function"?navigator.clipboard.writeText(e).then(()=>{this.showNotification("✓ Copied to clipboard")}).catch(()=>{this.fallbackCopy(e)}):this.fallbackCopy(e)}catch(i){this.fallbackCopy(e)}}fallbackCopy(e){try{const t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select();const i=document.execCommand("copy");document.body.removeChild(t),i?this.showNotification("✓ Copied to clipboard"):this.showNotification("✗ Copy failed","error")}catch(t){this.showNotification("✗ Copy failed","error")}}attachEventListeners(){this.eventListeners.forEach(({event:e,handler:t,options:i})=>{window.addEventListener(e,t,i)})}detachEventListeners(){this.eventListeners.forEach(({event:e,handler:t,options:i})=>{window.removeEventListener(e,t,i)})}firstUpdated(){var i,o,r;let e=!1;if(this.defaultAction)switch(this.defaultAction){case"ai":this.ai&&(this.internalAI=!0,e=!0);break;case"target":this.target&&(this.internalTarget=!0,e=!0);break;case"copy":this.copy&&(this.internalCopy=!0,e=!0);break;case"locate":this.locate&&(this.internalLocate=!0,e=!0)}e||(this.locate?this.internalLocate=!0:this.copy?this.internalCopy=!0:this.target?this.internalTarget=!0:this.ai&&(this.internalAI=!0));const t=(r=(o=(i=window.matchMedia)==null?void 0:i.call(window,"(prefers-color-scheme: dark)"))==null?void 0:o.matches)!=null?r:!1;this.chatTheme=t?"dark":"light",this.chatTheme==="light"&&this.classList.add("chat-theme-light"),this.eventListeners=[{event:"mousemove",handler:this.handleMouseMove,options:!0},{event:"touchmove",handler:this.handleMouseMove,options:!0},{event:"mousemove",handler:this.handleDrag,options:!0},{event:"touchmove",handler:this.handleDrag,options:!0},{event:"click",handler:this.handleMouseClick,options:!0},{event:"pointerdown",handler:this.handlePointerDown,options:!0},{event:"keyup",handler:this.handleKeyUp,options:!0},{event:"keydown",handler:this.handleModeShortcut,options:!0},{event:"mouseleave",handler:this.removeCover,options:!0},{event:"mouseup",handler:this.handleMouseUp,options:!0},{event:"touchend",handler:this.handleMouseUp,options:!0},{event:"contextmenu",handler:this.handleContextMenu,options:!0},{event:"wheel",handler:this.handleWheel,options:{passive:!1}}],this.hideConsole||this.printTip(),this.attachEventListeners()}disconnectedCallback(){this.detachEventListeners()}render(){const e={display:this.show?"block":"none",top:this.position.top-this.position.margin.top+"px",left:this.position.left-this.position.margin.left+"px",height:"".concat(this.position.bottom-this.position.top+this.position.margin.bottom+this.position.margin.top,"px"),width:"".concat(this.position.right-this.position.left+this.position.margin.right+this.position.margin.left,"px")},t={borderTopWidth:"".concat(this.position.margin.top,"px"),borderRightWidth:"".concat(this.position.margin.right,"px"),borderBottomWidth:"".concat(this.position.margin.bottom,"px"),borderLeftWidth:"".concat(this.position.margin.left,"px")},i={borderTopWidth:"".concat(this.position.border.top,"px"),borderRightWidth:"".concat(this.position.border.right,"px"),borderBottomWidth:"".concat(this.position.border.bottom,"px"),borderLeftWidth:"".concat(this.position.border.left,"px")},o={borderTopWidth:"".concat(this.position.padding.top,"px"),borderRightWidth:"".concat(this.position.padding.right,"px"),borderBottomWidth:"".concat(this.position.padding.bottom,"px"),borderLeftWidth:"".concat(this.position.padding.left,"px")},r=C({display:this.showNodeTree?"flex":"none"},this.nodeTreePosition),s={visibility:this.activeNode.visibility,maxWidth:this.activeNode.width,top:this.activeNode.top,left:this.activeNode.left,bottom:this.activeNode.bottom,display:this.showNodeTree?"":"none"};return S(Ti||(Ti=$(['\n <div\n class="code-inspector-container"\n id="code-inspector-container"\n style=','\n >\n <div class="margin-overlay" style=','>\n <div class="border-overlay" style=','>\n <div class="padding-overlay" style=','>\n <div class="content-overlay"></div>\n </div>\n </div>\n </div>\n <div\n id="element-info"\n class="element-info '," "," ",'"\n style=','\n >\n <div class="element-info-content">\n <div class="name-line">\n <div class="element-name">\n <span class="element-title">&lt;','&gt;</span>\n </div>\n </div>\n <div class="path-line">\n ',":",":",'\n </div>\n </div>\n </div>\n </div>\n <div\n id="inspector-switch"\n class="inspector-switch '," ",'"\n style=','\n @mousedown="','"\n @touchstart="','"\n @click="','"\n >\n ','\n </div>\n <div\n id="inspector-node-tree"\n class="element-info-content"\n style=','\n >\n <div\n class="inspector-layer-title"\n @mousedown="','"\n @touchstart="','"\n >\n <div>🔍️ Click node to locate</div>\n ','\n </div>\n\n <div\n class="node-tree-list"\n style="','"\n >\n ','\n <div style="height: 8px"></div>\n </div>\n </div>\n\n <!-- 设置弹窗 -->\n ',"\n\n <!-- 聊天框 -->\n ",'\n\n <div\n id="node-tree-tooltip"\n class="','"\n style=',"\n >\n ","\n </div>\n "])),le(e),le(t),le(i),le(o),this.elementTipStyle.vertical,this.elementTipStyle.horizon,this.elementTipStyle.visibility,le(C({width:Ze+"px",maxWidth:"100vw"},this.elementTipStyle.additionStyle)),this.element.name,this.element.path,this.element.line,this.element.column,this.open?"active-inspector-switch":"",this.moved?"move-inspector-switch":"",le({display:this.showSwitch?"flex":"none"}),a=>this.recordMousePosition(a,"switch"),a=>this.recordMousePosition(a,"switch"),this.switch,this.open?S(wi||(wi=$(['\n <svg\n t="1677801709811"\n class="icon"\n viewBox="0 0 1024 1024"\n version="1.1"\n xmlns="http://www.w3.org/2000/svg"\n p-id="1110"\n xmlns:xlink="http://www.w3.org/1999/xlink"\n width="1em"\n height="1em"\n >\n <path\n d="M546.56 704H128c-19.2 0-32-12.8-32-32V256h704v194.56c10.928 1.552 21.648 3.76 32 6.832V128c0-35.2-28.8-64-64-64H128C92.8 64 64 92.8 64 128v544c0 35.2 28.8 64 64 64h425.392a221.936 221.936 0 0 1-6.848-32zM96 128c0-19.2 12.8-32 32-32h640c19.2 0 32 12.8 32 32v96H96V128z"\n fill="#34495E"\n p-id="1111"\n ></path>\n <path\n d="M416 160m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z"\n fill="#00B42A"\n p-id="1112"\n ></path>\n <path\n d="M288 160m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z"\n fill="#F7BA1E"\n p-id="1113"\n ></path>\n <path\n d="M160 160m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z"\n fill="#F53F3F"\n p-id="1114"\n ></path>\n <path\n d="M382.848 658.928l99.376-370.88 30.912 8.272-99.36 370.88zM318.368 319.2L160 477.6l158.4 158.4 22.64-22.624-135.792-135.776 135.776-135.776zM768 480c-13.088 0-25.888 1.344-38.24 3.84l6.24-6.24-158.4-158.4-22.64 22.624 135.792 135.776-135.776 135.776 22.656 22.624 2.208-2.224a190.768 190.768 0 0 0 30.928 148.08l-116.672 116.656c-10.24 10.24-10.24 26.896 0 37.136l27.76 27.76c5.12 5.12 11.84 7.68 18.56 7.68s13.456-2.56 18.56-7.68l120.992-120.96A190.56 190.56 0 0 0 768 864c105.872 0 192-86.128 192-192s-86.128-192-192-192z m-159.12 193.136c0-88.224 71.776-160 160-160 10.656 0 21.04 1.152 31.12 3.152V672c0 19.2-12.8 32-32 32h-156a160.144 160.144 0 0 1-3.12-30.864z m-68.464 263.584l-19.632-19.632 110.336-110.336c6.464 6.656 13.392 12.848 20.752 18.528l-111.456 111.44z m228.464-103.584c-65.92 0-122.576-40.096-147.056-97.136H768c35.2 0 64-28.8 64-64v-145.776c56.896 24.544 96.88 81.12 96.88 146.912 0 88.224-71.776 160-160 160z"\n fill="#006AFF"\n p-id="1115"\n ></path>\n <path\n d="M864.576 672c0 52.928-43.072 96-96 96v32a128 128 0 0 0 128-128h-32z"\n fill="#34495E"\n p-id="1116"\n ></path>\n </svg>\n ']))):S(ki||(ki=$(['<svg\n t="1677801709811"\n class="icon"\n viewBox="0 0 1024 1024"\n version="1.1"\n xmlns="http://www.w3.org/2000/svg"\n p-id="1110"\n xmlns:xlink="http://www.w3.org/1999/xlink"\n width="1em"\n height="1em"\n >\n <path\n d="M546.56 704H128c-19.2 0-32-12.8-32-32V256h704v194.56c10.928 1.552 21.648 3.76 32 6.832V128c0-35.2-28.8-64-64-64H128C92.8 64 64 92.8 64 128v544c0 35.2 28.8 64 64 64h425.392a221.936 221.936 0 0 1-6.848-32zM96 128c0-19.2 12.8-32 32-32h640c19.2 0 32 12.8 32 32v96H96V128z"\n fill="currentColor"\n p-id="1111"\n ></path>\n <path\n d="M416 160m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z"\n fill="currentColor"\n p-id="1112"\n ></path>\n <path\n d="M288 160m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z"\n fill="currentColor"\n p-id="1113"\n ></path>\n <path\n d="M160 160m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z"\n fill="currentColor"\n p-id="1114"\n ></path>\n <path\n d="M382.848 658.928l99.376-370.88 30.912 8.272-99.36 370.88zM318.368 319.2L160 477.6l158.4 158.4 22.64-22.624-135.792-135.776 135.776-135.776zM768 480c-13.088 0-25.888 1.344-38.24 3.84l6.24-6.24-158.4-158.4-22.64 22.624 135.792 135.776-135.776 135.776 22.656 22.624 2.208-2.224a190.768 190.768 0 0 0 30.928 148.08l-116.672 116.656c-10.24 10.24-10.24 26.896 0 37.136l27.76 27.76c5.12 5.12 11.84 7.68 18.56 7.68s13.456-2.56 18.56-7.68l120.992-120.96A190.56 190.56 0 0 0 768 864c105.872 0 192-86.128 192-192s-86.128-192-192-192z m-159.12 193.136c0-88.224 71.776-160 160-160 10.656 0 21.04 1.152 31.12 3.152V672c0 19.2-12.8 32-32 32h-156a160.144 160.144 0 0 1-3.12-30.864z m-68.464 263.584l-19.632-19.632 110.336-110.336c6.464 6.656 13.392 12.848 20.752 18.528l-111.456 111.44z m228.464-103.584c-65.92 0-122.576-40.096-147.056-97.136H768c35.2 0 64-28.8 64-64v-145.776c56.896 24.544 96.88 81.12 96.88 146.912 0 88.224-71.776 160-160 160z"\n fill="currentColor"\n p-id="1115"\n ></path>\n <path\n d="M864.576 672c0 52.928-43.072 96-96 96v32a128 128 0 0 0 128-128h-32z"\n fill="currentColor"\n p-id="1116"\n ></path>\n </svg>']))),le(r),a=>this.recordMousePosition(a,"nodeTree"),a=>this.recordMousePosition(a,"nodeTree"),S($i||($i=$(['<svg\n xmlns="http://www.w3.org/2000/svg"\n width="16"\n height="16"\n viewBox="0 0 24 24"\n fill="none"\n stroke="currentColor"\n stroke-width="2"\n stroke-linecap="round"\n stroke-linejoin="round"\n class="close-icon"\n @click="','"\n >\n <path d="M18 6 6 18" />\n <path d="m6 6 12 12" />\n </svg>'])),this.removeLayerPanel),le({pointerEvents:this.dragging?"none":""}),this.nodeTree?this.renderNodeTree(this.nodeTree):"",this.showSettingsModal?S(Ci||(Ci=$(['\n <div\n class="settings-modal-overlay"\n @click="','"\n >\n <div\n class="settings-modal"\n @click="','"\n >\n <div class="settings-modal-header">\n <h3 class="settings-modal-title">Mode Settings</h3>\n <button\n class="settings-modal-close"\n @click="','"\n >\n ×\n </button>\n </div>\n <div class="settings-modal-content">\n ',"\n </div>\n </div>\n </div>\n "])),this.closeSettingsModal,a=>a.stopPropagation(),this.closeSettingsModal,this.features.map(a=>S(Si||(Si=$(['\n <div class="settings-item">\n <label class="settings-label">\n <span class="settings-label-text"\n >','</span\n >\n <span class="settings-label-desc"\n >','</span\n >\n </label>\n <label class="settings-switch">\n <input\n type="checkbox"\n .checked="','"\n @change="','"\n />\n <span class="settings-slider"></span>\n </label>\n </div>\n '])),a.label,a.description,a.checked(),a.onChange))):"",Qr({showChatModal:this.showChatModal,chatMessages:this.chatMessages,chatInput:this.chatInput,chatLoading:this.chatLoading,chatContext:this.chatContext,currentTools:this.currentTools,chatTheme:this.chatTheme,turnStatus:this.turnStatus,turnDuration:this.turnDuration,isDragging:this.isDragging,chatModel:this.chatModel},{closeChatModal:this.closeChatModal,clearChatMessages:this.clearChatMessages,handleChatInput:this.handleChatInput,handleChatKeyDown:this.handleChatKeyDown,sendChatMessage:this.sendChatMessage,toggleTheme:this.toggleTheme,interruptChat:this.interruptChat,handleDragStart:this.handleChatDragStart,handleDragMove:this.handleChatDragMove,handleDragEnd:this.handleChatDragEnd,handleOverlayClick:this.handleOverlayClick}),this.activeNode.class,le(s),this.activeNode.content)}}if(x.styles=[Qe(Ai||(Ai=$(["\n .code-inspector-container {\n position: fixed;\n pointer-events: none;\n z-index: 9999999999999;\n font-family: 'PingFang SC';\n .margin-overlay {\n position: absolute;\n inset: 0;\n border-style: solid;\n border-color: rgba(255, 155, 0, 0.3);\n .border-overlay {\n position: absolute;\n inset: 0;\n border-style: solid;\n border-color: rgba(255, 200, 50, 0.3);\n .padding-overlay {\n position: absolute;\n inset: 0;\n border-style: solid;\n border-color: rgba(77, 200, 0, 0.3);\n .content-overlay {\n position: absolute;\n inset: 0;\n background: rgba(120, 170, 210, 0.7);\n }\n }\n }\n }\n }\n .element-info {\n position: absolute;\n }\n .element-info.hidden {\n visibility: hidden;\n }\n .element-info-content {\n max-width: 100%;\n font-size: 12px;\n color: #000;\n background-color: #fff;\n word-break: break-all;\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);\n box-sizing: border-box;\n padding: 4px 8px;\n border-radius: 4px;\n }\n .element-info-top {\n top: -4px;\n transform: translateY(-100%);\n }\n .element-info-bottom {\n top: calc(100% + 4px);\n }\n .element-info-top-inner {\n top: 4px;\n }\n .element-info-bottom-inner {\n bottom: 4px;\n }\n .element-info-left {\n left: 0;\n display: flex;\n justify-content: flex-start;\n }\n .element-info-right {\n right: 0;\n display: flex;\n justify-content: flex-end;\n }\n .element-name .element-title {\n color: coral;\n font-weight: bold;\n }\n .path-line {\n color: #333;\n line-height: 12px;\n margin-top: 4px;\n }\n .inspector-switch {\n position: fixed;\n z-index: 9999999999999;\n top: 50%;\n right: 24px;\n font-size: 22px;\n transform: translateY(-100%);\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: rgba(255, 255, 255, 0.8);\n color: #555;\n height: 32px;\n width: 32px;\n border-radius: 50%;\n box-shadow: 0px 1px 2px -2px rgba(0, 0, 0, 0.2),\n 0px 3px 6px 0px rgba(0, 0, 0, 0.16),\n 0px 5px 12px 4px rgba(0, 0, 0, 0.12);\n cursor: pointer;\n }\n .active-inspector-switch {\n color: #006aff;\n }\n .move-inspector-switch {\n cursor: move;\n }\n #inspector-node-tree {\n position: fixed;\n user-select: none;\n z-index: 9999999999999999;\n min-width: 300px;\n max-width: min(max(30vw, 300px), 400px);\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,\n 'Liberation Mono', 'Courier New', monospace;\n display: flex;\n flex-direction: column;\n padding: 0;\n\n .inspector-layer-title {\n border-bottom: 1px solid #eee;\n padding: 8px 8px 4px;\n margin-bottom: 8px;\n flex-shrink: 0;\n display: flex;\n justify-content: space-between;\n align-items: center;\n cursor: move;\n user-select: none;\n &:hover {\n background: rgba(0, 106, 255, 0.1);\n }\n }\n\n .node-tree-list {\n flex: 1;\n overflow-y: auto;\n min-height: 0;\n }\n\n .inspector-layer {\n cursor: pointer;\n position: relative;\n padding-right: 8px;\n &:hover {\n background: #fdf4bf;\n }\n }\n\n .path-line {\n font-size: 9px;\n color: #777;\n margin-top: 1px;\n font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;\n }\n }\n\n #node-tree-tooltip {\n position: fixed;\n box-sizing: border-box;\n z-index: 999999999999999999;\n background: rgba(0, 0, 0, 0.6);\n color: white;\n padding: 2px 6px;\n border-radius: 4px;\n font-size: 12px;\n white-space: wrap;\n pointer-events: none;\n word-break: break-all;\n }\n .tooltip-top {\n transform: translateY(-100%);\n }\n .close-icon {\n cursor: pointer;\n }\n\n /* 设置弹窗样式 */\n .settings-modal-overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 99999999999999999;\n animation: fadeIn 0.2s ease-out;\n }\n\n .settings-modal {\n background: #fff;\n border-radius: 12px;\n box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);\n width: 90%;\n max-width: 480px;\n max-height: 90vh;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n animation: slideUp 0.3s ease-out;\n }\n\n .settings-modal-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 20px 24px;\n border-bottom: 1px solid #eee;\n }\n\n .settings-modal-title {\n margin: 0;\n font-size: 18px;\n font-weight: 600;\n color: #333;\n }\n\n .settings-modal-close {\n background: none;\n border: none;\n font-size: 28px;\n color: #999;\n cursor: pointer;\n padding: 0;\n width: 32px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 4px;\n transition: all 0.2s;\n }\n\n .settings-modal-close:hover {\n background: #f5f5f5;\n color: #333;\n }\n\n .settings-modal-content {\n padding: 16px 24px;\n overflow-y: auto;\n flex: 1;\n }\n\n .settings-item {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 16px 0;\n border-bottom: 1px solid #f5f5f5;\n }\n\n .settings-item:last-child {\n border-bottom: none;\n }\n\n .settings-label {\n display: flex;\n flex-direction: column;\n flex: 1;\n margin-right: 16px;\n cursor: pointer;\n }\n\n .settings-label-text {\n font-size: 15px;\n font-weight: 500;\n color: #333;\n margin-bottom: 4px;\n }\n\n .settings-label-desc {\n font-size: 13px;\n color: #999;\n }\n\n .settings-switch {\n position: relative;\n display: inline-block;\n width: 44px;\n height: 24px;\n flex-shrink: 0;\n }\n\n .settings-switch input {\n opacity: 0;\n width: 0;\n height: 0;\n }\n\n .settings-slider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: #ccc;\n transition: 0.3s;\n border-radius: 24px;\n }\n\n .settings-slider:before {\n position: absolute;\n content: '';\n height: 18px;\n width: 18px;\n left: 3px;\n bottom: 3px;\n background-color: white;\n transition: 0.3s;\n border-radius: 50%;\n }\n\n .settings-switch input:checked + .settings-slider {\n background-color: #006aff;\n }\n\n .settings-switch input:checked + .settings-slider:before {\n transform: translateX(20px);\n }\n\n .settings-switch input:focus + .settings-slider {\n box-shadow: 0 0 1px #006aff;\n }\n\n @keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n @keyframes slideUp {\n from {\n transform: translateY(20px);\n opacity: 0;\n }\n to {\n transform: translateY(0);\n opacity: 1;\n }\n }\n "]))),Jr],v([F()],x.prototype,"hotKeys",2),v([F()],x.prototype,"port",2),v([F()],x.prototype,"showSwitch",2),v([F()],x.prototype,"autoToggle",2),v([F()],x.prototype,"hideConsole",2),v([F()],x.prototype,"locate",2),v([F()],x.prototype,"copy",2),v([F()],x.prototype,"target",2),v([F()],x.prototype,"targetNode",2),v([F()],x.prototype,"ip",2),v([F()],x.prototype,"ai",2),v([F()],x.prototype,"modeKey",2),v([F()],x.prototype,"defaultAction",2),v([T()],x.prototype,"position",2),v([T()],x.prototype,"element",2),v([T()],x.prototype,"elementTipStyle",2),v([T()],x.prototype,"show",2),v([T()],x.prototype,"showNodeTree",2),v([T()],x.prototype,"nodeTreePosition",2),v([T()],x.prototype,"nodeTree",2),v([T()],x.prototype,"dragging",2),v([T()],x.prototype,"mousePosition",2),v([T()],x.prototype,"draggingTarget",2),v([T()],x.prototype,"open",2),v([T()],x.prototype,"moved",2),v([T()],x.prototype,"hoverSwitch",2),v([T()],x.prototype,"preUserSelect",2),v([T()],x.prototype,"sendType",2),v([T()],x.prototype,"activeNode",2),v([T()],x.prototype,"showSettingsModal",2),v([T()],x.prototype,"internalLocate",2),v([T()],x.prototype,"internalCopy",2),v([T()],x.prototype,"internalTarget",2),v([T()],x.prototype,"internalAI",2),v([T()],x.prototype,"showChatModal",2),v([T()],x.prototype,"chatMessages",2),v([T()],x.prototype,"chatInput",2),v([T()],x.prototype,"chatLoading",2),v([T()],x.prototype,"chatContext",2),v([T()],x.prototype,"currentTools",2),v([T()],x.prototype,"chatTheme",2),v([T()],x.prototype,"turnStatus",2),v([T()],x.prototype,"turnDuration",2),v([T()],x.prototype,"chatModel",2),v([T()],x.prototype,"isDragging",2),v([Me("#inspector-switch")],x.prototype,"inspectorSwitchRef",2),v([Me("#code-inspector-container")],x.prototype,"codeInspectorContainerRef",2),v([Me("#element-info")],x.prototype,"elementInfoRef",2),v([Me("#inspector-node-tree")],x.prototype,"nodeTreeRef",2),v([Me(".inspector-layer-title")],x.prototype,"nodeTreeTitleRef",2),v([Me("#node-tree-tooltip")],x.prototype,"nodeTreeTooltipRef",2),!document.getElementById("code-inspector-notification-styles")){const n=document.createElement("style");n.id="code-inspector-notification-styles",n.textContent="\n .code-inspector-notification {\n position: fixed;\n top: 20px;\n right: 20px;\n z-index: 99999999999999999;\n padding: 12px 16px;\n border-radius: 8px;\n font-size: 14px;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;\n font-weight: 500;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n opacity: 0;\n transform: translateY(-10px);\n transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n pointer-events: none;\n }\n .code-inspector-notification-success {\n background: hsl(143, 85%, 96%);\n color: hsl(140, 100%, 27%);\n border: 1px solid hsl(145, 92%, 91%);\n }\n .code-inspector-notification-error {\n background: hsl(0, 93%, 94%);\n color: hsl(0, 84%, 40%);\n border: 1px solid hsl(0, 93%, 94%);\n }\n .code-inspector-notification-show {\n opacity: 1;\n transform: translateY(0);\n }\n ",document.head.appendChild(n)}return customElements.get("code-inspector-component")||customElements.define("code-inspector-component",x),R.CodeInspectorComponent=x,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"}),R}({});