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

391 lines
509 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>
2024-12-13 11:16:26 +00:00
<script type="module" crossorigin>var Sc=e=>{throw TypeError(e)};var us=(e,t,n)=>t.has(e)||Sc("Cannot "+n);var Wt=(e,t,n)=>(us(e,t,"read from private field"),n?n.call(e):t.get(e)),jn=(e,t,n)=>t.has(e)?Sc("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),wr=(e,t,n,r)=>(us(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),ss=(e,t,n)=>(us(e,t,"access private method"),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const u of i)if(u.type==="childList")for(const s of u.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const u={};return i.integrity&&(u.integrity=i.integrity),i.referrerPolicy&&(u.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?u.credentials="include":i.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function r(i){if(i.ep)return;i.ep=!0;const u=n(i);fetch(i.href,u)}})();/**
* @vue/shared v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
2024-12-13 11:16:26 +00:00
**//*! #__NO_SIDE_EFFECTS__ */function Ke(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const oe={},Qn=[],Fe=()=>{},Mr=()=>!1,Bn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),lo=e=>e.startsWith("onUpdate:"),ce=Object.assign,fo=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},jd=Object.prototype.hasOwnProperty,fe=(e,t)=>jd.call(e,t),j=Array.isArray,er=e=>Er(e)==="[object Map]",$n=e=>Er(e)==="[object Set]",Ac=e=>Er(e)==="[object Date]",Gd=e=>Er(e)==="[object RegExp]",Q=e=>typeof e=="function",te=e=>typeof e=="string",it=e=>typeof e=="symbol",he=e=>e!==null&&typeof e=="object",ho=e=>(he(e)||Q(e))&&Q(e.then)&&Q(e.catch),sl=Object.prototype.toString,Er=e=>sl.call(e),Wd=e=>Er(e).slice(8,-1),Du=e=>Er(e)==="[object Object]",po=e=>te(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,an=Ke(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Zd=Ke("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),Nu=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Yd=/-(\w)/g,_e=Nu(e=>e.replace(Yd,(t,n)=>n?n.toUpperCase():"")),Jd=/\B([A-Z])/g,Xe=Nu(e=>e.replace(Jd,"-$1").toLowerCase()),Un=Nu(e=>e.charAt(0).toUpperCase()+e.slice(1)),tr=Nu(e=>e?`on${Un(e)}`:""),Ye=(e,t)=>!Object.is(e,t),nr=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},cr=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},Xi=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Qi=e=>{const t=te(e)?Number(e):NaN;return isNaN(t)?e:t};let vc;const wn=()=>vc||(vc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Xd(e,t){return e+JSON.stringify(t,(n,r)=>typeof r=="function"?r.toString():r)}const Qd="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",eh=Ke(Qd);function xr(e){if(j(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],i=te(r)?ol(r):xr(r);if(i)for(const u in i)t[u]=i[u]}return t}else if(te(e)||he(e))return e}const th=/;(?![^(]*\))/g,nh=/:([^]+)/,rh=/\/\*[^]*?\*\//g;function ol(e){const t={};return e.replace(rh,"").split(th).forEach(n=>{if(n){const r=n.split(nh);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function ih(e){if(!e)return"";if(te(e))return e;let t="";for(const n in e){const r=e[n];if(te(r)||typeof r=="number"){const i=n.startsWith("--")?n:Xe(n);t+=`${i}:${r};`}}return t}function kr(e){let t="";if(te(e))t=e;else if(j(e))for(let n=0;n<e.length;n++){const r=kr(e[n]);r&&(t+=r+" ")}else if(he(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function uh(e){if(!e)return null;let{class:t,style:n}=e;return t&&!te(t)&&(e.class=kr(t)),n&&(e.style=xr(n)),e}const sh="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",oh="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,ra
* @vue/reactivity v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
2024-12-13 11:16:26 +00:00
**/let Ze;class bo{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Ze,!t&&Ze&&(this.index=(Ze.scopes||(Ze.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=Ze;try{return Ze=this,t()}finally{Ze=n}}}on(){Ze=this}off(){Ze=this.parent}stop(t){if(this._active){this._active=!1;let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(this.effects.length=0,n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0}}}function xh(e){return new bo(e)}function dl(){return Ze}function kh(e,t=!1){Ze&&Ze.cleanups.push(e)}let ge;const cs=new WeakSet;class jr{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,Ze&&Ze.active&&Ze.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,cs.has(this)&&(cs.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||pl(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,wc(this),gl(this);const t=ge,n=xt;ge=this,xt=!0;try{return this.fn()}finally{bl(this),ge=t,xt=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)yo(t);this.deps=this.depsTail=void 0,wc(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?cs.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ns(this)&&this.run()}get dirty(){return Ns(this)}}let hl=0,Pr,Br;function pl(e,t=!1){if(e.flags|=8,t){e.next=Br,Br=e;return}e.next=Pr,Pr=e}function mo(){hl++}function _o(){if(--hl>0)return;if(Br){let t=Br;for(Br=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Pr;){let t=Pr;for(Pr=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function gl(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function bl(e){let t,n=e.depsTail,r=n;for(;r;){const i=r.prevDep;r.version===-1?(r===n&&(n=i),yo(r),Ch(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=i}e.deps=t,e.depsTail=n}function Ns(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(ml(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function ml(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Gr))return;e.globalVersion=Gr;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!Ns(e)){e.flags&=-3;return}const n=ge,r=xt;ge=e,xt=!0;try{gl(e);const i=e.fn(e._value);(t.version===0||Ye(i,e._value))&&(e._value=i,t.version++)}catch(i){throw t.version++,i}finally{ge=n,xt=r,bl(e),e.flags&=-3}}function yo(e,t=!1){const{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let u=n.computed.deps;u;u=u.nextDep)yo(u,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Ch(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function Sh(e,t){e.effect instanceof jr&&(e=e.effect.fn);const n=new jr(e);t&&ce(n,t);try{n.run()}catch(i){throw n.stop(),i}const r=n.run.bind(n);return r.effect=n,r}function Ah(e){e.effect.stop()}let xt=!0;const _l=[];function qt(){_l.push(xt),xt=!1}function Kt(){const e=_l.pop();xt=e===void 0?!0:e}function wc(e){const{cleanup:t}=e;if(e
* @vue/runtime-core v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
2024-12-13 11:16:26 +00:00
**/const Nn=[];function sp(e){Nn.push(e)}function op(){Nn.pop()}let fs=!1;function Jt(e,...t){if(fs)return;fs=!0,qt();const n=Nn.length?Nn[Nn.length-1].component:null,r=n&&n.appContext.config.warnHandler,i=cp();if(r)Hn(r,n,11,[e+t.map(u=>{var s,o;return(o=(s=u.toString)==null?void 0:s.call(u))!=null?o:JSON.stringify(u)}).join(""),n&&n.proxy,i.map(({vnode:u})=>`at <${Vf(n,u.type)}>`).join(`
`),i]);else{const u=[`[Vue warn]: ${e}`,...t];i.length&&u.push(`
`,...ap(i)),console.warn(...u)}Kt(),fs=!1}function cp(){let e=Nn[Nn.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const r=e.component&&e.component.parent;e=r&&r.vnode}return t}function ap(e){const t=[];return e.forEach((n,r)=>{t.push(...r===0?[]:[`
`],...lp(n))}),t}function lp({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",r=e.component?e.component.parent==null:!1,i=` at <${Vf(e.component,e.type,r)}`,u=">"+n;return e.props?[i,...fp(e.props),u]:[i+u]}function fp(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(r=>{t.push(...Rl(r,e[r]))}),n.length>3&&t.push(" ..."),t}function Rl(e,t,n){return te(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:we(t)?(t=Rl(e,se(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):Q(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=se(t),n?t:[`${e}=`,t])}function dp(e,t){}const hp={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"},pp={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 Hn(e,t,n,r){try{return r?e(...r):e()}catch(i){Vn(i,t,n)}}function bt(e,t,n,r){if(Q(e)){const i=Hn(e,t,n,r);return i&&ho(i)&&i.catch(u=>{Vn(u,t,n)}),i}if(j(e)){const i=[];for(let u=0;u<e.length;u++)i.push(bt(e[u],t,n,r));return i}}function Vn(e,t,n,r=!0){const i=t?t.vnode:null,{errorHandler:u,throwUnhandledErrorInProduction:s}=t&&t.appContext.config||oe;if(t){let o=t.parent;const c=t.proxy,a=`https://vuejs.org/error-reference/#runtime-${n}`;for(;o;){const l=o.ec;if(l){for(let f=0;f<l.length;f++)if(l[f](e,c,a)===!1)return}o=o.parent}if(u){qt(),Hn(u,null,10,[e,c,a]),Kt();return}}gp(e,n,i,r,s)}function gp(e,t,n,r=!0,i=!1){if(i)throw e;console.error(e)}const Je=[];let vt=-1;const rr=[];let en=null,Jn=0;const Fl=Promise.resolve();let nu=null;function $u(e){const t=nu||Fl;return e?t.then(this?e.bind(this):e):t}function bp(e){let t=vt+1,n=Je.length;for(;t<n;){const r=t+n>>>1,i=Je[r],u=Yr(i);u<e||u===e&&i.flags&2?t=r+1:n=r}return t}function Co(e){if(!(e.flags&1)){const t=Yr(e),n=Je[Je.length-1];!n||!(e.flags&2)&&t>=Yr(n)?Je.push(e):Je.splice(bp(t),0,e),e.flags|=1,Ll()}}function Ll(){nu||(nu=Fl.then(Pl))}function Zr(e){j(e)?rr.push(...e):en&&e.id===-1?en.splice(Jn+1,0,e):e.flags&1||(rr.push(e),e.flags|=1),Ll()}function Nc(e,t,n=vt+1){for(;n<Je.length;n++){const r=Je[n];if(r&&r.flags&2){if(e&&r.id!==e.uid)continue;Je.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function ru(e){if(rr.length){const t=[...new Set(rr)].sort((n,r)=>Yr(n)-Yr(r));if(rr.length=0,en){en.push(...t);return}for(en=t,Jn=0;Jn<en.length;Jn++){const n=en[Jn];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}en=null,Jn=0}}const Yr=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Pl(e){try{for(vt=0;vt<Je.length;vt++){const t=Je[vt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Hn(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;vt<Je.length;vt++){const t=Je[vt];t&&(t.flags&=-2)}vt=-1,Je.length=0,ru(),nu=null,(Je.length||rr.length)&&Pl()}}let yt,Ir=[],Rs=!1;function Uu(e,...t){yt?yt.emit(e,...t):Rs||Ir.push({event:e,args:t})}function So(e,t){var n,r;yt=e,yt?(yt.enabled=!0,Ir.forEach(({event:i,args:u})=>yt.emit(i,...u)),Ir=[]):typeof window<"u"&&window.HTMLEleme
- rendered on server: ${JSON.stringify(g.data)}
- expected on client: ${JSON.stringify(b.children)}`),En(),g.data=b.children),K=u(g));break;case Ae:x(g)?(K=u(g),S(b.el=g.content.firstChild,g,E)):Y!==8||k?K=T():K=u(g);break;case dn:if(k&&(g=u(g),Y=g.nodeType),Y===1||Y===3){K=g;const v=!b.children.length;for(let N=0;N<b.staticCount;N++)v&&(b.children+=K.nodeType===1?K.outerHTML:K.data),N===b.staticCount-1&&(b.anchor=K),K=u(K);return k?u(K):K}else T();break;case Te:k?K=p(g,b,E,C,P,I):K=T();break;default:if(H&1)(Y!==1||b.type.toLowerCase()!==g.tagName.toLowerCase())&&!x(g)?K=T():K=d(g,b,E,C,P,I);else if(H&6){b.slotScopeIds=P;const v=s(g);if(k?K=A(g):Sn(g)&&g.data==="teleport start"?K=A(g,g.data,"teleport end"):K=u(g),t(b,v,null,E,C,Mi(v),I),fn(b)&&!b.type.__asyncResolved){let N;k?(N=me(Te),N.anchor=K?K.previousSibling:v.lastChild):N=g.nodeType===3?Bo(""):me("div"),N.el=g,b.component.subTree=N}}else H&64?Y!==8?K=T():K=b.type.hydrate(g,b,E,C,P,I,e,h):H&128?K=b.type.hydrate(g,b,E,C,Mi(s(g)),P,I,e,f):__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&Jt("Invalid HostVNode type:",U,`(${typeof U})`)}return D!=null&&Xr(D,null,C,b),K},d=(g,b,E,C,P,I)=>{I=I||!!b.dynamicChildren;const{type:k,props:T,patchFlag:U,shapeFlag:D,dirs:H,transition:Z}=b,Y=k==="input"||k==="option";if(Y||U!==-1){H&&Tt(b,null,E,"created");let K=!1;if(x(g)){K=xf(null,Z)&&E&&E.vnode.props&&E.vnode.props.appear;const N=g.content.firstChild;K&&Z.beforeEnter(N),S(N,g,E),b.el=g=N}if(D&16&&!(T&&(T.innerHTML||T.textContent))){let N=h(g.firstChild,b,g,E,C,P,I),W=!1;for(;N;){Rr(g,1)||(__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&!W&&(Jt("Hydration children mismatch on",g,`
Server rendered element contains more child nodes than client vdom.`),W=!0),En());const ne=N;N=N.nextSibling,o(ne)}}else if(D&8){let N=b.children;N[0]===`
`&&(g.tagName==="PRE"||g.tagName==="TEXTAREA")&&(N=N.slice(1)),g.textContent!==N&&(Rr(g,0)||(__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&Jt("Hydration text content mismatch on",g,`
- rendered on server: ${g.textContent}
- expected on client: ${b.children}`),En()),g.textContent=b.children)}if(T){if(__VUE_PROD_HYDRATION_MISMATCH_DETAILS__||Y||!I||U&48){const N=g.tagName.includes("-");for(const W in T)__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&!(H&&H.some(ne=>ne.dir.created))&&Rp(g,W,T[W],b,E)&&En(),(Y&&(W.endsWith("value")||W==="indeterminate")||Bn(W)&&!an(W)||W[0]==="."||N)&&r(g,W,null,T[W],void 0,E)}else if(T.onClick)r(g,"onClick",null,T.onClick,void 0,E);else if(U&4&&ln(T.style))for(const N in T.style)T.style[N]}let v;(v=T&&T.onVnodeBeforeMount)&&tt(v,E,b),H&&Tt(b,null,E,"beforeMount"),((v=T&&T.onVnodeMounted)||H||K)&&Nf(()=>{v&&tt(v,E,b),K&&Z.enter(g),H&&Tt(b,null,E,"mounted")},C)}return g.nextSibling},h=(g,b,E,C,P,I,k)=>{k=k||!!b.dynamicChildren;const T=b.children,U=T.length;let D=!1;for(let H=0;H<U;H++){const Z=k?T[H]:T[H]=nt(T[H]),Y=Z.type===Ut;g?(Y&&!k&&H+1<U&&nt(T[H+1]).type===Ut&&(c(i(g.data.slice(Z.children.length)),E,u(g)),g.data=Z.children),g=f(g,Z,C,P,I,k)):Y&&!Z.children?c(Z.el=i(""),E):(Rr(E,1)||(__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&!D&&(Jt("Hydration children mismatch on",E,`
Server rendered element contains fewer child nodes than client vdom.`),D=!0),En()),n(null,Z,E,null,C,P,Mi(E),I))}return g},p=(g,b,E,C,P,I)=>{const{slotScopeIds:k}=b;k&&(P=P?P.concat(k):k);const T=s(g),U=h(u(g),b,T,E,C,P,I);return U&&Sn(U)&&U.data==="]"?u(b.anchor=U):(En(),c(b.anchor=a("]"),T,U),U)},_=(g,b,E,C,P,I)=>{if(Rr(g.parentElement,1)||(__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&Jt(`Hydration node mismatch:
- rendered on server:`,g,g.nodeType===3?"(text)":Sn(g)&&g.data==="["?"(start of fragment)":"",`
- expected on client:`,b.type),En()),b.el=null,I){const U=A(g);for(;;){const D=u(g);if(D&&D!==U)o(D);else break}}const k=u(g),T=s(g);return o(g),n(null,b,T,k,E,C,Mi(T),P),E&&(E.vnode.el=b.el,Wu(E,b.el)),k},A=(g,b="[",E="]")=>{let C=0;for(;g;)if(g=u(g),g&&Sn(g)&&(g.data===b&&C++,g.data===E)){if(C===0)return u(g);C--}return g},S=(g,b,E)=>{const C=b.parentNode;C&&C.replaceChild(g,b);let P=E;for(;P;)P.vnode.el===b&&(P.vnode.el=P.subTree.el=g),P=P.parent},x=g=>g.nodeType===1&&g.tagName==="TEMPLATE";return[l,f]}function Rp(e,t,n,r,i){let u,s,o,c;if(t==="class")o=e.getAttribute("class"),c=kr(n),Fp(Lc(o||""),Lc(c))||(u=2,s="class");else if(t==="style"){o=e.getAttribute("style")||"",c=te(n)?n:ih(xr(n));const a=Pc(o),l=Pc(c);if(r.dirs)for(const{dir:f,value:d}of r.dirs)f.name==="show"&&!d&&l.set("display","none");i&&Gl(i,r,l),Lp(a,l)||(u=3,s="style")}else(e instanceof SVGElement&&bh(t)||e instanceof HTMLElement&&(Tc(t)||gh(t)))&&(Tc(t)?(o=e.hasAttribute(t),c=go(n)):n==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=mh(n)?String(n):!1),o!==c&&(u=4,s=t));if(u!=null&&!Rr(e,u)){const a=d=>d===!1?"(not rendered)":`${s}="${d}"`,l=`Hydration ${Wl[u]} mismatch on`,f=`
- rendered on server: ${a(o)}
- expected on client: ${a(c)}
Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
2024-12-13 11:16:26 +00:00
You should fix the source of the mismatch.`;return Jt(l,e,f),!0}return!1}function Lc(e){return new Set(e.trim().split(/\s+/))}function Fp(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function Pc(e){const t=new Map;for(const n of e.split(";")){let[r,i]=n.split(":");r=r.trim(),i=i&&i.trim(),r&&i&&t.set(r,i)}return t}function Lp(e,t){if(e.size!==t.size)return!1;for(const[n,r]of e)if(r!==t.get(n))return!1;return!0}function Gl(e,t,n){const r=e.subTree;if(e.getCssVars&&(t===r||r&&r.type===Te&&r.children.includes(t))){const i=e.getCssVars();for(const u in i)n.set(`--${yh(u)}`,String(i[u]))}t===r&&e.parent&&Gl(e.parent,e.vnode,n)}const Bc="data-allow-mismatch",Wl={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function Rr(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(Bc);)e=e.parentElement;const n=e&&e.getAttribute(Bc);if(n==null)return!1;if(n==="")return!0;{const r=n.split(",");return t===0&&r.includes("children")?!0:n.split(",").includes(Wl[t])}}const Pp=wn().requestIdleCallback||(e=>setTimeout(e,1)),Bp=wn().cancelIdleCallback||(e=>clearTimeout(e)),$p=(e=1e4)=>t=>{const n=Pp(t,{timeout:e});return()=>Bp(n)};function Up(e){const{top:t,left:n,bottom:r,right:i}=e.getBoundingClientRect(),{innerHeight:u,innerWidth:s}=window;return(t>0&&t<u||r>0&&r<u)&&(n>0&&n<s||i>0&&i<s)}const Hp=e=>(t,n)=>{const r=new IntersectionObserver(i=>{for(const u of i)if(u.isIntersecting){r.disconnect(),t();break}},e);return n(i=>{if(i instanceof Element){if(Up(i))return t(),r.disconnect(),!1;r.observe(i)}}),()=>r.disconnect()},Vp=e=>t=>{if(e){const n=matchMedia(e);if(n.matches)t();else return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t)}},zp=(e=[])=>(t,n)=>{te(e)&&(e=[e]);let r=!1;const i=s=>{r||(r=!0,u(),t(),s.target.dispatchEvent(new s.constructor(s.type,s)))},u=()=>{n(s=>{for(const o of e)s.removeEventListener(o,i)})};return n(s=>{for(const o of e)s.addEventListener(o,i,{once:!0})}),u};function qp(e,t){if(Sn(e)&&e.data==="["){let n=1,r=e.nextSibling;for(;r;){if(r.nodeType===1){if(t(r)===!1)break}else if(Sn(r))if(r.data==="]"){if(--n===0)break}else r.data==="["&&n++;r=r.nextSibling}}else t(e)}const fn=e=>!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function Kp(e){Q(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:i=200,hydrate:u,timeout:s,suspensible:o=!0,onError:c}=e;let a=null,l,f=0;const d=()=>(f++,a=null,h()),h=()=>{let p;return a||(p=a=t().catch(_=>{if(_=_ instanceof Error?_:new Error(String(_)),c)return new Promise((A,S)=>{c(_,()=>A(d()),()=>S(_),f+1)});throw _}).then(_=>p!==a&&a?a:(_&&(_.__esModule||_[Symbol.toStringTag]==="Module")&&(_=_.default),l=_,_)))};return Cr({name:"AsyncComponentWrapper",__asyncLoader:h,__asyncHydrate(p,_,A){const S=u?()=>{const x=u(A,g=>qp(p,g));x&&(_.bum||(_.bum=[])).push(x)}:A;l?S():h().then(()=>!_.isUnmounted&&S())},get __asyncResolved(){return l},setup(){const p=Oe;if(Do(p),l)return()=>hs(l,p);const _=g=>{a=null,Vn(g,p,13,!r)};if(o&&p.suspense||lr)return h().then(g=>()=>hs(g,p)).catch(g=>(_(g),()=>r?me(r,{error:g}):null));const A=$r(!1),S=$r(),x=$r(!!i);return i&&setTimeout(()=>{x.value=!1},i),s!=null&&setTimeout(()=>{if(!A.value&&!S.value){const g=new Error(`Async component timed out after ${s}ms.`);_(g),S.value=g}},s),h().then(()=>{A.value=!0,p.parent&&mi(p.parent.vnode)&&p.parent.update()}).catch(g=>{_(g),S.value=g}),()=>{if(A.value&&l)return hs(l,p);if(S.value&&r)return me(r,{error:S.value});if(n&&!x.value)return me(n)}}})}function hs(e,t){const{ref:n,props:r,children:i,ce:u}=t.vnode,s=me(e,r,i);return s.ref=n,s.ce=u,delete t.vnode.ce,s}const mi=e=>e.type.__isKeepAlive,jp={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=_t(),r=n.ctx;if(!r.renderer)return()=>{const x=t.default&&t.default();return x&&x.length===1?x[0]:x};const i=new Map,u=new Set;let s=null;__VUE_PROD_DEVTOOLS__&&(n.__v_cache=i);const o=n.suspense,{renderer:{p:c,m:a,um:l,o:{createElement:f}}}=r,d=f("div");r.activate=(x,g,b,E,C)=>{const
* @vue/runtime-dom v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
2024-12-13 11:16:26 +00:00
**/let Zs;const jc=typeof window<"u"&&window.trustedTypes;if(jc)try{Zs=jc.createPolicy("vue",{createHTML:e=>e})}catch{}const qf=Zs?e=>Zs.createHTML(e):e=>e,yg="http://www.w3.org/2000/svg",Eg="http://www.w3.org/1998/Math/MathML",Lt=typeof document<"u"?document:null,Gc=Lt&&Lt.createElement("template"),xg={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const i=t==="svg"?Lt.createElementNS(yg,e):t==="mathml"?Lt.createElementNS(Eg,e):n?Lt.createElement(e,{is:n}):Lt.createElement(e);return e==="select"&&r&&r.multiple!=null&&i.setAttribute("multiple",r.multiple),i},createText:e=>Lt.createTextNode(e),createComment:e=>Lt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Lt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,i,u){const s=n?n.previousSibling:t.lastChild;if(i&&(i===u||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===u||!(i=i.nextSibling)););else{Gc.innerHTML=qf(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const o=Gc.content;if(r==="svg"||r==="mathml"){const c=o.firstChild;for(;c.firstChild;)o.appendChild(c.firstChild);o.removeChild(c)}t.insertBefore(o,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Zt="transition",Nr="animation",fr=Symbol("_vtc"),Kf={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},jf=ce({},wo,Kf),kg=e=>(e.displayName="Transition",e.props=jf,e),Cg=kg((e,{slots:t})=>Ho(Kl,Gf(e),t)),kn=(e,t=[])=>{j(e)?e.forEach(n=>n(...t)):e&&e(...t)},Wc=e=>e?j(e)?e.some(t=>t.length>1):e.length>1:!1;function Gf(e){const t={};for(const D in e)D in Kf||(t[D]=e[D]);if(e.css===!1)return t;const{name:n="v",type:r,duration:i,enterFromClass:u=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:o=`${n}-enter-to`,appearFromClass:c=u,appearActiveClass:a=s,appearToClass:l=o,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:d=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=e,p=Sg(i),_=p&&p[0],A=p&&p[1],{onBeforeEnter:S,onEnter:x,onEnterCancelled:g,onLeave:b,onLeaveCancelled:E,onBeforeAppear:C=S,onAppear:P=x,onAppearCancelled:I=g}=t,k=(D,H,Z,Y)=>{D._enterCancelled=Y,Xt(D,H?l:o),Xt(D,H?a:s),Z&&Z()},T=(D,H)=>{D._isLeaving=!1,Xt(D,f),Xt(D,h),Xt(D,d),H&&H()},U=D=>(H,Z)=>{const Y=D?P:x,K=()=>k(H,D,Z);kn(Y,[H,K]),Zc(()=>{Xt(H,D?c:u),At(H,D?l:o),Wc(Y)||Yc(H,r,_,K)})};return ce(t,{onBeforeEnter(D){kn(S,[D]),At(D,u),At(D,s)},onBeforeAppear(D){kn(C,[D]),At(D,c),At(D,a)},onEnter:U(!1),onAppear:U(!0),onLeave(D,H){D._isLeaving=!0;const Z=()=>T(D,H);At(D,f),D._enterCancelled?(At(D,d),Ys()):(Ys(),At(D,d)),Zc(()=>{D._isLeaving&&(Xt(D,f),At(D,h),Wc(b)||Yc(D,r,A,Z))}),kn(b,[D,Z])},onEnterCancelled(D){k(D,!1,void 0,!0),kn(g,[D])},onAppearCancelled(D){k(D,!0,void 0,!0),kn(I,[D])},onLeaveCancelled(D){T(D),kn(E,[D])}})}function Sg(e){if(e==null)return null;if(he(e))return[ms(e.enter),ms(e.leave)];{const t=ms(e);return[t,t]}}function ms(e){return Qi(e)}function At(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[fr]||(e[fr]=new Set)).add(t)}function Xt(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[fr];n&&(n.delete(t),n.size||(e[fr]=void 0))}function Zc(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Ag=0;function Yc(e,t,n,r){const i=e._endId=++Ag,u=()=>{i===e._endId&&r()};if(n!=null)return setTimeout(u,n);const{type:s,timeout:o,propCount:c}=Wf(e,t);if(!s)return r();const a=s+"end";let l=0;const f=()=>{e.removeEventListener(a,d),u()},d=h=>{h.target===e&&++l>=c&&f()};setTimeout(()=>{l<c&&f()},o+1),e.addEventListener(a,d)}function Wf(e,t){const n=window.getComputedStyle(e),r=p=>(n[p]||"").split(", "),i=r(`${Zt}Delay`),u=r(`${Zt}Duration`),s=Jc(i,u),o=r(`${Nr}Delay`),c=r(`${Nr}Duration`),
* @vue/compiler-core v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
2024-12-13 11:16:26 +00:00
**/const ni=Symbol(""),Kr=Symbol(""),qo=Symbol(""),bu=Symbol(""),h0=Symbol(""),Pn=Symbol(""),p0=Symbol(""),g0=Symbol(""),Ko=Symbol(""),jo=Symbol(""),xi=Symbol(""),Go=Symbol(""),b0=Symbol(""),Wo=Symbol(""),Zo=Symbol(""),Yo=Symbol(""),Jo=Symbol(""),Xo=Symbol(""),Qo=Symbol(""),m0=Symbol(""),_0=Symbol(""),Yu=Symbol(""),mu=Symbol(""),ec=Symbol(""),tc=Symbol(""),ri=Symbol(""),ki=Symbol(""),nc=Symbol(""),Xs=Symbol(""),cb=Symbol(""),Qs=Symbol(""),_u=Symbol(""),ab=Symbol(""),lb=Symbol(""),rc=Symbol(""),fb=Symbol(""),db=Symbol(""),ic=Symbol(""),y0=Symbol(""),hr={[ni]:"Fragment",[Kr]:"Teleport",[qo]:"Suspense",[bu]:"KeepAlive",[h0]:"BaseTransition",[Pn]:"openBlock",[p0]:"createBlock",[g0]:"createElementBlock",[Ko]:"createVNode",[jo]:"createElementVNode",[xi]:"createCommentVNode",[Go]:"createTextVNode",[b0]:"createStaticVNode",[Wo]:"resolveComponent",[Zo]:"resolveDynamicComponent",[Yo]:"resolveDirective",[Jo]:"resolveFilter",[Xo]:"withDirectives",[Qo]:"renderList",[m0]:"renderSlot",[_0]:"createSlots",[Yu]:"toDisplayString",[mu]:"mergeProps",[ec]:"normalizeClass",[tc]:"normalizeStyle",[ri]:"normalizeProps",[ki]:"guardReactiveProps",[nc]:"toHandlers",[Xs]:"camelize",[cb]:"capitalize",[Qs]:"toHandlerKey",[_u]:"setBlockTracking",[ab]:"pushScopeId",[lb]:"popScopeId",[rc]:"withCtx",[fb]:"unref",[db]:"isRef",[ic]:"withMemo",[y0]:"isMemoSame"};function hb(e){Object.getOwnPropertySymbols(e).forEach(t=>{hr[t]=e[t]})}const ft={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function pb(e,t=""){return{type:0,source:t,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:ft}}function ii(e,t,n,r,i,u,s,o=!1,c=!1,a=!1,l=ft){return e&&(o?(e.helper(Pn),e.helper(br(e.inSSR,a))):e.helper(gr(e.inSSR,a)),s&&e.helper(Xo)),{type:13,tag:t,props:n,children:r,patchFlag:i,dynamicProps:u,directives:s,isBlock:o,disableTracking:c,isComponent:a,loc:l}}function Mn(e,t=ft){return{type:17,loc:t,elements:e}}function pt(e,t=ft){return{type:15,loc:t,properties:e}}function ve(e,t){return{type:16,loc:ft,key:te(e)?ie(e,!0):e,value:t}}function ie(e,t=!1,n=ft,r=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:r}}function kt(e,t=ft){return{type:8,loc:t,children:e}}function Ne(e,t=[],n=ft){return{type:14,loc:n,callee:e,arguments:t}}function pr(e,t=void 0,n=!1,r=!1,i=ft){return{type:18,params:e,returns:t,newline:n,isSlot:r,loc:i}}function eo(e,t,n,r=!0){return{type:19,test:e,consequent:t,alternate:n,newline:r,loc:ft}}function gb(e,t,n=!1,r=!1){return{type:20,index:e,value:t,needPauseTracking:n,inVOnce:r,needArraySpread:!1,loc:ft}}function bb(e){return{type:21,body:e,loc:ft}}function gr(e,t){return e||t?Ko:jo}function br(e,t){return e||t?p0:g0}function uc(e,{helper:t,removeHelper:n,inSSR:r}){e.isBlock||(e.isBlock=!0,n(gr(r,e.isComponent)),t(Pn),t(br(r,e.isComponent)))}const pa=new Uint8Array([123,123]),ga=new Uint8Array([125,125]);function ba(e){return e>=97&&e<=122||e>=65&&e<=90}function ot(e){return e===32||e===10||e===9||e===12||e===13}function Yt(e){return e===47||e===62||ot(e)}function yu(e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}const Be={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 mb{constructor(t,n){this.stack=t,this.cbs=n,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=pa,this.delimiterClose=ga,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.l
`);else if(Bb(u.content)){const s=e[i-1]&&e[i-1].type,o=e[i+1]&&e[i+1].type;!s||!o||n&&(s===3&&(o===3||o===1)||s===1&&(o===3||o===1&&$b(u.content)))?(r=!0,e[i]=null):u.content=" "}else n&&(u.content=w0(u.content))}return r?e.filter(Boolean):e}function Bb(e){for(let t=0;t<e.length;t++)if(!ot(e.charCodeAt(t)))return!1;return!0}function $b(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n===10||n===13)return!0}return!1}function w0(e){let t="",n=!1;for(let r=0;r<e.length;r++)ot(e.charCodeAt(r))?n||(t+=" ",n=!0):(t+=e[r],n=!1);return t}function no(e){(Ee[0]||oi).children.push(e)}function Se(e,t){return{start:ke.getPos(e),end:t==null?t:ke.getPos(t),source:t==null?t:Le(e,t)}}function Ub(e){return Se(e.start.offset,e.end.offset)}function vn(e,t){e.end=ke.getPos(t),e.source=Le(e.start.offset,t)}function Hb(e){const t={type:6,name:e.rawName,nameLoc:Se(e.loc.start.offset,e.loc.start.offset+e.rawName.length),value:void 0,loc:e.loc};if(e.exp){const n=e.exp.loc;n.end.offset<e.loc.end.offset&&(n.start.offset--,n.start.column--,n.end.offset++,n.end.column++),t.value={type:2,content:e.exp.content,loc:n}}return t}function Zi(e,t=!1,n,r=0,i=0){return ie(e,t,n,r)}function Rt(e,t,n){de.onError(xe(e,Se(t,t)))}function Vb(){ke.reset(),$e=null,ae=null,et="",Ft=-1,Cn=-1,Ee.length=0}function zb(e,t){if(Vb(),Ht=e,de=ce({},A0),t){let i;for(i in t)t[i]!=null&&(de[i]=t[i])}ke.mode=de.parseMode==="html"?1:de.parseMode==="sfc"?2:0,ke.inXML=de.ns===1||de.ns===2;const n=t&&t.delimiters;n&&(ke.delimiterOpen=yu(n[0]),ke.delimiterClose=yu(n[1]));const r=oi=pb([],e);return ke.parse(Ht),r.loc=Se(0,e.length),r.children=T0(r.children),oi=null,r}function qb(e,t){Yi(e,void 0,t,D0(e,e.children[0]))}function D0(e,t){const{children:n}=e;return n.length===1&&t.type===1&&!xu(t)}function Yi(e,t,n,r=!1,i=!1){const{children:u}=e,s=[];for(let l=0;l<u.length;l++){const f=u[l];if(f.type===1&&f.tagType===0){const d=r?0:ct(f,n);if(d>0){if(d>=2){f.codegenNode.patchFlag=-1,s.push(f);continue}}else{const h=f.codegenNode;if(h.type===13){const p=h.patchFlag;if((p===void 0||p===512||p===1)&&O0(f,n)>=2){const _=M0(f);_&&(h.props=n.hoist(_))}h.dynamicProps&&(h.dynamicProps=n.hoist(h.dynamicProps))}}}else if(f.type===12&&(r?0:ct(f,n))>=2){s.push(f);continue}if(f.type===1){const d=f.tagType===1;d&&n.scopes.vSlot++,Yi(f,e,n,!1,i),d&&n.scopes.vSlot--}else if(f.type===11)Yi(f,e,n,f.children.length===1,!0);else if(f.type===9)for(let d=0;d<f.branches.length;d++)Yi(f.branches[d],e,n,f.branches[d].children.length===1,i)}let o=!1;if(s.length===u.length&&e.type===1){if(e.tagType===0&&e.codegenNode&&e.codegenNode.type===13&&j(e.codegenNode.children))e.codegenNode.children=c(Mn(e.codegenNode.children)),o=!0;else if(e.tagType===1&&e.codegenNode&&e.codegenNode.type===13&&e.codegenNode.children&&!j(e.codegenNode.children)&&e.codegenNode.children.type===15){const l=a(e.codegenNode,"default");l&&(l.returns=c(Mn(l.returns)),o=!0)}else if(e.tagType===3&&t&&t.type===1&&t.tagType===1&&t.codegenNode&&t.codegenNode.type===13&&t.codegenNode.children&&!j(t.codegenNode.children)&&t.codegenNode.children.type===15){const l=ht(e,"slot",!0),f=l&&l.arg&&a(t.codegenNode,l.arg);f&&(f.returns=c(Mn(f.returns)),o=!0)}}if(!o)for(const l of s)l.codegenNode=n.cache(l.codegenNode);function c(l){const f=n.cache(l);return i&&n.hmr&&(f.needArraySpread=!0),f}function a(l,f){if(l.children&&!j(l.children)&&l.children.type===15){const d=l.children.properties.find(h=>h.key===f||h.key.content===f);return d&&d.value}}s.length&&n.transformHoist&&n.transformHoist(u,n,e)}function ct(e,t){const{constantCache:n}=t;switch(e.type){case 1:if(e.tagType!==0)return 0;const r=n.get(e);if(r!==void 0)return r;const i=e.codegenNode;if(i.type!==13||i.isBlock&&e.tag!=="svg"&&e.tag!=="foreignObject"&&e.tag!=="math")return 0;if(i.patchFlag===void 0){let s=3;const o=O0(e,t);if(o===0)return n.set(e,0),0;o<s&&(s=o);for(let c=0;c<e.children.length;c++){const a=ct(e.children[c],t);if(a===0)return n.set(e,0),0;a<s&&(s=a)}if(s>1)for(let c=0;c<e.props.length;c++){const a=e.props[c];if(a.type===7&&a.name==="bind"&&a.exp){const l=ct(a.exp,t);if(l===0)
`+" ".repeat(_),0)}return h}function Jb(e,t={}){const n=Yb(e,t);t.onContextCreated&&t.onContextCreated(n);const{mode:r,push:i,prefixIdentifiers:u,indent:s,deindent:o,newline:c,scopeId:a,ssr:l}=n,f=Array.from(e.helpers),d=f.length>0,h=!u&&r!=="module";Xb(e,n);const _=l?"ssrRender":"render",S=(l?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ");if(i(`function ${_}(${S}) {`),s(),h&&(i("with (_ctx) {"),s(),d&&(i(`const { ${f.map(R0).join(", ")} } = _Vue
`,-1),c())),e.components.length&&(xs(e.components,"component",n),(e.directives.length||e.temps>0)&&c()),e.directives.length&&(xs(e.directives,"directive",n),e.temps>0&&c()),e.filters&&e.filters.length&&(c(),xs(e.filters,"filter",n),c()),e.temps>0){i("let ");for(let x=0;x<e.temps;x++)i(`${x>0?", ":""}_temp${x}`)}return(e.components.length||e.directives.length||e.temps)&&(i(`
`,0),c()),l||i("return "),e.codegenNode?ze(e.codegenNode,n):i("null"),h&&(o(),i("}")),o(),i("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}function Xb(e,t){const{ssr:n,prefixIdentifiers:r,push:i,newline:u,runtimeModuleName:s,runtimeGlobalName:o,ssrRuntimeModuleName:c}=t,a=o,l=Array.from(e.helpers);if(l.length>0&&(i(`const _Vue = ${a}
`,-1),e.hoists.length)){const f=[Ko,jo,xi,Go,b0].filter(d=>l.includes(d)).map(R0).join(", ");i(`const { ${f} } = _Vue
`,-1)}Qb(e.hoists,t),u(),i("return ")}function xs(e,t,{helper:n,push:r,newline:i,isTS:u}){const s=n(t==="filter"?Jo:t==="component"?Wo:Yo);for(let o=0;o<e.length;o++){let c=e[o];const a=c.endsWith("__self");a&&(c=c.slice(0,-6)),r(`const ${si(c,t)} = ${s}(${JSON.stringify(c)}${a?", true":""})${u?"!":""}`),o<e.length-1&&i()}}function Qb(e,t){if(!e.length)return;t.pure=!0;const{push:n,newline:r}=t;r();for(let i=0;i<e.length;i++){const u=e[i];u&&(n(`const _hoisted_${i+1} = `),ze(u,t),r())}t.pure=!1}function ac(e,t){const n=e.length>3||!1;t.push("["),n&&t.indent(),Ci(e,t,n),n&&t.deindent(),t.push("]")}function Ci(e,t,n=!1,r=!0){const{push:i,newline:u}=t;for(let s=0;s<e.length;s++){const o=e[s];te(o)?i(o,-3):j(o)?ac(o,t):ze(o,t),s<e.length-1&&(n?(r&&i(","),u()):r&&i(", "))}}function ze(e,t){if(te(e)){t.push(e,-3);return}if(it(e)){t.push(t.helper(e));return}switch(e.type){case 1:case 9:case 11:ze(e.codegenNode,t);break;case 2:em(e,t);break;case 4:F0(e,t);break;case 5:tm(e,t);break;case 12:ze(e.codegenNode,t);break;case 8:L0(e,t);break;case 3:rm(e,t);break;case 13:im(e,t);break;case 14:sm(e,t);break;case 15:om(e,t);break;case 17:cm(e,t);break;case 18:am(e,t);break;case 19:lm(e,t);break;case 20:fm(e,t);break;case 21:Ci(e.body,t,!0,!1);break}}function em(e,t){t.push(JSON.stringify(e.content),-3,e)}function F0(e,t){const{content:n,isStatic:r}=e;t.push(r?JSON.stringify(n):n,-3,e)}function tm(e,t){const{push:n,helper:r,pure:i}=t;i&&n(Qu),n(`${r(Yu)}(`),ze(e.content,t),n(")")}function L0(e,t){for(let n=0;n<e.children.length;n++){const r=e.children[n];te(r)?t.push(r,-3):ze(r,t)}}function nm(e,t){const{push:n}=t;if(e.type===8)n("["),L0(e,t),n("]");else if(e.isStatic){const r=oc(e.content)?e.content:JSON.stringify(e.content);n(r,-2,e)}else n(`[${e.content}]`,-3,e)}function rm(e,t){const{push:n,helper:r,pure:i}=t;i&&n(Qu),n(`${r(xi)}(${JSON.stringify(e.content)})`,-3,e)}function im(e,t){const{push:n,helper:r,pure:i}=t,{tag:u,props:s,children:o,patchFlag:c,dynamicProps:a,directives:l,isBlock:f,disableTracking:d,isComponent:h}=e;let p;c&&(p=String(c)),l&&n(r(Xo)+"("),f&&n(`(${r(Pn)}(${d?"true":""}), `),i&&n(Qu);const _=f?br(t.inSSR,h):gr(t.inSSR,h);n(r(_)+"(",-2,e),Ci(um([u,s,o,p,a]),t),n(")"),f&&n(")"),l&&(n(", "),ze(l,t),n(")"))}function um(e){let t=e.length;for(;t--&&e[t]==null;);return e.slice(0,t+1).map(n=>n||"null")}function sm(e,t){const{push:n,helper:r,pure:i}=t,u=te(e.callee)?e.callee:r(e.callee);i&&n(Qu),n(u+"(",-2,e),Ci(e.arguments,t),n(")")}function om(e,t){const{push:n,indent:r,deindent:i,newline:u}=t,{properties:s}=e;if(!s.length){n("{}",-2,e);return}const o=s.length>1||!1;n(o?"{":"{ "),o&&r();for(let c=0;c<s.length;c++){const{key:a,value:l}=s[c];nm(a,t),n(": "),ze(l,t),c<s.length-1&&(n(","),u())}o&&i(),n(o?"}":" }")}function cm(e,t){ac(e.elements,t)}function am(e,t){const{push:n,indent:r,deindent:i}=t,{params:u,returns:s,body:o,newline:c,isSlot:a}=e;a&&n(`_${hr[rc]}(`),n("(",-2,e),j(u)?Ci(u,t):u&&ze(u,t),n(") => "),(c||o)&&(n("{"),r()),s?(c&&n("return "),j(s)?ac(s,t):ze(s,t)):o&&ze(o,t),(c||o)&&(i(),n("}")),a&&(e.isNonScopedSlot&&n(", undefined, true"),n(")"))}function lm(e,t){const{test:n,consequent:r,alternate:i,newline:u}=e,{push:s,indent:o,deindent:c,newline:a}=t;if(n.type===4){const f=!oc(n.content);f&&s("("),F0(n,t),f&&s(")")}else s("("),ze(n,t),s(")");u&&o(),t.indentLevel++,u||s(" "),s("? "),ze(r,t),t.indentLevel--,u&&a(),u||s(" "),s(": ");const l=i.type===19;l||t.indentLevel++,ze(i,t),l||t.indentLevel--,u&&c(!0)}function fm(e,t){const{push:n,helper:r,indent:i,deindent:u,newline:s}=t,{needPauseTracking:o,needArraySpread:c}=e;c&&n("[...("),n(`_cache[${e.index}] || (`),o&&(i(),n(`${r(_u)}(-1`),e.inVOnce&&n(", true"),n("),"),s(),n("(")),n(`_cache[${e.index}] = `),ze(e.value,t),o&&(n(`).cacheIndex = ${e.index},`),s(),n(`${r(_u)}(1),`),s(),n(`_cache[${e.index}]`),u()),n(")"),c&&n(")]")}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
2024-12-13 11:16:26 +00:00
**/const q0=Symbol(""),K0=Symbol(""),j0=Symbol(""),G0=Symbol(""),uo=Symbol(""),W0=Symbol(""),Z0=Symbol(""),Y0=Symbol(""),J0=Symbol(""),X0=Symbol("");hb({[q0]:"vModelRadio",[K0]:"vModelCheckbox",[j0]:"vModelText",[G0]:"vModelSelect",[uo]:"vModelDynamic",[W0]:"withModifiers",[Z0]:"withKeys",[Y0]:"vShow",[J0]:"Transition",[X0]:"TransitionGroup"});let Wn;function Bm(e,t=!1){return Wn||(Wn=document.createElement("div")),t?(Wn.innerHTML=`<div foo="${e.replace(/"/g,"&quot;")}">`,Wn.children[0].getAttribute("foo")):(Wn.innerHTML=e,Wn.textContent)}const $m={parseMode:"html",isVoidTag:hh,isNativeTag:e=>lh(e)||fh(e)||dh(e),isPreTag:e=>e==="pre",isIgnoreNewlineTag:e=>e==="pre"||e==="textarea",decodeEntities:Bm,isBuiltInComponent:e=>{if(e==="Transition"||e==="transition")return J0;if(e==="TransitionGroup"||e==="transition-group")return X0},getNamespace(e,t,n){let r=t?t.ns:n;if(t&&r===2)if(t.tag==="annotation-xml"){if(e==="svg")return 1;t.props.some(i=>i.type===6&&i.name==="encoding"&&i.value!=null&&(i.value.content==="text/html"||i.value.content==="application/xhtml+xml"))&&(r=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&e!=="mglyph"&&e!=="malignmark"&&(r=0);else t&&r===1&&(t.tag==="foreignObject"||t.tag==="desc"||t.tag==="title")&&(r=0);if(r===0){if(e==="svg")return 1;if(e==="math")return 2}return r}},Um=e=>{e.type===1&&e.props.forEach((t,n)=>{t.type===6&&t.name==="style"&&t.value&&(e.props[n]={type:7,name:"bind",arg:ie("style",!0,t.loc),exp:Hm(t.value.content,t.loc),modifiers:[],loc:t.loc})})},Hm=(e,t)=>{const n=ol(e);return ie(JSON.stringify(n),!1,t,3)};function hn(e,t){return xe(e,t)}const Vm=(e,t,n)=>{const{exp:r,loc:i}=e;return r||n.onError(hn(53,i)),t.children.length&&(n.onError(hn(54,i)),t.children.length=0),{props:[ve(ie("innerHTML",!0,i),r||ie("",!0))]}},zm=(e,t,n)=>{const{exp:r,loc:i}=e;return r||n.onError(hn(55,i)),t.children.length&&(n.onError(hn(56,i)),t.children.length=0),{props:[ve(ie("textContent",!0),r?ct(r,n)>0?r:Ne(n.helperString(Yu),[r],i):ie("",!0))]}},qm=(e,t,n)=>{const r=z0(e,t,n);if(!r.props.length||t.tagType===1)return r;e.arg&&n.onError(hn(58,e.arg.loc));const{tag:i}=t,u=n.isCustomElement(i);if(i==="input"||i==="textarea"||i==="select"||u){let s=j0,o=!1;if(i==="input"||u){const c=Ju(t,"type");if(c){if(c.type===7)s=uo;else if(c.value)switch(c.value.content){case"radio":s=q0;break;case"checkbox":s=K0;break;case"file":o=!0,n.onError(hn(59,e.loc));break}}else vb(t)&&(s=uo)}else i==="select"&&(s=G0);o||(r.needRuntime=n.helper(s))}else n.onError(hn(57,e.loc));return r.props=r.props.filter(s=>!(s.key.type===4&&s.key.content==="modelValue")),r},Km=Ke("passive,once,capture"),jm=Ke("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),Gm=Ke("left,right"),Q0=Ke("onkeyup,onkeydown,onkeypress"),Wm=(e,t,n,r)=>{const i=[],u=[],s=[];for(let o=0;o<t.length;o++){const c=t[o].content;c==="native"&&ui("COMPILER_V_ON_NATIVE",n)||Km(c)?s.push(c):Gm(c)?rt(e)?Q0(e.content.toLowerCase())?i.push(c):u.push(c):(i.push(c),u.push(c)):jm(c)?u.push(c):i.push(c)}return{keyModifiers:i,nonKeyModifiers:u,eventOptionModifiers:s}},Oa=(e,t)=>rt(e)&&e.content.toLowerCase()==="onclick"?ie(t,!0):e.type!==4?kt(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,Zm=(e,t,n)=>V0(e,t,n,r=>{const{modifiers:i}=e;if(!i.length)return r;let{key:u,value:s}=r.props[0];const{keyModifiers:o,nonKeyModifiers:c,eventOptionModifiers:a}=Wm(u,i,n,e.loc);if(c.includes("right")&&(u=Oa(u,"onContextmenu")),c.includes("middle")&&(u=Oa(u,"onMouseup")),c.length&&(s=Ne(n.helper(W0),[s,JSON.stringify(c)])),o.length&&(!rt(u)||Q0(u.content.toLowerCase()))&&(s=Ne(n.helper(Z0),[s,JSON.stringify(o)])),a.length){const l=a.map(Un).join("");u=rt(u)?ie(`${u.content}${l}`,!0):kt(["(",u,`) + "${l}"`])}return{props:[ve(u,s)]}}),Ym=(e,t,n)=>{const{exp:r,loc:i}=e;return r||n.onError(hn(61,i)),{props:[],needRuntime:n.helper(Y0)}},Jm=(e,t)=>{e.type===1&&e.tagType===0&&(e.tag==="script"||e.tag==="style")&&t.removeNode()},Xm=[Um],Qm={cloak:Pm,html:Vm,text:zm,model:qm,on:Zm,show:Ym};function e2(e,t={}){return Lm(e,ce({},$m,t,{nodeTransforms:[Jm,...Xm,...t.nodeTransforms||[]],directiveTransforms:ce({},Q
* vue v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
2024-12-13 11:16:26 +00:00
**/const Ma=Object.create(null);function t2(e,t){if(!te(e))if(e.nodeType)e=e.innerHTML;else return Fe;const n=Xd(e,t),r=Ma[n];if(r)return r;if(e[0]==="#"){const o=document.querySelector(e);e=o?o.innerHTML:""}const i=ce({hoistStatic:!0,onError:void 0,onWarn:Fe},t);!i.isCustomElement&&typeof customElements<"u"&&(i.isCustomElement=o=>!!customElements.get(o));const{code:u}=e2(e,i),s=new Function("Vue",u)(ob);return s._rc=!0,Ma[n]=s}$f(t2);const Ia={};function n2(e){let t=Ia[e];if(t)return t;t=Ia[e]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);t.push(r)}for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t[r]="%"+("0"+r.toString(16).toUpperCase()).slice(-2)}return t}function mr(e,t){typeof t!="string"&&(t=mr.defaultChars);const n=n2(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(r){let i="";for(let u=0,s=r.length;u<s;u+=3){const o=parseInt(r.slice(u+1,u+3),16);if(o<128){i+=n[o];continue}if((o&224)===192&&u+3<s){const c=parseInt(r.slice(u+4,u+6),16);if((c&192)===128){const a=o<<6&1984|c&63;a<128?i+="<22><>":i+=String.fromCharCode(a),u+=3;continue}}if((o&240)===224&&u+6<s){const c=parseInt(r.slice(u+4,u+6),16),a=parseInt(r.slice(u+7,u+9),16);if((c&192)===128&&(a&192)===128){const l=o<<12&61440|c<<6&4032|a&63;l<2048||l>=55296&&l<=57343?i+="<22><><EFBFBD>":i+=String.fromCharCode(l),u+=6;continue}}if((o&248)===240&&u+9<s){const c=parseInt(r.slice(u+4,u+6),16),a=parseInt(r.slice(u+7,u+9),16),l=parseInt(r.slice(u+10,u+12),16);if((c&192)===128&&(a&192)===128&&(l&192)===128){let f=o<<18&1835008|c<<12&258048|a<<6&4032|l&63;f<65536||f>1114111?i+="<22><><EFBFBD><EFBFBD>":(f-=65536,i+=String.fromCharCode(55296+(f>>10),56320+(f&1023))),u+=9;continue}}i+="<22>"}return i})}mr.defaultChars=";/?:@&=+$,#";mr.componentChars="";const Ra={};function r2(e){let t=Ra[e];if(t)return t;t=Ra[e]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);/^[0-9a-z]$/i.test(r)?t.push(r):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}function Si(e,t,n){typeof t!="string"&&(n=t,t=Si.defaultChars),typeof n>"u"&&(n=!0);const r=r2(t);let i="";for(let u=0,s=e.length;u<s;u++){const o=e.charCodeAt(u);if(n&&o===37&&u+2<s&&/^[0-9a-f]{2}$/i.test(e.slice(u+1,u+3))){i+=e.slice(u,u+3),u+=2;continue}if(o<128){i+=r[o];continue}if(o>=55296&&o<=57343){if(o>=55296&&o<=56319&&u+1<s){const c=e.charCodeAt(u+1);if(c>=56320&&c<=57343){i+=encodeURIComponent(e[u]+e[u+1]),u++;continue}}i+="%EF%BF%BD";continue}i+=encodeURIComponent(e[u])}return i}Si.defaultChars=";/?:@&=+$,-_.!~*'()#";Si.componentChars="-_.!~*'()";function lc(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 Su(){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 i2=/^([a-z0-9.+-]+:)/i,u2=/:[0-9]*$/,s2=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,o2=["<",">",'"',"`"," ","\r",`
`," "],c2=["{","}","|","\\","^","`"].concat(o2),a2=["'"].concat(c2),Fa=["%","/","?",";","#"].concat(a2),La=["/","?","#"],l2=255,Pa=/^[+a-z0-9A-Z_-]{0,63}$/,f2=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Ba={javascript:!0,"javascript:":!0},$a={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function fc(e,t){if(e&&e instanceof Su)return e;const n=new Su;return n.parse(e,t),n}Su.prototype.parse=function(e,t){let n,r,i,u=e;if(u=u.trim(),!t&&e.split("#").length===1){const a=s2.exec(u);if(a)return this.pathname=a[1],a[2]&&(this.search=a[2]),this}let s=i2.exec(u);if(s&&(s=s[0],n=s.toLowerCase(),this.protocol=s,u=u.substr(s.length)),(t||s||u.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=u.substr(0,2)==="//",i&&!(s&&Ba[s])&&(u=u.substr(2),this.slashes=!0)),!Ba[s]&&(i||s&&!$a[s])){let a=-1;for(let p=0;p<La.length;p++)r=u.indexOf(La[p]),r!==-1&&(a===-1||r<a)&&(a=r);let l,f;a===-1?f=u.lastIndexOf("@"):f=u.lastIndexOf("@",a),f!==-1&&(l=u.slice(0,f),u=u.slice(f+1),this.auth=l),a=-1;for(let p=0;p<Fa.length;p++)r=u.indexOf(Fa[p]),r!==-1&&(a===-1||r<a)&&(a=r);a===-1&&(a=u.length),u[a-1]===":"&&a--;const d=u.slice(0,a);u=u.slice(a),this.parseHost(d),this.hostname=this.hostname||"";const h=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!h){const p=this.hostname.split(/\./);for(let _=0,A=p.length;_<A;_++){const S=p[_];if(S&&!S.match(Pa)){let x="";for(let g=0,b=S.length;g<b;g++)S.charCodeAt(g)>127?x+="x":x+=S[g];if(!x.match(Pa)){const g=p.slice(0,_),b=p.slice(_+1),E=S.match(f2);E&&(g.push(E[1]),b.unshift(E[2])),b.length&&(u=b.join(".")+u),this.hostname=g.join(".");break}}}}this.hostname.length>l2&&(this.hostname=""),h&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const o=u.indexOf("#");o!==-1&&(this.hash=u.substr(o),u=u.slice(0,o));const c=u.indexOf("?");return c!==-1&&(this.search=u.substr(c),u=u.slice(0,c)),u&&(this.pathname=u),$a[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Su.prototype.parseHost=function(e){let t=u2.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 d2=Object.freeze(Object.defineProperty({__proto__:null,decode:mr,encode:Si,format:lc,parse:fc},Symbol.toStringTag,{value:"Module"})),ed=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,td=/[\0-\x1F\x7F-\x9F]/,h2=/[\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]/,dc=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\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
`};Ot.fence=function(e,t,n,r,i){const u=e[t],s=u.info?_r(u.info).trim():"";let o="",c="";if(s){const l=s.split(/(\s+)/g);o=l[0],c=l.slice(2).join("")}let a;if(n.highlight?a=n.highlight(u.content,o,c)||mn(u.content):a=mn(u.content),a.indexOf("<pre")===0)return a+`
`;if(s){const l=u.attrIndex("class"),f=u.attrs?u.attrs.slice():[];l<0?f.push(["class",n.langPrefix+o]):(f[l]=f[l].slice(),f[l][1]+=" "+n.langPrefix+o);const d={attrs:f};return`<pre><code${i.renderAttrs(d)}>${a}</code></pre>
`}return`<pre><code${i.renderAttrs(u)}>${a}</code></pre>
`};Ot.image=function(e,t,n,r,i){const u=e[t];return u.attrs[u.attrIndex("alt")][1]=i.renderInlineAsText(u.children,n,r),i.renderToken(e,t,n)};Ot.hardbreak=function(e,t,n){return n.xhtmlOut?`<br />
`:`<br>
2024-12-13 11:16:26 +00:00
`};Ot.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`<br />
`:`<br>
`:`
2024-12-13 11:16:26 +00:00
`};Ot.text=function(e,t){return mn(e[t].content)};Ot.html_block=function(e,t){return e[t].content};Ot.html_inline=function(e,t){return e[t].content};function Sr(){this.rules=es({},Ot)}Sr.prototype.renderAttrs=function(t){let n,r,i;if(!t.attrs)return"";for(i="",n=0,r=t.attrs.length;n<r;n++)i+=" "+mn(t.attrs[n][0])+'="'+mn(t.attrs[n][1])+'"';return i};Sr.prototype.renderToken=function(t,n,r){const i=t[n];let u="";if(i.hidden)return"";i.block&&i.nesting!==-1&&n&&t[n-1].hidden&&(u+=`
`),u+=(i.nesting===-1?"</":"<")+i.tag,u+=this.renderAttrs(i),i.nesting===0&&r.xhtmlOut&&(u+=" /");let s=!1;if(i.block&&(s=!0,i.nesting===1&&n+1<t.length)){const o=t[n+1];(o.type==="inline"||o.hidden||o.nesting===-1&&o.tag===i.tag)&&(s=!1)}return u+=s?`>
`:">",u};Sr.prototype.renderInline=function(e,t,n){let r="";const i=this.rules;for(let u=0,s=e.length;u<s;u++){const o=e[u].type;typeof i[o]<"u"?r+=i[o](e,u,t,n,this):r+=this.renderToken(e,u,t)}return r};Sr.prototype.renderInlineAsText=function(e,t,n){let r="";for(let i=0,u=e.length;i<u;i++)switch(e[i].type){case"text":r+=e[i].content;break;case"image":r+=this.renderInlineAsText(e[i].children,t,n);break;case"html_inline":case"html_block":r+=e[i].content;break;case"softbreak":case"hardbreak":r+=`
`;break}return r};Sr.prototype.render=function(e,t,n){let r="";const i=this.rules;for(let u=0,s=e.length;u<s;u++){const o=e[u].type;o==="inline"?r+=this.renderInline(e[u].children,t,n):typeof i[o]<"u"?r+=i[o](e,u,t,n,this):r+=this.renderToken(e,u,t,n)}return r};function ut(){this.__rules__=[],this.__cache__=null}ut.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1};ut.prototype.__compile__=function(){const e=this,t=[""];e.__rules__.forEach(function(n){n.enabled&&n.alt.forEach(function(r){t.indexOf(r)<0&&t.push(r)})}),e.__cache__={},t.forEach(function(n){e.__cache__[n]=[],e.__rules__.forEach(function(r){r.enabled&&(n&&r.alt.indexOf(n)<0||e.__cache__[n].push(r.fn))})})};ut.prototype.at=function(e,t,n){const r=this.__find__(e),i=n||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=i.alt||[],this.__cache__=null};ut.prototype.before=function(e,t,n,r){const i=this.__find__(e),u=r||{};if(i===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(i,0,{name:t,enabled:!0,fn:n,alt:u.alt||[]}),this.__cache__=null};ut.prototype.after=function(e,t,n,r){const i=this.__find__(e),u=r||{};if(i===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(i+1,0,{name:t,enabled:!0,fn:n,alt:u.alt||[]}),this.__cache__=null};ut.prototype.push=function(e,t,n){const r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null};ut.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(r){const i=this.__find__(r);if(i<0){if(t)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[i].enabled=!0,n.push(r)},this),this.__cache__=null,n};ut.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(e,t)};ut.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(r){const i=this.__find__(r);if(i<0){if(t)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[i].enabled=!1,n.push(r)},this),this.__cache__=null,n};ut.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function Ct(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}Ct.prototype.attrIndex=function(t){if(!this.attrs)return-1;const n=this.attrs;for(let r=0,i=n.length;r<i;r++)if(n[r][0]===t)return r;return-1};Ct.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]};Ct.prototype.attrSet=function(t,n){const r=this.attrIndex(t),i=[t,n];r<0?this.attrPush(i):this.attrs[r]=i};Ct.prototype.attrGet=function(t){const n=this.attrIndex(t);let r=null;return n>=0&&(r=this.attrs[n][1]),r};Ct.prototype.attrJoin=function(t,n){const r=this.attrIndex(t);r<0?this.attrPush([t,n]):this.attrs[r][1]=this.attrs[r][1]+" "+n};function cd(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}cd.prototype.Token=Ct;const G2=/\r\n?|\n/g,W2=/\0/g;function Z2(e){let t;t=e.src.replace(G2,`
`),t=t.replace(W2,"<22>"),e.src=t}function Y2(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 J2(e){const t=e.tokens;for(let n=0,r=t.length;n<r;n++){const i=t[n];i.type==="inline"&&e.md.inline.parse(i.content,e.md,e.env,i.children)}}function X2(e){return/^<a[>\s]/i.test(e)}function Q2(e){return/^<\/a\s*>/i.test(e)}function e_(e){const t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n<r;n++){if(t[n].type!=="inline"||!e.md.linkify.pretest(t[n].content))continue;let i=t[n].children,u=0;for(let s=i.length-1;s>=0;s--){const o=i[s];if(o.type==="link_close"){for(s--;i[s].level!==o.level&&i[s].type!=="link_open";)s--;continue}if(o.type==="html_inline"&&(X2(o.content)&&u>0&&u--,Q2(o.content)&&u++),!(u>0)&&o.type==="text"&&e.md.linkify.test(o.content)){const c=o.content;let a=e.md.linkify.match(c);const l=[];let f=o.level,d=0;a.length>0&&a[0].index===0&&s>0&&i[s-1].type==="text_special"&&(a=a.slice(1));for(let h=0;h<a.length;h++){const p=a[h].url,_=e.md.normalizeLink(p);if(!e.md.validateLink(_))continue;let A=a[h].text;a[h].schema?a[h].schema==="mailto:"&&!/^mailto:/i.test(A)?A=e.md.normalizeLinkText("mailto:"+A).replace(/^mailto:/,""):A=e.md.normalizeLinkText(A):A=e.md.normalizeLinkText("http://"+A).replace(/^http:\/\//,"");const S=a[h].index;if(S>d){const E=new e.Token("text","",0);E.content=c.slice(d,S),E.level=f,l.push(E)}const x=new e.Token("link_open","a",1);x.attrs=[["href",_]],x.level=f++,x.markup="linkify",x.info="auto",l.push(x);const g=new e.Token("text","",0);g.content=A,g.level=f,l.push(g);const b=new e.Token("link_close","a",-1);b.level=--f,b.markup="linkify",b.info="auto",l.push(b),d=a[h].lastIndex}if(d<c.length){const h=new e.Token("text","",0);h.content=c.slice(d),h.level=f,l.push(h)}t[n].children=i=sd(i,s,l)}}}}const ad=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,t_=/\((c|tm|r)\)/i,n_=/\((c|tm|r)\)/ig,r_={c:"©",r:"®",tm:"™"};function i_(e,t){return r_[t.toLowerCase()]}function u_(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&(r.content=r.content.replace(n_,i_)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function s_(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&ad.test(r.content)&&(r.content=r.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")),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function o_(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(t_.test(e.tokens[t].content)&&u_(e.tokens[t].children),ad.test(e.tokens[t].content)&&s_(e.tokens[t].children))}const c_=/['"]/,Ua=/['"]/g,Ha="";function Bi(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function a_(e,t){let n;const r=[];for(let i=0;i<e.length;i++){const u=e[i],s=e[i].level;for(n=r.length-1;n>=0&&!(r[n].level<=s);n--);if(r.length=n+1,u.type!=="text")continue;let o=u.content,c=0,a=o.length;e:for(;c<a;){Ua.lastIndex=c;const l=Ua.exec(o);if(!l)break;let f=!0,d=!0;c=l.index+1;const h=l[0]==="'";let p=32;if(l.index-1>=0)p=o.charCodeAt(l.index-1);else for(n=i-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){p=e[n].content.charCodeAt(e[n].content.length-1);break}let _=32;if(c<a)_=o.charCodeAt(c);else for(n=i+1;n<e.length&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n++)if(e[n].content){_=e[n].content.charCodeAt(0);break}const A=li(p)||ai(String.fromCharCode(p)),S=li(_)||ai(String.fromCharCode(_)),x=ci(p),g=ci(_);if(g?f=!1:S&&(x||A||(f=!1)),x?d=!1:A&&(g||S||(d=!1)),_===34&&l[0]==='"'&&p>=48&&p<=57&&(d=f=!1),f&&d&&(f=A,d=S),!f&&!d){h&&(u.content=Bi(u.content,l.index,Ha));continue}if(d)for(n=r.length-1;n>=0;n--){let b=r[n];if(r[n].level<s)break;if(b.single===h&&r[n].level===s){b=r[n];let E,C;h?(E=t.md.optio
`,u.map=[t,e.line],!0}function g_(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||i+3>u)return!1;const s=e.src.charCodeAt(i);if(s!==126&&s!==96)return!1;let o=i;i=e.skipChars(i,s);let c=i-o;if(c<3)return!1;const a=e.src.slice(o,i),l=e.src.slice(i,u);if(s===96&&l.indexOf(String.fromCharCode(s))>=0)return!1;if(r)return!0;let f=t,d=!1;for(;f++,!(f>=n||(i=o=e.bMarks[f]+e.tShift[f],u=e.eMarks[f],i<u&&e.sCount[f]<e.blkIndent));)if(e.src.charCodeAt(i)===s&&!(e.sCount[f]-e.blkIndent>=4)&&(i=e.skipChars(i,s),!(i-o<c)&&(i=e.skipSpaces(i),!(i<u)))){d=!0;break}c=e.sCount[t],e.line=f+(d?1:0);const h=e.push("fence","code",0);return h.info=l,h.content=e.getLines(t+1,f,c,!0),h.markup=a,h.map=[t,e.line],!0}function b_(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];const s=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==62)return!1;if(r)return!0;const o=[],c=[],a=[],l=[],f=e.md.block.ruler.getRules("blockquote"),d=e.parentType;e.parentType="blockquote";let h=!1,p;for(p=t;p<n;p++){const g=e.sCount[p]<e.blkIndent;if(i=e.bMarks[p]+e.tShift[p],u=e.eMarks[p],i>=u)break;if(e.src.charCodeAt(i++)===62&&!g){let E=e.sCount[p]+1,C,P;e.src.charCodeAt(i)===32?(i++,E++,P=!1,C=!0):e.src.charCodeAt(i)===9?(C=!0,(e.bsCount[p]+E)%4===3?(i++,E++,P=!1):P=!0):C=!1;let I=E;for(o.push(e.bMarks[p]),e.bMarks[p]=i;i<u;){const k=e.src.charCodeAt(i);if(be(k))k===9?I+=4-(I+e.bsCount[p]+(P?1:0))%4:I++;else break;i++}h=i>=u,c.push(e.bsCount[p]),e.bsCount[p]=e.sCount[p]+1+(C?1:0),a.push(e.sCount[p]),e.sCount[p]=I-E,l.push(e.tShift[p]),e.tShift[p]=i-e.bMarks[p];continue}if(h)break;let b=!1;for(let E=0,C=f.length;E<C;E++)if(f[E](e,p,n,!0)){b=!0;break}if(b){e.lineMax=p,e.blkIndent!==0&&(o.push(e.bMarks[p]),c.push(e.bsCount[p]),l.push(e.tShift[p]),a.push(e.sCount[p]),e.sCount[p]-=e.blkIndent);break}o.push(e.bMarks[p]),c.push(e.bsCount[p]),l.push(e.tShift[p]),a.push(e.sCount[p]),e.sCount[p]=-1}const _=e.blkIndent;e.blkIndent=0;const A=e.push("blockquote_open","blockquote",1);A.markup=">";const S=[t,0];A.map=S,e.md.block.tokenize(e,t,p);const x=e.push("blockquote_close","blockquote",-1);x.markup=">",e.lineMax=s,e.parentType=d,S[1]=e.line;for(let g=0;g<l.length;g++)e.bMarks[g+t]=o[g],e.tShift[g+t]=l[g],e.sCount[g+t]=a[g],e.bsCount[g+t]=c[g];return e.blkIndent=_,!0}function m_(e,t,n,r){const i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let u=e.bMarks[t]+e.tShift[t];const s=e.src.charCodeAt(u++);if(s!==42&&s!==45&&s!==95)return!1;let o=1;for(;u<i;){const a=e.src.charCodeAt(u++);if(a!==s&&!be(a))return!1;a===s&&o++}if(o<3)return!1;if(r)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 za(e,t){const n=e.eMarks[t];let r=e.bMarks[t]+e.tShift[t];const i=e.src.charCodeAt(r++);if(i!==42&&i!==45&&i!==43)return-1;if(r<n){const u=e.src.charCodeAt(r);if(!be(u))return-1}return r}function qa(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];let i=n;if(i+1>=r)return-1;let u=e.src.charCodeAt(i++);if(u<48||u>57)return-1;for(;;){if(i>=r)return-1;if(u=e.src.charCodeAt(i++),u>=48&&u<=57){if(i-n>=10)return-1;continue}if(u===41||u===46)break;return-1}return i<r&&(u=e.src.charCodeAt(i),!be(u))?-1:i}function __(e,t){const n=e.level+2;for(let r=t+2,i=e.tokens.length-2;r<i;r++)e.tokens[r].level===n&&e.tokens[r].type==="paragraph_open"&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}function y_(e,t,n,r){let i,u,s,o,c=t,a=!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 l=!1;r&&e.parentType==="paragraph"&&e.sCount[c]>=e.blkIndent&&(l=!0);let f,d,h;if((h=qa(e,c))>=0){if(f=!0,s=e.bMarks[c]+e.tShift[c],d=Number(e.src.slice(s,h-1)),l&&d!==1)return!1}else if((h=za(e,c))>=0)f=!1;else return!1;if(l&&e.skipSpaces(h)>=e.eMarks[c])return!1;if(r)return!0;const p=e.src.charCodeAt(h-1),_=e.tokens.length;f?(o=e.push("ordered_list_open","ol",1),d!==1&&(o.attrs=[["start",d]])):o=e.push("bullet_list_open","ul",1);const A=[c,0];o.map=A,o.markup=String.fromCharCode(p);let S=!1;const x=e.md.block.ruler.ge
`,r)});jn(this,bi);jn(this,pi,"");jn(this,gi,!1);jn(this,or,!1);jn(this,Tn,n=>n);wr(this,gi,(n==null?void 0:n.allowCR)??!1),wr(this,or,(n==null?void 0:n.returnEmptyLines)??!1),wr(this,Tn,(n==null?void 0:n.mapperFun)??Wt(this,Tn))}}pi=new WeakMap,gi=new WeakMap,or=new WeakMap,Tn=new WeakMap,bi=new WeakSet,ao=function(n,r){for(n=Wt(this,pi)+n;;){const i=n.indexOf(`
`);if(Wt(this,gi)){const u=n.indexOf("\r");if(u!==-1&&u!==n.length-1&&(i===-1||i-1>u)){const s=Wt(this,Tn).call(this,n.slice(0,crOrLfIndex));(Wt(this,or)||s)&&r.enqueue(s),n=n.slice(u+1);continue}}if(i!==-1){let u=i;n[i-1]==="\r"&&u--;const s=Wt(this,Tn).call(this,n.slice(0,u));(Wt(this,or)||s)&&r.enqueue(s),n=n.slice(i+1);continue}break}wr(this,pi,n)};function V3(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],o={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},c={className:"meta",begin:/^(>>>|\.\.\.) /},a={className:"subst",begin:/\{/,end:/\}/,keywords:o,illegal:/#/},l={begin:/\{\{/,relevance:0},f={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,c],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,c],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,c,l,a]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,c,l,a]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,l,a]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,l,a]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},d="[0-9](_?[0-9])*",h=`(\\b(${d}))?\\.(${d})|\\b(${d})\\.`,p=`\\b|${r.join("|")}`,_={className:"number",relevance:0,variants:[{begin:`(\\b(${d})|(${h}))[eE][+-]?(${d})[jJ]?(?=${p})`},{begin:`(${h})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${p})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${p})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${p})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${p})`},{begin:`\\b(${d})[jJ](?=${p})`}]},A={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:o,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},S={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:["self",c,_,f,e.HASH_COMMENT_MODE]}]};return a.contains=[f,_,c],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:o,illegal:/(<\/|\?)|=>/,contains:[c,_,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},f,A,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[S]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[_,S,f]}]}}const Ja="[A-Za-z$_][0-9A-Za-z$_]*",z3=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","s
https://github.com/highlightjs/highlight.js/issues/2277`),ue=v,ne=N),W===void 0&&(W=!0);const pe={code:ne,language:ue};Y("before:highlight",pe);const Qe=pe.result?pe.result:f(pe.language,pe.code,W);return Qe.code=pe.code,Y("after:highlight",Qe),Qe}function f(v,N,W,ne){const ue=Object.create(null);function pe(R,V){return R.keywords[V]}function Qe(){if(!M.keywords){B.addText(O);return}let R=0;M.keywordPatternRe.lastIndex=0;let V=M.keywordPatternRe.exec(O),G="";for(;V;){G+=O.substring(R,V.index);const re=F.case_insensitive?V[0].toLowerCase():V[0],le=pe(M,re);if(le){const[Ce,Ge]=le;if(B.addText(G),G="",ue[re]=(ue[re]||0)+1,ue[re]<=hy&&(X+=Ge),Ce.startsWith("_"))G+=V[0];else{const yn=F.classNameAliases[Ce]||Ce;Pe(V[0],yn)}}else G+=V[0];R=M.keywordPatternRe.lastIndex,V=M.keywordPatternRe.exec(O)}G+=O.substring(R),B.addText(G)}function qn(){if(O==="")return;let R=null;if(typeof M.subLanguage=="string"){if(!t[M.subLanguage]){B.addText(O);return}R=f(M.subLanguage,O,!0,z[M.subLanguage]),z[M.subLanguage]=R._top}else R=h(O,M.subLanguage.length?M.subLanguage:null);M.relevance>0&&(X+=R.relevance),B.__addSublanguage(R._emitter,R.language)}function je(){M.subLanguage!=null?qn():Qe(),O=""}function Pe(R,V){R!==""&&(B.startScope(V),B.addText(R),B.endScope())}function _n(R,V){let G=1;const re=V.length-1;for(;G<=re;){if(!R._emit[G]){G++;continue}const le=F.classNameAliases[R[G]]||R[G],Ce=V[G];le?Pe(Ce,le):(O=Ce,Qe(),O=""),G++}}function Kn(R,V){return R.scope&&typeof R.scope=="string"&&B.openNode(F.classNameAliases[R.scope]||R.scope),R.beginScope&&(R.beginScope._wrap?(Pe(O,F.classNameAliases[R.beginScope._wrap]||R.beginScope._wrap),O=""):R.beginScope._multi&&(_n(R.beginScope,V),O="")),M=Object.create(R,{parent:{value:M}}),M}function Ar(R,V,G){let re=D6(R.endRe,G);if(re){if(R["on:end"]){const le=new Qa(R);R["on:end"](V,le),le.isMatchIgnored&&(re=!1)}if(re){for(;R.endsParent&&R.parent;)R=R.parent;return R}}if(R.endsWithParent)return Ar(R.parent,V,G)}function Gt(R){return M.matcher.regexIndex===0?(O+=R[0],1):(ee=!0,0)}function vr(R){const V=R[0],G=R.rule,re=new Qa(G),le=[G.__beforeBegin,G["on:begin"]];for(const Ce of le)if(Ce&&(Ce(R,re),re.isMatchIgnored))return Gt(V);return G.skip?O+=V:(G.excludeBegin&&(O+=V),je(),!G.returnBegin&&!G.excludeBegin&&(O=V)),Kn(G,R),G.returnBegin?0:V.length}function Tr(R){const V=R[0],G=N.substring(R.index),re=Ar(M,R,G);if(!re)return ul;const le=M;M.endScope&&M.endScope._wrap?(je(),Pe(V,M.endScope._wrap)):M.endScope&&M.endScope._multi?(je(),_n(M.endScope,R)):le.skip?O+=V:(le.returnEnd||le.excludeEnd||(O+=V),je(),le.excludeEnd&&(O=V));do M.scope&&B.closeNode(),!M.skip&&!M.subLanguage&&(X+=M.relevance),M=M.parent;while(M!==re.parent);return re.starts&&Kn(re.starts,R),le.returnEnd?0:V.length}function m(){const R=[];for(let V=M;V!==F;V=V.parent)V.scope&&R.unshift(V.scope);R.forEach(V=>B.openNode(V))}let y={};function w(R,V){const G=V&&V[0];if(O+=R,G==null)return je(),0;if(y.type==="begin"&&V.type==="end"&&y.index===V.index&&G===""){if(O+=N.slice(V.index,V.index+1),!i){const re=new Error(`0 width match regex (${v})`);throw re.languageName=v,re.badRule=y.rule,re}return 1}if(y=V,V.type==="begin")return vr(V);if(V.type==="illegal"&&!W){const re=new Error('Illegal lexeme "'+G+'" for mode "'+(M.scope||"<unnamed>")+'"');throw re.mode=M,re}else if(V.type==="end"){const re=Tr(V);if(re!==ul)return re}if(V.type==="illegal"&&G==="")return 1;if(J>1e5&&J>V.index*3)throw new Error("potential infinite loop, way more iterations than matches");return O+=G,G.length}const F=k(v);if(!F)throw Rn(u.replace("{}",v)),new Error('Unknown language: "'+v+'"');const L=ay(F);let $="",M=ne||L;const z={},B=new o.__emitter(o);m();let O="",X=0,q=0,J=0,ee=!1;try{if(F.__emitTokens)F.__emitTokens(N,B);else{for(M.matcher.considerAll();;){J++,ee?ee=!1:M.matcher.considerAll(),M.matcher.lastIndex=q;const R=M.matcher.exec(N);if(!R)break;const V=N.substring(q,R.index),G=w(V,R);q=R.index+G}w(N.substring(q))}return B.finalize(),$=B.toHTML(),{language:v,value:$,relevance:X,illegal:!1,_emitter:B,_top:M}}catch(R){if(R.message&&R.message.includes("Illegal"))return{lan
<div class="text-right sticky top-4 mb-2 mr-2 h-0">
2024-12-13 11:16:26 +00:00
<button class="badge btn-mini" onclick="copyStr(${yy(JSON.stringify(o))})">📋 Copy</button>
</div>
2024-12-13 11:16:26 +00:00
${c}
</div>`},window.copyStr=zd;const r=Uo(()=>t.value.render(e.source));return()=>Ho("div",{innerHTML:r.value})},{props:["source"]}),Sy=Cr({template:document.getElementById("settings-modal-short-input").innerHTML,props:{label:{type:String,required:!1},configKey:String,configDefault:Object,configInfo:Object,modelValue:[Object,String,Number]}}),Ay=Cr({components:{VueMarkdown:qd},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(){zd(this.msg.content)},editMsg(){this.editUserMsgAndRegenerate({...this.msg,content:this.editingContent}),this.editingContent=null}}}),ye={getAllConversations(){const e=[];for(const t in localStorage)t.startsWith("conv-")&&e.push(JSON.parse(localStorage.getItem(t)));return e.sort((t,n)=>n.lastModified-t.lastModified),e},getOneConversation(e){return JSON.parse(localStorage.getItem(e)||"null")},appendMsg(e,t){if(t.content===null)return;const n=ye.getOneConversation(e)||{id:e,lastModified:Date.now(),messages:[]};n.messages.push(t),n.lastModified=Date.now(),localStorage.setItem(e,JSON.stringify(n))},getNewConvId(){return`conv-${Date.now()}`},remove(e){localStorage.removeItem(e)},filterAndKeepMsgs(e,t){const n=ye.getOneConversation(e);n&&(n.messages=n.messages.filter(t),n.lastModified=Date.now(),localStorage.setItem(e,JSON.stringify(n)))},popMsg(e){const t=ye.getOneConversation(e);if(!t)return;const n=t.messages.pop();return t.lastModified=Date.now(),t.messages.length===0?ye.remove(e):localStorage.setItem(e,JSON.stringify(t)),n},getConfig(){const e=JSON.parse(localStorage.getItem("config")||"{}");return{...wu,...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)}},zi=e=>{const t=document.getElementById("messages-list"),n=t.scrollHeight-t.scrollTop-t.clientHeight;(!e||n<100)&&setTimeout(()=>t.scrollTo({top:t.scrollHeight}),1)};async function*vy(e,t){const r=(await fetch(e,t)).body.pipeThrough(new TextDecoderStream).pipeThrough(new H3);for await(const i of r)if(i.startsWith("data:")&&!i.endsWith("[DONE]"))yield JSON.parse(i.slice(5));else if(i.startsWith("error:")){const u=JSON.parse(i.slice(6));throw new Error(u.message||"Unknown error")}}const Kd=gu({components:{VueMarkdown:qd,SettingsModalShortInput:Sy,MessageBubble:Ay},data(){return{conversations:ye.getAllConversations(),messages:[],viewingConvId:ye.getNewConvId(),inputMsg:"",isGenerating:!1,pendingMsg:null,stopGeneration:()=>{},selectedTheme:ye.getTheme(),config:ye.getConfig(),showConfigDialog:!1,themes:Cy,configDefault:{...wu},configInfo:{...xy}}},computed:{},mounted(){document.getElementById("app").classList.remove("opacity-0");const e=document.getElementById("pending-msg");new ResizeObserver(()=>{this.isGenerating&&zi(!0)}).observe(e),this.setSelectedTheme(this.selectedTheme)},watch:{viewingConvId:function(e,t){e!=t&&(this.fetchMessages(),zi(),this.hideSidebar())}},methods:{hideSidebar(){document.getElementById("toggle-drawer").checked=!1},setSelectedTheme(e){var t;this.selectedTheme=e,document.body.setAttribute("data-theme",e),document.body.setAttribute("data-color-scheme",((t=Vd[e])==null?void 0:t["color-scheme"])??"auto"),ye.setTheme(e)},newConversation(){this.isGenerating||(this.viewingConvId=ye.getNewConvId())},setViewingConv(e){this.isGenerating||(this.viewingConvId=e)},deleteConv(e){this.isGenerating||window.confirm("Are you sure to delete this conversation?")&&(ye.remove(e),this.viewingConvId===e&&(this.viewingConvId=ye.getNewConvId()),this.fetchConversation(),this.fetchMessages())},downloadConv(e){const t=ye.getOneConversation(e);if(!t){alert("Conversation not found.");retur
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>
2024-12-13 11:16:26 +00:00
<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>