@enablerr-ui/form 0.2.113 → 0.2.114

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 CHANGED
@@ -1 +1 @@
1
- System.register(["axios","@enablerr-ui/auth","@enablerr-ui/layout"],(function(t){"use strict";var e,n,a,o;return{setters:[function(t){e=t.default},function(t){n=t.user},function(t){a=t.getGridHelp,o=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 h(t){let e;return p(t,(t=>e=t))(),e}function f(t,e,n,a){if(t){const o=g(t,e,n,a);return t[0](o)}}function g(t,e,n,a){return t[1]&&a?i(n.ctx.slice(),t[1](a(e))):n.ctx}function m(t,e,n,a,o,s,i){const r=function(t,e,n,a){if(t[2]&&a){const o=t[2](a(n));if(void 0===e.dirty)return o;if("object"==typeof o){const t=[],n=Math.max(e.dirty.length,o.length);for(let a=0;a<n;a+=1)t[a]=e.dirty[a]|o[a];return t}return e.dirty|o}return e.dirty}(e,a,o,s);if(r){const o=g(e,n,a,i);t.p(o,r)}}function $(t,e){const n={};e=new Set(e);for(const a in t)e.has(a)||"$"===a[0]||(n[a]=t[a]);return n}function y(t,e){t.appendChild(e)}function w(t,e,n){t.insertBefore(e,n||null)}function x(t){t.parentNode.removeChild(t)}function v(t){return document.createElement(t)}function k(){return t="",document.createTextNode(t);var t}function b(t,e,n,a){return t.addEventListener(e,n,a),()=>t.removeEventListener(e,n,a)}function _(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}let T;function D(t){T=t}function I(){if(!T)throw new Error("Function called outside component initialization");return T}function S(){const t=I();return(e,n)=>{const a=t.$$.callbacks[e];if(a){const o=function(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}(e,n);a.slice().forEach((e=>{e.call(t,o)}))}}}const E=[],j=[],N=[],C=[],P=Promise.resolve();let L=!1;function M(t){N.push(t)}function A(t){C.push(t)}let F=!1;const O=new Set;function R(){if(!F){F=!0;do{for(let t=0;t<E.length;t+=1){const e=E[t];D(e),B(e.$$)}for(D(null),E.length=0;j.length;)j.pop()();for(let t=0;t<N.length;t+=1){const e=N[t];O.has(e)||(O.add(e),e())}N.length=0}while(E.length);for(;C.length;)C.pop()();L=!1,F=!1,O.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 q=new Set;let V;function U(){V={r:0,c:[],p:V}}function z(){V.r||l(V.c),V=V.p}function H(t,e){t&&t.i&&(q.delete(t),t.i(e))}function W(t,e,n,a){if(t&&t.o){if(q.has(t))return;q.add(t),V&&V.c.push((()=>{q.delete(t),a&&(n&&t.d(1),a())})),t.o(e)}}function K(t,e){const n=e.token={};function a(t,a,o,s){if(e.token!==n)return;e.resolved=s;let i=e.ctx;void 0!==o&&(i=i.slice(),i[o]=s);const r=t&&(e.current=t)(i);let c=!1;e.block&&(e.blocks?e.blocks.forEach(((t,n)=>{n!==a&&t&&(U(),W(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),z())})):e.block.d(1),r.c(),H(r,1),r.m(e.mount(),e.anchor),c=!0),e.block=r,e.blocks&&(e.blocks[a]=r),c&&R()}if((o=t)&&"object"==typeof o&&"function"==typeof o.then){const n=I();if(t.then((t=>{D(n),a(e.then,1,e.value,t),D(null)}),(t=>{if(D(n),a(e.catch,2,e.error,t),D(null),!e.hasCatch)throw t})),e.current!==e.pending)return a(e.pending,0),!0}else{if(e.current!==e.then)return a(e.then,1,e.value,t),!0;e.resolved=t}var o}function G(t,e,n){const a=e.slice(),{resolved:o}=t;t.current===t.then&&(a[t.value]=o),t.current===t.catch&&(a[t.error]=o),t.block.p(a,n)}const J="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function Q(t,e,n){const a=t.$$.props[e];void 0!==a&&(t.$$.bound[a]=n,n(t.$$.ctx[a]))}function X(t){t&&t.c()}function Y(t,e,n,a){const{fragment:o,on_mount:s,on_destroy:i,after_update:c}=t.$$;o&&o.m(e,n),a||M((()=>{const e=s.map(r).filter(u);i?i.push(...e):l(e),t.$$.on_mount=[]})),c.forEach(M)}function Z(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 tt(t,e){-1===t.$$.dirty[0]&&(E.push(t),L||(L=!0,P.then(R)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function et(t,e,n,a,o,i,r=[-1]){const u=T;D(t);const d=t.$$={fragment:null,ctx:null,props:i,update:s,not_equal:o,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,...a)=>{const s=a.length?a[0]:n;return d.ctx&&o(d.ctx[e],d.ctx[e]=s)&&(!d.skip_bound&&d.bound[e]&&d.bound[e](s),p&&tt(t,e)),n})):[],d.update(),p=!0,l(d.before_update),d.fragment=!!a&&a(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(x)}else d.fragment&&d.fragment.c();e.intro&&H(t.$$.fragment),Y(t,e.target,e.anchor,e.customElement),R()}D(u)}class nt{$destroy(){Z(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 at(t){let e,n,a,o,s;const i=t[5].default,r=f(i,t,t[4],null);return{c(){e=v("span"),r&&r.c(),_(e,"class",n="pointer icon flex brd-radius-full brd-with-sm "+t[1]+" svelte-1jng2dw"),_(e,"title",t[0])},m(n,i){w(n,e,i),r&&r.m(e,null),a=!0,o||(s=b(e,"click",t[2]),o=!0)},p(t,[o]){r&&r.p&&(!a||16&o)&&m(r,i,t,t[4],o,null,null),(!a||2&o&&n!==(n="pointer icon flex brd-radius-full brd-with-sm "+t[1]+" svelte-1jng2dw"))&&_(e,"class",n),(!a||1&o)&&_(e,"title",t[0])},i(t){a||(H(r,t),a=!0)},o(t){W(r,t),a=!1},d(t){t&&x(e),r&&r.d(t),o=!1,s()}}}function ot(t,e,n){let{$$slots:a={},$$scope:o}=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,o=t.$$scope)},[s,r,()=>window.singleSpaNavigate(i),i,o,a]}const st=[];function it(t,e){return{subscribe:rt(t,e).subscribe}}function rt(t,e=s){let n;const a=[];function o(e){if(d(t,e)&&(t=e,n)){const e=!st.length;for(let e=0;e<a.length;e+=1){const n=a[e];n[1](),st.push(n,t)}if(e){for(let t=0;t<st.length;t+=2)st[t][0](st[t+1]);st.length=0}}}return{set:o,update:function(e){o(e(t))},subscribe:function(i,r=s){const c=[i,r];return a.push(c),1===a.length&&(n=e(o)||s),i(t),()=>{const t=a.indexOf(c);-1!==t&&a.splice(t,1),0===a.length&&(n(),n=null)}}}}function ct(t,e,n){const a=!Array.isArray(t),o=a?[t]:t,i=e.length<2;return it(n,(t=>{let n=!1;const r=[];let c=0,d=s;const h=()=>{if(c)return;d();const n=e(a?r[0]:r,t);i?t(n):d=u(n)?n:s},f=o.map(((t,e)=>p(t,(t=>{r[e]=t,c&=~(1<<e),n&&h()}),(()=>{c|=1<<e}))));return n=!0,h(),function(){l(f),d()}}))}const lt=()=>[{moduleId:"1111",position:"0"},{moduleId:"3333",position:""}],ut=()=>[{id:"Standard",activated:!0,days:["Mo","Tu","We","Th","Fr","Sa","Su"],moduleList:[{moduleId:"1111",position:"0"},{moduleId:"3333",position:""}]}],{loggedIn:dt}=n,pt=(t,e)=>{let n="";return t&&(n+=`/${t}`,e&&(n+=`/${e}`)),n},ht=async(t,e)=>{const n=pt(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:ft}=n,gt=async(t,e)=>[],mt=t("notification",rt(!1)),$t=t("notifications_local",rt([])),yt=t("communication_notification",rt(!1)),wt=t("task_notification",rt(!1)),xt=t("approval_notification",rt(!1)),vt=t("attachment_notification",rt(!1)),kt=rt(!1),bt=t("settings",rt({})),_t=(t("currentRoles",rt()),rt(Date.now()+1e7)),Tt=ct(it(Date.now(),(function(t){const e=setInterval((()=>{t(Date.now())}),6e4);return function(){clearInterval(e)}})),(t=>t>h(_t)));Tt.subscribe((t=>{if(t)if((()=>{let t=St.filter((t=>t._valid>Date.now()));St=t,$t.set(St),mt.set(!0)})(),St.length>0){const t=St.reduce(((t,e)=>t.__valid<e.__valid?t:e));_t.set(t.__valid)}else _t.set(Date.now()+1e7)}));const Dt=[{type:"communication",desc:"Kommunikation",obj:yt},{type:"task",desc:"Aufgabe",obj:wt},{type:"approval",desc:"Visum",obj:xt},{type:"attachment",desc:"Dokument",obj:vt},{type:"workflow",desc:"Worfklow",obj:kt}],It=(t,e=!1)=>{const n=h(bt).setting,a=n?.notificationActivated,o=n?.typesOfNotification,s=Dt.find((e=>e.type===t.type));if(a&&o.find((t=>t===s?.desc))){const e=St.filter((e=>e.id==t.id&&e.user==t.user));e.length>0?St[St.indexOf(e[0])]=t:(St.unshift(t),t.__valid<_t&&_t.set(t.__valid)),$t.set(St),mt.set(!1)}e&&s?.obj.set(t)};let St=[];let Et=[{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 jt=[{id:1111,name:"TaskModule",text:"Alle Tasks",status:!1,6:a.item({x:0,y:0,w:4,h:5,customDragger:!0}),5:a.item({x:0,y:0,w:4,h:5,customDragger:!0}),4:a.item({x:0,y:0,w:3,h:5,customDragger:!0}),3:a.item({x:0,y:0,w:2,h:5,customDragger:!0}),2:a.item({x:0,y:0,w:1,h:5,customDragger:!0}),1:a.item({x:0,y:0,w:1,h:5,customDragger:!0})},{id:3333,name:"Chat Modul",text:"Chat",status:!1,6:a.item({x:4,y:0,w:1,h:5,customDragger:!0}),5:a.item({x:4,y:0,w:1,h:5,customDragger:!0}),4:a.item({x:3,y:0,w:1,h:5,customDragger:!0}),3:a.item({x:2,y:0,w:1,h:5,customDragger:!0}),2:a.item({x:1,y:0,w:1,h:5,customDragger:!0}),1:a.item({x:1,y:0,w:1,h:5,customDragger:!0})},{id:9999,name:"Neues Modul",text:"+",status:!1,6:a.item({x:4,y:0,w:1,h:2}),5:a.item({x:4,y:0,w:1,h:2}),4:a.item({x:3,y:0,w:1,h:2}),3:a.item({x:2,y:0,w:1,h:2}),2:a.item({x:1,y:0,w:1,h:2}),1:a.item({x:1,y:0,w:1,h:2})}],{cacheValidator:Nt,onLogout:Ct}=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 Pt=new Map;const Lt=(t,e)=>(...n)=>{const a=h(Nt),o=window.localStorage.getItem("enablerr-tenant");"invalid"===a.status&&(Pt=new Map,Nt.set({tenant:o,status:""}));const s=[].concat(o,e,n).join("-");let i=Pt.get(s);if(!i)try{i=t(...n),Pt.set(s,i)}catch(t){throw t}return i};var Mt={getSchema:Lt((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:Lt((async t=>(await axios.get(`/api/schemabyclass/${t}`)).data),"getSchemaByClass"),getEvents:Lt((()=>axios.get("/api/event").then((t=>t.data)).catch((t=>{throw"Events not found"}))),"getEvents"),getEvent:Lt((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,e=!1,n=!1)=>axios.get(`/api/tasks/${t}${e?"/byIdentity":""}${n?"/all":""}?display=list`).then((t=>t.data)).catch((t=>{throw"list not found"})),getTasks:(t,e=!1)=>axios.get(`/api/tasks/${t}${e?"/byIdentity":""}?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"})),getTaskqueueDocs:t=>axios.post("/api/taskqueue/docs",{eventName:t}).then((t=>t.data)).catch((t=>{throw"docs not found"})),getReporting:()=>axios.get("/api/taskqueue/reporting").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,getPlanning:async(t,e,n)=>(await axios.get(`/api/planning/${t}/${e}/${n}`)).data,savePlanning:async(t,e)=>(await axios.post(`/api/planning/${t}`,e)).data,deletePlanning:async(t,e)=>(await axios.patch(`/api/planning/${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,n=!1)=>axios.get(`/api/task/${t}/${e}${n?"/recursive":""}`).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,a)=>axios.get(`/api/task/${t}/${fieldName}/section/${n}/${a}`).then((t=>t.data)).catch((t=>{throw"internal error"})),getSection:(t,e,n,a=!1)=>axios.post("/api/read/"+t,{[e]:n,status:!0,_unique:a}).then((t=>a?t.data.map((t=>({[a]: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,a,o)=>axios.get(`/api/task/${t}/${e}/${n}/count/${a}/${o}`).then((t=>t.data)).catch((t=>{throw"internal error"})),readTasksByAggregationId:(t,e=!1)=>axios.get(`/api/tasks/id/${t}${e?"/stop":""}`).then((t=>t.data)).catch((t=>{throw"list not found"})),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,n)=>(await axios.post(`/api/plugin/${t}`,{body:e,template:n})).data,deletePlugin:async t=>(await axios.delete(`/api/plugin/${t}`)).data,deletePluginAndData:()=>axios.delete("/api/plugin"),dataImport:async(t,e)=>(await axios.post("/api/plugin/import",t,e)).data,dataImportProgress:async t=>(await axios.get(`/api/plugin/import/${t}`)).data,dataExport:async t=>(await axios.post("/api/plugin/export",t)).data,dataExportProgress:async t=>(await axios.get(`/api/plugin/export/${t}`)).data,dataExportResult:async t=>(await axios.get(`/api/plugin/export/result/${t}`)).data,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,n)=>(await axios.post("/api/auth/login",{username:t,passcode:e,ticketId:n})).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:ht,saveChat:async(t,e,n)=>{const{user:a}=h(dt);let o=await ht(t,e);o[0]||(n.sender=a);const s=o[0]?"patch":"post",i=pt(t,e);return(await axios[s]("/api/comm/chat"+i,n)).data.id},getFeedback:gt,saveFeedback:async(t,e,n,a,o)=>{const s={};t&&(s.event={id:t}),e&&(s.task={id:e});let i=await gt();if(i[0]&&null!=o){let t=i.filter((t=>t._id===o));t={...t,...a};const{user:e}=h(ft);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,...a};const{user:t}=h(ft);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,getUserReport:async t=>(await axios.get("/api/userreport/"+t)).data,uploadUserReport:async(t,e)=>(await axios.post("/api/userreport/"+t,e)).data,deleteUserReport:async t=>(await axios.delete("/api/userreport/"+t)).data,getReport:async t=>(await axios.get(`/api/report/event/${t}`)).data,getReportData:async(t,e)=>(await axios.post(`/api/report/list/${t}/data`,e)).data,getReportDoc:async t=>(await axios.get(`/api/report/task/${t}`)).data,getDocData:async t=>(await axios.post(`/api/report/task/${t}/data`)).data,createReport:async(t,e)=>(await axios.post(`/api/report/list/${t}`,e)).data,load:t=>axios.post("/api/neo4j",{taskId:t}).then((t=>t.data)).catch((t=>{throw"workflows not loaded"})),getMatrixItems:(t,e)=>axios.get(`/api/matrix/${t}/${e}`).then((t=>t.data)).catch((t=>{throw"matrix not found"})),getDefaultModuleList:lt,getDefaultLayout:ut,getNotifications:t=>axios.get("/api/notification").then((async t=>{await new Promise((t=>setTimeout(t,2e3)));for(let e of t.data)It(e,!1);return St})),getNotificationsLocal:t=>St,saveNotification:It,updateNotification:t=>{let e=St.filter((e=>e.id==t.id&&e.user==t.user));e.length>0?(St[St.indexOf(e[0])]=t,$t.set(St)):It(t,!1)},getNotificationTypes:Lt((()=>axios.get("/api/notification/type").then((t=>t.data))),"getNotificationTypes"),getRoles:t=>Et.filter((e=>e.user===t)),getModules:t=>jt.filter((e=>t.includes(e.id))),getModuleName:t=>{const e=jt.find((e=>e.id===Number(t)));return e?e.name:"Unbekanntes Modul"},getAllModules:()=>jt,createTicket:t=>axios.post("/api/ticket",t).then((t=>t.data)).catch((t=>{})),getTickets:()=>axios.get("/api/ticket").then((t=>t.data)).catch((t=>{throw"ticket not found"})),deleteTicket:t=>axios.delete(`/api/ticket/${t}`).then((t=>t.data)).catch((t=>{})),getTicketByUser:t=>axios.get(`/api/ticket/${t}`).then((t=>t.data)).catch((t=>{throw"ticket not found"}))};const At=Intl.NumberFormat().formatToParts(1.1).find((({type:t})=>"decimal"===t)).value||".",Ft=t=>"function"==typeof t,Ot=t=>t&&t.toString,Rt=(t,...e)=>e.includes(t),Bt=t=>Rt(t,void 0,null),qt=t=>!Bt(t),Vt=(t=null,e,...n)=>{try{return e(...n)}catch{return t}},Ut=t=>(e,...n)=>Vt(Vt("",t.toString),e,...n),zt=(t,e=2,n=0,a=t.toString(),o=n.toString())=>o.repeat(e-a.length)+a,Ht=(t,e=window)=>({listen(n,a){e[`${n}EventListener`](t,a)},start(t){this.listen("add",t)},stop(t){this.listen("remove",t)}}),Wt=(...t)=>!t.map((({value:t,check:e,text:n})=>e(t)||Jt(console.error,n))).every(Boolean),Kt=t=>(e,n)=>(Promise.resolve(n).then(e),t),Gt=Kt(!0),Jt=Kt(!1);var Qt=Object.freeze({__proto__:null,decimalSeparator:At,isFunction:Ft,isStringable:Ot,isObjEmpty:(t={})=>!Object.keys(t).length,hasValue:Rt,isNullish:Bt,isNotNullish:qt,bestValue:(t,...e)=>e.concat(t).find(qt),tryCatch:Vt,ensureStrValue:Ut,padLeft:(...t)=>Ut(t[0])(zt,...t),showupElement:(t="",e=0,n=document.getElementById(t))=>n&&n.style&&(n.style.display="block",setTimeout((()=>n.style.display="none"),e)),getListener:Ht,isMissing:Wt,go:Gt,stop:Jt});t("util",Qt);const Xt="single-spa:routing-event",Yt=Ht(Xt);function Zt(t,{modulePath:e,update:n}){if(!1===n)return;if(Wt({value:n,check:Ft,text:"<update> should be a function (dataListener)"},{value:e,check:Ot,text:"<modulePath> should be a string (dataListener)"}))return;const a=e.toString()||"/",o=e=>{const o=e.currentTarget.location.pathname,[,s,...i]=o.split("/");a===(s||"/")&&t.dispatchEvent(new CustomEvent("data",{detail:{data:n(...i)}}))};return Yt.start(o),{destroy:()=>Yt.stop(o)}}const te=()=>window.dispatchEvent(new CustomEvent(Xt)),ee=t=>({prop:4&t,tenant:8&t,user:8&t}),ne=t=>({prop:t[11],refresh:te,tenant:t[3].tenant,user:t[3].user}),ae=t=>({err:4&t,prop:4&t,tenant:8&t,user:8&t}),oe=t=>({err:t[12],prop:t[11],refresh:te,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:te,tenant:t[3].tenant,user:t[3].user}),re=t=>({prop:4&t,tenant:8&t,user:8&t}),ce=t=>({prop:t[11],refresh:te,tenant:t[3].tenant,user:t[3].user});function le(t){let e;const n=t[8].init,a=f(n,t,t[7],ne);return{c(){a&&a.c()},m(t,n){a&&a.m(t,n),e=!0},p(t,o){a&&a.p&&(!e||140&o)&&m(a,n,t,t[7],o,ee,ne)},i(t){e||(H(a,t),e=!0)},o(t){W(a,t),e=!1},d(t){a&&a.d(t)}}}function ue(t){let e,n,a,o={ctx:t,current:null,token:null,hasCatch:!0,pending:he,then:pe,catch:de,value:11,error:12,blocks:[,,,]};return K(n=t[2],o),{c(){e=k(),o.block.c()},m(t,n){w(t,e,n),o.block.m(t,o.anchor=n),o.mount=()=>e.parentNode,o.anchor=e,a=!0},p(e,a){t=e,o.ctx=t,4&a&&n!==(n=t[2])&&K(n,o)||G(o,t,a)},i(t){a||(H(o.block),a=!0)},o(t){for(let t=0;t<3;t+=1){W(o.blocks[t])}a=!1},d(t){t&&x(e),o.block.d(t),o.token=null,o=null}}}function de(t){let e;const n=t[8].error,a=f(n,t,t[7],oe);return{c(){a&&a.c()},m(t,n){a&&a.m(t,n),e=!0},p(t,o){a&&a.p&&(!e||140&o)&&m(a,n,t,t[7],o,ae,oe)},i(t){e||(H(a,t),e=!0)},o(t){W(a,t),e=!1},d(t){a&&a.d(t)}}}function pe(t){let e;const n=t[8].default,a=f(n,t,t[7],ie);return{c(){a&&a.c()},m(t,n){a&&a.m(t,n),e=!0},p(t,o){a&&a.p&&(!e||140&o)&&m(a,n,t,t[7],o,se,ie)},i(t){e||(H(a,t),e=!0)},o(t){W(a,t),e=!1},d(t){a&&a.d(t)}}}function he(t){let e,n,a,o={ctx:t,current:null,token:null,hasCatch:!1,pending:me,then:ge,catch:fe,value:10,blocks:[,,,]};return K(n=t[5](t[1]),o),{c(){e=k(),o.block.c()},m(t,n){w(t,e,n),o.block.m(t,o.anchor=n),o.mount=()=>e.parentNode,o.anchor=e,a=!0},p(e,a){t=e,o.ctx=t,2&a&&n!==(n=t[5](t[1]))&&K(n,o)||G(o,t,a)},i(t){a||(H(o.block),a=!0)},o(t){for(let t=0;t<3;t+=1){W(o.blocks[t])}a=!1},d(t){t&&x(e),o.block.d(t),o.token=null,o=null}}}function fe(t){return{c:s,m:s,p:s,i:s,o:s,d:s}}function ge(t){let e;const n=t[8].load,a=f(n,t,t[7],ce);return{c(){a&&a.c()},m(t,n){a&&a.m(t,n),e=!0},p(t,o){a&&a.p&&(!e||140&o)&&m(a,n,t,t[7],o,re,ce)},i(t){e||(H(a,t),e=!0)},o(t){W(a,t),e=!1},d(t){a&&a.d(t)}}}function me(t){return{c:s,m:s,p:s,i:s,o:s,d:s}}function $e(t){let e,n,a,o,i,r,c;const d=[ue,le],p=[];function h(t,e){return t[2]?0:1}return n=h(t),a=p[n]=d[n](t),{c(){e=v("section"),a.c(),_(e,"class","data")},m(a,l){var d;w(a,e,l),p[n].m(e,null),i=!0,r||(c=[(d=o=Zt.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=h(t),n===i?p[n].p(t,s):(U(),W(p[i],1,1,(()=>{p[i]=null})),z(),a=p[n],a?a.p(t,s):(a=p[n]=d[n](t),a.c()),H(a,1),a.m(e,null)),o&&u(o.update)&&1&s&&o.update.call(null,t[0])},i(t){i||(H(a),i=!0)},o(t){W(a),i=!1},d(t){t&&x(e),p[n].d(),r=!1,l(c)}}}function ye(t,e,a){let o,{$$slots:s={},$$scope:i}=e;const{loggedIn:r}=n;var c,l;c=r,l=t=>a(3,o=t),t.$$.on_destroy.push(p(c,l));let u,{options:d}=e,{update:h=!1}=e,{loadingDelay:f=250}=e;h&&(d={update:h,modulePath:window.location.pathname.split("/")[1]||"/"});return t.$$set=t=>{"options"in t&&a(0,d=t.options),"update"in t&&a(6,h=t.update),"loadingDelay"in t&&a(1,f=t.loadingDelay),"$$scope"in t&&a(7,i=t.$$scope)},[d,f,u,o,r,t=>new Promise((e=>setTimeout(e,t))),h,i,s,({detail:t})=>a(2,u=t.data)]}const{document:we}=J;function xe(t){let e,n,a;const o=[{class:"full-width"},{style:t[1]},{inputClass:t[2]||t[5]},{multiline:!0},{readonly:t[6]},{id:t[3]},{placeholder:t[7]},{rows:t[4]},t[11]];function s(e){t[13](e)}let r={};for(let t=0;t<o.length;t+=1)r=i(r,o[t]);return void 0!==t[0]&&(r.value=t[0]),e=new t[8]({props:r}),j.push((()=>Q(e,"value",s))),e.$on("change",t[9]),e.$on("focus",t[10]),{c(){X(e.$$.fragment)},m(t,n){Y(e,t,n),a=!0},p(t,[a]){const s=2302&a?function(t,e){const n={},a={},o={$$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||(a[t]=1);for(const t in r)o[t]||(n[t]=r[t],o[t]=1);t[s]=r}else for(const t in i)o[t]=1}for(const t in a)t in n||(n[t]=void 0);return n}(o,[o[0],2&a&&{style:t[1]},36&a&&{inputClass:t[2]||t[5]},o[3],64&a&&{readonly:t[6]},8&a&&{id:t[3]},128&a&&{placeholder:t[7]},16&a&&{rows:t[4]},2048&a&&(i=t[11],"object"==typeof i&&null!==i?i:{})]):{};var i;!n&&1&a&&(n=!0,s.value=t[0],A((()=>n=!1))),e.$set(s)},i(t){a||(H(e.$$.fragment,t),a=!0)},o(t){W(e.$$.fragment,t),a=!1},d(t){Z(e,t)}}}function ve(t,e,n){const a=["noForm","id","value","style","rows","classId","readonly","overwrite","placeholder"];let s=$(e,a);const r=S(),{TextField:c}=o;let{noForm:l=""}=e,{id:u}=e,{value:d}=e,{style:p=""}=e,{rows:h=3}=e,{classId:f}=e,{readonly:g}=e,{overwrite:m}=e,{placeholder:y=""}=e;p+=" padding-bottom: .5em;";const w=5*(h>1),x=()=>{const t=document.getElementById(u);if(!t)return;const{style:e,scrollHeight:n}=t;n&&(e.height=`${n+w}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(11,s=$(e,a)),"noForm"in t&&n(2,l=t.noForm),"id"in t&&n(3,u=t.id),"value"in t&&n(0,d=t.value),"style"in t&&n(1,p=t.style),"rows"in t&&n(4,h=t.rows),"classId"in t&&n(5,f=t.classId),"readonly"in t&&n(6,g=t.readonly),"overwrite"in t&&n(12,m=t.overwrite),"placeholder"in t&&n(7,y=t.placeholder)},t.$$.update=()=>{4096&t.$$.dirty&&m&&(n(0,d=""),n(12,m=!1)),1&t.$$.dirty&&d&&setTimeout(x)},[d,p,l,u,h,f,g,y,c,({detail:{value:t}})=>r("blur",{value:t}),()=>r("onFocus"),s,m,function(t){d=t,n(0,d),n(12,m)}]}class ke extends nt{constructor(t){var e;super(),we.getElementById("svelte-bi3t3d-style")||((e=v("style")).id="svelte-bi3t3d-style",e.textContent="div.text-field.full-width textarea{resize:vertical}",y(we.head,e)),et(this,t,ve,xe,d,{noForm:2,id:3,value:0,style:1,rows:4,classId:5,readonly:6,overwrite:12,placeholder:7})}}function be(t){let e,n;return e=new ke({props:{style:"min-width: 25em; overflow-y: hidden; resize: none;",id:t[0],value:t[1]}}),{c(){X(e.$$.fragment)},m(t,a){Y(e,t,a),n=!0},p(t,[n]){const a={};1&n&&(a.id=t[0]),2&n&&(a.value=t[1]),e.$set(a)},i(t){n||(H(e.$$.fragment,t),n=!0)},o(t){W(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function _e(t,e,n){let{id:a}=e,{value:o}=e;return t.$$set=t=>{"id"in t&&n(0,a=t.id),"value"in t&&n(1,o=t.value)},[a,o]}class Te extends nt{constructor(t){super(),et(this,t,_e,be,d,{id:0,value:1})}}function De(t){let e,n,a;function o(e){t[8](e)}let s={id:t[6]};return void 0!==t[3]&&(s.value=t[3]),e=new Te({props:s}),j.push((()=>Q(e,"value",o))),{c(){X(e.$$.fragment)},m(t,n){Y(e,t,n),a=!0},p(t,a){const o={};!n&&8&a&&(n=!0,o.value=t[3],A((()=>n=!1))),e.$set(o)},i(t){a||(H(e.$$.fragment,t),a=!0)},o(t){W(e.$$.fragment,t),a=!1},d(t){Z(e,t)}}}function Ie(t){let e,n;return e=new t[5]({props:{title:t[2],closeCallback:t[7],$$slots:{default:[De]},$$scope:{ctx:t}}}),{c(){X(e.$$.fragment)},m(t,a){Y(e,t,a),n=!0},p(t,n){const a={};4&n&&(a.title=t[2]),1032&n&&(a.$$scope={dirty:n,ctx:t}),e.$set(a)},i(t){n||(H(e.$$.fragment,t),n=!0)},o(t){W(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function Se(t){let e,n;return e=new t[4]({props:{open:t[1],messages:t[0],$$slots:{default:[Ie]},$$scope:{ctx:t}}}),{c(){X(e.$$.fragment)},m(t,a){Y(e,t,a),n=!0},p(t,[n]){const a={};2&n&&(a.open=t[1]),1&n&&(a.messages=t[0]),1036&n&&(a.$$scope={dirty:n,ctx:t}),e.$set(a)},i(t){n||(H(e.$$.fragment,t),n=!0)},o(t){W(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function Ee(t,e,n){const a=S(),{Modal:s,Dialog:i}=o;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=""),a("change",u)},function(t){r=t,n(3,r),n(0,l)}]}t("version","0.2.113");const je=window.sessionStorage;je.clear();t("Storage",{getItem:t=>je.getItem(t),setItem:(t,e)=>je.setItem(t,e)});t("toasts",function(){const t=rt([]);function e(e,n,a="default"){n||(n=3e3),t.update((t=>t.length>3?t:t=[...t,{id:"_"+Math.random().toString(36).substring(2,9),type:a,msg:e,timeout:n}]))}const n=ct(t,((e,n)=>{if(n(e),e&&e.length>0){const n=setTimeout((()=>{t.update((t=>(t.shift(),t)))}),e[0].timeout);return()=>{clearTimeout(n)}}})),{subscribe:a}=n;return{subscribe:a,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 nt{constructor(t){var e;super(),document.getElementById("svelte-1jng2dw-style")||((e=v("style")).id="svelte-1jng2dw-style",e.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}",y(document.head,e)),et(this,t,ot,at,d,{title:0,link:3,color:1})}}),t("Page",class extends nt{constructor(t){super(),et(this,t,ye,$e,d,{options:0,update:6,loadingDelay:1})}}),t("Request",Mt),t("TextArea",ke),t("ModalDialog",class extends nt{constructor(t){super(),et(this,t,Ee,Se,d,{title:2,messages:0,modalOpen:1})}})}}}));
1
+ System.register(["axios","@enablerr-ui/auth","@enablerr-ui/layout"],(function(t){"use strict";var e,a,n,o;return{setters:[function(t){e=t.default},function(t){a=t.user},function(t){n=t.getGridHelp,o=t.getAttractions}],execute:function(){function s(){}function i(t,e){for(const a in e)t[a]=e[a];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 a=t.subscribe(...e);return a.unsubscribe?()=>a.unsubscribe():a}function h(t){let e;return p(t,(t=>e=t))(),e}function g(t,e,a,n){if(t){const o=f(t,e,a,n);return t[0](o)}}function f(t,e,a,n){return t[1]&&n?i(a.ctx.slice(),t[1](n(e))):a.ctx}function m(t,e,a,n,o,s,i){const r=function(t,e,a,n){if(t[2]&&n){const o=t[2](n(a));if(void 0===e.dirty)return o;if("object"==typeof o){const t=[],a=Math.max(e.dirty.length,o.length);for(let n=0;n<a;n+=1)t[n]=e.dirty[n]|o[n];return t}return e.dirty|o}return e.dirty}(e,n,o,s);if(r){const o=f(e,a,n,i);t.p(o,r)}}function $(t,e){const a={};e=new Set(e);for(const n in t)e.has(n)||"$"===n[0]||(a[n]=t[n]);return a}function y(t,e){t.appendChild(e)}function w(t,e,a){t.insertBefore(e,a||null)}function x(t){t.parentNode.removeChild(t)}function v(t){return document.createElement(t)}function k(){return t="",document.createTextNode(t);var t}function b(t,e,a,n){return t.addEventListener(e,a,n),()=>t.removeEventListener(e,a,n)}function _(t,e,a){null==a?t.removeAttribute(e):t.getAttribute(e)!==a&&t.setAttribute(e,a)}let T;function D(t){T=t}function I(){if(!T)throw new Error("Function called outside component initialization");return T}function S(){const t=I();return(e,a)=>{const n=t.$$.callbacks[e];if(n){const o=function(t,e){const a=document.createEvent("CustomEvent");return a.initCustomEvent(t,!1,!1,e),a}(e,a);n.slice().forEach((e=>{e.call(t,o)}))}}}const E=[],j=[],N=[],C=[],P=Promise.resolve();let L=!1;function M(t){N.push(t)}function A(t){C.push(t)}let F=!1;const O=new Set;function R(){if(!F){F=!0;do{for(let t=0;t<E.length;t+=1){const e=E[t];D(e),B(e.$$)}for(D(null),E.length=0;j.length;)j.pop()();for(let t=0;t<N.length;t+=1){const e=N[t];O.has(e)||(O.add(e),e())}N.length=0}while(E.length);for(;C.length;)C.pop()();L=!1,F=!1,O.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 q=new Set;let V;function U(){V={r:0,c:[],p:V}}function W(){V.r||l(V.c),V=V.p}function z(t,e){t&&t.i&&(q.delete(t),t.i(e))}function H(t,e,a,n){if(t&&t.o){if(q.has(t))return;q.add(t),V&&V.c.push((()=>{q.delete(t),n&&(a&&t.d(1),n())})),t.o(e)}}function K(t,e){const a=e.token={};function n(t,n,o,s){if(e.token!==a)return;e.resolved=s;let i=e.ctx;void 0!==o&&(i=i.slice(),i[o]=s);const r=t&&(e.current=t)(i);let c=!1;e.block&&(e.blocks?e.blocks.forEach(((t,a)=>{a!==n&&t&&(U(),H(t,1,1,(()=>{e.blocks[a]===t&&(e.blocks[a]=null)})),W())})):e.block.d(1),r.c(),z(r,1),r.m(e.mount(),e.anchor),c=!0),e.block=r,e.blocks&&(e.blocks[n]=r),c&&R()}if((o=t)&&"object"==typeof o&&"function"==typeof o.then){const a=I();if(t.then((t=>{D(a),n(e.then,1,e.value,t),D(null)}),(t=>{if(D(a),n(e.catch,2,e.error,t),D(null),!e.hasCatch)throw t})),e.current!==e.pending)return n(e.pending,0),!0}else{if(e.current!==e.then)return n(e.then,1,e.value,t),!0;e.resolved=t}var o}function G(t,e,a){const n=e.slice(),{resolved:o}=t;t.current===t.then&&(n[t.value]=o),t.current===t.catch&&(n[t.error]=o),t.block.p(n,a)}const J="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function Q(t,e,a){const n=t.$$.props[e];void 0!==n&&(t.$$.bound[n]=a,a(t.$$.ctx[n]))}function X(t){t&&t.c()}function Y(t,e,a,n){const{fragment:o,on_mount:s,on_destroy:i,after_update:c}=t.$$;o&&o.m(e,a),n||M((()=>{const e=s.map(r).filter(u);i?i.push(...e):l(e),t.$$.on_mount=[]})),c.forEach(M)}function Z(t,e){const a=t.$$;null!==a.fragment&&(l(a.on_destroy),a.fragment&&a.fragment.d(e),a.on_destroy=a.fragment=null,a.ctx=[])}function tt(t,e){-1===t.$$.dirty[0]&&(E.push(t),L||(L=!0,P.then(R)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function et(t,e,a,n,o,i,r=[-1]){const u=T;D(t);const d=t.$$={fragment:null,ctx:null,props:i,update:s,not_equal:o,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=a?a(t,e.props||{},((e,a,...n)=>{const s=n.length?n[0]:a;return d.ctx&&o(d.ctx[e],d.ctx[e]=s)&&(!d.skip_bound&&d.bound[e]&&d.bound[e](s),p&&tt(t,e)),a})):[],d.update(),p=!0,l(d.before_update),d.fragment=!!n&&n(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(x)}else d.fragment&&d.fragment.c();e.intro&&z(t.$$.fragment),Y(t,e.target,e.anchor,e.customElement),R()}D(u)}class at{$destroy(){Z(this,1),this.$destroy=s}$on(t,e){const a=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return a.push(e),()=>{const t=a.indexOf(e);-1!==t&&a.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 nt(t){let e,a,n,o,s;const i=t[5].default,r=g(i,t,t[4],null);return{c(){e=v("span"),r&&r.c(),_(e,"class",a="pointer icon flex brd-radius-full brd-with-sm "+t[1]+" svelte-1jng2dw"),_(e,"title",t[0])},m(a,i){w(a,e,i),r&&r.m(e,null),n=!0,o||(s=b(e,"click",t[2]),o=!0)},p(t,[o]){r&&r.p&&(!n||16&o)&&m(r,i,t,t[4],o,null,null),(!n||2&o&&a!==(a="pointer icon flex brd-radius-full brd-with-sm "+t[1]+" svelte-1jng2dw"))&&_(e,"class",a),(!n||1&o)&&_(e,"title",t[0])},i(t){n||(z(r,t),n=!0)},o(t){H(r,t),n=!1},d(t){t&&x(e),r&&r.d(t),o=!1,s()}}}function ot(t,e,a){let{$$slots:n={},$$scope:o}=e,{title:s}=e,{link:i="/"}=e,{color:r}=e;return t.$$set=t=>{"title"in t&&a(0,s=t.title),"link"in t&&a(3,i=t.link),"color"in t&&a(1,r=t.color),"$$scope"in t&&a(4,o=t.$$scope)},[s,r,()=>window.singleSpaNavigate(i),i,o,n]}const st=[];function it(t,e){return{subscribe:rt(t,e).subscribe}}function rt(t,e=s){let a;const n=[];function o(e){if(d(t,e)&&(t=e,a)){const e=!st.length;for(let e=0;e<n.length;e+=1){const a=n[e];a[1](),st.push(a,t)}if(e){for(let t=0;t<st.length;t+=2)st[t][0](st[t+1]);st.length=0}}}return{set:o,update:function(e){o(e(t))},subscribe:function(i,r=s){const c=[i,r];return n.push(c),1===n.length&&(a=e(o)||s),i(t),()=>{const t=n.indexOf(c);-1!==t&&n.splice(t,1),0===n.length&&(a(),a=null)}}}}function ct(t,e,a){const n=!Array.isArray(t),o=n?[t]:t,i=e.length<2;return it(a,(t=>{let a=!1;const r=[];let c=0,d=s;const h=()=>{if(c)return;d();const a=e(n?r[0]:r,t);i?t(a):d=u(a)?a:s},g=o.map(((t,e)=>p(t,(t=>{r[e]=t,c&=~(1<<e),a&&h()}),(()=>{c|=1<<e}))));return a=!0,h(),function(){l(g),d()}}))}const lt=()=>[{moduleId:"1111",position:"0"},{moduleId:"3333",position:""}],ut=()=>[{id:"Standard",activated:!0,days:["Mo","Tu","We","Th","Fr","Sa","Su"],moduleList:[{moduleId:"1111",position:"0"},{moduleId:"3333",position:""}]}],{loggedIn:dt}=a,pt=(t,e)=>{let a="";return t&&(a+=`/${t}`,e&&(a+=`/${e}`)),a},ht=async(t,e)=>{const a=pt(t,e);return(await axios.get("/api/comm/chat"+a)).data.filter((e=>t?e.event&&e.event._id===t:!e.event)).filter((t=>e?t.task&&t.task._id===e:!t.task))},{loggedIn:gt}=a,ft=async(t,e)=>[],mt=t("notification",rt(!1)),$t=t("notifications_local",rt([])),yt=t("communication_notification",rt(!1)),wt=t("task_notification",rt(!1)),xt=t("approval_notification",rt(!1)),vt=t("attachment_notification",rt(!1)),kt=rt(!1),bt=t("settings",rt({})),_t=(t("currentRoles",rt()),rt(Date.now()+1e7)),Tt=ct(it(Date.now(),(function(t){const e=setInterval((()=>{t(Date.now())}),6e4);return function(){clearInterval(e)}})),(t=>t>h(_t)));Tt.subscribe((t=>{if(t)if((()=>{let t=St.filter((t=>t._valid>Date.now()));St=t,$t.set(St),mt.set(!0)})(),St.length>0){const t=St.reduce(((t,e)=>t.__valid<e.__valid?t:e));_t.set(t.__valid)}else _t.set(Date.now()+1e7)}));const Dt=[{type:"communication",desc:"Kommunikation",obj:yt},{type:"task",desc:"Aufgabe",obj:wt},{type:"approval",desc:"Visum",obj:xt},{type:"attachment",desc:"Dokument",obj:vt},{type:"workflow",desc:"Worfklow",obj:kt}],It=(t,e=!1)=>{const a=h(bt).setting,n=a?.notificationActivated,o=a?.typesOfNotification,s=Dt.find((e=>e.type===t.type));if(n&&o.find((t=>t===s?.desc))){const e=St.filter((e=>e.id==t.id&&e.user==t.user));e.length>0?St[St.indexOf(e[0])]=t:(St.unshift(t),t.__valid<_t&&_t.set(t.__valid)),$t.set(St),mt.set(!1)}e&&s?.obj.set(t)};let St=[];let Et=[{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 jt=[{id:1111,name:"TaskModule",text:"Alle Tasks",status:!1,6:n.item({x:0,y:0,w:4,h:5,customDragger:!0}),5:n.item({x:0,y:0,w:4,h:5,customDragger:!0}),4:n.item({x:0,y:0,w:3,h:5,customDragger:!0}),3:n.item({x:0,y:0,w:2,h:5,customDragger:!0}),2:n.item({x:0,y:0,w:1,h:5,customDragger:!0}),1:n.item({x:0,y:0,w:1,h:5,customDragger:!0})},{id:3333,name:"Chat Modul",text:"Chat",status:!1,6:n.item({x:4,y:0,w:1,h:5,customDragger:!0}),5:n.item({x:4,y:0,w:1,h:5,customDragger:!0}),4:n.item({x:3,y:0,w:1,h:5,customDragger:!0}),3:n.item({x:2,y:0,w:1,h:5,customDragger:!0}),2:n.item({x:1,y:0,w:1,h:5,customDragger:!0}),1:n.item({x:1,y:0,w:1,h:5,customDragger:!0})},{id:9999,name:"Neues Modul",text:"+",status:!1,6:n.item({x:4,y:0,w:1,h:2}),5:n.item({x:4,y:0,w:1,h:2}),4:n.item({x:3,y:0,w:1,h:2}),3:n.item({x:2,y:0,w:1,h:2}),2:n.item({x:1,y:0,w:1,h:2}),1:n.item({x:1,y:0,w:1,h:2})}],{cacheValidator:Nt,onLogout:Ct}=a;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 Pt=new Map;const Lt=(t,e)=>(...a)=>{const n=h(Nt),o=window.localStorage.getItem("enablerr-tenant");"invalid"===n.status&&(Pt=new Map,Nt.set({tenant:o,status:""}));const s=[].concat(o,e,a).join("-");let i=Pt.get(s);if(!i)try{i=t(...a),Pt.set(s,i)}catch(t){throw t}return i};var Mt={getSchema:Lt((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:Lt((async(t,e)=>e?(await axios.get(`/api/schemabyclass/${t}/${e}`)).data:(await axios.get(`/api/schemabyclass/${t}`)).data),"getSchemaByClass"),getEvents:Lt((()=>axios.get("/api/event").then((t=>t.data)).catch((t=>{throw"Events not found"}))),"getEvents"),getEvent:Lt((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,e=!1,a=!1)=>axios.get(`/api/tasks/${t}${e?"/byIdentity":""}${a?"/all":""}?display=list`).then((t=>t.data)).catch((t=>{throw"list not found"})),getTasks:(t,e=!1)=>axios.get(`/api/tasks/${t}${e?"/byIdentity":""}?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"})),getTaskqueueDocs:t=>axios.post("/api/taskqueue/docs",{eventName:t}).then((t=>t.data)).catch((t=>{throw"docs not found"})),getReporting:()=>axios.get("/api/taskqueue/reporting").then((t=>t.data)).catch((t=>{throw"queue not found"})),getWidgets:()=>axios.get("/api/taskqueue/widgets").then((t=>t.data)).catch((t=>{throw"widgets not found"})),getWidgetSelection:t=>axios.get(`/api/task/widget/${t}`).then((t=>t.data)).catch((t=>{throw"widget 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,getPlanning:async(t,e,a)=>(await axios.get(`/api/planning/${t}/${e}/${a}`)).data,savePlanning:async(t,e)=>(await axios.post(`/api/planning/${t}`,e)).data,deletePlanning:async(t,e)=>(await axios.patch(`/api/planning/${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,a=!1)=>axios.get(`/api/task/${t}/${e}${a?"/recursive":""}`).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,a,n)=>axios.get(`/api/task/${t}/${fieldName}/section/${a}/${n}`).then((t=>t.data)).catch((t=>{throw"internal error"})),getSection:(t,e,a,n=!1)=>axios.post("/api/read/"+t,{[e]:a,status:!0,_unique:n}).then((t=>n?t.data.map((t=>({[n]:t}))):t.data)).catch((t=>{throw"internal error"})),getSectionView:(t,e,a=!1)=>(a&&(e._display="list"),axios.post("/api/read/"+t,e).then((t=>t.data)).catch((t=>{throw"internal error"}))),getCountedSection:(t,e,a,n,o)=>axios.get(`/api/task/${t}/${e}/${a}/count/${n}/${o}`).then((t=>t.data)).catch((t=>{throw"internal error"})),readTasksByAggregationId:(t,e=!1)=>axios.get(`/api/tasks/id/${t}${e?"/stop":""}`).then((t=>t.data)).catch((t=>{throw"list not found"})),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,a)=>(await axios.post(`/api/plugin/${t}`,{body:e,template:a})).data,deletePlugin:async t=>(await axios.delete(`/api/plugin/${t}`)).data,deletePluginAndData:()=>axios.delete("/api/plugin"),dataImport:async(t,e)=>(await axios.post("/api/plugin/import",t,e)).data,dataImportProgress:async t=>(await axios.get(`/api/plugin/import/${t}`)).data,dataExport:async t=>(await axios.post("/api/plugin/export",t)).data,dataExportProgress:async t=>(await axios.get(`/api/plugin/export/${t}`)).data,dataExportResult:async t=>(await axios.get(`/api/plugin/export/result/${t}`)).data,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 a={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",a).then((t=>t.data))},authEnroll:async t=>(await axios.post("/api/auth/enroll",t)).data,authLogin:async(t,e,a)=>(await axios.post("/api/auth/login",{username:t,passcode:e,ticketId:a})).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:ht,saveChat:async(t,e,a)=>{const{user:n}=h(dt);let o=await ht(t,e);o[0]||(a.sender=n);const s=o[0]?"patch":"post",i=pt(t,e);return(await axios[s]("/api/comm/chat"+i,a)).data.id},getFeedback:ft,saveFeedback:async(t,e,a,n,o)=>{const s={};t&&(s.event={id:t}),e&&(s.task={id:e});let i=await ft();if(i[0]&&null!=o){let t=i.filter((t=>t._id===o));t={...t,...n};const{user:e}=h(gt);return a.sender=e,t[0].messages=(t[0].messages||[]).concat(a),console.log("has id",t[0].messages),(await axios.post("/api/commFeedback",t[0])).data.id}{i={...s},i={...i,...n};const{user:t}=h(gt);return a.sender=t,i.messages=(i.messages||[]).concat(a),console.log("new feedback",i),(await axios.post("/api/commFeedback",i)).data.id}},getUserReports:async t=>(await axios.get("/api/userreport/list/"+t)).data,getUserReport:async t=>(await axios.get("/api/userreport/"+t)).data,uploadUserReport:async(t,e)=>(await axios.post("/api/userreport/"+t,e)).data,deleteUserReport:async t=>(await axios.delete("/api/userreport/"+t)).data,getReport:async t=>(await axios.get(`/api/report/event/${t}`)).data,getReportData:async(t,e)=>(await axios.post(`/api/report/list/${t}/data`,e)).data,getReportDoc:async t=>(await axios.get(`/api/report/task/${t}`)).data,getDocData:async t=>(await axios.post(`/api/report/task/${t}/data`)).data,createReport:async(t,e)=>(await axios.post(`/api/report/list/${t}`,e)).data,load:t=>axios.post("/api/neo4j",{taskId:t}).then((t=>t.data)).catch((t=>{throw"workflows not loaded"})),getMatrixItems:(t,e)=>axios.get(`/api/matrix/${t}/${e}`).then((t=>t.data)).catch((t=>{throw"matrix not found"})),getDefaultModuleList:lt,getDefaultLayout:ut,getNotifications:t=>axios.get("/api/notification").then((async t=>{await new Promise((t=>setTimeout(t,2e3)));for(let e of t.data)It(e,!1);return St})),getNotificationsLocal:t=>St,saveNotification:It,updateNotification:t=>{let e=St.filter((e=>e.id==t.id&&e.user==t.user));e.length>0?(St[St.indexOf(e[0])]=t,$t.set(St)):It(t,!1)},getNotificationTypes:Lt((()=>axios.get("/api/notification/type").then((t=>t.data))),"getNotificationTypes"),getRoles:t=>Et.filter((e=>e.user===t)),getModules:t=>jt.filter((e=>t.includes(e.id))),getModuleName:t=>{const e=jt.find((e=>e.id===Number(t)));return e?e.name:"Unbekanntes Modul"},getAllModules:()=>jt,createTicket:t=>axios.post("/api/ticket",t).then((t=>t.data)).catch((t=>{})),getTickets:()=>axios.get("/api/ticket").then((t=>t.data)).catch((t=>{throw"ticket not found"})),deleteTicket:t=>axios.delete(`/api/ticket/${t}`).then((t=>t.data)).catch((t=>{})),getTicketByUser:t=>axios.get(`/api/ticket/${t}`).then((t=>t.data)).catch((t=>{throw"ticket not found"}))};const At=Intl.NumberFormat().formatToParts(1.1).find((({type:t})=>"decimal"===t)).value||".",Ft=t=>"function"==typeof t,Ot=t=>t&&t.toString,Rt=(t,...e)=>e.includes(t),Bt=t=>Rt(t,void 0,null),qt=t=>!Bt(t),Vt=(t=null,e,...a)=>{try{return e(...a)}catch{return t}},Ut=t=>(e,...a)=>Vt(Vt("",t.toString),e,...a),Wt=(t,e=2,a=0,n=t.toString(),o=a.toString())=>o.repeat(e-n.length)+n,zt=(t,e=window)=>({listen(a,n){e[`${a}EventListener`](t,n)},start(t){this.listen("add",t)},stop(t){this.listen("remove",t)}}),Ht=(...t)=>!t.map((({value:t,check:e,text:a})=>e(t)||Jt(console.error,a))).every(Boolean),Kt=t=>(e,a)=>(Promise.resolve(a).then(e),t),Gt=Kt(!0),Jt=Kt(!1);var Qt=Object.freeze({__proto__:null,decimalSeparator:At,isFunction:Ft,isStringable:Ot,isObjEmpty:(t={})=>!Object.keys(t).length,hasValue:Rt,isNullish:Bt,isNotNullish:qt,bestValue:(t,...e)=>e.concat(t).find(qt),tryCatch:Vt,ensureStrValue:Ut,padLeft:(...t)=>Ut(t[0])(Wt,...t),showupElement:(t="",e=0,a=document.getElementById(t))=>a&&a.style&&(a.style.display="block",setTimeout((()=>a.style.display="none"),e)),getListener:zt,isMissing:Ht,go:Gt,stop:Jt});t("util",Qt);const Xt="single-spa:routing-event",Yt=zt(Xt);function Zt(t,{modulePath:e,update:a}){if(!1===a)return;if(Ht({value:a,check:Ft,text:"<update> should be a function (dataListener)"},{value:e,check:Ot,text:"<modulePath> should be a string (dataListener)"}))return;const n=e.toString()||"/",o=e=>{const o=e.currentTarget.location.pathname,[,s,...i]=o.split("/");n===(s||"/")&&t.dispatchEvent(new CustomEvent("data",{detail:{data:a(...i)}}))};return Yt.start(o),{destroy:()=>Yt.stop(o)}}const te=()=>window.dispatchEvent(new CustomEvent(Xt)),ee=t=>({prop:4&t,tenant:8&t,user:8&t}),ae=t=>({prop:t[11],refresh:te,tenant:t[3].tenant,user:t[3].user}),ne=t=>({err:4&t,prop:4&t,tenant:8&t,user:8&t}),oe=t=>({err:t[12],prop:t[11],refresh:te,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:te,tenant:t[3].tenant,user:t[3].user}),re=t=>({prop:4&t,tenant:8&t,user:8&t}),ce=t=>({prop:t[11],refresh:te,tenant:t[3].tenant,user:t[3].user});function le(t){let e;const a=t[8].init,n=g(a,t,t[7],ae);return{c(){n&&n.c()},m(t,a){n&&n.m(t,a),e=!0},p(t,o){n&&n.p&&(!e||140&o)&&m(n,a,t,t[7],o,ee,ae)},i(t){e||(z(n,t),e=!0)},o(t){H(n,t),e=!1},d(t){n&&n.d(t)}}}function ue(t){let e,a,n,o={ctx:t,current:null,token:null,hasCatch:!0,pending:he,then:pe,catch:de,value:11,error:12,blocks:[,,,]};return K(a=t[2],o),{c(){e=k(),o.block.c()},m(t,a){w(t,e,a),o.block.m(t,o.anchor=a),o.mount=()=>e.parentNode,o.anchor=e,n=!0},p(e,n){t=e,o.ctx=t,4&n&&a!==(a=t[2])&&K(a,o)||G(o,t,n)},i(t){n||(z(o.block),n=!0)},o(t){for(let t=0;t<3;t+=1){H(o.blocks[t])}n=!1},d(t){t&&x(e),o.block.d(t),o.token=null,o=null}}}function de(t){let e;const a=t[8].error,n=g(a,t,t[7],oe);return{c(){n&&n.c()},m(t,a){n&&n.m(t,a),e=!0},p(t,o){n&&n.p&&(!e||140&o)&&m(n,a,t,t[7],o,ne,oe)},i(t){e||(z(n,t),e=!0)},o(t){H(n,t),e=!1},d(t){n&&n.d(t)}}}function pe(t){let e;const a=t[8].default,n=g(a,t,t[7],ie);return{c(){n&&n.c()},m(t,a){n&&n.m(t,a),e=!0},p(t,o){n&&n.p&&(!e||140&o)&&m(n,a,t,t[7],o,se,ie)},i(t){e||(z(n,t),e=!0)},o(t){H(n,t),e=!1},d(t){n&&n.d(t)}}}function he(t){let e,a,n,o={ctx:t,current:null,token:null,hasCatch:!1,pending:me,then:fe,catch:ge,value:10,blocks:[,,,]};return K(a=t[5](t[1]),o),{c(){e=k(),o.block.c()},m(t,a){w(t,e,a),o.block.m(t,o.anchor=a),o.mount=()=>e.parentNode,o.anchor=e,n=!0},p(e,n){t=e,o.ctx=t,2&n&&a!==(a=t[5](t[1]))&&K(a,o)||G(o,t,n)},i(t){n||(z(o.block),n=!0)},o(t){for(let t=0;t<3;t+=1){H(o.blocks[t])}n=!1},d(t){t&&x(e),o.block.d(t),o.token=null,o=null}}}function ge(t){return{c:s,m:s,p:s,i:s,o:s,d:s}}function fe(t){let e;const a=t[8].load,n=g(a,t,t[7],ce);return{c(){n&&n.c()},m(t,a){n&&n.m(t,a),e=!0},p(t,o){n&&n.p&&(!e||140&o)&&m(n,a,t,t[7],o,re,ce)},i(t){e||(z(n,t),e=!0)},o(t){H(n,t),e=!1},d(t){n&&n.d(t)}}}function me(t){return{c:s,m:s,p:s,i:s,o:s,d:s}}function $e(t){let e,a,n,o,i,r,c;const d=[ue,le],p=[];function h(t,e){return t[2]?0:1}return a=h(t),n=p[a]=d[a](t),{c(){e=v("section"),n.c(),_(e,"class","data")},m(n,l){var d;w(n,e,l),p[a].m(e,null),i=!0,r||(c=[(d=o=Zt.call(null,e,t[0]),d&&u(d.destroy)?d.destroy:s),b(e,"data",t[9])],r=!0)},p(t,[s]){let i=a;a=h(t),a===i?p[a].p(t,s):(U(),H(p[i],1,1,(()=>{p[i]=null})),W(),n=p[a],n?n.p(t,s):(n=p[a]=d[a](t),n.c()),z(n,1),n.m(e,null)),o&&u(o.update)&&1&s&&o.update.call(null,t[0])},i(t){i||(z(n),i=!0)},o(t){H(n),i=!1},d(t){t&&x(e),p[a].d(),r=!1,l(c)}}}function ye(t,e,n){let o,{$$slots:s={},$$scope:i}=e;const{loggedIn:r}=a;var c,l;c=r,l=t=>n(3,o=t),t.$$.on_destroy.push(p(c,l));let u,{options:d}=e,{update:h=!1}=e,{loadingDelay:g=250}=e;h&&(d={update:h,modulePath:window.location.pathname.split("/")[1]||"/"});return t.$$set=t=>{"options"in t&&n(0,d=t.options),"update"in t&&n(6,h=t.update),"loadingDelay"in t&&n(1,g=t.loadingDelay),"$$scope"in t&&n(7,i=t.$$scope)},[d,g,u,o,r,t=>new Promise((e=>setTimeout(e,t))),h,i,s,({detail:t})=>n(2,u=t.data)]}const{document:we}=J;function xe(t){let e,a,n;const o=[{class:"full-width"},{style:t[1]},{inputClass:t[2]||t[5]},{multiline:!0},{readonly:t[6]},{id:t[3]},{placeholder:t[7]},{rows:t[4]},t[11]];function s(e){t[13](e)}let r={};for(let t=0;t<o.length;t+=1)r=i(r,o[t]);return void 0!==t[0]&&(r.value=t[0]),e=new t[8]({props:r}),j.push((()=>Q(e,"value",s))),e.$on("change",t[9]),e.$on("focus",t[10]),{c(){X(e.$$.fragment)},m(t,a){Y(e,t,a),n=!0},p(t,[n]){const s=2302&n?function(t,e){const a={},n={},o={$$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||(n[t]=1);for(const t in r)o[t]||(a[t]=r[t],o[t]=1);t[s]=r}else for(const t in i)o[t]=1}for(const t in n)t in a||(a[t]=void 0);return a}(o,[o[0],2&n&&{style:t[1]},36&n&&{inputClass:t[2]||t[5]},o[3],64&n&&{readonly:t[6]},8&n&&{id:t[3]},128&n&&{placeholder:t[7]},16&n&&{rows:t[4]},2048&n&&(i=t[11],"object"==typeof i&&null!==i?i:{})]):{};var i;!a&&1&n&&(a=!0,s.value=t[0],A((()=>a=!1))),e.$set(s)},i(t){n||(z(e.$$.fragment,t),n=!0)},o(t){H(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function ve(t,e,a){const n=["noForm","id","value","style","rows","classId","readonly","overwrite","placeholder"];let s=$(e,n);const r=S(),{TextField:c}=o;let{noForm:l=""}=e,{id:u}=e,{value:d}=e,{style:p=""}=e,{rows:h=3}=e,{classId:g}=e,{readonly:f}=e,{overwrite:m}=e,{placeholder:y=""}=e;p+=" padding-bottom: .5em;";const w=5*(h>1),x=()=>{const t=document.getElementById(u);if(!t)return;const{style:e,scrollHeight:a}=t;a&&(e.height=`${a+w}px`)};return t.$$set=t=>{e=i(i({},e),function(t){const e={};for(const a in t)"$"!==a[0]&&(e[a]=t[a]);return e}(t)),a(11,s=$(e,n)),"noForm"in t&&a(2,l=t.noForm),"id"in t&&a(3,u=t.id),"value"in t&&a(0,d=t.value),"style"in t&&a(1,p=t.style),"rows"in t&&a(4,h=t.rows),"classId"in t&&a(5,g=t.classId),"readonly"in t&&a(6,f=t.readonly),"overwrite"in t&&a(12,m=t.overwrite),"placeholder"in t&&a(7,y=t.placeholder)},t.$$.update=()=>{4096&t.$$.dirty&&m&&(a(0,d=""),a(12,m=!1)),1&t.$$.dirty&&d&&setTimeout(x)},[d,p,l,u,h,g,f,y,c,({detail:{value:t}})=>r("blur",{value:t}),()=>r("onFocus"),s,m,function(t){d=t,a(0,d),a(12,m)}]}class ke extends at{constructor(t){var e;super(),we.getElementById("svelte-bi3t3d-style")||((e=v("style")).id="svelte-bi3t3d-style",e.textContent="div.text-field.full-width textarea{resize:vertical}",y(we.head,e)),et(this,t,ve,xe,d,{noForm:2,id:3,value:0,style:1,rows:4,classId:5,readonly:6,overwrite:12,placeholder:7})}}function be(t){let e,a;return e=new ke({props:{style:"min-width: 25em; overflow-y: hidden; resize: none;",id:t[0],value:t[1]}}),{c(){X(e.$$.fragment)},m(t,n){Y(e,t,n),a=!0},p(t,[a]){const n={};1&a&&(n.id=t[0]),2&a&&(n.value=t[1]),e.$set(n)},i(t){a||(z(e.$$.fragment,t),a=!0)},o(t){H(e.$$.fragment,t),a=!1},d(t){Z(e,t)}}}function _e(t,e,a){let{id:n}=e,{value:o}=e;return t.$$set=t=>{"id"in t&&a(0,n=t.id),"value"in t&&a(1,o=t.value)},[n,o]}class Te extends at{constructor(t){super(),et(this,t,_e,be,d,{id:0,value:1})}}function De(t){let e,a,n;function o(e){t[8](e)}let s={id:t[6]};return void 0!==t[3]&&(s.value=t[3]),e=new Te({props:s}),j.push((()=>Q(e,"value",o))),{c(){X(e.$$.fragment)},m(t,a){Y(e,t,a),n=!0},p(t,n){const o={};!a&&8&n&&(a=!0,o.value=t[3],A((()=>a=!1))),e.$set(o)},i(t){n||(z(e.$$.fragment,t),n=!0)},o(t){H(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function Ie(t){let e,a;return e=new t[5]({props:{title:t[2],closeCallback:t[7],$$slots:{default:[De]},$$scope:{ctx:t}}}),{c(){X(e.$$.fragment)},m(t,n){Y(e,t,n),a=!0},p(t,a){const n={};4&a&&(n.title=t[2]),1032&a&&(n.$$scope={dirty:a,ctx:t}),e.$set(n)},i(t){a||(z(e.$$.fragment,t),a=!0)},o(t){H(e.$$.fragment,t),a=!1},d(t){Z(e,t)}}}function Se(t){let e,a;return e=new t[4]({props:{open:t[1],messages:t[0],$$slots:{default:[Ie]},$$scope:{ctx:t}}}),{c(){X(e.$$.fragment)},m(t,n){Y(e,t,n),a=!0},p(t,[a]){const n={};2&a&&(n.open=t[1]),1&a&&(n.messages=t[0]),1036&a&&(n.$$scope={dirty:a,ctx:t}),e.$set(n)},i(t){a||(z(e.$$.fragment,t),a=!0)},o(t){H(e.$$.fragment,t),a=!1},d(t){Z(e,t)}}}function Ee(t,e,a){const n=S(),{Modal:s,Dialog:i}=o;let r,{title:c}=e,{messages:l=""}=e,{modalOpen:u=!1}=e;return t.$$set=t=>{"title"in t&&a(2,c=t.title),"messages"in t&&a(0,l=t.messages),"modalOpen"in t&&a(1,u=t.modalOpen)},t.$$.update=()=>{9&t.$$.dirty&&l&&(a(3,r=[].concat(l).join("\n")),r&&a(1,u=!0))},[l,u,c,r,s,i,"modalDialog",t=>{a(1,u=!1),a(3,r=""),a(0,l=""),n("change",u)},function(t){r=t,a(3,r),a(0,l)}]}t("version","0.2.114");const je=window.sessionStorage;je.clear();t("Storage",{getItem:t=>je.getItem(t),setItem:(t,e)=>je.setItem(t,e)});t("toasts",function(){const t=rt([]);function e(e,a,n="default"){a||(a=3e3),t.update((t=>t.length>3?t:t=[...t,{id:"_"+Math.random().toString(36).substring(2,9),type:n,msg:e,timeout:a}]))}const a=ct(t,((e,a)=>{if(a(e),e&&e.length>0){const a=setTimeout((()=>{t.update((t=>(t.shift(),t)))}),e[0].timeout);return()=>{clearTimeout(a)}}})),{subscribe:n}=a;return{subscribe:n,send:e,default:(t,a)=>e(t,a,"default"),success:(t,a)=>e(t,a,"success"),failed:(t,a)=>e(t,a,"failed")}}()),t("LinkIcon",class extends at{constructor(t){var e;super(),document.getElementById("svelte-1jng2dw-style")||((e=v("style")).id="svelte-1jng2dw-style",e.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}",y(document.head,e)),et(this,t,ot,nt,d,{title:0,link:3,color:1})}}),t("Page",class extends at{constructor(t){super(),et(this,t,ye,$e,d,{options:0,update:6,loadingDelay:1})}}),t("Request",Mt),t("TextArea",ke),t("ModalDialog",class extends at{constructor(t){super(),et(this,t,Ee,Se,d,{title:2,messages:0,modalOpen:1})}})}}}));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@enablerr-ui/form",
3
3
  "description": "enablerr - the Next Enterprise Solution",
4
- "version": "0.2.113",
4
+ "version": "0.2.114",
5
5
  "os": [
6
6
  "darwin",
7
7
  "linux"