@enablerr-ui/detail 0.2.395 → 0.2.396
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","@enablerr-ui/auth","@enablerr-ui/task"],(function(e){"use strict";var t,n,o,i,l,r,s,a,c,d,u;return{setters:[function(e){t=e.Request,n=e.task_notification,o=e.TextArea,i=e.Storage,l=e.toasts,r=e.settings,s=e.currentRoles,a=e.Page},function(e){c=e.getAttractions},function(e){d=e.user},function(e){u=e.taskClipboard}],execute:function(){e("version","0.2.395");const m=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(" · "))),f=e=>{try{return new Date(e).toLocaleString()}catch{return e}},p=e=>e?"(ja)":"(nein)",$=(e,t)=>{const n={...t};return(e.display?.reduce(((t,o)=>{let[i,l]=o.split(".");if(e.list?.find((({name:e})=>e===i))&&l&&void 0!==n[i]){const e=`${i}_${l}`;n[e]=n[i][l],i=e}return t.find((e=>e===i))||t.push(i),t}),[]).map((e=>"boolean"==typeof n[e]?p(n[e]):m(n["_"+e]||n[e])))||e.items.map((e=>"object"===e.type?t["_"+e.name]:"list"===e.type?"":("boolean"==typeof t[e.name]&&p(t[e.name]),t[e.name])))).map((e=>e?.toString().split(" · ").filter((e=>!!e)).join(" · "))).filter((e=>!!e)).join(" • ")};function h(){}function g(e){return e()}function v(){return Object.create(null)}function b(e){e.forEach(g)}function y(e){return"function"==typeof e}function w(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function k(e,t,n){e.$$.on_destroy.push(function(e,...t){if(null==e)return h;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function x(e){return null==e?"":e}function I(e,t){e.appendChild(t)}function _(e,t,n){e.insertBefore(t,n||null)}function j(e){e.parentNode.removeChild(e)}function N(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function S(e){return document.createElement(e)}function q(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function F(e){return document.createTextNode(e)}function C(){return F(" ")}function L(){return F("")}function E(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function D(e){return function(t){return t.preventDefault(),e.call(this,t)}}function T(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function z(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 B(e,t){e.value=null==t?"":t}function A(e,t,n,o){e.style.setProperty(t,n,o?"important":"")}function M(e,t,n){e.classList[n?"add":"remove"](t)}let V;function P(e){V=e}function W(){if(!V)throw new Error("Function called outside component initialization");return V}function R(e){W().$$.on_mount.push(e)}function H(){const e=W();return(t,n)=>{const o=e.$$.callbacks[t];if(o){const i=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,i)}))}}}function Q(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e(t)))}const Y=[],G=[],J=[],U=[],Z=Promise.resolve();let K=!1;function X(){K||(K=!0,Z.then(le))}function ee(){return X(),Z}function te(e){J.push(e)}function ne(e){U.push(e)}let oe=!1;const ie=new Set;function le(){if(!oe){oe=!0;do{for(let e=0;e<Y.length;e+=1){const t=Y[e];P(t),re(t.$$)}for(P(null),Y.length=0;G.length;)G.pop()();for(let e=0;e<J.length;e+=1){const t=J[e];ie.has(t)||(ie.add(t),t())}J.length=0}while(Y.length);for(;U.length;)U.pop()();K=!1,oe=!1,ie.clear()}}function re(e){if(null!==e.fragment){e.update(),b(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(te)}}const se=new Set;let ae;function ce(){ae={r:0,c:[],p:ae}}function de(){ae.r||b(ae.c),ae=ae.p}function ue(e,t){e&&e.i&&(se.delete(e),e.i(t))}function me(e,t,n,o){if(e&&e.o){if(se.has(e))return;se.add(e),ae&&ae.c.push((()=>{se.delete(e),o&&(n&&e.d(1),o())})),e.o(t)}}function fe(e,t){const n=t.token={};function o(e,o,i,l){if(t.token!==n)return;t.resolved=l;let r=t.ctx;void 0!==i&&(r=r.slice(),r[i]=l);const s=e&&(t.current=e)(r);let a=!1;t.block&&(t.blocks?t.blocks.forEach(((e,n)=>{n!==o&&e&&(ce(),me(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),de())})):t.block.d(1),s.c(),ue(s,1),s.m(t.mount(),t.anchor),a=!0),t.block=s,t.blocks&&(t.blocks[o]=s),a&&le()}if((i=e)&&"object"==typeof i&&"function"==typeof i.then){const n=W();if(e.then((e=>{P(n),o(t.then,1,t.value,e),P(null)}),(e=>{if(P(n),o(t.catch,2,t.error,e),P(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 i}function pe(e,t,n){const o=t.slice(),{resolved:i}=e;e.current===e.then&&(o[e.value]=i),e.current===e.catch&&(o[e.error]=i),e.block.p(o,n)}const $e="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function he(e,t,n){const o=e.$$.props[t];void 0!==o&&(e.$$.bound[o]=n,n(e.$$.ctx[o]))}function ge(e){e&&e.c()}function ve(e,t,n,o){const{fragment:i,on_mount:l,on_destroy:r,after_update:s}=e.$$;i&&i.m(t,n),o||te((()=>{const t=l.map(g).filter(y);r?r.push(...t):b(t),e.$$.on_mount=[]})),s.forEach(te)}function be(e,t){const n=e.$$;null!==n.fragment&&(b(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function ye(e,t,n,o,i,l,r=[-1]){const s=V;P(e);const a=e.$$={fragment:null,ctx:null,props:l,update:h,not_equal:i,bound:v(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(s?s.$$.context:t.context||[]),callbacks:v(),dirty:r,skip_bound:!1};let c=!1;if(a.ctx=n?n(e,t.props||{},((t,n,...o)=>{const l=o.length?o[0]:n;return a.ctx&&i(a.ctx[t],a.ctx[t]=l)&&(!a.skip_bound&&a.bound[t]&&a.bound[t](l),c&&function(e,t){-1===e.$$.dirty[0]&&(Y.push(e),X(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}(e,t)),n})):[],a.update(),c=!0,b(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(j)}else a.fragment&&a.fragment.c();t.intro&&ue(e.$$.fragment),ve(e,t.target,t.anchor,t.customElement),le()}P(s)}class we{$destroy(){be(this,1),this.$destroy=h}$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 ke(e){let t,n,o,i,l;return{c(){t=q("svg"),n=q("circle"),o=q("polyline"),i=q("line"),z(n,"cx","12"),z(n,"cy","12"),z(n,"r","10"),z(o,"points","8 12 12 16 16 12"),z(i,"x1","12"),z(i,"y1","8"),z(i,"x2","12"),z(i,"y2","16"),z(t,"xmlns","http://www.w3.org/2000/svg"),z(t,"width",e[0]),z(t,"height",e[0]),z(t,"fill","none"),z(t,"viewBox","0 0 24 24"),z(t,"stroke","currentColor"),z(t,"stroke-width",e[1]),z(t,"stroke-linecap","round"),z(t,"stroke-linejoin","round"),z(t,"class",l="feather feather-arrow-down-circle "+e[2])},m(e,l){_(e,t,l),I(t,n),I(t,o),I(t,i)},p(e,[n]){1&n&&z(t,"width",e[0]),1&n&&z(t,"height",e[0]),2&n&&z(t,"stroke-width",e[1]),4&n&&l!==(l="feather feather-arrow-down-circle "+e[2])&&z(t,"class",l)},i:h,o:h,d(e){e&&j(t)}}}function xe(e,t,n){let{size:o="100%"}=t,{strokeWidth:i=2}=t,{class:l=""}=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,i=e.strokeWidth),"class"in e&&n(2,l=e.class)},[o,i,l]}class Ie extends we{constructor(e){super(),ye(this,e,xe,ke,w,{size:0,strokeWidth:1,class:2})}}function _e(e){let t,n,o,i;return{c(){t=q("svg"),n=q("path"),o=q("polyline"),z(n,"d","M22 11.08V12a10 10 0 1 1-5.93-9.14"),z(o,"points","22 4 12 14.01 9 11.01"),z(t,"xmlns","http://www.w3.org/2000/svg"),z(t,"width",e[0]),z(t,"height",e[0]),z(t,"fill","none"),z(t,"viewBox","0 0 24 24"),z(t,"stroke","currentColor"),z(t,"stroke-width",e[1]),z(t,"stroke-linecap","round"),z(t,"stroke-linejoin","round"),z(t,"class",i="feather feather-check-circle "+e[2])},m(e,i){_(e,t,i),I(t,n),I(t,o)},p(e,[n]){1&n&&z(t,"width",e[0]),1&n&&z(t,"height",e[0]),2&n&&z(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-check-circle "+e[2])&&z(t,"class",i)},i:h,o:h,d(e){e&&j(t)}}}function je(e,t,n){let{size:o="100%"}=t,{strokeWidth:i=2}=t,{class:l=""}=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,i=e.strokeWidth),"class"in e&&n(2,l=e.class)},[o,i,l]}class Ne extends we{constructor(e){super(),ye(this,e,je,_e,w,{size:0,strokeWidth:1,class:2})}}function Se(e){let t,n,o;return{c(){t=q("svg"),n=q("path"),z(n,"d","M18 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3H6a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3V6a3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3h12a3 3 0 0 0 3-3 3 3 0 0 0-3-3z"),z(t,"xmlns","http://www.w3.org/2000/svg"),z(t,"width",e[0]),z(t,"height",e[0]),z(t,"fill","none"),z(t,"viewBox","0 0 24 24"),z(t,"stroke","currentColor"),z(t,"stroke-width",e[1]),z(t,"stroke-linecap","round"),z(t,"stroke-linejoin","round"),z(t,"class",o="feather feather-command "+e[2])},m(e,o){_(e,t,o),I(t,n)},p(e,[n]){1&n&&z(t,"width",e[0]),1&n&&z(t,"height",e[0]),2&n&&z(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-command "+e[2])&&z(t,"class",o)},i:h,o:h,d(e){e&&j(t)}}}function qe(e,t,n){let{size:o="100%"}=t,{strokeWidth:i=2}=t,{class:l=""}=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,i=e.strokeWidth),"class"in e&&n(2,l=e.class)},[o,i,l]}class Fe extends we{constructor(e){super(),ye(this,e,qe,Se,w,{size:0,strokeWidth:1,class:2})}}function Ce(e){let t,n,o,i;return{c(){t=q("svg"),n=q("polyline"),o=q("path"),z(n,"points","9 10 4 15 9 20"),z(o,"d","M20 4v7a4 4 0 0 1-4 4H4"),z(t,"xmlns","http://www.w3.org/2000/svg"),z(t,"width",e[0]),z(t,"height",e[0]),z(t,"fill","none"),z(t,"viewBox","0 0 24 24"),z(t,"stroke","currentColor"),z(t,"stroke-width",e[1]),z(t,"stroke-linecap","round"),z(t,"stroke-linejoin","round"),z(t,"class",i="feather feather-corner-down-left "+e[2])},m(e,i){_(e,t,i),I(t,n),I(t,o)},p(e,[n]){1&n&&z(t,"width",e[0]),1&n&&z(t,"height",e[0]),2&n&&z(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-corner-down-left "+e[2])&&z(t,"class",i)},i:h,o:h,d(e){e&&j(t)}}}function Le(e,t,n){let{size:o="100%"}=t,{strokeWidth:i=2}=t,{class:l=""}=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,i=e.strokeWidth),"class"in e&&n(2,l=e.class)},[o,i,l]}class Ee extends we{constructor(e){super(),ye(this,e,Le,Ce,w,{size:0,strokeWidth:1,class:2})}}function De(e){let t,n,o,i,l;return{c(){t=q("svg"),n=q("path"),o=q("line"),i=q("line"),z(n,"d","M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"),z(o,"x1","18"),z(o,"y1","9"),z(o,"x2","12"),z(o,"y2","15"),z(i,"x1","12"),z(i,"y1","9"),z(i,"x2","18"),z(i,"y2","15"),z(t,"xmlns","http://www.w3.org/2000/svg"),z(t,"width",e[0]),z(t,"height",e[0]),z(t,"fill","none"),z(t,"viewBox","0 0 24 24"),z(t,"stroke","currentColor"),z(t,"stroke-width",e[1]),z(t,"stroke-linecap","round"),z(t,"stroke-linejoin","round"),z(t,"class",l="feather feather-delete "+e[2])},m(e,l){_(e,t,l),I(t,n),I(t,o),I(t,i)},p(e,[n]){1&n&&z(t,"width",e[0]),1&n&&z(t,"height",e[0]),2&n&&z(t,"stroke-width",e[1]),4&n&&l!==(l="feather feather-delete "+e[2])&&z(t,"class",l)},i:h,o:h,d(e){e&&j(t)}}}function Te(e,t,n){let{size:o="100%"}=t,{strokeWidth:i=2}=t,{class:l=""}=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,i=e.strokeWidth),"class"in e&&n(2,l=e.class)},[o,i,l]}class ze extends we{constructor(e){super(),ye(this,e,Te,De,w,{size:0,strokeWidth:1,class:2})}}function Oe(e){let t,n,o,i,l;return{c(){t=q("svg"),n=q("path"),o=q("polyline"),i=q("line"),z(n,"d","M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"),z(o,"points","15 3 21 3 21 9"),z(i,"x1","10"),z(i,"y1","14"),z(i,"x2","21"),z(i,"y2","3"),z(t,"xmlns","http://www.w3.org/2000/svg"),z(t,"width",e[0]),z(t,"height",e[0]),z(t,"fill","none"),z(t,"viewBox","0 0 24 24"),z(t,"stroke","currentColor"),z(t,"stroke-width",e[1]),z(t,"stroke-linecap","round"),z(t,"stroke-linejoin","round"),z(t,"class",l="feather feather-external-link "+e[2])},m(e,l){_(e,t,l),I(t,n),I(t,o),I(t,i)},p(e,[n]){1&n&&z(t,"width",e[0]),1&n&&z(t,"height",e[0]),2&n&&z(t,"stroke-width",e[1]),4&n&&l!==(l="feather feather-external-link "+e[2])&&z(t,"class",l)},i:h,o:h,d(e){e&&j(t)}}}function Be(e,t,n){let{size:o="100%"}=t,{strokeWidth:i=2}=t,{class:l=""}=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,i=e.strokeWidth),"class"in e&&n(2,l=e.class)},[o,i,l]}class Ae extends we{constructor(e){super(),ye(this,e,Be,Oe,w,{size:0,strokeWidth:1,class:2})}}function Me(e){let t,n,o,i;return{c(){t=q("svg"),n=q("circle"),o=q("line"),z(n,"cx","11"),z(n,"cy","11"),z(n,"r","8"),z(o,"x1","21"),z(o,"y1","21"),z(o,"x2","16.65"),z(o,"y2","16.65"),z(t,"xmlns","http://www.w3.org/2000/svg"),z(t,"width",e[0]),z(t,"height",e[0]),z(t,"fill","none"),z(t,"viewBox","0 0 24 24"),z(t,"stroke","currentColor"),z(t,"stroke-width",e[1]),z(t,"stroke-linecap","round"),z(t,"stroke-linejoin","round"),z(t,"class",i="feather feather-search "+e[2])},m(e,i){_(e,t,i),I(t,n),I(t,o)},p(e,[n]){1&n&&z(t,"width",e[0]),1&n&&z(t,"height",e[0]),2&n&&z(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-search "+e[2])&&z(t,"class",i)},i:h,o:h,d(e){e&&j(t)}}}function Ve(e,t,n){let{size:o="100%"}=t,{strokeWidth:i=2}=t,{class:l=""}=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,i=e.strokeWidth),"class"in e&&n(2,l=e.class)},[o,i,l]}class Pe extends we{constructor(e){super(),ye(this,e,Ve,Me,w,{size:0,strokeWidth:1,class:2})}}const{document:We}=$e;function Re(e){e[30]=e[32].list,e[31]=e[32].items}function He(e,t,n){const o=e.slice();return o[33]=t[n],o}function Qe(e,t,n){const o=e.slice();return o[36]=t[n],o}function Ye(e,t,n){const o=e.slice();return o[36]=t[n],o}function Ge(e){return{c:h,m:h,p:h,i:h,o:h,d:h}}function Je(e){let t,n,o,i,l,r;Re(e);let s=e[30]?.length&&Ue(e),a=e[31]?.length&&Ze(e),c=e[30]?.length&&et(e);return{c(){s&&s.c(),t=C(),n=S("div"),o=S("table"),a&&a.c(),i=C(),l=S("tbody"),c&&c.c(),z(o,"striped",""),z(o,"class","svelte-btngop"),z(n,"class","eList svelte-btngop")},m(e,d){s&&s.m(e,d),_(e,t,d),_(e,n,d),I(n,o),a&&a.m(o,null),I(o,i),I(o,l),c&&c.m(l,null),r=!0},p(e,n){Re(e),e[30]?.length?s?(s.p(e,n),4&n[0]&&ue(s,1)):(s=Ue(e),s.c(),ue(s,1),s.m(t.parentNode,t)):s&&(ce(),me(s,1,1,(()=>{s=null})),de()),e[31]?.length?a?a.p(e,n):(a=Ze(e),a.c(),a.m(o,i)):a&&(a.d(1),a=null),e[30]?.length?c?(c.p(e,n),4&n[0]&&ue(c,1)):(c=et(e),c.c(),ue(c,1),c.m(l,null)):c&&(ce(),me(c,1,1,(()=>{c=null})),de())},i(e){r||(ue(s),ue(c),r=!0)},o(e){me(s),me(c),r=!1},d(e){s&&s.d(e),e&&j(t),e&&j(n),a&&a.d(),c&&c.d()}}}function Ue(e){let t,n,o,i,l,r,s,a,c,d;function u(t){e[22](t)}let m={id:e[8]};return void 0!==e[3]&&(m.value=e[3]),o=new e[6]({props:m}),G.push((()=>he(o,"value",u))),o.$on("input",e[12]),s=new ze({props:{size:"18"}}),{c(){t=S("div"),n=F("Suchen: "),ge(o.$$.fragment),l=C(),r=S("span"),ge(s.$$.fragment),z(r,"class","feather pointer svelte-btngop"),A(t,"margin-bottom","1em"),A(t,"position","relative")},m(i,u){_(i,t,u),I(t,n),ve(o,t,null),I(t,l),I(t,r),ve(s,r,null),a=!0,c||(d=E(r,"click",e[15]),c=!0)},p(e,t){const n={};!i&&8&t[0]&&(i=!0,n.value=e[3],ne((()=>i=!1))),o.$set(n)},i(e){a||(ue(o.$$.fragment,e),ue(s.$$.fragment,e),a=!0)},o(e){me(o.$$.fragment,e),me(s.$$.fragment,e),a=!1},d(e){e&&j(t),be(o),be(s),c=!1,d()}}}function Ze(e){let t,n,o,i=e[4]&&e[0]&&Ke(),l=e[31],r=[];for(let t=0;t<l.length;t+=1)r[t]=Xe(Ye(e,l,t));return{c(){t=S("thead"),n=S("tr"),i&&i.c(),o=C();for(let e=0;e<r.length;e+=1)r[e].c();z(n,"class","svelte-btngop"),z(t,"class","svelte-btngop")},m(e,l){_(e,t,l),I(t,n),i&&i.m(n,null),I(n,o);for(let e=0;e<r.length;e+=1)r[e].m(n,null)},p(e,t){if(e[4]&&e[0]?i||(i=Ke(),i.c(),i.m(n,o)):i&&(i.d(1),i=null),2052&t[0]){let o;for(l=e[31],o=0;o<l.length;o+=1){const i=Ye(e,l,o);r[o]?r[o].p(i,t):(r[o]=Xe(i),r[o].c(),r[o].m(n,null))}for(;o<r.length;o+=1)r[o].d(1);r.length=l.length}},d(e){e&&j(t),i&&i.d(),N(r,e)}}}function Ke(e){let t;return{c(){t=S("th"),z(t,"class","svelte-btngop")},m(e,n){_(e,t,n)},d(e){e&&j(t)}}}function Xe(e){let t,n,o=e[36]?.designation+"";return{c(){t=S("th"),n=F(o),z(t,"class","svelte-btngop")},m(e,o){_(e,t,o),I(t,n)},p(e,t){4&t[0]&&o!==(o=e[36]?.designation+"")&&O(n,o)},d(e){e&&j(t)}}}function et(e){let t,n,o=e[30],i=[];for(let t=0;t<o.length;t+=1)i[t]=it(He(e,o,t));const l=e=>me(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=L()},m(e,o){for(let t=0;t<i.length;t+=1)i[t].m(e,o);_(e,t,o),n=!0},p(e,n){if(28191&n[0]){let r;for(o=e[30],r=0;r<o.length;r+=1){const l=He(e,o,r);i[r]?(i[r].p(l,n),ue(i[r],1)):(i[r]=it(l),i[r].c(),ue(i[r],1),i[r].m(t.parentNode,t))}for(ce(),r=o.length;r<i.length;r+=1)l(r);de()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)ue(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)me(i[e]);n=!1},d(e){N(i,e),e&&j(t)}}}function tt(e){let t,n,o,i,l=e[4]&&e[0]&&nt(e),r=e[31],s=[];for(let t=0;t<r.length;t+=1)s[t]=ot(Qe(e,r,t));return{c(){t=S("tr"),l&&l.c(),n=C();for(let e=0;e<s.length;e+=1)s[e].c();o=C(),z(t,"class","pointer svelte-btngop"),M(t,"active",e[33]._id===e[1])},m(e,r){_(e,t,r),l&&l.m(t,null),I(t,n);for(let e=0;e<s.length;e+=1)s[e].m(t,null);I(t,o),i=!0},p(e,i){if(e[4]&&e[0]?l?(l.p(e,i),17&i[0]&&ue(l,1)):(l=nt(e),l.c(),ue(l,1),l.m(t,n)):l&&(ce(),me(l,1,1,(()=>{l=null})),de()),3588&i[0]){let n;for(r=e[31],n=0;n<r.length;n+=1){const l=Qe(e,r,n);s[n]?s[n].p(l,i):(s[n]=ot(l),s[n].c(),s[n].m(t,o))}for(;n<s.length;n+=1)s[n].d(1);s.length=r.length}2054&i[0]&&M(t,"active",e[33]._id===e[1])},i(e){i||(ue(l),i=!0)},o(e){me(l),i=!1},d(e){e&&j(t),l&&l.d(),N(s,e)}}}function nt(e){let t,n,o,i,l;return o=new Ae({props:{size:"18"}}),{c(){t=S("td"),n=S("a"),ge(o.$$.fragment),z(n,"href",i=e[14](e[33])),z(n,"target","_blank"),z(t,"class","editRow svelte-btngop")},m(e,i){_(e,t,i),I(t,n),ve(o,n,null),l=!0},p(e,t){(!l||4&t[0]&&i!==(i=e[14](e[33])))&&z(n,"href",i)},i(e){l||(ue(o.$$.fragment,e),l=!0)},o(e){me(o.$$.fragment,e),l=!1},d(e){e&&j(t),be(o)}}}function ot(e){let t,n,o,i,l=e[9](e[33],e[36])+"";return{c(){t=S("td"),n=F(l),z(t,"class","svelte-btngop")},m(l,r){_(l,t,r),I(t,n),o||(i=E(t,"click",T((function(){y(e[10](e[33]))&&e[10](e[33]).apply(this,arguments)}))),o=!0)},p(t,o){e=t,4&o[0]&&l!==(l=e[9](e[33],e[36])+"")&&O(n,l)},d(e){e&&j(t),o=!1,i()}}}function it(e){let t,n,o=e[13](e[33],e[31],e[3]),i=o&&tt(e);return{c(){i&&i.c(),t=L()},m(e,o){i&&i.m(e,o),_(e,t,o),n=!0},p(e,n){12&n[0]&&(o=e[13](e[33],e[31],e[3])),o?i?(i.p(e,n),12&n[0]&&ue(i,1)):(i=tt(e),i.c(),ue(i,1),i.m(t.parentNode,t)):i&&(ce(),me(i,1,1,(()=>{i=null})),de())},i(e){n||(ue(i),n=!0)},o(e){me(i),n=!1},d(e){i&&i.d(e),e&&j(t)}}}function lt(e){let t,n;return t=new e[5]({}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p:h,i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function rt(e){let t,n,o,i={ctx:e,current:null,token:null,hasCatch:!1,pending:lt,then:Je,catch:Ge,value:32,blocks:[,,,]};return fe(n=e[2]&&e[11](),i),{c(){t=L(),i.block.c()},m(e,n){_(e,t,n),i.block.m(e,i.anchor=n),i.mount=()=>t.parentNode,i.anchor=t,o=!0},p(t,o){e=t,i.ctx=e,4&o[0]&&n!==(n=e[2]&&e[11]())&&fe(n,i)||pe(i,e,o)},i(e){o||(ue(i.block),o=!0)},o(e){for(let e=0;e<3;e+=1){me(i.blocks[e])}o=!1},d(e){e&&j(t),i.block.d(e),i.token=null,i=null}}}function st(e,o,i){let l;const r=H(),{Loading:s,TextField:a}=c,{currentTasks:u}=d;k(e,u,(e=>i(23,l=e)));let f,{eventId:$}=o,{className:h}=o,{rowId:g}=o,{filterForReady:v=!1}=o,{showEdit:b=!1}=o,{praefix:y=""}=o,{selectionFields:w=!1}=o,{deList:x}=o,I=!0,_="",j=h+Math.floor(9e3*Math.random()+1e3).toString()+"search";const N=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?p(n):m(e[`_${t.name}`]||e[t.name]||"")},S=t.getSchemaByClass(h),q=async(e,t,n,o)=>{const{value:i,refClass:l}=o,[r,s]=n.split("."),a=i?.get(y),c=a&&await Ll(r,a);if(!c)return e;const d=c[s];return d?.length?d.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 Fl(l+o._id.toString(),o),o})):e};R((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(j)?.focus()}),200)})),n.subscribe((async e=>{if(!e)return;const t=await S;e.eventId===t.id&&(El(t.class,e.eventId),i(2,I=!i(2,I=!1)))}));return e.$$set=e=>{"eventId"in e&&i(16,$=e.eventId),"className"in e&&i(17,h=e.className),"rowId"in e&&i(1,g=e.rowId),"filterForReady"in e&&i(18,v=e.filterForReady),"showEdit"in e&&i(0,b=e.showEdit),"praefix"in e&&i(19,y=e.praefix),"selectionFields"in e&&i(20,w=e.selectionFields),"deList"in e&&i(21,x=e.deList)},[b,g,I,_,f,s,a,u,j,N,e=>()=>r("choose",{row:e}),async()=>{const e=await S;let n;i(4,f=(e=>!l?.length||!!l.find((t=>t===e)))(e.id));let o,s=n=await Sl(e.class,e.id),a=!1,c="";const d=w&&w?.find((t=>e.class===t.refClass.split(":")[0])),u=d?.value?.get&&d.value.get(y);if(u){const[n,i]=d.refClass.split(":");e.class===n&&(s=await q(s,n,i,d)),a=d.parentClass?.find((e=>"quantity"===e.name)),c=d.className,o=await t.getCountedSection(c,i.split(".")[0],u,n,"quantity")}i(0,b&&=!d),!d&&v&&(s=((e,t)=>"Information"===t.state.task?e:e.filter((e=>"WaitingForApproval"===e._task.status||"Ready"===e._task.status||"Closing"===e._task.status)))(s,e));let m=[],p=e.display;return p&&p.length?p.map((t=>{const[n,o]=t.split(".");let i=e.list?.find((e=>e.name===n))?.item.find((e=>e.name===o));i&&(i={...i},i.name=`${n}_${o}`,s=s.map((e=>(e[n]&&(e[i.name]=e[n][o]),e)))),i||(i=e.items.find((e=>e.name===n))),m.find((e=>e?.name===n))||m.push(i)})):m=e.items,!b&&a?(m=m.concat([{name:"quantity",designation:"h-Soll"},{name:"ist",designation:"h-Ist"}]),s=s.map((e=>{const t=o.find((t=>t._id===e._id));return t&&(e.ist=t.quantity.$numberDecimal),e})),o.map((e=>{if(!s.find((t=>t._id===e._id))){const t=n.find((t=>t._id===e._id));t.ist=e.quantity.$numberDecimal,s.push(t)}})),r("init",s)):x&&(s=s.filter((e=>!x.find((t=>t._id===e._id))))),{list:s,items:m}},({detail:{value:e}})=>{i(3,_=e)},(e,t,n)=>{if(!n)return!0;for(const o of t)if(N(e,o)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},e=>`/task/${e._task.event}/${e._task._id}/task?view=standalone`,()=>{i(3,_="")},$,h,v,y,w,x,function(e){_=e,i(3,_)}]}class at extends we{constructor(e){var t;super(),We.getElementById("svelte-btngop-style")||((t=S("style")).id="svelte-btngop-style",t.textContent=".feather.svelte-btngop.svelte-btngop{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-btngop.svelte-btngop{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-btngop .editRow.svelte-btngop{width:1em}.eList.svelte-btngop table.svelte-btngop{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-btngop table thead.svelte-btngop{position:sticky;top:0;background:#326173;color:white}.eList.svelte-btngop table thead tr.svelte-btngop{height:2.3em}.eList.svelte-btngop table tbody tr.svelte-btngop{height:2.75em !important}th.svelte-btngop.svelte-btngop,td.svelte-btngop.svelte-btngop{padding-left:0.4em;padding-right:0.4em}tr.pointer.svelte-btngop.svelte-btngop:hover{background-color:#DAE1E5}tr.active.svelte-btngop.svelte-btngop{color:#326173;background-color:#fcebd5}",I(We.head,t)),ye(this,e,st,rt,w,{eventId:16,className:17,rowId:1,filterForReady:18,showEdit:0,praefix:19,selectionFields:20,deList:21},[-1,-1])}}function ct(e){return{c:h,m:h,p:h,i:h,o:h,d:h}}function dt(e){let t,n,o=e[36]&&ut(e);return{c(){o&&o.c(),t=L()},m(e,i){o&&o.m(e,i),_(e,t,i),n=!0},p(e,n){e[36]?o?(o.p(e,n),4&n[0]&&ue(o,1)):(o=ut(e),o.c(),ue(o,1),o.m(t.parentNode,t)):o&&(ce(),me(o,1,1,(()=>{o=null})),de())},i(e){n||(ue(o),n=!0)},o(e){me(o),n=!1},d(e){o&&o.d(e),e&&j(t)}}}function ut(e){let t,n;return t=new e[15]({props:{title:e[11]?"Auswahl":e[19],class:"eList "+(e[9]?"form":""),$$slots:{default:[yt]},$$scope:{ctx:e}}}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};2048&n[0]&&(o.title=e[11]?"Auswahl":e[19]),512&n[0]&&(o.class="eList "+(e[9]?"form":"")),32767&n[0]|64&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function mt(e){let t,n;return t=new zl({props:{schema:e[1],recID:e[0],readonly:e[10]}}),t.$on("choose",(function(){y(e[25](e[36]))&&e[25](e[36]).apply(this,arguments)})),t.$on("back",e[22]),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(n,o){e=n;const i={};2&o[0]&&(i.schema=e[1]),1&o[0]&&(i.recID=e[0]),1024&o[0]&&(i.readonly=e[10]),t.$set(i)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function ft(e){let t,n,o,i,l,r,s;t=new e[16]({props:{text:e[11]?"Zusätzliche Auswahl":""}});const a=[$t,pt],c=[];function d(e,t){return e[11]?0:1}return o=d(e),i=c[o]=a[o](e),r=new at({props:{eventId:e[1].id,className:e[1].class,filterForReady:e[3],praefix:e[4],selectionFields:e[5],rowId:e[0],deList:e[7],showEdit:e[6]}}),r.$on("edit",e[26]),r.$on("choose",e[29]),r.$on("init",e[27]),{c(){ge(t.$$.fragment),n=C(),i.c(),l=C(),ge(r.$$.fragment)},m(e,i){ve(t,e,i),_(e,n,i),c[o].m(e,i),_(e,l,i),ve(r,e,i),s=!0},p(e,n){const s={};2048&n[0]&&(s.text=e[11]?"Zusätzliche Auswahl":""),t.$set(s);let u=o;o=d(e),o===u?c[o].p(e,n):(ce(),me(c[u],1,1,(()=>{c[u]=null})),de(),i=c[o],i?i.p(e,n):(i=c[o]=a[o](e),i.c()),ue(i,1),i.m(l.parentNode,l));const m={};2&n[0]&&(m.eventId=e[1].id),2&n[0]&&(m.className=e[1].class),8&n[0]&&(m.filterForReady=e[3]),16&n[0]&&(m.praefix=e[4]),32&n[0]&&(m.selectionFields=e[5]),1&n[0]&&(m.rowId=e[0]),128&n[0]&&(m.deList=e[7]),64&n[0]&&(m.showEdit=e[6]),r.$set(m)},i(e){s||(ue(t.$$.fragment,e),ue(i),ue(r.$$.fragment,e),s=!0)},o(e){me(t.$$.fragment,e),me(i),me(r.$$.fragment,e),s=!1},d(e){be(t,e),e&&j(n),c[o].d(e),e&&j(l),be(r,e)}}}function pt(e){let t,n,o,i;n=new e[17]({props:{outline:!0,$$slots:{default:[ht]},$$scope:{ctx:e}}}),n.$on("click",e[23]);let l=e[20]&&function(e){let t,n;return t=new e[17]({props:{filled:!0,$$slots:{default:[gt]},$$scope:{ctx:e}}}),t.$on("click",e[24]),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};64&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}(e);return{c(){t=S("div"),ge(n.$$.fragment),o=C(),l&&l.c(),z(t,"class","form--buttons svelte-jb5mrh")},m(e,r){_(e,t,r),ve(n,t,null),I(t,o),l&&l.m(t,null),i=!0},p(e,t){const o={};64&t[1]&&(o.$$scope={dirty:t,ctx:e}),n.$set(o),e[20]&&l.p(e,t)},i(e){i||(ue(n.$$.fragment,e),ue(l),i=!0)},o(e){me(n.$$.fragment,e),me(l),i=!1},d(e){e&&j(t),be(n),l&&l.d()}}}function $t(e){let t,n,o,i,l,r,s=e[14]&&vt(e);return o=new e[17]({props:{outline:!0,$$slots:{default:[bt]},$$scope:{ctx:e}}}),o.$on("click",e[23]),l=new e[16]({props:{text:"Liste aus "+e[8]}}),{c(){s&&s.c(),t=C(),n=S("div"),ge(o.$$.fragment),i=C(),ge(l.$$.fragment),z(n,"class","form--buttons svelte-jb5mrh")},m(e,a){s&&s.m(e,a),_(e,t,a),_(e,n,a),ve(o,n,null),_(e,i,a),ve(l,e,a),r=!0},p(e,n){e[14]?s?(s.p(e,n),16384&n[0]&&ue(s,1)):(s=vt(e),s.c(),ue(s,1),s.m(t.parentNode,t)):s&&(ce(),me(s,1,1,(()=>{s=null})),de());const i={};64&n[1]&&(i.$$scope={dirty:n,ctx:e}),o.$set(i);const r={};256&n[0]&&(r.text="Liste aus "+e[8]),l.$set(r)},i(e){r||(ue(s),ue(o.$$.fragment,e),ue(l.$$.fragment,e),r=!0)},o(e){me(s),me(o.$$.fragment,e),me(l.$$.fragment,e),r=!1},d(e){s&&s.d(e),e&&j(t),e&&j(n),be(o),e&&j(i),be(l,e)}}}function ht(e){let t;return{c(){t=F("Abbrechen")},m(e,n){_(e,t,n)},d(e){e&&j(t)}}}function gt(e){let t;return{c(){t=F("Neu")},m(e,n){_(e,t,n)},d(e){e&&j(t)}}}function vt(e){let t,n;return t=new oi({props:{item:e[12],record:{_id:"",[e[12].name]:""},noForm:"true",classId:"sel_"+e[12].name,eventId:e[13],required:!1,hidden:!1,readonly:!1,deList:e[14]}}),t.$on("notify",e[28]),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};4096&n[0]&&(o.item=e[12]),4096&n[0]&&(o.record={_id:"",[e[12].name]:""}),4096&n[0]&&(o.classId="sel_"+e[12].name),8192&n[0]&&(o.eventId=e[13]),16384&n[0]&&(o.deList=e[14]),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function bt(e){let t;return{c(){t=F("Abbrechen")},m(e,n){_(e,t,n)},d(e){e&&j(t)}}}function yt(e){let t,n,o,i;const l=[ft,mt],r=[];function s(e,t){return e[36].length&&!e[9]?0:1}return t=s(e),n=r[t]=l[t](e),{c(){n.c(),o=L()},m(e,n){r[t].m(e,n),_(e,o,n),i=!0},p(e,i){let a=t;t=s(e),t===a?r[t].p(e,i):(ce(),me(r[a],1,1,(()=>{r[a]=null})),de(),n=r[t],n?n.p(e,i):(n=r[t]=l[t](e),n.c()),ue(n,1),n.m(o.parentNode,o))},i(e){i||(ue(n),i=!0)},o(e){me(n),i=!1},d(e){r[t].d(e),e&&j(o)}}}function wt(e){return{c:h,m:h,p:h,i:h,o:h,d:h}}function kt(e){let t,n,o,i={ctx:e,current:null,token:null,hasCatch:!1,pending:wt,then:dt,catch:ct,value:36,blocks:[,,,]};return fe(n=e[21](e[2]),i),{c(){t=L(),i.block.c()},m(e,n){_(e,t,n),i.block.m(e,i.anchor=n),i.mount=()=>t.parentNode,i.anchor=t,o=!0},p(t,o){e=t,i.ctx=e,4&o[0]&&n!==(n=e[21](e[2]))&&fe(n,i)||pe(i,e,o)},i(e){o||(ue(i.block),o=!0)},o(e){for(let e=0;e<3;e+=1){me(i.blocks[e])}o=!1},d(e){e&&j(t),i.block.d(e),i.token=null,i=null}}}function xt(e,n,o){let i;const{Dialog:l,Divider:r,Button:s}=c,a=H(),{currentTasks:u}=d;k(e,u,(e=>o(32,i=e)));let{schema:m}=n,{recID:f}=n,{isOpening:p=!0}=n,{filterForReady:$=!1}=n,{praefix:h=""}=n,{selectionFields:g=!1}=n,{showEdit:v=!0}=n,{deList:b}=n,y=m.identity.designation,w=m.id;m.class;let x,I,_,j,N,S,q,F="",C=!1;const L=!i?.length||i.find((e=>e===w));return e.$$set=e=>{"schema"in e&&o(1,m=e.schema),"recID"in e&&o(0,f=e.recID),"isOpening"in e&&o(2,p=e.isOpening),"filterForReady"in e&&o(3,$=e.filterForReady),"praefix"in e&&o(4,h=e.praefix),"selectionFields"in e&&o(5,g=e.selectionFields),"showEdit"in e&&o(6,v=e.showEdit),"deList"in e&&o(7,b=e.deList)},[f,m,p,$,h,g,v,b,F,C,x,_,N,S,q,l,r,s,u,y,L,async e=>{if(!e)return!1;const n=await Sl(m.class,m.id);if(I=g&&g?.find((e=>m.class===e.refClass.split(":")[0])),o(11,_=I?.value?.get&&I.value.get(h)),_){j=I.refClass;const[e,n]=j.split(":"),[i]=n.split(".");o(12,N=I.parentClass.find((t=>t.name===e)));const l=await t.getSchemaByClass(N.refClass);o(13,S=l.id),o(8,F=I.parentClass.find((e=>e.name===i)).designation)}return n},()=>{o(9,C=!1),f||a("back"),v||a("back")},()=>{o(9,C=!1),a("back")},()=>{o(0,f=!1),o(10,x=!1),o(9,C=!0)},e=>({detail:{row:e}})=>{let t=m.display;t&&t.length&&t.map((t=>{const[n,o]=t.split(".");let i=m.list?.find((e=>e.name===n))?.item.find((e=>e.name===o));if(i){e[`${n}_${o}`]=e[n][o]}})),a("choose",{row:e})},({detail:e})=>{o(10,x=!!e._task.visum||"Closed"===e._task.status),o(0,f=e._docId),o(9,C=!0)},({detail:e})=>{_&&o(14,q=e)},({detail:e})=>{if(!e.value)return;const t={_id:e.value};a("choose",{row:t})},function(t){Q(e,t)}]}class It extends we{constructor(e){var t;super(),document.getElementById("svelte-jb5mrh-style")||((t=S("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}",I(document.head,t)),ye(this,e,xt,kt,w,{schema:1,recID:0,isOpening:2,filterForReady:3,praefix:4,selectionFields:5,showEdit:6,deList:7},[-1,-1])}}const{document:_t}=$e;function jt(e){e[27]=e[29].list,e[28]=e[29].items}function Nt(e,t,n){const o=e.slice();return o[30]=t[n],o}function St(e,t,n){const o=e.slice();return o[33]=t[n],o}function qt(e,t,n){const o=e.slice();return o[33]=t[n],o}function Ft(e){return{c:h,m:h,p:h,i:h,o:h,d:h}}function Ct(e){let t,n,o,i,l,r,s,a,c,d,u,m,f,p,$,h,g,v;function b(t){e[24](t)}jt(e),n=new e[7]({props:{outline:!0,$$slots:{default:[Lt]},$$scope:{ctx:e}}}),n.$on("click",e[23]);let y={id:e[8]};void 0!==e[1]&&(y.value=e[1]),r=new e[6]({props:y}),G.push((()=>he(r,"value",b))),r.$on("input",e[12]),d=new ze({props:{size:"18"}});let w=e[28]?.length&&function(e){let t,n,o,i,l=e[28],r=[];for(let t=0;t<l.length;t+=1)r[t]=Et(qt(e,l,t));return{c(){t=S("thead"),n=S("tr"),o=S("th"),i=C();for(let e=0;e<r.length;e+=1)r[e].c();z(o,"class","svelte-14hcfjl"),z(n,"class","svelte-14hcfjl"),z(t,"class","svelte-14hcfjl")},m(e,l){_(e,t,l),I(t,n),I(n,o),I(n,i);for(let e=0;e<r.length;e+=1)r[e].m(n,null)},p(e,t){if(2048&t[0]){let o;for(l=e[28],o=0;o<l.length;o+=1){const i=qt(e,l,o);r[o]?r[o].p(i,t):(r[o]=Et(i),r[o].c(),r[o].m(n,null))}for(;o<r.length;o+=1)r[o].d(1);r.length=l.length}},d(e){e&&j(t),N(r,e)}}}(e),k=e[27]?.length&&function(e){let t,n,o=e[27],i=[];for(let t=0;t<o.length;t+=1)i[t]=zt(Nt(e,o,t));const l=e=>me(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=L()},m(e,o){for(let t=0;t<i.length;t+=1)i[t].m(e,o);_(e,t,o),n=!0},p(e,n){if(44547&n[0]){let r;for(o=e[27],r=0;r<o.length;r+=1){const l=Nt(e,o,r);i[r]?(i[r].p(l,n),ue(i[r],1)):(i[r]=zt(l),i[r].c(),ue(i[r],1),i[r].m(t.parentNode,t))}for(ce(),r=o.length;r<i.length;r+=1)l(r);de()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)ue(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)me(i[e]);n=!1},d(e){N(i,e),e&&j(t)}}}(e);return{c(){t=S("div"),ge(n.$$.fragment),o=C(),i=S("div"),l=F("Suchen: "),ge(r.$$.fragment),a=C(),c=S("span"),ge(d.$$.fragment),u=C(),m=S("div"),f=S("table"),w&&w.c(),p=C(),$=S("tbody"),k&&k.c(),z(t,"class","form--buttons svelte-14hcfjl"),z(c,"class","feather pointer svelte-14hcfjl"),A(i,"margin-bottom","1em"),A(i,"position","relative"),z(f,"striped",""),z(f,"class","svelte-14hcfjl"),z(m,"class","eList svelte-14hcfjl")},m(s,b){_(s,t,b),ve(n,t,null),_(s,o,b),_(s,i,b),I(i,l),ve(r,i,null),I(i,a),I(i,c),ve(d,c,null),_(s,u,b),_(s,m,b),I(m,f),w&&w.m(f,null),I(f,p),I(f,$),k&&k.m($,null),h=!0,g||(v=E(c,"click",e[14]),g=!0)},p(e,t){jt(e);const o={};128&t[1]&&(o.$$scope={dirty:t,ctx:e}),n.$set(o);const i={};!s&&2&t[0]&&(s=!0,i.value=e[1],ne((()=>s=!1))),r.$set(i),e[28]?.length&&w.p(e,t),e[27]?.length&&k.p(e,t)},i(e){h||(ue(n.$$.fragment,e),ue(r.$$.fragment,e),ue(d.$$.fragment,e),ue(k),h=!0)},o(e){me(n.$$.fragment,e),me(r.$$.fragment,e),me(d.$$.fragment,e),me(k),h=!1},d(e){e&&j(t),be(n),e&&j(o),e&&j(i),be(r),be(d),e&&j(u),e&&j(m),w&&w.d(),k&&k.d(),g=!1,v()}}}function Lt(e){let t;return{c(){t=F("Abbrechen")},m(e,n){_(e,t,n)},d(e){e&&j(t)}}}function Et(e){let t,n,o=e[33]?.designation+"";return{c(){t=S("th"),n=F(o),z(t,"class","svelte-14hcfjl")},m(e,o){_(e,t,o),I(t,n)},p:h,d(e){e&&j(t)}}}function Dt(e){let t,n,o,i,l,r,s,a;o=new Ae({props:{size:"18"}});let c=e[28],d=[];for(let t=0;t<c.length;t+=1)d[t]=Tt(St(e,c,t));return{c(){t=S("tr"),n=S("td"),ge(o.$$.fragment),i=C();for(let e=0;e<d.length;e+=1)d[e].c();l=C(),z(n,"class","editRow svelte-14hcfjl"),z(t,"class","pointer svelte-14hcfjl"),M(t,"active",e[30]._id===e[0])},m(c,u){_(c,t,u),I(t,n),ve(o,n,null),I(t,i);for(let e=0;e<d.length;e+=1)d[e].m(t,null);I(t,l),r=!0,s||(a=E(n,"click",e[15](e[30])),s=!0)},p(n,o){if(e=n,3584&o[0]){let n;for(c=e[28],n=0;n<c.length;n+=1){const i=St(e,c,n);d[n]?d[n].p(i,o):(d[n]=Tt(i),d[n].c(),d[n].m(t,l))}for(;n<d.length;n+=1)d[n].d(1);d.length=c.length}2049&o[0]&&M(t,"active",e[30]._id===e[0])},i(e){r||(ue(o.$$.fragment,e),r=!0)},o(e){me(o.$$.fragment,e),r=!1},d(e){e&&j(t),be(o),N(d,e),s=!1,a()}}}function Tt(e){let t,n,o,i,l=e[9](e[30],e[33])+"";return{c(){t=S("td"),n=F(l),z(t,"class","svelte-14hcfjl")},m(l,r){_(l,t,r),I(t,n),o||(i=E(t,"click",T(e[10](e[30]))),o=!0)},p(t,n){e=t},d(e){e&&j(t),o=!1,i()}}}function zt(e){let t,n,o=e[13](e[30],e[28],e[1]),i=o&&Dt(e);return{c(){i&&i.c(),t=L()},m(e,o){i&&i.m(e,o),_(e,t,o),n=!0},p(e,n){2&n[0]&&(o=e[13](e[30],e[28],e[1])),o?i?(i.p(e,n),2&n[0]&&ue(i,1)):(i=Dt(e),i.c(),ue(i,1),i.m(t.parentNode,t)):i&&(ce(),me(i,1,1,(()=>{i=null})),de())},i(e){n||(ue(i),n=!0)},o(e){me(i),n=!1},d(e){i&&i.d(e),e&&j(t)}}}function Ot(e){let t,n;return t=new e[5]({}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p:h,i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Bt(e){let t,n,o,i;t=new e[4]({});let l={ctx:e,current:null,token:null,hasCatch:!1,pending:Ot,then:Ct,catch:Ft,value:29,blocks:[,,,]};return fe(e[11](),l),{c(){ge(t.$$.fragment),n=C(),o=L(),l.block.c()},m(e,r){ve(t,e,r),_(e,n,r),_(e,o,r),l.block.m(e,l.anchor=r),l.mount=()=>o.parentNode,l.anchor=o,i=!0},p(t,n){pe(l,e=t,n)},i(e){i||(ue(t.$$.fragment,e),ue(l.block),i=!0)},o(e){me(t.$$.fragment,e);for(let e=0;e<3;e+=1){me(l.blocks[e])}i=!1},d(e){be(t,e),e&&j(n),e&&j(o),l.block.d(e),l.token=null,l=null}}}function At(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[Bt]},$$scope:{ctx:e}}}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};3&n[0]|128&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Mt(e,o,i){const l=H(),{Dialog:r,Divider:s,Loading:a,TextField:d,Button:u}=c;let{item:f}=o,{classId:$}=o,{className:h}=o,{rowId:g}=o,{viewName:v}=o,{viewValue:b}=o,{recordId:y}=o,{filter:w}=o,k="",x=$+Math.floor(9e3*Math.random()+1e3).toString()+"search";const I=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?p(n):m(e[`_${t.name}`]||e[t.name]||"")},_=t.getSchemaByClass(h);R((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(x)?.focus()}),200)})),n.subscribe((async e=>{if(!e)return;const t=await _;e.eventId===t.id&&El(t.class,e.eventId)}));return e.$$set=e=>{"item"in e&&i(16,f=e.item),"classId"in e&&i(17,$=e.classId),"className"in e&&i(18,h=e.className),"rowId"in e&&i(0,g=e.rowId),"viewName"in e&&i(19,v=e.viewName),"viewValue"in e&&i(20,b=e.viewValue),"recordId"in e&&i(21,y=e.recordId),"filter"in e&&i(22,w=e.filter)},[g,k,l,r,s,a,d,u,x,I,e=>()=>l("choose",{row:e}),async()=>{const e=await _;let n=[];if(f.lookup){const e="."+$+"#"+f.lookup,o=document.querySelector(e);if(o?.value){const e=await t.getTask(f.lookup,o.value);if(e){const o=e[f.name]?.map((e=>e[f.name]));o&&(n=await t.getSectionView(f.name,{_id:{$in:o}},!0))}}}else{const o="."+$+"#"+v.split(":")[0],i=document.querySelector(o);let l={[v]:i?.value||y};if(f.refItem){const e="."+$+"#"+f.refItem;try{const t=document.querySelector(e);if(t){const e={$or:[{[f.refItem]:t.value},{[f.refItem]:{$exists:!0,$eq:""}}]};l={...l,...e}}}catch{}}l[v]&&(n=await t.getSectionView(e.class,l,!0)),w&&(n=n.filter((e=>e._id!=w)))}let o=[],i=e.display;return i&&i.length?i.map((t=>{const[i,l]=t.split(".");let r=e.list?.find((e=>e.name===i))?.item.find((e=>e.name===l));r&&(r={...r},r.name=`${i}_${l}`,n=n.map((e=>(e[i]&&(e[r.name]=e[i][l]),e)))),r||(r=e.items.find((e=>e.name===i))),o.find((e=>e?.name===i))||o.push(r)})):o=e.items,{list:n,items:o}},({detail:{value:e}})=>{i(1,k=e)},(e,t,n)=>{if(!n)return!0;for(const o of t)if(I(e,o)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{i(1,k="")},e=>async()=>{const n=await t.getTaskByDocId(e._id),o=`/task/${n.event}/${n._id}/task?view=standalone`;window.open(o)},f,$,h,v,b,y,w,()=>l("back"),function(e){k=e,i(1,k)}]}class Vt extends we{constructor(e){var t;super(),_t.getElementById("svelte-14hcfjl-style")||((t=S("style")).id="svelte-14hcfjl-style",t.textContent=".feather.svelte-14hcfjl.svelte-14hcfjl{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-14hcfjl.svelte-14hcfjl{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-14hcfjl .editRow.svelte-14hcfjl{width:1em}.eList.svelte-14hcfjl table.svelte-14hcfjl{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-14hcfjl table thead.svelte-14hcfjl{position:sticky;top:0;background:#326173;color:white}.eList.svelte-14hcfjl table tbody tr.svelte-14hcfjl{height:2.3em}th.svelte-14hcfjl.svelte-14hcfjl,td.svelte-14hcfjl.svelte-14hcfjl{padding-left:0.4em;padding-right:0.4em}tr.pointer.svelte-14hcfjl.svelte-14hcfjl:hover{background-color:#DAE1E5}tr.active.svelte-14hcfjl.svelte-14hcfjl{color:#326173;background-color:#fcebd5}.form--buttons.svelte-14hcfjl.svelte-14hcfjl{display:flex;gap:1em;padding:0.5em 0}",I(_t.head,t)),ye(this,e,Mt,At,w,{item:16,classId:17,className:18,rowId:0,viewName:19,viewValue:20,recordId:21,filter:22},[-1,-1])}}const{document:Pt}=$e;function Wt(e){return{c:h,m:h,p:h,i:h,o:h,d:h}}function Rt(e){let t,n,i=e[40]&&function(e){let t,n,i,l,r,s,a,c,d,u,m,f,p,$,h;n=new o({props:{class:"full-width",id:e[21],value:e[2],rows:"1",required:e[1],disabled:e[3],style:"height:2.8em; padding-left:2em;padding-right:2em;overflow-y:hidden; resize:none;"}}),n.$on("click",e[24]()),n.$on("onFocus",e[24](e[21]));const g=[Qt,Ht],v=[];function b(e,t){return!e[3]||e[13]?0:e[18]&&e[0]?1:-1}~(l=b(e))&&(r=v[l]=g[l](e));let y=(!e[3]||e[13])&&Ut(e);function w(t){e[32](t)}let k={class:"tModal",noClickaway:!0,$$slots:{default:[en]},$$scope:{ctx:e}};void 0!==e[15]&&(k.open=e[15]);m=new e[20]({props:k}),G.push((()=>he(m,"open",w)));let N=e[16]&&tn(e);return{c(){t=S("div"),ge(n.$$.fragment),i=C(),r&&r.c(),s=C(),a=S("input"),d=C(),y&&y.c(),u=C(),ge(m.$$.fragment),p=C(),N&&N.c(),$=L(),z(a,"class",c=x(e[7]||e[8])+" svelte-jox15l"),z(a,"id",e[5]),z(a,"name",e[5]),a.value=e[0],a.hidden=!0,A(t,"position","relative")},m(e,o){_(e,t,o),ve(n,t,null),I(t,i),~l&&v[l].m(t,null),I(t,s),I(t,a),I(t,d),y&&y.m(t,null),_(e,u,o),ve(m,e,o),_(e,p,o),N&&N.m(e,o),_(e,$,o),h=!0},p(e,o){const i={};4&o[0]&&(i.value=e[2]),2&o[0]&&(i.required=e[1]),8&o[0]&&(i.disabled=e[3]),n.$set(i);let d=l;l=b(e),l===d?~l&&v[l].p(e,o):(r&&(ce(),me(v[d],1,1,(()=>{v[d]=null})),de()),~l?(r=v[l],r?r.p(e,o):(r=v[l]=g[l](e),r.c()),ue(r,1),r.m(t,s)):r=null),(!h||384&o[0]&&c!==(c=x(e[7]||e[8])+" svelte-jox15l"))&&z(a,"class",c),(!h||32&o[0])&&z(a,"id",e[5]),(!h||32&o[0])&&z(a,"name",e[5]),(!h||1&o[0]&&a.value!==e[0])&&(a.value=e[0]),!e[3]||e[13]?y?(y.p(e,o),8200&o[0]&&ue(y,1)):(y=Ut(e),y.c(),ue(y,1),y.m(t,null)):y&&(ce(),me(y,1,1,(()=>{y=null})),de());const u={};57169&o[0]|2048&o[1]&&(u.$$scope={dirty:o,ctx:e}),!f&&32768&o[0]&&(f=!0,u.open=e[15],ne((()=>f=!1))),m.$set(u),e[16]?N?(N.p(e,o),65536&o[0]&&ue(N,1)):(N=tn(e),N.c(),ue(N,1),N.m($.parentNode,$)):N&&(ce(),me(N,1,1,(()=>{N=null})),de())},i(e){h||(ue(n.$$.fragment,e),ue(r),ue(y),ue(m.$$.fragment,e),ue(N),h=!0)},o(e){me(n.$$.fragment,e),me(r),me(y),me(m.$$.fragment,e),me(N),h=!1},d(e){e&&j(t),be(n),~l&&v[l].d(),y&&y.d(),e&&j(u),be(m,e),e&&j(p),N&&N.d(e),e&&j($)}}}(e);return{c(){i&&i.c(),t=L()},m(e,o){i&&i.m(e,o),_(e,t,o),n=!0},p(e,t){e[40]&&i.p(e,t)},i(e){n||(ue(i),n=!0)},o(e){me(i),n=!1},d(e){i&&i.d(e),e&&j(t)}}}function Ht(e){let t,n,o={ctx:e,current:null,token:null,hasCatch:!1,pending:Jt,then:Gt,catch:Yt,value:41,blocks:[,,,]};return fe(e[28](),o),{c(){t=L(),o.block.c()},m(e,i){_(e,t,i),o.block.m(e,o.anchor=i),o.mount=()=>t.parentNode,o.anchor=t,n=!0},p(t,n){pe(o,e=t,n)},i(e){n||(ue(o.block),n=!0)},o(e){for(let e=0;e<3;e+=1){me(o.blocks[e])}n=!1},d(e){e&&j(t),o.block.d(e),o.token=null,o=null}}}function Qt(e){let t,n,o,i,l;return n=new Pe({props:{size:"18"}}),{c(){t=S("span"),ge(n.$$.fragment),z(t,"class","feather pointer svelte-jox15l")},m(r,s){_(r,t,s),ve(n,t,null),o=!0,i||(l=[E(t,"click",e[24]()),E(t,"choose",e[25])],i=!0)},p:h,i(e){o||(ue(n.$$.fragment,e),o=!0)},o(e){me(n.$$.fragment,e),o=!1},d(e){e&&j(t),be(n),i=!1,b(l)}}}function Yt(e){return{c:h,m:h,p:h,i:h,o:h,d:h}}function Gt(e){let t,n,o,i;return o=new Ae({props:{size:"18"}}),{c(){t=S("span"),n=S("a"),ge(o.$$.fragment),z(n,"href",e[41]),z(n,"target","_blank"),z(t,"class","feather pointer svelte-jox15l")},m(e,l){_(e,t,l),I(t,n),ve(o,n,null),i=!0},p:h,i(e){i||(ue(o.$$.fragment,e),i=!0)},o(e){me(o.$$.fragment,e),i=!1},d(e){e&&j(t),be(o)}}}function Jt(e){return{c:h,m:h,p:h,i:h,o:h,d:h}}function Ut(e){let t,n,o,i,l;return n=new ze({props:{size:"18"}}),{c(){t=S("span"),ge(n.$$.fragment),z(t,"class","feather2 pointer svelte-jox15l")},m(r,s){_(r,t,s),ve(n,t,null),o=!0,i||(l=E(t,"click",e[27]),i=!0)},p:h,i(e){o||(ue(n.$$.fragment,e),o=!0)},o(e){me(n.$$.fragment,e),o=!1},d(e){e&&j(t),be(n),i=!1,l()}}}function Zt(e){let t,n,o,i;const l=[Xt,Kt],r=[];function s(e,t){return e[6].lookup||e[4]&&!e[6].constraint?0:1}return t=s(e),n=r[t]=l[t](e),{c(){n.c(),o=L()},m(e,n){r[t].m(e,n),_(e,o,n),i=!0},p(e,i){let a=t;t=s(e),t===a?r[t].p(e,i):(ce(),me(r[a],1,1,(()=>{r[a]=null})),de(),n=r[t],n?n.p(e,i):(n=r[t]=l[t](e),n.c()),ue(n,1),n.m(o.parentNode,o))},i(e){i||(ue(n),i=!0)},o(e){me(n),i=!1},d(e){r[t].d(e),e&&j(o)}}}function Kt(e){let t,n;return t=new It({props:{schema:e[14],recID:e[0],isOpening:e[15],filterForReady:"true",selectionFields:e[11],deList:e[12],praefix:e[10]}}),t.$on("choose",e[25]),t.$on("back",e[26]),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};16384&n[0]&&(o.schema=e[14]),1&n[0]&&(o.recID=e[0]),32768&n[0]&&(o.isOpening=e[15]),2048&n[0]&&(o.selectionFields=e[11]),4096&n[0]&&(o.deList=e[12]),1024&n[0]&&(o.praefix=e[10]),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Xt(e){let t,n;return t=new Vt({props:{item:e[6],className:e[14].class,classId:e[8],rowId:e[0],recordId:e[9],viewName:e[4],viewValue:""}}),t.$on("choose",e[25]),t.$on("back",e[26]),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};64&n[0]&&(o.item=e[6]),16384&n[0]&&(o.className=e[14].class),256&n[0]&&(o.classId=e[8]),1&n[0]&&(o.rowId=e[0]),512&n[0]&&(o.recordId=e[9]),16&n[0]&&(o.viewName=e[4]),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function en(e){let t,n,o=e[15]&&Zt(e);return{c(){o&&o.c(),t=L()},m(e,i){o&&o.m(e,i),_(e,t,i),n=!0},p(e,n){e[15]?o?(o.p(e,n),32768&n[0]&&ue(o,1)):(o=Zt(e),o.c(),ue(o,1),o.m(t.parentNode,t)):o&&(ce(),me(o,1,1,(()=>{o=null})),de())},i(e){n||(ue(o),n=!0)},o(e){me(o),n=!1},d(e){o&&o.d(e),e&&j(t)}}}function tn(e){let t,n,o;function i(t){e[33](t)}let l={class:"tModal",noClickaway:!0,$$slots:{default:[on]},$$scope:{ctx:e}};return void 0!==e[16]&&(l.open=e[16]),t=new e[20]({props:l}),G.push((()=>he(t,"open",i))),{c(){ge(t.$$.fragment)},m(e,n){ve(t,e,n),o=!0},p(e,o){const i={};147457&o[0]|2048&o[1]&&(i.$$scope={dirty:o,ctx:e}),!n&&65536&o[0]&&(n=!0,i.open=e[16],ne((()=>n=!1))),t.$set(i)},i(e){o||(ue(t.$$.fragment,e),o=!0)},o(e){me(t.$$.fragment,e),o=!1},d(e){be(t,e)}}}function nn(e){let t,n;return t=new zl({props:{schema:e[14],recID:e[0],readonly:!0}}),t.$on("back",e[26]),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};16384&n[0]&&(o.schema=e[14]),1&n[0]&&(o.recID=e[0]),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function on(e){let t,n;return t=new e[19]({props:{title:e[17],$$slots:{default:[nn]},$$scope:{ctx:e}}}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};131072&n[0]&&(o.title=e[17]),16385&n[0]|2048&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function ln(e){return{c:h,m:h,p:h,i:h,o:h,d:h}}function rn(e){let t,n,o={ctx:e,current:null,token:null,hasCatch:!1,pending:ln,then:Rt,catch:Wt,value:40,blocks:[,,,]};return fe(e[23](),o),{c(){t=L(),o.block.c()},m(e,i){_(e,t,i),o.block.m(e,o.anchor=i),o.mount=()=>t.parentNode,o.anchor=t,n=!0},p(t,n){pe(o,e=t,n)},i(e){n||(ue(o.block),n=!0)},o(e){for(let e=0;e<3;e+=1){me(o.blocks[e])}n=!1},d(e){e&&j(t),o.block.d(e),o.token=null,o=null}}}function sn(e,n,o){let i;const l=H(),{Dialog:r,Modal:s}=c;let{id:a}=n,{item:u}=n,{value:m=""}=n,{desc:f=""}=n,{noForm:p=!1}=n,{classId:h}=n,{eventId:g}=n,{recordId:v}=n,{required:b}=n,{disabled:y}=n,{readonly:w}=n,{praefix:x}=n,{selectionFields:I}=n,{formnovalidate:_}=n,{selection:j}=n,{deList:N}=n,{isTemplate:S}=n;const q="comment_"+a;let F,C,L,E,D=!1;w||=v&&u.asInput,y||=w,!j&&u.selection&&1===u.selection.split(":").length&&(j=u.selection);const{currentTasks:T}=d;k(e,T,(e=>o(34,i=e)));const z=e=>{e&&(o(2,f=$(L,e)),l("change",{value:m,description:f}),l("task",{row:e,eventId:L.id}))},O=()=>{o(15,D=!1),o(16,F=!1)};return e.$$set=e=>{"id"in e&&o(5,a=e.id),"item"in e&&o(6,u=e.item),"value"in e&&o(0,m=e.value),"desc"in e&&o(2,f=e.desc),"noForm"in e&&o(7,p=e.noForm),"classId"in e&&o(8,h=e.classId),"eventId"in e&&o(30,g=e.eventId),"recordId"in e&&o(9,v=e.recordId),"required"in e&&o(1,b=e.required),"disabled"in e&&o(3,y=e.disabled),"readonly"in e&&o(29,w=e.readonly),"praefix"in e&&o(10,x=e.praefix),"selectionFields"in e&&o(11,I=e.selectionFields),"formnovalidate"in e&&o(31,_=e.formnovalidate),"selection"in e&&o(4,j=e.selection),"deList"in e&&o(12,N=e.deList),"isTemplate"in e&&o(13,S=e.isTemplate)},e.$$.update=()=>{2&e.$$.dirty[0]|1&e.$$.dirty[1]&&o(1,b=b&&!_),16449&e.$$.dirty[0]&&m&&L&&Promise.resolve(ql(u.refClass,L.id,m)).then((e=>z(e))),16385&e.$$.dirty[0]&&!m&&L&&z({})},[m,b,f,y,j,a,u,p,h,v,x,I,N,S,L,D,F,C,E,r,s,q,T,async()=>{try{if(o(14,L=await t.getSchemaByClass(u.refClass)),o(18,E=(e=>!i?.length||!!i.find((t=>t===e)))(L.id)),g&&v&&m&&!y){const e=await t.getSchema(g);e.input?.find((e=>e===u.refClass))&&o(3,y=!0)}return o(17,C=L.identity.designation),!0}catch{return l("initFail",!0),!1}},e=>t=>{if("BUTTON"===t.explicitOriginalTarget?.nodeName){const t=document.getElementById(e);return t?.blur()}o(15,D=!0)},({detail:e})=>{o(0,m=e.row._id),O()},O,()=>{E&&(o(0,m=o(2,f="")),l("change",{value:m,description:f}),l("task",{row:{_task:{event:L.id,_id:!1}}}))},async()=>{if(!m)return;const e=await ql(u.refClass,L.id,m),t=e._task._id;return`/task/${e._task.event}/${t}/task?view=standalone`},w,g,_,function(e){D=e,o(15,D)},function(e){F=e,o(16,F)}]}class an extends we{constructor(e){var t;super(),Pt.getElementById("svelte-jox15l-style")||((t=S("style")).id="svelte-jox15l-style",t.textContent=".feather.svelte-jox15l{position:absolute;top:0.75em;left:0.5em;color:#4300b0}.feather2.svelte-jox15l{position:absolute;top:0.75em;right:0.5em;color:#4300b0}.text-field textarea:invalid{border-bottom:1px #b80000 solid !important;background-color:#fbeeee !important}",I(Pt.head,t)),ye(this,e,sn,rn,w,{id:5,item:6,value:0,desc:2,noForm:7,classId:8,eventId:30,recordId:9,required:1,disabled:3,readonly:29,praefix:10,selectionFields:11,formnovalidate:31,selection:4,deList:12,isTemplate:13},[-1,-1])}}function cn(e){let t,n,o;return n=new e[7]({props:{lang:e[8].id,class:"left",type:"string",inputClass:"txt-right"+(e[1]?"":" "+e[2]),id:e[0],name:e[0],value:e[6],step:e[9],pattern:e[5],placeholder:e[10],readonly:e[11],disabled:e[3],required:e[4]}}),n.$on("change",e[12]),n.$on("focus",e[13]),{c(){t=S("div"),ge(n.$$.fragment),A(t,"position","relative"),A(t,"max-width","10em")},m(e,i){_(e,t,i),ve(n,t,null),o=!0},p(e,[t]){const o={};6&t&&(o.inputClass="txt-right"+(e[1]?"":" "+e[2])),1&t&&(o.id=e[0]),1&t&&(o.name=e[0]),64&t&&(o.value=e[6]),32&t&&(o.pattern=e[5]),8&t&&(o.disabled=e[3]),16&t&&(o.required=e[4]),n.$set(o)},i(e){o||(ue(n.$$.fragment,e),o=!0)},o(e){me(n.$$.fragment,e),o=!1},d(e){e&&j(t),be(n)}}}function dn(e,t,n){let o;const l=H(),{TextField:r}=c;let{id:s}=t,{item:a}=t,{value:d}=t,{noForm:u=!1}=t,{classId:m}=t,{disabled:f}=t,{formnovalidate:p}=t;const $=JSON.parse(i.getItem("Locale")),h=Number("1.1").toLocaleString($.id).substring(1,2),{properties:g={}}=a;let{min:v,max:b,step:y,pattern:w,decimals:k=0,unit:x="",placeholder:I,hint:_,readonly:j,negative:N,required:S=!1}=g;w||(w=k?`[0-9]+([${h}][0-9]{1,${k}})?`:"[0-9]*"),N&&(w="-?"+w);return e.$$set=e=>{"id"in e&&n(0,s=e.id),"item"in e&&n(14,a=e.item),"value"in e&&n(15,d=e.value),"noForm"in e&&n(1,u=e.noForm),"classId"in e&&n(2,m=e.classId),"disabled"in e&&n(3,f=e.disabled),"formnovalidate"in e&&n(16,p=e.formnovalidate)},e.$$.update=()=>{65552&e.$$.dirty&&n(4,S=S&&!p),32768&e.$$.dirty&&n(6,o=Number(d.toString().replace(h,".")).toFixed(k).toString().replace(".",h))},[s,u,m,f,S,w,o,r,$,y,I,j,({detail:e})=>l("blur",{value:e.value}),({detail:e})=>{j||Number(d.toString().replace(h,"."))||n(6,o="")},a,d,p]}class un extends we{constructor(e){super(),ye(this,e,dn,cn,w,{id:0,item:14,value:15,noForm:1,classId:2,disabled:3,formnovalidate:16})}}const{document:mn}=$e;function fn(e){e[32]=e[34].list,e[33]=e[34].items}function pn(e,t,n){const o=e.slice();return o[35]=t[n],o[37]=n,o}function $n(e,t,n){const o=e.slice();return o[38]=t[n],o[40]=n,o}function hn(e,t,n){const o=e.slice();return o[38]=t[n],o}function gn(e){return{c:h,m:h,p:h,i:h,o:h,d:h}}function vn(e){let t,n,o,i,l,r,s,a,c,d,u,m,f,p,$,h,g,v,b;fn(e),n=new e[8]({props:{outline:!0,$$slots:{default:[bn]},$$scope:{ctx:e}}}),n.$on("click",e[29]);let y=!e[1]&&yn(e);function w(t){e[30](t)}let k={id:e[11]};void 0!==e[2]&&(k.value=e[2]),s=new e[6]({props:k}),G.push((()=>he(s,"value",w))),s.$on("input",e[14]),u=new ze({props:{size:"18"}});let x=e[33]?.length&&function(e){let t,n,o,i,l=!e[1]&&kn(e),r=e[33],s=[];for(let t=0;t<r.length;t+=1)s[t]=xn(hn(e,r,t));return{c(){t=S("thead"),n=S("tr"),l&&l.c(),o=C();for(let e=0;e<s.length;e+=1)s[e].c();z(n,"class","svelte-1m010ne"),z(t,"class","svelte-1m010ne")},m(e,r){_(e,t,r),I(t,n),l&&l.m(n,null),I(n,o);for(let e=0;e<s.length;e+=1)s[e].m(n,null);i=!0},p(e,t){if(e[1]?l&&(ce(),me(l,1,1,(()=>{l=null})),de()):l?(l.p(e,t),2&t[0]&&ue(l,1)):(l=kn(e),l.c(),ue(l,1),l.m(n,o)),8192&t[0]){let o;for(r=e[33],o=0;o<r.length;o+=1){const i=hn(e,r,o);s[o]?s[o].p(i,t):(s[o]=xn(i),s[o].c(),s[o].m(n,null))}for(;o<s.length;o+=1)s[o].d(1);s.length=r.length}},i(e){i||(ue(l),i=!0)},o(e){me(l),i=!1},d(e){e&&j(t),l&&l.d(),N(s,e)}}}(e),q=e[32]?.length&&function(e){let t,n,o=e[32],i=[];for(let t=0;t<o.length;t+=1)i[t]=Sn(pn(e,o,t));const l=e=>me(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=L()},m(e,o){for(let t=0;t<i.length;t+=1)i[t].m(e,o);_(e,t,o),n=!0},p(e,n){if(569359&n[0]){let r;for(o=e[32],r=0;r<o.length;r+=1){const l=pn(e,o,r);i[r]?(i[r].p(l,n),ue(i[r],1)):(i[r]=Sn(l),i[r].c(),ue(i[r],1),i[r].m(t.parentNode,t))}for(ce(),r=o.length;r<i.length;r+=1)l(r);de()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)ue(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)me(i[e]);n=!1},d(e){N(i,e),e&&j(t)}}}(e);return{c(){t=S("div"),ge(n.$$.fragment),o=C(),y&&y.c(),i=C(),l=S("div"),r=F("Suchen: "),ge(s.$$.fragment),c=C(),d=S("span"),ge(u.$$.fragment),m=C(),f=S("div"),p=S("table"),x&&x.c(),$=C(),h=S("tbody"),q&&q.c(),z(t,"class","form--buttons svelte-1m010ne"),z(d,"class","feather pointer svelte-1m010ne"),A(l,"margin-bottom","1em"),A(l,"position","relative"),z(p,"striped",""),z(p,"class","svelte-1m010ne"),z(f,"class","eList svelte-1m010ne")},m(a,w){_(a,t,w),ve(n,t,null),I(t,o),y&&y.m(t,null),_(a,i,w),_(a,l,w),I(l,r),ve(s,l,null),I(l,c),I(l,d),ve(u,d,null),_(a,m,w),_(a,f,w),I(f,p),x&&x.m(p,null),I(p,$),I(p,h),q&&q.m(h,null),g=!0,v||(b=E(d,"click",e[16]),v=!0)},p(e,o){fn(e);const i={};4096&o[1]&&(i.$$scope={dirty:o,ctx:e}),n.$set(i),e[1]?y&&(ce(),me(y,1,1,(()=>{y=null})),de()):y?(y.p(e,o),2&o[0]&&ue(y,1)):(y=yn(e),y.c(),ue(y,1),y.m(t,null));const l={};!a&&4&o[0]&&(a=!0,l.value=e[2],ne((()=>a=!1))),s.$set(l),e[33]?.length&&x.p(e,o),e[32]?.length&&q.p(e,o)},i(e){g||(ue(n.$$.fragment,e),ue(y),ue(s.$$.fragment,e),ue(u.$$.fragment,e),ue(x),ue(q),g=!0)},o(e){me(n.$$.fragment,e),me(y),me(s.$$.fragment,e),me(u.$$.fragment,e),me(x),me(q),g=!1},d(e){e&&j(t),be(n),y&&y.d(),e&&j(i),e&&j(l),be(s),be(u),e&&j(m),e&&j(f),x&&x.d(),q&&q.d(),v=!1,b()}}}function bn(e){let t;return{c(){t=F("Abbrechen")},m(e,n){_(e,t,n)},d(e){e&&j(t)}}}function yn(e){let t,n;return t=new e[8]({props:{disabled:!e[32].length,filled:!0,$$slots:{default:[wn]},$$scope:{ctx:e}}}),t.$on("click",e[17](e[32])),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};4096&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function wn(e){let t;return{c(){t=F("Bestätigen")},m(e,n){_(e,t,n)},d(e){e&&j(t)}}}function kn(e){let t,n,o,i,l;return n=new Ne({props:{size:"20"}}),{c(){t=S("th"),ge(n.$$.fragment),z(t,"class","svelte-1m010ne")},m(r,s){_(r,t,s),ve(n,t,null),o=!0,i||(l=E(t,"click",e[18](e[32])),i=!0)},p(t,n){e=t},i(e){o||(ue(n.$$.fragment,e),o=!0)},o(e){me(n.$$.fragment,e),o=!1},d(e){e&&j(t),be(n),i=!1,l()}}}function xn(e){let t,n,o=e[38]+"";return{c(){t=S("th"),n=F(o),z(t,"class","svelte-1m010ne")},m(e,o){_(e,t,o),I(t,n)},p:h,d(e){e&&j(t)}}}function In(e){let t,n,o,i,l,r,s,a=e[0],c=jn(e),d=e[33],u=[];for(let t=0;t<d.length;t+=1)u[t]=Nn($n(e,d,t));return{c(){t=S("tr"),c.c(),n=C();for(let e=0;e<u.length;e+=1)u[e].c();o=C(),z(t,"style",i=e[1]?"cursor: default;":"cursor: zoom-in;"),z(t,"title","übernimmt den Wert direkt"),z(t,"class","svelte-1m010ne"),M(t,"active",e[0].includes(e[35]))},m(i,a){_(i,t,a),c.m(t,null),I(t,n);for(let e=0;e<u.length;e+=1)u[e].m(t,null);I(t,o),l=!0,r||(s=E(t,"click",e[19](e[35])),r=!0)},p(r,s){if(e=r,1&s[0]&&w(a,a=e[0])?(ce(),me(c,1,1,h),de(),c=jn(e),c.c(),ue(c),c.m(t,n)):c.p(e,s),8200&s[0]){let n;for(d=e[33],n=0;n<d.length;n+=1){const i=$n(e,d,n);u[n]?u[n].p(i,s):(u[n]=Nn(i),u[n].c(),u[n].m(t,o))}for(;n<u.length;n+=1)u[n].d(1);u.length=d.length}(!l||2&s[0]&&i!==(i=e[1]?"cursor: default;":"cursor: zoom-in;"))&&z(t,"style",i),8193&s[0]&&M(t,"active",e[0].includes(e[35]))},i(e){l||(ue(c),l=!0)},o(e){me(c),l=!1},d(e){e&&j(t),c.d(e),N(u,e),r=!1,s()}}}function _n(e){let t,n,o;return n=new e[10]({props:{name:e[12],data:e[37],checked:e[0].includes(e[35]),round:!0}}),{c(){t=S("td"),ge(n.$$.fragment),z(t,"title","Wählt den Wert aus"),z(t,"class","svelte-1m010ne")},m(e,i){_(e,t,i),ve(n,t,null),o=!0},p(e,t){const o={};1&t[0]&&(o.checked=e[0].includes(e[35])),n.$set(o)},i(e){o||(ue(n.$$.fragment,e),o=!0)},o(e){me(n.$$.fragment,e),o=!1},d(e){e&&j(t),be(n)}}}function jn(e){let t,n,o=!e[1]&&_n(e);return{c(){o&&o.c(),t=L()},m(e,i){o&&o.m(e,i),_(e,t,i),n=!0},p(e,n){e[1]?o&&(ce(),me(o,1,1,(()=>{o=null})),de()):o?(o.p(e,n),2&n[0]&&ue(o,1)):(o=_n(e),o.c(),ue(o,1),o.m(t.parentNode,t))},i(e){n||(ue(o),n=!0)},o(e){me(o),n=!1},d(e){o&&o.d(e),e&&j(t)}}}function Nn(e){let t,n,o=(e[3][e[37]]?e[3][e[37]][e[40]]:e[35])+"";return{c(){t=S("td"),n=F(o),z(t,"class","svelte-1m010ne")},m(e,o){_(e,t,o),I(t,n)},p(e,t){8&t[0]&&o!==(o=(e[3][e[37]]?e[3][e[37]][e[40]]:e[35])+"")&&O(n,o)},d(e){e&&j(t)}}}function Sn(e){let t,n,o=e[15](e[35],e[2]),i=o&&In(e);return{c(){i&&i.c(),t=L()},m(e,o){i&&i.m(e,o),_(e,t,o),n=!0},p(e,n){4&n[0]&&(o=e[15](e[35],e[2])),o?i?(i.p(e,n),4&n[0]&&ue(i,1)):(i=In(e),i.c(),ue(i,1),i.m(t.parentNode,t)):i&&(ce(),me(i,1,1,(()=>{i=null})),de())},i(e){n||(ue(i),n=!0)},o(e){me(i),n=!1},d(e){i&&i.d(e),e&&j(t)}}}function qn(e){let t,n;return t=new e[5]({}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p:h,i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Fn(e){let t,n,o,i;t=new e[9]({});let l={ctx:e,current:null,token:null,hasCatch:!1,pending:qn,then:vn,catch:gn,value:34,blocks:[,,,]};return fe(e[13](),l),{c(){ge(t.$$.fragment),n=C(),o=L(),l.block.c()},m(e,r){ve(t,e,r),_(e,n,r),_(e,o,r),l.block.m(e,l.anchor=r),l.mount=()=>o.parentNode,l.anchor=o,i=!0},p(t,n){pe(l,e=t,n)},i(e){i||(ue(t.$$.fragment,e),ue(l.block),i=!0)},o(e){me(t.$$.fragment,e);for(let e=0;e<3;e+=1){me(l.blocks[e])}i=!1},d(e){be(t,e),e&&j(n),e&&j(o),l.block.d(e),l.token=null,l=null}}}function Cn(e){let t,n;return t=new e[7]({props:{title:"Auswahl",class:"eList",$$slots:{default:[Fn]},$$scope:{ctx:e}}}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};15&n[0]|4096&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Ln(e,n,o){const i=H(),{Loading:l,TextField:r,Dialog:s,Button:a,Divider:d,Checkbox:u}=c;let{classId:m}=n,{id:f}=n,{selection:p}=n,{tableName:$}=n,{idName:h}=n,{target:g}=n,{view:v}=n,{unique:b}=n,{uniqueView:y}=n,{status:w}=n,{single:k}=n;p||=[];let x="",I=m+Math.floor(9e3*Math.random()+1e3).toString()+"search",_=[];const j=$+h+g+"checkbox",N=(e,t)=>e>t?1:t>e?-1:0;return e.$$set=e=>{"classId"in e&&o(20,m=e.classId),"id"in e&&o(21,f=e.id),"selection"in e&&o(0,p=e.selection),"tableName"in e&&o(22,$=e.tableName),"idName"in e&&o(23,h=e.idName),"target"in e&&o(24,g=e.target),"view"in e&&o(25,v=e.view),"unique"in e&&o(26,b=e.unique),"uniqueView"in e&&o(27,y=e.uniqueView),"status"in e&&o(28,w=e.status),"single"in e&&o(1,k=e.single)},[p,k,x,_,i,l,r,s,a,d,u,I,j,async()=>{let e,n=[],i=[];if(o(3,_=[]),h)if(v){const o=m.split("-")[1].slice(0,-4),i="input."+m+"[name='_id']",l=document.querySelector(i).value;e={[h]:f},w&&(e.$or=[{status:!0},{[o]:l}]),n=await t.getSectionView($,e),n=n.sort(((e,t)=>{const n=e=>(e[o]||"z").toString()+e[g];return N(n(e),n(t))}))}else y?(e={[h]:f,status:!0},Object.entries(y).map((([t,n])=>{n?.length&&(e[t]={$in:n}),i.push(t)})),n=await t.getSectionView($,e),n=n.sort(((e,t)=>{const n=e=>(p.includes(e[g])?"0-":"1-")+e[g];return N(n(e),n(t))})),o(3,_=n.map((e=>{const t=[e[g]];return i.map((n=>t.push(e[n]))),t})))):b?(n=await t.getSection($,h,f,b),n=n.sort(((e,t)=>N(e,t)))):(n=await t.getSection($,h,f),n=n.sort(((e,t)=>{const n=e=>(p.includes(e[g])?"0-":"1-")+e[g];return N(n(e),n(t))})));else e={_id:f},f&&(n=await t.getSectionView($,e));const l=[];n.map((e=>{let t=e[g];if(Array.isArray(t))for(const e of t){let t=e;"string"!=typeof e&&(t=Array.from(Object.values(e)).filter((e=>!!e&&24!==e?.length)).join(", ")),l.push(t||[])}else l.push(t||[])}));const r=await t.getSchemaByClass($),s=r.items.find((e=>e.name===g))?.designation;return i=i.map((e=>r.items.find((t=>t.name===e))?.designation)),{list:l.flat(),items:[s,...i]}},({detail:{value:e}})=>{o(2,x=e)},(e,t)=>!t||!!e.toLowerCase().includes(t.toLowerCase()),()=>{o(2,x="")},e=>()=>{const t=document.getElementsByName(j),n=[];t.forEach(((t,o)=>{t.checked&&n.push(e[+t.attributes.data.value])})),i("choose",{list:n})},e=>()=>{document.getElementsByName(j).forEach(((e,t)=>{e.checked=!e.checked}))},e=>t=>{"TD"===t.target?.nodeName&&(k?i("choose",{list:[].concat(e)}):(o(0,p=p.includes(e)?p.filter((t=>t!==e)):p.concat(e)),i("choose",{list:p})))},m,f,$,h,g,v,b,y,w,()=>i("back"),function(e){x=e,o(2,x)}]}class En extends we{constructor(e){var t;super(),mn.getElementById("svelte-1m010ne-style")||((t=S("style")).id="svelte-1m010ne-style",t.textContent=".feather.svelte-1m010ne.svelte-1m010ne{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-1m010ne.svelte-1m010ne{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-1m010ne table.svelte-1m010ne{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-1m010ne table thead.svelte-1m010ne{position:sticky;top:0;background:#326173;color:white}.eList.svelte-1m010ne table tbody tr.svelte-1m010ne{height:2.3em}th.svelte-1m010ne.svelte-1m010ne,td.svelte-1m010ne.svelte-1m010ne{padding-left:0.4em;padding-right:0.4em}tr.active.svelte-1m010ne.svelte-1m010ne{color:#326173;background-color:#fcebd5}.dialog.eList{max-height:90vh}.checkbox.round > .selector{border-color:#326173 !important}.form--buttons.svelte-1m010ne.svelte-1m010ne{display:flex;gap:1em;padding:0.5em 0}",I(mn.head,t)),ye(this,e,Ln,Cn,w,{classId:20,id:21,selection:0,tableName:22,idName:23,target:24,view:25,unique:26,uniqueView:27,status:28,single:1},[-1,-1])}}const{document:Dn}=$e;function Tn(e){let t,n,o,i,l,r=e[7].length+"";return{c(){t=S("span"),n=F("("),o=F(r),i=F(")"),z(t,"class",l=x(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")},m(e,l){_(e,t,l),I(t,n),I(t,o),I(t,i)},p(e,n){128&n[0]&&r!==(r=e[7].length+"")&&O(o,r),2&n[0]&&l!==(l=x(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")&&z(t,"class",l)},d(e){e&&j(t)}}}function zn(e){let t;return{c(){t=S("div"),z(t,"class","load-more-options"),z(t,"slot","load-more-options-message slot")},m(e,n){_(e,t,n)},d(e){e&&j(t)}}}function On(e){let t,n,o,i;const l=[Mn,An,Bn],r=[];function s(e,t){return!e[16].single&&e[7].length?0:e[17]?1:e[14]&&e[16].view&&e[16].maxItem?2:-1}return~(t=s(e))&&(n=r[t]=l[t](e)),{c(){n&&n.c(),o=L()},m(e,n){~t&&r[t].m(e,n),_(e,o,n),i=!0},p(e,i){let a=t;t=s(e),t===a?~t&&r[t].p(e,i):(n&&(ce(),me(r[a],1,1,(()=>{r[a]=null})),de()),~t?(n=r[t],n?n.p(e,i):(n=r[t]=l[t](e),n.c()),ue(n,1),n.m(o.parentNode,o)):n=null)},i(e){i||(ue(n),i=!0)},o(e){me(n),i=!1},d(e){~t&&r[t].d(e),e&&j(o)}}}function Bn(e){let t,n,o,i,l;return n=new Ie({props:{size:"18"}}),{c(){t=S("span"),ge(n.$$.fragment),z(t,"title","Übernehmen"),z(t,"class","feather pointer svelte-1rbaejz")},m(r,s){_(r,t,s),ve(n,t,null),o=!0,i||(l=E(t,"click",e[25]),i=!0)},p:h,i(e){o||(ue(n.$$.fragment,e),o=!0)},o(e){me(n.$$.fragment,e),o=!1},d(e){e&&j(t),be(n),i=!1,l()}}}function An(e){let t,n,o,i,l;return n=new Fe({props:{size:"18"}}),{c(){t=S("span"),ge(n.$$.fragment),z(t,"title",e[17].title||"Generieren"),z(t,"class","feather pointer svelte-1rbaejz")},m(r,s){_(r,t,s),ve(n,t,null),o=!0,i||(l=E(t,"click",e[24]),i=!0)},p:h,i(e){o||(ue(n.$$.fragment,e),o=!0)},o(e){me(n.$$.fragment,e),o=!1},d(e){e&&j(t),be(n),i=!1,l()}}}function Mn(e){let t,n,o,i,l;return n=new ze({props:{size:"18"}}),{c(){t=S("span"),ge(n.$$.fragment),z(t,"title","Löschen"),z(t,"class","feather pointer svelte-1rbaejz")},m(r,s){_(r,t,s),ve(n,t,null),o=!0,i||(l=E(t,"click",e[26]),i=!0)},p:h,i(e){o||(ue(n.$$.fragment,e),o=!0)},o(e){me(n.$$.fragment,e),o=!1},d(e){e&&j(t),be(n),i=!1,l()}}}function Vn(e){let t,n,o;function i(t){e[35](t)}let l={class:"tModal",noClickaway:!0,$$slots:{default:[Pn]},$$scope:{ctx:e}};return void 0!==e[10]&&(l.open=e[10]),t=new e[11]({props:l}),G.push((()=>he(t,"open",i))),{c(){ge(t.$$.fragment)},m(e,n){ve(t,e,n),o=!0},p(e,o){const i={};53&o[0]|4096&o[1]&&(i.$$scope={dirty:o,ctx:e}),!n&&1024&o[0]&&(n=!0,i.open=e[10],ne((()=>n=!1))),t.$set(i)},i(e){o||(ue(t.$$.fragment,e),o=!0)},o(e){me(t.$$.fragment,e),o=!1},d(e){be(t,e)}}}function Pn(e){let t,n;return t=new En({props:{classId:e[2],selection:e[0],view:e[15],status:e[18],unique:e[16].unique&&e[4].name,uniqueView:e[16].view&&{[e[16].view]:e[5][e[16].view]},id:e[5][e[20]||e[19]],tableName:e[19],idName:e[20],target:e[4].name,single:e[16].single}}),t.$on("choose",e[23]),t.$on("back",e[22]),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};4&n[0]&&(o.classId=e[2]),1&n[0]&&(o.selection=e[0]),16&n[0]&&(o.unique=e[16].unique&&e[4].name),32&n[0]&&(o.uniqueView=e[16].view&&{[e[16].view]:e[5][e[16].view]}),32&n[0]&&(o.id=e[5][e[20]||e[19]]),16&n[0]&&(o.target=e[4].name),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Wn(e){let t,n,o,i,l,r,s,a,c,d=!e[16].single&&e[7].length&&Tn(e);function u(t){e[33](t)}function m(t){e[34](t)}let f={id:e[3],name:e[3],class:e[3],readonly:e[13],disabled:e[1],required:e[6],placeholder:e[8],getOptions:Rn,minSearchLength:"3",$$slots:{"load-more-options-message slot":[zn]},$$scope:{ctx:e}};void 0!==e[7]&&(f.selection=e[7]),void 0!==e[9]&&(f.maxOptions=e[9]),o=new e[12]({props:f}),G.push((()=>he(o,"selection",u))),G.push((()=>he(o,"maxOptions",m))),o.$on("change",e[21]);let p=!e[1]&&On(e),$=e[10]&&Vn(e);return{c(){t=S("div"),d&&d.c(),n=C(),ge(o.$$.fragment),r=C(),p&&p.c(),s=C(),$&&$.c(),a=L(),A(t,"position","relative")},m(e,i){_(e,t,i),d&&d.m(t,null),I(t,n),ve(o,t,null),I(t,r),p&&p.m(t,null),_(e,s,i),$&&$.m(e,i),_(e,a,i),c=!0},p(e,r){!e[16].single&&e[7].length?d?d.p(e,r):(d=Tn(e),d.c(),d.m(t,n)):d&&(d.d(1),d=null);const s={};8&r[0]&&(s.id=e[3]),8&r[0]&&(s.name=e[3]),8&r[0]&&(s.class=e[3]),2&r[0]&&(s.disabled=e[1]),64&r[0]&&(s.required=e[6]),256&r[0]&&(s.placeholder=e[8]),4096&r[1]&&(s.$$scope={dirty:r,ctx:e}),!i&&128&r[0]&&(i=!0,s.selection=e[7],ne((()=>i=!1))),!l&&512&r[0]&&(l=!0,s.maxOptions=e[9],ne((()=>l=!1))),o.$set(s),e[1]?p&&(ce(),me(p,1,1,(()=>{p=null})),de()):p?(p.p(e,r),2&r[0]&&ue(p,1)):(p=On(e),p.c(),ue(p,1),p.m(t,null)),e[10]?$?($.p(e,r),1024&r[0]&&ue($,1)):($=Vn(e),$.c(),ue($,1),$.m(a.parentNode,a)):$&&(ce(),me($,1,1,(()=>{$=null})),de())},i(e){c||(ue(o.$$.fragment,e),ue(p),ue($),c=!0)},o(e){me(o.$$.fragment,e),me(p),me($),c=!1},d(e){e&&j(t),d&&d.d(),be(o),p&&p.d(),e&&j(s),$&&$.d(e),e&&j(a)}}}async function*Rn(e){yield[{name:e}]}function Hn(e,n,o){const i=H(),{Modal:l,Autocomplete:r}=c;let{classId:s}=n,{id:a}=n,{item:d}=n,{record:u}=n,{value:m}=n,{noForm:f=!1}=n,{disabled:p}=n,{formnovalidate:$}=n,{numberInput:h}=n,{praefix:g}=n,{toDelete:v}=n,{reqQuantity:b}=n;const{properties:y={}}=d;let{placeholder:w,hint:k,readonly:x,required:I=!1,lookup:_="",view:j=!1,multi:N,max:S=1e3,generate:q=!1,status:F=!0}=y;const[C,L]=_.split(":");let E=!1,D=m.map&&m.map((e=>({name:e})))||[];p||=x,p&&(w="");R((async()=>{const e=document.getElementById(a);e.classList.add(s),!x&&_&&e.addEventListener("focus",T)}));const T=()=>{if(_){document.getElementById(a).blur();const e=b||S;(N.unique||D.length<e)&&o(10,E=!0)}},z=()=>{o(10,E&&=!1)},O=({detail:e})=>{o(7,D=e.list.map((e=>({name:e})))),i("blur",{value:e.list}),i("multi",{view:N.view,lookup:_,name:d.name,value:e.list}),z()},B=async()=>{const e={[L]:u[L]},n=await t.getSectionView(C,e),o=Array.from({length:n.length},((e,t)=>n[t][d.name]));O({detail:{list:o}})},A=(e=!1)=>{if(p||!N.required)return;const t=N.maxItem;if(!t||N.unique)return;o(9,S=!1!==e?e:b||u[t]||0);const n=D.length!=S,l=document.getElementById(a);l?.classList?.toggle("invalid",n),i("invalid",{idx:g,value:n})};return e.$$set=e=>{"classId"in e&&o(2,s=e.classId),"id"in e&&o(3,a=e.id),"item"in e&&o(4,d=e.item),"record"in e&&o(5,u=e.record),"value"in e&&o(0,m=e.value),"noForm"in e&&o(27,f=e.noForm),"disabled"in e&&o(1,p=e.disabled),"formnovalidate"in e&&o(28,$=e.formnovalidate),"numberInput"in e&&o(29,h=e.numberInput),"praefix"in e&&o(30,g=e.praefix),"toDelete"in e&&o(31,v=e.toDelete),"reqQuantity"in e&&o(32,b=e.reqQuantity)},e.$$.update=()=>{16&e.$$.dirty[0]|1&e.$$.dirty[1]&&v&&v===d.name&&o(7,D=[]),128&e.$$.dirty[0]&&D&&(o(0,m=D.map&&D.map((e=>e.name))||[]),A()),536870912&e.$$.dirty[0]&&((e={})=>{const{item:t,value:n,idx:o}=e;void 0!==g&&g!==o||t&&t.name===N.maxItem&&A(n)})(h),268435520&e.$$.dirty[0]&&o(6,I=I&&!$)},[m,p,s,a,d,u,I,D,w,S,E,l,r,x,_,j,N,q,F,C,L,({detail:e})=>{let t=[];e.value.map((e=>{const n=e.name?.split(",");t=t.concat(n)})),o(7,D=t.map((e=>({name:e.trim()})))),i("blur",{value:D.map((e=>e.name))}),i("multi",{view:N.view,lookup:_,value:D.map((e=>e.name))})},z,O,()=>{const e=u[q.itemQuantity]||b;if(!e)return;const t=q.prefix||"",n=u[q.variable]||"",o=q.len||5,i=Array.from({length:e},((e,i)=>t+n+"-"+i.toString().padStart(o,"0")));O({detail:{list:i}})},async()=>{if(!0===j)return B();const e=b||u[N.maxItem];if(!e)return;const n={[L]:u[L],status:!0},o=[].concat(u[N.view]||[]);o.length&&(n[N.view]={$in:o});const i=await t.getSectionView(C,n),l=Array.from({length:e<i.length?e:i.length},((e,t)=>i[t][d.name]));O({detail:{list:l}})},()=>{O({detail:{list:[]}})},f,$,h,g,v,b,function(e){D=e,o(7,D),o(31,v),o(4,d)},function(e){S=e,o(9,S)},function(e){E=e,o(10,E)}]}class Qn extends we{constructor(e){var t;super(),Dn.getElementById("svelte-1rbaejz-style")||((t=S("style")).id="svelte-1rbaejz-style",t.textContent=".feather.svelte-1rbaejz{position:absolute;top:1em;right:0.5em;color:#4300b0}.showNumber.svelte-1rbaejz{position:absolute;display:inline-block;width:3.5em;text-align:right;top:1em;left:-4em;color:#4300b0}.showNumber.disabled.svelte-1rbaejz{color:#888 !important}.autocomplete .notice,.autocomplete .load-more-options,.autocomplete .show-on-focus,.autocomplete.disabled .chip button.btn,.autocomplete.disabled .chip+.autocomplete-field input{display:none}.autocomplete-field input.invalid{border:1px red solid !important}.autocomplete.disabled .chip{height:2.25em !important;padding-right:0.75em !important}",I(Dn.head,t)),ye(this,e,Hn,Wn,w,{classId:2,id:3,item:4,record:5,value:0,noForm:27,disabled:1,formnovalidate:28,numberInput:29,praefix:30,toDelete:31,reqQuantity:32},[-1,-1])}}const{document:Yn}=$e;function Gn(e){e[26]=e[28].list,e[27]=e[28].items}function Jn(e,t,n){const o=e.slice();return o[29]=t[n],o}function Un(e,t,n){const o=e.slice();return o[32]=t[n],o}function Zn(e,t,n){const o=e.slice();return o[32]=t[n],o}function Kn(e){return{c:h,m:h,p:h,i:h,o:h,d:h}}function Xn(e){let t,n,o,i,l,r,s,a,c,d,u,m,f,p,$,h,g,v;function b(t){e[23](t)}Gn(e),n=new e[7]({props:{outline:!0,$$slots:{default:[eo]},$$scope:{ctx:e}}}),n.$on("click",e[22]);let y={id:e[8]};void 0!==e[1]&&(y.value=e[1]),r=new e[6]({props:y}),G.push((()=>he(r,"value",b))),r.$on("input",e[12]),d=new ze({props:{size:"18"}});let w=e[27]?.length&&function(e){let t,n,o=e[27],i=[];for(let t=0;t<o.length;t+=1)i[t]=to(Zn(e,o,t));return{c(){t=S("thead"),n=S("tr");for(let e=0;e<i.length;e+=1)i[e].c();z(n,"class","svelte-14hcfjl"),z(t,"class","svelte-14hcfjl")},m(e,o){_(e,t,o),I(t,n);for(let e=0;e<i.length;e+=1)i[e].m(n,null)},p(e,t){if(2048&t[0]){let l;for(o=e[27],l=0;l<o.length;l+=1){const r=Zn(e,o,l);i[l]?i[l].p(r,t):(i[l]=to(r),i[l].c(),i[l].m(n,null))}for(;l<i.length;l+=1)i[l].d(1);i.length=o.length}},d(e){e&&j(t),N(i,e)}}}(e),k=e[26]?.length&&function(e){let t,n=e[26],o=[];for(let t=0;t<n.length;t+=1)o[t]=io(Jn(e,n,t));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=L()},m(e,n){for(let t=0;t<o.length;t+=1)o[t].m(e,n);_(e,t,n)},p(e,i){if(11779&i[0]){let l;for(n=e[26],l=0;l<n.length;l+=1){const r=Jn(e,n,l);o[l]?o[l].p(r,i):(o[l]=io(r),o[l].c(),o[l].m(t.parentNode,t))}for(;l<o.length;l+=1)o[l].d(1);o.length=n.length}},d(e){N(o,e),e&&j(t)}}}(e);return{c(){t=S("div"),ge(n.$$.fragment),o=C(),i=S("div"),l=F("Suchen: "),ge(r.$$.fragment),a=C(),c=S("span"),ge(d.$$.fragment),u=C(),m=S("div"),f=S("table"),w&&w.c(),p=C(),$=S("tbody"),k&&k.c(),z(t,"class","form--buttons svelte-14hcfjl"),z(c,"class","feather pointer svelte-14hcfjl"),A(i,"margin-bottom","1em"),A(i,"position","relative"),z(f,"striped",""),z(f,"class","svelte-14hcfjl"),z(m,"class","eList svelte-14hcfjl")},m(s,b){_(s,t,b),ve(n,t,null),_(s,o,b),_(s,i,b),I(i,l),ve(r,i,null),I(i,a),I(i,c),ve(d,c,null),_(s,u,b),_(s,m,b),I(m,f),w&&w.m(f,null),I(f,p),I(f,$),k&&k.m($,null),h=!0,g||(v=E(c,"click",e[14]),g=!0)},p(e,t){Gn(e);const o={};64&t[1]&&(o.$$scope={dirty:t,ctx:e}),n.$set(o);const i={};!s&&2&t[0]&&(s=!0,i.value=e[1],ne((()=>s=!1))),r.$set(i),e[27]?.length&&w.p(e,t),e[26]?.length&&k.p(e,t)},i(e){h||(ue(n.$$.fragment,e),ue(r.$$.fragment,e),ue(d.$$.fragment,e),h=!0)},o(e){me(n.$$.fragment,e),me(r.$$.fragment,e),me(d.$$.fragment,e),h=!1},d(e){e&&j(t),be(n),e&&j(o),e&&j(i),be(r),be(d),e&&j(u),e&&j(m),w&&w.d(),k&&k.d(),g=!1,v()}}}function eo(e){let t;return{c(){t=F("Abbrechen")},m(e,n){_(e,t,n)},d(e){e&&j(t)}}}function to(e){let t,n,o=e[32]?.designation+"";return{c(){t=S("th"),n=F(o),z(t,"class","svelte-14hcfjl")},m(e,o){_(e,t,o),I(t,n)},p:h,d(e){e&&j(t)}}}function no(e){let t,n,o=e[27],i=[];for(let t=0;t<o.length;t+=1)i[t]=oo(Un(e,o,t));return{c(){t=S("tr");for(let e=0;e<i.length;e+=1)i[e].c();n=C(),z(t,"class","pointer svelte-14hcfjl"),M(t,"active",e[29]._id===e[0])},m(e,o){_(e,t,o);for(let e=0;e<i.length;e+=1)i[e].m(t,null);I(t,n)},p(e,l){if(3584&l[0]){let r;for(o=e[27],r=0;r<o.length;r+=1){const s=Un(e,o,r);i[r]?i[r].p(s,l):(i[r]=oo(s),i[r].c(),i[r].m(t,n))}for(;r<i.length;r+=1)i[r].d(1);i.length=o.length}2049&l[0]&&M(t,"active",e[29]._id===e[0])},d(e){e&&j(t),N(i,e)}}}function oo(e){let t,n,o,i,l=e[9](e[29],e[32])+"";return{c(){t=S("td"),n=F(l),z(t,"class","svelte-14hcfjl")},m(l,r){_(l,t,r),I(t,n),o||(i=E(t,"click",T(e[10](e[29]))),o=!0)},p(t,n){e=t},d(e){e&&j(t),o=!1,i()}}}function io(e){let t,n=e[13](e[29],e[27],e[1]),o=n&&no(e);return{c(){o&&o.c(),t=L()},m(e,n){o&&o.m(e,n),_(e,t,n)},p(e,i){2&i[0]&&(n=e[13](e[29],e[27],e[1])),n?o?o.p(e,i):(o=no(e),o.c(),o.m(t.parentNode,t)):o&&(o.d(1),o=null)},d(e){o&&o.d(e),e&&j(t)}}}function lo(e){let t,n;return t=new e[5]({}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p:h,i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function ro(e){let t,n,o,i;t=new e[4]({});let l={ctx:e,current:null,token:null,hasCatch:!1,pending:lo,then:Xn,catch:Kn,value:28,blocks:[,,,]};return fe(e[11](),l),{c(){ge(t.$$.fragment),n=C(),o=L(),l.block.c()},m(e,r){ve(t,e,r),_(e,n,r),_(e,o,r),l.block.m(e,l.anchor=r),l.mount=()=>o.parentNode,l.anchor=o,i=!0},p(t,n){pe(l,e=t,n)},i(e){i||(ue(t.$$.fragment,e),ue(l.block),i=!0)},o(e){me(t.$$.fragment,e);for(let e=0;e<3;e+=1){me(l.blocks[e])}i=!1},d(e){be(t,e),e&&j(n),e&&j(o),l.block.d(e),l.token=null,l=null}}}function so(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[ro]},$$scope:{ctx:e}}}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};3&n[0]|64&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function ao(e,o,i){const l=H(),{Dialog:r,Divider:s,Loading:a,TextField:d,Button:u}=c;let{item:f}=o,{className:$}=o,{classId:h}=o,{rowId:g}=o,{viewName:v}=o,{viewValue:b}=o,{recordId:y}=o,{filter:w}=o,k="",x=h+Math.floor(9e3*Math.random()+1e3).toString()+"search";const I=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?p(n):m(e[`_${t.name}`]||e[t.name]||"")},_=t.getSchemaByClass($);R((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(x)?.focus()}),200)})),n.subscribe((async e=>{if(!e)return;const t=await _;e.eventId===t.id&&El(t.class,e.eventId)}));return e.$$set=e=>{"item"in e&&i(15,f=e.item),"className"in e&&i(16,$=e.className),"classId"in e&&i(17,h=e.classId),"rowId"in e&&i(0,g=e.rowId),"viewName"in e&&i(18,v=e.viewName),"viewValue"in e&&i(19,b=e.viewValue),"recordId"in e&&i(20,y=e.recordId),"filter"in e&&i(21,w=e.filter)},[g,k,l,r,s,a,d,u,x,I,e=>()=>l("choose",{row:e}),async()=>{const e=await _,n="."+h+"#"+v;document.querySelector(n);let o={[v]:b},i=[];o[v]&&(i=await t.getSectionView(e.class,o,!0)),w&&(i=i.filter((e=>e._id!=w)));let l=[],r=e.display;return r&&r.length?r.map((t=>{const[n,o]=t.split(".");let r=e.list?.find((e=>e.name===n))?.item.find((e=>e.name===o));r&&(r={...r},r.name=`${n}_${o}`,i=i.map((e=>(e[n]&&(e[r.name]=e[n][o]),e)))),r||(r=e.items.find((e=>e.name===n))),l.find((e=>e?.name===n))||l.push(r)})):l=e.items,{list:i,items:l}},({detail:{value:e}})=>{i(1,k=e)},(e,t,n)=>{if(!n)return!0;for(const o of t)if(I(e,o)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{i(1,k="")},f,$,h,v,b,y,w,()=>l("back"),function(e){k=e,i(1,k)}]}class co extends we{constructor(e){var t;super(),Yn.getElementById("svelte-14hcfjl-style")||((t=S("style")).id="svelte-14hcfjl-style",t.textContent=".feather.svelte-14hcfjl.svelte-14hcfjl{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-14hcfjl.svelte-14hcfjl{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-14hcfjl table.svelte-14hcfjl{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-14hcfjl table thead.svelte-14hcfjl{position:sticky;top:0;background:#326173;color:white}.eList.svelte-14hcfjl table tbody tr.svelte-14hcfjl{height:2.3em}th.svelte-14hcfjl.svelte-14hcfjl,td.svelte-14hcfjl.svelte-14hcfjl{padding-left:0.4em;padding-right:0.4em}tr.pointer.svelte-14hcfjl.svelte-14hcfjl:hover{background-color:#DAE1E5}tr.active.svelte-14hcfjl.svelte-14hcfjl{color:#326173;background-color:#fcebd5}.form--buttons.svelte-14hcfjl.svelte-14hcfjl{display:flex;gap:1em;padding:0.5em 0}",I(Yn.head,t)),ye(this,e,ao,so,w,{item:15,className:16,classId:17,rowId:0,viewName:18,viewValue:19,recordId:20,filter:21},[-1,-1])}}function uo(e){return{c:h,m:h,p:h,i:h,o:h,d:h}}function mo(e){let t,n,o,i,l;function r(t){e[21](t)}let s={id:e[2],name:e[3].name,inputClass:e[5]||e[1],disabled:e[6],formnovalidate:e[7],readonly:e[13],pattern:e[12],required:e[14],style:"padding-left:2em;"};void 0!==e[0]&&(s.value=e[0]),n=new e[10]({props:s}),G.push((()=>he(n,"value",r)));let a=!e[6]&&fo(e);return{c(){t=S("div"),ge(n.$$.fragment),i=C(),a&&a.c(),A(t,"position","relative")},m(e,o){_(e,t,o),ve(n,t,null),I(t,i),a&&a.m(t,null),l=!0},p(e,i){const l={};4&i&&(l.id=e[2]),8&i&&(l.name=e[3].name),34&i&&(l.inputClass=e[5]||e[1]),64&i&&(l.disabled=e[6]),128&i&&(l.formnovalidate=e[7]),!o&&1&i&&(o=!0,l.value=e[0],ne((()=>o=!1))),n.$set(l),e[6]?a&&(ce(),me(a,1,1,(()=>{a=null})),de()):a?(a.p(e,i),64&i&&ue(a,1)):(a=fo(e),a.c(),ue(a,1),a.m(t,null))},i(e){l||(ue(n.$$.fragment,e),ue(a),l=!0)},o(e){me(n.$$.fragment,e),me(a),l=!1},d(e){e&&j(t),be(n),a&&a.d()}}}function fo(e){let t,n,o,i,l;return n=new Pe({props:{size:"18"}}),{c(){t=S("span"),ge(n.$$.fragment),z(t,"class","feather pointer svelte-wbrqzu")},m(r,s){_(r,t,s),ve(n,t,null),o=!0,i||(l=E(t,"click",e[17]),i=!0)},p:h,i(e){o||(ue(n.$$.fragment,e),o=!0)},o(e){me(n.$$.fragment,e),o=!1},d(e){e&&j(t),be(n),i=!1,l()}}}function po(e){return{c:h,m:h,p:h,i:h,o:h,d:h}}function $o(e){let t,n,o;function i(t){e[22](t)}let l={class:"tModal",noClickaway:!0,$$slots:{default:[ho]},$$scope:{ctx:e}};return void 0!==e[8]&&(l.open=e[8]),t=new e[11]({props:l}),G.push((()=>he(t,"open",i))),{c(){ge(t.$$.fragment)},m(e,n){ve(t,e,n),o=!0},p(e,o){const i={};268435994&o&&(i.$$scope={dirty:o,ctx:e}),!n&&256&o&&(n=!0,i.open=e[8],ne((()=>n=!1))),t.$set(i)},i(e){o||(ue(t.$$.fragment,e),o=!0)},o(e){me(t.$$.fragment,e),o=!1},d(e){be(t,e)}}}function ho(e){let t,n;return t=new co({props:{item:e[3],className:e[3].refClass,classId:e[1],rowId:"",recordId:e[4]._id,viewName:e[15].selection,viewValue:e[9],filter:e[4]._id}}),t.$on("choose",e[18]),t.$on("back",e[19]),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};8&n&&(o.item=e[3]),8&n&&(o.className=e[3].refClass),2&n&&(o.classId=e[1]),16&n&&(o.recordId=e[4]._id),512&n&&(o.viewValue=e[9]),16&n&&(o.filter=e[4]._id),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function go(e){let t,n,o,i={ctx:e,current:null,token:null,hasCatch:!1,pending:po,then:mo,catch:uo,value:27,blocks:[,,,]};fe(e[16](),i);let l=e[8]&&$o(e);return{c(){i.block.c(),t=C(),l&&l.c(),n=L()},m(e,r){i.block.m(e,i.anchor=r),i.mount=()=>t.parentNode,i.anchor=t,_(e,t,r),l&&l.m(e,r),_(e,n,r),o=!0},p(t,[o]){pe(i,e=t,o),e[8]?l?(l.p(e,o),256&o&&ue(l,1)):(l=$o(e),l.c(),ue(l,1),l.m(n.parentNode,n)):l&&(ce(),me(l,1,1,(()=>{l=null})),de())},i(e){o||(ue(i.block),ue(l),o=!0)},o(e){for(let e=0;e<3;e+=1){me(i.blocks[e])}me(l),o=!1},d(e){i.block.d(e),i.token=null,i=null,e&&j(t),l&&l.d(e),e&&j(n)}}}function vo(e,t,n){const{TextField:o,Modal:i}=c;let{classId:l}=t,{id:r}=t,{item:s}=t,{record:a}=t,{value:d}=t,{noForm:u=!1}=t,{disabled:m}=t,{formnovalidate:f}=t,{praefix:p}=t;const{properties:$={}}=s;let h,{pattern:g,placeholder:v,readonly:b,required:y=!1,view:w}=$,k=!1;const x=()=>{n(8,k=!1)};return e.$$set=e=>{"classId"in e&&n(1,l=e.classId),"id"in e&&n(2,r=e.id),"item"in e&&n(3,s=e.item),"record"in e&&n(4,a=e.record),"value"in e&&n(0,d=e.value),"noForm"in e&&n(5,u=e.noForm),"disabled"in e&&n(6,m=e.disabled),"formnovalidate"in e&&n(7,f=e.formnovalidate),"praefix"in e&&n(20,p=e.praefix)},[d,l,r,s,a,u,m,f,k,h,o,i,g,b,y,w,async()=>(n(9,h=a[w.selection]),!0),()=>{n(8,k=!0)},({detail:e})=>{n(0,d=e.row[w.value?w.value:"_id"]),x()},x,p,function(e){d=e,n(0,d)},function(e){k=e,n(8,k)}]}class bo extends we{constructor(e){var t;super(),document.getElementById("svelte-wbrqzu-style")||((t=S("style")).id="svelte-wbrqzu-style",t.textContent=".feather.svelte-wbrqzu{position:absolute;top:0.75em;left:0.5em;color:#4300b0}",I(document.head,t)),ye(this,e,vo,go,w,{classId:1,id:2,item:3,record:4,value:0,noForm:5,disabled:6,formnovalidate:7,praefix:20})}}function yo(e,t,n){const o=e.slice();return o[10]=t[n],o}function wo(e){let t,n,o,i=e[10]+"";return{c(){t=S("option"),n=F(i),t.__value=e[10],t.value=t.__value,t.selected=o=e[1]===e[10],z(t,"class","svelte-5xpzvo")},m(e,o){_(e,t,o),I(t,n)},p(e,n){2&n&&o!==(o=e[1]===e[10])&&(t.selected=o)},d(e){e&&j(t)}}}function ko(e){let t,n,o,i,l,r=e[4],s=[];for(let t=0;t<r.length;t+=1)s[t]=wo(yo(e,r,t));return{c(){t=S("select"),n=S("option");for(let e=0;e<s.length;e+=1)s[e].c();n.__value="",n.value=n.__value,z(n,"class","svelte-5xpzvo"),z(t,"class",o=x(e[2]||e[3])+" svelte-5xpzvo"),z(t,"id",e[0]),z(t,"name",e[0]),z(t,"readonly",e[5])},m(o,r){_(o,t,r),I(t,n);for(let e=0;e<s.length;e+=1)s[e].m(t,null);i||(l=E(t,"change",e[6]),i=!0)},p(e,[n]){if(18&n){let o;for(r=e[4],o=0;o<r.length;o+=1){const i=yo(e,r,o);s[o]?s[o].p(i,n):(s[o]=wo(i),s[o].c(),s[o].m(t,null))}for(;o<s.length;o+=1)s[o].d(1);s.length=r.length}12&n&&o!==(o=x(e[2]||e[3])+" svelte-5xpzvo")&&z(t,"class",o),1&n&&z(t,"id",e[0]),1&n&&z(t,"name",e[0])},i:h,o:h,d(e){e&&j(t),N(s,e),i=!1,l()}}}function xo(e,t,n){const o=H();let{id:i}=t,{item:l}=t,{value:r}=t,{noForm:s=!1}=t,{classId:a}=t,{disabled:c}=t;const{enum:d}=l.properties,u=c||l.properties.readonly;return e.$$set=e=>{"id"in e&&n(0,i=e.id),"item"in e&&n(7,l=e.item),"value"in e&&n(1,r=e.value),"noForm"in e&&n(2,s=e.noForm),"classId"in e&&n(3,a=e.classId),"disabled"in e&&n(8,c=e.disabled)},[i,r,s,a,d,u,e=>o("blur",{value:e.srcElement.value}),l,c]}class Io extends we{constructor(e){var t;super(),document.getElementById("svelte-5xpzvo-style")||((t=S("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}",I(document.head,t)),ye(this,e,xo,ko,w,{id:0,item:7,value:1,noForm:2,classId:3,disabled:8})}}const _o=/\d+/g,jo=/%[HMSpPdmyY%]/g;function No(e,t,n){const o=Math.floor((new Date).getFullYear()/100);let i=!1;if(""===e)return null;const l=t.split(jo);let r=0,s=0;const a=new Date(0);for(const c of l){if(!e.startsWith(c,r))return n;if(r+=c.length,r===e.length){if(s!==t.length)return n;break}if("%"!==t[s+c.length])break;if(s+=c.length+1,"%"===t[s]){if("%"!==e[r])return n;r++}else if("p"===t[s].toLowerCase()){const t=e.substr(r,2).toUpperCase();if("AM"===t)i=!1,a.getHours()>=12&&a.setHours(a.getHours()-12);else{if("PM"!==t)return n;i=!0,a.getHours()<12&&a.setHours(a.getHours()+12)}}else{_o.lastIndex=r;const l=_o.exec(e);if(null==l)return n;switch(t[s]){case"H":a.setHours(parseInt(l[0])+12*i);break;case"M":a.setMinutes(l[0]);break;case"S":a.setSeconds(l[0]);break;case"d":a.setDate(l[0]);break;case"m":a.setMonth(l[0]-1);break;case"y":a.setFullYear(100*o+parseInt(l[0]));break;case"Y":a.setFullYear(l[0])}r+=l[0].length}s++}return isNaN(a.valueOf())?n:a}function So(e){let t;return{c(){t=F("Stunden")},m(e,n){_(e,t,n)},d(e){e&&j(t)}}}function qo(e){let t,n;return t=new e[4]({props:{slot:"hours-label",$$slots:{default:[So]},$$scope:{ctx:e}}}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Fo(e){let t;return{c(){t=F("Minuten")},m(e,n){_(e,t,n)},d(e){e&&j(t)}}}function Co(e){let t,n;return t=new e[4]({props:{slot:"minutes-label",$$slots:{default:[Fo]},$$scope:{ctx:e}}}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Lo(e){let t;return{c(){t=F("Jetzt")},m(e,n){_(e,t,n)},d(e){e&&j(t)}}}function Eo(e){let t,n;return t=new e[4]({props:{slot:"now-label",$$slots:{default:[Lo]},$$scope:{ctx:e}}}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Do(e){let t,n,o,i,l,r,s,a,c;return i=new e[5]({props:{value:e[0],closeOnSelection:!0}}),i.$on("change",e[8]),r=new e[6]({props:{value:e[0],$$slots:{"now-label":[Eo],"minutes-label":[Co],"hours-label":[qo]},$$scope:{ctx:e}}}),r.$on("change",e[7]),{c(){t=S("input"),o=C(),ge(i.$$.fragment),l=C(),ge(r.$$.fragment),z(t,"type","string"),z(t,"class",n=e[2]||e[3]),z(t,"id",e[1]),z(t,"name",e[1]),t.hidden=!0},m(n,d){_(n,t,d),B(t,e[0]),_(n,o,d),ve(i,n,d),_(n,l,d),ve(r,n,d),s=!0,a||(c=E(t,"input",e[9]),a=!0)},p(e,[o]){(!s||12&o&&n!==(n=e[2]||e[3]))&&z(t,"class",n),(!s||2&o)&&z(t,"id",e[1]),(!s||2&o)&&z(t,"name",e[1]),1&o&&B(t,e[0]);const l={};1&o&&(l.value=e[0]),i.$set(l);const a={};1&o&&(a.value=e[0]),4096&o&&(a.$$scope={dirty:o,ctx:e}),r.$set(a)},i(e){s||(ue(i.$$.fragment,e),ue(r.$$.fragment,e),s=!0)},o(e){me(i.$$.fragment,e),me(r.$$.fragment,e),s=!1},d(e){e&&j(t),e&&j(o),be(i,e),e&&j(l),be(r,e),a=!1,c()}}}function To(e,t,n){const o=H(),{Label:i,DatePicker:l,TimePicker:r}=c;let{value:s}=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,s=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)},[s,a,d,u,i,l,r,({detail:e})=>{var t,o;n(0,(t=e.value,o=s,s=null==t||null==o?t:(o.setHours(t.getHours(),t.getMinutes(),t.getSeconds()),o))),m(s)},({detail:e})=>{var t,o;n(0,(t=e.value,o=s,s=null==t||null==o?t:(o.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),o))),m(s)},function(){s=this.value,n(0,s)}]}class zo extends we{constructor(e){super(),ye(this,e,To,Do,w,{value:0,id:1,noForm:2,classId:3})}}function Oo(e){let t,n,o;return n=new e[6]({props:{type:"string",inputClass:e[2]?"":" "+e[3],id:e[0],name:e[0],value:e[1],pattern:Bo,placeholder:Ao,readonly:e[4],disabled:e[5]}}),n.$on("change",e[7]),{c(){t=S("div"),ge(n.$$.fragment),A(t,"max-width","4em")},m(e,i){_(e,t,i),ve(n,t,null),o=!0},p(e,[t]){const o={};12&t&&(o.inputClass=e[2]?"":" "+e[3]),1&t&&(o.id=e[0]),1&t&&(o.name=e[0]),2&t&&(o.value=e[1]),16&t&&(o.readonly=e[4]),32&t&&(o.disabled=e[5]),n.$set(o)},i(e){o||(ue(n.$$.fragment,e),o=!0)},o(e){me(n.$$.fragment,e),o=!1},d(e){e&&j(t),be(n)}}}const Bo="([01][0-9]|2[0-3]):([0-5][0-9])",Ao="";function Mo(e,t,n){const o=H(),{TextField:i}=c;let{id:l}=t,{item:r}=t,{value:s}=t,{noForm:a=!1}=t,{classId:d}=t,{readonly:u}=t,{disabled:m}=t,{praefix:f}=t;const p=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,l=e.id),"item"in e&&n(8,r=e.item),"value"in e&&n(1,s=e.value),"noForm"in e&&n(2,a=e.noForm),"classId"in e&&n(3,d=e.classId),"readonly"in e&&n(4,u=e.readonly),"disabled"in e&&n(5,m=e.disabled),"praefix"in e&&n(9,f=e.praefix)},[l,s,a,d,u,m,i,({detail:e})=>{o("blur",{value:p(e.value)}),o("checkRange",{idx:f,fieldId:l,value:e.value})},r,f]}class Vo extends we{constructor(e){var t;super(),document.getElementById("svelte-vvt0yv-style")||((t=S("style")).id="svelte-vvt0yv-style",t.textContent=".text-field input.invalid{border:1px red solid !important}",I(document.head,t)),ye(this,e,Mo,Oo,w,{id:0,item:8,value:1,noForm:2,classId:3,readonly:4,disabled:5,praefix:9})}}function Po(e){let t,n;return t=new e[21]({props:{inputClass:e[4]||e[5],disabled:e[7],formnovalidate:e[9],readonly:e[16],pattern:e[24],required:e[2],id:e[26],name:e[25],value:e[18]()}}),t.$on("change",e[28]()),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),128&n[0]&&(o.disabled=e[7]),512&n[0]&&(o.formnovalidate=e[9]),65536&n[0]&&(o.readonly=e[16]),4&n[0]&&(o.required=e[2]),262144&n[0]&&(o.value=e[18]()),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Wo(e){let t,n;return t=new e[21]({props:{inputClass:e[4]||e[5],disabled:e[7],formnovalidate:e[9],readonly:e[16],required:e[2],type:"email",id:e[26],name:e[25],value:e[18]()}}),t.$on("change",e[28]()),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),128&n[0]&&(o.disabled=e[7]),512&n[0]&&(o.formnovalidate=e[9]),65536&n[0]&&(o.readonly=e[16]),4&n[0]&&(o.required=e[2]),262144&n[0]&&(o.value=e[18]()),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Ro(e){let t,n;return t=new Vo({props:{inputClass:e[4]||e[5],disabled:e[7],readonly:e[16],required:e[2],id:e[26],item:e[1],value:e[18](),praefix:e[3]}}),t.$on("blur",e[28]()),t.$on("checkRange",e[36]),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),128&n[0]&&(o.disabled=e[7]),65536&n[0]&&(o.readonly=e[16]),4&n[0]&&(o.required=e[2]),2&n[0]&&(o.item=e[1]),262144&n[0]&&(o.value=e[18]()),8&n[0]&&(o.praefix=e[3]),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Ho(e){let t,n;return t=new zo({props:{classId:e[5],id:e[26],disabled:e[7],required:e[2],value:e[27](),noForm:e[4]}}),t.$on("change",e[28]()),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),4&n[0]&&(o.required=e[2]),16&n[0]&&(o.noForm=e[4]),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Qo(e){let t,n;return t=new e[22]({props:{inputClass:e[4]||e[5],required:e[2],disabled:e[7],id:e[26],name:e[25],value:e[27](),closeOnSelection:!0}}),t.$on("change",e[28](!0)),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),4&n[0]&&(o.required=e[2]),128&n[0]&&(o.disabled=e[7]),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Yo(e){let t,n;return t=new e[23]({props:{round:!0,inputClass:e[4]||e[5],disabled:e[7]||e[16],required:e[2],id:e[26],name:e[25],checked:e[18]()}}),t.$on("change",e[28]()),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),65664&n[0]&&(o.disabled=e[7]||e[16]),4&n[0]&&(o.required=e[2]),262144&n[0]&&(o.checked=e[18]()),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Go(e){let t,n;return t=new bo({props:{classId:e[5],disabled:e[7],required:e[2],id:e[26],item:e[1],record:e[0],value:e[18](),noForm:e[4],view:e[1].properties.view,praefix:e[3]}}),t.$on("blur",e[28]()),t.$on("invalid",e[35]),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),4&n[0]&&(o.required=e[2]),2&n[0]&&(o.item=e[1]),1&n[0]&&(o.record=e[0]),262144&n[0]&&(o.value=e[18]()),16&n[0]&&(o.noForm=e[4]),2&n[0]&&(o.view=e[1].properties.view),8&n[0]&&(o.praefix=e[3]),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Jo(e){let t,n;return t=new Qn({props:{classId:e[5],disabled:e[7],required:e[2],id:e[26],item:e[1],record:e[0],value:e[18](),noForm:e[4],multi:e[1].properties.multi,numberInput:e[11],praefix:e[3],toDelete:e[14],reqQuantity:e[15]}}),t.$on("blur",e[28]()),t.$on("invalid",e[34]),t.$on("multi",e[29]),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),4&n[0]&&(o.required=e[2]),2&n[0]&&(o.item=e[1]),1&n[0]&&(o.record=e[0]),262144&n[0]&&(o.value=e[18]()),16&n[0]&&(o.noForm=e[4]),2&n[0]&&(o.multi=e[1].properties.multi),2048&n[0]&&(o.numberInput=e[11]),8&n[0]&&(o.praefix=e[3]),16384&n[0]&&(o.toDelete=e[14]),32768&n[0]&&(o.reqQuantity=e[15]),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Uo(e){let t,n;return t=new Io({props:{classId:e[5],disabled:e[7],required:e[2],id:e[26],item:e[1],value:e[18](),noForm:e[4]}}),t.$on("blur",e[28]()),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),4&n[0]&&(o.required=e[2]),2&n[0]&&(o.item=e[1]),262144&n[0]&&(o.value=e[18]()),16&n[0]&&(o.noForm=e[4]),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Zo(e){let t,n;return t=new un({props:{classId:e[5],disabled:e[7],formnovalidate:e[9],required:e[2],readonly:e[16],id:e[26],item:e[1],value:e[18](),noForm:e[4]}}),t.$on("blur",e[28]()),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),512&n[0]&&(o.formnovalidate=e[9]),4&n[0]&&(o.required=e[2]),65536&n[0]&&(o.readonly=e[16]),2&n[0]&&(o.item=e[1]),262144&n[0]&&(o.value=e[18]()),16&n[0]&&(o.noForm=e[4]),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Ko(e){let t,n;return t=new o({props:{classId:e[5],disabled:e[7],readonly:e[16],id:e[26],name:e[1].name,value:e[18](),noForm:e[4]}}),t.$on("blur",e[28]()),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),65536&n[0]&&(o.readonly=e[16]),2&n[0]&&(o.name=e[1].name),262144&n[0]&&(o.value=e[18]()),16&n[0]&&(o.noForm=e[4]),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Xo(e){let t,n;return t=new an({props:{classId:e[5],eventId:e[6],required:e[2],disabled:e[7],formnovalidate:e[9],readonly:e[16],id:e[26],item:e[1],desc:e[19],value:e[18](),noForm:e[4],praefix:e[3],selectionFields:e[8],selection:e[10],deList:e[12],recordId:e[0]._id,isTemplate:e[13]}}),t.$on("task",e[33]),t.$on("change",e[28]()),t.$on("initFail",e[30]),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),64&n[0]&&(o.eventId=e[6]),4&n[0]&&(o.required=e[2]),128&n[0]&&(o.disabled=e[7]),512&n[0]&&(o.formnovalidate=e[9]),65536&n[0]&&(o.readonly=e[16]),2&n[0]&&(o.item=e[1]),524288&n[0]&&(o.desc=e[19]),262144&n[0]&&(o.value=e[18]()),16&n[0]&&(o.noForm=e[4]),8&n[0]&&(o.praefix=e[3]),256&n[0]&&(o.selectionFields=e[8]),1024&n[0]&&(o.selection=e[10]),4096&n[0]&&(o.deList=e[12]),1&n[0]&&(o.recordId=e[0]._id),8192&n[0]&&(o.isTemplate=e[13]),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function ei(e){let t,n,o,i;const l=[Xo,Ko,Zo,Uo,Jo,Go,Yo,Qo,Ho,Ro,Wo,Po],r=[];function s(e,t){return"object"===e[1].type?0:"textarea"===e[1].type||e[1].properties&&"textarea"===e[1].properties.format?1:"number"===e[1].type?2:e[1].properties&&e[1].properties.enum?3:e[1].properties&&e[1].properties.multi?4:e[1].properties&&e[1].properties.view?5:"boolean"===e[1].type?6:"date"===e[1].type?7:"datetime"===e[1].type?8:"time"===e[1].properties?.format?9:"email"===e[1].type?10:11}return t=s(e),n=r[t]=l[t](e),{c(){n.c(),o=L()},m(e,n){r[t].m(e,n),_(e,o,n),i=!0},p(e,i){let a=t;t=s(e),t===a?r[t].p(e,i):(ce(),me(r[a],1,1,(()=>{r[a]=null})),de(),n=r[t],n?n.p(e,i):(n=r[t]=l[t](e),n.c()),ue(n,1),n.m(o.parentNode,o))},i(e){i||(ue(n),i=!0)},o(e){me(n),i=!1},d(e){r[t].d(e),e&&j(o)}}}function ti(e){let t,n;return t=new e[20]({props:{id:e[31](e[26]),class:e[1].name+(e[17]?" hidden ":""),name:e[1].designation,help:e[1].properties?.hint,$$slots:{default:[ei]},$$scope:{ctx:e}}}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};131074&n[0]&&(o.class=e[1].name+(e[17]?" hidden ":"")),2&n[0]&&(o.name=e[1].designation),2&n[0]&&(o.help=e[1].properties?.hint),917503&n[0]|4096&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function ni(e,t,n){let o,i,l;const r=H(),{FormField:s,TextField:a,DatePicker:d,TimePicker:u,Checkbox:f}=c;let{praefix:p=""}=t,{item:$}=t,{listName:h=""}=t,{record:g}=t,{noForm:v=!1}=t,{classId:b}=t,{eventId:y}=t,{disabled:w}=t,{selectionFields:k}=t,{formnovalidate:x}=t,{selection:I=!1}=t,{numberInput:_}=t,{deList:j}=t,{required:N}=t,{isTemplate:S}=t,{toDelete:q}=t,{reqQuantity:F}=t,{required:C,readonly:L,hidden:E,pattern:D}=$.properties||{};if(E=!0===E,void 0!==L&&(L=!0===L),void 0===N&&(N=C),"string"==typeof $.name){const[e,t]=$.name.split("_");t&&($.name=t)}const T=(h?h+".":"")+$.name,z=T+(""!==p?"-"+p:""),O=(e,t=T)=>{try{return t.split(".").reduce(((e,t)=>e[t]),e)}catch(e){return""}};return e.$$set=e=>{"praefix"in e&&n(3,p=e.praefix),"item"in e&&n(1,$=e.item),"listName"in e&&n(32,h=e.listName),"record"in e&&n(0,g=e.record),"noForm"in e&&n(4,v=e.noForm),"classId"in e&&n(5,b=e.classId),"eventId"in e&&n(6,y=e.eventId),"disabled"in e&&n(7,w=e.disabled),"selectionFields"in e&&n(8,k=e.selectionFields),"formnovalidate"in e&&n(9,x=e.formnovalidate),"selection"in e&&n(10,I=e.selection),"numberInput"in e&&n(11,_=e.numberInput),"deList"in e&&n(12,j=e.deList),"required"in e&&n(2,N=e.required),"isTemplate"in e&&n(13,S=e.isTemplate),"toDelete"in e&&n(14,q=e.toDelete),"reqQuantity"in e&&n(15,F=e.reqQuantity)},e.$$.update=()=>{1&e.$$.dirty[0]&&n(18,o=(e=T)=>{let t=O(g);return void 0===t?"":t}),1&e.$$.dirty[0]&&(l=O(g))},n(19,i=((e=T)=>{let t=g["_"+e];return t=m(t),void 0===t?"":t})()),[g,$,N,p,v,b,y,w,k,x,I,_,j,S,q,F,L,E,o,i,s,a,d,f,D,T,z,(e=T)=>{let t=O(g);return t?new Date(t):new Date},e=>({detail:t})=>{let{value:o,checked:i}=t;void 0!==i&&(o=i),n(0,g[T]=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",{oldValue:l,value:o,add:s,itemName:T,desc:t.description})},({detail:e})=>{r("multi",e)},()=>n(17,E=!0),()=>"object"===$.type?"comment_"+z:z,h,function(t){Q(e,t)},function(t){Q(e,t)},function(t){Q(e,t)},function(t){Q(e,t)}]}class oi extends we{constructor(e){var t;super(),document.getElementById("svelte-mea5fj-style")||((t=S("style")).id="svelte-mea5fj-style",t.textContent=".form-field{margin-bottom:1em !important}.form-field.hidden{display:none !important}.form-field > .description{padding-top:0.75em}.form-field div.field > label.checkbox{padding-top:0.5em}",I(document.head,t)),ye(this,e,ni,ti,w,{praefix:3,item:1,listName:32,record:0,noForm:4,classId:5,eventId:6,disabled:7,selectionFields:8,formnovalidate:9,selection:10,numberInput:11,deList:12,required:2,isTemplate:13,toDelete:14,reqQuantity:15},[-1,-1])}}const{document:ii}=$e;function li(e,t,n){const o=e.slice();return o[73]=t[n],o[75]=n,o}function ri(e,t,n){const o=e.slice();return o[82]=t[n],o}function si(e,t,n){const o=e.slice();return o[77]=t[n].title,o[78]=t[n].toDelete,o[79]=t[n].icon,o}function ai(e){let t,n;return t=new e[14]({props:{name:"Total Wochen",nameClass:"formField_italic",$$slots:{default:[ci]},$$scope:{ctx:e}}}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};128&n[0]|8388608&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function ci(e){let t,n,o;function i(t){e[41](t)}let l={item:e[24],disabled:!0};return void 0!==e[7]&&(l.value=e[7]),t=new un({props:l}),G.push((()=>he(t,"value",i))),{c(){ge(t.$$.fragment)},m(e,n){ve(t,e,n),o=!0},p(e,o){const i={};!n&&128&o[0]&&(n=!0,i.value=e[7],ne((()=>n=!1))),t.$set(i)},i(e){o||(ue(t.$$.fragment,e),o=!0)},o(e){me(t.$$.fragment,e),o=!1},d(e){be(t,e)}}}function di(e){let t,n;return t=new e[14]({props:{name:"Total Stunden",nameClass:"formField_italic",$$slots:{default:[ui]},$$scope:{ctx:e}}}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};1024&n[0]|8388608&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function ui(e){let t,n,o;function i(t){e[42](t)}let l={item:e[22],disabled:!0};return void 0!==e[10]&&(l.value=e[10]),t=new un({props:l}),G.push((()=>he(t,"value",i))),{c(){ge(t.$$.fragment)},m(e,n){ve(t,e,n),o=!0},p(e,o){const i={};!n&&1024&o[0]&&(n=!0,i.value=e[10],ne((()=>n=!1))),t.$set(i)},i(e){o||(ue(t.$$.fragment,e),o=!0)},o(e){me(t.$$.fragment,e),o=!1},d(e){be(t,e)}}}function mi(e){let t,n;return t=new e[14]({props:{name:"Total Betrag",nameClass:"formField_italic",$$slots:{default:[fi]},$$scope:{ctx:e}}}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};64&n[0]|8388608&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function fi(e){let t,n,o;function i(t){e[43](t)}let l={item:e[20],disabled:!0};return void 0!==e[6]&&(l.value=e[6]),t=new un({props:l}),G.push((()=>he(t,"value",i))),{c(){ge(t.$$.fragment)},m(e,n){ve(t,e,n),o=!0},p(e,o){const i={};!n&&64&o[0]&&(n=!0,i.value=e[6],ne((()=>n=!1))),t.$set(i)},i(e){o||(ue(t.$$.fragment,e),o=!0)},o(e){me(t.$$.fragment,e),o=!1},d(e){be(t,e)}}}function pi(e){let t,n;return t=new e[17]({props:{class:e[11][e[75]],$$slots:{handle:[ki,({toggle:e})=>({76:e}),({toggle:e})=>[0,0,e?16384:0]],default:[vi,({toggle:e})=>({76:e}),({toggle:e})=>[0,0,e?16384:0]]},$$scope:{ctx:e}}}),t.$on("panel-open",(function(){y(e[72])&&e[72].apply(this,arguments)})),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(n,o){e=n;const i={};2048&o[0]&&(i.class=e[11][e[75]]),13117&o[0]|8404992&o[2]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function $i(e){let t,n;return t=new oi({props:{praefix:e[75],item:e[82],eventId:e[5],record:e[73],reqQuantity:e[2],noForm:Ni,classId:e[4],disabled:e[0],required:e[18],selectionFields:e[25],numberInput:e[13],formnovalidate:e[75]===e[8].length-1||e[8][e[75]]._delete}}),t.$on("notify",(function(){y(e[27](e[82],e[75]))&&e[27](e[82],e[75]).apply(this,arguments)})),t.$on("task",e[44]),t.$on("invalid",e[28]),t.$on("checkRange",e[29]),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(n,o){e=n;const i={};8&o[0]&&(i.item=e[82]),32&o[0]&&(i.eventId=e[5]),256&o[0]&&(i.record=e[73]),4&o[0]&&(i.reqQuantity=e[2]),16&o[0]&&(i.classId=e[4]),1&o[0]&&(i.disabled=e[0]),8192&o[0]&&(i.numberInput=e[13]),256&o[0]&&(i.formnovalidate=e[75]===e[8].length-1||e[8][e[75]]._delete),t.$set(i)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function hi(e){let t,n,o=e[3].item,i=[];for(let t=0;t<o.length;t+=1)i[t]=$i(ri(e,o,t));const l=e=>me(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=L()},m(e,o){for(let t=0;t<i.length;t+=1)i[t].m(e,o);_(e,t,o),n=!0},p(e,n){if(973349181&n[0]){let r;for(o=e[3].item,r=0;r<o.length;r+=1){const l=ri(e,o,r);i[r]?(i[r].p(l,n),ue(i[r],1)):(i[r]=$i(l),i[r].c(),ue(i[r],1),i[r].m(t.parentNode,t))}for(ce(),r=o.length;r<i.length;r+=1)l(r);de()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)ue(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)me(i[e]);n=!1},d(e){N(i,e),e&&j(t)}}}function gi(e){let t,n,o=e[8][e[75]]._delete,i=hi(e);return{c(){i.c(),t=L()},m(e,o){i.m(e,o),_(e,t,o),n=!0},p(e,n){256&n[0]&&w(o,o=e[8][e[75]]._delete)?(ce(),me(i,1,1,h),de(),i=hi(e),i.c(),ue(i),i.m(t.parentNode,t)):i.p(e,n)},i(e){n||(ue(i),n=!0)},o(e){me(i),n=!1},d(e){e&&j(t),i.d(e)}}}function vi(e){let t,n,o,i,l=e[8].length,r=gi(e);return{c(){t=S("div"),r.c(),o=C(),z(t,"id",n=`accordion-content-${e[4]}-${e[3].name}-${e[75]}`)},m(e,n){_(e,t,n),r.m(t,null),_(e,o,n),i=!0},p(e,o){256&o[0]&&w(l,l=e[8].length)?(ce(),me(r,1,1,h),de(),r=gi(e),r.c(),ue(r),r.m(t,null)):r.p(e,o),(!i||24&o[0]&&n!==(n=`accordion-content-${e[4]}-${e[3].name}-${e[75]}`))&&z(t,"id",n)},i(e){i||(ue(r),i=!0)},o(e){me(r),i=!1},d(e){e&&j(t),r.d(e),e&&j(o)}}}function bi(e){let t,n,o,i,l,r=e[26](e[9],e[75])+"";return{c(){t=S("div"),n=F(r),z(t,"class",o=x("draggableListItem "+e[3].name)+" svelte-1es1ap1"),z(t,"draggable",!0),M(t,"delete",e[73]._delete),M(t,"is-active-top",e[12]?.top===e[75]),M(t,"is-active-bottom",e[12]?.bottom===e[75])},m(o,r){_(o,t,r),I(t,n),i||(l=[E(t,"dragover",e[35]),E(t,"dragleave",e[36](e[75])),E(t,"dragstart",e[33](e[75])),E(t,"drop",D(e[32](e[75]))),E(t,"dragenter",e[34](e[75]))],i=!0)},p(i,l){e=i,512&l[0]&&r!==(r=e[26](e[9],e[75])+"")&&O(n,r),8&l[0]&&o!==(o=x("draggableListItem "+e[3].name)+" svelte-1es1ap1")&&z(t,"class",o),264&l[0]&&M(t,"delete",e[73]._delete),4104&l[0]&&M(t,"is-active-top",e[12]?.top===e[75]),4104&l[0]&&M(t,"is-active-bottom",e[12]?.bottom===e[75])},d(e){e&&j(t),i=!1,b(l)}}}function yi(e){let t,n,o;var i=e[79];return i&&(t=new i({props:{size:"20"}})),{c(){t&&ge(t.$$.fragment),n=L()},m(e,i){t&&ve(t,e,i),_(e,n,i),o=!0},p(e,o){if(i!==(i=e[79])){if(t){ce();const e=t;me(e.$$.fragment,1,0,(()=>{be(e,1)})),de()}i?(t=new i({props:{size:"20"}}),ge(t.$$.fragment),ue(t.$$.fragment,1),ve(t,n.parentNode,n)):t=null}},i(e){o||(t&&ue(t.$$.fragment,e),o=!0)},o(e){t&&me(t.$$.fragment,e),o=!1},d(e){e&&j(n),t&&be(t,e)}}}function wi(e){let t,n,o,i,l,r=!e[0]&&!e[3].readonly&&yi(e);return{c(){t=S("span"),r&&r.c(),z(t,"class","pointer icon svelte-1es1ap1"),z(t,"title",e[77]),t.hidden=n=e[75]===e[8].length-1||!(e[73]._delete^e[78])},m(n,s){_(n,t,s),r&&r.m(t,null),o=!0,i||(l=E(t,"click",e[31](e[75])),i=!0)},p(i,l){(e=i)[0]||e[3].readonly?r&&(ce(),me(r,1,1,(()=>{r=null})),de()):r?(r.p(e,l),9&l[0]&&ue(r,1)):(r=yi(e),r.c(),ue(r,1),r.m(t,null)),(!o||256&l[0]&&n!==(n=e[75]===e[8].length-1||!(e[73]._delete^e[78])))&&(t.hidden=n)},i(e){o||(ue(r),o=!0)},o(e){me(r),o=!1},d(e){e&&j(t),r&&r.d(),i=!1,l()}}}function ki(e){let t,n,o,i,l,r;n=new e[15]({props:{$$slots:{default:[bi]},$$scope:{ctx:e}}}),n.$on("click",(function(){y(e[30](e[76],e[75]))&&e[30](e[76],e[75]).apply(this,arguments)}));let s=[{title:"löschen",toDelete:!0,icon:ze},{title:"undo",toDelete:!1,icon:Ee}],a=[];for(let t=0;t<2;t+=1)a[t]=wi(si(e,s,t));const c=e=>me(a[e],1,1,(()=>{a[e]=null}));return{c(){t=S("div"),ge(n.$$.fragment),o=C();for(let e=0;e<2;e+=1)a[e].c();i=C(),z(t,"class",l=x("accordion "+e[3].name)+" svelte-1es1ap1"),z(t,"slot","handle")},m(e,l){_(e,t,l),ve(n,t,null),I(t,o);for(let e=0;e<2;e+=1)a[e].m(t,null);I(t,i),r=!0},p(o,d){e=o;const u={};if(4872&d[0]|8388608&d[2]&&(u.$$scope={dirty:d,ctx:e}),n.$set(u),265&d[0]|1&d[1]){let n;for(s=[{title:"löschen",toDelete:!0,icon:ze},{title:"undo",toDelete:!1,icon:Ee}],n=0;n<2;n+=1){const o=si(e,s,n);a[n]?(a[n].p(o,d),ue(a[n],1)):(a[n]=wi(o),a[n].c(),ue(a[n],1),a[n].m(t,i))}for(ce(),n=2;n<2;n+=1)c(n);de()}(!r||8&d[0]&&l!==(l=x("accordion "+e[3].name)+" svelte-1es1ap1"))&&z(t,"class",l)},i(e){if(!r){ue(n.$$.fragment,e);for(let e=0;e<2;e+=1)ue(a[e]);r=!0}},o(e){me(n.$$.fragment,e),a=a.filter(Boolean);for(let e=0;e<2;e+=1)me(a[e]);r=!1},d(e){e&&j(t),be(n),N(a,e)}}}function xi(e){let t,n,o=(!e[1]&&!e[0]||e[75]<e[8].length-1)&&pi(e);return{c(){o&&o.c(),t=L()},m(e,i){o&&o.m(e,i),_(e,t,i),n=!0},p(e,n){!e[1]&&!e[0]||e[75]<e[8].length-1?o?(o.p(e,n),259&n[0]&&ue(o,1)):(o=pi(e),o.c(),ue(o,1),o.m(t.parentNode,t)):o&&(ce(),me(o,1,1,(()=>{o=null})),de())},i(e){n||(ue(o),n=!0)},o(e){me(o),n=!1},d(e){o&&o.d(e),e&&j(t)}}}function Ii(e){let t,n,o=e[8],i=[];for(let t=0;t<o.length;t+=1)i[t]=xi(li(e,o,t));const l=e=>me(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=L()},m(e,o){for(let t=0;t<i.length;t+=1)i[t].m(e,o);_(e,t,o),n=!0},p(e,n){if(2114206527&n[0]|63&n[1]|17408&n[2]){let r;for(o=e[8],r=0;r<o.length;r+=1){const l=li(e,o,r);i[r]?(i[r].p(l,n),ue(i[r],1)):(i[r]=xi(l),i[r].c(),ue(i[r],1),i[r].m(t.parentNode,t))}for(ce(),r=o.length;r<i.length;r+=1)l(r);de()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)ue(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)me(i[e]);n=!1},d(e){N(i,e),e&&j(t)}}}function _i(e){let t,n,o,i,l,r,s=e[23]&&0!=e[7]&&ai(e),a=e[21]&&0!=e[10]&&di(e),c=e[19]&&0!=e[6]&&mi(e);return l=new e[16]({props:{$$slots:{default:[Ii,({closeOtherPanels:e})=>({72:e}),({closeOtherPanels:e})=>[0,0,e?1024:0]]},$$scope:{ctx:e}}}),{c(){t=S("div"),s&&s.c(),n=C(),a&&a.c(),o=C(),c&&c.c(),i=C(),ge(l.$$.fragment),z(t,"class","formList")},m(e,d){_(e,t,d),s&&s.m(t,null),I(t,n),a&&a.m(t,null),I(t,o),c&&c.m(t,null),I(t,i),ve(l,t,null),r=!0},p(e,r){e[23]&&0!=e[7]?s?(s.p(e,r),128&r[0]&&ue(s,1)):(s=ai(e),s.c(),ue(s,1),s.m(t,n)):s&&(ce(),me(s,1,1,(()=>{s=null})),de()),e[21]&&0!=e[10]?a?(a.p(e,r),1024&r[0]&&ue(a,1)):(a=di(e),a.c(),ue(a,1),a.m(t,o)):a&&(ce(),me(a,1,1,(()=>{a=null})),de()),e[19]&&0!=e[6]?c?(c.p(e,r),64&r[0]&&ue(c,1)):(c=mi(e),c.c(),ue(c,1),c.m(t,i)):c&&(ce(),me(c,1,1,(()=>{c=null})),de());const d={};15167&r[0]|8389632&r[2]&&(d.$$scope={dirty:r,ctx:e}),l.$set(d)},i(e){r||(ue(s),ue(a),ue(c),ue(l.$$.fragment,e),r=!0)},o(e){me(s),me(a),me(c),me(l.$$.fragment,e),r=!1},d(e){e&&j(t),s&&s.d(),a&&a.d(),c&&c.d(),be(l)}}}let ji=new Map;const Ni=!0,Si="pos/target";function qi(e,t,n){let o,i;const{FormField:l,TextField:r,Button:s,Accordion:a,AccordionSection:d,Divider:u}=c,$=H();let{list:h}=t,{schema:g}=t,{record:v}=t,{classId:b}=t,{eventId:y}=t,{disabled:w}=t,{fixed:k}=t,{template:x={}}=t,{reqQuantity:I}=t;const _=g.find((e=>"price"===e.name&&!e.properties?.hidden)),j=_&&g.find((e=>"quantity"===e.name));let N=0;const S=g.find((e=>"quantity"===e.name&&"h"===e.properties?.unit?.constant&&!e.properties?.hidden));let q=0;const F=g.find((e=>"number"===e.type&&"w"===e.properties?.unit?.constant?.toLowerCase()&&!e.properties?.hidden))?.name||"",C=!!F;let L=0;const E={};let D=g.properties?.readonly,T=b.split("form-")[1].slice(0,-4);h.group&&(k=!0),w||=D;let z,O,B=[],A=[],M=!1,V={},P=[];g.filter((e=>e.selection)).map((e=>B.push({className:T,parentClass:g,refClass:e.selection,value:""})));["readonly","hidden","required"].map((e=>{g.filter((t=>"object"==typeof(t.properties&&t.properties[e]))).map((t=>{const n=t.properties[e].refItem||"";let[o,i]=n.split(".");i||(i=o,o=void 0),P.push({action:e,itemName:t.name,refObj:o,refName:i,op:t.properties[e].invert?"!":""})}))}));const W=async(e,t,n)=>{console.log("refItem",n,[...z]);const o=v[n];if(console.log("refObj",o),!o?.length)return;const i=o[0][n];if(console.log("id",i),!i)return;const l=await Ll(n,i);return console.log("res",l),l?(console.log("item",t,h),l[h.name]):void 0},R=async(e,t)=>{const o=P.filter((e=>(e.refObj||T)===t));if(o?.length)for(const t of o){const{action:o,itemName:i,refObj:l,refName:r,op:s}=t;let a,c,d=!1,u=!1;if(l){const t=z[e][l];l===T&&r?d=v:t&&(d=await Ll(l,t))}!l&&r&&(d=z[e]),d&&(u=d[r],Array.isArray(u)&&0===u.length&&(u=!1),"!"===s&&(u=!u)),"required"!==o&&"readonly"!==o||(a=`#accordion-content-${b}-${h.name}-${e} .form-field.${i} .field textarea`,c=document.querySelector(a),c||(a=`#accordion-content-${b}-${h.name}-${e} .form-field.${i} .field input`,c=document.querySelector(a)),c&&u&&c.setAttribute(o,"true"),c&&!u&&c.removeAttribute(o)),"hidden"===o&&(a=`#accordion-content-${b}-${h.name}-${e} .form-field.${i}`,c=document.querySelector(a),c?.classList?.toggle("hidden",u),u&&n(8,z[e][i]="",z))}},Y=(e,t)=>{let o=`#accordion-content-${b}-${h.name}-${e} .form-field .field :required:not(:disabled)`;const i=document.querySelectorAll(o);let l=!1;i.forEach((e=>{""===e.value&&(l=!0)})),void 0===t&&(o=`#accordion-content-${b}-${h.name}-${e} :not(.form-field.hidden) .field input.invalid`,document.querySelector(o)&&(t=!0)),n(11,A[e]=l||t?"invalid":"",A)},G=e=>{if(!e)return 0;const[t,n=0]=e.split(":");return 60*t+parseInt(n)},J=(e,t)=>{if(!t)return;const o=g.find((e=>e.name===t)),i=o.properties.value.formula,{operator:l,argument:r}=i,s=r.map((t=>z[e][t.refItem]));let a=0;"$add"===l&&(a=s.reduce(((e,t)=>e+ +t))),"$subtract"===l&&(a=s.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[i,l]=t.split(":");return i?e-=l?(+i+ +l/60).toFixed(2):+i:0}))),n(8,z[e][t]=(a||0).toFixed(o.properties.decimals||0),z),n(13,V={item:o,value:a,idx:e})};O=g.filter((e=>e.refClass)).reduce(((e,t)=>{const n=g.filter((e=>e.refItem===t.refClass));if(!n?.length)return e;if(t.selection){const[n,o]=t.selection.split(":"),[i]=o.split(".");i&&e.push({refClass:i,items:[n],selection:t.selection})}const o={refClass:t.refClass,items:[]};return n.forEach((e=>{o.items.push(e.name)})),e.push(o),e}),[]);const U=async(e,t,o,i)=>{const l=(await O).find((e=>e.refClass===t.refClass));if(!l)return;const{refClass:r,items:s,selection:a}=l,c=t.name,d=P.find((e=>e.itemName===c));if(d){await R(e,d.refObj);const t=`#accordion-content-${b}-${h.name}-${e} .form-field.${r}.hidden`;if(document.querySelector(t))return}return o?Promise.all(s.map((async l=>{const c=g.find((e=>e.name===l));if(c.properties?.readonly){const o=z[e][t.refClass];return Promise.resolve(Ll(t.refClass,o,!0)).then((t=>{let o=t[l];Array.isArray(o)&&(o=o.length?o[0][l]:""),n(8,z[e][l]=o,z)}))}let d="";const{refInput:u}=t;if(u&&z[e]){const[t,n]=u.split(".");d=n?z[e][n]:v[t]}if(a&&o!==i)s.map((t=>{n(8,z[e][t]="",z)}));else if(u&&!d||Z(e,l)){const o=g.find((e=>e.refClass===r)),i=z[e][o.name];if(t.selection){const o=Cl(t.selection+i.toString());if(o)return Promise.resolve(o).then((t=>n(8,z[e][l]=t[l],z)))}return Promise.resolve(Ll(o.refClass,i)).then((t=>n(8,z[e][l]=t[l],z)))}}))):Promise.resolve(s.map((t=>{n(8,z[e][t]="",z)})))},Z=(e,t)=>{let n=z[e][t];return"number"===g.find((e=>e.name===t)).type&&(n=Number(n||0)),!n},K=e=>!(!k&&e>=z.length-1),X=(e,t=!1)=>{const[n,o]=e.split(";");return h.name===o&&(!!K(t)&&((!1===t||t!=n)&&parseInt(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&&n(3,h=e.list),"schema"in e&&n(37,g=e.schema),"record"in e&&n(38,v=e.record),"classId"in e&&n(4,b=e.classId),"eventId"in e&&n(5,y=e.eventId),"disabled"in e&&n(0,w=e.disabled),"fixed"in e&&n(1,k=e.fixed),"template"in e&&n(39,x=e.template),"reqQuantity"in e&&n(2,I=e.reqQuantity)},e.$$.update=()=>{8&e.$$.dirty[0]|128&e.$$.dirty[1]&&v&&(n(2,I=v.quantity),n(8,z=(v[h.name]||[]).concat({}))),256&e.$$.dirty[0]&&n(9,o=z),968&e.$$.dirty[0]&&o&&((()=>{if(S)n(10,q=z?.reduce(((e,t)=>e+(t._delete?0:+(t.quantity||0))),0)||0)})(),(()=>{if(C)n(7,L=z?.reduce(((e,t)=>e+(t._delete?0:+(t[F]||0))),0)||0)})(),(()=>{if(_)n(6,N=z?.reduce(((e,t)=>{if(t.price){const n=(j?t.quantity??0:1)*(t.price??0);e+=t._delete?0:n}return e}),0)||0)})(),$("save",{listName:h.name,value:z,amountValue:N,weeksValue:L})),512&e.$$.dirty[1]&&(i=e=>E[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · "))},[w,k,I,h,b,y,N,L,z,o,q,A,M,V,l,s,a,d,undefined,_,{name:"amountValue",properties:{decimals:2}},S,{name:"hoursValue",properties:{decimals:2}},C,{name:"weeksValue",properties:{decimals:1}},B,(e,t)=>{const n=e[t];return n&&g.filter((e=>!0!==e.properties?.hidden&&void 0!==n[e.name]&&"textarea"!==e.properties?.format)).map((e=>""===n[e.name]?"":"object"===e.type?i(n[e.name]):"boolean"===e.type?p(n[e.name]):"date"===e.type?m(n[e.name]):"datetime"===e.type?f(n[e.name]):e.properties?.multi?"":n[e.name])).filter((e=>!!e)).join(" • ")||"+"},(e,t)=>async({detail:i})=>{const{oldValue:l,value:r,add:s,desc:a}=i;if(h.refItem){const o=await W(t,e,h.refItem);o&&n(8,z=o)}await R(t,e.name),J(t,e._formulaActor);const c=B?.find((t=>t.refClass.split(":")[1]?.split(".")[0]===e.refClass));c&&(c.value=(c.value||new Map).set(t,r)),r&&z.length===t+1&&n(8,z=z.concat({})),a&&n(40,E[r]=a,E),await U(t,e,r,l),n(9,o=z),"number"===e.type&&n(13,V={item:e,value:r,idx:t}),Y(t)},({detail:e})=>{const{idx:t,value:n}=e;Y(t,n)},({detail:e})=>{const{idx:t,fieldId:n,value:o}=e;if(!o)return;const i=G(o);let l=!1;z.forEach(((e,n)=>{if(t===n)return;const{start:o,end:r}=z[n];o&&r&&i>G(o)&&i<G(r)&&(l=!0)}));const r=document.getElementById(n);r?.classList?.toggle("invalid",l)},(e,t)=>o=>{const{detail:i}=o;e(o);const{target:l}=i,r=l?.closest("li");if(r?.classList.contains("open"))return;(e=>{const t=x[h.name]||{};for(const o in t)x[h.name][o]&&!z[e][o]&&n(8,z[e][o]=x[h.name][o],z)})(t);const s=`#accordion-content-${b}-${h.name}-${t} > div.form-field:not(.hidden)`,a=document.querySelectorAll(s);if(!a?.length)return;const c=a[a.length-1];ee().then((()=>c.scrollIntoView({behavior:"smooth",block:"end"})))},e=>()=>{n(8,z[e]._delete=!z[e]._delete,z)},e=>t=>{t.preventDefault(),n(12,M=!1);const o=X(t.dataTransfer.getData(Si),e);if(!1===o)return;t.dataTransfer.dropEffect="move";const i=[...z].map(((e,t)=>(e._index=t,e)));o<e?(i.splice(e+1,0,i[o]),i.splice(o,1)):(i.splice(e,0,i[o]),i.splice(o+1,1)),i.map(((e,t)=>{return n=e._index,o=t,void ji.set(o,n);var n,o}));let l=[];A.map(((e,t)=>{l[t]=A[(e=>{const t=ji.get(e);return void 0===t?e:t})(t)]})),n(11,A=l),n(8,z=i.map(((e,t)=>(delete e._index,e))))},e=>t=>{if(!K(e))return!1;t.dataTransfer.effectAllowed="move",t.dataTransfer.dropEffect="move",t.dataTransfer.setData(Si,e+";"+h.name)},e=>t=>{const o=X(t.dataTransfer.getData(Si),e);return!1===o||o===e?n(12,M=!1):void n(12,M={top:o>e&&e,bottom:o<e&&e})},e=>e.preventDefault(),e=>e=>{n(12,M=!1)},g,v,x,E,function(e){L=e,n(7,L)},function(e){q=e,n(10,q)},function(e){N=e,n(6,N)},function(t){Q(e,t)}]}class Fi extends we{constructor(e){var t;super(),ii.getElementById("svelte-1es1ap1-style")||((t=S("style")).id="svelte-1es1ap1-style",t.textContent=".accordion.svelte-1es1ap1{display:flex;overflow:hidden}.accordion-content.svelte-1es1ap1{position:relative}.formList .accordion > .btn{display:inline-block;margin-bottom:1em;background-color:#F5F5F5}.sTask .formList .accordion > .btn{width:95% !important}.sEmbedded .formList .accordion > .btn{width:97%}@media screen and (max-width: 600px){.formList .accordion > .btn{width:25em}}span.pointer.svelte-1es1ap1{padding-top:1em}div.delete.svelte-1es1ap1{text-decoration:line-through}.icon.svelte-1es1ap1{margin-right:-0.75em}.form-field .formField_italic{font-style:italic}.panel.invalid .btn{border:1px #b80000 solid}.draggableListItem.svelte-1es1ap1{cursor:drag}.draggableListItem.is-active-top.svelte-1es1ap1{border-top:3px purple solid;padding-top:2em}.draggableListItem.is-active-bottom.svelte-1es1ap1{border-bottom:3px purple solid;padding-bottom:2em}",I(ii.head,t)),ye(this,e,qi,_i,w,{list:3,schema:37,record:38,classId:4,eventId:5,disabled:0,fixed:1,template:39,reqQuantity:2},[-1,-1,-1])}}const{document:Ci}=$e;function Li(e,t,n){const o=e.slice();return o[17]=t[n],o}function Ei(e,t,n){const o=e.slice();return o[20]=t[n],o}function Di(e){return{c:h,m:h,p:h,i:h,o:h,d:h}}function Ti(e){let t,n,o,i,l,r,s,a,c,d,u,m,f,p=e[0].items,$=[];for(let t=0;t<p.length;t+=1)$[t]=Oi(Ei(e,p,t));const h=e=>me($[e],1,1,(()=>{$[e]=null}));let g=e[0].list&&Bi(e);return a=new e[5]({props:{outline:!0,$$slots:{default:[Mi]},$$scope:{ctx:e}}}),a.$on("click",e[9]),d=new e[5]({props:{disabled:e[2],class:"close",form:e[6],filled:!0,type:"submit",$$slots:{default:[Vi]},$$scope:{ctx:e}}}),{c(){t=S("form"),n=S("input"),i=C();for(let e=0;e<$.length;e+=1)$[e].c();l=C(),g&&g.c(),r=C(),s=S("div"),ge(a.$$.fragment),c=C(),ge(d.$$.fragment),z(n,"class",x(e[6])+" svelte-1phofh5"),z(n,"name","_id"),z(n,"type","hidden"),n.value=o=e[1]._id||"",z(t,"class","fTask svelte-1phofh5"),z(t,"id",e[6]),z(s,"class","form--buttons svelte-1phofh5")},m(o,p){_(o,t,p),I(t,n),I(t,i);for(let e=0;e<$.length;e+=1)$[e].m(t,null);I(t,l),g&&g.m(t,null),_(o,r,p),_(o,s,p),ve(a,s,null),I(s,c),ve(d,s,null),u=!0,m||(f=[E(t,"keydown",e[8]),E(t,"submit",D(e[10]))],m=!0)},p(e,i){if((!u||2&i&&o!==(o=e[1]._id||""))&&(n.value=o),75&i){let n;for(p=e[0].items,n=0;n<p.length;n+=1){const o=Ei(e,p,n);$[n]?($[n].p(o,i),ue($[n],1)):($[n]=Oi(o),$[n].c(),ue($[n],1),$[n].m(t,l))}for(ce(),n=p.length;n<$.length;n+=1)h(n);de()}e[0].list?g?(g.p(e,i),1&i&&ue(g,1)):(g=Bi(e),g.c(),ue(g,1),g.m(t,null)):g&&(ce(),me(g,1,1,(()=>{g=null})),de());const r={};8388608&i&&(r.$$scope={dirty:i,ctx:e}),a.$set(r);const s={};4&i&&(s.disabled=e[2]),8388608&i&&(s.$$scope={dirty:i,ctx:e}),d.$set(s)},i(e){if(!u){for(let e=0;e<p.length;e+=1)ue($[e]);ue(g),ue(a.$$.fragment,e),ue(d.$$.fragment,e),u=!0}},o(e){$=$.filter(Boolean);for(let e=0;e<$.length;e+=1)me($[e]);me(g),me(a.$$.fragment,e),me(d.$$.fragment,e),u=!1},d(e){e&&j(t),N($,e),g&&g.d(),e&&j(r),e&&j(s),be(a),be(d),m=!1,b(f)}}}function zi(e){let t,n;return t=new oi({props:{classId:e[6],item:e[20],selection:e[20].selection,record:e[1],disabled:e[3],eventId:e[0].id,required:!1,isTemplate:!0}}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};1&n&&(o.item=e[20]),1&n&&(o.selection=e[20].selection),2&n&&(o.record=e[1]),8&n&&(o.disabled=e[3]),1&n&&(o.eventId=e[0].id),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Oi(e){let t,n,o=Ri(!0,e[20]),i=o&&zi(e);return{c(){i&&i.c(),t=L()},m(e,o){i&&i.m(e,o),_(e,t,o),n=!0},p(e,n){1&n&&(o=Ri(!0,e[20])),o?i?(i.p(e,n),1&n&&ue(i,1)):(i=zi(e),i.c(),ue(i,1),i.m(t.parentNode,t)):i&&(ce(),me(i,1,1,(()=>{i=null})),de())},i(e){n||(ue(i),n=!0)},o(e){me(i),n=!1},d(e){i&&i.d(e),e&&j(t)}}}function Bi(e){let t,n,o=e[0].list,i=[];for(let t=0;t<o.length;t+=1)i[t]=Ai(Li(e,o,t));const l=e=>me(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=L()},m(e,o){for(let t=0;t<i.length;t+=1)i[t].m(e,o);_(e,t,o),n=!0},p(e,n){if(75&n){let r;for(o=e[0].list,r=0;r<o.length;r+=1){const l=Li(e,o,r);i[r]?(i[r].p(l,n),ue(i[r],1)):(i[r]=Ai(l),i[r].c(),ue(i[r],1),i[r].m(t.parentNode,t))}for(ce(),r=o.length;r<i.length;r+=1)l(r);de()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)ue(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)me(i[e]);n=!1},d(e){N(i,e),e&&j(t)}}}function Ai(e){let t,n,o,i;return t=new e[4]({props:{text:e[17].designation}}),o=new nl({props:{classId:e[6],list:e[17],eventId:e[0].id,schema:e[17].item,record:e[1],disabled:e[3],required:!1,open:!0,isTemplate:!0}}),{c(){ge(t.$$.fragment),n=C(),ge(o.$$.fragment)},m(e,l){ve(t,e,l),_(e,n,l),ve(o,e,l),i=!0},p(e,n){const i={};1&n&&(i.text=e[17].designation),t.$set(i);const l={};1&n&&(l.list=e[17]),1&n&&(l.eventId=e[0].id),1&n&&(l.schema=e[17].item),2&n&&(l.record=e[1]),8&n&&(l.disabled=e[3]),o.$set(l)},i(e){i||(ue(t.$$.fragment,e),ue(o.$$.fragment,e),i=!0)},o(e){me(t.$$.fragment,e),me(o.$$.fragment,e),i=!1},d(e){be(t,e),e&&j(n),be(o,e)}}}function Mi(e){let t;return{c(){t=F("Abbrechen")},m(e,n){_(e,t,n)},d(e){e&&j(t)}}}function Vi(e){let t;return{c(){t=F("Speichern")},m(e,n){_(e,t,n)},d(e){e&&j(t)}}}function Pi(e){return{c:h,m:h,p:h,i:h,o:h,d:h}}function Wi(e){let t,n,o,i={ctx:e,current:null,token:null,hasCatch:!1,pending:Pi,then:Ti,catch:Di,value:16,blocks:[,,,]};return fe(e[7](),i),{c(){t=C(),n=S("section"),i.block.c(),Ci.title="Vorgaben",z(n,"class","sTask svelte-1phofh5")},m(e,l){_(e,t,l),_(e,n,l),i.block.m(n,i.anchor=null),i.mount=()=>n,i.anchor=null,o=!0},p(t,[n]){pe(i,e=t,n)},i(e){o||(ue(i.block),o=!0)},o(e){for(let e=0;e<3;e+=1){me(i.blocks[e])}o=!1},d(e){e&&j(t),e&&j(n),i.block.d(),i.token=null,i=null}}}const Ri=(e,{type:t="",properties:n={}})=>!e||"list"!==t&&("time"===n.format&&(t="time"),!["date","datetime","time"].includes(t)&&(!n.readonly&&!n.hidden));function Hi(e,n,o){let a,d,u;k(e,r,(e=>o(11,d=e))),k(e,s,(e=>o(12,u=e)));const{Divider:m,Button:f,FormField:p}=c,$=JSON.parse(i.getItem("Locale"));let{schema:h}=n,{record:g}=n,v="template-"+h.class+Math.floor(9e3*Math.random()+1e3).toString(),b=!1;const y=()=>window.history.back(),w=(e,t,n=!1)=>{const o=t.id,i=e.find((e=>e.name===o));let l=t.value;if(!n&&i&&i.properties?.multi&&(l=g[o]),l&&i&&i.type.startsWith("date"))try{return No(l,"%d.%m.%Y").toISOString()}catch{return new Date(l).toISOString()}if(i&&"boolean"===i.type&&(l=!!t.checked),i&&"number"===i.type){const e=Number("1.1").toLocaleString($.id).substring(1,2);try{l=Number(l.replace(e,".")).toString()}catch{}}return l};return e.$$set=e=>{"schema"in e&&o(0,h=e.schema),"record"in e&&o(1,g=e.record)},e.$$.update=()=>{4&e.$$.dirty&&o(3,a=b)},[h,g,b,a,m,f,v,async()=>{const e=await t.getEvent(h.id);if(e.trigger?.startOn&&!e.trigger?.startOn?.some((e=>"Manual"===e.type))&&o(2,b=!0),d.role?.length&&h.authorization?.length){const e=h.authorization.some((e=>u?.find((t=>t===e.role&&"edit"===e.activity))));o(2,b||=!e)}},e=>{"button"!==e.srcElement?.type&&"textarea"!==e.srcElement?.type&&13==e.which&&e.preventDefault()},y,async e=>{const n={};Array.from(document.querySelectorAll("form#"+v+" ."+v)).map((e=>{const t=e.id||e.name;if(t)if(t.includes(".")){const[o,i]=t.split("."),l=h.list.find((e=>e.name===o));n[t]=w(l.item,e)}else n[t]=w(h.items,e)})),await t.saveTemplate(h.class,n),l.success("Die Vorgaben wurden gespeichert.",2e3),y()}]}const{document:Qi}=$e;function Yi(e,t,n){const o=e.slice();return o[22]=t[n],o}function Gi(e){let t,n;return t=new oi({props:{classId:e[2],item:e[22],listName:e[1].name,eventId:e[3],record:e[0],disabled:e[4],required:e[5]}}),t.$on("notify",e[13]),t.$on("task",e[17]),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),2&n&&(o.item=e[22]),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]),32&n&&(o.required=e[5]),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Ji(e){let t,n,o=Ri(e[7],e[22]),i=o&&Gi(e);return{c(){i&&i.c(),t=L()},m(e,o){i&&i.m(e,o),_(e,t,o),n=!0},p(e,n){130&n&&(o=Ri(e[7],e[22])),o?i?(i.p(e,n),130&n&&ue(i,1)):(i=Gi(e),i.c(),ue(i,1),i.m(t.parentNode,t)):i&&(ce(),me(i,1,1,(()=>{i=null})),de())},i(e){n||(ue(i),n=!0)},o(e){me(i),n=!1},d(e){i&&i.d(e),e&&j(t)}}}function Ui(e){let t,n,o,i=e[1].item,l=[];for(let t=0;t<i.length;t+=1)l[t]=Ji(Yi(e,i,t));const r=e=>me(l[e],1,1,(()=>{l[e]=null}));return{c(){t=S("div");for(let e=0;e<l.length;e+=1)l[e].c();z(t,"id",n=`accordion-content-${e[2]}-${e[1].name}`)},m(e,n){_(e,t,n);for(let e=0;e<l.length;e+=1)l[e].m(t,null);o=!0},p(e,s){if(8383&s){let n;for(i=e[1].item,n=0;n<i.length;n+=1){const o=Yi(e,i,n);l[n]?(l[n].p(o,s),ue(l[n],1)):(l[n]=Ji(o),l[n].c(),ue(l[n],1),l[n].m(t,null))}for(ce(),n=i.length;n<l.length;n+=1)r(n);de()}(!o||6&s&&n!==(n=`accordion-content-${e[2]}-${e[1].name}`))&&z(t,"id",n)},i(e){if(!o){for(let e=0;e<i.length;e+=1)ue(l[e]);o=!0}},o(e){l=l.filter(Boolean);for(let e=0;e<l.length;e+=1)me(l[e]);o=!1},d(e){e&&j(t),N(l,e)}}}function Zi(e){let t,n,o=e[12](e[8])+"";return{c(){t=S("span"),n=F(o)},m(e,o){_(e,t,o),I(t,n)},p(e,t){256&t&&o!==(o=e[12](e[8])+"")&&O(n,o)},d(e){e&&j(t)}}}function Ki(e){let t,n,o;return n=new e[9]({props:{$$slots:{default:[Zi]},$$scope:{ctx:e}}}),n.$on("click",(function(){y(e[14](e[21]))&&e[14](e[21]).apply(this,arguments)})),{c(){t=S("div"),ge(n.$$.fragment),z(t,"class","accordion svelte-148ktt9"),z(t,"slot","handle")},m(e,i){_(e,t,i),ve(n,t,null),o=!0},p(t,o){e=t;const i={};33554688&o&&(i.$$scope={dirty:o,ctx:e}),n.$set(i)},i(e){o||(ue(n.$$.fragment,e),o=!0)},o(e){me(n.$$.fragment,e),o=!1},d(e){e&&j(t),be(n)}}}function Xi(e){let t,n;return t=new e[11]({props:{open:e[6],$$slots:{handle:[Ki,({toggle:e})=>({21:e}),({toggle:e})=>e?2097152:0],default:[Ui,({toggle:e})=>({21:e}),({toggle:e})=>e?2097152:0]},$$scope:{ctx:e}}}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};64&n&&(o.open=e[6]),35652031&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function el(e){let t,n,o;return n=new e[10]({props:{$$slots:{default:[Xi]},$$scope:{ctx:e}}}),{c(){t=S("div"),ge(n.$$.fragment),z(t,"class","formList")},m(e,i){_(e,t,i),ve(n,t,null),o=!0},p(e,[t]){const o={};33554943&t&&(o.$$scope={dirty:t,ctx:e}),n.$set(o)},i(e){o||(ue(n.$$.fragment,e),o=!0)},o(e){me(n.$$.fragment,e),o=!1},d(e){e&&j(t),be(n)}}}function tl(e,t,n){const{Button:o,Accordion:i,AccordionSection:l}=c;let{list:r}=t,{schema:s}=t,{record:a}=t,{classId:d}=t,{eventId:u}=t,{disabled:$}=t,{required:h}=t,{open:g=!1}=t,{template:v={}}=t,{isTemplate:b=!1}=t;const y={};let w=a[r.name]||{};a[r.name]=w;const k=e=>y[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · ");return e.$$set=e=>{"list"in e&&n(1,r=e.list),"schema"in e&&n(15,s=e.schema),"record"in e&&n(0,a=e.record),"classId"in e&&n(2,d=e.classId),"eventId"in e&&n(3,u=e.eventId),"disabled"in e&&n(4,$=e.disabled),"required"in e&&n(5,h=e.required),"open"in e&&n(6,g=e.open),"template"in e&&n(16,v=e.template),"isTemplate"in e&&n(7,b=e.isTemplate)},[a,r,d,u,$,h,g,b,w,o,i,l,e=>s.filter((t=>void 0!==e[t.name]&&"textarea"!==t.properties?.format)).map((t=>"object"===t.type?k(t.name):"boolean"===t.type?p(e[t.name]):"date"===t.type?m(e[t.name]):"datetime"===t.type?f(e[t.name]):e[t.name])).filter((e=>!!e)).join(" • ")||"+",({detail:e})=>{const[t,o]=e.itemName.split(".");if(!o)return;e.desc&&(y[o]=e.desc);const i=a[t];n(0,a[t]={...i,[o]:e.value},a),n(8,w=a[t])},e=>t=>{(()=>{const e=v[r.name]||{};for(const t in e)v[r.name][t]&&!a[r.name][t]&&n(0,a[r.name][t]=v[r.name][t],a)})(),e(t);const o=`#accordion-content-${d}-${r.name} > div.form-field:last-child`,i=document.querySelector(o);ee().then((()=>i.scrollIntoView({behavior:"smooth",block:"end"})))},s,v,function(t){Q(e,t)}]}class nl extends we{constructor(e){var t;super(),Qi.getElementById("svelte-148ktt9-style")||((t=S("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}}",I(Qi.head,t)),ye(this,e,tl,el,w,{list:1,schema:15,record:0,classId:2,eventId:3,disabled:4,required:5,open:6,template:16,isTemplate:7})}}const{Boolean:ol,document:il}=$e;function ll(e,t,n){const o=e.slice();return o[90]=t[n],o}function rl(e,t,n){const o=e.slice();return o[93]=t[n],o}function sl(e){return{c:h,m:h,p:h,i:h,o:h,d:h}}function al(e){let t,n,o=e[89]&&function(e){let t,n,o,i,l,r,s,a,c,d,u,m,f,p=e[0].items,$=[];for(let t=0;t<p.length;t+=1)$[t]=dl(rl(e,p,t));const h=e=>me($[e],1,1,(()=>{$[e]=null}));let g=e[0].list&&ul(e);c=new e[12]({props:{outline:!0,$$slots:{default:[bl]},$$scope:{ctx:e}}}),c.$on("click",e[27]);let v=e[24]&&function(e){let t,n,o,i;t=new e[12]({props:{class:"close",disabled:e[9],form:e[16],filled:!0,type:"submit",$$slots:{default:[yl]},$$scope:{ctx:e}}});let l=e[1]&&!e[9]&&wl(e);return{c(){ge(t.$$.fragment),n=C(),l&&l.c(),o=L()},m(e,r){ve(t,e,r),_(e,n,r),l&&l.m(e,r),_(e,o,r),i=!0},p(e,n){const i={};512&n[0]&&(i.disabled=e[9]),8&n[3]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i),e[1]&&!e[9]?l?(l.p(e,n),514&n[0]&&ue(l,1)):(l=wl(e),l.c(),ue(l,1),l.m(o.parentNode,o)):l&&(ce(),me(l,1,1,(()=>{l=null})),de())},i(e){i||(ue(t.$$.fragment,e),ue(l),i=!0)},o(e){me(t.$$.fragment,e),me(l),i=!1},d(e){be(t,e),e&&j(n),l&&l.d(e),e&&j(o)}}}(e);return{c(){t=S("section"),n=S("form"),o=S("input"),l=C();for(let e=0;e<$.length;e+=1)$[e].c();r=C(),g&&g.c(),s=C(),a=S("div"),ge(c.$$.fragment),d=C(),v&&v.c(),z(o,"class",x(e[16])+" svelte-1pfb5os"),z(o,"name","_id"),z(o,"type","hidden"),o.value=i=e[2]._id||"",z(n,"class",x(e[17])+" svelte-1pfb5os"),z(n,"id",e[16]),z(a,"class","form--buttons svelte-1pfb5os"),z(t,"class",x(e[18])+" svelte-1pfb5os")},m(i,p){_(i,t,p),I(t,n),I(n,o),I(n,l);for(let e=0;e<$.length;e+=1)$[e].m(n,null);I(n,r),g&&g.m(n,null),I(t,s),I(t,a),ve(c,a,null),I(a,d),v&&v.m(a,null),u=!0,m||(f=[E(n,"keydown",e[32]),E(n,"submit",D(e[26]))],m=!0)},p(e,t){if((!u||4&t[0]&&i!==(i=e[2]._id||""))&&(o.value=i),1887502869&t[0]|4&t[1]){let o;for(p=e[0].items,o=0;o<p.length;o+=1){const i=rl(e,p,o);$[o]?($[o].p(i,t),ue($[o],1)):($[o]=dl(i),$[o].c(),ue($[o],1),$[o].m(n,r))}for(ce(),o=p.length;o<$.length;o+=1)h(o);de()}e[0].list?g?(g.p(e,t),1&t[0]&&ue(g,1)):(g=ul(e),g.c(),ue(g,1),g.m(n,null)):g&&(ce(),me(g,1,1,(()=>{g=null})),de());const l={};8&t[3]&&(l.$$scope={dirty:t,ctx:e}),c.$set(l),e[24]&&v.p(e,t)},i(e){if(!u){for(let e=0;e<p.length;e+=1)ue($[e]);ue(g),ue(c.$$.fragment,e),ue(v),u=!0}},o(e){$=$.filter(ol);for(let e=0;e<$.length;e+=1)me($[e]);me(g),me(c.$$.fragment,e),me(v),u=!1},d(e){e&&j(t),N($,e),g&&g.d(),be(c),v&&v.d(),m=!1,b(f)}}}(e);return{c(){o&&o.c(),t=L()},m(e,i){o&&o.m(e,i),_(e,t,i),n=!0},p(e,t){e[89]&&o.p(e,t)},i(e){n||(ue(o),n=!0)},o(e){me(o),n=!1},d(e){o&&o.d(e),e&&j(t)}}}function cl(e){let t,n;return t=new oi({props:{classId:e[16],item:e[93],selection:e[93].selection,record:e[2],disabled:e[9],eventId:e[23],toDelete:e[4]}}),t.$on("task",e[28]),t.$on("notify",e[29]),t.$on("multi",e[30]),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.item=e[93]),1&n[0]&&(o.selection=e[93].selection),4&n[0]&&(o.record=e[2]),512&n[0]&&(o.disabled=e[9]),16&n[0]&&(o.toDelete=e[4]),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function dl(e){let t,n,o="list"!==e[93].type&&e[33](!0,e[93].name),i=o&&cl(e);return{c(){i&&i.c(),t=L()},m(e,o){i&&i.m(e,o),_(e,t,o),n=!0},p(e,n){1&n[0]&&(o="list"!==e[93].type&&e[33](!0,e[93].name)),o?i?(i.p(e,n),1&n[0]&&ue(i,1)):(i=cl(e),i.c(),ue(i,1),i.m(t.parentNode,t)):i&&(ce(),me(i,1,1,(()=>{i=null})),de())},i(e){n||(ue(i),n=!0)},o(e){me(i),n=!1},d(e){i&&i.d(e),e&&j(t)}}}function ul(e){let t,n,o,i,l=e[20]&&0!=e[3]&&ml(e),r=e[21]&&0!=e[6]&&pl(e),s=e[0].list,a=[];for(let t=0;t<s.length;t+=1)a[t]=vl(ll(e,s,t));const c=e=>me(a[e],1,1,(()=>{a[e]=null}));return{c(){l&&l.c(),t=C(),r&&r.c(),n=C();for(let e=0;e<a.length;e+=1)a[e].c();o=L()},m(e,s){l&&l.m(e,s),_(e,t,s),r&&r.m(e,s),_(e,n,s);for(let t=0;t<a.length;t+=1)a[t].m(e,s);_(e,o,s),i=!0},p(e,i){if(e[20]&&0!=e[3]?l?(l.p(e,i),8&i[0]&&ue(l,1)):(l=ml(e),l.c(),ue(l,1),l.m(t.parentNode,t)):l&&(ce(),me(l,1,1,(()=>{l=null})),de()),e[21]&&0!=e[6]?r?(r.p(e,i),64&i[0]&&ue(r,1)):(r=pl(e),r.c(),ue(r,1),r.m(n.parentNode,n)):r&&(ce(),me(r,1,1,(()=>{r=null})),de()),8455077&i[0]|1&i[1]){let t;for(s=e[0].list,t=0;t<s.length;t+=1){const n=ll(e,s,t);a[t]?(a[t].p(n,i),ue(a[t],1)):(a[t]=vl(n),a[t].c(),ue(a[t],1),a[t].m(o.parentNode,o))}for(ce(),t=s.length;t<a.length;t+=1)c(t);de()}},i(e){if(!i){ue(l),ue(r);for(let e=0;e<s.length;e+=1)ue(a[e]);i=!0}},o(e){me(l),me(r),a=a.filter(ol);for(let e=0;e<a.length;e+=1)me(a[e]);i=!1},d(e){l&&l.d(e),e&&j(t),r&&r.d(e),e&&j(n),N(a,e),e&&j(o)}}}function ml(e){let t,n;return t=new e[13]({props:{name:"Total Dokument",nameClass:"formField_italic",$$slots:{default:[fl]},$$scope:{ctx:e}}}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};8&n[0]|8&n[3]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function fl(e){let t,n,o;function i(t){e[43](t)}let l={item:e[19],disabled:!0};return void 0!==e[3]&&(l.value=e[3]),t=new un({props:l}),G.push((()=>he(t,"value",i))),{c(){ge(t.$$.fragment)},m(e,n){ve(t,e,n),o=!0},p(e,o){const i={};!n&&8&o[0]&&(n=!0,i.value=e[3],ne((()=>n=!1))),t.$set(i)},i(e){o||(ue(t.$$.fragment,e),o=!0)},o(e){me(t.$$.fragment,e),o=!1},d(e){be(t,e)}}}function pl(e){let t,n;return t=new e[13]({props:{name:"Gesamtzeit in Wochen",nameClass:"formField_italic",$$slots:{default:[$l]},$$scope:{ctx:e}}}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};64&n[0]|8&n[3]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function $l(e){let t,n,o;function i(t){e[44](t)}let l={item:e[22],disabled:!0};return void 0!==e[6]&&(l.value=e[6]),t=new un({props:l}),G.push((()=>he(t,"value",i))),{c(){ge(t.$$.fragment)},m(e,n){ve(t,e,n),o=!0},p(e,o){const i={};!n&&64&o[0]&&(n=!0,i.value=e[6],ne((()=>n=!1))),t.$set(i)},i(e){o||(ue(t.$$.fragment,e),o=!0)},o(e){me(t.$$.fragment,e),o=!1},d(e){be(t,e)}}}function hl(e){let t,n;return t=new nl({props:{classId:e[16],list:e[90],template:e[7],eventId:e[23],schema:e[90].item,record:e[2],disabled:e[9]}}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.list=e[90]),128&n[0]&&(o.template=e[7]),1&n[0]&&(o.schema=e[90].item),4&n[0]&&(o.record=e[2]),512&n[0]&&(o.disabled=e[9]),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function gl(e){let t,n;return t=new Fi({props:{classId:e[16],list:e[90],template:e[8],eventId:e[23],schema:e[90].item,record:e[2],disabled:e[9],fixed:e[90].fixed,reqQuantity:e[5]}}),t.$on("save",e[31]),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.list=e[90]),256&n[0]&&(o.template=e[8]),1&n[0]&&(o.schema=e[90].item),4&n[0]&&(o.record=e[2]),512&n[0]&&(o.disabled=e[9]),1&n[0]&&(o.fixed=e[90].fixed),32&n[0]&&(o.reqQuantity=e[5]),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function vl(e){let t,n,o,i,l,r;t=new e[11]({props:{text:e[90].designation}});const s=[gl,hl],a=[];function c(e,t){return"array"===e[90].type?0:1}return o=c(e),i=a[o]=s[o](e),{c(){ge(t.$$.fragment),n=C(),i.c(),l=L()},m(e,i){ve(t,e,i),_(e,n,i),a[o].m(e,i),_(e,l,i),r=!0},p(e,n){const r={};1&n[0]&&(r.text=e[90].designation),t.$set(r);let d=o;o=c(e),o===d?a[o].p(e,n):(ce(),me(a[d],1,1,(()=>{a[d]=null})),de(),i=a[o],i?i.p(e,n):(i=a[o]=s[o](e),i.c()),ue(i,1),i.m(l.parentNode,l))},i(e){r||(ue(t.$$.fragment,e),ue(i),r=!0)},o(e){me(t.$$.fragment,e),me(i),r=!1},d(e){be(t,e),e&&j(n),a[o].d(e),e&&j(l)}}}function bl(e){let t;return{c(){t=F("Abbrechen")},m(e,n){_(e,t,n)},d(e){e&&j(t)}}}function yl(e){let t;return{c(){t=F("Speichern und schliessen")},m(e,n){_(e,t,n)},d(e){e&&j(t)}}}function wl(e){let t,n;return t=new e[12]({props:{form:e[16],filled:!0,type:"submit",style:"opacity: 0.75;",$$slots:{default:[kl]},$$scope:{ctx:e}}}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};8&n[3]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function kl(e){let t;return{c(){t=F("Speichern")},m(e,n){_(e,t,n)},d(e){e&&j(t)}}}function xl(e){return{c:h,m:h,p:h,i:h,o:h,d:h}}function Il(e){let t,n,o,i;il.title=t=e[10];let l={ctx:e,current:null,token:null,hasCatch:!1,pending:xl,then:al,catch:sl,value:89,blocks:[,,,]};return fe(e[25](),l),{c(){n=C(),o=L(),l.block.c()},m(e,t){_(e,n,t),_(e,o,t),l.block.m(e,l.anchor=t),l.mount=()=>o.parentNode,l.anchor=o,i=!0},p(n,o){e=n,(!i||1024&o[0])&&t!==(t=e[10])&&(il.title=t),pe(l,e,o)},i(e){i||(ue(l.block),i=!0)},o(e){for(let e=0;e<3;e+=1){me(l.blocks[e])}i=!1},d(e){e&&j(n),e&&j(o),l.block.d(e),l.token=null,l=null}}}let _l=new Map,jl=new Map,Nl=new Map;const Sl=(e,n)=>{const o=n;return _l.has(o)||_l.set(o,t.getTasksList(n).then((({data:e})=>e))),_l.get(o)},ql=(e,n,o)=>jl.get(o)||Sl(e,n).then((n=>n.find((({_id:e})=>e===o))||t.getTaskList(e,o))).then((e=>(jl.set(o,e),e))),Fl=(e,t)=>{Nl.set(e,t)},Cl=e=>Nl.get(e),Ll=(e,n,o=!1)=>!o&&Nl.get(n)||t.getTask(e,n).then((e=>(Nl.set(n,e),e))),El=(e,n)=>{if(!_l.get(n))return;const o=n;_l.set(o,t.getTasksList(n).then((({data:e})=>e)))},Dl=()=>{_l=new Map,jl=new Map,Nl=new Map};function Tl(e,o,a){let m,f,p,h,g,v,b;k(e,u,(e=>a(52,h=e))),k(e,r,(e=>a(53,g=e))),k(e,s,(e=>a(54,v=e)));const{Divider:y,Button:w,FormField:x}=c,{loggedIn:I,currentTasks:_}=d;k(e,I,(e=>a(55,b=e))),k(e,_,(e=>a(51,p=e)));const j=JSON.parse(i.getItem("Locale")),N=H();let S,q,{schema:F}=o,{recID:C}=o,{prevEventID:L=!1}=o,{prev:E=!1}=o,{taskId:D=!1}=o,{description:T=""}=o,{root:z=!1}=o,{readonly:O}=o,{isStandalone:B}=o,A={},M={},V="form-"+F.class+Math.floor(9e3*Math.random()+1e3).toString();const P=z?"fEmbedded":"fTask",Q=z?"sEmbedded":"sTask";let Y,G,J=0,U=0,Z=1;const K={},X=F.items.find((e=>"price"===e.name&&!e.properties?.hidden)),ee=F.items.find((e=>"quantity"===e.name&&!e.properties?.hidden)),te=!!X,ne=F.list?.filter((e=>"array"===e.type))?.length>1||te,oe=F.items.find((e=>"number"===e.type&&"w"===e.properties?.unit?.constant?.toLowerCase()&&!e.properties?.hidden))?.name,ie=!!oe,le=F.list?.filter((e=>"array"===e.type))?.length>1||ie,re={};let se,ae,ce=0,de=0,ue=[],me=[],fe=[];F.class;let pe=F.id;const $e=!p?.length||p.find((e=>e===pe));["readonly","hidden","required"].map((e=>{F.items.filter((t=>"object"==typeof(t.properties&&t.properties[e]))).map((t=>{const n=t.properties[e].refItem||"",[o,i]=n.split(".");ue.push({action:e,itemName:t.name,refObj:o,refName:i,op:t.properties[e].invert?"!":""})}))}));F.items.filter((e=>e.selection&&e.constraint)).map((e=>{me.push({name:e.name,selection:e.selection,constraint:e.constraint})}));F.items.filter((e=>e.lookup)).map((e=>{fe.push({name:e.name,lookup:e.lookup})}));const he=async e=>{if(e?.length)for(const n of e){if(!n.lookup)break;const{name:e}=n;if(A[e])break;const{domain:o,value:i}=n.lookup;if("user"===o&&i){const n={[i]:b.user},o=await t.getSectionView(e,n);if(o?.length){const[{_id:t}]=o;t&&a(2,A[e]=t,A)}}}},ge=async()=>{if(!F.input)return;if(!F.input.length)return;if(F.input.length<2)return;const e=await t.getEvent(pe),n=!e.input.class[0].name&&e.input.class[0].selection;if(!n)return;const o=e.input.class[1].name,i=e.input.class[1].destination?.split(".")[0];if(!o||!i)return;const l=F.list?.find((e=>e.name===o));if(!l)return;const r=await t.getSchemaByClass(n),s=(await t.getTasks(r.id)).data;if(!s?.length)return;const c=[];for(const e of s){const t={};for(const n of l.item)n.name===i?t[n.name]=e._id:e[n.name]&&(t[n.name]=e[n.name]);c.push(t)}c.length&&a(2,A[o]=c,A)},ve=()=>{for(const e of F.items)e.properties?.value?.concatenation&&be(e)},be=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 we(e.refItemNext));a(2,A[e.name]=n,A)},ye=async e=>{const t=ue.filter((t=>t.refObj===e));if(t?.length)for(const e of t){const{action:t,itemName:n,refObj:o,refName:i,op:l}=e;if(!o)break;let r,s,c=!1;const d=A[o];c=i?(await Ll(o,d))[i]:d,Array.isArray(c)&&0===c.length&&(c=!1),"!"===l&&(c=!c),"required"!==t&&"readonly"!==t||(r=`#${V} .form-field.${n} .field textarea`,s=document.querySelector(r),s||(r=`#${V} .form-field.${n} .field input`,s=document.querySelector(r)),s&&c&&s.setAttribute(t,"true"),s&&!c&&s.removeAttribute(t)),"hidden"===t&&(r=`#${V} .form-field.${n}`,s=document.querySelector(r),s?.classList?.toggle("hidden",c),c&&a(2,A[n]="",A))}},we=async e=>{const[n,o]=e.offset?.split(",")||[0,0],i=+e.base||0,l=+e.step||1;e.type;const r=e.refItem,s=await t.getLastId(F.class,r);if(!s?.length)return(i+l).toString().padStart(o,"0");const a=s[0][r];return((+a?.substring(n,n+o)||i)+l).toString().padStart(o,"0")},ke=(e,t,n=!1)=>{const o=t.name,i=e.find((e=>e.name===o));let l=t.value;if(!n&&i&&i.properties?.multi&&(l=A[o]),l&&i&&i.type.startsWith("date"))try{return No(l,"%d.%m.%Y").toISOString()}catch{return new Date(l).toISOString()}if(i&&"boolean"===i.type&&(l=!!t.checked),i&&"number"===i.type){const e=Number("1.1").toLocaleString(j.id).substring(1,2);try{l=Number(l.replace(e,".")).toString()}catch{}}return l},xe=()=>B?window.close():z?window.singleSpaNavigate("/"):N("back"),Ie=async(e,n)=>{if(F.input?.length>1){if(F.input[0]!==e)return;const o=await t.getEvent(F.id),{recursive:i}=o.input.class[1];if(n){const o=await t.getTaskOptions(`${e}:${n}`,pe,i);a(2,A={...A,...o})}else{const e=F.input.slice(1);for(const t of e)a(2,A[t]=[],A)}}},_e=()=>{let e=0;if(X){let t=1;ee&&(t=Z),e=U*t}let t=0;for(const e in K)t+=K[e];a(3,J=t+e)},je=()=>{let e=0;for(const t in re)e+=re[t];a(6,ce=e+ +de)};var Ne;n.subscribe((async e=>{if(!e)return;if(!C)return;const n=await t.getSchema(e.eventId);if(!n)return;const o=F.list?.find((e=>e.name===n.class));if(!o)return;const i=await t.getTaskById(e.taskId);((e,t,n)=>{if(!_l.get(e))return;const o=t;jl.set(o,n)})(i.event,i.docId,i.data);const l=await t.getTask(n.class,i.docId),r=A[n.class].filter((e=>e[n.class]==l._id));r?.length&&r.map((e=>{e[n.class]=i.docId})),a(2,A),a(42,q),a(41,S),a(0,F)})),R(Dl),Ne=()=>{C&&function(e,t,n=t){e.set(n)}(u,h={[C]:{record:A,lists:M}},h)},W().$$.on_destroy.push(Ne);return e.$$set=e=>{"schema"in e&&a(0,F=e.schema),"recID"in e&&a(38,C=e.recID),"prevEventID"in e&&a(36,L=e.prevEventID),"prev"in e&&a(39,E=e.prev),"taskId"in e&&a(37,D=e.taskId),"description"in e&&a(34,T=e.description),"root"in e&&a(1,z=e.root),"readonly"in e&&a(35,O=e.readonly),"isStandalone"in e&&a(40,B=e.isStandalone)},e.$$.update=()=>{16&e.$$.dirty[1]&&a(9,m=O),1&e.$$.dirty[0]|3072&e.$$.dirty[1]&&q&&S&&F.items.map((({name:e,type:t,refItem:n})=>{if(!1===n)return;const o=S.items.find((t=>t.name===e));if(!o)return;if(t!==o.type)return;const i="_"+e;q[e]&&a(2,A[e]=q[e],A),q[i]&&a(2,A[i]=q[i],A)})),2&e.$$.dirty[0]|8&e.$$.dirty[1]&&a(10,f=z?T||"enablerr - Form":document.title)},[F,z,A,J,Y,G,ce,se,ae,m,f,y,w,x,I,_,V,P,Q,{name:"amountValue",properties:{decimals:2}},ne,le,{name:"weekValue",properties:{decimals:1}},pe,$e,async()=>{if(a(8,ae=await t.getTemplate(F.class)),C||a(7,se=ae),C){if(h&&h[C]){const e=h[C].record;F.items.map((t=>{e[t.name]=ke(F.items,{name:t.name,value:e[t.name],checked:e[t.name]})})),a(2,A=e),F.list&&F.list.map((e=>{"array"===e.type&&h[C].lists[e.name]&&a(2,A[e.name]=h[C].lists[e.name].reduce(((t,n)=>n._delete||!Object.values(n).some(Boolean)?t:t.concat(Object.entries(n).reduce(((t,[n,o])=>("_delete"!==n&&(t[n]=ke(e.item,{name:n,value:o,checked:o},!0)),t)),{}))),[]),A)}))}else a(2,A=await t.getTask(F.class,C));a(34,T=$(F,A))}if(L){a(35,O=!1),a(41,S=await t.getSchema(L)),"string"==typeof E&&a(42,q=await t.getTask(S.class,E));const e=F.items.find((e=>e.refClass===S.class));a(2,A[e.name]=q._id,A)}le&&(de=A[oe]||0);const e=await t.getEvent(pe);if(e.trigger?.startOn&&!e.trigger.startOn.some((e=>e.type.indexOf("Manual")>=0))&&a(35,O=!0),g.role?.length&&F.authorization?.length){const e=F.authorization.some((e=>v?.find((t=>t===e.role&&"edit"===e.activity))));a(35,O||=!e)}return C||(he(e.input?.class),ve(),ge()),!0},async e=>{C||a(9,m=!0);const n=e.submitter?.className?.includes("close"),o={};Array.from(document.querySelectorAll("form#"+V+" ."+V)).map((e=>{if(e.name)if(e.name.includes(".")){const[t,n]=e.name.split("."),i=F.list.find((e=>e.name===t));o[e.name]=ke(i.item,e)}else o[e.name]=ke(F.items,e)})),F.list&&F.list.map((e=>{"array"===e.type&&M[e.name]&&(o[e.name]=M[e.name].reduce(((t,n)=>n._delete||!Object.values(n).some(Boolean)?t:t.concat(Object.entries(n).reduce(((t,[n,o])=>("_delete"!==n&&(t[n]=ke(e.item,{name:n,value:o,checked:o},!0)),t)),{}))),[]))})),o._event=pe,o._prevEventId=L,o._taskId=D;const{id:i,task:r,error:s}=await t.saveData(F.class,o);if(s?.text){const e=s.field?" in "+s.field+": "+s.value:"";return l.failed(`${s.text} ${e}`,3e3),void a(9,m=!1)}l.success("Die Daten wurden gespeichert.",2e3),o._id=i;const c=await t.getTaskList(F.class,i);return N("choose",{row:c}),n?xe():C?void 0:window.singleSpaNavigate(`/task/${pe}/${r}/task`)},()=>L?window.history.back():xe(),async({detail:{row:e,eventId:n}})=>{if((()=>{if(C)for(const e of ue)e.refName||ye(e.itemName)})(),C)return;if(await(async()=>{const e={...A};for(const n of F.items)if(n.refItem&&A[n.refItem]){const o=await t.getTask(n.refItem,A[n.refItem]);o&&(e[n.name]=o[n.name])}for(const n of F.list||[])if(n.refItem&&A[n.refItem]){const o=await t.getTask(n.refItem,A[n.refItem]),i=[];for(const e of o[n.name]){const t={};for(const o of n.item)e[o.name]&&(t[o.name]=e[o.name]);i.push(t)}e[n.name]=i}a(2,A=e)})(),(async(e,n)=>{if(!e)return;const o=(await t.getEvent(e)).output.class[0].name,i=fe.filter((e=>e.lookup===o));if(i?.length)for(const e of i){const{lookup:t,name:o}=e;let i="";if(n){let e=await Ll(t,n);e[o].length&&(i=e[o][0][o])}a(2,A[o]=i,A)}})(n||e._task.event,e._id),!e._task)return;const o=e._task.event,i=await t.getEvent(o),l=await t.getEvent(pe);if(!l.output?.class?.length)return;const r=l.output.class[0]?.item.find((e=>(e.refClass||e.name)===i.output.class[0]?.name));(l.input?.class?.length&&l.input.class[0].name===i.output.class[0]?.name||r?.asInput)&&(a(41,S=await t.getSchema(o)),a(36,L=o),a(37,D=e._task._id),a(42,q=!!D&&await t.getTask(S.class,e._task.docId)),Ie(S.class,e?._task?.docId))},async({detail:e})=>{if("quantity"===e.itemName&&a(5,G=A.quantity),(async(e,t)=>{const n=me.filter((t=>t.selection===e||t.constraint===e));if(n?.length){a(4,Y=!1);for(const o of n){const{selection:n,constraint:i,name:l}=o;if(t)break;a(2,A[l]="",A),e===n&&a(4,Y=i);const r=A[n];if(r&&e===i){let e=await Ll(n,r);const t=A[i];if(t?.length){const n=t[0].split(", ");e=e[i];let o="";for(const t of e)Object.values(t).map((e=>{n.includes(e)&&(o=t[l])}));a(2,A[l]=o,A)}}}}})(e.itemName,e.oldValue===e.value),ye(e.itemName),le&&(e.itemName===oe&&(de=+e.value),je()),te){if(e.itemName===X?.name)U=e.value;else{if(e.itemName!==ee?.name)return;Z=e.value}_e()}},async({detail:e})=>{if(!(F.input?.length&&F.input.length>1))return;if(S?.class!==F.input[0])return;const{value:n,lookup:o,view:i}=e,[l]=o.split(":"),r=(await t.getSectionView(l,{[i]:{$in:n}})).map((e=>e._id));for(const e of F.input.slice(1)){a(2,A[e]=[],A);const n=await t.getSchemaByClass(e);n.id;let o=await t.getTasks(n.id);if(o=o.data.filter((e=>"Ready"===e._task.status&&r.includes(e[l]))),o?.length){const n=o.map((e=>e._id)),i=await t.getSectionView(e,{_id:{$in:n}});for(const t of i)t[e]=t._id;a(2,A[e]=i,A)}}},({detail:e})=>{M[e.listName]=e.value,ne&&(K[e.listName]=e.amountValue,_e()),le&&(re[e.listName]=e.weeksValue||0,je())},e=>{"button"!==e.srcElement?.type&&"textarea"!==e.srcElement?.type&&13==e.which&&e.preventDefault()},(e,t)=>se?(void 0!==se[t]&&a(2,A[t]=se[t],A),e):e,T,O,L,D,C,E,B,S,q,function(e){J=e,a(3,J)},function(e){ce=e,a(6,ce)}]}class zl extends we{constructor(e){var t;super(),il.getElementById("svelte-1pfb5os-style")||((t=S("style")).id="svelte-1pfb5os-style",t.textContent="form.disabled.svelte-1pfb5os input.svelte-1pfb5os{background-color:red !important}form.svelte-1pfb5os.svelte-1pfb5os{min-width:25em}@media only screen and (min-width: 600px){form.svelte-1pfb5os.svelte-1pfb5os{min-width:30em}}.fEmbedded.svelte-1pfb5os.svelte-1pfb5os,.fTask.svelte-1pfb5os.svelte-1pfb5os{overflow-y:auto;padding-right:1em;overflow-x:hidden}.fEmbedded.svelte-1pfb5os.svelte-1pfb5os{height:fit-content;min-height:30vh;max-height:60vh}.fTask.svelte-1pfb5os.svelte-1pfb5os{height:fit-content;max-height:70vh}.sTask.svelte-1pfb5os.svelte-1pfb5os{height:95%;display:inline-grid}.sTask.svelte-1pfb5os .btn.svelte-1pfb5os{display:initial !important}.form--buttons.svelte-1pfb5os.svelte-1pfb5os{display:flex;gap:1em;padding-bottom:0.5em}",I(il.head,t)),ye(this,e,Tl,Il,w,{schema:0,recID:38,prevEventID:36,prev:39,taskId:37,description:34,root:1,readonly:35,isStandalone:40},[-1,-1,-1,-1])}}function Ol(e){let t,n,o;function i(t){e[4](t)}let l={schema:e[5],recID:e[6]};return void 0!==e[0]&&(l.description=e[0]),t=new zl({props:l}),G.push((()=>he(t,"description",i))),t.$on("back",e[2]),{c(){ge(t.$$.fragment)},m(e,n){ve(t,e,n),o=!0},p(e,o){const i={};32&o&&(i.schema=e[5]),64&o&&(i.recID=e[6]),!n&&1&o&&(n=!0,i.description=e[0],ne((()=>n=!1))),t.$set(i)},i(e){o||(ue(t.$$.fragment,e),o=!0)},o(e){me(t.$$.fragment,e),o=!1},d(e){be(t,e)}}}function Bl(e){let t,n;return t=new a({props:{update:e[1],description:e[0],$$slots:{default:[Ol,({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(){ge(t.$$.fragment)},m(e,o){ve(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||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Al(e,n,o){let i,{refresh:l}=n;return e.$$set=e=>{"refresh"in e&&o(3,l=e.refresh)},[i,(e,n)=>t.getSchema(e).then((t=>({schema:t,recID:n,eventID:e,title:t.identity.designation}))),e=>{},l,function(e){i=e,o(0,i)}]}function Ml(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vl,Pl,Wl=(Vl=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){i(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 i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e){return l="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},l(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("object"!==l(e))throw new Error("single-spa-svelte requires a configuration object");var t=o(o({},r),e);if(!t.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:s.bind(null,t,n),mount:a.bind(null,t,n),unmount:c.bind(null,t,n),update:d.bind(null,t,n)}};var r={component:null,domElementGetter:null,props:{}};function s(e){return Promise.resolve()}function a(e,t,n){var i=Object.keys(r),l=Object.keys(e).reduce((function(t,n){return i.includes(n)||(t[n]=e[n]),t}),{});return Promise.resolve().then((function(){var i=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),r=i();t.instance=new e.component(o(o({},l),{},{target:r,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)}))}},Vl(Pl={exports:{}},Pl.exports),Pl.exports);const Rl=Ml(Wl)({component:class extends we{constructor(e){super(),ye(this,e,Al,Bl,w,{refresh:3})}},domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:Hl,mount:Ql,unmount:Yl}=Rl;e({bootstrap:Hl,mount:Ql,unmount:Yl});e("Form",zl),e("List",at),e("Template",class extends we{constructor(e){var t;super(),Ci.getElementById("svelte-1phofh5-style")||((t=S("style")).id="svelte-1phofh5-style",t.textContent="form.svelte-1phofh5.svelte-1phofh5{min-width:25em}@media only screen and (min-width: 600px){form.svelte-1phofh5.svelte-1phofh5{min-width:30em}}.fEmbedded.svelte-1phofh5.svelte-1phofh5,.fTask.svelte-1phofh5.svelte-1phofh5{overflow-y:auto;padding-right:1em;overflow-x:hidden}.fEmbedded.svelte-1phofh5.svelte-1phofh5{height:fit-content;min-height:30vh;max-height:60vh}.fTask.svelte-1phofh5.svelte-1phofh5{height:fit-content;max-height:70vh}.sTask.svelte-1phofh5.svelte-1phofh5{height:95%;display:inline-grid;min-width:40em}.sTask.svelte-1phofh5 .btn.svelte-1phofh5{display:initial !important}.form--buttons.svelte-1phofh5.svelte-1phofh5{display:flex;gap:1em;padding-bottom:0.5em}",I(Ci.head,t)),ye(this,e,Hi,Wi,w,{schema:0,record:1})}})}}}));
|
|
1
|
+
System.register(["@enablerr-ui/form","@enablerr-ui/layout","@enablerr-ui/auth","@enablerr-ui/task"],(function(e){"use strict";var t,n,o,i,l,r,s,a,c,d,u;return{setters:[function(e){t=e.Request,n=e.task_notification,o=e.TextArea,i=e.Storage,l=e.toasts,r=e.settings,s=e.currentRoles,a=e.Page},function(e){c=e.getAttractions},function(e){d=e.user},function(e){u=e.taskClipboard}],execute:function(){e("version","0.2.396");const m=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(" · "))),f=e=>{try{return new Date(e).toLocaleString()}catch{return e}},p=e=>e?"(ja)":"(nein)",$=(e,t)=>{const n={...t};return(e.display?.reduce(((t,o)=>{let[i,l]=o.split(".");if(e.list?.find((({name:e})=>e===i))&&l&&void 0!==n[i]){const e=`${i}_${l}`;n[e]=n[i][l],i=e}return t.find((e=>e===i))||t.push(i),t}),[]).map((e=>"boolean"==typeof n[e]?p(n[e]):m(n["_"+e]||n[e])))||e.items.map((e=>"object"===e.type?t["_"+e.name]:"list"===e.type?"":("boolean"==typeof t[e.name]&&p(t[e.name]),t[e.name])))).map((e=>e?.toString().split(" · ").filter((e=>!!e)).join(" · "))).filter((e=>!!e)).join(" • ")};function h(){}function g(e){return e()}function v(){return Object.create(null)}function b(e){e.forEach(g)}function y(e){return"function"==typeof e}function w(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function k(e,t,n){e.$$.on_destroy.push(function(e,...t){if(null==e)return h;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function x(e){return null==e?"":e}function I(e,t){e.appendChild(t)}function _(e,t,n){e.insertBefore(t,n||null)}function j(e){e.parentNode.removeChild(e)}function N(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function S(e){return document.createElement(e)}function q(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function F(e){return document.createTextNode(e)}function C(){return F(" ")}function L(){return F("")}function E(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function D(e){return function(t){return t.preventDefault(),e.call(this,t)}}function T(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function z(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 B(e,t){e.value=null==t?"":t}function A(e,t,n,o){e.style.setProperty(t,n,o?"important":"")}function M(e,t,n){e.classList[n?"add":"remove"](t)}let V;function P(e){V=e}function W(){if(!V)throw new Error("Function called outside component initialization");return V}function R(e){W().$$.on_mount.push(e)}function H(){const e=W();return(t,n)=>{const o=e.$$.callbacks[t];if(o){const i=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,i)}))}}}function Q(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e(t)))}const Y=[],G=[],J=[],U=[],Z=Promise.resolve();let K=!1;function X(){K||(K=!0,Z.then(le))}function ee(){return X(),Z}function te(e){J.push(e)}function ne(e){U.push(e)}let oe=!1;const ie=new Set;function le(){if(!oe){oe=!0;do{for(let e=0;e<Y.length;e+=1){const t=Y[e];P(t),re(t.$$)}for(P(null),Y.length=0;G.length;)G.pop()();for(let e=0;e<J.length;e+=1){const t=J[e];ie.has(t)||(ie.add(t),t())}J.length=0}while(Y.length);for(;U.length;)U.pop()();K=!1,oe=!1,ie.clear()}}function re(e){if(null!==e.fragment){e.update(),b(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(te)}}const se=new Set;let ae;function ce(){ae={r:0,c:[],p:ae}}function de(){ae.r||b(ae.c),ae=ae.p}function ue(e,t){e&&e.i&&(se.delete(e),e.i(t))}function me(e,t,n,o){if(e&&e.o){if(se.has(e))return;se.add(e),ae&&ae.c.push((()=>{se.delete(e),o&&(n&&e.d(1),o())})),e.o(t)}}function fe(e,t){const n=t.token={};function o(e,o,i,l){if(t.token!==n)return;t.resolved=l;let r=t.ctx;void 0!==i&&(r=r.slice(),r[i]=l);const s=e&&(t.current=e)(r);let a=!1;t.block&&(t.blocks?t.blocks.forEach(((e,n)=>{n!==o&&e&&(ce(),me(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),de())})):t.block.d(1),s.c(),ue(s,1),s.m(t.mount(),t.anchor),a=!0),t.block=s,t.blocks&&(t.blocks[o]=s),a&&le()}if((i=e)&&"object"==typeof i&&"function"==typeof i.then){const n=W();if(e.then((e=>{P(n),o(t.then,1,t.value,e),P(null)}),(e=>{if(P(n),o(t.catch,2,t.error,e),P(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 i}function pe(e,t,n){const o=t.slice(),{resolved:i}=e;e.current===e.then&&(o[e.value]=i),e.current===e.catch&&(o[e.error]=i),e.block.p(o,n)}const $e="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function he(e,t,n){const o=e.$$.props[t];void 0!==o&&(e.$$.bound[o]=n,n(e.$$.ctx[o]))}function ge(e){e&&e.c()}function ve(e,t,n,o){const{fragment:i,on_mount:l,on_destroy:r,after_update:s}=e.$$;i&&i.m(t,n),o||te((()=>{const t=l.map(g).filter(y);r?r.push(...t):b(t),e.$$.on_mount=[]})),s.forEach(te)}function be(e,t){const n=e.$$;null!==n.fragment&&(b(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function ye(e,t,n,o,i,l,r=[-1]){const s=V;P(e);const a=e.$$={fragment:null,ctx:null,props:l,update:h,not_equal:i,bound:v(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(s?s.$$.context:t.context||[]),callbacks:v(),dirty:r,skip_bound:!1};let c=!1;if(a.ctx=n?n(e,t.props||{},((t,n,...o)=>{const l=o.length?o[0]:n;return a.ctx&&i(a.ctx[t],a.ctx[t]=l)&&(!a.skip_bound&&a.bound[t]&&a.bound[t](l),c&&function(e,t){-1===e.$$.dirty[0]&&(Y.push(e),X(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}(e,t)),n})):[],a.update(),c=!0,b(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(j)}else a.fragment&&a.fragment.c();t.intro&&ue(e.$$.fragment),ve(e,t.target,t.anchor,t.customElement),le()}P(s)}class we{$destroy(){be(this,1),this.$destroy=h}$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 ke(e){let t,n,o,i,l;return{c(){t=q("svg"),n=q("circle"),o=q("polyline"),i=q("line"),z(n,"cx","12"),z(n,"cy","12"),z(n,"r","10"),z(o,"points","8 12 12 16 16 12"),z(i,"x1","12"),z(i,"y1","8"),z(i,"x2","12"),z(i,"y2","16"),z(t,"xmlns","http://www.w3.org/2000/svg"),z(t,"width",e[0]),z(t,"height",e[0]),z(t,"fill","none"),z(t,"viewBox","0 0 24 24"),z(t,"stroke","currentColor"),z(t,"stroke-width",e[1]),z(t,"stroke-linecap","round"),z(t,"stroke-linejoin","round"),z(t,"class",l="feather feather-arrow-down-circle "+e[2])},m(e,l){_(e,t,l),I(t,n),I(t,o),I(t,i)},p(e,[n]){1&n&&z(t,"width",e[0]),1&n&&z(t,"height",e[0]),2&n&&z(t,"stroke-width",e[1]),4&n&&l!==(l="feather feather-arrow-down-circle "+e[2])&&z(t,"class",l)},i:h,o:h,d(e){e&&j(t)}}}function xe(e,t,n){let{size:o="100%"}=t,{strokeWidth:i=2}=t,{class:l=""}=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,i=e.strokeWidth),"class"in e&&n(2,l=e.class)},[o,i,l]}class Ie extends we{constructor(e){super(),ye(this,e,xe,ke,w,{size:0,strokeWidth:1,class:2})}}function _e(e){let t,n,o,i;return{c(){t=q("svg"),n=q("path"),o=q("polyline"),z(n,"d","M22 11.08V12a10 10 0 1 1-5.93-9.14"),z(o,"points","22 4 12 14.01 9 11.01"),z(t,"xmlns","http://www.w3.org/2000/svg"),z(t,"width",e[0]),z(t,"height",e[0]),z(t,"fill","none"),z(t,"viewBox","0 0 24 24"),z(t,"stroke","currentColor"),z(t,"stroke-width",e[1]),z(t,"stroke-linecap","round"),z(t,"stroke-linejoin","round"),z(t,"class",i="feather feather-check-circle "+e[2])},m(e,i){_(e,t,i),I(t,n),I(t,o)},p(e,[n]){1&n&&z(t,"width",e[0]),1&n&&z(t,"height",e[0]),2&n&&z(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-check-circle "+e[2])&&z(t,"class",i)},i:h,o:h,d(e){e&&j(t)}}}function je(e,t,n){let{size:o="100%"}=t,{strokeWidth:i=2}=t,{class:l=""}=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,i=e.strokeWidth),"class"in e&&n(2,l=e.class)},[o,i,l]}class Ne extends we{constructor(e){super(),ye(this,e,je,_e,w,{size:0,strokeWidth:1,class:2})}}function Se(e){let t,n,o;return{c(){t=q("svg"),n=q("path"),z(n,"d","M18 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3H6a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3V6a3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3h12a3 3 0 0 0 3-3 3 3 0 0 0-3-3z"),z(t,"xmlns","http://www.w3.org/2000/svg"),z(t,"width",e[0]),z(t,"height",e[0]),z(t,"fill","none"),z(t,"viewBox","0 0 24 24"),z(t,"stroke","currentColor"),z(t,"stroke-width",e[1]),z(t,"stroke-linecap","round"),z(t,"stroke-linejoin","round"),z(t,"class",o="feather feather-command "+e[2])},m(e,o){_(e,t,o),I(t,n)},p(e,[n]){1&n&&z(t,"width",e[0]),1&n&&z(t,"height",e[0]),2&n&&z(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-command "+e[2])&&z(t,"class",o)},i:h,o:h,d(e){e&&j(t)}}}function qe(e,t,n){let{size:o="100%"}=t,{strokeWidth:i=2}=t,{class:l=""}=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,i=e.strokeWidth),"class"in e&&n(2,l=e.class)},[o,i,l]}class Fe extends we{constructor(e){super(),ye(this,e,qe,Se,w,{size:0,strokeWidth:1,class:2})}}function Ce(e){let t,n,o,i;return{c(){t=q("svg"),n=q("polyline"),o=q("path"),z(n,"points","9 10 4 15 9 20"),z(o,"d","M20 4v7a4 4 0 0 1-4 4H4"),z(t,"xmlns","http://www.w3.org/2000/svg"),z(t,"width",e[0]),z(t,"height",e[0]),z(t,"fill","none"),z(t,"viewBox","0 0 24 24"),z(t,"stroke","currentColor"),z(t,"stroke-width",e[1]),z(t,"stroke-linecap","round"),z(t,"stroke-linejoin","round"),z(t,"class",i="feather feather-corner-down-left "+e[2])},m(e,i){_(e,t,i),I(t,n),I(t,o)},p(e,[n]){1&n&&z(t,"width",e[0]),1&n&&z(t,"height",e[0]),2&n&&z(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-corner-down-left "+e[2])&&z(t,"class",i)},i:h,o:h,d(e){e&&j(t)}}}function Le(e,t,n){let{size:o="100%"}=t,{strokeWidth:i=2}=t,{class:l=""}=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,i=e.strokeWidth),"class"in e&&n(2,l=e.class)},[o,i,l]}class Ee extends we{constructor(e){super(),ye(this,e,Le,Ce,w,{size:0,strokeWidth:1,class:2})}}function De(e){let t,n,o,i,l;return{c(){t=q("svg"),n=q("path"),o=q("line"),i=q("line"),z(n,"d","M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"),z(o,"x1","18"),z(o,"y1","9"),z(o,"x2","12"),z(o,"y2","15"),z(i,"x1","12"),z(i,"y1","9"),z(i,"x2","18"),z(i,"y2","15"),z(t,"xmlns","http://www.w3.org/2000/svg"),z(t,"width",e[0]),z(t,"height",e[0]),z(t,"fill","none"),z(t,"viewBox","0 0 24 24"),z(t,"stroke","currentColor"),z(t,"stroke-width",e[1]),z(t,"stroke-linecap","round"),z(t,"stroke-linejoin","round"),z(t,"class",l="feather feather-delete "+e[2])},m(e,l){_(e,t,l),I(t,n),I(t,o),I(t,i)},p(e,[n]){1&n&&z(t,"width",e[0]),1&n&&z(t,"height",e[0]),2&n&&z(t,"stroke-width",e[1]),4&n&&l!==(l="feather feather-delete "+e[2])&&z(t,"class",l)},i:h,o:h,d(e){e&&j(t)}}}function Te(e,t,n){let{size:o="100%"}=t,{strokeWidth:i=2}=t,{class:l=""}=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,i=e.strokeWidth),"class"in e&&n(2,l=e.class)},[o,i,l]}class ze extends we{constructor(e){super(),ye(this,e,Te,De,w,{size:0,strokeWidth:1,class:2})}}function Oe(e){let t,n,o,i,l;return{c(){t=q("svg"),n=q("path"),o=q("polyline"),i=q("line"),z(n,"d","M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"),z(o,"points","15 3 21 3 21 9"),z(i,"x1","10"),z(i,"y1","14"),z(i,"x2","21"),z(i,"y2","3"),z(t,"xmlns","http://www.w3.org/2000/svg"),z(t,"width",e[0]),z(t,"height",e[0]),z(t,"fill","none"),z(t,"viewBox","0 0 24 24"),z(t,"stroke","currentColor"),z(t,"stroke-width",e[1]),z(t,"stroke-linecap","round"),z(t,"stroke-linejoin","round"),z(t,"class",l="feather feather-external-link "+e[2])},m(e,l){_(e,t,l),I(t,n),I(t,o),I(t,i)},p(e,[n]){1&n&&z(t,"width",e[0]),1&n&&z(t,"height",e[0]),2&n&&z(t,"stroke-width",e[1]),4&n&&l!==(l="feather feather-external-link "+e[2])&&z(t,"class",l)},i:h,o:h,d(e){e&&j(t)}}}function Be(e,t,n){let{size:o="100%"}=t,{strokeWidth:i=2}=t,{class:l=""}=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,i=e.strokeWidth),"class"in e&&n(2,l=e.class)},[o,i,l]}class Ae extends we{constructor(e){super(),ye(this,e,Be,Oe,w,{size:0,strokeWidth:1,class:2})}}function Me(e){let t,n,o,i;return{c(){t=q("svg"),n=q("circle"),o=q("line"),z(n,"cx","11"),z(n,"cy","11"),z(n,"r","8"),z(o,"x1","21"),z(o,"y1","21"),z(o,"x2","16.65"),z(o,"y2","16.65"),z(t,"xmlns","http://www.w3.org/2000/svg"),z(t,"width",e[0]),z(t,"height",e[0]),z(t,"fill","none"),z(t,"viewBox","0 0 24 24"),z(t,"stroke","currentColor"),z(t,"stroke-width",e[1]),z(t,"stroke-linecap","round"),z(t,"stroke-linejoin","round"),z(t,"class",i="feather feather-search "+e[2])},m(e,i){_(e,t,i),I(t,n),I(t,o)},p(e,[n]){1&n&&z(t,"width",e[0]),1&n&&z(t,"height",e[0]),2&n&&z(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-search "+e[2])&&z(t,"class",i)},i:h,o:h,d(e){e&&j(t)}}}function Ve(e,t,n){let{size:o="100%"}=t,{strokeWidth:i=2}=t,{class:l=""}=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,i=e.strokeWidth),"class"in e&&n(2,l=e.class)},[o,i,l]}class Pe extends we{constructor(e){super(),ye(this,e,Ve,Me,w,{size:0,strokeWidth:1,class:2})}}const{document:We}=$e;function Re(e){e[30]=e[32].list,e[31]=e[32].items}function He(e,t,n){const o=e.slice();return o[33]=t[n],o}function Qe(e,t,n){const o=e.slice();return o[36]=t[n],o}function Ye(e,t,n){const o=e.slice();return o[36]=t[n],o}function Ge(e){return{c:h,m:h,p:h,i:h,o:h,d:h}}function Je(e){let t,n,o,i,l,r;Re(e);let s=e[30]?.length&&Ue(e),a=e[31]?.length&&Ze(e),c=e[30]?.length&&et(e);return{c(){s&&s.c(),t=C(),n=S("div"),o=S("table"),a&&a.c(),i=C(),l=S("tbody"),c&&c.c(),z(o,"striped",""),z(o,"class","svelte-btngop"),z(n,"class","eList svelte-btngop")},m(e,d){s&&s.m(e,d),_(e,t,d),_(e,n,d),I(n,o),a&&a.m(o,null),I(o,i),I(o,l),c&&c.m(l,null),r=!0},p(e,n){Re(e),e[30]?.length?s?(s.p(e,n),4&n[0]&&ue(s,1)):(s=Ue(e),s.c(),ue(s,1),s.m(t.parentNode,t)):s&&(ce(),me(s,1,1,(()=>{s=null})),de()),e[31]?.length?a?a.p(e,n):(a=Ze(e),a.c(),a.m(o,i)):a&&(a.d(1),a=null),e[30]?.length?c?(c.p(e,n),4&n[0]&&ue(c,1)):(c=et(e),c.c(),ue(c,1),c.m(l,null)):c&&(ce(),me(c,1,1,(()=>{c=null})),de())},i(e){r||(ue(s),ue(c),r=!0)},o(e){me(s),me(c),r=!1},d(e){s&&s.d(e),e&&j(t),e&&j(n),a&&a.d(),c&&c.d()}}}function Ue(e){let t,n,o,i,l,r,s,a,c,d;function u(t){e[22](t)}let m={id:e[8]};return void 0!==e[3]&&(m.value=e[3]),o=new e[6]({props:m}),G.push((()=>he(o,"value",u))),o.$on("input",e[12]),s=new ze({props:{size:"18"}}),{c(){t=S("div"),n=F("Suchen: "),ge(o.$$.fragment),l=C(),r=S("span"),ge(s.$$.fragment),z(r,"class","feather pointer svelte-btngop"),A(t,"margin-bottom","1em"),A(t,"position","relative")},m(i,u){_(i,t,u),I(t,n),ve(o,t,null),I(t,l),I(t,r),ve(s,r,null),a=!0,c||(d=E(r,"click",e[15]),c=!0)},p(e,t){const n={};!i&&8&t[0]&&(i=!0,n.value=e[3],ne((()=>i=!1))),o.$set(n)},i(e){a||(ue(o.$$.fragment,e),ue(s.$$.fragment,e),a=!0)},o(e){me(o.$$.fragment,e),me(s.$$.fragment,e),a=!1},d(e){e&&j(t),be(o),be(s),c=!1,d()}}}function Ze(e){let t,n,o,i=e[4]&&e[0]&&Ke(),l=e[31],r=[];for(let t=0;t<l.length;t+=1)r[t]=Xe(Ye(e,l,t));return{c(){t=S("thead"),n=S("tr"),i&&i.c(),o=C();for(let e=0;e<r.length;e+=1)r[e].c();z(n,"class","svelte-btngop"),z(t,"class","svelte-btngop")},m(e,l){_(e,t,l),I(t,n),i&&i.m(n,null),I(n,o);for(let e=0;e<r.length;e+=1)r[e].m(n,null)},p(e,t){if(e[4]&&e[0]?i||(i=Ke(),i.c(),i.m(n,o)):i&&(i.d(1),i=null),2052&t[0]){let o;for(l=e[31],o=0;o<l.length;o+=1){const i=Ye(e,l,o);r[o]?r[o].p(i,t):(r[o]=Xe(i),r[o].c(),r[o].m(n,null))}for(;o<r.length;o+=1)r[o].d(1);r.length=l.length}},d(e){e&&j(t),i&&i.d(),N(r,e)}}}function Ke(e){let t;return{c(){t=S("th"),z(t,"class","svelte-btngop")},m(e,n){_(e,t,n)},d(e){e&&j(t)}}}function Xe(e){let t,n,o=e[36]?.designation+"";return{c(){t=S("th"),n=F(o),z(t,"class","svelte-btngop")},m(e,o){_(e,t,o),I(t,n)},p(e,t){4&t[0]&&o!==(o=e[36]?.designation+"")&&O(n,o)},d(e){e&&j(t)}}}function et(e){let t,n,o=e[30],i=[];for(let t=0;t<o.length;t+=1)i[t]=it(He(e,o,t));const l=e=>me(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=L()},m(e,o){for(let t=0;t<i.length;t+=1)i[t].m(e,o);_(e,t,o),n=!0},p(e,n){if(28191&n[0]){let r;for(o=e[30],r=0;r<o.length;r+=1){const l=He(e,o,r);i[r]?(i[r].p(l,n),ue(i[r],1)):(i[r]=it(l),i[r].c(),ue(i[r],1),i[r].m(t.parentNode,t))}for(ce(),r=o.length;r<i.length;r+=1)l(r);de()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)ue(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)me(i[e]);n=!1},d(e){N(i,e),e&&j(t)}}}function tt(e){let t,n,o,i,l=e[4]&&e[0]&&nt(e),r=e[31],s=[];for(let t=0;t<r.length;t+=1)s[t]=ot(Qe(e,r,t));return{c(){t=S("tr"),l&&l.c(),n=C();for(let e=0;e<s.length;e+=1)s[e].c();o=C(),z(t,"class","pointer svelte-btngop"),M(t,"active",e[33]._id===e[1])},m(e,r){_(e,t,r),l&&l.m(t,null),I(t,n);for(let e=0;e<s.length;e+=1)s[e].m(t,null);I(t,o),i=!0},p(e,i){if(e[4]&&e[0]?l?(l.p(e,i),17&i[0]&&ue(l,1)):(l=nt(e),l.c(),ue(l,1),l.m(t,n)):l&&(ce(),me(l,1,1,(()=>{l=null})),de()),3588&i[0]){let n;for(r=e[31],n=0;n<r.length;n+=1){const l=Qe(e,r,n);s[n]?s[n].p(l,i):(s[n]=ot(l),s[n].c(),s[n].m(t,o))}for(;n<s.length;n+=1)s[n].d(1);s.length=r.length}2054&i[0]&&M(t,"active",e[33]._id===e[1])},i(e){i||(ue(l),i=!0)},o(e){me(l),i=!1},d(e){e&&j(t),l&&l.d(),N(s,e)}}}function nt(e){let t,n,o,i,l;return o=new Ae({props:{size:"18"}}),{c(){t=S("td"),n=S("a"),ge(o.$$.fragment),z(n,"href",i=e[14](e[33])),z(n,"target","_blank"),z(t,"class","editRow svelte-btngop")},m(e,i){_(e,t,i),I(t,n),ve(o,n,null),l=!0},p(e,t){(!l||4&t[0]&&i!==(i=e[14](e[33])))&&z(n,"href",i)},i(e){l||(ue(o.$$.fragment,e),l=!0)},o(e){me(o.$$.fragment,e),l=!1},d(e){e&&j(t),be(o)}}}function ot(e){let t,n,o,i,l=e[9](e[33],e[36])+"";return{c(){t=S("td"),n=F(l),z(t,"class","svelte-btngop")},m(l,r){_(l,t,r),I(t,n),o||(i=E(t,"click",T((function(){y(e[10](e[33]))&&e[10](e[33]).apply(this,arguments)}))),o=!0)},p(t,o){e=t,4&o[0]&&l!==(l=e[9](e[33],e[36])+"")&&O(n,l)},d(e){e&&j(t),o=!1,i()}}}function it(e){let t,n,o=e[13](e[33],e[31],e[3]),i=o&&tt(e);return{c(){i&&i.c(),t=L()},m(e,o){i&&i.m(e,o),_(e,t,o),n=!0},p(e,n){12&n[0]&&(o=e[13](e[33],e[31],e[3])),o?i?(i.p(e,n),12&n[0]&&ue(i,1)):(i=tt(e),i.c(),ue(i,1),i.m(t.parentNode,t)):i&&(ce(),me(i,1,1,(()=>{i=null})),de())},i(e){n||(ue(i),n=!0)},o(e){me(i),n=!1},d(e){i&&i.d(e),e&&j(t)}}}function lt(e){let t,n;return t=new e[5]({}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p:h,i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function rt(e){let t,n,o,i={ctx:e,current:null,token:null,hasCatch:!1,pending:lt,then:Je,catch:Ge,value:32,blocks:[,,,]};return fe(n=e[2]&&e[11](),i),{c(){t=L(),i.block.c()},m(e,n){_(e,t,n),i.block.m(e,i.anchor=n),i.mount=()=>t.parentNode,i.anchor=t,o=!0},p(t,o){e=t,i.ctx=e,4&o[0]&&n!==(n=e[2]&&e[11]())&&fe(n,i)||pe(i,e,o)},i(e){o||(ue(i.block),o=!0)},o(e){for(let e=0;e<3;e+=1){me(i.blocks[e])}o=!1},d(e){e&&j(t),i.block.d(e),i.token=null,i=null}}}function st(e,o,i){let l;const r=H(),{Loading:s,TextField:a}=c,{currentTasks:u}=d;k(e,u,(e=>i(23,l=e)));let f,{eventId:$}=o,{className:h}=o,{rowId:g}=o,{filterForReady:v=!1}=o,{showEdit:b=!1}=o,{praefix:y=""}=o,{selectionFields:w=!1}=o,{deList:x}=o,I=!0,_="",j=h+Math.floor(9e3*Math.random()+1e3).toString()+"search";const N=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?p(n):m(e[`_${t.name}`]||e[t.name]||"")},S=t.getSchemaByClass(h),q=async(e,t,n,o)=>{const{value:i,refClass:l}=o,[r,s]=n.split("."),a=i?.get(y),c=a&&await Ll(r,a);if(!c)return e;const d=c[s];return d?.length?d.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 Fl(l+o._id.toString(),o),o})):e};R((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(j)?.focus()}),200)})),n.subscribe((async e=>{if(!e)return;const t=await S;e.eventId===t.id&&(El(t.class,e.eventId),i(2,I=!i(2,I=!1)))}));return e.$$set=e=>{"eventId"in e&&i(16,$=e.eventId),"className"in e&&i(17,h=e.className),"rowId"in e&&i(1,g=e.rowId),"filterForReady"in e&&i(18,v=e.filterForReady),"showEdit"in e&&i(0,b=e.showEdit),"praefix"in e&&i(19,y=e.praefix),"selectionFields"in e&&i(20,w=e.selectionFields),"deList"in e&&i(21,x=e.deList)},[b,g,I,_,f,s,a,u,j,N,e=>()=>r("choose",{row:e}),async()=>{const e=await S;let n;i(4,f=(e=>!l?.length||!!l.find((t=>t===e)))(e.id));let o,s=n=await Sl(e.class,e.id),a=!1,c="";const d=w&&w?.find((t=>e.class===t.refClass.split(":")[0])),u=d?.value?.get&&d.value.get(y);if(u){const[n,i]=d.refClass.split(":");e.class===n&&(s=await q(s,n,i,d)),a=d.parentClass?.find((e=>"quantity"===e.name)),c=d.className,o=await t.getCountedSection(c,i.split(".")[0],u,n,"quantity")}i(0,b&&=!d),!d&&v&&(s=((e,t)=>"Information"===t.state.task?e:e.filter((e=>"WaitingForApproval"===e._task.status||"Ready"===e._task.status||"Closing"===e._task.status)))(s,e));let m=[],p=e.display;return p&&p.length?p.map((t=>{const[n,o]=t.split(".");let i=e.list?.find((e=>e.name===n))?.item.find((e=>e.name===o));i&&(i={...i},i.name=`${n}_${o}`,s=s.map((e=>(e[n]&&(e[i.name]=e[n][o]),e)))),i||(i=e.items.find((e=>e.name===n))),m.find((e=>e?.name===n))||m.push(i)})):m=e.items,!b&&a?(m=m.concat([{name:"quantity",designation:"h-Soll"},{name:"ist",designation:"h-Ist"}]),s=s.map((e=>{const t=o.find((t=>t._id===e._id));return t&&(e.ist=t.quantity.$numberDecimal),e})),o.map((e=>{if(!s.find((t=>t._id===e._id))){const t=n.find((t=>t._id===e._id));t.ist=e.quantity.$numberDecimal,s.push(t)}})),r("init",s)):x&&(s=s.filter((e=>!x.find((t=>t._id===e._id))))),{list:s,items:m}},({detail:{value:e}})=>{i(3,_=e)},(e,t,n)=>{if(!n)return!0;for(const o of t)if(N(e,o)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},e=>`/task/${e._task.event}/${e._task._id}/task?view=standalone`,()=>{i(3,_="")},$,h,v,y,w,x,function(e){_=e,i(3,_)}]}class at extends we{constructor(e){var t;super(),We.getElementById("svelte-btngop-style")||((t=S("style")).id="svelte-btngop-style",t.textContent=".feather.svelte-btngop.svelte-btngop{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-btngop.svelte-btngop{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-btngop .editRow.svelte-btngop{width:1em}.eList.svelte-btngop table.svelte-btngop{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-btngop table thead.svelte-btngop{position:sticky;top:0;background:#326173;color:white}.eList.svelte-btngop table thead tr.svelte-btngop{height:2.3em}.eList.svelte-btngop table tbody tr.svelte-btngop{height:2.75em !important}th.svelte-btngop.svelte-btngop,td.svelte-btngop.svelte-btngop{padding-left:0.4em;padding-right:0.4em}tr.pointer.svelte-btngop.svelte-btngop:hover{background-color:#DAE1E5}tr.active.svelte-btngop.svelte-btngop{color:#326173;background-color:#fcebd5}",I(We.head,t)),ye(this,e,st,rt,w,{eventId:16,className:17,rowId:1,filterForReady:18,showEdit:0,praefix:19,selectionFields:20,deList:21},[-1,-1])}}function ct(e){return{c:h,m:h,p:h,i:h,o:h,d:h}}function dt(e){let t,n,o=e[36]&&ut(e);return{c(){o&&o.c(),t=L()},m(e,i){o&&o.m(e,i),_(e,t,i),n=!0},p(e,n){e[36]?o?(o.p(e,n),4&n[0]&&ue(o,1)):(o=ut(e),o.c(),ue(o,1),o.m(t.parentNode,t)):o&&(ce(),me(o,1,1,(()=>{o=null})),de())},i(e){n||(ue(o),n=!0)},o(e){me(o),n=!1},d(e){o&&o.d(e),e&&j(t)}}}function ut(e){let t,n;return t=new e[15]({props:{title:e[11]?"Auswahl":e[19],class:"eList "+(e[9]?"form":""),$$slots:{default:[yt]},$$scope:{ctx:e}}}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};2048&n[0]&&(o.title=e[11]?"Auswahl":e[19]),512&n[0]&&(o.class="eList "+(e[9]?"form":"")),32767&n[0]|64&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function mt(e){let t,n;return t=new zl({props:{schema:e[1],recID:e[0],readonly:e[10]}}),t.$on("choose",(function(){y(e[25](e[36]))&&e[25](e[36]).apply(this,arguments)})),t.$on("back",e[22]),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(n,o){e=n;const i={};2&o[0]&&(i.schema=e[1]),1&o[0]&&(i.recID=e[0]),1024&o[0]&&(i.readonly=e[10]),t.$set(i)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function ft(e){let t,n,o,i,l,r,s;t=new e[16]({props:{text:e[11]?"Zusätzliche Auswahl":""}});const a=[$t,pt],c=[];function d(e,t){return e[11]?0:1}return o=d(e),i=c[o]=a[o](e),r=new at({props:{eventId:e[1].id,className:e[1].class,filterForReady:e[3],praefix:e[4],selectionFields:e[5],rowId:e[0],deList:e[7],showEdit:e[6]}}),r.$on("edit",e[26]),r.$on("choose",e[29]),r.$on("init",e[27]),{c(){ge(t.$$.fragment),n=C(),i.c(),l=C(),ge(r.$$.fragment)},m(e,i){ve(t,e,i),_(e,n,i),c[o].m(e,i),_(e,l,i),ve(r,e,i),s=!0},p(e,n){const s={};2048&n[0]&&(s.text=e[11]?"Zusätzliche Auswahl":""),t.$set(s);let u=o;o=d(e),o===u?c[o].p(e,n):(ce(),me(c[u],1,1,(()=>{c[u]=null})),de(),i=c[o],i?i.p(e,n):(i=c[o]=a[o](e),i.c()),ue(i,1),i.m(l.parentNode,l));const m={};2&n[0]&&(m.eventId=e[1].id),2&n[0]&&(m.className=e[1].class),8&n[0]&&(m.filterForReady=e[3]),16&n[0]&&(m.praefix=e[4]),32&n[0]&&(m.selectionFields=e[5]),1&n[0]&&(m.rowId=e[0]),128&n[0]&&(m.deList=e[7]),64&n[0]&&(m.showEdit=e[6]),r.$set(m)},i(e){s||(ue(t.$$.fragment,e),ue(i),ue(r.$$.fragment,e),s=!0)},o(e){me(t.$$.fragment,e),me(i),me(r.$$.fragment,e),s=!1},d(e){be(t,e),e&&j(n),c[o].d(e),e&&j(l),be(r,e)}}}function pt(e){let t,n,o,i;n=new e[17]({props:{outline:!0,$$slots:{default:[ht]},$$scope:{ctx:e}}}),n.$on("click",e[23]);let l=e[20]&&function(e){let t,n;return t=new e[17]({props:{filled:!0,$$slots:{default:[gt]},$$scope:{ctx:e}}}),t.$on("click",e[24]),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};64&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}(e);return{c(){t=S("div"),ge(n.$$.fragment),o=C(),l&&l.c(),z(t,"class","form--buttons svelte-jb5mrh")},m(e,r){_(e,t,r),ve(n,t,null),I(t,o),l&&l.m(t,null),i=!0},p(e,t){const o={};64&t[1]&&(o.$$scope={dirty:t,ctx:e}),n.$set(o),e[20]&&l.p(e,t)},i(e){i||(ue(n.$$.fragment,e),ue(l),i=!0)},o(e){me(n.$$.fragment,e),me(l),i=!1},d(e){e&&j(t),be(n),l&&l.d()}}}function $t(e){let t,n,o,i,l,r,s=e[14]&&vt(e);return o=new e[17]({props:{outline:!0,$$slots:{default:[bt]},$$scope:{ctx:e}}}),o.$on("click",e[23]),l=new e[16]({props:{text:"Liste aus "+e[8]}}),{c(){s&&s.c(),t=C(),n=S("div"),ge(o.$$.fragment),i=C(),ge(l.$$.fragment),z(n,"class","form--buttons svelte-jb5mrh")},m(e,a){s&&s.m(e,a),_(e,t,a),_(e,n,a),ve(o,n,null),_(e,i,a),ve(l,e,a),r=!0},p(e,n){e[14]?s?(s.p(e,n),16384&n[0]&&ue(s,1)):(s=vt(e),s.c(),ue(s,1),s.m(t.parentNode,t)):s&&(ce(),me(s,1,1,(()=>{s=null})),de());const i={};64&n[1]&&(i.$$scope={dirty:n,ctx:e}),o.$set(i);const r={};256&n[0]&&(r.text="Liste aus "+e[8]),l.$set(r)},i(e){r||(ue(s),ue(o.$$.fragment,e),ue(l.$$.fragment,e),r=!0)},o(e){me(s),me(o.$$.fragment,e),me(l.$$.fragment,e),r=!1},d(e){s&&s.d(e),e&&j(t),e&&j(n),be(o),e&&j(i),be(l,e)}}}function ht(e){let t;return{c(){t=F("Abbrechen")},m(e,n){_(e,t,n)},d(e){e&&j(t)}}}function gt(e){let t;return{c(){t=F("Neu")},m(e,n){_(e,t,n)},d(e){e&&j(t)}}}function vt(e){let t,n;return t=new oi({props:{item:e[12],record:{_id:"",[e[12].name]:""},noForm:"true",classId:"sel_"+e[12].name,eventId:e[13],required:!1,hidden:!1,readonly:!1,deList:e[14]}}),t.$on("notify",e[28]),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};4096&n[0]&&(o.item=e[12]),4096&n[0]&&(o.record={_id:"",[e[12].name]:""}),4096&n[0]&&(o.classId="sel_"+e[12].name),8192&n[0]&&(o.eventId=e[13]),16384&n[0]&&(o.deList=e[14]),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function bt(e){let t;return{c(){t=F("Abbrechen")},m(e,n){_(e,t,n)},d(e){e&&j(t)}}}function yt(e){let t,n,o,i;const l=[ft,mt],r=[];function s(e,t){return e[36].length&&!e[9]?0:1}return t=s(e),n=r[t]=l[t](e),{c(){n.c(),o=L()},m(e,n){r[t].m(e,n),_(e,o,n),i=!0},p(e,i){let a=t;t=s(e),t===a?r[t].p(e,i):(ce(),me(r[a],1,1,(()=>{r[a]=null})),de(),n=r[t],n?n.p(e,i):(n=r[t]=l[t](e),n.c()),ue(n,1),n.m(o.parentNode,o))},i(e){i||(ue(n),i=!0)},o(e){me(n),i=!1},d(e){r[t].d(e),e&&j(o)}}}function wt(e){return{c:h,m:h,p:h,i:h,o:h,d:h}}function kt(e){let t,n,o,i={ctx:e,current:null,token:null,hasCatch:!1,pending:wt,then:dt,catch:ct,value:36,blocks:[,,,]};return fe(n=e[21](e[2]),i),{c(){t=L(),i.block.c()},m(e,n){_(e,t,n),i.block.m(e,i.anchor=n),i.mount=()=>t.parentNode,i.anchor=t,o=!0},p(t,o){e=t,i.ctx=e,4&o[0]&&n!==(n=e[21](e[2]))&&fe(n,i)||pe(i,e,o)},i(e){o||(ue(i.block),o=!0)},o(e){for(let e=0;e<3;e+=1){me(i.blocks[e])}o=!1},d(e){e&&j(t),i.block.d(e),i.token=null,i=null}}}function xt(e,n,o){let i;const{Dialog:l,Divider:r,Button:s}=c,a=H(),{currentTasks:u}=d;k(e,u,(e=>o(32,i=e)));let{schema:m}=n,{recID:f}=n,{isOpening:p=!0}=n,{filterForReady:$=!1}=n,{praefix:h=""}=n,{selectionFields:g=!1}=n,{showEdit:v=!0}=n,{deList:b}=n,y=m.identity.designation,w=m.id;m.class;let x,I,_,j,N,S,q,F="",C=!1;const L=!i?.length||i.find((e=>e===w));return e.$$set=e=>{"schema"in e&&o(1,m=e.schema),"recID"in e&&o(0,f=e.recID),"isOpening"in e&&o(2,p=e.isOpening),"filterForReady"in e&&o(3,$=e.filterForReady),"praefix"in e&&o(4,h=e.praefix),"selectionFields"in e&&o(5,g=e.selectionFields),"showEdit"in e&&o(6,v=e.showEdit),"deList"in e&&o(7,b=e.deList)},[f,m,p,$,h,g,v,b,F,C,x,_,N,S,q,l,r,s,u,y,L,async e=>{if(!e)return!1;const n=await Sl(m.class,m.id);if(I=g&&g?.find((e=>m.class===e.refClass.split(":")[0])),o(11,_=I?.value?.get&&I.value.get(h)),_){j=I.refClass;const[e,n]=j.split(":"),[i]=n.split(".");o(12,N=I.parentClass.find((t=>t.name===e)));const l=await t.getSchemaByClass(N.refClass);o(13,S=l.id),o(8,F=I.parentClass.find((e=>e.name===i)).designation)}return n},()=>{o(9,C=!1),f||a("back"),v||a("back")},()=>{o(9,C=!1),a("back")},()=>{o(0,f=!1),o(10,x=!1),o(9,C=!0)},e=>({detail:{row:e}})=>{let t=m.display;t&&t.length&&t.map((t=>{const[n,o]=t.split(".");let i=m.list?.find((e=>e.name===n))?.item.find((e=>e.name===o));if(i){e[`${n}_${o}`]=e[n][o]}})),a("choose",{row:e})},({detail:e})=>{o(10,x=!!e._task.visum||"Closed"===e._task.status),o(0,f=e._docId),o(9,C=!0)},({detail:e})=>{_&&o(14,q=e)},({detail:e})=>{if(!e.value)return;const t={_id:e.value};a("choose",{row:t})},function(t){Q(e,t)}]}class It extends we{constructor(e){var t;super(),document.getElementById("svelte-jb5mrh-style")||((t=S("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}",I(document.head,t)),ye(this,e,xt,kt,w,{schema:1,recID:0,isOpening:2,filterForReady:3,praefix:4,selectionFields:5,showEdit:6,deList:7},[-1,-1])}}const{document:_t}=$e;function jt(e){e[27]=e[29].list,e[28]=e[29].items}function Nt(e,t,n){const o=e.slice();return o[30]=t[n],o}function St(e,t,n){const o=e.slice();return o[33]=t[n],o}function qt(e,t,n){const o=e.slice();return o[33]=t[n],o}function Ft(e){return{c:h,m:h,p:h,i:h,o:h,d:h}}function Ct(e){let t,n,o,i,l,r,s,a,c,d,u,m,f,p,$,h,g,v;function b(t){e[24](t)}jt(e),n=new e[7]({props:{outline:!0,$$slots:{default:[Lt]},$$scope:{ctx:e}}}),n.$on("click",e[23]);let y={id:e[8]};void 0!==e[1]&&(y.value=e[1]),r=new e[6]({props:y}),G.push((()=>he(r,"value",b))),r.$on("input",e[12]),d=new ze({props:{size:"18"}});let w=e[28]?.length&&function(e){let t,n,o,i,l=e[28],r=[];for(let t=0;t<l.length;t+=1)r[t]=Et(qt(e,l,t));return{c(){t=S("thead"),n=S("tr"),o=S("th"),i=C();for(let e=0;e<r.length;e+=1)r[e].c();z(o,"class","svelte-14hcfjl"),z(n,"class","svelte-14hcfjl"),z(t,"class","svelte-14hcfjl")},m(e,l){_(e,t,l),I(t,n),I(n,o),I(n,i);for(let e=0;e<r.length;e+=1)r[e].m(n,null)},p(e,t){if(2048&t[0]){let o;for(l=e[28],o=0;o<l.length;o+=1){const i=qt(e,l,o);r[o]?r[o].p(i,t):(r[o]=Et(i),r[o].c(),r[o].m(n,null))}for(;o<r.length;o+=1)r[o].d(1);r.length=l.length}},d(e){e&&j(t),N(r,e)}}}(e),k=e[27]?.length&&function(e){let t,n,o=e[27],i=[];for(let t=0;t<o.length;t+=1)i[t]=zt(Nt(e,o,t));const l=e=>me(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=L()},m(e,o){for(let t=0;t<i.length;t+=1)i[t].m(e,o);_(e,t,o),n=!0},p(e,n){if(44547&n[0]){let r;for(o=e[27],r=0;r<o.length;r+=1){const l=Nt(e,o,r);i[r]?(i[r].p(l,n),ue(i[r],1)):(i[r]=zt(l),i[r].c(),ue(i[r],1),i[r].m(t.parentNode,t))}for(ce(),r=o.length;r<i.length;r+=1)l(r);de()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)ue(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)me(i[e]);n=!1},d(e){N(i,e),e&&j(t)}}}(e);return{c(){t=S("div"),ge(n.$$.fragment),o=C(),i=S("div"),l=F("Suchen: "),ge(r.$$.fragment),a=C(),c=S("span"),ge(d.$$.fragment),u=C(),m=S("div"),f=S("table"),w&&w.c(),p=C(),$=S("tbody"),k&&k.c(),z(t,"class","form--buttons svelte-14hcfjl"),z(c,"class","feather pointer svelte-14hcfjl"),A(i,"margin-bottom","1em"),A(i,"position","relative"),z(f,"striped",""),z(f,"class","svelte-14hcfjl"),z(m,"class","eList svelte-14hcfjl")},m(s,b){_(s,t,b),ve(n,t,null),_(s,o,b),_(s,i,b),I(i,l),ve(r,i,null),I(i,a),I(i,c),ve(d,c,null),_(s,u,b),_(s,m,b),I(m,f),w&&w.m(f,null),I(f,p),I(f,$),k&&k.m($,null),h=!0,g||(v=E(c,"click",e[14]),g=!0)},p(e,t){jt(e);const o={};128&t[1]&&(o.$$scope={dirty:t,ctx:e}),n.$set(o);const i={};!s&&2&t[0]&&(s=!0,i.value=e[1],ne((()=>s=!1))),r.$set(i),e[28]?.length&&w.p(e,t),e[27]?.length&&k.p(e,t)},i(e){h||(ue(n.$$.fragment,e),ue(r.$$.fragment,e),ue(d.$$.fragment,e),ue(k),h=!0)},o(e){me(n.$$.fragment,e),me(r.$$.fragment,e),me(d.$$.fragment,e),me(k),h=!1},d(e){e&&j(t),be(n),e&&j(o),e&&j(i),be(r),be(d),e&&j(u),e&&j(m),w&&w.d(),k&&k.d(),g=!1,v()}}}function Lt(e){let t;return{c(){t=F("Abbrechen")},m(e,n){_(e,t,n)},d(e){e&&j(t)}}}function Et(e){let t,n,o=e[33]?.designation+"";return{c(){t=S("th"),n=F(o),z(t,"class","svelte-14hcfjl")},m(e,o){_(e,t,o),I(t,n)},p:h,d(e){e&&j(t)}}}function Dt(e){let t,n,o,i,l,r,s,a;o=new Ae({props:{size:"18"}});let c=e[28],d=[];for(let t=0;t<c.length;t+=1)d[t]=Tt(St(e,c,t));return{c(){t=S("tr"),n=S("td"),ge(o.$$.fragment),i=C();for(let e=0;e<d.length;e+=1)d[e].c();l=C(),z(n,"class","editRow svelte-14hcfjl"),z(t,"class","pointer svelte-14hcfjl"),M(t,"active",e[30]._id===e[0])},m(c,u){_(c,t,u),I(t,n),ve(o,n,null),I(t,i);for(let e=0;e<d.length;e+=1)d[e].m(t,null);I(t,l),r=!0,s||(a=E(n,"click",e[15](e[30])),s=!0)},p(n,o){if(e=n,3584&o[0]){let n;for(c=e[28],n=0;n<c.length;n+=1){const i=St(e,c,n);d[n]?d[n].p(i,o):(d[n]=Tt(i),d[n].c(),d[n].m(t,l))}for(;n<d.length;n+=1)d[n].d(1);d.length=c.length}2049&o[0]&&M(t,"active",e[30]._id===e[0])},i(e){r||(ue(o.$$.fragment,e),r=!0)},o(e){me(o.$$.fragment,e),r=!1},d(e){e&&j(t),be(o),N(d,e),s=!1,a()}}}function Tt(e){let t,n,o,i,l=e[9](e[30],e[33])+"";return{c(){t=S("td"),n=F(l),z(t,"class","svelte-14hcfjl")},m(l,r){_(l,t,r),I(t,n),o||(i=E(t,"click",T(e[10](e[30]))),o=!0)},p(t,n){e=t},d(e){e&&j(t),o=!1,i()}}}function zt(e){let t,n,o=e[13](e[30],e[28],e[1]),i=o&&Dt(e);return{c(){i&&i.c(),t=L()},m(e,o){i&&i.m(e,o),_(e,t,o),n=!0},p(e,n){2&n[0]&&(o=e[13](e[30],e[28],e[1])),o?i?(i.p(e,n),2&n[0]&&ue(i,1)):(i=Dt(e),i.c(),ue(i,1),i.m(t.parentNode,t)):i&&(ce(),me(i,1,1,(()=>{i=null})),de())},i(e){n||(ue(i),n=!0)},o(e){me(i),n=!1},d(e){i&&i.d(e),e&&j(t)}}}function Ot(e){let t,n;return t=new e[5]({}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p:h,i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Bt(e){let t,n,o,i;t=new e[4]({});let l={ctx:e,current:null,token:null,hasCatch:!1,pending:Ot,then:Ct,catch:Ft,value:29,blocks:[,,,]};return fe(e[11](),l),{c(){ge(t.$$.fragment),n=C(),o=L(),l.block.c()},m(e,r){ve(t,e,r),_(e,n,r),_(e,o,r),l.block.m(e,l.anchor=r),l.mount=()=>o.parentNode,l.anchor=o,i=!0},p(t,n){pe(l,e=t,n)},i(e){i||(ue(t.$$.fragment,e),ue(l.block),i=!0)},o(e){me(t.$$.fragment,e);for(let e=0;e<3;e+=1){me(l.blocks[e])}i=!1},d(e){be(t,e),e&&j(n),e&&j(o),l.block.d(e),l.token=null,l=null}}}function At(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[Bt]},$$scope:{ctx:e}}}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};3&n[0]|128&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Mt(e,o,i){const l=H(),{Dialog:r,Divider:s,Loading:a,TextField:d,Button:u}=c;let{item:f}=o,{classId:$}=o,{className:h}=o,{rowId:g}=o,{viewName:v}=o,{viewValue:b}=o,{recordId:y}=o,{filter:w}=o,k="",x=$+Math.floor(9e3*Math.random()+1e3).toString()+"search";const I=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?p(n):m(e[`_${t.name}`]||e[t.name]||"")},_=t.getSchemaByClass(h);R((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(x)?.focus()}),200)})),n.subscribe((async e=>{if(!e)return;const t=await _;e.eventId===t.id&&El(t.class,e.eventId)}));return e.$$set=e=>{"item"in e&&i(16,f=e.item),"classId"in e&&i(17,$=e.classId),"className"in e&&i(18,h=e.className),"rowId"in e&&i(0,g=e.rowId),"viewName"in e&&i(19,v=e.viewName),"viewValue"in e&&i(20,b=e.viewValue),"recordId"in e&&i(21,y=e.recordId),"filter"in e&&i(22,w=e.filter)},[g,k,l,r,s,a,d,u,x,I,e=>()=>l("choose",{row:e}),async()=>{const e=await _;let n=[];if(f.lookup){const e="."+$+"#"+f.lookup,o=document.querySelector(e);if(o?.value){const e=await t.getTask(f.lookup,o.value);if(e){const o=e[f.name]?.map((e=>e[f.name]));o&&(n=await t.getSectionView(f.name,{_id:{$in:o}},!0))}}}else{const o="."+$+"#"+v.split(":")[0],i=document.querySelector(o);let l={[v]:i?.value||y};if(f.refItem){const e="."+$+"#"+f.refItem;try{const t=document.querySelector(e);if(t){const e={$or:[{[f.refItem]:t.value},{[f.refItem]:{$exists:!0,$eq:""}}]};l={...l,...e}}}catch{}}l[v]&&(n=await t.getSectionView(e.class,l,!0)),w&&(n=n.filter((e=>e._id!=w)))}let o=[],i=e.display;return i&&i.length?i.map((t=>{const[i,l]=t.split(".");let r=e.list?.find((e=>e.name===i))?.item.find((e=>e.name===l));r&&(r={...r},r.name=`${i}_${l}`,n=n.map((e=>(e[i]&&(e[r.name]=e[i][l]),e)))),r||(r=e.items.find((e=>e.name===i))),o.find((e=>e?.name===i))||o.push(r)})):o=e.items,{list:n,items:o}},({detail:{value:e}})=>{i(1,k=e)},(e,t,n)=>{if(!n)return!0;for(const o of t)if(I(e,o)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{i(1,k="")},e=>async()=>{const n=await t.getTaskByDocId(e._id),o=`/task/${n.event}/${n._id}/task?view=standalone`;window.open(o)},f,$,h,v,b,y,w,()=>l("back"),function(e){k=e,i(1,k)}]}class Vt extends we{constructor(e){var t;super(),_t.getElementById("svelte-14hcfjl-style")||((t=S("style")).id="svelte-14hcfjl-style",t.textContent=".feather.svelte-14hcfjl.svelte-14hcfjl{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-14hcfjl.svelte-14hcfjl{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-14hcfjl .editRow.svelte-14hcfjl{width:1em}.eList.svelte-14hcfjl table.svelte-14hcfjl{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-14hcfjl table thead.svelte-14hcfjl{position:sticky;top:0;background:#326173;color:white}.eList.svelte-14hcfjl table tbody tr.svelte-14hcfjl{height:2.3em}th.svelte-14hcfjl.svelte-14hcfjl,td.svelte-14hcfjl.svelte-14hcfjl{padding-left:0.4em;padding-right:0.4em}tr.pointer.svelte-14hcfjl.svelte-14hcfjl:hover{background-color:#DAE1E5}tr.active.svelte-14hcfjl.svelte-14hcfjl{color:#326173;background-color:#fcebd5}.form--buttons.svelte-14hcfjl.svelte-14hcfjl{display:flex;gap:1em;padding:0.5em 0}",I(_t.head,t)),ye(this,e,Mt,At,w,{item:16,classId:17,className:18,rowId:0,viewName:19,viewValue:20,recordId:21,filter:22},[-1,-1])}}const{document:Pt}=$e;function Wt(e){return{c:h,m:h,p:h,i:h,o:h,d:h}}function Rt(e){let t,n,i=e[40]&&function(e){let t,n,i,l,r,s,a,c,d,u,m,f,p,$,h;n=new o({props:{class:"full-width",id:e[21],value:e[2],rows:"1",required:e[1],disabled:e[3],style:"height:2.8em; padding-left:2em;padding-right:2em;overflow-y:hidden; resize:none;"}}),n.$on("click",e[24]()),n.$on("onFocus",e[24](e[21]));const g=[Qt,Ht],v=[];function b(e,t){return!e[3]||e[13]?0:e[18]&&e[0]?1:-1}~(l=b(e))&&(r=v[l]=g[l](e));let y=(!e[3]||e[13])&&Ut(e);function w(t){e[32](t)}let k={class:"tModal",noClickaway:!0,$$slots:{default:[en]},$$scope:{ctx:e}};void 0!==e[15]&&(k.open=e[15]);m=new e[20]({props:k}),G.push((()=>he(m,"open",w)));let N=e[16]&&tn(e);return{c(){t=S("div"),ge(n.$$.fragment),i=C(),r&&r.c(),s=C(),a=S("input"),d=C(),y&&y.c(),u=C(),ge(m.$$.fragment),p=C(),N&&N.c(),$=L(),z(a,"class",c=x(e[7]||e[8])+" svelte-jox15l"),z(a,"id",e[5]),z(a,"name",e[5]),a.value=e[0],a.hidden=!0,A(t,"position","relative")},m(e,o){_(e,t,o),ve(n,t,null),I(t,i),~l&&v[l].m(t,null),I(t,s),I(t,a),I(t,d),y&&y.m(t,null),_(e,u,o),ve(m,e,o),_(e,p,o),N&&N.m(e,o),_(e,$,o),h=!0},p(e,o){const i={};4&o[0]&&(i.value=e[2]),2&o[0]&&(i.required=e[1]),8&o[0]&&(i.disabled=e[3]),n.$set(i);let d=l;l=b(e),l===d?~l&&v[l].p(e,o):(r&&(ce(),me(v[d],1,1,(()=>{v[d]=null})),de()),~l?(r=v[l],r?r.p(e,o):(r=v[l]=g[l](e),r.c()),ue(r,1),r.m(t,s)):r=null),(!h||384&o[0]&&c!==(c=x(e[7]||e[8])+" svelte-jox15l"))&&z(a,"class",c),(!h||32&o[0])&&z(a,"id",e[5]),(!h||32&o[0])&&z(a,"name",e[5]),(!h||1&o[0]&&a.value!==e[0])&&(a.value=e[0]),!e[3]||e[13]?y?(y.p(e,o),8200&o[0]&&ue(y,1)):(y=Ut(e),y.c(),ue(y,1),y.m(t,null)):y&&(ce(),me(y,1,1,(()=>{y=null})),de());const u={};57169&o[0]|2048&o[1]&&(u.$$scope={dirty:o,ctx:e}),!f&&32768&o[0]&&(f=!0,u.open=e[15],ne((()=>f=!1))),m.$set(u),e[16]?N?(N.p(e,o),65536&o[0]&&ue(N,1)):(N=tn(e),N.c(),ue(N,1),N.m($.parentNode,$)):N&&(ce(),me(N,1,1,(()=>{N=null})),de())},i(e){h||(ue(n.$$.fragment,e),ue(r),ue(y),ue(m.$$.fragment,e),ue(N),h=!0)},o(e){me(n.$$.fragment,e),me(r),me(y),me(m.$$.fragment,e),me(N),h=!1},d(e){e&&j(t),be(n),~l&&v[l].d(),y&&y.d(),e&&j(u),be(m,e),e&&j(p),N&&N.d(e),e&&j($)}}}(e);return{c(){i&&i.c(),t=L()},m(e,o){i&&i.m(e,o),_(e,t,o),n=!0},p(e,t){e[40]&&i.p(e,t)},i(e){n||(ue(i),n=!0)},o(e){me(i),n=!1},d(e){i&&i.d(e),e&&j(t)}}}function Ht(e){let t,n,o={ctx:e,current:null,token:null,hasCatch:!1,pending:Jt,then:Gt,catch:Yt,value:41,blocks:[,,,]};return fe(e[28](),o),{c(){t=L(),o.block.c()},m(e,i){_(e,t,i),o.block.m(e,o.anchor=i),o.mount=()=>t.parentNode,o.anchor=t,n=!0},p(t,n){pe(o,e=t,n)},i(e){n||(ue(o.block),n=!0)},o(e){for(let e=0;e<3;e+=1){me(o.blocks[e])}n=!1},d(e){e&&j(t),o.block.d(e),o.token=null,o=null}}}function Qt(e){let t,n,o,i,l;return n=new Pe({props:{size:"18"}}),{c(){t=S("span"),ge(n.$$.fragment),z(t,"class","feather pointer svelte-jox15l")},m(r,s){_(r,t,s),ve(n,t,null),o=!0,i||(l=[E(t,"click",e[24]()),E(t,"choose",e[25])],i=!0)},p:h,i(e){o||(ue(n.$$.fragment,e),o=!0)},o(e){me(n.$$.fragment,e),o=!1},d(e){e&&j(t),be(n),i=!1,b(l)}}}function Yt(e){return{c:h,m:h,p:h,i:h,o:h,d:h}}function Gt(e){let t,n,o,i;return o=new Ae({props:{size:"18"}}),{c(){t=S("span"),n=S("a"),ge(o.$$.fragment),z(n,"href",e[41]),z(n,"target","_blank"),z(t,"class","feather pointer svelte-jox15l")},m(e,l){_(e,t,l),I(t,n),ve(o,n,null),i=!0},p:h,i(e){i||(ue(o.$$.fragment,e),i=!0)},o(e){me(o.$$.fragment,e),i=!1},d(e){e&&j(t),be(o)}}}function Jt(e){return{c:h,m:h,p:h,i:h,o:h,d:h}}function Ut(e){let t,n,o,i,l;return n=new ze({props:{size:"18"}}),{c(){t=S("span"),ge(n.$$.fragment),z(t,"class","feather2 pointer svelte-jox15l")},m(r,s){_(r,t,s),ve(n,t,null),o=!0,i||(l=E(t,"click",e[27]),i=!0)},p:h,i(e){o||(ue(n.$$.fragment,e),o=!0)},o(e){me(n.$$.fragment,e),o=!1},d(e){e&&j(t),be(n),i=!1,l()}}}function Zt(e){let t,n,o,i;const l=[Xt,Kt],r=[];function s(e,t){return e[6].lookup||e[4]&&!e[6].constraint?0:1}return t=s(e),n=r[t]=l[t](e),{c(){n.c(),o=L()},m(e,n){r[t].m(e,n),_(e,o,n),i=!0},p(e,i){let a=t;t=s(e),t===a?r[t].p(e,i):(ce(),me(r[a],1,1,(()=>{r[a]=null})),de(),n=r[t],n?n.p(e,i):(n=r[t]=l[t](e),n.c()),ue(n,1),n.m(o.parentNode,o))},i(e){i||(ue(n),i=!0)},o(e){me(n),i=!1},d(e){r[t].d(e),e&&j(o)}}}function Kt(e){let t,n;return t=new It({props:{schema:e[14],recID:e[0],isOpening:e[15],filterForReady:"true",selectionFields:e[11],deList:e[12],praefix:e[10]}}),t.$on("choose",e[25]),t.$on("back",e[26]),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};16384&n[0]&&(o.schema=e[14]),1&n[0]&&(o.recID=e[0]),32768&n[0]&&(o.isOpening=e[15]),2048&n[0]&&(o.selectionFields=e[11]),4096&n[0]&&(o.deList=e[12]),1024&n[0]&&(o.praefix=e[10]),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Xt(e){let t,n;return t=new Vt({props:{item:e[6],className:e[14].class,classId:e[8],rowId:e[0],recordId:e[9],viewName:e[4],viewValue:""}}),t.$on("choose",e[25]),t.$on("back",e[26]),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};64&n[0]&&(o.item=e[6]),16384&n[0]&&(o.className=e[14].class),256&n[0]&&(o.classId=e[8]),1&n[0]&&(o.rowId=e[0]),512&n[0]&&(o.recordId=e[9]),16&n[0]&&(o.viewName=e[4]),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function en(e){let t,n,o=e[15]&&Zt(e);return{c(){o&&o.c(),t=L()},m(e,i){o&&o.m(e,i),_(e,t,i),n=!0},p(e,n){e[15]?o?(o.p(e,n),32768&n[0]&&ue(o,1)):(o=Zt(e),o.c(),ue(o,1),o.m(t.parentNode,t)):o&&(ce(),me(o,1,1,(()=>{o=null})),de())},i(e){n||(ue(o),n=!0)},o(e){me(o),n=!1},d(e){o&&o.d(e),e&&j(t)}}}function tn(e){let t,n,o;function i(t){e[33](t)}let l={class:"tModal",noClickaway:!0,$$slots:{default:[on]},$$scope:{ctx:e}};return void 0!==e[16]&&(l.open=e[16]),t=new e[20]({props:l}),G.push((()=>he(t,"open",i))),{c(){ge(t.$$.fragment)},m(e,n){ve(t,e,n),o=!0},p(e,o){const i={};147457&o[0]|2048&o[1]&&(i.$$scope={dirty:o,ctx:e}),!n&&65536&o[0]&&(n=!0,i.open=e[16],ne((()=>n=!1))),t.$set(i)},i(e){o||(ue(t.$$.fragment,e),o=!0)},o(e){me(t.$$.fragment,e),o=!1},d(e){be(t,e)}}}function nn(e){let t,n;return t=new zl({props:{schema:e[14],recID:e[0],readonly:!0}}),t.$on("back",e[26]),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};16384&n[0]&&(o.schema=e[14]),1&n[0]&&(o.recID=e[0]),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function on(e){let t,n;return t=new e[19]({props:{title:e[17],$$slots:{default:[nn]},$$scope:{ctx:e}}}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};131072&n[0]&&(o.title=e[17]),16385&n[0]|2048&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function ln(e){return{c:h,m:h,p:h,i:h,o:h,d:h}}function rn(e){let t,n,o={ctx:e,current:null,token:null,hasCatch:!1,pending:ln,then:Rt,catch:Wt,value:40,blocks:[,,,]};return fe(e[23](),o),{c(){t=L(),o.block.c()},m(e,i){_(e,t,i),o.block.m(e,o.anchor=i),o.mount=()=>t.parentNode,o.anchor=t,n=!0},p(t,n){pe(o,e=t,n)},i(e){n||(ue(o.block),n=!0)},o(e){for(let e=0;e<3;e+=1){me(o.blocks[e])}n=!1},d(e){e&&j(t),o.block.d(e),o.token=null,o=null}}}function sn(e,n,o){let i;const l=H(),{Dialog:r,Modal:s}=c;let{id:a}=n,{item:u}=n,{value:m=""}=n,{desc:f=""}=n,{noForm:p=!1}=n,{classId:h}=n,{eventId:g}=n,{recordId:v}=n,{required:b}=n,{disabled:y}=n,{readonly:w}=n,{praefix:x}=n,{selectionFields:I}=n,{formnovalidate:_}=n,{selection:j}=n,{deList:N}=n,{isTemplate:S}=n;const q="comment_"+a;let F,C,L,E,D=!1;w||=v&&u.asInput,y||=w,!j&&u.selection&&1===u.selection.split(":").length&&(j=u.selection);const{currentTasks:T}=d;k(e,T,(e=>o(34,i=e)));const z=e=>{e&&(o(2,f=$(L,e)),l("change",{value:m,description:f}),l("task",{row:e,eventId:L.id}))},O=()=>{o(15,D=!1),o(16,F=!1)};return e.$$set=e=>{"id"in e&&o(5,a=e.id),"item"in e&&o(6,u=e.item),"value"in e&&o(0,m=e.value),"desc"in e&&o(2,f=e.desc),"noForm"in e&&o(7,p=e.noForm),"classId"in e&&o(8,h=e.classId),"eventId"in e&&o(30,g=e.eventId),"recordId"in e&&o(9,v=e.recordId),"required"in e&&o(1,b=e.required),"disabled"in e&&o(3,y=e.disabled),"readonly"in e&&o(29,w=e.readonly),"praefix"in e&&o(10,x=e.praefix),"selectionFields"in e&&o(11,I=e.selectionFields),"formnovalidate"in e&&o(31,_=e.formnovalidate),"selection"in e&&o(4,j=e.selection),"deList"in e&&o(12,N=e.deList),"isTemplate"in e&&o(13,S=e.isTemplate)},e.$$.update=()=>{2&e.$$.dirty[0]|1&e.$$.dirty[1]&&o(1,b=b&&!_),16449&e.$$.dirty[0]&&m&&L&&Promise.resolve(ql(u.refClass,L.id,m)).then((e=>z(e))),16385&e.$$.dirty[0]&&!m&&L&&z({})},[m,b,f,y,j,a,u,p,h,v,x,I,N,S,L,D,F,C,E,r,s,q,T,async()=>{try{if(o(14,L=await t.getSchemaByClass(u.refClass)),o(18,E=(e=>!i?.length||!!i.find((t=>t===e)))(L.id)),g&&v&&m&&!y){const e=await t.getSchema(g);e.input?.find((e=>e===u.refClass))&&o(3,y=!0)}return o(17,C=L.identity.designation),!0}catch{return l("initFail",!0),!1}},e=>t=>{if("BUTTON"===t.explicitOriginalTarget?.nodeName){const t=document.getElementById(e);return t?.blur()}o(15,D=!0)},({detail:e})=>{o(0,m=e.row._id),O()},O,()=>{E&&(o(0,m=o(2,f="")),l("change",{value:m,description:f}),l("task",{row:{_task:{event:L.id,_id:!1}}}))},async()=>{if(!m)return;if(!e._task)return;const e=await ql(u.refClass,L.id,m),t=e._task._id;return`/task/${e._task.event}/${t}/task?view=standalone`},w,g,_,function(e){D=e,o(15,D)},function(e){F=e,o(16,F)}]}class an extends we{constructor(e){var t;super(),Pt.getElementById("svelte-jox15l-style")||((t=S("style")).id="svelte-jox15l-style",t.textContent=".feather.svelte-jox15l{position:absolute;top:0.75em;left:0.5em;color:#4300b0}.feather2.svelte-jox15l{position:absolute;top:0.75em;right:0.5em;color:#4300b0}.text-field textarea:invalid{border-bottom:1px #b80000 solid !important;background-color:#fbeeee !important}",I(Pt.head,t)),ye(this,e,sn,rn,w,{id:5,item:6,value:0,desc:2,noForm:7,classId:8,eventId:30,recordId:9,required:1,disabled:3,readonly:29,praefix:10,selectionFields:11,formnovalidate:31,selection:4,deList:12,isTemplate:13},[-1,-1])}}function cn(e){let t,n,o;return n=new e[7]({props:{lang:e[8].id,class:"left",type:"string",inputClass:"txt-right"+(e[1]?"":" "+e[2]),id:e[0],name:e[0],value:e[6],step:e[9],pattern:e[5],placeholder:e[10],readonly:e[11],disabled:e[3],required:e[4]}}),n.$on("change",e[12]),n.$on("focus",e[13]),{c(){t=S("div"),ge(n.$$.fragment),A(t,"position","relative"),A(t,"max-width","10em")},m(e,i){_(e,t,i),ve(n,t,null),o=!0},p(e,[t]){const o={};6&t&&(o.inputClass="txt-right"+(e[1]?"":" "+e[2])),1&t&&(o.id=e[0]),1&t&&(o.name=e[0]),64&t&&(o.value=e[6]),32&t&&(o.pattern=e[5]),8&t&&(o.disabled=e[3]),16&t&&(o.required=e[4]),n.$set(o)},i(e){o||(ue(n.$$.fragment,e),o=!0)},o(e){me(n.$$.fragment,e),o=!1},d(e){e&&j(t),be(n)}}}function dn(e,t,n){let o;const l=H(),{TextField:r}=c;let{id:s}=t,{item:a}=t,{value:d}=t,{noForm:u=!1}=t,{classId:m}=t,{disabled:f}=t,{formnovalidate:p}=t;const $=JSON.parse(i.getItem("Locale")),h=Number("1.1").toLocaleString($.id).substring(1,2),{properties:g={}}=a;let{min:v,max:b,step:y,pattern:w,decimals:k=0,unit:x="",placeholder:I,hint:_,readonly:j,negative:N,required:S=!1}=g;w||(w=k?`[0-9]+([${h}][0-9]{1,${k}})?`:"[0-9]*"),N&&(w="-?"+w);return e.$$set=e=>{"id"in e&&n(0,s=e.id),"item"in e&&n(14,a=e.item),"value"in e&&n(15,d=e.value),"noForm"in e&&n(1,u=e.noForm),"classId"in e&&n(2,m=e.classId),"disabled"in e&&n(3,f=e.disabled),"formnovalidate"in e&&n(16,p=e.formnovalidate)},e.$$.update=()=>{65552&e.$$.dirty&&n(4,S=S&&!p),32768&e.$$.dirty&&n(6,o=Number(d.toString().replace(h,".")).toFixed(k).toString().replace(".",h))},[s,u,m,f,S,w,o,r,$,y,I,j,({detail:e})=>l("blur",{value:e.value}),({detail:e})=>{j||Number(d.toString().replace(h,"."))||n(6,o="")},a,d,p]}class un extends we{constructor(e){super(),ye(this,e,dn,cn,w,{id:0,item:14,value:15,noForm:1,classId:2,disabled:3,formnovalidate:16})}}const{document:mn}=$e;function fn(e){e[32]=e[34].list,e[33]=e[34].items}function pn(e,t,n){const o=e.slice();return o[35]=t[n],o[37]=n,o}function $n(e,t,n){const o=e.slice();return o[38]=t[n],o[40]=n,o}function hn(e,t,n){const o=e.slice();return o[38]=t[n],o}function gn(e){return{c:h,m:h,p:h,i:h,o:h,d:h}}function vn(e){let t,n,o,i,l,r,s,a,c,d,u,m,f,p,$,h,g,v,b;fn(e),n=new e[8]({props:{outline:!0,$$slots:{default:[bn]},$$scope:{ctx:e}}}),n.$on("click",e[29]);let y=!e[1]&&yn(e);function w(t){e[30](t)}let k={id:e[11]};void 0!==e[2]&&(k.value=e[2]),s=new e[6]({props:k}),G.push((()=>he(s,"value",w))),s.$on("input",e[14]),u=new ze({props:{size:"18"}});let x=e[33]?.length&&function(e){let t,n,o,i,l=!e[1]&&kn(e),r=e[33],s=[];for(let t=0;t<r.length;t+=1)s[t]=xn(hn(e,r,t));return{c(){t=S("thead"),n=S("tr"),l&&l.c(),o=C();for(let e=0;e<s.length;e+=1)s[e].c();z(n,"class","svelte-1m010ne"),z(t,"class","svelte-1m010ne")},m(e,r){_(e,t,r),I(t,n),l&&l.m(n,null),I(n,o);for(let e=0;e<s.length;e+=1)s[e].m(n,null);i=!0},p(e,t){if(e[1]?l&&(ce(),me(l,1,1,(()=>{l=null})),de()):l?(l.p(e,t),2&t[0]&&ue(l,1)):(l=kn(e),l.c(),ue(l,1),l.m(n,o)),8192&t[0]){let o;for(r=e[33],o=0;o<r.length;o+=1){const i=hn(e,r,o);s[o]?s[o].p(i,t):(s[o]=xn(i),s[o].c(),s[o].m(n,null))}for(;o<s.length;o+=1)s[o].d(1);s.length=r.length}},i(e){i||(ue(l),i=!0)},o(e){me(l),i=!1},d(e){e&&j(t),l&&l.d(),N(s,e)}}}(e),q=e[32]?.length&&function(e){let t,n,o=e[32],i=[];for(let t=0;t<o.length;t+=1)i[t]=Sn(pn(e,o,t));const l=e=>me(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=L()},m(e,o){for(let t=0;t<i.length;t+=1)i[t].m(e,o);_(e,t,o),n=!0},p(e,n){if(569359&n[0]){let r;for(o=e[32],r=0;r<o.length;r+=1){const l=pn(e,o,r);i[r]?(i[r].p(l,n),ue(i[r],1)):(i[r]=Sn(l),i[r].c(),ue(i[r],1),i[r].m(t.parentNode,t))}for(ce(),r=o.length;r<i.length;r+=1)l(r);de()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)ue(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)me(i[e]);n=!1},d(e){N(i,e),e&&j(t)}}}(e);return{c(){t=S("div"),ge(n.$$.fragment),o=C(),y&&y.c(),i=C(),l=S("div"),r=F("Suchen: "),ge(s.$$.fragment),c=C(),d=S("span"),ge(u.$$.fragment),m=C(),f=S("div"),p=S("table"),x&&x.c(),$=C(),h=S("tbody"),q&&q.c(),z(t,"class","form--buttons svelte-1m010ne"),z(d,"class","feather pointer svelte-1m010ne"),A(l,"margin-bottom","1em"),A(l,"position","relative"),z(p,"striped",""),z(p,"class","svelte-1m010ne"),z(f,"class","eList svelte-1m010ne")},m(a,w){_(a,t,w),ve(n,t,null),I(t,o),y&&y.m(t,null),_(a,i,w),_(a,l,w),I(l,r),ve(s,l,null),I(l,c),I(l,d),ve(u,d,null),_(a,m,w),_(a,f,w),I(f,p),x&&x.m(p,null),I(p,$),I(p,h),q&&q.m(h,null),g=!0,v||(b=E(d,"click",e[16]),v=!0)},p(e,o){fn(e);const i={};4096&o[1]&&(i.$$scope={dirty:o,ctx:e}),n.$set(i),e[1]?y&&(ce(),me(y,1,1,(()=>{y=null})),de()):y?(y.p(e,o),2&o[0]&&ue(y,1)):(y=yn(e),y.c(),ue(y,1),y.m(t,null));const l={};!a&&4&o[0]&&(a=!0,l.value=e[2],ne((()=>a=!1))),s.$set(l),e[33]?.length&&x.p(e,o),e[32]?.length&&q.p(e,o)},i(e){g||(ue(n.$$.fragment,e),ue(y),ue(s.$$.fragment,e),ue(u.$$.fragment,e),ue(x),ue(q),g=!0)},o(e){me(n.$$.fragment,e),me(y),me(s.$$.fragment,e),me(u.$$.fragment,e),me(x),me(q),g=!1},d(e){e&&j(t),be(n),y&&y.d(),e&&j(i),e&&j(l),be(s),be(u),e&&j(m),e&&j(f),x&&x.d(),q&&q.d(),v=!1,b()}}}function bn(e){let t;return{c(){t=F("Abbrechen")},m(e,n){_(e,t,n)},d(e){e&&j(t)}}}function yn(e){let t,n;return t=new e[8]({props:{disabled:!e[32].length,filled:!0,$$slots:{default:[wn]},$$scope:{ctx:e}}}),t.$on("click",e[17](e[32])),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};4096&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function wn(e){let t;return{c(){t=F("Bestätigen")},m(e,n){_(e,t,n)},d(e){e&&j(t)}}}function kn(e){let t,n,o,i,l;return n=new Ne({props:{size:"20"}}),{c(){t=S("th"),ge(n.$$.fragment),z(t,"class","svelte-1m010ne")},m(r,s){_(r,t,s),ve(n,t,null),o=!0,i||(l=E(t,"click",e[18](e[32])),i=!0)},p(t,n){e=t},i(e){o||(ue(n.$$.fragment,e),o=!0)},o(e){me(n.$$.fragment,e),o=!1},d(e){e&&j(t),be(n),i=!1,l()}}}function xn(e){let t,n,o=e[38]+"";return{c(){t=S("th"),n=F(o),z(t,"class","svelte-1m010ne")},m(e,o){_(e,t,o),I(t,n)},p:h,d(e){e&&j(t)}}}function In(e){let t,n,o,i,l,r,s,a=e[0],c=jn(e),d=e[33],u=[];for(let t=0;t<d.length;t+=1)u[t]=Nn($n(e,d,t));return{c(){t=S("tr"),c.c(),n=C();for(let e=0;e<u.length;e+=1)u[e].c();o=C(),z(t,"style",i=e[1]?"cursor: default;":"cursor: zoom-in;"),z(t,"title","übernimmt den Wert direkt"),z(t,"class","svelte-1m010ne"),M(t,"active",e[0].includes(e[35]))},m(i,a){_(i,t,a),c.m(t,null),I(t,n);for(let e=0;e<u.length;e+=1)u[e].m(t,null);I(t,o),l=!0,r||(s=E(t,"click",e[19](e[35])),r=!0)},p(r,s){if(e=r,1&s[0]&&w(a,a=e[0])?(ce(),me(c,1,1,h),de(),c=jn(e),c.c(),ue(c),c.m(t,n)):c.p(e,s),8200&s[0]){let n;for(d=e[33],n=0;n<d.length;n+=1){const i=$n(e,d,n);u[n]?u[n].p(i,s):(u[n]=Nn(i),u[n].c(),u[n].m(t,o))}for(;n<u.length;n+=1)u[n].d(1);u.length=d.length}(!l||2&s[0]&&i!==(i=e[1]?"cursor: default;":"cursor: zoom-in;"))&&z(t,"style",i),8193&s[0]&&M(t,"active",e[0].includes(e[35]))},i(e){l||(ue(c),l=!0)},o(e){me(c),l=!1},d(e){e&&j(t),c.d(e),N(u,e),r=!1,s()}}}function _n(e){let t,n,o;return n=new e[10]({props:{name:e[12],data:e[37],checked:e[0].includes(e[35]),round:!0}}),{c(){t=S("td"),ge(n.$$.fragment),z(t,"title","Wählt den Wert aus"),z(t,"class","svelte-1m010ne")},m(e,i){_(e,t,i),ve(n,t,null),o=!0},p(e,t){const o={};1&t[0]&&(o.checked=e[0].includes(e[35])),n.$set(o)},i(e){o||(ue(n.$$.fragment,e),o=!0)},o(e){me(n.$$.fragment,e),o=!1},d(e){e&&j(t),be(n)}}}function jn(e){let t,n,o=!e[1]&&_n(e);return{c(){o&&o.c(),t=L()},m(e,i){o&&o.m(e,i),_(e,t,i),n=!0},p(e,n){e[1]?o&&(ce(),me(o,1,1,(()=>{o=null})),de()):o?(o.p(e,n),2&n[0]&&ue(o,1)):(o=_n(e),o.c(),ue(o,1),o.m(t.parentNode,t))},i(e){n||(ue(o),n=!0)},o(e){me(o),n=!1},d(e){o&&o.d(e),e&&j(t)}}}function Nn(e){let t,n,o=(e[3][e[37]]?e[3][e[37]][e[40]]:e[35])+"";return{c(){t=S("td"),n=F(o),z(t,"class","svelte-1m010ne")},m(e,o){_(e,t,o),I(t,n)},p(e,t){8&t[0]&&o!==(o=(e[3][e[37]]?e[3][e[37]][e[40]]:e[35])+"")&&O(n,o)},d(e){e&&j(t)}}}function Sn(e){let t,n,o=e[15](e[35],e[2]),i=o&&In(e);return{c(){i&&i.c(),t=L()},m(e,o){i&&i.m(e,o),_(e,t,o),n=!0},p(e,n){4&n[0]&&(o=e[15](e[35],e[2])),o?i?(i.p(e,n),4&n[0]&&ue(i,1)):(i=In(e),i.c(),ue(i,1),i.m(t.parentNode,t)):i&&(ce(),me(i,1,1,(()=>{i=null})),de())},i(e){n||(ue(i),n=!0)},o(e){me(i),n=!1},d(e){i&&i.d(e),e&&j(t)}}}function qn(e){let t,n;return t=new e[5]({}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p:h,i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Fn(e){let t,n,o,i;t=new e[9]({});let l={ctx:e,current:null,token:null,hasCatch:!1,pending:qn,then:vn,catch:gn,value:34,blocks:[,,,]};return fe(e[13](),l),{c(){ge(t.$$.fragment),n=C(),o=L(),l.block.c()},m(e,r){ve(t,e,r),_(e,n,r),_(e,o,r),l.block.m(e,l.anchor=r),l.mount=()=>o.parentNode,l.anchor=o,i=!0},p(t,n){pe(l,e=t,n)},i(e){i||(ue(t.$$.fragment,e),ue(l.block),i=!0)},o(e){me(t.$$.fragment,e);for(let e=0;e<3;e+=1){me(l.blocks[e])}i=!1},d(e){be(t,e),e&&j(n),e&&j(o),l.block.d(e),l.token=null,l=null}}}function Cn(e){let t,n;return t=new e[7]({props:{title:"Auswahl",class:"eList",$$slots:{default:[Fn]},$$scope:{ctx:e}}}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};15&n[0]|4096&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Ln(e,n,o){const i=H(),{Loading:l,TextField:r,Dialog:s,Button:a,Divider:d,Checkbox:u}=c;let{classId:m}=n,{id:f}=n,{selection:p}=n,{tableName:$}=n,{idName:h}=n,{target:g}=n,{view:v}=n,{unique:b}=n,{uniqueView:y}=n,{status:w}=n,{single:k}=n;p||=[];let x="",I=m+Math.floor(9e3*Math.random()+1e3).toString()+"search",_=[];const j=$+h+g+"checkbox",N=(e,t)=>e>t?1:t>e?-1:0;return e.$$set=e=>{"classId"in e&&o(20,m=e.classId),"id"in e&&o(21,f=e.id),"selection"in e&&o(0,p=e.selection),"tableName"in e&&o(22,$=e.tableName),"idName"in e&&o(23,h=e.idName),"target"in e&&o(24,g=e.target),"view"in e&&o(25,v=e.view),"unique"in e&&o(26,b=e.unique),"uniqueView"in e&&o(27,y=e.uniqueView),"status"in e&&o(28,w=e.status),"single"in e&&o(1,k=e.single)},[p,k,x,_,i,l,r,s,a,d,u,I,j,async()=>{let e,n=[],i=[];if(o(3,_=[]),h)if(v){const o=m.split("-")[1].slice(0,-4),i="input."+m+"[name='_id']",l=document.querySelector(i).value;e={[h]:f},w&&(e.$or=[{status:!0},{[o]:l}]),n=await t.getSectionView($,e),n=n.sort(((e,t)=>{const n=e=>(e[o]||"z").toString()+e[g];return N(n(e),n(t))}))}else y?(e={[h]:f,status:!0},Object.entries(y).map((([t,n])=>{n?.length&&(e[t]={$in:n}),i.push(t)})),n=await t.getSectionView($,e),n=n.sort(((e,t)=>{const n=e=>(p.includes(e[g])?"0-":"1-")+e[g];return N(n(e),n(t))})),o(3,_=n.map((e=>{const t=[e[g]];return i.map((n=>t.push(e[n]))),t})))):b?(n=await t.getSection($,h,f,b),n=n.sort(((e,t)=>N(e,t)))):(n=await t.getSection($,h,f),n=n.sort(((e,t)=>{const n=e=>(p.includes(e[g])?"0-":"1-")+e[g];return N(n(e),n(t))})));else e={_id:f},f&&(n=await t.getSectionView($,e));const l=[];n.map((e=>{let t=e[g];if(Array.isArray(t))for(const e of t){let t=e;"string"!=typeof e&&(t=Array.from(Object.values(e)).filter((e=>!!e&&24!==e?.length)).join(", ")),l.push(t||[])}else l.push(t||[])}));const r=await t.getSchemaByClass($),s=r.items.find((e=>e.name===g))?.designation;return i=i.map((e=>r.items.find((t=>t.name===e))?.designation)),{list:l.flat(),items:[s,...i]}},({detail:{value:e}})=>{o(2,x=e)},(e,t)=>!t||!!e.toLowerCase().includes(t.toLowerCase()),()=>{o(2,x="")},e=>()=>{const t=document.getElementsByName(j),n=[];t.forEach(((t,o)=>{t.checked&&n.push(e[+t.attributes.data.value])})),i("choose",{list:n})},e=>()=>{document.getElementsByName(j).forEach(((e,t)=>{e.checked=!e.checked}))},e=>t=>{"TD"===t.target?.nodeName&&(k?i("choose",{list:[].concat(e)}):(o(0,p=p.includes(e)?p.filter((t=>t!==e)):p.concat(e)),i("choose",{list:p})))},m,f,$,h,g,v,b,y,w,()=>i("back"),function(e){x=e,o(2,x)}]}class En extends we{constructor(e){var t;super(),mn.getElementById("svelte-1m010ne-style")||((t=S("style")).id="svelte-1m010ne-style",t.textContent=".feather.svelte-1m010ne.svelte-1m010ne{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-1m010ne.svelte-1m010ne{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-1m010ne table.svelte-1m010ne{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-1m010ne table thead.svelte-1m010ne{position:sticky;top:0;background:#326173;color:white}.eList.svelte-1m010ne table tbody tr.svelte-1m010ne{height:2.3em}th.svelte-1m010ne.svelte-1m010ne,td.svelte-1m010ne.svelte-1m010ne{padding-left:0.4em;padding-right:0.4em}tr.active.svelte-1m010ne.svelte-1m010ne{color:#326173;background-color:#fcebd5}.dialog.eList{max-height:90vh}.checkbox.round > .selector{border-color:#326173 !important}.form--buttons.svelte-1m010ne.svelte-1m010ne{display:flex;gap:1em;padding:0.5em 0}",I(mn.head,t)),ye(this,e,Ln,Cn,w,{classId:20,id:21,selection:0,tableName:22,idName:23,target:24,view:25,unique:26,uniqueView:27,status:28,single:1},[-1,-1])}}const{document:Dn}=$e;function Tn(e){let t,n,o,i,l,r=e[7].length+"";return{c(){t=S("span"),n=F("("),o=F(r),i=F(")"),z(t,"class",l=x(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")},m(e,l){_(e,t,l),I(t,n),I(t,o),I(t,i)},p(e,n){128&n[0]&&r!==(r=e[7].length+"")&&O(o,r),2&n[0]&&l!==(l=x(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")&&z(t,"class",l)},d(e){e&&j(t)}}}function zn(e){let t;return{c(){t=S("div"),z(t,"class","load-more-options"),z(t,"slot","load-more-options-message slot")},m(e,n){_(e,t,n)},d(e){e&&j(t)}}}function On(e){let t,n,o,i;const l=[Mn,An,Bn],r=[];function s(e,t){return!e[16].single&&e[7].length?0:e[17]?1:e[14]&&e[16].view&&e[16].maxItem?2:-1}return~(t=s(e))&&(n=r[t]=l[t](e)),{c(){n&&n.c(),o=L()},m(e,n){~t&&r[t].m(e,n),_(e,o,n),i=!0},p(e,i){let a=t;t=s(e),t===a?~t&&r[t].p(e,i):(n&&(ce(),me(r[a],1,1,(()=>{r[a]=null})),de()),~t?(n=r[t],n?n.p(e,i):(n=r[t]=l[t](e),n.c()),ue(n,1),n.m(o.parentNode,o)):n=null)},i(e){i||(ue(n),i=!0)},o(e){me(n),i=!1},d(e){~t&&r[t].d(e),e&&j(o)}}}function Bn(e){let t,n,o,i,l;return n=new Ie({props:{size:"18"}}),{c(){t=S("span"),ge(n.$$.fragment),z(t,"title","Übernehmen"),z(t,"class","feather pointer svelte-1rbaejz")},m(r,s){_(r,t,s),ve(n,t,null),o=!0,i||(l=E(t,"click",e[25]),i=!0)},p:h,i(e){o||(ue(n.$$.fragment,e),o=!0)},o(e){me(n.$$.fragment,e),o=!1},d(e){e&&j(t),be(n),i=!1,l()}}}function An(e){let t,n,o,i,l;return n=new Fe({props:{size:"18"}}),{c(){t=S("span"),ge(n.$$.fragment),z(t,"title",e[17].title||"Generieren"),z(t,"class","feather pointer svelte-1rbaejz")},m(r,s){_(r,t,s),ve(n,t,null),o=!0,i||(l=E(t,"click",e[24]),i=!0)},p:h,i(e){o||(ue(n.$$.fragment,e),o=!0)},o(e){me(n.$$.fragment,e),o=!1},d(e){e&&j(t),be(n),i=!1,l()}}}function Mn(e){let t,n,o,i,l;return n=new ze({props:{size:"18"}}),{c(){t=S("span"),ge(n.$$.fragment),z(t,"title","Löschen"),z(t,"class","feather pointer svelte-1rbaejz")},m(r,s){_(r,t,s),ve(n,t,null),o=!0,i||(l=E(t,"click",e[26]),i=!0)},p:h,i(e){o||(ue(n.$$.fragment,e),o=!0)},o(e){me(n.$$.fragment,e),o=!1},d(e){e&&j(t),be(n),i=!1,l()}}}function Vn(e){let t,n,o;function i(t){e[35](t)}let l={class:"tModal",noClickaway:!0,$$slots:{default:[Pn]},$$scope:{ctx:e}};return void 0!==e[10]&&(l.open=e[10]),t=new e[11]({props:l}),G.push((()=>he(t,"open",i))),{c(){ge(t.$$.fragment)},m(e,n){ve(t,e,n),o=!0},p(e,o){const i={};53&o[0]|4096&o[1]&&(i.$$scope={dirty:o,ctx:e}),!n&&1024&o[0]&&(n=!0,i.open=e[10],ne((()=>n=!1))),t.$set(i)},i(e){o||(ue(t.$$.fragment,e),o=!0)},o(e){me(t.$$.fragment,e),o=!1},d(e){be(t,e)}}}function Pn(e){let t,n;return t=new En({props:{classId:e[2],selection:e[0],view:e[15],status:e[18],unique:e[16].unique&&e[4].name,uniqueView:e[16].view&&{[e[16].view]:e[5][e[16].view]},id:e[5][e[20]||e[19]],tableName:e[19],idName:e[20],target:e[4].name,single:e[16].single}}),t.$on("choose",e[23]),t.$on("back",e[22]),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};4&n[0]&&(o.classId=e[2]),1&n[0]&&(o.selection=e[0]),16&n[0]&&(o.unique=e[16].unique&&e[4].name),32&n[0]&&(o.uniqueView=e[16].view&&{[e[16].view]:e[5][e[16].view]}),32&n[0]&&(o.id=e[5][e[20]||e[19]]),16&n[0]&&(o.target=e[4].name),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Wn(e){let t,n,o,i,l,r,s,a,c,d=!e[16].single&&e[7].length&&Tn(e);function u(t){e[33](t)}function m(t){e[34](t)}let f={id:e[3],name:e[3],class:e[3],readonly:e[13],disabled:e[1],required:e[6],placeholder:e[8],getOptions:Rn,minSearchLength:"3",$$slots:{"load-more-options-message slot":[zn]},$$scope:{ctx:e}};void 0!==e[7]&&(f.selection=e[7]),void 0!==e[9]&&(f.maxOptions=e[9]),o=new e[12]({props:f}),G.push((()=>he(o,"selection",u))),G.push((()=>he(o,"maxOptions",m))),o.$on("change",e[21]);let p=!e[1]&&On(e),$=e[10]&&Vn(e);return{c(){t=S("div"),d&&d.c(),n=C(),ge(o.$$.fragment),r=C(),p&&p.c(),s=C(),$&&$.c(),a=L(),A(t,"position","relative")},m(e,i){_(e,t,i),d&&d.m(t,null),I(t,n),ve(o,t,null),I(t,r),p&&p.m(t,null),_(e,s,i),$&&$.m(e,i),_(e,a,i),c=!0},p(e,r){!e[16].single&&e[7].length?d?d.p(e,r):(d=Tn(e),d.c(),d.m(t,n)):d&&(d.d(1),d=null);const s={};8&r[0]&&(s.id=e[3]),8&r[0]&&(s.name=e[3]),8&r[0]&&(s.class=e[3]),2&r[0]&&(s.disabled=e[1]),64&r[0]&&(s.required=e[6]),256&r[0]&&(s.placeholder=e[8]),4096&r[1]&&(s.$$scope={dirty:r,ctx:e}),!i&&128&r[0]&&(i=!0,s.selection=e[7],ne((()=>i=!1))),!l&&512&r[0]&&(l=!0,s.maxOptions=e[9],ne((()=>l=!1))),o.$set(s),e[1]?p&&(ce(),me(p,1,1,(()=>{p=null})),de()):p?(p.p(e,r),2&r[0]&&ue(p,1)):(p=On(e),p.c(),ue(p,1),p.m(t,null)),e[10]?$?($.p(e,r),1024&r[0]&&ue($,1)):($=Vn(e),$.c(),ue($,1),$.m(a.parentNode,a)):$&&(ce(),me($,1,1,(()=>{$=null})),de())},i(e){c||(ue(o.$$.fragment,e),ue(p),ue($),c=!0)},o(e){me(o.$$.fragment,e),me(p),me($),c=!1},d(e){e&&j(t),d&&d.d(),be(o),p&&p.d(),e&&j(s),$&&$.d(e),e&&j(a)}}}async function*Rn(e){yield[{name:e}]}function Hn(e,n,o){const i=H(),{Modal:l,Autocomplete:r}=c;let{classId:s}=n,{id:a}=n,{item:d}=n,{record:u}=n,{value:m}=n,{noForm:f=!1}=n,{disabled:p}=n,{formnovalidate:$}=n,{numberInput:h}=n,{praefix:g}=n,{toDelete:v}=n,{reqQuantity:b}=n;const{properties:y={}}=d;let{placeholder:w,hint:k,readonly:x,required:I=!1,lookup:_="",view:j=!1,multi:N,max:S=1e3,generate:q=!1,status:F=!0}=y;const[C,L]=_.split(":");let E=!1,D=m.map&&m.map((e=>({name:e})))||[];p||=x,p&&(w="");R((async()=>{const e=document.getElementById(a);e.classList.add(s),!x&&_&&e.addEventListener("focus",T)}));const T=()=>{if(_){document.getElementById(a).blur();const e=b||S;(N.unique||D.length<e)&&o(10,E=!0)}},z=()=>{o(10,E&&=!1)},O=({detail:e})=>{o(7,D=e.list.map((e=>({name:e})))),i("blur",{value:e.list}),i("multi",{view:N.view,lookup:_,name:d.name,value:e.list}),z()},B=async()=>{const e={[L]:u[L]},n=await t.getSectionView(C,e),o=Array.from({length:n.length},((e,t)=>n[t][d.name]));O({detail:{list:o}})},A=(e=!1)=>{if(p||!N.required)return;const t=N.maxItem;if(!t||N.unique)return;o(9,S=!1!==e?e:b||u[t]||0);const n=D.length!=S,l=document.getElementById(a);l?.classList?.toggle("invalid",n),i("invalid",{idx:g,value:n})};return e.$$set=e=>{"classId"in e&&o(2,s=e.classId),"id"in e&&o(3,a=e.id),"item"in e&&o(4,d=e.item),"record"in e&&o(5,u=e.record),"value"in e&&o(0,m=e.value),"noForm"in e&&o(27,f=e.noForm),"disabled"in e&&o(1,p=e.disabled),"formnovalidate"in e&&o(28,$=e.formnovalidate),"numberInput"in e&&o(29,h=e.numberInput),"praefix"in e&&o(30,g=e.praefix),"toDelete"in e&&o(31,v=e.toDelete),"reqQuantity"in e&&o(32,b=e.reqQuantity)},e.$$.update=()=>{16&e.$$.dirty[0]|1&e.$$.dirty[1]&&v&&v===d.name&&o(7,D=[]),128&e.$$.dirty[0]&&D&&(o(0,m=D.map&&D.map((e=>e.name))||[]),A()),536870912&e.$$.dirty[0]&&((e={})=>{const{item:t,value:n,idx:o}=e;void 0!==g&&g!==o||t&&t.name===N.maxItem&&A(n)})(h),268435520&e.$$.dirty[0]&&o(6,I=I&&!$)},[m,p,s,a,d,u,I,D,w,S,E,l,r,x,_,j,N,q,F,C,L,({detail:e})=>{let t=[];e.value.map((e=>{const n=e.name?.split(",");t=t.concat(n)})),o(7,D=t.map((e=>({name:e.trim()})))),i("blur",{value:D.map((e=>e.name))}),i("multi",{view:N.view,lookup:_,value:D.map((e=>e.name))})},z,O,()=>{const e=u[q.itemQuantity]||b;if(!e)return;const t=q.prefix||"",n=u[q.variable]||"",o=q.len||5,i=Array.from({length:e},((e,i)=>t+n+"-"+i.toString().padStart(o,"0")));O({detail:{list:i}})},async()=>{if(!0===j)return B();const e=b||u[N.maxItem];if(!e)return;const n={[L]:u[L],status:!0},o=[].concat(u[N.view]||[]);o.length&&(n[N.view]={$in:o});const i=await t.getSectionView(C,n),l=Array.from({length:e<i.length?e:i.length},((e,t)=>i[t][d.name]));O({detail:{list:l}})},()=>{O({detail:{list:[]}})},f,$,h,g,v,b,function(e){D=e,o(7,D),o(31,v),o(4,d)},function(e){S=e,o(9,S)},function(e){E=e,o(10,E)}]}class Qn extends we{constructor(e){var t;super(),Dn.getElementById("svelte-1rbaejz-style")||((t=S("style")).id="svelte-1rbaejz-style",t.textContent=".feather.svelte-1rbaejz{position:absolute;top:1em;right:0.5em;color:#4300b0}.showNumber.svelte-1rbaejz{position:absolute;display:inline-block;width:3.5em;text-align:right;top:1em;left:-4em;color:#4300b0}.showNumber.disabled.svelte-1rbaejz{color:#888 !important}.autocomplete .notice,.autocomplete .load-more-options,.autocomplete .show-on-focus,.autocomplete.disabled .chip button.btn,.autocomplete.disabled .chip+.autocomplete-field input{display:none}.autocomplete-field input.invalid{border:1px red solid !important}.autocomplete.disabled .chip{height:2.25em !important;padding-right:0.75em !important}",I(Dn.head,t)),ye(this,e,Hn,Wn,w,{classId:2,id:3,item:4,record:5,value:0,noForm:27,disabled:1,formnovalidate:28,numberInput:29,praefix:30,toDelete:31,reqQuantity:32},[-1,-1])}}const{document:Yn}=$e;function Gn(e){e[26]=e[28].list,e[27]=e[28].items}function Jn(e,t,n){const o=e.slice();return o[29]=t[n],o}function Un(e,t,n){const o=e.slice();return o[32]=t[n],o}function Zn(e,t,n){const o=e.slice();return o[32]=t[n],o}function Kn(e){return{c:h,m:h,p:h,i:h,o:h,d:h}}function Xn(e){let t,n,o,i,l,r,s,a,c,d,u,m,f,p,$,h,g,v;function b(t){e[23](t)}Gn(e),n=new e[7]({props:{outline:!0,$$slots:{default:[eo]},$$scope:{ctx:e}}}),n.$on("click",e[22]);let y={id:e[8]};void 0!==e[1]&&(y.value=e[1]),r=new e[6]({props:y}),G.push((()=>he(r,"value",b))),r.$on("input",e[12]),d=new ze({props:{size:"18"}});let w=e[27]?.length&&function(e){let t,n,o=e[27],i=[];for(let t=0;t<o.length;t+=1)i[t]=to(Zn(e,o,t));return{c(){t=S("thead"),n=S("tr");for(let e=0;e<i.length;e+=1)i[e].c();z(n,"class","svelte-14hcfjl"),z(t,"class","svelte-14hcfjl")},m(e,o){_(e,t,o),I(t,n);for(let e=0;e<i.length;e+=1)i[e].m(n,null)},p(e,t){if(2048&t[0]){let l;for(o=e[27],l=0;l<o.length;l+=1){const r=Zn(e,o,l);i[l]?i[l].p(r,t):(i[l]=to(r),i[l].c(),i[l].m(n,null))}for(;l<i.length;l+=1)i[l].d(1);i.length=o.length}},d(e){e&&j(t),N(i,e)}}}(e),k=e[26]?.length&&function(e){let t,n=e[26],o=[];for(let t=0;t<n.length;t+=1)o[t]=io(Jn(e,n,t));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=L()},m(e,n){for(let t=0;t<o.length;t+=1)o[t].m(e,n);_(e,t,n)},p(e,i){if(11779&i[0]){let l;for(n=e[26],l=0;l<n.length;l+=1){const r=Jn(e,n,l);o[l]?o[l].p(r,i):(o[l]=io(r),o[l].c(),o[l].m(t.parentNode,t))}for(;l<o.length;l+=1)o[l].d(1);o.length=n.length}},d(e){N(o,e),e&&j(t)}}}(e);return{c(){t=S("div"),ge(n.$$.fragment),o=C(),i=S("div"),l=F("Suchen: "),ge(r.$$.fragment),a=C(),c=S("span"),ge(d.$$.fragment),u=C(),m=S("div"),f=S("table"),w&&w.c(),p=C(),$=S("tbody"),k&&k.c(),z(t,"class","form--buttons svelte-14hcfjl"),z(c,"class","feather pointer svelte-14hcfjl"),A(i,"margin-bottom","1em"),A(i,"position","relative"),z(f,"striped",""),z(f,"class","svelte-14hcfjl"),z(m,"class","eList svelte-14hcfjl")},m(s,b){_(s,t,b),ve(n,t,null),_(s,o,b),_(s,i,b),I(i,l),ve(r,i,null),I(i,a),I(i,c),ve(d,c,null),_(s,u,b),_(s,m,b),I(m,f),w&&w.m(f,null),I(f,p),I(f,$),k&&k.m($,null),h=!0,g||(v=E(c,"click",e[14]),g=!0)},p(e,t){Gn(e);const o={};64&t[1]&&(o.$$scope={dirty:t,ctx:e}),n.$set(o);const i={};!s&&2&t[0]&&(s=!0,i.value=e[1],ne((()=>s=!1))),r.$set(i),e[27]?.length&&w.p(e,t),e[26]?.length&&k.p(e,t)},i(e){h||(ue(n.$$.fragment,e),ue(r.$$.fragment,e),ue(d.$$.fragment,e),h=!0)},o(e){me(n.$$.fragment,e),me(r.$$.fragment,e),me(d.$$.fragment,e),h=!1},d(e){e&&j(t),be(n),e&&j(o),e&&j(i),be(r),be(d),e&&j(u),e&&j(m),w&&w.d(),k&&k.d(),g=!1,v()}}}function eo(e){let t;return{c(){t=F("Abbrechen")},m(e,n){_(e,t,n)},d(e){e&&j(t)}}}function to(e){let t,n,o=e[32]?.designation+"";return{c(){t=S("th"),n=F(o),z(t,"class","svelte-14hcfjl")},m(e,o){_(e,t,o),I(t,n)},p:h,d(e){e&&j(t)}}}function no(e){let t,n,o=e[27],i=[];for(let t=0;t<o.length;t+=1)i[t]=oo(Un(e,o,t));return{c(){t=S("tr");for(let e=0;e<i.length;e+=1)i[e].c();n=C(),z(t,"class","pointer svelte-14hcfjl"),M(t,"active",e[29]._id===e[0])},m(e,o){_(e,t,o);for(let e=0;e<i.length;e+=1)i[e].m(t,null);I(t,n)},p(e,l){if(3584&l[0]){let r;for(o=e[27],r=0;r<o.length;r+=1){const s=Un(e,o,r);i[r]?i[r].p(s,l):(i[r]=oo(s),i[r].c(),i[r].m(t,n))}for(;r<i.length;r+=1)i[r].d(1);i.length=o.length}2049&l[0]&&M(t,"active",e[29]._id===e[0])},d(e){e&&j(t),N(i,e)}}}function oo(e){let t,n,o,i,l=e[9](e[29],e[32])+"";return{c(){t=S("td"),n=F(l),z(t,"class","svelte-14hcfjl")},m(l,r){_(l,t,r),I(t,n),o||(i=E(t,"click",T(e[10](e[29]))),o=!0)},p(t,n){e=t},d(e){e&&j(t),o=!1,i()}}}function io(e){let t,n=e[13](e[29],e[27],e[1]),o=n&&no(e);return{c(){o&&o.c(),t=L()},m(e,n){o&&o.m(e,n),_(e,t,n)},p(e,i){2&i[0]&&(n=e[13](e[29],e[27],e[1])),n?o?o.p(e,i):(o=no(e),o.c(),o.m(t.parentNode,t)):o&&(o.d(1),o=null)},d(e){o&&o.d(e),e&&j(t)}}}function lo(e){let t,n;return t=new e[5]({}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p:h,i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function ro(e){let t,n,o,i;t=new e[4]({});let l={ctx:e,current:null,token:null,hasCatch:!1,pending:lo,then:Xn,catch:Kn,value:28,blocks:[,,,]};return fe(e[11](),l),{c(){ge(t.$$.fragment),n=C(),o=L(),l.block.c()},m(e,r){ve(t,e,r),_(e,n,r),_(e,o,r),l.block.m(e,l.anchor=r),l.mount=()=>o.parentNode,l.anchor=o,i=!0},p(t,n){pe(l,e=t,n)},i(e){i||(ue(t.$$.fragment,e),ue(l.block),i=!0)},o(e){me(t.$$.fragment,e);for(let e=0;e<3;e+=1){me(l.blocks[e])}i=!1},d(e){be(t,e),e&&j(n),e&&j(o),l.block.d(e),l.token=null,l=null}}}function so(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[ro]},$$scope:{ctx:e}}}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};3&n[0]|64&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function ao(e,o,i){const l=H(),{Dialog:r,Divider:s,Loading:a,TextField:d,Button:u}=c;let{item:f}=o,{className:$}=o,{classId:h}=o,{rowId:g}=o,{viewName:v}=o,{viewValue:b}=o,{recordId:y}=o,{filter:w}=o,k="",x=h+Math.floor(9e3*Math.random()+1e3).toString()+"search";const I=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?p(n):m(e[`_${t.name}`]||e[t.name]||"")},_=t.getSchemaByClass($);R((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(x)?.focus()}),200)})),n.subscribe((async e=>{if(!e)return;const t=await _;e.eventId===t.id&&El(t.class,e.eventId)}));return e.$$set=e=>{"item"in e&&i(15,f=e.item),"className"in e&&i(16,$=e.className),"classId"in e&&i(17,h=e.classId),"rowId"in e&&i(0,g=e.rowId),"viewName"in e&&i(18,v=e.viewName),"viewValue"in e&&i(19,b=e.viewValue),"recordId"in e&&i(20,y=e.recordId),"filter"in e&&i(21,w=e.filter)},[g,k,l,r,s,a,d,u,x,I,e=>()=>l("choose",{row:e}),async()=>{const e=await _,n="."+h+"#"+v;document.querySelector(n);let o={[v]:b},i=[];o[v]&&(i=await t.getSectionView(e.class,o,!0)),w&&(i=i.filter((e=>e._id!=w)));let l=[],r=e.display;return r&&r.length?r.map((t=>{const[n,o]=t.split(".");let r=e.list?.find((e=>e.name===n))?.item.find((e=>e.name===o));r&&(r={...r},r.name=`${n}_${o}`,i=i.map((e=>(e[n]&&(e[r.name]=e[n][o]),e)))),r||(r=e.items.find((e=>e.name===n))),l.find((e=>e?.name===n))||l.push(r)})):l=e.items,{list:i,items:l}},({detail:{value:e}})=>{i(1,k=e)},(e,t,n)=>{if(!n)return!0;for(const o of t)if(I(e,o)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{i(1,k="")},f,$,h,v,b,y,w,()=>l("back"),function(e){k=e,i(1,k)}]}class co extends we{constructor(e){var t;super(),Yn.getElementById("svelte-14hcfjl-style")||((t=S("style")).id="svelte-14hcfjl-style",t.textContent=".feather.svelte-14hcfjl.svelte-14hcfjl{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-14hcfjl.svelte-14hcfjl{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-14hcfjl table.svelte-14hcfjl{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-14hcfjl table thead.svelte-14hcfjl{position:sticky;top:0;background:#326173;color:white}.eList.svelte-14hcfjl table tbody tr.svelte-14hcfjl{height:2.3em}th.svelte-14hcfjl.svelte-14hcfjl,td.svelte-14hcfjl.svelte-14hcfjl{padding-left:0.4em;padding-right:0.4em}tr.pointer.svelte-14hcfjl.svelte-14hcfjl:hover{background-color:#DAE1E5}tr.active.svelte-14hcfjl.svelte-14hcfjl{color:#326173;background-color:#fcebd5}.form--buttons.svelte-14hcfjl.svelte-14hcfjl{display:flex;gap:1em;padding:0.5em 0}",I(Yn.head,t)),ye(this,e,ao,so,w,{item:15,className:16,classId:17,rowId:0,viewName:18,viewValue:19,recordId:20,filter:21},[-1,-1])}}function uo(e){return{c:h,m:h,p:h,i:h,o:h,d:h}}function mo(e){let t,n,o,i,l;function r(t){e[21](t)}let s={id:e[2],name:e[3].name,inputClass:e[5]||e[1],disabled:e[6],formnovalidate:e[7],readonly:e[13],pattern:e[12],required:e[14],style:"padding-left:2em;"};void 0!==e[0]&&(s.value=e[0]),n=new e[10]({props:s}),G.push((()=>he(n,"value",r)));let a=!e[6]&&fo(e);return{c(){t=S("div"),ge(n.$$.fragment),i=C(),a&&a.c(),A(t,"position","relative")},m(e,o){_(e,t,o),ve(n,t,null),I(t,i),a&&a.m(t,null),l=!0},p(e,i){const l={};4&i&&(l.id=e[2]),8&i&&(l.name=e[3].name),34&i&&(l.inputClass=e[5]||e[1]),64&i&&(l.disabled=e[6]),128&i&&(l.formnovalidate=e[7]),!o&&1&i&&(o=!0,l.value=e[0],ne((()=>o=!1))),n.$set(l),e[6]?a&&(ce(),me(a,1,1,(()=>{a=null})),de()):a?(a.p(e,i),64&i&&ue(a,1)):(a=fo(e),a.c(),ue(a,1),a.m(t,null))},i(e){l||(ue(n.$$.fragment,e),ue(a),l=!0)},o(e){me(n.$$.fragment,e),me(a),l=!1},d(e){e&&j(t),be(n),a&&a.d()}}}function fo(e){let t,n,o,i,l;return n=new Pe({props:{size:"18"}}),{c(){t=S("span"),ge(n.$$.fragment),z(t,"class","feather pointer svelte-wbrqzu")},m(r,s){_(r,t,s),ve(n,t,null),o=!0,i||(l=E(t,"click",e[17]),i=!0)},p:h,i(e){o||(ue(n.$$.fragment,e),o=!0)},o(e){me(n.$$.fragment,e),o=!1},d(e){e&&j(t),be(n),i=!1,l()}}}function po(e){return{c:h,m:h,p:h,i:h,o:h,d:h}}function $o(e){let t,n,o;function i(t){e[22](t)}let l={class:"tModal",noClickaway:!0,$$slots:{default:[ho]},$$scope:{ctx:e}};return void 0!==e[8]&&(l.open=e[8]),t=new e[11]({props:l}),G.push((()=>he(t,"open",i))),{c(){ge(t.$$.fragment)},m(e,n){ve(t,e,n),o=!0},p(e,o){const i={};268435994&o&&(i.$$scope={dirty:o,ctx:e}),!n&&256&o&&(n=!0,i.open=e[8],ne((()=>n=!1))),t.$set(i)},i(e){o||(ue(t.$$.fragment,e),o=!0)},o(e){me(t.$$.fragment,e),o=!1},d(e){be(t,e)}}}function ho(e){let t,n;return t=new co({props:{item:e[3],className:e[3].refClass,classId:e[1],rowId:"",recordId:e[4]._id,viewName:e[15].selection,viewValue:e[9],filter:e[4]._id}}),t.$on("choose",e[18]),t.$on("back",e[19]),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};8&n&&(o.item=e[3]),8&n&&(o.className=e[3].refClass),2&n&&(o.classId=e[1]),16&n&&(o.recordId=e[4]._id),512&n&&(o.viewValue=e[9]),16&n&&(o.filter=e[4]._id),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function go(e){let t,n,o,i={ctx:e,current:null,token:null,hasCatch:!1,pending:po,then:mo,catch:uo,value:27,blocks:[,,,]};fe(e[16](),i);let l=e[8]&&$o(e);return{c(){i.block.c(),t=C(),l&&l.c(),n=L()},m(e,r){i.block.m(e,i.anchor=r),i.mount=()=>t.parentNode,i.anchor=t,_(e,t,r),l&&l.m(e,r),_(e,n,r),o=!0},p(t,[o]){pe(i,e=t,o),e[8]?l?(l.p(e,o),256&o&&ue(l,1)):(l=$o(e),l.c(),ue(l,1),l.m(n.parentNode,n)):l&&(ce(),me(l,1,1,(()=>{l=null})),de())},i(e){o||(ue(i.block),ue(l),o=!0)},o(e){for(let e=0;e<3;e+=1){me(i.blocks[e])}me(l),o=!1},d(e){i.block.d(e),i.token=null,i=null,e&&j(t),l&&l.d(e),e&&j(n)}}}function vo(e,t,n){const{TextField:o,Modal:i}=c;let{classId:l}=t,{id:r}=t,{item:s}=t,{record:a}=t,{value:d}=t,{noForm:u=!1}=t,{disabled:m}=t,{formnovalidate:f}=t,{praefix:p}=t;const{properties:$={}}=s;let h,{pattern:g,placeholder:v,readonly:b,required:y=!1,view:w}=$,k=!1;const x=()=>{n(8,k=!1)};return e.$$set=e=>{"classId"in e&&n(1,l=e.classId),"id"in e&&n(2,r=e.id),"item"in e&&n(3,s=e.item),"record"in e&&n(4,a=e.record),"value"in e&&n(0,d=e.value),"noForm"in e&&n(5,u=e.noForm),"disabled"in e&&n(6,m=e.disabled),"formnovalidate"in e&&n(7,f=e.formnovalidate),"praefix"in e&&n(20,p=e.praefix)},[d,l,r,s,a,u,m,f,k,h,o,i,g,b,y,w,async()=>(n(9,h=a[w.selection]),!0),()=>{n(8,k=!0)},({detail:e})=>{n(0,d=e.row[w.value?w.value:"_id"]),x()},x,p,function(e){d=e,n(0,d)},function(e){k=e,n(8,k)}]}class bo extends we{constructor(e){var t;super(),document.getElementById("svelte-wbrqzu-style")||((t=S("style")).id="svelte-wbrqzu-style",t.textContent=".feather.svelte-wbrqzu{position:absolute;top:0.75em;left:0.5em;color:#4300b0}",I(document.head,t)),ye(this,e,vo,go,w,{classId:1,id:2,item:3,record:4,value:0,noForm:5,disabled:6,formnovalidate:7,praefix:20})}}function yo(e,t,n){const o=e.slice();return o[10]=t[n],o}function wo(e){let t,n,o,i=e[10]+"";return{c(){t=S("option"),n=F(i),t.__value=e[10],t.value=t.__value,t.selected=o=e[1]===e[10],z(t,"class","svelte-5xpzvo")},m(e,o){_(e,t,o),I(t,n)},p(e,n){2&n&&o!==(o=e[1]===e[10])&&(t.selected=o)},d(e){e&&j(t)}}}function ko(e){let t,n,o,i,l,r=e[4],s=[];for(let t=0;t<r.length;t+=1)s[t]=wo(yo(e,r,t));return{c(){t=S("select"),n=S("option");for(let e=0;e<s.length;e+=1)s[e].c();n.__value="",n.value=n.__value,z(n,"class","svelte-5xpzvo"),z(t,"class",o=x(e[2]||e[3])+" svelte-5xpzvo"),z(t,"id",e[0]),z(t,"name",e[0]),z(t,"readonly",e[5])},m(o,r){_(o,t,r),I(t,n);for(let e=0;e<s.length;e+=1)s[e].m(t,null);i||(l=E(t,"change",e[6]),i=!0)},p(e,[n]){if(18&n){let o;for(r=e[4],o=0;o<r.length;o+=1){const i=yo(e,r,o);s[o]?s[o].p(i,n):(s[o]=wo(i),s[o].c(),s[o].m(t,null))}for(;o<s.length;o+=1)s[o].d(1);s.length=r.length}12&n&&o!==(o=x(e[2]||e[3])+" svelte-5xpzvo")&&z(t,"class",o),1&n&&z(t,"id",e[0]),1&n&&z(t,"name",e[0])},i:h,o:h,d(e){e&&j(t),N(s,e),i=!1,l()}}}function xo(e,t,n){const o=H();let{id:i}=t,{item:l}=t,{value:r}=t,{noForm:s=!1}=t,{classId:a}=t,{disabled:c}=t;const{enum:d}=l.properties,u=c||l.properties.readonly;return e.$$set=e=>{"id"in e&&n(0,i=e.id),"item"in e&&n(7,l=e.item),"value"in e&&n(1,r=e.value),"noForm"in e&&n(2,s=e.noForm),"classId"in e&&n(3,a=e.classId),"disabled"in e&&n(8,c=e.disabled)},[i,r,s,a,d,u,e=>o("blur",{value:e.srcElement.value}),l,c]}class Io extends we{constructor(e){var t;super(),document.getElementById("svelte-5xpzvo-style")||((t=S("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}",I(document.head,t)),ye(this,e,xo,ko,w,{id:0,item:7,value:1,noForm:2,classId:3,disabled:8})}}const _o=/\d+/g,jo=/%[HMSpPdmyY%]/g;function No(e,t,n){const o=Math.floor((new Date).getFullYear()/100);let i=!1;if(""===e)return null;const l=t.split(jo);let r=0,s=0;const a=new Date(0);for(const c of l){if(!e.startsWith(c,r))return n;if(r+=c.length,r===e.length){if(s!==t.length)return n;break}if("%"!==t[s+c.length])break;if(s+=c.length+1,"%"===t[s]){if("%"!==e[r])return n;r++}else if("p"===t[s].toLowerCase()){const t=e.substr(r,2).toUpperCase();if("AM"===t)i=!1,a.getHours()>=12&&a.setHours(a.getHours()-12);else{if("PM"!==t)return n;i=!0,a.getHours()<12&&a.setHours(a.getHours()+12)}}else{_o.lastIndex=r;const l=_o.exec(e);if(null==l)return n;switch(t[s]){case"H":a.setHours(parseInt(l[0])+12*i);break;case"M":a.setMinutes(l[0]);break;case"S":a.setSeconds(l[0]);break;case"d":a.setDate(l[0]);break;case"m":a.setMonth(l[0]-1);break;case"y":a.setFullYear(100*o+parseInt(l[0]));break;case"Y":a.setFullYear(l[0])}r+=l[0].length}s++}return isNaN(a.valueOf())?n:a}function So(e){let t;return{c(){t=F("Stunden")},m(e,n){_(e,t,n)},d(e){e&&j(t)}}}function qo(e){let t,n;return t=new e[4]({props:{slot:"hours-label",$$slots:{default:[So]},$$scope:{ctx:e}}}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Fo(e){let t;return{c(){t=F("Minuten")},m(e,n){_(e,t,n)},d(e){e&&j(t)}}}function Co(e){let t,n;return t=new e[4]({props:{slot:"minutes-label",$$slots:{default:[Fo]},$$scope:{ctx:e}}}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Lo(e){let t;return{c(){t=F("Jetzt")},m(e,n){_(e,t,n)},d(e){e&&j(t)}}}function Eo(e){let t,n;return t=new e[4]({props:{slot:"now-label",$$slots:{default:[Lo]},$$scope:{ctx:e}}}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Do(e){let t,n,o,i,l,r,s,a,c;return i=new e[5]({props:{value:e[0],closeOnSelection:!0}}),i.$on("change",e[8]),r=new e[6]({props:{value:e[0],$$slots:{"now-label":[Eo],"minutes-label":[Co],"hours-label":[qo]},$$scope:{ctx:e}}}),r.$on("change",e[7]),{c(){t=S("input"),o=C(),ge(i.$$.fragment),l=C(),ge(r.$$.fragment),z(t,"type","string"),z(t,"class",n=e[2]||e[3]),z(t,"id",e[1]),z(t,"name",e[1]),t.hidden=!0},m(n,d){_(n,t,d),B(t,e[0]),_(n,o,d),ve(i,n,d),_(n,l,d),ve(r,n,d),s=!0,a||(c=E(t,"input",e[9]),a=!0)},p(e,[o]){(!s||12&o&&n!==(n=e[2]||e[3]))&&z(t,"class",n),(!s||2&o)&&z(t,"id",e[1]),(!s||2&o)&&z(t,"name",e[1]),1&o&&B(t,e[0]);const l={};1&o&&(l.value=e[0]),i.$set(l);const a={};1&o&&(a.value=e[0]),4096&o&&(a.$$scope={dirty:o,ctx:e}),r.$set(a)},i(e){s||(ue(i.$$.fragment,e),ue(r.$$.fragment,e),s=!0)},o(e){me(i.$$.fragment,e),me(r.$$.fragment,e),s=!1},d(e){e&&j(t),e&&j(o),be(i,e),e&&j(l),be(r,e),a=!1,c()}}}function To(e,t,n){const o=H(),{Label:i,DatePicker:l,TimePicker:r}=c;let{value:s}=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,s=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)},[s,a,d,u,i,l,r,({detail:e})=>{var t,o;n(0,(t=e.value,o=s,s=null==t||null==o?t:(o.setHours(t.getHours(),t.getMinutes(),t.getSeconds()),o))),m(s)},({detail:e})=>{var t,o;n(0,(t=e.value,o=s,s=null==t||null==o?t:(o.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),o))),m(s)},function(){s=this.value,n(0,s)}]}class zo extends we{constructor(e){super(),ye(this,e,To,Do,w,{value:0,id:1,noForm:2,classId:3})}}function Oo(e){let t,n,o;return n=new e[6]({props:{type:"string",inputClass:e[2]?"":" "+e[3],id:e[0],name:e[0],value:e[1],pattern:Bo,placeholder:Ao,readonly:e[4],disabled:e[5]}}),n.$on("change",e[7]),{c(){t=S("div"),ge(n.$$.fragment),A(t,"max-width","4em")},m(e,i){_(e,t,i),ve(n,t,null),o=!0},p(e,[t]){const o={};12&t&&(o.inputClass=e[2]?"":" "+e[3]),1&t&&(o.id=e[0]),1&t&&(o.name=e[0]),2&t&&(o.value=e[1]),16&t&&(o.readonly=e[4]),32&t&&(o.disabled=e[5]),n.$set(o)},i(e){o||(ue(n.$$.fragment,e),o=!0)},o(e){me(n.$$.fragment,e),o=!1},d(e){e&&j(t),be(n)}}}const Bo="([01][0-9]|2[0-3]):([0-5][0-9])",Ao="";function Mo(e,t,n){const o=H(),{TextField:i}=c;let{id:l}=t,{item:r}=t,{value:s}=t,{noForm:a=!1}=t,{classId:d}=t,{readonly:u}=t,{disabled:m}=t,{praefix:f}=t;const p=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,l=e.id),"item"in e&&n(8,r=e.item),"value"in e&&n(1,s=e.value),"noForm"in e&&n(2,a=e.noForm),"classId"in e&&n(3,d=e.classId),"readonly"in e&&n(4,u=e.readonly),"disabled"in e&&n(5,m=e.disabled),"praefix"in e&&n(9,f=e.praefix)},[l,s,a,d,u,m,i,({detail:e})=>{o("blur",{value:p(e.value)}),o("checkRange",{idx:f,fieldId:l,value:e.value})},r,f]}class Vo extends we{constructor(e){var t;super(),document.getElementById("svelte-vvt0yv-style")||((t=S("style")).id="svelte-vvt0yv-style",t.textContent=".text-field input.invalid{border:1px red solid !important}",I(document.head,t)),ye(this,e,Mo,Oo,w,{id:0,item:8,value:1,noForm:2,classId:3,readonly:4,disabled:5,praefix:9})}}function Po(e){let t,n;return t=new e[21]({props:{inputClass:e[4]||e[5],disabled:e[7],formnovalidate:e[9],readonly:e[16],pattern:e[24],required:e[2],id:e[26],name:e[25],value:e[18]()}}),t.$on("change",e[28]()),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),128&n[0]&&(o.disabled=e[7]),512&n[0]&&(o.formnovalidate=e[9]),65536&n[0]&&(o.readonly=e[16]),4&n[0]&&(o.required=e[2]),262144&n[0]&&(o.value=e[18]()),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Wo(e){let t,n;return t=new e[21]({props:{inputClass:e[4]||e[5],disabled:e[7],formnovalidate:e[9],readonly:e[16],required:e[2],type:"email",id:e[26],name:e[25],value:e[18]()}}),t.$on("change",e[28]()),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),128&n[0]&&(o.disabled=e[7]),512&n[0]&&(o.formnovalidate=e[9]),65536&n[0]&&(o.readonly=e[16]),4&n[0]&&(o.required=e[2]),262144&n[0]&&(o.value=e[18]()),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Ro(e){let t,n;return t=new Vo({props:{inputClass:e[4]||e[5],disabled:e[7],readonly:e[16],required:e[2],id:e[26],item:e[1],value:e[18](),praefix:e[3]}}),t.$on("blur",e[28]()),t.$on("checkRange",e[36]),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),128&n[0]&&(o.disabled=e[7]),65536&n[0]&&(o.readonly=e[16]),4&n[0]&&(o.required=e[2]),2&n[0]&&(o.item=e[1]),262144&n[0]&&(o.value=e[18]()),8&n[0]&&(o.praefix=e[3]),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Ho(e){let t,n;return t=new zo({props:{classId:e[5],id:e[26],disabled:e[7],required:e[2],value:e[27](),noForm:e[4]}}),t.$on("change",e[28]()),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),4&n[0]&&(o.required=e[2]),16&n[0]&&(o.noForm=e[4]),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Qo(e){let t,n;return t=new e[22]({props:{inputClass:e[4]||e[5],required:e[2],disabled:e[7],id:e[26],name:e[25],value:e[27](),closeOnSelection:!0}}),t.$on("change",e[28](!0)),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),4&n[0]&&(o.required=e[2]),128&n[0]&&(o.disabled=e[7]),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Yo(e){let t,n;return t=new e[23]({props:{round:!0,inputClass:e[4]||e[5],disabled:e[7]||e[16],required:e[2],id:e[26],name:e[25],checked:e[18]()}}),t.$on("change",e[28]()),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),65664&n[0]&&(o.disabled=e[7]||e[16]),4&n[0]&&(o.required=e[2]),262144&n[0]&&(o.checked=e[18]()),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Go(e){let t,n;return t=new bo({props:{classId:e[5],disabled:e[7],required:e[2],id:e[26],item:e[1],record:e[0],value:e[18](),noForm:e[4],view:e[1].properties.view,praefix:e[3]}}),t.$on("blur",e[28]()),t.$on("invalid",e[35]),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),4&n[0]&&(o.required=e[2]),2&n[0]&&(o.item=e[1]),1&n[0]&&(o.record=e[0]),262144&n[0]&&(o.value=e[18]()),16&n[0]&&(o.noForm=e[4]),2&n[0]&&(o.view=e[1].properties.view),8&n[0]&&(o.praefix=e[3]),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Jo(e){let t,n;return t=new Qn({props:{classId:e[5],disabled:e[7],required:e[2],id:e[26],item:e[1],record:e[0],value:e[18](),noForm:e[4],multi:e[1].properties.multi,numberInput:e[11],praefix:e[3],toDelete:e[14],reqQuantity:e[15]}}),t.$on("blur",e[28]()),t.$on("invalid",e[34]),t.$on("multi",e[29]),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),4&n[0]&&(o.required=e[2]),2&n[0]&&(o.item=e[1]),1&n[0]&&(o.record=e[0]),262144&n[0]&&(o.value=e[18]()),16&n[0]&&(o.noForm=e[4]),2&n[0]&&(o.multi=e[1].properties.multi),2048&n[0]&&(o.numberInput=e[11]),8&n[0]&&(o.praefix=e[3]),16384&n[0]&&(o.toDelete=e[14]),32768&n[0]&&(o.reqQuantity=e[15]),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Uo(e){let t,n;return t=new Io({props:{classId:e[5],disabled:e[7],required:e[2],id:e[26],item:e[1],value:e[18](),noForm:e[4]}}),t.$on("blur",e[28]()),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),4&n[0]&&(o.required=e[2]),2&n[0]&&(o.item=e[1]),262144&n[0]&&(o.value=e[18]()),16&n[0]&&(o.noForm=e[4]),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Zo(e){let t,n;return t=new un({props:{classId:e[5],disabled:e[7],formnovalidate:e[9],required:e[2],readonly:e[16],id:e[26],item:e[1],value:e[18](),noForm:e[4]}}),t.$on("blur",e[28]()),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),512&n[0]&&(o.formnovalidate=e[9]),4&n[0]&&(o.required=e[2]),65536&n[0]&&(o.readonly=e[16]),2&n[0]&&(o.item=e[1]),262144&n[0]&&(o.value=e[18]()),16&n[0]&&(o.noForm=e[4]),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Ko(e){let t,n;return t=new o({props:{classId:e[5],disabled:e[7],readonly:e[16],id:e[26],name:e[1].name,value:e[18](),noForm:e[4]}}),t.$on("blur",e[28]()),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),65536&n[0]&&(o.readonly=e[16]),2&n[0]&&(o.name=e[1].name),262144&n[0]&&(o.value=e[18]()),16&n[0]&&(o.noForm=e[4]),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Xo(e){let t,n;return t=new an({props:{classId:e[5],eventId:e[6],required:e[2],disabled:e[7],formnovalidate:e[9],readonly:e[16],id:e[26],item:e[1],desc:e[19],value:e[18](),noForm:e[4],praefix:e[3],selectionFields:e[8],selection:e[10],deList:e[12],recordId:e[0]._id,isTemplate:e[13]}}),t.$on("task",e[33]),t.$on("change",e[28]()),t.$on("initFail",e[30]),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),64&n[0]&&(o.eventId=e[6]),4&n[0]&&(o.required=e[2]),128&n[0]&&(o.disabled=e[7]),512&n[0]&&(o.formnovalidate=e[9]),65536&n[0]&&(o.readonly=e[16]),2&n[0]&&(o.item=e[1]),524288&n[0]&&(o.desc=e[19]),262144&n[0]&&(o.value=e[18]()),16&n[0]&&(o.noForm=e[4]),8&n[0]&&(o.praefix=e[3]),256&n[0]&&(o.selectionFields=e[8]),1024&n[0]&&(o.selection=e[10]),4096&n[0]&&(o.deList=e[12]),1&n[0]&&(o.recordId=e[0]._id),8192&n[0]&&(o.isTemplate=e[13]),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function ei(e){let t,n,o,i;const l=[Xo,Ko,Zo,Uo,Jo,Go,Yo,Qo,Ho,Ro,Wo,Po],r=[];function s(e,t){return"object"===e[1].type?0:"textarea"===e[1].type||e[1].properties&&"textarea"===e[1].properties.format?1:"number"===e[1].type?2:e[1].properties&&e[1].properties.enum?3:e[1].properties&&e[1].properties.multi?4:e[1].properties&&e[1].properties.view?5:"boolean"===e[1].type?6:"date"===e[1].type?7:"datetime"===e[1].type?8:"time"===e[1].properties?.format?9:"email"===e[1].type?10:11}return t=s(e),n=r[t]=l[t](e),{c(){n.c(),o=L()},m(e,n){r[t].m(e,n),_(e,o,n),i=!0},p(e,i){let a=t;t=s(e),t===a?r[t].p(e,i):(ce(),me(r[a],1,1,(()=>{r[a]=null})),de(),n=r[t],n?n.p(e,i):(n=r[t]=l[t](e),n.c()),ue(n,1),n.m(o.parentNode,o))},i(e){i||(ue(n),i=!0)},o(e){me(n),i=!1},d(e){r[t].d(e),e&&j(o)}}}function ti(e){let t,n;return t=new e[20]({props:{id:e[31](e[26]),class:e[1].name+(e[17]?" hidden ":""),name:e[1].designation,help:e[1].properties?.hint,$$slots:{default:[ei]},$$scope:{ctx:e}}}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};131074&n[0]&&(o.class=e[1].name+(e[17]?" hidden ":"")),2&n[0]&&(o.name=e[1].designation),2&n[0]&&(o.help=e[1].properties?.hint),917503&n[0]|4096&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function ni(e,t,n){let o,i,l;const r=H(),{FormField:s,TextField:a,DatePicker:d,TimePicker:u,Checkbox:f}=c;let{praefix:p=""}=t,{item:$}=t,{listName:h=""}=t,{record:g}=t,{noForm:v=!1}=t,{classId:b}=t,{eventId:y}=t,{disabled:w}=t,{selectionFields:k}=t,{formnovalidate:x}=t,{selection:I=!1}=t,{numberInput:_}=t,{deList:j}=t,{required:N}=t,{isTemplate:S}=t,{toDelete:q}=t,{reqQuantity:F}=t,{required:C,readonly:L,hidden:E,pattern:D}=$.properties||{};if(E=!0===E,void 0!==L&&(L=!0===L),void 0===N&&(N=C),"string"==typeof $.name){const[e,t]=$.name.split("_");t&&($.name=t)}const T=(h?h+".":"")+$.name,z=T+(""!==p?"-"+p:""),O=(e,t=T)=>{try{return t.split(".").reduce(((e,t)=>e[t]),e)}catch(e){return""}};return e.$$set=e=>{"praefix"in e&&n(3,p=e.praefix),"item"in e&&n(1,$=e.item),"listName"in e&&n(32,h=e.listName),"record"in e&&n(0,g=e.record),"noForm"in e&&n(4,v=e.noForm),"classId"in e&&n(5,b=e.classId),"eventId"in e&&n(6,y=e.eventId),"disabled"in e&&n(7,w=e.disabled),"selectionFields"in e&&n(8,k=e.selectionFields),"formnovalidate"in e&&n(9,x=e.formnovalidate),"selection"in e&&n(10,I=e.selection),"numberInput"in e&&n(11,_=e.numberInput),"deList"in e&&n(12,j=e.deList),"required"in e&&n(2,N=e.required),"isTemplate"in e&&n(13,S=e.isTemplate),"toDelete"in e&&n(14,q=e.toDelete),"reqQuantity"in e&&n(15,F=e.reqQuantity)},e.$$.update=()=>{1&e.$$.dirty[0]&&n(18,o=(e=T)=>{let t=O(g);return void 0===t?"":t}),1&e.$$.dirty[0]&&(l=O(g))},n(19,i=((e=T)=>{let t=g["_"+e];return t=m(t),void 0===t?"":t})()),[g,$,N,p,v,b,y,w,k,x,I,_,j,S,q,F,L,E,o,i,s,a,d,f,D,T,z,(e=T)=>{let t=O(g);return t?new Date(t):new Date},e=>({detail:t})=>{let{value:o,checked:i}=t;void 0!==i&&(o=i),n(0,g[T]=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",{oldValue:l,value:o,add:s,itemName:T,desc:t.description})},({detail:e})=>{r("multi",e)},()=>n(17,E=!0),()=>"object"===$.type?"comment_"+z:z,h,function(t){Q(e,t)},function(t){Q(e,t)},function(t){Q(e,t)},function(t){Q(e,t)}]}class oi extends we{constructor(e){var t;super(),document.getElementById("svelte-mea5fj-style")||((t=S("style")).id="svelte-mea5fj-style",t.textContent=".form-field{margin-bottom:1em !important}.form-field.hidden{display:none !important}.form-field > .description{padding-top:0.75em}.form-field div.field > label.checkbox{padding-top:0.5em}",I(document.head,t)),ye(this,e,ni,ti,w,{praefix:3,item:1,listName:32,record:0,noForm:4,classId:5,eventId:6,disabled:7,selectionFields:8,formnovalidate:9,selection:10,numberInput:11,deList:12,required:2,isTemplate:13,toDelete:14,reqQuantity:15},[-1,-1])}}const{document:ii}=$e;function li(e,t,n){const o=e.slice();return o[73]=t[n],o[75]=n,o}function ri(e,t,n){const o=e.slice();return o[82]=t[n],o}function si(e,t,n){const o=e.slice();return o[77]=t[n].title,o[78]=t[n].toDelete,o[79]=t[n].icon,o}function ai(e){let t,n;return t=new e[14]({props:{name:"Total Wochen",nameClass:"formField_italic",$$slots:{default:[ci]},$$scope:{ctx:e}}}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};128&n[0]|8388608&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function ci(e){let t,n,o;function i(t){e[41](t)}let l={item:e[24],disabled:!0};return void 0!==e[7]&&(l.value=e[7]),t=new un({props:l}),G.push((()=>he(t,"value",i))),{c(){ge(t.$$.fragment)},m(e,n){ve(t,e,n),o=!0},p(e,o){const i={};!n&&128&o[0]&&(n=!0,i.value=e[7],ne((()=>n=!1))),t.$set(i)},i(e){o||(ue(t.$$.fragment,e),o=!0)},o(e){me(t.$$.fragment,e),o=!1},d(e){be(t,e)}}}function di(e){let t,n;return t=new e[14]({props:{name:"Total Stunden",nameClass:"formField_italic",$$slots:{default:[ui]},$$scope:{ctx:e}}}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};1024&n[0]|8388608&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function ui(e){let t,n,o;function i(t){e[42](t)}let l={item:e[22],disabled:!0};return void 0!==e[10]&&(l.value=e[10]),t=new un({props:l}),G.push((()=>he(t,"value",i))),{c(){ge(t.$$.fragment)},m(e,n){ve(t,e,n),o=!0},p(e,o){const i={};!n&&1024&o[0]&&(n=!0,i.value=e[10],ne((()=>n=!1))),t.$set(i)},i(e){o||(ue(t.$$.fragment,e),o=!0)},o(e){me(t.$$.fragment,e),o=!1},d(e){be(t,e)}}}function mi(e){let t,n;return t=new e[14]({props:{name:"Total Betrag",nameClass:"formField_italic",$$slots:{default:[fi]},$$scope:{ctx:e}}}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};64&n[0]|8388608&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function fi(e){let t,n,o;function i(t){e[43](t)}let l={item:e[20],disabled:!0};return void 0!==e[6]&&(l.value=e[6]),t=new un({props:l}),G.push((()=>he(t,"value",i))),{c(){ge(t.$$.fragment)},m(e,n){ve(t,e,n),o=!0},p(e,o){const i={};!n&&64&o[0]&&(n=!0,i.value=e[6],ne((()=>n=!1))),t.$set(i)},i(e){o||(ue(t.$$.fragment,e),o=!0)},o(e){me(t.$$.fragment,e),o=!1},d(e){be(t,e)}}}function pi(e){let t,n;return t=new e[17]({props:{class:e[11][e[75]],$$slots:{handle:[ki,({toggle:e})=>({76:e}),({toggle:e})=>[0,0,e?16384:0]],default:[vi,({toggle:e})=>({76:e}),({toggle:e})=>[0,0,e?16384:0]]},$$scope:{ctx:e}}}),t.$on("panel-open",(function(){y(e[72])&&e[72].apply(this,arguments)})),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(n,o){e=n;const i={};2048&o[0]&&(i.class=e[11][e[75]]),13117&o[0]|8404992&o[2]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function $i(e){let t,n;return t=new oi({props:{praefix:e[75],item:e[82],eventId:e[5],record:e[73],reqQuantity:e[2],noForm:Ni,classId:e[4],disabled:e[0],required:e[18],selectionFields:e[25],numberInput:e[13],formnovalidate:e[75]===e[8].length-1||e[8][e[75]]._delete}}),t.$on("notify",(function(){y(e[27](e[82],e[75]))&&e[27](e[82],e[75]).apply(this,arguments)})),t.$on("task",e[44]),t.$on("invalid",e[28]),t.$on("checkRange",e[29]),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(n,o){e=n;const i={};8&o[0]&&(i.item=e[82]),32&o[0]&&(i.eventId=e[5]),256&o[0]&&(i.record=e[73]),4&o[0]&&(i.reqQuantity=e[2]),16&o[0]&&(i.classId=e[4]),1&o[0]&&(i.disabled=e[0]),8192&o[0]&&(i.numberInput=e[13]),256&o[0]&&(i.formnovalidate=e[75]===e[8].length-1||e[8][e[75]]._delete),t.$set(i)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function hi(e){let t,n,o=e[3].item,i=[];for(let t=0;t<o.length;t+=1)i[t]=$i(ri(e,o,t));const l=e=>me(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=L()},m(e,o){for(let t=0;t<i.length;t+=1)i[t].m(e,o);_(e,t,o),n=!0},p(e,n){if(973349181&n[0]){let r;for(o=e[3].item,r=0;r<o.length;r+=1){const l=ri(e,o,r);i[r]?(i[r].p(l,n),ue(i[r],1)):(i[r]=$i(l),i[r].c(),ue(i[r],1),i[r].m(t.parentNode,t))}for(ce(),r=o.length;r<i.length;r+=1)l(r);de()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)ue(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)me(i[e]);n=!1},d(e){N(i,e),e&&j(t)}}}function gi(e){let t,n,o=e[8][e[75]]._delete,i=hi(e);return{c(){i.c(),t=L()},m(e,o){i.m(e,o),_(e,t,o),n=!0},p(e,n){256&n[0]&&w(o,o=e[8][e[75]]._delete)?(ce(),me(i,1,1,h),de(),i=hi(e),i.c(),ue(i),i.m(t.parentNode,t)):i.p(e,n)},i(e){n||(ue(i),n=!0)},o(e){me(i),n=!1},d(e){e&&j(t),i.d(e)}}}function vi(e){let t,n,o,i,l=e[8].length,r=gi(e);return{c(){t=S("div"),r.c(),o=C(),z(t,"id",n=`accordion-content-${e[4]}-${e[3].name}-${e[75]}`)},m(e,n){_(e,t,n),r.m(t,null),_(e,o,n),i=!0},p(e,o){256&o[0]&&w(l,l=e[8].length)?(ce(),me(r,1,1,h),de(),r=gi(e),r.c(),ue(r),r.m(t,null)):r.p(e,o),(!i||24&o[0]&&n!==(n=`accordion-content-${e[4]}-${e[3].name}-${e[75]}`))&&z(t,"id",n)},i(e){i||(ue(r),i=!0)},o(e){me(r),i=!1},d(e){e&&j(t),r.d(e),e&&j(o)}}}function bi(e){let t,n,o,i,l,r=e[26](e[9],e[75])+"";return{c(){t=S("div"),n=F(r),z(t,"class",o=x("draggableListItem "+e[3].name)+" svelte-1es1ap1"),z(t,"draggable",!0),M(t,"delete",e[73]._delete),M(t,"is-active-top",e[12]?.top===e[75]),M(t,"is-active-bottom",e[12]?.bottom===e[75])},m(o,r){_(o,t,r),I(t,n),i||(l=[E(t,"dragover",e[35]),E(t,"dragleave",e[36](e[75])),E(t,"dragstart",e[33](e[75])),E(t,"drop",D(e[32](e[75]))),E(t,"dragenter",e[34](e[75]))],i=!0)},p(i,l){e=i,512&l[0]&&r!==(r=e[26](e[9],e[75])+"")&&O(n,r),8&l[0]&&o!==(o=x("draggableListItem "+e[3].name)+" svelte-1es1ap1")&&z(t,"class",o),264&l[0]&&M(t,"delete",e[73]._delete),4104&l[0]&&M(t,"is-active-top",e[12]?.top===e[75]),4104&l[0]&&M(t,"is-active-bottom",e[12]?.bottom===e[75])},d(e){e&&j(t),i=!1,b(l)}}}function yi(e){let t,n,o;var i=e[79];return i&&(t=new i({props:{size:"20"}})),{c(){t&&ge(t.$$.fragment),n=L()},m(e,i){t&&ve(t,e,i),_(e,n,i),o=!0},p(e,o){if(i!==(i=e[79])){if(t){ce();const e=t;me(e.$$.fragment,1,0,(()=>{be(e,1)})),de()}i?(t=new i({props:{size:"20"}}),ge(t.$$.fragment),ue(t.$$.fragment,1),ve(t,n.parentNode,n)):t=null}},i(e){o||(t&&ue(t.$$.fragment,e),o=!0)},o(e){t&&me(t.$$.fragment,e),o=!1},d(e){e&&j(n),t&&be(t,e)}}}function wi(e){let t,n,o,i,l,r=!e[0]&&!e[3].readonly&&yi(e);return{c(){t=S("span"),r&&r.c(),z(t,"class","pointer icon svelte-1es1ap1"),z(t,"title",e[77]),t.hidden=n=e[75]===e[8].length-1||!(e[73]._delete^e[78])},m(n,s){_(n,t,s),r&&r.m(t,null),o=!0,i||(l=E(t,"click",e[31](e[75])),i=!0)},p(i,l){(e=i)[0]||e[3].readonly?r&&(ce(),me(r,1,1,(()=>{r=null})),de()):r?(r.p(e,l),9&l[0]&&ue(r,1)):(r=yi(e),r.c(),ue(r,1),r.m(t,null)),(!o||256&l[0]&&n!==(n=e[75]===e[8].length-1||!(e[73]._delete^e[78])))&&(t.hidden=n)},i(e){o||(ue(r),o=!0)},o(e){me(r),o=!1},d(e){e&&j(t),r&&r.d(),i=!1,l()}}}function ki(e){let t,n,o,i,l,r;n=new e[15]({props:{$$slots:{default:[bi]},$$scope:{ctx:e}}}),n.$on("click",(function(){y(e[30](e[76],e[75]))&&e[30](e[76],e[75]).apply(this,arguments)}));let s=[{title:"löschen",toDelete:!0,icon:ze},{title:"undo",toDelete:!1,icon:Ee}],a=[];for(let t=0;t<2;t+=1)a[t]=wi(si(e,s,t));const c=e=>me(a[e],1,1,(()=>{a[e]=null}));return{c(){t=S("div"),ge(n.$$.fragment),o=C();for(let e=0;e<2;e+=1)a[e].c();i=C(),z(t,"class",l=x("accordion "+e[3].name)+" svelte-1es1ap1"),z(t,"slot","handle")},m(e,l){_(e,t,l),ve(n,t,null),I(t,o);for(let e=0;e<2;e+=1)a[e].m(t,null);I(t,i),r=!0},p(o,d){e=o;const u={};if(4872&d[0]|8388608&d[2]&&(u.$$scope={dirty:d,ctx:e}),n.$set(u),265&d[0]|1&d[1]){let n;for(s=[{title:"löschen",toDelete:!0,icon:ze},{title:"undo",toDelete:!1,icon:Ee}],n=0;n<2;n+=1){const o=si(e,s,n);a[n]?(a[n].p(o,d),ue(a[n],1)):(a[n]=wi(o),a[n].c(),ue(a[n],1),a[n].m(t,i))}for(ce(),n=2;n<2;n+=1)c(n);de()}(!r||8&d[0]&&l!==(l=x("accordion "+e[3].name)+" svelte-1es1ap1"))&&z(t,"class",l)},i(e){if(!r){ue(n.$$.fragment,e);for(let e=0;e<2;e+=1)ue(a[e]);r=!0}},o(e){me(n.$$.fragment,e),a=a.filter(Boolean);for(let e=0;e<2;e+=1)me(a[e]);r=!1},d(e){e&&j(t),be(n),N(a,e)}}}function xi(e){let t,n,o=(!e[1]&&!e[0]||e[75]<e[8].length-1)&&pi(e);return{c(){o&&o.c(),t=L()},m(e,i){o&&o.m(e,i),_(e,t,i),n=!0},p(e,n){!e[1]&&!e[0]||e[75]<e[8].length-1?o?(o.p(e,n),259&n[0]&&ue(o,1)):(o=pi(e),o.c(),ue(o,1),o.m(t.parentNode,t)):o&&(ce(),me(o,1,1,(()=>{o=null})),de())},i(e){n||(ue(o),n=!0)},o(e){me(o),n=!1},d(e){o&&o.d(e),e&&j(t)}}}function Ii(e){let t,n,o=e[8],i=[];for(let t=0;t<o.length;t+=1)i[t]=xi(li(e,o,t));const l=e=>me(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=L()},m(e,o){for(let t=0;t<i.length;t+=1)i[t].m(e,o);_(e,t,o),n=!0},p(e,n){if(2114206527&n[0]|63&n[1]|17408&n[2]){let r;for(o=e[8],r=0;r<o.length;r+=1){const l=li(e,o,r);i[r]?(i[r].p(l,n),ue(i[r],1)):(i[r]=xi(l),i[r].c(),ue(i[r],1),i[r].m(t.parentNode,t))}for(ce(),r=o.length;r<i.length;r+=1)l(r);de()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)ue(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)me(i[e]);n=!1},d(e){N(i,e),e&&j(t)}}}function _i(e){let t,n,o,i,l,r,s=e[23]&&0!=e[7]&&ai(e),a=e[21]&&0!=e[10]&&di(e),c=e[19]&&0!=e[6]&&mi(e);return l=new e[16]({props:{$$slots:{default:[Ii,({closeOtherPanels:e})=>({72:e}),({closeOtherPanels:e})=>[0,0,e?1024:0]]},$$scope:{ctx:e}}}),{c(){t=S("div"),s&&s.c(),n=C(),a&&a.c(),o=C(),c&&c.c(),i=C(),ge(l.$$.fragment),z(t,"class","formList")},m(e,d){_(e,t,d),s&&s.m(t,null),I(t,n),a&&a.m(t,null),I(t,o),c&&c.m(t,null),I(t,i),ve(l,t,null),r=!0},p(e,r){e[23]&&0!=e[7]?s?(s.p(e,r),128&r[0]&&ue(s,1)):(s=ai(e),s.c(),ue(s,1),s.m(t,n)):s&&(ce(),me(s,1,1,(()=>{s=null})),de()),e[21]&&0!=e[10]?a?(a.p(e,r),1024&r[0]&&ue(a,1)):(a=di(e),a.c(),ue(a,1),a.m(t,o)):a&&(ce(),me(a,1,1,(()=>{a=null})),de()),e[19]&&0!=e[6]?c?(c.p(e,r),64&r[0]&&ue(c,1)):(c=mi(e),c.c(),ue(c,1),c.m(t,i)):c&&(ce(),me(c,1,1,(()=>{c=null})),de());const d={};15167&r[0]|8389632&r[2]&&(d.$$scope={dirty:r,ctx:e}),l.$set(d)},i(e){r||(ue(s),ue(a),ue(c),ue(l.$$.fragment,e),r=!0)},o(e){me(s),me(a),me(c),me(l.$$.fragment,e),r=!1},d(e){e&&j(t),s&&s.d(),a&&a.d(),c&&c.d(),be(l)}}}let ji=new Map;const Ni=!0,Si="pos/target";function qi(e,t,n){let o,i;const{FormField:l,TextField:r,Button:s,Accordion:a,AccordionSection:d,Divider:u}=c,$=H();let{list:h}=t,{schema:g}=t,{record:v}=t,{classId:b}=t,{eventId:y}=t,{disabled:w}=t,{fixed:k}=t,{template:x={}}=t,{reqQuantity:I}=t;const _=g.find((e=>"price"===e.name&&!e.properties?.hidden)),j=_&&g.find((e=>"quantity"===e.name));let N=0;const S=g.find((e=>"quantity"===e.name&&"h"===e.properties?.unit?.constant&&!e.properties?.hidden));let q=0;const F=g.find((e=>"number"===e.type&&"w"===e.properties?.unit?.constant?.toLowerCase()&&!e.properties?.hidden))?.name||"",C=!!F;let L=0;const E={};let D=g.properties?.readonly,T=b.split("form-")[1].slice(0,-4);h.group&&(k=!0),w||=D;let z,O,B=[],A=[],M=!1,V={},P=[];g.filter((e=>e.selection)).map((e=>B.push({className:T,parentClass:g,refClass:e.selection,value:""})));["readonly","hidden","required"].map((e=>{g.filter((t=>"object"==typeof(t.properties&&t.properties[e]))).map((t=>{const n=t.properties[e].refItem||"";let[o,i]=n.split(".");i||(i=o,o=void 0),P.push({action:e,itemName:t.name,refObj:o,refName:i,op:t.properties[e].invert?"!":""})}))}));const W=async(e,t,n)=>{const o=v[n];if(!o?.length)return;const i=o[0][n];if(!i)return;const l=await Ll(n,i);return l?l[h.name]:void 0},R=async(e,t)=>{const o=P.filter((e=>(e.refObj||T)===t));if(o?.length)for(const t of o){const{action:o,itemName:i,refObj:l,refName:r,op:s}=t;let a,c,d=!1,u=!1;if(l){const t=z[e][l];l===T&&r?d=v:t&&(d=await Ll(l,t))}!l&&r&&(d=z[e]),d&&(u=d[r],Array.isArray(u)&&0===u.length&&(u=!1),"!"===s&&(u=!u)),"required"!==o&&"readonly"!==o||(a=`#accordion-content-${b}-${h.name}-${e} .form-field.${i} .field textarea`,c=document.querySelector(a),c||(a=`#accordion-content-${b}-${h.name}-${e} .form-field.${i} .field input`,c=document.querySelector(a)),c&&u&&c.setAttribute(o,"true"),c&&!u&&c.removeAttribute(o)),"hidden"===o&&(a=`#accordion-content-${b}-${h.name}-${e} .form-field.${i}`,c=document.querySelector(a),c?.classList?.toggle("hidden",u),u&&n(8,z[e][i]="",z))}},Y=(e,t)=>{let o=`#accordion-content-${b}-${h.name}-${e} .form-field .field :required:not(:disabled)`;const i=document.querySelectorAll(o);let l=!1;i.forEach((e=>{""===e.value&&(l=!0)})),void 0===t&&(o=`#accordion-content-${b}-${h.name}-${e} :not(.form-field.hidden) .field input.invalid`,document.querySelector(o)&&(t=!0)),n(11,A[e]=l||t?"invalid":"",A)},G=e=>{if(!e)return 0;const[t,n=0]=e.split(":");return 60*t+parseInt(n)},J=(e,t)=>{if(!t)return;const o=g.find((e=>e.name===t)),i=o.properties.value.formula,{operator:l,argument:r}=i,s=r.map((t=>z[e][t.refItem]));let a=0;"$add"===l&&(a=s.reduce(((e,t)=>e+ +t))),"$subtract"===l&&(a=s.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[i,l]=t.split(":");return i?e-=l?(+i+ +l/60).toFixed(2):+i:0}))),n(8,z[e][t]=(a||0).toFixed(o.properties.decimals||0),z),n(13,V={item:o,value:a,idx:e})};O=g.filter((e=>e.refClass)).reduce(((e,t)=>{const n=g.filter((e=>e.refItem===t.refClass));if(!n?.length)return e;if(t.selection){const[n,o]=t.selection.split(":"),[i]=o.split(".");i&&e.push({refClass:i,items:[n],selection:t.selection})}const o={refClass:t.refClass,items:[]};return n.forEach((e=>{o.items.push(e.name)})),e.push(o),e}),[]);const U=async(e,t,o,i)=>{const l=(await O).find((e=>e.refClass===t.refClass));if(!l)return;const{refClass:r,items:s,selection:a}=l,c=t.name,d=P.find((e=>e.itemName===c));if(d){await R(e,d.refObj);const t=`#accordion-content-${b}-${h.name}-${e} .form-field.${r}.hidden`;if(document.querySelector(t))return}return o?Promise.all(s.map((async l=>{const c=g.find((e=>e.name===l));if(c.properties?.readonly){const o=z[e][t.refClass];return Promise.resolve(Ll(t.refClass,o,!0)).then((t=>{let o=t[l];Array.isArray(o)&&(o=o.length?o[0][l]:""),n(8,z[e][l]=o,z)}))}let d="";const{refInput:u}=t;if(u&&z[e]){const[t,n]=u.split(".");d=n?z[e][n]:v[t]}if(a&&o!==i)s.map((t=>{n(8,z[e][t]="",z)}));else if(u&&!d||Z(e,l)){const o=g.find((e=>e.refClass===r)),i=z[e][o.name];if(t.selection){const o=Cl(t.selection+i.toString());if(o)return Promise.resolve(o).then((t=>n(8,z[e][l]=t[l],z)))}return Promise.resolve(Ll(o.refClass,i)).then((t=>n(8,z[e][l]=t[l],z)))}}))):Promise.resolve(s.map((t=>{n(8,z[e][t]="",z)})))},Z=(e,t)=>{let n=z[e][t];return"number"===g.find((e=>e.name===t)).type&&(n=Number(n||0)),!n},K=e=>!(!k&&e>=z.length-1),X=(e,t=!1)=>{const[n,o]=e.split(";");return h.name===o&&(!!K(t)&&((!1===t||t!=n)&&parseInt(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&&n(3,h=e.list),"schema"in e&&n(37,g=e.schema),"record"in e&&n(38,v=e.record),"classId"in e&&n(4,b=e.classId),"eventId"in e&&n(5,y=e.eventId),"disabled"in e&&n(0,w=e.disabled),"fixed"in e&&n(1,k=e.fixed),"template"in e&&n(39,x=e.template),"reqQuantity"in e&&n(2,I=e.reqQuantity)},e.$$.update=()=>{8&e.$$.dirty[0]|128&e.$$.dirty[1]&&v&&(n(2,I=v.quantity),n(8,z=(v[h.name]||[]).concat({}))),256&e.$$.dirty[0]&&n(9,o=z),968&e.$$.dirty[0]&&o&&((()=>{if(S)n(10,q=z?.reduce(((e,t)=>e+(t._delete?0:+(t.quantity||0))),0)||0)})(),(()=>{if(C)n(7,L=z?.reduce(((e,t)=>e+(t._delete?0:+(t[F]||0))),0)||0)})(),(()=>{if(_)n(6,N=z?.reduce(((e,t)=>{if(t.price){const n=(j?t.quantity??0:1)*(t.price??0);e+=t._delete?0:n}return e}),0)||0)})(),$("save",{listName:h.name,value:z,amountValue:N,weeksValue:L})),512&e.$$.dirty[1]&&(i=e=>E[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · "))},[w,k,I,h,b,y,N,L,z,o,q,A,M,V,l,s,a,d,undefined,_,{name:"amountValue",properties:{decimals:2}},S,{name:"hoursValue",properties:{decimals:2}},C,{name:"weeksValue",properties:{decimals:1}},B,(e,t)=>{const n=e[t];return n&&g.filter((e=>!0!==e.properties?.hidden&&void 0!==n[e.name]&&"textarea"!==e.properties?.format)).map((e=>""===n[e.name]?"":"object"===e.type?i(n[e.name]):"boolean"===e.type?p(n[e.name]):"date"===e.type?m(n[e.name]):"datetime"===e.type?f(n[e.name]):e.properties?.multi?"":n[e.name])).filter((e=>!!e)).join(" • ")||"+"},(e,t)=>async({detail:i})=>{const{oldValue:l,value:r,add:s,desc:a}=i;if(h.refItem){const o=await W(t,e,h.refItem);o&&n(8,z=o)}await R(t,e.name),J(t,e._formulaActor);const c=B?.find((t=>t.refClass.split(":")[1]?.split(".")[0]===e.refClass));c&&(c.value=(c.value||new Map).set(t,r)),r&&z.length===t+1&&n(8,z=z.concat({})),a&&n(40,E[r]=a,E),await U(t,e,r,l),n(9,o=z),"number"===e.type&&n(13,V={item:e,value:r,idx:t}),Y(t)},({detail:e})=>{const{idx:t,value:n}=e;Y(t,n)},({detail:e})=>{const{idx:t,fieldId:n,value:o}=e;if(!o)return;const i=G(o);let l=!1;z.forEach(((e,n)=>{if(t===n)return;const{start:o,end:r}=z[n];o&&r&&i>G(o)&&i<G(r)&&(l=!0)}));const r=document.getElementById(n);r?.classList?.toggle("invalid",l)},(e,t)=>o=>{const{detail:i}=o;e(o);const{target:l}=i,r=l?.closest("li");if(r?.classList.contains("open"))return;(e=>{const t=x[h.name]||{};for(const o in t)x[h.name][o]&&!z[e][o]&&n(8,z[e][o]=x[h.name][o],z)})(t);const s=`#accordion-content-${b}-${h.name}-${t} > div.form-field:not(.hidden)`,a=document.querySelectorAll(s);if(!a?.length)return;const c=a[a.length-1];ee().then((()=>c.scrollIntoView({behavior:"smooth",block:"end"})))},e=>()=>{n(8,z[e]._delete=!z[e]._delete,z)},e=>t=>{t.preventDefault(),n(12,M=!1);const o=X(t.dataTransfer.getData(Si),e);if(!1===o)return;t.dataTransfer.dropEffect="move";const i=[...z].map(((e,t)=>(e._index=t,e)));o<e?(i.splice(e+1,0,i[o]),i.splice(o,1)):(i.splice(e,0,i[o]),i.splice(o+1,1)),i.map(((e,t)=>{return n=e._index,o=t,void ji.set(o,n);var n,o}));let l=[];A.map(((e,t)=>{l[t]=A[(e=>{const t=ji.get(e);return void 0===t?e:t})(t)]})),n(11,A=l),n(8,z=i.map(((e,t)=>(delete e._index,e))))},e=>t=>{if(!K(e))return!1;t.dataTransfer.effectAllowed="move",t.dataTransfer.dropEffect="move",t.dataTransfer.setData(Si,e+";"+h.name)},e=>t=>{const o=X(t.dataTransfer.getData(Si),e);return!1===o||o===e?n(12,M=!1):void n(12,M={top:o>e&&e,bottom:o<e&&e})},e=>e.preventDefault(),e=>e=>{n(12,M=!1)},g,v,x,E,function(e){L=e,n(7,L)},function(e){q=e,n(10,q)},function(e){N=e,n(6,N)},function(t){Q(e,t)}]}class Fi extends we{constructor(e){var t;super(),ii.getElementById("svelte-1es1ap1-style")||((t=S("style")).id="svelte-1es1ap1-style",t.textContent=".accordion.svelte-1es1ap1{display:flex;overflow:hidden}.accordion-content.svelte-1es1ap1{position:relative}.formList .accordion > .btn{display:inline-block;margin-bottom:1em;background-color:#F5F5F5}.sTask .formList .accordion > .btn{width:95% !important}.sEmbedded .formList .accordion > .btn{width:97%}@media screen and (max-width: 600px){.formList .accordion > .btn{width:25em}}span.pointer.svelte-1es1ap1{padding-top:1em}div.delete.svelte-1es1ap1{text-decoration:line-through}.icon.svelte-1es1ap1{margin-right:-0.75em}.form-field .formField_italic{font-style:italic}.panel.invalid .btn{border:1px #b80000 solid}.draggableListItem.svelte-1es1ap1{cursor:drag}.draggableListItem.is-active-top.svelte-1es1ap1{border-top:3px purple solid;padding-top:2em}.draggableListItem.is-active-bottom.svelte-1es1ap1{border-bottom:3px purple solid;padding-bottom:2em}",I(ii.head,t)),ye(this,e,qi,_i,w,{list:3,schema:37,record:38,classId:4,eventId:5,disabled:0,fixed:1,template:39,reqQuantity:2},[-1,-1,-1])}}const{document:Ci}=$e;function Li(e,t,n){const o=e.slice();return o[17]=t[n],o}function Ei(e,t,n){const o=e.slice();return o[20]=t[n],o}function Di(e){return{c:h,m:h,p:h,i:h,o:h,d:h}}function Ti(e){let t,n,o,i,l,r,s,a,c,d,u,m,f,p=e[0].items,$=[];for(let t=0;t<p.length;t+=1)$[t]=Oi(Ei(e,p,t));const h=e=>me($[e],1,1,(()=>{$[e]=null}));let g=e[0].list&&Bi(e);return a=new e[5]({props:{outline:!0,$$slots:{default:[Mi]},$$scope:{ctx:e}}}),a.$on("click",e[9]),d=new e[5]({props:{disabled:e[2],class:"close",form:e[6],filled:!0,type:"submit",$$slots:{default:[Vi]},$$scope:{ctx:e}}}),{c(){t=S("form"),n=S("input"),i=C();for(let e=0;e<$.length;e+=1)$[e].c();l=C(),g&&g.c(),r=C(),s=S("div"),ge(a.$$.fragment),c=C(),ge(d.$$.fragment),z(n,"class",x(e[6])+" svelte-1phofh5"),z(n,"name","_id"),z(n,"type","hidden"),n.value=o=e[1]._id||"",z(t,"class","fTask svelte-1phofh5"),z(t,"id",e[6]),z(s,"class","form--buttons svelte-1phofh5")},m(o,p){_(o,t,p),I(t,n),I(t,i);for(let e=0;e<$.length;e+=1)$[e].m(t,null);I(t,l),g&&g.m(t,null),_(o,r,p),_(o,s,p),ve(a,s,null),I(s,c),ve(d,s,null),u=!0,m||(f=[E(t,"keydown",e[8]),E(t,"submit",D(e[10]))],m=!0)},p(e,i){if((!u||2&i&&o!==(o=e[1]._id||""))&&(n.value=o),75&i){let n;for(p=e[0].items,n=0;n<p.length;n+=1){const o=Ei(e,p,n);$[n]?($[n].p(o,i),ue($[n],1)):($[n]=Oi(o),$[n].c(),ue($[n],1),$[n].m(t,l))}for(ce(),n=p.length;n<$.length;n+=1)h(n);de()}e[0].list?g?(g.p(e,i),1&i&&ue(g,1)):(g=Bi(e),g.c(),ue(g,1),g.m(t,null)):g&&(ce(),me(g,1,1,(()=>{g=null})),de());const r={};8388608&i&&(r.$$scope={dirty:i,ctx:e}),a.$set(r);const s={};4&i&&(s.disabled=e[2]),8388608&i&&(s.$$scope={dirty:i,ctx:e}),d.$set(s)},i(e){if(!u){for(let e=0;e<p.length;e+=1)ue($[e]);ue(g),ue(a.$$.fragment,e),ue(d.$$.fragment,e),u=!0}},o(e){$=$.filter(Boolean);for(let e=0;e<$.length;e+=1)me($[e]);me(g),me(a.$$.fragment,e),me(d.$$.fragment,e),u=!1},d(e){e&&j(t),N($,e),g&&g.d(),e&&j(r),e&&j(s),be(a),be(d),m=!1,b(f)}}}function zi(e){let t,n;return t=new oi({props:{classId:e[6],item:e[20],selection:e[20].selection,record:e[1],disabled:e[3],eventId:e[0].id,required:!1,isTemplate:!0}}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};1&n&&(o.item=e[20]),1&n&&(o.selection=e[20].selection),2&n&&(o.record=e[1]),8&n&&(o.disabled=e[3]),1&n&&(o.eventId=e[0].id),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Oi(e){let t,n,o=Ri(!0,e[20]),i=o&&zi(e);return{c(){i&&i.c(),t=L()},m(e,o){i&&i.m(e,o),_(e,t,o),n=!0},p(e,n){1&n&&(o=Ri(!0,e[20])),o?i?(i.p(e,n),1&n&&ue(i,1)):(i=zi(e),i.c(),ue(i,1),i.m(t.parentNode,t)):i&&(ce(),me(i,1,1,(()=>{i=null})),de())},i(e){n||(ue(i),n=!0)},o(e){me(i),n=!1},d(e){i&&i.d(e),e&&j(t)}}}function Bi(e){let t,n,o=e[0].list,i=[];for(let t=0;t<o.length;t+=1)i[t]=Ai(Li(e,o,t));const l=e=>me(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=L()},m(e,o){for(let t=0;t<i.length;t+=1)i[t].m(e,o);_(e,t,o),n=!0},p(e,n){if(75&n){let r;for(o=e[0].list,r=0;r<o.length;r+=1){const l=Li(e,o,r);i[r]?(i[r].p(l,n),ue(i[r],1)):(i[r]=Ai(l),i[r].c(),ue(i[r],1),i[r].m(t.parentNode,t))}for(ce(),r=o.length;r<i.length;r+=1)l(r);de()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)ue(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)me(i[e]);n=!1},d(e){N(i,e),e&&j(t)}}}function Ai(e){let t,n,o,i;return t=new e[4]({props:{text:e[17].designation}}),o=new nl({props:{classId:e[6],list:e[17],eventId:e[0].id,schema:e[17].item,record:e[1],disabled:e[3],required:!1,open:!0,isTemplate:!0}}),{c(){ge(t.$$.fragment),n=C(),ge(o.$$.fragment)},m(e,l){ve(t,e,l),_(e,n,l),ve(o,e,l),i=!0},p(e,n){const i={};1&n&&(i.text=e[17].designation),t.$set(i);const l={};1&n&&(l.list=e[17]),1&n&&(l.eventId=e[0].id),1&n&&(l.schema=e[17].item),2&n&&(l.record=e[1]),8&n&&(l.disabled=e[3]),o.$set(l)},i(e){i||(ue(t.$$.fragment,e),ue(o.$$.fragment,e),i=!0)},o(e){me(t.$$.fragment,e),me(o.$$.fragment,e),i=!1},d(e){be(t,e),e&&j(n),be(o,e)}}}function Mi(e){let t;return{c(){t=F("Abbrechen")},m(e,n){_(e,t,n)},d(e){e&&j(t)}}}function Vi(e){let t;return{c(){t=F("Speichern")},m(e,n){_(e,t,n)},d(e){e&&j(t)}}}function Pi(e){return{c:h,m:h,p:h,i:h,o:h,d:h}}function Wi(e){let t,n,o,i={ctx:e,current:null,token:null,hasCatch:!1,pending:Pi,then:Ti,catch:Di,value:16,blocks:[,,,]};return fe(e[7](),i),{c(){t=C(),n=S("section"),i.block.c(),Ci.title="Vorgaben",z(n,"class","sTask svelte-1phofh5")},m(e,l){_(e,t,l),_(e,n,l),i.block.m(n,i.anchor=null),i.mount=()=>n,i.anchor=null,o=!0},p(t,[n]){pe(i,e=t,n)},i(e){o||(ue(i.block),o=!0)},o(e){for(let e=0;e<3;e+=1){me(i.blocks[e])}o=!1},d(e){e&&j(t),e&&j(n),i.block.d(),i.token=null,i=null}}}const Ri=(e,{type:t="",properties:n={}})=>!e||"list"!==t&&("time"===n.format&&(t="time"),!["date","datetime","time"].includes(t)&&(!n.readonly&&!n.hidden));function Hi(e,n,o){let a,d,u;k(e,r,(e=>o(11,d=e))),k(e,s,(e=>o(12,u=e)));const{Divider:m,Button:f,FormField:p}=c,$=JSON.parse(i.getItem("Locale"));let{schema:h}=n,{record:g}=n,v="template-"+h.class+Math.floor(9e3*Math.random()+1e3).toString(),b=!1;const y=()=>window.history.back(),w=(e,t,n=!1)=>{const o=t.id,i=e.find((e=>e.name===o));let l=t.value;if(!n&&i&&i.properties?.multi&&(l=g[o]),l&&i&&i.type.startsWith("date"))try{return No(l,"%d.%m.%Y").toISOString()}catch{return new Date(l).toISOString()}if(i&&"boolean"===i.type&&(l=!!t.checked),i&&"number"===i.type){const e=Number("1.1").toLocaleString($.id).substring(1,2);try{l=Number(l.replace(e,".")).toString()}catch{}}return l};return e.$$set=e=>{"schema"in e&&o(0,h=e.schema),"record"in e&&o(1,g=e.record)},e.$$.update=()=>{4&e.$$.dirty&&o(3,a=b)},[h,g,b,a,m,f,v,async()=>{const e=await t.getEvent(h.id);if(e.trigger?.startOn&&!e.trigger?.startOn?.some((e=>"Manual"===e.type))&&o(2,b=!0),d.role?.length&&h.authorization?.length){const e=h.authorization.some((e=>u?.find((t=>t===e.role&&"edit"===e.activity))));o(2,b||=!e)}},e=>{"button"!==e.srcElement?.type&&"textarea"!==e.srcElement?.type&&13==e.which&&e.preventDefault()},y,async e=>{const n={};Array.from(document.querySelectorAll("form#"+v+" ."+v)).map((e=>{const t=e.id||e.name;if(t)if(t.includes(".")){const[o,i]=t.split("."),l=h.list.find((e=>e.name===o));n[t]=w(l.item,e)}else n[t]=w(h.items,e)})),await t.saveTemplate(h.class,n),l.success("Die Vorgaben wurden gespeichert.",2e3),y()}]}const{document:Qi}=$e;function Yi(e,t,n){const o=e.slice();return o[22]=t[n],o}function Gi(e){let t,n;return t=new oi({props:{classId:e[2],item:e[22],listName:e[1].name,eventId:e[3],record:e[0],disabled:e[4],required:e[5]}}),t.$on("notify",e[13]),t.$on("task",e[17]),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),2&n&&(o.item=e[22]),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]),32&n&&(o.required=e[5]),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Ji(e){let t,n,o=Ri(e[7],e[22]),i=o&&Gi(e);return{c(){i&&i.c(),t=L()},m(e,o){i&&i.m(e,o),_(e,t,o),n=!0},p(e,n){130&n&&(o=Ri(e[7],e[22])),o?i?(i.p(e,n),130&n&&ue(i,1)):(i=Gi(e),i.c(),ue(i,1),i.m(t.parentNode,t)):i&&(ce(),me(i,1,1,(()=>{i=null})),de())},i(e){n||(ue(i),n=!0)},o(e){me(i),n=!1},d(e){i&&i.d(e),e&&j(t)}}}function Ui(e){let t,n,o,i=e[1].item,l=[];for(let t=0;t<i.length;t+=1)l[t]=Ji(Yi(e,i,t));const r=e=>me(l[e],1,1,(()=>{l[e]=null}));return{c(){t=S("div");for(let e=0;e<l.length;e+=1)l[e].c();z(t,"id",n=`accordion-content-${e[2]}-${e[1].name}`)},m(e,n){_(e,t,n);for(let e=0;e<l.length;e+=1)l[e].m(t,null);o=!0},p(e,s){if(8383&s){let n;for(i=e[1].item,n=0;n<i.length;n+=1){const o=Yi(e,i,n);l[n]?(l[n].p(o,s),ue(l[n],1)):(l[n]=Ji(o),l[n].c(),ue(l[n],1),l[n].m(t,null))}for(ce(),n=i.length;n<l.length;n+=1)r(n);de()}(!o||6&s&&n!==(n=`accordion-content-${e[2]}-${e[1].name}`))&&z(t,"id",n)},i(e){if(!o){for(let e=0;e<i.length;e+=1)ue(l[e]);o=!0}},o(e){l=l.filter(Boolean);for(let e=0;e<l.length;e+=1)me(l[e]);o=!1},d(e){e&&j(t),N(l,e)}}}function Zi(e){let t,n,o=e[12](e[8])+"";return{c(){t=S("span"),n=F(o)},m(e,o){_(e,t,o),I(t,n)},p(e,t){256&t&&o!==(o=e[12](e[8])+"")&&O(n,o)},d(e){e&&j(t)}}}function Ki(e){let t,n,o;return n=new e[9]({props:{$$slots:{default:[Zi]},$$scope:{ctx:e}}}),n.$on("click",(function(){y(e[14](e[21]))&&e[14](e[21]).apply(this,arguments)})),{c(){t=S("div"),ge(n.$$.fragment),z(t,"class","accordion svelte-148ktt9"),z(t,"slot","handle")},m(e,i){_(e,t,i),ve(n,t,null),o=!0},p(t,o){e=t;const i={};33554688&o&&(i.$$scope={dirty:o,ctx:e}),n.$set(i)},i(e){o||(ue(n.$$.fragment,e),o=!0)},o(e){me(n.$$.fragment,e),o=!1},d(e){e&&j(t),be(n)}}}function Xi(e){let t,n;return t=new e[11]({props:{open:e[6],$$slots:{handle:[Ki,({toggle:e})=>({21:e}),({toggle:e})=>e?2097152:0],default:[Ui,({toggle:e})=>({21:e}),({toggle:e})=>e?2097152:0]},$$scope:{ctx:e}}}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};64&n&&(o.open=e[6]),35652031&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function el(e){let t,n,o;return n=new e[10]({props:{$$slots:{default:[Xi]},$$scope:{ctx:e}}}),{c(){t=S("div"),ge(n.$$.fragment),z(t,"class","formList")},m(e,i){_(e,t,i),ve(n,t,null),o=!0},p(e,[t]){const o={};33554943&t&&(o.$$scope={dirty:t,ctx:e}),n.$set(o)},i(e){o||(ue(n.$$.fragment,e),o=!0)},o(e){me(n.$$.fragment,e),o=!1},d(e){e&&j(t),be(n)}}}function tl(e,t,n){const{Button:o,Accordion:i,AccordionSection:l}=c;let{list:r}=t,{schema:s}=t,{record:a}=t,{classId:d}=t,{eventId:u}=t,{disabled:$}=t,{required:h}=t,{open:g=!1}=t,{template:v={}}=t,{isTemplate:b=!1}=t;const y={};let w=a[r.name]||{};a[r.name]=w;const k=e=>y[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · ");return e.$$set=e=>{"list"in e&&n(1,r=e.list),"schema"in e&&n(15,s=e.schema),"record"in e&&n(0,a=e.record),"classId"in e&&n(2,d=e.classId),"eventId"in e&&n(3,u=e.eventId),"disabled"in e&&n(4,$=e.disabled),"required"in e&&n(5,h=e.required),"open"in e&&n(6,g=e.open),"template"in e&&n(16,v=e.template),"isTemplate"in e&&n(7,b=e.isTemplate)},[a,r,d,u,$,h,g,b,w,o,i,l,e=>s.filter((t=>void 0!==e[t.name]&&"textarea"!==t.properties?.format)).map((t=>"object"===t.type?k(t.name):"boolean"===t.type?p(e[t.name]):"date"===t.type?m(e[t.name]):"datetime"===t.type?f(e[t.name]):e[t.name])).filter((e=>!!e)).join(" • ")||"+",({detail:e})=>{const[t,o]=e.itemName.split(".");if(!o)return;e.desc&&(y[o]=e.desc);const i=a[t];n(0,a[t]={...i,[o]:e.value},a),n(8,w=a[t])},e=>t=>{(()=>{const e=v[r.name]||{};for(const t in e)v[r.name][t]&&!a[r.name][t]&&n(0,a[r.name][t]=v[r.name][t],a)})(),e(t);const o=`#accordion-content-${d}-${r.name} > div.form-field:last-child`,i=document.querySelector(o);ee().then((()=>i.scrollIntoView({behavior:"smooth",block:"end"})))},s,v,function(t){Q(e,t)}]}class nl extends we{constructor(e){var t;super(),Qi.getElementById("svelte-148ktt9-style")||((t=S("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}}",I(Qi.head,t)),ye(this,e,tl,el,w,{list:1,schema:15,record:0,classId:2,eventId:3,disabled:4,required:5,open:6,template:16,isTemplate:7})}}const{Boolean:ol,document:il}=$e;function ll(e,t,n){const o=e.slice();return o[90]=t[n],o}function rl(e,t,n){const o=e.slice();return o[93]=t[n],o}function sl(e){return{c:h,m:h,p:h,i:h,o:h,d:h}}function al(e){let t,n,o=e[89]&&function(e){let t,n,o,i,l,r,s,a,c,d,u,m,f,p=e[0].items,$=[];for(let t=0;t<p.length;t+=1)$[t]=dl(rl(e,p,t));const h=e=>me($[e],1,1,(()=>{$[e]=null}));let g=e[0].list&&ul(e);c=new e[12]({props:{outline:!0,$$slots:{default:[bl]},$$scope:{ctx:e}}}),c.$on("click",e[27]);let v=e[24]&&function(e){let t,n,o,i;t=new e[12]({props:{class:"close",disabled:e[9],form:e[16],filled:!0,type:"submit",$$slots:{default:[yl]},$$scope:{ctx:e}}});let l=e[1]&&!e[9]&&wl(e);return{c(){ge(t.$$.fragment),n=C(),l&&l.c(),o=L()},m(e,r){ve(t,e,r),_(e,n,r),l&&l.m(e,r),_(e,o,r),i=!0},p(e,n){const i={};512&n[0]&&(i.disabled=e[9]),8&n[3]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i),e[1]&&!e[9]?l?(l.p(e,n),514&n[0]&&ue(l,1)):(l=wl(e),l.c(),ue(l,1),l.m(o.parentNode,o)):l&&(ce(),me(l,1,1,(()=>{l=null})),de())},i(e){i||(ue(t.$$.fragment,e),ue(l),i=!0)},o(e){me(t.$$.fragment,e),me(l),i=!1},d(e){be(t,e),e&&j(n),l&&l.d(e),e&&j(o)}}}(e);return{c(){t=S("section"),n=S("form"),o=S("input"),l=C();for(let e=0;e<$.length;e+=1)$[e].c();r=C(),g&&g.c(),s=C(),a=S("div"),ge(c.$$.fragment),d=C(),v&&v.c(),z(o,"class",x(e[16])+" svelte-1pfb5os"),z(o,"name","_id"),z(o,"type","hidden"),o.value=i=e[2]._id||"",z(n,"class",x(e[17])+" svelte-1pfb5os"),z(n,"id",e[16]),z(a,"class","form--buttons svelte-1pfb5os"),z(t,"class",x(e[18])+" svelte-1pfb5os")},m(i,p){_(i,t,p),I(t,n),I(n,o),I(n,l);for(let e=0;e<$.length;e+=1)$[e].m(n,null);I(n,r),g&&g.m(n,null),I(t,s),I(t,a),ve(c,a,null),I(a,d),v&&v.m(a,null),u=!0,m||(f=[E(n,"keydown",e[32]),E(n,"submit",D(e[26]))],m=!0)},p(e,t){if((!u||4&t[0]&&i!==(i=e[2]._id||""))&&(o.value=i),1887502869&t[0]|4&t[1]){let o;for(p=e[0].items,o=0;o<p.length;o+=1){const i=rl(e,p,o);$[o]?($[o].p(i,t),ue($[o],1)):($[o]=dl(i),$[o].c(),ue($[o],1),$[o].m(n,r))}for(ce(),o=p.length;o<$.length;o+=1)h(o);de()}e[0].list?g?(g.p(e,t),1&t[0]&&ue(g,1)):(g=ul(e),g.c(),ue(g,1),g.m(n,null)):g&&(ce(),me(g,1,1,(()=>{g=null})),de());const l={};8&t[3]&&(l.$$scope={dirty:t,ctx:e}),c.$set(l),e[24]&&v.p(e,t)},i(e){if(!u){for(let e=0;e<p.length;e+=1)ue($[e]);ue(g),ue(c.$$.fragment,e),ue(v),u=!0}},o(e){$=$.filter(ol);for(let e=0;e<$.length;e+=1)me($[e]);me(g),me(c.$$.fragment,e),me(v),u=!1},d(e){e&&j(t),N($,e),g&&g.d(),be(c),v&&v.d(),m=!1,b(f)}}}(e);return{c(){o&&o.c(),t=L()},m(e,i){o&&o.m(e,i),_(e,t,i),n=!0},p(e,t){e[89]&&o.p(e,t)},i(e){n||(ue(o),n=!0)},o(e){me(o),n=!1},d(e){o&&o.d(e),e&&j(t)}}}function cl(e){let t,n;return t=new oi({props:{classId:e[16],item:e[93],selection:e[93].selection,record:e[2],disabled:e[9],eventId:e[23],toDelete:e[4]}}),t.$on("task",e[28]),t.$on("notify",e[29]),t.$on("multi",e[30]),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.item=e[93]),1&n[0]&&(o.selection=e[93].selection),4&n[0]&&(o.record=e[2]),512&n[0]&&(o.disabled=e[9]),16&n[0]&&(o.toDelete=e[4]),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function dl(e){let t,n,o="list"!==e[93].type&&e[33](!0,e[93].name),i=o&&cl(e);return{c(){i&&i.c(),t=L()},m(e,o){i&&i.m(e,o),_(e,t,o),n=!0},p(e,n){1&n[0]&&(o="list"!==e[93].type&&e[33](!0,e[93].name)),o?i?(i.p(e,n),1&n[0]&&ue(i,1)):(i=cl(e),i.c(),ue(i,1),i.m(t.parentNode,t)):i&&(ce(),me(i,1,1,(()=>{i=null})),de())},i(e){n||(ue(i),n=!0)},o(e){me(i),n=!1},d(e){i&&i.d(e),e&&j(t)}}}function ul(e){let t,n,o,i,l=e[20]&&0!=e[3]&&ml(e),r=e[21]&&0!=e[6]&&pl(e),s=e[0].list,a=[];for(let t=0;t<s.length;t+=1)a[t]=vl(ll(e,s,t));const c=e=>me(a[e],1,1,(()=>{a[e]=null}));return{c(){l&&l.c(),t=C(),r&&r.c(),n=C();for(let e=0;e<a.length;e+=1)a[e].c();o=L()},m(e,s){l&&l.m(e,s),_(e,t,s),r&&r.m(e,s),_(e,n,s);for(let t=0;t<a.length;t+=1)a[t].m(e,s);_(e,o,s),i=!0},p(e,i){if(e[20]&&0!=e[3]?l?(l.p(e,i),8&i[0]&&ue(l,1)):(l=ml(e),l.c(),ue(l,1),l.m(t.parentNode,t)):l&&(ce(),me(l,1,1,(()=>{l=null})),de()),e[21]&&0!=e[6]?r?(r.p(e,i),64&i[0]&&ue(r,1)):(r=pl(e),r.c(),ue(r,1),r.m(n.parentNode,n)):r&&(ce(),me(r,1,1,(()=>{r=null})),de()),8455077&i[0]|1&i[1]){let t;for(s=e[0].list,t=0;t<s.length;t+=1){const n=ll(e,s,t);a[t]?(a[t].p(n,i),ue(a[t],1)):(a[t]=vl(n),a[t].c(),ue(a[t],1),a[t].m(o.parentNode,o))}for(ce(),t=s.length;t<a.length;t+=1)c(t);de()}},i(e){if(!i){ue(l),ue(r);for(let e=0;e<s.length;e+=1)ue(a[e]);i=!0}},o(e){me(l),me(r),a=a.filter(ol);for(let e=0;e<a.length;e+=1)me(a[e]);i=!1},d(e){l&&l.d(e),e&&j(t),r&&r.d(e),e&&j(n),N(a,e),e&&j(o)}}}function ml(e){let t,n;return t=new e[13]({props:{name:"Total Dokument",nameClass:"formField_italic",$$slots:{default:[fl]},$$scope:{ctx:e}}}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};8&n[0]|8&n[3]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function fl(e){let t,n,o;function i(t){e[43](t)}let l={item:e[19],disabled:!0};return void 0!==e[3]&&(l.value=e[3]),t=new un({props:l}),G.push((()=>he(t,"value",i))),{c(){ge(t.$$.fragment)},m(e,n){ve(t,e,n),o=!0},p(e,o){const i={};!n&&8&o[0]&&(n=!0,i.value=e[3],ne((()=>n=!1))),t.$set(i)},i(e){o||(ue(t.$$.fragment,e),o=!0)},o(e){me(t.$$.fragment,e),o=!1},d(e){be(t,e)}}}function pl(e){let t,n;return t=new e[13]({props:{name:"Gesamtzeit in Wochen",nameClass:"formField_italic",$$slots:{default:[$l]},$$scope:{ctx:e}}}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};64&n[0]|8&n[3]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function $l(e){let t,n,o;function i(t){e[44](t)}let l={item:e[22],disabled:!0};return void 0!==e[6]&&(l.value=e[6]),t=new un({props:l}),G.push((()=>he(t,"value",i))),{c(){ge(t.$$.fragment)},m(e,n){ve(t,e,n),o=!0},p(e,o){const i={};!n&&64&o[0]&&(n=!0,i.value=e[6],ne((()=>n=!1))),t.$set(i)},i(e){o||(ue(t.$$.fragment,e),o=!0)},o(e){me(t.$$.fragment,e),o=!1},d(e){be(t,e)}}}function hl(e){let t,n;return t=new nl({props:{classId:e[16],list:e[90],template:e[7],eventId:e[23],schema:e[90].item,record:e[2],disabled:e[9]}}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.list=e[90]),128&n[0]&&(o.template=e[7]),1&n[0]&&(o.schema=e[90].item),4&n[0]&&(o.record=e[2]),512&n[0]&&(o.disabled=e[9]),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function gl(e){let t,n;return t=new Fi({props:{classId:e[16],list:e[90],template:e[8],eventId:e[23],schema:e[90].item,record:e[2],disabled:e[9],fixed:e[90].fixed,reqQuantity:e[5]}}),t.$on("save",e[31]),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.list=e[90]),256&n[0]&&(o.template=e[8]),1&n[0]&&(o.schema=e[90].item),4&n[0]&&(o.record=e[2]),512&n[0]&&(o.disabled=e[9]),1&n[0]&&(o.fixed=e[90].fixed),32&n[0]&&(o.reqQuantity=e[5]),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function vl(e){let t,n,o,i,l,r;t=new e[11]({props:{text:e[90].designation}});const s=[gl,hl],a=[];function c(e,t){return"array"===e[90].type?0:1}return o=c(e),i=a[o]=s[o](e),{c(){ge(t.$$.fragment),n=C(),i.c(),l=L()},m(e,i){ve(t,e,i),_(e,n,i),a[o].m(e,i),_(e,l,i),r=!0},p(e,n){const r={};1&n[0]&&(r.text=e[90].designation),t.$set(r);let d=o;o=c(e),o===d?a[o].p(e,n):(ce(),me(a[d],1,1,(()=>{a[d]=null})),de(),i=a[o],i?i.p(e,n):(i=a[o]=s[o](e),i.c()),ue(i,1),i.m(l.parentNode,l))},i(e){r||(ue(t.$$.fragment,e),ue(i),r=!0)},o(e){me(t.$$.fragment,e),me(i),r=!1},d(e){be(t,e),e&&j(n),a[o].d(e),e&&j(l)}}}function bl(e){let t;return{c(){t=F("Abbrechen")},m(e,n){_(e,t,n)},d(e){e&&j(t)}}}function yl(e){let t;return{c(){t=F("Speichern und schliessen")},m(e,n){_(e,t,n)},d(e){e&&j(t)}}}function wl(e){let t,n;return t=new e[12]({props:{form:e[16],filled:!0,type:"submit",style:"opacity: 0.75;",$$slots:{default:[kl]},$$scope:{ctx:e}}}),{c(){ge(t.$$.fragment)},m(e,o){ve(t,e,o),n=!0},p(e,n){const o={};8&n[3]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function kl(e){let t;return{c(){t=F("Speichern")},m(e,n){_(e,t,n)},d(e){e&&j(t)}}}function xl(e){return{c:h,m:h,p:h,i:h,o:h,d:h}}function Il(e){let t,n,o,i;il.title=t=e[10];let l={ctx:e,current:null,token:null,hasCatch:!1,pending:xl,then:al,catch:sl,value:89,blocks:[,,,]};return fe(e[25](),l),{c(){n=C(),o=L(),l.block.c()},m(e,t){_(e,n,t),_(e,o,t),l.block.m(e,l.anchor=t),l.mount=()=>o.parentNode,l.anchor=o,i=!0},p(n,o){e=n,(!i||1024&o[0])&&t!==(t=e[10])&&(il.title=t),pe(l,e,o)},i(e){i||(ue(l.block),i=!0)},o(e){for(let e=0;e<3;e+=1){me(l.blocks[e])}i=!1},d(e){e&&j(n),e&&j(o),l.block.d(e),l.token=null,l=null}}}let _l=new Map,jl=new Map,Nl=new Map;const Sl=(e,n)=>{const o=n;return _l.has(o)||_l.set(o,t.getTasksList(n).then((({data:e})=>e))),_l.get(o)},ql=(e,n,o)=>jl.get(o)||Sl(e,n).then((n=>n.find((({_id:e})=>e===o))||t.getTaskList(e,o))).then((e=>(jl.set(o,e),e))),Fl=(e,t)=>{Nl.set(e,t)},Cl=e=>Nl.get(e),Ll=(e,n,o=!1)=>!o&&Nl.get(n)||t.getTask(e,n).then((e=>(Nl.set(n,e),e))),El=(e,n)=>{if(!_l.get(n))return;const o=n;_l.set(o,t.getTasksList(n).then((({data:e})=>e)))},Dl=()=>{_l=new Map,jl=new Map,Nl=new Map};function Tl(e,o,a){let m,f,p,h,g,v,b;k(e,u,(e=>a(52,h=e))),k(e,r,(e=>a(53,g=e))),k(e,s,(e=>a(54,v=e)));const{Divider:y,Button:w,FormField:x}=c,{loggedIn:I,currentTasks:_}=d;k(e,I,(e=>a(55,b=e))),k(e,_,(e=>a(51,p=e)));const j=JSON.parse(i.getItem("Locale")),N=H();let S,q,{schema:F}=o,{recID:C}=o,{prevEventID:L=!1}=o,{prev:E=!1}=o,{taskId:D=!1}=o,{description:T=""}=o,{root:z=!1}=o,{readonly:O}=o,{isStandalone:B}=o,A={},M={},V="form-"+F.class+Math.floor(9e3*Math.random()+1e3).toString();const P=z?"fEmbedded":"fTask",Q=z?"sEmbedded":"sTask";let Y,G,J=0,U=0,Z=1;const K={},X=F.items.find((e=>"price"===e.name&&!e.properties?.hidden)),ee=F.items.find((e=>"quantity"===e.name&&!e.properties?.hidden)),te=!!X,ne=F.list?.filter((e=>"array"===e.type))?.length>1||te,oe=F.items.find((e=>"number"===e.type&&"w"===e.properties?.unit?.constant?.toLowerCase()&&!e.properties?.hidden))?.name,ie=!!oe,le=F.list?.filter((e=>"array"===e.type))?.length>1||ie,re={};let se,ae,ce=0,de=0,ue=[],me=[],fe=[];F.class;let pe=F.id;const $e=!p?.length||p.find((e=>e===pe));["readonly","hidden","required"].map((e=>{F.items.filter((t=>"object"==typeof(t.properties&&t.properties[e]))).map((t=>{const n=t.properties[e].refItem||"",[o,i]=n.split(".");ue.push({action:e,itemName:t.name,refObj:o,refName:i,op:t.properties[e].invert?"!":""})}))}));F.items.filter((e=>e.selection&&e.constraint)).map((e=>{me.push({name:e.name,selection:e.selection,constraint:e.constraint})}));F.items.filter((e=>e.lookup)).map((e=>{fe.push({name:e.name,lookup:e.lookup})}));const he=async e=>{if(e?.length)for(const n of e){if(!n.lookup)break;const{name:e}=n;if(A[e])break;const{domain:o,value:i}=n.lookup;if("user"===o&&i){const n={[i]:b.user},o=await t.getSectionView(e,n);if(o?.length){const[{_id:t}]=o;t&&a(2,A[e]=t,A)}}}},ge=async()=>{if(!F.input)return;if(!F.input.length)return;if(F.input.length<2)return;const e=await t.getEvent(pe),n=!e.input.class[0].name&&e.input.class[0].selection;if(!n)return;const o=e.input.class[1].name,i=e.input.class[1].destination?.split(".")[0];if(!o||!i)return;const l=F.list?.find((e=>e.name===o));if(!l)return;const r=await t.getSchemaByClass(n),s=(await t.getTasks(r.id)).data;if(!s?.length)return;const c=[];for(const e of s){const t={};for(const n of l.item)n.name===i?t[n.name]=e._id:e[n.name]&&(t[n.name]=e[n.name]);c.push(t)}c.length&&a(2,A[o]=c,A)},ve=()=>{for(const e of F.items)e.properties?.value?.concatenation&&be(e)},be=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 we(e.refItemNext));a(2,A[e.name]=n,A)},ye=async e=>{const t=ue.filter((t=>t.refObj===e));if(t?.length)for(const e of t){const{action:t,itemName:n,refObj:o,refName:i,op:l}=e;if(!o)break;let r,s,c=!1;const d=A[o];c=i?(await Ll(o,d))[i]:d,Array.isArray(c)&&0===c.length&&(c=!1),"!"===l&&(c=!c),"required"!==t&&"readonly"!==t||(r=`#${V} .form-field.${n} .field textarea`,s=document.querySelector(r),s||(r=`#${V} .form-field.${n} .field input`,s=document.querySelector(r)),s&&c&&s.setAttribute(t,"true"),s&&!c&&s.removeAttribute(t)),"hidden"===t&&(r=`#${V} .form-field.${n}`,s=document.querySelector(r),s?.classList?.toggle("hidden",c),c&&a(2,A[n]="",A))}},we=async e=>{const[n,o]=e.offset?.split(",")||[0,0],i=+e.base||0,l=+e.step||1;e.type;const r=e.refItem,s=await t.getLastId(F.class,r);if(!s?.length)return(i+l).toString().padStart(o,"0");const a=s[0][r];return((+a?.substring(n,n+o)||i)+l).toString().padStart(o,"0")},ke=(e,t,n=!1)=>{const o=t.name,i=e.find((e=>e.name===o));let l=t.value;if(!n&&i&&i.properties?.multi&&(l=A[o]),l&&i&&i.type.startsWith("date"))try{return No(l,"%d.%m.%Y").toISOString()}catch{return new Date(l).toISOString()}if(i&&"boolean"===i.type&&(l=!!t.checked),i&&"number"===i.type){const e=Number("1.1").toLocaleString(j.id).substring(1,2);try{l=Number(l.replace(e,".")).toString()}catch{}}return l},xe=()=>B?window.close():z?window.singleSpaNavigate("/"):N("back"),Ie=async(e,n)=>{if(F.input?.length>1){if(F.input[0]!==e)return;const o=await t.getEvent(F.id),{recursive:i}=o.input.class[1];if(n){const o=await t.getTaskOptions(`${e}:${n}`,pe,i);a(2,A={...A,...o})}else{const e=F.input.slice(1);for(const t of e)a(2,A[t]=[],A)}}},_e=()=>{let e=0;if(X){let t=1;ee&&(t=Z),e=U*t}let t=0;for(const e in K)t+=K[e];a(3,J=t+e)},je=()=>{let e=0;for(const t in re)e+=re[t];a(6,ce=e+ +de)};var Ne;n.subscribe((async e=>{if(!e)return;if(!C)return;const n=await t.getSchema(e.eventId);if(!n)return;const o=F.list?.find((e=>e.name===n.class));if(!o)return;const i=await t.getTaskById(e.taskId);((e,t,n)=>{if(!_l.get(e))return;const o=t;jl.set(o,n)})(i.event,i.docId,i.data);const l=await t.getTask(n.class,i.docId),r=A[n.class].filter((e=>e[n.class]==l._id));r?.length&&r.map((e=>{e[n.class]=i.docId})),a(2,A),a(42,q),a(41,S),a(0,F)})),R(Dl),Ne=()=>{C&&function(e,t,n=t){e.set(n)}(u,h={[C]:{record:A,lists:M}},h)},W().$$.on_destroy.push(Ne);return e.$$set=e=>{"schema"in e&&a(0,F=e.schema),"recID"in e&&a(38,C=e.recID),"prevEventID"in e&&a(36,L=e.prevEventID),"prev"in e&&a(39,E=e.prev),"taskId"in e&&a(37,D=e.taskId),"description"in e&&a(34,T=e.description),"root"in e&&a(1,z=e.root),"readonly"in e&&a(35,O=e.readonly),"isStandalone"in e&&a(40,B=e.isStandalone)},e.$$.update=()=>{16&e.$$.dirty[1]&&a(9,m=O),1&e.$$.dirty[0]|3072&e.$$.dirty[1]&&q&&S&&F.items.map((({name:e,type:t,refItem:n})=>{if(!1===n)return;const o=S.items.find((t=>t.name===e));if(!o)return;if(t!==o.type)return;const i="_"+e;q[e]&&a(2,A[e]=q[e],A),q[i]&&a(2,A[i]=q[i],A)})),2&e.$$.dirty[0]|8&e.$$.dirty[1]&&a(10,f=z?T||"enablerr - Form":document.title)},[F,z,A,J,Y,G,ce,se,ae,m,f,y,w,x,I,_,V,P,Q,{name:"amountValue",properties:{decimals:2}},ne,le,{name:"weekValue",properties:{decimals:1}},pe,$e,async()=>{if(a(8,ae=await t.getTemplate(F.class)),C||a(7,se=ae),C){if(h&&h[C]){const e=h[C].record;F.items.map((t=>{e[t.name]=ke(F.items,{name:t.name,value:e[t.name],checked:e[t.name]})})),a(2,A=e),F.list&&F.list.map((e=>{"array"===e.type&&h[C].lists[e.name]&&a(2,A[e.name]=h[C].lists[e.name].reduce(((t,n)=>n._delete||!Object.values(n).some(Boolean)?t:t.concat(Object.entries(n).reduce(((t,[n,o])=>("_delete"!==n&&(t[n]=ke(e.item,{name:n,value:o,checked:o},!0)),t)),{}))),[]),A)}))}else a(2,A=await t.getTask(F.class,C));a(34,T=$(F,A))}if(L){a(35,O=!1),a(41,S=await t.getSchema(L)),"string"==typeof E&&a(42,q=await t.getTask(S.class,E));const e=F.items.find((e=>e.refClass===S.class));a(2,A[e.name]=q._id,A)}le&&(de=A[oe]||0);const e=await t.getEvent(pe);if(e.trigger?.startOn&&!e.trigger.startOn.some((e=>e.type.indexOf("Manual")>=0))&&a(35,O=!0),g.role?.length&&F.authorization?.length){const e=F.authorization.some((e=>v?.find((t=>t===e.role&&"edit"===e.activity))));a(35,O||=!e)}return C||(he(e.input?.class),ve(),ge()),!0},async e=>{C||a(9,m=!0);const n=e.submitter?.className?.includes("close"),o={};Array.from(document.querySelectorAll("form#"+V+" ."+V)).map((e=>{if(e.name)if(e.name.includes(".")){const[t,n]=e.name.split("."),i=F.list.find((e=>e.name===t));o[e.name]=ke(i.item,e)}else o[e.name]=ke(F.items,e)})),F.list&&F.list.map((e=>{"array"===e.type&&M[e.name]&&(o[e.name]=M[e.name].reduce(((t,n)=>n._delete||!Object.values(n).some(Boolean)?t:t.concat(Object.entries(n).reduce(((t,[n,o])=>("_delete"!==n&&(t[n]=ke(e.item,{name:n,value:o,checked:o},!0)),t)),{}))),[]))})),o._event=pe,o._prevEventId=L,o._taskId=D;const{id:i,task:r,error:s}=await t.saveData(F.class,o);if(s?.text){const e=s.field?" in "+s.field+": "+s.value:"";return l.failed(`${s.text} ${e}`,3e3),void a(9,m=!1)}l.success("Die Daten wurden gespeichert.",2e3),o._id=i;const c=await t.getTaskList(F.class,i);return N("choose",{row:c}),n?xe():C?void 0:window.singleSpaNavigate(`/task/${pe}/${r}/task`)},()=>L?window.history.back():xe(),async({detail:{row:e,eventId:n}})=>{if((()=>{if(C)for(const e of ue)e.refName||ye(e.itemName)})(),C)return;if(await(async()=>{const e={...A};for(const n of F.items)if(n.refItem&&A[n.refItem]){const o=await t.getTask(n.refItem,A[n.refItem]);o&&(e[n.name]=o[n.name])}for(const n of F.list||[])if(n.refItem&&A[n.refItem]){const o=await t.getTask(n.refItem,A[n.refItem]),i=[];for(const e of o[n.name]){const t={};for(const o of n.item)e[o.name]&&(t[o.name]=e[o.name]);i.push(t)}e[n.name]=i}a(2,A=e)})(),(async(e,n)=>{if(!e)return;const o=(await t.getEvent(e)).output.class[0].name,i=fe.filter((e=>e.lookup===o));if(i?.length)for(const e of i){const{lookup:t,name:o}=e;let i="";if(n){let e=await Ll(t,n);e[o].length&&(i=e[o][0][o])}a(2,A[o]=i,A)}})(n||e._task.event,e._id),!e._task)return;const o=e._task.event,i=await t.getEvent(o),l=await t.getEvent(pe);if(!l.output?.class?.length)return;const r=l.output.class[0]?.item.find((e=>(e.refClass||e.name)===i.output.class[0]?.name));(l.input?.class?.length&&l.input.class[0].name===i.output.class[0]?.name||r?.asInput)&&(a(41,S=await t.getSchema(o)),a(36,L=o),a(37,D=e._task._id),a(42,q=!!D&&await t.getTask(S.class,e._task.docId)),Ie(S.class,e?._task?.docId))},async({detail:e})=>{if("quantity"===e.itemName&&a(5,G=A.quantity),(async(e,t)=>{const n=me.filter((t=>t.selection===e||t.constraint===e));if(n?.length){a(4,Y=!1);for(const o of n){const{selection:n,constraint:i,name:l}=o;if(t)break;a(2,A[l]="",A),e===n&&a(4,Y=i);const r=A[n];if(r&&e===i){let e=await Ll(n,r);const t=A[i];if(t?.length){const n=t[0].split(", ");e=e[i];let o="";for(const t of e)Object.values(t).map((e=>{n.includes(e)&&(o=t[l])}));a(2,A[l]=o,A)}}}}})(e.itemName,e.oldValue===e.value),ye(e.itemName),le&&(e.itemName===oe&&(de=+e.value),je()),te){if(e.itemName===X?.name)U=e.value;else{if(e.itemName!==ee?.name)return;Z=e.value}_e()}},async({detail:e})=>{if(!(F.input?.length&&F.input.length>1))return;if(S?.class!==F.input[0])return;const{value:n,lookup:o,view:i}=e,[l]=o.split(":"),r=(await t.getSectionView(l,{[i]:{$in:n}})).map((e=>e._id));for(const e of F.input.slice(1)){a(2,A[e]=[],A);const n=await t.getSchemaByClass(e);n.id;let o=await t.getTasks(n.id);if(o=o.data.filter((e=>"Ready"===e._task.status&&r.includes(e[l]))),o?.length){const n=o.map((e=>e._id)),i=await t.getSectionView(e,{_id:{$in:n}});for(const t of i)t[e]=t._id;a(2,A[e]=i,A)}}},({detail:e})=>{M[e.listName]=e.value,ne&&(K[e.listName]=e.amountValue,_e()),le&&(re[e.listName]=e.weeksValue||0,je())},e=>{"button"!==e.srcElement?.type&&"textarea"!==e.srcElement?.type&&13==e.which&&e.preventDefault()},(e,t)=>se?(void 0!==se[t]&&a(2,A[t]=se[t],A),e):e,T,O,L,D,C,E,B,S,q,function(e){J=e,a(3,J)},function(e){ce=e,a(6,ce)}]}class zl extends we{constructor(e){var t;super(),il.getElementById("svelte-1pfb5os-style")||((t=S("style")).id="svelte-1pfb5os-style",t.textContent="form.disabled.svelte-1pfb5os input.svelte-1pfb5os{background-color:red !important}form.svelte-1pfb5os.svelte-1pfb5os{min-width:25em}@media only screen and (min-width: 600px){form.svelte-1pfb5os.svelte-1pfb5os{min-width:30em}}.fEmbedded.svelte-1pfb5os.svelte-1pfb5os,.fTask.svelte-1pfb5os.svelte-1pfb5os{overflow-y:auto;padding-right:1em;overflow-x:hidden}.fEmbedded.svelte-1pfb5os.svelte-1pfb5os{height:fit-content;min-height:30vh;max-height:60vh}.fTask.svelte-1pfb5os.svelte-1pfb5os{height:fit-content;max-height:70vh}.sTask.svelte-1pfb5os.svelte-1pfb5os{height:95%;display:inline-grid}.sTask.svelte-1pfb5os .btn.svelte-1pfb5os{display:initial !important}.form--buttons.svelte-1pfb5os.svelte-1pfb5os{display:flex;gap:1em;padding-bottom:0.5em}",I(il.head,t)),ye(this,e,Tl,Il,w,{schema:0,recID:38,prevEventID:36,prev:39,taskId:37,description:34,root:1,readonly:35,isStandalone:40},[-1,-1,-1,-1])}}function Ol(e){let t,n,o;function i(t){e[4](t)}let l={schema:e[5],recID:e[6]};return void 0!==e[0]&&(l.description=e[0]),t=new zl({props:l}),G.push((()=>he(t,"description",i))),t.$on("back",e[2]),{c(){ge(t.$$.fragment)},m(e,n){ve(t,e,n),o=!0},p(e,o){const i={};32&o&&(i.schema=e[5]),64&o&&(i.recID=e[6]),!n&&1&o&&(n=!0,i.description=e[0],ne((()=>n=!1))),t.$set(i)},i(e){o||(ue(t.$$.fragment,e),o=!0)},o(e){me(t.$$.fragment,e),o=!1},d(e){be(t,e)}}}function Bl(e){let t,n;return t=new a({props:{update:e[1],description:e[0],$$slots:{default:[Ol,({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(){ge(t.$$.fragment)},m(e,o){ve(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||(ue(t.$$.fragment,e),n=!0)},o(e){me(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Al(e,n,o){let i,{refresh:l}=n;return e.$$set=e=>{"refresh"in e&&o(3,l=e.refresh)},[i,(e,n)=>t.getSchema(e).then((t=>({schema:t,recID:n,eventID:e,title:t.identity.designation}))),e=>{},l,function(e){i=e,o(0,i)}]}function Ml(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vl,Pl,Wl=(Vl=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){i(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 i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e){return l="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},l(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("object"!==l(e))throw new Error("single-spa-svelte requires a configuration object");var t=o(o({},r),e);if(!t.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:s.bind(null,t,n),mount:a.bind(null,t,n),unmount:c.bind(null,t,n),update:d.bind(null,t,n)}};var r={component:null,domElementGetter:null,props:{}};function s(e){return Promise.resolve()}function a(e,t,n){var i=Object.keys(r),l=Object.keys(e).reduce((function(t,n){return i.includes(n)||(t[n]=e[n]),t}),{});return Promise.resolve().then((function(){var i=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),r=i();t.instance=new e.component(o(o({},l),{},{target:r,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)}))}},Vl(Pl={exports:{}},Pl.exports),Pl.exports);const Rl=Ml(Wl)({component:class extends we{constructor(e){super(),ye(this,e,Al,Bl,w,{refresh:3})}},domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:Hl,mount:Ql,unmount:Yl}=Rl;e({bootstrap:Hl,mount:Ql,unmount:Yl});e("Form",zl),e("List",at),e("Template",class extends we{constructor(e){var t;super(),Ci.getElementById("svelte-1phofh5-style")||((t=S("style")).id="svelte-1phofh5-style",t.textContent="form.svelte-1phofh5.svelte-1phofh5{min-width:25em}@media only screen and (min-width: 600px){form.svelte-1phofh5.svelte-1phofh5{min-width:30em}}.fEmbedded.svelte-1phofh5.svelte-1phofh5,.fTask.svelte-1phofh5.svelte-1phofh5{overflow-y:auto;padding-right:1em;overflow-x:hidden}.fEmbedded.svelte-1phofh5.svelte-1phofh5{height:fit-content;min-height:30vh;max-height:60vh}.fTask.svelte-1phofh5.svelte-1phofh5{height:fit-content;max-height:70vh}.sTask.svelte-1phofh5.svelte-1phofh5{height:95%;display:inline-grid;min-width:40em}.sTask.svelte-1phofh5 .btn.svelte-1phofh5{display:initial !important}.form--buttons.svelte-1phofh5.svelte-1phofh5{display:flex;gap:1em;padding-bottom:0.5em}",I(Ci.head,t)),ye(this,e,Hi,Wi,w,{schema:0,record:1})}})}}}));
|