@enablerr-ui/form 0.2.85 → 0.2.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.min.js +1 -1
- package/package.json +1 -1
package/dist/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["axios","@enablerr-ui/auth","@enablerr-ui/layout"],(function(t){"use strict";var e,n,o,a;return{setters:[function(t){e=t.default},function(t){n=t.user},function(t){o=t.getGridHelp,a=t.getAttractions}],execute:function(){function s(){}function i(t,e){for(const n in e)t[n]=e[n];return t}function r(t){return t()}function c(){return Object.create(null)}function l(t){t.forEach(r)}function u(t){return"function"==typeof t}function d(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function p(t,...e){if(null==t)return s;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function f(t){let e;return p(t,(t=>e=t))(),e}function h(t,e,n,o){if(t){const a=m(t,e,n,o);return t[0](a)}}function m(t,e,n,o){return t[1]&&o?i(n.ctx.slice(),t[1](o(e))):n.ctx}function g(t,e,n,o,a,s,i){const r=function(t,e,n,o){if(t[2]&&o){const a=t[2](o(n));if(void 0===e.dirty)return a;if("object"==typeof a){const t=[],n=Math.max(e.dirty.length,a.length);for(let o=0;o<n;o+=1)t[o]=e.dirty[o]|a[o];return t}return e.dirty|a}return e.dirty}(e,o,a,s);if(r){const a=m(e,n,o,i);t.p(a,r)}}function $(t,e){const n={};e=new Set(e);for(const o in t)e.has(o)||"$"===o[0]||(n[o]=t[o]);return n}function y(t,e,n){t.insertBefore(e,n||null)}function w(t){t.parentNode.removeChild(t)}function v(t){return document.createElement(t)}function x(){return t="",document.createTextNode(t);var t}function b(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function k(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}let _;function S(t){_=t}function D(){if(!_)throw new Error("Function called outside component initialization");return _}function T(){const t=D();return(e,n)=>{const o=t.$$.callbacks[e];if(o){const a=function(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}(e,n);o.slice().forEach((e=>{e.call(t,a)}))}}}const E=[],I=[],j=[],N=[],C=Promise.resolve();let L=!1;function M(t){j.push(t)}function F(t){N.push(t)}let A=!1;const P=new Set;function O(){if(!A){A=!0;do{for(let t=0;t<E.length;t+=1){const e=E[t];S(e),B(e.$$)}for(S(null),E.length=0;I.length;)I.pop()();for(let t=0;t<j.length;t+=1){const e=j[t];P.has(e)||(P.add(e),e())}j.length=0}while(E.length);for(;N.length;)N.pop()();L=!1,A=!1,P.clear()}}function B(t){if(null!==t.fragment){t.update(),l(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(M)}}const V=new Set;let q;function R(){q={r:0,c:[],p:q}}function U(){q.r||l(q.c),q=q.p}function z(t,e){t&&t.i&&(V.delete(t),t.i(e))}function H(t,e,n,o){if(t&&t.o){if(V.has(t))return;V.add(t),q&&q.c.push((()=>{V.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}function W(t,e){const n=e.token={};function o(t,o,a,s){if(e.token!==n)return;e.resolved=s;let i=e.ctx;void 0!==a&&(i=i.slice(),i[a]=s);const r=t&&(e.current=t)(i);let c=!1;e.block&&(e.blocks?e.blocks.forEach(((t,n)=>{n!==o&&t&&(R(),H(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),U())})):e.block.d(1),r.c(),z(r,1),r.m(e.mount(),e.anchor),c=!0),e.block=r,e.blocks&&(e.blocks[o]=r),c&&O()}if((a=t)&&"object"==typeof a&&"function"==typeof a.then){const n=D();if(t.then((t=>{S(n),o(e.then,1,e.value,t),S(null)}),(t=>{if(S(n),o(e.catch,2,e.error,t),S(null),!e.hasCatch)throw t})),e.current!==e.pending)return o(e.pending,0),!0}else{if(e.current!==e.then)return o(e.then,1,e.value,t),!0;e.resolved=t}var a}function K(t,e,n){const o=e.slice(),{resolved:a}=t;t.current===t.then&&(o[t.value]=a),t.current===t.catch&&(o[t.error]=a),t.block.p(o,n)}function G(t,e,n){const o=t.$$.props[e];void 0!==o&&(t.$$.bound[o]=n,n(t.$$.ctx[o]))}function J(t){t&&t.c()}function Q(t,e,n,o){const{fragment:a,on_mount:s,on_destroy:i,after_update:c}=t.$$;a&&a.m(e,n),o||M((()=>{const e=s.map(r).filter(u);i?i.push(...e):l(e),t.$$.on_mount=[]})),c.forEach(M)}function X(t,e){const n=t.$$;null!==n.fragment&&(l(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Y(t,e){-1===t.$$.dirty[0]&&(E.push(t),L||(L=!0,C.then(O)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function Z(t,e,n,o,a,i,r=[-1]){const u=_;S(t);const d=t.$$={fragment:null,ctx:null,props:i,update:s,not_equal:a,bound:c(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(u?u.$$.context:e.context||[]),callbacks:c(),dirty:r,skip_bound:!1};let p=!1;if(d.ctx=n?n(t,e.props||{},((e,n,...o)=>{const s=o.length?o[0]:n;return d.ctx&&a(d.ctx[e],d.ctx[e]=s)&&(!d.skip_bound&&d.bound[e]&&d.bound[e](s),p&&Y(t,e)),n})):[],d.update(),p=!0,l(d.before_update),d.fragment=!!o&&o(d.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);d.fragment&&d.fragment.l(t),t.forEach(w)}else d.fragment&&d.fragment.c();e.intro&&z(t.$$.fragment),Q(t,e.target,e.anchor,e.customElement),O()}S(u)}class tt{$destroy(){X(this,1),this.$destroy=s}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function et(t){let e,n,o,a,s;const i=t[5].default,r=h(i,t,t[4],null);return{c(){e=v("span"),r&&r.c(),k(e,"class",n="pointer icon flex brd-radius-full brd-with-sm "+t[1]+" svelte-1jng2dw"),k(e,"title",t[0])},m(n,i){y(n,e,i),r&&r.m(e,null),o=!0,a||(s=b(e,"click",t[2]),a=!0)},p(t,[a]){r&&r.p&&(!o||16&a)&&g(r,i,t,t[4],a,null,null),(!o||2&a&&n!==(n="pointer icon flex brd-radius-full brd-with-sm "+t[1]+" svelte-1jng2dw"))&&k(e,"class",n),(!o||1&a)&&k(e,"title",t[0])},i(t){o||(z(r,t),o=!0)},o(t){H(r,t),o=!1},d(t){t&&w(e),r&&r.d(t),a=!1,s()}}}function nt(t,e,n){let{$$slots:o={},$$scope:a}=e,{title:s}=e,{link:i="/"}=e,{color:r}=e;return t.$$set=t=>{"title"in t&&n(0,s=t.title),"link"in t&&n(3,i=t.link),"color"in t&&n(1,r=t.color),"$$scope"in t&&n(4,a=t.$$scope)},[s,r,()=>window.singleSpaNavigate(i),i,a,o]}const ot=[];function at(t,e){return{subscribe:st(t,e).subscribe}}function st(t,e=s){let n;const o=[];function a(e){if(d(t,e)&&(t=e,n)){const e=!ot.length;for(let e=0;e<o.length;e+=1){const n=o[e];n[1](),ot.push(n,t)}if(e){for(let t=0;t<ot.length;t+=2)ot[t][0](ot[t+1]);ot.length=0}}}return{set:a,update:function(e){a(e(t))},subscribe:function(i,r=s){const c=[i,r];return o.push(c),1===o.length&&(n=e(a)||s),i(t),()=>{const t=o.indexOf(c);-1!==t&&o.splice(t,1),0===o.length&&(n(),n=null)}}}}function it(t,e,n){const o=!Array.isArray(t),a=o?[t]:t,i=e.length<2;return at(n,(t=>{let n=!1;const r=[];let c=0,d=s;const f=()=>{if(c)return;d();const n=e(o?r[0]:r,t);i?t(n):d=u(n)?n:s},h=a.map(((t,e)=>p(t,(t=>{r[e]=t,c&=~(1<<e),n&&f()}),(()=>{c|=1<<e}))));return n=!0,f(),function(){l(h),d()}}))}const rt=()=>[{moduleId:"1111",position:"0"},{moduleId:"3333",position:""}],ct=()=>[{id:"Standard",activated:!0,days:["Mo","Tu","We","Th","Fr","Sa","Su"],moduleList:[{moduleId:"1111",position:"0"},{moduleId:"3333",position:""}]}],{loggedIn:lt}=n,ut=(t,e)=>{let n="";return t&&(n+=`/${t}`,e&&(n+=`/${e}`)),n},dt=async(t,e)=>{const n=ut(t,e);return(await axios.get("/api/comm/chat"+n)).data.filter((e=>t?e.event&&e.event._id===t:!e.event)).filter((t=>e?t.task&&t.task._id===e:!t.task))},{loggedIn:pt}=n,ft=async(t,e)=>[],ht=t("notification",st(!1)),mt=t("notifications_local",st([])),gt=t("communication_notification",st(!1)),$t=t("task_notification",st(!1)),yt=t("approval_notification",st(!1)),wt=t("attachment_notification",st(!1)),vt=st(!1),xt=t("settings",st({})),bt=(t("currentRoles",st()),st(Date.now()+1e7)),kt=it(at(Date.now(),(function(t){const e=setInterval((()=>{t(Date.now())}),6e4);return function(){clearInterval(e)}})),(t=>t>f(bt)));kt.subscribe((t=>{if(t)if((()=>{let t=Dt.filter((t=>t._valid>Date.now()));Dt=t,mt.set(Dt),ht.set(!0)})(),Dt.length>0){const t=Dt.reduce(((t,e)=>t.__valid<e.__valid?t:e));bt.set(t.__valid)}else bt.set(Date.now()+1e7)}));const _t=[{type:"communication",desc:"Kommunikation",obj:gt},{type:"task",desc:"Aufgabe",obj:$t},{type:"approval",desc:"Visum",obj:yt},{type:"attachment",desc:"Dokument",obj:wt},{type:"workflow",desc:"Worfklow",obj:vt}],St=(t,e=!1)=>{const n=f(xt).setting,o=n?.notificationActivated,a=n?.typesOfNotification,s=_t.find((e=>e.type===t.type));if(o&&a.find((t=>t===s?.desc))){const e=Dt.filter((e=>e.id==t.id&&e.user==t.user));e.length>0?Dt[Dt.indexOf(e[0])]=t:(Dt.unshift(t),t.__valid<bt&&bt.set(t.__valid)),mt.set(Dt),ht.set(!1)}e&&s?.obj.set(t)};let Dt=[];let Tt=[{id:"001",role:"Kundenmanager",user:"002"},{id:"002",role:"HR",user:"003"},{id:"003",role:"Projektleiter",user:"001"},{id:"004",role:"Software Developer",user:"001"},{id:"005",role:"Software Developer",user:"002"}];const Et=[{id:1111,name:"TaskModule",text:"Alle Tasks",status:!1,6:o.item({x:0,y:0,w:4,h:5,customDragger:!0}),5:o.item({x:0,y:0,w:4,h:5,customDragger:!0}),4:o.item({x:0,y:0,w:3,h:5,customDragger:!0}),3:o.item({x:0,y:0,w:2,h:5,customDragger:!0}),2:o.item({x:0,y:0,w:1,h:5,customDragger:!0}),1:o.item({x:0,y:0,w:1,h:5,customDragger:!0})},{id:3333,name:"Chat Modul",text:"Chat",status:!1,6:o.item({x:4,y:0,w:1,h:5,customDragger:!0}),5:o.item({x:4,y:0,w:1,h:5,customDragger:!0}),4:o.item({x:3,y:0,w:1,h:5,customDragger:!0}),3:o.item({x:2,y:0,w:1,h:5,customDragger:!0}),2:o.item({x:1,y:0,w:1,h:5,customDragger:!0}),1:o.item({x:1,y:0,w:1,h:5,customDragger:!0})},{id:4444,name:"Feedback Modul",text:"Feedback",status:!1,6:o.item({x:5,y:0,w:1,h:5}),5:o.item({x:5,y:0,w:1,h:5}),4:o.item({x:4,y:0,w:1,h:5}),3:o.item({x:3,y:0,w:1,h:5}),2:o.item({x:2,y:0,w:1,h:5}),1:o.item({x:2,y:0,w:1,h:5})},{id:9999,name:"Neues Modul",text:"+",status:!1,6:o.item({x:4,y:0,w:1,h:2}),5:o.item({x:4,y:0,w:1,h:2}),4:o.item({x:3,y:0,w:1,h:2}),3:o.item({x:2,y:0,w:1,h:2}),2:o.item({x:1,y:0,w:1,h:2}),1:o.item({x:1,y:0,w:1,h:2})}],{cacheValidator:It,onLogout:jt}=n;e.interceptors.request.use((t=>(t.headers.enablerr=window.location.hostname,t))),e.interceptors.response.use((t=>203===t.status?Promise.reject(t.data.error):t),(t=>400===t.response.status?(window.singleSpaNavigate("/error"),Promise.reject(t)):t));let Nt=new Map;const Ct=(t,e)=>(...n)=>{const o=f(It),a=window.localStorage.getItem("enablerr-tenant");"invalid"===o.status&&(Nt=new Map,It.set({tenant:a,status:""}));const s=[].concat(a,e,n).join("-");let i=Nt.get(s);if(!i)try{i=t(...n),Nt.set(s,i)}catch(t){throw t}return i};var Lt={getSchema:Ct((t=>axios.get("/api/schema/"+t).then((t=>t.data)).catch((e=>{throw`schema with id ${t} not found`}))),"getSchema"),getSchemas:async()=>(await axios.get("/api/schema")).data,getSchemaByClass:Ct((async t=>(await axios.get(`/api/schemabyclass/${t}`)).data),"getSchemaByClass"),getEvents:Ct((()=>axios.get("/api/event").then((t=>t.data)).catch((t=>{throw"Events not found"}))),"getEvents"),getEvent:Ct((t=>axios.get("/api/event/"+t).then((t=>t.data)).catch((e=>{throw`Event with id ${t} not found`}))),"getEvent"),getTask:(t,e)=>axios.get(`/api/task/${t}:${e}?display=form`).then((t=>t.data)).catch((t=>{throw"task not found"})),getTaskList:(t,e)=>axios.get(`/api/task/${t}:${e}?display=list`).then((t=>t.data)).catch((t=>{})),getTasksList:t=>axios.get(`/api/tasks/${t}?display=list`).then((t=>t.data)).catch((t=>{throw"list not found"})),getTasks:t=>axios.get(`/api/tasks/${t}?display=form`).then((t=>t.data)).catch((t=>{throw"list not found"})),getTaskById:t=>axios.post("/api/read/_task",{_id:t}).then((t=>t.data[0])).catch((t=>{})),getTaskByDocId:t=>axios.post("/api/read/_task",{docId:t}).then((t=>t.data[0])).catch((t=>{})),getTaskqueue:(t=!1,e)=>axios.post("/api/taskqueue",{id:t,task:e}).then((t=>t.data)).catch((t=>{throw"queue not found"})),createTaskByEventId:t=>axios.post("/api/workflow/task",{event:t}).then((t=>t.data)).catch((t=>{})),saveData:async(t,e)=>(await axios.post(`/api/${t}`,e)).data,saveTemplate:async(t,e)=>(await axios.post(`/api/template/${t}`,e)).data,deleteTask:t=>axios.delete(`/api/_task/${t}`).then((t=>t.data)).catch((t=>{})),setTaskVisum:(t,e)=>axios.post(`/api/task/visum/${t}`,{visum:e}).then((t=>t.data)).catch((t=>{})),deleteTaskVisum:(t,e)=>axios.delete(`/api/task/visum/${t}/${e}`).then((t=>t.data)).catch((t=>{})),getTaskOptions:(t,e)=>axios.get(`/api/task/${t}/${e}`).then((t=>t.data)).catch((t=>{throw"docs not found"})),getLastId:(t,e)=>axios.get(`/api/task/${t}/lastId/${e}`).then((t=>t.data)).catch((t=>{throw"docs not found"})),getCumulatedSection:(t,e,n,o)=>axios.get(`/api/task/${t}/${fieldName}/section/${n}/${o}`).then((t=>t.data)).catch((t=>{throw"internal error"})),getSection:(t,e,n,o=!1)=>axios.post("/api/read/"+t,{[e]:n,status:!0,_unique:o}).then((t=>o?t.data.map((t=>({[o]:t}))):t.data)).catch((t=>{throw"internal error"})),getSectionView:(t,e,n=!1)=>(n&&(e._display="list"),axios.post("/api/read/"+t,e).then((t=>t.data)).catch((t=>{throw"internal error"}))),getCountedSection:(t,e,n,o,a)=>axios.get(`/api/task/${t}/${e}/${n}/count/${o}/${a}`).then((t=>t.data)).catch((t=>{throw"internal error"})),getSolitaire:t=>axios.post("/api/read/"+t).then((t=>t.data)).catch((t=>null)),getTemplate:t=>axios.post("/api/read/_template",{_className:t}).then((t=>t.data[0])).catch((t=>{})),savePlugins:async(t,e)=>(await axios.post("/api/plugin",t,e)).data,savePlugin:async(t,e)=>(await axios.post(`/api/plugin/${t}`,e)).data,deletePlugin:async t=>(await axios.delete(`/api/plugin/${t}`)).data,deletePluginAndData:()=>axios.delete("/api/plugin"),getAuthStatus:async t=>(await axios.post("/api/auth/status",{email:t})).data,getUserSettings:()=>axios.get("/api/user").then((t=>t.data)),saveUserSettings:t=>axios.post("/api/user",t).then((t=>t.data)),saveDefaultSettings:async(t,e)=>{let n={schema:"http://json-schema.org/draft-04/schema#",id:e,email:t,firstName:"",lastName:"",jobDescription:"",role:[],setting:{showJobDescription:!1,dashboardLayout:[{id:"Standard",activated:!0,days:["Mo","Tu","We","Th","Fr","Sa","Su"],moduleList:[{moduleId:"1111",position:"0"},{moduleId:"3333",position:""}]}],notificationActivated:!0,showNotifications:!0,notificationToMail:!1,typesOfNotification:["Aufgabe","Visum","Dokument"]}};return axios.post("/api/user",n).then((t=>t.data))},authEnroll:async t=>(await axios.post("/api/auth/enroll",t)).data,authLogin:async(t,e)=>(await axios.post("/api/auth/login",{username:t,passcode:e})).data,authLogout:async()=>await axios.post("/api/auth/logout"),setTenant:async t=>axios.post("/api/auth/tenant",{id:t}).then((t=>t.data)).catch((t=>({status:!1}))),getAllChats:async()=>axios.get("/api/comm/chat").then((({data:t})=>t)),getChat:dt,saveChat:async(t,e,n)=>{const{user:o}=f(lt);let a=await dt(t,e);a[0]||(n.sender=o);const s=a[0]?"patch":"post",i=ut(t,e);return(await axios[s]("/api/comm/chat"+i,n)).data.id},getFeedback:ft,saveFeedback:async(t,e,n,o,a)=>{const s={};t&&(s.event={id:t}),e&&(s.task={id:e});let i=await ft();if(i[0]&&null!=a){let t=i.filter((t=>t._id===a));t={...t,...o};const{user:e}=f(pt);return n.sender=e,t[0].messages=(t[0].messages||[]).concat(n),console.log("has id",t[0].messages),(await axios.post("/api/commFeedback",t[0])).data.id}{i={...s},i={...i,...o};const{user:t}=f(pt);return n.sender=t,i.messages=(i.messages||[]).concat(n),console.log("new feedback",i),(await axios.post("/api/commFeedback",i)).data.id}},getUserReports:async t=>(await axios.get("/api/userreport/list/"+t)).data,uploadUserReport:async(t,e)=>(await axios.post("/api/userreport/"+t,e)).data,deleteUserReport:async t=>(await axios.delete("/api/userreport/"+t)).data,getDefaultModuleList:rt,getDefaultLayout:ct,getNotifications:t=>axios.get("/api/notification").then((async t=>{await new Promise((t=>setTimeout(t,2e3)));for(let e of t.data)St(e,!1);return Dt})),getNotificationsLocal:t=>Dt,saveNotification:St,updateNotification:t=>{let e=Dt.filter((e=>e.id==t.id&&e.user==t.user));e.length>0?(Dt[Dt.indexOf(e[0])]=t,mt.set(Dt)):St(t,!1)},getNotificationTypes:Ct((()=>axios.get("/api/notification/type").then((t=>t.data))),"getNotificationTypes"),getRoles:t=>Tt.filter((e=>e.user===t)),getModules:t=>Et.filter((e=>t.includes(e.id))),getModuleName:t=>{const e=Et.find((e=>e.id===Number(t)));return e?e.name:"Unbekanntes Modul"},getAllModules:()=>Et};const Mt=Intl.NumberFormat().formatToParts(1.1).find((({type:t})=>"decimal"===t)).value||".",Ft=t=>"function"==typeof t,At=t=>t&&t.toString,Pt=(t,...e)=>e.includes(t),Ot=t=>Pt(t,void 0,null),Bt=t=>!Ot(t),Vt=(t=null,e,...n)=>{try{return e(...n)}catch{return t}},qt=t=>(e,...n)=>Vt(Vt("",t.toString),e,...n),Rt=(t,e=2,n=0,o=t.toString(),a=n.toString())=>a.repeat(e-o.length)+o,Ut=(t,e=window)=>({listen(n,o){e[`${n}EventListener`](t,o)},start(t){this.listen("add",t)},stop(t){this.listen("remove",t)}}),zt=(...t)=>!t.map((({value:t,check:e,text:n})=>e(t)||Kt(console.error,n))).every(Boolean),Ht=t=>(e,n)=>(Promise.resolve(n).then(e),t),Wt=Ht(!0),Kt=Ht(!1);var Gt=Object.freeze({__proto__:null,decimalSeparator:Mt,isFunction:Ft,isStringable:At,isObjEmpty:(t={})=>!Object.keys(t).length,hasValue:Pt,isNullish:Ot,isNotNullish:Bt,bestValue:(t,...e)=>e.concat(t).find(Bt),tryCatch:Vt,ensureStrValue:qt,padLeft:(...t)=>qt(t[0])(Rt,...t),showupElement:(t="",e=0,n=document.getElementById(t))=>n&&n.style&&(n.style.display="block",setTimeout((()=>n.style.display="none"),e)),getListener:Ut,isMissing:zt,go:Wt,stop:Kt});t("util",Gt);const Jt="single-spa:routing-event",Qt=Ut(Jt);function Xt(t,{modulePath:e,update:n}){if(!1===n)return;if(zt({value:n,check:Ft,text:"<update> should be a function (dataListener)"},{value:e,check:At,text:"<modulePath> should be a string (dataListener)"}))return;const o=e.toString()||"/",a=e=>{const a=e.currentTarget.location.pathname,[,s,...i]=a.split("/");o===(s||"/")&&t.dispatchEvent(new CustomEvent("data",{detail:{data:n(...i)}}))};return Qt.start(a),{destroy:()=>Qt.stop(a)}}const Yt=()=>window.dispatchEvent(new CustomEvent(Jt)),Zt=t=>({prop:4&t,tenant:8&t,user:8&t}),te=t=>({prop:t[11],refresh:Yt,tenant:t[3].tenant,user:t[3].user}),ee=t=>({err:4&t,prop:4&t,tenant:8&t,user:8&t}),ne=t=>({err:t[12],prop:t[11],refresh:Yt,tenant:t[3].tenant,user:t[3].user}),oe=t=>({prop:4&t,tenant:8&t,user:8&t}),ae=t=>({prop:t[11],refresh:Yt,tenant:t[3].tenant,user:t[3].user}),se=t=>({prop:4&t,tenant:8&t,user:8&t}),ie=t=>({prop:t[11],refresh:Yt,tenant:t[3].tenant,user:t[3].user});function re(t){let e;const n=t[8].init,o=h(n,t,t[7],te);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,a){o&&o.p&&(!e||140&a)&&g(o,n,t,t[7],a,Zt,te)},i(t){e||(z(o,t),e=!0)},o(t){H(o,t),e=!1},d(t){o&&o.d(t)}}}function ce(t){let e,n,o,a={ctx:t,current:null,token:null,hasCatch:!0,pending:de,then:ue,catch:le,value:11,error:12,blocks:[,,,]};return W(n=t[2],a),{c(){e=x(),a.block.c()},m(t,n){y(t,e,n),a.block.m(t,a.anchor=n),a.mount=()=>e.parentNode,a.anchor=e,o=!0},p(e,o){t=e,a.ctx=t,4&o&&n!==(n=t[2])&&W(n,a)||K(a,t,o)},i(t){o||(z(a.block),o=!0)},o(t){for(let t=0;t<3;t+=1){H(a.blocks[t])}o=!1},d(t){t&&w(e),a.block.d(t),a.token=null,a=null}}}function le(t){let e;const n=t[8].error,o=h(n,t,t[7],ne);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,a){o&&o.p&&(!e||140&a)&&g(o,n,t,t[7],a,ee,ne)},i(t){e||(z(o,t),e=!0)},o(t){H(o,t),e=!1},d(t){o&&o.d(t)}}}function ue(t){let e;const n=t[8].default,o=h(n,t,t[7],ae);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,a){o&&o.p&&(!e||140&a)&&g(o,n,t,t[7],a,oe,ae)},i(t){e||(z(o,t),e=!0)},o(t){H(o,t),e=!1},d(t){o&&o.d(t)}}}function de(t){let e,n,o,a={ctx:t,current:null,token:null,hasCatch:!1,pending:he,then:fe,catch:pe,value:10,blocks:[,,,]};return W(n=t[5](t[1]),a),{c(){e=x(),a.block.c()},m(t,n){y(t,e,n),a.block.m(t,a.anchor=n),a.mount=()=>e.parentNode,a.anchor=e,o=!0},p(e,o){t=e,a.ctx=t,2&o&&n!==(n=t[5](t[1]))&&W(n,a)||K(a,t,o)},i(t){o||(z(a.block),o=!0)},o(t){for(let t=0;t<3;t+=1){H(a.blocks[t])}o=!1},d(t){t&&w(e),a.block.d(t),a.token=null,a=null}}}function pe(t){return{c:s,m:s,p:s,i:s,o:s,d:s}}function fe(t){let e;const n=t[8].load,o=h(n,t,t[7],ie);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,a){o&&o.p&&(!e||140&a)&&g(o,n,t,t[7],a,se,ie)},i(t){e||(z(o,t),e=!0)},o(t){H(o,t),e=!1},d(t){o&&o.d(t)}}}function he(t){return{c:s,m:s,p:s,i:s,o:s,d:s}}function me(t){let e,n,o,a,i,r,c;const d=[ce,re],p=[];function f(t,e){return t[2]?0:1}return n=f(t),o=p[n]=d[n](t),{c(){e=v("section"),o.c(),k(e,"class","data")},m(o,l){var d;y(o,e,l),p[n].m(e,null),i=!0,r||(c=[(d=a=Xt.call(null,e,t[0]),d&&u(d.destroy)?d.destroy:s),b(e,"data",t[9])],r=!0)},p(t,[s]){let i=n;n=f(t),n===i?p[n].p(t,s):(R(),H(p[i],1,1,(()=>{p[i]=null})),U(),o=p[n],o?o.p(t,s):(o=p[n]=d[n](t),o.c()),z(o,1),o.m(e,null)),a&&u(a.update)&&1&s&&a.update.call(null,t[0])},i(t){i||(z(o),i=!0)},o(t){H(o),i=!1},d(t){t&&w(e),p[n].d(),r=!1,l(c)}}}function ge(t,e,o){let a,{$$slots:s={},$$scope:i}=e;const{loggedIn:r}=n;var c,l;c=r,l=t=>o(3,a=t),t.$$.on_destroy.push(p(c,l));let u,{options:d}=e,{update:f=!1}=e,{loadingDelay:h=250}=e;f&&(d={update:f,modulePath:window.location.pathname.split("/")[1]||"/"});return t.$$set=t=>{"options"in t&&o(0,d=t.options),"update"in t&&o(6,f=t.update),"loadingDelay"in t&&o(1,h=t.loadingDelay),"$$scope"in t&&o(7,i=t.$$scope)},[d,h,u,a,r,t=>new Promise((e=>setTimeout(e,t))),f,i,s,({detail:t})=>o(2,u=t.data)]}function $e(t){let e,n;const o=[{class:"full-width"},{style:t[0]},{inputClass:t[1]||t[5]},{multiline:!0},{id:t[2]},{value:t[3]},{rows:t[4]},t[9]];let a={};for(let t=0;t<o.length;t+=1)a=i(a,o[t]);return e=new t[6]({props:a}),e.$on("change",t[7]),e.$on("focus",t[8]),{c(){J(e.$$.fragment)},m(t,o){Q(e,t,o),n=!0},p(t,[n]){const a=575&n?function(t,e){const n={},o={},a={$$scope:1};let s=t.length;for(;s--;){const i=t[s],r=e[s];if(r){for(const t in i)t in r||(o[t]=1);for(const t in r)a[t]||(n[t]=r[t],a[t]=1);t[s]=r}else for(const t in i)a[t]=1}for(const t in o)t in n||(n[t]=void 0);return n}(o,[o[0],1&n&&{style:t[0]},34&n&&{inputClass:t[1]||t[5]},o[3],4&n&&{id:t[2]},8&n&&{value:t[3]},16&n&&{rows:t[4]},512&n&&(s=t[9],"object"==typeof s&&null!==s?s:{})]):{};var s;e.$set(a)},i(t){n||(z(e.$$.fragment,t),n=!0)},o(t){H(e.$$.fragment,t),n=!1},d(t){X(e,t)}}}function ye(t,e,n){const o=["noForm","id","value","style","rows","classId"];let s=$(e,o);const r=T(),{TextField:c}=a;let{noForm:l=""}=e,{id:u}=e,{value:d}=e,{style:p=""}=e,{rows:f=3}=e,{classId:h}=e;p+=" padding-bottom: .5em;";const m=5*(f>1),g=()=>{const t=document.getElementById(u);if(!t)return;const{style:e,scrollHeight:n}=t;n&&(e.height=`${n+m}px`)};return t.$$set=t=>{e=i(i({},e),function(t){const e={};for(const n in t)"$"!==n[0]&&(e[n]=t[n]);return e}(t)),n(9,s=$(e,o)),"noForm"in t&&n(1,l=t.noForm),"id"in t&&n(2,u=t.id),"value"in t&&n(3,d=t.value),"style"in t&&n(0,p=t.style),"rows"in t&&n(4,f=t.rows),"classId"in t&&n(5,h=t.classId)},t.$$.update=()=>{8&t.$$.dirty&&d&&setTimeout(g)},[p,l,u,d,f,h,c,({detail:{value:t}})=>r("blur",{value:t}),()=>r("onFocus"),s]}class we extends tt{constructor(t){super(),Z(this,t,ye,$e,d,{noForm:1,id:2,value:3,style:0,rows:4,classId:5})}}function ve(t){let e,n;return e=new we({props:{style:"min-width: 25em; overflow-y: hidden; resize: none;",id:t[0],value:t[1]}}),{c(){J(e.$$.fragment)},m(t,o){Q(e,t,o),n=!0},p(t,[n]){const o={};1&n&&(o.id=t[0]),2&n&&(o.value=t[1]),e.$set(o)},i(t){n||(z(e.$$.fragment,t),n=!0)},o(t){H(e.$$.fragment,t),n=!1},d(t){X(e,t)}}}function xe(t,e,n){let{id:o}=e,{value:a}=e;return t.$$set=t=>{"id"in t&&n(0,o=t.id),"value"in t&&n(1,a=t.value)},[o,a]}class be extends tt{constructor(t){super(),Z(this,t,xe,ve,d,{id:0,value:1})}}function ke(t){let e,n,o;function a(e){t[8](e)}let s={id:t[6]};return void 0!==t[2]&&(s.value=t[2]),e=new be({props:s}),I.push((()=>G(e,"value",a))),{c(){J(e.$$.fragment)},m(t,n){Q(e,t,n),o=!0},p(t,o){const a={};!n&&4&o&&(n=!0,a.value=t[2],F((()=>n=!1))),e.$set(a)},i(t){o||(z(e.$$.fragment,t),o=!0)},o(t){H(e.$$.fragment,t),o=!1},d(t){X(e,t)}}}function _e(t){let e,n;return e=new t[5]({props:{title:t[1],closeCallback:t[7],$$slots:{default:[ke]},$$scope:{ctx:t}}}),{c(){J(e.$$.fragment)},m(t,o){Q(e,t,o),n=!0},p(t,n){const o={};2&n&&(o.title=t[1]),1028&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(z(e.$$.fragment,t),n=!0)},o(t){H(e.$$.fragment,t),n=!1},d(t){X(e,t)}}}function Se(t){let e,n,o;function a(e){t[9](e)}let s={messages:t[0],$$slots:{default:[_e]},$$scope:{ctx:t}};return void 0!==t[3]&&(s.open=t[3]),e=new t[4]({props:s}),I.push((()=>G(e,"open",a))),{c(){J(e.$$.fragment)},m(t,n){Q(e,t,n),o=!0},p(t,[o]){const a={};1&o&&(a.messages=t[0]),1030&o&&(a.$$scope={dirty:o,ctx:t}),!n&&8&o&&(n=!0,a.open=t[3],F((()=>n=!1))),e.$set(a)},i(t){o||(z(e.$$.fragment,t),o=!0)},o(t){H(e.$$.fragment,t),o=!1},d(t){X(e,t)}}}function De(t,e,n){const{Modal:o,Dialog:s}=a;let i,r,{title:c}=e,{messages:l=""}=e;return t.$$set=t=>{"title"in t&&n(1,c=t.title),"messages"in t&&n(0,l=t.messages)},t.$$.update=()=>{5&t.$$.dirty&&l&&(n(2,i=[].concat(l).join("\n")),i&&n(3,r=!0))},[l,c,i,r,o,s,"modalDialog",t=>{n(3,r=!1),n(2,i=""),n(0,l="")},function(t){i=t,n(2,i),n(0,l)},function(t){r=t,n(3,r),n(0,l),n(2,i)}]}t("version","0.2.85");const Te=window.sessionStorage;Te.clear();t("Storage",{getItem:t=>Te.getItem(t),setItem:(t,e)=>Te.setItem(t,e)});t("toasts",function(){const t=st([]);function e(e,n,o="default"){n||(n=3e3),t.update((t=>t.length>3?t:t=[...t,{id:"_"+Math.random().toString(36).substring(2,9),type:o,msg:e,timeout:n}]))}const n=it(t,((e,n)=>{if(n(e),e&&e.length>0){const n=setTimeout((()=>{t.update((t=>(console.log("shift"),t.shift(),t)))}),e[0].timeout);return()=>{clearTimeout(n)}}})),{subscribe:o}=n;return{subscribe:o,send:e,default:(t,n)=>e(t,n,"default"),success:(t,n)=>e(t,n,"success"),failed:(t,n)=>e(t,n,"failed")}}()),t("LinkIcon",class extends tt{constructor(t){var e,n,o;super(),document.getElementById("svelte-1jng2dw-style")||((o=v("style")).id="svelte-1jng2dw-style",o.textContent=".red.svelte-1jng2dw{background-color:var(--m-color-red-light)}.blue.svelte-1jng2dw{background-color:var(--m-color-blue-light)}.green.svelte-1jng2dw{background-color:var(--m-color-green-light)}.icon.svelte-1jng2dw{max-height:1.2em}",e=document.head,n=o,e.appendChild(n)),Z(this,t,nt,et,d,{title:0,link:3,color:1})}}),t("Page",class extends tt{constructor(t){super(),Z(this,t,ge,me,d,{options:0,update:6,loadingDelay:1})}}),t("Request",Lt),t("TextArea",we),t("ModalDialog",class extends tt{constructor(t){super(),Z(this,t,De,Se,d,{title:1,messages:0})}})}}}));
|
|
1
|
+
System.register(["axios","@enablerr-ui/auth","@enablerr-ui/layout"],(function(t){"use strict";var e,n,o,a;return{setters:[function(t){e=t.default},function(t){n=t.user},function(t){o=t.getGridHelp,a=t.getAttractions}],execute:function(){function s(){}function i(t,e){for(const n in e)t[n]=e[n];return t}function r(t){return t()}function c(){return Object.create(null)}function l(t){t.forEach(r)}function u(t){return"function"==typeof t}function d(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function p(t,...e){if(null==t)return s;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function f(t){let e;return p(t,(t=>e=t))(),e}function h(t,e,n,o){if(t){const a=m(t,e,n,o);return t[0](a)}}function m(t,e,n,o){return t[1]&&o?i(n.ctx.slice(),t[1](o(e))):n.ctx}function g(t,e,n,o,a,s,i){const r=function(t,e,n,o){if(t[2]&&o){const a=t[2](o(n));if(void 0===e.dirty)return a;if("object"==typeof a){const t=[],n=Math.max(e.dirty.length,a.length);for(let o=0;o<n;o+=1)t[o]=e.dirty[o]|a[o];return t}return e.dirty|a}return e.dirty}(e,o,a,s);if(r){const a=m(e,n,o,i);t.p(a,r)}}function $(t,e){const n={};e=new Set(e);for(const o in t)e.has(o)||"$"===o[0]||(n[o]=t[o]);return n}function y(t,e,n){t.insertBefore(e,n||null)}function w(t){t.parentNode.removeChild(t)}function v(t){return document.createElement(t)}function x(){return t="",document.createTextNode(t);var t}function b(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function k(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}let _;function S(t){_=t}function D(){if(!_)throw new Error("Function called outside component initialization");return _}function T(){const t=D();return(e,n)=>{const o=t.$$.callbacks[e];if(o){const a=function(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}(e,n);o.slice().forEach((e=>{e.call(t,a)}))}}}const E=[],I=[],j=[],N=[],C=Promise.resolve();let L=!1;function M(t){j.push(t)}let F=!1;const A=new Set;function O(){if(!F){F=!0;do{for(let t=0;t<E.length;t+=1){const e=E[t];S(e),P(e.$$)}for(S(null),E.length=0;I.length;)I.pop()();for(let t=0;t<j.length;t+=1){const e=j[t];A.has(e)||(A.add(e),e())}j.length=0}while(E.length);for(;N.length;)N.pop()();L=!1,F=!1,A.clear()}}function P(t){if(null!==t.fragment){t.update(),l(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(M)}}const B=new Set;let V;function q(){V={r:0,c:[],p:V}}function R(){V.r||l(V.c),V=V.p}function U(t,e){t&&t.i&&(B.delete(t),t.i(e))}function z(t,e,n,o){if(t&&t.o){if(B.has(t))return;B.add(t),V&&V.c.push((()=>{B.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}function H(t,e){const n=e.token={};function o(t,o,a,s){if(e.token!==n)return;e.resolved=s;let i=e.ctx;void 0!==a&&(i=i.slice(),i[a]=s);const r=t&&(e.current=t)(i);let c=!1;e.block&&(e.blocks?e.blocks.forEach(((t,n)=>{n!==o&&t&&(q(),z(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),R())})):e.block.d(1),r.c(),U(r,1),r.m(e.mount(),e.anchor),c=!0),e.block=r,e.blocks&&(e.blocks[o]=r),c&&O()}if((a=t)&&"object"==typeof a&&"function"==typeof a.then){const n=D();if(t.then((t=>{S(n),o(e.then,1,e.value,t),S(null)}),(t=>{if(S(n),o(e.catch,2,e.error,t),S(null),!e.hasCatch)throw t})),e.current!==e.pending)return o(e.pending,0),!0}else{if(e.current!==e.then)return o(e.then,1,e.value,t),!0;e.resolved=t}var a}function W(t,e,n){const o=e.slice(),{resolved:a}=t;t.current===t.then&&(o[t.value]=a),t.current===t.catch&&(o[t.error]=a),t.block.p(o,n)}function K(t){t&&t.c()}function G(t,e,n,o){const{fragment:a,on_mount:s,on_destroy:i,after_update:c}=t.$$;a&&a.m(e,n),o||M((()=>{const e=s.map(r).filter(u);i?i.push(...e):l(e),t.$$.on_mount=[]})),c.forEach(M)}function J(t,e){const n=t.$$;null!==n.fragment&&(l(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Q(t,e){-1===t.$$.dirty[0]&&(E.push(t),L||(L=!0,C.then(O)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function X(t,e,n,o,a,i,r=[-1]){const u=_;S(t);const d=t.$$={fragment:null,ctx:null,props:i,update:s,not_equal:a,bound:c(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(u?u.$$.context:e.context||[]),callbacks:c(),dirty:r,skip_bound:!1};let p=!1;if(d.ctx=n?n(t,e.props||{},((e,n,...o)=>{const s=o.length?o[0]:n;return d.ctx&&a(d.ctx[e],d.ctx[e]=s)&&(!d.skip_bound&&d.bound[e]&&d.bound[e](s),p&&Q(t,e)),n})):[],d.update(),p=!0,l(d.before_update),d.fragment=!!o&&o(d.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);d.fragment&&d.fragment.l(t),t.forEach(w)}else d.fragment&&d.fragment.c();e.intro&&U(t.$$.fragment),G(t,e.target,e.anchor,e.customElement),O()}S(u)}class Y{$destroy(){J(this,1),this.$destroy=s}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function Z(t){let e,n,o,a,s;const i=t[5].default,r=h(i,t,t[4],null);return{c(){e=v("span"),r&&r.c(),k(e,"class",n="pointer icon flex brd-radius-full brd-with-sm "+t[1]+" svelte-1jng2dw"),k(e,"title",t[0])},m(n,i){y(n,e,i),r&&r.m(e,null),o=!0,a||(s=b(e,"click",t[2]),a=!0)},p(t,[a]){r&&r.p&&(!o||16&a)&&g(r,i,t,t[4],a,null,null),(!o||2&a&&n!==(n="pointer icon flex brd-radius-full brd-with-sm "+t[1]+" svelte-1jng2dw"))&&k(e,"class",n),(!o||1&a)&&k(e,"title",t[0])},i(t){o||(U(r,t),o=!0)},o(t){z(r,t),o=!1},d(t){t&&w(e),r&&r.d(t),a=!1,s()}}}function tt(t,e,n){let{$$slots:o={},$$scope:a}=e,{title:s}=e,{link:i="/"}=e,{color:r}=e;return t.$$set=t=>{"title"in t&&n(0,s=t.title),"link"in t&&n(3,i=t.link),"color"in t&&n(1,r=t.color),"$$scope"in t&&n(4,a=t.$$scope)},[s,r,()=>window.singleSpaNavigate(i),i,a,o]}const et=[];function nt(t,e){return{subscribe:ot(t,e).subscribe}}function ot(t,e=s){let n;const o=[];function a(e){if(d(t,e)&&(t=e,n)){const e=!et.length;for(let e=0;e<o.length;e+=1){const n=o[e];n[1](),et.push(n,t)}if(e){for(let t=0;t<et.length;t+=2)et[t][0](et[t+1]);et.length=0}}}return{set:a,update:function(e){a(e(t))},subscribe:function(i,r=s){const c=[i,r];return o.push(c),1===o.length&&(n=e(a)||s),i(t),()=>{const t=o.indexOf(c);-1!==t&&o.splice(t,1),0===o.length&&(n(),n=null)}}}}function at(t,e,n){const o=!Array.isArray(t),a=o?[t]:t,i=e.length<2;return nt(n,(t=>{let n=!1;const r=[];let c=0,d=s;const f=()=>{if(c)return;d();const n=e(o?r[0]:r,t);i?t(n):d=u(n)?n:s},h=a.map(((t,e)=>p(t,(t=>{r[e]=t,c&=~(1<<e),n&&f()}),(()=>{c|=1<<e}))));return n=!0,f(),function(){l(h),d()}}))}const st=()=>[{moduleId:"1111",position:"0"},{moduleId:"3333",position:""}],it=()=>[{id:"Standard",activated:!0,days:["Mo","Tu","We","Th","Fr","Sa","Su"],moduleList:[{moduleId:"1111",position:"0"},{moduleId:"3333",position:""}]}],{loggedIn:rt}=n,ct=(t,e)=>{let n="";return t&&(n+=`/${t}`,e&&(n+=`/${e}`)),n},lt=async(t,e)=>{const n=ct(t,e);return(await axios.get("/api/comm/chat"+n)).data.filter((e=>t?e.event&&e.event._id===t:!e.event)).filter((t=>e?t.task&&t.task._id===e:!t.task))},{loggedIn:ut}=n,dt=async(t,e)=>[],pt=t("notification",ot(!1)),ft=t("notifications_local",ot([])),ht=t("communication_notification",ot(!1)),mt=t("task_notification",ot(!1)),gt=t("approval_notification",ot(!1)),$t=t("attachment_notification",ot(!1)),yt=ot(!1),wt=t("settings",ot({})),vt=(t("currentRoles",ot()),ot(Date.now()+1e7)),xt=at(nt(Date.now(),(function(t){const e=setInterval((()=>{t(Date.now())}),6e4);return function(){clearInterval(e)}})),(t=>t>f(vt)));xt.subscribe((t=>{if(t)if((()=>{let t=_t.filter((t=>t._valid>Date.now()));_t=t,ft.set(_t),pt.set(!0)})(),_t.length>0){const t=_t.reduce(((t,e)=>t.__valid<e.__valid?t:e));vt.set(t.__valid)}else vt.set(Date.now()+1e7)}));const bt=[{type:"communication",desc:"Kommunikation",obj:ht},{type:"task",desc:"Aufgabe",obj:mt},{type:"approval",desc:"Visum",obj:gt},{type:"attachment",desc:"Dokument",obj:$t},{type:"workflow",desc:"Worfklow",obj:yt}],kt=(t,e=!1)=>{const n=f(wt).setting,o=n?.notificationActivated,a=n?.typesOfNotification,s=bt.find((e=>e.type===t.type));if(o&&a.find((t=>t===s?.desc))){const e=_t.filter((e=>e.id==t.id&&e.user==t.user));e.length>0?_t[_t.indexOf(e[0])]=t:(_t.unshift(t),t.__valid<vt&&vt.set(t.__valid)),ft.set(_t),pt.set(!1)}e&&s?.obj.set(t)};let _t=[];let St=[{id:"001",role:"Kundenmanager",user:"002"},{id:"002",role:"HR",user:"003"},{id:"003",role:"Projektleiter",user:"001"},{id:"004",role:"Software Developer",user:"001"},{id:"005",role:"Software Developer",user:"002"}];const Dt=[{id:1111,name:"TaskModule",text:"Alle Tasks",status:!1,6:o.item({x:0,y:0,w:4,h:5,customDragger:!0}),5:o.item({x:0,y:0,w:4,h:5,customDragger:!0}),4:o.item({x:0,y:0,w:3,h:5,customDragger:!0}),3:o.item({x:0,y:0,w:2,h:5,customDragger:!0}),2:o.item({x:0,y:0,w:1,h:5,customDragger:!0}),1:o.item({x:0,y:0,w:1,h:5,customDragger:!0})},{id:3333,name:"Chat Modul",text:"Chat",status:!1,6:o.item({x:4,y:0,w:1,h:5,customDragger:!0}),5:o.item({x:4,y:0,w:1,h:5,customDragger:!0}),4:o.item({x:3,y:0,w:1,h:5,customDragger:!0}),3:o.item({x:2,y:0,w:1,h:5,customDragger:!0}),2:o.item({x:1,y:0,w:1,h:5,customDragger:!0}),1:o.item({x:1,y:0,w:1,h:5,customDragger:!0})},{id:4444,name:"Feedback Modul",text:"Feedback",status:!1,6:o.item({x:5,y:0,w:1,h:5}),5:o.item({x:5,y:0,w:1,h:5}),4:o.item({x:4,y:0,w:1,h:5}),3:o.item({x:3,y:0,w:1,h:5}),2:o.item({x:2,y:0,w:1,h:5}),1:o.item({x:2,y:0,w:1,h:5})},{id:9999,name:"Neues Modul",text:"+",status:!1,6:o.item({x:4,y:0,w:1,h:2}),5:o.item({x:4,y:0,w:1,h:2}),4:o.item({x:3,y:0,w:1,h:2}),3:o.item({x:2,y:0,w:1,h:2}),2:o.item({x:1,y:0,w:1,h:2}),1:o.item({x:1,y:0,w:1,h:2})}],{cacheValidator:Tt,onLogout:Et}=n;e.interceptors.request.use((t=>(t.headers.enablerr=window.location.hostname,t))),e.interceptors.response.use((t=>203===t.status?Promise.reject(t.data.error):t),(t=>400===t.response.status?(window.singleSpaNavigate("/error"),Promise.reject(t)):t));let It=new Map;const jt=(t,e)=>(...n)=>{const o=f(Tt),a=window.localStorage.getItem("enablerr-tenant");"invalid"===o.status&&(It=new Map,Tt.set({tenant:a,status:""}));const s=[].concat(a,e,n).join("-");let i=It.get(s);if(!i)try{i=t(...n),It.set(s,i)}catch(t){throw t}return i};var Nt={getSchema:jt((t=>axios.get("/api/schema/"+t).then((t=>t.data)).catch((e=>{throw`schema with id ${t} not found`}))),"getSchema"),getSchemas:async()=>(await axios.get("/api/schema")).data,getSchemaByClass:jt((async t=>(await axios.get(`/api/schemabyclass/${t}`)).data),"getSchemaByClass"),getEvents:jt((()=>axios.get("/api/event").then((t=>t.data)).catch((t=>{throw"Events not found"}))),"getEvents"),getEvent:jt((t=>axios.get("/api/event/"+t).then((t=>t.data)).catch((e=>{throw`Event with id ${t} not found`}))),"getEvent"),getTask:(t,e)=>axios.get(`/api/task/${t}:${e}?display=form`).then((t=>t.data)).catch((t=>{throw"task not found"})),getTaskList:(t,e)=>axios.get(`/api/task/${t}:${e}?display=list`).then((t=>t.data)).catch((t=>{})),getTasksList:t=>axios.get(`/api/tasks/${t}?display=list`).then((t=>t.data)).catch((t=>{throw"list not found"})),getTasks:t=>axios.get(`/api/tasks/${t}?display=form`).then((t=>t.data)).catch((t=>{throw"list not found"})),getTaskById:t=>axios.post("/api/read/_task",{_id:t}).then((t=>t.data[0])).catch((t=>{})),getTaskByDocId:t=>axios.post("/api/read/_task",{docId:t}).then((t=>t.data[0])).catch((t=>{})),getTaskqueue:(t=!1,e)=>axios.post("/api/taskqueue",{id:t,task:e}).then((t=>t.data)).catch((t=>{throw"queue not found"})),createTaskByEventId:t=>axios.post("/api/workflow/task",{event:t}).then((t=>t.data)).catch((t=>{})),saveData:async(t,e)=>(await axios.post(`/api/${t}`,e)).data,saveTemplate:async(t,e)=>(await axios.post(`/api/template/${t}`,e)).data,deleteTask:t=>axios.delete(`/api/_task/${t}`).then((t=>t.data)).catch((t=>{})),setTaskVisum:(t,e)=>axios.post(`/api/task/visum/${t}`,{visum:e}).then((t=>t.data)).catch((t=>{})),deleteTaskVisum:(t,e)=>axios.delete(`/api/task/visum/${t}/${e}`).then((t=>t.data)).catch((t=>{})),getTaskOptions:(t,e)=>axios.get(`/api/task/${t}/${e}`).then((t=>t.data)).catch((t=>{throw"docs not found"})),getLastId:(t,e)=>axios.get(`/api/task/${t}/lastId/${e}`).then((t=>t.data)).catch((t=>{throw"docs not found"})),getCumulatedSection:(t,e,n,o)=>axios.get(`/api/task/${t}/${fieldName}/section/${n}/${o}`).then((t=>t.data)).catch((t=>{throw"internal error"})),getSection:(t,e,n,o=!1)=>axios.post("/api/read/"+t,{[e]:n,status:!0,_unique:o}).then((t=>o?t.data.map((t=>({[o]:t}))):t.data)).catch((t=>{throw"internal error"})),getSectionView:(t,e,n=!1)=>(n&&(e._display="list"),axios.post("/api/read/"+t,e).then((t=>t.data)).catch((t=>{throw"internal error"}))),getCountedSection:(t,e,n,o,a)=>axios.get(`/api/task/${t}/${e}/${n}/count/${o}/${a}`).then((t=>t.data)).catch((t=>{throw"internal error"})),getSolitaire:t=>axios.post("/api/read/"+t).then((t=>t.data)).catch((t=>null)),getTemplate:t=>axios.post("/api/read/_template",{_className:t}).then((t=>t.data[0])).catch((t=>{})),savePlugins:async(t,e)=>(await axios.post("/api/plugin",t,e)).data,savePlugin:async(t,e)=>(await axios.post(`/api/plugin/${t}`,e)).data,deletePlugin:async t=>(await axios.delete(`/api/plugin/${t}`)).data,deletePluginAndData:()=>axios.delete("/api/plugin"),getAuthStatus:async t=>(await axios.post("/api/auth/status",{email:t})).data,getUserSettings:t=>t?axios.get("/api/user/"+t).then((t=>t.data)):axios.get("/api/user").then((t=>t.data)),saveUserSettings:t=>axios.post("/api/user",t).then((t=>t.data)),saveDefaultSettings:async(t,e)=>{let n={schema:"http://json-schema.org/draft-04/schema#",id:e,email:t,firstName:"",lastName:"",jobDescription:"",role:[],setting:{showJobDescription:!1,dashboardLayout:[{id:"Standard",activated:!0,days:["Mo","Tu","We","Th","Fr","Sa","Su"],moduleList:[{moduleId:"1111",position:"0"},{moduleId:"3333",position:""}]}],notificationActivated:!0,showNotifications:!0,notificationToMail:!1,typesOfNotification:["Aufgabe","Visum","Dokument"]}};return axios.post("/api/user",n).then((t=>t.data))},authEnroll:async t=>(await axios.post("/api/auth/enroll",t)).data,authLogin:async(t,e)=>(await axios.post("/api/auth/login",{username:t,passcode:e})).data,authLogout:async()=>await axios.post("/api/auth/logout"),setTenant:async t=>axios.post("/api/auth/tenant",{id:t}).then((t=>t.data)).catch((t=>({status:!1}))),getAllChats:async()=>axios.get("/api/comm/chat").then((({data:t})=>t)),getChat:lt,saveChat:async(t,e,n)=>{const{user:o}=f(rt);let a=await lt(t,e);a[0]||(n.sender=o);const s=a[0]?"patch":"post",i=ct(t,e);return(await axios[s]("/api/comm/chat"+i,n)).data.id},getFeedback:dt,saveFeedback:async(t,e,n,o,a)=>{const s={};t&&(s.event={id:t}),e&&(s.task={id:e});let i=await dt();if(i[0]&&null!=a){let t=i.filter((t=>t._id===a));t={...t,...o};const{user:e}=f(ut);return n.sender=e,t[0].messages=(t[0].messages||[]).concat(n),console.log("has id",t[0].messages),(await axios.post("/api/commFeedback",t[0])).data.id}{i={...s},i={...i,...o};const{user:t}=f(ut);return n.sender=t,i.messages=(i.messages||[]).concat(n),console.log("new feedback",i),(await axios.post("/api/commFeedback",i)).data.id}},getUserReports:async t=>(await axios.get("/api/userreport/list/"+t)).data,uploadUserReport:async(t,e)=>(await axios.post("/api/userreport/"+t,e)).data,deleteUserReport:async t=>(await axios.delete("/api/userreport/"+t)).data,getDefaultModuleList:st,getDefaultLayout:it,getNotifications:t=>axios.get("/api/notification").then((async t=>{await new Promise((t=>setTimeout(t,2e3)));for(let e of t.data)kt(e,!1);return _t})),getNotificationsLocal:t=>_t,saveNotification:kt,updateNotification:t=>{let e=_t.filter((e=>e.id==t.id&&e.user==t.user));e.length>0?(_t[_t.indexOf(e[0])]=t,ft.set(_t)):kt(t,!1)},getNotificationTypes:jt((()=>axios.get("/api/notification/type").then((t=>t.data))),"getNotificationTypes"),getRoles:t=>St.filter((e=>e.user===t)),getModules:t=>Dt.filter((e=>t.includes(e.id))),getModuleName:t=>{const e=Dt.find((e=>e.id===Number(t)));return e?e.name:"Unbekanntes Modul"},getAllModules:()=>Dt};const Ct=Intl.NumberFormat().formatToParts(1.1).find((({type:t})=>"decimal"===t)).value||".",Lt=t=>"function"==typeof t,Mt=t=>t&&t.toString,Ft=(t,...e)=>e.includes(t),At=t=>Ft(t,void 0,null),Ot=t=>!At(t),Pt=(t=null,e,...n)=>{try{return e(...n)}catch{return t}},Bt=t=>(e,...n)=>Pt(Pt("",t.toString),e,...n),Vt=(t,e=2,n=0,o=t.toString(),a=n.toString())=>a.repeat(e-o.length)+o,qt=(t,e=window)=>({listen(n,o){e[`${n}EventListener`](t,o)},start(t){this.listen("add",t)},stop(t){this.listen("remove",t)}}),Rt=(...t)=>!t.map((({value:t,check:e,text:n})=>e(t)||Ht(console.error,n))).every(Boolean),Ut=t=>(e,n)=>(Promise.resolve(n).then(e),t),zt=Ut(!0),Ht=Ut(!1);var Wt=Object.freeze({__proto__:null,decimalSeparator:Ct,isFunction:Lt,isStringable:Mt,isObjEmpty:(t={})=>!Object.keys(t).length,hasValue:Ft,isNullish:At,isNotNullish:Ot,bestValue:(t,...e)=>e.concat(t).find(Ot),tryCatch:Pt,ensureStrValue:Bt,padLeft:(...t)=>Bt(t[0])(Vt,...t),showupElement:(t="",e=0,n=document.getElementById(t))=>n&&n.style&&(n.style.display="block",setTimeout((()=>n.style.display="none"),e)),getListener:qt,isMissing:Rt,go:zt,stop:Ht});t("util",Wt);const Kt="single-spa:routing-event",Gt=qt(Kt);function Jt(t,{modulePath:e,update:n}){if(!1===n)return;if(Rt({value:n,check:Lt,text:"<update> should be a function (dataListener)"},{value:e,check:Mt,text:"<modulePath> should be a string (dataListener)"}))return;const o=e.toString()||"/",a=e=>{const a=e.currentTarget.location.pathname,[,s,...i]=a.split("/");o===(s||"/")&&t.dispatchEvent(new CustomEvent("data",{detail:{data:n(...i)}}))};return Gt.start(a),{destroy:()=>Gt.stop(a)}}const Qt=()=>window.dispatchEvent(new CustomEvent(Kt)),Xt=t=>({prop:4&t,tenant:8&t,user:8&t}),Yt=t=>({prop:t[11],refresh:Qt,tenant:t[3].tenant,user:t[3].user}),Zt=t=>({err:4&t,prop:4&t,tenant:8&t,user:8&t}),te=t=>({err:t[12],prop:t[11],refresh:Qt,tenant:t[3].tenant,user:t[3].user}),ee=t=>({prop:4&t,tenant:8&t,user:8&t}),ne=t=>({prop:t[11],refresh:Qt,tenant:t[3].tenant,user:t[3].user}),oe=t=>({prop:4&t,tenant:8&t,user:8&t}),ae=t=>({prop:t[11],refresh:Qt,tenant:t[3].tenant,user:t[3].user});function se(t){let e;const n=t[8].init,o=h(n,t,t[7],Yt);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,a){o&&o.p&&(!e||140&a)&&g(o,n,t,t[7],a,Xt,Yt)},i(t){e||(U(o,t),e=!0)},o(t){z(o,t),e=!1},d(t){o&&o.d(t)}}}function ie(t){let e,n,o,a={ctx:t,current:null,token:null,hasCatch:!0,pending:le,then:ce,catch:re,value:11,error:12,blocks:[,,,]};return H(n=t[2],a),{c(){e=x(),a.block.c()},m(t,n){y(t,e,n),a.block.m(t,a.anchor=n),a.mount=()=>e.parentNode,a.anchor=e,o=!0},p(e,o){t=e,a.ctx=t,4&o&&n!==(n=t[2])&&H(n,a)||W(a,t,o)},i(t){o||(U(a.block),o=!0)},o(t){for(let t=0;t<3;t+=1){z(a.blocks[t])}o=!1},d(t){t&&w(e),a.block.d(t),a.token=null,a=null}}}function re(t){let e;const n=t[8].error,o=h(n,t,t[7],te);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,a){o&&o.p&&(!e||140&a)&&g(o,n,t,t[7],a,Zt,te)},i(t){e||(U(o,t),e=!0)},o(t){z(o,t),e=!1},d(t){o&&o.d(t)}}}function ce(t){let e;const n=t[8].default,o=h(n,t,t[7],ne);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,a){o&&o.p&&(!e||140&a)&&g(o,n,t,t[7],a,ee,ne)},i(t){e||(U(o,t),e=!0)},o(t){z(o,t),e=!1},d(t){o&&o.d(t)}}}function le(t){let e,n,o,a={ctx:t,current:null,token:null,hasCatch:!1,pending:pe,then:de,catch:ue,value:10,blocks:[,,,]};return H(n=t[5](t[1]),a),{c(){e=x(),a.block.c()},m(t,n){y(t,e,n),a.block.m(t,a.anchor=n),a.mount=()=>e.parentNode,a.anchor=e,o=!0},p(e,o){t=e,a.ctx=t,2&o&&n!==(n=t[5](t[1]))&&H(n,a)||W(a,t,o)},i(t){o||(U(a.block),o=!0)},o(t){for(let t=0;t<3;t+=1){z(a.blocks[t])}o=!1},d(t){t&&w(e),a.block.d(t),a.token=null,a=null}}}function ue(t){return{c:s,m:s,p:s,i:s,o:s,d:s}}function de(t){let e;const n=t[8].load,o=h(n,t,t[7],ae);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,a){o&&o.p&&(!e||140&a)&&g(o,n,t,t[7],a,oe,ae)},i(t){e||(U(o,t),e=!0)},o(t){z(o,t),e=!1},d(t){o&&o.d(t)}}}function pe(t){return{c:s,m:s,p:s,i:s,o:s,d:s}}function fe(t){let e,n,o,a,i,r,c;const d=[ie,se],p=[];function f(t,e){return t[2]?0:1}return n=f(t),o=p[n]=d[n](t),{c(){e=v("section"),o.c(),k(e,"class","data")},m(o,l){var d;y(o,e,l),p[n].m(e,null),i=!0,r||(c=[(d=a=Jt.call(null,e,t[0]),d&&u(d.destroy)?d.destroy:s),b(e,"data",t[9])],r=!0)},p(t,[s]){let i=n;n=f(t),n===i?p[n].p(t,s):(q(),z(p[i],1,1,(()=>{p[i]=null})),R(),o=p[n],o?o.p(t,s):(o=p[n]=d[n](t),o.c()),U(o,1),o.m(e,null)),a&&u(a.update)&&1&s&&a.update.call(null,t[0])},i(t){i||(U(o),i=!0)},o(t){z(o),i=!1},d(t){t&&w(e),p[n].d(),r=!1,l(c)}}}function he(t,e,o){let a,{$$slots:s={},$$scope:i}=e;const{loggedIn:r}=n;var c,l;c=r,l=t=>o(3,a=t),t.$$.on_destroy.push(p(c,l));let u,{options:d}=e,{update:f=!1}=e,{loadingDelay:h=250}=e;f&&(d={update:f,modulePath:window.location.pathname.split("/")[1]||"/"});return t.$$set=t=>{"options"in t&&o(0,d=t.options),"update"in t&&o(6,f=t.update),"loadingDelay"in t&&o(1,h=t.loadingDelay),"$$scope"in t&&o(7,i=t.$$scope)},[d,h,u,a,r,t=>new Promise((e=>setTimeout(e,t))),f,i,s,({detail:t})=>o(2,u=t.data)]}function me(t){let e,n;const o=[{class:"full-width"},{style:t[0]},{inputClass:t[1]||t[5]},{multiline:!0},{id:t[2]},{value:t[3]},{rows:t[4]},t[9]];let a={};for(let t=0;t<o.length;t+=1)a=i(a,o[t]);return e=new t[6]({props:a}),e.$on("change",t[7]),e.$on("focus",t[8]),{c(){K(e.$$.fragment)},m(t,o){G(e,t,o),n=!0},p(t,[n]){const a=575&n?function(t,e){const n={},o={},a={$$scope:1};let s=t.length;for(;s--;){const i=t[s],r=e[s];if(r){for(const t in i)t in r||(o[t]=1);for(const t in r)a[t]||(n[t]=r[t],a[t]=1);t[s]=r}else for(const t in i)a[t]=1}for(const t in o)t in n||(n[t]=void 0);return n}(o,[o[0],1&n&&{style:t[0]},34&n&&{inputClass:t[1]||t[5]},o[3],4&n&&{id:t[2]},8&n&&{value:t[3]},16&n&&{rows:t[4]},512&n&&(s=t[9],"object"==typeof s&&null!==s?s:{})]):{};var s;e.$set(a)},i(t){n||(U(e.$$.fragment,t),n=!0)},o(t){z(e.$$.fragment,t),n=!1},d(t){J(e,t)}}}function ge(t,e,n){const o=["noForm","id","value","style","rows","classId"];let s=$(e,o);const r=T(),{TextField:c}=a;let{noForm:l=""}=e,{id:u}=e,{value:d}=e,{style:p=""}=e,{rows:f=3}=e,{classId:h}=e;p+=" padding-bottom: .5em;";const m=5*(f>1),g=()=>{const t=document.getElementById(u);if(!t)return;const{style:e,scrollHeight:n}=t;n&&(e.height=`${n+m}px`)};return t.$$set=t=>{e=i(i({},e),function(t){const e={};for(const n in t)"$"!==n[0]&&(e[n]=t[n]);return e}(t)),n(9,s=$(e,o)),"noForm"in t&&n(1,l=t.noForm),"id"in t&&n(2,u=t.id),"value"in t&&n(3,d=t.value),"style"in t&&n(0,p=t.style),"rows"in t&&n(4,f=t.rows),"classId"in t&&n(5,h=t.classId)},t.$$.update=()=>{8&t.$$.dirty&&d&&setTimeout(g)},[p,l,u,d,f,h,c,({detail:{value:t}})=>r("blur",{value:t}),()=>r("onFocus"),s]}class $e extends Y{constructor(t){super(),X(this,t,ge,me,d,{noForm:1,id:2,value:3,style:0,rows:4,classId:5})}}function ye(t){let e,n;return e=new $e({props:{style:"min-width: 25em; overflow-y: hidden; resize: none;",id:t[0],value:t[1]}}),{c(){K(e.$$.fragment)},m(t,o){G(e,t,o),n=!0},p(t,[n]){const o={};1&n&&(o.id=t[0]),2&n&&(o.value=t[1]),e.$set(o)},i(t){n||(U(e.$$.fragment,t),n=!0)},o(t){z(e.$$.fragment,t),n=!1},d(t){J(e,t)}}}function we(t,e,n){let{id:o}=e,{value:a}=e;return t.$$set=t=>{"id"in t&&n(0,o=t.id),"value"in t&&n(1,a=t.value)},[o,a]}class ve extends Y{constructor(t){super(),X(this,t,we,ye,d,{id:0,value:1})}}function xe(t){let e,n,o;function a(e){t[8](e)}let s={id:t[6]};return void 0!==t[3]&&(s.value=t[3]),e=new ve({props:s}),I.push((()=>function(t,e,n){const o=t.$$.props[e];void 0!==o&&(t.$$.bound[o]=n,n(t.$$.ctx[o]))}(e,"value",a))),{c(){K(e.$$.fragment)},m(t,n){G(e,t,n),o=!0},p(t,o){const a={};var s;!n&&8&o&&(n=!0,a.value=t[3],s=()=>n=!1,N.push(s)),e.$set(a)},i(t){o||(U(e.$$.fragment,t),o=!0)},o(t){z(e.$$.fragment,t),o=!1},d(t){J(e,t)}}}function be(t){let e,n;return e=new t[5]({props:{title:t[2],closeCallback:t[7],$$slots:{default:[xe]},$$scope:{ctx:t}}}),{c(){K(e.$$.fragment)},m(t,o){G(e,t,o),n=!0},p(t,n){const o={};4&n&&(o.title=t[2]),1032&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(U(e.$$.fragment,t),n=!0)},o(t){z(e.$$.fragment,t),n=!1},d(t){J(e,t)}}}function ke(t){let e,n;return e=new t[4]({props:{open:t[1],messages:t[0],$$slots:{default:[be]},$$scope:{ctx:t}}}),{c(){K(e.$$.fragment)},m(t,o){G(e,t,o),n=!0},p(t,[n]){const o={};2&n&&(o.open=t[1]),1&n&&(o.messages=t[0]),1036&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(U(e.$$.fragment,t),n=!0)},o(t){z(e.$$.fragment,t),n=!1},d(t){J(e,t)}}}function _e(t,e,n){const o=T(),{Modal:s,Dialog:i}=a;let r,{title:c}=e,{messages:l=""}=e,{modalOpen:u=!1}=e;return t.$$set=t=>{"title"in t&&n(2,c=t.title),"messages"in t&&n(0,l=t.messages),"modalOpen"in t&&n(1,u=t.modalOpen)},t.$$.update=()=>{9&t.$$.dirty&&l&&(n(3,r=[].concat(l).join("\n")),r&&n(1,u=!0))},[l,u,c,r,s,i,"modalDialog",t=>{n(1,u=!1),n(3,r=""),n(0,l=""),o("change",u)},function(t){r=t,n(3,r),n(0,l)}]}t("version","0.2.87");const Se=window.sessionStorage;Se.clear();t("Storage",{getItem:t=>Se.getItem(t),setItem:(t,e)=>Se.setItem(t,e)});t("toasts",function(){const t=ot([]);function e(e,n,o="default"){n||(n=3e3),t.update((t=>t.length>3?t:t=[...t,{id:"_"+Math.random().toString(36).substring(2,9),type:o,msg:e,timeout:n}]))}const n=at(t,((e,n)=>{if(n(e),e&&e.length>0){const n=setTimeout((()=>{t.update((t=>(console.log("shift"),t.shift(),t)))}),e[0].timeout);return()=>{clearTimeout(n)}}})),{subscribe:o}=n;return{subscribe:o,send:e,default:(t,n)=>e(t,n,"default"),success:(t,n)=>e(t,n,"success"),failed:(t,n)=>e(t,n,"failed")}}()),t("LinkIcon",class extends Y{constructor(t){var e,n,o;super(),document.getElementById("svelte-1jng2dw-style")||((o=v("style")).id="svelte-1jng2dw-style",o.textContent=".red.svelte-1jng2dw{background-color:var(--m-color-red-light)}.blue.svelte-1jng2dw{background-color:var(--m-color-blue-light)}.green.svelte-1jng2dw{background-color:var(--m-color-green-light)}.icon.svelte-1jng2dw{max-height:1.2em}",e=document.head,n=o,e.appendChild(n)),X(this,t,tt,Z,d,{title:0,link:3,color:1})}}),t("Page",class extends Y{constructor(t){super(),X(this,t,he,fe,d,{options:0,update:6,loadingDelay:1})}}),t("Request",Nt),t("TextArea",$e),t("ModalDialog",class extends Y{constructor(t){super(),X(this,t,_e,ke,d,{title:2,messages:0,modalOpen:1})}})}}}));
|