clean install

This commit is contained in:
matze committed 2024-12-10 15:08:16 +01:00
commit e14eb2d8fd
31193 files changed
+3555714

No files matched your search

@@ -0,0 +1,25 @@
"use strict";var yu=Object.defineProperty;var ku=(n,t,r)=>t in n?yu(n,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[t]=r;var wt=(n,t,r)=>ku(n,typeof t!="symbol"?t+"":t,r);function be(){}function xt(n,t){for(const r in t)n[r]=t[r];return n}function go(n){return n()}function _r(){return Object.create(null)}function Ht(n){n.forEach(go)}function Tn(n){return typeof n=="function"}function nt(n,t){return n!=n?t==t:n!==t||n&&typeof n=="object"||typeof n=="function"}let Ns;function wr(n,t){return n===t?!0:(Ns||(Ns=document.createElement("a")),Ns.href=t,n===Ns.href)}function pu(n){return Object.keys(n).length===0}function _o(n,...t){if(n==null){for(const i of t)i(void 0);return be}const r=n.subscribe(...t);return r.unsubscribe?()=>r.unsubscribe():r}function ne(n,t,r){n.$$.on_destroy.push(_o(t,r))}function Ni(n,t,r,i){if(n){const o=wo(n,t,r,i);return n[0](o)}}function wo(n,t,r,i){return n[1]&&i?xt(r.ctx.slice(),n[1](i(t))):r.ctx}function Ai(n,t,r,i){if(n[2]&&i){const o=n[2](i(r));if(t.dirty===void 0)return o;if(typeof o=="object"){const u=[],c=Math.max(t.dirty.length,o.length);for(let d=0;d<c;d+=1)u[d]=t.dirty[d]|o[d];return u}return t.dirty|o}return t.dirty}function Fi(n,t,r,i,o,u){if(o){const c=wo(t,r,i,u);n.p(c,o)}}function Ui(n){if(n.ctx.length>32){const t=[],r=n.ctx.length/32;for(let i=0;i<r;i++)t[i]=-1;return t}return-1}function bu(n){const t={};for(const r in n)r[0]!=="$"&&(t[r]=n[r]);return t}function yr(n,t){const r={};t=new Set(t);for(const i in n)!t.has(i)&&i[0]!=="$"&&(r[i]=n[i]);return r}function js(n){return n??""}function Te(n,t,r){return n.set(r),t}function en(n){return n&&Tn(n.destroy)?n.destroy:be}function $(n,t){n.appendChild(t)}function I(n,t,r){n.insertBefore(t,r||null)}function U(n){n.parentNode&&n.parentNode.removeChild(n)}function tn(n,t){for(let r=0;r<n.length;r+=1)n[r]&&n[r].d(t)}function j(n){return document.createElement(n)}function vu(n){return document.createElementNS("http://www.w3.org/2000/svg",n)}function Lt(n){return document.createTextNode(n)}function We(){return Lt(" ")}function je(){return Lt("")}function yt(n,t,r,i){return n.addEventListener(t,r,i),()=>n.removeEventListener(t,r,i)}function kr(n){return function(t){return t.stopPropagation(),n.call(this,t)}}function H(n,t,r){r==null?n.removeAttribute(t):n.getAttribute(t)!==r&&n.setAttribute(t,r)}function Su(n){return Array.from(n.childNodes)}function nn(n,t){t=""+t,n.data!==t&&(n.data=t)}function F(n,t,r,i){r==null?n.style.removeProperty(t):n.style.setProperty(t,r,"")}let As;function Mu(){if(As===void 0){As=!1;try{typeof window<"u"&&window.parent&&window.parent.document}catch{As=!0}}return As}function pr(n,t){getComputedStyle(n).position==="static"&&(n.style.position="relative");const i=j("iframe");i.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),i.setAttribute("aria-hidden","true"),i.tabIndex=-1;const o=Mu();let u;return o?(i.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",u=yt(window,"message",c=>{c.source===i.contentWindow&&t()})):(i.src="about:blank",i.onload=()=>{u=yt(i.contentWindow,"resize",t),t()}),$(n,i),()=>{(o||u&&i.contentWindow)&&u(),U(i)}}function re(n,t,r){n.classList.toggle(t,!!r)}function Du(n,t,{bubbles:r=!1,cancelable:i=!1}={}){return new CustomEvent(n,{detail:t,bubbles:r,cancelable:i})}class Yn{constructor(t=!1){wt(this,"is_svg",!1);wt(this,"e");wt(this,"n");wt(this,"t");wt(this,"a");this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,r,i=null){this.e||(this.is_svg?this.e=vu(r.nodeName):this.e=j(r.nodeType===11?"TEMPLATE":r.nodeName),this.t=r.tagName!=="TEMPLATE"?r:r.content,this.c(t)),this.i(i)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(t){for(let r=0;r<this.n.length;r+=1)I(this.t,this.n[r],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(U)}}function qs(n,t){return new n(t)}let fs;function cs(n){fs=n}function ms(){if(!fs)throw new Error("Function called outside component initialization");return fs}function yo(n){ms().$$.on_mount.push(n)}function ko(n){ms().$$.on_destroy.push(n)}function gs(){const n=ms();return(t,r,{cancelable:i=!1}={})=>{const o=n.$$.callbacks[t];if(o){const u=Du(t,r,{cancelable:i});return o.slice().forEach(c=>{c.call(n,u)}),!u.defaultPrevented}return!0}}function pn(n,t){return ms().$$.context.set(n,t),t}function Pe(n){return ms().$$.context.get(n)}function Zs(n,t){const r=n.$$.callbacks[t.type];r&&r.slice().forEach(i=>i.call(this,t))}const jn=[],bn=[];let Zn=[];const br=[],po=Promise.resolve();let Li=!1;function bo(){Li||(Li=!0,po.then(vo))}function vr(){return bo(),po}function hs(n){Zn.push(n)}const Ri=new Set;let Bn=0;function vo(){if(Bn!==0)return;const n=fs;do{try{for(;Bn<jn.length;){const t=jn[Bn];Bn++,cs(t),Tu(t.$$)}}catch(t){throw jn.length=0,Bn=0,t}for(cs(null),jn.length=0,Bn=0;bn.length;)bn.pop()();for(let t=0;t<Zn.lLine truncated
opacity 0.2s;pointer-events:all;touch-action:none}.sg-task-background.svelte-38aze4.svelte-38aze4{position:absolute;height:100%;top:0}.sg-task-content.svelte-38aze4.svelte-38aze4{position:absolute;height:100%;top:0;padding-left:14px;font-size:14px;display:flex;align-items:center;justify-content:flex-start;user-select:none}.sg-task.animating.svelte-38aze4.svelte-38aze4:not(.moving){transition:left 0.2s,
top 0.2s,
transform 0.2s,
background-color 0.2s,
width 0.2s,
height 0.2s}.sg-task--sticky.svelte-38aze4.svelte-38aze4:not(.moving){transition:left 0.2s,
top 0.2s,
transform 0.2s,
background-color 0.2s,
width 0.2s,
height 0.2s}.sg-task--sticky.svelte-38aze4>.sg-task-content.svelte-38aze4{position:sticky;left:0;max-width:100px}.sg-task.moving.svelte-38aze4.svelte-38aze4{z-index:10000;opacity:0.5}.sg-task.resize-enabled.svelte-38aze4.svelte-38aze4:hover::before{content:'';width:4px;height:50%;top:25%;position:absolute;border-style:solid;border-color:rgba(255, 255, 255, 0.5);cursor:ew-resize;margin-left:3px;left:0;border-width:0 1px;z-index:1}.sg-task.resize-enabled.svelte-38aze4.svelte-38aze4:hover::after{content:'';width:4px;height:50%;top:25%;position:absolute;border-style:solid;border-color:rgba(255, 255, 255, 0.5);cursor:ew-resize;margin-right:3px;right:0;border-width:0 1px;z-index:1}.sg-task-reflected.svelte-38aze4.svelte-38aze4{opacity:0.5}.sg-task-instant.svelte-38aze4.svelte-38aze4{width:2px !important;margin-left:-1px}.sg-task-background.svelte-38aze4.svelte-38aze4{background:rgba(0, 0, 0, 0.2)}.sg-task-default{color:white;background:rgb(116, 191, 255)}.sg-task-default:hover{background:rgb(98, 161, 216)}.sg-task-default.selected{background:rgb(69, 112, 150)}.sg-task-selected{outline:2px solid rgba(3, 169, 244, 0.5);outline-offset:3px;z-index:1}.sg-milestone.svelte-38aze4.svelte-38aze4{width:20px !important;min-width:40px;margin-left:-20px}.sg-task.sg-milestone.svelte-38aze4.svelte-38aze4{background:transparent}.sg-milestone.svelte-38aze4 .sg-milestone__diamond.svelte-38aze4{position:relative}.sg-milestone.svelte-38aze4 .sg-milestone__diamond.svelte-38aze4:before{position:absolute;top:0;left:50%;content:' ';height:28px;width:28px;transform-origin:0 0;transform:rotate(45deg)}.sg-milestone__diamond:before{background:rgb(116, 191, 255)}`;st(Au);function Sr(n){let t;return{c(){t=j("div"),H(t,"class","sg-milestone__diamond svelte-38aze4")},m(r,i){I(r,t,i)},d(r){r&&U(t)}}}function Mr(n){let t;return{c(){t=j("div"),H(t,"class","sg-task-background svelte-38aze4"),F(t,"width",n[0].amountDone+"%")},m(r,i){I(r,t,i)},p(r,i){i&1&&F(t,"width",r[0].amountDone+"%")},d(r){r&&U(t)}}}function Fu(n){let t=n[0].label+"",r;return{c(){r=Lt(t)},m(i,o){I(i,r,o)},p(i,o){o&1&&t!==(t=i[0].label+"")&&nn(r,t)},d(i){i&&U(r)}}}function Uu(n){let t,r=n[12](n[0])+"",i;return{c(){t=new Yn(!1),i=je(),t.a=i},m(o,u){t.m(r,o,u),I(o,i,u)},p(o,u){u&1&&r!==(r=o[12](o[0])+"")&&t.p(r)},d(o){o&&(U(i),t.d())}}}function Iu(n){let t,r=n[0].html+"",i;return{c(){t=new Yn(!1),i=je(),t.a=i},m(o,u){t.m(r,o,u),I(o,i,u)},p(o,u){u&1&&r!==(r=o[0].html+"")&&t.p(r)},d(o){o&&(U(i),t.d())}}}function Dr(n){let t,r=n[0].buttonHtml+"",i,o,u;return{c(){t=j("span"),H(t,"class",i="sg-task-button "+n[0].buttonClasses+" svelte-38aze4"),H(t,"role","button"),H(t,"tabindex","0")},m(c,d){I(c,t,d),t.innerHTML=r,o||(u=yt(t,"click",n[15]),o=!0)},p(c,d){d&1&&r!==(r=c[0].buttonHtml+"")&&(t.innerHTML=r),d&1&&i!==(i="sg-task-button "+c[0].buttonClasses+" svelte-38aze4")&&H(t,"class",i)},d(c){c&&U(t),o=!1,u()}}}function Tr(n){let t,r=n[0].labelBottom+"",i;return{c(){t=j("span"),i=Lt(r),H(t,"class","sg-label-bottom svelte-38aze4")},m(o,u){I(o,t,u),$(t,i)},p(o,u){u&1&&r!==(r=o[0].labelBottom+"")&&nn(i,r)},d(o){o&&U(t)}}}function Bu(n){let t,r,i,o,u,c,d,h,m,y,M,p=n[0].type==="milestone"&&Sr(),R=n[0].amountDone&&Mr(n);function D(v,S){return v[0].html?Iu:v[12]?Uu:Fu}let C=D(n),w=C(n),T=n[0].showButton&&Dr(n),b=n[0].labelBottom&&Tr(n);return{c(){t=j("div"),p&&p.c(),r=We(),R&&R.c(),i=We(),o=j("div"),w.c(),u=We(),T&&T.c(),c=We(),b&&b.c(),H(o,"class","sg-task-content svelte-38aze4"),H(t,"data-task-id",d=n[0].id),H(t,"class",h="sg-task "+n[9]+" svelte-38aze4"),F(t,"width",n[4]+"px"),F(t,"height",n[1]+"px"),F(t,"left",n[2]+"px"),F(t,"top",n[3]+"px"),re(t,"sg-milestone",n[0].type==="milestone"),re(t,"moving",n[8]),re(t,"animating",n[6]),re(t,"sg-task-reflected",n[5]),re(t,"sg-task-selected",n[10][n[0].id]),re(t,"resize-enabled",n[7]),re(t,"sg-task--sticky",n[0].stickyLabel),re(t,"sg-ignore-click",Yr),re(t,"sg-task-instant",n[4]===0)},m(v,S){I(v,t,S),p&&p.m(t,null),$(t,r),R&&R.m(t,null),$(t,i),$(t,o),w.m(o,null),$(o,u),T&&T.m(o,null),$(t,c),b&&b.m(t,null),y||(M=[en(m=n[14].call(null,t,n[0])),yt(t,"pointerdown",n[19])],y=!0)},p(v,[S]){v[0].type==="milestone"?p||(p=Sr(),p.c(),p.m(t,r)):p&&(p.d(1),p=null),v[0].amountDone?R?R.p(v,S):(R=Mr(v),R.c(),R.m(t,i)):R&&(R.d(1),R=null),C===(C=D(v))&&w?w.p(v,S):(w.d(1),w=C(v),w&&(w.c(),w.m(o,u))),v[0].showButton?T?T.p(v,S):(T=Dr(v),T.c(),T.m(o,null)):T&&(T.d(1),T=null),v[0].labelBottom?b?b.p(v,S):(b=Tr(v),b.c(),b.m(t,null)):b&&(b.d(1),b=null),S&1&&d!==(d=v[0].id)&&H(t,"data-task-id",d),S&512&&h!==(h="sg-task "+v[9]+" svelte-38aze4")&&H(t,"class",h),S&16&&F(t,"width",v[4]+"px"),S&2&&F(t,"height",v[1]+"px"),S&4&&F(t,"left",v[2]+"px"),S&8&&F(t,"top",v[3]+"px"),m&&Tn(m.update)&&S&1&&m.update.call(null,v[0]),S&513&&re(t,"sg-milestone",v[0].type==="milestone"),S&768&&re(t,"moving",v[8]),S&576&&re(t,"animating",v[6]),S&544&&re(t,"sg-task-reflected",v[5]),S&1537&&re(t,"sg-task-selected",v[10][v[0].id]),S&640&&re(t,"resize-enabled",v[7]),S&513&&re(t,"sg-task--stick Line truncated
-45deg,
rgba(0, 0, 0, 0) 46%,
#e03218 49%,
#e03218 51%,
rgba(0, 0, 0, 0) 55%
);background-size:6px 6px !important;color:red;font-weight:400}.sg-time-range-label.svelte-w7p5la{margin-top:10px;background:#fff;white-space:nowrap;padding:4px;font-weight:400;font-size:10px}`;st(Qu);function Cr(n){let t,r=n[0].label+"",i;return{c(){t=j("div"),i=Lt(r),H(t,"class","sg-time-range-label svelte-w7p5la")},m(o,u){I(o,t,u),$(t,i)},p(o,u){u&1&&r!==(r=o[0].label+"")&&nn(i,r)},d(o){o&&U(t)}}}function Ju(n){let t,r,i=n[0].label&&Cr(n);return{c(){t=j("div"),i&&i.c(),H(t,"class",r="sg-time-range "+n[4]+" svelte-w7p5la"),F(t,"width",n[2]+"px"),F(t,"left",n[1]+"px"),re(t,"moving",n[3])},m(o,u){I(o,t,u),i&&i.m(t,null)},p(o,[u]){o[0].label?i?i.p(o,u):(i=Cr(o),i.c(),i.m(t,null)):i&&(i.d(1),i=null),u&16&&r!==(r="sg-time-range "+o[4]+" svelte-w7p5la")&&H(t,"class",r),u&4&&F(t,"width",o[2]+"px"),u&2&&F(t,"left",o[1]+"px"),u&24&&re(t,"moving",o[3])},i:be,o:be,d(o){o&&U(t),i&&i.d()}}}function Ku(n,t,r){let i,{model:o}=t,{left:u}=t,{width:c}=t,{resizing:d=!1}=t;return n.$$set=h=>{"model"in h&&r(0,o=h.model),"left"in h&&r(1,u=h.left),"width"in h&&r(2,c=h.width),"resizing"in h&&r(3,d=h.resizing)},n.$$.update=()=>{n.$$.dirty&1&&r(4,i=_s(o.classes))},[o,u,c,d,i]}class $u extends dt{constructor(t){super(),ut(this,t,Ku,Ju,nt,{model:0,left:1,width:2,resizing:3})}}const ed=2,td=2;function Rr(n){return n instanceof Function?()=>n():()=>n}function To(n,t){const r=Yo(t);return n.addEventListener("pointerdown",r),{destroy(){n.removeEventListener("pointerdown",r,!1)}}}function Yo(n){let t,r,i,o,u=!1,c=!1,d,h,m=!1;const y=Rr(n.dragAllowed),M=Rr(n.resizeAllowed);function p(C){if(!So(C))return;C.stopPropagation(),C.preventDefault();const w=y(),T=M();if(!w&&!T)return;const b=n.getX(C),v=n.getY(C),S=n.getWidth();d=C.clientX,h=C.clientY,i=b+S,t=qn(n.container,C).x-b,r=qn(n.container,C).y-v,T&&t<=n.resizeHandleWidth&&(o="left",c=!0),T&&t>=S-n.resizeHandleWidth&&(o="right",c=!0),w&&!c&&(u=!0),(u||c)&&n.onDown&&n.onDown({mouseEvent:C,x:b,width:S,y:v,resizing:c,dragging:u}),window.addEventListener("pointermove",R,!1),zu(window,"pointerup",D)}function R(C){if(!m)if(Math.abs(C.clientX-d)>ed||Math.abs(C.clientY-h)>td)m=!0;else return;if(C.preventDefault(),c){const w=qn(n.container,C),T=n.getX(C),b=n.getWidth();let v,S;o==="left"?i-w.x<=0?(o="right",v=i,S=i-w.x,i=i+b):(v=w.x,S=i-w.x):o==="right"&&(w.x-T<=0?(o="left",v=w.x,S=w.x-T,i=T):(v=T,S=w.x-T)),n.onResize&&n.onResize({x:v,width:S,event:C})}if(u&&n.onDrag){const w=qn(n.container,C);n.onDrag({x:w.x-t,y:w.y-r,event:C})}}function D(C){const w=n.getX(C),T=n.getY(C),b=n.getWidth();n.onMouseUp&&n.onMouseUp(),m&&n.onDrop&&n.onDrop({mouseEvent:C,x:w,y:T,width:b,dragging:u,resizing:c}),t=null,r=null,i=null,u=!1,c=!1,d=null,h=null,m=!1,window.removeEventListener("pointermove",R,!1)}return p}const nd=n=>({}),Pr=n=>({context:n[6]});function sd(n){let t;const r=n[9].default,i=Ni(r,n,n[8],Pr);return{c(){i&&i.c()},m(o,u){i&&i.m(o,u),t=!0},p(o,[u]){i&&i.p&&(!t||u&256)&&Fi(i,r,o,o[8],t?Ai(r,o[8],u,nd):Ui(o[8]),Pr)},i(o){t||(ee(i,o),t=!0)},o(o){le(i,o),t=!1},d(o){i&&i.d(o)}}}function id(n,t,r){let i,o,u,c,d,h,{$$slots:m={},$$scope:y}=t,{items:M={}}=t,p=[];const R=Ae(!1);ne(n,R,x=>r(15,d=x));const D=Ae({});ne(n,D,x=>r(13,u=x));const{taskStore:C,rowStore:w}=Pe("dataStore");ne(n,C,x=>r(14,c=x)),ne(n,w,x=>r(12,o=x));const T=Pe("gantt"),{rowPadding:b}=Pe("options");ne(n,b,x=>r(11,i=x));const{api:v,utils:S,columnService:V,selectionManager:q}=Pe("services"),Z=gs(),X=q._selectedTasks;ne(n,X,x=>r(16,h=x));const Me={rootState:D,dragAllowed({model:x}){const K=o.entities[x.resourceId].model;return zi(K)&&zi(x)},resizeAllowed({model:x}){const K=o.entities[x.resourceId].model;return x.type!=="milestone"&&Dn(K)&&Dn(x)},off(x){delete u[x]},save(x,K,we){Xs(we.dragging?"move":"e-resize");const{mouseEvent:ye}=we;let se=[K];if(ye.ctrlKey)for(const[me,Oe]of Object.entries(h))Oe&&me!==String(K.model.id)&&se.push(c.entities[me]);p=[];for(const me of se)p.push(me.model.id),Te(D,u[me.model.id]={xDelta:me.left-x.x,yDelta:me.top-x.y,width:me.width,bWidth:x.width,widthDelta:me.width-x.width},u);Z("itemsChange",{items:u})},dropAll(x){if(!x.dragging&&!x.resizing)return;Te(R,d=!1,d);const K=[];for(const we of p){const ye=u[we],se=c.entities[we],me=se.model.id===we,Oe=ze({...x,mouseEvent:{...x.mouseEvent,clientX:x.mouseEvent.clientX+ye.xDelta,clientY:x.mouseEvent.clientY+ye.yDelta},x:x.x+ye.xDelta,y:x.y+ye.yDelta,width:Math.abs((me?x.width:ye.bWidth)+ye.widthDelta)},se);K.push({valid:Oe.valid,task:Oe.task,targetRow:Oe.targetRow,sourceRow:Oe.sourceRow,current:Oe.current,previous:Oe.previous})}Z("change",{changes:K}),Te(D,u={},u),p=[],Z("itemsChange",{items:u})},moveAll({x,y:K,width:we,event:ye},se,me){var Oe;Mo(ye,T.mainContainer),me.dragging&&v.tasks.raise.move(se.model),me.resizing&&v.tasks.raise.resize(se.model);for(const ke of p){const G=u[ke],it=se.model.id===ke,xe={x:x!=null?x+G.xDelta:null,y:K!=null?K+G.yDelta:null,width:we!=null?Math.abs((it?we:G.bWidth)+G.widthDelta):null};Te(D,u[ke]={...u[ke],...me,x:xe.x,y:xe.y,widt Line truncated
transform 0.2s}.sg-resize.svelte-1vzamdy:hover{transform:translateX(-2px);width:10px}`;st(Fd);function Ud(n){let t,r,i;return{c(){t=j("div"),H(t,"class","sg-resize svelte-1vzamdy"),F(t,"left",n[0]+"px")},m(o,u){I(o,t,u),r||(i=en(n[1].call(null,t)),r=!0)},p(o,[u]){u&1&&F(t,"left",o[0]+"px")},i:be,o:be,d(o){o&&U(t),r=!1,i()}}}function Id(n,t,r){const i=gs();let{x:o}=t,{container:u}=t;const c={onDrag:h=>{r(0,o=h.x),i("resize",{left:o}),Xs("col-resize")},onDrop:h=>{r(0,o=h.x),i("resize",{left:o}),Xs("default")},dragAllowed:!0,resizeAllowed:!1,container:u,getX:()=>o,getY:()=>0,getWidth:()=>0};function d(h){const m=To(h,c);return{destroy:()=>m.destroy()}}return n.$$set=h=>{"x"in h&&r(0,o=h.x),"container"in h&&r(2,u=h.container)},n.$$.update=()=>{n.$$.dirty&4&&(c.container=u)},[o,d,u]}class Bd extends dt{constructor(t){super(),ut(this,t,Id,Ud,nt,{x:0,container:2})}}function ct(){const n=[];function t(...i){for(const o of n)o(i)}function r(i){return n.push(i),()=>{const u=n.indexOf(i);n.splice(u,1)}}return[r,t]}function xi(n){const t={on:{},raise:{}};for(const r in n){const[i,o]=n[r];t.on[r]=i,t.raise[r]=o}return t}const Gd={};function Vd(){return pn(Gd,jd())}function jd(){return{tasks:xi({move:ct(),resize:ct(),select:ct(),switchRow:ct(),moveEnd:ct(),change:ct(),changed:ct(),dblclicked:ct()}),gantt:xi({viewChanged:ct(),dateSelected:ct()}),timeranges:xi({clicked:ct(),resized:ct(),changed:ct()})}}function qd(n){return{createTask:t=>Zd(t,n),reflectTask:(t,r)=>Xd(t,r,n)}}function Zd(n,t){n.amountDone=n.amountDone??0,n.showButton=n.showButton??!1,n.buttonClasses=n.buttonClasses??"",n.buttonHtml=n.buttonHtml??"";const r=t.getPositionByDate(n.from)|0,i=t.getPositionByDate(n.to)|0,o=t.rowEntities[n.resourceId],u=(o?o.height:void 0)-2*t.rowPadding,c=(o?o.y:-1e3)+t.rowPadding;return{model:n,left:r,width:i-r,height:u,top:c}}function Xd(n,t,r){const i=`reflected-task-${String(n.model.id)}-${String(t.model.id)}`,o={...n.model,resourceId:t.model.id,id:i,enableDragging:!1};return{...n,model:o,top:t.y+r.rowPadding,reflected:!0,reflectedOnParent:!1,reflectedOnChild:!0,originalId:n.model.id}}function Hi(n,t){const r={y:0,result:[]};return Co(n,r,t),r.result}function Co(n,t,r,i=null,o=0,u=[]){const c=[],d=[];i&&(u=[...u,i]);for(const h of n){const m=Qd(h,t.y,r);if(t.result.push(m),c.push(m),d.push(m),m.childLevel=o,m.parent=i,m.allParents=u,i&&(m.hidden=!(i.model.expanded||i.model.expanded==null)||i.hidden!=null&&i.hidden),m.hidden||(t.y+=m.height),h.children){const y=Co(h.children,t,r,m,o+1,u);m.children=y.rows,m.allChildren=y.allRows,d.push(...y.allRows)}}return{rows:c,allRows:d}}function Qd(n,t,r){const i=n.height??r.rowHeight;return{model:n,y:t,height:i}}function Jd(n){n.model.expanded=!0,n.children&&Po(n.children)}function Kd(n){n.model.expanded=!1,n.children&&Ro(n.children)}function Ro(n){for(const t of n)t.children&&Ro(t.children),t.hidden=!0}function Po(n,t=!1){for(const r of n)r.children&&Po(r.children,!r.model.expanded),r.hidden=t}class $d{constructor(t){wt(this,"columnService");this.columnService=t}create(t){t.resizable=t.resizable===void 0?!0:t.resizable;const r=this.columnService.getPositionByDate(t.from),i=this.columnService.getPositionByDate(t.to);return{model:t,left:r,width:i-r,resizing:!1}}}class ec{constructor(t){wt(this,"taskStore");wt(this,"_selectedTasks",Ae({}));this.taskStore=t}selectSingle(t){this.unSelectTasks(),this._selectedTasks.set({[t]:!0})}toggleSelection(t){this._selectedTasks.update(r=>({...r,[t]:!r[t]}))}unSelectTasks(){this._selectedTasks.set({})}}function tc(n){function t(i){const o=sc(n.columns,i);return o[0]?o[0]:o[1]}function r(i){const o=nc(n.columns,i);return o[0]?o[0]:o[1]}return{getColumnByDate:t,getColumnByPosition:r,getPositionByDate(i){if(!i)return null;const o=t(i),c=(i-o.from)/o.duration*o.width;return o.left+c},getDateByPosition(i){const o=r(i);i=i-o.left;let u=o.duration/o.width*i;return o.from+u},roundTo(i){return Math.round(i/n.magnetDuration)*n.magnetDuration}}}function nc(n,t){return Do(n,t,i=>i.left)}function sc(n,t){return Do(n,t,i=>i.from)}function ic(){const n={};return{onDelegatedEvent(t,r,i){n[t]||(n[t]={}),n[t][r]=i},offDelegatedEvent(t,r){delete n[t][r]},onEvent(t){const{type:r,target:i}=t,o=n[r];if(!o)return;let u,c=i;for(;c&&c!=t.currentTarget&&!(u=rc(o,c));)c=c.parentElement;u&&o[u.attr]?o[u.attr](t,u.data,c):o.empty&&o.empty(t,null,c)}}}function rc(n,t){let r;for(const i in n)if(r=t.getAttribute(i))return{attr:i,data:r}}class oc{format(t,r){const i=new Date(t);switch(r){case"H":return i.getHours()+"";case"HH":return Vn(i.getHours());case"H:mm":return`${i.getHours()}:${Vn(i.getMinutes())}`;case"hh:mm":return`${Vn(i.getHours())}:${Vn(i.getMinutes())}`;case"hh:mm:ss":return`${i.getHours()}:${Vn(i.getMinutes())}:${Vn(i.getSeconds())}`;case"dd/MM/yyyy":return`${i.getDate()}/${i.getMonth()+1}/${i.getFullYear()}`;case"dd/MM/yyyy hh:mm":return`${i.getDate()}/${i.getMonth()+1}/${i.getFullYear()} ${i.getHours()}:${i.getMinutes()}`;case"dd/MM/yyyy hh:mm:ss":return`${Line truncated
background-color 0.2s,
width 0s !important}.sg-view:not(:first-child){margin-left:5px}.sg-timeline.svelte-1csmpwr{flex:1 1 0%;display:flex;flex-direction:column;overflow-x:auto}.sg-gantt.svelte-1csmpwr{display:flex;width:100%;height:100%;position:relative}.sg-foreground.svelte-1csmpwr{box-sizing:border-box;overflow:hidden;top:0;left:0;position:absolute;width:100%;height:100%;z-index:1;pointer-events:none}.sg-rows.svelte-1csmpwr{width:100%;box-sizing:border-box;overflow:hidden}.sg-timeline-body.svelte-1csmpwr{overflow:auto;flex:1 1 auto}.sg-header-scroller.svelte-1csmpwr{overflow:hidden;position:relative}.content.svelte-1csmpwr{position:relative}*{box-sizing:border-box}`;st(gc);function Vr(n,t,r){const i=n.slice();return i[164]=t[r],i}function jr(n,t,r){const i=n.slice();return i[167]=t[r],i}function qr(n,t,r){const i=n.slice();return i[172]=t[r],i}function Zr(n,t,r){const i=n.slice();return i[175]=t[r],i}function Xr(n,t,r){const i=n.slice();return i[172]=t[r],i}function Qr(n,t,r){const i=n.slice();return i[164]=t[r],i}function Jr(n){let t,r,i,o;const u=[{rowContainerHeight:n[12]},{paddingTop:n[25]},{tableWidth:n[2]},n[62],{visibleRows:n[13]}];var c=n[164];function d(h,m){let y={};for(let M=0;M<u.length;M+=1)y=xt(y,u[M]);return m!==void 0&&m[0]&33566724|m[2]&1&&(y=xt(y,Sn(u,[m[0]&4096&&{rowContainerHeight:h[12]},m[0]&33554432&&{paddingTop:h[25]},m[0]&4&&{tableWidth:h[2]},m[2]&1&&Mn(h[62]),m[0]&8192&&{visibleRows:h[13]}]))),{props:y}}return c&&(t=qs(c,d(n))),i=new Bd({props:{x:n[2],container:n[18]}}),i.$on("resize",n[54]),{c(){t&&Ke(t.$$.fragment),r=We(),Ke(i.$$.fragment)},m(h,m){t&&Ge(t,h,m),I(h,r,m),Ge(i,h,m),o=!0},p(h,m){if(m[0]&16&&c!==(c=h[164])){if(t){kt();const M=t;le(M.$$.fragment,1,0,()=>{Ve(M,1)}),pt()}c?(t=qs(c,d(h,m)),Ke(t.$$.fragment),ee(t.$$.fragment,1),Ge(t,r.parentNode,r)):t=null}else if(c){const M=m[0]&33566724|m[2]&1?Sn(u,[m[0]&4096&&{rowContainerHeight:h[12]},m[0]&33554432&&{paddingTop:h[25]},m[0]&4&&{tableWidth:h[2]},m[2]&1&&Mn(h[62]),m[0]&8192&&{visibleRows:h[13]}]):{};t.$set(M)}const y={};m[0]&4&&(y.x=h[2]),m[0]&262144&&(y.container=h[18]),i.$set(y)},i(h){o||(t&&ee(t.$$.fragment,h),ee(i.$$.fragment,h),o=!0)},o(h){t&&le(t.$$.fragment,h),le(i.$$.fragment,h),o=!1},d(h){h&&U(r),t&&Ve(t,h),Ve(i,h)}}}function Kr(n,t){let r,i,o;const u=[t[172]];let c={};for(let d=0;d<u.length;d+=1)c=xt(c,u[d]);return i=new hd({props:c}),{key:n,first:null,c(){r=je(),Ke(i.$$.fragment),this.first=r},m(d,h){I(d,r,h),Ge(i,d,h),o=!0},p(d,h){t=d;const m=h[0]&536870912?Sn(u,[Mn(t[172])]):{};i.$set(m)},i(d){o||(ee(i.$$.fragment,d),o=!0)},o(d){le(i.$$.fragment,d),o=!1},d(d){d&&U(r),Ve(i,d)}}}function $r(n,t){let r,i,o;return i=new Xu({props:{row:t[175]}}),{key:n,first:null,c(){r=je(),Ke(i.$$.fragment),this.first=r},m(u,c){I(u,r,c),Ge(i,u,c),o=!0},p(u,c){t=u;const d={};c[0]&8192&&(d.row=t[175]),i.$set(d)},i(u){o||(ee(i.$$.fragment,u),o=!0)},o(u){le(i.$$.fragment,u),o=!1},d(u){u&&U(r),Ve(i,u)}}}function eo(n,t){let r,i,o;const u=[t[172]];let c={};for(let d=0;d<u.length;d+=1)c=xt(c,u[d]);return i=new $u({props:c}),{key:n,first:null,c(){r=je(),Ke(i.$$.fragment),this.first=r},m(d,h){I(d,r,h),Ge(i,d,h),o=!0},p(d,h){t=d;const m=h[0]&536870912?Sn(u,[Mn(t[172])]):{};i.$set(m)},i(d){o||(ee(i.$$.fragment,d),o=!0)},o(d){le(i.$$.fragment,d),o=!1},d(d){d&&U(r),Ve(i,d)}}}function _c(n){let t,r,i;const o=[n[167],{model:n[167].model},{left:n[170].x},{top:n[170].y},{width:n[170].width},{height:n[167].height},{dragging:n[170].dragging},{resizing:n[170].resizing}];let u={};for(let c=0;c<o.length;c+=1)u=xt(u,o[c]);return t=new Vu({props:u}),t.$on("pointerdown",function(){Tn(n[171])&&n[171].apply(this,arguments)}),{c(){Ke(t.$$.fragment),r=We()},m(c,d){Ge(t,c,d),I(c,r,d),i=!0},p(c,d){n=c;const h=d[0]&67108864|d[5]&32768?Sn(o,[d[0]&67108864&&Mn(n[167]),d[0]&67108864&&{model:n[167].model},d[5]&32768&&{left:n[170].x},d[5]&32768&&{top:n[170].y},d[5]&32768&&{width:n[170].width},d[0]&67108864&&{height:n[167].height},d[5]&32768&&{dragging:n[170].dragging},d[5]&32768&&{resizing:n[170].resizing}]):{};t.$set(h)},i(c){i||(ee(t.$$.fragment,c),i=!0)},o(c){le(t.$$.fragment,c),i=!1},d(c){c&&U(r),Ve(t,c)}}}function to(n,t){let r,i,o;return i=new ud({props:{task:t[167],$$slots:{default:[_c,({state:u,onPointerDown:c})=>({170:u,171:c}),({state:u,onPointerDown:c})=>[0,0,0,0,0,(u?32768:0)|(c?65536:0)]]},$$scope:{ctx:t}}}),{key:n,first:null,c(){r=je(),Ke(i.$$.fragment),this.first=r},m(u,c){I(u,r,c),Ge(i,u,c),o=!0},p(u,c){t=u;const d={};c[0]&67108864&&(d.task=t[167]),c[0]&67108864|c[5]&134316032&&(d.$$scope={dirty:c,ctx:t}),i.$set(d)},i(u){o||(ee(i.$$.fragment,u),o=!0)},o(u){le(i.$$.fragment,u),o=!1},d(u){u&&U(r),Ve(i,u)}}}function wc(n){let t=[],r=new Map,i,o,u=Ye(n[26]);const c=d=>d[167].model.id;for(let d=0;d<u.length;d+=1){let h=jr(n,u,d),m=c(h);r.set(m,t[d]=to(m,h))}return{c(){for(let d=0;d<t.length;d+=1)t[d].c();i=je()},m(d,h){for(let m=0;m<t.length;m+=1)t[m]&&t[m].m(d,h);I(d,i,h),o=!0},p(d,h){h[0]&67108864|h[5]&98304&&(u=Ye(d[26]),kt(),t=Vs(t,h,c,1,d,u,r,i.parentNode,G Line truncated
[`+_+"] ";for(k in arguments[0])d(arguments[0],k)&&(f+=k+": "+arguments[0][k]+", ");f=f.slice(0,-2)}else f=arguments[_];a.push(f)}Me(e+`
Arguments: `+Array.prototype.slice.call(a).join("")+`
`+new Error().stack),l=!1}return s.apply(this,arguments)},s)}var ze={};function x(e,s){i.deprecationHandler!=null&&i.deprecationHandler(e,s),ze[e]||(Me(s),ze[e]=!0)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null;function K(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function we(e){var s,l;for(l in e)d(e,l)&&(s=e[l],K(s)?this[l]=s:this["_"+l]=s);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function ye(e,s){var l=R({},e),a;for(a in s)d(s,a)&&(c(e[a])&&c(s[a])?(l[a]={},R(l[a],e[a]),R(l[a],s[a])):s[a]!=null?l[a]=s[a]:delete l[a]);for(a in e)d(e,a)&&!d(s,a)&&c(e[a])&&(l[a]=R({},l[a]));return l}function se(e){e!=null&&this.set(e)}var me;Object.keys?me=Object.keys:me=function(e){var s,l=[];for(s in e)d(e,s)&&l.push(s);return l};var Oe={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function ke(e,s,l){var a=this._calendar[e]||this._calendar.sameElse;return K(a)?a.call(s,l):a}function G(e,s,l){var a=""+Math.abs(e),f=s-a.length,_=e>=0;return(_?l?"+":"":"-")+Math.pow(10,Math.max(0,f)).toString().substr(1)+a}var it=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,xe=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,rt={},Ee={};function N(e,s,l,a){var f=a;typeof a=="string"&&(f=function(){return this[a]()}),e&&(Ee[e]=f),s&&(Ee[s[0]]=function(){return G(f.apply(this,arguments),s[1],s[2])}),l&&(Ee[l]=function(){return this.localeData().ordinal(f.apply(this,arguments),e)})}function $e(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function ft(e){var s=e.match(it),l,a;for(l=0,a=s.length;l<a;l++)Ee[s[l]]?s[l]=Ee[s[l]]:s[l]=$e(s[l]);return function(f){var _="",k;for(k=0;k<a;k++)_+=K(s[k])?s[k].call(f,e):s[k];return _}}function Fe(e,s){return e.isValid()?(s=fe(s,e.localeData()),rt[s]=rt[s]||ft(s),rt[s](e)):e.localeData().invalidDate()}function fe(e,s){var l=5;function a(f){return s.longDateFormat(f)||f}for(xe.lastIndex=0;l>=0&&xe.test(e);)e=e.replace(xe,a),xe.lastIndex=0,l-=1;return e}var Et={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Y(e){var s=this._longDateFormat[e],l=this._longDateFormat[e.toUpperCase()];return s||!l?s:(this._longDateFormat[e]=l.match(it).map(function(a){return a==="MMMM"||a==="MM"||a==="DD"||a==="dddd"?a.slice(1):a}).join(""),this._longDateFormat[e])}var O="Invalid date";function Q(){return this._invalidDate}var bt="%d",Nt=/\d{1,2}/;function oe(e){return this._ordinal.replace("%d",e)}var vt={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function On(e,s,l,a){var f=this._relativeTime[l];return K(f)?f(e,s,l,a):f.replace(/%d/i,e)}function sn(e,s){var l=this._relativeTime[e>0?"future":"past"];return K(l)?l(s):l.replace(/%s/i,s)}var Zt={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function qe(e){return typeof e=="string"?Zt[e]||Zt[e.toLowerCase()]:void 0}function Cn(e){var s={},l,a;for(a in e)d(e,a)&&(l=qe(a),l&&(s[l]=e[a]));return s}var rn={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function on(e){var s=[],l;for(l in e)d(e,l)&&s.push({unit:l,priority:rn[l]});return s.sort(function(a,f){return a.priority-f.priority}),s}var Xn=/\d/,Ze=/\d\d/,ln=/\d{3}/,Xt=/\d{4}/,an=/[+-]?\d{6}/,_e=/\d\d?/,Qn=/\d\d\d\d?/,Rn=/\d\d\d\d\d\d?/,Qt=/\d{1,3}/,un=/\d{1,4}/,et=/[+-]?\d{1,6}/,St=/\d+/,Rt=/[+-]?\d+/,Pn=/Z|[+-]\d\d:?\d\d/gi,At=/Z|[+-]\d\d(?::?\d\d)?/gi,Jn=/[+-]?\d+(\.\d{1,3})?/,Jt=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ht=/^[1-9]\d?/,Xe=/^([1-9]\d|\d)/,dn;dn={};function L(e,s,l){dn[e]=K(s)? Line truncated
return i.version="2.30.1",o(Se),i.fn=z,i.min=ol,i.max=ll,i.now=al,i.utc=D,i.unix=La,i.months=Na,i.isDate=M,i.locale=Be,i.invalid=v,i.duration=Ct,i.isMoment=X,i.weekdays=Fa,i.parseZone=Ea,i.localeData=Bt,i.isDuration=Ps,i.monthsShort=Aa,i.weekdaysMin=Ia,i.defineLocale=_i,i.updateLocale=Eo,i.locales=No,i.weekdaysShort=Ua,i.normalizeUnits=qe,i.relativeTimeRounding=gu,i.relativeTimeThreshold=_u,i.calendarFormat=zl,i.prototype=z,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},i})})(Ho);var ef=Ho.exports;const tf=Kc(ef);function nf(n){this.timeline.updateRows(n)}function sf(n,{updateRange:t=!0}={}){var d,h,m,y,M,p,R,D;let r=(h=(d=this.timeline)==null?void 0:d.util)!=null&&h.from?new Date(((y=(m=this.timeline)==null?void 0:m.util)==null?void 0:y.from)+this.padding[0]*1e3):null,i=(p=(M=this.timeline)==null?void 0:M.util)!=null&&p.to?new Date(((D=(R=this.timeline)==null?void 0:R.util)==null?void 0:D.to)-this.padding[1]*1e3):null;for(let C in n)n[C].from=new Date(n[C].from),(!r||n[C].from<r)&&(r=n[C].from),n[C].to=new Date(n[C].to),(!i||n[C].to>i)&&(i=n[C].to);const o=r?new Date(r.getTime()-this.padding[0]*1e3):null,u=i?new Date(i.getTime()+this.padding[1]*1e3):null;t&&this.timeline.$set({from:o,to:u});let c=new Date;this.highlightPast&&o&&o<c&&this.timeline.$set({timeRanges:[{id:"past",from:o.getTime(),to:c.getTime(),label:"Past",resizable:!1}]}),this.timeline.updateTasks(n)}const rf=[{headers:[{unit:"year",format:"YYYY"},{unit:"month",format:"MMMM"}],minWidth:800,columnUnit:"month",columnOffset:1},{headers:[{unit:"month",format:"MMMM YYYY"},{unit:"day",format:"D"}],minWidth:3200,columnUnit:"day",columnOffset:7},{headers:[{unit:"week",format:"MMM YYYY"},{unit:"day",format:"D"}],minWidth:8e3,columnUnit:"hour",columnOffset:12}],of=({target:n,options:t={}})=>{var o;t={...{highlightPast:!0,padding:[604800,604800],props:{}},...t};const i={ganttTableModules:[Vc],dateAdapter:new Zc(tf),tableHeaders:[{title:(o=n.dataset)==null?void 0:o.tableHeader,property:"label",type:"tree"}],tableWidth:240,fitWidth:!0,from:Date.now()-t.padding[0]*1e3,to:Date.now()+t.padding[1]*1e3,headers:[{unit:"year",format:"YYYY"},{unit:"month",format:"MMMM"}],zoomLevels:rf,columnUnit:"day",columnOffset:7,rowHeight:34,rowPadding:8,reflectOnParentRows:!1,rows:[]};return{highlightPast:t.highlightPast,padding:t.padding,timeline:new Qc({target:n,props:{...i,...t.props}}),addRows:nf,addTasks:sf}};class Lo{create(t,r){return of({target:t,options:r})}}const lf=new Lo;typeof window.farmOS>"u"&&(window.farmOS={});window.farmOS.timeline=lf;window.farmOS.timeline.TimelineInstanceManager=Lo;