1function Te(){import.meta.url,import("_").catch(()=>1);async function*e(){}}function _t(){return W().__VUE_DEVTOOLS_GLOBAL_HOOK__}function W(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const pt=typeof Proxy=="function",gt="devtools-plugin:setup",vt="plugin:settings:set";let b,V;function bt(){var e;return b!==void 0||(typeof window<"u"&&window.performance?(b=!0,V=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(b=!0,V=globalThis.perf_hooks.performance):b=!1),b}function yt(){return bt()?V.now():Date.now()}class wt{constructor(t,o){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=o;const n={};if(t.settings)for(const i in t.settings){const a=t.settings[i];n[i]=a.defaultValue}const s="__vue-devtools-plugin-settings__".concat(t.id);let r=Object.assign({},n);try{const i=localStorage.getItem(s),a=JSON.parse(i);Object.assign(r,a)}catch(i){}this.fallbacks={getSettings(){return r},setSettings(i){try{localStorage.setItem(s,JSON.stringify(i))}catch(a){}r=i},now(){return yt()}},o&&o.on(vt,(i,a)=>{i===this.plugin.id&&this.fallbacks.setSettings(a)}),this.proxiedOn=new Proxy({},{get:(i,a)=>this.target?this.target.on[a]:(...l)=>{this.onQueue.push({method:a,args:l})}}),this.proxiedTarget=new Proxy({},{get:(i,a)=>this.target?this.target[a]:a==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(a)?(...l)=>(this.targetQueue.push({method:a,args:l,resolve:()=>{}}),this.fallbacks[a](...l)):(...l)=>new Promise(d=>{this.targetQueue.push({method:a,args:l,resolve:d})})})}async setRealTarget(t){this.target=t;for(const o of this.onQueue)this.target.on[o.method](...o.args);for(const o of this.targetQueue)o.resolve(await this.target[o.method](...o.args))}}function Et(e,t){const o=e,n=W(),s=_t(),r=pt&&o.enableEarlyProxy;if(s&&(n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!r))s.emit(gt,e,t);else{const i=r?new wt(o,s):null;(n.__VUE_DEVTOOLS_PLUGINS__=n.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:o,setupFn:t,proxy:i}),i&&t(i.proxiedTarget)}}/*! 2 * vuex v4.1.0 3 * (c) 2022 Evan You 4 * @license MIT 5 */window.Vue.inject;const St=window.Vue.effectScope,Ct=window.Vue.reactive,Y=window.Vue.watch,xt=window.Vue.computed;var kt="store";function E(e,t){Object.keys(e).forEach(function(o){return t(e[o],o)})}function X(e){return e!==null&&typeof e=="object"}function Tt(e){return e&&typeof e.then=="function"}function Nt(e,t){return function(){return e(t)}}function Z(e,t,o){return t.indexOf(e)<0&&(o&&o.prepend?t.unshift(e):t.push(e)),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function tt(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var o=e.state;N(e,o,[],e._modules.root,!0),L(e,o,t)}function L(e,t,o){var n=e._state,s=e._scope;e.getters={},e._makeLocalGettersCache=Object.create(null);var r=e._wrappedGetters,i={},a={},l=St(!0);l.run(function(){E(r,function(d,u){i[u]=Nt(d,e),a[u]=xt(function(){return i[u]()}),Object.defineProperty(e.getters,u,{get:function(){return a[u].value},enumerable:!0})})}),e._state=Ct({data:t}),e._scope=l,e.strict&&It(e),n&&o&&e._withCommit(function(){n.data=null}),s&&s.stop()}function N(e,t,o,n,s){var r=!o.length,i=e._modules.getNamespace(o);if(n.namespaced&&(e._modulesNamespaceMap[i],e._modulesNamespaceMap[i]=n),!r&&!s){var a=$(t,o.slice(0,-1)),l=o[o.length-1];e._withCommit(function(){a[l]=n.state})}var d=n.context=Ot(e,i,o);n.forEachMutation(function(u,c){var h=i+c;At(e,h,u,d)}),n.forEachAction(function(u,c){var h=u.root?c:i+c,f=u.handler||u;Mt(e,h,f,d)}),n.forEachGetter(function(u,c){var h=i+c;Vt(e,h,u,d)}),n.forEachChild(function(u,c){N(e,t,o.concat(c),u,s)})}function Ot(e,t,o){var n=t==="",s={dispatch:n?e.dispatch:function(r,i,a){var l=T(r,i,a),d=l.payload,u=l.options,c=l.type;return(!u||!u.root)&&(c=t+c),e.dispatch(c,d)},commit:n?e.commit:function(r,i,a){var l=T(r,i,a),d=l.payload,u=l.options,c=l.type;(!u||!u.root)&&(c=t+c),e.commit(c,d,u)}};return Object.defineProperties(s,{getters:{get:n?function(){return e.getters}:function(){return et(e,t)}},state:{get:function(){return $(e.state,o)}}}),s}function et(e,t){if(!e._makeLocalGettersCache[t]){var o={},n=t.length;
5Object.keys(e.getters).forEach(function(s){if(s.slice(0,n)===t){var r=s.slice(n);Object.defineProperty(o,r,{get:function(){return e.getters[s]},enumerable:!0})}}),e._makeLocalGettersCache[t]=o}return e._makeLocalGettersCache[t]}function At(e,t,o,n){var s=e._mutations[t]||(e._mutations[t]=[]);s.push(function(i){o.call(e,n.state,i)})}function Mt(e,t,o,n){var s=e._actions[t]||(e._actions[t]=[]);s.push(function(i){var a=o.call(e,{dispatch:n.dispatch,commit:n.commit,getters:n.getters,state:n.state,rootGetters:e.getters,rootState:e.state},i);return Tt(a)||(a=Promise.resolve(a)),e._devtoolHook?a.catch(function(l){throw e._devtoolHook.emit("vuex:error",l),l}):a})}function Vt(e,t,o,n){e._wrappedGetters[t]||(e._wrappedGetters[t]=function(r){return o(n.state,n.getters,r.state,r.getters)})}function It(e){Y(function(){return e._state.data},function(){},{deep:!0,flush:"sync"})}function $(e,t){return t.reduce(function(o,n){return o[n]},e)}function T(e,t,o){return X(e)&&e.type&&(o=t,t=e,e=e.type),{type:e,payload:t,options:o}}var Lt="vuex bindings",P="vuex:mutations",O="vuex:actions",y="vuex",$t=0;function jt(e,t){Et({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[Lt]},function(o){o.addTimelineLayer({id:P,label:"Vuex Mutations",color:G}),o.addTimelineLayer({id:O,label:"Vuex Actions",color:G}),o.addInspector({id:y,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),o.on.getInspectorTree(function(n){if(n.app===e&&n.inspectorId===y)if(n.filter){var s=[];rt(s,t._modules.root,n.filter,""),n.rootNodes=s}else n.rootNodes=[st(t._modules.root,"")]}),o.on.getInspectorState(function(n){if(n.app===e&&n.inspectorId===y){var s=n.nodeId;et(t,s),n.state=Pt(Dt(t._modules,s),s==="root"?t.getters:t._makeLocalGettersCache,s)}}),o.on.editInspectorState(function(n){if(n.app===e&&n.inspectorId===y){var s=n.nodeId,r=n.path;s!=="root"&&(r=s.split("/").filter(Boolean).concat(r)),t._withCommit(function(){n.set(t._state.data,r,n.state.value)})}}),t.subscribe(function(n,s){var r={};n.payload&&(r.payload=n.payload),r.state=s,o.notifyComponentUpdate(),o.sendInspectorTree(y),o.sendInspectorState(y),o.addTimelineEvent({layerId:P,event:{time:Date.now(),title:n.type,data:r}})}),t.subscribeAction({before:function(n,s){var r={};n.payload&&(r.payload=n.payload),n._id=$t++,n._time=Date.now(),r.state=s,o.addTimelineEvent({layerId:O,event:{time:n._time,title:n.type,groupId:n._id,subtitle:"start",data:r}})},after:function(n,s){var r={},i=Date.now()-n._time;r.duration={_custom:{type:"duration",display:i+"ms",tooltip:"Action duration",value:i}},n.payload&&(r.payload=n.payload),r.state=s,o.addTimelineEvent({layerId:O,event:{time:Date.now(),title:n.type,groupId:n._id,subtitle:"end",data:r}})}})})}var G=8702998,Rt=6710886,Ut=16777215,nt={label:"namespaced",textColor:Ut,backgroundColor:Rt};function ot(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function st(e,t){return{id:t||"root",label:ot(t),tags:e.namespaced?[nt]:[],children:Object.keys(e._children).map(function(o){return st(e._children[o],t+o+"/")})}}function rt(e,t,o,n){n.includes(o)&&e.push({id:n||"root",label:n.endsWith("/")?n.slice(0,n.length-1):n||"Root",tags:t.namespaced?[nt]:[]}),Object.keys(t._children).forEach(function(s){rt(e,t._children[s],o,n+s+"/")})}function Pt(e,t,o){t=o==="root"?t:t[o];var n=Object.keys(t),s={state:Object.keys(e.state).map(function(i){return{key:i,editable:!0,value:e.state[i]}})};if(n.length){var r=Gt(t);s.getters=Object.keys(r).map(function(i){return{key:i.endsWith("/")?ot(i):i,editable:!1,value:I(function(){return r[i]})}})}return s}function Gt(e){var t={};return Object.keys(e).forEach(function(o){var n=o.split("/");if(n.length>1){var s=t,r=n.pop();n.forEach(function(i){s[i]||(s[i]={_custom:{value:{},display:i,tooltip:"Module",abstract:!0}}),s=s[i]._custom.value}),s[r]=I(function(){return e[o]})}else t[o]=I(function(){return e[o]})}),t}function Dt(e,t){var o=t.split("/").filter(function(n){return n});return o.reduce(function(n,s,r){var i=n[s];if(!i)throw new Error('Missing module "'+s+'" for path "'+t+'".');return r===o.length-1?i:i._children},t==="root"?e:e.root._children)}function I(e){try{return e()}catch(t){return t}}var p=function(t,o){this.runtime=o,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=(typeof n=="function"?n():n)||{}},it={namespaced:{configurable:!0}};it.namespaced.get=function(){return!!this._rawModule.namespaced};p.prototype.addChild=function(t,o){this._children[t]=o};p.prototype.removeChild=function(t){delete this._children[t]};p.prototype.getChild=function(t){return this._children[t]};p.prototype.hasChild=function(t){return t in this._children};p.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)};p.prototype.forEachChild=function(t){E(this._children,t)};p.prototype.forEachGetter=function(t){this._rawModule.getters&&E(this._rawModule.getters,t)};p.prototype.forEachAction=function(t){this._rawModule.actions&&E(this._rawModule.actions,t)};p.prototype.forEachMutation=function(t){this._rawModule.mutations&&E(this._rawModule.mutations,t)};Object.defineProperties(p.prototype,it);var v=function(t){this.register([],t,!1)};v.prototype.get=function(t){return t.reduce(function(o,n){return o.getChild(n)},this.root)};v.prototype.getNamespace=function(t){var o=this.root;return t.reduce(function(n,s){return o=o.getChild(s),n+(o.namespaced?s+"/":"")},"")};v.prototype.update=function(t){at([],this.root,t)};v.prototype.register=function(t,o,n){var s=this;n===void 0&&(n=!0);var r=new p(o,n);if(t.length===0)this.root=r;else{var i=this.get(t.slice(0,-1));i.addChild(t[t.length-1],r)}o.modules&&E(o.modules,function(a,l){s.register(t.concat(l),a,n)})};v.prototype.unregister=function(t){var o=this.get(t.slice(0,-1)),n=t[t.length-1],s=o.getChild(n);s&&s.runtime&&o.removeChild(n)};v.prototype.isRegistered=function(t){var o=this.get(t.slice(0,-1)),n=t[t.length-1];return o?o.hasChild(n):!1};function at(e,t,o){if(t.update(o),o.modules)for(var n in o.modules){if(!t.getChild(n))return;at(e.concat(n),t.getChild(n),o.modules[n])}}var _=function(t){var o=this;t===void 0&&(t={});var n=t.plugins;n===void 0&&(n=[]);var s=t.strict;s===void 0&&(s=!1);var r=t.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new v(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=r;var i=this,a=this,l=a.dispatch,d=a.commit;this.dispatch=function(h,f){return l.call(i,h,f)},this.commit=function(h,f,S){return d.call(i,h,f,S)},this.strict=s;var u=this._modules.root.state;
5N(this,u,[],this._modules.root),L(this,u),n.forEach(function(c){return c(o)})},j={state:{configurable:!0}};_.prototype.install=function(t,o){t.provide(o||kt,this),t.config.globalProperties.$store=this;var n=this._devtools!==void 0?this._devtools:!1;n&&jt(t,this)};j.state.get=function(){return this._state.data};j.state.set=function(e){};_.prototype.commit=function(t,o,n){var s=this,r=T(t,o,n),i=r.type,a=r.payload,l={type:i,payload:a},d=this._mutations[i];d&&(this._withCommit(function(){d.forEach(function(c){c(a)})}),this._subscribers.slice().forEach(function(u){return u(l,s.state)}))};_.prototype.dispatch=function(t,o){var n=this,s=T(t,o),r=s.type,i=s.payload,a={type:r,payload:i},l=this._actions[r];if(l){try{this._actionSubscribers.slice().filter(function(u){return u.before}).forEach(function(u){return u.before(a,n.state)})}catch(u){}var d=l.length>1?Promise.all(l.map(function(u){return u(i)})):l[0](i);return new Promise(function(u,c){d.then(function(h){try{n._actionSubscribers.filter(function(f){return f.after}).forEach(function(f){return f.after(a,n.state)})}catch(f){}u(h)},function(h){try{n._actionSubscribers.filter(function(f){return f.error}).forEach(function(f){return f.error(a,n.state,h)})}catch(f){}c(h)})})}};_.prototype.subscribe=function(t,o){return Z(t,this._subscribers,o)};_.prototype.subscribeAction=function(t,o){var n=typeof t=="function"?{before:t}:t;return Z(n,this._actionSubscribers,o)};_.prototype.watch=function(t,o,n){var s=this;return Y(function(){return t(s.state,s.getters)},o,Object.assign({},n))};_.prototype.replaceState=function(t){var o=this;this._withCommit(function(){o._state.data=t})};_.prototype.registerModule=function(t,o,n){n===void 0&&(n={}),typeof t=="string"&&(t=[t]),this._modules.register(t,o),N(this,this.state,t,this._modules.get(t),n.preserveState),L(this,this.state)};_.prototype.unregisterModule=function(t){var o=this;typeof t=="string"&&(t=[t]),this._modules.unregister(t),this._withCommit(function(){var n=$(o.state,t.slice(0,-1));delete n[t[t.length-1]]}),tt(this)};_.prototype.hasModule=function(t){return typeof t=="string"&&(t=[t]),this._modules.isRegistered(t)};_.prototype.hotUpdate=function(t){this._modules.update(t),tt(this,!0)};_.prototype._withCommit=function(t){var o=this._committing;this._committing=!0,t(),this._committing=o};Object.defineProperties(_.prototype,j);var ut=lt(function(e,t){var o={};return ct(t).forEach(function(n){var s=n.key,r=n.val;r=e+r,o[s]=function(){if(!(e&&!dt(this.$store,"mapGetters",e)))return this.$store.getters[r]},o[s].vuex=!0}),o}),Bt=lt(function(e,t){var o={};return ct(t).forEach(function(n){var s=n.key,r=n.val;o[s]=function(){for(var a=[],l=arguments.length;l--;)a[l]=arguments[l];var d=this.$store.dispatch;if(e){var u=dt(this.$store,"mapActions",e);if(!u)return;d=u.context.dispatch}return typeof r=="function"?r.apply(this,[d].concat(a)):d.apply(this.$store,[r].concat(a))}}),o});function ct(e){return Ht(e)?Array.isArray(e)?e.map(function(t){return{key:t,val:t}}):Object.keys(e).map(function(t){return{key:t,val:e[t]}}):[]}function Ht(e){return Array.isArray(e)||X(e)}function lt(e){return function(t,o){return typeof t!="string"?(o=t,t=""):t.charAt(t.length-1)!=="/"&&(t+="/"),e(t,o)}}function dt(e,t,o){var n=e._modulesNamespaceMap[o];return n}const ft=(e,t)=>{const o=e.__vccOpts||e;for(const[n,s]of t)o[n]=s;return o},zt={name:"SoylentLink",props:{url:{type:String,default:""},callback:{default:!1},blank:{type:Boolean,default:null},useRouter:{type:Boolean,default:!0}},computed:{isAnchor(){return this.url&&(this.url.charAt(0)==="#"||this.url.substring(0,2)==="/#")},useRouterLink:function(){return!(this.callback!==!1||this.isExternalLink||this.blank===!0||this.isAnchor)},target:function(){if(this.blank!==!1&&!this.isAnchor||this.blank===null&&this.isExternalLink&&!this.isAnchor)return"_blank"},isExternalLink:function(){return this.useRouter===!1||this.$routerLink(this.url).match(/^(https?:\/\/|mailto:|tel:\/\/)/)}}},A=window.Vue.renderSlot,Kt=window.Vue.resolveComponent,Ft=window.Vue.withCtx,M=window.Vue.openBlock,Qt=window.Vue.createBlock;window.Vue.createCommentVNode;const Jt=window.Vue.withModifiers,D=window.Vue.createElementBlock,qt=["href","target"];function Wt(e,t,o,n,s,r){const i=Kt("router-link");return r.useRouterLink?(M(),Qt(i,{key:0,to:e.$routerLink(o.url)},{default:Ft(()=>[A(e.$slots,"default")]),_:3},8,["to"])):o.callback!==!1?(M(),D("a",{key:1,href:"#",onClick:t[0]||(t[0]=Jt((...a)=>o.callback&&o.callback(...a),["prevent","stop"]))},[A(e.$slots,"default")])):(M(),D("a",{key:2,href:o.url,target:r.target},[A(e.$slots,"default")],8,qt))}const ht=ft(zt,[["render",Wt]]),x={SET_USERNAME:"SET_USERNAME",CHATTING:"CHATTING",UPDATE_USERNAME:"UPDATE_USERNAME"},B=function e(t){function o(s,r,i){var a,l={};if(Array.isArray(s))return s.concat(r);for(a in s)l[i?a.toLowerCase():a]=s[a];for(a in r){var d=i?a.toLowerCase():a,u=r[a];l[d]=d in l&&typeof u=="object"?o(l[d],u,d=="headers"):u}return l}
5function n(s,r,i,a,l){var d=typeof s!="string"?(r=s).url:s,u={config:r},c=o(t,r),h={};a=a||c.data,(c.transformRequest||[]).map(function(f){a=f(a,c.headers)||a}),c.auth&&(h.authorization=c.auth),a&&typeof a=="object"&&typeof a.append!="function"&&typeof a.text!="function"&&(a=JSON.stringify(a),h["content-type"]="application/json");try{h[c.xsrfHeaderName]=decodeURIComponent(document.cookie.match(RegExp("(^|; )"+c.xsrfCookieName+"=([^;]*)"))[2])}catch(f){}return c.baseURL&&(d=d.replace(/^(?!.*\/\/)\/?/,c.baseURL+"/")),c.params&&(d+=(~d.indexOf("?")?"&":"?")+(c.paramsSerializer?c.paramsSerializer(c.params):new URLSearchParams(c.params))),(c.fetch||fetch)(d,{method:(i||c.method||"get").toUpperCase(),body:a,headers:o(c.headers,h,!0),credentials:c.withCredentials?"include":l}).then(function(f){for(var S in f)typeof f[S]!="function"&&(u[S]=f[S]);return c.responseType=="stream"?(u.data=f.body,u):f[c.responseType||"text"]().then(function(U){u.data=U,u.data=JSON.parse(U)}).catch(Object).then(function(){return(c.validateStatus?c.validateStatus(f.status):f.ok)?u:Promise.reject(u)})})}return t=t||{},n.request=n,n.get=function(s,r){return n(s,r,"get")},n.delete=function(s,r){return n(s,r,"delete")},n.head=function(s,r){return n(s,r,"head")},n.options=function(s,r){return n(s,r,"options")},n.post=function(s,r,i){return n(s,i,"post",r)},n.put=function(s,r,i){return n(s,i,"put",r)},n.patch=function(s,r,i){return n(s,i,"patch",r)},n.all=Promise.all.bind(Promise),n.spread=function(s){return s.apply.bind(s,s)},n.CancelToken=typeof AbortController=="function"?AbortController:Object,n.defaults=t,n.create=e,n}(),Yt={name:"Message",props:{message:{type:String}},computed:{...ut("sso",["userName"]),initals(){return this.getInitials(this.message.user_nickname)},classes(){let e=["shoutbox__message"];return this.message.user_name===this.userName&&e.push("--color-self"),e},userColor(){return this.stringToHue(this.message.user_nickname)},formatTimestamp(){const e=this.message.timestamp*1e3,t=Date.now(),o=Math.floor((t-e)/6e4);if(o<1)return"gerade eben";if(o<10)return"vor ".concat(o," Minuten");{const n=new Date(e),s=n.getHours().toString().padStart(2,"0"),r=n.getMinutes().toString().padStart(2,"0");return"".concat(s,":").concat(r)}}},methods:{stringToHue(e){let t=0;for(let o=0;o<e.length;o++)t=e.charCodeAt(o)+((t<<5)-t);return Math.abs(t%360)},getInitials(e){return!e||typeof e!="string"?"":e.trim().split(/\s+/).filter(n=>n.length>0).slice(0,2).map(n=>n[0].toUpperCase()).join("")}}},k=window.Vue.toDisplayString,C=window.Vue.createElementVNode,Xt=window.Vue.normalizeClass,Zt=window.Vue.normalizeStyle,te=window.Vue.openBlock,ee=window.Vue.createElementBlock,ne={class:"shoutbox__message__avatar"},oe={class:"shoutbox__message__header"},se={class:"shoutbox__message__author"},re={class:"shoutbox__message__timestamp"},ie={class:"shoutbox__message__content"};function ae(e,t,o,n,s,r){return te(),ee("div",{class:Xt(r.classes),style:Zt("--message-color-hue:"+r.userColor)},[C("div",ne,k(r.initals),1),C("div",oe,[C("span",se,k(o.message.user_nickname),1),C("span",re,k(r.formatTimestamp),1)]),C("span",ie,k(o.message.text),1)],6)}const mt=ft(Yt,[["render",ae]]),ue=window.Vue.renderList,H=window.Vue.Fragment,g=window.Vue.openBlock,w=window.Vue.createElementBlock,ce=window.Vue.createBlock,m=window.Vue.createElementVNode,z=window.Vue.unref,K=window.Vue.vModelText,F=window.Vue.withKeys,Q=window.Vue.withDirectives,J=window.Vue.createCommentVNode,le=window.Vue.withCtx,de=window.Vue.createVNode,fe=window.Vue.normalizeClass,he=window.Vue.normalizeStyle,me={class:"shoutbox__wrapper"},_e={class:"shoutbox__messages-wrapper"},pe={class:"shoutbox__messages",ref:"scrollContainer"},ge={key:0,class:"shoutbox__footer idvl-contactform-wrapper"},ve={class:"shoutbox__footer__tools"},be={key:1,class:"shoutbox__footer idvl-contactform-wrapper"},ye={class:"shoutbox__footer__tools"},we={key:1,class:"sso-auth__card --with-icon"},Ee={name:"Shoutbox",components:{Message:mt,SoylentLink:ht},data(){return{mode:x.SET_USERNAME,shoutboxUserName:null,message:"",messages:[],messagesPointer:-20,intervalId:0,messagesFiltered:[],loading:!1,lastCalled:0}},props:{element:{type:Object}},computed:{...ut("sso",["auth","registerUrl","logoutUrl","userName","userMail","userNameReadable","userData"]),nickName(){return this.shoutboxUserName?this.shoutboxUserName:this.userNameReadable},profilePageUrl(){return"profile_page"in window.soylent_settings?window.soylent_settings.profile_page:"/"},shoutboxId(){return this.element.data.shoutbox_id},shoutboxHeight(){return this.element.data.shoutbox_height}},methods:{...Bt("sso",["setRedirectPath"]),async loadMessages(){this.loading||(this.loading=!0,await B.get("/cmms/cmms_shoutbox/shoutbox_"+this.shoutboxId+".json").then(e=>{this.messages=e.data,this.messagesFiltered=this.messages.slice(0,50).reverse(),this.scrollToBottom(),this.loading=!1}
5).catch(e=>{this.messages=[],this.loading=!1}))},async sendMessage(){const e=Date.now();if(this.message.length!==""&&e-this.lastCalled>=3e3){this.lastCalled=e;let t={id:this.shoutboxId,text:this.message,user_name:this.userName,user_nickname:this.nickName};await B.post("/cmms-api/v3/cmms_shoutbox/insert/",t).then(o=>{o.data.success===!0&&(this.message="",this.loadMessages())})}},scrollToBottom(){this.$nextTick(()=>{const e=this.$refs.scrollContainer;e&&(e.scrollTop=e.scrollHeight)})},setName(){this.shoutboxUserName!==""&&(this.mode=x.CHATTING)},editName(){this.mode=x.SET_USERNAME}},mounted(){this.setRedirectPath(window.location.pathname),this.loadMessages(),this.shoutboxUserName=this.userNameReadable,this.intervalId=setInterval(this.loadMessages,1e4)},beforeUnmount(){clearInterval(this.intervalId)}},Se=Object.assign(Ee,{setup(e){return(t,o)=>(g(),w("div",{class:fe(["element",e.element.type,"shoutbox"]),style:he("--min-height: ".concat(t.shoutboxHeight,"px"))},[m("div",me,[m("div",_e,[m("div",pe,[(g(!0),w(H,null,ue(t.messagesFiltered,(n,s)=>(g(),ce(mt,{message:n,key:s+"_message_"+n.timestamp},null,8,["message"]))),128))],512)]),t.auth?(g(),w(H,{key:0},[t.mode===z(x).SET_USERNAME?(g(),w("div",ge,[Q(m("input",{type:"text",maxlength:"20",placeholder:"Benutzername","onUpdate:modelValue":o[0]||(o[0]=n=>t.shoutboxUserName=n),onKeyup:o[1]||(o[1]=F((...n)=>t.setName&&t.setName(...n),["enter"]))},null,544),[[K,t.shoutboxUserName]]),m("div",ve,[m("button",{onClick:o[2]||(o[2]=(...n)=>t.setName&&t.setName(...n)),class:"shoutbox__footer__tools__button --submit"},o[7]||(o[7]=[m("span",{class:"shoutbox__footer__tools__button__text"},"Name bestätigen",-1),m("span",{class:"iconSet"},"login",-1)]))])])):J("",!0),t.mode===z(x).CHATTING?(g(),w("div",be,[Q(m("input",{"onUpdate:modelValue":o[3]||(o[3]=n=>t.message=n),onKeyup:o[4]||(o[4]=F((...n)=>t.sendMessage&&t.sendMessage(...n),["enter"])),type:"text",maxlength:"320",placeholder:"Nachricht eingeben"},null,544),[[K,t.message]]),m("div",ye,[m("button",{onClick:o[5]||(o[5]=(...n)=>t.editName&&t.editName(...n)),class:"shoutbox__footer__tools__button",title:"Name ändern"},o[8]||(o[8]=[m("span",{class:"shoutbox__footer__tools__button__icon iconSet"},"account_box",-1)])),m("button",{onClick:o[6]||(o[6]=(...n)=>t.sendMessage&&t.sendMessage(...n)),class:"shoutbox__footer__tools__button --submit",title:"Absenden"},o[9]||(o[9]=[m("span",{class:"shoutbox__footer__tools__button__icon iconSet"},"send",-1)]))])])):J("",!0)],64)):(g(),w("div",we,[o[11]||(o[11]=m("span",{class:"iconSet sso-auth__card__icon"},null,-1)),o[12]||(o[12]=m("h3",{class:"sso-auth__card__headline"},"Anmelden um teilzunehmen",-1)),de(ht,{url:t.profilePageUrl,class:"sso-auth__card__button"},{default:le(()=>o[10]||(o[10]=[m("span",{class:"sso-auth__card__button__label"},[m("span",{class:"sso-auth__card__button__text"},"zum Login")],-1)])),_:1},8,["url"])]))])],6))}}),Ce=10,xe=250;let q=0;window.addEventListener("ELEMENT_PROVIDER_READY",e=>{R()});function ke(){q<Ce&&(setTimeout(R,xe),q++)}function R(){if("soylentEditorElementProvider"in window){const e={CmmsShoutbox:Se};Object.keys(e).forEach(t=>{window.soylentEditorElementProvider.has(t)||(window.soylentEditorElementProvider.set({[t]:e[t]}),console.debug("[cmms-shoutbox] Registered CMMS editor element [".concat(t,"]")))})}else console.debug("[cmms-shoutbox] SoylentEditorElementProvider not available, waiting"),ke()}R();export{Te as __vite_legacy_guard};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.