@enablerr-ui/detail 0.2.198 → 0.2.199
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.min.js +1 -1
- package/package.json +1 -1
package/dist/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["@enablerr-ui/form","@enablerr-ui/layout"],(function(e){"use strict";var t,n,o,s,r,i,l,a,c;return{setters:[function(e){t=e.Request,n=e.task_notification,o=e.TextArea,s=e.Storage,r=e.toasts,i=e.settings,l=e.currentRoles,a=e.Page},function(e){c=e.getAttractions}],execute:function(){e("version","0.2.198");const d=e("checkDate",((e,t)=>"string"!=typeof e||e.length<20||!(t=e.split(" · "))?e:t.map((e=>2===e.split("T").length&&3===e.split("T")[0].split("-").length?new Date(e).toLocaleDateString():e)).filter((e=>!!e)).join(" · "))),u=e=>{try{return new Date(e).toLocaleString()}catch{return e}},m=(e,t)=>{const n={...t};return(e.display?.reduce(((t,o)=>{let[s,r]=o.split(".");if(e.list?.find((({name:e})=>e===s))&&r&&void 0!==n[s]){const e=`${s}_${r}`;n[e]=n[s][r],s=e}return t.find((e=>e===s))||t.push(s),t}),[]).map((e=>d(n["_"+e]||n[e])))||e.items.map((e=>"object"===e.type?t["_"+e.name]:"list"===e.type?"":t[e.name]))).map((e=>e?.split(" · ").filter((e=>!!e)).join(" · "))).filter((e=>!!e)).join(" • ")};function f(){}function p(e){return e()}function $(){return Object.create(null)}function g(e){e.forEach(p)}function h(e){return"function"==typeof e}function v(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function b(e,t,n){e.$$.on_destroy.push(function(e,...t){if(null==e)return f;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function y(e){return null==e?"":e}function w(e,t){e.appendChild(t)}function x(e,t,n){e.insertBefore(t,n||null)}function k(e){e.parentNode.removeChild(e)}function I(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function F(e){return document.createElement(e)}function _(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function S(e){return document.createTextNode(e)}function E(){return S(" ")}function C(){return S("")}function D(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function N(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function O(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function j(e,t){e.value=null==t?"":t}function z(e,t,n,o){e.style.setProperty(t,n,o?"important":"")}function L(e,t,n){e.classList[n?"add":"remove"](t)}let P;function M(e){P=e}function T(){if(!P)throw new Error("Function called outside component initialization");return P}function B(e){T().$$.on_mount.push(e)}function A(){const e=T();return(t,n)=>{const o=e.$$.callbacks[t];if(o){const s=function(e,t){const n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!1,t),n}(t,n);o.slice().forEach((t=>{t.call(e,s)}))}}}function q(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e(t)))}const W=[],H=[],R=[],Y=[],G=Promise.resolve();let V=!1;function J(e){R.push(e)}function U(e){Y.push(e)}let K=!1;const Q=new Set;function X(){if(!K){K=!0;do{for(let e=0;e<W.length;e+=1){const t=W[e];M(t),Z(t.$$)}for(M(null),W.length=0;H.length;)H.pop()();for(let e=0;e<R.length;e+=1){const t=R[e];Q.has(t)||(Q.add(t),t())}R.length=0}while(W.length);for(;Y.length;)Y.pop()();V=!1,K=!1,Q.clear()}}function Z(e){if(null!==e.fragment){e.update(),g(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(J)}}const ee=new Set;let te;function ne(){te={r:0,c:[],p:te}}function oe(){te.r||g(te.c),te=te.p}function se(e,t){e&&e.i&&(ee.delete(e),e.i(t))}function re(e,t,n,o){if(e&&e.o){if(ee.has(e))return;ee.add(e),te&&te.c.push((()=>{ee.delete(e),o&&(n&&e.d(1),o())})),e.o(t)}}function ie(e,t){const n=t.token={};function o(e,o,s,r){if(t.token!==n)return;t.resolved=r;let i=t.ctx;void 0!==s&&(i=i.slice(),i[s]=r);const l=e&&(t.current=e)(i);let a=!1;t.block&&(t.blocks?t.blocks.forEach(((e,n)=>{n!==o&&e&&(ne(),re(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),oe())})):t.block.d(1),l.c(),se(l,1),l.m(t.mount(),t.anchor),a=!0),t.block=l,t.blocks&&(t.blocks[o]=l),a&&X()}if((s=e)&&"object"==typeof s&&"function"==typeof s.then){const n=T();if(e.then((e=>{M(n),o(t.then,1,t.value,e),M(null)}),(e=>{if(M(n),o(t.catch,2,t.error,e),M(null),!t.hasCatch)throw e})),t.current!==t.pending)return o(t.pending,0),!0}else{if(t.current!==t.then)return o(t.then,1,t.value,e),!0;t.resolved=e}var s}function le(e,t,n){const o=t.slice(),{resolved:s}=e;e.current===e.then&&(o[e.value]=s),e.current===e.catch&&(o[e.error]=s),e.block.p(o,n)}const ae="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function ce(e,t,n){const o=e.$$.props[t];void 0!==o&&(e.$$.bound[o]=n,n(e.$$.ctx[o]))}function de(e){e&&e.c()}function ue(e,t,n,o){const{fragment:s,on_mount:r,on_destroy:i,after_update:l}=e.$$;s&&s.m(t,n),o||J((()=>{const t=r.map(p).filter(h);i?i.push(...t):g(t),e.$$.on_mount=[]})),l.forEach(J)}function me(e,t){const n=e.$$;null!==n.fragment&&(g(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function fe(e,t){-1===e.$$.dirty[0]&&(W.push(e),V||(V=!0,G.then(X)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function pe(e,t,n,o,s,r,i=[-1]){const l=P;M(e);const a=e.$$={fragment:null,ctx:null,props:r,update:f,not_equal:s,bound:$(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(l?l.$$.context:t.context||[]),callbacks:$(),dirty:i,skip_bound:!1};let c=!1;if(a.ctx=n?n(e,t.props||{},((t,n,...o)=>{const r=o.length?o[0]:n;return a.ctx&&s(a.ctx[t],a.ctx[t]=r)&&(!a.skip_bound&&a.bound[t]&&a.bound[t](r),c&&fe(e,t)),n})):[],a.update(),c=!0,g(a.before_update),a.fragment=!!o&&o(a.ctx),t.target){if(t.hydrate){const e=function(e){return Array.from(e.childNodes)}(t.target);a.fragment&&a.fragment.l(e),e.forEach(k)}else a.fragment&&a.fragment.c();t.intro&&se(e.$$.fragment),ue(e,t.target,t.anchor,t.customElement),X()}M(l)}class $e{$destroy(){me(this,1),this.$destroy=f}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function ge(e){let t,n,o,s;return{c(){t=_("svg"),n=_("polyline"),o=_("path"),N(n,"points","9 10 4 15 9 20"),N(o,"d","M20 4v7a4 4 0 0 1-4 4H4"),N(t,"xmlns","http://www.w3.org/2000/svg"),N(t,"width",e[0]),N(t,"height",e[0]),N(t,"fill","none"),N(t,"viewBox","0 0 24 24"),N(t,"stroke","currentColor"),N(t,"stroke-width",e[1]),N(t,"stroke-linecap","round"),N(t,"stroke-linejoin","round"),N(t,"class",s="feather feather-corner-down-left "+e[2])},m(e,s){x(e,t,s),w(t,n),w(t,o)},p(e,[n]){1&n&&N(t,"width",e[0]),1&n&&N(t,"height",e[0]),2&n&&N(t,"stroke-width",e[1]),4&n&&s!==(s="feather feather-corner-down-left "+e[2])&&N(t,"class",s)},i:f,o:f,d(e){e&&k(t)}}}function he(e,t,n){let{size:o="100%"}=t,{strokeWidth:s=2}=t,{class:r=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,s=e.strokeWidth),"class"in e&&n(2,r=e.class)},[o,s,r]}class ve extends $e{constructor(e){super(),pe(this,e,he,ge,v,{size:0,strokeWidth:1,class:2})}}function be(e){let t,n,o,s,r;return{c(){t=_("svg"),n=_("path"),o=_("line"),s=_("line"),N(n,"d","M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"),N(o,"x1","18"),N(o,"y1","9"),N(o,"x2","12"),N(o,"y2","15"),N(s,"x1","12"),N(s,"y1","9"),N(s,"x2","18"),N(s,"y2","15"),N(t,"xmlns","http://www.w3.org/2000/svg"),N(t,"width",e[0]),N(t,"height",e[0]),N(t,"fill","none"),N(t,"viewBox","0 0 24 24"),N(t,"stroke","currentColor"),N(t,"stroke-width",e[1]),N(t,"stroke-linecap","round"),N(t,"stroke-linejoin","round"),N(t,"class",r="feather feather-delete "+e[2])},m(e,r){x(e,t,r),w(t,n),w(t,o),w(t,s)},p(e,[n]){1&n&&N(t,"width",e[0]),1&n&&N(t,"height",e[0]),2&n&&N(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-delete "+e[2])&&N(t,"class",r)},i:f,o:f,d(e){e&&k(t)}}}function ye(e,t,n){let{size:o="100%"}=t,{strokeWidth:s=2}=t,{class:r=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,s=e.strokeWidth),"class"in e&&n(2,r=e.class)},[o,s,r]}class we extends $e{constructor(e){super(),pe(this,e,ye,be,v,{size:0,strokeWidth:1,class:2})}}function xe(e){let t,n,o,s;return{c(){t=_("svg"),n=_("path"),o=_("path"),N(n,"d","M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"),N(o,"d","M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"),N(t,"xmlns","http://www.w3.org/2000/svg"),N(t,"width",e[0]),N(t,"height",e[0]),N(t,"fill","none"),N(t,"viewBox","0 0 24 24"),N(t,"stroke","currentColor"),N(t,"stroke-width",e[1]),N(t,"stroke-linecap","round"),N(t,"stroke-linejoin","round"),N(t,"class",s="feather feather-edit "+e[2])},m(e,s){x(e,t,s),w(t,n),w(t,o)},p(e,[n]){1&n&&N(t,"width",e[0]),1&n&&N(t,"height",e[0]),2&n&&N(t,"stroke-width",e[1]),4&n&&s!==(s="feather feather-edit "+e[2])&&N(t,"class",s)},i:f,o:f,d(e){e&&k(t)}}}function ke(e,t,n){let{size:o="100%"}=t,{strokeWidth:s=2}=t,{class:r=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,s=e.strokeWidth),"class"in e&&n(2,r=e.class)},[o,s,r]}class Ie extends $e{constructor(e){super(),pe(this,e,ke,xe,v,{size:0,strokeWidth:1,class:2})}}function Fe(e){let t,n,o,s;return{c(){t=_("svg"),n=_("circle"),o=_("line"),N(n,"cx","11"),N(n,"cy","11"),N(n,"r","8"),N(o,"x1","21"),N(o,"y1","21"),N(o,"x2","16.65"),N(o,"y2","16.65"),N(t,"xmlns","http://www.w3.org/2000/svg"),N(t,"width",e[0]),N(t,"height",e[0]),N(t,"fill","none"),N(t,"viewBox","0 0 24 24"),N(t,"stroke","currentColor"),N(t,"stroke-width",e[1]),N(t,"stroke-linecap","round"),N(t,"stroke-linejoin","round"),N(t,"class",s="feather feather-search "+e[2])},m(e,s){x(e,t,s),w(t,n),w(t,o)},p(e,[n]){1&n&&N(t,"width",e[0]),1&n&&N(t,"height",e[0]),2&n&&N(t,"stroke-width",e[1]),4&n&&s!==(s="feather feather-search "+e[2])&&N(t,"class",s)},i:f,o:f,d(e){e&&k(t)}}}function _e(e,t,n){let{size:o="100%"}=t,{strokeWidth:s=2}=t,{class:r=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,s=e.strokeWidth),"class"in e&&n(2,r=e.class)},[o,s,r]}class Se extends $e{constructor(e){super(),pe(this,e,_e,Fe,v,{size:0,strokeWidth:1,class:2})}}const{document:Ee}=ae;function Ce(e){e[19]=e[21].list,e[20]=e[21].items}function De(e,t,n){const o=e.slice();return o[22]=t[n],o}function Ne(e,t,n){const o=e.slice();return o[25]=t[n],o}function Oe(e,t,n){const o=e.slice();return o[25]=t[n],o}function je(e){return{c:f,m:f,p:f,i:f,o:f,d:f}}function ze(e){let t,n,o,s,r,i;Ce(e);let l=e[19]?.length&&Le(e),a=e[20]?.length&&Pe(e),c=e[19]?.length&&Be(e);return{c(){l&&l.c(),t=E(),n=F("div"),o=F("table"),a&&a.c(),s=E(),r=F("tbody"),c&&c.c(),N(o,"striped",""),N(o,"class","svelte-1c3ufb0"),N(n,"class","eList svelte-1c3ufb0")},m(e,d){l&&l.m(e,d),x(e,t,d),x(e,n,d),w(n,o),a&&a.m(o,null),w(o,s),w(o,r),c&&c.m(r,null),i=!0},p(e,n){Ce(e),e[19]?.length?l?(l.p(e,n),4&n&&se(l,1)):(l=Le(e),l.c(),se(l,1),l.m(t.parentNode,t)):l&&(ne(),re(l,1,1,(()=>{l=null})),oe()),e[20]?.length?a?a.p(e,n):(a=Pe(e),a.c(),a.m(o,s)):a&&(a.d(1),a=null),e[19]?.length?c?(c.p(e,n),4&n&&se(c,1)):(c=Be(e),c.c(),se(c,1),c.m(r,null)):c&&(ne(),re(c,1,1,(()=>{c=null})),oe())},i(e){i||(se(l),se(c),i=!0)},o(e){re(l),re(c),i=!1},d(e){l&&l.d(e),e&&k(t),e&&k(n),a&&a.d(),c&&c.d()}}}function Le(e){let t,n,o;return n=new e[5]({props:{value:""}}),n.$on("input",e[10]),{c(){t=S("Suchen: "),de(n.$$.fragment)},m(e,s){x(e,t,s),ue(n,e,s),o=!0},p:f,i(e){o||(se(n.$$.fragment,e),o=!0)},o(e){re(n.$$.fragment,e),o=!1},d(e){e&&k(t),me(n,e)}}}function Pe(e){let t,n,o,s=e[0]&&Me(),r=e[20],i=[];for(let t=0;t<r.length;t+=1)i[t]=Te(Oe(e,r,t));return{c(){t=F("thead"),n=F("tr"),s&&s.c(),o=E();for(let e=0;e<i.length;e+=1)i[e].c();N(n,"class","svelte-1c3ufb0"),N(t,"class","svelte-1c3ufb0")},m(e,r){x(e,t,r),w(t,n),s&&s.m(n,null),w(n,o);for(let e=0;e<i.length;e+=1)i[e].m(n,null)},p(e,t){if(e[0]?s||(s=Me(),s.c(),s.m(n,o)):s&&(s.d(1),s=null),260&t){let o;for(r=e[20],o=0;o<r.length;o+=1){const s=Oe(e,r,o);i[o]?i[o].p(s,t):(i[o]=Te(s),i[o].c(),i[o].m(n,null))}for(;o<i.length;o+=1)i[o].d(1);i.length=r.length}},d(e){e&&k(t),s&&s.d(),I(i,e)}}}function Me(e){let t;return{c(){t=F("th"),N(t,"class","svelte-1c3ufb0")},m(e,n){x(e,t,n)},d(e){e&&k(t)}}}function Te(e){let t,n,o=e[25]?.designation+"";return{c(){t=F("th"),n=S(o),N(t,"class","svelte-1c3ufb0")},m(e,o){x(e,t,o),w(t,n)},p(e,t){4&t&&o!==(o=e[25]?.designation+"")&&O(n,o)},d(e){e&&k(t)}}}function Be(e){let t,n,o=e[19],s=[];for(let t=0;t<o.length;t+=1)s[t]=He(De(e,o,t));const r=e=>re(s[e],1,1,(()=>{s[e]=null}));return{c(){for(let e=0;e<s.length;e+=1)s[e].c();t=C()},m(e,o){for(let t=0;t<s.length;t+=1)s[t].m(e,o);x(e,t,o),n=!0},p(e,n){if(3023&n){let i;for(o=e[19],i=0;i<o.length;i+=1){const r=De(e,o,i);s[i]?(s[i].p(r,n),se(s[i],1)):(s[i]=He(r),s[i].c(),se(s[i],1),s[i].m(t.parentNode,t))}for(ne(),i=o.length;i<s.length;i+=1)r(i);oe()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)se(s[e]);n=!0}},o(e){s=s.filter(Boolean);for(let e=0;e<s.length;e+=1)re(s[e]);n=!1},d(e){I(s,e),e&&k(t)}}}function Ae(e){let t,n,o,s,r,i,l=e[0]&&qe(e),a=e[20],c=[];for(let t=0;t<a.length;t+=1)c[t]=We(Ne(e,a,t));return{c(){t=F("tr"),l&&l.c(),n=E();for(let e=0;e<c.length;e+=1)c[e].c();o=E(),N(t,"class","pointer svelte-1c3ufb0"),L(t,"active",e[22]._id===e[1])},m(a,d){x(a,t,d),l&&l.m(t,null),w(t,n);for(let e=0;e<c.length;e+=1)c[e].m(t,null);w(t,o),s=!0,r||(i=D(t,"click",(function(){h(e[7](e[22]))&&e[7](e[22]).apply(this,arguments)})),r=!0)},p(s,r){if((e=s)[0]?l?(l.p(e,r),1&r&&se(l,1)):(l=qe(e),l.c(),se(l,1),l.m(t,n)):l&&(ne(),re(l,1,1,(()=>{l=null})),oe()),324&r){let n;for(a=e[20],n=0;n<a.length;n+=1){const s=Ne(e,a,n);c[n]?c[n].p(s,r):(c[n]=We(s),c[n].c(),c[n].m(t,o))}for(;n<c.length;n+=1)c[n].d(1);c.length=a.length}262&r&&L(t,"active",e[22]._id===e[1])},i(e){s||(se(l),s=!0)},o(e){re(l),s=!1},d(e){e&&k(t),l&&l.d(),I(c,e),r=!1,i()}}}function qe(e){let t,n,o,s,r;return n=new Ie({props:{size:"18"}}),{c(){t=F("td"),de(n.$$.fragment),N(t,"id","editRow"),N(t,"class","svelte-1c3ufb0")},m(i,l){var a;x(i,t,l),ue(n,t,null),o=!0,s||(r=D(t,"click",(a=function(){h(e[9](e[22]))&&e[9](e[22]).apply(this,arguments)},function(e){return e.stopPropagation(),a.call(this,e)})),s=!0)},p(t,n){e=t},i(e){o||(se(n.$$.fragment,e),o=!0)},o(e){re(n.$$.fragment,e),o=!1},d(e){e&&k(t),me(n),s=!1,r()}}}function We(e){let t,n,o=e[6](e[22],e[25])+"";return{c(){t=F("td"),n=S(o),N(t,"class","svelte-1c3ufb0")},m(e,o){x(e,t,o),w(t,n)},p(e,t){4&t&&o!==(o=e[6](e[22],e[25])+"")&&O(n,o)},d(e){e&&k(t)}}}function He(e){let t,n,o=e[11](e[22],e[20],e[3]),s=o&&Ae(e);return{c(){s&&s.c(),t=C()},m(e,o){s&&s.m(e,o),x(e,t,o),n=!0},p(e,n){12&n&&(o=e[11](e[22],e[20],e[3])),o?s?(s.p(e,n),12&n&&se(s,1)):(s=Ae(e),s.c(),se(s,1),s.m(t.parentNode,t)):s&&(ne(),re(s,1,1,(()=>{s=null})),oe())},i(e){n||(se(s),n=!0)},o(e){re(s),n=!1},d(e){s&&s.d(e),e&&k(t)}}}function Re(e){let t,n;return t=new e[4]({}),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p:f,i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){re(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function Ye(e){let t,n,o,s={ctx:e,current:null,token:null,hasCatch:!1,pending:Re,then:ze,catch:je,value:21,blocks:[,,,]};return ie(n=e[2]&&e[8](),s),{c(){t=C(),s.block.c()},m(e,n){x(e,t,n),s.block.m(e,s.anchor=n),s.mount=()=>t.parentNode,s.anchor=t,o=!0},p(t,[o]){e=t,s.ctx=e,4&o&&n!==(n=e[2]&&e[8]())&&ie(n,s)||le(s,e,o)},i(e){o||(se(s.block),o=!0)},o(e){for(let e=0;e<3;e+=1){re(s.blocks[e])}o=!1},d(e){e&&k(t),s.block.d(e),s.token=null,s=null}}}function Ge(e,o,s){const r=A(),{Loading:i,TextField:l}=c;let{className:a}=o,{rowId:u}=o,{filterForReady:m=!1}=o,{showEdit:f=!1}=o,{selectionFields:p=!1}=o,$=!0,g="";const h=(e,t)=>t&&d(e[`_${t.name}`]||e[t.name]||""),v=t.getSchemaByClass(a),b=async(e,t,n,o)=>{const{value:s,refClass:r}=o,[i,l]=n.split("."),a=await Un(i,s);if(!a)return e;const c=a[l];return c?.length?c.map((n=>{let o=e?.find((e=>e._id===n[t]))||{};o={...o};for(const e in o)n[e]&&(o[e]=n[e]);for(const e in n)n[e]&&(o[e]=n[e]);return Vn(r+o._id.toString(),o),o})):e};B((()=>{const e=document.querySelector("tr.active");e&&e.scrollIntoView({block:"end",behavior:"smooth"})})),n.subscribe((async e=>{if(!e)return;const t=await v;e.eventId===t.id&&(Kn(t.class,e.eventId),s(2,$=!s(2,$=!1)))}));return e.$$set=e=>{"className"in e&&s(12,a=e.className),"rowId"in e&&s(1,u=e.rowId),"filterForReady"in e&&s(13,m=e.filterForReady),"showEdit"in e&&s(0,f=e.showEdit),"selectionFields"in e&&s(14,p=e.selectionFields)},[f,u,$,g,i,l,h,e=>()=>r("choose",{row:e}),async()=>{const e=await v;let t=await Yn(e.class,e.id);const n=p&&p?.find((t=>e.class===t.refClass.split(":")[0]));if(n&&n.value){const[o,r]=n.refClass.split(":");e.class===o&&(t=await b(t,o,r,n)),s(0,f=!t)}!p&&m&&(t=((e,t)=>"Information"===t.state.task?e:e.filter((e=>"WaitingForApproval"===e._task.status||"Ready"===e._task.status||"Closing"===e._task.status)))(t,e));let o=[],r=e.display;return r&&r.length?r.map((n=>{const[s,r]=n.split(".");let i=e.list?.find((e=>e.name===s))?.item.find((e=>e.name===r));i&&(i={...i},i.name=`${s}_${r}`,t=t.map((e=>(e[s]&&(e[i.name]=e[s][r]),e)))),i||(i=e.items.find((e=>e.name===s))),o.find((e=>e?.name===s))||o.push(i)})):o=e.items,{list:t,items:o}},e=>t=>{r("edit",e)},({detail:{value:e}})=>{s(3,g=e)},(e,t,n)=>{if(!n)return!0;for(const o of t)if(h(e,o)?.toLowerCase()?.includes(n))return!0;return!1},a,m,p]}class Ve extends $e{constructor(e){var t;super(),Ee.getElementById("svelte-1c3ufb0-style")||((t=F("style")).id="svelte-1c3ufb0-style",t.textContent=".eList.svelte-1c3ufb0.svelte-1c3ufb0{min-height:12em;height:fit-content;max-height:65vh;overflow:auto}.eList.svelte-1c3ufb0 #editRow.svelte-1c3ufb0{width:1em}.eList.svelte-1c3ufb0 table.svelte-1c3ufb0{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important;margin-top:1em}.eList.svelte-1c3ufb0 table thead.svelte-1c3ufb0{position:sticky;top:0;background:#326173;color:white}.eList.svelte-1c3ufb0 table tbody tr.svelte-1c3ufb0{height:2.3em}th.svelte-1c3ufb0.svelte-1c3ufb0,td.svelte-1c3ufb0.svelte-1c3ufb0{padding-left:0.4em;padding-right:0.4em}tr.pointer.svelte-1c3ufb0.svelte-1c3ufb0:hover{background-color:#DAE1E5}tr.active.svelte-1c3ufb0.svelte-1c3ufb0{color:#326173;background-color:#fcebd5}",w(Ee.head,t)),pe(this,e,Ge,Ye,v,{className:12,rowId:1,filterForReady:13,showEdit:0,selectionFields:14})}}function Je(e){return{c:f,m:f,p:f,i:f,o:f,d:f}}function Ue(e){let t,n,o=e[21]&&Ke(e);return{c(){o&&o.c(),t=C()},m(e,s){o&&o.m(e,s),x(e,t,s),n=!0},p(e,n){e[21]?o?(o.p(e,n),4&n&&se(o,1)):(o=Ke(e),o.c(),se(o,1),o.m(t.parentNode,t)):o&&(ne(),re(o,1,1,(()=>{o=null})),oe())},i(e){n||(se(o),n=!0)},o(e){re(o),n=!1},d(e){o&&o.d(e),e&&k(t)}}}function Ke(e){let t,n;return t=new e[8]({props:{title:e[11],class:"eList "+(e[6]?"form":""),$$slots:{default:[tt]},$$scope:{ctx:e}}}),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};64&n&&(o.class="eList "+(e[6]?"form":"")),4194559&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){re(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function Qe(e){let t,n;return t=new eo({props:{schema:e[1],recID:e[0],readonly:e[7]}}),t.$on("choose",(function(){h(e[16](e[21]))&&e[16](e[21]).apply(this,arguments)})),t.$on("back",e[13]),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(n,o){e=n;const s={};2&o&&(s.schema=e[1]),1&o&&(s.recID=e[0]),128&o&&(s.readonly=e[7]),t.$set(s)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){re(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function Xe(e){let t,n,o,s,r,i,l,a,c;return t=new e[9]({}),s=new e[10]({props:{outline:!0,$$slots:{default:[Ze]},$$scope:{ctx:e}}}),s.$on("click",e[14]),i=new e[10]({props:{filled:!0,$$slots:{default:[et]},$$scope:{ctx:e}}}),i.$on("click",e[15]),a=new Ve({props:{className:e[1].class,filterForReady:e[3],selectionFields:e[4],rowId:e[0],showEdit:e[5]}}),a.$on("edit",e[17]),a.$on("choose",e[18]),{c(){de(t.$$.fragment),n=E(),o=F("div"),de(s.$$.fragment),r=E(),de(i.$$.fragment),l=E(),de(a.$$.fragment),N(o,"class","form--buttons svelte-jb5mrh")},m(e,d){ue(t,e,d),x(e,n,d),x(e,o,d),ue(s,o,null),w(o,r),ue(i,o,null),x(e,l,d),ue(a,e,d),c=!0},p(e,t){const n={};4194304&t&&(n.$$scope={dirty:t,ctx:e}),s.$set(n);const o={};4194304&t&&(o.$$scope={dirty:t,ctx:e}),i.$set(o);const r={};2&t&&(r.className=e[1].class),8&t&&(r.filterForReady=e[3]),16&t&&(r.selectionFields=e[4]),1&t&&(r.rowId=e[0]),32&t&&(r.showEdit=e[5]),a.$set(r)},i(e){c||(se(t.$$.fragment,e),se(s.$$.fragment,e),se(i.$$.fragment,e),se(a.$$.fragment,e),c=!0)},o(e){re(t.$$.fragment,e),re(s.$$.fragment,e),re(i.$$.fragment,e),re(a.$$.fragment,e),c=!1},d(e){me(t,e),e&&k(n),e&&k(o),me(s),me(i),e&&k(l),me(a,e)}}}function Ze(e){let t;return{c(){t=S("Abbrechen")},m(e,n){x(e,t,n)},d(e){e&&k(t)}}}function et(e){let t;return{c(){t=S("Neu")},m(e,n){x(e,t,n)},d(e){e&&k(t)}}}function tt(e){let t,n,o,s;const r=[Xe,Qe],i=[];function l(e,t){return e[21].length&&!e[6]?0:1}return t=l(e),n=i[t]=r[t](e),{c(){n.c(),o=C()},m(e,n){i[t].m(e,n),x(e,o,n),s=!0},p(e,s){let a=t;t=l(e),t===a?i[t].p(e,s):(ne(),re(i[a],1,1,(()=>{i[a]=null})),oe(),n=i[t],n?n.p(e,s):(n=i[t]=r[t](e),n.c()),se(n,1),n.m(o.parentNode,o))},i(e){s||(se(n),s=!0)},o(e){re(n),s=!1},d(e){i[t].d(e),e&&k(o)}}}function nt(e){return{c:f,m:f,p:f,i:f,o:f,d:f}}function ot(e){let t,n,o,s={ctx:e,current:null,token:null,hasCatch:!1,pending:nt,then:Ue,catch:Je,value:21,blocks:[,,,]};return ie(n=e[12](e[2]),s),{c(){t=C(),s.block.c()},m(e,n){x(e,t,n),s.block.m(e,s.anchor=n),s.mount=()=>t.parentNode,s.anchor=t,o=!0},p(t,[o]){e=t,s.ctx=e,4&o&&n!==(n=e[12](e[2]))&&ie(n,s)||le(s,e,o)},i(e){o||(se(s.block),o=!0)},o(e){for(let e=0;e<3;e+=1){re(s.blocks[e])}o=!1},d(e){e&&k(t),s.block.d(e),s.token=null,s=null}}}function st(e,t,n){const{Dialog:o,Divider:s,Button:r}=c,i=A();let{schema:l}=t,{recID:a}=t,{isOpening:d=!0}=t,{filterForReady:u=!1}=t,{selectionFields:m=!1}=t,{showEdit:f=!0}=t,p=l.identity.designation;l.class;let $,g=!1;return e.$$set=e=>{"schema"in e&&n(1,l=e.schema),"recID"in e&&n(0,a=e.recID),"isOpening"in e&&n(2,d=e.isOpening),"filterForReady"in e&&n(3,u=e.filterForReady),"selectionFields"in e&&n(4,m=e.selectionFields),"showEdit"in e&&n(5,f=e.showEdit)},[a,l,d,u,m,f,g,$,o,s,r,p,e=>e&&Yn(l.class,l.id),()=>{n(6,g=!1),a||i("back"),f||i("back")},()=>{n(6,g=!1),i("back")},()=>{n(0,a=!1),n(7,$=!1),n(6,g=!0)},e=>({detail:{row:e}})=>{let t=l.display;t&&t.length&&t.map((t=>{const[n,o]=t.split(".");let s=l.list?.find((e=>e.name===n))?.item.find((e=>e.name===o));if(s){e[`${n}_${o}`]=e[n][o]}})),i("choose",{row:e})},({detail:e})=>{n(7,$=!!e._task.visum||"Closed"===e._task.status),n(0,a=e._docId),n(6,g=!0)},function(t){q(e,t)}]}class rt extends $e{constructor(e){var t;super(),document.getElementById("svelte-jb5mrh-style")||((t=F("style")).id="svelte-jb5mrh-style",t.textContent=".eList .flex button.btn{width:max-content !important}.dialog.eList{max-height:90vh}.form--buttons.svelte-jb5mrh{display:flex;gap:1em;padding:0.5em 0}",w(document.head,t)),pe(this,e,st,ot,v,{schema:1,recID:0,isOpening:2,filterForReady:3,selectionFields:4,showEdit:5})}}function it(e){return{c:f,m:f,p:f,i:f,o:f,d:f}}function lt(e){let t,n,s,r,i,l,a,c,d,u,m;n=new o({props:{class:"full-width",id:e[10],value:e[1],rows:"1",readonly:!0,disabled:e[2],style:"height:2.8em; padding-left:2em;padding-right:2em;overflow-y:hidden; resize:none;"}});let f=!e[2]&&at(e),p=!e[2]&&ct(e);function $(t){e[18](t)}let g={class:"tModal",noClickaway:!0,$$slots:{default:[dt]},$$scope:{ctx:e}};return void 0!==e[8]&&(g.open=e[8]),d=new e[9]({props:g}),H.push((()=>ce(d,"open",$))),{c(){t=F("div"),de(n.$$.fragment),s=E(),f&&f.c(),r=E(),i=F("input"),a=E(),p&&p.c(),c=E(),de(d.$$.fragment),N(i,"class",l=y(e[4]||e[5])+" svelte-axxims"),N(i,"id",e[3]),N(i,"name",e[3]),i.value=e[0],i.hidden=!0,i.readOnly=!0,i.disabled=!0,z(t,"position","relative")},m(e,o){x(e,t,o),ue(n,t,null),w(t,s),f&&f.m(t,null),w(t,r),w(t,i),w(t,a),p&&p.m(t,null),x(e,c,o),ue(d,e,o),m=!0},p(e,o){const s={};2&o&&(s.value=e[1]),4&o&&(s.disabled=e[2]),n.$set(s),e[2]?f&&(ne(),re(f,1,1,(()=>{f=null})),oe()):f?(f.p(e,o),4&o&&se(f,1)):(f=at(e),f.c(),se(f,1),f.m(t,r)),(!m||48&o&&l!==(l=y(e[4]||e[5])+" svelte-axxims"))&&N(i,"class",l),(!m||8&o)&&N(i,"id",e[3]),(!m||8&o)&&N(i,"name",e[3]),(!m||1&o&&i.value!==e[0])&&(i.value=e[0]),e[2]?p&&(ne(),re(p,1,1,(()=>{p=null})),oe()):p?(p.p(e,o),4&o&&se(p,1)):(p=ct(e),p.c(),se(p,1),p.m(t,null));const a={};8389057&o&&(a.$$scope={dirty:o,ctx:e}),!u&&256&o&&(u=!0,a.open=e[8],U((()=>u=!1))),d.$set(a)},i(e){m||(se(n.$$.fragment,e),se(f),se(p),se(d.$$.fragment,e),m=!0)},o(e){re(n.$$.fragment,e),re(f),re(p),re(d.$$.fragment,e),m=!1},d(e){e&&k(t),me(n),f&&f.d(),p&&p.d(),e&&k(c),me(d,e)}}}function at(e){let t,n,o,s,r;return n=new Se({props:{size:"18"}}),{c(){t=F("span"),de(n.$$.fragment),N(t,"class","feather pointer svelte-axxims")},m(i,l){x(i,t,l),ue(n,t,null),o=!0,s||(r=[D(t,"click",e[12]),D(t,"choose",e[13])],s=!0)},p:f,i(e){o||(se(n.$$.fragment,e),o=!0)},o(e){re(n.$$.fragment,e),o=!1},d(e){e&&k(t),me(n),s=!1,g(r)}}}function ct(e){let t,n,o,s,r;return n=new we({props:{size:"18"}}),{c(){t=F("span"),de(n.$$.fragment),N(t,"class","feather2 pointer svelte-axxims")},m(i,l){x(i,t,l),ue(n,t,null),o=!0,s||(r=D(t,"click",e[15]),s=!0)},p:f,i(e){o||(se(n.$$.fragment,e),o=!0)},o(e){re(n.$$.fragment,e),o=!1},d(e){e&&k(t),me(n),s=!1,r()}}}function dt(e){let t,n;return t=new rt({props:{schema:e[7],recID:e[0],isOpening:e[8],filterForReady:"true",selectionFields:e[6]}}),t.$on("choose",e[13]),t.$on("back",e[14]),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};128&n&&(o.schema=e[7]),1&n&&(o.recID=e[0]),256&n&&(o.isOpening=e[8]),64&n&&(o.selectionFields=e[6]),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){re(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function ut(e){return{c:f,m:f,p:f,i:f,o:f,d:f}}function mt(e){let t,n,o={ctx:e,current:null,token:null,hasCatch:!1,pending:ut,then:lt,catch:it,value:22,blocks:[,,,]};return ie(e[11](),o),{c(){t=C(),o.block.c()},m(e,s){x(e,t,s),o.block.m(e,o.anchor=s),o.mount=()=>t.parentNode,o.anchor=t,n=!0},p(t,[n]){le(o,e=t,n)},i(e){n||(se(o.block),n=!0)},o(e){for(let e=0;e<3;e+=1){re(o.blocks[e])}n=!1},d(e){e&&k(t),o.block.d(e),o.token=null,o=null}}}function ft(e,n,o){const s=A(),{Modal:r}=c;let{id:i}=n,{item:l}=n,{value:a=""}=n,{desc:d=""}=n,{noForm:u=!1}=n,{classId:f}=n,{eventId:p}=n,{disabled:$}=n,{selectionFields:g}=n;const h="comment_"+i;let v,b=!1;const y=()=>{o(8,b=!1)};return e.$$set=e=>{"id"in e&&o(3,i=e.id),"item"in e&&o(16,l=e.item),"value"in e&&o(0,a=e.value),"desc"in e&&o(1,d=e.desc),"noForm"in e&&o(4,u=e.noForm),"classId"in e&&o(5,f=e.classId),"eventId"in e&&o(17,p=e.eventId),"disabled"in e&&o(2,$=e.disabled),"selectionFields"in e&&o(6,g=e.selectionFields)},e.$$.update=()=>{65665&e.$$.dirty&&a&&v&&Promise.resolve(Gn(l.refClass,v.id,a)).then((e=>{var t;(t=e)&&(o(1,d=m(v,t)),s("change",{value:a,description:d}),s("task",{row:t}))}))},[a,d,$,i,u,f,g,v,b,r,h,async()=>{if(o(7,v=await t.getSchemaByClass(l.refClass)),p&&a&&!$){(await t.getSchema(p)).input?.find((e=>e===l.refClass))&&o(2,$=!0)}return!0},function(){o(8,b=!0)},({detail:e})=>{o(0,a=e.row._id),y()},y,()=>{o(0,a=o(1,d="")),s("change",{value:a,description:d}),s("task",{row:{_task:{event:v.id,_id:!1}}})},l,p,function(e){b=e,o(8,b)}]}class pt extends $e{constructor(e){var t;super(),document.getElementById("svelte-axxims-style")||((t=F("style")).id="svelte-axxims-style",t.textContent=".feather.svelte-axxims{position:absolute;top:0.75em;left:0.5em;color:#4300b0}.feather2.svelte-axxims{position:absolute;top:0.75em;right:0.5em;color:#4300b0}.text-field textarea:disabled{padding-left:0.625em !important}",w(document.head,t)),pe(this,e,ft,mt,v,{id:3,item:16,value:0,desc:1,noForm:4,classId:5,eventId:17,disabled:2,selectionFields:6})}}function $t(e){let t,n,o;return n=new e[7]({props:{lang:e[8].id,class:"left",type:"string",inputClass:"txt-right"+(e[2]?"":" "+e[3]),id:e[0],name:e[1].name,value:e[6],step:e[9],pattern:e[5],placeholder:e[10],readonly:e[11],disabled:e[4]}}),n.$on("change",e[12]),n.$on("focus",e[13]),{c(){t=F("div"),de(n.$$.fragment),z(t,"position","relative"),z(t,"max-width","10em")},m(e,s){x(e,t,s),ue(n,t,null),o=!0},p(e,[t]){const o={};12&t&&(o.inputClass="txt-right"+(e[2]?"":" "+e[3])),1&t&&(o.id=e[0]),2&t&&(o.name=e[1].name),64&t&&(o.value=e[6]),32&t&&(o.pattern=e[5]),16&t&&(o.disabled=e[4]),n.$set(o)},i(e){o||(se(n.$$.fragment,e),o=!0)},o(e){re(n.$$.fragment,e),o=!1},d(e){e&&k(t),me(n)}}}function gt(e,t,n){let o;const r=A(),{TextField:i}=c;let{id:l}=t,{item:a}=t,{value:d}=t,{noForm:u=!1}=t,{classId:m}=t,{disabled:f}=t;const p=JSON.parse(s.getItem("Locale")),$=Number("1.1").toLocaleString(p.id).substring(1,2),{properties:g={}}=a;let{min:h,max:v,step:b,pattern:y,decimals:w=0,unit:x="",placeholder:k,hint:I,readonly:F}=g;y||(y=w?`[0-9]+([${$}][0-9]{1,${w}})?`:"[0-9]*");return e.$$set=e=>{"id"in e&&n(0,l=e.id),"item"in e&&n(1,a=e.item),"value"in e&&n(14,d=e.value),"noForm"in e&&n(2,u=e.noForm),"classId"in e&&n(3,m=e.classId),"disabled"in e&&n(4,f=e.disabled)},e.$$.update=()=>{16384&e.$$.dirty&&n(6,o=Number(d.toString().replace($,".")).toFixed(w).toString().replace(".",$))},[l,a,u,m,f,y,o,i,p,b,k,F,({detail:e})=>r("blur",{value:e.value}),({detail:e})=>{F||Number(d.toString().replace($,"."))||n(6,o="")},d]}class ht extends $e{constructor(e){super(),pe(this,e,gt,$t,v,{id:0,item:1,value:14,noForm:2,classId:3,disabled:4})}}function vt(e,t,n){const o=e.slice();return o[9]=t[n],o}function bt(e){let t,n,o,s=e[9]+"";return{c(){t=F("option"),n=S(s),t.__value=e[9],t.value=t.__value,t.selected=o=e[2]===e[9],N(t,"class","svelte-5xpzvo")},m(e,o){x(e,t,o),w(t,n)},p(e,n){4&n&&o!==(o=e[2]===e[9])&&(t.selected=o)},d(e){e&&k(t)}}}function yt(e){let t,n,o,s,r,i,l=e[5],a=[];for(let t=0;t<l.length;t+=1)a[t]=bt(vt(e,l,t));return{c(){t=F("select"),n=F("option");for(let e=0;e<a.length;e+=1)a[e].c();n.__value="",n.value=n.__value,N(n,"class","svelte-5xpzvo"),N(t,"class",o=y(e[3]||e[4])+" svelte-5xpzvo"),N(t,"id",e[0]),N(t,"name",s=e[1].name),N(t,"readonly",e[6])},m(o,s){x(o,t,s),w(t,n);for(let e=0;e<a.length;e+=1)a[e].m(t,null);r||(i=D(t,"change",e[7]),r=!0)},p(e,[n]){if(36&n){let o;for(l=e[5],o=0;o<l.length;o+=1){const s=vt(e,l,o);a[o]?a[o].p(s,n):(a[o]=bt(s),a[o].c(),a[o].m(t,null))}for(;o<a.length;o+=1)a[o].d(1);a.length=l.length}24&n&&o!==(o=y(e[3]||e[4])+" svelte-5xpzvo")&&N(t,"class",o),1&n&&N(t,"id",e[0]),2&n&&s!==(s=e[1].name)&&N(t,"name",s)},i:f,o:f,d(e){e&&k(t),I(a,e),r=!1,i()}}}function wt(e,t,n){const o=A();let{id:s}=t,{item:r}=t,{value:i}=t,{noForm:l=!1}=t,{classId:a}=t;const{enum:c,readonly:d}=r.properties;return e.$$set=e=>{"id"in e&&n(0,s=e.id),"item"in e&&n(1,r=e.item),"value"in e&&n(2,i=e.value),"noForm"in e&&n(3,l=e.noForm),"classId"in e&&n(4,a=e.classId)},[s,r,i,l,a,c,d,e=>o("blur",{value:e.srcElement.value})]}class xt extends $e{constructor(e){var t;super(),document.getElementById("svelte-5xpzvo-style")||((t=F("style")).id="svelte-5xpzvo-style",t.textContent="select.svelte-5xpzvo.svelte-5xpzvo{padding:0 0.625em 0.0625em;box-sizing:border-box;width:100%;border:0 solid rgba(0, 0, 0, 0.42);border-bottom-width:0px;border-bottom-width:0.0625em;border-top-left-radius:0.375em;border-top-right-radius:0.375em;background-color:#f5f5f5;outline:none;font-size:1rem;font-weight:300;height:2.8em}select.svelte-5xpzvo.svelte-5xpzvo:focus{border:none;border-bottom:2px solid #4300b0}select[readonly].svelte-5xpzvo option.svelte-5xpzvo{display:none}",w(document.head,t)),pe(this,e,wt,yt,v,{id:0,item:1,value:2,noForm:3,classId:4})}}const kt=/\d+/g,It=/%[HMSpPdmyY%]/g;function Ft(e){let t;return{c(){t=S("Stunden")},m(e,n){x(e,t,n)},d(e){e&&k(t)}}}function _t(e){let t,n;return t=new e[4]({props:{slot:"hours-label",$$slots:{default:[Ft]},$$scope:{ctx:e}}}),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){re(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function St(e){let t;return{c(){t=S("Minuten")},m(e,n){x(e,t,n)},d(e){e&&k(t)}}}function Et(e){let t,n;return t=new e[4]({props:{slot:"minutes-label",$$slots:{default:[St]},$$scope:{ctx:e}}}),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){re(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function Ct(e){let t;return{c(){t=S("Jetzt")},m(e,n){x(e,t,n)},d(e){e&&k(t)}}}function Dt(e){let t,n;return t=new e[4]({props:{slot:"now-label",$$slots:{default:[Ct]},$$scope:{ctx:e}}}),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){re(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function Nt(e){let t,n,o,s,r,i,l,a,c;return s=new e[5]({props:{value:e[0],closeOnSelection:!0}}),s.$on("change",e[8]),i=new e[6]({props:{value:e[0],$$slots:{"now-label":[Dt],"minutes-label":[Et],"hours-label":[_t]},$$scope:{ctx:e}}}),i.$on("change",e[7]),{c(){t=F("input"),o=E(),de(s.$$.fragment),r=E(),de(i.$$.fragment),N(t,"type","string"),N(t,"class",n=e[2]||e[3]),N(t,"id",e[1]),N(t,"name",e[1]),t.hidden=!0},m(n,d){x(n,t,d),j(t,e[0]),x(n,o,d),ue(s,n,d),x(n,r,d),ue(i,n,d),l=!0,a||(c=D(t,"input",e[9]),a=!0)},p(e,[o]){(!l||12&o&&n!==(n=e[2]||e[3]))&&N(t,"class",n),(!l||2&o)&&N(t,"id",e[1]),(!l||2&o)&&N(t,"name",e[1]),1&o&&j(t,e[0]);const r={};1&o&&(r.value=e[0]),s.$set(r);const a={};1&o&&(a.value=e[0]),4096&o&&(a.$$scope={dirty:o,ctx:e}),i.$set(a)},i(e){l||(se(s.$$.fragment,e),se(i.$$.fragment,e),l=!0)},o(e){re(s.$$.fragment,e),re(i.$$.fragment,e),l=!1},d(e){e&&k(t),e&&k(o),me(s,e),e&&k(r),me(i,e),a=!1,c()}}}function Ot(e,t,n){const o=A(),{Label:s,DatePicker:r,TimePicker:i}=c;let{value:l}=t,{id:a}=t,{noForm:d=!1}=t,{classId:u}=t;const m=e=>o("change",{value:e});return e.$$set=e=>{"value"in e&&n(0,l=e.value),"id"in e&&n(1,a=e.id),"noForm"in e&&n(2,d=e.noForm),"classId"in e&&n(3,u=e.classId)},[l,a,d,u,s,r,i,({detail:e})=>{var t,o;n(0,(t=e.value,o=l,l=null==t||null==o?t:(o.setHours(t.getHours(),t.getMinutes(),t.getSeconds()),o))),m(l)},({detail:e})=>{var t,o;n(0,(t=e.value,o=l,l=null==t||null==o?t:(o.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),o))),m(l)},function(){l=this.value,n(0,l)}]}class jt extends $e{constructor(e){super(),pe(this,e,Ot,Nt,v,{value:0,id:1,noForm:2,classId:3})}}function zt(e){let t,n,o;return n=new e[7]({props:{type:"string",inputClass:e[3]?"":" "+e[4],id:e[0],name:e[1].name,value:e[2],pattern:Lt,placeholder:Pt,readonly:e[5],disabled:e[6]}}),n.$on("change",e[8]),{c(){t=F("div"),de(n.$$.fragment),z(t,"max-width","4em")},m(e,s){x(e,t,s),ue(n,t,null),o=!0},p(e,[t]){const o={};24&t&&(o.inputClass=e[3]?"":" "+e[4]),1&t&&(o.id=e[0]),2&t&&(o.name=e[1].name),4&t&&(o.value=e[2]),32&t&&(o.readonly=e[5]),64&t&&(o.disabled=e[6]),n.$set(o)},i(e){o||(se(n.$$.fragment,e),o=!0)},o(e){re(n.$$.fragment,e),o=!1},d(e){e&&k(t),me(n)}}}const Lt="([01][0-9]|2[0-3]):([0-5][0-9])",Pt="";function Mt(e,t,n){const o=A(),{TextField:s}=c;let{id:r}=t,{item:i}=t,{value:l}=t,{noForm:a=!1}=t,{classId:d}=t,{readonly:u}=t,{disabled:m}=t;const f=e=>{if(!e)return"";const[t,n]=e.split(":");return 4===t.length?`${t.substr(0,2)}:${t.substring(2,4)}`:3===t.length?t.substring(0,2)>23?`0${t.substring(0,1)}:${t.substring(1,3)}`:`${t.substring(0,2)}:${t.substring(2,3)}0`:2===t.length?t>23?`0${t.substring(0,1)}:${t.substring(1,2)}0`:`${t}:${(n||"0").padStart(2,"0")}`:`0${t}:${(n||"0").padStart(2,"0")}`};return e.$$set=e=>{"id"in e&&n(0,r=e.id),"item"in e&&n(1,i=e.item),"value"in e&&n(2,l=e.value),"noForm"in e&&n(3,a=e.noForm),"classId"in e&&n(4,d=e.classId),"readonly"in e&&n(5,u=e.readonly),"disabled"in e&&n(6,m=e.disabled)},[r,i,l,a,d,u,m,s,({detail:e})=>{o("blur",{value:f(e.value)})}]}class Tt extends $e{constructor(e){super(),pe(this,e,Mt,zt,v,{id:0,item:1,value:2,noForm:3,classId:4,readonly:5,disabled:6})}}function Bt(e){let t,n;return t=new e[9]({props:{inputClass:e[1]||e[2],disabled:e[4],readonly:e[13],required:e[12],id:e[16],name:e[15],value:e[6]()}}),t.$on("change",e[18]()),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};6&n&&(o.inputClass=e[1]||e[2]),16&n&&(o.disabled=e[4]),64&n&&(o.value=e[6]()),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){re(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function At(e){let t,n;return t=new e[9]({props:{inputClass:e[1]||e[2],disabled:e[4],readonly:e[13],required:e[12],type:"email",id:e[16],name:e[15],value:e[6]()}}),t.$on("change",e[18]()),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};6&n&&(o.inputClass=e[1]||e[2]),16&n&&(o.disabled=e[4]),64&n&&(o.value=e[6]()),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){re(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function qt(e){let t,n;return t=new Tt({props:{inputClass:e[1]||e[2],disabled:e[4],readonly:e[13],required:e[12],id:e[16],item:e[0],value:e[6]()}}),t.$on("blur",e[18]()),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};6&n&&(o.inputClass=e[1]||e[2]),16&n&&(o.disabled=e[4]),1&n&&(o.item=e[0]),64&n&&(o.value=e[6]()),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){re(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function Wt(e){let t,n;return t=new jt({props:{classId:e[2],id:e[16],disabled:e[4],required:e[12],value:e[17](),noForm:e[1]}}),t.$on("change",e[18]()),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),16&n&&(o.disabled=e[4]),2&n&&(o.noForm=e[1]),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){re(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function Ht(e){let t,n;return t=new e[11]({props:{inputClass:e[1]||e[2],required:e[12],disabled:e[4],id:e[16],name:e[15],value:e[17](),closeOnSelection:!0}}),t.$on("change",e[18](!0)),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};6&n&&(o.inputClass=e[1]||e[2]),16&n&&(o.disabled=e[4]),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){re(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function Rt(e){let t,n;return t=new e[10]({props:{inputClass:e[1]||e[2],disabled:e[4],readonly:e[13],required:e[12],id:e[16],name:e[15],value:e[6]()}}),t.$on("change",e[18]()),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};6&n&&(o.inputClass=e[1]||e[2]),16&n&&(o.disabled=e[4]),64&n&&(o.value=e[6]()),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){re(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function Yt(e){let t,n;return t=new xt({props:{classId:e[2],disabled:e[4],required:e[12],id:e[16],item:e[0],value:e[6](),noForm:e[1]}}),t.$on("blur",e[18]()),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),16&n&&(o.disabled=e[4]),1&n&&(o.item=e[0]),64&n&&(o.value=e[6]()),2&n&&(o.noForm=e[1]),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){re(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function Gt(e){let t,n;return t=new ht({props:{classId:e[2],disabled:e[4],required:e[12],readonly:e[13],id:e[16],item:e[0],value:e[6](),noForm:e[1]}}),t.$on("blur",e[18]()),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),16&n&&(o.disabled=e[4]),1&n&&(o.item=e[0]),64&n&&(o.value=e[6]()),2&n&&(o.noForm=e[1]),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){re(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function Vt(e){let t,n;return t=new o({props:{classId:e[2],disabled:e[4],readonly:e[13],id:e[16],name:e[0].name,value:e[6](),noForm:e[1]}}),t.$on("blur",e[18]()),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),16&n&&(o.disabled=e[4]),1&n&&(o.name=e[0].name),64&n&&(o.value=e[6]()),2&n&&(o.noForm=e[1]),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){re(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function Jt(e){let t,n;return t=new pt({props:{classId:e[2],eventId:e[3],disabled:e[4],id:e[16],item:e[0],desc:e[7],value:e[6](),noForm:e[1],selectionFields:e[5]}}),t.$on("task",e[23]),t.$on("change",e[18]()),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),8&n&&(o.eventId=e[3]),16&n&&(o.disabled=e[4]),1&n&&(o.item=e[0]),128&n&&(o.desc=e[7]),64&n&&(o.value=e[6]()),2&n&&(o.noForm=e[1]),32&n&&(o.selectionFields=e[5]),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){re(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function Ut(e){let t,n,o,s;const r=[Jt,Vt,Gt,Yt,Rt,Ht,Wt,qt,At,Bt],i=[];function l(e,t){return"object"===e[0].type?0:"textarea"===e[0].type||e[0].properties&&"textarea"===e[0].properties.format?1:"number"===e[0].type?2:e[0].properties&&e[0].properties.enum?3:"boolean"===e[0].type?4:"date"===e[0].type?5:"datetime"===e[0].type?6:"time"===e[0].properties?.format?7:"email"===e[0].type?8:9}return t=l(e),n=i[t]=r[t](e),{c(){n.c(),o=C()},m(e,n){i[t].m(e,n),x(e,o,n),s=!0},p(e,s){let a=t;t=l(e),t===a?i[t].p(e,s):(ne(),re(i[a],1,1,(()=>{i[a]=null})),oe(),n=i[t],n?n.p(e,s):(n=i[t]=r[t](e),n.c()),se(n,1),n.m(o.parentNode,o))},i(e){s||(se(n),s=!0)},o(e){re(n),s=!1},d(e){i[t].d(e),e&&k(o)}}}function Kt(e){let t,n;return t=new e[8]({props:{id:e[19](e[16]),class:e[14]&&"hidden",name:e[0].designation,help:e[0].properties?.hint,$$slots:{default:[Ut]},$$scope:{ctx:e}}}),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,[n]){const o={};1&n&&(o.name=e[0].designation),1&n&&(o.help=e[0].properties?.hint),268435711&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){re(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function Qt(e,t,n){let o,s;const r=A(),{FormField:i,TextField:l,Switch:a,DatePicker:u,TimePicker:m}=c;let{praefix:f=""}=t,{item:p}=t,{listName:$=""}=t,{record:g}=t,{noForm:h=!1}=t,{classId:v}=t,{eventId:b}=t,{disabled:y}=t,{selectionFields:w}=t;const x=p.properties?.required,k=p.properties?.readonly,I=p.properties?.hidden;if("string"==typeof p.name){const[e,t]=p.name.split("_");t&&(p.name=t)}const F=($?$+".":"")+p.name,_=F+(""!==f?"-"+f:""),S=(e,t=F)=>{try{return t.split(".").reduce(((e,t)=>e[t]),e)}catch(e){return""}};return e.$$set=e=>{"praefix"in e&&n(21,f=e.praefix),"item"in e&&n(0,p=e.item),"listName"in e&&n(22,$=e.listName),"record"in e&&n(20,g=e.record),"noForm"in e&&n(1,h=e.noForm),"classId"in e&&n(2,v=e.classId),"eventId"in e&&n(3,b=e.eventId),"disabled"in e&&n(4,y=e.disabled),"selectionFields"in e&&n(5,w=e.selectionFields)},e.$$.update=()=>{1048576&e.$$.dirty&&n(6,o=(e=F)=>{let t=S(g);return void 0===t?"":t})},n(7,s=((e=F)=>{let t=g["_"+e];return t=d(t),void 0===t?"":t})()),[p,h,v,b,y,w,o,s,i,l,a,u,x,k,I,F,_,(e=F)=>{let t=S(g);return t?new Date(t):new Date},e=>({detail:t})=>{const o=t.value;n(20,g[F]=e?function(e,t){if(null==e)return null;let n=e.getHours();return/%p/i.test(t)&&(n%=12,0===n&&(n=12)),t.replace("%Y",e.getFullYear()).replace("%y",(e.getFullYear()%100).toString().padStart(2,"0")).replace("%m",(e.getMonth()+1).toString().padStart(2,"0")).replace("%d",e.getDate().toString().padStart(2,"0")).replace("%H",n.toString().padStart(2,"0")).replace("%M",e.getMinutes().toString().padStart(2,"0")).replace("%S",e.getSeconds().toString().padStart(2,"0")).replace("%p",e.getHours()<12?"am":"pm").replace("%P",e.getHours()<12?"AM":"PM").replace("%%","%")}(o,"%d.%m.%Y"):o,g);const s=Object.values(g).every((e=>!e))&&o;r("notify",{value:o,add:s,itemName:F,desc:t.description})},()=>"object"===p.type?"comment_"+_:_,g,f,$,function(t){q(e,t)}]}class Xt extends $e{constructor(e){var t;super(),document.getElementById("svelte-9h2mb5-style")||((t=F("style")).id="svelte-9h2mb5-style",t.textContent=".form-field{margin-bottom:1em !important}.form-field.hidden{display:none !important}.form-field > .description{padding-top:0.75em}.field .switch{padding-top:0.75em}",w(document.head,t)),pe(this,e,Qt,Kt,v,{praefix:21,item:0,listName:22,record:20,noForm:1,classId:2,eventId:3,disabled:4,selectionFields:5})}}function Zt(e,t,n){const o=e.slice();return o[38]=t[n],o[40]=n,o}function en(e,t,n){const o=e.slice();return o[47]=t[n],o}function tn(e,t,n){const o=e.slice();return o[42]=t[n].title,o[43]=t[n].toDelete,o[44]=t[n].icon,o}function nn(e){let t,n,o;function s(t){e[23](t)}let r={item:e[15],disabled:!0};return void 0!==e[7]&&(r.value=e[7]),t=new ht({props:r}),H.push((()=>ce(t,"value",s))),{c(){de(t.$$.fragment)},m(e,n){ue(t,e,n),o=!0},p(e,o){const s={};!n&&128&o[0]&&(n=!0,s.value=e[7],U((()=>n=!1))),t.$set(s)},i(e){o||(se(t.$$.fragment,e),o=!0)},o(e){re(t.$$.fragment,e),o=!1},d(e){me(t,e)}}}function on(e){let t,n,o;function s(t){e[24](t)}let r={item:e[13],disabled:!0};return void 0!==e[6]&&(r.value=e[6]),t=new ht({props:r}),H.push((()=>ce(t,"value",s))),{c(){de(t.$$.fragment)},m(e,n){ue(t,e,n),o=!0},p(e,o){const s={};!n&&64&o[0]&&(n=!0,s.value=e[6],U((()=>n=!1))),t.$set(s)},i(e){o||(se(t.$$.fragment,e),o=!0)},o(e){re(t.$$.fragment,e),o=!1},d(e){me(t,e)}}}function sn(e){let t,n;return t=new Xt({props:{praefix:e[40],item:e[47],eventId:e[2],record:e[38],noForm:pn,classId:e[1],disabled:e[3],selectionFields:e[16]}}),t.$on("notify",(function(){h(e[18](e[47],e[40]))&&e[18](e[47],e[40]).apply(this,arguments)})),t.$on("task",e[25]),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(n,o){e=n;const s={};1&o[0]&&(s.item=e[47]),4&o[0]&&(s.eventId=e[2]),16&o[0]&&(s.record=e[38]),2&o[0]&&(s.classId=e[1]),8&o[0]&&(s.disabled=e[3]),t.$set(s)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){re(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function rn(e){let t,n,o=e[0].item,s=[];for(let t=0;t<o.length;t+=1)s[t]=sn(en(e,o,t));const r=e=>re(s[e],1,1,(()=>{s[e]=null}));return{c(){for(let e=0;e<s.length;e+=1)s[e].c();t=E()},m(e,o){for(let t=0;t<s.length;t+=1)s[t].m(e,o);x(e,t,o),n=!0},p(e,n){if(327711&n[0]){let i;for(o=e[0].item,i=0;i<o.length;i+=1){const r=en(e,o,i);s[i]?(s[i].p(r,n),se(s[i],1)):(s[i]=sn(r),s[i].c(),se(s[i],1),s[i].m(t.parentNode,t))}for(ne(),i=o.length;i<s.length;i+=1)r(i);oe()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)se(s[e]);n=!0}},o(e){s=s.filter(Boolean);for(let e=0;e<s.length;e+=1)re(s[e]);n=!1},d(e){I(s,e),e&&k(t)}}}function ln(e){let t,n,o=e[17](e[5],e[40])+"";return{c(){t=F("span"),n=S(o),N(t,"class","svelte-17omp3o"),L(t,"delete",e[38]._delete)},m(e,o){x(e,t,o),w(t,n)},p(e,s){32&s[0]&&o!==(o=e[17](e[5],e[40])+"")&&O(n,o),16&s[0]&&L(t,"delete",e[38]._delete)},d(e){e&&k(t)}}}function an(e){let t,n,o;var s=e[44];return s&&(t=new s({props:{size:"20"}})),{c(){t&&de(t.$$.fragment),n=C()},m(e,s){t&&ue(t,e,s),x(e,n,s),o=!0},p(e,o){if(s!==(s=e[44])){if(t){ne();const e=t;re(e.$$.fragment,1,0,(()=>{me(e,1)})),oe()}s?(t=new s({props:{size:"20"}}),de(t.$$.fragment),se(t.$$.fragment,1),ue(t,n.parentNode,n)):t=null}},i(e){o||(t&&se(t.$$.fragment,e),o=!0)},o(e){t&&re(t.$$.fragment,e),o=!1},d(e){e&&k(n),t&&me(t,e)}}}function cn(e){let t,n,o,s,r,i=!e[3]&&an(e);return{c(){t=F("span"),i&&i.c(),N(t,"class","pointer icon svelte-17omp3o"),N(t,"title",e[42]),t.hidden=n=e[40]===e[4].length-1||!(e[38]._delete^e[43])},m(n,l){x(n,t,l),i&&i.m(t,null),o=!0,s||(r=D(t,"click",e[19](e[40])),s=!0)},p(s,r){(e=s)[3]?i&&(ne(),re(i,1,1,(()=>{i=null})),oe()):i?(i.p(e,r),8&r[0]&&se(i,1)):(i=an(e),i.c(),se(i,1),i.m(t,null)),(!o||16&r[0]&&n!==(n=e[40]===e[4].length-1||!(e[38]._delete^e[43])))&&(t.hidden=n)},i(e){o||(se(i),o=!0)},o(e){re(i),o=!1},d(e){e&&k(t),i&&i.d(),s=!1,r()}}}function dn(e){let t,n,o,s,r;n=new e[9]({props:{$$slots:{default:[ln]},$$scope:{ctx:e}}}),n.$on("click",(function(){h(e[41])&&e[41].apply(this,arguments)}));let i=[{title:"löschen",toDelete:!0,icon:we},{title:"undo",toDelete:!1,icon:ve}],l=[];for(let t=0;t<2;t+=1)l[t]=cn(tn(e,i,t));const a=e=>re(l[e],1,1,(()=>{l[e]=null}));return{c(){t=F("div"),de(n.$$.fragment),o=E();for(let e=0;e<2;e+=1)l[e].c();s=E(),N(t,"class","accordion svelte-17omp3o"),N(t,"slot","handle")},m(e,i){x(e,t,i),ue(n,t,null),w(t,o);for(let e=0;e<2;e+=1)l[e].m(t,null);w(t,s),r=!0},p(o,r){e=o;const c={};if(48&r[0]|524288&r[1]&&(c.$$scope={dirty:r,ctx:e}),n.$set(c),524312&r[0]){let n;for(i=[{title:"löschen",toDelete:!0,icon:we},{title:"undo",toDelete:!1,icon:ve}],n=0;n<2;n+=1){const o=tn(e,i,n);l[n]?(l[n].p(o,r),se(l[n],1)):(l[n]=cn(o),l[n].c(),se(l[n],1),l[n].m(t,s))}for(ne(),n=2;n<2;n+=1)a(n);oe()}},i(e){if(!r){se(n.$$.fragment,e);for(let e=0;e<2;e+=1)se(l[e]);r=!0}},o(e){re(n.$$.fragment,e),l=l.filter(Boolean);for(let e=0;e<2;e+=1)re(l[e]);r=!1},d(e){e&&k(t),me(n),I(l,e)}}}function un(e){let t,n;return t=new e[11]({props:{$$slots:{handle:[dn,({toggle:e})=>({41:e}),({toggle:e})=>[0,e?1024:0]],default:[rn,({toggle:e})=>({41:e}),({toggle:e})=>[0,e?1024:0]]},$$scope:{ctx:e}}}),t.$on("panel-open",(function(){h(e[37])&&e[37].apply(this,arguments)})),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(n,o){e=n;const s={};63&o[0]|525312&o[1]&&(s.$$scope={dirty:o,ctx:e}),t.$set(s)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){re(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function mn(e){let t,n,o=e[4],s=[];for(let t=0;t<o.length;t+=1)s[t]=un(Zt(e,o,t));const r=e=>re(s[e],1,1,(()=>{s[e]=null}));return{c(){for(let e=0;e<s.length;e+=1)s[e].c();t=C()},m(e,o){for(let t=0;t<s.length;t+=1)s[t].m(e,o);x(e,t,o),n=!0},p(e,n){if(983103&n[0]|1088&n[1]){let i;for(o=e[4],i=0;i<o.length;i+=1){const r=Zt(e,o,i);s[i]?(s[i].p(r,n),se(s[i],1)):(s[i]=un(r),s[i].c(),se(s[i],1),s[i].m(t.parentNode,t))}for(ne(),i=o.length;i<s.length;i+=1)r(i);oe()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)se(s[e]);n=!0}},o(e){s=s.filter(Boolean);for(let e=0;e<s.length;e+=1)re(s[e]);n=!1},d(e){I(s,e),e&&k(t)}}}function fn(e){let t,n,o,s,r,i=e[14]&&function(e){let t,n;return t=new e[8]({props:{name:"Total Stunden",nameClass:"formField_italic",$$slots:{default:[nn]},$$scope:{ctx:e}}}),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};128&n[0]|524288&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){re(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}(e),l=e[12]&&function(e){let t,n;return t=new e[8]({props:{name:"Total Betrag",nameClass:"formField_italic",$$slots:{default:[on]},$$scope:{ctx:e}}}),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};64&n[0]|524288&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){re(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}(e);return s=new e[10]({props:{$$slots:{default:[mn,({closeOtherPanels:e})=>({37:e}),({closeOtherPanels:e})=>[0,e?64:0]]},$$scope:{ctx:e}}}),{c(){t=F("div"),i&&i.c(),n=E(),l&&l.c(),o=E(),de(s.$$.fragment),N(t,"class","formList")},m(e,a){x(e,t,a),i&&i.m(t,null),w(t,n),l&&l.m(t,null),w(t,o),ue(s,t,null),r=!0},p(e,t){e[14]&&i.p(e,t),e[12]&&l.p(e,t);const n={};63&t[0]|524352&t[1]&&(n.$$scope={dirty:t,ctx:e}),s.$set(n)},i(e){r||(se(i),se(l),se(s.$$.fragment,e),r=!0)},o(e){re(i),re(l),re(s.$$.fragment,e),r=!1},d(e){e&&k(t),i&&i.d(),l&&l.d(),me(s)}}}const pn=!0;function $n(e,n,o){let s,r;const{FormField:i,TextField:l,Button:a,Accordion:m,AccordionSection:f}=c,p=A();let{list:$}=n,{schema:g}=n,{record:h}=n,{classId:v}=n,{eventId:b}=n,{disabled:y}=n;const w=g.find((e=>"price"===e.name&&!e.properties?.hidden)),x=w&&g.find((e=>"quantity"===e.name));let k=0;const I=g.find((e=>"quantity"===e.name&&"h"===e.properties?.unit?.constant&&!e.properties?.hidden));let F=0;const _={};let S,E,C=[];g.filter((e=>e.selection)).map((e=>C.push({refClass:e.selection,value:""})));const D=(e,t)=>{if(!t)return;const n=g.find((e=>e.name===t)),s=n.properties.value.formula,{operator:r,argument:i}=s,l=i.map((t=>S[e][t.refItem]));let a=0;"$add"===r&&(a=l.reduce(((e,t)=>e+ +t))),"$subtract"===r&&(a=l.reduce(((e,t)=>{if(!e)return 0;if(!t)return 0;const[n,o]=e.split(":");e=o?(+n+ +o/60).toFixed(2):+n;const[s,r]=t.split(":");return s?e-=r?(+s+ +r/60).toFixed(2):+s:0}))),o(4,S[e][t]=(a||0).toFixed(n.properties.decimals||0),S)};E=g.filter((e=>e.refClass)).reduce((async(e,n)=>{e=await e;const o=g.filter((e=>e.refItem===n.refClass));if(!o?.length)return e;t.getSchemaByClass(n.refClass);const s={refClass:n.refClass,items:[]};return o.forEach((e=>{s.items.push(e.name)})),e.push(s),e}),[]);const N=async(e,t,n)=>{const s=(await E).find((e=>e.refClass===t.refClass));if(!s)return;const{refClass:r,items:i}=s;return n?Promise.all(i.map((n=>{let s="";const{refInput:i}=t;if(i&&S[e]){const[t,n]=i.split(".");s=n?S[e][n]:h[t]}if(i&&!s||O(e,n)){const s=g.find((e=>e.refClass===r)),i=S[e][s.name];if(t.selection){const s=Jn(t.selection+i.toString());if(s)return Promise.resolve(s).then((t=>o(4,S[e][n]=t[n],S)))}return Promise.resolve(Un(s.refClass,i)).then((t=>o(4,S[e][n]=t[n],S)))}}))):Promise.resolve(i.map((t=>{o(4,S[e][t]="",S)})))},O=(e,t)=>{let n=S[e][t];return"number"===g.find((e=>e.name===t)).type&&(n=Number(n||0)),!n};return g.filter((e=>e.properties?.value?.formula?.argument)).forEach((e=>{e.properties.value.formula.argument.forEach((t=>{const n=g.find((e=>e.name===t.refItem));n&&(n._formulaActor=e.name)}))})),e.$$set=e=>{"list"in e&&o(0,$=e.list),"schema"in e&&o(20,g=e.schema),"record"in e&&o(21,h=e.record),"classId"in e&&o(1,v=e.classId),"eventId"in e&&o(2,b=e.eventId),"disabled"in e&&o(3,y=e.disabled)},e.$$.update=()=>{2097153&e.$$.dirty[0]&&h&&o(4,S=(h[$.name]||[]).concat({})),16&e.$$.dirty[0]&&o(5,s=S),32&e.$$.dirty[0]&&s&&((()=>{if(I)o(7,F=S?.reduce(((e,t)=>e+(t._delete?0:+(t.quantity||0))),0)||0)})(),(()=>{if(w)o(6,k=S?.reduce(((e,t)=>{if(t.price){const n=(x?t.quantity??0:1)*(t.price??0);e+=t._delete?0:n}return e}),0)||0)})()),4194304&e.$$.dirty[0]&&(r=e=>_[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · "))},[$,v,b,y,S,s,k,F,i,a,m,f,w,{name:"amountValue",properties:{decimals:2}},I,{name:"hoursValue",properties:{decimals:2}},C,(e,t)=>{const n=e[t];return g.filter((e=>!e.properties?.hidden&&void 0!==n[e.name]&&"boolean"!==e.type&&"textarea"!==e.properties?.format)).map((e=>"object"===e.type?r(n[e.name]):"date"===e.type?d(n[e.name]):"datetime"===e.type?u(n[e.name]):n[e.name])).filter((e=>!!e)).join(" • ")||"+"},(e,t)=>({detail:n})=>{const{value:r,add:i,desc:l}=n;D(t,e._formulaActor);const a=C?.find((t=>t.refClass.split(":")[1].split(".")[0]===e.refClass));a&&(a.value=r),r&&S.length===t+1&&o(4,S=S.concat({})),l&&o(22,_[r]=l,_),N(t,e,r),o(5,s=S),p("save",{listName:$.name,value:S})},e=>()=>{o(4,S[e]._delete=!S[e]._delete,S)},g,h,_,function(e){F=e,o(7,F)},function(e){k=e,o(6,k)},function(t){q(e,t)}]}class gn extends $e{constructor(e){var t;super(),document.getElementById("svelte-17omp3o-style")||((t=F("style")).id="svelte-17omp3o-style",t.textContent=".accordion.svelte-17omp3o{display:flex}.formList .accordion > .btn{display:inline-block;width:97%;margin-bottom:1em;background-color:#F5F5F5}@media screen and (max-width: 600px){.formList .accordion > .btn{width:25em}}span.pointer.svelte-17omp3o{padding-top:1em}span.delete.svelte-17omp3o{text-decoration:line-through}.icon.svelte-17omp3o{margin-right:-0.75em}.formList .formField_italic{font-style:italic}",w(document.head,t)),pe(this,e,$n,fn,v,{list:0,schema:20,record:21,classId:1,eventId:2,disabled:3},[-1,-1])}}function hn(e,t,n){const o=e.slice();return o[16]=t[n],o}function vn(e){let t,n;return t=new Xt({props:{classId:e[2],item:e[16],listName:e[1].name,eventId:e[3],record:e[0],disabled:e[4]}}),t.$on("notify",e[10]),t.$on("task",e[12]),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),2&n&&(o.item=e[16]),2&n&&(o.listName=e[1].name),8&n&&(o.eventId=e[3]),1&n&&(o.record=e[0]),16&n&&(o.disabled=e[4]),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){re(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function bn(e){let t,n,o=e[1].item,s=[];for(let t=0;t<o.length;t+=1)s[t]=vn(hn(e,o,t));const r=e=>re(s[e],1,1,(()=>{s[e]=null}));return{c(){for(let e=0;e<s.length;e+=1)s[e].c();t=C()},m(e,o){for(let t=0;t<s.length;t+=1)s[t].m(e,o);x(e,t,o),n=!0},p(e,n){if(1055&n){let i;for(o=e[1].item,i=0;i<o.length;i+=1){const r=hn(e,o,i);s[i]?(s[i].p(r,n),se(s[i],1)):(s[i]=vn(r),s[i].c(),se(s[i],1),s[i].m(t.parentNode,t))}for(ne(),i=o.length;i<s.length;i+=1)r(i);oe()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)se(s[e]);n=!0}},o(e){s=s.filter(Boolean);for(let e=0;e<s.length;e+=1)re(s[e]);n=!1},d(e){I(s,e),e&&k(t)}}}function yn(e){let t,n,o=e[9](e[5])+"";return{c(){t=F("span"),n=S(o)},m(e,o){x(e,t,o),w(t,n)},p(e,t){32&t&&o!==(o=e[9](e[5])+"")&&O(n,o)},d(e){e&&k(t)}}}function wn(e){let t,n,o;return n=new e[6]({props:{$$slots:{default:[yn]},$$scope:{ctx:e}}}),n.$on("click",(function(){h(e[15])&&e[15].apply(this,arguments)})),{c(){t=F("div"),de(n.$$.fragment),N(t,"class","accordion svelte-148ktt9"),N(t,"slot","handle")},m(e,s){x(e,t,s),ue(n,t,null),o=!0},p(t,o){e=t;const s={};524320&o&&(s.$$scope={dirty:o,ctx:e}),n.$set(s)},i(e){o||(se(n.$$.fragment,e),o=!0)},o(e){re(n.$$.fragment,e),o=!1},d(e){e&&k(t),me(n)}}}function xn(e){let t,n;return t=new e[8]({props:{$$slots:{handle:[wn,({toggle:e})=>({15:e}),({toggle:e})=>e?32768:0],default:[bn,({toggle:e})=>({15:e}),({toggle:e})=>e?32768:0]},$$scope:{ctx:e}}}),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};557119&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){re(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function kn(e){let t,n,o;return n=new e[7]({props:{$$slots:{default:[xn]},$$scope:{ctx:e}}}),{c(){t=F("div"),de(n.$$.fragment),N(t,"class","formList")},m(e,s){x(e,t,s),ue(n,t,null),o=!0},p(e,[t]){const o={};524351&t&&(o.$$scope={dirty:t,ctx:e}),n.$set(o)},i(e){o||(se(n.$$.fragment,e),o=!0)},o(e){re(n.$$.fragment,e),o=!1},d(e){e&&k(t),me(n)}}}function In(e,t,n){const{Button:o,Accordion:s,AccordionSection:r}=c;let{list:i}=t,{schema:l}=t,{record:a}=t,{classId:m}=t,{eventId:f}=t,{disabled:p}=t;const $={};let g=a[i.name]||{};a[i.name]=g;const h=e=>$[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · ");return e.$$set=e=>{"list"in e&&n(1,i=e.list),"schema"in e&&n(11,l=e.schema),"record"in e&&n(0,a=e.record),"classId"in e&&n(2,m=e.classId),"eventId"in e&&n(3,f=e.eventId),"disabled"in e&&n(4,p=e.disabled)},[a,i,m,f,p,g,o,s,r,e=>l.filter((t=>void 0!==e[t.name]&&"boolean"!==t.type&&"textarea"!==t.properties?.format)).map((t=>"object"===t.type?h(t.name):"date"===t.type?d(e[t.name]):"datetime"===t.type?u(e[t.name]):e[t.name])).filter((e=>!!e)).join(" • ")||"+",({detail:e})=>{const[t,o]=e.itemName.split(".");if(!o)return;e.desc&&($[o]=e.desc);const s=a[t];n(0,a[t]={...s,[o]:e.value},a),n(5,g=a[t])},l,function(t){q(e,t)}]}class Fn extends $e{constructor(e){var t;super(),document.getElementById("svelte-148ktt9-style")||((t=F("style")).id="svelte-148ktt9-style",t.textContent=".accordion.svelte-148ktt9{display:flex}.formList .accordion > .btn{display:inline-block;width:97%;margin-bottom:1em;background-color:#F5F5F5}@media screen and (max-width: 600px){.formList .accordion > .btn{width:25em}}",w(document.head,t)),pe(this,e,In,kn,v,{list:1,schema:11,record:0,classId:2,eventId:3,disabled:4})}}const{Boolean:_n,document:Sn}=ae;function En(e,t,n){const o=e.slice();return o[39]=t[n],o}function Cn(e,t,n){const o=e.slice();return o[42]=t[n],o}function Dn(e){return{c:f,m:f,p:f,i:f,o:f,d:f}}function Nn(e){let t,n,o=e[38]&&function(e){let t,n,o,s,r,i,l,a,c,d,u,m,f,p,$,g,h,v=e[0].items,b=[];for(let t=0;t<v.length;t+=1)b[t]=jn(Cn(e,v,t));const _=e=>re(b[e],1,1,(()=>{b[e]=null}));let S=e[0].list&&zn(e);return m=new e[5]({props:{outline:!0,$$slots:{default:[Tn]},$$scope:{ctx:e}}}),m.$on("click",e[11]),p=new e[5]({props:{disabled:e[2],form:e[6],filled:!0,type:"submit",$$slots:{default:[Bn]},$$scope:{ctx:e}}}),{c(){t=F("section"),n=F("form"),o=F("input"),r=E();for(let e=0;e<b.length;e+=1)b[e].c();i=E(),S&&S.c(),l=E(),a=F("div"),c=F("small"),c.textContent=`${Xn}`,d=E(),u=F("div"),de(m.$$.fragment),f=E(),de(p.$$.fragment),N(o,"class",y(e[6])+" svelte-rovpm0"),N(o,"name","_id"),N(o,"type","hidden"),o.value=s=e[1]._id||"",N(n,"class",y(e[7])+" svelte-rovpm0"),N(n,"id",e[6]),N(a,"class","comment svelte-rovpm0"),N(u,"class","form--buttons svelte-rovpm0"),N(t,"class",y(e[8])+" svelte-rovpm0")},m(s,v){x(s,t,v),w(t,n),w(n,o),w(n,r);for(let e=0;e<b.length;e+=1)b[e].m(n,null);var y;w(n,i),S&&S.m(n,null),w(t,l),w(t,a),w(a,c),w(t,d),w(t,u),ue(m,u,null),w(u,f),ue(p,u,null),$=!0,g||(h=D(n,"submit",(y=e[10],function(e){return e.preventDefault(),y.call(this,e)})),g=!0)},p(e,t){if((!$||2&t[0]&&s!==(s=e[1]._id||""))&&(o.value=s),4167&t[0]){let o;for(v=e[0].items,o=0;o<v.length;o+=1){const s=Cn(e,v,o);b[o]?(b[o].p(s,t),se(b[o],1)):(b[o]=jn(s),b[o].c(),se(b[o],1),b[o].m(n,i))}for(ne(),o=v.length;o<b.length;o+=1)_(o);oe()}e[0].list?S?(S.p(e,t),1&t[0]&&se(S,1)):(S=zn(e),S.c(),se(S,1),S.m(n,null)):S&&(ne(),re(S,1,1,(()=>{S=null})),oe());const r={};16384&t[1]&&(r.$$scope={dirty:t,ctx:e}),m.$set(r);const l={};4&t[0]&&(l.disabled=e[2]),16384&t[1]&&(l.$$scope={dirty:t,ctx:e}),p.$set(l)},i(e){if(!$){for(let e=0;e<v.length;e+=1)se(b[e]);se(S),se(m.$$.fragment,e),se(p.$$.fragment,e),$=!0}},o(e){b=b.filter(_n);for(let e=0;e<b.length;e+=1)re(b[e]);re(S),re(m.$$.fragment,e),re(p.$$.fragment,e),$=!1},d(e){e&&k(t),I(b,e),S&&S.d(),me(m),me(p),g=!1,h()}}}(e);return{c(){o&&o.c(),t=C()},m(e,s){o&&o.m(e,s),x(e,t,s),n=!0},p(e,t){e[38]&&o.p(e,t)},i(e){n||(se(o),n=!0)},o(e){re(o),n=!1},d(e){o&&o.d(e),e&&k(t)}}}function On(e){let t,n;return t=new Xt({props:{classId:e[6],item:e[42],record:e[1],disabled:e[2],eventId:e[0].id}}),t.$on("task",e[12]),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.item=e[42]),2&n[0]&&(o.record=e[1]),4&n[0]&&(o.disabled=e[2]),1&n[0]&&(o.eventId=e[0].id),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){re(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function jn(e){let t,n,o="list"!==e[42].type&&On(e);return{c(){o&&o.c(),t=C()},m(e,s){o&&o.m(e,s),x(e,t,s),n=!0},p(e,n){"list"!==e[42].type?o?(o.p(e,n),1&n[0]&&se(o,1)):(o=On(e),o.c(),se(o,1),o.m(t.parentNode,t)):o&&(ne(),re(o,1,1,(()=>{o=null})),oe())},i(e){n||(se(o),n=!0)},o(e){re(o),n=!1},d(e){o&&o.d(e),e&&k(t)}}}function zn(e){let t,n,o=e[0].list,s=[];for(let t=0;t<o.length;t+=1)s[t]=Mn(En(e,o,t));const r=e=>re(s[e],1,1,(()=>{s[e]=null}));return{c(){for(let e=0;e<s.length;e+=1)s[e].c();t=C()},m(e,o){for(let t=0;t<s.length;t+=1)s[t].m(e,o);x(e,t,o),n=!0},p(e,n){if(8263&n[0]){let i;for(o=e[0].list,i=0;i<o.length;i+=1){const r=En(e,o,i);s[i]?(s[i].p(r,n),se(s[i],1)):(s[i]=Mn(r),s[i].c(),se(s[i],1),s[i].m(t.parentNode,t))}for(ne(),i=o.length;i<s.length;i+=1)r(i);oe()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)se(s[e]);n=!0}},o(e){s=s.filter(_n);for(let e=0;e<s.length;e+=1)re(s[e]);n=!1},d(e){I(s,e),e&&k(t)}}}function Ln(e){let t,n;return t=new Fn({props:{classId:e[6],list:e[39],eventId:e[0].id,schema:e[39].item,record:e[1],disabled:e[2]}}),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.list=e[39]),1&n[0]&&(o.eventId=e[0].id),1&n[0]&&(o.schema=e[39].item),2&n[0]&&(o.record=e[1]),4&n[0]&&(o.disabled=e[2]),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){re(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function Pn(e){let t,n;return t=new gn({props:{classId:e[6],list:e[39],eventId:e[0].id,schema:e[39].item,record:e[1],disabled:e[2]}}),t.$on("save",e[13]),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.list=e[39]),1&n[0]&&(o.eventId=e[0].id),1&n[0]&&(o.schema=e[39].item),2&n[0]&&(o.record=e[1]),4&n[0]&&(o.disabled=e[2]),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){re(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function Mn(e){let t,n,o,s,r,i;t=new e[4]({props:{text:e[39].designation}});const l=[Pn,Ln],a=[];function c(e,t){return"array"===e[39].type?0:1}return o=c(e),s=a[o]=l[o](e),{c(){de(t.$$.fragment),n=E(),s.c(),r=C()},m(e,s){ue(t,e,s),x(e,n,s),a[o].m(e,s),x(e,r,s),i=!0},p(e,n){const i={};1&n[0]&&(i.text=e[39].designation),t.$set(i);let d=o;o=c(e),o===d?a[o].p(e,n):(ne(),re(a[d],1,1,(()=>{a[d]=null})),oe(),s=a[o],s?s.p(e,n):(s=a[o]=l[o](e),s.c()),se(s,1),s.m(r.parentNode,r))},i(e){i||(se(t.$$.fragment,e),se(s),i=!0)},o(e){re(t.$$.fragment,e),re(s),i=!1},d(e){me(t,e),e&&k(n),a[o].d(e),e&&k(r)}}}function Tn(e){let t;return{c(){t=S("Abbrechen")},m(e,n){x(e,t,n)},d(e){e&&k(t)}}}function Bn(e){let t;return{c(){t=S("Speichern")},m(e,n){x(e,t,n)},d(e){e&&k(t)}}}function An(e){return{c:f,m:f,p:f,i:f,o:f,d:f}}function qn(e){let t,n,o,s;Sn.title=t=e[3];let r={ctx:e,current:null,token:null,hasCatch:!1,pending:An,then:Nn,catch:Dn,value:38,blocks:[,,,]};return ie(e[9](),r),{c(){n=E(),o=C(),r.block.c()},m(e,t){x(e,n,t),x(e,o,t),r.block.m(e,r.anchor=t),r.mount=()=>o.parentNode,r.anchor=o,s=!0},p(n,o){e=n,(!s||8&o[0])&&t!==(t=e[3])&&(Sn.title=t),le(r,e,o)},i(e){s||(se(r.block),s=!0)},o(e){for(let e=0;e<3;e+=1){re(r.blocks[e])}s=!1},d(e){e&&k(n),e&&k(o),r.block.d(e),r.token=null,r=null}}}let Wn=new Map,Hn=new Map,Rn=new Map;const Yn=(e,n)=>{const o=n;return Wn.has(o)||Wn.set(o,t.getTasksList(n).then((({data:e})=>e))),Wn.get(o)},Gn=(e,n,o)=>Hn.get(o)||Yn(e,n).then((n=>n.find((({_id:e})=>e===o))||t.getTaskList(e,o))).then((e=>(Hn.set(o,e),e))),Vn=(e,t)=>{Rn.set(e,t)},Jn=e=>Rn.get(e),Un=(e,n)=>Rn.get(n)||t.getTask(e,n).then((e=>(Rn.set(n,e),e))),Kn=(e,n)=>{if(!Wn.get(n))return;const o=n;Wn.set(o,t.getTasksList(n).then((({data:e})=>e)))},Qn=()=>{Wn=new Map,Hn=new Map,Rn=new Map};let Xn="";function Zn(e,o,a){let d,u,f,p;b(e,i,(e=>a(24,f=e))),b(e,l,(e=>a(25,p=e)));const{Divider:$,Button:g}=c,h=JSON.parse(s.getItem("Locale")),v=A();let y,w,{schema:x}=o,{recID:k}=o,{prevEventID:I=!1}=o,{prev:F=!1}=o,{taskId:_=!1}=o,{description:S=""}=o,{root:E=!1}=o,{readonly:C}=o,D={},N={},O="form-"+x.class+Math.floor(9e3*Math.random()+1e3).toString();const j=E?"fEmbedded":"fTask",z=E?"sEmbedded":"sTask",L=()=>{x.items.forEach((e=>{e.properties?.value?.concatenation&&P(e)}))},P=async e=>{const t=e.properties.value.concatenation;let n="";for(const e of t)void 0!==e.constant&&(n+=e.constant),"year"===e.variable&&(n+=(new Date).getFullYear()),e.refItemNext&&(n+=await M(e.refItemNext));a(1,D[e.name]=n,D)},M=async e=>{const[n,o]=e.offset?.split(",")||[0,0],s=+e.base||0,r=+e.step||1;e.type;const i=e.refItem,l=await t.getLastId(x.class,i);if(!l?.length)return(s+r).toString().padStart(o,"0");return((+l[0][i]?.substring(n,n+o)||s)+r).toString().padStart(o,"0")},T=(e,t)=>{const n=t.name,o=e.find((e=>e.name===n));let s=t.value;if(s&&o&&o.type.startsWith("date"))try{return function(e,t,n){const o=Math.floor((new Date).getFullYear()/100);let s=!1;if(""===e)return null;const r=t.split(It);let i=0,l=0;const a=new Date(0);for(const c of r){if(!e.startsWith(c,i))return n;if(i+=c.length,i===e.length){if(l!==t.length)return n;break}if("%"!==t[l+c.length])break;if(l+=c.length+1,"%"===t[l]){if("%"!==e[i])return n;i++}else if("p"===t[l].toLowerCase()){const t=e.substr(i,2).toUpperCase();if("AM"===t)s=!1,a.getHours()>=12&&a.setHours(a.getHours()-12);else{if("PM"!==t)return n;s=!0,a.getHours()<12&&a.setHours(a.getHours()+12)}}else{kt.lastIndex=i;const r=kt.exec(e);if(null==r)return n;switch(t[l]){case"H":a.setHours(parseInt(r[0])+12*s);break;case"M":a.setMinutes(r[0]);break;case"S":a.setSeconds(r[0]);break;case"d":a.setDate(r[0]);break;case"m":a.setMonth(r[0]-1);break;case"y":a.setFullYear(100*o+parseInt(r[0]));break;case"Y":a.setFullYear(r[0])}i+=r[0].length}l++}return isNaN(a.valueOf())?n:a}(s,"%d.%m.%Y").toISOString()}catch{return new Date(s).toISOString()}if(o&&"boolean"===o.type&&(s=!!t.checked),o&&"number"===o.type){const e=Number("1.1").toLocaleString(h.id).substring(1,2);try{s=Number(s.replace(e,".")).toString()}catch{}}return s},q=()=>E?window.singleSpaNavigate("/"):v("back"),W=async(e,n)=>{if(x.input?.length>1){if(x.input[0]!==e)return;if(n){const o=await t.getTaskOptions(`${e}:${n}`,x.id);a(1,D={...D,...o})}else{const e=x.input.slice(1);for(const t of e)a(1,D[t]=[],D)}}};return n.subscribe((async e=>{if(!e)return;if(!Wn.get(e.eventId))return;const n=await t.getTaskList(x.class,e.taskId);((e,t,n)=>{if(!Wn.get(e))return;const o=t;Hn.set(o,n)})(e.eventId,e.taskId,n)})),B(Qn),e.$$set=e=>{"schema"in e&&a(0,x=e.schema),"recID"in e&&a(18,k=e.recID),"prevEventID"in e&&a(16,I=e.prevEventID),"prev"in e&&a(19,F=e.prev),"taskId"in e&&a(17,_=e.taskId),"description"in e&&a(14,S=e.description),"root"in e&&a(20,E=e.root),"readonly"in e&&a(15,C=e.readonly)},e.$$.update=()=>{32768&e.$$.dirty[0]&&a(2,d=C),6291457&e.$$.dirty[0]&&w&&y&&x.items.map((({name:e,type:t})=>{const n=y.items.find((t=>t.name===e));if(!n)return;if(t!==n.type)return;const o="_"+e;w[e]&&a(1,D[e]=w[e],D),w[o]&&a(1,D[o]=w[o],D)})),1064960&e.$$.dirty[0]&&a(3,u=E?S||"enablerr - Form":document.title)},[x,D,d,u,$,g,O,j,z,async()=>{if(k&&(a(1,D=await t.getTask(x.class,k)),a(14,S=m(x,D))),I){a(15,C=!1),a(21,y=await t.getSchema(I)),"string"==typeof F&&a(22,w=await t.getTask(y.class,F));const e=x.items.find((e=>e.refClass===y.class));a(1,D[e.name]=w._id,D)}const e=await t.getEvent(x.id);if(e.trigger?.startOn&&!e.trigger?.startOn?.some((e=>"Manual"===e.type))&&a(15,C=!0),f.role?.length&&x.authorization?.length){const e=x.authorization.some((e=>p?.find((t=>t===e.role&&"edit"===e.activity))));a(15,C||=!e)}return k||L(),!0},async()=>{const e={};Array.from(document.querySelectorAll("form#"+O+" ."+O)).map((t=>{if(t.name)if(t.name.includes(".")){const[n,o]=t.name.split("."),s=x.list.find((e=>e.name===n));e[t.name]=T(s.item,t)}else e[t.name]=T(x.items,t)})),x.list&&x.list.map((t=>{"array"===t.type&&N[t.name]&&(e[t.name]=N[t.name].reduce(((e,n)=>n._delete||!Object.values(n).some(Boolean)?e:e.concat(Object.entries(n).reduce(((e,[n,o])=>("_delete"!==n&&(e[n]=T(t.item,{name:n,value:o,checked:o})),e)),{}))),[]))})),e._event=x.id,e._prevEventId=I,e._taskId=_;const{id:n,task:o,error:s}=await t.saveData(x.class,e);if(s?.text){const e=s.field?" in "+s.field+": "+s.value:"";return void r.failed(`${s.text} ${e}`,3e3)}r.success("Die Daten wurden gespeichert.",2e3),e._id=n;const i=await t.getTaskList(x.class,n);v("choose",{row:i}),E&&!k?window.singleSpaNavigate(`/task/${x.id}/${o}/task`):q()},()=>I?window.history.back():q(),async({detail:{row:e}})=>{if(k)return;const n=e._task.event,o=await t.getEvent(n),s=await t.getEvent(x.id),r=s.output.class[0].item.find((e=>e.name===o.output?.class[0]?.name));(s.input?.class?.at(0)?.name===o.output.class[0]?.name||r?.asInput)&&(a(21,y=await t.getSchema(n)),a(16,I=n),a(17,_=e._task._id),a(22,w=!!_&&await t.getTask(y.class,e._task.docId)),W(y.class,e?._task?.docId))},({detail:e})=>{N[e.listName]=e.value},S,C,I,_,k,F,E,y,w]}class eo extends $e{constructor(e){var t;super(),Sn.getElementById("svelte-rovpm0-style")||((t=F("style")).id="svelte-rovpm0-style",t.textContent="form.disabled.svelte-rovpm0 input.svelte-rovpm0{background-color:red !important}.comment.svelte-rovpm0.svelte-rovpm0{color:green;margin-bottom:1em}form.svelte-rovpm0.svelte-rovpm0{min-width:25em}@media only screen and (min-width: 600px){form.svelte-rovpm0.svelte-rovpm0{min-width:30em}}.fEmbedded.svelte-rovpm0.svelte-rovpm0,.fTask.svelte-rovpm0.svelte-rovpm0{overflow-y:auto;overflow-x:hidden}.fEmbedded.svelte-rovpm0.svelte-rovpm0{height:fit-content;min-height:30vh;max-height:60vh}.fTask.svelte-rovpm0.svelte-rovpm0{height:fit-content;max-height:70vh}.sTask.svelte-rovpm0.svelte-rovpm0{height:95%;display:inline-grid}.sTask.svelte-rovpm0 .btn.svelte-rovpm0{display:initial !important}.form--buttons.svelte-rovpm0.svelte-rovpm0{display:flex;gap:1em;padding-bottom:0.5em}",w(Sn.head,t)),pe(this,e,Zn,qn,v,{schema:0,recID:18,prevEventID:16,prev:19,taskId:17,description:14,root:20,readonly:15},[-1,-1])}}function to(e){let t,n,o;function s(t){e[4](t)}let r={schema:e[5],recID:e[6]};return void 0!==e[0]&&(r.description=e[0]),t=new eo({props:r}),H.push((()=>ce(t,"description",s))),t.$on("back",e[2]),{c(){de(t.$$.fragment)},m(e,n){ue(t,e,n),o=!0},p(e,o){const s={};32&o&&(s.schema=e[5]),64&o&&(s.recID=e[6]),!n&&1&o&&(n=!0,s.description=e[0],U((()=>n=!1))),t.$set(s)},i(e){o||(se(t.$$.fragment,e),o=!0)},o(e){re(t.$$.fragment,e),o=!1},d(e){me(t,e)}}}function no(e){let t,n;return t=new a({props:{update:e[1],description:e[0],$$slots:{default:[to,({prop:{schema:e,recID:t,eventID:n}})=>({5:e,6:t,7:n}),({prop:e})=>(e?32:0)|(e?64:0)|(e?128:0)]},$$scope:{ctx:e}}}),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,[n]){const o={};1&n&&(o.description=e[0]),353&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){re(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function oo(e,n,o){let s,{refresh:r}=n;return e.$$set=e=>{"refresh"in e&&o(3,r=e.refresh)},[s,(e,n)=>t.getSchema(e).then((t=>({schema:t,recID:n,eventID:e,title:t.identity.designation}))),e=>{},r,function(e){s=e,o(0,s)}]}function so(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ro,io,lo=(ro=function(e,t){function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function o(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?n(Object(o),!0).forEach((function(t){s(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("object"!==r(e))throw new Error("single-spa-svelte requires a configuration object");var t=o(o({},i),e);if(!t.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:l.bind(null,t,n),mount:a.bind(null,t,n),unmount:c.bind(null,t,n),update:d.bind(null,t,n)}};var i={component:null,domElementGetter:null,props:{}};function l(e){return Promise.resolve()}function a(e,t,n){var s=Object.keys(i),r=Object.keys(e).reduce((function(t,n){return s.includes(n)||(t[n]=e[n]),t}),{});return Promise.resolve().then((function(){var s=function(e,t){return(t=t&&t.customProps?t.customProps:t).domElement?function(){return t.domElement}:t.domElementGetter?function(){return t.domElementGetter(t)}:e.domElementGetter?function(){return e.domElementGetter(t)}:function(e){var t=e.appName||e.name;if(!t)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(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,document.body.appendChild(e)),e}}(t)}(e,n),i=s();t.instance=new e.component(o(o({},r),{},{target:i,props:Object.assign({},n,e.props)}))}))}function c(e,t){return Promise.resolve().then((function(){t.instance.$destroy?t.instance.$destroy():t.instance.destroy()}))}function d(e,t,n){return Promise.resolve().then((function(){t.instance.$set?t.instance.$set(n):t.instance.set(n)}))}},ro(io={exports:{}},io.exports),io.exports);const ao=so(lo)({component:class extends $e{constructor(e){super(),pe(this,e,oo,no,v,{refresh:3})}},domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:co,mount:uo,unmount:mo}=ao;e({bootstrap:co,mount:uo,unmount:mo});e("Form",eo),e("List",Ve)}}}));
|
|
1
|
+
System.register(["@enablerr-ui/form","@enablerr-ui/layout"],(function(e){"use strict";var t,n,o,r,s,i,l,a,c;return{setters:[function(e){t=e.Request,n=e.task_notification,o=e.TextArea,r=e.Storage,s=e.toasts,i=e.settings,l=e.currentRoles,a=e.Page},function(e){c=e.getAttractions}],execute:function(){e("version","0.2.199");const d=e("checkDate",((e,t)=>"string"!=typeof e||e.length<20||!(t=e.split(" · "))?e:t.map((e=>2===e.split("T").length&&3===e.split("T")[0].split("-").length?new Date(e).toLocaleDateString():e)).filter((e=>!!e)).join(" · "))),u=e=>{try{return new Date(e).toLocaleString()}catch{return e}},m=(e,t)=>{const n={...t};return(e.display?.reduce(((t,o)=>{let[r,s]=o.split(".");if(e.list?.find((({name:e})=>e===r))&&s&&void 0!==n[r]){const e=`${r}_${s}`;n[e]=n[r][s],r=e}return t.find((e=>e===r))||t.push(r),t}),[]).map((e=>d(n["_"+e]||n[e])))||e.items.map((e=>"object"===e.type?t["_"+e.name]:"list"===e.type?"":t[e.name]))).map((e=>e?.split(" · ").filter((e=>!!e)).join(" · "))).filter((e=>!!e)).join(" • ")};function f(){}function p(e){return e()}function $(){return Object.create(null)}function g(e){e.forEach(p)}function h(e){return"function"==typeof e}function v(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function b(e,t,n){e.$$.on_destroy.push(function(e,...t){if(null==e)return f;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function y(e){return null==e?"":e}function w(e,t){e.appendChild(t)}function x(e,t,n){e.insertBefore(t,n||null)}function k(e){e.parentNode.removeChild(e)}function I(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function F(e){return document.createElement(e)}function _(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function S(e){return document.createTextNode(e)}function E(){return S(" ")}function C(){return S("")}function D(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function N(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function O(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function j(e,t){e.value=null==t?"":t}function z(e,t,n,o){e.style.setProperty(t,n,o?"important":"")}function L(e,t,n){e.classList[n?"add":"remove"](t)}let P;function T(e){P=e}function M(){if(!P)throw new Error("Function called outside component initialization");return P}function B(e){M().$$.on_mount.push(e)}function A(){const e=M();return(t,n)=>{const o=e.$$.callbacks[t];if(o){const r=function(e,t){const n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!1,t),n}(t,n);o.slice().forEach((t=>{t.call(e,r)}))}}}function q(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e(t)))}const W=[],H=[],R=[],Y=[],G=Promise.resolve();let V=!1;function J(e){R.push(e)}function U(e){Y.push(e)}let K=!1;const Q=new Set;function X(){if(!K){K=!0;do{for(let e=0;e<W.length;e+=1){const t=W[e];T(t),Z(t.$$)}for(T(null),W.length=0;H.length;)H.pop()();for(let e=0;e<R.length;e+=1){const t=R[e];Q.has(t)||(Q.add(t),t())}R.length=0}while(W.length);for(;Y.length;)Y.pop()();V=!1,K=!1,Q.clear()}}function Z(e){if(null!==e.fragment){e.update(),g(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(J)}}const ee=new Set;let te;function ne(){te={r:0,c:[],p:te}}function oe(){te.r||g(te.c),te=te.p}function re(e,t){e&&e.i&&(ee.delete(e),e.i(t))}function se(e,t,n,o){if(e&&e.o){if(ee.has(e))return;ee.add(e),te&&te.c.push((()=>{ee.delete(e),o&&(n&&e.d(1),o())})),e.o(t)}}function ie(e,t){const n=t.token={};function o(e,o,r,s){if(t.token!==n)return;t.resolved=s;let i=t.ctx;void 0!==r&&(i=i.slice(),i[r]=s);const l=e&&(t.current=e)(i);let a=!1;t.block&&(t.blocks?t.blocks.forEach(((e,n)=>{n!==o&&e&&(ne(),se(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),oe())})):t.block.d(1),l.c(),re(l,1),l.m(t.mount(),t.anchor),a=!0),t.block=l,t.blocks&&(t.blocks[o]=l),a&&X()}if((r=e)&&"object"==typeof r&&"function"==typeof r.then){const n=M();if(e.then((e=>{T(n),o(t.then,1,t.value,e),T(null)}),(e=>{if(T(n),o(t.catch,2,t.error,e),T(null),!t.hasCatch)throw e})),t.current!==t.pending)return o(t.pending,0),!0}else{if(t.current!==t.then)return o(t.then,1,t.value,e),!0;t.resolved=e}var r}function le(e,t,n){const o=t.slice(),{resolved:r}=e;e.current===e.then&&(o[e.value]=r),e.current===e.catch&&(o[e.error]=r),e.block.p(o,n)}const ae="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function ce(e,t,n){const o=e.$$.props[t];void 0!==o&&(e.$$.bound[o]=n,n(e.$$.ctx[o]))}function de(e){e&&e.c()}function ue(e,t,n,o){const{fragment:r,on_mount:s,on_destroy:i,after_update:l}=e.$$;r&&r.m(t,n),o||J((()=>{const t=s.map(p).filter(h);i?i.push(...t):g(t),e.$$.on_mount=[]})),l.forEach(J)}function me(e,t){const n=e.$$;null!==n.fragment&&(g(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function fe(e,t){-1===e.$$.dirty[0]&&(W.push(e),V||(V=!0,G.then(X)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function pe(e,t,n,o,r,s,i=[-1]){const l=P;T(e);const a=e.$$={fragment:null,ctx:null,props:s,update:f,not_equal:r,bound:$(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(l?l.$$.context:t.context||[]),callbacks:$(),dirty:i,skip_bound:!1};let c=!1;if(a.ctx=n?n(e,t.props||{},((t,n,...o)=>{const s=o.length?o[0]:n;return a.ctx&&r(a.ctx[t],a.ctx[t]=s)&&(!a.skip_bound&&a.bound[t]&&a.bound[t](s),c&&fe(e,t)),n})):[],a.update(),c=!0,g(a.before_update),a.fragment=!!o&&o(a.ctx),t.target){if(t.hydrate){const e=function(e){return Array.from(e.childNodes)}(t.target);a.fragment&&a.fragment.l(e),e.forEach(k)}else a.fragment&&a.fragment.c();t.intro&&re(e.$$.fragment),ue(e,t.target,t.anchor,t.customElement),X()}T(l)}class $e{$destroy(){me(this,1),this.$destroy=f}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function ge(e){let t,n,o,r;return{c(){t=_("svg"),n=_("polyline"),o=_("path"),N(n,"points","9 10 4 15 9 20"),N(o,"d","M20 4v7a4 4 0 0 1-4 4H4"),N(t,"xmlns","http://www.w3.org/2000/svg"),N(t,"width",e[0]),N(t,"height",e[0]),N(t,"fill","none"),N(t,"viewBox","0 0 24 24"),N(t,"stroke","currentColor"),N(t,"stroke-width",e[1]),N(t,"stroke-linecap","round"),N(t,"stroke-linejoin","round"),N(t,"class",r="feather feather-corner-down-left "+e[2])},m(e,r){x(e,t,r),w(t,n),w(t,o)},p(e,[n]){1&n&&N(t,"width",e[0]),1&n&&N(t,"height",e[0]),2&n&&N(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-corner-down-left "+e[2])&&N(t,"class",r)},i:f,o:f,d(e){e&&k(t)}}}function he(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,s=e.class)},[o,r,s]}class ve extends $e{constructor(e){super(),pe(this,e,he,ge,v,{size:0,strokeWidth:1,class:2})}}function be(e){let t,n,o,r,s;return{c(){t=_("svg"),n=_("path"),o=_("line"),r=_("line"),N(n,"d","M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"),N(o,"x1","18"),N(o,"y1","9"),N(o,"x2","12"),N(o,"y2","15"),N(r,"x1","12"),N(r,"y1","9"),N(r,"x2","18"),N(r,"y2","15"),N(t,"xmlns","http://www.w3.org/2000/svg"),N(t,"width",e[0]),N(t,"height",e[0]),N(t,"fill","none"),N(t,"viewBox","0 0 24 24"),N(t,"stroke","currentColor"),N(t,"stroke-width",e[1]),N(t,"stroke-linecap","round"),N(t,"stroke-linejoin","round"),N(t,"class",s="feather feather-delete "+e[2])},m(e,s){x(e,t,s),w(t,n),w(t,o),w(t,r)},p(e,[n]){1&n&&N(t,"width",e[0]),1&n&&N(t,"height",e[0]),2&n&&N(t,"stroke-width",e[1]),4&n&&s!==(s="feather feather-delete "+e[2])&&N(t,"class",s)},i:f,o:f,d(e){e&&k(t)}}}function ye(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,s=e.class)},[o,r,s]}class we extends $e{constructor(e){super(),pe(this,e,ye,be,v,{size:0,strokeWidth:1,class:2})}}function xe(e){let t,n,o,r;return{c(){t=_("svg"),n=_("path"),o=_("path"),N(n,"d","M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"),N(o,"d","M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"),N(t,"xmlns","http://www.w3.org/2000/svg"),N(t,"width",e[0]),N(t,"height",e[0]),N(t,"fill","none"),N(t,"viewBox","0 0 24 24"),N(t,"stroke","currentColor"),N(t,"stroke-width",e[1]),N(t,"stroke-linecap","round"),N(t,"stroke-linejoin","round"),N(t,"class",r="feather feather-edit "+e[2])},m(e,r){x(e,t,r),w(t,n),w(t,o)},p(e,[n]){1&n&&N(t,"width",e[0]),1&n&&N(t,"height",e[0]),2&n&&N(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-edit "+e[2])&&N(t,"class",r)},i:f,o:f,d(e){e&&k(t)}}}function ke(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,s=e.class)},[o,r,s]}class Ie extends $e{constructor(e){super(),pe(this,e,ke,xe,v,{size:0,strokeWidth:1,class:2})}}function Fe(e){let t,n,o,r;return{c(){t=_("svg"),n=_("circle"),o=_("line"),N(n,"cx","11"),N(n,"cy","11"),N(n,"r","8"),N(o,"x1","21"),N(o,"y1","21"),N(o,"x2","16.65"),N(o,"y2","16.65"),N(t,"xmlns","http://www.w3.org/2000/svg"),N(t,"width",e[0]),N(t,"height",e[0]),N(t,"fill","none"),N(t,"viewBox","0 0 24 24"),N(t,"stroke","currentColor"),N(t,"stroke-width",e[1]),N(t,"stroke-linecap","round"),N(t,"stroke-linejoin","round"),N(t,"class",r="feather feather-search "+e[2])},m(e,r){x(e,t,r),w(t,n),w(t,o)},p(e,[n]){1&n&&N(t,"width",e[0]),1&n&&N(t,"height",e[0]),2&n&&N(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-search "+e[2])&&N(t,"class",r)},i:f,o:f,d(e){e&&k(t)}}}function _e(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,s=e.class)},[o,r,s]}class Se extends $e{constructor(e){super(),pe(this,e,_e,Fe,v,{size:0,strokeWidth:1,class:2})}}const{document:Ee}=ae;function Ce(e){e[19]=e[21].list,e[20]=e[21].items}function De(e,t,n){const o=e.slice();return o[22]=t[n],o}function Ne(e,t,n){const o=e.slice();return o[25]=t[n],o}function Oe(e,t,n){const o=e.slice();return o[25]=t[n],o}function je(e){return{c:f,m:f,p:f,i:f,o:f,d:f}}function ze(e){let t,n,o,r,s,i;Ce(e);let l=e[19]?.length&&Le(e),a=e[20]?.length&&Pe(e),c=e[19]?.length&&Be(e);return{c(){l&&l.c(),t=E(),n=F("div"),o=F("table"),a&&a.c(),r=E(),s=F("tbody"),c&&c.c(),N(o,"striped",""),N(o,"class","svelte-1c3ufb0"),N(n,"class","eList svelte-1c3ufb0")},m(e,d){l&&l.m(e,d),x(e,t,d),x(e,n,d),w(n,o),a&&a.m(o,null),w(o,r),w(o,s),c&&c.m(s,null),i=!0},p(e,n){Ce(e),e[19]?.length?l?(l.p(e,n),4&n&&re(l,1)):(l=Le(e),l.c(),re(l,1),l.m(t.parentNode,t)):l&&(ne(),se(l,1,1,(()=>{l=null})),oe()),e[20]?.length?a?a.p(e,n):(a=Pe(e),a.c(),a.m(o,r)):a&&(a.d(1),a=null),e[19]?.length?c?(c.p(e,n),4&n&&re(c,1)):(c=Be(e),c.c(),re(c,1),c.m(s,null)):c&&(ne(),se(c,1,1,(()=>{c=null})),oe())},i(e){i||(re(l),re(c),i=!0)},o(e){se(l),se(c),i=!1},d(e){l&&l.d(e),e&&k(t),e&&k(n),a&&a.d(),c&&c.d()}}}function Le(e){let t,n,o;return n=new e[5]({props:{value:""}}),n.$on("input",e[10]),{c(){t=S("Suchen: "),de(n.$$.fragment)},m(e,r){x(e,t,r),ue(n,e,r),o=!0},p:f,i(e){o||(re(n.$$.fragment,e),o=!0)},o(e){se(n.$$.fragment,e),o=!1},d(e){e&&k(t),me(n,e)}}}function Pe(e){let t,n,o,r=e[0]&&Te(),s=e[20],i=[];for(let t=0;t<s.length;t+=1)i[t]=Me(Oe(e,s,t));return{c(){t=F("thead"),n=F("tr"),r&&r.c(),o=E();for(let e=0;e<i.length;e+=1)i[e].c();N(n,"class","svelte-1c3ufb0"),N(t,"class","svelte-1c3ufb0")},m(e,s){x(e,t,s),w(t,n),r&&r.m(n,null),w(n,o);for(let e=0;e<i.length;e+=1)i[e].m(n,null)},p(e,t){if(e[0]?r||(r=Te(),r.c(),r.m(n,o)):r&&(r.d(1),r=null),260&t){let o;for(s=e[20],o=0;o<s.length;o+=1){const r=Oe(e,s,o);i[o]?i[o].p(r,t):(i[o]=Me(r),i[o].c(),i[o].m(n,null))}for(;o<i.length;o+=1)i[o].d(1);i.length=s.length}},d(e){e&&k(t),r&&r.d(),I(i,e)}}}function Te(e){let t;return{c(){t=F("th"),N(t,"class","svelte-1c3ufb0")},m(e,n){x(e,t,n)},d(e){e&&k(t)}}}function Me(e){let t,n,o=e[25]?.designation+"";return{c(){t=F("th"),n=S(o),N(t,"class","svelte-1c3ufb0")},m(e,o){x(e,t,o),w(t,n)},p(e,t){4&t&&o!==(o=e[25]?.designation+"")&&O(n,o)},d(e){e&&k(t)}}}function Be(e){let t,n,o=e[19],r=[];for(let t=0;t<o.length;t+=1)r[t]=He(De(e,o,t));const s=e=>se(r[e],1,1,(()=>{r[e]=null}));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=C()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);x(e,t,o),n=!0},p(e,n){if(3023&n){let i;for(o=e[19],i=0;i<o.length;i+=1){const s=De(e,o,i);r[i]?(r[i].p(s,n),re(r[i],1)):(r[i]=He(s),r[i].c(),re(r[i],1),r[i].m(t.parentNode,t))}for(ne(),i=o.length;i<r.length;i+=1)s(i);oe()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)re(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)se(r[e]);n=!1},d(e){I(r,e),e&&k(t)}}}function Ae(e){let t,n,o,r,s,i,l=e[0]&&qe(e),a=e[20],c=[];for(let t=0;t<a.length;t+=1)c[t]=We(Ne(e,a,t));return{c(){t=F("tr"),l&&l.c(),n=E();for(let e=0;e<c.length;e+=1)c[e].c();o=E(),N(t,"class","pointer svelte-1c3ufb0"),L(t,"active",e[22]._id===e[1])},m(a,d){x(a,t,d),l&&l.m(t,null),w(t,n);for(let e=0;e<c.length;e+=1)c[e].m(t,null);w(t,o),r=!0,s||(i=D(t,"click",(function(){h(e[7](e[22]))&&e[7](e[22]).apply(this,arguments)})),s=!0)},p(r,s){if((e=r)[0]?l?(l.p(e,s),1&s&&re(l,1)):(l=qe(e),l.c(),re(l,1),l.m(t,n)):l&&(ne(),se(l,1,1,(()=>{l=null})),oe()),324&s){let n;for(a=e[20],n=0;n<a.length;n+=1){const r=Ne(e,a,n);c[n]?c[n].p(r,s):(c[n]=We(r),c[n].c(),c[n].m(t,o))}for(;n<c.length;n+=1)c[n].d(1);c.length=a.length}262&s&&L(t,"active",e[22]._id===e[1])},i(e){r||(re(l),r=!0)},o(e){se(l),r=!1},d(e){e&&k(t),l&&l.d(),I(c,e),s=!1,i()}}}function qe(e){let t,n,o,r,s;return n=new Ie({props:{size:"18"}}),{c(){t=F("td"),de(n.$$.fragment),N(t,"id","editRow"),N(t,"class","svelte-1c3ufb0")},m(i,l){var a;x(i,t,l),ue(n,t,null),o=!0,r||(s=D(t,"click",(a=function(){h(e[9](e[22]))&&e[9](e[22]).apply(this,arguments)},function(e){return e.stopPropagation(),a.call(this,e)})),r=!0)},p(t,n){e=t},i(e){o||(re(n.$$.fragment,e),o=!0)},o(e){se(n.$$.fragment,e),o=!1},d(e){e&&k(t),me(n),r=!1,s()}}}function We(e){let t,n,o=e[6](e[22],e[25])+"";return{c(){t=F("td"),n=S(o),N(t,"class","svelte-1c3ufb0")},m(e,o){x(e,t,o),w(t,n)},p(e,t){4&t&&o!==(o=e[6](e[22],e[25])+"")&&O(n,o)},d(e){e&&k(t)}}}function He(e){let t,n,o=e[11](e[22],e[20],e[3]),r=o&&Ae(e);return{c(){r&&r.c(),t=C()},m(e,o){r&&r.m(e,o),x(e,t,o),n=!0},p(e,n){12&n&&(o=e[11](e[22],e[20],e[3])),o?r?(r.p(e,n),12&n&&re(r,1)):(r=Ae(e),r.c(),re(r,1),r.m(t.parentNode,t)):r&&(ne(),se(r,1,1,(()=>{r=null})),oe())},i(e){n||(re(r),n=!0)},o(e){se(r),n=!1},d(e){r&&r.d(e),e&&k(t)}}}function Re(e){let t,n;return t=new e[4]({}),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p:f,i(e){n||(re(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function Ye(e){let t,n,o,r={ctx:e,current:null,token:null,hasCatch:!1,pending:Re,then:ze,catch:je,value:21,blocks:[,,,]};return ie(n=e[2]&&e[8](),r),{c(){t=C(),r.block.c()},m(e,n){x(e,t,n),r.block.m(e,r.anchor=n),r.mount=()=>t.parentNode,r.anchor=t,o=!0},p(t,[o]){e=t,r.ctx=e,4&o&&n!==(n=e[2]&&e[8]())&&ie(n,r)||le(r,e,o)},i(e){o||(re(r.block),o=!0)},o(e){for(let e=0;e<3;e+=1){se(r.blocks[e])}o=!1},d(e){e&&k(t),r.block.d(e),r.token=null,r=null}}}function Ge(e,o,r){const s=A(),{Loading:i,TextField:l}=c;let{className:a}=o,{rowId:u}=o,{filterForReady:m=!1}=o,{showEdit:f=!1}=o,{selectionFields:p=!1}=o,$=!0,g="";const h=(e,t)=>t&&d(e[`_${t.name}`]||e[t.name]||""),v=t.getSchemaByClass(a),b=async(e,t,n,o)=>{const{value:r,refClass:s}=o,[i,l]=n.split("."),a=await Un(i,r);if(!a)return e;const c=a[l];return c?.length?c.map((n=>{let o=e?.find((e=>e._id===n[t]))||{};o={...o};for(const e in o)n[e]&&(o[e]=n[e]);for(const e in n)n[e]&&(o[e]=n[e]);return Vn(s+o._id.toString(),o),o})):e};B((()=>{const e=document.querySelector("tr.active");e&&e.scrollIntoView({block:"end",behavior:"smooth"})})),n.subscribe((async e=>{if(!e)return;const t=await v;e.eventId===t.id&&(Kn(t.class,e.eventId),r(2,$=!r(2,$=!1)))}));return e.$$set=e=>{"className"in e&&r(12,a=e.className),"rowId"in e&&r(1,u=e.rowId),"filterForReady"in e&&r(13,m=e.filterForReady),"showEdit"in e&&r(0,f=e.showEdit),"selectionFields"in e&&r(14,p=e.selectionFields)},[f,u,$,g,i,l,h,e=>()=>s("choose",{row:e}),async()=>{const e=await v;let t=await Yn(e.class,e.id);const n=p&&p?.find((t=>e.class===t.refClass.split(":")[0]));if(n&&n.value){const[o,s]=n.refClass.split(":");e.class===o&&(t=await b(t,o,s,n)),r(0,f=!t)}!p&&m&&(t=((e,t)=>"Information"===t.state.task?e:e.filter((e=>"WaitingForApproval"===e._task.status||"Ready"===e._task.status||"Closing"===e._task.status)))(t,e));let o=[],s=e.display;return s&&s.length?s.map((n=>{const[r,s]=n.split(".");let i=e.list?.find((e=>e.name===r))?.item.find((e=>e.name===s));i&&(i={...i},i.name=`${r}_${s}`,t=t.map((e=>(e[r]&&(e[i.name]=e[r][s]),e)))),i||(i=e.items.find((e=>e.name===r))),o.find((e=>e?.name===r))||o.push(i)})):o=e.items,{list:t,items:o}},e=>t=>{s("edit",e)},({detail:{value:e}})=>{r(3,g=e)},(e,t,n)=>{if(!n)return!0;for(const o of t)if(h(e,o)?.toLowerCase()?.includes(n))return!0;return!1},a,m,p]}class Ve extends $e{constructor(e){var t;super(),Ee.getElementById("svelte-1c3ufb0-style")||((t=F("style")).id="svelte-1c3ufb0-style",t.textContent=".eList.svelte-1c3ufb0.svelte-1c3ufb0{min-height:12em;height:fit-content;max-height:65vh;overflow:auto}.eList.svelte-1c3ufb0 #editRow.svelte-1c3ufb0{width:1em}.eList.svelte-1c3ufb0 table.svelte-1c3ufb0{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important;margin-top:1em}.eList.svelte-1c3ufb0 table thead.svelte-1c3ufb0{position:sticky;top:0;background:#326173;color:white}.eList.svelte-1c3ufb0 table tbody tr.svelte-1c3ufb0{height:2.3em}th.svelte-1c3ufb0.svelte-1c3ufb0,td.svelte-1c3ufb0.svelte-1c3ufb0{padding-left:0.4em;padding-right:0.4em}tr.pointer.svelte-1c3ufb0.svelte-1c3ufb0:hover{background-color:#DAE1E5}tr.active.svelte-1c3ufb0.svelte-1c3ufb0{color:#326173;background-color:#fcebd5}",w(Ee.head,t)),pe(this,e,Ge,Ye,v,{className:12,rowId:1,filterForReady:13,showEdit:0,selectionFields:14})}}function Je(e){return{c:f,m:f,p:f,i:f,o:f,d:f}}function Ue(e){let t,n,o=e[21]&&Ke(e);return{c(){o&&o.c(),t=C()},m(e,r){o&&o.m(e,r),x(e,t,r),n=!0},p(e,n){e[21]?o?(o.p(e,n),4&n&&re(o,1)):(o=Ke(e),o.c(),re(o,1),o.m(t.parentNode,t)):o&&(ne(),se(o,1,1,(()=>{o=null})),oe())},i(e){n||(re(o),n=!0)},o(e){se(o),n=!1},d(e){o&&o.d(e),e&&k(t)}}}function Ke(e){let t,n;return t=new e[8]({props:{title:e[11],class:"eList "+(e[6]?"form":""),$$slots:{default:[tt]},$$scope:{ctx:e}}}),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};64&n&&(o.class="eList "+(e[6]?"form":"")),4194559&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(re(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function Qe(e){let t,n;return t=new eo({props:{schema:e[1],recID:e[0],readonly:e[7]}}),t.$on("choose",(function(){h(e[16](e[21]))&&e[16](e[21]).apply(this,arguments)})),t.$on("back",e[13]),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(n,o){e=n;const r={};2&o&&(r.schema=e[1]),1&o&&(r.recID=e[0]),128&o&&(r.readonly=e[7]),t.$set(r)},i(e){n||(re(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function Xe(e){let t,n,o,r,s,i,l,a,c;return t=new e[9]({}),r=new e[10]({props:{outline:!0,$$slots:{default:[Ze]},$$scope:{ctx:e}}}),r.$on("click",e[14]),i=new e[10]({props:{filled:!0,$$slots:{default:[et]},$$scope:{ctx:e}}}),i.$on("click",e[15]),a=new Ve({props:{className:e[1].class,filterForReady:e[3],selectionFields:e[4],rowId:e[0],showEdit:e[5]}}),a.$on("edit",e[17]),a.$on("choose",e[18]),{c(){de(t.$$.fragment),n=E(),o=F("div"),de(r.$$.fragment),s=E(),de(i.$$.fragment),l=E(),de(a.$$.fragment),N(o,"class","form--buttons svelte-jb5mrh")},m(e,d){ue(t,e,d),x(e,n,d),x(e,o,d),ue(r,o,null),w(o,s),ue(i,o,null),x(e,l,d),ue(a,e,d),c=!0},p(e,t){const n={};4194304&t&&(n.$$scope={dirty:t,ctx:e}),r.$set(n);const o={};4194304&t&&(o.$$scope={dirty:t,ctx:e}),i.$set(o);const s={};2&t&&(s.className=e[1].class),8&t&&(s.filterForReady=e[3]),16&t&&(s.selectionFields=e[4]),1&t&&(s.rowId=e[0]),32&t&&(s.showEdit=e[5]),a.$set(s)},i(e){c||(re(t.$$.fragment,e),re(r.$$.fragment,e),re(i.$$.fragment,e),re(a.$$.fragment,e),c=!0)},o(e){se(t.$$.fragment,e),se(r.$$.fragment,e),se(i.$$.fragment,e),se(a.$$.fragment,e),c=!1},d(e){me(t,e),e&&k(n),e&&k(o),me(r),me(i),e&&k(l),me(a,e)}}}function Ze(e){let t;return{c(){t=S("Abbrechen")},m(e,n){x(e,t,n)},d(e){e&&k(t)}}}function et(e){let t;return{c(){t=S("Neu")},m(e,n){x(e,t,n)},d(e){e&&k(t)}}}function tt(e){let t,n,o,r;const s=[Xe,Qe],i=[];function l(e,t){return e[21].length&&!e[6]?0:1}return t=l(e),n=i[t]=s[t](e),{c(){n.c(),o=C()},m(e,n){i[t].m(e,n),x(e,o,n),r=!0},p(e,r){let a=t;t=l(e),t===a?i[t].p(e,r):(ne(),se(i[a],1,1,(()=>{i[a]=null})),oe(),n=i[t],n?n.p(e,r):(n=i[t]=s[t](e),n.c()),re(n,1),n.m(o.parentNode,o))},i(e){r||(re(n),r=!0)},o(e){se(n),r=!1},d(e){i[t].d(e),e&&k(o)}}}function nt(e){return{c:f,m:f,p:f,i:f,o:f,d:f}}function ot(e){let t,n,o,r={ctx:e,current:null,token:null,hasCatch:!1,pending:nt,then:Ue,catch:Je,value:21,blocks:[,,,]};return ie(n=e[12](e[2]),r),{c(){t=C(),r.block.c()},m(e,n){x(e,t,n),r.block.m(e,r.anchor=n),r.mount=()=>t.parentNode,r.anchor=t,o=!0},p(t,[o]){e=t,r.ctx=e,4&o&&n!==(n=e[12](e[2]))&&ie(n,r)||le(r,e,o)},i(e){o||(re(r.block),o=!0)},o(e){for(let e=0;e<3;e+=1){se(r.blocks[e])}o=!1},d(e){e&&k(t),r.block.d(e),r.token=null,r=null}}}function rt(e,t,n){const{Dialog:o,Divider:r,Button:s}=c,i=A();let{schema:l}=t,{recID:a}=t,{isOpening:d=!0}=t,{filterForReady:u=!1}=t,{selectionFields:m=!1}=t,{showEdit:f=!0}=t,p=l.identity.designation;l.class;let $,g=!1;return e.$$set=e=>{"schema"in e&&n(1,l=e.schema),"recID"in e&&n(0,a=e.recID),"isOpening"in e&&n(2,d=e.isOpening),"filterForReady"in e&&n(3,u=e.filterForReady),"selectionFields"in e&&n(4,m=e.selectionFields),"showEdit"in e&&n(5,f=e.showEdit)},[a,l,d,u,m,f,g,$,o,r,s,p,e=>e&&Yn(l.class,l.id),()=>{n(6,g=!1),a||i("back"),f||i("back")},()=>{n(6,g=!1),i("back")},()=>{n(0,a=!1),n(7,$=!1),n(6,g=!0)},e=>({detail:{row:e}})=>{let t=l.display;t&&t.length&&t.map((t=>{const[n,o]=t.split(".");let r=l.list?.find((e=>e.name===n))?.item.find((e=>e.name===o));if(r){e[`${n}_${o}`]=e[n][o]}})),i("choose",{row:e})},({detail:e})=>{n(7,$=!!e._task.visum||"Closed"===e._task.status),n(0,a=e._docId),n(6,g=!0)},function(t){q(e,t)}]}class st extends $e{constructor(e){var t;super(),document.getElementById("svelte-jb5mrh-style")||((t=F("style")).id="svelte-jb5mrh-style",t.textContent=".eList .flex button.btn{width:max-content !important}.dialog.eList{max-height:90vh}.form--buttons.svelte-jb5mrh{display:flex;gap:1em;padding:0.5em 0}",w(document.head,t)),pe(this,e,rt,ot,v,{schema:1,recID:0,isOpening:2,filterForReady:3,selectionFields:4,showEdit:5})}}function it(e){return{c:f,m:f,p:f,i:f,o:f,d:f}}function lt(e){let t,n,r,s,i,l,a,c,d,u,m;n=new o({props:{class:"full-width",id:e[10],value:e[1],rows:"1",disabled:e[2],style:"height:2.8em; padding-left:2em;padding-right:2em;overflow-y:hidden; resize:none;"}});let f=!e[2]&&at(e),p=!e[2]&&ct(e);function $(t){e[19](t)}let g={class:"tModal",noClickaway:!0,$$slots:{default:[dt]},$$scope:{ctx:e}};return void 0!==e[8]&&(g.open=e[8]),d=new e[9]({props:g}),H.push((()=>ce(d,"open",$))),{c(){t=F("div"),de(n.$$.fragment),r=E(),f&&f.c(),s=E(),i=F("input"),a=E(),p&&p.c(),c=E(),de(d.$$.fragment),N(i,"class",l=y(e[4]||e[5])+" svelte-axxims"),N(i,"id",e[3]),N(i,"name",e[3]),i.value=e[0],i.hidden=!0,i.disabled=e[2],z(t,"position","relative")},m(e,o){x(e,t,o),ue(n,t,null),w(t,r),f&&f.m(t,null),w(t,s),w(t,i),w(t,a),p&&p.m(t,null),x(e,c,o),ue(d,e,o),m=!0},p(e,o){const r={};2&o&&(r.value=e[1]),4&o&&(r.disabled=e[2]),n.$set(r),e[2]?f&&(ne(),se(f,1,1,(()=>{f=null})),oe()):f?(f.p(e,o),4&o&&re(f,1)):(f=at(e),f.c(),re(f,1),f.m(t,s)),(!m||48&o&&l!==(l=y(e[4]||e[5])+" svelte-axxims"))&&N(i,"class",l),(!m||8&o)&&N(i,"id",e[3]),(!m||8&o)&&N(i,"name",e[3]),(!m||1&o&&i.value!==e[0])&&(i.value=e[0]),(!m||4&o)&&(i.disabled=e[2]),e[2]?p&&(ne(),se(p,1,1,(()=>{p=null})),oe()):p?(p.p(e,o),4&o&&re(p,1)):(p=ct(e),p.c(),re(p,1),p.m(t,null));const a={};16777665&o&&(a.$$scope={dirty:o,ctx:e}),!u&&256&o&&(u=!0,a.open=e[8],U((()=>u=!1))),d.$set(a)},i(e){m||(re(n.$$.fragment,e),re(f),re(p),re(d.$$.fragment,e),m=!0)},o(e){se(n.$$.fragment,e),se(f),se(p),se(d.$$.fragment,e),m=!1},d(e){e&&k(t),me(n),f&&f.d(),p&&p.d(),e&&k(c),me(d,e)}}}function at(e){let t,n,o,r,s;return n=new Se({props:{size:"18"}}),{c(){t=F("span"),de(n.$$.fragment),N(t,"class","feather pointer svelte-axxims")},m(i,l){x(i,t,l),ue(n,t,null),o=!0,r||(s=[D(t,"click",e[12]),D(t,"choose",e[13])],r=!0)},p:f,i(e){o||(re(n.$$.fragment,e),o=!0)},o(e){se(n.$$.fragment,e),o=!1},d(e){e&&k(t),me(n),r=!1,g(s)}}}function ct(e){let t,n,o,r,s;return n=new we({props:{size:"18"}}),{c(){t=F("span"),de(n.$$.fragment),N(t,"class","feather2 pointer svelte-axxims")},m(i,l){x(i,t,l),ue(n,t,null),o=!0,r||(s=D(t,"click",e[15]),r=!0)},p:f,i(e){o||(re(n.$$.fragment,e),o=!0)},o(e){se(n.$$.fragment,e),o=!1},d(e){e&&k(t),me(n),r=!1,s()}}}function dt(e){let t,n;return t=new st({props:{schema:e[7],recID:e[0],isOpening:e[8],filterForReady:"true",selectionFields:e[6]}}),t.$on("choose",e[13]),t.$on("back",e[14]),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};128&n&&(o.schema=e[7]),1&n&&(o.recID=e[0]),256&n&&(o.isOpening=e[8]),64&n&&(o.selectionFields=e[6]),t.$set(o)},i(e){n||(re(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function ut(e){return{c:f,m:f,p:f,i:f,o:f,d:f}}function mt(e){let t,n,o={ctx:e,current:null,token:null,hasCatch:!1,pending:ut,then:lt,catch:it,value:23,blocks:[,,,]};return ie(e[11](),o),{c(){t=C(),o.block.c()},m(e,r){x(e,t,r),o.block.m(e,o.anchor=r),o.mount=()=>t.parentNode,o.anchor=t,n=!0},p(t,[n]){le(o,e=t,n)},i(e){n||(re(o.block),n=!0)},o(e){for(let e=0;e<3;e+=1){se(o.blocks[e])}n=!1},d(e){e&&k(t),o.block.d(e),o.token=null,o=null}}}function ft(e,n,o){const r=A(),{Modal:s}=c;let{id:i}=n,{item:l}=n,{value:a=""}=n,{desc:d=""}=n,{noForm:u=!1}=n,{classId:f}=n,{eventId:p}=n,{disabled:$}=n,{readonly:g}=n,{selectionFields:h}=n;const v="comment_"+i;let b,y=!1;$||=g;const w=()=>{o(8,y=!1)};return e.$$set=e=>{"id"in e&&o(3,i=e.id),"item"in e&&o(16,l=e.item),"value"in e&&o(0,a=e.value),"desc"in e&&o(1,d=e.desc),"noForm"in e&&o(4,u=e.noForm),"classId"in e&&o(5,f=e.classId),"eventId"in e&&o(17,p=e.eventId),"disabled"in e&&o(2,$=e.disabled),"readonly"in e&&o(18,g=e.readonly),"selectionFields"in e&&o(6,h=e.selectionFields)},e.$$.update=()=>{65665&e.$$.dirty&&a&&b&&Promise.resolve(Gn(l.refClass,b.id,a)).then((e=>{var t;(t=e)&&(o(1,d=m(b,t)),r("change",{value:a,description:d}),r("task",{row:t}))}))},[a,d,$,i,u,f,h,b,y,s,v,async()=>{if(o(7,b=await t.getSchemaByClass(l.refClass)),p&&a&&!$){(await t.getSchema(p)).input?.find((e=>e===l.refClass))&&o(2,$=!0)}return!0},function(){o(8,y=!0)},({detail:e})=>{o(0,a=e.row._id),w()},w,()=>{o(0,a=o(1,d="")),r("change",{value:a,description:d}),r("task",{row:{_task:{event:b.id,_id:!1}}})},l,p,g,function(e){y=e,o(8,y)}]}class pt extends $e{constructor(e){var t;super(),document.getElementById("svelte-axxims-style")||((t=F("style")).id="svelte-axxims-style",t.textContent=".feather.svelte-axxims{position:absolute;top:0.75em;left:0.5em;color:#4300b0}.feather2.svelte-axxims{position:absolute;top:0.75em;right:0.5em;color:#4300b0}.text-field textarea:disabled{padding-left:0.625em !important}",w(document.head,t)),pe(this,e,ft,mt,v,{id:3,item:16,value:0,desc:1,noForm:4,classId:5,eventId:17,disabled:2,readonly:18,selectionFields:6})}}function $t(e){let t,n,o;return n=new e[7]({props:{lang:e[8].id,class:"left",type:"string",inputClass:"txt-right"+(e[2]?"":" "+e[3]),id:e[0],name:e[1].name,value:e[6],step:e[9],pattern:e[5],placeholder:e[10],readonly:e[11],disabled:e[4]}}),n.$on("change",e[12]),n.$on("focus",e[13]),{c(){t=F("div"),de(n.$$.fragment),z(t,"position","relative"),z(t,"max-width","10em")},m(e,r){x(e,t,r),ue(n,t,null),o=!0},p(e,[t]){const o={};12&t&&(o.inputClass="txt-right"+(e[2]?"":" "+e[3])),1&t&&(o.id=e[0]),2&t&&(o.name=e[1].name),64&t&&(o.value=e[6]),32&t&&(o.pattern=e[5]),16&t&&(o.disabled=e[4]),n.$set(o)},i(e){o||(re(n.$$.fragment,e),o=!0)},o(e){se(n.$$.fragment,e),o=!1},d(e){e&&k(t),me(n)}}}function gt(e,t,n){let o;const s=A(),{TextField:i}=c;let{id:l}=t,{item:a}=t,{value:d}=t,{noForm:u=!1}=t,{classId:m}=t,{disabled:f}=t;const p=JSON.parse(r.getItem("Locale")),$=Number("1.1").toLocaleString(p.id).substring(1,2),{properties:g={}}=a;let{min:h,max:v,step:b,pattern:y,decimals:w=0,unit:x="",placeholder:k,hint:I,readonly:F}=g;y||(y=w?`[0-9]+([${$}][0-9]{1,${w}})?`:"[0-9]*");return e.$$set=e=>{"id"in e&&n(0,l=e.id),"item"in e&&n(1,a=e.item),"value"in e&&n(14,d=e.value),"noForm"in e&&n(2,u=e.noForm),"classId"in e&&n(3,m=e.classId),"disabled"in e&&n(4,f=e.disabled)},e.$$.update=()=>{16384&e.$$.dirty&&n(6,o=Number(d.toString().replace($,".")).toFixed(w).toString().replace(".",$))},[l,a,u,m,f,y,o,i,p,b,k,F,({detail:e})=>s("blur",{value:e.value}),({detail:e})=>{F||Number(d.toString().replace($,"."))||n(6,o="")},d]}class ht extends $e{constructor(e){super(),pe(this,e,gt,$t,v,{id:0,item:1,value:14,noForm:2,classId:3,disabled:4})}}function vt(e,t,n){const o=e.slice();return o[9]=t[n],o}function bt(e){let t,n,o,r=e[9]+"";return{c(){t=F("option"),n=S(r),t.__value=e[9],t.value=t.__value,t.selected=o=e[2]===e[9],N(t,"class","svelte-5xpzvo")},m(e,o){x(e,t,o),w(t,n)},p(e,n){4&n&&o!==(o=e[2]===e[9])&&(t.selected=o)},d(e){e&&k(t)}}}function yt(e){let t,n,o,r,s,i,l=e[5],a=[];for(let t=0;t<l.length;t+=1)a[t]=bt(vt(e,l,t));return{c(){t=F("select"),n=F("option");for(let e=0;e<a.length;e+=1)a[e].c();n.__value="",n.value=n.__value,N(n,"class","svelte-5xpzvo"),N(t,"class",o=y(e[3]||e[4])+" svelte-5xpzvo"),N(t,"id",e[0]),N(t,"name",r=e[1].name),N(t,"readonly",e[6])},m(o,r){x(o,t,r),w(t,n);for(let e=0;e<a.length;e+=1)a[e].m(t,null);s||(i=D(t,"change",e[7]),s=!0)},p(e,[n]){if(36&n){let o;for(l=e[5],o=0;o<l.length;o+=1){const r=vt(e,l,o);a[o]?a[o].p(r,n):(a[o]=bt(r),a[o].c(),a[o].m(t,null))}for(;o<a.length;o+=1)a[o].d(1);a.length=l.length}24&n&&o!==(o=y(e[3]||e[4])+" svelte-5xpzvo")&&N(t,"class",o),1&n&&N(t,"id",e[0]),2&n&&r!==(r=e[1].name)&&N(t,"name",r)},i:f,o:f,d(e){e&&k(t),I(a,e),s=!1,i()}}}function wt(e,t,n){const o=A();let{id:r}=t,{item:s}=t,{value:i}=t,{noForm:l=!1}=t,{classId:a}=t;const{enum:c,readonly:d}=s.properties;return e.$$set=e=>{"id"in e&&n(0,r=e.id),"item"in e&&n(1,s=e.item),"value"in e&&n(2,i=e.value),"noForm"in e&&n(3,l=e.noForm),"classId"in e&&n(4,a=e.classId)},[r,s,i,l,a,c,d,e=>o("blur",{value:e.srcElement.value})]}class xt extends $e{constructor(e){var t;super(),document.getElementById("svelte-5xpzvo-style")||((t=F("style")).id="svelte-5xpzvo-style",t.textContent="select.svelte-5xpzvo.svelte-5xpzvo{padding:0 0.625em 0.0625em;box-sizing:border-box;width:100%;border:0 solid rgba(0, 0, 0, 0.42);border-bottom-width:0px;border-bottom-width:0.0625em;border-top-left-radius:0.375em;border-top-right-radius:0.375em;background-color:#f5f5f5;outline:none;font-size:1rem;font-weight:300;height:2.8em}select.svelte-5xpzvo.svelte-5xpzvo:focus{border:none;border-bottom:2px solid #4300b0}select[readonly].svelte-5xpzvo option.svelte-5xpzvo{display:none}",w(document.head,t)),pe(this,e,wt,yt,v,{id:0,item:1,value:2,noForm:3,classId:4})}}const kt=/\d+/g,It=/%[HMSpPdmyY%]/g;function Ft(e){let t;return{c(){t=S("Stunden")},m(e,n){x(e,t,n)},d(e){e&&k(t)}}}function _t(e){let t,n;return t=new e[4]({props:{slot:"hours-label",$$slots:{default:[Ft]},$$scope:{ctx:e}}}),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(re(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function St(e){let t;return{c(){t=S("Minuten")},m(e,n){x(e,t,n)},d(e){e&&k(t)}}}function Et(e){let t,n;return t=new e[4]({props:{slot:"minutes-label",$$slots:{default:[St]},$$scope:{ctx:e}}}),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(re(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function Ct(e){let t;return{c(){t=S("Jetzt")},m(e,n){x(e,t,n)},d(e){e&&k(t)}}}function Dt(e){let t,n;return t=new e[4]({props:{slot:"now-label",$$slots:{default:[Ct]},$$scope:{ctx:e}}}),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(re(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function Nt(e){let t,n,o,r,s,i,l,a,c;return r=new e[5]({props:{value:e[0],closeOnSelection:!0}}),r.$on("change",e[8]),i=new e[6]({props:{value:e[0],$$slots:{"now-label":[Dt],"minutes-label":[Et],"hours-label":[_t]},$$scope:{ctx:e}}}),i.$on("change",e[7]),{c(){t=F("input"),o=E(),de(r.$$.fragment),s=E(),de(i.$$.fragment),N(t,"type","string"),N(t,"class",n=e[2]||e[3]),N(t,"id",e[1]),N(t,"name",e[1]),t.hidden=!0},m(n,d){x(n,t,d),j(t,e[0]),x(n,o,d),ue(r,n,d),x(n,s,d),ue(i,n,d),l=!0,a||(c=D(t,"input",e[9]),a=!0)},p(e,[o]){(!l||12&o&&n!==(n=e[2]||e[3]))&&N(t,"class",n),(!l||2&o)&&N(t,"id",e[1]),(!l||2&o)&&N(t,"name",e[1]),1&o&&j(t,e[0]);const s={};1&o&&(s.value=e[0]),r.$set(s);const a={};1&o&&(a.value=e[0]),4096&o&&(a.$$scope={dirty:o,ctx:e}),i.$set(a)},i(e){l||(re(r.$$.fragment,e),re(i.$$.fragment,e),l=!0)},o(e){se(r.$$.fragment,e),se(i.$$.fragment,e),l=!1},d(e){e&&k(t),e&&k(o),me(r,e),e&&k(s),me(i,e),a=!1,c()}}}function Ot(e,t,n){const o=A(),{Label:r,DatePicker:s,TimePicker:i}=c;let{value:l}=t,{id:a}=t,{noForm:d=!1}=t,{classId:u}=t;const m=e=>o("change",{value:e});return e.$$set=e=>{"value"in e&&n(0,l=e.value),"id"in e&&n(1,a=e.id),"noForm"in e&&n(2,d=e.noForm),"classId"in e&&n(3,u=e.classId)},[l,a,d,u,r,s,i,({detail:e})=>{var t,o;n(0,(t=e.value,o=l,l=null==t||null==o?t:(o.setHours(t.getHours(),t.getMinutes(),t.getSeconds()),o))),m(l)},({detail:e})=>{var t,o;n(0,(t=e.value,o=l,l=null==t||null==o?t:(o.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),o))),m(l)},function(){l=this.value,n(0,l)}]}class jt extends $e{constructor(e){super(),pe(this,e,Ot,Nt,v,{value:0,id:1,noForm:2,classId:3})}}function zt(e){let t,n,o;return n=new e[7]({props:{type:"string",inputClass:e[3]?"":" "+e[4],id:e[0],name:e[1].name,value:e[2],pattern:Lt,placeholder:Pt,readonly:e[5],disabled:e[6]}}),n.$on("change",e[8]),{c(){t=F("div"),de(n.$$.fragment),z(t,"max-width","4em")},m(e,r){x(e,t,r),ue(n,t,null),o=!0},p(e,[t]){const o={};24&t&&(o.inputClass=e[3]?"":" "+e[4]),1&t&&(o.id=e[0]),2&t&&(o.name=e[1].name),4&t&&(o.value=e[2]),32&t&&(o.readonly=e[5]),64&t&&(o.disabled=e[6]),n.$set(o)},i(e){o||(re(n.$$.fragment,e),o=!0)},o(e){se(n.$$.fragment,e),o=!1},d(e){e&&k(t),me(n)}}}const Lt="([01][0-9]|2[0-3]):([0-5][0-9])",Pt="";function Tt(e,t,n){const o=A(),{TextField:r}=c;let{id:s}=t,{item:i}=t,{value:l}=t,{noForm:a=!1}=t,{classId:d}=t,{readonly:u}=t,{disabled:m}=t;const f=e=>{if(!e)return"";const[t,n]=e.split(":");return 4===t.length?`${t.substr(0,2)}:${t.substring(2,4)}`:3===t.length?t.substring(0,2)>23?`0${t.substring(0,1)}:${t.substring(1,3)}`:`${t.substring(0,2)}:${t.substring(2,3)}0`:2===t.length?t>23?`0${t.substring(0,1)}:${t.substring(1,2)}0`:`${t}:${(n||"0").padStart(2,"0")}`:`0${t}:${(n||"0").padStart(2,"0")}`};return e.$$set=e=>{"id"in e&&n(0,s=e.id),"item"in e&&n(1,i=e.item),"value"in e&&n(2,l=e.value),"noForm"in e&&n(3,a=e.noForm),"classId"in e&&n(4,d=e.classId),"readonly"in e&&n(5,u=e.readonly),"disabled"in e&&n(6,m=e.disabled)},[s,i,l,a,d,u,m,r,({detail:e})=>{o("blur",{value:f(e.value)})}]}class Mt extends $e{constructor(e){super(),pe(this,e,Tt,zt,v,{id:0,item:1,value:2,noForm:3,classId:4,readonly:5,disabled:6})}}function Bt(e){let t,n;return t=new e[9]({props:{inputClass:e[1]||e[2],disabled:e[4],readonly:e[13],required:e[12],id:e[16],name:e[15],value:e[6]()}}),t.$on("change",e[18]()),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};6&n&&(o.inputClass=e[1]||e[2]),16&n&&(o.disabled=e[4]),64&n&&(o.value=e[6]()),t.$set(o)},i(e){n||(re(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function At(e){let t,n;return t=new e[9]({props:{inputClass:e[1]||e[2],disabled:e[4],readonly:e[13],required:e[12],type:"email",id:e[16],name:e[15],value:e[6]()}}),t.$on("change",e[18]()),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};6&n&&(o.inputClass=e[1]||e[2]),16&n&&(o.disabled=e[4]),64&n&&(o.value=e[6]()),t.$set(o)},i(e){n||(re(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function qt(e){let t,n;return t=new Mt({props:{inputClass:e[1]||e[2],disabled:e[4],readonly:e[13],required:e[12],id:e[16],item:e[0],value:e[6]()}}),t.$on("blur",e[18]()),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};6&n&&(o.inputClass=e[1]||e[2]),16&n&&(o.disabled=e[4]),1&n&&(o.item=e[0]),64&n&&(o.value=e[6]()),t.$set(o)},i(e){n||(re(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function Wt(e){let t,n;return t=new jt({props:{classId:e[2],id:e[16],disabled:e[4],required:e[12],value:e[17](),noForm:e[1]}}),t.$on("change",e[18]()),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),16&n&&(o.disabled=e[4]),2&n&&(o.noForm=e[1]),t.$set(o)},i(e){n||(re(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function Ht(e){let t,n;return t=new e[11]({props:{inputClass:e[1]||e[2],required:e[12],disabled:e[4],id:e[16],name:e[15],value:e[17](),closeOnSelection:!0}}),t.$on("change",e[18](!0)),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};6&n&&(o.inputClass=e[1]||e[2]),16&n&&(o.disabled=e[4]),t.$set(o)},i(e){n||(re(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function Rt(e){let t,n;return t=new e[10]({props:{inputClass:e[1]||e[2],disabled:e[4],readonly:e[13],required:e[12],id:e[16],name:e[15],value:e[6]()}}),t.$on("change",e[18]()),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};6&n&&(o.inputClass=e[1]||e[2]),16&n&&(o.disabled=e[4]),64&n&&(o.value=e[6]()),t.$set(o)},i(e){n||(re(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function Yt(e){let t,n;return t=new xt({props:{classId:e[2],disabled:e[4],required:e[12],id:e[16],item:e[0],value:e[6](),noForm:e[1]}}),t.$on("blur",e[18]()),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),16&n&&(o.disabled=e[4]),1&n&&(o.item=e[0]),64&n&&(o.value=e[6]()),2&n&&(o.noForm=e[1]),t.$set(o)},i(e){n||(re(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function Gt(e){let t,n;return t=new ht({props:{classId:e[2],disabled:e[4],required:e[12],readonly:e[13],id:e[16],item:e[0],value:e[6](),noForm:e[1]}}),t.$on("blur",e[18]()),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),16&n&&(o.disabled=e[4]),1&n&&(o.item=e[0]),64&n&&(o.value=e[6]()),2&n&&(o.noForm=e[1]),t.$set(o)},i(e){n||(re(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function Vt(e){let t,n;return t=new o({props:{classId:e[2],disabled:e[4],readonly:e[13],id:e[16],name:e[0].name,value:e[6](),noForm:e[1]}}),t.$on("blur",e[18]()),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),16&n&&(o.disabled=e[4]),1&n&&(o.name=e[0].name),64&n&&(o.value=e[6]()),2&n&&(o.noForm=e[1]),t.$set(o)},i(e){n||(re(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function Jt(e){let t,n;return t=new pt({props:{classId:e[2],eventId:e[3],disabled:e[4],readonly:e[13],id:e[16],item:e[0],desc:e[7],value:e[6](),noForm:e[1],selectionFields:e[5]}}),t.$on("task",e[23]),t.$on("change",e[18]()),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),8&n&&(o.eventId=e[3]),16&n&&(o.disabled=e[4]),1&n&&(o.item=e[0]),128&n&&(o.desc=e[7]),64&n&&(o.value=e[6]()),2&n&&(o.noForm=e[1]),32&n&&(o.selectionFields=e[5]),t.$set(o)},i(e){n||(re(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function Ut(e){let t,n,o,r;const s=[Jt,Vt,Gt,Yt,Rt,Ht,Wt,qt,At,Bt],i=[];function l(e,t){return"object"===e[0].type?0:"textarea"===e[0].type||e[0].properties&&"textarea"===e[0].properties.format?1:"number"===e[0].type?2:e[0].properties&&e[0].properties.enum?3:"boolean"===e[0].type?4:"date"===e[0].type?5:"datetime"===e[0].type?6:"time"===e[0].properties?.format?7:"email"===e[0].type?8:9}return t=l(e),n=i[t]=s[t](e),{c(){n.c(),o=C()},m(e,n){i[t].m(e,n),x(e,o,n),r=!0},p(e,r){let a=t;t=l(e),t===a?i[t].p(e,r):(ne(),se(i[a],1,1,(()=>{i[a]=null})),oe(),n=i[t],n?n.p(e,r):(n=i[t]=s[t](e),n.c()),re(n,1),n.m(o.parentNode,o))},i(e){r||(re(n),r=!0)},o(e){se(n),r=!1},d(e){i[t].d(e),e&&k(o)}}}function Kt(e){let t,n;return t=new e[8]({props:{id:e[19](e[16]),class:e[14]&&"hidden",name:e[0].designation,help:e[0].properties?.hint,$$slots:{default:[Ut]},$$scope:{ctx:e}}}),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,[n]){const o={};1&n&&(o.name=e[0].designation),1&n&&(o.help=e[0].properties?.hint),268435711&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(re(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function Qt(e,t,n){let o,r;const s=A(),{FormField:i,TextField:l,Switch:a,DatePicker:u,TimePicker:m}=c;let{praefix:f=""}=t,{item:p}=t,{listName:$=""}=t,{record:g}=t,{noForm:h=!1}=t,{classId:v}=t,{eventId:b}=t,{disabled:y}=t,{selectionFields:w}=t;const x=p.properties?.required,k=p.properties?.readonly,I=p.properties?.hidden;if("string"==typeof p.name){const[e,t]=p.name.split("_");t&&(p.name=t)}const F=($?$+".":"")+p.name,_=F+(""!==f?"-"+f:""),S=(e,t=F)=>{try{return t.split(".").reduce(((e,t)=>e[t]),e)}catch(e){return""}};return e.$$set=e=>{"praefix"in e&&n(21,f=e.praefix),"item"in e&&n(0,p=e.item),"listName"in e&&n(22,$=e.listName),"record"in e&&n(20,g=e.record),"noForm"in e&&n(1,h=e.noForm),"classId"in e&&n(2,v=e.classId),"eventId"in e&&n(3,b=e.eventId),"disabled"in e&&n(4,y=e.disabled),"selectionFields"in e&&n(5,w=e.selectionFields)},e.$$.update=()=>{1048576&e.$$.dirty&&n(6,o=(e=F)=>{let t=S(g);return void 0===t?"":t})},n(7,r=((e=F)=>{let t=g["_"+e];return t=d(t),void 0===t?"":t})()),[p,h,v,b,y,w,o,r,i,l,a,u,x,k,I,F,_,(e=F)=>{let t=S(g);return t?new Date(t):new Date},e=>({detail:t})=>{const o=t.value;n(20,g[F]=e?function(e,t){if(null==e)return null;let n=e.getHours();return/%p/i.test(t)&&(n%=12,0===n&&(n=12)),t.replace("%Y",e.getFullYear()).replace("%y",(e.getFullYear()%100).toString().padStart(2,"0")).replace("%m",(e.getMonth()+1).toString().padStart(2,"0")).replace("%d",e.getDate().toString().padStart(2,"0")).replace("%H",n.toString().padStart(2,"0")).replace("%M",e.getMinutes().toString().padStart(2,"0")).replace("%S",e.getSeconds().toString().padStart(2,"0")).replace("%p",e.getHours()<12?"am":"pm").replace("%P",e.getHours()<12?"AM":"PM").replace("%%","%")}(o,"%d.%m.%Y"):o,g);const r=Object.values(g).every((e=>!e))&&o;s("notify",{value:o,add:r,itemName:F,desc:t.description})},()=>"object"===p.type?"comment_"+_:_,g,f,$,function(t){q(e,t)}]}class Xt extends $e{constructor(e){var t;super(),document.getElementById("svelte-9h2mb5-style")||((t=F("style")).id="svelte-9h2mb5-style",t.textContent=".form-field{margin-bottom:1em !important}.form-field.hidden{display:none !important}.form-field > .description{padding-top:0.75em}.field .switch{padding-top:0.75em}",w(document.head,t)),pe(this,e,Qt,Kt,v,{praefix:21,item:0,listName:22,record:20,noForm:1,classId:2,eventId:3,disabled:4,selectionFields:5})}}function Zt(e,t,n){const o=e.slice();return o[38]=t[n],o[40]=n,o}function en(e,t,n){const o=e.slice();return o[47]=t[n],o}function tn(e,t,n){const o=e.slice();return o[42]=t[n].title,o[43]=t[n].toDelete,o[44]=t[n].icon,o}function nn(e){let t,n,o;function r(t){e[23](t)}let s={item:e[15],disabled:!0};return void 0!==e[7]&&(s.value=e[7]),t=new ht({props:s}),H.push((()=>ce(t,"value",r))),{c(){de(t.$$.fragment)},m(e,n){ue(t,e,n),o=!0},p(e,o){const r={};!n&&128&o[0]&&(n=!0,r.value=e[7],U((()=>n=!1))),t.$set(r)},i(e){o||(re(t.$$.fragment,e),o=!0)},o(e){se(t.$$.fragment,e),o=!1},d(e){me(t,e)}}}function on(e){let t,n,o;function r(t){e[24](t)}let s={item:e[13],disabled:!0};return void 0!==e[6]&&(s.value=e[6]),t=new ht({props:s}),H.push((()=>ce(t,"value",r))),{c(){de(t.$$.fragment)},m(e,n){ue(t,e,n),o=!0},p(e,o){const r={};!n&&64&o[0]&&(n=!0,r.value=e[6],U((()=>n=!1))),t.$set(r)},i(e){o||(re(t.$$.fragment,e),o=!0)},o(e){se(t.$$.fragment,e),o=!1},d(e){me(t,e)}}}function rn(e){let t,n;return t=new Xt({props:{praefix:e[40],item:e[47],eventId:e[2],record:e[38],noForm:pn,classId:e[1],disabled:e[3],selectionFields:e[16]}}),t.$on("notify",(function(){h(e[18](e[47],e[40]))&&e[18](e[47],e[40]).apply(this,arguments)})),t.$on("task",e[25]),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(n,o){e=n;const r={};1&o[0]&&(r.item=e[47]),4&o[0]&&(r.eventId=e[2]),16&o[0]&&(r.record=e[38]),2&o[0]&&(r.classId=e[1]),8&o[0]&&(r.disabled=e[3]),t.$set(r)},i(e){n||(re(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function sn(e){let t,n,o=e[0].item,r=[];for(let t=0;t<o.length;t+=1)r[t]=rn(en(e,o,t));const s=e=>se(r[e],1,1,(()=>{r[e]=null}));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=E()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);x(e,t,o),n=!0},p(e,n){if(327711&n[0]){let i;for(o=e[0].item,i=0;i<o.length;i+=1){const s=en(e,o,i);r[i]?(r[i].p(s,n),re(r[i],1)):(r[i]=rn(s),r[i].c(),re(r[i],1),r[i].m(t.parentNode,t))}for(ne(),i=o.length;i<r.length;i+=1)s(i);oe()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)re(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)se(r[e]);n=!1},d(e){I(r,e),e&&k(t)}}}function ln(e){let t,n,o=e[17](e[5],e[40])+"";return{c(){t=F("span"),n=S(o),N(t,"class","svelte-17omp3o"),L(t,"delete",e[38]._delete)},m(e,o){x(e,t,o),w(t,n)},p(e,r){32&r[0]&&o!==(o=e[17](e[5],e[40])+"")&&O(n,o),16&r[0]&&L(t,"delete",e[38]._delete)},d(e){e&&k(t)}}}function an(e){let t,n,o;var r=e[44];return r&&(t=new r({props:{size:"20"}})),{c(){t&&de(t.$$.fragment),n=C()},m(e,r){t&&ue(t,e,r),x(e,n,r),o=!0},p(e,o){if(r!==(r=e[44])){if(t){ne();const e=t;se(e.$$.fragment,1,0,(()=>{me(e,1)})),oe()}r?(t=new r({props:{size:"20"}}),de(t.$$.fragment),re(t.$$.fragment,1),ue(t,n.parentNode,n)):t=null}},i(e){o||(t&&re(t.$$.fragment,e),o=!0)},o(e){t&&se(t.$$.fragment,e),o=!1},d(e){e&&k(n),t&&me(t,e)}}}function cn(e){let t,n,o,r,s,i=!e[3]&&an(e);return{c(){t=F("span"),i&&i.c(),N(t,"class","pointer icon svelte-17omp3o"),N(t,"title",e[42]),t.hidden=n=e[40]===e[4].length-1||!(e[38]._delete^e[43])},m(n,l){x(n,t,l),i&&i.m(t,null),o=!0,r||(s=D(t,"click",e[19](e[40])),r=!0)},p(r,s){(e=r)[3]?i&&(ne(),se(i,1,1,(()=>{i=null})),oe()):i?(i.p(e,s),8&s[0]&&re(i,1)):(i=an(e),i.c(),re(i,1),i.m(t,null)),(!o||16&s[0]&&n!==(n=e[40]===e[4].length-1||!(e[38]._delete^e[43])))&&(t.hidden=n)},i(e){o||(re(i),o=!0)},o(e){se(i),o=!1},d(e){e&&k(t),i&&i.d(),r=!1,s()}}}function dn(e){let t,n,o,r,s;n=new e[9]({props:{$$slots:{default:[ln]},$$scope:{ctx:e}}}),n.$on("click",(function(){h(e[41])&&e[41].apply(this,arguments)}));let i=[{title:"löschen",toDelete:!0,icon:we},{title:"undo",toDelete:!1,icon:ve}],l=[];for(let t=0;t<2;t+=1)l[t]=cn(tn(e,i,t));const a=e=>se(l[e],1,1,(()=>{l[e]=null}));return{c(){t=F("div"),de(n.$$.fragment),o=E();for(let e=0;e<2;e+=1)l[e].c();r=E(),N(t,"class","accordion svelte-17omp3o"),N(t,"slot","handle")},m(e,i){x(e,t,i),ue(n,t,null),w(t,o);for(let e=0;e<2;e+=1)l[e].m(t,null);w(t,r),s=!0},p(o,s){e=o;const c={};if(48&s[0]|524288&s[1]&&(c.$$scope={dirty:s,ctx:e}),n.$set(c),524312&s[0]){let n;for(i=[{title:"löschen",toDelete:!0,icon:we},{title:"undo",toDelete:!1,icon:ve}],n=0;n<2;n+=1){const o=tn(e,i,n);l[n]?(l[n].p(o,s),re(l[n],1)):(l[n]=cn(o),l[n].c(),re(l[n],1),l[n].m(t,r))}for(ne(),n=2;n<2;n+=1)a(n);oe()}},i(e){if(!s){re(n.$$.fragment,e);for(let e=0;e<2;e+=1)re(l[e]);s=!0}},o(e){se(n.$$.fragment,e),l=l.filter(Boolean);for(let e=0;e<2;e+=1)se(l[e]);s=!1},d(e){e&&k(t),me(n),I(l,e)}}}function un(e){let t,n;return t=new e[11]({props:{$$slots:{handle:[dn,({toggle:e})=>({41:e}),({toggle:e})=>[0,e?1024:0]],default:[sn,({toggle:e})=>({41:e}),({toggle:e})=>[0,e?1024:0]]},$$scope:{ctx:e}}}),t.$on("panel-open",(function(){h(e[37])&&e[37].apply(this,arguments)})),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(n,o){e=n;const r={};63&o[0]|525312&o[1]&&(r.$$scope={dirty:o,ctx:e}),t.$set(r)},i(e){n||(re(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function mn(e){let t,n,o=e[4],r=[];for(let t=0;t<o.length;t+=1)r[t]=un(Zt(e,o,t));const s=e=>se(r[e],1,1,(()=>{r[e]=null}));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=C()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);x(e,t,o),n=!0},p(e,n){if(983103&n[0]|1088&n[1]){let i;for(o=e[4],i=0;i<o.length;i+=1){const s=Zt(e,o,i);r[i]?(r[i].p(s,n),re(r[i],1)):(r[i]=un(s),r[i].c(),re(r[i],1),r[i].m(t.parentNode,t))}for(ne(),i=o.length;i<r.length;i+=1)s(i);oe()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)re(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)se(r[e]);n=!1},d(e){I(r,e),e&&k(t)}}}function fn(e){let t,n,o,r,s,i=e[14]&&function(e){let t,n;return t=new e[8]({props:{name:"Total Stunden",nameClass:"formField_italic",$$slots:{default:[nn]},$$scope:{ctx:e}}}),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};128&n[0]|524288&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(re(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}(e),l=e[12]&&function(e){let t,n;return t=new e[8]({props:{name:"Total Betrag",nameClass:"formField_italic",$$slots:{default:[on]},$$scope:{ctx:e}}}),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};64&n[0]|524288&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(re(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}(e);return r=new e[10]({props:{$$slots:{default:[mn,({closeOtherPanels:e})=>({37:e}),({closeOtherPanels:e})=>[0,e?64:0]]},$$scope:{ctx:e}}}),{c(){t=F("div"),i&&i.c(),n=E(),l&&l.c(),o=E(),de(r.$$.fragment),N(t,"class","formList")},m(e,a){x(e,t,a),i&&i.m(t,null),w(t,n),l&&l.m(t,null),w(t,o),ue(r,t,null),s=!0},p(e,t){e[14]&&i.p(e,t),e[12]&&l.p(e,t);const n={};63&t[0]|524352&t[1]&&(n.$$scope={dirty:t,ctx:e}),r.$set(n)},i(e){s||(re(i),re(l),re(r.$$.fragment,e),s=!0)},o(e){se(i),se(l),se(r.$$.fragment,e),s=!1},d(e){e&&k(t),i&&i.d(),l&&l.d(),me(r)}}}const pn=!0;function $n(e,n,o){let r,s;const{FormField:i,TextField:l,Button:a,Accordion:m,AccordionSection:f}=c,p=A();let{list:$}=n,{schema:g}=n,{record:h}=n,{classId:v}=n,{eventId:b}=n,{disabled:y}=n;const w=g.find((e=>"price"===e.name&&!e.properties?.hidden)),x=w&&g.find((e=>"quantity"===e.name));let k=0;const I=g.find((e=>"quantity"===e.name&&"h"===e.properties?.unit?.constant&&!e.properties?.hidden));let F=0;const _={};let S,E,C=[];g.filter((e=>e.selection)).map((e=>C.push({refClass:e.selection,value:""})));const D=(e,t)=>{if(!t)return;const n=g.find((e=>e.name===t)),r=n.properties.value.formula,{operator:s,argument:i}=r,l=i.map((t=>S[e][t.refItem]));let a=0;"$add"===s&&(a=l.reduce(((e,t)=>e+ +t))),"$subtract"===s&&(a=l.reduce(((e,t)=>{if(!e)return 0;if(!t)return 0;const[n,o]=e.split(":");e=o?(+n+ +o/60).toFixed(2):+n;const[r,s]=t.split(":");return r?e-=s?(+r+ +s/60).toFixed(2):+r:0}))),o(4,S[e][t]=(a||0).toFixed(n.properties.decimals||0),S)};E=g.filter((e=>e.refClass)).reduce((async(e,n)=>{e=await e;const o=g.filter((e=>e.refItem===n.refClass));if(!o?.length)return e;t.getSchemaByClass(n.refClass);const r={refClass:n.refClass,items:[]};return o.forEach((e=>{r.items.push(e.name)})),e.push(r),e}),[]);const N=async(e,t,n)=>{const r=(await E).find((e=>e.refClass===t.refClass));if(!r)return;const{refClass:s,items:i}=r;return n?Promise.all(i.map((n=>{let r="";const{refInput:i}=t;if(i&&S[e]){const[t,n]=i.split(".");r=n?S[e][n]:h[t]}if(i&&!r||O(e,n)){const r=g.find((e=>e.refClass===s)),i=S[e][r.name];if(t.selection){const r=Jn(t.selection+i.toString());if(r)return Promise.resolve(r).then((t=>o(4,S[e][n]=t[n],S)))}return Promise.resolve(Un(r.refClass,i)).then((t=>o(4,S[e][n]=t[n],S)))}}))):Promise.resolve(i.map((t=>{o(4,S[e][t]="",S)})))},O=(e,t)=>{let n=S[e][t];return"number"===g.find((e=>e.name===t)).type&&(n=Number(n||0)),!n};return g.filter((e=>e.properties?.value?.formula?.argument)).forEach((e=>{e.properties.value.formula.argument.forEach((t=>{const n=g.find((e=>e.name===t.refItem));n&&(n._formulaActor=e.name)}))})),e.$$set=e=>{"list"in e&&o(0,$=e.list),"schema"in e&&o(20,g=e.schema),"record"in e&&o(21,h=e.record),"classId"in e&&o(1,v=e.classId),"eventId"in e&&o(2,b=e.eventId),"disabled"in e&&o(3,y=e.disabled)},e.$$.update=()=>{2097153&e.$$.dirty[0]&&h&&o(4,S=(h[$.name]||[]).concat({})),16&e.$$.dirty[0]&&o(5,r=S),32&e.$$.dirty[0]&&r&&((()=>{if(I)o(7,F=S?.reduce(((e,t)=>e+(t._delete?0:+(t.quantity||0))),0)||0)})(),(()=>{if(w)o(6,k=S?.reduce(((e,t)=>{if(t.price){const n=(x?t.quantity??0:1)*(t.price??0);e+=t._delete?0:n}return e}),0)||0)})()),4194304&e.$$.dirty[0]&&(s=e=>_[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · "))},[$,v,b,y,S,r,k,F,i,a,m,f,w,{name:"amountValue",properties:{decimals:2}},I,{name:"hoursValue",properties:{decimals:2}},C,(e,t)=>{const n=e[t];return g.filter((e=>!e.properties?.hidden&&void 0!==n[e.name]&&"boolean"!==e.type&&"textarea"!==e.properties?.format)).map((e=>"object"===e.type?s(n[e.name]):"date"===e.type?d(n[e.name]):"datetime"===e.type?u(n[e.name]):n[e.name])).filter((e=>!!e)).join(" • ")||"+"},(e,t)=>({detail:n})=>{const{value:s,add:i,desc:l}=n;D(t,e._formulaActor);const a=C?.find((t=>t.refClass.split(":")[1].split(".")[0]===e.refClass));a&&(a.value=s),s&&S.length===t+1&&o(4,S=S.concat({})),l&&o(22,_[s]=l,_),N(t,e,s),o(5,r=S),p("save",{listName:$.name,value:S})},e=>()=>{o(4,S[e]._delete=!S[e]._delete,S)},g,h,_,function(e){F=e,o(7,F)},function(e){k=e,o(6,k)},function(t){q(e,t)}]}class gn extends $e{constructor(e){var t;super(),document.getElementById("svelte-17omp3o-style")||((t=F("style")).id="svelte-17omp3o-style",t.textContent=".accordion.svelte-17omp3o{display:flex}.formList .accordion > .btn{display:inline-block;width:97%;margin-bottom:1em;background-color:#F5F5F5}@media screen and (max-width: 600px){.formList .accordion > .btn{width:25em}}span.pointer.svelte-17omp3o{padding-top:1em}span.delete.svelte-17omp3o{text-decoration:line-through}.icon.svelte-17omp3o{margin-right:-0.75em}.formList .formField_italic{font-style:italic}",w(document.head,t)),pe(this,e,$n,fn,v,{list:0,schema:20,record:21,classId:1,eventId:2,disabled:3},[-1,-1])}}function hn(e,t,n){const o=e.slice();return o[16]=t[n],o}function vn(e){let t,n;return t=new Xt({props:{classId:e[2],item:e[16],listName:e[1].name,eventId:e[3],record:e[0],disabled:e[4]}}),t.$on("notify",e[10]),t.$on("task",e[12]),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),2&n&&(o.item=e[16]),2&n&&(o.listName=e[1].name),8&n&&(o.eventId=e[3]),1&n&&(o.record=e[0]),16&n&&(o.disabled=e[4]),t.$set(o)},i(e){n||(re(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function bn(e){let t,n,o=e[1].item,r=[];for(let t=0;t<o.length;t+=1)r[t]=vn(hn(e,o,t));const s=e=>se(r[e],1,1,(()=>{r[e]=null}));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=C()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);x(e,t,o),n=!0},p(e,n){if(1055&n){let i;for(o=e[1].item,i=0;i<o.length;i+=1){const s=hn(e,o,i);r[i]?(r[i].p(s,n),re(r[i],1)):(r[i]=vn(s),r[i].c(),re(r[i],1),r[i].m(t.parentNode,t))}for(ne(),i=o.length;i<r.length;i+=1)s(i);oe()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)re(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)se(r[e]);n=!1},d(e){I(r,e),e&&k(t)}}}function yn(e){let t,n,o=e[9](e[5])+"";return{c(){t=F("span"),n=S(o)},m(e,o){x(e,t,o),w(t,n)},p(e,t){32&t&&o!==(o=e[9](e[5])+"")&&O(n,o)},d(e){e&&k(t)}}}function wn(e){let t,n,o;return n=new e[6]({props:{$$slots:{default:[yn]},$$scope:{ctx:e}}}),n.$on("click",(function(){h(e[15])&&e[15].apply(this,arguments)})),{c(){t=F("div"),de(n.$$.fragment),N(t,"class","accordion svelte-148ktt9"),N(t,"slot","handle")},m(e,r){x(e,t,r),ue(n,t,null),o=!0},p(t,o){e=t;const r={};524320&o&&(r.$$scope={dirty:o,ctx:e}),n.$set(r)},i(e){o||(re(n.$$.fragment,e),o=!0)},o(e){se(n.$$.fragment,e),o=!1},d(e){e&&k(t),me(n)}}}function xn(e){let t,n;return t=new e[8]({props:{$$slots:{handle:[wn,({toggle:e})=>({15:e}),({toggle:e})=>e?32768:0],default:[bn,({toggle:e})=>({15:e}),({toggle:e})=>e?32768:0]},$$scope:{ctx:e}}}),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};557119&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(re(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function kn(e){let t,n,o;return n=new e[7]({props:{$$slots:{default:[xn]},$$scope:{ctx:e}}}),{c(){t=F("div"),de(n.$$.fragment),N(t,"class","formList")},m(e,r){x(e,t,r),ue(n,t,null),o=!0},p(e,[t]){const o={};524351&t&&(o.$$scope={dirty:t,ctx:e}),n.$set(o)},i(e){o||(re(n.$$.fragment,e),o=!0)},o(e){se(n.$$.fragment,e),o=!1},d(e){e&&k(t),me(n)}}}function In(e,t,n){const{Button:o,Accordion:r,AccordionSection:s}=c;let{list:i}=t,{schema:l}=t,{record:a}=t,{classId:m}=t,{eventId:f}=t,{disabled:p}=t;const $={};let g=a[i.name]||{};a[i.name]=g;const h=e=>$[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · ");return e.$$set=e=>{"list"in e&&n(1,i=e.list),"schema"in e&&n(11,l=e.schema),"record"in e&&n(0,a=e.record),"classId"in e&&n(2,m=e.classId),"eventId"in e&&n(3,f=e.eventId),"disabled"in e&&n(4,p=e.disabled)},[a,i,m,f,p,g,o,r,s,e=>l.filter((t=>void 0!==e[t.name]&&"boolean"!==t.type&&"textarea"!==t.properties?.format)).map((t=>"object"===t.type?h(t.name):"date"===t.type?d(e[t.name]):"datetime"===t.type?u(e[t.name]):e[t.name])).filter((e=>!!e)).join(" • ")||"+",({detail:e})=>{const[t,o]=e.itemName.split(".");if(!o)return;e.desc&&($[o]=e.desc);const r=a[t];n(0,a[t]={...r,[o]:e.value},a),n(5,g=a[t])},l,function(t){q(e,t)}]}class Fn extends $e{constructor(e){var t;super(),document.getElementById("svelte-148ktt9-style")||((t=F("style")).id="svelte-148ktt9-style",t.textContent=".accordion.svelte-148ktt9{display:flex}.formList .accordion > .btn{display:inline-block;width:97%;margin-bottom:1em;background-color:#F5F5F5}@media screen and (max-width: 600px){.formList .accordion > .btn{width:25em}}",w(document.head,t)),pe(this,e,In,kn,v,{list:1,schema:11,record:0,classId:2,eventId:3,disabled:4})}}const{Boolean:_n,document:Sn}=ae;function En(e,t,n){const o=e.slice();return o[39]=t[n],o}function Cn(e,t,n){const o=e.slice();return o[42]=t[n],o}function Dn(e){return{c:f,m:f,p:f,i:f,o:f,d:f}}function Nn(e){let t,n,o=e[38]&&function(e){let t,n,o,r,s,i,l,a,c,d,u,m,f,p,$,g,h,v=e[0].items,b=[];for(let t=0;t<v.length;t+=1)b[t]=jn(Cn(e,v,t));const _=e=>se(b[e],1,1,(()=>{b[e]=null}));let S=e[0].list&&zn(e);return m=new e[5]({props:{outline:!0,$$slots:{default:[Mn]},$$scope:{ctx:e}}}),m.$on("click",e[11]),p=new e[5]({props:{disabled:e[2],form:e[6],filled:!0,type:"submit",$$slots:{default:[Bn]},$$scope:{ctx:e}}}),{c(){t=F("section"),n=F("form"),o=F("input"),s=E();for(let e=0;e<b.length;e+=1)b[e].c();i=E(),S&&S.c(),l=E(),a=F("div"),c=F("small"),c.textContent=`${Xn}`,d=E(),u=F("div"),de(m.$$.fragment),f=E(),de(p.$$.fragment),N(o,"class",y(e[6])+" svelte-rovpm0"),N(o,"name","_id"),N(o,"type","hidden"),o.value=r=e[1]._id||"",N(n,"class",y(e[7])+" svelte-rovpm0"),N(n,"id",e[6]),N(a,"class","comment svelte-rovpm0"),N(u,"class","form--buttons svelte-rovpm0"),N(t,"class",y(e[8])+" svelte-rovpm0")},m(r,v){x(r,t,v),w(t,n),w(n,o),w(n,s);for(let e=0;e<b.length;e+=1)b[e].m(n,null);var y;w(n,i),S&&S.m(n,null),w(t,l),w(t,a),w(a,c),w(t,d),w(t,u),ue(m,u,null),w(u,f),ue(p,u,null),$=!0,g||(h=D(n,"submit",(y=e[10],function(e){return e.preventDefault(),y.call(this,e)})),g=!0)},p(e,t){if((!$||2&t[0]&&r!==(r=e[1]._id||""))&&(o.value=r),4167&t[0]){let o;for(v=e[0].items,o=0;o<v.length;o+=1){const r=Cn(e,v,o);b[o]?(b[o].p(r,t),re(b[o],1)):(b[o]=jn(r),b[o].c(),re(b[o],1),b[o].m(n,i))}for(ne(),o=v.length;o<b.length;o+=1)_(o);oe()}e[0].list?S?(S.p(e,t),1&t[0]&&re(S,1)):(S=zn(e),S.c(),re(S,1),S.m(n,null)):S&&(ne(),se(S,1,1,(()=>{S=null})),oe());const s={};16384&t[1]&&(s.$$scope={dirty:t,ctx:e}),m.$set(s);const l={};4&t[0]&&(l.disabled=e[2]),16384&t[1]&&(l.$$scope={dirty:t,ctx:e}),p.$set(l)},i(e){if(!$){for(let e=0;e<v.length;e+=1)re(b[e]);re(S),re(m.$$.fragment,e),re(p.$$.fragment,e),$=!0}},o(e){b=b.filter(_n);for(let e=0;e<b.length;e+=1)se(b[e]);se(S),se(m.$$.fragment,e),se(p.$$.fragment,e),$=!1},d(e){e&&k(t),I(b,e),S&&S.d(),me(m),me(p),g=!1,h()}}}(e);return{c(){o&&o.c(),t=C()},m(e,r){o&&o.m(e,r),x(e,t,r),n=!0},p(e,t){e[38]&&o.p(e,t)},i(e){n||(re(o),n=!0)},o(e){se(o),n=!1},d(e){o&&o.d(e),e&&k(t)}}}function On(e){let t,n;return t=new Xt({props:{classId:e[6],item:e[42],record:e[1],disabled:e[2],eventId:e[0].id}}),t.$on("task",e[12]),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.item=e[42]),2&n[0]&&(o.record=e[1]),4&n[0]&&(o.disabled=e[2]),1&n[0]&&(o.eventId=e[0].id),t.$set(o)},i(e){n||(re(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function jn(e){let t,n,o="list"!==e[42].type&&On(e);return{c(){o&&o.c(),t=C()},m(e,r){o&&o.m(e,r),x(e,t,r),n=!0},p(e,n){"list"!==e[42].type?o?(o.p(e,n),1&n[0]&&re(o,1)):(o=On(e),o.c(),re(o,1),o.m(t.parentNode,t)):o&&(ne(),se(o,1,1,(()=>{o=null})),oe())},i(e){n||(re(o),n=!0)},o(e){se(o),n=!1},d(e){o&&o.d(e),e&&k(t)}}}function zn(e){let t,n,o=e[0].list,r=[];for(let t=0;t<o.length;t+=1)r[t]=Tn(En(e,o,t));const s=e=>se(r[e],1,1,(()=>{r[e]=null}));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=C()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);x(e,t,o),n=!0},p(e,n){if(8263&n[0]){let i;for(o=e[0].list,i=0;i<o.length;i+=1){const s=En(e,o,i);r[i]?(r[i].p(s,n),re(r[i],1)):(r[i]=Tn(s),r[i].c(),re(r[i],1),r[i].m(t.parentNode,t))}for(ne(),i=o.length;i<r.length;i+=1)s(i);oe()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)re(r[e]);n=!0}},o(e){r=r.filter(_n);for(let e=0;e<r.length;e+=1)se(r[e]);n=!1},d(e){I(r,e),e&&k(t)}}}function Ln(e){let t,n;return t=new Fn({props:{classId:e[6],list:e[39],eventId:e[0].id,schema:e[39].item,record:e[1],disabled:e[2]}}),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.list=e[39]),1&n[0]&&(o.eventId=e[0].id),1&n[0]&&(o.schema=e[39].item),2&n[0]&&(o.record=e[1]),4&n[0]&&(o.disabled=e[2]),t.$set(o)},i(e){n||(re(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function Pn(e){let t,n;return t=new gn({props:{classId:e[6],list:e[39],eventId:e[0].id,schema:e[39].item,record:e[1],disabled:e[2]}}),t.$on("save",e[13]),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.list=e[39]),1&n[0]&&(o.eventId=e[0].id),1&n[0]&&(o.schema=e[39].item),2&n[0]&&(o.record=e[1]),4&n[0]&&(o.disabled=e[2]),t.$set(o)},i(e){n||(re(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function Tn(e){let t,n,o,r,s,i;t=new e[4]({props:{text:e[39].designation}});const l=[Pn,Ln],a=[];function c(e,t){return"array"===e[39].type?0:1}return o=c(e),r=a[o]=l[o](e),{c(){de(t.$$.fragment),n=E(),r.c(),s=C()},m(e,r){ue(t,e,r),x(e,n,r),a[o].m(e,r),x(e,s,r),i=!0},p(e,n){const i={};1&n[0]&&(i.text=e[39].designation),t.$set(i);let d=o;o=c(e),o===d?a[o].p(e,n):(ne(),se(a[d],1,1,(()=>{a[d]=null})),oe(),r=a[o],r?r.p(e,n):(r=a[o]=l[o](e),r.c()),re(r,1),r.m(s.parentNode,s))},i(e){i||(re(t.$$.fragment,e),re(r),i=!0)},o(e){se(t.$$.fragment,e),se(r),i=!1},d(e){me(t,e),e&&k(n),a[o].d(e),e&&k(s)}}}function Mn(e){let t;return{c(){t=S("Abbrechen")},m(e,n){x(e,t,n)},d(e){e&&k(t)}}}function Bn(e){let t;return{c(){t=S("Speichern")},m(e,n){x(e,t,n)},d(e){e&&k(t)}}}function An(e){return{c:f,m:f,p:f,i:f,o:f,d:f}}function qn(e){let t,n,o,r;Sn.title=t=e[3];let s={ctx:e,current:null,token:null,hasCatch:!1,pending:An,then:Nn,catch:Dn,value:38,blocks:[,,,]};return ie(e[9](),s),{c(){n=E(),o=C(),s.block.c()},m(e,t){x(e,n,t),x(e,o,t),s.block.m(e,s.anchor=t),s.mount=()=>o.parentNode,s.anchor=o,r=!0},p(n,o){e=n,(!r||8&o[0])&&t!==(t=e[3])&&(Sn.title=t),le(s,e,o)},i(e){r||(re(s.block),r=!0)},o(e){for(let e=0;e<3;e+=1){se(s.blocks[e])}r=!1},d(e){e&&k(n),e&&k(o),s.block.d(e),s.token=null,s=null}}}let Wn=new Map,Hn=new Map,Rn=new Map;const Yn=(e,n)=>{const o=n;return Wn.has(o)||Wn.set(o,t.getTasksList(n).then((({data:e})=>e))),Wn.get(o)},Gn=(e,n,o)=>Hn.get(o)||Yn(e,n).then((n=>n.find((({_id:e})=>e===o))||t.getTaskList(e,o))).then((e=>(Hn.set(o,e),e))),Vn=(e,t)=>{Rn.set(e,t)},Jn=e=>Rn.get(e),Un=(e,n)=>Rn.get(n)||t.getTask(e,n).then((e=>(Rn.set(n,e),e))),Kn=(e,n)=>{if(!Wn.get(n))return;const o=n;Wn.set(o,t.getTasksList(n).then((({data:e})=>e)))},Qn=()=>{Wn=new Map,Hn=new Map,Rn=new Map};let Xn="";function Zn(e,o,a){let d,u,f,p;b(e,i,(e=>a(24,f=e))),b(e,l,(e=>a(25,p=e)));const{Divider:$,Button:g}=c,h=JSON.parse(r.getItem("Locale")),v=A();let y,w,{schema:x}=o,{recID:k}=o,{prevEventID:I=!1}=o,{prev:F=!1}=o,{taskId:_=!1}=o,{description:S=""}=o,{root:E=!1}=o,{readonly:C}=o,D={},N={},O="form-"+x.class+Math.floor(9e3*Math.random()+1e3).toString();const j=E?"fEmbedded":"fTask",z=E?"sEmbedded":"sTask",L=async()=>{for(const e of x.items){if(e.refItem&&D[e.refItem]){const n=await t.getTask(e.refItem,D[e.refItem]);n&&a(1,D[e.name]=n[e.name],D)}e.properties?.value?.concatenation&&P(e)}x.list?.forEach((async e=>{if(e.refItem&&D[e.refItem]){const n=await t.getTask(e.refItem,D[e.refItem]),o=[];for(const t of n[e.name]){const n={};for(const o of e.item)t[o.name]&&(n[o.name]=t[o.name]);o.push(n)}a(1,D[e.name]=o,D)}}))},P=async e=>{const t=e.properties.value.concatenation;let n="";for(const e of t)void 0!==e.constant&&(n+=e.constant),"year"===e.variable&&(n+=(new Date).getFullYear()),e.refItemNext&&(n+=await T(e.refItemNext));a(1,D[e.name]=n,D)},T=async e=>{const[n,o]=e.offset?.split(",")||[0,0],r=+e.base||0,s=+e.step||1;e.type;const i=e.refItem,l=await t.getLastId(x.class,i);if(!l?.length)return(r+s).toString().padStart(o,"0");return((+l[0][i]?.substring(n,n+o)||r)+s).toString().padStart(o,"0")},M=(e,t)=>{const n=t.name,o=e.find((e=>e.name===n));let r=t.value;if(r&&o&&o.type.startsWith("date"))try{return function(e,t,n){const o=Math.floor((new Date).getFullYear()/100);let r=!1;if(""===e)return null;const s=t.split(It);let i=0,l=0;const a=new Date(0);for(const c of s){if(!e.startsWith(c,i))return n;if(i+=c.length,i===e.length){if(l!==t.length)return n;break}if("%"!==t[l+c.length])break;if(l+=c.length+1,"%"===t[l]){if("%"!==e[i])return n;i++}else if("p"===t[l].toLowerCase()){const t=e.substr(i,2).toUpperCase();if("AM"===t)r=!1,a.getHours()>=12&&a.setHours(a.getHours()-12);else{if("PM"!==t)return n;r=!0,a.getHours()<12&&a.setHours(a.getHours()+12)}}else{kt.lastIndex=i;const s=kt.exec(e);if(null==s)return n;switch(t[l]){case"H":a.setHours(parseInt(s[0])+12*r);break;case"M":a.setMinutes(s[0]);break;case"S":a.setSeconds(s[0]);break;case"d":a.setDate(s[0]);break;case"m":a.setMonth(s[0]-1);break;case"y":a.setFullYear(100*o+parseInt(s[0]));break;case"Y":a.setFullYear(s[0])}i+=s[0].length}l++}return isNaN(a.valueOf())?n:a}(r,"%d.%m.%Y").toISOString()}catch{return new Date(r).toISOString()}if(o&&"boolean"===o.type&&(r=!!t.checked),o&&"number"===o.type){const e=Number("1.1").toLocaleString(h.id).substring(1,2);try{r=Number(r.replace(e,".")).toString()}catch{}}return r},q=()=>E?window.singleSpaNavigate("/"):v("back"),W=async(e,n)=>{if(x.input?.length>1){if(x.input[0]!==e)return;if(n){const o=await t.getTaskOptions(`${e}:${n}`,x.id);a(1,D={...D,...o})}else{const e=x.input.slice(1);for(const t of e)a(1,D[t]=[],D)}}};return n.subscribe((async e=>{if(!e)return;if(!Wn.get(e.eventId))return;const n=await t.getTaskList(x.class,e.taskId);((e,t,n)=>{if(!Wn.get(e))return;const o=t;Hn.set(o,n)})(e.eventId,e.taskId,n)})),B(Qn),e.$$set=e=>{"schema"in e&&a(0,x=e.schema),"recID"in e&&a(18,k=e.recID),"prevEventID"in e&&a(16,I=e.prevEventID),"prev"in e&&a(19,F=e.prev),"taskId"in e&&a(17,_=e.taskId),"description"in e&&a(14,S=e.description),"root"in e&&a(20,E=e.root),"readonly"in e&&a(15,C=e.readonly)},e.$$.update=()=>{32768&e.$$.dirty[0]&&a(2,d=C),6291457&e.$$.dirty[0]&&w&&y&&x.items.map((({name:e,type:t})=>{const n=y.items.find((t=>t.name===e));if(!n)return;if(t!==n.type)return;const o="_"+e;w[e]&&a(1,D[e]=w[e],D),w[o]&&a(1,D[o]=w[o],D)})),1064960&e.$$.dirty[0]&&a(3,u=E?S||"enablerr - Form":document.title)},[x,D,d,u,$,g,O,j,z,async()=>{if(k&&(a(1,D=await t.getTask(x.class,k)),a(14,S=m(x,D))),I){a(15,C=!1),a(21,y=await t.getSchema(I)),"string"==typeof F&&a(22,w=await t.getTask(y.class,F));const e=x.items.find((e=>e.refClass===y.class));a(1,D[e.name]=w._id,D)}const e=await t.getEvent(x.id);if(e.trigger?.startOn&&!e.trigger?.startOn?.some((e=>"Manual"===e.type))&&a(15,C=!0),f.role?.length&&x.authorization?.length){const e=x.authorization.some((e=>p?.find((t=>t===e.role&&"edit"===e.activity))));a(15,C||=!e)}return k||L(),!0},async()=>{const e={};Array.from(document.querySelectorAll("form#"+O+" ."+O)).map((t=>{if(t.name)if(t.name.includes(".")){const[n,o]=t.name.split("."),r=x.list.find((e=>e.name===n));e[t.name]=M(r.item,t)}else e[t.name]=M(x.items,t)})),x.list&&x.list.map((t=>{"array"===t.type&&N[t.name]&&(e[t.name]=N[t.name].reduce(((e,n)=>n._delete||!Object.values(n).some(Boolean)?e:e.concat(Object.entries(n).reduce(((e,[n,o])=>("_delete"!==n&&(e[n]=M(t.item,{name:n,value:o,checked:o})),e)),{}))),[]))})),e._event=x.id,e._prevEventId=I,e._taskId=_;const{id:n,task:o,error:r}=await t.saveData(x.class,e);if(r?.text){const e=r.field?" in "+r.field+": "+r.value:"";return void s.failed(`${r.text} ${e}`,3e3)}s.success("Die Daten wurden gespeichert.",2e3),e._id=n;const i=await t.getTaskList(x.class,n);v("choose",{row:i}),E&&!k?window.singleSpaNavigate(`/task/${x.id}/${o}/task`):q()},()=>I?window.history.back():q(),async({detail:{row:e}})=>{if(k)return;const n=e._task.event,o=await t.getEvent(n),r=await t.getEvent(x.id),s=r.output.class?.at(0)?.item.find((e=>e.name===o.output?.class[0]?.name));(r.input?.class?.at(0)?.name===o.output.class[0]?.name||s?.asInput)&&(a(21,y=await t.getSchema(n)),a(16,I=n),a(17,_=e._task._id),a(22,w=!!_&&await t.getTask(y.class,e._task.docId)),W(y.class,e?._task?.docId))},({detail:e})=>{N[e.listName]=e.value},S,C,I,_,k,F,E,y,w]}class eo extends $e{constructor(e){var t;super(),Sn.getElementById("svelte-rovpm0-style")||((t=F("style")).id="svelte-rovpm0-style",t.textContent="form.disabled.svelte-rovpm0 input.svelte-rovpm0{background-color:red !important}.comment.svelte-rovpm0.svelte-rovpm0{color:green;margin-bottom:1em}form.svelte-rovpm0.svelte-rovpm0{min-width:25em}@media only screen and (min-width: 600px){form.svelte-rovpm0.svelte-rovpm0{min-width:30em}}.fEmbedded.svelte-rovpm0.svelte-rovpm0,.fTask.svelte-rovpm0.svelte-rovpm0{overflow-y:auto;overflow-x:hidden}.fEmbedded.svelte-rovpm0.svelte-rovpm0{height:fit-content;min-height:30vh;max-height:60vh}.fTask.svelte-rovpm0.svelte-rovpm0{height:fit-content;max-height:70vh}.sTask.svelte-rovpm0.svelte-rovpm0{height:95%;display:inline-grid}.sTask.svelte-rovpm0 .btn.svelte-rovpm0{display:initial !important}.form--buttons.svelte-rovpm0.svelte-rovpm0{display:flex;gap:1em;padding-bottom:0.5em}",w(Sn.head,t)),pe(this,e,Zn,qn,v,{schema:0,recID:18,prevEventID:16,prev:19,taskId:17,description:14,root:20,readonly:15},[-1,-1])}}function to(e){let t,n,o;function r(t){e[4](t)}let s={schema:e[5],recID:e[6]};return void 0!==e[0]&&(s.description=e[0]),t=new eo({props:s}),H.push((()=>ce(t,"description",r))),t.$on("back",e[2]),{c(){de(t.$$.fragment)},m(e,n){ue(t,e,n),o=!0},p(e,o){const r={};32&o&&(r.schema=e[5]),64&o&&(r.recID=e[6]),!n&&1&o&&(n=!0,r.description=e[0],U((()=>n=!1))),t.$set(r)},i(e){o||(re(t.$$.fragment,e),o=!0)},o(e){se(t.$$.fragment,e),o=!1},d(e){me(t,e)}}}function no(e){let t,n;return t=new a({props:{update:e[1],description:e[0],$$slots:{default:[to,({prop:{schema:e,recID:t,eventID:n}})=>({5:e,6:t,7:n}),({prop:e})=>(e?32:0)|(e?64:0)|(e?128:0)]},$$scope:{ctx:e}}}),{c(){de(t.$$.fragment)},m(e,o){ue(t,e,o),n=!0},p(e,[n]){const o={};1&n&&(o.description=e[0]),353&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(re(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){me(t,e)}}}function oo(e,n,o){let r,{refresh:s}=n;return e.$$set=e=>{"refresh"in e&&o(3,s=e.refresh)},[r,(e,n)=>t.getSchema(e).then((t=>({schema:t,recID:n,eventID:e,title:t.identity.designation}))),e=>{},s,function(e){r=e,o(0,r)}]}function ro(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var so,io,lo=(so=function(e,t){function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function o(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?n(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("object"!==s(e))throw new Error("single-spa-svelte requires a configuration object");var t=o(o({},i),e);if(!t.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:l.bind(null,t,n),mount:a.bind(null,t,n),unmount:c.bind(null,t,n),update:d.bind(null,t,n)}};var i={component:null,domElementGetter:null,props:{}};function l(e){return Promise.resolve()}function a(e,t,n){var r=Object.keys(i),s=Object.keys(e).reduce((function(t,n){return r.includes(n)||(t[n]=e[n]),t}),{});return Promise.resolve().then((function(){var r=function(e,t){return(t=t&&t.customProps?t.customProps:t).domElement?function(){return t.domElement}:t.domElementGetter?function(){return t.domElementGetter(t)}:e.domElementGetter?function(){return e.domElementGetter(t)}:function(e){var t=e.appName||e.name;if(!t)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(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,document.body.appendChild(e)),e}}(t)}(e,n),i=r();t.instance=new e.component(o(o({},s),{},{target:i,props:Object.assign({},n,e.props)}))}))}function c(e,t){return Promise.resolve().then((function(){t.instance.$destroy?t.instance.$destroy():t.instance.destroy()}))}function d(e,t,n){return Promise.resolve().then((function(){t.instance.$set?t.instance.$set(n):t.instance.set(n)}))}},so(io={exports:{}},io.exports),io.exports);const ao=ro(lo)({component:class extends $e{constructor(e){super(),pe(this,e,oo,no,v,{refresh:3})}},domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:co,mount:uo,unmount:mo}=ao;e({bootstrap:co,mount:uo,unmount:mo});e("Form",eo),e("List",Ve)}}}));
|