@enablerr-ui/form 0.2.110 → 0.2.111

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 f(t){let e;return p(t,(t=>e=t))(),e}function g(t,e,n,a){if(t){const o=h(t,e,n,a);return t[0](o)}}function h(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=h(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 b(){return t="",document.createTextNode(t);var t}function k(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 D;function I(t){D=t}function S(){if(!D)throw new Error("Function called outside component initialization");return D}function T(){const t=S();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];I(e),B(e.$$)}for(I(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=S();if(t.then((t=>{I(n),a(e.then,1,e.value,t),I(null)}),(t=>{if(I(n),a(e.catch,2,e.error,t),I(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=D;I(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()}I(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=g(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=k(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 f=()=>{if(c)return;d();const n=e(a?r[0]:r,t);i?t(n):d=u(n)?n:s},g=o.map(((t,e)=>p(t,(t=>{r[e]=t,c&=~(1<<e),n&&f()}),(()=>{c|=1<<e}))));return n=!0,f(),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}=n,pt=(t,e)=>{let n="";return t&&(n+=`/${t}`,e&&(n+=`/${e}`)),n},ft=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:gt}=n,ht=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)),bt=rt(!1),kt=t("settings",rt({})),_t=(t("currentRoles",rt()),rt(Date.now()+1e7)),Dt=ct(it(Date.now(),(function(t){const e=setInterval((()=>{t(Date.now())}),6e4);return function(){clearInterval(e)}})),(t=>t>f(_t)));Dt.subscribe((t=>{if(t)if((()=>{let t=Tt.filter((t=>t._valid>Date.now()));Tt=t,$t.set(Tt),mt.set(!0)})(),Tt.length>0){const t=Tt.reduce(((t,e)=>t.__valid<e.__valid?t:e));_t.set(t.__valid)}else _t.set(Date.now()+1e7)}));const It=[{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:bt}],St=(t,e=!1)=>{const n=f(kt).setting,a=n?.notificationActivated,o=n?.typesOfNotification,s=It.find((e=>e.type===t.type));if(a&&o.find((t=>t===s?.desc))){const e=Tt.filter((e=>e.id==t.id&&e.user==t.user));e.length>0?Tt[Tt.indexOf(e[0])]=t:(Tt.unshift(t),t.__valid<_t&&_t.set(t.__valid)),$t.set(Tt),mt.set(!1)}e&&s?.obj.set(t)};let Tt=[];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=f(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)=>(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:ft,saveChat:async(t,e,n)=>{const{user:a}=f(dt);let o=await ft(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:ht,saveFeedback:async(t,e,n,a,o)=>{const s={};t&&(s.event={id:t}),e&&(s.task={id:e});let i=await ht();if(i[0]&&null!=o){let t=i.filter((t=>t._id===o));t={...t,...a};const{user:e}=f(gt);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}=f(gt);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)St(e,!1);return Tt})),getNotificationsLocal:t=>Tt,saveNotification:St,updateNotification:t=>{let e=Tt.filter((e=>e.id==t.id&&e.user==t.user));e.length>0?(Tt[Tt.indexOf(e[0])]=t,$t.set(Tt)):St(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};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=g(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:fe,then:pe,catch:de,value:11,error:12,blocks:[,,,]};return K(n=t[2],o),{c(){e=b(),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=g(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=g(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 fe(t){let e,n,a,o={ctx:t,current:null,token:null,hasCatch:!1,pending:me,then:he,catch:ge,value:10,blocks:[,,,]};return K(n=t[5](t[1]),o),{c(){e=b(),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 ge(t){return{c:s,m:s,p:s,i:s,o:s,d:s}}function he(t){let e;const n=t[8].load,a=g(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 f(t,e){return t[2]?0:1}return n=f(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),k(e,"data",t[9])],r=!0)},p(t,[s]){let i=n;n=f(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:f=!1}=e,{loadingDelay:g=250}=e;f&&(d={update:f,modulePath:window.location.pathname.split("/")[1]||"/"});return t.$$set=t=>{"options"in t&&a(0,d=t.options),"update"in t&&a(6,f=t.update),"loadingDelay"in t&&a(1,g=t.loadingDelay),"$$scope"in t&&a(7,i=t.$$scope)},[d,g,u,o,r,t=>new Promise((e=>setTimeout(e,t))),f,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]},{rows:t[4]},t[10]];function s(e){t[12](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[7]({props:r}),j.push((()=>Q(e,"value",s))),e.$on("change",t[8]),e.$on("focus",t[9]),{c(){X(e.$$.fragment)},m(t,n){Y(e,t,n),a=!0},p(t,[a]){const s=1150&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]},16&a&&{rows:t[4]},1024&a&&(i=t[10],"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"];let s=$(e,a);const r=T(),{TextField:c}=o;let{noForm:l=""}=e,{id:u}=e,{value:d}=e,{style:p=""}=e,{rows:f=3}=e,{classId:g}=e,{readonly:h}=e,{overwrite:m=!1}=e;p+=" padding-bottom: .5em;";const y=5*(f>1),w=()=>{const t=document.getElementById(u);if(!t)return;const{style:e,scrollHeight:n}=t;n&&(e.height=`${n+y}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(10,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,f=t.rows),"classId"in t&&n(5,g=t.classId),"readonly"in t&&n(6,h=t.readonly),"overwrite"in t&&n(11,m=t.overwrite)},t.$$.update=()=>{2048&t.$$.dirty&&m&&n(0,d=""),1&t.$$.dirty&&d&&setTimeout(w)},[d,p,l,u,f,g,h,c,({detail:{value:t}})=>r("blur",{value:t}),()=>r("onFocus"),s,m,function(t){d=t,n(0,d),n(11,m)}]}class be 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:11})}}function ke(t){let e,n;return e=new be({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 De extends nt{constructor(t){super(),et(this,t,_e,ke,d,{id:0,value:1})}}function Ie(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 De({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 Se(t){let e,n;return e=new t[5]({props:{title:t[2],closeCallback:t[7],$$slots:{default:[Ie]},$$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 Te(t){let e,n;return e=new t[4]({props:{open:t[1],messages:t[0],$$slots:{default:[Se]},$$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=T(),{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.110");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",be),t("ModalDialog",class extends nt{constructor(t){super(),et(this,t,Ee,Te,d,{title:2,messages:0,modalOpen: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 f(t){let e;return p(t,(t=>e=t))(),e}function g(t,e,n,a){if(t){const o=h(t,e,n,a);return t[0](o)}}function h(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=h(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 b(){return t="",document.createTextNode(t);var t}function k(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 D;function I(t){D=t}function S(){if(!D)throw new Error("Function called outside component initialization");return D}function T(){const t=S();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];I(e),B(e.$$)}for(I(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=S();if(t.then((t=>{I(n),a(e.then,1,e.value,t),I(null)}),(t=>{if(I(n),a(e.catch,2,e.error,t),I(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=D;I(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()}I(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=g(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=k(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 f=()=>{if(c)return;d();const n=e(a?r[0]:r,t);i?t(n):d=u(n)?n:s},g=o.map(((t,e)=>p(t,(t=>{r[e]=t,c&=~(1<<e),n&&f()}),(()=>{c|=1<<e}))));return n=!0,f(),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}=n,pt=(t,e)=>{let n="";return t&&(n+=`/${t}`,e&&(n+=`/${e}`)),n},ft=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:gt}=n,ht=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)),bt=rt(!1),kt=t("settings",rt({})),_t=(t("currentRoles",rt()),rt(Date.now()+1e7)),Dt=ct(it(Date.now(),(function(t){const e=setInterval((()=>{t(Date.now())}),6e4);return function(){clearInterval(e)}})),(t=>t>f(_t)));Dt.subscribe((t=>{if(t)if((()=>{let t=Tt.filter((t=>t._valid>Date.now()));Tt=t,$t.set(Tt),mt.set(!0)})(),Tt.length>0){const t=Tt.reduce(((t,e)=>t.__valid<e.__valid?t:e));_t.set(t.__valid)}else _t.set(Date.now()+1e7)}));const It=[{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:bt}],St=(t,e=!1)=>{const n=f(kt).setting,a=n?.notificationActivated,o=n?.typesOfNotification,s=It.find((e=>e.type===t.type));if(a&&o.find((t=>t===s?.desc))){const e=Tt.filter((e=>e.id==t.id&&e.user==t.user));e.length>0?Tt[Tt.indexOf(e[0])]=t:(Tt.unshift(t),t.__valid<_t&&_t.set(t.__valid)),$t.set(Tt),mt.set(!1)}e&&s?.obj.set(t)};let Tt=[];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=f(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)=>(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:ft,saveChat:async(t,e,n)=>{const{user:a}=f(dt);let o=await ft(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:ht,saveFeedback:async(t,e,n,a,o)=>{const s={};t&&(s.event={id:t}),e&&(s.task={id:e});let i=await ht();if(i[0]&&null!=o){let t=i.filter((t=>t._id===o));t={...t,...a};const{user:e}=f(gt);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}=f(gt);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)St(e,!1);return Tt})),getNotificationsLocal:t=>Tt,saveNotification:St,updateNotification:t=>{let e=Tt.filter((e=>e.id==t.id&&e.user==t.user));e.length>0?(Tt[Tt.indexOf(e[0])]=t,$t.set(Tt)):St(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};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=g(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:fe,then:pe,catch:de,value:11,error:12,blocks:[,,,]};return K(n=t[2],o),{c(){e=b(),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=g(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=g(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 fe(t){let e,n,a,o={ctx:t,current:null,token:null,hasCatch:!1,pending:me,then:he,catch:ge,value:10,blocks:[,,,]};return K(n=t[5](t[1]),o),{c(){e=b(),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 ge(t){return{c:s,m:s,p:s,i:s,o:s,d:s}}function he(t){let e;const n=t[8].load,a=g(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 f(t,e){return t[2]?0:1}return n=f(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),k(e,"data",t[9])],r=!0)},p(t,[s]){let i=n;n=f(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:f=!1}=e,{loadingDelay:g=250}=e;f&&(d={update:f,modulePath:window.location.pathname.split("/")[1]||"/"});return t.$$set=t=>{"options"in t&&a(0,d=t.options),"update"in t&&a(6,f=t.update),"loadingDelay"in t&&a(1,g=t.loadingDelay),"$$scope"in t&&a(7,i=t.$$scope)},[d,g,u,o,r,t=>new Promise((e=>setTimeout(e,t))),f,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]},{rows:t[4]},t[10]];function s(e){t[12](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[7]({props:r}),j.push((()=>Q(e,"value",s))),e.$on("change",t[8]),e.$on("focus",t[9]),{c(){X(e.$$.fragment)},m(t,n){Y(e,t,n),a=!0},p(t,[a]){const s=1150&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]},16&a&&{rows:t[4]},1024&a&&(i=t[10],"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"];let s=$(e,a);const r=T(),{TextField:c}=o;let{noForm:l=""}=e,{id:u}=e,{value:d}=e,{style:p=""}=e,{rows:f=3}=e,{classId:g}=e,{readonly:h}=e,{overwrite:m}=e;p+=" padding-bottom: .5em;";const y=5*(f>1),w=()=>{const t=document.getElementById(u);if(!t)return;const{style:e,scrollHeight:n}=t;n&&(e.height=`${n+y}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(10,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,f=t.rows),"classId"in t&&n(5,g=t.classId),"readonly"in t&&n(6,h=t.readonly),"overwrite"in t&&n(11,m=t.overwrite)},t.$$.update=()=>{2048&t.$$.dirty&&m&&(n(0,d=""),n(11,m=!1)),1&t.$$.dirty&&d&&setTimeout(w)},[d,p,l,u,f,g,h,c,({detail:{value:t}})=>r("blur",{value:t}),()=>r("onFocus"),s,m,function(t){d=t,n(0,d),n(11,m)}]}class be 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:11})}}function ke(t){let e,n;return e=new be({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 De extends nt{constructor(t){super(),et(this,t,_e,ke,d,{id:0,value:1})}}function Ie(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 De({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 Se(t){let e,n;return e=new t[5]({props:{title:t[2],closeCallback:t[7],$$slots:{default:[Ie]},$$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 Te(t){let e,n;return e=new t[4]({props:{open:t[1],messages:t[0],$$slots:{default:[Se]},$$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=T(),{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.111");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",be),t("ModalDialog",class extends nt{constructor(t){super(),et(this,t,Ee,Te,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.110",
4
+ "version": "0.2.111",
5
5
  "os": [
6
6
  "darwin",
7
7
  "linux"