2023-06-26 22:51:32 +00: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"]' ) ) s ( o ) ; new MutationObserver ( o => { for ( const r of o ) if ( r . type === "childList" ) for ( const i of r . addedNodes ) i . tagName === "LINK" && i . rel === "modulepreload" && s ( i ) } ) . observe ( document , { childList : ! 0 , subtree : ! 0 } ) ; function n ( o ) { const r = { } ; return o . integrity && ( r . integrity = o . integrity ) , o . referrerPolicy && ( r . referrerPolicy = o . referrerPolicy ) , o . crossOrigin === "use-credentials" ? r . credentials = "include" : o . crossOrigin === "anonymous" ? r . credentials = "omit" : r . credentials = "same-origin" , r } function s ( o ) { if ( o . ep ) return ; o . ep = ! 0 ; const r = n ( o ) ; fetch ( o . href , r ) } } ) ( ) ; function wa ( t , e ) { const n = Object . create ( null ) , s = t . split ( "," ) ; for ( let o = 0 ; o < s . length ; o ++ ) n [ s [ o ] ] = ! 0 ; return e ? o => ! ! n [ o . toLowerCase ( ) ] : o => ! ! n [ o ] } function Qt ( t ) { if ( _e ( t ) ) { const e = { } ; for ( let n = 0 ; n < t . length ; n ++ ) { const s = t [ n ] , o = He ( s ) ? Op ( s ) : Qt ( s ) ; if ( o ) for ( const r in o ) e [ r ] = o [ r ] } return e } else { if ( He ( t ) ) return t ; if ( Be ( t ) ) return t } } const Mp = /;(?![^(]*\))/g , Dp = /:([^]+)/ , Lp = / \ / \ * . * ? \ * \ / / g s ; f u n c t i o n O p ( t ) { c o n s t e = { } ; r e t u r n t . r e p l a c e ( L p , " " ) . s p l i t ( M p ) . f o r E a c h ( n = > { i f ( n ) { c o n s t s = n . s p l i t ( D p ) ; s . l e n g t h > 1 & & ( e [ s [ 0 ] . t r i m ( ) ] = s [ 1 ] . t r i m ( ) ) } } ) , e } f u n c t i o n T e ( t ) { l e t e = " " ; i f ( H e ( t ) ) e = t ; e l s e i f ( _ e ( t ) ) f o r ( l e t n = 0 ; n < t . l e n g t h ; n + + ) { c o n s t s = T e ( t [ n ] ) ; s & & ( e + = s + " " ) } e l s e i f ( B e ( t ) ) f o r ( c o n s t n i n t ) t [ n ] & & ( e + = n + " " ) ; r e t u r n e . t r i m ( ) } c o n s t j p = " i t e m s c o p e , a l l o w f u l l s c r e e n , f o r m n o v a l i d a t e , i s m a p , n o m o d u l e , n o v a l i d a t e , r e a d o n l y " , R p = w a ( j p ) ; f u n c t i o n Q u ( t ) { r e t u r n ! ! t | | t = = = " " } f u n c t i o n P p ( t , e ) { i f ( t . l e n g t h ! = = e . l e n g t h ) r e t u r n ! 1 ; l e t n = ! 0 ; f o r ( l e t s = 0 ; n & & s < t . l e n g t h ; s + + ) n = b o ( t [ s ] , e [ s ] ) ; r e t u r n n } f u n c t i o n b o ( t , e ) { i f ( t = = = e ) r e t u r n ! 0 ; l e t n = T l ( t ) , s = T l ( e ) ; i f ( n | | s ) r e t u r n n & & s ? t . g e t T i m e ( ) = = = e . g e t T i m e ( ) : ! 1 ; i f ( n = t o ( t ) , s = t o ( e ) , n | | s ) r e t u r n t = = = e ; i f ( n = _ e ( t ) , s = _ e ( e ) , n | | s ) r e t u r n n & & s ? P p ( t , e ) : ! 1 ; i f ( n = B e ( t ) , s = B e ( e ) , n | | s ) { i f ( ! n | | ! s ) r e t u r n ! 1 ; c o n s t o = O b j e c t . k e y s ( t ) . l e n g t h , r = O b j e c t . k e y s ( e ) . l e n g t h ; i f ( o ! = = r ) r e t u r n ! 1 ; f o r ( c o n s t i i n t ) { c o n s t a = t . h a s O w n P r o p e r t y ( i ) , l = e . h a s O w n P r o p e r t y ( i ) ; i f ( a & & ! l | | ! a & & l | | ! b o ( t [ i ] , e [ i ] ) ) r e t u r n ! 1 } } r e t u r n S t r i n g ( t ) = = = S t r i n g ( e ) } f u n c t i o n k a ( t , e ) { r e t u r n t . f i n d I n d e x ( n = > b o ( n , e ) ) } c o n s t Z = t = > H e ( t ) ? t : t = = n u l l ? " " : _ e ( t ) | | B e ( t ) & & ( t . t o S t r i n g = = = t d | | ! E e ( t . t o S t r i n g ) ) ? J S O N . s t r i n g i f y ( t , X u , 2 ) : S t r i n g ( t ) , X u = ( t , e ) = > e & & e . _ _ v _ i s R e f ? X u ( t , e . v a l u e ) : l s ( e ) ? { [ ` M a p ( $ { e . s i z e } ) ` ] : [ . . . e . e n t r i e s ( ) ] . r e d u c e ( ( n , [ s , o ] ) = > ( n [ ` $ { s } = > ` ] = o , n ) , { } ) } : S s ( e ) ? { [ ` S e t ( $ { e . s i z e } ) ` ] : [ . . . e . v a l u e s ( ) ] } : B e ( e ) & & ! _ e ( e ) & & ! n d ( e ) ? S t r i n g ( e ) : e , U e = { } , a s = [ ] , D t = ( ) = > { } , I p = ( ) = > ! 1 , F p = / ^ o n [ ^ a - z ] / , T r = t = > F p . t e s t ( t ) , C a = t = > t . s t a r t s W i t h ( " o n U p d a t e : " ) , Z e = O b j e c t . a s s i g n , E a = ( t , e ) = > { c o n s t n = t . i n d e x O f ( e ) ; n > - 1 & & t . s p l i c e ( n , 1 ) } , $ p = O b j e c t . p r o t o t y p e . h a s O w n P r o p e r t y , O e = ( t , e ) = > $ p . c a l l ( t , e ) , _ e = A r r a y . i s A r r a y , l s = t = > T s ( t ) = = = " [ o b j e c t M a p ] " , S s = t = > T s ( t ) = = = " [ o b j e c t S e t ] " , T l = t = > T s ( t ) = = = " [ o b j e c t D a t e ] " , q p = t = > T s ( t ) = = = " [ o b j e c t R e g E x p ] " , E e = t = > t y p e o f t = = " f u n c t i o n " , H e = t = > t y p e o f t = = " s t r i n g " , t o = t = > t y p e o f t = = " s y m b o l " , B e = t = > t ! = = n u l l & & t y p e o f t = = " o b j e c t " , e d = t = > B e ( t ) & & E e ( t . t h e n ) & & E e ( t . c a t c h ) , t d = O b j e c t . p r o t o t y p e . t o S t r i n g , T s = t = > t d . c a l l ( t ) , z p = t = > T s ( t ) . s l i c e ( 8 , - 1 ) , n d = t = > T s ( t ) = = = " [ o b j e c t O b j e c t ] " , A a = t = > H e ( t ) & & t ! = = " N a N " & & t [ 0 ] ! = = " - " & & " " + p a r s e I n t ( t , 1 0 ) = = = t , K o = w a ( " , k e y , r e f , r e f _ f o r , r e f _ k e y , o n V n o d e B e f o r e M o u n t , o n V n o d e M o u n t e d , o n V n o d e B e f o r e U p d a t e , o n V n o d e U p d a t e d , o n V n o d e B e f o r e U n m o u n t , o n V n o d e U n m o u n t e d " ) , M r = t = > { c o n s t e = O b j e c t . c r e a t e ( n u l l ) ; r e t u r n n = > e [ n ] | | ( e [ n ] = t ( n ) ) } , B p = / - ( \ w ) / g , U t = M r ( t = > t . r e p l a c e ( B p , ( e , n ) = > n ? n . t o U p p e r C a s e ( ) : " " ) ) , N p = / \ B ( [ A - Z ] ) / g , J n = M r ( t = > t . r e p l a c e ( N p , " - $ 1 " ) . t o L o w e r C a s e ( ) ) , D r = M r ( t = > t . c h a r A t ( 0 ) . t o U p p e r C a s e ( ) + t . s l i c e ( 1 ) ) , i i = M r ( t = > t ? ` o n $ { D r ( t ) } ` : " " ) , n o = ( t , e ) = > ! O b j e c t . i s ( t , e ) , c s = ( t , e ) = > { f o r ( l e t n = 0 ; n < t . l e n g t h ; n + + ) t [ n ] ( e ) } , i r = ( t , e , n ) = > { O b j e c t . d e f i n e P r o p e r t y ( t , e , { c o n f i g u r a b l e : ! 0 , e n u m e r a b l e : ! 1 , v a l u e : n } ) } , a r = t = > { c o n s t e = p a r s e F l o a t ( t ) ; r e t u r n i s N a N ( e ) ? t : e } , U p = t = > { c o n s t e = H e ( t ) ? N u m b e r ( t ) : N a N ; r e t u r n i s N a N ( e ) ? t : e } ; l e t M l ; c o n s t H p = ( ) = > M l | | ( M l = t y p e o f g l o b a l T h i s < " u " ? g l o b a l T h i s : t y p e o f s e l f < " u " ? s e l f : t y p e o f w i n d o w < " u " ? w i n d o w : t y p e o f g l o b a l < " u " ? g l o b a l : { } ) ; l e t A t ; c l a s s V p { c o n s t r u c t o r ( e = ! 1 ) { t h i s . d e t a c h e d = e , t h i s . _ a c t i v e = ! 0 , t h i s . e f f e c t s = [ ] , t h i s . c l e a n u p s = [ ] , t h i s . p a r e n t = A t , ! e & & A t & & ( t h i s . i n d e x = ( A t . s c o p e s | | ( A t . s c o p e s = [ ] ) ) . p u s h ( t h i s )
2023-06-24 15:18:52 +00:00
* vuex v4 . 0.2
* ( c ) 2021 Evan You
* @ license MIT
2023-06-26 22:51:32 +00:00
* /var ym="store";function Os(t,e){Object.keys(t).forEach(function(n){return e(t[n],n)})}function bm(t){return t!==null&&typeof t=="object"}function vm(t){return t&&typeof t.then=="function"}function xm(t,e){return function(){return t(e)}}function ih(t,e,n){return e.indexOf(t)<0&&(n&&n.prepend?e.unshift(t):e.push(t)),function(){var s=e.indexOf(t);s>-1&&e.splice(s,1)}}function ah(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;Br(t,n,[],t._modules.root,!0),Ha(t,n,e)}function Ha(t,e,n){var s=t._state;t.getters={},t._makeLocalGettersCache=Object.create(null);var o=t._wrappedGetters,r={};Os(o,function(i,a){r[a]=xm(i,t),Object.defineProperty(t.getters,a,{get:function(){return r[a]()},enumerable:!0})}),t._state=Ls({data:e}),t.strict&&Am(t),s&&n&&t._withCommit(function(){s.data=null})}function Br(t,e,n,s,o){var r=!n.length,i=t._modules.getNamespace(n);if(s.namespaced&&(t._modulesNamespaceMap[i],t._modulesNamespaceMap[i]=s),!r&&!o){var a=Va(e,n.slice(0,-1)),l=n[n.length-1];t._withCommit(function(){a[l]=s.state})}var c=s.context=wm(t,i,n);s.forEachMutation(function(u,h){var f=i+h;km(t,f,u,c)}),s.forEachAction(function(u,h){var f=u.root?h:i+h,g=u.handler||u;Cm(t,f,g,c)}),s.forEachGetter(function(u,h){var f=i+h;Em(t,f,u,c)}),s.forEachChild(function(u,h){Br(t,e,n.concat(h),u,o)})}function wm(t,e,n){var s=e==="",o={dispatch:s?t.dispatch:function(r,i,a){var l=dr(r,i,a),c=l.payload,u=l.options,h=l.type;return(!u||!u.root)&&(h=e+h),t.dispatch(h,c)},commit:s?t.commit:function(r,i,a){var l=dr(r,i,a),c=l.payload,u=l.options,h=l.type;(!u||!u.root)&&(h=e+h),t.commit(h,c,u)}};return Object.defineProperties(o,{getters:{get:s?function(){return t.getters}:function(){return lh(t,e)}},state:{get:function(){return Va(t.state,n)}}}),o}function lh(t,e){if(!t._makeLocalGettersCache[e]){var n={},s=e.length;Object.keys(t.getters).forEach(function(o){if(o.slice(0,s)===e){var r=o.slice(s);Object.defineProperty(n,r,{get:function(){return t.getters[o]},enumerable:!0})}}),t._makeLocalGettersCache[e]=n}return t._makeLocalGettersCache[e]}function km(t,e,n,s){var o=t._mutations[e]||(t._mutations[e]=[]);o.push(function(i){n.call(t,s.state,i)})}function Cm(t,e,n,s){var o=t._actions[e]||(t._actions[e]=[]);o.push(function(i){var a=n.call(t,{dispatch:s.dispatch,commit:s.commit,getters:s.getters,state:s.state,rootGetters:t.getters,rootState:t.state},i);return vm(a)||(a=Promise.resolve(a)),t._devtoolHook?a.catch(function(l){throw t._devtoolHook.emit("vuex:error",l),l}):a})}function Em(t,e,n,s){t._wrappedGetters[e]||(t._wrappedGetters[e]=function(r){return n(s.state,s.getters,r.state,r.getters)})}function Am(t){Hn(function(){return t._state.data},function(){},{deep:!0,flush:"sync"})}function Va(t,e){return e.reduce(function(n,s){return n[s]},t)}function dr(t,e,n){return bm(t)&&t.type&&(n=e,e=t,t=t.type),{type:t,payload:e,options:n}}var Sm="vuex bindings",dc="vuex:mutations",gi="vuex:actions",es="vuex",Tm=0;function Mm(t,e){_m({id:"org.vuejs.vuex",app:t,label:"Vuex",homepage:"https:/ / next . vuex . vuejs . org / ",logo:" https : //vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[Sm]},function(n){n.addTimelineLayer({id:dc,label:"Vuex Mutations",color:hc}),n.addTimelineLayer({id:gi,label:"Vuex Actions",color:hc}),n.addInspector({id:es,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),n.on.getInspectorTree(function(s){if(s.app===t&&s.inspectorId===es)if(s.filter){var o=[];hh(o,e._modules.root,s.filter,""),s.rootNodes=o}else s.rootNodes=[dh(e._modules.root,"")]}),n.on.getInspectorState(function(s){if(s.app===t&&s.inspectorId===es){var o=s.nodeId;lh(e,o),s.state=Om(Rm(e._modules,o),o==="root"?e.getters:e._makeLocalGettersCache,o)}}),n.on.editInspectorState(function(s){if(s.app===t&&s.inspectorId===es){var o=s.nodeId,r=s.path;o!=="root"&&(r=o.split("/").filter(Boolean).concat(r)),e._withCommit(function(){s.set(e._state.data,r,s.state.value)})}}),e.subscribe(function(s,o){var r={};s.payload&&(r.payload=s.payload),r.state
2023-06-24 15:18:52 +00:00
* vue - router v4 . 1.6
* ( c ) 2022 Eduardo San Martin Morote
* @ license MIT
2023-06-26 22:51:32 +00:00
* /const os=typeof window<"u";function Im(t){return t.__esModule||t[Symbol.toStringTag]==="Module"}const ze=Object.assign;function mi(t,e){const n={};for(const s in e){const o=e[s];n[s]=Lt(o)?o.map(t):t(o)}return n}const Zs=()=>{},Lt=Array.isArray,Fm=/ \ / $ / , $m = t => t . replace ( Fm , "" ) ; function _i ( t , e , n = "/" ) { let s , o = { } , r = "" , i = "" ; const a = e . indexOf ( "#" ) ; let l = e . indexOf ( "?" ) ; return a < l && a >= 0 && ( l = - 1 ) , l > - 1 && ( s = e . slice ( 0 , l ) , r = e . slice ( l + 1 , a > - 1 ? a : e . length ) , o = t ( r ) ) , a > - 1 && ( s = s || e . slice ( 0 , a ) , i = e . slice ( a , e . length ) ) , s = Nm ( s ? ? e , n ) , { fullPath : s + ( r && "?" ) + r + i , path : s , query : o , hash : i } } function qm ( t , e ) { const n = e . query ? t ( e . query ) : "" ; return e . path + ( n && "?" ) + n + ( e . hash || "" ) } function fc ( t , e ) { return ! e || ! t . toLowerCase ( ) . startsWith ( e . toLowerCase ( ) ) ? t : t . slice ( e . length ) || "/" } function zm ( t , e , n ) { const s = e . matched . length - 1 , o = n . matched . length - 1 ; return s > - 1 && s === o && ys ( e . matched [ s ] , n . matched [ o ] ) && gh ( e . params , n . params ) && t ( e . query ) === t ( n . query ) && e . hash === n . hash } function ys ( t , e ) { return ( t . aliasOf || t ) === ( e . aliasOf || e ) } function gh ( t , e ) { if ( Object . keys ( t ) . length !== Object . keys ( e ) . length ) return ! 1 ; for ( const n in t ) if ( ! Bm ( t [ n ] , e [ n ] ) ) return ! 1 ; return ! 0 } function Bm ( t , e ) { return Lt ( t ) ? pc ( t , e ) : Lt ( e ) ? pc ( e , t ) : t === e } function pc ( t , e ) { return Lt ( e ) ? t . length === e . length && t . every ( ( n , s ) => n === e [ s ] ) : t . length === 1 && t [ 0 ] === e } function Nm ( t , e ) { if ( t . startsWith ( "/" ) ) return t ; if ( ! t ) return e ; const n = e . split ( "/" ) , s = t . split ( "/" ) ; let o = n . length - 1 , r , i ; for ( r = 0 ; r < s . length ; r ++ ) if ( i = s [ r ] , i !== "." ) if ( i === ".." ) o > 1 && o -- ; else break ; return n . slice ( 0 , o ) . join ( "/" ) + "/" + s . slice ( r - ( r === s . length ? 1 : 0 ) ) . join ( "/" ) } var ho ; ( function ( t ) { t . pop = "pop" , t . push = "push" } ) ( ho || ( ho = { } ) ) ; var Js ; ( function ( t ) { t . back = "back" , t . forward = "forward" , t . unknown = "" } ) ( Js || ( Js = { } ) ) ; function Um ( t ) { if ( ! t ) if ( os ) { const e = document . querySelector ( "base" ) ; t = e && e . getAttribute ( "href" ) || "/" , t = t . replace ( /^\w+:\/\/[^\/]+/ , "" ) } else t = "/" ; return t [ 0 ] !== "/" && t [ 0 ] !== "#" && ( t = "/" + t ) , $m ( t ) } const Hm = /^[^#]+#/ ; function Vm ( t , e ) { return t . replace ( Hm , "#" ) + e } function Gm ( t , e ) { const n = document . documentElement . getBoundingClientRect ( ) , s = t . getBoundingClientRect ( ) ; return { behavior : e . behavior , left : s . left - n . left - ( e . left || 0 ) , top : s . top - n . top - ( e . top || 0 ) } } const Nr = ( ) => ( { left : window . pageXOffset , top : window . pageYOffset } ) ; function Km ( t ) { let e ; if ( "el" in t ) { const n = t . el , s = typeof n == "string" && n . startsWith ( "#" ) , o = typeof n == "string" ? s ? document . getElementById ( n . slice ( 1 ) ) : document . querySelector ( n ) : n ; if ( ! o ) return ; e = Gm ( 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 gc ( t , e ) { return ( history . state ? history . state . position - e : - 1 ) + t } const ea = new Map ; function Wm ( t , e ) { ea . set ( t , e ) } function Zm ( t ) { const e = ea . get ( t ) ; return ea . delete ( t ) , e } let Jm = ( ) => location . protocol + "//" + location . host ; function mh ( t , e ) { const { pathname : n , search : s , hash : o } = e , r = t . indexOf ( "#" ) ; if ( r > - 1 ) { let a = o . includes ( t . slice ( r ) ) ? t . slice ( r ) . length : 1 , l = o . slice ( a ) ; return l [ 0 ] !== "/" && ( l = "/" + l ) , fc ( l , "" ) } return fc ( n , t ) + s + o } function Ym ( t , e , n , s ) { let o = [ ] , r = [ ] , i = null ; const a = ( { state : f } ) => { const g = mh ( t , location ) , p = n . value , m = e . value ; let w = 0 ; if ( f ) { if ( n . value = g , e . value = f , i && i === p ) { i = null ; return } w = m ? f . position - m . position : 0 } else s ( g ) ; o . forEach ( v => { v ( n . value , p , { delta : w , type : ho . pop , direction : w ? w > 0 ? Js . forward : Js . back : Js . unknown } ) } ) } ; function l ( ) { i = n . value } function c ( f ) { o . push ( f ) ; const g = ( ) => { const p = o . indexOf ( f ) ; p > - 1 && o . splice ( p , 1 ) } ; return r . push ( g ) , g } function u ( ) { const { history : f } = window ; f . state && f . replaceState ( ze ( { } , f . state , { scroll : Nr ( ) } ) , "" ) } function h ( ) { for ( const f of r ) f ( ) ; r = [ ] , window . removeEventListener ( "popstate" , a ) , window . removeEventListener ( "beforeunload" , u ) } return window . addEventListener ( "popstate" , a ) , window . addEventListener ( "beforeunload" , u ) , { pauseListeners : l , listen : c , destroy : h } } function mc ( t , e , n , s = ! 1 , o = ! 1 ) { return { back : t , current : e , forward : n , replaced : s , position : window . history . length , scroll : o ? Nr ( ) : null } } function Qm ( t ) { const { history : e , location : n } = window , s = { value : mh ( t , n ) } , o = { value : e . state } ; o . value || r ( s . value , { back : null , current : s . value , forward : null , position : e . length - 1 , replaced : ! 0 , scroll : null } , ! 0 ) ; function r ( l , c , u ) { const h = t . indexOf ( "#"
2023-06-24 15:18:52 +00:00
Copyright ( c ) 2016 Jed Watson .
Licensed under the MIT License ( MIT ) , see
http : //jedwatson.github.io/classnames
2023-06-26 22:51:32 +00:00
* /(function(){var a=function(){function l(){}l.prototype=Object.create(null);function c(v,y){for(var x=y.length,E=0;E<x;++E)m(v,y[E])}var u={}.hasOwnProperty;function h(v,y){v[y]=!0}function f(v,y){for(var x in y)u.call(y,x)&&(v[x]=!!y[x])}var g=/ \ s + / ; f u n c t i o n p ( v , y ) { f o r ( v a r x = y . s p l i t ( g ) , E = x . l e n g t h , $ = 0 ; $ < E ; + + $ ) v [ x [ $ ] ] = ! 0 } f u n c t i o n m ( v , y ) { i f ( y ) { v a r x = t y p e o f y ; x = = = " s t r i n g " ? p ( v , y ) : A r r a y . i s A r r a y ( y ) ? c ( v , y ) : x = = = " o b j e c t " ? f ( v , y ) : x = = = " n u m b e r " & & h ( v , y ) } } f u n c t i o n w ( ) { f o r ( v a r v = a r g u m e n t s . l e n g t h , y = A r r a y ( v ) , x = 0 ; x < v ; x + + ) y [ x ] = a r g u m e n t s [ x ] ; v a r E = n e w l ; c ( E , y ) ; v a r $ = [ ] ; f o r ( v a r M i n E ) E [ M ] & & $ . p u s h ( M ) ; r e t u r n $ . j o i n ( " " ) } r e t u r n w } ( ) ; t y p e o f n < " u " & & n . e x p o r t s ? n . e x p o r t s = a : ( r = [ ] , i = f u n c t i o n ( ) { r e t u r n a } . a p p l y ( s , r ) , i ! = = v o i d 0 & & ( n . e x p o r t s = i ) ) } ) ( ) } , " . / n o d e _ m o d u l e s / c o r e - j s / e s / a r r a y / f r o m . j s " : f u n c t i o n ( n , s , o ) { o ( " . / n o d e _ m o d u l e s / c o r e - j s / m o d u l e s / e s . s t r i n g . i t e r a t o r . j s " ) , o ( " . / n o d e _ m o d u l e s / c o r e - j s / m o d u l e s / e s . a r r a y . f r o m . j s " ) ; v a r r = o ( " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / p a t h . j s " ) ; n . e x p o r t s = r . A r r a y . f r o m } , " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / a - f u n c t i o n . j s " : f u n c t i o n ( n , s ) { n . e x p o r t s = f u n c t i o n ( o ) { i f ( t y p e o f o ! = " f u n c t i o n " ) t h r o w T y p e E r r o r ( S t r i n g ( o ) + " i s n o t a f u n c t i o n " ) ; r e t u r n o } } , " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / a n - o b j e c t . j s " : f u n c t i o n ( n , s , o ) { v a r r = o ( " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / i s - o b j e c t . j s " ) ; n . e x p o r t s = f u n c t i o n ( i ) { i f ( ! r ( i ) ) t h r o w T y p e E r r o r ( S t r i n g ( i ) + " i s n o t a n o b j e c t " ) ; r e t u r n i } } , " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / a r r a y - f r o m . j s " : f u n c t i o n ( n , s , o ) { v a r r = o ( " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / b i n d - c o n t e x t . j s " ) , i = o ( " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / t o - o b j e c t . j s " ) , a = o ( " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / c a l l - w i t h - s a f e - i t e r a t i o n - c l o s i n g . j s " ) , l = o ( " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / i s - a r r a y - i t e r a t o r - m e t h o d . j s " ) , c = o ( " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / t o - l e n g t h . j s " ) , u = o ( " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / c r e a t e - p r o p e r t y . j s " ) , h = o ( " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / g e t - i t e r a t o r - m e t h o d . j s " ) ; n . e x p o r t s = f u n c t i o n ( g ) { v a r p = i ( g ) , m = t y p e o f t h i s = = " f u n c t i o n " ? t h i s : A r r a y , w = a r g u m e n t s . l e n g t h , v = w > 1 ? a r g u m e n t s [ 1 ] : v o i d 0 , y = v ! = = v o i d 0 , x = 0 , E = h ( p ) , $ , M , q , b ; i f ( y & & ( v = r ( v , w > 2 ? a r g u m e n t s [ 2 ] : v o i d 0 , 2 ) ) , E ! = n u l l & & ! ( m = = A r r a y & & l ( E ) ) ) f o r ( b = E . c a l l ( p ) , M = n e w m ; ! ( q = b . n e x t ( ) ) . d o n e ; x + + ) u ( M , x , y ? a ( b , v , [ q . v a l u e , x ] , ! 0 ) : q . v a l u e ) ; e l s e f o r ( $ = c ( p . l e n g t h ) , M = n e w m ( $ ) ; $ > x ; x + + ) u ( M , x , y ? v ( p [ x ] , x ) : p [ x ] ) ; r e t u r n M . l e n g t h = x , M } } , " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / a r r a y - i n c l u d e s . j s " : f u n c t i o n ( n , s , o ) { v a r r = o ( " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / t o - i n d e x e d - o b j e c t . j s " ) , i = o ( " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / t o - l e n g t h . j s " ) , a = o ( " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / t o - a b s o l u t e - i n d e x . j s " ) ; n . e x p o r t s = f u n c t i o n ( l ) { r e t u r n f u n c t i o n ( c , u , h ) { v a r f = r ( c ) , g = i ( f . l e n g t h ) , p = a ( h , g ) , m ; i f ( l & & u ! = u ) { f o r ( ; g > p ; ) i f ( m = f [ p + + ] , m ! = m ) r e t u r n ! 0 } e l s e f o r ( ; g > p ; p + + ) i f ( ( l | | p i n f ) & & f [ p ] = = = u ) r e t u r n l | | p | | 0 ; r e t u r n ! l & & - 1 } } } , " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / b i n d - c o n t e x t . j s " : f u n c t i o n ( n , s , o ) { v a r r = o ( " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / a - f u n c t i o n . j s " ) ; n . e x p o r t s = f u n c t i o n ( i , a , l ) { i f ( r ( i ) , a = = = v o i d 0 ) r e t u r n i ; s w i t c h ( l ) { c a s e 0 : r e t u r n f u n c t i o n ( ) { r e t u r n i . c a l l ( a ) } ; c a s e 1 : r e t u r n f u n c t i o n ( c ) { r e t u r n i . c a l l ( a , c ) } ; c a s e 2 : r e t u r n f u n c t i o n ( c , u ) { r e t u r n i . c a l l ( a , c , u ) } ; c a s e 3 : r e t u r n f u n c t i o n ( c , u , h ) { r e t u r n i . c a l l ( a , c , u , h ) } } r e t u r n f u n c t i o n ( ) { r e t u r n i . a p p l y ( a , a r g u m e n t s ) } } } , " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / c a l l - w i t h - s a f e - i t e r a t i o n - c l o s i n g . j s " : f u n c t i o n ( n , s , o ) { v a r r = o ( " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / a n - o b j e c t . j s " ) ; n . e x p o r t s = f u n c t i o n ( i , a , l , c ) { t r y { r e t u r n c ? a ( r ( l ) [ 0 ] , l [ 1 ] ) : a ( l ) } c a t c h ( h ) { v a r u = i . r e t u r n ; t h r o w u ! = = v o i d 0 & & r ( u . c a l l ( i ) ) , h } } } , " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / c h e c k - c o r r e c t n e s s - o f - i t e r a t i o n . j s " : f u n c t i o n ( n , s , o ) { v a r r = o ( " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / w e l l - k n o w n - s y m b o l . j s " ) , i = r ( " i t e r a t o r " ) , a = ! 1 ; t r y { v a r l = 0 , c = { n e x t : f u n c t i o n ( ) { r e t u r n { d o n e : ! ! l + + } } , r e t u r n : f u n c t i o n ( ) { a = ! 0 } } ; c [ i ] = f u n c t i o n ( ) { r e t u r n t h i s } , A r r a y . f r o m ( c , f u n c t i o n ( ) { t h r o w 2 } ) } c a t c h { } n . e x p o r t s = f u n c t i o n ( u , h ) { i f ( ! h & & ! a ) r e t u r n ! 1 ; v a r f = ! 1 ; t r y { v a r g = { } ; g [ i ] = f u n c t i o n ( ) { r e t u r n { n e x t : f u n c t i o n ( ) { r e t u r n { d o n e : f = ! 0 } } } } , u ( g ) } c a t c h { } r e t u r n f } } , " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / c l a s s o f - r a w . j s " : f u n c t i o n ( n , s ) { v a r o = { } . t o S t r i n g ; n . e x p o r t s = f u n c t i o n ( r ) { r e t u r n o . c a l l ( r ) . s l i c e ( 8 , - 1 ) } } , " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / c l a s s o f . j s " : f u n c t i o n ( n , s , o ) { v a r r = o ( " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / c l a s s o f - r
2023-06-24 15:18:52 +00:00
Papa Parse
v5 . 4.1
https : //github.com/mholt/PapaParse
License : MIT
2023-06-26 22:51:32 +00:00
* / ( f u n c t i o n ( t , e ) { ( f u n c t i o n ( n , s ) { t . e x p o r t s = s ( ) } ) ( T h , f u n c t i o n n ( ) { v a r s = t y p e o f s e l f < " u " ? s e l f : t y p e o f w i n d o w < " u " ? w i n d o w : s ! = = v o i d 0 ? s : { } , o = ! s . d o c u m e n t & & ! ! s . p o s t M e s s a g e , r = s . I S _ P A P A _ W O R K E R | | ! 1 , i = { } , a = 0 , l = { p a r s e : f u n c t i o n ( b , k ) { v a r S = ( k = k | | { } ) . d y n a m i c T y p i n g | | ! 1 ; i f ( q ( S ) & & ( k . d y n a m i c T y p i n g F u n c t i o n = S , S = { } ) , k . d y n a m i c T y p i n g = S , k . t r a n s f o r m = ! ! q ( k . t r a n s f o r m ) & & k . t r a n s f o r m , k . w o r k e r & & l . W O R K E R S _ S U P P O R T E D ) { v a r z = f u n c t i o n ( ) { i f ( ! l . W O R K E R S _ S U P P O R T E D ) r e t u r n ! 1 ; v a r Q = ( h e = s . U R L | | s . w e b k i t U R L | | n u l l , X = n . t o S t r i n g ( ) , l . B L O B _ U R L | | ( l . B L O B _ U R L = h e . c r e a t e O b j e c t U R L ( n e w B l o b ( [ " v a r g l o b a l = ( f u n c t i o n ( ) { i f ( t y p e o f s e l f ! = = ' u n d e f i n e d ' ) { r e t u r n s e l f ; } i f ( t y p e o f w i n d o w ! = = ' u n d e f i n e d ' ) { r e t u r n w i n d o w ; } i f ( t y p e o f g l o b a l ! = = ' u n d e f i n e d ' ) { r e t u r n g l o b a l ; } r e t u r n { } ; } ) ( ) ; g l o b a l . I S _ P A P A _ W O R K E R = t r u e ; " , " ( " , X , " ) ( ) ; " ] , { t y p e : " t e x t / j a v a s c r i p t " } ) ) ) ) , I = n e w s . W o r k e r ( Q ) , h e , X ; r e t u r n I . o n m e s s a g e = y , I . i d = a + + , i [ I . i d ] = I } ( ) ; r e t u r n z . u s e r S t e p = k . s t e p , z . u s e r C h u n k = k . c h u n k , z . u s e r C o m p l e t e = k . c o m p l e t e , z . u s e r E r r o r = k . e r r o r , k . s t e p = q ( k . s t e p ) , k . c h u n k = q ( k . c h u n k ) , k . c o m p l e t e = q ( k . c o m p l e t e ) , k . e r r o r = q ( k . e r r o r ) , d e l e t e k . w o r k e r , v o i d z . p o s t M e s s a g e ( { i n p u t : b , c o n f i g : k , w o r k e r I d : z . i d } ) } v a r F = n u l l ; r e t u r n l . N O D E _ S T R E A M _ I N P U T , t y p e o f b = = " s t r i n g " ? ( b = f u n c t i o n ( Q ) { r e t u r n Q . c h a r C o d e A t ( 0 ) = = = 6 5 2 7 9 ? Q . s l i c e ( 1 ) : Q } ( b ) , F = k . d o w n l o a d ? n e w h ( k ) : n e w g ( k ) ) : b . r e a d a b l e = = = ! 0 & & q ( b . r e a d ) & & q ( b . o n ) ? F = n e w p ( k ) : ( s . F i l e & & b i n s t a n c e o f F i l e | | b i n s t a n c e o f O b j e c t ) & & ( F = n e w f ( k ) ) , F . s t r e a m ( b ) } , u n p a r s e : f u n c t i o n ( b , k ) { v a r S = ! 1 , z = ! 0 , F = " , " , Q = ` \ r
` ,I='"',he=I+I,X=!1,A=null,N=!1;(function(){if(typeof k=="object"){if(typeof k.delimiter!="string"||l.BAD_DELIMITERS.filter(function(ee){return k.delimiter.indexOf(ee)!==-1}).length||(F=k.delimiter),(typeof k.quotes=="boolean"||typeof k.quotes=="function"||Array.isArray(k.quotes))&&(S=k.quotes),typeof k.skipEmptyLines!="boolean"&&typeof k.skipEmptyLines!="string"||(X=k.skipEmptyLines),typeof k.newline=="string"&&(Q=k.newline),typeof k.quoteChar=="string"&&(I=k.quoteChar),typeof k.header=="boolean"&&(z=k.header),Array.isArray(k.columns)){if(k.columns.length===0)throw new Error("Option columns is empty");A=k.columns}k.escapeChar!==void 0&&(he=k.escapeChar+I),(typeof k.escapeFormulae=="boolean"||k.escapeFormulae instanceof RegExp)&&(N=k.escapeFormulae instanceof RegExp?k.escapeFormulae:/^[=+ \- @ \t \r ].* $ /)}})();var V=new RegExp(w(I),"g");if(typeof b=="string"&&(b=JSON.parse(b)),Array.isArray(b)){if(!b.length||Array.isArray(b[0]))return me(null,b,X);if(typeof b[0]=="object")return me(A||Object.keys(b[0]),b,X)}else if(typeof b=="object")return typeof b.data=="string"&&(b.data=JSON.parse(b.data)),Array.isArray(b.data)&&(b.fields||(b.fields=b.meta&&b.meta.fields||A),b.fields||(b.fields=Array.isArray(b.data[0])?b.fields:typeof b.data[0]=="object"?Object.keys(b.data[0]):[]),Array.isArray(b.data[0])||typeof b.data[0]=="object"||(b.data=[b.data])),me(b.fields||[],b.data||[],X);throw new Error("Unable to serialize unrecognized input");function me(ee,be,Ce){var D="";typeof ee=="string"&&(ee=JSON.parse(ee)),typeof be=="string"&&(be=JSON.parse(be));var W=Array.isArray(ee)&&0<ee.length,J=!Array.isArray(be[0]);if(W&&z){for(var ie=0;ie<ee.length;ie++)0<ie&&(D+=F),D+=pe(ee[ie],ie);0<be.length&&(D+=Q)}for(var se=0;se<be.length;se++){var ge=W?ee.length:be[se].length,de=!1,_=W?Object.keys(be[se]).length===0:be[se].length===0;if(Ce&&!W&&(de=Ce==="greedy"?be[se].join("").trim()==="":be[se].length===1&&be[se][0].length===0),Ce==="greedy"&&W){for(var C=[],O=0;O<ge;O++){var j=J?ee[O]:O;C.push(be[se][j])}de=C.join("").trim()===""}if(!de){for(var R=0;R<ge;R++){0<R&&!_&&(D+=F);var Y=W&&J?ee[R]:R;D+=pe(be[se][Y],R)}se<be.length-1&&(!Ce||0<ge&&!_)&&(D+=Q)}}return D}function pe(ee,be){if(ee==null)return"";if(ee.constructor===Date)return JSON.stringify(ee).slice(1,25);var Ce=!1;N&&typeof ee=="string"&&N.test(ee)&&(ee="'"+ee,Ce=!0);var D=ee.toString().replace(V,he);return(Ce=Ce||S===!0||typeof S=="function"&&S(ee,be)||Array.isArray(S)&&S[be]||function(W,J){for(var ie=0;ie<J.length;ie++)if(-1<W.indexOf(J[ie]))return!0;return!1}(D,l.BAD_DELIMITERS)||-1<D.indexOf(F)||D.charAt(0)===" "||D.charAt(D.length-1)===" ")?I+D+I:D}}};if(l.RECORD_SEP=String.fromCharCode(30),l.UNIT_SEP=String.fromCharCode(31),l.BYTE_ORDER_MARK=" \u FEFF",l.BAD_DELIMITERS=[" \r ", `
` ,'"',l.BYTE_ORDER_MARK],l.WORKERS_SUPPORTED=!o&&!!s.Worker,l.NODE_STREAM_INPUT=1,l.LocalChunkSize=10485760,l.RemoteChunkSize=5242880,l.DefaultDelimiter=",",l.Parser=v,l.ParserHandle=m,l.NetworkStreamer=h,l.FileStreamer=f,l.StringStreamer=g,l.ReadableStreamStreamer=p,s.jQuery){var c=s.jQuery;c.fn.parse=function(b){var k=b.config||{},S=[];return this.each(function(Q){if(!(c(this).prop("tagName").toUpperCase()==="INPUT"&&c(this).attr("type").toLowerCase()==="file"&&s.FileReader)||!this.files||this.files.length===0)return!0;for(var I=0;I<this.files.length;I++)S.push({file:this.files[I],inputElem:this,instanceConfig:c.extend({},k)})}),z(),this;function z(){if(S.length!==0){var Q,I,he,X,A=S[0];if(q(b.before)){var N=b.before(A.file,A.inputElem);if(typeof N=="object"){if(N.action==="abort")return Q="AbortError",I=A.file,he=A.inputElem,X=N.reason,void(q(b.error)&&b.error({name:Q},I,he,X));if(N.action==="skip")return void F();typeof N.config=="object"&&(A.instanceConfig=c.extend(A.instanceConfig,N.config))}else if(N==="skip")return void F()}var V=A.instanceConfig.complete;A.instanceConfig.complete=function(me){q(V)&&V(me,A.file,A.inputElem),F()},l.parse(A.file,A.instanceConfig)}else q(b.complete)&&b.complete()}function F(){S.splice(0,1),z()}}}function u(b){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(k){var S= $ (k);S.chunkSize=parseInt(S.chunkSize),k.step||k.chunk||(S.chunkSize=null),this._handle=new m(S),(this._handle.streamer=this)._config=S}.call(this,b),this.parseChunk=function(k,S){if(this.isFirstChunk&&q(this._config.beforeFirstChunk)){var z=this._config.beforeFirstChunk(k);z!==void 0&&(k=z)}this.isFirstChunk=!1,this._halted=!1;var F=this._partialLine+k;this._partialLine="";var Q=this._handle.parse(F,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var I=Q.meta.cursor;this._finished||(this._partialLine=F.substring(I-this._baseIndex),this._baseIndex=I),Q&&Q.data&&(this._rowCount+=Q.data.length);var he=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(r)s.postMessage({results:Q,workerId:l.WORKER_ID,finished:he});else if(q(this._config.chunk)&&!S){if(this._config.chunk(Q,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);Q=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(Q.data),this._completeResults.errors=this._completeResults.errors.concat(Q.errors),this._completeResults.meta=Q.meta),this._completed||!he||!q(this._config.complete)||Q&&Q.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),he||Q&&Q.meta.paused||this._nextChunk(),Q}this._halted=!0},this._sendError=function(k){q(this._config.error)?this._config.error(k):r&&this._config.error&&s.postMessage({workerId:l.WORKER_ID,error:k,finished:!1})}}function h(b){var k;(b=b||{}).chunkSize||(b.chunkSize=l.RemoteChunkSize),u.call(this,b),this._nextChunk=o?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(S){this._input=S,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(k=new XMLHttpRequest,this._config.withCredentials&&(k.withCredentials=this._config.withCredentials),o||(k.onload=M(this._chunkLoaded,this),k.onerror=M(this._chunkError,this)),k.open(this._config.downloadRequestBody?"POST":"GET",this._input,!o),this._config.downloadRequestHeaders){var S=this._config.downloadRequestHeaders;for(var z in S)k.setRequestHeader(z,S[z])}if(this._config.chunkSize){var F=this._start+this._config.chunkSize-1;k.setRequestHeader("Range","bytes="+this._start+"-"+F)}try{k.send(this._config.downloadRequestBody)}catch(Q){this._chunkError(Q.message)}o&&k.status===0&&this._chunkError()}},this._chunkLoaded=function(){k.readyState===4&&(k.status<200||400<=k.status?th
2023-06-24 15:18:52 +00:00
` ),te=1<P.length&&P[0].length<oe[0].length;if(oe.length===1||te)return `
2023-06-26 22:51:32 +00:00
` ;for(var B=0,K=0;K<oe.length;K++)oe[K][0]=== `
2023-06-24 15:18:52 +00:00
` &&B++;return B>=oe.length/2? ` \ r
2023-06-26 22:51:32 +00:00
` :" \r "}(se,_)),z=!1,b.delimiter)q(b.delimiter)&&(b.delimiter=b.delimiter(se),ee.meta.delimiter=b.delimiter);else{var C=function(j,R,Y,oe,P){var te,B,K,re;P=P||[","," ","|",";",l.RECORD_SEP,l.UNIT_SEP];for(var ce=0;ce<P.length;ce++){var ae=P[ce],ve=0,H=0,ne=0;K=void 0;for(var ue=new v({comments:oe,delimiter:ae,newline:R,preview:10}).parse(j),xe=0;xe<ue.data.length;xe++)if(Y&&Ce(ue.data[xe]))ne++;else{var Pe=ue.data[xe].length;H+=Pe,K!==void 0?0<Pe&&(ve+=Math.abs(Pe-K),K=Pe):K=Pe}0<ue.data.length&&(H/=ue.data.length-ne),(B===void 0||ve<=B)&&(re===void 0||re<H)&&1.99<H&&(B=ve,te=ae,re=H)}return{successful:!!(b.delimiter=te),bestDelimiter:te}}(se,b.newline,b.skipEmptyLines,b.comments,b.delimitersToGuess);C.successful?b.delimiter=C.bestDelimiter:(z=!0,b.delimiter=l.DefaultDelimiter),ee.meta.delimiter=b.delimiter}var O= $ (b);return b.preview&&b.header&&O.preview++,k=se,S=new v(O),ee=S.parse(k,ge,de),D(),V?{meta:{paused:!0}}:ee||{meta:{paused:!1}}},this.paused=function(){return V},this.pause=function(){V=!0,S.abort(),k=q(b.chunk)?"":k.substring(S.getCharIndex())},this.resume=function(){X.streamer._halted?(V=!1,X.streamer.parseChunk(k,!0)):setTimeout(X.resume,3)},this.aborted=function(){return me},this.abort=function(){me=!0,S.abort(),ee.meta.aborted=!0,q(b.complete)&&b.complete(ee),k=""}}function w(b){return b.replace(/[.*+?^ ${ } ()|[ \] \\ ]/g," \\ $ &")}function v(b){var k,S=(b=b||{}).delimiter,z=b.newline,F=b.comments,Q=b.step,I=b.preview,he=b.fastMode,X=k=b.quoteChar===void 0||b.quoteChar===null?'"':b.quoteChar;if(b.escapeChar!==void 0&&(X=b.escapeChar),(typeof S!="string"||-1<l.BAD_DELIMITERS.indexOf(S))&&(S=","),F===S)throw new Error("Comment character same as delimiter");F===!0?F="#":(typeof F!="string"||-1<l.BAD_DELIMITERS.indexOf(F))&&(F=!1),z!== `
` &&z!==" \r "&&z!== ` \ r
` &&(z= `
` );var A=0,N=!1;this.parse=function(V,me,pe){if(typeof V!="string")throw new Error("Input must be a string");var ee=V.length,be=S.length,Ce=z.length,D=F.length,W=q(Q),J=[],ie=[],se=[],ge=A=0;if(!V)return Ne();if(b.header&&!me){var de=V.split(z)[0].split(S),_=[],C={},O=!1;for(var j in de){var R=de[j];q(b.transformHeader)&&(R=b.transformHeader(R,j));var Y=R,oe=C[R]||0;for(0<oe&&(O=!0,Y=R+"_"+oe),C[R]=oe+1;_.includes(Y);)Y=Y+"_"+oe;_.push(Y)}if(O){var P=V.split(z);P[0]=_.join(S),V=P.join(z)}}if(he||he!==!1&&V.indexOf(k)===-1){for(var te=V.split(z),B=0;B<te.length;B++){if(se=te[B],A+=se.length,B!==te.length-1)A+=z.length;else if(pe)return Ne();if(!F||se.substring(0,D)!==F){if(W){if(J=[],ne(se.split(S)),gt(),N)return Ne()}else ne(se.split(S));if(I&&I<=B)return J=J.slice(0,I),Ne(!0)}}return Ne()}for(var K=V.indexOf(S,A),re=V.indexOf(z,A),ce=new RegExp(w(X)+w(k),"g"),ae=V.indexOf(k,A);;)if(V[A]!==k)if(F&&se.length===0&&V.substring(A,A+D)===F){if(re===-1)return Ne();A=re+Ce,re=V.indexOf(z,A),K=V.indexOf(S,A)}else if(K!==-1&&(K<re||re===-1))se.push(V.substring(A,K)),A=K+be,K=V.indexOf(S,A);else{if(re===-1)break;if(se.push(V.substring(A,re)),Pe(re+Ce),W&&(gt(),N))return Ne();if(I&&J.length>=I)return Ne(!0)}else for(ae=A,A++;;){if((ae=V.indexOf(k,ae+1))===-1)return pe||ie.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:J.length,index:A}),xe();if(ae===ee-1)return xe(V.substring(A,ae).replace(ce,k));if(k!==X||V[ae+1]!==X){if(k===X||ae===0||V[ae-1]!==X){K!==-1&&K<ae+1&&(K=V.indexOf(S,ae+1)),re!==-1&&re<ae+1&&(re=V.indexOf(z,ae+1));var ve=ue(re===-1?K:Math.min(K,re));if(V.substr(ae+1+ve,be)===S){se.push(V.substring(A,ae).replace(ce,k)),V[A=ae+1+ve+be]!==k&&(ae=V.indexOf(k,A)),K=V.indexOf(S,A),re=V.indexOf(z,A);break}var H=ue(re);if(V.substring(ae+1+H,ae+1+H+Ce)===z){if(se.push(V.substring(A,ae).replace(ce,k)),Pe(ae+1+H+Ce),K=V.indexOf(S,A),ae=V.indexOf(k,A),W&&(gt(),N))return Ne();if(I&&J.length>=I)return Ne(!0);break}ie.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:J.length,index:A}),ae++}}else ae++}return xe();function ne(Je){J.push(Je),ge=A}function ue(Je){var tt=0;if(Je!==-1){var it=V.substring(ae+1,Je);it&&it.trim()===""&&(tt=it.length)}return tt}function xe(Je){return pe||(Je===void 0&&(Je=V.substring(A)),se.push(Je),A=ee,ne(se),W&>()),Ne()}function Pe(Je){A=Je,ne(se),se=[],re=V.indexOf(z,A)}function Ne(Je){return{data:J,errors:ie,meta:{delimiter:S,linebreak:z,aborted:N,truncated:!!Je,cursor:ge+(me||0)}}}function gt(){Q(Ne()),J=[],ie=[]}},this.abort=function(){N=!0},this.getCharIndex=function(){return A}}function y(b){var k=b.data,S=i[k.workerId],z=!1;if(k.error)S.userError(k.error,k.file);else if(k.results&&k.results.data){var F={abort:function(){z=!0,x(k.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:E,resume:E};if(q(S.userStep)){for(var Q=0;Q<k.results.data.length&&(S.userStep({data:k.results.data[Q],errors:k.results.errors,meta:k.results.meta},F),!z);Q++);delete k.results}else q(S.userChunk)&&(S.userChunk(k.results,F,k.file),delete k.results)}k.finished&&!z&&x(k.workerId,k.results)}function x(b,k){var S=i[b];q(S.userComplete)&&S.userComplete(k),S.terminate(),delete i[b]}function E(){throw new Error("Not implemented.")}function $ (b){if(typeof b!="object"||b===null)return b;var k=Array.isArray(b)?[]:{};for(var S in b)k[S]= $ (b[S]);return k}function M(b,k){return function(){b.apply(k,arguments)}}function q(b){return typeof b=="function"}return r&&(s.onmessage=function(b){var k=b.data;if(l.WORKER_ID===void 0&&k&&(l.WORKER_ID=k.workerId),typeof k.input=="string")s.postMessage({workerId:l.WORKER_ID,results:l.parse(k.input,k.config),finished:!0});else if(s.File&&k.input instanceof File||k.input instanceof Object){var S=l.parse(k.input,k.config);S&&s.postMessage({workerId:l.WORKER_ID,results:S,finished:!0})}}),(h.prototype=Object.create(u.prototype)).constructor=h,(f.prototype=Object.create(u.prototype)).constructor=f,(g.prototype=Object.create(g.prototype)).constructor=g,(p.prototype=Object.create(u.prototype)).constructor=p,l})})(Lh);var
` ).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),s=i.substring(o+1).trim(),!(!n||e[n]&&wy[n])&&(n==="set-cookie"?e[n]?e[n].push(s):e[n]=[s]:e[n]=e[n]?e[n]+", "+s:s)}),e},Pc=Symbol("internals");function Bs(t){return t&&String(t).trim().toLowerCase()}function Qo(t){return t===!1||t==null?t:U.isArray(t)?t.map(Qo):String(t)}function Cy(t){const e=Object.create(null),n=/([^ \s ,;=]+) \s *(?:= \s *([^,;]+))?/g;let s;for(;s=n.exec(t);)e[s[1]]=s[2];return e}const Ey=t=>/^[-_a-zA-Z0-9^ ` | ~ , ! # $ % & ' * + . ] + $ / . test ( t . trim ( ) ) ; function xi ( t , e , n , s , o ) { if ( U . isFunction ( s ) ) return s . call ( this , e , n ) ; if ( o && ( e = n ) , ! ! U . isString ( e ) ) { if ( U . isString ( s ) ) return e . indexOf ( s ) !== - 1 ; if ( U . isRegExp ( s ) ) return s . test ( e ) } } function Ay ( t ) { return t . trim ( ) . toLowerCase ( ) . replace ( /([a-z\d])(\w*)/g , ( e , n , s ) => n . toUpperCase ( ) + s ) } function Sy ( t , e ) { const n = U . toCamelCase ( " " + e ) ; [ "get" , "set" , "has" ] . forEach ( s => { Object . defineProperty ( t , s + n , { value : function ( o , r , i ) { return this [ s ] . call ( this , e , o , r , i ) } , configurable : ! 0 } ) } ) } class Kr { constructor ( e ) { e && this . set ( e ) } set ( e , n , s ) { const o = this ; function r ( a , l , c ) { const u = Bs ( l ) ; if ( ! u ) throw new Error ( "header name must be a non-empty string" ) ; const h = U . findKey ( o , u ) ; ( ! h || o [ h ] === void 0 || c === ! 0 || c === void 0 && o [ h ] !== ! 1 ) && ( o [ h || l ] = Qo ( a ) ) } const i = ( a , l ) => U . forEach ( a , ( c , u ) => r ( c , u , l ) ) ; return U . isPlainObject ( e ) || e instanceof this . constructor ? i ( e , n ) : U . isString ( e ) && ( e = e . trim ( ) ) && ! Ey ( e ) ? i ( ky ( e ) , n ) : e != null && r ( n , e , s ) , this } get ( e , n ) { if ( e = Bs ( e ) , e ) { const s = U . findKey ( this , e ) ; if ( s ) { const o = this [ s ] ; if ( ! n ) return o ; if ( n === ! 0 ) return Cy ( o ) ; if ( U . isFunction ( n ) ) return n . call ( this , o , s ) ; if ( U . isRegExp ( n ) ) return n . exec ( o ) ; throw new TypeError ( "parser must be boolean|regexp|function" ) } } } has ( e , n ) { if ( e = Bs ( e ) , e ) { const s = U . findKey ( this , e ) ; return ! ! ( s && this [ s ] !== void 0 && ( ! n || xi ( this , this [ s ] , s , n ) ) ) } return ! 1 } delete ( e , n ) { const s = this ; let o = ! 1 ; function r ( i ) { if ( i = Bs ( i ) , i ) { const a = U . findKey ( s , i ) ; a && ( ! n || xi ( s , s [ a ] , a , n ) ) && ( delete s [ a ] , o = ! 0 ) } } return U . isArray ( e ) ? e . forEach ( r ) : r ( e ) , o } clear ( e ) { const n = Object . keys ( this ) ; let s = n . length , o = ! 1 ; for ( ; s -- ; ) { const r = n [ s ] ; ( ! e || xi ( this , this [ r ] , r , e , ! 0 ) ) && ( delete this [ r ] , o = ! 0 ) } return o } normalize ( e ) { const n = this , s = { } ; return U . forEach ( this , ( o , r ) => { const i = U . findKey ( s , r ) ; if ( i ) { n [ i ] = Qo ( o ) , delete n [ r ] ; return } const a = e ? Ay ( r ) : String ( r ) . trim ( ) ; a !== r && delete n [ r ] , n [ a ] = Qo ( o ) , s [ a ] = ! 0 } ) , this } concat ( ... e ) { return this . constructor . concat ( this , ... e ) } toJSON ( e ) { const n = Object . create ( null ) ; return U . forEach ( this , ( s , o ) => { s != null && s !== ! 1 && ( n [ o ] = e && U . isArray ( s ) ? s . join ( ", " ) : s ) } ) , n } [ Symbol . iterator ] ( ) { return Object . entries ( this . toJSON ( ) ) [ Symbol . iterator ] ( ) } toString ( ) { return Object . entries ( this . toJSON ( ) ) . map ( ( [ e , n ] ) => e + ": " + n ) . join ( `
` )}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const s=new this(e);return n.forEach(o=>s.set(o)),s}static accessor(e){const s=(this[Pc]=this[Pc]={accessors:{}}).accessors,o=this.prototype;function r(i){const a=Bs(i);s[a]||(Sy(o,i),s[a]=!0)}return U.isArray(e)?e.forEach(r):r(e),this}}Kr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);U.freezeMethods(Kr.prototype);U.freezeMethods(Kr);const en=Kr;function wi(t,e){const n=this||Qa,s=e||n,o=en.from(s.headers);let r=s.data;return U.forEach(t,function(a){r=a.call(n,r,o.normalize(),e?e.status:void 0)}),o.normalize(),r}function Wh(t){return!!(t&&t.__CANCEL__)}function Co(t,e,n){je.call(this,t??"canceled",je.ERR_CANCELED,e,n),this.name="CanceledError"}U.inherits(Co,je,{__CANCEL__:!0});function Ty(t,e,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?t(n):e(new je("Request failed with status code "+n.status,[je.ERR_BAD_REQUEST,je.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const My= $ t.isStandardBrowserEnv?function(){return{write:function(n,s,o,r,i,a){const l=[];l.push(n+"="+encodeURIComponent(s)),U.isNumber(o)&&l.push("expires="+new Date(o).toGMTString()),U.isString(r)&&l.push("path="+r),U.isString(i)&&l.push("domain="+i),a===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(n){const s=document.cookie.match(new RegExp("(^|; \\ s*)("+n+")=([^;]*)"));return s?decodeURIComponent(s[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function Dy(t){return/^([a-z][a-z \d + \- .]*:)? \/ \/ /i.test(t)}function Ly(t,e){return e?t.replace(/ \/ + $ /,"")+"/"+e.replace(/^ \/ +/,""):t}function Zh(t,e){return t&&!Dy(e)?Ly(t,e):e}const Oy= $ t.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let s;function o(r){let i=r;return e&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{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 s=o(window.location.href),function(i){const a=U.isString(i)?o(i):i;return a.protocol===s.protocol&&a.host===s.host}}():function(){return function(){return!0}}();function jy(t){const e=/^([-+ \w ]{1,25})(:? \/ \/ |:)/.exec(t);return e&&e[1]||""}function Ry(t,e){t=t||10;const n=new Array(t),s=new Array(t);let o=0,r=0,i;return e=e!==void 0?e:1e3,function(l){const c=Date.now(),u=s[r];i||(i=c),n[o]=l,s[o]=c;let h=r,f=0;for(;h!==o;)f+=n[h++],h=h%t;if(o=(o+1)%t,o===r&&(r=(r+1)%t),c-i<e)return;const g=u&&c-u;return g?Math.round(f*1e3/g):void 0}}function Ic(t,e){let n=0;const s=Ry(50,250);return o=>{const r=o.loaded,i=o.lengthComputable?o.total:void 0,a=r-n,l=s(a),c=r<=i;n=r;const u={loaded:r,total:i,progress:i?r/i:void 0,bytes:a,rate:l||void 0,estimated:l&&i&&c?(i-r)/l:void 0,event:o};u[e?"download":"upload"]=!0,t(u)}}const Py=typeof XMLHttpRequest<"u",Iy=Py&&function(t){return new Promise(function(n,s){let o=t.data;const r=en.from(t.headers).normalize(),i=t.responseType;let a;function l(){t.cancelToken&&t.cancelToken.unsubscribe(a),t.signal&&t.signal.removeEventListener("abort",a)}U.isFormData(o)&&( $ t.isStandardBrowserEnv|| $ t.isStandardBrowserWebWorkerEnv)&&r.setContentType(!1);let c=new XMLHttpRequest;if(t.auth){const g=t.auth.username||"",p=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";r.set("Authorization","Basic "+btoa(g+":"+p))}const u=Zh(t.baseURL,t.url);c.open(t.method.toUpperCase(),Vh(u,t.params,t.paramsSerializer),!0),c.timeout=t.timeout;function h(){if(!c)return;const g=en.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),m={data:!i||i==="text"||i==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:g,config:t,request:c};Ty(function(v){n(v),l()},function(v){s(v),l()
2023-06-24 15:18:52 +00:00
` +model_object.title+ `
installed ! ` ,4,!0),this.api_get_req("disk_usage").then(e=>{this.diskUsage=e})}else if(t.status==="failed"&&(console.log("Install failed"),this. $ refs.modelZoo)){const e=this. $ refs.modelZoo.findIndex(s=>s.model.path==t.model_url&&s.model.title==t.model_name&&this.configFile.binding_name==t.binding_folder),n=this.models[e];n&&(n.installing=!1,n.isInstalled=!1),console.error("Installation failed:",t.error),this. $ refs.toast.showToast( ` Model :
` +model_object.title+ `
2023-06-26 22:51:32 +00:00
failed to install ! ` ,4,!1),this.api_get_req("disk_usage").then(s=>{this.diskUsage=s})}},showAddModelDialog(){this. $ refs.addmodeldialog.showDialog("").then(()=>{console.log(this. $ refs.addmodeldialog.model_path);const t=this. $ refs.addmodeldialog.model_path; $ e.emit("install_model",{path:t},e=>{console.log("Model installation successful:",e)}),console.log(this. $ refs.addmodeldialog.model_path)})},closeAddModelDialog(){this.addModelDialogVisibility=!1},collapseAll(t){this.bec_collapsed=t,this.mzc_collapsed=t,this.pzc_collapsed=t,this.bzc_collapsed=t,this.pc_collapsed=t,this.mc_collapsed=t,this.sc_collapsed=t,this.mzdc_collapsed=t},fetchModels(){De.get("/get_available_models").then(t=>{this.models=t.data,this.models.sort((e,n)=>e.title.localeCompare(n.title)),this.fetchCustomModels()}).catch(t=>{console.log(t.message,"fetchModels")})},fetchCustomModels(){De.get("/list_models").then(t=>{for(let e=0;e<t.data.length;e++){const n=t.data[e];if(this.models.findIndex(o=>o.title==n)==-1){let o={};o.title=n,o.path=n,o.isCustomModel=!0,o.isInstalled=!0,this.models.push(o)}}}).catch(t=>{console.log(t.message,"fetchCustomModels")})},async onPersonalitySelected(t){if(console.log("on pers",t),this.isLoading&&this. $ refs.toast.showToast("Loading... please wait",4,!1),this.isLoading=!0,console.log("ppa",t),t){if(t.selected){this. $ refs.toast.showToast("Personality already selected",4,!0),this.isLoading=!1;return}if(t.isMounted&&this.configFile.personalities.includes(t.personality.full_path)){const e=await this.select_personality(t);e&&e.status&&e.active_personality_id>-1?this. $ refs.toast.showToast( ` Selected personality :
2023-06-24 15:18:52 +00:00
` +t.name,4,!0):this. $ refs.toast.showToast( ` Error on select personality :
` +t.name,4,!1),this.isLoading=!1}else this.onPersonalityMounted(t);fe(()=>{we.replace()})}},onSelected(t){this.isLoading&&this. $ refs.toast.showToast("Loading... please wait",4,!1),t&&(t.isInstalled?this.configFile.model_name!=t.title&&(this.update_model(t.title),this.configFile.model_name=t.title,this. $ refs.toast.showToast( ` Selected model :
` +t.title,4,!0),this.settingsChanged=!0,this.isModelSelected=!0):this. $ refs.toast.showToast( ` Model :
` +t.title+ `
is not installed ` ,4,!1),fe(()=>{we.replace()}))},onCopy(t){let e;t.model.isCustomModel?e= ` Model name : $ { t . title }
File size : $ { t . fileSize }
Manually downloaded model ` :e= ` Model name : $ { t . title }
File size : $ { t . fileSize }
Download : $ { t . path }
License : $ { t . license }
Owner : $ { t . owner }
Website : $ { t . owner _link }
2023-06-26 22:51:32 +00:00
Description : $ { t . description } ` ,this. $ refs.toast.showToast("Copied model info to clipboard!",4,!0),navigator.clipboard.writeText(e.trim())},onCopyLink(t){this. $ refs.toast.showToast("Copied link to clipboard!",4,!0),navigator.clipboard.writeText(t.path)},onCancelInstall(){const t=this.addModel;this.modelDownlaodInProgress=!1,this.addModel={},this. $ refs.toast.showToast("Model installation aborted",4,!1), $ e.emit("cancel_install",{model_name:t.model_name,binding_folder:t.binding_folder,model_url:t.model_url})},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=s=>{if(console.log("received something"),s.status&&s.progress<=100){if(console.log("Progress",s),t.progress=s.progress,t.speed=s.speed,t.total_size=s.total_size,t.downloaded_size=s.downloaded_size,t.start_time=s.start_time,t.installing=!0,t.progress==100){const o=this.models.findIndex(r=>r.path===e);this.models[o].isInstalled=!0,this.showProgress=!1,t.installing=!1,console.log("Received succeeded"), $ e.off("install_progress",n),console.log("Installed successfully"),this. $ refs.toast.showToast( ` Model :
2023-06-24 15:18:52 +00:00
` +t.title+ `
2023-06-26 22:51:32 +00:00
installed ! ` ,4,!0),this.api_get_req("disk_usage").then(r=>{this.diskUsage=r})}}else $ e.off("install_progress",n),console.log("Install failed"),t.installing=!1,this.showProgress=!1,console.error("Installation failed:",s.error),this. $ refs.toast.showToast( ` Model :
2023-06-24 15:18:52 +00:00
` +t.title+ `
2023-06-26 22:51:32 +00:00
failed to install ! ` ,4,!1),this.api_get_req("disk_usage").then(o=>{this.diskUsage=o})}; $ e.on("install_progress",n), $ e.emit("install_model",{path:e}),console.log("Started installation, please wait")},onInstallAddModel(){if(!this.addModel.url){this. $ refs.toast.showToast("Link is empty",4,!1);return}let t=this.addModel.url;this.addModel.progress=0,console.log("installing..."),console.log("value ",this.addModel.url),this.modelDownlaodInProgress=!0;const e=n=>{console.log("received something"),n.status&&n.progress<=100?(console.log("Progress",n),this.addModel=n,this.addModel.url=t,this.modelDownlaodInProgress=!0,this.addModel.progress==100&&(this.modelDownlaodInProgress=!1,console.log("Received succeeded"), $ e.off("install_progress",e),console.log("Installed successfully"),this.addModel={},this. $ refs.toast.showToast( ` Model :
2023-06-24 15:18:52 +00:00
` +this.addModel.model_name+ `
2023-06-26 22:51:32 +00:00
installed ! ` ,4,!0),this.api_get_req("disk_usage").then(s=>{this.diskUsage=s}))):( $ e.off("install_progress",e),console.log("Install failed"),this.modelDownlaodInProgress=!1,console.error("Installation failed:",n.error),this. $ refs.toast.showToast( ` Model :
2023-06-24 15:18:52 +00:00
` +this.addModel.model_name+ `
2023-06-26 22:51:32 +00:00
failed to install ! ` ,4,!1),this.api_get_req("disk_usage").then(s=>{this.diskUsage=s}))}; $ e.on("install_progress",e), $ e.emit("install_model",{path:t}),console.log("Started installation, please wait")},uploadLocalModel(){if(this.uploadData.length==0){this. $ refs.toast.showToast("No files to upload",4,!1);return}let t=this.addModel.url;this.addModel.progress=0,console.log("installing..."),console.log("value ",this.addModel.url),this.modelDownlaodInProgress=!0;const e=n=>{console.log("received something"),n.status&&n.progress<=100?(console.log("Progress",n),this.addModel=n,this.addModel.url=t,this.modelDownlaodInProgress=!0,this.addModel.progress==100&&(this.modelDownlaodInProgress=!1,console.log("Received succeeded"), $ e.off("progress",e),console.log("Installed successfully"),this.addModel={},this. $ refs.toast.showToast( ` Model :
` +this.addModel.model_name+ `
installed ! ` ,4,!0),this.api_get_req("disk_usage").then(s=>{this.diskUsage=s}))):( $ e.off("progress",e),console.log("Install failed"),this.modelDownlaodInProgress=!1,console.error("Installation failed:",n.error),this. $ refs.toast.showToast( ` Model :
` +this.addModel.model_name+ `
failed to install ! ` ,4,!1),this.api_get_req("disk_usage").then(s=>{this.diskUsage=s}))}; $ e.on("progress",e),console.log("Started installation, please wait")},setFileList(t){this.uploadData=t.target.files,console.log("set file list",this.uploadData)},onUninstall(t){this. $ refs.yesNoDialog.askQuestion( ` Are you sure you want to delete this model ?
[ ` +t.title+"]","Yes","Cancel").then(e=>{if(e){console.log("uninstalling model...");const n=s=>{if(console.log("uninstalling res",s),s.status){console.log("uninstalling success",s),t.uninstalling=!1, $ e.off("install_progress",n),this.showProgress=!1;const o=this.models.findIndex(r=>r.path===t.path);this.models[o].isInstalled=!1,t.model.isCustomModel&&(this.models=this.models.filter(r=>r.title!==t.title)),this. $ refs.toast.showToast( ` Model :
2023-06-24 15:18:52 +00:00
` +t.title+ `
2023-06-26 22:51:32 +00:00
was uninstalled ! ` ,4,!0),this.api_get_req("disk_usage").then(r=>{this.diskUsage=r})}else console.log("uninstalling failed",s),t.uninstalling=!1,this.showProgress=!1, $ e.off("install_progress",n),console.error("Uninstallation failed:",message.error),this. $ refs.toast.showToast( ` Model :
2023-06-24 15:18:52 +00:00
` +t.title+ `
2023-06-26 22:51:32 +00:00
failed to uninstall ! ` ,4,!1),this.api_get_req("disk_usage").then(o=>{this.diskUsage=o})}; $ e.on("install_progress",n), $ e.emit("uninstall_model",{path:t.path})}})},onSelectedBinding(t){if(!t.binding.installed){this. $ refs.toast.showToast( ` Binding is not installed :
2023-06-24 15:18:52 +00:00
` +t.binding.name,4,!1);return}this.configFile.binding_name!=t.binding.folder&&this.update_binding(t.binding.folder)},onInstallBinding(t){this.configFile.binding_name!=t.binding.folder&&this.update_binding(t.binding.folder)},onReinstallBinding(t){this.isLoading=!0,De.post("/reinstall_binding",{name:t.binding.folder}).then(e=>{if(e)return this.isLoading=!1,console.log("reinstall_binding",e),e.data.status?this. $ refs.toast.showToast("Reinstalled binding successfully!",4,!0):this. $ refs.toast.showToast("Could not reinstall binding",4,!1),e.data;this.isLoading=!1}).catch(e=>(this.isLoading=!1,this. $ refs.toast.showToast( ` Could not reinstall binding
` +e.message,4,!1),{status:!1}))},onSettingsBinding(t){try{this.isLoading=!0,De.get("/get_active_binding_settings").then(e=>{this.isLoading=!1,e&&(console.log("binding sett",e),e.data&&Object.keys(e.data).length>0?this. $ refs.universalForm.showForm(e.data,"Binding settings - "+t.binding.name,"Save changes","Cancel").then(n=>{try{De.post("/set_active_binding_settings",n).then(s=>{s&&s.data?(console.log("binding set with new settings",s.data),this. $ refs.toast.showToast("Binding settings updated successfully!",4,!0)):(this. $ refs.toast.showToast( ` Did not get binding settings responses .
` +s,4,!1),this.isLoading=!1)})}catch(s){this. $ refs.toast.showToast( ` Did not get binding settings responses .
Endpoint error : ` +s.message,4,!1),this.isLoading=!1}}):(this. $ refs.toast.showToast("Binding has no settings",4,!1),this.isLoading=!1))})}catch(e){this.isLoading=!1,this. $ refs.toast.showToast("Could not open binding settings. Endpoint error: "+e.message,4,!1)}},onSettingsPersonality(t){try{this.isLoading=!0,De.get("/get_active_personality_settings").then(e=>{this.isLoading=!1,e&&(console.log("pers sett",e),e.data&&Object.keys(e.data).length>0?this. $ refs.universalForm.showForm(e.data,"Personality settings - "+t.personality.name,"Save changes","Cancel").then(n=>{try{De.post("/set_active_personality_settings",n).then(s=>{s&&s.data?(console.log("personality set with new settings",s.data),this. $ refs.toast.showToast("Personality settings updated successfully!",4,!0)):(this. $ refs.toast.showToast( ` Did not get Personality settings responses .
` +s,4,!1),this.isLoading=!1)})}catch(s){this. $ refs.toast.showToast( ` Did not get Personality settings responses .
Endpoint error : ` +s.message,4,!1),this.isLoading=!1}}):(this. $ refs.toast.showToast("Personality has no settings",4,!1),this.isLoading=!1))})}catch(e){this.isLoading=!1,this. $ refs.toast.showToast("Could not open personality settings. Endpoint error: "+e.message,4,!1)}},onMessageBoxOk(){console.log("OK button clicked")},refresh(){this.api_get_req("list_models").then(t=>{this.modelsArr=t,this.modelsArr.sort()}),this.api_get_req("list_personalities_categories").then(t=>{this.persCatgArr=t,this.persCatgArr.sort()}),this.api_get_req("get_config").then(t=>{this.getPersonalitiesArr().then(()=>{this.getMountedPersonalities()}),console.log("Received config"),this.configFile=t,this.models.forEach(e=>{e.title==t.model_name?e.selected=!0:e.selected=!1})}).then(()=>{this.api_get_req("get_current_personality_path_infos").then(t=>{this.configFile.personality_language=t.personality_language,this.configFile.personality_category=t.personality_category,this.configFile.personality_folder=t.personality_name,console.log("received infos")})}),this.api_get_req("list_personalities").then(t=>{this.persArr=t,this.persArr.sort(),console.log( ` Listed personalities :
$ { t } ` )}),this.api_get_req("disk_usage").then(t=>{this.diskUsage=t}),this.api_get_req("ram_usage").then(t=>{this.ramUsage=t}),this.fetchModels(),this.api_get_req("list_bindings"),then(t=>{this.bindings=t,this.bindings.sort((e,n)=>e.name.localeCompare(n.name))})},toggleAccordion(){this.showAccordion=!this.showAccordion},update_setting(t,e,n){this.isLoading=!0;const s={setting_name:t,setting_value:e};De.post("/update_setting",s).then(o=>{if(o)return this.isLoading=!1,console.log("update_setting",o),n!==void 0&&n(o),o.data;this.isLoading=!1}).catch(o=>(this.isLoading=!1,{status:!1}))},update_binding(t){this.isLoading=!0,this.update_setting("binding_name",t,e=>{const n=this.bindings.findIndex(o=>o.folder==t),s=this.bindings[n];s&&(s.installed=!0),this. $ refs.toast.showToast("Binding changed.",4,!0),this.settingsChanged=!0,this.isLoading=!1,this.update_model(null),this.configFile.model_name=null,this.refresh(),fe(()=>{we.replace()})})},update_model(t){t||(this.isModelSelected=!1),this.isLoading=!0,this.update_setting("model_name",t,e=>{this.isLoading=!1})},applyConfiguration(){this.isLoading=!0,De.post("/apply_settings").then(t=>{this.isLoading=!1,t.data.status?(this. $ refs.toast.showToast("Configuration changed successfully.",4,!0),this.settingsChanged=!1):this. $ refs.toast.showToast("Configuration change failed.",4,!1),fe(()=>{we.replace()})})},save_configuration(){this.showConfirmation=!1,De.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 ?
2023-06-26 22:51:32 +00:00
This will delete all your configurations and get back to default configuration . ` ).then(t=>{t&&De.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 De.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=await this.api_get_req("get_config"),n=Object.keys(t);for(let s=0;s<n.length;s++){const o=n[s],r=t[o],i=Object.keys(r);for(let a=0;a<i.length;a++){const l=i[a],u=r[l].map(h=>{const f=e.personalities.includes(o+"/"+l+"/"+h.folder);let g={};return g=h,g.category=l,g.language=o,g.full_path=o+"/"+l+"/"+h.folder,g.isMounted=f,g});this.personalities.length==0?this.personalities=u:this.personalities=this.personalities.concat(u)}}this.personalities.sort((s,o)=>s.name.localeCompare(o.name)),this.personalitiesFiltered=this.personalities.filter(s=>s.category===this.configFile.personality_category&&s.language===this.configFile.personality_language),this.personalitiesFiltered.sort(),console.log("per filtered",this.personalitiesFiltered),this.isLoading=!1},async filterPersonalities(){if(!this.searchPersonality){this.personalitiesFiltered=this.personalities.filter(n=>n.category===this.configFile.personality_category&&n.language===this.configFile.personality_language),this.personalitiesFiltered.sort(),this.searchPersonalityInProgress=!1;return}const t=this.searchPersonality.toLowerCase(),e=this.personalities.filter(n=>{if(n.name.toLowerCase().includes(t)||n.description.toLowerCase().includes(t)||n.full_path.toLowerCase().includes(t))return n});e.length>0?this.personalitiesFiltered=e.sort():(this.personalitiesFiltered=this.personalities.filter(n=>n.category===this.configFile.personality_category&&n.language===this.configFile.personality_language),this.personalitiesFiltered.sort()),this.searchPersonalityInProgress=!1},computedFileSize(t){return Ft(t)},async mount_personality(t){if(!t)return{status:!1,error:"no personality - mount_personality"};try{const e={language:t.language,category:t.category,folder:t.folder},n=await De.post("/mount_personality",e);if(n)return n.data}catch(e){console.log(e.message,"mount_personality - settings");return}},async unmount_personality(t){if(!t)return{status:!1,error:"no personality - unmount_personality"};const e={language:t.language,category:t.category,folder:t.folder};try{const n=await De.post("/unmount_personality",e);if(n)return n.data}catch(n){console.log(n.message,"unmount_personality - settings");return}},async select_personality(t){if(!t)return{status:!1,error:"no personality - select_personality"};console.log("select pers",t);const n={id:this.configFile.personalities.findIndex(s=>s===t.full_path)};try{const s=await De.post("/select_personality",n);if(s){this.configFile=await this.api_get_req("get_config");let o=await this.api_get_req("get_current_personality_path_infos");return this.configFile.personality_language=o.personality_language,this.configFile.personality_category=o.personality_category,this.configFile.personality_folder=o.personality_name,s.data}}catch(s){console.log(s.message,"select_personality - settings");return}},async mountPersonality(t){if(this.isLoading=!0,console.log("mount pers",t),!t)return;if(this.configFile.personalities.includes(t.personality.full_path)){this.isLoading=!1,this. $ refs.toast.showToast("Personality already mounted",4,!1);return}const e=await this.mount_personality(t.personality);console.log("mount_personality res",e),e&&e.status&&e.active_personality_id>-1&&e.personalities.includes(t.personality.full_path)?(this.configFile.personalities=e.personalities,this. $ refs.toast.showToast("Personality mounted",4,!0),t.isMounted=!0,(await this.select_personal
2023-06-24 15:18:52 +00:00
` +t.personality.name,4,!0),this.getMountedPersonalities()):(t.isMounted=!1,this. $ refs.toast.showToast( ` Could not mount personality
Error : ` +e.error+ `
Response :
` +e,4,!1)),this.isLoading=!1},async unmountPersonality(t){if(this.isLoading=!0,!t)return;const e=await this.unmount_personality(t.personality||t);if(e.status){this.configFile.personalities=e.personalities,this. $ refs.toast.showToast("Personality unmounted",4,!0);const n=this.personalities.findIndex(a=>a.full_path==t.full_path),s=this.personalitiesFiltered.findIndex(a=>a.full_path==t.full_path),o=this. $ refs.personalitiesZoo.findIndex(a=>a.full_path==t.full_path);console.log("ppp",this.personalities[n]),this.personalities[n].isMounted=!1,s>-1&&(this.personalitiesFiltered[s].isMounted=!1),o>-1&&(this. $ refs.personalitiesZoo[o].isMounted=!1),this.getMountedPersonalities();const r=this.mountedPersArr[this.mountedPersArr.length-1];console.log(r,this.mountedPersArr.length),(await this.select_personality(t.personality)).status&&this. $ refs.toast.showToast( ` Selected personality :
` +r.name,4,!0)}else this. $ refs.toast.showToast( ` Could not unmount personality
2023-06-26 22:51:32 +00:00
Error : ` +e.error,4,!1);this.isLoading=!1},getMountedPersonalities(){let t=[];console.log(this.configFile.personalities.length);for(let e=0;e<this.configFile.personalities.length;e++){const n=this.configFile.personalities[e],s=this.personalities.findIndex(r=>r.full_path==n);console.log("index",s),console.log("i:",e);const o=this.personalities[s];o?t.push(o):t.push(this.personalities[this.personalities.findIndex(r=>r.full_path=="english/generic/lollms")])}this.mountedPersArr=[],this.mountedPersArr=t,console.log("getMountedPersonalities",t),fe(()=>{})},onPersonalityMounted(t){console.log("on sel ",t),this.configFile.personalities.includes(t.full_path)?this.configFile.personalities.length==1?this. $ refs.toast.showToast("Can't unmount last personality",4,!1):this.unmountPersonality(t):this.mountPersonality(t)},personalityImgPlacehodler(t){t.target.src=xs},searchPersonality_func(){clearTimeout(this.searchPersonalityTimer),this.searchPersonality&&(this.searchPersonalityInProgress=!0,setTimeout(this.filterPersonalities,this.searchPersonalityTimerInterval))}},async mounted(){this.isLoading=!0,fe(()=>{we.replace()}),this.configFile=await this.api_get_req("get_config");let t=await this.api_get_req("get_current_personality_path_infos");this.configFile.personality_language=t.personality_language,this.configFile.personality_category=t.personality_category,this.configFile.personality_folder=t.personality_name,this.configFile.model_name&&(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"),this.bindingsArr.sort((e,n)=>e.name.localeCompare(n.name)),this.modelsArr.sort(),this.persLangArr.sort(),this.persCatgArr.sort(),this.persArr.sort(),this.langArr.sort(),await this.getPersonalitiesArr(),this.bindings=await this.api_get_req("list_bindings"),this.bindings.sort((e,n)=>e.name.localeCompare(n.name)),this.isLoading=!1,this.diskUsage=await this.api_get_req("disk_usage"),this.ramUsage=await this.api_get_req("ram_usage"),this.vramUsage=await this.api_get_req("vram_usage"),this.getMountedPersonalities(),this.isMounted=!0},activated(){},computed:{disk_available_space(){return this.computedFileSize(this.diskUsage.available_space)},disk_binding_models_usage(){return this.computedFileSize(this.diskUsage.binding_models_usage)},disk_percent_usage(){return this.diskUsage.percent_usage},disk_total_space(){return this.computedFileSize(this.diskUsage.total_space)},ram_available_space(){return this.computedFileSize(this.ramUsage.available_space)},ram_usage(){return this.computedFileSize(this.ramUsage.ram_usage)},ram_percent_usage(){return this.ramUsage.percent_usage},ram_total_space(){return this.computedFileSize(this.ramUsage.total_space)},vram_available_space(){return this.computedFileSize(this.vramUsage.gpu_0_total_vram-this.vramUsage.gpu_0_used_vram)},vram_usage(){return this.computedFileSize(this.vramUsage.gpu_0_used_vram)},vram_percent_usage(){return(this.vramUsage.gpu_0_used_vram/this.vramUsage.gpu_0_total_vram*100).toFixed(2)},vram_total_space(){return this.computedFileSize(this.vramUsage.gpu_0_total_vram)},imgBinding(){if(this.isMounted)try{return this. $ refs.bindingZoo[this. $ refs.bindingZoo.findIndex(t=>t.binding.folder==this.configFile.binding_name)]. $ refs.imgElement.src}catch{return defaultImgPlaceholder}},imgModel(){if(this.isMounted)try{return this. $ refs.modelZoo[this. $ refs.modelZoo.findIndex(t=>t.title==this.configFile.model_name)]. $ refs.imgElement.src}catch{return aa}},binding_name(){if(!this.isMounted)return;const t=this.bindingsArr.findIndex(e=>e.folder===this.configFile.binding_name);if(t>-1)return this.bindingsArr[t].name},active_pesonality(){if(!this.isMounted)return;const t=this.personalities.findIndex(e=>e.full_path===this.configFile.personalities[this.configFile.active_personality_
2023-06-24 15:18:52 +00:00
You need to apply changes before you leave , or else . ` ,"Apply configuration","Cancel")&&this.applyConfiguration(),!1;if(!this.isModelSelected)return await this. $ refs.yesNoDialog.askQuestion( ` Did You forgot to select model ?
2023-06-26 22:51:32 +00:00
You need to select model before you leave , or else . ` ,"Ok","Cancel"),!1}},ye=t=>(vo("data-v-2a710689"),t=t(),xo(),t),_k={class:"container overflow-y-scroll flex flex-col no-scrollbar shadow-lg p-10 pt-0"},yk={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"},bk={key:0,class:"flex gap-3 flex-1 items-center duration-75"},vk=ye(()=>d("i",{"data-feather":"x"},null,-1)),xk=[vk],wk=ye(()=>d("i",{"data-feather":"check"},null,-1)),kk=[wk],Ck={key:1,class:"flex gap-3 flex-1 items-center"},Ek=ye(()=>d("i",{"data-feather":"save"},null,-1)),Ak=[Ek],Sk=ye(()=>d("i",{"data-feather":"refresh-ccw"},null,-1)),Tk=[Sk],Mk=ye(()=>d("i",{"data-feather":"list"},null,-1)),Dk=[Mk],Lk={class:"flex gap-3 flex-1 items-center justify-end"},Ok={class:"flex gap-3 items-center"},jk={key:0,class:"flex gap-3 items-center"},Rk=ye(()=>d("i",{"data-feather":"check"},null,-1)),Pk=[Rk],Ik={key:1,role:"status"},Fk=ye(()=>d("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"},[d("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:"currentColor"}),d("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1)), $ k=ye(()=>d("span",{class:"sr-only"},"Loading...",-1)),qk=[Fk, $ k],zk={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Bk={class:"flex flex-row p-3"},Nk=ye(()=>d("i",{"data-feather":"chevron-right",class:"mr-2 flex-shrink-0"},null,-1)),Uk=ye(()=>d("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," System status",-1)),Hk=ye(()=>d("div",{class:"mr-2"},"|",-1)),Vk={class:"text-base font-semibold cursor-pointer select-none items-center"},Gk={class:"flex gap-2 items-center"},Kk=wo('<svg aria-hidden="true" class="w-10 h-10 fill-secondary" viewBox="0 -3 82 66" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-2a710689><path d="M 5.9133057,14.000286 H 70.974329 a 8.9999999,8.9999999 0 0 1 8.999987,8.999998 V 47.889121 H 5.9133057 Z" style="fill:none;stroke:currentColor;stroke-width:2.5;stroke-opacity:1;" id="path1116" data-v-2a710689></path><path d="m 5.9133057,28.634282 h -2.244251 v -9.367697 h 2.244251 z" style="fill:none;stroke:currentColor;stroke-width:2.5;stroke-opacity:1;" id="path1118" data-v-2a710689></path><path d="M 5.9133057,42.648417 H 3.6690547 V 33.28072 h 2.244251 z" style="fill:none;stroke:currentColor;stroke-width:2.5;stroke-opacity:1;" id="path1120" data-v-2a710689></path><path d="m 5.9133057,47.889121 v 4.42369" style="fill:none;stroke:currentColor;stroke-width:2.5;stroke-opacity:1;" id="path1122" data-v-2a710689></path><path d="M 5.9133057,14.000286 H 2.3482707" style="fill:none;stroke:currentColor;stroke-width:2.5;stroke-opacity:1;" id="path1124" data-v-2a710689></path><path d="M 2.3482707,14.000286 V 10.006515" style="fill:none;stroke:currentColor;stroke-width:2.5;stroke-opacity:1;" id="path1126" data-v-2a710689></path><path d="m 74.31472,30.942798 a 11.594069,11.594069 0 0 0 -23.188136,0 11.594069,11.594069 0 0 0 23.188136,0 z" style="fill:none;stroke:currentColor;s
` ,SB="∄",TB="∄",MB="𝔑 ",DB="𝔫 ",LB="≧̸",OB="≱",jB="≱",RB="≧̸",PB="⩾̸",IB="⩾̸",FB="⋙̸", $ B="≵",qB="≫⃒",zB="≯",BB="≯",NB="≫̸",UB="↮",HB="⇎",VB="⫲",GB="∋",KB="⋼",WB="⋺",ZB="∋",JB="Њ",YB="њ",QB="↚",XB="⇍",eN="‥",tN="≦̸",nN="≰",sN="↚",oN="⇍",rN="↮",iN="⇎",aN="≰",lN="≦̸",cN="⩽̸",uN="⩽̸",dN="≮",hN="⋘̸",fN="≴",pN="≪⃒",gN="≮",mN="⋪",_N="⋬",yN="≪̸",bN="∤",vN=" ",xN=" ",wN="𝕟 ",kN="ℕ ",CN="⫬",EN="¬",AN="≢",SN="≭",TN="∦",MN="∉",DN="≠",LN="≂̸",ON="∄",jN="≯",RN="≱",PN="≧̸",IN="≫̸",FN="≹", $ N="⩾̸",qN="≵",zN="≎̸",BN="≏̸",NN="∉",UN="⋵̸",HN="⋹̸",VN="∉",GN="⋷",KN="⋶",WN="⧏̸",ZN="⋪",JN="⋬",YN="≮",QN="≰",XN="≸",eU="≪̸",tU="⩽̸",nU="≴",sU="⪢̸",oU="⪡̸",rU="∌",iU="∌",aU="⋾",lU="⋽",cU="⊀",uU="⪯̸",dU="⋠",hU="∌",fU="⧐̸",pU="⋫",gU="⋭",mU="⊏̸",_U="⋢",yU="⊐̸",bU="⋣",vU="⊂⃒",xU="⊈",wU="⊁",kU="⪰̸",CU="⋡",EU="≿̸",AU="⊃⃒",SU="⊉",TU="≁",MU="≄",DU="≇",LU="≉",OU="∤",jU="∦",RU="∦",PU="⫽⃥",IU="∂̸",FU="⨔", $ U="⊀",qU="⋠",zU="⊀",BU="⪯̸",NU="⪯̸",UU="⤳̸",HU="↛",VU="⇏",GU="↝̸",KU="↛",WU="⇏",ZU="⋫",JU="⋭",YU="⊁",QU="⋡",XU="⪰̸",eH="𝒩 ",tH="𝓃 ",nH="∤",sH="∦",oH="≁",rH="≄",iH="≄",aH="∤",lH="∦",cH="⋢",uH="⋣",dH="⊄",hH="⫅̸",fH="⊈",pH="⊂⃒",gH="⊈",mH="⫅̸",_H="⊁",yH="⪰̸",bH="⊅",vH="⫆̸",xH="⊉",wH="⊃⃒",kH="⊉",CH="⫆̸",EH="≹",AH="Ñ",SH="ñ",TH="≸",MH="⋪",DH="⋬",LH="⋫",OH="⋭",jH="Ν ",RH="ν ",PH="#",IH="№",FH=" ", $ H="≍⃒",qH="⊬",zH="⊭",BH="⊮",NH="⊯",UH="≥⃒",HH=">⃒",VH="⤄",GH="⧞",KH="⤂",WH="≤⃒",ZH="<⃒",JH="⊴⃒",YH="⤃",QH="⊵⃒",XH="∼⃒",eV="⤣",tV="↖",nV="⇖",sV="↖",oV="⤧",rV="Ó",iV="ó",aV="⊛",lV="Ô",cV="ô",uV="⊚",dV="О ",hV="о ",fV="⊝",pV="Ő",gV="ő",mV="⨸",_V="⊙",yV="⦼",bV="Œ",vV="œ",xV="⦿",wV="𝔒 ",kV="𝔬 ",CV="˛ ",EV="Ò",AV="ò",SV="⧁",TV="⦵",MV="Ω",DV="∮",LV="↺",OV="⦾",jV="⦻",RV="‾",PV="⧀",IV="Ō",FV="ō", $ V="Ω",qV="ω",zV="Ο ",BV="ο ",NV="⦶",UV="⊖",HV="𝕆 ",VV="𝕠 ",GV="⦷",KV="“",WV="‘ ",ZV="⦹",JV="⊕",YV="↻",QV="⩔",XV="∨ ",eG="⩝",tG="ℴ ",nG="ℴ ",sG="ª",oG="º",rG="⊶",iG="⩖",aG="⩗",lG="⩛",cG="Ⓢ",uG="𝒪 ",dG="ℴ ",hG="Ø",fG="ø",pG="⊘",gG="Õ",mG="õ",_G="⨶",yG="⨷",bG="⊗",vG="Ö",xG="ö",wG="⌽",kG="‾",CG="⏞",EG="⎴",AG="⏜",SG="¶",TG="∥",MG="∥",DG="⫳",LG="⫽",OG="∂",jG="∂",RG="П",PG="п",IG="%",FG=".", $ G="‰",qG="⊥",zG="‱",BG="𝔓 ",NG="𝔭 ",UG="Φ",HG="φ",VG="ϕ",GG="ℳ ",KG="☎",WG="Π",ZG="π",JG="⋔",YG="ϖ",QG="ℏ",XG="ℎ ",eK="ℏ",tK="⨣",nK="⊞",sK="⨢",oK="+",rK="∔",iK="⨥",aK="⩲",lK="±",cK="±",uK="⨦",dK="⨧",hK="±",fK="ℌ ",pK="⨕",gK="𝕡 ",mK="ℙ ",_K="£",yK="⪷",bK="⪻",vK="≺",xK="≼",wK="⪷",kK="≺",CK="≼",EK="≺",AK="⪯",SK="≼",TK="≾",MK="⪯",DK="⪹",LK="⪵",OK="⋨",jK="⪯",RK="⪳",PK="≾",IK="′ ",FK="″", $ K="ℙ ",qK="⪹",zK="⪵",BK="⋨",NK="∏",UK="∏",HK="⌮",VK="⌒",GK="⌓",KK="∝",WK="∝",ZK="∷",JK="∝",YK="≾",QK="⊰",XK="𝒫 ",eW="𝓅 ",tW="Ψ",nW="ψ",sW=" ",oW="𝔔 ",rW="𝔮 ",iW="⨌",aW="𝕢 ",lW="ℚ ",cW="⁗",uW="𝒬 ",dW="𝓆 ",hW="ℍ ",fW="⨖",pW="?",gW="≟",mW='"',_W='"',yW="⇛",bW="∽̱",vW="Ŕ",xW="ŕ",wW="√",kW="⦳",CW="⟩",EW="⟫",AW="⦒",SW="⦥",TW="⟩",MW="»",DW="⥵",LW="⇥",OW="⤠",jW="⤳",RW="→",PW="↠",IW="⇒",FW="⤞", $ W="↪",qW="↬",zW="⥅",BW="⥴",NW="⤖",UW="↣",HW="↝",VW="⤚",GW="⤜",KW="∶ ",WW="ℚ ",ZW="⤍",JW="⤏",YW="⤐",QW="❳ ",XW="}",eZ="]",tZ="⦌",nZ="⦎",sZ="⦐",oZ="Ř",rZ="ř",iZ="Ŗ",aZ="ŗ",lZ="⌉",cZ="}",uZ="Р ",dZ="р ",hZ="⤷",fZ="⥩",pZ="”",gZ="”",mZ="↳",_Z="ℜ ",yZ="ℛ ",bZ="ℜ ",vZ="ℝ ",xZ="ℜ ",wZ="▭",kZ="®",CZ="®",EZ="∋",AZ="⇋",SZ="⥯",TZ="⥽",MZ="⌋",DZ="𝔯 ",LZ="ℜ ",OZ="⥤",jZ="⇁",RZ="⇀",PZ="⥬",IZ="Ρ ",FZ="ρ ", $ Z="ϱ ",qZ="⟩",zZ="⇥",BZ="→",NZ="→
` ," "],Aie=["{","}","|"," \\ ","^"," ` "].concat(Eie),Sie=[" '"].concat(Aie),Jc=["%","/","?",";","#"].concat(Sie),Yc=["/","?","#"],Tie=255,Qc=/^[+a-z0-9A-Z_-]{0,63}$/,Mie=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Xc={javascript:!0,"javascript:":!0},eu={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Die(t,e){if(t&&t instanceof pr)return t;var n=new pr;return n.parse(t,e),n}pr.prototype.parse=function(t,e){var n,s,o,r,i,a=t;if(a=a.trim(),!e&&t.split("#").length===1){var l=Cie.exec(a);if(l)return this.pathname=l[1],l[2]&&(this.search=l[2]),this}var c=wie.exec(a);if(c&&(c=c[0],o=c.toLowerCase(),this.protocol=c,a=a.substr(c.length)),(e||c||a.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=a.substr(0,2)==="//",i&&!(c&&Xc[c])&&(a=a.substr(2),this.slashes=!0)),!Xc[c]&&(i||c&&!eu[c])){var u=-1;for(n=0;n<Yc.length;n++)r=a.indexOf(Yc[n]),r!==-1&&(u===-1||r<u)&&(u=r);var h,f;for(u===-1?f=a.lastIndexOf("@"):f=a.lastIndexOf("@",u),f!==-1&&(h=a.slice(0,f),a=a.slice(f+1),this.auth=h),u=-1,n=0;n<Jc.length;n++)r=a.indexOf(Jc[n]),r!==-1&&(u===-1||r<u)&&(u=r);u===-1&&(u=a.length),a[u-1]===":"&&u--;var g=a.slice(0,u);a=a.slice(u),this.parseHost(g),this.hostname=this.hostname||"";var p=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!p){var m=this.hostname.split(/\./);for(n=0,s=m.length;n<s;n++){var w=m[n];if(w&&!w.match(Qc)){for(var v="",y=0,x=w.length;y<x;y++)w.charCodeAt(y)>127?v+="x":v+=w[y];if(!v.match(Qc)){var E=m.slice(0,n),$=m.slice(n+1),M=w.match(Mie);M&&(E.push(M[1]),$.unshift(M[2])),$.length&&(a=$.join(".")+a),this.hostname=E.join(".");break}}}}this.hostname.length>Tie&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var q=a.indexOf("#");q!==-1&&(this.hash=a.substr(q),a=a.slice(0,q));var b=a.indexOf("?");return b!==-1&&(this.search=a.substr(b),a=a.slice(0,b)),a&&(this.pathname=a),eu[o]&&this.hostname&&!this.pathname&&(this.pathname=""),this};pr.prototype.parseHost=function(t){var e=kie.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 Lie=Die;Is.encode=yie;Is.decode=vie;Is.format=xie;Is.parse=Lie;var jn={},Ci,tu;function yf(){return tu||(tu=1,Ci=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/),Ci}var Ei,nu;function bf(){return nu||(nu=1,Ei=/[\0-\x1F\x7F-\x9F]/),Ei}var Ai,su;function Oie(){return su||(su=1,Ai=/[\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]/),Ai}var Si,ou;function vf(){return ou||(ou=1,Si=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/),Si}var ru;function jie(){return ru||(ru=1,jn.Any=yf(),jn.Cc=bf(),jn.Cf=Oie(),jn.P=ol,jn.Z=vf()),jn}(function(t){function e(I){return Object.prototype.toString.call(I)}function n(I){return e(I)==="[object String]"}var s=Object.prototype.hasOwnProperty;function o(I,he){return s.call(I,he)}function r(I){var he=Array.prototype.slice.call(arguments,1);return he.forEach(function(X){if(X){if(typeof X!="object")throw new TypeError(X+"must be object");Object.keys(X).forEach(function(A){I[A]=X[A]})}}),I}function i(I,he,X){return[].concat(I.slice(0,he),X,I.slice(he+1))}function a(I){return!(I>=55296&&I<=57343||I>=64976&&I<=65007||(I&65535)===65535||(I&65535)===65534||I>=0&&I<=8||I===11||I>=14&&I<=31||I>=127&&I<=159||I>1114111)}function l(I){if(I>65535){I-=65536;var he=55296+(I>>10),X=56320+(I&1023);return String.fromCharCode(he,X)}return String.fromCharCode(I)}var c=/\\([!"#$%&' ( ) * + , \ - . \ / : ; <= > ? @ [ \ \ \ ] ^ _ ` {|}~])/g,u=/&([a-z#][a-z0-9]{1,31});/gi,h=new RegExp(c.source+"|"+u.source,"gi"),f=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,g=_f;function p(I,he){var X=0;return o(g,he)?g[he]:he.charCodeAt(0)===35&&f.test(he)&&(X=he[1].toLowerCase()==="x"?parseInt(he.slice(2),16):parseInt(he.slice(1),10),a(X))?l(X):I}function m(I){return I.indexOf(" \\ ")<0?I:I.replace(c," $ 1")}function w(I){return I.indexOf(" \\ "
` };Gt.fence=function(t,e,n,s,o){var r=t[e],i=r.info?qie(r.info).trim():"",a="",l="",c,u,h,f,g;return i&&(h=i.split(/( \s +)/g),a=h[0],l=h.slice(2).join("")),n.highlight?c=n.highlight(r.content,a,l)||Wn(r.content):c=Wn(r.content),c.indexOf("<pre")===0?c+ `
` :i?(u=r.attrIndex("class"),f=r.attrs?r.attrs.slice():[],u<0?f.push(["class",n.langPrefix+a]):(f[u]=f[u].slice(),f[u][1]+=" "+n.langPrefix+a),g={attrs:f},"<pre><code"+o.renderAttrs(g)+">"+c+ ` < / c o d e > < / p r e >
2023-06-24 15:18:52 +00:00
` ):"<pre><code"+o.renderAttrs(r)+">"+c+ ` < / c o d e > < / p r e >
` };Gt.image=function(t,e,n,s,o){var r=t[e];return r.attrs[r.attrIndex("alt")][1]=o.renderInlineAsText(r.children,n,s),o.renderToken(t,e,n)};Gt.hardbreak=function(t,e,n){return n.xhtmlOut? ` < br / >
` : ` < br >
` };Gt.softbreak=function(t,e,n){return n.breaks?n.xhtmlOut? ` < br / >
` : ` < br >
` : `
2023-06-26 22:51:32 +00:00
` };Gt.text=function(t,e){return Wn(t[e].content)};Gt.html_block=function(t,e){return t[e].content};Gt.html_inline=function(t,e){return t[e].content};function Fs(){this.rules= $ ie({},Gt)}Fs.prototype.renderAttrs=function(e){var n,s,o;if(!e.attrs)return"";for(o="",n=0,s=e.attrs.length;n<s;n++)o+=" "+Wn(e.attrs[n][0])+'="'+Wn(e.attrs[n][1])+'"';return o};Fs.prototype.renderToken=function(e,n,s){var o,r="",i=!1,a=e[n];return a.hidden?"":(a.block&&a.nesting!==-1&&n&&e[n-1].hidden&&(r+= `
2023-06-24 15:18:52 +00:00
` ),r+=(a.nesting===-1?"</":"<")+a.tag,r+=this.renderAttrs(a),a.nesting===0&&s.xhtmlOut&&(r+=" /"),a.block&&(i=!0,a.nesting===1&&n+1<e.length&&(o=e[n+1],(o.type==="inline"||o.hidden||o.nesting===-1&&o.tag===a.tag)&&(i=!1))),r+=i? ` >
` :">",r)};Fs.prototype.renderInline=function(t,e,n){for(var s,o="",r=this.rules,i=0,a=t.length;i<a;i++)s=t[i].type,typeof r[s]<"u"?o+=r[s](t,i,e,n,this):o+=this.renderToken(t,i,e);return o};Fs.prototype.renderInlineAsText=function(t,e,n){for(var s="",o=0,r=t.length;o<r;o++)t[o].type==="text"?s+=t[o].content:t[o].type==="image"?s+=this.renderInlineAsText(t[o].children,e,n):t[o].type==="softbreak"&&(s+= `
2023-06-26 22:51:32 +00:00
` );return s};Fs.prototype.render=function(t,e,n){var s,o,r,i="",a=this.rules;for(s=0,o=t.length;s<o;s++)r=t[s].type,r==="inline"?i+=this.renderInline(t[s].children,e,n):typeof a[r]<"u"?i+=a[t[s].type](t,s,e,n,this):i+=this.renderToken(t,s,e,n);return i};var zie=Fs;function jt(){this.__rules__=[],this.__cache__=null}jt.prototype.__find__=function(t){for(var e=0;e<this.__rules__.length;e++)if(this.__rules__[e].name===t)return e;return-1};jt.prototype.__compile__=function(){var t=this,e=[""];t.__rules__.forEach(function(n){n.enabled&&n.alt.forEach(function(s){e.indexOf(s)<0&&e.push(s)})}),t.__cache__={},e.forEach(function(n){t.__cache__[n]=[],t.__rules__.forEach(function(s){s.enabled&&(n&&s.alt.indexOf(n)<0||t.__cache__[n].push(s.fn))})})};jt.prototype.at=function(t,e,n){var s=this.__find__(t),o=n||{};if(s===-1)throw new Error("Parser rule not found: "+t);this.__rules__[s].fn=e,this.__rules__[s].alt=o.alt||[],this.__cache__=null};jt.prototype.before=function(t,e,n,s){var o=this.__find__(t),r=s||{};if(o===-1)throw new Error("Parser rule not found: "+t);this.__rules__.splice(o,0,{name:e,enabled:!0,fn:n,alt:r.alt||[]}),this.__cache__=null};jt.prototype.after=function(t,e,n,s){var o=this.__find__(t),r=s||{};if(o===-1)throw new Error("Parser rule not found: "+t);this.__rules__.splice(o+1,0,{name:e,enabled:!0,fn:n,alt:r.alt||[]}),this.__cache__=null};jt.prototype.push=function(t,e,n){var s=n||{};this.__rules__.push({name:t,enabled:!0,fn:e,alt:s.alt||[]}),this.__cache__=null};jt.prototype.enable=function(t,e){Array.isArray(t)||(t=[t]);var n=[];return t.forEach(function(s){var o=this.__find__(s);if(o<0){if(e)return;throw new Error("Rules manager: invalid rule name "+s)}this.__rules__[o].enabled=!0,n.push(s)},this),this.__cache__=null,n};jt.prototype.enableOnly=function(t,e){Array.isArray(t)||(t=[t]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(t,e)};jt.prototype.disable=function(t,e){Array.isArray(t)||(t=[t]);var n=[];return t.forEach(function(s){var o=this.__find__(s);if(o<0){if(e)return;throw new Error("Rules manager: invalid rule name "+s)}this.__rules__[o].enabled=!1,n.push(s)},this),this.__cache__=null,n};jt.prototype.getRules=function(t){return this.__cache__===null&&this.__compile__(),this.__cache__[t]||[]};var rl=jt,Bie=/ \r \n ?| \n /g,Nie=/ \0 /g,Uie=function(e){var n;n=e.src.replace(Bie, `
` ),n=n.replace(Nie,"<22> "),e.src=n},Hie=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)},Vie=function(e){var n=e.tokens,s,o,r;for(o=0,r=n.length;o<r;o++)s=n[o],s.type==="inline"&&e.md.inline.parse(s.content,e.md,e.env,s.children)},Gie=Fe.arrayReplaceAt;function Kie(t){return/^<a[> \s ]/i.test(t)}function Wie(t){return/^< \/ a \s *>/i.test(t)}var Zie=function(e){var n,s,o,r,i,a,l,c,u,h,f,g,p,m,w,v,y=e.tokens,x;if(e.md.options.linkify){for(s=0,o=y.length;s<o;s++)if(!(y[s].type!=="inline"||!e.md.linkify.pretest(y[s].content)))for(r=y[s].children,p=0,n=r.length-1;n>=0;n--){if(a=r[n],a.type==="link_close"){for(n--;r[n].level!==a.level&&r[n].type!=="link_open";)n--;continue}if(a.type==="html_inline"&&(Kie(a.content)&&p>0&&p--,Wie(a.content)&&p++),!(p>0)&&a.type==="text"&&e.md.linkify.test(a.content)){for(u=a.content,x=e.md.linkify.match(u),l=[],g=a.level,f=0,x.length>0&&x[0].index===0&&n>0&&r[n-1].type==="text_special"&&(x=x.slice(1)),c=0;c<x.length;c++)m=x[c].url,w=e.md.normalizeLink(m),e.md.validateLink(w)&&(v=x[c].text,x[c].schema?x[c].schema==="mailto:"&&!/^mailto:/i.test(v)?v=e.md.normalizeLinkText("mailto:"+v).replace(/^mailto:/,""):v=e.md.normalizeLinkText(v):v=e.md.normalizeLinkText("http://"+v).replace(/^http: \/ \/ /,""),h=x[c].index,h>f&&(i=new e.Token("text","",0),i.content=u.slice(f,h),i.level=g,l.push(i)),i=new e.Token("link_open","a",1),i.attrs=[["href",w]],i.level=g++,i.markup="linkify",i.info="auto",l.push(i),i=new e.Token("text","",0),i.content=v,i.level=g,l.push(i),i=new e.Token("link_close","a",-1),i.level=--g,i.markup="linkify",i.info="auto",l.push(i),f=x[c].lastIndex);f<u.length&&(i=new e.Token("text","",0),i.content=u.slice(f),i.level=g,l.push(i)),y[s].children=r=Gie(r,n,l)}}}},xf=/ \+ -| \. \. | \? \? \? \? |!!!!|,,|--/,Jie=/ \( (c|tm|r) \) /i,Yie=/ \( (c|tm|r) \) /ig,Qie={c:"©",r:"®",tm:"™"};function Xie(t,e){return Qie[e.toLowerCase()]}function eae(t){var e,n,s=0;for(e=t.length-1;e>=0;e--)n=t[e],n.type==="text"&&!s&&(n.content=n.content.replace(Yie,Xie)),n.type==="link_open"&&n.info==="auto"&&s--,n.type==="link_close"&&n.info==="auto"&&s++}function tae(t){var e,n,s=0;for(e=t.length-1;e>=0;e--)n=t[e],n.type==="text"&&!s&&xf.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"&&s--,n.type==="link_close"&&n.info==="auto"&&s++}var nae=function(e){var n;if(e.md.options.typographer)for(n=e.tokens.length-1;n>=0;n--)e.tokens[n].type==="inline"&&(Jie.test(e.tokens[n].content)&&eae(e.tokens[n].children),xf.test(e.tokens[n].content)&&tae(e.tokens[n].children))},au=Fe.isWhiteSpace,lu=Fe.isPunctChar,cu=Fe.isMdAsciiPunct,sae=/['"]/,uu=/['"]/g,du="’ ";function Fo(t,e,n){return t.slice(0,e)+n+t.slice(e+1)}function oae(t,e){var n,s,o,r,i,a,l,c,u,h,f,g,p,m,w,v,y,x,E, $ ,M;for(E=[],n=0;n<t.length;n++){for(s=t[n],l=t[n].level,y=E.length-1;y>=0&&!(E[y].level<=l);y--);if(E.length=y+1,s.type==="text"){o=s.content,i=0,a=o.length;e:for(;i<a&&(uu.lastIndex=i,r=uu.exec(o),!!r);){if(w=v=!0,i=r.index+1,x=r[0]==="'",u=32,r.index-1>=0)u=o.charCodeAt(r.index-1);else for(y=n-1;y>=0&&!(t[y].type==="softbreak"||t[y].type==="hardbreak");y--)if(t[y].content){u=t[y].content.charCodeAt(t[y].content.length-1);break}if(h=32,i<a)h=o.charCodeAt(i);else for(y=n+1;y<t.length&&!(t[y].type==="softbreak"||t[y].type==="hardbreak");y++)if(t[y].content){h=t[y].content.charCodeAt(0);break}if(f=cu(u)||lu(String.fromCharCode(u)),g=cu(h)||lu(String.fromCharCode(h)),p=au(u),m=au(h),m?w=!1:g&&(p||f||(w=!1)),p?v=!1:f&&(m||g||(v=!1)),h===34&&r[0]==='"'&&u>=48&&u<=57&&(v=w=!1),w&&v&&(w=f,v=g),!w&&!v){x&&(s.content=Fo(s.content,r.index,du));continue}if(v){for(y=E.length-1;y>=0&&(c=E[y],!(E[y].level<l));y--)if(c.single===x&&E[y].level===l){c=E[y],x?( $ =e.md.options.quotes[2],M=e.md.options.quotes[
` ,i.map=[n,e.line],!0},fae=function(e,n,s,o){var r,i,a,l,c,u,h,f=!1,g=e.bMarks[n]+e.tShift[n],p=e.eMarks[n];if(e.sCount[n]-e.blkIndent>=4||g+3>p||(r=e.src.charCodeAt(g),r!==126&&r!==96)||(c=g,g=e.skipChars(g,r),i=g-c,i<3)||(h=e.src.slice(c,g),a=e.src.slice(g,p),r===96&&a.indexOf(String.fromCharCode(r))>=0))return!1;if(o)return!0;for(l=n;l++,!(l>=s||(g=c=e.bMarks[l]+e.tShift[l],p=e.eMarks[l],g<p&&e.sCount[l]<e.blkIndent));)if(e.src.charCodeAt(g)===r&&!(e.sCount[l]-e.blkIndent>=4)&&(g=e.skipChars(g,r),!(g-c<i)&&(g=e.skipSpaces(g),!(g<p)))){f=!0;break}return i=e.sCount[n],e.line=l+(f?1:0),u=e.push("fence","code",0),u.info=a,u.content=e.getLines(n+1,l,i,!0),u.markup=h,u.map=[n,e.line],!0},fu=Fe.isSpace,pae=function(e,n,s,o){var r,i,a,l,c,u,h,f,g,p,m,w,v,y,x,E, $ ,M,q,b,k=e.lineMax,S=e.bMarks[n]+e.tShift[n],z=e.eMarks[n];if(e.sCount[n]-e.blkIndent>=4||e.src.charCodeAt(S++)!==62)return!1;if(o)return!0;for(l=g=e.sCount[n]+1,e.src.charCodeAt(S)===32?(S++,l++,g++,r=!1,E=!0):e.src.charCodeAt(S)===9?(E=!0,(e.bsCount[n]+g)%4===3?(S++,l++,g++,r=!1):r=!0):E=!1,p=[e.bMarks[n]],e.bMarks[n]=S;S<z&&(i=e.src.charCodeAt(S),fu(i));){i===9?g+=4-(g+e.bsCount[n]+(r?1:0))%4:g++;S++}for(m=[e.bsCount[n]],e.bsCount[n]=e.sCount[n]+1+(E?1:0),u=S>=z,y=[e.sCount[n]],e.sCount[n]=g-l,x=[e.tShift[n]],e.tShift[n]=S-e.bMarks[n],M=e.md.block.ruler.getRules("blockquote"),v=e.parentType,e.parentType="blockquote",f=n+1;f<s&&(b=e.sCount[f]<e.blkIndent,S=e.bMarks[f]+e.tShift[f],z=e.eMarks[f],!(S>=z));f++){if(e.src.charCodeAt(S++)===62&&!b){for(l=g=e.sCount[f]+1,e.src.charCodeAt(S)===32?(S++,l++,g++,r=!1,E=!0):e.src.charCodeAt(S)===9?(E=!0,(e.bsCount[f]+g)%4===3?(S++,l++,g++,r=!1):r=!0):E=!1,p.push(e.bMarks[f]),e.bMarks[f]=S;S<z&&(i=e.src.charCodeAt(S),fu(i));){i===9?g+=4-(g+e.bsCount[f]+(r?1:0))%4:g++;S++}u=S>=z,m.push(e.bsCount[f]),e.bsCount[f]=e.sCount[f]+1+(E?1:0),y.push(e.sCount[f]),e.sCount[f]=g-l,x.push(e.tShift[f]),e.tShift[f]=S-e.bMarks[f];continue}if(u)break;for( $ =!1,a=0,c=M.length;a<c;a++)if(M[a](e,f,s,!0)){ $ =!0;break}if( $ ){e.lineMax=f,e.blkIndent!==0&&(p.push(e.bMarks[f]),m.push(e.bsCount[f]),x.push(e.tShift[f]),y.push(e.sCount[f]),e.sCount[f]-=e.blkIndent);break}p.push(e.bMarks[f]),m.push(e.bsCount[f]),x.push(e.tShift[f]),y.push(e.sCount[f]),e.sCount[f]=-1}for(w=e.blkIndent,e.blkIndent=0,q=e.push("blockquote_open","blockquote",1),q.markup=">",q.map=h=[n,0],e.md.block.tokenize(e,n,f),q=e.push("blockquote_close","blockquote",-1),q.markup=">",e.lineMax=k,e.parentType=v,h[1]=e.line,a=0;a<x.length;a++)e.bMarks[a+n]=p[a],e.tShift[a+n]=x[a],e.sCount[a+n]=y[a],e.bsCount[a+n]=m[a];return e.blkIndent=w,!0},gae=Fe.isSpace,mae=function(e,n,s,o){var r,i,a,l,c=e.bMarks[n]+e.tShift[n],u=e.eMarks[n];if(e.sCount[n]-e.blkIndent>=4||(r=e.src.charCodeAt(c++),r!==42&&r!==45&&r!==95))return!1;for(i=1;c<u;){if(a=e.src.charCodeAt(c++),a!==r&&!gae(a))return!1;a===r&&i++}return i<3?!1:(o||(e.line=n+1,l=e.push("hr","hr",0),l.map=[n,e.line],l.markup=Array(i+1).join(String.fromCharCode(r))),!0)},kf=Fe.isSpace;function pu(t,e){var n,s,o,r;return s=t.bMarks[e]+t.tShift[e],o=t.eMarks[e],n=t.src.charCodeAt(s++),n!==42&&n!==45&&n!==43||s<o&&(r=t.src.charCodeAt(s),!kf(r))?-1:s}function gu(t,e){var n,s=t.bMarks[e]+t.tShift[e],o=s,r=t.eMarks[e];if(o+1>=r||(n=t.src.charCodeAt(o++),n<48||n>57))return-1;for(;;){if(o>=r)return-1;if(n=t.src.charCodeAt(o++),n>=48&&n<=57){if(o-s>=10)return-1;continue}if(n===41||n===46)break;return-1}return o<r&&(n=t.src.charCodeAt(o),!kf(n))?-1:o}function _ae(t,e){var n,s,o=t.level+2;for(n=e+2,s=t.tokens.length-2;n<s;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 yae=function(e,n,s,o){var r,i,a,l,c,u,h,f,g,p,m,w,v,y,x,E, $ ,M,q,b,k,S,z,F,Q,I,he,X,A=!1,N=!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&&(A=!0),(z=gu(e,n))>=0){if(h=!0,Q=e.bMarks[n]+e.tShift[n],v=Number(e.src.slice(Q,z-1)),A&&v!==1)return!1}else if((z=pu(e,n))>=0)h=!1;else return!1;if(A&&e.skipSpaces(z)>=e.
https : //github.com/highlightjs/highlight.js/issues/2277`),pe=A,me=N),V===void 0&&(V=!0);const ee={code:me,language:pe};he("before:highlight",ee);const be=ee.result?ee.result:h(ee.language,ee.code,V);return be.code=ee.code,he("after:highlight",be),be}function h(A,N,V,me){const pe=Object.create(null);function ee(H,ne){return H.keywords[ne]}function be(){if(!P.keywords){B.addText(K);return}let H=0;P.keywordPatternRe.lastIndex=0;let ne=P.keywordPatternRe.exec(K),ue="";for(;ne;){ue+=K.substring(H,ne.index);const xe=R.case_insensitive?ne[0].toLowerCase():ne[0],Pe=ee(P,xe);if(Pe){const[Ne,gt]=Pe;if(B.addText(ue),ue="",pe[xe]=(pe[xe]||0)+1,pe[xe]<=nRe&&(re+=gt),Ne.startsWith("_"))ue+=ne[0];else{const Je=R.classNameAliases[Ne]||Ne;W(ne[0],Je)}}else ue+=ne[0];H=P.keywordPatternRe.lastIndex,ne=P.keywordPatternRe.exec(K)}ue+=K.substring(H),B.addText(ue)}function Ce(){if(K==="")return;let H=null;if(typeof P.subLanguage=="string"){if(!e[P.subLanguage]){B.addText(K);return}H=h(P.subLanguage,K,!0,te[P.subLanguage]),te[P.subLanguage]=H._top}else H=g(K,P.subLanguage.length?P.subLanguage:null);P.relevance>0&&(re+=H.relevance),B.__addSublanguage(H._emitter,H.language)}function D(){P.subLanguage!=null?Ce():be(),K=""}function W(H,ne){H!==""&&(B.startScope(ne),B.addText(H),B.endScope())}function J(H,ne){let ue=1;const xe=ne.length-1;for(;ue<=xe;){if(!H._emit[ue]){ue++;continue}const Pe=R.classNameAliases[H[ue]]||H[ue],Ne=ne[ue];Pe?W(Ne,Pe):(K=Ne,be(),K=""),ue++}}function ie(H,ne){return H.scope&&typeof H.scope=="string"&&B.openNode(R.classNameAliases[H.scope]||H.scope),H.beginScope&&(H.beginScope._wrap?(W(K,R.classNameAliases[H.beginScope._wrap]||H.beginScope._wrap),K=""):H.beginScope._multi&&(J(H.beginScope,ne),K="")),P=Object.create(H,{parent:{value:P}}),P}function se(H,ne,ue){let xe=yje(H.endRe,ue);if(xe){if(H["on:end"]){const Pe=new Lu(H);H["on:end"](ne,Pe),Pe.isMatchIgnored&&(xe=!1)}if(xe){for(;H.endsParent&&H.parent;)H=H.parent;return H}}if(H.endsWithParent)return se(H.parent,ne,ue)}function ge(H){return P.matcher.regexIndex===0?(K+=H[0],1):(ve=!0,0)}function de(H){const ne=H[0],ue=H.rule,xe=new Lu(ue),Pe=[ue.__beforeBegin,ue["on:begin"]];for(const Ne of Pe)if(Ne&&(Ne(H,xe),xe.isMatchIgnored))return ge(ne);return ue.skip?K+=ne:(ue.excludeBegin&&(K+=ne),D(),!ue.returnBegin&&!ue.excludeBegin&&(K=ne)),ie(ue,H),ue.returnBegin?0:ne.length}function _(H){const ne=H[0],ue=N.substring(H.index),xe=se(P,H,ue);if(!xe)return Fu;const Pe=P;P.endScope&&P.endScope._wrap?(D(),W(ne,P.endScope._wrap)):P.endScope&&P.endScope._multi?(D(),J(P.endScope,H)):Pe.skip?K+=ne:(Pe.returnEnd||Pe.excludeEnd||(K+=ne),D(),Pe.excludeEnd&&(K=ne));do P.scope&&B.closeNode(),!P.skip&&!P.subLanguage&&(re+=P.relevance),P=P.parent;while(P!==xe.parent);return xe.starts&&ie(xe.starts,H),Pe.returnEnd?0:ne.length}function C(){const H=[];for(let ne=P;ne!==R;ne=ne.parent)ne.scope&&H.unshift(ne.scope);H.forEach(ne=>B.openNode(ne))}let O={};function j(H,ne){const ue=ne&&ne[0];if(K+=H,ue==null)return D(),0;if(O.type==="begin"&&ne.type==="end"&&O.index===ne.index&&ue===""){if(K+=N.slice(ne.index,ne.index+1),!o){const xe=new Error(`0 width match regex (${A})`);throw xe.languageName=A,xe.badRule=O.rule,xe}return 1}if(O=ne,ne.type==="begin")return de(ne);if(ne.type==="illegal"&&!V){const xe=new Error('Illegal lexeme "'+ue+'" for mode "'+(P.scope||"<unnamed>")+'"');throw xe.mode=P,xe}else if(ne.type==="end"){const xe=_(ne);if(xe!==Fu)return xe}if(ne.type==="illegal"&&ue==="")return 1;if(ae>1e5&&ae>ne.index*3)throw new Error("potential infinite loop, way more iterations than matches");return K+=ue,ue.length}const R=k(A);if(!R)throw Gn(r.replace("{}",A)),new Error('Unknown language: "'+A+'"');const Y=Qje(R);let oe="",P=me||Y;const te={},B=new a.__emitter(a);C();let K="",re=0,ce=0,ae=0,ve=!1;try{if(R.__emitTokens)R.__emitTokens(N,B);else{for(P.matcher.considerAll();;){ae++,ve?ve=!1:P.matcher.considerAll(),P.matcher.lastIndex=ce;const H=P.matcher.exec(N);if(!H)break;const ne=N.substring(ce,H.index),ue=j(ne,H);ce=H.index+ue}j(N.substring(ce))}return B.finalize(),oe=B.toHTML(),{language:A,value:oe
2023-06-27 09:18:36 +00:00
{ . a } softbreak then curly in start ` ,tests:[{shift:0,type:"inline",children:[{position:-2,type:"softbreak"},{position:-1,type:"text",content:Me.hasDelimiters("only",t)}]}],transform:(n,s,o)=>{const r=n[s].children[o],i=Me.getAttrs(r.content,0,t);let a=s+1;for(;n[a+1]&&n[a+1].nesting===-1;)a++;const l=Me.getMatchingOpeningToken(n,a);Me.addAttrs(i,l),n[s].children=n[s].children.slice(0,-2)}},{name:"horizontal rule",tests:[{shift:0,type:"paragraph_open"},{shift:1,type:"inline",children:n=>n.length===1,content:n=>n.match(e)!==null},{shift:2,type:"paragraph_close"}],transform:(n,s)=>{const o=n[s];o.type="hr",o.tag="hr",o.nesting=0;const r=n[s+1].content,i=r.lastIndexOf(t.leftDelimiter),a=Me.getAttrs(r,i,t);Me.addAttrs(a,o),o.markup=r,n.splice(s+1,2)}},{name:"end of block",tests:[{shift:0,type:"inline",children:[{position:-1,content:Me.hasDelimiters("end",t),type:n=>n!=="code_inline"&&n!=="math_inline"}]}],transform:(n,s,o)=>{const r=n[s].children[o],i=r.content,a=Me.getAttrs(i,i.lastIndexOf(t.leftDelimiter),t);let l=s+1;for(;n[l+1]&&n[l+1].nesting===-1;)l++;const c=Me.getMatchingOpeningToken(n,l);Me.addAttrs(a,c);const u=i.slice(0,i.lastIndexOf(t.leftDelimiter));r.content=qu(u)!==" "?u:u.slice(0,-1)}}]};function qu(t){return t.slice(-1)[0]}const cRe=lRe,uRe={leftDelimiter:"{",rightDelimiter:"}",allowedAttributes:[]};var dRe=function(e,n){let s=Object.assign({},uRe);s=Object.assign(s,n);const o=cRe(s);function r(i){const a=i.tokens;for(let l=0;l<a.length;l++)for(let c=0;c<o.length;c++){const u=o[c];let h=null;u.tests.every(g=>{const p=ma(a,l,g);return p.j!==null&&(h=p.j),p.match})&&(u.transform(a,l,h),(u.name==="inline attributes"||u.name==="inline nesting 0")&&c--)}}e.core.ruler.before("linkify","curly_attributes",r)};function ma(t,e,n){const s={match:!1,j:null},o=n.shift!==void 0?e+n.shift:n.position;if(n.shift!==void 0&&o<0)return s;const r=pRe(t,o);if(r===void 0)return s;for(const i of Object.keys(n))if(!(i==="shift"||i==="position")){if(r[i]===void 0)return s;if(i==="children"&&hRe(n.children)){if(r.children.length===0)return s;let a;const l=n.children,c=r.children;if(l.every(u=>u.position!==void 0)){if(a=l.every(u=>ma(c,u.position,u).match),a){const u=gRe(l).position;s.j=u>=0?u:c.length+u}}else for(let u=0;u<c.length;u++)if(a=l.every(h=>ma(c,u,h).match),a){s.j=u;break}if(a===!1)return s;continue}switch(typeof n[i]){case"boolean":case"number":case"string":if(r[i]!==n[i])return s;break;case"function":if(!n[i](r[i]))return s;break;case"object":if(fRe(n[i])){if(n[i].every(l=>l(r[i]))===!1)return s;break}default:throw new Error( ` Unknown type of pattern test ( key : $ { i } ) . Test should be of type boolean , number , string , function or array of functions . ` )}}return s.match=!0,s}function hRe(t){return Array.isArray(t)&&t.length&&t.every(e=>typeof e=="object")}function fRe(t){return Array.isArray(t)&&t.length&&t.every(e=>typeof e=="function")}function pRe(t,e){return e>=0?t[e]:t[t.length+e]}function gRe(t){return t.slice(-1)[0]||{}}const mRe=js(dRe);function _Re(){const t=Date.now().toString(),e=Math.floor(Math.random()*1e3).toString();return t+e}const _r=new ice("commonmark",{html:!1,xhtmlOut:!0,breaks:!0,linkify:!0,typographer:!0,highlight:(t,e)=>{if(e&& $ u.getLanguage(e))try{const o= $ u.highlight(e,t).value;return'<div class="bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel p-2 rounded-lg shadow-sm">'+e+'<button class="px-2 py-1 ml-10 mb-2 text-left p-2 text-sm font-medium bg-bg-dark-tone-panel dark:bg-bg-dark-tone rounded-lg hover:bg-primary dark:hover:bg-primary text-white text-xs transition-colors duration-200"><span class="mr-1" id="copy-btn" onclick="copyContentToClipboard('+n+')">Copy</span><span class="hidden text-xs text-green-500" id="copyed-btn_'+n+'" onclick="copyContentToClipboard('+n+')">Copied!</span></button><pre class="hljs p-1 rounded-md break-all grid grid-cols-1"><code id="code_'+n+'" class="overflow-x-auto break-all scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scro
2023-06-24 15:18:52 +00:00
// Your inline script code here
console . log ( 'Inline script executed!' ) ;
function copyContentToClipboard ( id ) {
console . log ( "copied" ) ;
const codeElement = document . getElementById ( 'code_' + id ) ;
const copybtnElement = document . getElementById ( 'copy-btn_' + id ) ;
const copyedbtnElement = document . getElementById ( 'copyed-btn_' + id ) ;
copybtnElement . classList . add ( 'hidden' ) ;
copyedbtnElement . classList . remove ( 'hidden' ) ;
const range = document . createRange ( ) ;
range . selectNode ( codeElement ) ;
window . getSelection ( ) . removeAllRanges ( ) ;
window . getSelection ( ) . addRange ( range ) ;
document . execCommand ( 'copy' ) ;
window . getSelection ( ) . removeAllRanges ( ) ;
this . isCopied = true ;
setTimeout ( ( ) => {
this . isCopied = false ;
} , 1500 ) ;
}
2023-06-26 22:51:32 +00:00
` ,t.async=!0,document.body.appendChild(t),this.renderedMarkdown=_r.render(this.markdownText),fe(()=>{we.replace()})},methods:{},watch:{markdownText(t){this.renderedMarkdown=_r.render(t),fe(()=>{we.replace()})}}},bRe={class:"break-all"},vRe=["innerHTML"];function xRe(t,e,n,s,o,r){return T(),L("div",bRe,[d("div",{innerHTML:o.renderedMarkdown,class:""},null,8,vRe)])}const wRe=Ge(yRe,[["render",xRe]]);const kRe="/",CRe={name:"Message",emits:["copy","delete","rankUp","rankDown","updateMessage","resendMessage"],components:{MarkdownRenderer:wRe},props:{message:Object,avatar:""},data(){return{expanded:!1,new_message_content:"",showConfirmation:!1,editMsgMode:!1,deleteMsgMode:!1,mdRenderHeight:Number}},mounted(){this.new_message_content=this.message.content,fe(()=>{we.replace(),this.mdRenderHeight=this. $ refs.mdRender. $ el.offsetHeight})},methods:{toggleModel(){this.expanded=!this.expanded},copyContentToClipboard(){this. $ emit("copy",this)},deleteMsg(){this. $ emit("delete",this.message.id),this.deleteMsgMode=!1},rankUp(){this. $ emit("rankUp",this.message.id)},rankDown(){this. $ emit("rankDown",this.message.id)},updateMessage(){this. $ emit("updateMessage",this.message.id,this.new_message_content),this.editMsgMode=!1},resendMessage(){this. $ emit("resendMessage",this.message.id,this.new_message_content)},getImgUrl(){return this.message.sender=="user"?this.avatar?this.avatar:sv:this.avatar?kRe+this.avatar:xs},defaultImg(t){t.target.src=xs},parseDate(t){let e=new Date(Date.parse(t)),s=Math.floor((new Date-e)/1e3);return s<=1?"just now":s<20?s+" seconds ago":s<40?"half a minute ago":s<60?"less than a minute ago":s<=90?"one minute ago":s<=3540?Math.round(s/60)+" minutes ago":s<=5400?"1 hour ago":s<=86400?Math.round(s/3600)+" hours ago":s<=129600?"1 day ago":s<604800?Math.round(s/86400)+" days ago":s<=777600?"1 week ago":t},prettyDate(t){let e=new Date((t||"").replace(/-/g,"/").replace(/[TZ]/g," ")),n=(new Date().getTime()-e.getTime())/1e3,s=Math.floor(n/86400);if(!(isNaN(s)||s<0||s>=31))return s==0&&(n<60&&"just now"||n<120&&"1 minute ago"||n<3600&&Math.floor(n/60)+" minutes ago"||n<7200&&"1 hour ago"||n<86400&&Math.floor(n/3600)+" hours ago")||s==1&&"Yesterday"||s<7&&s+" days ago"||s<31&&Math.ceil(s/7)+" weeks ago"}},watch:{showConfirmation(){fe(()=>{we.replace()})},editMsgMode(t){t||(this.new_message_content=this.message.content),fe(()=>{we.replace()})},deleteMsgMode(){fe(()=>{we.replace()})}},computed:{created_at(){return this.prettyDate(this.message.created_at)},created_at_parsed(){return new Date(Date.parse(this.message.created_at)).toLocaleString()},finished_generating_at_parsed(){return new Date(Date.parse(this.message.finished_generating_at)).toLocaleString()},time_spent(){const t=new Date(Date.parse(this.message.created_at)),e=new Date(Date.parse(this.message.finished_generating_at));if(e.getTime()===t.getTime()||!e.getTime())return;let s=e.getTime()-t.getTime();const o=Math.floor(s/(1e3*60*60));s-=o*(1e3*60*60);const r=Math.floor(s/(1e3*60));s-=r*(1e3*60);const i=Math.floor(s/1e3);s-=i*1e3;function a(c){return c<10&&(c="0"+c),c}return a(o)+"h:"+a(r)+"m:"+a(i)+"s"}}},ERe={class:"group rounded-lg m-2 shadow-lg hover:border-primary dark:hover:border-primary hover:border-solid hover:border-2 border-2 border-transparent even:bg-bg-light-discussion-odd dark:even:bg-bg-dark-discussion-odd flex flex-col flex-grow flex-wrap overflow-x-hidden p-4 pb-2"},ARe={class:"flex flex-row gap-2"},SRe={class:"flex-shrink-0"},TRe=["src"],MRe={class:"flex flex-col w-full flex-grow-0"},DRe={class:"flex flex-row flex-grow items-start"},LRe={class:"flex flex-col mb-2"},ORe={class:"drop-shadow-sm text-lg text-opacity-95 font-bold grow"},jRe=["title"],RRe=d("div",{class:"flex-grow"},null,-1),PRe={class:"flex-row justify-end mx-2"},IRe={class:"invisible group-hover:visible flex flex-row"},FRe={key:0,class:"flex items-center duration-75"}, $ Re=d("i",{"data-feather":"x"},null,-1),qRe=[ $ Re],zRe=d("i",{"data-feather":"check"},null,-1),BRe=[zRe],NRe=d("i",{"data-feather":"edit"},null,-1),URe=[NRe],HRe=d("i",{"data-feather":"copy"},null,-1),VRe=[HRe],GRe=d("i",{"d
2023-06-24 15:18:52 +00:00
` +t.name,4,!0)}else this.onPersonalityMounted(t);this.isLoading=!1}},async mount_personality(t){if(!t)return{status:!1,error:"no personality - mount_personality"};try{const e={language:t.language,category:t.category,folder:t.folder},n=await De.post("/mount_personality",e);if(n)return n.data}catch(e){console.log(e.message,"mount_personality - settings");return}},async unmount_personality(t){if(!t)return{status:!1,error:"no personality - unmount_personality"};const e={language:t.language,category:t.category,folder:t.folder};try{this.isLoading=!0;const n=await De.post("/unmount_personality",e);if(this.isLoading=!1,n)return n.data}catch(n){console.log(n.message,"unmount_personality - settings");return}},async select_personality(t){if(!t)return{status:!1,error:"no personality - select_personality"};console.log("select pers",t);const n={id:this.configFile.personalities.findIndex(s=>s===t.full_path)};try{const s=await De.post("/select_personality",n);if(s){this.configFile=await this.api_get_req("get_config");let o=await this.api_get_req("get_current_personality_path_infos");return this.configFile.personality_language=o.personality_language,this.configFile.personality_category=o.personality_category,this.configFile.personality_folder=o.personality_name,s.data}}catch(s){console.log(s,"select_personality - settings");return}},async mountPersonality(t){if(this.isLoading=!0,console.log("mount pers",t),!t)return;if(this.configFile.personalities.includes(t.personality.full_path)){this. $ refs.toast.showToast("Personality already mounted",4,!1);return}const e=await this.mount_personality(t.personality);console.log("mount_personality res",e),e.status?(this.configFile.personalities=e.personalities,this. $ refs.toast.showToast("Personality mounted",4,!0),t.isMounted=!0,(await this.select_personality(t.personality)).status&&this. $ refs.toast.showToast( ` Selected personality :
` +t.personality.name,4,!0),this.getMountedPersonalities()):(t.isMounted=!1,this. $ refs.toast.showToast( ` Could not mount personality
Error : ` +e.error,4,!1)),this.isLoading=!1},async unmountPersonality(t){if(this.isLoading=!0,!t)return;const e=await this.unmount_personality(t.personality||t);if(e.status){this.configFile.personalities=e.personalities,this. $ refs.toast.showToast("Personality unmounted",4,!0);const n=this.personalities.findIndex(a=>a.full_path==t.full_path),s=this.personalitiesFiltered.findIndex(a=>a.full_path==t.full_path),o=this. $ refs.personalitiesZoo.findIndex(a=>a.full_path==t.full_path);console.log("ppp",this.personalities[n]),this.personalities[n].isMounted=!1,s>-1&&(this.personalitiesFiltered[s].isMounted=!1),o>-1&&(this. $ refs.personalitiesZoo[o].isMounted=!1),this.getMountedPersonalities();const r=this.mountedPersArr[this.mountedPersArr.length-1];console.log(r,this.mountedPersArr.length),(await this.select_personality(t.personality)).status&&this. $ refs.toast.showToast( ` Selected personality :
` +r.name,4,!0)}else this. $ refs.toast.showToast( ` Could not unmount personality
2023-06-26 22:51:32 +00:00
Error : ` +e.error,4,!1);this.isLoading=!1},getMountedPersonalities(){let t=[];console.log(this.configFile.personalities.length);for(let e=0;e<this.configFile.personalities.length;e++){const n=this.configFile.personalities[e],s=this.personalities.findIndex(r=>r.full_path==n),o=this.personalities[s];o?t.push(o):t.push(this.personalities[this.personalities.findIndex(r=>r.full_path=="english/generic/lollms")])}this.mountedPersArr=[],this.mountedPersArr=t,console.log("getMountedPersonalities",t),console.log("fig",this.configFile.personality_category)}}},vPe={class:"text-base font-semibold cursor-pointer select-none items-center flex flex-row overflow-visible overflow-x-auto scrollbar-thin scrollbar-track-bg-light scrollbar-thumb-bg-light-tone hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark dark:scrollbar-thumb-bg-dark-tone dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},xPe={class:"flex -space-x-4 items-center"},wPe={class:"group items-center flex flex-row"},kPe=["onClick"],CPe=["src","title"],EPe=["onClick"],APe=d("span",{class:"hidden group-hover:block top-0 left-7 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount personality"},[d("svg",{"aria-hidden":"true",class:"w-4 h-4 text-red-600 hover:text-red-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[d("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})])],-1),SPe=[APe];function TPe(t,e,n,s,o,r){return T(),L("div",vPe,[d("div",xPe,[(T(!0),L(Ie,null,rt(s.mountedPersArr,(i,a)=>(T(),L("div",{class:"relative hover:-translate-y-2 duration-300 hover:z-10 shrink-0",key:a+"-"+i.name},[d("div",wPe,[d("button",{onClick:le(l=>r.onPersonalitySelected(i),["stop"])},[d("img",{src:s.bUrl+i.avatar,onError:e[0]||(e[0]=(...l)=>r.personalityImgPlacehodler&&r.personalityImgPlacehodler(...l)),class:Te(["w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 group-hover:border-secondary",s.configFile.active_personality_id==s.configFile.personalities.indexOf(i.full_path)?"border-secondary":"border-transparent z-0"]),title:i.name},null,42,CPe)],8,kPe),d("button",{onClick:le(l=>r.onPersonalityMounted(i),["stop"])},SPe,8,EPe)])]))),128))])])}const MPe=Ge(bPe,[["render",TPe]]);const DPe={name:"ChatBox",emits:["messageSentEvent","stopGenerating"],props:{loading:!1},components:{MountedPersonalities:MPe},setup(){},data(){return{message:"",fileList:[],totalSize:0}},methods:{computedFileSize(t){return fe(()=>{we.replace()}),Ft(t)},removeItem(t){this.fileList=this.fileList.filter(e=>e!=t)},sendMessageEvent(t){this.fileList=[],this. $ emit("messageSentEvent",t)},submitOnEnter(t){t.which===13&&(t.preventDefault(),t.repeat||(this.sendMessageEvent(this.message),this.message=""))},submit(){this.message&&(this.sendMessageEvent(this.message),this.message="")},stopGenerating(){this. $ emit("stopGenerating")},addFiles(t){this.fileList=this.fileList.concat([...t.target.files])}},watch:{loading(t,e){fe(()=>{we.replace()})},fileList:{handler(t,e){let n=0;if(t.length>0)for(let s=0;s<t.length;s++)n=n+parseInt(t[s].size);this.totalSize=Ft(n,!0)},deep:!0}},mounted(){fe(()=>{we.replace()})},activated(){fe(()=>{we.replace()})}},Rt=t=>(vo("data-v-6d247de3"),t=t(),xo(),t),LPe={class:"absolute bottom-0 min-w-96 w-full justify-center text-center p-4"},OPe={key:0,class:"flex items-center justify-center w-full"},jPe={class:"flex flex-row p-2 rounded-t-lg"},RPe=Rt(()=>d("label",{for:"chat",class:"sr-only"},"Send message",-1)),PPe={class:"px-3 py-3 rounded-lg bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel shadow-lg"},IPe={class:"flex flex-col gap-2"},FPe={key:0,class:"flex flex-col max-h-64"}, $ Pe=["title"],qPe={class:"flex flex-row items-center gap-1 text-left p-2 text-sm font-medium bg-bg-dark-tone-panel dark:bg-bg-dark-tone rounded-lg hover:bg-primary dark:hover:bg-primary"},zPe=Rt(()=>d("div",nu
2023-06-24 15:18:52 +00:00
\ r
\ r
2023-06-26 22:51:32 +00:00
` ,544),[[qe,o.message]]),d("input",{type:"file",ref:"fileDialog",style:{display:"none"},onChange:e[4]||(e[4]=(...i)=>r.addFiles&&r.addFiles(...i)),multiple:""},null,544),d("button",{type:"button",onClick:e[5]||(e[5]=le(i=>t. $ refs.fileDialog.click(),["stop"])),title:"Add files",class:"absolute inset-y-0 right-0 flex items-center mr-2 w-6 hover:text-secondary duration-75 active:scale-90"},sIe)]),d("div",oIe,[n.loading?G("",!0):(T(),L("button",{key:0,type:"button",onClick:e[6]||(e[6]=(...i)=>r.submit&&r.submit(...i)),class:"w-6 hover:text-secondary duration-75 active:scale-90"},aIe)),n.loading?(T(),L("div",lIe,uIe)):G("",!0)])])])])])])}const Yf=Ge(DPe,[["render",dIe],["__scopeId","data-v-6d247de3"]]),hIe={name:"WelcomeComponent",setup(){return{}}},fIe={class:"flex flex-col text-center"},pIe=wo('<div class="flex flex-col text-center items-center"><div class="flex items-center gap-3 text-5xl drop-shadow-md align-middle pt-24"><img class="w-24 animate-bounce" title="LoLLMS WebUI" src="'+Sh+'" alt="Logo"><div class="flex flex-col items-start"><p class="text-2xl">Lord of Large Language Models</p><p class="text-gray-400 text-base">One tool to rule them all</p></div></div><hr class="mt-1 w-96 h-1 mx-auto my-2 md:my-2 dark:bg-bg-dark-tone-panel bg-bg-light-tone-panel border-0 rounded"><p class="text-2xl">Welcome</p><p class="text-lg">Please create a new discussion or select existing one to start</p></div>',1),gIe=[pIe];function mIe(t,e,n,s,o,r){return T(),L("div",fIe,gIe)}const Qf=Ge(hIe,[["render",mIe]]);const _Ie={setup(){return{}},name:"DragDrop",emits:["panelLeave","panelDrop"],data(){return{fileList:[],show:!1,dropRelease:!1}},mounted(){fe(()=>{we.replace()})},methods:{async panelDrop(t){const e="getAsFileSystemHandle"in DataTransferItem.prototype,n="webkitGetAsEntry"in DataTransferItem.prototype;if(!e&&!n)return;const s=[...t.dataTransfer.items].filter(r=>r.kind==="file").map(r=>e?r.getAsFileSystemHandle():r.webkitGetAsEntry());let o=[];for await(const r of s)(r.kind==="directory"||r.isDirectory)&&o.push(r.name);this.dropRelease=!0,t.dataTransfer.files.length>0&&[...t.dataTransfer.files].forEach(r=>{o.includes(r.name)||this.fileList.push(r)}),fe(()=>{we.replace()}),this. $ emit("panelDrop",this.fileList),this.fileList=[],this.show=!1},panelLeave(){this. $ emit("panelLeave"),console.log("exit/leave"),this.dropRelease=!1,this.show=!1,fe(()=>{we.replace()})}}},yIe={class:"text-4xl text-center"};function bIe(t,e,n,s,o,r){return T(),at(En,{name:"list",tag:"div"},{default:Qe(()=>[o.show?(T(),L("div",{key:"dropmenu",class:"select-none text-slate-50 absolute top-0 left-0 right-0 bottom-0 flex flex-col items-center justify-center bg-black bg-opacity-50 duration-200 backdrop-blur-sm",onDragleave:e[0]||(e[0]=le(i=>r.panelLeave(i),["prevent"])),onDrop:e[1]||(e[1]=le(i=>r.panelDrop(i),["stop","prevent"]))},[d("div",{class:Te(["flex flex-col items-center justify-center p-8 rounded-lg shadow-lg border-dashed border-4 border-secondary w-4/5 h-4/5",o.dropRelease?"":"pointer-events-none"])},[d("div",yIe,[Id(t. $ slots,"default",{},()=>[ke(" Drop your files here ")])])],2)],32)):G("",!0)]),_:3})}const _a=Ge(_Ie,[["render",bIe]]);var vIe=function(){function t(e,n){n===void 0&&(n=[]),this._eventType=e,this._eventFunctions=n}return t.prototype.init=function(){var e=this;this._eventFunctions.forEach(function(n){typeof window<"u"&&window.addEventListener(e._eventType,n)})},t}(),yr=globalThis&&globalThis.__assign||function(){return yr=Object.assign||function(t){for(var e,n=1,s=arguments.length;n<s;n++){e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},yr.apply(this,arguments)},br={alwaysOpen:!1,activeClasses:"bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white",inactiveClasses:"text-gray-500 dark:text-gray-400",onOpen:function(){},onClose:function(){},onToggle:function(){}},Xf=function(){function t(e,n){e===void 0&&(e=[]),n===void 0&&(n=br),this._items=e,this._options=yr(yr({},br),n),this._init()}return t.prototype._init=function(){var e=this;this._items.length&&this._items.m
2023-06-24 15:18:52 +00:00
Personality : $ { t . message . personality } ` );let s="";t.created_at_parsed&&(s= `
Created : $ { t . created _at _parsed } ` );let o="";t.message.content&&(o=t.message.content);let r="";t.message.model&&(r= ` Model : $ { t . message . model } ` );let i="";t.message.seed&&(i= ` Seed : $ { t . message . seed } ` );let a="";t.time_spent&&(a= `
Time spent : $ { t . time _spent } ` );let l="";l= ` $ { e } $ { r } $ { i } $ { a } ` .trim();const c= ` $ { t . message . sender } $ { n } $ { s }
$ { o }
$ { l } ` ;navigator.clipboard.writeText(c),fe(()=>{we.replace()})},closeToast(){this.showToast=!1},saveJSONtoFile(t,e){e=e||"data.json";const n=document.createElement("a");n.href=URL.createObjectURL(new Blob([JSON.stringify(t,null,2)],{type:"text/plain"})),n.setAttribute("download",e),document.body.appendChild(n),n.click(),document.body.removeChild(n)},parseJsonObj(t){try{return JSON.parse(t)}catch(e){return this. $ refs.toast.showToast( ` Could not parse JSON .
` +e.message,4,!1),null}},async parseJsonFile(t){return new Promise((e,n)=>{const s=new FileReader;s.onload=o=>e(this.parseJsonObj(o.target.result)),s.onerror=o=>n(o),s.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(),s=(e.getMonth()+1).toString().padStart(2,"0"),o=e.getDate().toString().padStart(2,"0"),r=e.getHours().toString().padStart(2,"0"),i=e.getMinutes().toString().padStart(2,"0"),a=e.getSeconds().toString().padStart(2,"0"),c="discussions_export_"+(n+"."+s+"."+o+"."+r+i+a)+".json";this.loading=!0;const u=await this.export_multiple_discussions(t);u?(this.saveJSONtoFile(u,c),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 s=0;s<n.length;s++){const o=n[s],r=e[o],i=Object.keys(r);for(let a=0;a<i.length;a++){const l=i[a],u=r[l].map(h=>{let f={};return f=h,f.category=l,f.language=o,f});t.length==0?t=u:t=t.concat(u)}}this.personalityAvatars=t.map(s=>({name:s.name,avatar:s.avatar}))},getAvatar(t){const e=this.personalityAvatars.findIndex(s=>s.name===t),n=this.personalityAvatars[e];if(n)return n.avatar},setFileListChat(t){try{this. $ refs.chatBox.fileList=this. $ refs.chatBox.fileList.concat(t)}catch(e){this. $ refs.toast.showToast( ` Failed to set filelist in chatbox
2023-06-26 22:51:32 +00:00
` +e.message,4,!1)}this.isDragOverChat=!1},setDropZoneChat(){this.isDragOverChat=!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(()=>{we.replace()}), $ e.on("infos",this.createBotMsg), $ e.on("message",this.streamMessageContent), $ e.on("final",this.finalMsgEvent)},mounted(){},async activated(){console.log("Websocket connected (activated)",this.socketConnected),await this.getPersonalityAvatars(),this.isCreated&&(this.loadLastUsedDiscussion(),fe(()=>{const t=document.getElementById("messages-list");this.scrollBottom(t)}))},components:{Discussion:mf,Message:Jf,ChatBox:Yf,WelcomeComponent:Qf,Toast:tl,DragDrop:_a},watch:{filterTitle(t){t==""&&(this.filterInProgress=!0,this.list=this.tempList,this.filterInProgress=!1)},isCheckbox(t){fe(()=>{we.replace()}),t||(this.isSelectAll=!1)},socketConnected(t){console.log("Websocket connected (watch)",t)},showConfirmation(){fe(()=>{we.replace()})},isSearch(){fe(()=>{we.replace()})}},computed:{socketConnected(){return!0},selectedDiscussions(){return fe(()=>{we.replace()}),this.list.filter(t=>t.checkBoxValue==!0)}}},A $ e=Object.assign(E $ e,{__name:"DiscussionsView",setup(t){return Fr(()=>{AFe()}),De.defaults.baseURL="/",(e,n)=>(T(),L(Ie,null,[d("div",TFe,[d("div",{id:"leftPanel",class:"flex flex-col flex-grow overflow-y-scroll no-scrollbar",onDragover:n[13]||(n[13]=le(s=>e.setDropZoneDiscussion(),["stop","prevent"]))},[d("div",MFe,[d("div",DFe,[d("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Create new discussion",type:"button",onClick:n[0]||(n[0]=s=>e.createNewDiscussion())},OFe),d("button",{class:Te(["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]=s=>e.isCheckbox=!e.isCheckbox)},RFe,2),PFe,IFe,d("input",{type:"file",ref:"fileDialog",style:{display:"none"},onChange:n[2]||(n[2]=(...s)=>e.importDiscussions&&e.importDiscussions(...s))},null,544),d("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Import discussions",type:"button",onClick:n[3]||(n[3]=le(s=>e. $ refs.fileDialog.click(),["stop"]))}, $ Fe),d("button",{class:Te(["text-2xl hover:text-secondary duration-75 active:scale-90",e.isSearch?"text-secondary":""]),title:"Filter discussions",type:"button",onClick:n[4]||(n[4]=s=>e.isSearch=!e.isSearch)},zFe,2),e.loading?(T(),L("div",BFe,UFe)):G("",!0)]),e.isSearch?(T(),L("div",HFe,[d("div",VFe,[d("div",GFe,[KFe,d("div",WFe,[d("div",{class:Te(["hover:text-secondary duration-75 active:scale-90",e.filterTitle?"visible":"invisible"]),title:"Clear",onClick:n[5]||(n[5]=s=>e.filterTitle="")},JFe,2)]),Ae(d("input",{type:"search",id:"default-search",class:"block w-full p-2 pl-10 pr-10 text-sm border border-gray-300 rounded-lg bg-bg-light focus:ring-secondary focus:border-secondary dark:bg-bg-dark dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-secondary dark:focus:border-secondary",placeholder:"Search...",title:"Filter discussions by title","onUpdate:modelValue":n[6]||(n[6]=s=>e.filterTitle=s),onInput:n[7]||(n[7]=s=>e.filterDiscussions())},null,544),[[qe,e.filterTitle]])])])])):G("",!0),e.isCheckbox?(T(),L("hr",YFe)):G("",!0),e.isCheckbox?(T(),L("div",QFe,[d("div",XFe,[e.selectedDiscussions.length>0?(T(),L("p",e $ e,"Selected: "+Z(e.selectedDiscussions.length),1)):G("",!0)]),d("div",t $ e,[e.selectedDiscussions.length>0?(T(),L("div",n $ e,[e.showConfirmation?G("",!0):(T(),L("button",{key:0,class:"flex mx-3 flex-1 text-