lollms-webui/web/dist/assets/index-adf0ac55.js

50 lines
1.4 MiB
JavaScript
Raw Normal View History

2023-05-31 13:19:28 +03:00
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();function Fd(t,e){const n=Object.create(null),r=t.split(",");for(let o=0;o<r.length;o++)n[r[o]]=!0;return e?o=>!!n[o.toLowerCase()]:o=>!!n[o]}function Gn(t){if(me(t)){const e={};for(let n=0;n<t.length;n++){const r=t[n],o=Ye(r)?Ty(r):Gn(r);if(o)for(const i in o)e[i]=o[i]}return e}else{if(Ye(t))return t;if(Fe(t))return t}}const hy=/;(?![^(]*\))/g,Sy=/:([^]+)/,by=/\/\*.*?\*\//gs;function Ty(t){const e={};return t.replace(by,"").split(hy).forEach(n=>{if(n){const r=n.split(Sy);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e}function Le(t){let e="";if(Ye(t))e=t;else if(me(t))for(let n=0;n<t.length;n++){const r=Le(t[n]);r&&(e+=r+" ")}else if(Fe(t))for(const n in t)t[n]&&(e+=n+" ");return e.trim()}const yy="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",vy=Fd(yy);function HE(t){return!!t||t===""}function Cy(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=pi(t[r],e[r]);return n}function pi(t,e){if(t===e)return!0;let n=$u(t),r=$u(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=Hr(t),r=Hr(e),n||r)return t===e;if(n=me(t),r=me(e),n||r)return n&&r?Cy(t,e):!1;if(n=Fe(t),r=Fe(e),n||r){if(!n||!r)return!1;const o=Object.keys(t).length,i=Object.keys(e).length;if(o!==i)return!1;for(const s in t){const a=t.hasOwnProperty(s),c=e.hasOwnProperty(s);if(a&&!c||!a&&c||!pi(t[s],e[s]))return!1}}return String(t)===String(e)}function VE(t,e){return t.findIndex(n=>pi(n,e))}const Ee=t=>Ye(t)?t:t==null?"":me(t)||Fe(t)&&(t.toString===WE||!ve(t.toString))?JSON.stringify(t,zE,2):String(t),zE=(t,e)=>e&&e.__v_isRef?zE(t,e.value):Zn(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[r,o])=>(n[`${r} =>`]=o,n),{})}:gi(e)?{[`Set(${e.size})`]:[...e.values()]}:Fe(e)&&!me(e)&&!KE(e)?String(e):e,Ge={},Xn=[],At=()=>{},Ry=()=>!1,Oy=/^on[^a-z]/,mi=t=>Oy.test(t),Bd=t=>t.startsWith("onUpdate:"),Qe=Object.assign,Gd=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},Ny=Object.prototype.hasOwnProperty,Ie=(t,e)=>Ny.call(t,e),me=Array.isArray,Zn=t=>fr(t)==="[object Map]",gi=t=>fr(t)==="[object Set]",$u=t=>fr(t)==="[object Date]",Ay=t=>fr(t)==="[object RegExp]",ve=t=>typeof t=="function",Ye=t=>typeof t=="string",Hr=t=>typeof t=="symbol",Fe=t=>t!==null&&typeof t=="object",$E=t=>Fe(t)&&ve(t.then)&&ve(t.catch),WE=Object.prototype.toString,fr=t=>WE.call(t),Iy=t=>fr(t).slice(8,-1),KE=t=>fr(t)==="[object Object]",qd=t=>Ye(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Mo=Fd(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),fi=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},xy=/-(\w)/g,Bt=fi(t=>t.replace(xy,(e,n)=>n?n.toUpperCase():"")),wy=/\B([A-Z])/g,Hn=fi(t=>t.replace(wy,"-$1").toLowerCase()),Ei=fi(t=>t.charAt(0).toUpperCase()+t.slice(1)),Qi=fi(t=>t?`on${Ei(t)}`:""),Vr=(t,e)=>!Object.is(t,e),Jn=(t,e)=>{for(let n=0;n<t.length;n++)t[n](e)},$o=(t,e,n)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:n})},nd=t=>{const e=parseFloat(t);return isNaN(e)?t:e},Dy=t=>{const e=Ye(t)?Number(t):NaN;return isNaN(e)?t:e};let Wu;const My=()=>Wu||(Wu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let Ct;class Ly{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Ct,!e&&Ct&&(this.index=(Ct.scopes||(Ct.scopes=[])).push(this
2023-05-29 20:24:25 +02:00
* vue-router v4.1.6
* (c) 2022 Eduardo San Martin Morote
* @license MIT
2023-05-31 13:19:28 +03:00
*/const Kn=typeof window<"u";function eR(t){return t.__esModule||t[Symbol.toStringTag]==="Module"}const ke=Object.assign;function os(t,e){const n={};for(const r in e){const o=e[r];n[r]=It(o)?o.map(t):t(o)}return n}const Ur=()=>{},It=Array.isArray,tR=/\/$/,nR=t=>t.replace(tR,"");function is(t,e,n="/"){let r,o={},i="",s="";const a=e.indexOf("#");let c=e.indexOf("?");return a<c&&a>=0&&(c=-1),c>-1&&(r=e.slice(0,c),i=e.slice(c+1,a>-1?a:e.length),o=t(i)),a>-1&&(r=r||e.slice(0,a),s=e.slice(a,e.length)),r=sR(r??e,n),{fullPath:r+(i&&"?")+i+s,path:r,query:o,hash:s}}function rR(t,e){const n=e.query?t(e.query):"";return e.path+(n&&"?")+n+(e.hash||"")}function A_(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function oR(t,e,n){const r=e.matched.length-1,o=n.matched.length-1;return r>-1&&r===o&&ar(e.matched[r],n.matched[o])&&Zh(e.params,n.params)&&t(e.query)===t(n.query)&&e.hash===n.hash}function ar(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function Zh(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!iR(t[n],e[n]))return!1;return!0}function iR(t,e){return It(t)?I_(t,e):It(e)?I_(e,t):t===e}function I_(t,e){return It(e)?t.length===e.length&&t.every((n,r)=>n===e[r]):t.length===1&&t[0]===e}function sR(t,e){if(t.startsWith("/"))return t;if(!t)return e;const n=e.split("/"),r=t.split("/");let o=n.length-1,i,s;for(i=0;i<r.length;i++)if(s=r[i],s!==".")if(s==="..")o>1&&o--;else break;return n.slice(0,o).join("/")+"/"+r.slice(i-(i===r.length?1:0)).join("/")}var Zr;(function(t){t.pop="pop",t.push="push"})(Zr||(Zr={}));var Fr;(function(t){t.back="back",t.forward="forward",t.unknown=""})(Fr||(Fr={}));function aR(t){if(!t)if(Kn){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return t[0]!=="/"&&t[0]!=="#"&&(t="/"+t),nR(t)}const cR=/^[^#]+#/;function lR(t,e){return t.replace(cR,"#")+e}function dR(t,e){const n=document.documentElement.getBoundingClientRect(),r=t.getBoundingClientRect();return{behavior:e.behavior,left:r.left-n.left-(e.left||0),top:r.top-n.top-(e.top||0)}}const xi=()=>({left:window.pageXOffset,top:window.pageYOffset});function uR(t){let e;if("el"in t){const n=t.el,r=typeof n=="string"&&n.startsWith("#"),o=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o)return;e=dR(o,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.pageXOffset,e.top!=null?e.top:window.pageYOffset)}function x_(t,e){return(history.state?history.state.position-e:-1)+t}const fd=new Map;function _R(t,e){fd.set(t,e)}function pR(t){const e=fd.get(t);return fd.delete(t),e}let mR=()=>location.protocol+"//"+location.host;function Jh(t,e){const{pathname:n,search:r,hash:o}=e,i=t.indexOf("#");if(i>-1){let a=o.includes(t.slice(i))?t.slice(i).length:1,c=o.slice(a);return c[0]!=="/"&&(c="/"+c),A_(c,"")}return A_(n,t)+r+o}function gR(t,e,n,r){let o=[],i=[],s=null;const a=({state:u})=>{const p=Jh(t,location),m=n.value,g=e.value;let S=0;if(u){if(n.value=p,e.value=u,s&&s===m){s=null;return}S=g?u.position-g.position:0}else r(p);o.forEach(E=>{E(n.value,m,{delta:S,type:Zr.pop,direction:S?S>0?Fr.forward:Fr.back:Fr.unknown})})};function c(){s=n.value}function l(u){o.push(u);const p=()=>{const m=o.indexOf(u);m>-1&&o.splice(m,1)};return i.push(p),p}function d(){const{history:u}=window;u.state&&u.replaceState(ke({},u.state,{scroll:xi()}),"")}function _(){for(const u of i)u();i=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",d)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",d),{pauseListeners:c,listen:l,destroy:_}}function w_(t,e,n,r=!1,o=!1){return{back:t,current:e,forward:n,replaced:r,position:window.history.length,scroll:o?xi():null}}function fR(t){const{history:e,location:n}=window,r={value:Jh(t,n)},o={value:e.state};o.value||i(r.value,{back:null,current:r.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function i(c,l,d){const _=t.indexOf("#"
2023-05-29 20:24:25 +02:00
Copyright (c) 2016 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
2023-05-31 13:19:28 +03:00
*/(function(){var a=function(){function c(){}c.prototype=Object.create(null);function l(E,h){for(var b=h.length,T=0;T<b;++T)g(E,h[T])}var d={}.hasOwnProperty;function _(E,h){E[h]=!0}function u(E,h){for(var b in h)d.call(h,b)&&(E[b]=!!h[b])}var p=/\s+/;function m(E,h){for(var b=h.split(p),T=b.length,O=0;O<T;++O)E[b[O]]=!0}function g(E,h){if(h){var b=typeof h;b==="string"?m(E,h):Array.isArray(h)?l(E,h):b==="object"?u(E,h):b==="number"&&_(E,h)}}function S(){for(var E=arguments.length,h=Array(E),b=0;b<E;b++)h[b]=arguments[b];var T=new c;l(T,h);var O=[];for(var C in T)T[C]&&O.push(C);return O.join(" ")}return S}();typeof n<"u"&&n.exports?n.exports=a:(i=[],s=function(){return a}.apply(r,i),s!==void 0&&(n.exports=s))})()},"./node_modules/core-js/es/array/from.js":function(n,r,o){o("./node_modules/core-js/modules/es.string.iterator.js"),o("./node_modules/core-js/modules/es.array.from.js");var i=o("./node_modules/core-js/internals/path.js");n.exports=i.Array.from},"./node_modules/core-js/internals/a-function.js":function(n,r){n.exports=function(o){if(typeof o!="function")throw TypeError(String(o)+" is not a function");return o}},"./node_modules/core-js/internals/an-object.js":function(n,r,o){var i=o("./node_modules/core-js/internals/is-object.js");n.exports=function(s){if(!i(s))throw TypeError(String(s)+" is not an object");return s}},"./node_modules/core-js/internals/array-from.js":function(n,r,o){var i=o("./node_modules/core-js/internals/bind-context.js"),s=o("./node_modules/core-js/internals/to-object.js"),a=o("./node_modules/core-js/internals/call-with-safe-iteration-closing.js"),c=o("./node_modules/core-js/internals/is-array-iterator-method.js"),l=o("./node_modules/core-js/internals/to-length.js"),d=o("./node_modules/core-js/internals/create-property.js"),_=o("./node_modules/core-js/internals/get-iterator-method.js");n.exports=function(p){var m=s(p),g=typeof this=="function"?this:Array,S=arguments.length,E=S>1?arguments[1]:void 0,h=E!==void 0,b=0,T=_(m),O,C,x,A;if(h&&(E=i(E,S>2?arguments[2]:void 0,2)),T!=null&&!(g==Array&&c(T)))for(A=T.call(m),C=new g;!(x=A.next()).done;b++)d(C,b,h?a(A,E,[x.value,b],!0):x.value);else for(O=l(m.length),C=new g(O);O>b;b++)d(C,b,h?E(m[b],b):m[b]);return C.length=b,C}},"./node_modules/core-js/internals/array-includes.js":function(n,r,o){var i=o("./node_modules/core-js/internals/to-indexed-object.js"),s=o("./node_modules/core-js/internals/to-length.js"),a=o("./node_modules/core-js/internals/to-absolute-index.js");n.exports=function(c){return function(l,d,_){var u=i(l),p=s(u.length),m=a(_,p),g;if(c&&d!=d){for(;p>m;)if(g=u[m++],g!=g)return!0}else for(;p>m;m++)if((c||m in u)&&u[m]===d)return c||m||0;return!c&&-1}}},"./node_modules/core-js/internals/bind-context.js":function(n,r,o){var i=o("./node_modules/core-js/internals/a-function.js");n.exports=function(s,a,c){if(i(s),a===void 0)return s;switch(c){case 0:return function(){return s.call(a)};case 1:return function(l){return s.call(a,l)};case 2:return function(l,d){return s.call(a,l,d)};case 3:return function(l,d,_){return s.call(a,l,d,_)}}return function(){return s.apply(a,arguments)}}},"./node_modules/core-js/internals/call-with-safe-iteration-closing.js":function(n,r,o){var i=o("./node_modules/core-js/internals/an-object.js");n.exports=function(s,a,c,l){try{return l?a(i(c)[0],c[1]):a(c)}catch(_){var d=s.return;throw d!==void 0&&i(d.call(s)),_}}},"./node_modules/core-js/internals/check-correctness-of-iteration.js":function(n,r,o){var i=o("./node_modules/core-js/internals/well-known-symbol.js"),s=i("iterator"),a=!1;try{var c=0,l={next:function(){return{done:!!c++}},return:function(){a=!0}};l[s]=function(){return this},Array.from(l,function(){throw 2})}catch{}n.exports=function(d,_){if(!_&&!a)return!1;var u=!1;try{var p={};p[s]=function(){return{next:function(){return{done:u=!0}}}},d(p)}catch{}return u}},"./node_modules/core-js/internals/classof-raw.js":function(n,r){var o={}.toString;n.exports=function(i){return o.call(i).slice(8,-1)}},"./node_modules/core-js/internals/classof.js":function(n,r,o){var i=o("./node_modules/core-js/internals/classof-r
2023-05-31 12:30:32 +03:00
`).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||e[n]&&ON[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Q_=Symbol("internals");function Ar(t){return t&&String(t).trim().toLowerCase()}function Fo(t){return t===!1||t==null?t:q.isArray(t)?t.map(Fo):String(t)}function AN(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const IN=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function cs(t,e,n,r,o){if(q.isFunction(r))return r.call(this,e,n);if(o&&(e=n),!!q.isString(e)){if(q.isString(r))return e.indexOf(r)!==-1;if(q.isRegExp(r))return r.test(e)}}function xN(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function wN(t,e){const n=q.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(o,i,s){return this[r].call(this,e,o,i,s)},configurable:!0})})}class ki{constructor(e){e&&this.set(e)}set(e,n,r){const o=this;function i(a,c,l){const d=Ar(c);if(!d)throw new Error("header name must be a non-empty string");const _=q.findKey(o,d);(!_||o[_]===void 0||l===!0||l===void 0&&o[_]!==!1)&&(o[_||c]=Fo(a))}const s=(a,c)=>q.forEach(a,(l,d)=>i(l,d,c));return q.isPlainObject(e)||e instanceof this.constructor?s(e,n):q.isString(e)&&(e=e.trim())&&!IN(e)?s(NN(e),n):e!=null&&i(n,e,r),this}get(e,n){if(e=Ar(e),e){const r=q.findKey(this,e);if(r){const o=this[r];if(!n)return o;if(n===!0)return AN(o);if(q.isFunction(n))return n.call(this,o,r);if(q.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Ar(e),e){const r=q.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||cs(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let o=!1;function i(s){if(s=Ar(s),s){const a=q.findKey(r,s);a&&(!n||cs(r,r[a],a,n))&&(delete r[a],o=!0)}}return q.isArray(e)?e.forEach(i):i(e),o}clear(e){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!e||cs(this,this[i],i,e,!0))&&(delete this[i],o=!0)}return o}normalize(e){const n=this,r={};return q.forEach(this,(o,i)=>{const s=q.findKey(r,i);if(s){n[s]=Fo(o),delete n[i];return}const a=e?xN(i):String(i).trim();a!==i&&delete n[i],n[a]=Fo(o),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return q.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=e&&q.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
2023-05-31 13:19:28 +03:00
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(o=>r.set(o)),r}static accessor(e){const r=(this[Q_]=this[Q_]={accessors:{}}).accessors,o=this.prototype;function i(s){const a=Ar(s);r[a]||(wN(o,s),r[a]=!0)}return q.isArray(e)?e.forEach(i):i(e),this}}ki.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);q.freezeMethods(ki.prototype);q.freezeMethods(ki);const Qt=ki;function ls(t,e){const n=this||uu,r=e||n,o=Qt.from(r.headers);let i=r.data;return q.forEach(t,function(a){i=a.call(n,i,o.normalize(),e?e.status:void 0)}),o.normalize(),i}function NS(t){return!!(t&&t.__CANCEL__)}function ao(t,e,n){xe.call(this,t??"canceled",xe.ERR_CANCELED,e,n),this.name="CanceledError"}q.inherits(ao,xe,{__CANCEL__:!0});function DN(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new xe("Request failed with status code "+n.status,[xe.ERR_BAD_REQUEST,xe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const MN=Lt.isStandardBrowserEnv?function(){return{write:function(n,r,o,i,s,a){const c=[];c.push(n+"="+encodeURIComponent(r)),q.isNumber(o)&&c.push("expires="+new Date(o).toGMTString()),q.isString(i)&&c.push("path="+i),q.isString(s)&&c.push("domain="+s),a===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function LN(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function kN(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}function AS(t,e){return t&&!LN(e)?kN(t,e):e}const PN=Lt.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function o(i){let s=i;return e&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(s){const a=q.isString(s)?o(s):s;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function UN(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function FN(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o=0,i=0,s;return e=e!==void 0?e:1e3,function(c){const l=Date.now(),d=r[i];s||(s=l),n[o]=c,r[o]=l;let _=i,u=0;for(;_!==o;)u+=n[_++],_=_%t;if(o=(o+1)%t,o===i&&(i=(i+1)%t),l-s<e)return;const p=d&&l-d;return p?Math.round(u*1e3/p):void 0}}function j_(t,e){let n=0;const r=FN(50,250);return o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,a=i-n,c=r(a),l=i<=s;n=i;const d={loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&l?(s-i)/c:void 0,event:o};d[e?"download":"upload"]=!0,t(d)}}const BN=typeof XMLHttpRequest<"u",GN=BN&&function(t){return new Promise(function(n,r){let o=t.data;const i=Qt.from(t.headers).normalize(),s=t.responseType;let a;function c(){t.cancelToken&&t.cancelToken.unsubscribe(a),t.signal&&t.signal.removeEventListener("abort",a)}q.isFormData(o)&&(Lt.isStandardBrowserEnv||Lt.isStandardBrowserWebWorkerEnv)&&i.setContentType(!1);let l=new XMLHttpRequest;if(t.auth){const p=t.auth.username||"",m=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";i.set("Authorization","Basic "+btoa(p+":"+m))}const d=AS(t.baseURL,t.url);l.open(t.method.toUpperCase(),CS(d,t.params,t.paramsSerializer),!0),l.timeout=t.timeout;function _(){if(!l)return;const p=Qt.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),g={data:!s||s==="text"||s==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:p,config:t,request:l};DN(function(E){n(E),c()},function(E){r(E),c()
`+t.personality.name,4,!0),this.configFile.personality=t.personality.name,this.configFile.personality_category=t.personality.category,this.configFile.personality_language=t.personality.language})),fe(()=>{Ce.replace()}))},onSelected(t){this.isLoading&&this.$refs.toast.showToast("Loading... please wait",4,!1),t&&(t.isInstalled?this.configFile.model!=t.title&&(this.update_model(t.title),this.configFile.model=t.title,this.$refs.toast.showToast(`Selected model:
2023-05-29 20:24:25 +02:00
`+t.title,4,!0),this.settingsChanged=!0,this.isModelSelected=!0):this.$refs.toast.showToast(`Model:
`+t.title+`
2023-05-31 13:19:28 +03:00
is not installed`,4,!1),fe(()=>{Ce.replace()}))},onInstall(t){if(t.linkNotValid){t.installing=!1,this.$refs.toast.showToast("Link is not valid, file does not exist",4,!1);return}let e=t.path;this.showProgress=!0,this.progress=0,console.log("installing...");const n=r=>{if(console.log("received something"),r.status==="progress"){if(console.log(`Progress = ${r.progress}`),t.progress=r.progress,t.installing=!0,t.progress==100){const o=this.models.findIndex(i=>i.path===e);this.models[o].isInstalled=!0,this.showProgress=!1,t.installing=!1}}else if(r.status==="succeeded"){console.log("Received succeeded"),Ve.off("install_progress",n),console.log("Installed successfully");const o=this.models.findIndex(i=>i.path===e);this.models[o].isInstalled=!0,this.showProgress=!1,t.installing=!1,this.$refs.toast.showToast(`Model:
2023-05-29 20:24:25 +02:00
`+t.title+`
installed!`,4,!0),this.api_get_req("disk_usage").then(i=>{this.diskUsage=i})}else r.status==="failed"&&(Ve.off("install_progress",n),console.log("Install failed"),t.installing=!1,v,this.showProgress=!1,console.error("Installation failed:",r.error),this.$refs.toast.showToast(`Model:
`+t.title+`
failed to install!`,4,!1),this.api_get_req("disk_usage").then(o=>{this.diskUsage=o}))};Ve.on("install_progress",n),Ve.emit("install_model",{path:e}),console.log("Started installation, please wait")},onUninstall(t){console.log("uninstalling model...");const e=n=>{if(n.status==="progress")this.progress=n.progress;else if(n.status==="succeeded"){t.uninstalling=!1,Ve.off("install_progress",e),this.showProgress=!1;const r=this.models.findIndex(o=>o.path===t.path);this.models[r].isInstalled=!1,t.model.isCustomModel&&(this.models=this.models.filter(o=>o.title!==t.title)),this.$refs.toast.showToast(`Model:
`+t.title+`
was uninstalled!`,4,!0),this.api_get_req("disk_usage").then(o=>{this.diskUsage=o})}else n.status==="failed"&&(t.uninstalling=!1,this.showProgress=!1,Ve.off("install_progress",e),console.error("Uninstallation failed:",message.error),this.$refs.toast.showToast(`Model:
`+t.title+`
2023-05-31 13:19:28 +03:00
failed to uninstall!`,4,!1),this.api_get_req("disk_usage").then(r=>{this.diskUsage=r}))};Ve.on("install_progress",e),Ve.emit("uninstall_model",{path:t.path})},onSelectedBinding(t){this.configFile.binding!=t.binding.folder&&this.update_binding(t.binding.folder)},onMessageBoxOk(){console.log("OK button clicked")},refresh(){this.api_get_req("list_models").then(t=>{this.modelsArr=t}),this.api_get_req("list_personalities_categories").then(t=>{this.persCatgArr=t}),this.api_get_req("list_personalities").then(t=>{this.persArr=t}),this.api_get_req("get_config").then(t=>{this.configFile=t,this.models.forEach(e=>{e.title==t.model?e.selected=!0:e.selected=!1})}),this.api_get_req("disk_usage").then(t=>{this.diskUsage=t}),this.getPersonalitiesArr(),this.fetchModels()},toggleAccordion(){this.showAccordion=!this.showAccordion},update_setting(t,e,n){const r={setting_name:t,setting_value:e};Be.post("/update_setting",r).then(o=>{if(o)return n!==void 0&&n(o),o.data}).catch(o=>({status:!1}))},update_binding(t){this.isLoading=!0,this.update_setting("binding",t,e=>{this.refresh(),this.$refs.toast.showToast("Binding changed.",4,!0),this.settingsChanged=!0,this.isLoading=!1,fe(()=>{Ce.replace()}),this.update_model(null),this.configFile.model=null,this.api_get_req("disk_usage").then(n=>{this.diskUsage=n})})},update_model(t){t||(this.isModelSelected=!1),this.isLoading=!0,this.update_setting("model",t,e=>{this.isLoading=!1})},applyConfiguration(){this.isLoading=!0,Be.post("/apply_settings").then(t=>{this.isLoading=!1,t.data.status==="succeeded"?(this.$refs.toast.showToast("Configuration changed successfully.",4,!0),this.settingsChanged=!1,this.save_configuration()):this.$refs.toast.showToast("Configuration change failed.",4,!1),fe(()=>{Ce.replace()})})},save_configuration(){this.showConfirmation=!1,Be.post("/save_settings",{}).then(t=>{if(t)return t.status||this.$refs.messageBox.showMessage("Error: Couldn't save settings!"),t.data}).catch(t=>(console.log(t.message,"save_configuration"),this.$refs.messageBox.showMessage("Couldn't save settings!"),{status:!1}))},reset_configuration(){this.$refs.yesNoDialog.askQuestion(`Are you sure?
This will delete all your configurations and get back to default configuration.`).then(t=>{t&&Be.post("/reset_settings",{}).then(e=>{if(e)return e.status?this.$refs.messageBox.showMessage("Settings have been reset correctly"):this.$refs.messageBox.showMessage("Couldn't reset settings!"),e.data}).catch(e=>(console.log(e.message,"reset_configuration"),this.$refs.messageBox.showMessage("Couldn't reset settings!"),{status:!1}))})},async api_get_req(t){try{const e=await Be.get("/"+t);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - settings");return}},closeToast(){this.showToast=!1},async getPersonalitiesArr(){this.isLoading=!0,this.personalities=[];const t=await this.api_get_req("get_all_personalities"),e=Object.keys(t);for(let n=0;n<e.length;n++){const r=e[n],o=t[r],i=Object.keys(o);for(let s=0;s<i.length;s++){const a=i[s],l=o[a].map(d=>{let _={};return _=d,_.category=a,_.language=r,_});this.personalities.length==0?this.personalities=l:this.personalities=this.personalities.concat(l)}}this.personalitiesFiltered=this.personalities.filter(n=>n.category===this.configFile.personality_category&&n.language===this.configFile.personality_language),this.isLoading=!1},computedFileSize(t){return au(t)}},async mounted(){this.isLoading=!0,fe(()=>{Ce.replace()}),this.configFile=await this.api_get_req("get_config"),this.configFile.model&&(this.isModelSelected=!0),this.fetchModels(),this.bindingsArr=await this.api_get_req("list_bindings"),this.modelsArr=await this.api_get_req("list_models"),this.persLangArr=await this.api_get_req("list_personalities_languages"),this.persCatgArr=await this.api_get_req("list_personalities_categories"),this.persArr=await this.api_get_req("list_personalities"),this.langArr=await this.api_get_req("list_languages"),await this.getPersonalitiesArr(),this.bindings=await this.api_get_req("list_bindings"),this.isLoading=!1,this.diskUsage=await this.api_get_req("disk_usage")},computed:{available_space(){return this.computedFileSize(this.diskUsage.available_space)},binding_models_usage(){return this.computedFileSize(this.diskUsage.binding_models_usage)},percent_usage(){return this.diskUsage.percent_usage},total_space(){return this.computedFileSize(this.diskUsage.total_space)}},watch:{bec_collapsed(){fe(()=>{Ce.replace()})},pc_collapsed(){fe(()=>{Ce.replace()})},mc_collapsed(){fe(()=>{Ce.replace()})},showConfirmation(){fe(()=>{Ce.replace()})},mzl_collapsed(){fe(()=>{Ce.replace()})},pzl_collapsed(){fe(()=>{Ce.replace()})},bzl_collapsed(){fe(()=>{Ce.replace()})},all_collapsed(t){this.collapseAll(t),fe(()=>{Ce.replace()})},settingsChanged(){fe(()=>{Ce.replace()})},isLoading(){fe(()=>{Ce.replace()})}}},De=t=>(yi("data-v-1a631c6c"),t=t(),vi(),t),ow={class:"container overflow-y-scroll flex flex-col no-scrollbar shadow-lg p-10 pt-0"},iw={class:"sticky top-0 z-10 flex flex-row mb-2 p-3 gap-3 w-full rounded-b-lg bg-bg-light-tone dark:bg-bg-dark-tone shadow-lg"},sw={key:0,class:"flex gap-3 flex-1 items-center duration-75"},aw=De(()=>f("i",{"data-feather":"x"},null,-1)),cw=[aw],lw=De(()=>f("i",{"data-feather":"check"},null,-1)),dw=[lw],uw={key:1,class:"flex gap-3 flex-1 items-center"},_w=De(()=>f("i",{"data-feather":"save"},null,-1)),pw=[_w],mw=De(()=>f("i",{"data-feather":"refresh-ccw"},null,-1)),gw=[mw],fw=De(()=>f("i",{"data-feather":"list"},null,-1)),Ew=[fw],hw={class:"flex gap-3 flex-1 items-center justify-end"},Sw={class:"flex gap-3 items-center"},bw={key:0,class:"flex gap-3 items-center"},Tw=De(()=>f("i",{"data-feather":"check"},null,-1)),yw=[Tw],vw={key:1,role:"status"},Cw=De(()=>f("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[f("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"current
2023-05-31 12:30:32 +03:00
`,m6="∄",g6="∄",f6="𝔑",E6="𝔫",h6="≧̸",S6="≱",b6="≱",T6="≧̸",y6="⩾̸",v6="⩾̸",C6="⋙̸",R6="≵",O6="≫⃒",N6="≯",A6="≯",I6="≫̸",x6="↮",w6="⇎",D6="⫲",M6="∋",L6="⋼",k6="⋺",P6="∋",U6="Њ",F6="њ",B6="↚",G6="⇍",q6="‥",Y6="≦̸",H6="≰",V6="↚",z6="⇍",$6="↮",W6="⇎",K6="≰",Q6="≦̸",j6="⩽̸",X6="⩽̸",Z6="≮",J6="⋘̸",eW="≴",tW="≪⃒",nW="≮",rW="⋪",oW="⋬",iW="≪̸",sW="∤",aW="",cW=" ",lW="𝕟",dW="",uW="⫬",_W="¬",pW="≢",mW="≭",gW="∦",fW="∉",EW="≠",hW="≂̸",SW="∄",bW="≯",TW="≱",yW="≧̸",vW="≫̸",CW="≹",RW="⩾̸",OW="≵",NW="≎̸",AW="≏̸",IW="∉",xW="⋵̸",wW="⋹̸",DW="∉",MW="⋷",LW="⋶",kW="⧏̸",PW="⋪",UW="⋬",FW="≮",BW="≰",GW="≸",qW="≪̸",YW="⩽̸",HW="≴",VW="⪢̸",zW="⪡̸",$W="∌",WW="∌",KW="⋾",QW="⋽",jW="⊀",XW="⪯̸",ZW="⋠",JW="∌",e8="⧐̸",t8="⋫",n8="⋭",r8="⊏̸",o8="⋢",i8="⊐̸",s8="⋣",a8="⊂⃒",c8="⊈",l8="⊁",d8="⪰̸",u8="⋡",_8="≿̸",p8="⊃⃒",m8="⊉",g8="≁",f8="≄",E8="≇",h8="≉",S8="∤",b8="∦",T8="∦",y8="⫽⃥",v8="∂̸",C8="⨔",R8="⊀",O8="⋠",N8="⊀",A8="⪯̸",I8="⪯̸",x8="⤳̸",w8="↛",D8="⇏",M8="↝̸",L8="↛",k8="⇏",P8="⋫",U8="⋭",F8="⊁",B8="⋡",G8="⪰̸",q8="𝒩",Y8="𝓃",H8="∤",V8="∦",z8="≁",$8="≄",W8="≄",K8="∤",Q8="∦",j8="⋢",X8="⋣",Z8="⊄",J8="⫅̸",eK="⊈",tK="⊂⃒",nK="⊈",rK="⫅̸",oK="⊁",iK="⪰̸",sK="⊅",aK="⫆̸",cK="⊉",lK="⊃⃒",dK="⊉",uK="⫆̸",_K="≹",pK="Ñ",mK="ñ",gK="≸",fK="⋪",EK="⋬",hK="⋫",SK="⋭",bK="Ν",TK="ν",yK="#",vK="№",CK="",RK="≍⃒",OK="⊬",NK="⊭",AK="⊮",IK="⊯",xK="≥⃒",wK=">⃒",DK="⤄",MK="⧞",LK="⤂",kK="≤⃒",PK="<⃒",UK="⊴⃒",FK="⤃",BK="⊵⃒",GK="∼⃒",qK="⤣",YK="↖",HK="⇖",VK="↖",zK="⤧",$K="Ó",WK="ó",KK="⊛",QK="Ô",jK="ô",XK="⊚",ZK="О",JK="о",e7="⊝",t7="Ő",n7="ő",r7="⨸",o7="⊙",i7="⦼",s7="Œ",a7="œ",c7="⦿",l7="𝔒",d7="𝔬",u7="˛",_7="Ò",p7="ò",m7="⧁",g7="⦵",f7="Ω",E7="∮",h7="↺",S7="⦾",b7="⦻",T7="‾",y7="⧀",v7="Ō",C7="ō",R7="Ω",O7="ω",N7="Ο",A7="ο",I7="⦶",x7="⊖",w7="𝕆",D7="𝕠",M7="⦷",L7="“",k7="",P7="⦹",U7="⊕",F7="↻",B7="⩔",G7="",q7="⩝",Y7="",H7="",V7="ª",z7="º",$7="⊶",W7="⩖",K7="⩗",Q7="⩛",j7="Ⓢ",X7="𝒪",Z7="",J7="Ø",eQ="ø",tQ="⊘",nQ="Õ",rQ="õ",oQ="⨶",iQ="⨷",sQ="⊗",aQ="Ö",cQ="ö",lQ="⌽",dQ="‾",uQ="⏞",_Q="⎴",pQ="⏜",mQ="¶",gQ="∥",fQ="∥",EQ="⫳",hQ="⫽",SQ="∂",bQ="∂",TQ="П",yQ="п",vQ="%",CQ=".",RQ="‰",OQ="⊥",NQ="‱",AQ="𝔓",IQ="𝔭",xQ="Φ",wQ="φ",DQ="ϕ",MQ="",LQ="☎",kQ="Π",PQ="π",UQ="⋔",FQ="ϖ",BQ="ℏ",GQ="",qQ="ℏ",YQ="⨣",HQ="⊞",VQ="⨢",zQ="+",$Q="∔",WQ="⨥",KQ="⩲",QQ="±",jQ="±",XQ="⨦",ZQ="⨧",JQ="±",ej="",tj="⨕",nj="𝕡",rj="",oj="£",ij="⪷",sj="⪻",aj="≺",cj="≼",lj="⪷",dj="≺",uj="≼",_j="≺",pj="⪯",mj="≼",gj="≾",fj="⪯",Ej="⪹",hj="⪵",Sj="⋨",bj="⪯",Tj="⪳",yj="≾",vj="",Cj="″",Rj="",Oj="⪹",Nj="⪵",Aj="⋨",Ij="∏",xj="∏",wj="⌮",Dj="⌒",Mj="⌓",Lj="∝",kj="∝",Pj="∷",Uj="∝",Fj="≾",Bj="⊰",Gj="𝒫",qj="𝓅",Yj="Ψ",Hj="ψ",Vj="",zj="𝔔",$j="𝔮",Wj="⨌",Kj="𝕢",Qj="",jj="⁗",Xj="𝒬",Zj="𝓆",Jj="",eX="⨖",tX="?",nX="≟",rX='"',oX='"',iX="⇛",sX="∽̱",aX="Ŕ",cX="ŕ",lX="√",dX="⦳",uX="⟩",_X="⟫",pX="⦒",mX="⦥",gX="⟩",fX="»",EX="⥵",hX="⇥",SX="⤠",bX="⤳",TX="→",yX="↠",vX="⇒",CX="⤞",RX="↪",OX="↬",NX="⥅",AX="⥴",IX="⤖",xX="↣",wX="↝",DX="⤚",MX="⤜",LX="",kX="",PX="⤍",UX="⤏",FX="⤐",BX="",GX="}",qX="]",YX="⦌",HX="⦎",VX="⦐",zX="Ř",$X="ř",WX="Ŗ",KX="ŗ",QX="⌉",jX="}",XX="Р",ZX="р",JX="⤷",eZ="⥩",tZ="”",nZ="”",rZ="↳",oZ="",iZ="",sZ="",aZ="",cZ="",lZ="▭",dZ="®",uZ="®",_Z="∋",pZ="⇋",mZ="⥯",gZ="⥽",fZ="⌋",EZ="𝔯",hZ="",SZ="⥤",bZ="⇁",TZ="⇀",yZ="⥬",vZ="Ρ",CZ="ρ",RZ="ϱ",OZ="⟩",NZ="⇥",AZ="→",IZ="→
`," "],ple=["{","}","|","\\","^","`"].concat(_le),mle=["'"].concat(ple),up=["%","/","?",";","#"].concat(mle),_p=["/","?","#"],gle=255,pp=/^[+a-z0-9A-Z_-]{0,63}$/,fle=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,mp={javascript:!0,"javascript:":!0},gp={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Ele(t,e){if(t&&t instanceof ei)return t;var n=new ei;return n.parse(t,e),n}ei.prototype.parse=function(t,e){var n,r,o,i,s,a=t;if(a=a.trim(),!e&&t.split("#").length===1){var c=ule.exec(a);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}var l=lle.exec(a);if(l&&(l=l[0],o=l.toLowerCase(),this.protocol=l,a=a.substr(l.length)),(e||l||a.match(/^\/\/[^@\/]+@[^@\/]+/))&&(s=a.substr(0,2)==="//",s&&!(l&&mp[l])&&(a=a.substr(2),this.slashes=!0)),!mp[l]&&(s||l&&!gp[l])){var d=-1;for(n=0;n<_p.length;n++)i=a.indexOf(_p[n]),i!==-1&&(d===-1||i<d)&&(d=i);var _,u;for(d===-1?u=a.lastIndexOf("@"):u=a.lastIndexOf("@",d),u!==-1&&(_=a.slice(0,u),a=a.slice(u+1),this.auth=_),d=-1,n=0;n<up.length;n++)i=a.indexOf(up[n]),i!==-1&&(d===-1||i<d)&&(d=i);d===-1&&(d=a.length),a[d-1]===":"&&d--;var p=a.slice(0,d);a=a.slice(d),this.parseHost(p),this.hostname=this.hostname||"";var m=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!m){var g=this.hostname.split(/\./);for(n=0,r=g.length;n<r;n++){var S=g[n];if(S&&!S.match(pp)){for(var E="",h=0,b=S.length;h<b;h++)S.charCodeAt(h)>127?E+="x":E+=S[h];if(!E.match(pp)){var T=g.slice(0,n),O=g.slice(n+1),C=S.match(fle);C&&(T.push(C[1]),O.unshift(C[2])),O.length&&(a=O.join(".")+a),this.hostname=T.join(".");break}}}}this.hostname.length>gle&&(this.hostname=""),m&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var x=a.indexOf("#");x!==-1&&(this.hash=a.substr(x),a=a.slice(0,x));var A=a.indexOf("?");return A!==-1&&(this.search=a.substr(A),a=a.slice(0,A)),a&&(this.pathname=a),gp[o]&&this.hostname&&!this.pathname&&(this.pathname=""),this};ei.prototype.parseHost=function(t){var e=dle.exec(t);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};var hle=Ele;yr.encode=ile;yr.decode=ale;yr.format=cle;yr.parse=hle;var Cn={},us,fp;function QS(){return fp||(fp=1,us=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/),us}var _s,Ep;function jS(){return Ep||(Ep=1,_s=/[\0-\x1F\x7F-\x9F]/),_s}var ps,hp;function Sle(){return hp||(hp=1,ps=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/),ps}var ms,Sp;function XS(){return Sp||(Sp=1,ms=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/),ms}var bp;function ble(){return bp||(bp=1,Cn.Any=QS(),Cn.Cc=jS(),Cn.Cf=Sle(),Cn.P=Eu,Cn.Z=XS()),Cn}(function(t){function e(k){return Object.prototype.toString.call(k)}function n(k){return e(k)==="[object String]"}var r=Object.prototype.hasOwnProperty;function o(k,ne){return r.call(k,ne)}function i(k){var ne=Array.prototype.slice.call(arguments,1);return ne.forEach(function(K){if(K){if(typeof K!="object")throw new TypeError(K+"must be object");Object.keys(K).forEach(function(I){k[I]=K[I]})}}),k}function s(k,ne,K){return[].concat(k.slice(0,ne),K,k.slice(ne+1))}function a(k){return!(k>=55296&&k<=57343||k>=64976&&k<=65007||(k&65535)===65535||(k&65535)===65534||k>=0&&k<=8||k===11||k>=14&&k<=31||k>=127&&k<=159||k>1114111)}function c(k){if(k>65535){k-=65536;var ne=55296+(k>>10),K=56320+(k&1023);return String.fromCharCode(ne,K)}return String.fromCharCode(k)}var l=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,d=/&([a-z#][a-z0-9]{1,31});/gi,_=new RegExp(l.source+"|"+d.source,"gi"),u=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,p=Jo;function m(k,ne){var K=0;return o(p,ne)?p[ne]:ne.charCodeAt(0)===35&&u.test(ne)&&(K=ne[1].toLowerCase()==="x"?parseInt(ne.slice(2),16):parseInt(ne.slice(1),10),a(K))?c(K):k}function g(k){return k.indexOf("\\")<0?k:k.replace(l,"$1")}function S(k){return k.indexOf("\\"
`};Yt.fence=function(t,e,n,r,o){var i=t[e],s=i.info?Ole(i.info).trim():"",a="",c="",l,d,_,u,p;return s&&(_=s.split(/(\s+)/g),a=_[0],c=_.slice(2).join("")),n.highlight?l=n.highlight(i.content,a,c)||qn(i.content):l=qn(i.content),l.indexOf("<pre")===0?l+`
2023-05-29 20:24:25 +02:00
`:s?(d=i.attrIndex("class"),u=i.attrs?i.attrs.slice():[],d<0?u.push(["class",n.langPrefix+a]):(u[d]=u[d].slice(),u[d][1]+=" "+n.langPrefix+a),p={attrs:u},"<pre><code"+o.renderAttrs(p)+">"+l+`</code></pre>
`):"<pre><code"+o.renderAttrs(i)+">"+l+`</code></pre>
`};Yt.image=function(t,e,n,r,o){var i=t[e];return i.attrs[i.attrIndex("alt")][1]=o.renderInlineAsText(i.children,n,r),o.renderToken(t,e,n)};Yt.hardbreak=function(t,e,n){return n.xhtmlOut?`<br />
`:`<br>
`};Yt.softbreak=function(t,e,n){return n.breaks?n.xhtmlOut?`<br />
`:`<br>
`:`
2023-05-31 12:30:32 +03:00
`};Yt.text=function(t,e){return qn(t[e].content)};Yt.html_block=function(t,e){return t[e].content};Yt.html_inline=function(t,e){return t[e].content};function vr(){this.rules=Rle({},Yt)}vr.prototype.renderAttrs=function(e){var n,r,o;if(!e.attrs)return"";for(o="",n=0,r=e.attrs.length;n<r;n++)o+=" "+qn(e.attrs[n][0])+'="'+qn(e.attrs[n][1])+'"';return o};vr.prototype.renderToken=function(e,n,r){var o,i="",s=!1,a=e[n];return a.hidden?"":(a.block&&a.nesting!==-1&&n&&e[n-1].hidden&&(i+=`
2023-05-29 20:24:25 +02:00
`),i+=(a.nesting===-1?"</":"<")+a.tag,i+=this.renderAttrs(a),a.nesting===0&&r.xhtmlOut&&(i+=" /"),a.block&&(s=!0,a.nesting===1&&n+1<e.length&&(o=e[n+1],(o.type==="inline"||o.hidden||o.nesting===-1&&o.tag===a.tag)&&(s=!1))),i+=s?`>
`:">",i)};vr.prototype.renderInline=function(t,e,n){for(var r,o="",i=this.rules,s=0,a=t.length;s<a;s++)r=t[s].type,typeof i[r]<"u"?o+=i[r](t,s,e,n,this):o+=this.renderToken(t,s,e);return o};vr.prototype.renderInlineAsText=function(t,e,n){for(var r="",o=0,i=t.length;o<i;o++)t[o].type==="text"?r+=t[o].content:t[o].type==="image"?r+=this.renderInlineAsText(t[o].children,e,n):t[o].type==="softbreak"&&(r+=`
2023-05-31 12:30:32 +03:00
`);return r};vr.prototype.render=function(t,e,n){var r,o,i,s="",a=this.rules;for(r=0,o=t.length;r<o;r++)i=t[r].type,i==="inline"?s+=this.renderInline(t[r].children,e,n):typeof a[i]<"u"?s+=a[t[r].type](t,r,e,n,this):s+=this.renderToken(t,r,e,n);return s};var Nle=vr;function xt(){this.__rules__=[],this.__cache__=null}xt.prototype.__find__=function(t){for(var e=0;e<this.__rules__.length;e++)if(this.__rules__[e].name===t)return e;return-1};xt.prototype.__compile__=function(){var t=this,e=[""];t.__rules__.forEach(function(n){n.enabled&&n.alt.forEach(function(r){e.indexOf(r)<0&&e.push(r)})}),t.__cache__={},e.forEach(function(n){t.__cache__[n]=[],t.__rules__.forEach(function(r){r.enabled&&(n&&r.alt.indexOf(n)<0||t.__cache__[n].push(r.fn))})})};xt.prototype.at=function(t,e,n){var r=this.__find__(t),o=n||{};if(r===-1)throw new Error("Parser rule not found: "+t);this.__rules__[r].fn=e,this.__rules__[r].alt=o.alt||[],this.__cache__=null};xt.prototype.before=function(t,e,n,r){var o=this.__find__(t),i=r||{};if(o===-1)throw new Error("Parser rule not found: "+t);this.__rules__.splice(o,0,{name:e,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null};xt.prototype.after=function(t,e,n,r){var o=this.__find__(t),i=r||{};if(o===-1)throw new Error("Parser rule not found: "+t);this.__rules__.splice(o+1,0,{name:e,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null};xt.prototype.push=function(t,e,n){var r=n||{};this.__rules__.push({name:t,enabled:!0,fn:e,alt:r.alt||[]}),this.__cache__=null};xt.prototype.enable=function(t,e){Array.isArray(t)||(t=[t]);var n=[];return t.forEach(function(r){var o=this.__find__(r);if(o<0){if(e)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[o].enabled=!0,n.push(r)},this),this.__cache__=null,n};xt.prototype.enableOnly=function(t,e){Array.isArray(t)||(t=[t]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(t,e)};xt.prototype.disable=function(t,e){Array.isArray(t)||(t=[t]);var n=[];return t.forEach(function(r){var o=this.__find__(r);if(o<0){if(e)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[o].enabled=!1,n.push(r)},this),this.__cache__=null,n};xt.prototype.getRules=function(t){return this.__cache__===null&&this.__compile__(),this.__cache__[t]||[]};var hu=xt,Ale=/\r\n?|\n/g,Ile=/\0/g,xle=function(e){var n;n=e.src.replace(Ale,`
`),n=n.replace(Ile,"<22>"),e.src=n},wle=function(e){var n;e.inlineMode?(n=new e.Token("inline","",0),n.content=e.src,n.map=[0,1],n.children=[],e.tokens.push(n)):e.md.block.parse(e.src,e.md,e.env,e.tokens)},Dle=function(e){var n=e.tokens,r,o,i;for(o=0,i=n.length;o<i;o++)r=n[o],r.type==="inline"&&e.md.inline.parse(r.content,e.md,e.env,r.children)},Mle=Me.arrayReplaceAt;function Lle(t){return/^<a[>\s]/i.test(t)}function kle(t){return/^<\/a\s*>/i.test(t)}var Ple=function(e){var n,r,o,i,s,a,c,l,d,_,u,p,m,g,S,E,h=e.tokens,b;if(e.md.options.linkify){for(r=0,o=h.length;r<o;r++)if(!(h[r].type!=="inline"||!e.md.linkify.pretest(h[r].content)))for(i=h[r].children,m=0,n=i.length-1;n>=0;n--){if(a=i[n],a.type==="link_close"){for(n--;i[n].level!==a.level&&i[n].type!=="link_open";)n--;continue}if(a.type==="html_inline"&&(Lle(a.content)&&m>0&&m--,kle(a.content)&&m++),!(m>0)&&a.type==="text"&&e.md.linkify.test(a.content)){for(d=a.content,b=e.md.linkify.match(d),c=[],p=a.level,u=0,b.length>0&&b[0].index===0&&n>0&&i[n-1].type==="text_special"&&(b=b.slice(1)),l=0;l<b.length;l++)g=b[l].url,S=e.md.normalizeLink(g),e.md.validateLink(S)&&(E=b[l].text,b[l].schema?b[l].schema==="mailto:"&&!/^mailto:/i.test(E)?E=e.md.normalizeLinkText("mailto:"+E).replace(/^mailto:/,""):E=e.md.normalizeLinkText(E):E=e.md.normalizeLinkText("http://"+E).replace(/^http:\/\//,""),_=b[l].index,_>u&&(s=new e.Token("text","",0),s.content=d.slice(u,_),s.level=p,c.push(s)),s=new e.Token("link_open","a",1),s.attrs=[["href",S]],s.level=p++,s.markup="linkify",s.info="auto",c.push(s),s=new e.Token("text","",0),s.content=E,s.level=p,c.push(s),s=new e.Token("link_close","a",-1),s.level=--p,s.markup="linkify",s.info="auto",c.push(s),u=b[l].lastIndex);u<d.length&&(s=new e.Token("text","",0),s.content=d.slice(u),s.level=p,c.push(s)),h[r].children=i=Mle(i,n,c)}}}},ZS=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,Ule=/\((c|tm|r)\)/i,Fle=/\((c|tm|r)\)/ig,Ble={c:"©",r:"®",tm:"™"};function Gle(t,e){return Ble[e.toLowerCase()]}function qle(t){var e,n,r=0;for(e=t.length-1;e>=0;e--)n=t[e],n.type==="text"&&!r&&(n.content=n.content.replace(Fle,Gle)),n.type==="link_open"&&n.info==="auto"&&r--,n.type==="link_close"&&n.info==="auto"&&r++}function Yle(t){var e,n,r=0;for(e=t.length-1;e>=0;e--)n=t[e],n.type==="text"&&!r&&ZS.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1")),n.type==="link_open"&&n.info==="auto"&&r--,n.type==="link_close"&&n.info==="auto"&&r++}var Hle=function(e){var n;if(e.md.options.typographer)for(n=e.tokens.length-1;n>=0;n--)e.tokens[n].type==="inline"&&(Ule.test(e.tokens[n].content)&&qle(e.tokens[n].children),ZS.test(e.tokens[n].content)&&Yle(e.tokens[n].children))},yp=Me.isWhiteSpace,vp=Me.isPunctChar,Cp=Me.isMdAsciiPunct,Vle=/['"]/,Rp=/['"]/g,Op="";function vo(t,e,n){return t.slice(0,e)+n+t.slice(e+1)}function zle(t,e){var n,r,o,i,s,a,c,l,d,_,u,p,m,g,S,E,h,b,T,O,C;for(T=[],n=0;n<t.length;n++){for(r=t[n],c=t[n].level,h=T.length-1;h>=0&&!(T[h].level<=c);h--);if(T.length=h+1,r.type==="text"){o=r.content,s=0,a=o.length;e:for(;s<a&&(Rp.lastIndex=s,i=Rp.exec(o),!!i);){if(S=E=!0,s=i.index+1,b=i[0]==="'",d=32,i.index-1>=0)d=o.charCodeAt(i.index-1);else for(h=n-1;h>=0&&!(t[h].type==="softbreak"||t[h].type==="hardbreak");h--)if(t[h].content){d=t[h].content.charCodeAt(t[h].content.length-1);break}if(_=32,s<a)_=o.charCodeAt(s);else for(h=n+1;h<t.length&&!(t[h].type==="softbreak"||t[h].type==="hardbreak");h++)if(t[h].content){_=t[h].content.charCodeAt(0);break}if(u=Cp(d)||vp(String.fromCharCode(d)),p=Cp(_)||vp(String.fromCharCode(_)),m=yp(d),g=yp(_),g?S=!1:p&&(m||u||(S=!1)),m?E=!1:u&&(g||p||(E=!1)),_===34&&i[0]==='"'&&d>=48&&d<=57&&(E=S=!1),S&&E&&(S=u,E=p),!S&&!E){b&&(r.content=vo(r.content,i.index,Op));continue}if(E){for(h=T.length-1;h>=0&&(l=T[h],!(T[h].level<c));h--)if(l.single===b&&T[h].level===c){l=T[h],b?(O=e.md.options.quotes[2],C=e.md.options.quotes[
`,s.map=[n,e.line],!0},ede=function(e,n,r,o){var i,s,a,c,l,d,_,u=!1,p=e.bMarks[n]+e.tShift[n],m=e.eMarks[n];if(e.sCount[n]-e.blkIndent>=4||p+3>m||(i=e.src.charCodeAt(p),i!==126&&i!==96)||(l=p,p=e.skipChars(p,i),s=p-l,s<3)||(_=e.src.slice(l,p),a=e.src.slice(p,m),i===96&&a.indexOf(String.fromCharCode(i))>=0))return!1;if(o)return!0;for(c=n;c++,!(c>=r||(p=l=e.bMarks[c]+e.tShift[c],m=e.eMarks[c],p<m&&e.sCount[c]<e.blkIndent));)if(e.src.charCodeAt(p)===i&&!(e.sCount[c]-e.blkIndent>=4)&&(p=e.skipChars(p,i),!(p-l<s)&&(p=e.skipSpaces(p),!(p<m)))){u=!0;break}return s=e.sCount[n],e.line=c+(u?1:0),d=e.push("fence","code",0),d.info=a,d.content=e.getLines(n+1,c,s,!0),d.markup=_,d.map=[n,e.line],!0},Ap=Me.isSpace,tde=function(e,n,r,o){var i,s,a,c,l,d,_,u,p,m,g,S,E,h,b,T,O,C,x,A,G=e.lineMax,P=e.bMarks[n]+e.tShift[n],L=e.eMarks[n];if(e.sCount[n]-e.blkIndent>=4||e.src.charCodeAt(P++)!==62)return!1;if(o)return!0;for(c=p=e.sCount[n]+1,e.src.charCodeAt(P)===32?(P++,c++,p++,i=!1,T=!0):e.src.charCodeAt(P)===9?(T=!0,(e.bsCount[n]+p)%4===3?(P++,c++,p++,i=!1):i=!0):T=!1,m=[e.bMarks[n]],e.bMarks[n]=P;P<L&&(s=e.src.charCodeAt(P),Ap(s));){s===9?p+=4-(p+e.bsCount[n]+(i?1:0))%4:p++;P++}for(g=[e.bsCount[n]],e.bsCount[n]=e.sCount[n]+1+(T?1:0),d=P>=L,h=[e.sCount[n]],e.sCount[n]=p-c,b=[e.tShift[n]],e.tShift[n]=P-e.bMarks[n],C=e.md.block.ruler.getRules("blockquote"),E=e.parentType,e.parentType="blockquote",u=n+1;u<r&&(A=e.sCount[u]<e.blkIndent,P=e.bMarks[u]+e.tShift[u],L=e.eMarks[u],!(P>=L));u++){if(e.src.charCodeAt(P++)===62&&!A){for(c=p=e.sCount[u]+1,e.src.charCodeAt(P)===32?(P++,c++,p++,i=!1,T=!0):e.src.charCodeAt(P)===9?(T=!0,(e.bsCount[u]+p)%4===3?(P++,c++,p++,i=!1):i=!0):T=!1,m.push(e.bMarks[u]),e.bMarks[u]=P;P<L&&(s=e.src.charCodeAt(P),Ap(s));){s===9?p+=4-(p+e.bsCount[u]+(i?1:0))%4:p++;P++}d=P>=L,g.push(e.bsCount[u]),e.bsCount[u]=e.sCount[u]+1+(T?1:0),h.push(e.sCount[u]),e.sCount[u]=p-c,b.push(e.tShift[u]),e.tShift[u]=P-e.bMarks[u];continue}if(d)break;for(O=!1,a=0,l=C.length;a<l;a++)if(C[a](e,u,r,!0)){O=!0;break}if(O){e.lineMax=u,e.blkIndent!==0&&(m.push(e.bMarks[u]),g.push(e.bsCount[u]),b.push(e.tShift[u]),h.push(e.sCount[u]),e.sCount[u]-=e.blkIndent);break}m.push(e.bMarks[u]),g.push(e.bsCount[u]),b.push(e.tShift[u]),h.push(e.sCount[u]),e.sCount[u]=-1}for(S=e.blkIndent,e.blkIndent=0,x=e.push("blockquote_open","blockquote",1),x.markup=">",x.map=_=[n,0],e.md.block.tokenize(e,n,u),x=e.push("blockquote_close","blockquote",-1),x.markup=">",e.lineMax=G,e.parentType=E,_[1]=e.line,a=0;a<b.length;a++)e.bMarks[a+n]=m[a],e.tShift[a+n]=b[a],e.sCount[a+n]=h[a],e.bsCount[a+n]=g[a];return e.blkIndent=S,!0},nde=Me.isSpace,rde=function(e,n,r,o){var i,s,a,c,l=e.bMarks[n]+e.tShift[n],d=e.eMarks[n];if(e.sCount[n]-e.blkIndent>=4||(i=e.src.charCodeAt(l++),i!==42&&i!==45&&i!==95))return!1;for(s=1;l<d;){if(a=e.src.charCodeAt(l++),a!==i&&!nde(a))return!1;a===i&&s++}return s<3?!1:(o||(e.line=n+1,c=e.push("hr","hr",0),c.map=[n,e.line],c.markup=Array(s+1).join(String.fromCharCode(i))),!0)},eb=Me.isSpace;function Ip(t,e){var n,r,o,i;return r=t.bMarks[e]+t.tShift[e],o=t.eMarks[e],n=t.src.charCodeAt(r++),n!==42&&n!==45&&n!==43||r<o&&(i=t.src.charCodeAt(r),!eb(i))?-1:r}function xp(t,e){var n,r=t.bMarks[e]+t.tShift[e],o=r,i=t.eMarks[e];if(o+1>=i||(n=t.src.charCodeAt(o++),n<48||n>57))return-1;for(;;){if(o>=i)return-1;if(n=t.src.charCodeAt(o++),n>=48&&n<=57){if(o-r>=10)return-1;continue}if(n===41||n===46)break;return-1}return o<i&&(n=t.src.charCodeAt(o),!eb(n))?-1:o}function ode(t,e){var n,r,o=t.level+2;for(n=e+2,r=t.tokens.length-2;n<r;n++)t.tokens[n].level===o&&t.tokens[n].type==="paragraph_open"&&(t.tokens[n+2].hidden=!0,t.tokens[n].hidden=!0,n+=2)}var ide=function(e,n,r,o){var i,s,a,c,l,d,_,u,p,m,g,S,E,h,b,T,O,C,x,A,G,P,L,H,oe,k,ne,K,I=!1,Y=!0;if(e.sCount[n]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[n]-e.listIndent>=4&&e.sCount[n]<e.blkIndent)return!1;if(o&&e.parentType==="paragraph"&&e.sCount[n]>=e.blkIndent&&(I=!0),(L=xp(e,n))>=0){if(_=!0,oe=e.bMarks[n]+e.tShift[n],E=Number(e.src.slice(oe,L-1)),I&&E!==1)return!1}else if((L=Ip(e,n))>=0)_=!1;else return!1;if(I&&e.skipSpaces(L)>
2023-05-31 13:19:28 +03:00
https://github.com/highlightjs/highlight.js/issues/2277`),ue=I,pe=Y),re===void 0&&(re=!0);const ge={code:pe,language:ue};ne("before:highlight",ge);const Re=ge.result?ge.result:_(ge.language,ge.code,re);return Re.code=ge.code,ne("after:highlight",Re),Re}function _(I,Y,re,pe){const ue=Object.create(null);function ge(z,X){return z.keywords[X]}function Re(){if(!M.keywords){F.addText(ee);return}let z=0;M.keywordPatternRe.lastIndex=0;let X=M.keywordPatternRe.exec(ee),ce="";for(;X;){ce+=ee.substring(z,X.index);const Te=B.case_insensitive?X[0].toLowerCase():X[0],Pe=ge(M,Te);if(Pe){const[et,Ae]=Pe;if(F.addText(ce),ce="",ue[Te]=(ue[Te]||0)+1,ue[Te]<=q3e&&(ie+=Ae),et.startsWith("_"))ce+=X[0];else{const Vt=B.classNameAliases[et]||et;W(X[0],Vt)}}else ce+=X[0];z=M.keywordPatternRe.lastIndex,X=M.keywordPatternRe.exec(ee)}ce+=ee.substring(z),F.addText(ce)}function ye(){if(ee==="")return;let z=null;if(typeof M.subLanguage=="string"){if(!e[M.subLanguage]){F.addText(ee);return}z=_(M.subLanguage,ee,!0,J[M.subLanguage]),J[M.subLanguage]=z._top}else z=p(ee,M.subLanguage.length?M.subLanguage:null);M.relevance>0&&(ie+=z.relevance),F.__addSublanguage(z._emitter,z.language)}function w(){M.subLanguage!=null?ye():Re(),ee=""}function W(z,X){z!==""&&(F.startScope(X),F.addText(z),F.endScope())}function $(z,X){let ce=1;const Te=X.length-1;for(;ce<=Te;){if(!z._emit[ce]){ce++;continue}const Pe=B.classNameAliases[z[ce]]||z[ce],et=X[ce];Pe?W(et,Pe):(ee=et,Re(),ee=""),ce++}}function Q(z,X){return z.scope&&typeof z.scope=="string"&&F.openNode(B.classNameAliases[z.scope]||z.scope),z.beginScope&&(z.beginScope._wrap?(W(ee,B.classNameAliases[z.beginScope._wrap]||z.beginScope._wrap),ee=""):z.beginScope._multi&&($(z.beginScope,X),ee="")),M=Object.create(z,{parent:{value:M}}),M}function le(z,X,ce){let Te=r3e(z.endRe,ce);if(Te){if(z["on:end"]){const Pe=new $p(z);z["on:end"](X,Pe),Pe.isMatchIgnored&&(Te=!1)}if(Te){for(;z.endsParent&&z.parent;)z=z.parent;return z}}if(z.endsWithParent)return le(z.parent,X,ce)}function be(z){return M.matcher.regexIndex===0?(ee+=z[0],1):(he=!0,0)}function ae(z){const X=z[0],ce=z.rule,Te=new $p(ce),Pe=[ce.__beforeBegin,ce["on:begin"]];for(const et of Pe)if(et&&(et(z,Te),Te.isMatchIgnored))return be(X);return ce.skip?ee+=X:(ce.excludeBegin&&(ee+=X),w(),!ce.returnBegin&&!ce.excludeBegin&&(ee=X)),Q(ce,z),ce.returnBegin?0:X.length}function y(z){const X=z[0],ce=Y.substring(z.index),Te=le(M,z,ce);if(!Te)return Zp;const Pe=M;M.endScope&&M.endScope._wrap?(w(),W(X,M.endScope._wrap)):M.endScope&&M.endScope._multi?(w(),$(M.endScope,z)):Pe.skip?ee+=X:(Pe.returnEnd||Pe.excludeEnd||(ee+=X),w(),Pe.excludeEnd&&(ee=X));do M.scope&&F.closeNode(),!M.skip&&!M.subLanguage&&(ie+=M.relevance),M=M.parent;while(M!==Te.parent);return Te.starts&&Q(Te.starts,z),Pe.returnEnd?0:X.length}function R(){const z=[];for(let X=M;X!==B;X=X.parent)X.scope&&z.unshift(X.scope);z.forEach(X=>F.openNode(X))}let D={};function U(z,X){const ce=X&&X[0];if(ee+=z,ce==null)return w(),0;if(D.type==="begin"&&X.type==="end"&&D.index===X.index&&ce===""){if(ee+=Y.slice(X.index,X.index+1),!o){const Te=new Error(`0 width match regex (${I})`);throw Te.languageName=I,Te.badRule=D.rule,Te}return 1}if(D=X,X.type==="begin")return ae(X);if(X.type==="illegal"&&!re){const Te=new Error('Illegal lexeme "'+ce+'" for mode "'+(M.scope||"<unnamed>")+'"');throw Te.mode=M,Te}else if(X.type==="end"){const Te=y(X);if(Te!==Zp)return Te}if(X.type==="illegal"&&ce==="")return 1;if(_e>1e5&&_e>X.index*3)throw new Error("potential infinite loop, way more iterations than matches");return ee+=ce,ce.length}const B=G(I);if(!B)throw Fn(i.replace("{}",I)),new Error('Unknown language: "'+I+'"');const Z=U3e(B);let te="",M=pe||Z;const J={},F=new a.__emitter(a);R();let ee="",ie=0,se=0,_e=0,he=!1;try{if(B.__emitTokens)B.__emitTokens(Y,F);else{for(M.matcher.considerAll();;){_e++,he?he=!1:M.matcher.considerAll(),M.matcher.lastIndex=se;const z=M.matcher.exec(Y);if(!z)break;const X=Y.substring(se,z.index),ce=U(X,z);se=z.index+ce}U(Y.substring(se))}return F.finalize(),te=F.toHTML(),{language:I,value:te,relevance:ie,illegal:!1,_emitter
2023-05-31 12:30:32 +03:00
`},m]}}return dc=o,dc}var uc,Fg;function AVe(){if(Fg)return uc;Fg=1;function t(e){const n="[a-zA-Z_][\\w.]*",r="<\\?(lasso(script)?|=)",o="\\]|\\?>",i={$pattern:n+"|&[lg]t;",literal:"true false none minimal full all void and or not bw nbw ew new cn ncn lt lte gt gte eq neq rx nrx ft",built_in:"array date decimal duration integer map pair string tag xml null boolean bytes keyword list locale queue set stack staticarray local var variable global data self inherited currentcapture givenblock",keyword:"cache database_names database_schemanames database_tablenames define_tag define_type email_batch encode_set html_comment handle handle_error header if inline iterate ljax_target link link_currentaction link_currentgroup link_currentrecord link_detail link_firstgroup link_firstrecord link_lastgroup link_lastrecord link_nextgroup link_nextrecord link_prevgroup link_prevrecord log loop namespace_using output_none portal private protect records referer referrer repeating resultset rows search_args search_arguments select sort_args sort_arguments thread_atomic value_list while abort case else fail_if fail_ifnot fail if_empty if_false if_null if_true loop_abort loop_continue loop_count params params_up return return_value run_children soap_definetag soap_lastrequest soap_lastresponse tag_name ascending average by define descending do equals frozen group handle_failure import in into join let match max min on order parent protected provide public require returnhome skip split_thread sum take thread to trait type where with yield yieldhome"},s=e.COMMENT("<!--","-->",{relevance:0}),a={className:"meta",begin:"\\[noprocess\\]",starts:{end:"\\[/noprocess\\]",returnEnd:!0,contains:[s]}},c={className:"meta",begin:"\\[/noprocess|"+r},l={className:"symbol",begin:"'"+n+"'"},d=[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.inherit(e.C_NUMBER_MODE,{begin:e.C_NUMBER_RE+"|(-?infinity|NaN)\\b"}),e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"`",end:"`"},{variants:[{begin:"[#$]"+n},{begin:"#",end:"\\d+",illegal:"\\W"}]},{className:"type",begin:"::\\s*",end:n,illegal:"\\W"},{className:"params",variants:[{begin:"-(?!infinity)"+n,relevance:0},{begin:"(\\.\\.\\.)"}]},{begin:/(->|\.)\s*/,relevance:0,contains:[l]},{className:"class",beginKeywords:"define",returnEnd:!0,end:"\\(|=>",contains:[e.inherit(e.TITLE_MODE,{begin:n+"(=(?!>))?|[-+*/%](?!>)"})]}];return{name:"Lasso",aliases:["ls","lassoscript"],case_insensitive:!0,keywords:i,contains:[{className:"meta",begin:o,relevance:0,starts:{end:"\\[|"+r,returnEnd:!0,relevance:0,contains:[s]}},a,c,{className:"meta",begin:"\\[no_square_brackets",starts:{end:"\\[/no_square_brackets\\]",keywords:i,contains:[{className:"meta",begin:o,relevance:0,starts:{end:"\\[noprocess\\]|"+r,returnEnd:!0,contains:[s]}},a,c].concat(d)}},{className:"meta",begin:"\\[",relevance:0},{className:"meta",begin:"^#!",end:"lasso9$",relevance:10}].concat(d)}}return uc=t,uc}var _c,Bg;function IVe(){if(Bg)return _c;Bg=1;function t(e){const r=e.regex.either(...["(?:NeedsTeXFormat|RequirePackage|GetIdInfo)","Provides(?:Expl)?(?:Package|Class|File)","(?:DeclareOption|ProcessOptions)","(?:documentclass|usepackage|input|include)","makeat(?:letter|other)","ExplSyntax(?:On|Off)","(?:new|renew|provide)?command","(?:re)newenvironment","(?:New|Renew|Provide|Declare)(?:Expandable)?DocumentCommand","(?:New|Renew|Provide|Declare)DocumentEnvironment","(?:(?:e|g|x)?def|let)","(?:begin|end)","(?:part|chapter|(?:sub){0,2}section|(?:sub)?paragraph)","caption","(?:label|(?:eq|page|name)?ref|(?:paren|foot|super)?cite)","(?:alpha|beta|[Gg]amma|[Dd]elta|(?:var)?epsilon|zeta|eta|[Tt]heta|vartheta)","(?:iota|(?:var)?kappa|[Ll]ambda|mu|nu|[Xx]i|[Pp]i|varpi|(?:var)rho)","(?:[Ss]igma|varsigma|tau|[Uu]psilon|[Pp]hi|varphi|chi|[Pp]si|[Oo]mega)","(?:frac|sum|prod|lim|infty|times|sqrt|leq|geq|left|right|middle|[bB]igg?)","(?:[lr]angle|q?quad|[lcvdi]?dots|d?dot|hat|tilde|bar)"].map(L=>L+"(?![a-zA-Z@:_])")),o=new RegExp(["(?:__)?[a-zA-Z]{2,}_[a-zA-Z](?:_?[a-zA-Z])+:[a-zA-Z]*","[lgc]__?[a-zA-Z](?:_?[a-zA-
]`,m={scope:"string",variants:[d,l,_,u]},g={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},S=["false","null","true"],E=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],h=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],T={keyword:E,literal:(k=>{const ne=[];return k.forEach(K=>{ne.push(K),K.toLowerCase()===K?ne.push(K.toUpperCase()):ne.push(K.toLowerCase())}),ne})(S),built_in:h},O=k=>k.map(ne=>ne.replace(/\|\d+$/,"")),C={variants:[{match:[/new/,n.concat(p,"+"),n.concat("(?!",O(h).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},x=n.concat(o,"\\b(?!\\()"),A={variants:[{match:[n.concat(/::/,n.lookahead(/(?!class\b)/)),x],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,n.concat(/::/,n.lookahead(/(?!class\b)/)),x],scope:{1:"title.class",3:"variable.constant"}},{match:[i,n.concat("::",n.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},G={scope:"attr",match:n.concat(o,n.lookahead(":"),n.lookahead(/(?!::)/))},P={relevance:0,begin:/\(/,end:/\)/,keywords:T,contains:[G,s,A,e.C_BLOCK_COMMENT_MODE,m,g,C]},L={relevance:0,match:[/\b/,n.concat("(?!fn\\b|function\\b|",O(E).join("\\b|"),"|",O(h).join("\\b|"),"\\b)"),o,n.concat(p,"*"),n.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[P]};P.contains.push(L);const H=[G,A,e.C_BLOCK_COMMENT_MODE,m,g,C],oe={begin:n.concat(/#\[\s*/,i),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:S,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:S,keyword:["new","array"]},contains:["self",...H]}
]*;`,relevance:0},{begin:"[vp][0-9]+"}]}}return Cl=t,Cl}var Rl,Jf;function Yze(){if(Jf)return Rl;Jf=1;function t(e){const n="[a-z][a-zA-Z0-9_]*",r={className:"string",begin:"\\$.{1}"},o={className:"symbol",begin:"#"+e.UNDERSCORE_IDENT_RE};return{name:"Smalltalk",aliases:["st"],keywords:["self","super","nil","true","false","thisContext"],contains:[e.COMMENT('"','"'),e.APOS_STRING_MODE,{className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},{begin:n+":",relevance:0},e.C_NUMBER_MODE,o,r,{begin:"\\|[ ]*"+n+"([ ]+"+n+")*[ ]*\\|",returnBegin:!0,end:/\|/,illegal:/\S/,contains:[{begin:"(\\|[ ]*)?"+n}]},{begin:"#\\(",end:"\\)",contains:[e.APOS_STRING_MODE,r,e.C_NUMBER_MODE,o]}]}}return Rl=t,Rl}var Ol,eE;function Hze(){if(eE)return Ol;eE=1;function t(e){return{name:"SML (Standard ML)",aliases:["ml"],keywords:{$pattern:"[a-z_]\\w*!?",keyword:"abstype and andalso as case datatype do else end eqtype exception fn fun functor handle if in include infix infixr let local nonfix of op open orelse raise rec sharing sig signature struct structure then type val with withtype where while",built_in:"array bool char exn int list option order real ref string substring vector unit word",literal:"true false NONE SOME LESS EQUAL GREATER nil"},illegal:/\/\/|>>/,contains:[{className:"literal",begin:/\[(\|\|)?\]|\(\)/,relevance:0},e.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"type",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*"},e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/[-=]>/}]}}return Ol=t,Ol}var Nl,tE;function Vze(){if(tE)return Nl;tE=1;function t(e){const n={className:"variable",begin:/\b_+[a-zA-Z]\w*/},r={className:"title",begin:/[a-zA-Z][a-zA-Z_0-9]*_fnc_[a-zA-Z_0-9]+/},o={className:"string",variants:[{begin:'"',end:'"',contains:[{begin:'""',relevance:0}]},{begin:"'",end:"'",contains:[{begin:"''",relevance:0}]}]},i=["break","breakWith","breakOut","breakTo","case","catch","continue","continueWith","default","do","else","exit","exitWith","for","forEach","from","if","local","private","switch","step","then","throw","to","try","waitUntil","while","with"],s=["blufor","civilian","configNull","controlNull","displayNull","diaryRecordNull","east","endl","false","grpNull","independent","lineBreak","locationNull","nil","objNull","opfor","pi","resistance","scriptNull","sideAmbientLife","sideEmpty","sideEnemy","sideFriendly","sideLogic","sideUnknown","taskNull","teamMemberNull","true","west"],a=["abs","accTime","acos","action","actionIDs","actionKeys","actionKeysEx","actionKeysImages","actionKeysNames","actionKeysNamesArray","actionName","actionParams","activateAddons","activatedAddons","activateKey","activeTitleEffectParams","add3DENConnection","add3DENEventHandler","add3DENLayer","addAction","addBackpack","addBackpackCargo","addBackpackCargoGlobal","addBackpackGlobal","addBinocularItem","addCamShake","addCuratorAddons","addCuratorCameraArea","addCuratorEditableObjects","addCuratorEditingArea","addCuratorPoints","addEditorObject","addEventHandler","addForce","addForceGeneratorRTD","addGoggles","addGroupIcon","addHandgunItem","addHeadgear","addItem","addItemCargo","addItemCargoGlobal","addItemPool","addItemToBackpack","addItemToUniform","addItemToVest","addLiveStats","addMagazine","addMagazineAmmoCargo","addMagazineCargo","addMagazineCargoGlobal","addMagazineGlobal","addMagazinePool","addMagazines","addMagazineTurret","addMenu","addMenuItem","addMissionEventHandler","addMPEventHandler","addMusicEventHandler","addonFiles","addOwnedMine","addPlayerScores","addPrimaryWeaponItem","addPublicVariableEventHandler","addRating","addResources","addScore","addScoreSide","addSecondaryWeaponItem","addSwitchableUnit","addTeamMember","addToRemainsCollector","addTorque","addUniform","addUserActionEventHandler","a
2023-05-29 20:24:25 +02:00
]*?"'`},{begin:`"[^\r
2023-05-31 12:30:32 +03:00
"]*"`}]},{className:"built_in",variants:[{begin:"\\b(abs|acos|asin|atan|atan2|atanh|ceil|cloglog|comb|cos|digamma|exp|floor|invcloglog|invlogit|ln|lnfact|lnfactorial|lngamma|log|log10|max|min|mod|reldif|round|sign|sin|sqrt|sum|tan|tanh|trigamma|trunc|betaden|Binomial|binorm|binormal|chi2|chi2tail|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|F|Fden|Ftail|gammaden|gammap|ibeta|invbinomial|invchi2|invchi2tail|invF|invFtail|invgammap|invibeta|invnchi2|invnFtail|invnibeta|invnorm|invnormal|invttail|nbetaden|nchi2|nFden|nFtail|nibeta|norm|normal|normalden|normd|npnchi2|tden|ttail|uniform|abbrev|char|index|indexnot|length|lower|ltrim|match|plural|proper|real|regexm|regexr|regexs|reverse|rtrim|string|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrtrim|strtrim|strupper|subinstr|subinword|substr|trim|upper|word|wordcount|_caller|autocode|byteorder|chop|clip|cond|e|epsdouble|epsfloat|group|inlist|inrange|irecode|matrix|maxbyte|maxdouble|maxfloat|maxint|maxlong|mi|minbyte|mindouble|minfloat|minint|minlong|missing|r|recode|replay|return|s|scalar|d|date|day|dow|doy|halfyear|mdy|month|quarter|week|year|d|daily|dofd|dofh|dofm|dofq|dofw|dofy|h|halfyearly|hofd|m|mofd|monthly|q|qofd|quarterly|tin|twithin|w|weekly|wofd|y|yearly|yh|ym|yofd|yq|yw|cholesky|colnumb|colsof|corr|det|diag|diag0cnt|el|get|hadamard|I|inv|invsym|issym|issymmetric|J|matmissing|matuniform|mreldif|nullmat|rownumb|rowsof|sweep|syminv|trace|vec|vecdiag)(?=\\()"}]},e.COMMENT("^[ ]*\\*.*$",!1),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}}return xl=t,xl}var wl,iE;function Kze(){if(iE)return wl;iE=1;function t(e){return{name:"STEP Part 21",aliases:["p21","step","stp"],case_insensitive:!0,keywords:{$pattern:"[A-Z_][A-Z0-9_.]*",keyword:["HEADER","ENDSEC","DATA"]},contains:[{className:"meta",begin:"ISO-10303-21;",relevance:10},{className:"meta",begin:"END-ISO-10303-21;",relevance:10},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.COMMENT("/\\*\\*!","\\*/"),e.C_NUMBER_MODE,e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"'",end:"'"},{className:"symbol",variants:[{begin:"#",end:"\\d+",illegal:"\\W"}]}]}}return wl=t,wl}var Dl,sE;function Qze(){if(sE)return Dl;sE=1;const t=a=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:a.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:a.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}),e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],r=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","i
2023-05-29 20:24:25 +02:00
(multipart)?`,end:`\\]
2023-05-31 13:26:45 +03:00
`},{className:"string",begin:"\\d{4}-\\d{2}-\\d{2}(\\s+)\\d{2}:\\d{2}:\\d{2}.\\d+Z"},{className:"string",begin:"(\\+|-)\\d+"},{className:"keyword",relevance:10,variants:[{begin:"^(test|testing|success|successful|failure|error|skip|xfail|uxsuccess)(:?)\\s+(test)?"},{begin:"^progress(:?)(\\s+)?(pop|push)?"},{begin:"^tags:"},{begin:"^time:"}]}]}}return Ml=t,Ml}var Ll,cE;function Xze(){if(cE)return Ll;cE=1;function t(A){return A?typeof A=="string"?A:A.source:null}function e(A){return n("(?=",A,")")}function n(...A){return A.map(P=>t(P)).join("")}function r(A){const G=A[A.length-1];return typeof G=="object"&&G.constructor===Object?(A.splice(A.length-1,1),G):{}}function o(...A){return"("+(r(A).capture?"":"?:")+A.map(L=>t(L)).join("|")+")"}const i=A=>n(/\b/,A,/\w$/.test(A)?/\b/:/\B/),s=["Protocol","Type"].map(i),a=["init","self"].map(i),c=["Any","Self"],l=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","break","case","catch","class","continue","convenience","default","defer","deinit","didSet","distributed","do","dynamic","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],d=["false","nil","true"],_=["assignment","associativity","higherThan","left","lowerThan","none","right"],u=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warn_unqualified_access","#warning"],p=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],m=o(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),g=o(m,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),S=n(m,g,"*"),E=o(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),h=o(E,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),b=n(E,h,"*"),T=n(/[A-Z]/,h,"*"),O=["autoclosure",n(/convention\(/,o("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",n(/objc\(/,b,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","testable","UIApplicationMain","unknown","usableFromInline"],C=["iOS","iOSApplicationExtension","
`+e.message,4,!1),null}},async parseJsonFile(t){return new Promise((e,n)=>{const r=new FileReader;r.onload=o=>e(this.parseJsonObj(o.target.result)),r.onerror=o=>n(o),r.readAsText(t)})},async exportDiscussions(){const t=this.list.filter(e=>e.checkBoxValue==!0).map(e=>e.id);if(t.length>0){console.log("export",t);let e=new Date;const n=e.getFullYear(),r=(e.getMonth()+1).toString().padStart(2,"0"),o=e.getDate().toString().padStart(2,"0"),i=e.getHours().toString().padStart(2,"0"),s=e.getMinutes().toString().padStart(2,"0"),a=e.getSeconds().toString().padStart(2,"0"),l="discussions_export_"+(n+"."+r+"."+o+"."+i+s+a)+".json";this.loading=!0;const d=await this.export_multiple_discussions(t);d?(this.saveJSONtoFile(d,l),this.$refs.toast.showToast("Successfully exported",4,!0),this.isCheckbox=!1):this.$refs.toast.showToast("Failed to export discussions",4,!1),this.loading=!1}},async importDiscussions(t){const e=await this.parseJsonFile(t.target.files[0]);await this.import_multiple_discussions(e)?(this.$refs.toast.showToast("Successfully imported ("+e.length+")",4,!0),await this.list_discussions()):this.$refs.toast.showToast("Failed to import discussions",4,!1)},async getPersonalityAvatars(){let t=[];const e=await this.api_get_req("get_all_personalities"),n=Object.keys(e);for(let r=0;r<n.length;r++){const o=n[r],i=e[o],s=Object.keys(i);for(let a=0;a<s.length;a++){const c=s[a],d=i[c].map(_=>{let u={};return u=_,u.category=c,u.language=o,u});t.length==0?t=d:t=t.concat(d)}}this.personalityAvatars=t.map(r=>({name:r.name,avatar:r.avatar}))},getAvatar(t){const e=this.personalityAvatars.findIndex(r=>r.name===t),n=this.personalityAvatars[e];if(n)return n.avatar},setFileListChat(t){this.fileList=t,this.$refs.chatBox.fileList=this.fileList,this.isDragOver=!1},setDropZoneChat(){this.isDragOver=!0,this.$refs.dragdropChat.show=!0},async setFileListDiscussion(t){if(t.length>1){this.$refs.toast.showToast("Failed to import discussions. Too many files",4,!1);return}const e=await this.parseJsonFile(t[0]);await this.import_multiple_discussions(e)?(this.$refs.toast.showToast("Successfully imported ("+e.length+")",4,!0),await this.list_discussions()):this.$refs.toast.showToast("Failed to import discussions",4,!1),this.isDragOverDiscussion=!1},setDropZoneDiscussion(){this.isDragOverDiscussion=!0,this.$refs.dragdropDiscussion.show=!0}},async created(){this.setPageTitle(),await this.list_discussions(),this.loadLastUsedDiscussion(),this.isCreated=!0,fe(()=>{Ce.replace()}),Ve.on("infos",this.createBotMsg),Ve.on("message",this.streamMessageContent),Ve.on("final",this.finalMsgEvent)},async activated(){console.log("Websocket connected (activated)",this.socketConnected),await this.getPersonalityAvatars(),this.isCreated&&this.loadLastUsedDiscussion()},components:{Discussion:KS,Message:Nb,ChatBox:Ab,WelcomeComponent:Ib,Toast:mu,DragDrop:Md},watch:{filterTitle(t){t==""&&(this.filterInProgress=!0,this.list=this.tempList,this.filterInProgress=!1)},isCheckbox(t){fe(()=>{Ce.replace()}),t||(this.isSelectAll=!1)},socketConnected(t){console.log("Websocket connected (watch)",t)},showConfirmation(){fe(()=>{Ce.replace()})},isSearch(){fe(()=>{Ce.replace()})}},computed:{socketConnected(){return!0},selectedDiscussions(){return fe(()=>{Ce.replace()}),this.list.filter(t=>t.checkBoxValue==!0)}}},F9e=Object.assign(U9e,{__name:"DiscussionsView",setup(t){return Oi(()=>{G$e()}),Be.defaults.baseURL="/",(e,n)=>(V(),j(Ue,null,[f("div",Y$e,[f("div",H$e,[f("div",V$e,[f("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Create new discussion",type:"button",onClick:n[0]||(n[0]=r=>e.createNewDiscussion())},$$e),f("button",{class:Le(["text-2xl hover:text-secondary duration-75 active:scale-90",e.isCheckbox?"text-secondary":""]),title:"Edit discussion list",type:"button",onClick:n[1]||(n[1]=r=>e.isCheckbox=!e.isCheckbox)},K$e,2),Q$e,j$e,f("input",{type:"file",ref:"fileDialog",style:{display:"none"},onChange:n[2]||(n[2]=(...r)=>e.importDiscussions&&e.importDiscussions(...r))},null,544),f("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 ro