llama.cpp/examples/server/public/index.html

390 lines
419 KiB
HTML
Raw Normal View History

<!--
This is a single file build of the frontend.
It is automatically generated by the build process.
Do not edit this file directly.
To make changes, refer to the "Web UI" section in the README.
-->
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta name="color-scheme" content="light dark">
<title>🦙 llama.cpp - chat</title>
<script type="module" crossorigin>var nc=e=>{throw TypeError(e)};var Hi=(e,t,u)=>t.has(e)||nc("Cannot "+u);var qt=(e,t,u)=>(Hi(e,t,"read from private field"),u?u.call(e):t.get(e)),Ru=(e,t,u)=>t.has(e)?nc("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,u),hn=(e,t,u,n)=>(Hi(e,t,"write to private field"),n?n.call(e,u):t.set(e,u),u),Ui=(e,t,u)=>(Hi(e,t,"access private method"),u);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))n(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function u(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(r){if(r.ep)return;r.ep=!0;const i=u(r);fetch(r.href,i)}})();/**
* @vue/shared v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**//*! #__NO_SIDE_EFFECTS__ */function Be(e){const t=Object.create(null);for(const u of e.split(","))t[u]=1;return u=>u in t}const ee={},Vu=[],we=()=>{},gn=()=>!1,Tu=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),zs=e=>e.startsWith("onUpdate:"),te=Object.assign,Ks=(e,t)=>{const u=e.indexOf(t);u>-1&&e.splice(u,1)},ed=Object.prototype.hasOwnProperty,re=(e,t)=>ed.call(e,t),$=Array.isArray,$u=e=>sn(e)==="[object Map]",wu=e=>sn(e)==="[object Set]",rc=e=>sn(e)==="[object Date]",td=e=>sn(e)==="[object RegExp]",W=e=>typeof e=="function",Z=e=>typeof e=="string",Ze=e=>typeof e=="symbol",oe=e=>e!==null&&typeof e=="object",Ws=e=>(oe(e)||W(e))&&W(e.then)&&W(e.catch),Fl=Object.prototype.toString,sn=e=>Fl.call(e),ud=e=>sn(e).slice(8,-1),li=e=>sn(e)==="[object Object]",Gs=e=>Z(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,uu=Be(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),nd=Be("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),ai=e=>{const t=Object.create(null);return u=>t[u]||(t[u]=e(u))},rd=/-(\w)/g,de=ai(e=>e.replace(rd,(t,u)=>u?u.toUpperCase():"")),id=/\B([A-Z])/g,qe=ai(e=>e.replace(id,"-$1").toLowerCase()),Fu=ai(e=>e.charAt(0).toUpperCase()+e.slice(1)),Hu=ai(e=>e?`on${Fu(e)}`:""),He=(e,t)=>!Object.is(e,t),Uu=(e,...t)=>{for(let u=0;u<e.length;u++)e[u](...t)},Gu=(e,t,u,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:u})},Nr=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Rr=e=>{const t=Z(e)?Number(e):NaN;return isNaN(t)?e:t};let ic;const yu=()=>ic||(ic=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function sd(e,t){return e+JSON.stringify(t,(u,n)=>typeof n=="function"?n.toString():n)}const od="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",cd=Be(od);function on(e){if($(e)){const t={};for(let u=0;u<e.length;u++){const n=e[u],r=Z(n)?Il(n):on(n);if(r)for(const i in r)t[i]=r[i]}return t}else if(Z(e)||oe(e))return e}const ld=/;(?![^(]*\))/g,ad=/:([^]+)/,fd=/\/\*[^]*?\*\//g;function Il(e){const t={};return e.replace(fd,"").split(ld).forEach(u=>{if(u){const n=u.split(ad);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function dd(e){if(!e)return"";if(Z(e))return e;let t="";for(const u in e){const n=e[u];if(Z(n)||typeof n=="number"){const r=u.startsWith("--")?u:qe(u);t+=`${r}:${n};`}}return t}function cn(e){let t="";if(Z(e))t=e;else if($(e))for(let u=0;u<e.length;u++){const n=cn(e[u]);n&&(t+=n+" ")}else if(oe(e))for(const u in e)e[u]&&(t+=u+" ");return t.trim()}function hd(e){if(!e)return null;let{class:t,style:u}=e;return t&&!Z(t)&&(e.class=cn(t)),u&&(e.style=on(u)),e}const pd="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",md="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradi
* @vue/reactivity v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let $e;class Js{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=$e,!t&&$e&&(this.index=($e.scopes||($e.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,u;if(this.scopes)for(t=0,u=this.scopes.length;t<u;t++)this.scopes[t].pause();for(t=0,u=this.effects.length;t<u;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,u;if(this.scopes)for(t=0,u=this.scopes.length;t<u;t++)this.scopes[t].resume();for(t=0,u=this.effects.length;t<u;t++)this.effects[t].resume()}}run(t){if(this._active){const u=$e;try{return $e=this,t()}finally{$e=u}}}on(){$e=this}off(){$e=this.parent}stop(t){if(this._active){this._active=!1;let u,n;for(u=0,n=this.effects.length;u<n;u++)this.effects[u].stop();for(this.effects.length=0,u=0,n=this.cleanups.length;u<n;u++)this.cleanups[u]();if(this.cleanups.length=0,this.scopes){for(u=0,n=this.scopes.length;u<n;u++)this.scopes[u].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}}function wd(e){return new Js(e)}function Pl(){return $e}function Fd(e,t=!1){$e&&$e.cleanups.push(e)}let le;const ji=new WeakSet;class In{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,$e&&$e.active&&$e.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,ji.has(this)&&(ji.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Bl(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,oc(this),Vl(this);const t=le,u=bt;le=this,bt=!0;try{return this.fn()}finally{$l(this),le=t,bt=u,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Qs(t);this.deps=this.depsTail=void 0,oc(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?ji.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){fs(this)&&this.run()}get dirty(){return fs(this)}}let Ll=0,Cn,kn;function Bl(e,t=!1){if(e.flags|=8,t){e.next=kn,kn=e;return}e.next=Cn,Cn=e}function Ys(){Ll++}function Xs(){if(--Ll>0)return;if(kn){let t=kn;for(kn=void 0;t;){const u=t.next;t.next=void 0,t.flags&=-9,t=u}}let e;for(;Cn;){let t=Cn;for(Cn=void 0;t;){const u=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=u}}if(e)throw e}function Vl(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function $l(e){let t,u=e.depsTail,n=u;for(;n;){const r=n.prevDep;n.version===-1?(n===u&&(u=r),Qs(n),Id(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=r}e.deps=t,e.depsTail=u}function fs(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Hl(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Hl(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===On))return;e.globalVersion=On;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!fs(e)){e.flags&=-3;return}const u=le,n=bt;le=e,bt=!0;try{Vl(e);const r=e.fn(e._value);(t.version===0||He(r,e._value))&&(e._value=r,t.version++)}catch(r){throw t.version++,r}finally{le=u,bt=n,$l(e),e.flags&=-3}}function Qs(e,t=!1){const{dep:u,prevSub:n,nextSub:r}=e;if(n&&(n.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=n,e.nextSub=void 0),u.subs===e&&(u.subs=n,!n&&u.computed)){u.computed.flags&=-5;for(let i=u.computed.deps;i;i=i.nextDep)Qs(i,!0)}!t&&!--u.sc&&u.map&&u.map.delete(u.key)}function Id(e){const{prevDep:t,nextDep:u}=e;t&&(t.nextDep=u,e.prevDep=void 0),u&&(u.prevDep=t,e.nextDep=void 0)}function Od(e,t){e.effect instanceof In&&(e=e.effect.fn);const u=new In(e);t&&te(u,t);try{u.run()}catch(r){throw u.stop(),r}const n=u.run.bind(u);return n.effect=u,n}function Nd(e){e.effect.stop()}let bt=!0;const Ul=[];function $t(){Ul.push(bt),bt=!1}function Ht(){const e=Ul.pop();bt=e===void 0?!0:e}function oc(e){const{cleanup:t}=e;if(e
* @vue/runtime-core v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const Eu=[];function ph(e){Eu.push(e)}function mh(){Eu.pop()}let Wi=!1;function Kt(e,...t){if(Wi)return;Wi=!0,$t();const u=Eu.length?Eu[Eu.length-1].component:null,n=u&&u.appContext.config.warnHandler,r=bh();if(n)Iu(n,u,11,[e+t.map(i=>{var s,o;return(o=(s=i.toString)==null?void 0:s.call(i))!=null?o:JSON.stringify(i)}).join(""),u&&u.proxy,r.map(({vnode:i})=>`at <${f0(u,i.type)}>`).join(`
`),r]);else{const i=[`[Vue warn]: ${e}`,...t];r.length&&i.push(`
`,...gh(r)),console.warn(...i)}Ht(),Wi=!1}function bh(){let e=Eu[Eu.length-1];if(!e)return[];const t=[];for(;e;){const u=t[0];u&&u.vnode===e?u.recurseCount++:t.push({vnode:e,recurseCount:0});const n=e.component&&e.component.parent;e=n&&n.vnode}return t}function gh(e){const t=[];return e.forEach((u,n)=>{t.push(...n===0?[]:[`
`],..._h(u))}),t}function _h({vnode:e,recurseCount:t}){const u=t>0?`... (${t} recursive calls)`:"",n=e.component?e.component.parent==null:!1,r=` at <${f0(e.component,e.type,n)}`,i=">"+u;return e.props?[r,...yh(e.props),i]:[r+i]}function yh(e){const t=[],u=Object.keys(e);return u.slice(0,3).forEach(n=>{t.push(...ra(n,e[n]))}),u.length>3&&t.push(" ..."),t}function ra(e,t,u){return Z(t)?(t=JSON.stringify(t),u?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?u?t:[`${e}=${t}`]:Ce(t)?(t=ra(e,Q(t.value),!0),u?t:[`${e}=Ref<`,t,">"]):W(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=Q(t),u?t:[`${e}=`,t])}function xh(e,t){}const Eh={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},Ch={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function Iu(e,t,u,n){try{return n?e(...n):e()}catch(r){Ou(r,t,u)}}function lt(e,t,u,n){if(W(e)){const r=Iu(e,t,u,n);return r&&Ws(r)&&r.catch(i=>{Ou(i,t,u)}),r}if($(e)){const r=[];for(let i=0;i<e.length;i++)r.push(lt(e[i],t,u,n));return r}}function Ou(e,t,u,n=!0){const r=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:s}=t&&t.appContext.config||ee;if(t){let o=t.parent;const c=t.proxy,l=`https://vuejs.org/error-reference/#runtime-${u}`;for(;o;){const a=o.ec;if(a){for(let f=0;f<a.length;f++)if(a[f](e,c,l)===!1)return}o=o.parent}if(i){$t(),Iu(i,null,10,[e,c,l]),Ht();return}}kh(e,u,r,n,s)}function kh(e,t,u,n=!0,r=!1){if(r)throw e;console.error(e)}const Ue=[];let Ct=-1;const qu=[];let Zt=null,Bu=0;const ia=Promise.resolve();let Lr=null;function yi(e){const t=Lr||ia;return e?t.then(this?e.bind(this):e):t}function Sh(e){let t=Ct+1,u=Ue.length;for(;t<u;){const n=t+u>>>1,r=Ue[n],i=Mn(r);i<e||i===e&&r.flags&2?t=n+1:u=n}return t}function no(e){if(!(e.flags&1)){const t=Mn(e),u=Ue[Ue.length-1];!u||!(e.flags&2)&&t>=Mn(u)?Ue.push(e):Ue.splice(Sh(t),0,e),e.flags|=1,sa()}}function sa(){Lr||(Lr=ia.then(oa))}function Rn(e){$(e)?qu.push(...e):Zt&&e.id===-1?Zt.splice(Bu+1,0,e):e.flags&1||(qu.push(e),e.flags|=1),sa()}function lc(e,t,u=Ct+1){for(;u<Ue.length;u++){const n=Ue[u];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;Ue.splice(u,1),u--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function Br(e){if(qu.length){const t=[...new Set(qu)].sort((u,n)=>Mn(u)-Mn(n));if(qu.length=0,Zt){Zt.push(...t);return}for(Zt=t,Bu=0;Bu<Zt.length;Bu++){const u=Zt[Bu];u.flags&4&&(u.flags&=-2),u.flags&8||u(),u.flags&=-2}Zt=null,Bu=0}}const Mn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function oa(e){try{for(Ct=0;Ct<Ue.length;Ct++){const t=Ue[Ct];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Iu(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Ct<Ue.length;Ct++){const t=Ue[Ct];t&&(t.flags&=-2)}Ct=-1,Ue.length=0,Br(),Lr=null,(Ue.length||qu.length)&&oa()}}let pt,_n=[],ms=!1;function xi(e,...t){pt?pt.emit(e,...t):ms||_n.push({event:e,args:t})}function ro(e,t){var u,n;pt=e,pt?(pt.enabled=!0,_n.forEach(({event:r,args:i})=>pt.emit(r,...i)),_n=[]):typeof window<"u"&&window.HTMLElement&
- rendered on server: ${JSON.stringify(m.data)}
- expected on client: ${JSON.stringify(g.children)}`),fu(),m.data=g.children),H=i(m));break;case ye:E(m)?(H=i(m),S(g.el=m.content.firstChild,m,x)):z!==8||C?H=A():H=i(m);break;case iu:if(C&&(m=i(m),z=m.nodeType),z===1||z===3){H=m;const J=!g.children.length;for(let j=0;j<g.staticCount;j++)J&&(g.children+=H.nodeType===1?H.outerHTML:H.data),j===g.staticCount-1&&(g.anchor=H),H=i(H);return C?i(H):H}else A();break;case Ee:C?H=p(m,g,x,k,I,w):H=A();break;default:if(P&1)(z!==1||g.type.toLowerCase()!==m.tagName.toLowerCase())&&!E(m)?H=A():H=h(m,g,x,k,I,w);else if(P&6){g.slotScopeIds=I;const J=s(m);if(C?H=D(m):mu(m)&&m.data==="teleport start"?H=D(m,m.data,"teleport end"):H=i(m),t(g,J,null,x,k,br(J),w),ru(g)&&!g.type.__asyncResolved){let j;C?(j=fe(Ee),j.anchor=H?H.previousSibling:J.lastChild):j=m.nodeType===3?yo(""):fe("div"),j.el=m,g.component.subTree=j}}else P&64?z!==8?H=A():H=g.type.hydrate(m,g,x,k,I,w,e,d):P&128?H=g.type.hydrate(m,g,x,k,br(s(m)),I,w,e,f):__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&Kt("Invalid HostVNode type:",R,`(${typeof R})`)}return T!=null&&Ln(T,null,k,g),H},h=(m,g,x,k,I,w)=>{w=w||!!g.dynamicChildren;const{type:C,props:A,patchFlag:R,shapeFlag:T,dirs:P,transition:q}=g,z=C==="input"||C==="option";if(z||R!==-1){P&&kt(g,null,x,"created");let H=!1;if(E(m)){H=ja(null,q)&&x&&x.vnode.props&&x.vnode.props.appear;const j=m.content.firstChild;H&&q.beforeEnter(j),S(j,m,x),g.el=m=j}if(T&16&&!(A&&(A.innerHTML||A.textContent))){let j=d(m.firstChild,g,m,x,k,I,w),be=!1;for(;j;){yn(m,1)||(__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&!be&&(Kt("Hydration children mismatch on",m,`
Server rendered element contains more child nodes than client vdom.`),be=!0),fu());const je=j;j=j.nextSibling,o(je)}}else if(T&8){let j=g.children;j[0]===`
`&&(m.tagName==="PRE"||m.tagName==="TEXTAREA")&&(j=j.slice(1)),m.textContent!==j&&(yn(m,0)||(__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&Kt("Hydration text content mismatch on",m,`
- rendered on server: ${m.textContent}
- expected on client: ${g.children}`),fu()),m.textContent=g.children)}if(A){if(__VUE_PROD_HYDRATION_MISMATCH_DETAILS__||z||!w||R&48){const j=m.tagName.includes("-");for(const be in A)__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&!(P&&P.some(je=>je.dir.created))&&Uh(m,be,A[be],g,x)&&fu(),(z&&(be.endsWith("value")||be==="indeterminate")||Tu(be)&&!uu(be)||be[0]==="."||j)&&n(m,be,null,A[be],void 0,x)}else if(A.onClick)n(m,"onClick",null,A.onClick,void 0,x);else if(R&4&&nu(A.style))for(const j in A.style)A.style[j]}let J;(J=A&&A.onVnodeBeforeMount)&&Ke(J,x,g),P&&kt(g,null,x,"beforeMount"),((J=A&&A.onVnodeMounted)||P||H)&&Qa(()=>{J&&Ke(J,x,g),H&&q.enter(m),P&&kt(g,null,x,"mounted")},k)}return m.nextSibling},d=(m,g,x,k,I,w,C)=>{C=C||!!g.dynamicChildren;const A=g.children,R=A.length;let T=!1;for(let P=0;P<R;P++){const q=C?A[P]:A[P]=We(A[P]),z=q.type===Pt;m?(z&&!C&&P+1<R&&We(A[P+1]).type===Pt&&(c(r(m.data.slice(q.children.length)),x,i(m)),m.data=q.children),m=f(m,q,k,I,w,C)):z&&!q.children?c(q.el=r(""),x):(yn(x,1)||(__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&!T&&(Kt("Hydration children mismatch on",x,`
Server rendered element contains fewer child nodes than client vdom.`),T=!0),fu()),u(null,q,x,null,k,I,br(x),w))}return m},p=(m,g,x,k,I,w)=>{const{slotScopeIds:C}=g;C&&(I=I?I.concat(C):C);const A=s(m),R=d(i(m),g,A,x,k,I,w);return R&&mu(R)&&R.data==="]"?i(g.anchor=R):(fu(),c(g.anchor=l("]"),A,R),R)},_=(m,g,x,k,I,w)=>{if(yn(m.parentElement,1)||(__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&Kt(`Hydration node mismatch:
- rendered on server:`,m,m.nodeType===3?"(text)":mu(m)&&m.data==="["?"(start of fragment)":"",`
- expected on client:`,g.type),fu()),g.el=null,w){const R=D(m);for(;;){const T=i(m);if(T&&T!==R)o(T);else break}}const C=i(m),A=s(m);return o(m),u(null,g,A,C,x,k,br(A),I),x&&(x.vnode.el=g.el,Ti(x,g.el)),C},D=(m,g="[",x="]")=>{let k=0;for(;m;)if(m=i(m),m&&mu(m)&&(m.data===g&&k++,m.data===x)){if(k===0)return i(m);k--}return m},S=(m,g,x)=>{const k=g.parentNode;k&&k.replaceChild(m,g);let I=x;for(;I;)I.vnode.el===g&&(I.vnode.el=I.subTree.el=m),I=I.parent},E=m=>m.nodeType===1&&m.tagName==="TEMPLATE";return[a,f]}function Uh(e,t,u,n,r){let i,s,o,c;if(t==="class")o=e.getAttribute("class"),c=cn(u),qh(mc(o||""),mc(c))||(i=2,s="class");else if(t==="style"){o=e.getAttribute("style")||"",c=Z(u)?u:dd(on(u));const l=bc(o),a=bc(c);if(n.dirs)for(const{dir:f,value:h}of n.dirs)f.name==="show"&&!h&&a.set("display","none");r&&ga(r,n,a),jh(l,a)||(i=3,s="style")}else(e instanceof SVGElement&&Sd(t)||e instanceof HTMLElement&&(sc(t)||kd(t)))&&(sc(t)?(o=e.hasAttribute(t),c=Zs(u)):u==null?(o=e.hasAttribute(t),c=!1):(e.hasAttribute(t)?o=e.getAttribute(t):t==="value"&&e.tagName==="TEXTAREA"?o=e.value:o=!1,c=Ad(u)?String(u):!1),o!==c&&(i=4,s=t));if(i!=null&&!yn(e,i)){const l=h=>h===!1?"(not rendered)":`${s}="${h}"`,a=`Hydration ${_a[i]} mismatch on`,f=`
- rendered on server: ${l(o)}
- expected on client: ${l(c)}
Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
You should fix the source of the mismatch.`;return Kt(a,e,f),!0}return!1}function mc(e){return new Set(e.trim().split(/\s+/))}function qh(e,t){if(e.size!==t.size)return!1;for(const u of e)if(!t.has(u))return!1;return!0}function bc(e){const t=new Map;for(const u of e.split(";")){let[n,r]=u.split(":");n=n.trim(),r=r&&r.trim(),n&&r&&t.set(n,r)}return t}function jh(e,t){if(e.size!==t.size)return!1;for(const[u,n]of e)if(n!==t.get(u))return!1;return!0}function ga(e,t,u){const n=e.subTree;if(e.getCssVars&&(t===n||n&&n.type===Ee&&n.children.includes(t))){const r=e.getCssVars();for(const i in r)u.set(`--${Dd(i)}`,String(r[i]))}t===n&&e.parent&&ga(e.parent,e.vnode,u)}const gc="data-allow-mismatch",_a={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function yn(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(gc);)e=e.parentElement;const u=e&&e.getAttribute(gc);if(u==null)return!1;if(u==="")return!0;{const n=u.split(",");return t===0&&n.includes("children")?!0:u.split(",").includes(_a[t])}}const zh=yu().requestIdleCallback||(e=>setTimeout(e,1)),Kh=yu().cancelIdleCallback||(e=>clearTimeout(e)),Wh=(e=1e4)=>t=>{const u=zh(t,{timeout:e});return()=>Kh(u)};function Gh(e){const{top:t,left:u,bottom:n,right:r}=e.getBoundingClientRect(),{innerHeight:i,innerWidth:s}=window;return(t>0&&t<i||n>0&&n<i)&&(u>0&&u<s||r>0&&r<s)}const Zh=e=>(t,u)=>{const n=new IntersectionObserver(r=>{for(const i of r)if(i.isIntersecting){n.disconnect(),t();break}},e);return u(r=>{if(r instanceof Element){if(Gh(r))return t(),n.disconnect(),!1;n.observe(r)}}),()=>n.disconnect()},Jh=e=>t=>{if(e){const u=matchMedia(e);if(u.matches)t();else return u.addEventListener("change",t,{once:!0}),()=>u.removeEventListener("change",t)}},Yh=(e=[])=>(t,u)=>{Z(e)&&(e=[e]);let n=!1;const r=s=>{n||(n=!0,i(),t(),s.target.dispatchEvent(new s.constructor(s.type,s)))},i=()=>{u(s=>{for(const o of e)s.removeEventListener(o,r)})};return u(s=>{for(const o of e)s.addEventListener(o,r,{once:!0})}),i};function Xh(e,t){if(mu(e)&&e.data==="["){let u=1,n=e.nextSibling;for(;n;){if(n.nodeType===1){if(t(n)===!1)break}else if(mu(n))if(n.data==="]"){if(--u===0)break}else n.data==="["&&u++;n=n.nextSibling}}else t(e)}const ru=e=>!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function Qh(e){W(e)&&(e={loader:e});const{loader:t,loadingComponent:u,errorComponent:n,delay:r=200,hydrate:i,timeout:s,suspensible:o=!0,onError:c}=e;let l=null,a,f=0;const h=()=>(f++,l=null,d()),d=()=>{let p;return l||(p=l=t().catch(_=>{if(_=_ instanceof Error?_:new Error(String(_)),c)return new Promise((D,S)=>{c(_,()=>D(h()),()=>S(_),f+1)});throw _}).then(_=>p!==l&&l?l:(_&&(_.__esModule||_[Symbol.toStringTag]==="Module")&&(_=_.default),a=_,_)))};return ln({name:"AsyncComponentWrapper",__asyncLoader:d,__asyncHydrate(p,_,D){const S=i?()=>{const E=i(D,m=>Xh(p,m));E&&(_.bum||(_.bum=[])).push(E)}:D;a?S():d().then(()=>!_.isUnmounted&&S())},get __asyncResolved(){return a},setup(){const p=Ae;if(lo(p),a)return()=>Zi(a,p);const _=m=>{l=null,Ou(m,p,13,!n)};if(o&&p.suspense||Ju)return d().then(m=>()=>Zi(m,p)).catch(m=>(_(m),()=>n?fe(n,{error:m}):null));const D=Sn(!1),S=Sn(),E=Sn(!!r);return r&&setTimeout(()=>{E.value=!1},r),s!=null&&setTimeout(()=>{if(!D.value&&!S.value){const m=new Error(`Async component timed out after ${s}ms.`);_(m),S.value=m}},s),d().then(()=>{D.value=!0,p.parent&&er(p.parent.vnode)&&p.parent.update()}).catch(m=>{_(m),S.value=m}),()=>{if(D.value&&a)return Zi(a,p);if(S.value&&n)return fe(n,{error:S.value});if(u&&!E.value)return fe(u)}}})}function Zi(e,t){const{ref:u,props:n,children:r,ce:i}=t.vnode,s=fe(e,n,r);return s.ref=u,s.ce=i,delete t.vnode.ce,s}const er=e=>e.type.__isKeepAlive,e1={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const u=ft(),n=u.ctx;if(!n.renderer)return()=>{const E=t.default&&t.default();return E&&E.length===1?E[0]:E};const r=new Map,i=new Set;let s=null;__VUE_PROD_DEVTOOLS__&&(u.__v_cache=r);const o=u.suspense,{renderer:{p:c,m:l,um:a,o:{createElement:f}}}=n,h=f("div");n.activate=(E,m,g,x,k)=>{const I
* @vue/runtime-dom v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Fs;const Ac=typeof window<"u"&&window.trustedTypes;if(Ac)try{Fs=Ac.createPolicy("vue",{createHTML:e=>e})}catch{}const h0=Fs?e=>Fs.createHTML(e):e=>e,Dp="http://www.w3.org/2000/svg",Tp="http://www.w3.org/1998/Math/MathML",Ot=typeof document<"u"?document:null,vc=Ot&&Ot.createElement("template"),wp={insert:(e,t,u)=>{t.insertBefore(e,u||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,u,n)=>{const r=t==="svg"?Ot.createElementNS(Dp,e):t==="mathml"?Ot.createElementNS(Tp,e):u?Ot.createElement(e,{is:u}):Ot.createElement(e);return e==="select"&&n&&n.multiple!=null&&r.setAttribute("multiple",n.multiple),r},createText:e=>Ot.createTextNode(e),createComment:e=>Ot.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ot.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,u,n,r,i){const s=u?u.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),u),!(r===i||!(r=r.nextSibling)););else{vc.innerHTML=h0(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const o=vc.content;if(n==="svg"||n==="mathml"){const c=o.firstChild;for(;c.firstChild;)o.appendChild(c.firstChild);o.removeChild(c)}t.insertBefore(o,u)}return[s?s.nextSibling:t.firstChild,u?u.previousSibling:t.lastChild]}},jt="transition",mn="animation",Yu=Symbol("_vtc"),p0={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},m0=te({},co,p0),Fp=e=>(e.displayName="Transition",e.props=m0,e),Ip=Fp((e,{slots:t})=>Co(ma,b0(e),t)),hu=(e,t=[])=>{$(e)?e.forEach(u=>u(...t)):e&&e(...t)},Dc=e=>e?$(e)?e.some(t=>t.length>1):e.length>1:!1;function b0(e){const t={};for(const T in e)T in p0||(t[T]=e[T]);if(e.css===!1)return t;const{name:u="v",type:n,duration:r,enterFromClass:i=`${u}-enter-from`,enterActiveClass:s=`${u}-enter-active`,enterToClass:o=`${u}-enter-to`,appearFromClass:c=i,appearActiveClass:l=s,appearToClass:a=o,leaveFromClass:f=`${u}-leave-from`,leaveActiveClass:h=`${u}-leave-active`,leaveToClass:d=`${u}-leave-to`}=e,p=Op(r),_=p&&p[0],D=p&&p[1],{onBeforeEnter:S,onEnter:E,onEnterCancelled:m,onLeave:g,onLeaveCancelled:x,onBeforeAppear:k=S,onAppear:I=E,onAppearCancelled:w=m}=t,C=(T,P,q,z)=>{T._enterCancelled=z,Wt(T,P?a:o),Wt(T,P?l:s),q&&q()},A=(T,P)=>{T._isLeaving=!1,Wt(T,f),Wt(T,d),Wt(T,h),P&&P()},R=T=>(P,q)=>{const z=T?I:E,H=()=>C(P,T,q);hu(z,[P,H]),Tc(()=>{Wt(P,T?c:i),Et(P,T?a:o),Dc(z)||wc(P,n,_,H)})};return te(t,{onBeforeEnter(T){hu(S,[T]),Et(T,i),Et(T,s)},onBeforeAppear(T){hu(k,[T]),Et(T,c),Et(T,l)},onEnter:R(!1),onAppear:R(!0),onLeave(T,P){T._isLeaving=!0;const q=()=>A(T,P);Et(T,f),T._enterCancelled?(Et(T,h),Is()):(Is(),Et(T,h)),Tc(()=>{T._isLeaving&&(Wt(T,f),Et(T,d),Dc(g)||wc(T,n,D,q))}),hu(g,[T,q])},onEnterCancelled(T){C(T,!1,void 0,!0),hu(m,[T])},onAppearCancelled(T){C(T,!0,void 0,!0),hu(w,[T])},onLeaveCancelled(T){A(T),hu(x,[T])}})}function Op(e){if(e==null)return null;if(oe(e))return[Qi(e.enter),Qi(e.leave)];{const t=Qi(e);return[t,t]}}function Qi(e){return Rr(e)}function Et(e,t){t.split(/\s+/).forEach(u=>u&&e.classList.add(u)),(e[Yu]||(e[Yu]=new Set)).add(t)}function Wt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const u=e[Yu];u&&(u.delete(t),u.size||(e[Yu]=void 0))}function Tc(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Np=0;function wc(e,t,u,n){const r=e._endId=++Np,i=()=>{r===e._endId&&n()};if(u!=null)return setTimeout(i,u);const{type:s,timeout:o,propCount:c}=g0(e,t);if(!s)return n();const l=s+"end";let a=0;const f=()=>{e.removeEventListener(l,h),i()},h=d=>{d.target===e&&++a>=c&&f()};setTimeout(()=>{a<c&&f()},o+1),e.addEventListener(l,h)}function g0(e,t){const u=window.getComputedStyle(e),n=p=>(u[p]||"").split(", "),r=n(`${jt}Delay`),i=n(`${jt}Duration`),s=Fc(r,i),o=n(`${mn}Delay`),c=n(`${mn}Duration`),
* @vue/compiler-core v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const Hn=Symbol(""),Fn=Symbol(""),Ao=Symbol(""),Yr=Symbol(""),P0=Symbol(""),Du=Symbol(""),L0=Symbol(""),B0=Symbol(""),vo=Symbol(""),Do=Symbol(""),rr=Symbol(""),To=Symbol(""),V0=Symbol(""),wo=Symbol(""),Fo=Symbol(""),Io=Symbol(""),Oo=Symbol(""),No=Symbol(""),Ro=Symbol(""),$0=Symbol(""),H0=Symbol(""),Fi=Symbol(""),Xr=Symbol(""),Mo=Symbol(""),Po=Symbol(""),Un=Symbol(""),ir=Symbol(""),Lo=Symbol(""),Ns=Symbol(""),b2=Symbol(""),Rs=Symbol(""),Qr=Symbol(""),g2=Symbol(""),_2=Symbol(""),Bo=Symbol(""),y2=Symbol(""),x2=Symbol(""),Vo=Symbol(""),U0=Symbol(""),Qu={[Hn]:"Fragment",[Fn]:"Teleport",[Ao]:"Suspense",[Yr]:"KeepAlive",[P0]:"BaseTransition",[Du]:"openBlock",[L0]:"createBlock",[B0]:"createElementBlock",[vo]:"createVNode",[Do]:"createElementVNode",[rr]:"createCommentVNode",[To]:"createTextVNode",[V0]:"createStaticVNode",[wo]:"resolveComponent",[Fo]:"resolveDynamicComponent",[Io]:"resolveDirective",[Oo]:"resolveFilter",[No]:"withDirectives",[Ro]:"renderList",[$0]:"renderSlot",[H0]:"createSlots",[Fi]:"toDisplayString",[Xr]:"mergeProps",[Mo]:"normalizeClass",[Po]:"normalizeStyle",[Un]:"normalizeProps",[ir]:"guardReactiveProps",[Lo]:"toHandlers",[Ns]:"camelize",[b2]:"capitalize",[Rs]:"toHandlerKey",[Qr]:"setBlockTracking",[g2]:"pushScopeId",[_2]:"popScopeId",[Bo]:"withCtx",[y2]:"unref",[x2]:"isRef",[Vo]:"withMemo",[U0]:"isMemoSame"};function E2(e){Object.getOwnPropertySymbols(e).forEach(t=>{Qu[t]=e[t]})}const rt={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function C2(e,t=""){return{type:0,source:t,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:rt}}function qn(e,t,u,n,r,i,s,o=!1,c=!1,l=!1,a=rt){return e&&(o?(e.helper(Du),e.helper(un(e.inSSR,l))):e.helper(tn(e.inSSR,l)),s&&e.helper(No)),{type:13,tag:t,props:u,children:n,patchFlag:r,dynamicProps:i,directives:s,isBlock:o,disableTracking:c,isComponent:l,loc:a}}function ku(e,t=rt){return{type:17,loc:t,elements:e}}function ot(e,t=rt){return{type:15,loc:t,properties:e}}function xe(e,t){return{type:16,loc:rt,key:Z(e)?X(e,!0):e,value:t}}function X(e,t=!1,u=rt,n=0){return{type:4,loc:u,content:e,isStatic:t,constType:t?3:n}}function gt(e,t=rt){return{type:8,loc:t,children:e}}function Se(e,t=[],u=rt){return{type:14,loc:u,callee:e,arguments:t}}function en(e,t=void 0,u=!1,n=!1,r=rt){return{type:18,params:e,returns:t,newline:u,isSlot:n,loc:r}}function Ms(e,t,u,n=!0){return{type:19,test:e,consequent:t,alternate:u,newline:n,loc:rt}}function k2(e,t,u=!1,n=!1){return{type:20,index:e,value:t,needPauseTracking:u,inVOnce:n,needArraySpread:!1,loc:rt}}function S2(e){return{type:21,body:e,loc:rt}}function tn(e,t){return e||t?vo:Do}function un(e,t){return e||t?L0:B0}function $o(e,{helper:t,removeHelper:u,inSSR:n}){e.isBlock||(e.isBlock=!0,u(tn(n,e.isComponent)),t(Du),t(un(n,e.isComponent)))}const Wc=new Uint8Array([123,123]),Gc=new Uint8Array([125,125]);function Zc(e){return e>=97&&e<=122||e>=65&&e<=90}function et(e){return e===32||e===10||e===9||e===12||e===13}function zt(e){return e===47||e===62||et(e)}function ei(e){const t=new Uint8Array(e.length);for(let u=0;u<e.length;u++)t[u]=e.charCodeAt(u);return t}const Oe={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};class A2{constructor(t,u){this.stack=t,this.cbs=u,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=Wc,this.delimiterClose=Gc,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return this.mode===2&&this.stack.length===0}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.leng
`);else if(K2(i.content)){const s=e[r-1]&&e[r-1].type,o=e[r+1]&&e[r+1].type;!s||!o||u&&(s===3&&(o===3||o===1)||s===1&&(o===3||o===1&&W2(i.content)))?(n=!0,e[r]=null):i.content=" "}else u&&(i.content=Y0(i.content))}return n?e.filter(Boolean):e}function K2(e){for(let t=0;t<e.length;t++)if(!et(e.charCodeAt(t)))return!1;return!0}function W2(e){for(let t=0;t<e.length;t++){const u=e.charCodeAt(t);if(u===10||u===13)return!0}return!1}function Y0(e){let t="",u=!1;for(let n=0;n<e.length;n++)et(e.charCodeAt(n))?u||(t+=" ",u=!0):(t+=e[n],u=!1);return t}function Ls(e){(pe[0]||Kn).children.push(e)}function _e(e,t){return{start:ge.getPos(e),end:t==null?t:ge.getPos(t),source:t==null?t:Fe(e,t)}}function G2(e){return _e(e.start.offset,e.end.offset)}function gu(e,t){e.end=ge.getPos(t),e.source=Fe(e.start.offset,t)}function Z2(e){const t={type:6,name:e.rawName,nameLoc:_e(e.loc.start.offset,e.loc.start.offset+e.rawName.length),value:void 0,loc:e.loc};if(e.exp){const u=e.exp.loc;u.end.offset<e.loc.end.offset&&(u.start.offset--,u.start.column--,u.end.offset++,u.end.column++),t.value={type:2,content:e.exp.content,loc:u}}return t}function Fr(e,t=!1,u,n=0,r=0){return X(e,t,u,n)}function Ft(e,t,u){ie.onError(me(e,_e(t,t)))}function J2(){ge.reset(),Ne=null,ne=null,ze="",It=-1,pu=-1,pe.length=0}function Y2(e,t){if(J2(),Lt=e,ie=te({},G0),t){let r;for(r in t)t[r]!=null&&(ie[r]=t[r])}ge.mode=ie.parseMode==="html"?1:ie.parseMode==="sfc"?2:0,ge.inXML=ie.ns===1||ie.ns===2;const u=t&&t.delimiters;u&&(ge.delimiterOpen=ei(u[0]),ge.delimiterClose=ei(u[1]));const n=Kn=C2([],e);return ge.parse(Lt),n.loc=_e(0,e.length),n.children=J0(n.children),Kn=null,n}function X2(e,t){Ir(e,void 0,t,X0(e,e.children[0]))}function X0(e,t){const{children:u}=e;return u.length===1&&t.type===1&&!ui(t)}function Ir(e,t,u,n=!1,r=!1){const{children:i}=e,s=[];for(let a=0;a<i.length;a++){const f=i[a];if(f.type===1&&f.tagType===0){const h=n?0:tt(f,u);if(h>0){if(h>=2){f.codegenNode.patchFlag=-1,s.push(f);continue}}else{const d=f.codegenNode;if(d.type===13){const p=d.patchFlag;if((p===void 0||p===512||p===1)&&ef(f,u)>=2){const _=tf(f);_&&(d.props=u.hoist(_))}d.dynamicProps&&(d.dynamicProps=u.hoist(d.dynamicProps))}}}else if(f.type===12&&(n?0:tt(f,u))>=2){s.push(f);continue}if(f.type===1){const h=f.tagType===1;h&&u.scopes.vSlot++,Ir(f,e,u,!1,r),h&&u.scopes.vSlot--}else if(f.type===11)Ir(f,e,u,f.children.length===1,!0);else if(f.type===9)for(let h=0;h<f.branches.length;h++)Ir(f.branches[h],e,u,f.branches[h].children.length===1,r)}let o=!1;if(s.length===i.length&&e.type===1){if(e.tagType===0&&e.codegenNode&&e.codegenNode.type===13&&$(e.codegenNode.children))e.codegenNode.children=c(ku(e.codegenNode.children)),o=!0;else if(e.tagType===1&&e.codegenNode&&e.codegenNode.type===13&&e.codegenNode.children&&!$(e.codegenNode.children)&&e.codegenNode.children.type===15){const a=l(e.codegenNode,"default");a&&(a.returns=c(ku(a.returns)),o=!0)}else if(e.tagType===3&&t&&t.type===1&&t.tagType===1&&t.codegenNode&&t.codegenNode.type===13&&t.codegenNode.children&&!$(t.codegenNode.children)&&t.codegenNode.children.type===15){const a=st(e,"slot",!0),f=a&&a.arg&&l(t.codegenNode,a.arg);f&&(f.returns=c(ku(f.returns)),o=!0)}}if(!o)for(const a of s)a.codegenNode=u.cache(a.codegenNode);function c(a){const f=u.cache(a);return r&&u.hmr&&(f.needArraySpread=!0),f}function l(a,f){if(a.children&&!$(a.children)&&a.children.type===15){const h=a.children.properties.find(d=>d.key===f||d.key.content===f);return h&&h.value}}s.length&&u.transformHoist&&u.transformHoist(i,u,e)}function tt(e,t){const{constantCache:u}=t;switch(e.type){case 1:if(e.tagType!==0)return 0;const n=u.get(e);if(n!==void 0)return n;const r=e.codegenNode;if(r.type!==13||r.isBlock&&e.tag!=="svg"&&e.tag!=="foreignObject"&&e.tag!=="math")return 0;if(r.patchFlag===void 0){let s=3;const o=ef(e,t);if(o===0)return u.set(e,0),0;o<s&&(s=o);for(let c=0;c<e.children.length;c++){const l=tt(e.children[c],t);if(l===0)return u.set(e,0),0;l<s&&(s=l)}if(s>1)for(let c=0;c<e.props.length;c++){const l=e.props[c];if(l.type===7&&l.name==="bind"&&l.exp){const a=tt(l.exp,t);if(a===0)r
`+" ".repeat(_),0)}return d}function im(e,t={}){const u=rm(e,t);t.onContextCreated&&t.onContextCreated(u);const{mode:n,push:r,prefixIdentifiers:i,indent:s,deindent:o,newline:c,scopeId:l,ssr:a}=u,f=Array.from(e.helpers),h=f.length>0,d=!i&&n!=="module";sm(e,u);const _=a?"ssrRender":"render",S=(a?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ");if(r(`function ${_}(${S}) {`),s(),d&&(r("with (_ctx) {"),s(),h&&(r(`const { ${f.map(nf).join(", ")} } = _Vue
`,-1),c())),e.components.length&&(ns(e.components,"component",u),(e.directives.length||e.temps>0)&&c()),e.directives.length&&(ns(e.directives,"directive",u),e.temps>0&&c()),e.filters&&e.filters.length&&(c(),ns(e.filters,"filter",u),c()),e.temps>0){r("let ");for(let E=0;E<e.temps;E++)r(`${E>0?", ":""}_temp${E}`)}return(e.components.length||e.directives.length||e.temps)&&(r(`
`,0),c()),a||r("return "),e.codegenNode?Le(e.codegenNode,u):r("null"),d&&(o(),r("}")),o(),r("}"),{ast:e,code:u.code,preamble:"",map:u.map?u.map.toJSON():void 0}}function sm(e,t){const{ssr:u,prefixIdentifiers:n,push:r,newline:i,runtimeModuleName:s,runtimeGlobalName:o,ssrRuntimeModuleName:c}=t,l=o,a=Array.from(e.helpers);if(a.length>0&&(r(`const _Vue = ${l}
`,-1),e.hoists.length)){const f=[vo,Do,rr,To,V0].filter(h=>a.includes(h)).map(nf).join(", ");r(`const { ${f} } = _Vue
`,-1)}om(e.hoists,t),i(),r("return ")}function ns(e,t,{helper:u,push:n,newline:r,isTS:i}){const s=u(t==="filter"?Oo:t==="component"?wo:Io);for(let o=0;o<e.length;o++){let c=e[o];const l=c.endsWith("__self");l&&(c=c.slice(0,-6)),n(`const ${zn(c,t)} = ${s}(${JSON.stringify(c)}${l?", true":""})${i?"!":""}`),o<e.length-1&&r()}}function om(e,t){if(!e.length)return;t.pure=!0;const{push:u,newline:n}=t;n();for(let r=0;r<e.length;r++){const i=e[r];i&&(u(`const _hoisted_${r+1} = `),Le(i,t),n())}t.pure=!1}function jo(e,t){const u=e.length>3||!1;t.push("["),u&&t.indent(),sr(e,t,u),u&&t.deindent(),t.push("]")}function sr(e,t,u=!1,n=!0){const{push:r,newline:i}=t;for(let s=0;s<e.length;s++){const o=e[s];Z(o)?r(o,-3):$(o)?jo(o,t):Le(o,t),s<e.length-1&&(u?(n&&r(","),i()):n&&r(", "))}}function Le(e,t){if(Z(e)){t.push(e,-3);return}if(Ze(e)){t.push(t.helper(e));return}switch(e.type){case 1:case 9:case 11:Le(e.codegenNode,t);break;case 2:cm(e,t);break;case 4:rf(e,t);break;case 5:lm(e,t);break;case 12:Le(e.codegenNode,t);break;case 8:sf(e,t);break;case 3:fm(e,t);break;case 13:dm(e,t);break;case 14:pm(e,t);break;case 15:mm(e,t);break;case 17:bm(e,t);break;case 18:gm(e,t);break;case 19:_m(e,t);break;case 20:ym(e,t);break;case 21:sr(e.body,t,!0,!1);break}}function cm(e,t){t.push(JSON.stringify(e.content),-3,e)}function rf(e,t){const{content:u,isStatic:n}=e;t.push(n?JSON.stringify(u):u,-3,e)}function lm(e,t){const{push:u,helper:n,pure:r}=t;r&&u(Ni),u(`${n(Fi)}(`),Le(e.content,t),u(")")}function sf(e,t){for(let u=0;u<e.children.length;u++){const n=e.children[u];Z(n)?t.push(n,-3):Le(n,t)}}function am(e,t){const{push:u}=t;if(e.type===8)u("["),sf(e,t),u("]");else if(e.isStatic){const n=Uo(e.content)?e.content:JSON.stringify(e.content);u(n,-2,e)}else u(`[${e.content}]`,-3,e)}function fm(e,t){const{push:u,helper:n,pure:r}=t;r&&u(Ni),u(`${n(rr)}(${JSON.stringify(e.content)})`,-3,e)}function dm(e,t){const{push:u,helper:n,pure:r}=t,{tag:i,props:s,children:o,patchFlag:c,dynamicProps:l,directives:a,isBlock:f,disableTracking:h,isComponent:d}=e;let p;c&&(p=String(c)),a&&u(n(No)+"("),f&&u(`(${n(Du)}(${h?"true":""}), `),r&&u(Ni);const _=f?un(t.inSSR,d):tn(t.inSSR,d);u(n(_)+"(",-2,e),sr(hm([i,s,o,p,l]),t),u(")"),f&&u(")"),a&&(u(", "),Le(a,t),u(")"))}function hm(e){let t=e.length;for(;t--&&e[t]==null;);return e.slice(0,t+1).map(u=>u||"null")}function pm(e,t){const{push:u,helper:n,pure:r}=t,i=Z(e.callee)?e.callee:n(e.callee);r&&u(Ni),u(i+"(",-2,e),sr(e.arguments,t),u(")")}function mm(e,t){const{push:u,indent:n,deindent:r,newline:i}=t,{properties:s}=e;if(!s.length){u("{}",-2,e);return}const o=s.length>1||!1;u(o?"{":"{ "),o&&n();for(let c=0;c<s.length;c++){const{key:l,value:a}=s[c];am(l,t),u(": "),Le(a,t),c<s.length-1&&(u(","),i())}o&&r(),u(o?"}":" }")}function bm(e,t){jo(e.elements,t)}function gm(e,t){const{push:u,indent:n,deindent:r}=t,{params:i,returns:s,body:o,newline:c,isSlot:l}=e;l&&u(`_${Qu[Bo]}(`),u("(",-2,e),$(i)?sr(i,t):i&&Le(i,t),u(") => "),(c||o)&&(u("{"),n()),s?(c&&u("return "),$(s)?jo(s,t):Le(s,t)):o&&Le(o,t),(c||o)&&(r(),u("}")),l&&(e.isNonScopedSlot&&u(", undefined, true"),u(")"))}function _m(e,t){const{test:u,consequent:n,alternate:r,newline:i}=e,{push:s,indent:o,deindent:c,newline:l}=t;if(u.type===4){const f=!Uo(u.content);f&&s("("),rf(u,t),f&&s(")")}else s("("),Le(u,t),s(")");i&&o(),t.indentLevel++,i||s(" "),s("? "),Le(n,t),t.indentLevel--,i&&l(),i||s(" "),s(": ");const a=r.type===19;a||t.indentLevel++,Le(r,t),a||t.indentLevel--,i&&c(!0)}function ym(e,t){const{push:u,helper:n,indent:r,deindent:i,newline:s}=t,{needPauseTracking:o,needArraySpread:c}=e;c&&u("[...("),u(`_cache[${e.index}] || (`),o&&(r(),u(`${n(Qr)}(-1`),e.inVOnce&&u(", true"),u("),"),s(),u("(")),u(`_cache[${e.index}] = `),Le(e.value,t),o&&(u(`).cacheIndex = ${e.index},`),s(),u(`${n(Qr)}(1),`),s(),u(`_cache[${e.index}]`),i()),u(")"),c&&u(")]")}new RegExp("\\b"+"arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b")+"\\
* @vue/compiler-dom v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const pf=Symbol(""),mf=Symbol(""),bf=Symbol(""),gf=Symbol(""),$s=Symbol(""),_f=Symbol(""),yf=Symbol(""),xf=Symbol(""),Ef=Symbol(""),Cf=Symbol("");E2({[pf]:"vModelRadio",[mf]:"vModelCheckbox",[bf]:"vModelText",[gf]:"vModelSelect",[$s]:"vModelDynamic",[_f]:"withModifiers",[yf]:"withKeys",[xf]:"vShow",[Ef]:"Transition",[Cf]:"TransitionGroup"});let Pu;function Km(e,t=!1){return Pu||(Pu=document.createElement("div")),t?(Pu.innerHTML=`<div foo="${e.replace(/"/g,"&quot;")}">`,Pu.children[0].getAttribute("foo")):(Pu.innerHTML=e,Pu.textContent)}const Wm={parseMode:"html",isVoidTag:Ed,isNativeTag:e=>_d(e)||yd(e)||xd(e),isPreTag:e=>e==="pre",isIgnoreNewlineTag:e=>e==="pre"||e==="textarea",decodeEntities:Km,isBuiltInComponent:e=>{if(e==="Transition"||e==="transition")return Ef;if(e==="TransitionGroup"||e==="transition-group")return Cf},getNamespace(e,t,u){let n=t?t.ns:u;if(t&&n===2)if(t.tag==="annotation-xml"){if(e==="svg")return 1;t.props.some(r=>r.type===6&&r.name==="encoding"&&r.value!=null&&(r.value.content==="text/html"||r.value.content==="application/xhtml+xml"))&&(n=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&e!=="mglyph"&&e!=="malignmark"&&(n=0);else t&&n===1&&(t.tag==="foreignObject"||t.tag==="desc"||t.tag==="title")&&(n=0);if(n===0){if(e==="svg")return 1;if(e==="math")return 2}return n}},Gm=e=>{e.type===1&&e.props.forEach((t,u)=>{t.type===6&&t.name==="style"&&t.value&&(e.props[u]={type:7,name:"bind",arg:X("style",!0,t.loc),exp:Zm(t.value.content,t.loc),modifiers:[],loc:t.loc})})},Zm=(e,t)=>{const u=Il(e);return X(JSON.stringify(u),!1,t,3)};function su(e,t){return me(e,t)}const Jm=(e,t,u)=>{const{exp:n,loc:r}=e;return n||u.onError(su(53,r)),t.children.length&&(u.onError(su(54,r)),t.children.length=0),{props:[xe(X("innerHTML",!0,r),n||X("",!0))]}},Ym=(e,t,u)=>{const{exp:n,loc:r}=e;return n||u.onError(su(55,r)),t.children.length&&(u.onError(su(56,r)),t.children.length=0),{props:[xe(X("textContent",!0),n?tt(n,u)>0?n:Se(u.helperString(Fi),[n],r):X("",!0))]}},Xm=(e,t,u)=>{const n=hf(e,t,u);if(!n.props.length||t.tagType===1)return n;e.arg&&u.onError(su(58,e.arg.loc));const{tag:r}=t,i=u.isCustomElement(r);if(r==="input"||r==="textarea"||r==="select"||i){let s=bf,o=!1;if(r==="input"||i){const c=Ii(t,"type");if(c){if(c.type===7)s=$s;else if(c.value)switch(c.value.content){case"radio":s=pf;break;case"checkbox":s=mf;break;case"file":o=!0,u.onError(su(59,e.loc));break}}else R2(t)&&(s=$s)}else r==="select"&&(s=gf);o||(n.needRuntime=u.helper(s))}else u.onError(su(57,e.loc));return n.props=n.props.filter(s=>!(s.key.type===4&&s.key.content==="modelValue")),n},Qm=Be("passive,once,capture"),eb=Be("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),tb=Be("left,right"),kf=Be("onkeyup,onkeydown,onkeypress"),ub=(e,t,u,n)=>{const r=[],i=[],s=[];for(let o=0;o<t.length;o++){const c=t[o].content;c==="native"&&jn("COMPILER_V_ON_NATIVE",u)||Qm(c)?s.push(c):tb(c)?Ge(e)?kf(e.content.toLowerCase())?r.push(c):i.push(c):(r.push(c),i.push(c)):eb(c)?i.push(c):r.push(c)}return{keyModifiers:r,nonKeyModifiers:i,eventOptionModifiers:s}},al=(e,t)=>Ge(e)&&e.content.toLowerCase()==="onclick"?X(t,!0):e.type!==4?gt(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,nb=(e,t,u)=>df(e,t,u,n=>{const{modifiers:r}=e;if(!r.length)return n;let{key:i,value:s}=n.props[0];const{keyModifiers:o,nonKeyModifiers:c,eventOptionModifiers:l}=ub(i,r,u,e.loc);if(c.includes("right")&&(i=al(i,"onContextmenu")),c.includes("middle")&&(i=al(i,"onMouseup")),c.length&&(s=Se(u.helper(_f),[s,JSON.stringify(c)])),o.length&&(!Ge(i)||kf(i.content.toLowerCase()))&&(s=Se(u.helper(yf),[s,JSON.stringify(o)])),l.length){const a=l.map(Fu).join("");i=Ge(i)?X(`${i.content}${a}`,!0):gt(["(",i,`) + "${a}"`])}return{props:[xe(i,s)]}}),rb=(e,t,u)=>{const{exp:n,loc:r}=e;return n||u.onError(su(61,r)),{props:[],needRuntime:u.helper(xf)}},ib=(e,t)=>{e.type===1&&e.tagType===0&&(e.tag==="script"||e.tag==="style")&&t.removeNode()},sb=[Gm],ob={cloak:zm,html:Jm,text:Ym,model:Xm,on:nb,show:rb};function cb(e,t={}){return jm(e,te({},Wm,t,{nodeTransforms:[ib,...sb,...t.nodeTransforms||[]],directiveTransforms:te({},ob,t.dire
* vue v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const fl=Object.create(null);function lb(e,t){if(!Z(e))if(e.nodeType)e=e.innerHTML;else return we;const u=sd(e,t),n=fl[u];if(n)return n;if(e[0]==="#"){const o=document.querySelector(e);e=o?o.innerHTML:""}const r=te({hoistStatic:!0,onError:void 0,onWarn:we},t);!r.isCustomElement&&typeof customElements<"u"&&(r.isCustomElement=o=>!!customElements.get(o));const{code:i}=cb(e,r),s=new Function("Vue",i)(m2);return s._rc=!0,fl[u]=s}c0(lb);const dl={};function ab(e){let t=dl[e];if(t)return t;t=dl[e]=[];for(let u=0;u<128;u++){const n=String.fromCharCode(u);t.push(n)}for(let u=0;u<e.length;u++){const n=e.charCodeAt(u);t[n]="%"+("0"+n.toString(16).toUpperCase()).slice(-2)}return t}function nn(e,t){typeof t!="string"&&(t=nn.defaultChars);const u=ab(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(n){let r="";for(let i=0,s=n.length;i<s;i+=3){const o=parseInt(n.slice(i+1,i+3),16);if(o<128){r+=u[o];continue}if((o&224)===192&&i+3<s){const c=parseInt(n.slice(i+4,i+6),16);if((c&192)===128){const l=o<<6&1984|c&63;l<128?r+="<22><>":r+=String.fromCharCode(l),i+=3;continue}}if((o&240)===224&&i+6<s){const c=parseInt(n.slice(i+4,i+6),16),l=parseInt(n.slice(i+7,i+9),16);if((c&192)===128&&(l&192)===128){const a=o<<12&61440|c<<6&4032|l&63;a<2048||a>=55296&&a<=57343?r+="<22><><EFBFBD>":r+=String.fromCharCode(a),i+=6;continue}}if((o&248)===240&&i+9<s){const c=parseInt(n.slice(i+4,i+6),16),l=parseInt(n.slice(i+7,i+9),16),a=parseInt(n.slice(i+10,i+12),16);if((c&192)===128&&(l&192)===128&&(a&192)===128){let f=o<<18&1835008|c<<12&258048|l<<6&4032|a&63;f<65536||f>1114111?r+="<22><><EFBFBD><EFBFBD>":(f-=65536,r+=String.fromCharCode(55296+(f>>10),56320+(f&1023))),i+=9;continue}}r+="<22>"}return r})}nn.defaultChars=";/?:@&=+$,#";nn.componentChars="";const hl={};function fb(e){let t=hl[e];if(t)return t;t=hl[e]=[];for(let u=0;u<128;u++){const n=String.fromCharCode(u);/^[0-9a-z]$/i.test(n)?t.push(n):t.push("%"+("0"+u.toString(16).toUpperCase()).slice(-2))}for(let u=0;u<e.length;u++)t[e.charCodeAt(u)]=e[u];return t}function or(e,t,u){typeof t!="string"&&(u=t,t=or.defaultChars),typeof u>"u"&&(u=!0);const n=fb(t);let r="";for(let i=0,s=e.length;i<s;i++){const o=e.charCodeAt(i);if(u&&o===37&&i+2<s&&/^[0-9a-f]{2}$/i.test(e.slice(i+1,i+3))){r+=e.slice(i,i+3),i+=2;continue}if(o<128){r+=n[o];continue}if(o>=55296&&o<=57343){if(o>=55296&&o<=56319&&i+1<s){const c=e.charCodeAt(i+1);if(c>=56320&&c<=57343){r+=encodeURIComponent(e[i]+e[i+1]),i++;continue}}r+="%EF%BF%BD";continue}r+=encodeURIComponent(e[i])}return r}or.defaultChars=";/?:@&=+$,-_.!~*'()#";or.componentChars="-_.!~*'()";function zo(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function ii(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const db=/^([a-z0-9.+-]+:)/i,hb=/:[0-9]*$/,pb=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,mb=["<",">",'"',"`"," ","\r",`
`," "],bb=["{","}","|","\\","^","`"].concat(mb),gb=["'"].concat(bb),pl=["%","/","?",";","#"].concat(gb),ml=["/","?","#"],_b=255,bl=/^[+a-z0-9A-Z_-]{0,63}$/,yb=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,gl={javascript:!0,"javascript:":!0},_l={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Ko(e,t){if(e&&e instanceof ii)return e;const u=new ii;return u.parse(e,t),u}ii.prototype.parse=function(e,t){let u,n,r,i=e;if(i=i.trim(),!t&&e.split("#").length===1){const l=pb.exec(i);if(l)return this.pathname=l[1],l[2]&&(this.search=l[2]),this}let s=db.exec(i);if(s&&(s=s[0],u=s.toLowerCase(),this.protocol=s,i=i.substr(s.length)),(t||s||i.match(/^\/\/[^@\/]+@[^@\/]+/))&&(r=i.substr(0,2)==="//",r&&!(s&&gl[s])&&(i=i.substr(2),this.slashes=!0)),!gl[s]&&(r||s&&!_l[s])){let l=-1;for(let p=0;p<ml.length;p++)n=i.indexOf(ml[p]),n!==-1&&(l===-1||n<l)&&(l=n);let a,f;l===-1?f=i.lastIndexOf("@"):f=i.lastIndexOf("@",l),f!==-1&&(a=i.slice(0,f),i=i.slice(f+1),this.auth=a),l=-1;for(let p=0;p<pl.length;p++)n=i.indexOf(pl[p]),n!==-1&&(l===-1||n<l)&&(l=n);l===-1&&(l=i.length),i[l-1]===":"&&l--;const h=i.slice(0,l);i=i.slice(l),this.parseHost(h),this.hostname=this.hostname||"";const d=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!d){const p=this.hostname.split(/\./);for(let _=0,D=p.length;_<D;_++){const S=p[_];if(S&&!S.match(bl)){let E="";for(let m=0,g=S.length;m<g;m++)S.charCodeAt(m)>127?E+="x":E+=S[m];if(!E.match(bl)){const m=p.slice(0,_),g=p.slice(_+1),x=S.match(yb);x&&(m.push(x[1]),g.unshift(x[2])),g.length&&(i=g.join(".")+i),this.hostname=m.join(".");break}}}}this.hostname.length>_b&&(this.hostname=""),d&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const o=i.indexOf("#");o!==-1&&(this.hash=i.substr(o),i=i.slice(0,o));const c=i.indexOf("?");return c!==-1&&(this.search=i.substr(c),i=i.slice(0,c)),i&&(this.pathname=i),_l[u]&&this.hostname&&!this.pathname&&(this.pathname=""),this};ii.prototype.parseHost=function(e){let t=hb.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const xb=Object.freeze(Object.defineProperty({__proto__:null,decode:nn,encode:or,format:zo,parse:Ko},Symbol.toStringTag,{value:"Module"})),Sf=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Af=/[\0-\x1F\x7F-\x9F]/,Eb=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,Wo=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uD
`};Dt.fence=function(e,t,u,n,r){const i=e[t],s=i.info?rn(i.info).trim():"";let o="",c="";if(s){const a=s.split(/(\s+)/g);o=a[0],c=a.slice(2).join("")}let l;if(u.highlight?l=u.highlight(i.content,o,c)||au(i.content):l=au(i.content),l.indexOf("<pre")===0)return l+`
`;if(s){const a=i.attrIndex("class"),f=i.attrs?i.attrs.slice():[];a<0?f.push(["class",u.langPrefix+o]):(f[a]=f[a].slice(),f[a][1]+=" "+u.langPrefix+o);const h={attrs:f};return`<pre><code${r.renderAttrs(h)}>${l}</code></pre>
`}return`<pre><code${r.renderAttrs(i)}>${l}</code></pre>
`};Dt.image=function(e,t,u,n,r){const i=e[t];return i.attrs[i.attrIndex("alt")][1]=r.renderInlineAsText(i.children,u,n),r.renderToken(e,t,u)};Dt.hardbreak=function(e,t,u){return u.xhtmlOut?`<br />
`:`<br>
`};Dt.softbreak=function(e,t,u){return u.breaks?u.xhtmlOut?`<br />
`:`<br>
`:`
`};Dt.text=function(e,t){return au(e[t].content)};Dt.html_block=function(e,t){return e[t].content};Dt.html_inline=function(e,t){return e[t].content};function an(){this.rules=Ri({},Dt)}an.prototype.renderAttrs=function(t){let u,n,r;if(!t.attrs)return"";for(r="",u=0,n=t.attrs.length;u<n;u++)r+=" "+au(t.attrs[u][0])+'="'+au(t.attrs[u][1])+'"';return r};an.prototype.renderToken=function(t,u,n){const r=t[u];let i="";if(r.hidden)return"";r.block&&r.nesting!==-1&&u&&t[u-1].hidden&&(i+=`
`),i+=(r.nesting===-1?"</":"<")+r.tag,i+=this.renderAttrs(r),r.nesting===0&&n.xhtmlOut&&(i+=" /");let s=!1;if(r.block&&(s=!0,r.nesting===1&&u+1<t.length)){const o=t[u+1];(o.type==="inline"||o.hidden||o.nesting===-1&&o.tag===r.tag)&&(s=!1)}return i+=s?`>
`:">",i};an.prototype.renderInline=function(e,t,u){let n="";const r=this.rules;for(let i=0,s=e.length;i<s;i++){const o=e[i].type;typeof r[o]<"u"?n+=r[o](e,i,t,u,this):n+=this.renderToken(e,i,t)}return n};an.prototype.renderInlineAsText=function(e,t,u){let n="";for(let r=0,i=e.length;r<i;r++)switch(e[r].type){case"text":n+=e[r].content;break;case"image":n+=this.renderInlineAsText(e[r].children,t,u);break;case"html_inline":case"html_block":n+=e[r].content;break;case"softbreak":case"hardbreak":n+=`
`;break}return n};an.prototype.render=function(e,t,u){let n="";const r=this.rules;for(let i=0,s=e.length;i<s;i++){const o=e[i].type;o==="inline"?n+=this.renderInline(e[i].children,t,u):typeof r[o]<"u"?n+=r[o](e,i,t,u,this):n+=this.renderToken(e,i,t,u)}return n};function Je(){this.__rules__=[],this.__cache__=null}Je.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1};Je.prototype.__compile__=function(){const e=this,t=[""];e.__rules__.forEach(function(u){u.enabled&&u.alt.forEach(function(n){t.indexOf(n)<0&&t.push(n)})}),e.__cache__={},t.forEach(function(u){e.__cache__[u]=[],e.__rules__.forEach(function(n){n.enabled&&(u&&n.alt.indexOf(u)<0||e.__cache__[u].push(n.fn))})})};Je.prototype.at=function(e,t,u){const n=this.__find__(e),r=u||{};if(n===-1)throw new Error("Parser rule not found: "+e);this.__rules__[n].fn=t,this.__rules__[n].alt=r.alt||[],this.__cache__=null};Je.prototype.before=function(e,t,u,n){const r=this.__find__(e),i=n||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(r,0,{name:t,enabled:!0,fn:u,alt:i.alt||[]}),this.__cache__=null};Je.prototype.after=function(e,t,u,n){const r=this.__find__(e),i=n||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(r+1,0,{name:t,enabled:!0,fn:u,alt:i.alt||[]}),this.__cache__=null};Je.prototype.push=function(e,t,u){const n=u||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:n.alt||[]}),this.__cache__=null};Je.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);const u=[];return e.forEach(function(n){const r=this.__find__(n);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+n)}this.__rules__[r].enabled=!0,u.push(n)},this),this.__cache__=null,u};Je.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(u){u.enabled=!1}),this.enable(e,t)};Je.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);const u=[];return e.forEach(function(n){const r=this.__find__(n);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+n)}this.__rules__[r].enabled=!1,u.push(n)},this),this.__cache__=null,u};Je.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function _t(e,t,u){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=u,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}_t.prototype.attrIndex=function(t){if(!this.attrs)return-1;const u=this.attrs;for(let n=0,r=u.length;n<r;n++)if(u[n][0]===t)return n;return-1};_t.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]};_t.prototype.attrSet=function(t,u){const n=this.attrIndex(t),r=[t,u];n<0?this.attrPush(r):this.attrs[n]=r};_t.prototype.attrGet=function(t){const u=this.attrIndex(t);let n=null;return u>=0&&(n=this.attrs[u][1]),n};_t.prototype.attrJoin=function(t,u){const n=this.attrIndex(t);n<0?this.attrPush([t,u]):this.attrs[n][1]=this.attrs[n][1]+" "+u};function Of(e,t,u){this.src=e,this.env=u,this.tokens=[],this.inlineMode=!1,this.md=t}Of.prototype.Token=_t;const tg=/\r\n?|\n/g,ug=/\0/g;function ng(e){let t;t=e.src.replace(tg,`
`),t=t.replace(ug,"<22>"),e.src=t}function rg(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function ig(e){const t=e.tokens;for(let u=0,n=t.length;u<n;u++){const r=t[u];r.type==="inline"&&e.md.inline.parse(r.content,e.md,e.env,r.children)}}function sg(e){return/^<a[>\s]/i.test(e)}function og(e){return/^<\/a\s*>/i.test(e)}function cg(e){const t=e.tokens;if(e.md.options.linkify)for(let u=0,n=t.length;u<n;u++){if(t[u].type!=="inline"||!e.md.linkify.pretest(t[u].content))continue;let r=t[u].children,i=0;for(let s=r.length-1;s>=0;s--){const o=r[s];if(o.type==="link_close"){for(s--;r[s].level!==o.level&&r[s].type!=="link_open";)s--;continue}if(o.type==="html_inline"&&(sg(o.content)&&i>0&&i--,og(o.content)&&i++),!(i>0)&&o.type==="text"&&e.md.linkify.test(o.content)){const c=o.content;let l=e.md.linkify.match(c);const a=[];let f=o.level,h=0;l.length>0&&l[0].index===0&&s>0&&r[s-1].type==="text_special"&&(l=l.slice(1));for(let d=0;d<l.length;d++){const p=l[d].url,_=e.md.normalizeLink(p);if(!e.md.validateLink(_))continue;let D=l[d].text;l[d].schema?l[d].schema==="mailto:"&&!/^mailto:/i.test(D)?D=e.md.normalizeLinkText("mailto:"+D).replace(/^mailto:/,""):D=e.md.normalizeLinkText(D):D=e.md.normalizeLinkText("http://"+D).replace(/^http:\/\//,"");const S=l[d].index;if(S>h){const x=new e.Token("text","",0);x.content=c.slice(h,S),x.level=f,a.push(x)}const E=new e.Token("link_open","a",1);E.attrs=[["href",_]],E.level=f++,E.markup="linkify",E.info="auto",a.push(E);const m=new e.Token("text","",0);m.content=D,m.level=f,a.push(m);const g=new e.Token("link_close","a",-1);g.level=--f,g.markup="linkify",g.info="auto",a.push(g),h=l[d].lastIndex}if(h<c.length){const d=new e.Token("text","",0);d.content=c.slice(h),d.level=f,a.push(d)}t[u].children=r=Ff(r,s,a)}}}}const Nf=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,lg=/\((c|tm|r)\)/i,ag=/\((c|tm|r)\)/ig,fg={c:"©",r:"®",tm:"™"};function dg(e,t){return fg[t.toLowerCase()]}function hg(e){let t=0;for(let u=e.length-1;u>=0;u--){const n=e[u];n.type==="text"&&!t&&(n.content=n.content.replace(ag,dg)),n.type==="link_open"&&n.info==="auto"&&t--,n.type==="link_close"&&n.info==="auto"&&t++}}function pg(e){let t=0;for(let u=e.length-1;u>=0;u--){const n=e[u];n.type==="text"&&!t&&Nf.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1")),n.type==="link_open"&&n.info==="auto"&&t--,n.type==="link_close"&&n.info==="auto"&&t++}}function mg(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(lg.test(e.tokens[t].content)&&hg(e.tokens[t].children),Nf.test(e.tokens[t].content)&&pg(e.tokens[t].children))}const bg=/['"]/,yl=/['"]/g,xl="";function Cr(e,t,u){return e.slice(0,t)+u+e.slice(t+1)}function gg(e,t){let u;const n=[];for(let r=0;r<e.length;r++){const i=e[r],s=e[r].level;for(u=n.length-1;u>=0&&!(n[u].level<=s);u--);if(n.length=u+1,i.type!=="text")continue;let o=i.content,c=0,l=o.length;e:for(;c<l;){yl.lastIndex=c;const a=yl.exec(o);if(!a)break;let f=!0,h=!0;c=a.index+1;const d=a[0]==="'";let p=32;if(a.index-1>=0)p=o.charCodeAt(a.index-1);else for(u=r-1;u>=0&&!(e[u].type==="softbreak"||e[u].type==="hardbreak");u--)if(e[u].content){p=e[u].content.charCodeAt(e[u].content.length-1);break}let _=32;if(c<l)_=o.charCodeAt(c);else for(u=r+1;u<e.length&&!(e[u].type==="softbreak"||e[u].type==="hardbreak");u++)if(e[u].content){_=e[u].content.charCodeAt(0);break}const D=Zn(p)||Gn(String.fromCharCode(p)),S=Zn(_)||Gn(String.fromCharCode(_)),E=Wn(p),m=Wn(_);if(m?f=!1:S&&(E||D||(f=!1)),E?h=!1:D&&(m||S||(h=!1)),_===34&&a[0]==='"'&&p>=48&&p<=57&&(h=f=!1),f&&h&&(f=D,h=S),!f&&!h){d&&(i.content=Cr(i.content,a.index,xl));continue}if(h)for(u=n.length-1;u>=0;u--){let g=n[u];if(n[u].level<s)break;if(g.single===d&&n[u].level===s){g=n[u];let x,k;d?(x=t.md.optio
`,i.map=[t,e.line],!0}function kg(e,t,u,n){let r=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||r+3>i)return!1;const s=e.src.charCodeAt(r);if(s!==126&&s!==96)return!1;let o=r;r=e.skipChars(r,s);let c=r-o;if(c<3)return!1;const l=e.src.slice(o,r),a=e.src.slice(r,i);if(s===96&&a.indexOf(String.fromCharCode(s))>=0)return!1;if(n)return!0;let f=t,h=!1;for(;f++,!(f>=u||(r=o=e.bMarks[f]+e.tShift[f],i=e.eMarks[f],r<i&&e.sCount[f]<e.blkIndent));)if(e.src.charCodeAt(r)===s&&!(e.sCount[f]-e.blkIndent>=4)&&(r=e.skipChars(r,s),!(r-o<c)&&(r=e.skipSpaces(r),!(r<i)))){h=!0;break}c=e.sCount[t],e.line=f+(h?1:0);const d=e.push("fence","code",0);return d.info=a,d.content=e.getLines(t+1,f,c,!0),d.markup=l,d.map=[t,e.line],!0}function Sg(e,t,u,n){let r=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];const s=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(r)!==62)return!1;if(n)return!0;const o=[],c=[],l=[],a=[],f=e.md.block.ruler.getRules("blockquote"),h=e.parentType;e.parentType="blockquote";let d=!1,p;for(p=t;p<u;p++){const m=e.sCount[p]<e.blkIndent;if(r=e.bMarks[p]+e.tShift[p],i=e.eMarks[p],r>=i)break;if(e.src.charCodeAt(r++)===62&&!m){let x=e.sCount[p]+1,k,I;e.src.charCodeAt(r)===32?(r++,x++,I=!1,k=!0):e.src.charCodeAt(r)===9?(k=!0,(e.bsCount[p]+x)%4===3?(r++,x++,I=!1):I=!0):k=!1;let w=x;for(o.push(e.bMarks[p]),e.bMarks[p]=r;r<i;){const C=e.src.charCodeAt(r);if(ae(C))C===9?w+=4-(w+e.bsCount[p]+(I?1:0))%4:w++;else break;r++}d=r>=i,c.push(e.bsCount[p]),e.bsCount[p]=e.sCount[p]+1+(k?1:0),l.push(e.sCount[p]),e.sCount[p]=w-x,a.push(e.tShift[p]),e.tShift[p]=r-e.bMarks[p];continue}if(d)break;let g=!1;for(let x=0,k=f.length;x<k;x++)if(f[x](e,p,u,!0)){g=!0;break}if(g){e.lineMax=p,e.blkIndent!==0&&(o.push(e.bMarks[p]),c.push(e.bsCount[p]),a.push(e.tShift[p]),l.push(e.sCount[p]),e.sCount[p]-=e.blkIndent);break}o.push(e.bMarks[p]),c.push(e.bsCount[p]),a.push(e.tShift[p]),l.push(e.sCount[p]),e.sCount[p]=-1}const _=e.blkIndent;e.blkIndent=0;const D=e.push("blockquote_open","blockquote",1);D.markup=">";const S=[t,0];D.map=S,e.md.block.tokenize(e,t,p);const E=e.push("blockquote_close","blockquote",-1);E.markup=">",e.lineMax=s,e.parentType=h,S[1]=e.line;for(let m=0;m<a.length;m++)e.bMarks[m+t]=o[m],e.tShift[m+t]=a[m],e.sCount[m+t]=l[m],e.bsCount[m+t]=c[m];return e.blkIndent=_,!0}function Ag(e,t,u,n){const r=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let i=e.bMarks[t]+e.tShift[t];const s=e.src.charCodeAt(i++);if(s!==42&&s!==45&&s!==95)return!1;let o=1;for(;i<r;){const l=e.src.charCodeAt(i++);if(l!==s&&!ae(l))return!1;l===s&&o++}if(o<3)return!1;if(n)return!0;e.line=t+1;const c=e.push("hr","hr",0);return c.map=[t,e.line],c.markup=Array(o+1).join(String.fromCharCode(s)),!0}function Cl(e,t){const u=e.eMarks[t];let n=e.bMarks[t]+e.tShift[t];const r=e.src.charCodeAt(n++);if(r!==42&&r!==45&&r!==43)return-1;if(n<u){const i=e.src.charCodeAt(n);if(!ae(i))return-1}return n}function kl(e,t){const u=e.bMarks[t]+e.tShift[t],n=e.eMarks[t];let r=u;if(r+1>=n)return-1;let i=e.src.charCodeAt(r++);if(i<48||i>57)return-1;for(;;){if(r>=n)return-1;if(i=e.src.charCodeAt(r++),i>=48&&i<=57){if(r-u>=10)return-1;continue}if(i===41||i===46)break;return-1}return r<n&&(i=e.src.charCodeAt(r),!ae(i))?-1:r}function vg(e,t){const u=e.level+2;for(let n=t+2,r=e.tokens.length-2;n<r;n++)e.tokens[n].level===u&&e.tokens[n].type==="paragraph_open"&&(e.tokens[n+2].hidden=!0,e.tokens[n].hidden=!0,n+=2)}function Dg(e,t,u,n){let r,i,s,o,c=t,l=!0;if(e.sCount[c]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[c]-e.listIndent>=4&&e.sCount[c]<e.blkIndent)return!1;let a=!1;n&&e.parentType==="paragraph"&&e.sCount[c]>=e.blkIndent&&(a=!0);let f,h,d;if((d=kl(e,c))>=0){if(f=!0,s=e.bMarks[c]+e.tShift[c],h=Number(e.src.slice(s,d-1)),a&&h!==1)return!1}else if((d=Cl(e,c))>=0)f=!1;else return!1;if(a&&e.skipSpaces(d)>=e.eMarks[c])return!1;if(n)return!0;const p=e.src.charCodeAt(d-1),_=e.tokens.length;f?(o=e.push("ordered_list_open","ol",1),h!==1&&(o.attrs=[["start",h]])):o=e.push("bullet_list_open","ul",1);const D=[c,0];o.map=D,o.markup=String.fromCharCode(p);let S=!1;const E=e.md.block.ruler.ge
`,n)});Ru(this,Qn);Ru(this,Yn,"");Ru(this,Xn,!1);Ru(this,Wu,!1);Ru(this,_u,u=>u);hn(this,Xn,(u==null?void 0:u.allowCR)??!1),hn(this,Wu,(u==null?void 0:u.returnEmptyLines)??!1),hn(this,_u,(u==null?void 0:u.mapperFun)??qt(this,_u))}}Yn=new WeakMap,Xn=new WeakMap,Wu=new WeakMap,_u=new WeakMap,Qn=new WeakSet,js=function(u,n){for(u=qt(this,Yn)+u;;){const r=u.indexOf(`
`);if(qt(this,Xn)){const i=u.indexOf("\r");if(i!==-1&&i!==u.length-1&&(r===-1||r-1>i)){const s=qt(this,_u).call(this,u.slice(0,crOrLfIndex));(qt(this,Wu)||s)&&n.enqueue(s),u=u.slice(i+1);continue}}if(r!==-1){let i=r;u[r-1]==="\r"&&i--;const s=qt(this,_u).call(this,u.slice(0,i));(qt(this,Wu)||s)&&n.enqueue(s),u=u.slice(r+1);continue}break}hn(this,Yn,u)};const J3=e=>!!e.toLowerCase,Y3=e=>e===!0||e===!1,X3=e=>!J3(e)&&!isNaN(e)&&!Y3(e),Q3=e=>e.replace(/>/g,"&gt;").replace(/"/g,"&quot;"),Zf=e=>navigator.clipboard.writeText(e),e_=localStorage.getItem("base")||new URL(".",document.baseURI).href.toString().replace(/\/$/,""),ci={apiKey:"",systemMessage:"You are a helpful assistant.",showTokensPerSecond:!1,samplers:"dkypmxt",temperature:.8,dynatemp_range:0,dynatemp_exponent:1,top_k:40,top_p:.95,min_p:.05,xtc_probability:0,xtc_threshold:.1,typical_p:1,repeat_last_n:64,repeat_penalty:1,presence_penalty:0,frequency_penalty:0,dry_multiplier:0,dry_base:1.75,dry_allowed_length:2,dry_penalty_last_n:-1,max_tokens:-1,custom:""},t_={apiKey:"Set the API Key if you are using --api-key option for the server.",systemMessage:"The starting message that defines how model should behave.",samplers:'The order at which samplers are applied, in simplified way. Default is "dkypmxt": dry->top_k->typ_p->top_p->min_p->xtc->temperature',temperature:"Controls the randomness of the generated text by affecting the probability distribution of the output tokens. Higher = more random, lower = more focused.",dynatemp_range:"Addon for the temperature sampler. The added value to the range of dynamic temperature, which adjusts probabilities by entropy of tokens.",dynatemp_exponent:"Addon for the temperature sampler. Smoothes out the probability redistribution based on the most probable token.",top_k:"Keeps only k top tokens.",top_p:"Limits tokens to those that together have a cumulative probability of at least p",min_p:"Limits tokens based on the minimum probability for a token to be considered, relative to the probability of the most likely token.",xtc_probability:"XTC sampler cuts out top tokens; this parameter controls the chance of cutting tokens at all. 0 disables XTC.",xtc_threshold:"XTC sampler cuts out top tokens; this parameter controls the token probability that is required to cut that token.",typical_p:"Sorts and limits tokens based on the difference between log-probability and entropy.",repeat_last_n:"Last n tokens to consider for penalizing repetition",repeat_penalty:"Controls the repetition of token sequences in the generated text",presence_penalty:"Limits tokens based on whether they appear in the output or not.",frequency_penalty:"Limits tokens based on how often they appear in the output.",dry_multiplier:"DRY sampling reduces repetition in generated text even across long contexts. This parameter sets the DRY sampling multiplier.",dry_base:"DRY sampling reduces repetition in generated text even across long contexts. This parameter sets the DRY sampling base value.",dry_allowed_length:"DRY sampling reduces repetition in generated text even across long contexts. This parameter sets the allowed length for DRY sampling.",dry_penalty_last_n:"DRY sampling reduces repetition in generated text even across long contexts. This parameter sets DRY penalty for the last n tokens.",max_tokens:"The maximum number of token per output.",custom:""},u_=Object.entries(ci).filter(e=>X3(e[1])).map(e=>e[0]),n_=["light","dark","cupcake","bumblebee","emerald","corporate","synthwave","retro","cyberpunk","valentine","halloween","garden","forest","aqua","lofi","pastel","fantasy","wireframe","black","luxury","dracula","cmyk","autumn","business","acid","lemonade","night","coffee","winter","dim","nord","sunset"],Jf=ln(e=>{const t=to(new at({breaks:!0})),u=t.value.renderer.rules.fence;t.value.renderer.rules.fence=(r,i,...s)=>{const o=r[i].content,c=u(r,i,...s);return`<div class="relative my-4">
<div class="text-right sticky top-4 mb-2 mr-2 h-0">
<button class="badge btn-mini" onclick="copyStr(${Q3(JSON.stringify(o))})">📋 Copy</button>
</div>
${c}
</div>`},window.copyStr=Zf;const n=Eo(()=>t.value.render(e.source));return()=>Co("div",{innerHTML:n.value})},{props:["source"]}),r_=ln({template:document.getElementById("settings-modal-short-input").innerHTML,props:{label:{type:String,required:!1},configKey:String,configDefault:Object,configInfo:Object,modelValue:[Object,String,Number]}}),i_=ln({components:{VueMarkdown:Jf},template:document.getElementById("message-bubble").innerHTML,props:{config:Object,msg:Object,isGenerating:Boolean,editUserMsgAndRegenerate:Function,regenerateMsg:Function},data(){return{editingContent:null}},computed:{timings(){return this.msg.timings?{...this.msg.timings,prompt_per_second:this.msg.timings.prompt_n/(this.msg.timings.prompt_ms/1e3),predicted_per_second:this.msg.timings.predicted_n/(this.msg.timings.predicted_ms/1e3)}:null}},methods:{copyMsg(){Zf(this.msg.content)},editMsg(){this.editUserMsgAndRegenerate({...this.msg,content:this.editingContent}),this.editingContent=null}}}),he={getAllConversations(){const e=[];for(const t in localStorage)t.startsWith("conv-")&&e.push(JSON.parse(localStorage.getItem(t)));return e.sort((t,u)=>u.lastModified-t.lastModified),e},getOneConversation(e){return JSON.parse(localStorage.getItem(e)||"null")},appendMsg(e,t){if(t.content===null)return;const u=he.getOneConversation(e)||{id:e,lastModified:Date.now(),messages:[]};u.messages.push(t),u.lastModified=Date.now(),localStorage.setItem(e,JSON.stringify(u))},getNewConvId(){return`conv-${Date.now()}`},remove(e){localStorage.removeItem(e)},filterAndKeepMsgs(e,t){const u=he.getOneConversation(e);u&&(u.messages=u.messages.filter(t),u.lastModified=Date.now(),localStorage.setItem(e,JSON.stringify(u)))},popMsg(e){const t=he.getOneConversation(e);if(!t)return;const u=t.messages.pop();return t.lastModified=Date.now(),t.messages.length===0?he.remove(e):localStorage.setItem(e,JSON.stringify(t)),u},getConfig(){const e=JSON.parse(localStorage.getItem("config")||"{}");return{...ci,...e}},setConfig(e){localStorage.setItem("config",JSON.stringify(e))},getTheme(){return localStorage.getItem("theme")||"auto"},setTheme(e){e==="auto"?localStorage.removeItem("theme"):localStorage.setItem("theme",e)}},Sr=e=>{const t=document.getElementById("messages-list"),u=t.scrollHeight-t.scrollTop-t.clientHeight;(!e||u<100)&&setTimeout(()=>t.scrollTo({top:t.scrollHeight}),1)};async function*s_(e,t){const n=(await fetch(e,t)).body.pipeThrough(new TextDecoderStream).pipeThrough(new Z3);for await(const r of n)if(r.startsWith("data:")&&!r.endsWith("[DONE]"))yield JSON.parse(r.slice(5));else if(r.startsWith("error:")){const i=JSON.parse(r.slice(6));throw new Error(i.message||"Unknown error")}}const Yf=Jr({components:{VueMarkdown:Jf,SettingsModalShortInput:r_,MessageBubble:i_},data(){return{conversations:he.getAllConversations(),messages:[],viewingConvId:he.getNewConvId(),inputMsg:"",isGenerating:!1,pendingMsg:null,stopGeneration:()=>{},selectedTheme:he.getTheme(),config:he.getConfig(),showConfigDialog:!1,themes:n_,configDefault:{...ci},configInfo:{...t_}}},computed:{},mounted(){document.getElementById("app").classList.remove("opacity-0");const e=document.getElementById("pending-msg");new ResizeObserver(()=>{this.isGenerating&&Sr(!0)}).observe(e)},watch:{viewingConvId:function(e,t){e!=t&&(this.fetchMessages(),Sr(),this.hideSidebar())}},methods:{hideSidebar(){document.getElementById("toggle-drawer").checked=!1},setSelectedTheme(e){this.selectedTheme=e,he.setTheme(e)},newConversation(){this.isGenerating||(this.viewingConvId=he.getNewConvId())},setViewingConv(e){this.isGenerating||(this.viewingConvId=e)},deleteConv(e){this.isGenerating||window.confirm("Are you sure to delete this conversation?")&&(he.remove(e),this.viewingConvId===e&&(this.viewingConvId=he.getNewConvId()),this.fetchConversation(),this.fetchMessages())},downloadConv(e){const t=he.getOneConversation(e);if(!t){alert("Conversation not found.");return}const u=JSON.stringify(t,null,2),n=new Blob([u],{type:"application/json"}),r=URL.createObjectURL(n),i=document.createElement("a");i.href=r,i.download=`conversation_${e}.json`,document.body
Failed to start app. Please try clearing localStorage and try again.<br/>
<br/>
<button class="btn" onClick="localStorage.clear(); window.location.reload();">Clear localStorage</button>
</div>`}</script>
<style rel="stylesheet" crossorigin>*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webki
</head>
<body>
<div id="app" class="opacity-0"> <!-- opacity-0 will be removed on app mounted -->
<div class="flex flex-row drawer lg:drawer-open">
<input id="toggle-drawer" type="checkbox" class="drawer-toggle" checked />
<!-- sidebar -->
<div class="drawer-side h-screen lg:h-screen z-50 lg:max-w-64">
<label for="toggle-drawer" aria-label="close sidebar" class="drawer-overlay"></label>
<div class="flex flex-col bg-base-200 min-h-full max-w-64 py-4 px-4">
<div class="flex flex-row items-center justify-between mb-4 mt-4">
<h2 class="font-bold ml-4">Conversations</h2>
<!-- close sidebar button -->
<label for="toggle-drawer" class="btn btn-ghost lg:hidden">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-bar-left" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M12.5 15a.5.5 0 0 1-.5-.5v-13a.5.5 0 0 1 1 0v13a.5.5 0 0 1-.5.5M10 8a.5.5 0 0 1-.5.5H3.707l2.147 2.146a.5.5 0 0 1-.708.708l-3-3a.5.5 0 0 1 0-.708l3-3a.5.5 0 1 1 .708.708L3.707 7.5H9.5a.5.5 0 0 1 .5.5"/>
</svg>
</label>
</div>
<!-- list of conversations -->
<div :class="{
'btn btn-ghost justify-start': true,
'btn-active': messages.length === 0,
}" @click="newConversation">
+ New conversation
</div>
<div v-for="conv in conversations" :class="{
'btn btn-ghost justify-start font-normal': true,
'btn-active': conv.id === viewingConvId,
}" @click="setViewingConv(conv.id)">
<span class="truncate">{{ conv.messages[0].content }}</span>
</div>
<div class="text-center text-xs opacity-40 mt-auto mx-4">
Conversations are saved to browser's localStorage
</div>
</div>
</div>
<!-- main view -->
<div class="chat-screen drawer-content grow flex flex-col h-screen w-screen mx-auto px-4">
<!-- header -->
<div class="flex flex-row items-center mt-6 mb-6">
<!-- open sidebar button -->
<label for="toggle-drawer" class="btn btn-ghost lg:hidden">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-list" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5"/>
</svg>
</label>
<div class="grow text-2xl font-bold ml-2">llama.cpp</div>
<!-- action buttons (top right) -->
<div class="flex items-center">
<div v-if="messages.length > 0" class="dropdown dropdown-end">
<!-- "more" button -->
<button tabindex="0" role="button" class="btn m-1" :disabled="isGenerating">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-three-dots-vertical" viewBox="0 0 16 16">
<path d="M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"/>
</svg>
</button>
<!-- "more" dropdown menu -->
<ul tabindex="0" class="dropdown-content menu bg-base-100 rounded-box z-[1] w-52 p-2 shadow">
<li @click="downloadConv(viewingConvId)"><a>Download</a></li>
<li class="text-error" @click="deleteConv(viewingConvId)"><a>Delete</a></li>
</ul>
</div>
<button class="btn" @click="showConfigDialog = true" :disabled="isGenerating">
<!-- settings button -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-gear" viewBox="0 0 16 16">
<path d="M8 4.754a3.246 3.246 0 1 0 0 6.492 3.246 3.246 0 0 0 0-6.492M5.754 8a2.246 2.246 0 1 1 4.492 0 2.246 2.246 0 0 1-4.492 0"/>
<path d="M9.796 1.343c-.527-1.79-3.065-1.79-3.592 0l-.094.319a.873.873 0 0 1-1.255.52l-.292-.16c-1.64-.892-3.433.902-2.54 2.541l.159.292a.873.873 0 0 1-.52 1.255l-.319.094c-1.79.527-1.79 3.065 0 3.592l.319.094a.873.873 0 0 1 .52 1.255l-.16.292c-.892 1.64.901 3.434 2.541 2.54l.292-.159a.873.873 0 0 1 1.255.52l.094.319c.527 1.79 3.065 1.79 3.592 0l.094-.319a.873.873 0 0 1 1.255-.52l.292.16c1.64.893 3.434-.902 2.54-2.541l-.159-.292a.873.873 0 0 1 .52-1.255l.319-.094c1.79-.527 1.79-3.065 0-3.592l-.319-.094a.873.873 0 0 1-.52-1.255l.16-.292c.893-1.64-.902-3.433-2.541-2.54l-.292.159a.873.873 0 0 1-1.255-.52zm-2.633.283c.246-.835 1.428-.835 1.674 0l.094.319a1.873 1.873 0 0 0 2.693 1.115l.291-.16c.764-.415 1.6.42 1.184 1.185l-.159.292a1.873 1.873 0 0 0 1.116 2.692l.318.094c.835.246.835 1.428 0 1.674l-.319.094a1.873 1.873 0 0 0-1.115 2.693l.16.291c.415.764-.42 1.6-1.185 1.184l-.291-.159a1.873 1.873 0 0 0-2.693 1.116l-.094.318c-.246.835-1.428.835-1.674 0l-.094-.319a1.873 1.873 0 0 0-2.692-1.115l-.292.16c-.764.415-1.6-.42-1.184-1.185l.159-.291A1.873 1.873 0 0 0 1.945 8.93l-.319-.094c-.835-.246-.835-1.428 0-1.674l.319-.094A1.873 1.873 0 0 0 3.06 4.377l-.16-.292c-.415-.764.42-1.6 1.185-1.184l.292.159a1.873 1.873 0 0 0 2.692-1.115z"/>
</svg>
</button>
<!-- theme controller is copied from https://daisyui.com/components/theme-controller/ -->
<div class="dropdown dropdown-end dropdown-bottom">
<div tabindex="0" role="button" class="btn m-1">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-palette2" viewBox="0 0 16 16">
<path d="M0 .5A.5.5 0 0 1 .5 0h5a.5.5 0 0 1 .5.5v5.277l4.147-4.131a.5.5 0 0 1 .707 0l3.535 3.536a.5.5 0 0 1 0 .708L10.261 10H15.5a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-.5.5H3a3 3 0 0 1-2.121-.879A3 3 0 0 1 0 13.044m6-.21 7.328-7.3-2.829-2.828L6 7.188zM4.5 13a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0M15 15v-4H9.258l-4.015 4zM0 .5v12.495zm0 12.495V13z"/>
</svg>
</div>
<ul tabindex="0" class="dropdown-content bg-base-300 rounded-box z-[1] w-52 p-2 shadow-2xl h-80 overflow-y-auto">
<li>
<button
class="btn btn-sm btn-block btn-ghost justify-start"
:class="{ 'btn-active': selectedTheme === 'auto' }"
@click="setSelectedTheme('auto')">
auto
</button>
</li>
<li v-for="theme in themes">
<input
type="radio"
name="theme-dropdown"
class="theme-controller btn btn-sm btn-block btn-ghost justify-start"
:aria-label="theme"
:value="theme"
:checked="selectedTheme === theme"
@click="setSelectedTheme(theme)" />
</li>
</ul>
</div>
</div>
</div>
<!-- chat messages -->
<div id="messages-list" class="flex flex-col grow overflow-y-auto">
<div class="mt-auto flex justify-center">
<!-- placeholder to shift the message to the bottom -->
{{ messages.length === 0 ? 'Send a message to start' : '' }}
</div>
<div v-for="msg in messages" class="group">
<message-bubble
:config="config"
:msg="msg"
:key="msg.id"
:is-generating="isGenerating"
:edit-user-msg-and-regenerate="editUserMsgAndRegenerate"
:regenerate-msg="regenerateMsg"></message-bubble>
</div>
<!-- pending (ongoing) assistant message -->
<div id="pending-msg" class="group">
<message-bubble
v-if="pendingMsg"
:config="config"
:msg="pendingMsg"
:key="pendingMsg.id"
:is-generating="isGenerating"
:edit-user-msg-and-regenerate="() => {}"
:regenerate-msg="() => {}"></message-bubble>
</div>
</div>
<!-- chat input -->
<div class="flex flex-row items-center mt-8 mb-6">
<textarea
class="textarea textarea-bordered w-full"
placeholder="Type a message (Shift+Enter to add a new line)"
v-model="inputMsg"
@keydown.enter.exact.prevent="sendMessage"
@keydown.enter.shift.exact.prevent="inputMsg += '\n'"
:disabled="isGenerating"
id="msg-input"
></textarea>
<button v-if="!isGenerating" class="btn btn-primary ml-2" @click="sendMessage" :disabled="inputMsg.length === 0">Send</button>
<button v-else class="btn btn-neutral ml-2" @click="stopGeneration">Stop</button>
</div>
</div>
</div>
<!-- modal for editing config -->
<dialog class="modal" :class="{'modal-open': showConfigDialog}">
<div class="modal-box">
<h3 class="text-lg font-bold mb-6">Settings</h3>
<div class="h-[calc(90vh-12rem)] overflow-y-auto">
<p class="opacity-40 mb-6">Settings below are saved in browser's localStorage</p>
<settings-modal-short-input :config-key="'apiKey'" :config-default="configDefault" :config-info="configInfo" v-model="config.apiKey"></settings-modal-short-input>
<label class="form-control mb-2">
<div class="label">System Message</div>
<textarea class="textarea textarea-bordered h-24" :placeholder="'Default: ' + configDefault.systemMessage" v-model="config.systemMessage"></textarea>
</label>
<template v-for="configKey in ['temperature', 'top_k', 'top_p', 'min_p', 'max_tokens']">
<settings-modal-short-input :config-key="configKey" :config-default="configDefault" :config-info="configInfo" v-model="config[configKey]"></settings-modal-short-input>
</template>
<!-- TODO: add more sampling-related configs, please regroup them into different "collapse" sections -->
<!-- Section: Other sampler settings -->
<details class="collapse collapse-arrow bg-base-200 mb-2 overflow-visible">
<summary class="collapse-title font-bold">Other sampler settings</summary>
<div class="collapse-content">
<!-- Samplers queue -->
<settings-modal-short-input label="Samplers queue" :config-key="'samplers'" :config-default="configDefault" :config-info="configInfo" v-model="config.samplers"></settings-modal-short-input>
<!-- Samplers -->
<template v-for="configKey in ['dynatemp_range', 'dynatemp_exponent', 'typical_p', 'xtc_probability', 'xtc_threshold']">
<settings-modal-short-input :config-key="configKey" :config-default="configDefault" :config-info="configInfo" v-model="config[configKey]"></settings-modal-short-input>
</template>
</div>
</details>
<!-- Section: Penalties settings -->
<details class="collapse collapse-arrow bg-base-200 mb-2 overflow-visible">
<summary class="collapse-title font-bold">Penalties settings</summary>
<div class="collapse-content">
<template v-for="configKey in ['repeat_last_n', 'repeat_penalty', 'presence_penalty', 'frequency_penalty', 'dry_multiplier', 'dry_base', 'dry_allowed_length', 'dry_penalty_last_n']">
<settings-modal-short-input :config-key="configKey" :config-default="configDefault" :config-info="configInfo" v-model="config[configKey]"></settings-modal-short-input>
</template>
</div>
</details>
<!-- Section: Advanced config -->
<details class="collapse collapse-arrow bg-base-200 mb-2 overflow-visible">
<summary class="collapse-title font-bold">Advanced config</summary>
<div class="collapse-content">
<div class="flex flex-row items-center mb-2">
<input type="checkbox" class="checkbox" v-model="config.showTokensPerSecond" />
<span class="ml-4">Show tokens per second</span>
</div>
<label class="form-control mb-2">
<!-- Custom parameters input -->
<div class="label inline">Custom JSON config (For more info, refer to <a class="underline" href="https://github.com/ggerganov/llama.cpp/blob/master/examples/server/README.md" target="_blank" rel="noopener noreferrer">server documentation</a>)</div>
<textarea class="textarea textarea-bordered h-24" placeholder="Example: { &quot;mirostat&quot;: 1, &quot;min_p&quot;: 0.1 }" v-model="config.custom"></textarea>
</label>
</div>
</details>
</div>
<!-- action buttons -->
<div class="modal-action">
<button class="btn" @click="resetConfigDialog">Reset to default</button>
<button class="btn" @click="closeAndDiscardConfigDialog">Close</button>
<button class="btn btn-primary" @click="closeAndSaveConfigDialog">Save</button>
</div>
</div>
</dialog>
</div>
<!-- Template to be used as message bubble -->
<template id="message-bubble">
<div :class="{
'chat': true,
'chat-start': msg.role !== 'user',
'chat-end': msg.role === 'user',
}">
<div :class="{
'chat-bubble markdown': true,
'chat-bubble-base-300': msg.role !== 'user',
}">
<!-- textarea for editing message -->
<template v-if="editingContent !== null">
<textarea
class="textarea textarea-bordered bg-base-100 text-base-content w-[calc(90vw-8em)] lg:w-96"
v-model="editingContent"></textarea>
<br/>
<button class="btn btn-ghost mt-2 mr-2" @click="editingContent = null">Cancel</button>
<button class="btn mt-2" @click="editMsg()">Submit</button>
</template>
<template v-else>
<!-- show loading dots for pending message -->
<span v-if="msg.content === null" class="loading loading-dots loading-md"></span>
<!-- render message as markdown -->
<vue-markdown v-else :source="msg.content"></vue-markdown>
<!-- render timings if enabled -->
<div class="dropdown dropdown-hover dropdown-top mt-2" v-if="timings && config.showTokensPerSecond">
<div tabindex="0" role="button" class="cursor-pointer font-semibold text-sm opacity-60">Speed: {{ timings.predicted_per_second.toFixed(1) }} t/s</div>
<div class="dropdown-content bg-base-100 z-10 w-64 p-2 shadow mt-4">
<b>Prompt</b><br/>
- Tokens: {{ timings.prompt_n }}<br/>
- Time: {{ timings.prompt_ms }} ms<br/>
- Speed: {{ timings.prompt_per_second.toFixed(1) }} t/s<br/>
<b>Generation</b><br/>
- Tokens: {{ timings.predicted_n }}<br/>
- Time: {{ timings.predicted_ms }} ms<br/>
- Speed: {{ timings.predicted_per_second.toFixed(1) }} t/s<br/>
</div>
</div>
</template>
</div>
</div>
<!-- actions for each message -->
<div :class="{'text-right': msg.role === 'user', 'opacity-0': isGenerating}" class="mx-4 mt-2 mb-2">
<!-- user message -->
<button v-if="msg.role === 'user'" class="badge btn-mini show-on-hover" @click="editingContent = msg.content" :disabled="isGenerating">
✍️ Edit
</button>
<!-- assistant message -->
<button v-if="msg.role === 'assistant'" class="badge btn-mini show-on-hover mr-2" @click="regenerateMsg(msg)" :disabled="isGenerating">
🔄 Regenerate
</button>
<button v-if="msg.role === 'assistant'" class="badge btn-mini show-on-hover mr-2" @click="copyMsg()" :disabled="isGenerating">
📋 Copy
</button>
</div>
</template>
<!-- Template to be used by settings modal -->
<template id="settings-modal-short-input">
<label class="input input-bordered join-item grow flex items-center gap-2 mb-2">
<!-- Show help message on hovering on the input label -->
<div class="dropdown dropdown-hover">
<div tabindex="0" role="button" class="font-bold">{{ label || configKey }}</div>
<div class="dropdown-content menu bg-base-100 rounded-box z-10 w-64 p-2 shadow mt-4">
{{ configInfo[configKey] || '(no help message available)' }}
</div>
</div>
<!-- Here we forward v-model from parent to child component, see: https://stackoverflow.com/questions/47311936/v-model-and-child-components -->
<input type="text" class="grow" :placeholder="'Default: ' + (configDefault[configKey] || 'none')" :value="modelValue" @input="$emit('update:modelValue', $event.target.value)" />
</label>
</template>
</body>
</html>