@enablerr-ui/task 0.2.99 → 0.2.101

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(["@enablerr-ui/layout","@enablerr-ui/form","@enablerr-ui/detail","@enablerr-ui/workflow","@enablerr-ui/report","@enablerr-ui/collab"],(function(t){"use strict";var e,n,o,s,r,i,a,l,c,u,d,m;return{setters:[function(t){e=t.getAttractions},function(t){n=t.Request,o=t.approval_notification,s=t.currentRoles,r=t.settings,i=t.TextArea,a=t.toasts,l=t.Page},function(t){c=t.Form},function(t){u=t.Workflow},function(t){d=t.Report},function(t){m=t.Collaboration}],execute:function(){t("version","0.2.99");function $(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var f,p,g=(f=function(t,e){function n(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function o(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?n(Object(o),!0).forEach((function(e){s(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if("object"!==r(t))throw new Error("single-spa-svelte requires a configuration object");var e=o(o({},i),t);if(!e.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:a.bind(null,e,n),mount:l.bind(null,e,n),unmount:c.bind(null,e,n),update:u.bind(null,e,n)}};var i={component:null,domElementGetter:null,props:{}};function a(t){return Promise.resolve()}function l(t,e,n){var s=Object.keys(i),r=Object.keys(t).reduce((function(e,n){return s.includes(n)||(e[n]=t[n]),e}),{});return Promise.resolve().then((function(){var s=function(t,e){return(e=e&&e.customProps?e.customProps:e).domElement?function(){return e.domElement}:e.domElementGetter?function(){return e.domElementGetter(e)}:t.domElementGetter?function(){return t.domElementGetter(e)}:function(t){var e=t.appName||t.name;if(!e)throw Error("single-spa-svelte was not given an application name as a prop, so it can't make a unique dom element container for the svelte application");var n="single-spa-application:".concat(e);return function(){var t=document.getElementById(n);return t||((t=document.createElement("div")).id=n,document.body.appendChild(t)),t}}(e)}(t,n),i=s();e.instance=new t.component(o(o({},r),{},{target:i,props:Object.assign({},n,t.props)}))}))}function c(t,e){return Promise.resolve().then((function(){e.instance.$destroy?e.instance.$destroy():e.instance.destroy()}))}function u(t,e,n){return Promise.resolve().then((function(){e.instance.$set?e.instance.$set(n):e.instance.set(n)}))}},f(p={exports:{}},p.exports),p.exports),v=$(g);function b(){}function h(t){return t()}function y(){return Object.create(null)}function k(t){t.forEach(h)}function w(t){return"function"==typeof t}function x(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function I(t,e,n){t.$$.on_destroy.push(function(t,...e){if(null==t)return b;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}(e,n))}function j(t,e){t.appendChild(e)}function E(t,e,n){t.insertBefore(e,n||null)}function _(t){t.parentNode.removeChild(t)}function C(t){return document.createElement(t)}function S(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function O(t){return document.createTextNode(t)}function B(){return O(" ")}function T(){return O("")}function D(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function N(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function z(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}let P;function A(t){P=t}function W(){if(!P)throw new Error("Function called outside component initialization");return P}const M=[],V=[],q=[],G=[],R=Promise.resolve();let F=!1;function Y(){F||(F=!0,R.then(Q))}function J(){return Y(),R}function L(t){q.push(t)}function K(t){G.push(t)}let Z=!1;const H=new Set;function Q(){if(!Z){Z=!0;do{for(let t=0;t<M.length;t+=1){const e=M[t];A(e),U(e.$$)}for(A(null),M.length=0;V.length;)V.pop()();for(let t=0;t<q.length;t+=1){const e=q[t];H.has(e)||(H.add(e),e())}q.length=0}while(M.length);for(;G.length;)G.pop()();F=!1,Z=!1,H.clear()}}function U(t){if(null!==t.fragment){t.update(),k(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(L)}}const X=new Set;let tt;function et(){tt={r:0,c:[],p:tt}}function nt(){tt.r||k(tt.c),tt=tt.p}function ot(t,e){t&&t.i&&(X.delete(t),t.i(e))}function st(t,e,n,o){if(t&&t.o){if(X.has(t))return;X.add(t),tt&&tt.c.push((()=>{X.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const rt="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function it(t,e,n){const o=t.$$.props[e];void 0!==o&&(t.$$.bound[o]=n,n(t.$$.ctx[o]))}function at(t){t&&t.c()}function lt(t,e,n,o){const{fragment:s,on_mount:r,on_destroy:i,after_update:a}=t.$$;s&&s.m(e,n),o||L((()=>{const e=r.map(h).filter(w);i?i.push(...e):k(e),t.$$.on_mount=[]})),a.forEach(L)}function ct(t,e){const n=t.$$;null!==n.fragment&&(k(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function ut(t,e,n,o,s,r,i=[-1]){const a=P;A(t);const l=t.$$={fragment:null,ctx:null,props:r,update:b,not_equal:s,bound:y(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a?a.$$.context:e.context||[]),callbacks:y(),dirty:i,skip_bound:!1};let c=!1;if(l.ctx=n?n(t,e.props||{},((e,n,...o)=>{const r=o.length?o[0]:n;return l.ctx&&s(l.ctx[e],l.ctx[e]=r)&&(!l.skip_bound&&l.bound[e]&&l.bound[e](r),c&&function(t,e){-1===t.$$.dirty[0]&&(M.push(t),Y(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(t,e)),n})):[],l.update(),c=!0,k(l.before_update),l.fragment=!!o&&o(l.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);l.fragment&&l.fragment.l(t),t.forEach(_)}else l.fragment&&l.fragment.c();e.intro&&ot(t.$$.fragment),lt(t,e.target,e.anchor,e.customElement),Q()}A(a)}class dt{$destroy(){ct(this,1),this.$destroy=b}$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 mt(t){let e,n,o,s,r;return{c(){e=S("svg"),n=S("path"),o=S("line"),s=S("line"),D(n,"d","M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"),D(o,"x1","12"),D(o,"y1","9"),D(o,"x2","12"),D(o,"y2","13"),D(s,"x1","12"),D(s,"y1","17"),D(s,"x2","12.01"),D(s,"y2","17"),D(e,"xmlns","http://www.w3.org/2000/svg"),D(e,"width",t[0]),D(e,"height",t[0]),D(e,"fill","none"),D(e,"viewBox","0 0 24 24"),D(e,"stroke","currentColor"),D(e,"stroke-width",t[1]),D(e,"stroke-linecap","round"),D(e,"stroke-linejoin","round"),D(e,"class",r="feather feather-alert-triangle "+t[2])},m(t,r){E(t,e,r),j(e,n),j(e,o),j(e,s)},p(t,[n]){1&n&&D(e,"width",t[0]),1&n&&D(e,"height",t[0]),2&n&&D(e,"stroke-width",t[1]),4&n&&r!==(r="feather feather-alert-triangle "+t[2])&&D(e,"class",r)},i:b,o:b,d(t){t&&_(e)}}}function $t(t,e,n){let{size:o="100%"}=e,{strokeWidth:s=2}=e,{class:r=""}=e;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),t.$$set=t=>{"size"in t&&n(0,o=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,r=t.class)},[o,s,r]}class ft extends dt{constructor(t){super(),ut(this,t,$t,mt,x,{size:0,strokeWidth:1,class:2})}}function pt(t){let e,n,o;return{c(){e=S("svg"),n=S("polyline"),D(n,"points","6 9 12 15 18 9"),D(e,"xmlns","http://www.w3.org/2000/svg"),D(e,"width",t[0]),D(e,"height",t[0]),D(e,"fill","none"),D(e,"viewBox","0 0 24 24"),D(e,"stroke","currentColor"),D(e,"stroke-width",t[1]),D(e,"stroke-linecap","round"),D(e,"stroke-linejoin","round"),D(e,"class",o="feather feather-chevron-down "+t[2])},m(t,o){E(t,e,o),j(e,n)},p(t,[n]){1&n&&D(e,"width",t[0]),1&n&&D(e,"height",t[0]),2&n&&D(e,"stroke-width",t[1]),4&n&&o!==(o="feather feather-chevron-down "+t[2])&&D(e,"class",o)},i:b,o:b,d(t){t&&_(e)}}}function gt(t,e,n){let{size:o="100%"}=e,{strokeWidth:s=2}=e,{class:r=""}=e;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),t.$$set=t=>{"size"in t&&n(0,o=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,r=t.class)},[o,s,r]}class vt extends dt{constructor(t){super(),ut(this,t,gt,pt,x,{size:0,strokeWidth:1,class:2})}}function bt(t){return{c:b,m:b,p:b,i:b,o:b,d:b}}function ht(t){let e,n,o,s,r,i,a,l,u,d,m,$,f,p,g,v,h,y,k=t[14](t[3].status)+"",w=t[20].identity.shortDescription&&function(t){let e,n,o=t[20].identity.shortDescription+"";return{c(){e=C("div"),n=O(o),D(e,"class","shortDescription svelte-3m9yjb")},m(t,o){E(t,e,o),j(e,n)},p:b,d(t){t&&_(e)}}}(t),x=t[20].identity.description&&function(t){let e,n;return e=new t[8]({props:{$$slots:{default:[xt]},$$scope:{ctx:t}}}),{c(){at(e.$$.fragment)},m(t,o){lt(e,t,o),n=!0},p(t,n){const o={};4194304&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){st(e.$$.fragment,t),n=!1},d(t){ct(e,t)}}}(t);return r=new t[11]({}),f=new t[11]({props:{class:"divider"}}),h=new c({props:{schema:t[20],recID:t[5],prevEventID:t[6],taskId:t[1],taskOrg:t[0],prev:t[7],readonly:t[4],deletable:t[0]?.task?.deletable,isStandalone:t[2],root:"true"}}),h.$on("back",t[13]),{c(){e=C("div"),n=C("div"),w&&w.c(),o=B(),x&&x.c(),s=B(),at(r.$$.fragment),i=B(),a=C("div"),l=C("div"),l.textContent="Task-Status",u=B(),d=C("div"),m=O(k),$=B(),at(f.$$.fragment),p=B(),g=C("div"),g.textContent=" ",v=B(),at(h.$$.fragment),D(n,"class","accordion-description svelte-3m9yjb"),D(l,"class","task--status-title svelte-3m9yjb"),D(d,"class","task--status-label svelte-3m9yjb"),D(a,"class","task--status svelte-3m9yjb"),D(e,"class","subcat svelte-3m9yjb"),z(g,"height","0.5em")},m(t,c){E(t,e,c),j(e,n),w&&w.m(n,null),j(n,o),x&&x.m(n,null),j(n,s),lt(r,n,null),j(e,i),j(e,a),j(a,l),j(a,u),j(a,d),j(d,m),E(t,$,c),lt(f,t,c),E(t,p,c),E(t,g,c),E(t,v,c),lt(h,t,c),y=!0},p(t,e){t[20].identity.shortDescription&&w.p(t,e),t[20].identity.description&&x.p(t,e),(!y||8&e)&&k!==(k=t[14](t[3].status)+"")&&N(m,k);const n={};32&e&&(n.recID=t[5]),64&e&&(n.prevEventID=t[6]),2&e&&(n.taskId=t[1]),1&e&&(n.taskOrg=t[0]),128&e&&(n.prev=t[7]),16&e&&(n.readonly=t[4]),1&e&&(n.deletable=t[0]?.task?.deletable),4&e&&(n.isStandalone=t[2]),h.$set(n)},i(t){y||(ot(x),ot(r.$$.fragment,t),ot(f.$$.fragment,t),ot(h.$$.fragment,t),y=!0)},o(t){st(x),st(r.$$.fragment,t),st(f.$$.fragment,t),st(h.$$.fragment,t),y=!1},d(t){t&&_(e),w&&w.d(),x&&x.d(),ct(r),t&&_($),ct(f,t),t&&_(p),t&&_(g),t&&_(v),ct(h,t)}}}function yt(t){let e,n,o=t[20].identity.description+"";return{c(){e=C("div"),n=O(o),D(e,"class","description svelte-3m9yjb")},m(t,o){E(t,e,o),j(e,n)},p:b,d(t){t&&_(e)}}}function kt(t){let e,n,o;return n=new vt({props:{size:"20",class:"ml accordion-chevron"}}),{c(){e=O("Beschreibung\n "),at(n.$$.fragment)},m(t,s){E(t,e,s),lt(n,t,s),o=!0},p:b,i(t){o||(ot(n.$$.fragment,t),o=!0)},o(t){st(n.$$.fragment,t),o=!1},d(t){t&&_(e),ct(n,t)}}}function wt(t){let e,n,o;return n=new t[10]({props:{noRipple:!0,$$slots:{default:[kt]},$$scope:{ctx:t}}}),n.$on("click",(function(){w(t[21])&&t[21].apply(this,arguments)})),{c(){e=C("div"),at(n.$$.fragment),D(e,"slot","handle")},m(t,s){E(t,e,s),lt(n,e,null),o=!0},p(e,o){t=e;const s={};4194304&o&&(s.$$scope={dirty:o,ctx:t}),n.$set(s)},i(t){o||(ot(n.$$.fragment,t),o=!0)},o(t){st(n.$$.fragment,t),o=!1},d(t){t&&_(e),ct(n)}}}function xt(t){let e,n;return e=new t[9]({props:{$$slots:{handle:[wt,({toggle:t})=>({21:t}),({toggle:t})=>t?2097152:0],default:[yt]},$$scope:{ctx:t}}}),{c(){at(e.$$.fragment)},m(t,o){lt(e,t,o),n=!0},p(t,n){const o={};6291456&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){st(e.$$.fragment,t),n=!1},d(t){ct(e,t)}}}function It(t){return{c:b,m:b,p:b,i:b,o:b,d:b}}function jt(t){let e,n,o={ctx:t,current:null,token:null,hasCatch:!1,pending:It,then:ht,catch:bt,value:20,blocks:[,,,]};return function(t,e){const n=e.token={};function o(t,o,s,r){if(e.token!==n)return;e.resolved=r;let i=e.ctx;void 0!==s&&(i=i.slice(),i[s]=r);const a=t&&(e.current=t)(i);let l=!1;e.block&&(e.blocks?e.blocks.forEach(((t,n)=>{n!==o&&t&&(et(),st(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),nt())})):e.block.d(1),a.c(),ot(a,1),a.m(e.mount(),e.anchor),l=!0),e.block=a,e.blocks&&(e.blocks[o]=a),l&&Q()}if((s=t)&&"object"==typeof s&&"function"==typeof s.then){const n=W();if(t.then((t=>{A(n),o(e.then,1,e.value,t),A(null)}),(t=>{if(A(n),o(e.catch,2,e.error,t),A(null),!e.hasCatch)throw t})),e.current!==e.pending)return o(e.pending,0),!0}else{if(e.current!==e.then)return o(e.then,1,e.value,t),!0;e.resolved=t}var s}(t[12],o),{c(){e=T(),o.block.c()},m(t,s){E(t,e,s),o.block.m(t,o.anchor=s),o.mount=()=>e.parentNode,o.anchor=e,n=!0},p(e,[n]){!function(t,e,n){const o=e.slice(),{resolved:s}=t;t.current===t.then&&(o[t.value]=s),t.current===t.catch&&(o[t.error]=s),t.block.p(o,n)}(o,t=e,n)},i(t){n||(ot(o.block),n=!0)},o(t){for(let t=0;t<3;t+=1){st(o.blocks[t])}n=!1},d(t){t&&_(e),o.block.d(t),o.token=null,o=null}}}function Et(t,s,r){let{task:i}=s,{taskId:a}=s,{eventItem:l}=s,{followerEventId:c}=s,{followerTaskId:u}=s,{isStandalone:d}=s;const{Accordion:m,AccordionSection:$,Button:f,Divider:p}=e,g=i,v=l,b=n.getSchema(c||v._id);let h,y,k=g.task?.readonly,w=g.docId||g.id;c&&(y=w,w=void 0,h=v._id),o.subscribe((async t=>{t&&t.taskId===a&&n.getTaskqueue(null,t.taskId).then((({task:e})=>{r(3,g.status=e.status||t.status,g),r(3,g.readonly=e.readonly,g),g.readonly&&r(4,k=g.readonly)}))}));const x={New:w?"Eröffnet":"Neu",WaitingForApproval:"Zu visieren",Ready:"Bereit für nächsten Schritt",Waiting:"Wartet auf Verarbeitung",Closing:"Wartet auf Abschluss",Closed:"Abgeschlossen"};return t.$$set=t=>{"task"in t&&r(0,i=t.task),"taskId"in t&&r(1,a=t.taskId),"eventItem"in t&&r(15,l=t.eventItem),"followerEventId"in t&&r(16,c=t.followerEventId),"followerTaskId"in t&&r(17,u=t.followerTaskId),"isStandalone"in t&&r(2,d=t.isStandalone)},[i,a,d,g,k,w,h,y,m,$,f,p,b,()=>window.singleSpaNavigate("/"),t=>x[t]||"",l,c,u]}class _t extends dt{constructor(t){var e;super(),document.getElementById("svelte-3m9yjb-style")||((e=C("style")).id="svelte-3m9yjb-style",e.textContent=".subcat.svelte-3m9yjb .task--status.svelte-3m9yjb{width:100%;display:flex;gap:1em;margin:1.1em 0}.subcat.svelte-3m9yjb .task--status .task--status-title.svelte-3m9yjb{flex:0 1 40%}.subcat.svelte-3m9yjb .task--status .task--status-label.svelte-3m9yjb{flex:1}.subcat.svelte-3m9yjb .accordion-description.svelte-3m9yjb{margin:2em 0 1em 0}.subcat.svelte-3m9yjb .accordion-description .description.svelte-3m9yjb{margin-top:1em}.subcat.svelte-3m9yjb .accordion-description.svelte-3m9yjb .btn,.subcat.svelte-3m9yjb .accordion-description.svelte-3m9yjb .btn:hover,.subcat.svelte-3m9yjb .accordion-description.svelte-3m9yjb .btn:focus{padding:0;background:inherit}.description.svelte-3m9yjb.svelte-3m9yjb{font-style:italic;white-space:pre-wrap}.shortDescription.svelte-3m9yjb.svelte-3m9yjb{font-style:italic;margin-bottom:1em}",j(document.head,e)),ut(this,t,Et,jt,x,{task:0,taskId:1,eventItem:15,followerEventId:16,followerTaskId:17,isStandalone:2})}}const{document:Ct}=rt;function St(t){let e,n;return e=new t[12]({props:{disabled:!0,value:t[0].visum?.role||t[2]}}),{c(){at(e.$$.fragment)},m(t,o){lt(e,t,o),n=!0},p(t,n){const o={};5&n[0]&&(o.value=t[0].visum?.role||t[2]),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){st(e.$$.fragment,t),n=!1},d(t){ct(e,t)}}}function Ot(t){let e,n;return e=new t[12]({props:{disabled:!0,value:t[6]}}),{c(){at(e.$$.fragment)},m(t,o){lt(e,t,o),n=!0},p(t,n){const o={};64&n[0]&&(o.value=t[6]),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){st(e.$$.fragment,t),n=!1},d(t){ct(e,t)}}}function Bt(t){let e,n,o,s;return e=new t[13]({props:{noCalendar:!0,disabled:!0,value:t[5]}}),o=new t[14]({props:{inputClass:"visumTime",disabled:!0,value:t[5]}}),{c(){at(e.$$.fragment),n=B(),at(o.$$.fragment)},m(t,r){lt(e,t,r),E(t,n,r),lt(o,t,r),s=!0},p(t,n){const s={};32&n[0]&&(s.value=t[5]),e.$set(s);const r={};32&n[0]&&(r.value=t[5]),o.$set(r)},i(t){s||(ot(e.$$.fragment,t),ot(o.$$.fragment,t),s=!0)},o(t){st(e.$$.fragment,t),st(o.$$.fragment,t),s=!1},d(t){ct(e,t),t&&_(n),ct(o,t)}}}function Tt(t){let e,n,o=t[0].visum&&Bt(t);return{c(){o&&o.c(),e=T()},m(t,s){o&&o.m(t,s),E(t,e,s),n=!0},p(t,n){t[0].visum?o?(o.p(t,n),1&n[0]&&ot(o,1)):(o=Bt(t),o.c(),ot(o,1),o.m(e.parentNode,e)):o&&(et(),st(o,1,1,(()=>{o=null})),nt())},i(t){n||(ot(o),n=!0)},o(t){st(o),n=!1},d(t){o&&o.d(t),t&&_(e)}}}function Dt(t){let e,n,o,s,r,i,a,l,c,u;e=new t[16]({props:{text:"Infos aus Mailversand"}});let d=t[0].mailInfo.accepted?.length&&Nt(t),m=t[0].mailInfo.rejected?.length&&Pt(t);return r=new t[11]({props:{name:"Grösse inkl. Datei in Bytes",$$slots:{default:[Wt]},$$scope:{ctx:t}}}),a=new t[11]({props:{name:"Antwort vom Mailsystem",$$slots:{default:[Mt]},$$scope:{ctx:t}}}),c=new t[11]({props:{name:"Identifikation des Mailversands",$$slots:{default:[Vt]},$$scope:{ctx:t}}}),{c(){at(e.$$.fragment),n=B(),d&&d.c(),o=B(),m&&m.c(),s=B(),at(r.$$.fragment),i=B(),at(a.$$.fragment),l=B(),at(c.$$.fragment)},m(t,$){lt(e,t,$),E(t,n,$),d&&d.m(t,$),E(t,o,$),m&&m.m(t,$),E(t,s,$),lt(r,t,$),E(t,i,$),lt(a,t,$),E(t,l,$),lt(c,t,$),u=!0},p(t,e){t[0].mailInfo.accepted?.length?d?(d.p(t,e),1&e[0]&&ot(d,1)):(d=Nt(t),d.c(),ot(d,1),d.m(o.parentNode,o)):d&&(et(),st(d,1,1,(()=>{d=null})),nt()),t[0].mailInfo.rejected?.length?m?(m.p(t,e),1&e[0]&&ot(m,1)):(m=Pt(t),m.c(),ot(m,1),m.m(s.parentNode,s)):m&&(et(),st(m,1,1,(()=>{m=null})),nt());const n={};1&e[0]|32&e[1]&&(n.$$scope={dirty:e,ctx:t}),r.$set(n);const i={};1&e[0]|32&e[1]&&(i.$$scope={dirty:e,ctx:t}),a.$set(i);const l={};1&e[0]|32&e[1]&&(l.$$scope={dirty:e,ctx:t}),c.$set(l)},i(t){u||(ot(e.$$.fragment,t),ot(d),ot(m),ot(r.$$.fragment,t),ot(a.$$.fragment,t),ot(c.$$.fragment,t),u=!0)},o(t){st(e.$$.fragment,t),st(d),st(m),st(r.$$.fragment,t),st(a.$$.fragment,t),st(c.$$.fragment,t),u=!1},d(t){ct(e,t),t&&_(n),d&&d.d(t),t&&_(o),m&&m.d(t),t&&_(s),ct(r,t),t&&_(i),ct(a,t),t&&_(l),ct(c,t)}}}function Nt(t){let e,n;return e=new t[11]({props:{name:"versandt an",$$slots:{default:[zt]},$$scope:{ctx:t}}}),{c(){at(e.$$.fragment)},m(t,o){lt(e,t,o),n=!0},p(t,n){const o={};1&n[0]|32&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){st(e.$$.fragment,t),n=!1},d(t){ct(e,t)}}}function zt(t){let e,n;return e=new t[12]({props:{disabled:!0,value:t[0].mailInfo.accepted.join(", ")}}),{c(){at(e.$$.fragment)},m(t,o){lt(e,t,o),n=!0},p(t,n){const o={};1&n[0]&&(o.value=t[0].mailInfo.accepted.join(", ")),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){st(e.$$.fragment,t),n=!1},d(t){ct(e,t)}}}function Pt(t){let e,n;return e=new t[11]({props:{name:"nicht versandt an",$$slots:{default:[At]},$$scope:{ctx:t}}}),{c(){at(e.$$.fragment)},m(t,o){lt(e,t,o),n=!0},p(t,n){const o={};1&n[0]|32&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){st(e.$$.fragment,t),n=!1},d(t){ct(e,t)}}}function At(t){let e,n;return e=new t[12]({props:{disabled:!0,value:t[0].mailInfo.rejected.join(", ")}}),{c(){at(e.$$.fragment)},m(t,o){lt(e,t,o),n=!0},p(t,n){const o={};1&n[0]&&(o.value=t[0].mailInfo.rejected.join(", ")),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){st(e.$$.fragment,t),n=!1},d(t){ct(e,t)}}}function Wt(t){let e,n;return e=new t[12]({props:{disabled:!0,value:t[0].mailInfo.messageSize}}),{c(){at(e.$$.fragment)},m(t,o){lt(e,t,o),n=!0},p(t,n){const o={};1&n[0]&&(o.value=t[0].mailInfo.messageSize),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){st(e.$$.fragment,t),n=!1},d(t){ct(e,t)}}}function Mt(t){let e,n;return e=new i({props:{disabled:!0,value:t[0].mailInfo.response}}),{c(){at(e.$$.fragment)},m(t,o){lt(e,t,o),n=!0},p(t,n){const o={};1&n[0]&&(o.value=t[0].mailInfo.response),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){st(e.$$.fragment,t),n=!1},d(t){ct(e,t)}}}function Vt(t){let e,n;return e=new t[12]({props:{disabled:!0,value:t[0].mailInfo.messageId}}),{c(){at(e.$$.fragment)},m(t,o){lt(e,t,o),n=!0},p(t,n){const o={};1&n[0]&&(o.value=t[0].mailInfo.messageId),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){st(e.$$.fragment,t),n=!1},d(t){ct(e,t)}}}function qt(t){let e,n;return e=new t[15]({props:{filled:!0,disabled:t[1]||t[8],$$slots:{default:[Rt]},$$scope:{ctx:t}}}),e.$on("click",t[20]),{c(){at(e.$$.fragment)},m(t,o){lt(e,t,o),n=!0},p(t,n){const o={};258&n[0]&&(o.disabled=t[1]||t[8]),128&n[0]|32&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){st(e.$$.fragment,t),n=!1},d(t){ct(e,t)}}}function Gt(t){let e,n;return e=new t[15]({props:{filled:!0,danger:!0,$$slots:{default:[Ft]},$$scope:{ctx:t}}}),e.$on("click",t[21]),{c(){at(e.$$.fragment)},m(t,o){lt(e,t,o),n=!0},p(t,n){const o={};32&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){st(e.$$.fragment,t),n=!1},d(t){ct(e,t)}}}function Rt(t){let e;return{c(){e=O(t[7])},m(t,n){E(t,e,n)},p(t,n){128&n[0]&&N(e,t[7])},d(t){t&&_(e)}}}function Ft(t){let e;return{c(){e=O("Visum zurücknehmen")},m(t,n){E(t,e,n)},d(t){t&&_(e)}}}function Yt(t){let e;return{c(){e=O("Abbrechen")},m(t,n){E(t,e,n)},d(t){t&&_(e)}}}function Jt(t){let e;return{c(){e=O("Ja, bitte visieren")},m(t,n){E(t,e,n)},d(t){t&&_(e)}}}function Lt(t){let e,n,o,s,r,i,a;return s=new t[15]({props:{filled:!0,$$slots:{default:[Yt]},$$scope:{ctx:t}}}),s.$on("click",t[30]),i=new t[15]({props:{danger:!0,outline:!0,$$slots:{default:[Jt]},$$scope:{ctx:t}}}),i.$on("click",t[23]),{c(){e=C("p"),e.textContent="Willst du den Vorgang jetzt visieren?",n=B(),o=C("div"),at(s.$$.fragment),r=B(),at(i.$$.fragment),D(o,"class","flex_div svelte-s8a1g4")},m(t,l){E(t,e,l),E(t,n,l),E(t,o,l),lt(s,o,null),j(o,r),lt(i,o,null),a=!0},p(t,e){const n={};32&e[1]&&(n.$$scope={dirty:e,ctx:t}),s.$set(n);const o={};32&e[1]&&(o.$$scope={dirty:e,ctx:t}),i.$set(o)},i(t){a||(ot(s.$$.fragment,t),ot(i.$$.fragment,t),a=!0)},o(t){st(s.$$.fragment,t),st(i.$$.fragment,t),a=!1},d(t){t&&_(e),t&&_(n),t&&_(o),ct(s),ct(i)}}}function Kt(t){let e,n,o;return n=new ft({props:{size:"25"}}),{c(){e=C("div"),at(n.$$.fragment),D(e,"slot","title-icon")},m(t,s){E(t,e,s),lt(n,e,null),o=!0},p:b,i(t){o||(ot(n.$$.fragment,t),o=!0)},o(t){st(n.$$.fragment,t),o=!1},d(t){t&&_(e),ct(n)}}}function Zt(t){let e,n;return e=new t[10]({props:{title:"Bestätigung",closeCallback:t[35],danger:!0,$$slots:{"title-icon":[Kt],default:[Lt]},$$scope:{ctx:t}}}),{c(){at(e.$$.fragment)},m(t,o){lt(e,t,o),n=!0},p(t,n){const o={};16&n[1]&&(o.closeCallback=t[35]),32&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){st(e.$$.fragment,t),n=!1},d(t){ct(e,t)}}}function Ht(t){let e;return{c(){e=O("Abbrechen")},m(t,n){E(t,e,n)},d(t){t&&_(e)}}}function Qt(t){let e;return{c(){e=O("Ja, bitte zurücknehmen")},m(t,n){E(t,e,n)},d(t){t&&_(e)}}}function Ut(t){let e,n,o,s,r,i,a;return s=new t[15]({props:{filled:!0,$$slots:{default:[Ht]},$$scope:{ctx:t}}}),s.$on("click",t[32]),i=new t[15]({props:{danger:!0,outline:!0,$$slots:{default:[Qt]},$$scope:{ctx:t}}}),i.$on("click",t[24]),{c(){e=C("p"),e.textContent="Willst du das Visum zurücknehmen?",n=B(),o=C("div"),at(s.$$.fragment),r=B(),at(i.$$.fragment),D(o,"class","flex_div svelte-s8a1g4")},m(t,l){E(t,e,l),E(t,n,l),E(t,o,l),lt(s,o,null),j(o,r),lt(i,o,null),a=!0},p(t,e){const n={};32&e[1]&&(n.$$scope={dirty:e,ctx:t}),s.$set(n);const o={};32&e[1]&&(o.$$scope={dirty:e,ctx:t}),i.$set(o)},i(t){a||(ot(s.$$.fragment,t),ot(i.$$.fragment,t),a=!0)},o(t){st(s.$$.fragment,t),st(i.$$.fragment,t),a=!1},d(t){t&&_(e),t&&_(n),t&&_(o),ct(s),ct(i)}}}function Xt(t){let e,n,o;return n=new ft({props:{size:"25"}}),{c(){e=C("div"),at(n.$$.fragment),D(e,"slot","title-icon")},m(t,s){E(t,e,s),lt(n,e,null),o=!0},p:b,i(t){o||(ot(n.$$.fragment,t),o=!0)},o(t){st(n.$$.fragment,t),o=!1},d(t){t&&_(e),ct(n)}}}function te(t){let e,n;return e=new t[10]({props:{title:"Bestätigung",closeCallback:t[35],danger:!0,$$slots:{"title-icon":[Xt],default:[Ut]},$$scope:{ctx:t}}}),{c(){at(e.$$.fragment)},m(t,o){lt(e,t,o),n=!0},p(t,n){const o={};16&n[1]&&(o.closeCallback=t[35]),32&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){st(e.$$.fragment,t),n=!1},d(t){ct(e,t)}}}function ee(t){let e,n,o;return n=new t[18]({props:{outline:!0,$$slots:{default:[ne]},$$scope:{ctx:t}}}),{c(){e=C("div"),at(n.$$.fragment),z(e,"margin-top","1em")},m(t,s){E(t,e,s),lt(n,e,null),o=!0},i(t){o||(ot(n.$$.fragment,t),o=!0)},o(t){st(n.$$.fragment,t),o=!1},d(t){t&&_(e),ct(n)}}}function ne(t){let e,n,o;return n=new t[17]({}),{c(){e=O("Bitte warten!\n"),at(n.$$.fragment)},m(t,s){E(t,e,s),lt(n,t,s),o=!0},i(t){o||(ot(n.$$.fragment,t),o=!0)},o(t){st(n.$$.fragment,t),o=!1},d(t){t&&_(e),ct(n,t)}}}function oe(t){let e,n,o,s,r,i,a,l,c,u,d,m,$,f,p,g,v,h,y,k,w,x,I=t[19]&&function(t){let e;return{c(){e=C("div"),e.textContent=`${t[19]}`,D(e,"class","description svelte-s8a1g4")},m(t,n){E(t,e,n)},p:b,d(t){t&&_(e)}}}(t);r=new t[11]({props:{name:"Rolle",$$slots:{default:[St]},$$scope:{ctx:t}}}),a=new t[11]({props:{name:"visiert von",$$slots:{default:[Ot]},$$scope:{ctx:t}}}),c=new t[11]({props:{name:"visiert am",$$slots:{default:[Tt]},$$scope:{ctx:t}}});let S=t[0].mailInfo&&Dt(t);const O=[Gt,qt],N=[];function z(t,e){return t[0].visum?0:1}function P(e){t[31](e)}m=z(t),$=N[m]=O[m](t);let A={$$slots:{default:[Zt,({closeCallback:t})=>({35:t}),({closeCallback:t})=>[0,t?16:0]]},$$scope:{ctx:t}};function W(e){t[33](e)}void 0!==t[3]&&(A.open=t[3]),p=new t[9]({props:A}),V.push((()=>it(p,"open",P)));let M={$$slots:{default:[te,({closeCallback:t})=>({35:t}),({closeCallback:t})=>[0,t?16:0]]},$$scope:{ctx:t}};void 0!==t[4]&&(M.open=t[4]),h=new t[9]({props:M}),V.push((()=>it(h,"open",W)));let q=t[8]&&ee(t);return{c(){e=C("h3"),e.textContent="Visum bearbeiten",n=B(),o=C("div"),I&&I.c(),s=B(),at(r.$$.fragment),i=B(),at(a.$$.fragment),l=B(),at(c.$$.fragment),u=B(),S&&S.c(),d=B(),$.c(),f=B(),at(p.$$.fragment),v=B(),at(h.$$.fragment),k=B(),q&&q.c(),w=T(),D(o,"class","visum svelte-s8a1g4")},m(t,$){E(t,e,$),E(t,n,$),E(t,o,$),I&&I.m(o,null),j(o,s),lt(r,o,null),j(o,i),lt(a,o,null),j(o,l),lt(c,o,null),j(o,u),S&&S.m(o,null),j(o,d),N[m].m(o,null),E(t,f,$),lt(p,t,$),E(t,v,$),lt(h,t,$),E(t,k,$),q&&q.m(t,$),E(t,w,$),x=!0},p(t,e){t[19]&&I.p(t,e);const n={};5&e[0]|32&e[1]&&(n.$$scope={dirty:e,ctx:t}),r.$set(n);const s={};64&e[0]|32&e[1]&&(s.$$scope={dirty:e,ctx:t}),a.$set(s);const i={};33&e[0]|32&e[1]&&(i.$$scope={dirty:e,ctx:t}),c.$set(i),t[0].mailInfo?S?(S.p(t,e),1&e[0]&&ot(S,1)):(S=Dt(t),S.c(),ot(S,1),S.m(o,d)):S&&(et(),st(S,1,1,(()=>{S=null})),nt());let l=m;m=z(t),m===l?N[m].p(t,e):(et(),st(N[l],1,1,(()=>{N[l]=null})),nt(),$=N[m],$?$.p(t,e):($=N[m]=O[m](t),$.c()),ot($,1),$.m(o,null));const u={};48&e[1]&&(u.$$scope={dirty:e,ctx:t}),!g&&8&e[0]&&(g=!0,u.open=t[3],K((()=>g=!1))),p.$set(u);const f={};48&e[1]&&(f.$$scope={dirty:e,ctx:t}),!y&&16&e[0]&&(y=!0,f.open=t[4],K((()=>y=!1))),h.$set(f),t[8]?q?256&e[0]&&ot(q,1):(q=ee(t),q.c(),ot(q,1),q.m(w.parentNode,w)):q&&(et(),st(q,1,1,(()=>{q=null})),nt())},i(t){x||(ot(r.$$.fragment,t),ot(a.$$.fragment,t),ot(c.$$.fragment,t),ot(S),ot($),ot(p.$$.fragment,t),ot(h.$$.fragment,t),ot(q),x=!0)},o(t){st(r.$$.fragment,t),st(a.$$.fragment,t),st(c.$$.fragment,t),st(S),st($),st(p.$$.fragment,t),st(h.$$.fragment,t),st(q),x=!1},d(t){t&&_(e),t&&_(n),t&&_(o),I&&I.d(),ct(r),ct(a),ct(c),S&&S.d(),N[m].d(),t&&_(f),ct(p,t),t&&_(v),ct(h,t),t&&_(k),q&&q.d(t),t&&_(w)}}}function se(t,i,l){let c,u;I(t,s,(t=>l(28,c=t))),I(t,r,(t=>l(29,u=t)));const{Modal:d,Dialog:m,FormField:$,TextField:f,DatePicker:p,TimePicker:g,Button:v,Divider:b,Loading:h,Chip:y}=e;let k,w,x,j,E,_,C,{task:S}=i,{taskId:O}=i,{eventItem:B}=i,T=!1,D=!1;const N=B.output.approval[0].description||"",z=()=>{l(3,T=!1)};o.subscribe((t=>{t&&t.taskId===O&&(l(0,S.visum=t.data,S),l(0,S.status=t.status,S))}));return t.$$set=t=>{"task"in t&&l(0,S=t.task),"taskId"in t&&l(25,O=t.taskId),"eventItem"in t&&l(26,B=t.eventItem)},t.$$.update=()=>{1006632967&t.$$.dirty[0]&&(l(5,w=new Date(S.visum?.timeStamp)),l(7,j=S.visum?"Visum erfolgreich erstellt":"Jetzt visieren"),l(27,E=!S.visum),l(27,E=E&&!!B.output?.approval?.length),E&&c&&(l(2,_=B.output.approval.flatMap((({refRole:t})=>t))),l(27,E=_.some((t=>c.some((e=>t===e)))))),l(1,k=!E),l(6,x=S.visum?.user||(k?"":u.email)),J().then((()=>{const t=document.getElementsByClassName("visumTime")[0];t&&(t.disabled=!0)})))},[S,k,_,T,D,w,x,j,C,d,m,$,f,p,g,v,b,h,y,N,()=>{l(3,T=!0)},()=>{l(4,D=!0)},z,()=>{l(3,T=!1);const t={eventId:B._id,eventDesignation:B.identity.designation,docId:S.docId,role:_.filter((t=>c.find((e=>e===t)))).join(", "),user:u.email,timeStamp:(new Date).toISOString()};l(8,C=!0),n.setTaskVisum(S._id,t).then((e=>{e.taskId?(l(0,S.visum=t,S),window.singleSpaNavigate(`/task/${B._id}/${S._id}/task`)):a.failed("Das Visum konnte ncht gesetzt werden!",3e3)})).finally((()=>l(8,C=!1)))},()=>{l(4,D=!1),n.deleteTaskVisum(S._id,B._id).then((t=>{!1!==t.status?(l(0,S.visum=!1,S),window.singleSpaNavigate(`/task/${B._id}/${S._id}/task`)):a.failed("Das Visum konnte ncht zurück genommen werden!",3e3)}))},O,B,E,c,u,()=>z(),function(t){T=t,l(3,T)},()=>z(),function(t){D=t,l(4,D)}]}class re extends dt{constructor(t){var e;super(),Ct.getElementById("svelte-s8a1g4-style")||((e=C("style")).id="svelte-s8a1g4-style",e.textContent=".visum .time-picker .dropdown{display:none !important}.visum .form-field{margin-bottom:1em !important}.flex_div.svelte-s8a1g4.svelte-s8a1g4{display:flex;margin-top:1em;gap:0.5em;justify-content:space-between}div.visum.svelte-s8a1g4 div.description.svelte-s8a1g4{font-family:inherit;font-size:inherit;width:100%;min-height:2em;line-height:1.25em;margin-top:1em;margin-bottom:1.5em}",j(Ct.head,e)),ut(this,t,se,oe,x,{task:0,taskId:25,eventItem:26},[-1,-1])}}const ie=[];const ae=t("taskClipboard",function(t,e=b){let n;const o=[];function s(e){if(x(t,e)&&(t=e,n)){const e=!ie.length;for(let e=0;e<o.length;e+=1){const n=o[e];n[1](),ie.push(n,t)}if(e){for(let t=0;t<ie.length;t+=2)ie[t][0](ie[t+1]);ie.length=0}}}return{set:s,update:function(e){s(e(t))},subscribe:function(r,i=b){const a=[r,i];return o.push(a),1===o.length&&(n=e(s)||b),r(t),()=>{const t=o.indexOf(a);-1!==t&&o.splice(t,1),0===o.length&&(n(),n=null)}}}}(!1)),{document:le}=rt;function ce(t){let e,n,o,s,r,i,a,l,c=t[8](t[27],!!t[28]||t[0]===t[22])+"";n=new t[3]({props:{name:"menu",items:t[25],value:t[26].name,class:"task--tabs",tabClass:"menuTab"}}),n.$on("change",(function(){w(t[7](t[31],t[23],t[22],t[28],t[29]))&&t[7](t[31],t[23],t[22],t[28],t[29]).apply(this,arguments)}));var u=t[26].component;function d(t){return{props:{taskId:t[23],task:t[30],eventItem:t[27],followerEventId:t[28],isStandalone:t[4]}}}return u&&(a=new u(d(t)),a.$on("back",t[9])),{c(){e=C("div"),at(n.$$.fragment),o=B(),s=O(c),r=B(),i=C("div"),a&&at(a.$$.fragment),D(e,"class","task--header svelte-kw8mxg"),D(i,"class","task--content svelte-kw8mxg")},m(t,c){E(t,e,c),lt(n,e,null),j(e,o),j(e,s),E(t,r,c),E(t,i,c),a&&lt(a,i,null),l=!0},p(e,o){t=e;const r={};33554432&o[0]&&(r.items=t[25]),67108864&o[0]&&(r.value=t[26].name),n.$set(r),(!l||406847489&o[0])&&c!==(c=t[8](t[27],!!t[28]||t[0]===t[22])+"")&&N(s,c);const m={};if(8388608&o[0]&&(m.taskId=t[23]),1073741824&o[0]&&(m.task=t[30]),134217728&o[0]&&(m.eventItem=t[27]),268435456&o[0]&&(m.followerEventId=t[28]),u!==(u=t[26].component)){if(a){et();const t=a;st(t.$$.fragment,1,0,(()=>{ct(t,1)})),nt()}u?(a=new u(d(t)),a.$on("back",t[9]),at(a.$$.fragment),ot(a.$$.fragment,1),lt(a,i,null)):a=null}else u&&a.$set(m)},i(t){l||(ot(n.$$.fragment,t),a&&ot(a.$$.fragment,t),l=!0)},o(t){st(n.$$.fragment,t),a&&st(a.$$.fragment,t),l=!1},d(t){t&&_(e),ct(n),t&&_(r),t&&_(i),a&&ct(a)}}}function ue(t){let e,n,o;return n=new t[2]({props:{constrainWidth:!0,title:t[21],titleClass:"task_title",closeCallback:t[10],class:"task--area",$$slots:{default:[ce]},$$scope:{ctx:t}}}),{c(){e=C("div"),at(n.$$.fragment),D(e,"class","task svelte-kw8mxg")},m(t,s){E(t,e,s),lt(n,e,null),o=!0},p(t,e){const o={};2097152&e[0]&&(o.title=t[21]),2126512129&e[0]|5&e[1]&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(ot(n.$$.fragment,t),o=!0)},o(t){st(n.$$.fragment,t),o=!1},d(t){t&&_(e),ct(n)}}}function de(t){let e,n,o;return n=new t[1]({props:{open:"true",noClickaway:"true",class:"task--modal",$$slots:{default:[ue,({closeCallback:t})=>({32:t}),({closeCallback:t})=>[0,t?2:0]]},$$scope:{ctx:t}}}),n.$on("change",t[6]),{c(){e=C("div"),at(n.$$.fragment),D(e,"class","task--page svelte-kw8mxg")},m(t,s){E(t,e,s),lt(n,e,null),o=!0},p(t,e){const o={};2128609281&e[0]|5&e[1]&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(ot(n.$$.fragment,t),o=!0)},o(t){st(n.$$.fragment,t),o=!1},d(t){t&&_(e),ct(n)}}}function me(t){let e,n,o;return n=new l({props:{update:t[5],$$slots:{default:[de,({prop:{title:t,eventId:e,taskId:n,tabId:o,items:s,item:r,eventItem:i,followerEventId:a,followerTaskId:l,task:c,findMenu:u}})=>({21:t,22:e,23:n,24:o,25:s,26:r,27:i,28:a,29:l,30:c,31:u}),({prop:t})=>[(t?2097152:0)|(t?4194304:0)|(t?8388608:0)|(t?16777216:0)|(t?33554432:0)|(t?67108864:0)|(t?134217728:0)|(t?268435456:0)|(t?536870912:0)|(t?1073741824:0),t?1:0]]},$$scope:{ctx:t}}}),{c(){e=B(),at(n.$$.fragment),le.title="enablerr - Task"},m(t,s){E(t,e,s),lt(n,t,s),o=!0},p(t,e){const o={};2128609281&e[0]|5&e[1]&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(ot(n.$$.fragment,t),o=!0)},o(t){st(n.$$.fragment,t),o=!1},d(t){t&&_(e),ct(n,t)}}}function $e(t,o,s){let r;I(t,ae,(t=>s(16,r=t)));const{Modal:i,Dialog:a,Tabs:l}=e;let c;const $=-1!==window.location.search.indexOf("view=standalone");let f,p,g;const v={items:[{id:"task",name:"Aufgabe",component:_t},{id:"visum",name:"Visum",component:re},{id:"collab",name:"Kommunikation",component:m},{id:"workflow",name:"Workflow",component:u},{id:"report",name:"Anhänge",component:d}],findBy(t,e){return this.items.find((n=>n[t]===e))},findByName(t){return this.findBy("name",t)},findById(t){return this.findBy("id",t)},deflt(){return this.items[0]},map(){return this.items.map((t=>t.name))}},b=()=>{scrollY=window.scrollY,f=document.body.style.position,p=document.body.style.overflow,g=document.body.style.width,document.body.style.position="fixed",document.body.style.top=`-${scrollY}px`,document.body.style.overflow="hidden",document.body.style.width="100%"};b();const h=(t,e,n)=>window.singleSpaNavigate(`/task/${t}/${e}/${n.id}`);!function(t){W().$$.on_destroy.push(t)}((()=>{document.body.style.position="inherit",document.body.style.overflow="auto",document.title="enablerr - Dashboard"})),function(t){W().$$.on_mount.push(t)}((()=>{!function(t,e,n=e){t.set(n)}(ae,r=!1,r)}));return[c,i,a,l,$,async(t,e,o,r)=>{const i=v.findById(o);if(!i)return h(t,e,v.deflt());"task"!==o&&(r=void 0),s(0,c=e);let a={status:"New"};const l=await n.getEvent(t);l||window.singleSpaNavigate("/error");let u=l.identity.designation,d="";if(r?.includes(":")&&([r,d]=r.split(":")),r){const t=await n.getEvent(r);t||window.singleSpaNavigate("/error"),u+=" => "+t.identity.designation}return e!==t?(a=await n.getTaskById(e),a||window.singleSpaNavigate("/error"),a.event!==l._id.toString()&&(l._id=a.event)):e=void 0,{title:u,eventId:t,taskId:e,tabId:o,item:i,eventItem:l,followerEventId:r,followerTaskId:d,task:a,items:v.map(),findMenu:t=>v.findByName(t)}},function(t){t.detail.value?b():(document.body.style.position=f||"",document.body.style.top="",document.body.style.overflow=p||"",document.body.style.width=g||"",window.scrollTo(0,scrollY))},(t,e,n,o)=>({detail:{value:s}})=>{o||h(n,e,t(s))},(t,e)=>{let n=!t.output?.approval;return J().then((()=>{Array.from(document.getElementsByClassName("menuTab")).map(((t,o)=>{o&&(t.querySelector("input").disabled=e),1===o&&(t.querySelector("input").disabled=e||n)}))})),""},function(e){!function(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t(e)))}(t,e)},()=>$?window.close():window.singleSpaNavigate("/")]}class fe extends dt{constructor(t){var e;super(),le.getElementById("svelte-kw8mxg-style")||((e=C("style")).id="svelte-kw8mxg-style",e.textContent='.task--page.svelte-kw8mxg .task--modal{align-items:flex-start !important;overflow:auto !important}.task.svelte-kw8mxg{margin-top:4em}@media(max-height: 900px){.task.svelte-kw8mxg{margin-top:0}}.task.svelte-kw8mxg .task--area{overflow-x:hidden;overflow-y:auto;min-width:50vw}.task.svelte-kw8mxg .dialog nav[role="group"]{display:flex;justify-content:flex-start;flex-direction:row;flex-wrap:nowrap;gap:1em}.task--header.svelte-kw8mxg{margin-top:0.5em}.task--header.svelte-kw8mxg .task_tabs{margin-bottom:1em}.task--content.svelte-kw8mxg{margin-top:1em;height:fit-content;min-height:40vh;max-height:90vh}',j(le.head,e)),ut(this,t,$e,me,x,{},[-1,-1])}}const pe=v({component:fe,domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:ge,mount:ve,unmount:be}=pe;t({bootstrap:ge,mount:ve,unmount:be});t("Task",fe)}}}));
1
+ System.register(["@enablerr-ui/layout","@enablerr-ui/form","@enablerr-ui/detail","@enablerr-ui/workflow","@enablerr-ui/report","@enablerr-ui/collab"],(function(t){"use strict";var e,n,o,s,r,i,a,l,c,u,d,m;return{setters:[function(t){e=t.getAttractions},function(t){n=t.Request,o=t.approval_notification,s=t.currentRoles,r=t.settings,i=t.TextArea,a=t.toasts,l=t.Page},function(t){c=t.Form},function(t){u=t.Workflow},function(t){d=t.Report},function(t){m=t.Collaboration}],execute:function(){t("version","0.2.101");function $(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var f,p,g=(f=function(t,e){function n(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function o(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?n(Object(o),!0).forEach((function(e){s(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if("object"!==r(t))throw new Error("single-spa-svelte requires a configuration object");var e=o(o({},i),t);if(!e.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:a.bind(null,e,n),mount:l.bind(null,e,n),unmount:c.bind(null,e,n),update:u.bind(null,e,n)}};var i={component:null,domElementGetter:null,props:{}};function a(t){return Promise.resolve()}function l(t,e,n){var s=Object.keys(i),r=Object.keys(t).reduce((function(e,n){return s.includes(n)||(e[n]=t[n]),e}),{});return Promise.resolve().then((function(){var s=function(t,e){return(e=e&&e.customProps?e.customProps:e).domElement?function(){return e.domElement}:e.domElementGetter?function(){return e.domElementGetter(e)}:t.domElementGetter?function(){return t.domElementGetter(e)}:function(t){var e=t.appName||t.name;if(!e)throw Error("single-spa-svelte was not given an application name as a prop, so it can't make a unique dom element container for the svelte application");var n="single-spa-application:".concat(e);return function(){var t=document.getElementById(n);return t||((t=document.createElement("div")).id=n,document.body.appendChild(t)),t}}(e)}(t,n),i=s();e.instance=new t.component(o(o({},r),{},{target:i,props:Object.assign({},n,t.props)}))}))}function c(t,e){return Promise.resolve().then((function(){e.instance.$destroy?e.instance.$destroy():e.instance.destroy()}))}function u(t,e,n){return Promise.resolve().then((function(){e.instance.$set?e.instance.$set(n):e.instance.set(n)}))}},f(p={exports:{}},p.exports),p.exports),v=$(g);function b(){}function h(t){return t()}function y(){return Object.create(null)}function k(t){t.forEach(h)}function w(t){return"function"==typeof t}function x(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function I(t,e,n){t.$$.on_destroy.push(function(t,...e){if(null==t)return b;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}(e,n))}function j(t,e){t.appendChild(e)}function E(t,e,n){t.insertBefore(e,n||null)}function _(t){t.parentNode.removeChild(t)}function C(t){return document.createElement(t)}function S(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function O(t){return document.createTextNode(t)}function B(){return O(" ")}function T(){return O("")}function D(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function N(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function z(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}let P;function A(t){P=t}function W(){if(!P)throw new Error("Function called outside component initialization");return P}const M=[],V=[],q=[],G=[],R=Promise.resolve();let F=!1;function Y(){F||(F=!0,R.then(Q))}function J(){return Y(),R}function L(t){q.push(t)}function K(t){G.push(t)}let Z=!1;const H=new Set;function Q(){if(!Z){Z=!0;do{for(let t=0;t<M.length;t+=1){const e=M[t];A(e),U(e.$$)}for(A(null),M.length=0;V.length;)V.pop()();for(let t=0;t<q.length;t+=1){const e=q[t];H.has(e)||(H.add(e),e())}q.length=0}while(M.length);for(;G.length;)G.pop()();F=!1,Z=!1,H.clear()}}function U(t){if(null!==t.fragment){t.update(),k(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(L)}}const X=new Set;let tt;function et(){tt={r:0,c:[],p:tt}}function nt(){tt.r||k(tt.c),tt=tt.p}function ot(t,e){t&&t.i&&(X.delete(t),t.i(e))}function st(t,e,n,o){if(t&&t.o){if(X.has(t))return;X.add(t),tt&&tt.c.push((()=>{X.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const rt="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function it(t,e,n){const o=t.$$.props[e];void 0!==o&&(t.$$.bound[o]=n,n(t.$$.ctx[o]))}function at(t){t&&t.c()}function lt(t,e,n,o){const{fragment:s,on_mount:r,on_destroy:i,after_update:a}=t.$$;s&&s.m(e,n),o||L((()=>{const e=r.map(h).filter(w);i?i.push(...e):k(e),t.$$.on_mount=[]})),a.forEach(L)}function ct(t,e){const n=t.$$;null!==n.fragment&&(k(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function ut(t,e,n,o,s,r,i=[-1]){const a=P;A(t);const l=t.$$={fragment:null,ctx:null,props:r,update:b,not_equal:s,bound:y(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a?a.$$.context:e.context||[]),callbacks:y(),dirty:i,skip_bound:!1};let c=!1;if(l.ctx=n?n(t,e.props||{},((e,n,...o)=>{const r=o.length?o[0]:n;return l.ctx&&s(l.ctx[e],l.ctx[e]=r)&&(!l.skip_bound&&l.bound[e]&&l.bound[e](r),c&&function(t,e){-1===t.$$.dirty[0]&&(M.push(t),Y(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(t,e)),n})):[],l.update(),c=!0,k(l.before_update),l.fragment=!!o&&o(l.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);l.fragment&&l.fragment.l(t),t.forEach(_)}else l.fragment&&l.fragment.c();e.intro&&ot(t.$$.fragment),lt(t,e.target,e.anchor,e.customElement),Q()}A(a)}class dt{$destroy(){ct(this,1),this.$destroy=b}$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 mt(t){let e,n,o,s,r;return{c(){e=S("svg"),n=S("path"),o=S("line"),s=S("line"),D(n,"d","M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"),D(o,"x1","12"),D(o,"y1","9"),D(o,"x2","12"),D(o,"y2","13"),D(s,"x1","12"),D(s,"y1","17"),D(s,"x2","12.01"),D(s,"y2","17"),D(e,"xmlns","http://www.w3.org/2000/svg"),D(e,"width",t[0]),D(e,"height",t[0]),D(e,"fill","none"),D(e,"viewBox","0 0 24 24"),D(e,"stroke","currentColor"),D(e,"stroke-width",t[1]),D(e,"stroke-linecap","round"),D(e,"stroke-linejoin","round"),D(e,"class",r="feather feather-alert-triangle "+t[2])},m(t,r){E(t,e,r),j(e,n),j(e,o),j(e,s)},p(t,[n]){1&n&&D(e,"width",t[0]),1&n&&D(e,"height",t[0]),2&n&&D(e,"stroke-width",t[1]),4&n&&r!==(r="feather feather-alert-triangle "+t[2])&&D(e,"class",r)},i:b,o:b,d(t){t&&_(e)}}}function $t(t,e,n){let{size:o="100%"}=e,{strokeWidth:s=2}=e,{class:r=""}=e;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),t.$$set=t=>{"size"in t&&n(0,o=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,r=t.class)},[o,s,r]}class ft extends dt{constructor(t){super(),ut(this,t,$t,mt,x,{size:0,strokeWidth:1,class:2})}}function pt(t){let e,n,o;return{c(){e=S("svg"),n=S("polyline"),D(n,"points","6 9 12 15 18 9"),D(e,"xmlns","http://www.w3.org/2000/svg"),D(e,"width",t[0]),D(e,"height",t[0]),D(e,"fill","none"),D(e,"viewBox","0 0 24 24"),D(e,"stroke","currentColor"),D(e,"stroke-width",t[1]),D(e,"stroke-linecap","round"),D(e,"stroke-linejoin","round"),D(e,"class",o="feather feather-chevron-down "+t[2])},m(t,o){E(t,e,o),j(e,n)},p(t,[n]){1&n&&D(e,"width",t[0]),1&n&&D(e,"height",t[0]),2&n&&D(e,"stroke-width",t[1]),4&n&&o!==(o="feather feather-chevron-down "+t[2])&&D(e,"class",o)},i:b,o:b,d(t){t&&_(e)}}}function gt(t,e,n){let{size:o="100%"}=e,{strokeWidth:s=2}=e,{class:r=""}=e;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),t.$$set=t=>{"size"in t&&n(0,o=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,r=t.class)},[o,s,r]}class vt extends dt{constructor(t){super(),ut(this,t,gt,pt,x,{size:0,strokeWidth:1,class:2})}}function bt(t){return{c:b,m:b,p:b,i:b,o:b,d:b}}function ht(t){let e,n,o,s,r,i,a,l,u,d,m,$,f,p,g,v,h,y,k=t[14](t[3].status)+"",w=t[20].identity.shortDescription&&function(t){let e,n,o=t[20].identity.shortDescription+"";return{c(){e=C("div"),n=O(o),D(e,"class","shortDescription svelte-3m9yjb")},m(t,o){E(t,e,o),j(e,n)},p:b,d(t){t&&_(e)}}}(t),x=t[20].identity.description&&function(t){let e,n;return e=new t[8]({props:{$$slots:{default:[xt]},$$scope:{ctx:t}}}),{c(){at(e.$$.fragment)},m(t,o){lt(e,t,o),n=!0},p(t,n){const o={};4194304&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){st(e.$$.fragment,t),n=!1},d(t){ct(e,t)}}}(t);return r=new t[11]({}),f=new t[11]({props:{class:"divider"}}),h=new c({props:{schema:t[20],recID:t[5],prevEventID:t[6],taskId:t[1],taskOrg:t[0],prev:t[7],readonly:t[4],deletable:t[0]?.task?.deletable,isStandalone:t[2],root:"true"}}),h.$on("back",t[13]),{c(){e=C("div"),n=C("div"),w&&w.c(),o=B(),x&&x.c(),s=B(),at(r.$$.fragment),i=B(),a=C("div"),l=C("div"),l.textContent="Task-Status",u=B(),d=C("div"),m=O(k),$=B(),at(f.$$.fragment),p=B(),g=C("div"),g.textContent=" ",v=B(),at(h.$$.fragment),D(n,"class","accordion-description svelte-3m9yjb"),D(l,"class","task--status-title svelte-3m9yjb"),D(d,"class","task--status-label svelte-3m9yjb"),D(a,"class","task--status svelte-3m9yjb"),D(e,"class","subcat svelte-3m9yjb"),z(g,"height","0.5em")},m(t,c){E(t,e,c),j(e,n),w&&w.m(n,null),j(n,o),x&&x.m(n,null),j(n,s),lt(r,n,null),j(e,i),j(e,a),j(a,l),j(a,u),j(a,d),j(d,m),E(t,$,c),lt(f,t,c),E(t,p,c),E(t,g,c),E(t,v,c),lt(h,t,c),y=!0},p(t,e){t[20].identity.shortDescription&&w.p(t,e),t[20].identity.description&&x.p(t,e),(!y||8&e)&&k!==(k=t[14](t[3].status)+"")&&N(m,k);const n={};32&e&&(n.recID=t[5]),64&e&&(n.prevEventID=t[6]),2&e&&(n.taskId=t[1]),1&e&&(n.taskOrg=t[0]),128&e&&(n.prev=t[7]),16&e&&(n.readonly=t[4]),1&e&&(n.deletable=t[0]?.task?.deletable),4&e&&(n.isStandalone=t[2]),h.$set(n)},i(t){y||(ot(x),ot(r.$$.fragment,t),ot(f.$$.fragment,t),ot(h.$$.fragment,t),y=!0)},o(t){st(x),st(r.$$.fragment,t),st(f.$$.fragment,t),st(h.$$.fragment,t),y=!1},d(t){t&&_(e),w&&w.d(),x&&x.d(),ct(r),t&&_($),ct(f,t),t&&_(p),t&&_(g),t&&_(v),ct(h,t)}}}function yt(t){let e,n,o=t[20].identity.description+"";return{c(){e=C("div"),n=O(o),D(e,"class","description svelte-3m9yjb")},m(t,o){E(t,e,o),j(e,n)},p:b,d(t){t&&_(e)}}}function kt(t){let e,n,o;return n=new vt({props:{size:"20",class:"ml accordion-chevron"}}),{c(){e=O("Beschreibung\n "),at(n.$$.fragment)},m(t,s){E(t,e,s),lt(n,t,s),o=!0},p:b,i(t){o||(ot(n.$$.fragment,t),o=!0)},o(t){st(n.$$.fragment,t),o=!1},d(t){t&&_(e),ct(n,t)}}}function wt(t){let e,n,o;return n=new t[10]({props:{noRipple:!0,$$slots:{default:[kt]},$$scope:{ctx:t}}}),n.$on("click",(function(){w(t[21])&&t[21].apply(this,arguments)})),{c(){e=C("div"),at(n.$$.fragment),D(e,"slot","handle")},m(t,s){E(t,e,s),lt(n,e,null),o=!0},p(e,o){t=e;const s={};4194304&o&&(s.$$scope={dirty:o,ctx:t}),n.$set(s)},i(t){o||(ot(n.$$.fragment,t),o=!0)},o(t){st(n.$$.fragment,t),o=!1},d(t){t&&_(e),ct(n)}}}function xt(t){let e,n;return e=new t[9]({props:{$$slots:{handle:[wt,({toggle:t})=>({21:t}),({toggle:t})=>t?2097152:0],default:[yt]},$$scope:{ctx:t}}}),{c(){at(e.$$.fragment)},m(t,o){lt(e,t,o),n=!0},p(t,n){const o={};6291456&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){st(e.$$.fragment,t),n=!1},d(t){ct(e,t)}}}function It(t){return{c:b,m:b,p:b,i:b,o:b,d:b}}function jt(t){let e,n,o={ctx:t,current:null,token:null,hasCatch:!1,pending:It,then:ht,catch:bt,value:20,blocks:[,,,]};return function(t,e){const n=e.token={};function o(t,o,s,r){if(e.token!==n)return;e.resolved=r;let i=e.ctx;void 0!==s&&(i=i.slice(),i[s]=r);const a=t&&(e.current=t)(i);let l=!1;e.block&&(e.blocks?e.blocks.forEach(((t,n)=>{n!==o&&t&&(et(),st(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),nt())})):e.block.d(1),a.c(),ot(a,1),a.m(e.mount(),e.anchor),l=!0),e.block=a,e.blocks&&(e.blocks[o]=a),l&&Q()}if((s=t)&&"object"==typeof s&&"function"==typeof s.then){const n=W();if(t.then((t=>{A(n),o(e.then,1,e.value,t),A(null)}),(t=>{if(A(n),o(e.catch,2,e.error,t),A(null),!e.hasCatch)throw t})),e.current!==e.pending)return o(e.pending,0),!0}else{if(e.current!==e.then)return o(e.then,1,e.value,t),!0;e.resolved=t}var s}(t[12],o),{c(){e=T(),o.block.c()},m(t,s){E(t,e,s),o.block.m(t,o.anchor=s),o.mount=()=>e.parentNode,o.anchor=e,n=!0},p(e,[n]){!function(t,e,n){const o=e.slice(),{resolved:s}=t;t.current===t.then&&(o[t.value]=s),t.current===t.catch&&(o[t.error]=s),t.block.p(o,n)}(o,t=e,n)},i(t){n||(ot(o.block),n=!0)},o(t){for(let t=0;t<3;t+=1){st(o.blocks[t])}n=!1},d(t){t&&_(e),o.block.d(t),o.token=null,o=null}}}function Et(t,s,r){let{task:i}=s,{taskId:a}=s,{eventItem:l}=s,{followerEventId:c}=s,{followerTaskId:u}=s,{isStandalone:d}=s;const{Accordion:m,AccordionSection:$,Button:f,Divider:p}=e,g=i,v=l,b=n.getSchema(c||v._id);let h,y,k=g.task?.readonly,w=g.docId||g.id;c&&(y=w,w=void 0,h=v._id),o.subscribe((async t=>{t&&t.taskId===a&&n.getTaskqueue(null,t.taskId).then((({task:e})=>{r(3,g.status=e.status||t.status,g),r(3,g.readonly=e.readonly,g),g.readonly&&r(4,k=g.readonly)}))}));const x={New:w?"Eröffnet":"Neu",WaitingForApproval:"Zu visieren",Ready:"Bereit für nächsten Schritt",Waiting:"Wartet auf Verarbeitung",Closing:"Wartet auf Abschluss",Closed:"Abgeschlossen"};return t.$$set=t=>{"task"in t&&r(0,i=t.task),"taskId"in t&&r(1,a=t.taskId),"eventItem"in t&&r(15,l=t.eventItem),"followerEventId"in t&&r(16,c=t.followerEventId),"followerTaskId"in t&&r(17,u=t.followerTaskId),"isStandalone"in t&&r(2,d=t.isStandalone)},[i,a,d,g,k,w,h,y,m,$,f,p,b,()=>window.singleSpaNavigate("/"),t=>x[t]||"",l,c,u]}class _t extends dt{constructor(t){var e;super(),document.getElementById("svelte-3m9yjb-style")||((e=C("style")).id="svelte-3m9yjb-style",e.textContent=".subcat.svelte-3m9yjb .task--status.svelte-3m9yjb{width:100%;display:flex;gap:1em;margin:1.1em 0}.subcat.svelte-3m9yjb .task--status .task--status-title.svelte-3m9yjb{flex:0 1 40%}.subcat.svelte-3m9yjb .task--status .task--status-label.svelte-3m9yjb{flex:1}.subcat.svelte-3m9yjb .accordion-description.svelte-3m9yjb{margin:2em 0 1em 0}.subcat.svelte-3m9yjb .accordion-description .description.svelte-3m9yjb{margin-top:1em}.subcat.svelte-3m9yjb .accordion-description.svelte-3m9yjb .btn,.subcat.svelte-3m9yjb .accordion-description.svelte-3m9yjb .btn:hover,.subcat.svelte-3m9yjb .accordion-description.svelte-3m9yjb .btn:focus{padding:0;background:inherit}.description.svelte-3m9yjb.svelte-3m9yjb{font-style:italic;white-space:pre-wrap}.shortDescription.svelte-3m9yjb.svelte-3m9yjb{font-style:italic;margin-bottom:1em}",j(document.head,e)),ut(this,t,Et,jt,x,{task:0,taskId:1,eventItem:15,followerEventId:16,followerTaskId:17,isStandalone:2})}}const{document:Ct}=rt;function St(t){let e,n;return e=new t[12]({props:{disabled:!0,value:t[0].visum?.role||t[2]}}),{c(){at(e.$$.fragment)},m(t,o){lt(e,t,o),n=!0},p(t,n){const o={};5&n[0]&&(o.value=t[0].visum?.role||t[2]),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){st(e.$$.fragment,t),n=!1},d(t){ct(e,t)}}}function Ot(t){let e,n;return e=new t[12]({props:{disabled:!0,value:t[6]}}),{c(){at(e.$$.fragment)},m(t,o){lt(e,t,o),n=!0},p(t,n){const o={};64&n[0]&&(o.value=t[6]),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){st(e.$$.fragment,t),n=!1},d(t){ct(e,t)}}}function Bt(t){let e,n,o,s;return e=new t[13]({props:{noCalendar:!0,disabled:!0,value:t[5]}}),o=new t[14]({props:{inputClass:"visumTime",disabled:!0,value:t[5]}}),{c(){at(e.$$.fragment),n=B(),at(o.$$.fragment)},m(t,r){lt(e,t,r),E(t,n,r),lt(o,t,r),s=!0},p(t,n){const s={};32&n[0]&&(s.value=t[5]),e.$set(s);const r={};32&n[0]&&(r.value=t[5]),o.$set(r)},i(t){s||(ot(e.$$.fragment,t),ot(o.$$.fragment,t),s=!0)},o(t){st(e.$$.fragment,t),st(o.$$.fragment,t),s=!1},d(t){ct(e,t),t&&_(n),ct(o,t)}}}function Tt(t){let e,n,o=t[0].visum&&Bt(t);return{c(){o&&o.c(),e=T()},m(t,s){o&&o.m(t,s),E(t,e,s),n=!0},p(t,n){t[0].visum?o?(o.p(t,n),1&n[0]&&ot(o,1)):(o=Bt(t),o.c(),ot(o,1),o.m(e.parentNode,e)):o&&(et(),st(o,1,1,(()=>{o=null})),nt())},i(t){n||(ot(o),n=!0)},o(t){st(o),n=!1},d(t){o&&o.d(t),t&&_(e)}}}function Dt(t){let e,n,o,s,r,i,a,l,c,u;e=new t[16]({props:{text:"Infos aus Mailversand"}});let d=t[0].mailInfo.accepted?.length&&Nt(t),m=t[0].mailInfo.rejected?.length&&Pt(t);return r=new t[11]({props:{name:"Grösse inkl. Datei in Bytes",$$slots:{default:[Wt]},$$scope:{ctx:t}}}),a=new t[11]({props:{name:"Antwort vom Mailsystem",$$slots:{default:[Mt]},$$scope:{ctx:t}}}),c=new t[11]({props:{name:"Identifikation des Mailversands",$$slots:{default:[Vt]},$$scope:{ctx:t}}}),{c(){at(e.$$.fragment),n=B(),d&&d.c(),o=B(),m&&m.c(),s=B(),at(r.$$.fragment),i=B(),at(a.$$.fragment),l=B(),at(c.$$.fragment)},m(t,$){lt(e,t,$),E(t,n,$),d&&d.m(t,$),E(t,o,$),m&&m.m(t,$),E(t,s,$),lt(r,t,$),E(t,i,$),lt(a,t,$),E(t,l,$),lt(c,t,$),u=!0},p(t,e){t[0].mailInfo.accepted?.length?d?(d.p(t,e),1&e[0]&&ot(d,1)):(d=Nt(t),d.c(),ot(d,1),d.m(o.parentNode,o)):d&&(et(),st(d,1,1,(()=>{d=null})),nt()),t[0].mailInfo.rejected?.length?m?(m.p(t,e),1&e[0]&&ot(m,1)):(m=Pt(t),m.c(),ot(m,1),m.m(s.parentNode,s)):m&&(et(),st(m,1,1,(()=>{m=null})),nt());const n={};1&e[0]|32&e[1]&&(n.$$scope={dirty:e,ctx:t}),r.$set(n);const i={};1&e[0]|32&e[1]&&(i.$$scope={dirty:e,ctx:t}),a.$set(i);const l={};1&e[0]|32&e[1]&&(l.$$scope={dirty:e,ctx:t}),c.$set(l)},i(t){u||(ot(e.$$.fragment,t),ot(d),ot(m),ot(r.$$.fragment,t),ot(a.$$.fragment,t),ot(c.$$.fragment,t),u=!0)},o(t){st(e.$$.fragment,t),st(d),st(m),st(r.$$.fragment,t),st(a.$$.fragment,t),st(c.$$.fragment,t),u=!1},d(t){ct(e,t),t&&_(n),d&&d.d(t),t&&_(o),m&&m.d(t),t&&_(s),ct(r,t),t&&_(i),ct(a,t),t&&_(l),ct(c,t)}}}function Nt(t){let e,n;return e=new t[11]({props:{name:"versandt an",$$slots:{default:[zt]},$$scope:{ctx:t}}}),{c(){at(e.$$.fragment)},m(t,o){lt(e,t,o),n=!0},p(t,n){const o={};1&n[0]|32&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){st(e.$$.fragment,t),n=!1},d(t){ct(e,t)}}}function zt(t){let e,n;return e=new t[12]({props:{disabled:!0,value:t[0].mailInfo.accepted.join(", ")}}),{c(){at(e.$$.fragment)},m(t,o){lt(e,t,o),n=!0},p(t,n){const o={};1&n[0]&&(o.value=t[0].mailInfo.accepted.join(", ")),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){st(e.$$.fragment,t),n=!1},d(t){ct(e,t)}}}function Pt(t){let e,n;return e=new t[11]({props:{name:"nicht versandt an",$$slots:{default:[At]},$$scope:{ctx:t}}}),{c(){at(e.$$.fragment)},m(t,o){lt(e,t,o),n=!0},p(t,n){const o={};1&n[0]|32&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){st(e.$$.fragment,t),n=!1},d(t){ct(e,t)}}}function At(t){let e,n;return e=new t[12]({props:{disabled:!0,value:t[0].mailInfo.rejected.join(", ")}}),{c(){at(e.$$.fragment)},m(t,o){lt(e,t,o),n=!0},p(t,n){const o={};1&n[0]&&(o.value=t[0].mailInfo.rejected.join(", ")),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){st(e.$$.fragment,t),n=!1},d(t){ct(e,t)}}}function Wt(t){let e,n;return e=new t[12]({props:{disabled:!0,value:t[0].mailInfo.messageSize}}),{c(){at(e.$$.fragment)},m(t,o){lt(e,t,o),n=!0},p(t,n){const o={};1&n[0]&&(o.value=t[0].mailInfo.messageSize),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){st(e.$$.fragment,t),n=!1},d(t){ct(e,t)}}}function Mt(t){let e,n;return e=new i({props:{disabled:!0,value:t[0].mailInfo.response}}),{c(){at(e.$$.fragment)},m(t,o){lt(e,t,o),n=!0},p(t,n){const o={};1&n[0]&&(o.value=t[0].mailInfo.response),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){st(e.$$.fragment,t),n=!1},d(t){ct(e,t)}}}function Vt(t){let e,n;return e=new t[12]({props:{disabled:!0,value:t[0].mailInfo.messageId}}),{c(){at(e.$$.fragment)},m(t,o){lt(e,t,o),n=!0},p(t,n){const o={};1&n[0]&&(o.value=t[0].mailInfo.messageId),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){st(e.$$.fragment,t),n=!1},d(t){ct(e,t)}}}function qt(t){let e,n;return e=new t[15]({props:{filled:!0,disabled:t[1]||t[8],$$slots:{default:[Rt]},$$scope:{ctx:t}}}),e.$on("click",t[20]),{c(){at(e.$$.fragment)},m(t,o){lt(e,t,o),n=!0},p(t,n){const o={};258&n[0]&&(o.disabled=t[1]||t[8]),128&n[0]|32&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){st(e.$$.fragment,t),n=!1},d(t){ct(e,t)}}}function Gt(t){let e,n;return e=new t[15]({props:{filled:!0,danger:!0,$$slots:{default:[Ft]},$$scope:{ctx:t}}}),e.$on("click",t[21]),{c(){at(e.$$.fragment)},m(t,o){lt(e,t,o),n=!0},p(t,n){const o={};32&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){st(e.$$.fragment,t),n=!1},d(t){ct(e,t)}}}function Rt(t){let e;return{c(){e=O(t[7])},m(t,n){E(t,e,n)},p(t,n){128&n[0]&&N(e,t[7])},d(t){t&&_(e)}}}function Ft(t){let e;return{c(){e=O("Visum zurücknehmen")},m(t,n){E(t,e,n)},d(t){t&&_(e)}}}function Yt(t){let e;return{c(){e=O("Abbrechen")},m(t,n){E(t,e,n)},d(t){t&&_(e)}}}function Jt(t){let e;return{c(){e=O("Ja, bitte visieren")},m(t,n){E(t,e,n)},d(t){t&&_(e)}}}function Lt(t){let e,n,o,s,r,i,a;return s=new t[15]({props:{filled:!0,$$slots:{default:[Yt]},$$scope:{ctx:t}}}),s.$on("click",t[30]),i=new t[15]({props:{danger:!0,outline:!0,$$slots:{default:[Jt]},$$scope:{ctx:t}}}),i.$on("click",t[23]),{c(){e=C("p"),e.textContent="Willst du den Vorgang jetzt visieren?",n=B(),o=C("div"),at(s.$$.fragment),r=B(),at(i.$$.fragment),D(o,"class","flex_div svelte-s8a1g4")},m(t,l){E(t,e,l),E(t,n,l),E(t,o,l),lt(s,o,null),j(o,r),lt(i,o,null),a=!0},p(t,e){const n={};32&e[1]&&(n.$$scope={dirty:e,ctx:t}),s.$set(n);const o={};32&e[1]&&(o.$$scope={dirty:e,ctx:t}),i.$set(o)},i(t){a||(ot(s.$$.fragment,t),ot(i.$$.fragment,t),a=!0)},o(t){st(s.$$.fragment,t),st(i.$$.fragment,t),a=!1},d(t){t&&_(e),t&&_(n),t&&_(o),ct(s),ct(i)}}}function Kt(t){let e,n,o;return n=new ft({props:{size:"25"}}),{c(){e=C("div"),at(n.$$.fragment),D(e,"slot","title-icon")},m(t,s){E(t,e,s),lt(n,e,null),o=!0},p:b,i(t){o||(ot(n.$$.fragment,t),o=!0)},o(t){st(n.$$.fragment,t),o=!1},d(t){t&&_(e),ct(n)}}}function Zt(t){let e,n;return e=new t[10]({props:{title:"Bestätigung",closeCallback:t[35],danger:!0,$$slots:{"title-icon":[Kt],default:[Lt]},$$scope:{ctx:t}}}),{c(){at(e.$$.fragment)},m(t,o){lt(e,t,o),n=!0},p(t,n){const o={};16&n[1]&&(o.closeCallback=t[35]),32&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){st(e.$$.fragment,t),n=!1},d(t){ct(e,t)}}}function Ht(t){let e;return{c(){e=O("Abbrechen")},m(t,n){E(t,e,n)},d(t){t&&_(e)}}}function Qt(t){let e;return{c(){e=O("Ja, bitte zurücknehmen")},m(t,n){E(t,e,n)},d(t){t&&_(e)}}}function Ut(t){let e,n,o,s,r,i,a;return s=new t[15]({props:{filled:!0,$$slots:{default:[Ht]},$$scope:{ctx:t}}}),s.$on("click",t[32]),i=new t[15]({props:{danger:!0,outline:!0,$$slots:{default:[Qt]},$$scope:{ctx:t}}}),i.$on("click",t[24]),{c(){e=C("p"),e.textContent="Willst du das Visum zurücknehmen?",n=B(),o=C("div"),at(s.$$.fragment),r=B(),at(i.$$.fragment),D(o,"class","flex_div svelte-s8a1g4")},m(t,l){E(t,e,l),E(t,n,l),E(t,o,l),lt(s,o,null),j(o,r),lt(i,o,null),a=!0},p(t,e){const n={};32&e[1]&&(n.$$scope={dirty:e,ctx:t}),s.$set(n);const o={};32&e[1]&&(o.$$scope={dirty:e,ctx:t}),i.$set(o)},i(t){a||(ot(s.$$.fragment,t),ot(i.$$.fragment,t),a=!0)},o(t){st(s.$$.fragment,t),st(i.$$.fragment,t),a=!1},d(t){t&&_(e),t&&_(n),t&&_(o),ct(s),ct(i)}}}function Xt(t){let e,n,o;return n=new ft({props:{size:"25"}}),{c(){e=C("div"),at(n.$$.fragment),D(e,"slot","title-icon")},m(t,s){E(t,e,s),lt(n,e,null),o=!0},p:b,i(t){o||(ot(n.$$.fragment,t),o=!0)},o(t){st(n.$$.fragment,t),o=!1},d(t){t&&_(e),ct(n)}}}function te(t){let e,n;return e=new t[10]({props:{title:"Bestätigung",closeCallback:t[35],danger:!0,$$slots:{"title-icon":[Xt],default:[Ut]},$$scope:{ctx:t}}}),{c(){at(e.$$.fragment)},m(t,o){lt(e,t,o),n=!0},p(t,n){const o={};16&n[1]&&(o.closeCallback=t[35]),32&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){st(e.$$.fragment,t),n=!1},d(t){ct(e,t)}}}function ee(t){let e,n,o;return n=new t[18]({props:{outline:!0,$$slots:{default:[ne]},$$scope:{ctx:t}}}),{c(){e=C("div"),at(n.$$.fragment),z(e,"margin-top","1em")},m(t,s){E(t,e,s),lt(n,e,null),o=!0},i(t){o||(ot(n.$$.fragment,t),o=!0)},o(t){st(n.$$.fragment,t),o=!1},d(t){t&&_(e),ct(n)}}}function ne(t){let e,n,o;return n=new t[17]({}),{c(){e=O("Bitte warten!\n"),at(n.$$.fragment)},m(t,s){E(t,e,s),lt(n,t,s),o=!0},i(t){o||(ot(n.$$.fragment,t),o=!0)},o(t){st(n.$$.fragment,t),o=!1},d(t){t&&_(e),ct(n,t)}}}function oe(t){let e,n,o,s,r,i,a,l,c,u,d,m,$,f,p,g,v,h,y,k,w,x,I=t[19]&&function(t){let e;return{c(){e=C("div"),e.textContent=`${t[19]}`,D(e,"class","description svelte-s8a1g4")},m(t,n){E(t,e,n)},p:b,d(t){t&&_(e)}}}(t);r=new t[11]({props:{name:"Rolle",$$slots:{default:[St]},$$scope:{ctx:t}}}),a=new t[11]({props:{name:"visiert von",$$slots:{default:[Ot]},$$scope:{ctx:t}}}),c=new t[11]({props:{name:"visiert am",$$slots:{default:[Tt]},$$scope:{ctx:t}}});let S=t[0].mailInfo&&Dt(t);const O=[Gt,qt],N=[];function z(t,e){return t[0].visum?0:1}function P(e){t[31](e)}m=z(t),$=N[m]=O[m](t);let A={$$slots:{default:[Zt,({closeCallback:t})=>({35:t}),({closeCallback:t})=>[0,t?16:0]]},$$scope:{ctx:t}};function W(e){t[33](e)}void 0!==t[3]&&(A.open=t[3]),p=new t[9]({props:A}),V.push((()=>it(p,"open",P)));let M={$$slots:{default:[te,({closeCallback:t})=>({35:t}),({closeCallback:t})=>[0,t?16:0]]},$$scope:{ctx:t}};void 0!==t[4]&&(M.open=t[4]),h=new t[9]({props:M}),V.push((()=>it(h,"open",W)));let q=t[8]&&ee(t);return{c(){e=C("h3"),e.textContent="Visum bearbeiten",n=B(),o=C("div"),I&&I.c(),s=B(),at(r.$$.fragment),i=B(),at(a.$$.fragment),l=B(),at(c.$$.fragment),u=B(),S&&S.c(),d=B(),$.c(),f=B(),at(p.$$.fragment),v=B(),at(h.$$.fragment),k=B(),q&&q.c(),w=T(),D(o,"class","visum svelte-s8a1g4")},m(t,$){E(t,e,$),E(t,n,$),E(t,o,$),I&&I.m(o,null),j(o,s),lt(r,o,null),j(o,i),lt(a,o,null),j(o,l),lt(c,o,null),j(o,u),S&&S.m(o,null),j(o,d),N[m].m(o,null),E(t,f,$),lt(p,t,$),E(t,v,$),lt(h,t,$),E(t,k,$),q&&q.m(t,$),E(t,w,$),x=!0},p(t,e){t[19]&&I.p(t,e);const n={};5&e[0]|32&e[1]&&(n.$$scope={dirty:e,ctx:t}),r.$set(n);const s={};64&e[0]|32&e[1]&&(s.$$scope={dirty:e,ctx:t}),a.$set(s);const i={};33&e[0]|32&e[1]&&(i.$$scope={dirty:e,ctx:t}),c.$set(i),t[0].mailInfo?S?(S.p(t,e),1&e[0]&&ot(S,1)):(S=Dt(t),S.c(),ot(S,1),S.m(o,d)):S&&(et(),st(S,1,1,(()=>{S=null})),nt());let l=m;m=z(t),m===l?N[m].p(t,e):(et(),st(N[l],1,1,(()=>{N[l]=null})),nt(),$=N[m],$?$.p(t,e):($=N[m]=O[m](t),$.c()),ot($,1),$.m(o,null));const u={};48&e[1]&&(u.$$scope={dirty:e,ctx:t}),!g&&8&e[0]&&(g=!0,u.open=t[3],K((()=>g=!1))),p.$set(u);const f={};48&e[1]&&(f.$$scope={dirty:e,ctx:t}),!y&&16&e[0]&&(y=!0,f.open=t[4],K((()=>y=!1))),h.$set(f),t[8]?q?256&e[0]&&ot(q,1):(q=ee(t),q.c(),ot(q,1),q.m(w.parentNode,w)):q&&(et(),st(q,1,1,(()=>{q=null})),nt())},i(t){x||(ot(r.$$.fragment,t),ot(a.$$.fragment,t),ot(c.$$.fragment,t),ot(S),ot($),ot(p.$$.fragment,t),ot(h.$$.fragment,t),ot(q),x=!0)},o(t){st(r.$$.fragment,t),st(a.$$.fragment,t),st(c.$$.fragment,t),st(S),st($),st(p.$$.fragment,t),st(h.$$.fragment,t),st(q),x=!1},d(t){t&&_(e),t&&_(n),t&&_(o),I&&I.d(),ct(r),ct(a),ct(c),S&&S.d(),N[m].d(),t&&_(f),ct(p,t),t&&_(v),ct(h,t),t&&_(k),q&&q.d(t),t&&_(w)}}}function se(t,i,l){let c,u;I(t,s,(t=>l(28,c=t))),I(t,r,(t=>l(29,u=t)));const{Modal:d,Dialog:m,FormField:$,TextField:f,DatePicker:p,TimePicker:g,Button:v,Divider:b,Loading:h,Chip:y}=e;let k,w,x,j,E,_,C,{task:S}=i,{taskId:O}=i,{eventItem:B}=i,T=!1,D=!1;const N=B.output.approval[0].description||"",z=()=>{l(3,T=!1)};o.subscribe((t=>{t&&t.taskId===O&&(l(0,S.visum=t.data,S),l(0,S.status=t.status,S))}));return t.$$set=t=>{"task"in t&&l(0,S=t.task),"taskId"in t&&l(25,O=t.taskId),"eventItem"in t&&l(26,B=t.eventItem)},t.$$.update=()=>{1006632967&t.$$.dirty[0]&&(l(5,w=new Date(S.visum?.timeStamp)),l(7,j=S.visum?"Visum erfolgreich erstellt":"Jetzt visieren"),l(27,E=!S.visum),l(27,E=E&&!!B.output?.approval?.length),E&&c&&(l(2,_=B.output.approval.flatMap((({refRole:t})=>t))),l(27,E=_.some((t=>c.some((e=>t===e)))))),l(1,k=!E),l(6,x=S.visum?.user||(k?"":u.email)),J().then((()=>{const t=document.getElementsByClassName("visumTime")[0];t&&(t.disabled=!0)})))},[S,k,_,T,D,w,x,j,C,d,m,$,f,p,g,v,b,h,y,N,()=>{l(3,T=!0)},()=>{l(4,D=!0)},z,()=>{l(3,T=!1);const t={eventId:B._id,eventDesignation:B.identity.designation,docId:S.docId,role:_.filter((t=>c.find((e=>e===t)))).join(", "),user:u.email,timeStamp:(new Date).toISOString()};l(8,C=!0),n.setTaskVisum(S._id,t).then((e=>{e.taskId?(l(0,S.visum=t,S),window.singleSpaNavigate(`/task/${B._id}/${S._id}/task`)):a.failed("Das Visum konnte ncht gesetzt werden!",3e3)})).finally((()=>l(8,C=!1)))},()=>{l(4,D=!1),n.deleteTaskVisum(S._id,B._id).then((t=>{!1!==t.status?(l(0,S.visum=!1,S),window.singleSpaNavigate(`/task/${B._id}/${S._id}/task`)):a.failed("Das Visum konnte ncht zurück genommen werden!",3e3)}))},O,B,E,c,u,()=>z(),function(t){T=t,l(3,T)},()=>z(),function(t){D=t,l(4,D)}]}class re extends dt{constructor(t){var e;super(),Ct.getElementById("svelte-s8a1g4-style")||((e=C("style")).id="svelte-s8a1g4-style",e.textContent=".visum .time-picker .dropdown{display:none !important}.visum .form-field{margin-bottom:1em !important}.flex_div.svelte-s8a1g4.svelte-s8a1g4{display:flex;margin-top:1em;gap:0.5em;justify-content:space-between}div.visum.svelte-s8a1g4 div.description.svelte-s8a1g4{font-family:inherit;font-size:inherit;width:100%;min-height:2em;line-height:1.25em;margin-top:1em;margin-bottom:1.5em}",j(Ct.head,e)),ut(this,t,se,oe,x,{task:0,taskId:25,eventItem:26},[-1,-1])}}const ie=[];const ae=t("taskClipboard",function(t,e=b){let n;const o=[];function s(e){if(x(t,e)&&(t=e,n)){const e=!ie.length;for(let e=0;e<o.length;e+=1){const n=o[e];n[1](),ie.push(n,t)}if(e){for(let t=0;t<ie.length;t+=2)ie[t][0](ie[t+1]);ie.length=0}}}return{set:s,update:function(e){s(e(t))},subscribe:function(r,i=b){const a=[r,i];return o.push(a),1===o.length&&(n=e(s)||b),r(t),()=>{const t=o.indexOf(a);-1!==t&&o.splice(t,1),0===o.length&&(n(),n=null)}}}}(!1)),{document:le}=rt;function ce(t){let e,n,o,s,r,i,a,l,c=t[8](t[27],!!t[28]||t[0]===t[22])+"";n=new t[3]({props:{name:"menu",items:t[25],value:t[26].name,class:"task--tabs",tabClass:"menuTab"}}),n.$on("change",(function(){w(t[7](t[31],t[23],t[22],t[28],t[29]))&&t[7](t[31],t[23],t[22],t[28],t[29]).apply(this,arguments)}));var u=t[26].component;function d(t){return{props:{taskId:t[23],task:t[30],eventItem:t[27],followerEventId:t[28],isStandalone:t[4]}}}return u&&(a=new u(d(t)),a.$on("back",t[9])),{c(){e=C("div"),at(n.$$.fragment),o=B(),s=O(c),r=B(),i=C("div"),a&&at(a.$$.fragment),D(e,"class","task--header svelte-kw8mxg"),D(i,"class","task--content svelte-kw8mxg")},m(t,c){E(t,e,c),lt(n,e,null),j(e,o),j(e,s),E(t,r,c),E(t,i,c),a&&lt(a,i,null),l=!0},p(e,o){t=e;const r={};33554432&o[0]&&(r.items=t[25]),67108864&o[0]&&(r.value=t[26].name),n.$set(r),(!l||406847489&o[0])&&c!==(c=t[8](t[27],!!t[28]||t[0]===t[22])+"")&&N(s,c);const m={};if(8388608&o[0]&&(m.taskId=t[23]),1073741824&o[0]&&(m.task=t[30]),134217728&o[0]&&(m.eventItem=t[27]),268435456&o[0]&&(m.followerEventId=t[28]),u!==(u=t[26].component)){if(a){et();const t=a;st(t.$$.fragment,1,0,(()=>{ct(t,1)})),nt()}u?(a=new u(d(t)),a.$on("back",t[9]),at(a.$$.fragment),ot(a.$$.fragment,1),lt(a,i,null)):a=null}else u&&a.$set(m)},i(t){l||(ot(n.$$.fragment,t),a&&ot(a.$$.fragment,t),l=!0)},o(t){st(n.$$.fragment,t),a&&st(a.$$.fragment,t),l=!1},d(t){t&&_(e),ct(n),t&&_(r),t&&_(i),a&&ct(a)}}}function ue(t){let e,n,o;return n=new t[2]({props:{constrainWidth:!0,title:t[21],titleClass:"task_title",closeCallback:t[10],class:"task--area",$$slots:{default:[ce]},$$scope:{ctx:t}}}),{c(){e=C("div"),at(n.$$.fragment),D(e,"class","task svelte-kw8mxg")},m(t,s){E(t,e,s),lt(n,e,null),o=!0},p(t,e){const o={};2097152&e[0]&&(o.title=t[21]),2126512129&e[0]|5&e[1]&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(ot(n.$$.fragment,t),o=!0)},o(t){st(n.$$.fragment,t),o=!1},d(t){t&&_(e),ct(n)}}}function de(t){let e,n,o;return n=new t[1]({props:{open:"true",noClickaway:"true",class:"task--modal",$$slots:{default:[ue,({closeCallback:t})=>({32:t}),({closeCallback:t})=>[0,t?2:0]]},$$scope:{ctx:t}}}),n.$on("change",t[6]),{c(){e=C("div"),at(n.$$.fragment),D(e,"class","task--page svelte-kw8mxg")},m(t,s){E(t,e,s),lt(n,e,null),o=!0},p(t,e){const o={};2128609281&e[0]|5&e[1]&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(ot(n.$$.fragment,t),o=!0)},o(t){st(n.$$.fragment,t),o=!1},d(t){t&&_(e),ct(n)}}}function me(t){let e,n,o;return n=new l({props:{update:t[5],$$slots:{default:[de,({prop:{title:t,eventId:e,taskId:n,tabId:o,items:s,item:r,eventItem:i,followerEventId:a,followerTaskId:l,task:c,findMenu:u}})=>({21:t,22:e,23:n,24:o,25:s,26:r,27:i,28:a,29:l,30:c,31:u}),({prop:t})=>[(t?2097152:0)|(t?4194304:0)|(t?8388608:0)|(t?16777216:0)|(t?33554432:0)|(t?67108864:0)|(t?134217728:0)|(t?268435456:0)|(t?536870912:0)|(t?1073741824:0),t?1:0]]},$$scope:{ctx:t}}}),{c(){e=B(),at(n.$$.fragment),le.title="enablerr - Task"},m(t,s){E(t,e,s),lt(n,t,s),o=!0},p(t,e){const o={};2128609281&e[0]|5&e[1]&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(ot(n.$$.fragment,t),o=!0)},o(t){st(n.$$.fragment,t),o=!1},d(t){t&&_(e),ct(n,t)}}}function $e(t,o,s){let r;I(t,ae,(t=>s(16,r=t)));const{Modal:i,Dialog:a,Tabs:l}=e;let c;const $=-1!==window.location.search.indexOf("view=standalone");let f,p,g;const v={items:[{id:"task",name:"Aufgabe",component:_t},{id:"visum",name:"Visum",component:re},{id:"collab",name:"Kommunikation",component:m},{id:"workflow",name:"Workflow",component:u},{id:"report",name:"Anhänge",component:d}],findBy(t,e){return this.items.find((n=>n[t]===e))},findByName(t){return this.findBy("name",t)},findById(t){return this.findBy("id",t)},deflt(){return this.items[0]},map(){return this.items.map((t=>t.name))}},b=()=>{scrollY=window.scrollY,f=document.body.style.position,p=document.body.style.overflow,g=document.body.style.width,document.body.style.position="fixed",document.body.style.top=`-${scrollY}px`,document.body.style.overflow="hidden",document.body.style.width="100%"};b();const h=(t,e,n)=>window.singleSpaNavigate(`/task/${t}/${e}/${n.id}`);!function(t){W().$$.on_destroy.push(t)}((()=>{document.body.style.position="inherit",document.body.style.overflow="auto",document.title="enablerr - Dashboard"})),function(t){W().$$.on_mount.push(t)}((()=>{!function(t,e,n=e){t.set(n)}(ae,r=!1,r)}));return[c,i,a,l,$,async(t,e,o,r)=>{const i=v.findById(o);if(!i)return h(t,e,v.deflt());"task"!==o&&(r=void 0),s(0,c=e);let a={status:"New"};const l=await n.getEvent(t);l||window.singleSpaNavigate("/error");let u=l.identity.designation,d="";if(r?.includes(":")&&([r,d]=r.split(":")),r){const t=await n.getEvent(r);t||window.singleSpaNavigate("/error"),u+=" => "+t.identity.designation}return e!==t?(a=await n.getTaskById(e,"task"===o||"visum"===o),a||window.singleSpaNavigate("/error"),a.event!==l._id.toString()&&(l._id=a.event)):e=void 0,{title:u,eventId:t,taskId:e,tabId:o,item:i,eventItem:l,followerEventId:r,followerTaskId:d,task:a,items:v.map(),findMenu:t=>v.findByName(t)}},function(t){t.detail.value?b():(document.body.style.position=f||"",document.body.style.top="",document.body.style.overflow=p||"",document.body.style.width=g||"",window.scrollTo(0,scrollY))},(t,e,n,o)=>({detail:{value:s}})=>{o||h(n,e,t(s))},(t,e)=>{let n=!t.output?.approval;return J().then((()=>{Array.from(document.getElementsByClassName("menuTab")).map(((t,o)=>{o&&(t.querySelector("input").disabled=e),1===o&&(t.querySelector("input").disabled=e||n)}))})),""},function(e){!function(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t(e)))}(t,e)},()=>$?window.close():window.singleSpaNavigate("/")]}class fe extends dt{constructor(t){var e;super(),le.getElementById("svelte-kw8mxg-style")||((e=C("style")).id="svelte-kw8mxg-style",e.textContent='.task--page.svelte-kw8mxg .task--modal{align-items:flex-start !important;overflow:auto !important}.task.svelte-kw8mxg{margin-top:4em}@media(max-height: 900px){.task.svelte-kw8mxg{margin-top:0}}.task.svelte-kw8mxg .task--area{overflow-x:hidden;overflow-y:auto;min-width:50vw}.task.svelte-kw8mxg .dialog nav[role="group"]{display:flex;justify-content:flex-start;flex-direction:row;flex-wrap:nowrap;gap:1em}.task--header.svelte-kw8mxg{margin-top:0.5em}.task--header.svelte-kw8mxg .task_tabs{margin-bottom:1em}.task--content.svelte-kw8mxg{margin-top:1em;height:fit-content;min-height:40vh;max-height:90vh}',j(le.head,e)),ut(this,t,$e,me,x,{},[-1,-1])}}const pe=v({component:fe,domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:ge,mount:ve,unmount:be}=pe;t({bootstrap:ge,mount:ve,unmount:be});t("Task",fe)}}}));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@enablerr-ui/task",
3
3
  "description": "enablerr - the Next Enterprise Solution",
4
- "version": "0.2.99",
4
+ "version": "0.2.101",
5
5
  "os": [
6
6
  "darwin",
7
7
  "linux"