@nowline/embed 0.0.0-dev.20261013004110.g00a00d7 → 0.0.0-dev.20261013004638.g65543f6
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/nowline.esm.js +3 -3
- package/dist/nowline.min.js +2 -2
- package/package.json +6 -6
package/dist/nowline.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @nowline/embed 0.0.0-dev.
|
|
1
|
+
/*! @nowline/embed 0.0.0-dev.20261013004638.g65543f6 sha=65543f6 built=2026-10-13T00:42:16Z */
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -43739,8 +43739,8 @@ function effectiveTheme(theme, systemTheme) {
|
|
|
43739
43739
|
}
|
|
43740
43740
|
|
|
43741
43741
|
// src/index.ts
|
|
43742
|
-
var version = true ? "0.0.0-dev.
|
|
43743
|
-
var sha = true ? "
|
|
43742
|
+
var version = true ? "0.0.0-dev.20261013004638.g65543f6" : "0.0.0";
|
|
43743
|
+
var sha = true ? "65543f6" : "unknown";
|
|
43744
43744
|
var DEFAULT_SELECTOR = "pre code.language-nowline, code.language-nowline";
|
|
43745
43745
|
var initialConfig = {
|
|
43746
43746
|
theme: "auto",
|
package/dist/nowline.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @nowline/embed 0.0.0-dev.
|
|
1
|
+
/*! @nowline/embed 0.0.0-dev.20261013004638.g65543f6 sha=65543f6 built=2026-10-13T00:42:16Z */
|
|
2
2
|
"use strict";var nowline=(()=>{var P$=Object.create;var gl=Object.defineProperty;var C$=Object.getOwnPropertyDescriptor;var O$=Object.getOwnPropertyNames;var $$=Object.getPrototypeOf,L$=Object.prototype.hasOwnProperty;var D$=(e,t,n)=>t in e?gl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var bE=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var Ee=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Mu=(e,t)=>{for(var n in t)gl(e,n,{get:t[n],enumerable:!0})},kE=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of O$(t))!L$.call(e,i)&&i!==n&&gl(e,i,{get:()=>t[i],enumerable:!(r=C$(t,i))||r.enumerable});return e};var Rm=(e,t,n)=>(n=e!=null?P$($$(e)):{},kE(t||!e||!e.__esModule?gl(n,"default",{value:e,enumerable:!0}):n,e)),Fu=e=>kE(gl({},"__esModule",{value:!0}),e);var I=(e,t,n)=>D$(e,typeof t!="symbol"?t+"":t,n);var aa=Ee(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.boolean=_W;jr.string=DR;jr.number=bW;jr.error=kW;jr.func=RW;jr.array=MR;jr.stringArray=AW;function _W(e){return e===!0||e===!1}function DR(e){return typeof e=="string"||e instanceof String}function bW(e){return typeof e=="number"||e instanceof Number}function kW(e){return e instanceof Error}function RW(e){return typeof e=="function"}function MR(e){return Array.isArray(e)}function AW(e){return MR(e)&&e.every(t=>DR(t))}});var cx=Ee(ue=>{"use strict";var IW=ue&&ue.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),SW=ue&&ue.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),NW=ue&&ue.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&IW(n,t,r[i]);return SW(n,t),n}})();Object.defineProperty(ue,"__esModule",{value:!0});ue.Message=ue.NotificationType9=ue.NotificationType8=ue.NotificationType7=ue.NotificationType6=ue.NotificationType5=ue.NotificationType4=ue.NotificationType3=ue.NotificationType2=ue.NotificationType1=ue.NotificationType0=ue.NotificationType=ue.RequestType9=ue.RequestType8=ue.RequestType7=ue.RequestType6=ue.RequestType5=ue.RequestType4=ue.RequestType3=ue.RequestType2=ue.RequestType1=ue.RequestType=ue.RequestType0=ue.AbstractMessageSignature=ue.ParameterStructures=ue.ResponseError=ue.ErrorCodes=void 0;var Wo=NW(aa()),By;(function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3})(By||(ue.ErrorCodes=By={}));var Wy=class e extends Error{constructor(n,r,i){super(r);I(this,"code");I(this,"data");this.code=Wo.number(n)?n:By.UnknownErrorCode,this.data=i,Object.setPrototypeOf(this,e.prototype)}toJson(){let n={code:this.code,message:this.message};return this.data!==void 0&&(n.data=this.data),n}};ue.ResponseError=Wy;var Hn=class Hn{constructor(t){I(this,"kind");this.kind=t}static is(t){return t===Hn.auto||t===Hn.byName||t===Hn.byPosition}toString(){return this.kind}};I(Hn,"auto",new Hn("auto")),I(Hn,"byPosition",new Hn("byPosition")),I(Hn,"byName",new Hn("byName"));var Bi=Hn;ue.ParameterStructures=Bi;var lt=class{constructor(t,n){I(this,"method");I(this,"numberOfParams");this.method=t,this.numberOfParams=n}get parameterStructures(){return Bi.auto}};ue.AbstractMessageSignature=lt;var Uy=class extends lt{constructor(n){super(n,0);I(this,"_")}};ue.RequestType0=Uy;var Xy=class extends lt{constructor(n,r=Bi.auto){super(n,1);I(this,"_parameterStructures");I(this,"_");this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};ue.RequestType=Xy;var Gy=class extends lt{constructor(n,r=Bi.auto){super(n,1);I(this,"_parameterStructures");I(this,"_");this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};ue.RequestType1=Gy;var jy=class extends lt{constructor(n){super(n,2);I(this,"_")}};ue.RequestType2=jy;var Hy=class extends lt{constructor(n){super(n,3);I(this,"_")}};ue.RequestType3=Hy;var zy=class extends lt{constructor(n){super(n,4);I(this,"_")}};ue.RequestType4=zy;var qy=class extends lt{constructor(n){super(n,5);I(this,"_")}};ue.RequestType5=qy;var Vy=class extends lt{constructor(n){super(n,6);I(this,"_")}};ue.RequestType6=Vy;var Yy=class extends lt{constructor(n){super(n,7);I(this,"_")}};ue.RequestType7=Yy;var Ky=class extends lt{constructor(n){super(n,8);I(this,"_")}};ue.RequestType8=Ky;var Zy=class extends lt{constructor(n){super(n,9);I(this,"_")}};ue.RequestType9=Zy;var Jy=class extends lt{constructor(n,r=Bi.auto){super(n,1);I(this,"_parameterStructures");I(this,"_");this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};ue.NotificationType=Jy;var Qy=class extends lt{constructor(n){super(n,0);I(this,"_")}};ue.NotificationType0=Qy;var ex=class extends lt{constructor(n,r=Bi.auto){super(n,1);I(this,"_parameterStructures");I(this,"_");this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};ue.NotificationType1=ex;var tx=class extends lt{constructor(n){super(n,2);I(this,"_")}};ue.NotificationType2=tx;var nx=class extends lt{constructor(n){super(n,3);I(this,"_")}};ue.NotificationType3=nx;var rx=class extends lt{constructor(n){super(n,4);I(this,"_")}};ue.NotificationType4=rx;var ix=class extends lt{constructor(n){super(n,5);I(this,"_")}};ue.NotificationType5=ix;var ox=class extends lt{constructor(n){super(n,6);I(this,"_")}};ue.NotificationType6=ox;var sx=class extends lt{constructor(n){super(n,7);I(this,"_")}};ue.NotificationType7=sx;var ax=class extends lt{constructor(n){super(n,8);I(this,"_")}};ue.NotificationType8=ax;var lx=class extends lt{constructor(n){super(n,9);I(this,"_")}};ue.NotificationType9=lx;var FR;(function(e){function t(i){let o=i;return o&&Wo.string(o.method)&&(Wo.string(o.id)||Wo.number(o.id))}e.isRequest=t;function n(i){let o=i;return o&&Wo.string(o.method)&&i.id===void 0}e.isNotification=n;function r(i){let o=i;return o&&(o.result!==void 0||!!o.error)&&(Wo.string(o.id)||Wo.number(o.id)||o.id===null)}e.isResponse=r})(FR||(ue.Message=FR={}))});var fx=Ee(Wi=>{"use strict";Object.defineProperty(Wi,"__esModule",{value:!0});Wi.LRUCache=Wi.LinkedMap=Wi.Touch=void 0;var jt;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(jt||(Wi.Touch=jt={}));var BR,Kd=class{constructor(){I(this,BR,"LinkedMap");I(this,"_map");I(this,"_head");I(this,"_tail");I(this,"_size");I(this,"_state");this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}before(t){let n=this._map.get(t);return n?n.previous?.value:void 0}after(t){let n=this._map.get(t);return n?n.next?.value:void 0}has(t){return this._map.has(t)}get(t,n=jt.None){let r=this._map.get(t);if(r)return n!==jt.None&&this.touch(r,n),r.value}set(t,n,r=jt.None){let i=this._map.get(t);if(i)i.value=n,r!==jt.None&&this.touch(i,r);else{switch(i={key:t,value:n,next:void 0,previous:void 0},r){case jt.None:this.addItemLast(i);break;case jt.First:this.addItemFirst(i);break;case jt.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(t,i),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let n=this._map.get(t);if(n)return this._map.delete(t),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,n){let r=this._state,i=this._head;for(;i;){if(n?t.bind(n)(i.value,i.key,this):t(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:n.key,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}values(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:n.value,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}entries(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:[n.key,n.value],done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}[(BR=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{let n=t.next,r=t.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}t.next=void 0,t.previous=void 0,this._state++}touch(t,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==jt.First&&n!==jt.Last)){if(n===jt.First){if(t===this._head)return;let r=t.next,i=t.previous;t===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(n===jt.Last){if(t===this._tail)return;let r=t.next,i=t.previous;t===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){let t=[];return this.forEach((n,r)=>{t.push([r,n])}),t}fromJSON(t){this.clear();for(let[n,r]of t)this.set(n,r)}};Wi.LinkedMap=Kd;var ux=class extends Kd{constructor(n,r=1){super();I(this,"_limit");I(this,"_ratio");this._limit=n,this._ratio=Math.min(Math.max(0,r),1)}get limit(){return this._limit}set limit(n){this._limit=n,this.checkTrim()}get ratio(){return this._ratio}set ratio(n){this._ratio=Math.min(Math.max(0,n),1),this.checkTrim()}get(n,r=jt.AsNew){return super.get(n,r)}peek(n){return super.get(n,jt.None)}set(n,r){return super.set(n,r,jt.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};Wi.LRUCache=ux});var UR=Ee(Zd=>{"use strict";Object.defineProperty(Zd,"__esModule",{value:!0});Zd.Disposable=void 0;var WR;(function(e){function t(n){return{dispose:n}}e.create=t})(WR||(Zd.Disposable=WR={}))});var Ui=Ee(hx=>{"use strict";Object.defineProperty(hx,"__esModule",{value:!0});var dx;function px(){if(dx===void 0)throw new Error("No runtime abstraction layer installed");return dx}(function(e){function t(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");dx=n}e.install=t})(px||(px={}));hx.default=px});var la=Ee(Xi=>{"use strict";var PW=Xi&&Xi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xi,"__esModule",{value:!0});Xi.Emitter=Xi.Event=void 0;var CW=PW(Ui()),XR;(function(e){let t={dispose(){}};e.None=function(){return t}})(XR||(Xi.Event=XR={}));var mx=class{constructor(){I(this,"_callbacks");I(this,"_contexts")}add(t,n=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(n),Array.isArray(r)&&r.push({dispose:()=>this.remove(t,n)})}remove(t,n=null){if(!this._callbacks)return;let r=!1;for(let i=0,o=this._callbacks.length;i<o;i++)if(this._callbacks[i]===t)if(this._contexts[i]===n){this._callbacks.splice(i,1),this._contexts.splice(i,1);return}else r=!0;if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...t){if(!this._callbacks)return[];let n=[],r=this._callbacks.slice(0),i=this._contexts.slice(0);for(let o=0,s=r.length;o<s;o++)try{n.push(r[o].apply(i[o],t))}catch(a){(0,CW.default)().console.error(a)}return n}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},Jd=class Jd{constructor(t){I(this,"_options");I(this,"_event");I(this,"_callbacks");this._options=t}get event(){return this._event||(this._event=(t,n,r)=>{this._callbacks||(this._callbacks=new mx),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,n);let i={dispose:()=>{this._callbacks&&(this._callbacks.remove(t,n),i.dispose=Jd._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(i),i}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};I(Jd,"_noop",function(){});var gx=Jd;Xi.Emitter=gx});var tp=Ee(pn=>{"use strict";var OW=pn&&pn.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),$W=pn&&pn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),LW=pn&&pn.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&OW(n,t,r[i]);return $W(n,t),n}})(),DW=pn&&pn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pn,"__esModule",{value:!0});pn.CancellationTokenSource=pn.CancellationToken=void 0;var MW=DW(Ui()),FW=LW(aa()),yx=la(),Qd;(function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:yx.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:yx.Event.None});function t(n){let r=n;return r&&(r===e.None||r===e.Cancelled||FW.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}e.is=t})(Qd||(pn.CancellationToken=Qd={}));var BW=Object.freeze(function(e,t){let n=(0,MW.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}}),ep=class{constructor(){I(this,"_isCancelled",!1);I(this,"_emitter")}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?BW:(this._emitter||(this._emitter=new yx.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},xx=class{constructor(){I(this,"_token")}get token(){return this._token||(this._token=new ep),this._token}cancel(){this._token?this._token.cancel():this._token=Qd.Cancelled}dispose(){this._token?this._token instanceof ep&&this._token.dispose():this._token=Qd.None}};pn.CancellationTokenSource=xx});var GR=Ee(ca=>{"use strict";Object.defineProperty(ca,"__esModule",{value:!0});ca.SharedArrayReceiverStrategy=ca.SharedArraySenderStrategy=void 0;var WW=tp(),Lc;(function(e){e.Continue=0,e.Cancelled=1})(Lc||(Lc={}));var vx=class{constructor(){I(this,"buffers");this.buffers=new Map}enableCancellation(t){if(t.id===null)return;let n=new SharedArrayBuffer(4),r=new Int32Array(n,0,1);r[0]=Lc.Continue,this.buffers.set(t.id,n),t.$cancellationData=n}async sendCancellation(t,n){let r=this.buffers.get(n);if(r===void 0)return;let i=new Int32Array(r,0,1);Atomics.store(i,0,Lc.Cancelled)}cleanup(t){this.buffers.delete(t)}dispose(){this.buffers.clear()}};ca.SharedArraySenderStrategy=vx;var Tx=class{constructor(t){I(this,"data");this.data=new Int32Array(t,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===Lc.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},wx=class{constructor(t){I(this,"token");this.token=new Tx(t)}cancel(){}dispose(){}},Ex=class{constructor(){I(this,"kind","request")}createCancellationTokenSource(t){let n=t.$cancellationData;return n===void 0?new WW.CancellationTokenSource:new wx(n)}};ca.SharedArrayReceiverStrategy=Ex});var bx=Ee(ua=>{"use strict";var UW=ua&&ua.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ua,"__esModule",{value:!0});ua.Semaphore=void 0;var XW=UW(Ui()),_x=class{constructor(t=1){I(this,"_capacity");I(this,"_active");I(this,"_waiting");if(t<=0)throw new Error("Capacity must be greater than 0");this._capacity=t,this._active=0,this._waiting=[]}lock(t){return new Promise((n,r)=>{this._waiting.push({thunk:t,resolve:n,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,XW.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let t=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("Too many thunks active");try{let n=t.thunk();n instanceof Promise?n.then(r=>{this._active--,t.resolve(r),this.runNext()},r=>{this._active--,t.reject(r),this.runNext()}):(this._active--,t.resolve(n),this.runNext())}catch(n){this._active--,t.reject(n),this.runNext()}}};ua.Semaphore=_x});var HR=Ee(Ht=>{"use strict";var GW=Ht&&Ht.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),jW=Ht&&Ht.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),HW=Ht&&Ht.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&GW(n,t,r[i]);return jW(n,t),n}})(),zW=Ht&&Ht.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ht,"__esModule",{value:!0});Ht.ReadableStreamMessageReader=Ht.AbstractMessageReader=Ht.MessageReader=void 0;var Rx=zW(Ui()),fa=HW(aa()),kx=la(),qW=bx(),jR;(function(e){function t(n){let r=n;return r&&fa.func(r.listen)&&fa.func(r.dispose)&&fa.func(r.onError)&&fa.func(r.onClose)&&fa.func(r.onPartialMessage)}e.is=t})(jR||(Ht.MessageReader=jR={}));var np=class{constructor(){I(this,"errorEmitter");I(this,"closeEmitter");I(this,"partialMessageEmitter");this.errorEmitter=new kx.Emitter,this.closeEmitter=new kx.Emitter,this.partialMessageEmitter=new kx.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose(),this.partialMessageEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(t){this.errorEmitter.fire(this.asError(t))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(t){this.partialMessageEmitter.fire(t)}asError(t){return t instanceof Error?t:new Error(`Reader received error. Reason: ${fa.string(t.message)?t.message:"unknown"}`)}};Ht.AbstractMessageReader=np;var Ax;(function(e){function t(n){let r,i,o,s=new Map,a,c=new Map;if(n===void 0||typeof n=="string")r=n??"utf-8";else{if(r=n.charset??"utf-8",n.contentDecoder!==void 0&&(o=n.contentDecoder,s.set(o.name,o)),n.contentDecoders!==void 0)for(let l of n.contentDecoders)s.set(l.name,l);if(n.contentTypeDecoder!==void 0&&(a=n.contentTypeDecoder,c.set(a.name,a)),n.contentTypeDecoders!==void 0)for(let l of n.contentTypeDecoders)c.set(l.name,l)}return a===void 0&&(a=(0,Rx.default)().applicationJson.decoder,c.set(a.name,a)),{charset:r,contentDecoder:o,contentDecoders:s,contentTypeDecoder:a,contentTypeDecoders:c}}e.fromOptions=t})(Ax||(Ax={}));var Ix=class extends np{constructor(n,r){super();I(this,"readable");I(this,"options");I(this,"callback");I(this,"nextMessageLength");I(this,"messageToken");I(this,"buffer");I(this,"partialMessageTimer");I(this,"_partialMessageTimeout");I(this,"readSemaphore");this.readable=n,this.options=Ax.fromOptions(r),this.buffer=(0,Rx.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new qW.Semaphore(1)}set partialMessageTimeout(n){this._partialMessageTimeout=n}get partialMessageTimeout(){return this._partialMessageTimeout}listen(n){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=n;let r=this.readable.onData(i=>{this.onData(i)});return this.readable.onError(i=>this.fireError(i)),this.readable.onClose(()=>this.fireClose()),r}onData(n){try{for(this.buffer.append(n);;){if(this.nextMessageLength===-1){let i=this.buffer.tryReadHeaders(!0);if(!i)return;let o=i.get("content-length");if(!o){this.fireError(new Error(`Header must provide a Content-Length property.
|
|
3
3
|
${JSON.stringify(Object.fromEntries(i))}`));return}let s=parseInt(o);if(isNaN(s)){this.fireError(new Error(`Content-Length value must be a number. Got ${o}`));return}this.nextMessageLength=s}let r=this.buffer.tryReadBody(this.nextMessageLength);if(r===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let i=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(r):r,o=await this.options.contentTypeDecoder.decode(i,this.options);this.callback(o)}).catch(i=>{this.fireError(i)})}}catch(r){this.fireError(r)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,Rx.default)().timer.setTimeout((n,r)=>{this.partialMessageTimer=void 0,n===this.messageToken&&(this.firePartialMessage({messageToken:n,waitingTime:r}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};Ht.ReadableStreamMessageReader=Ix});var KR=Ee(zt=>{"use strict";var VW=zt&&zt.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),YW=zt&&zt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),KW=zt&&zt.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&VW(n,t,r[i]);return YW(n,t),n}})(),ZW=zt&&zt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zt,"__esModule",{value:!0});zt.WriteableStreamMessageWriter=zt.AbstractMessageWriter=zt.MessageWriter=void 0;var zR=ZW(Ui()),Dc=KW(aa()),JW=bx(),qR=la(),QW="Content-Length: ",VR=`\r
|
|
4
4
|
`,YR;(function(e){function t(n){let r=n;return r&&Dc.func(r.dispose)&&Dc.func(r.onClose)&&Dc.func(r.onError)&&Dc.func(r.write)}e.is=t})(YR||(zt.MessageWriter=YR={}));var rp=class{constructor(){I(this,"errorEmitter");I(this,"closeEmitter");this.errorEmitter=new qR.Emitter,this.closeEmitter=new qR.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(t,n,r){this.errorEmitter.fire([this.asError(t),n,r])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(t){return t instanceof Error?t:new Error(`Writer received error. Reason: ${Dc.string(t.message)?t.message:"unknown"}`)}};zt.AbstractMessageWriter=rp;var Sx;(function(e){function t(n){return n===void 0||typeof n=="string"?{charset:n??"utf-8",contentTypeEncoder:(0,zR.default)().applicationJson.encoder}:{charset:n.charset??"utf-8",contentEncoder:n.contentEncoder,contentTypeEncoder:n.contentTypeEncoder??(0,zR.default)().applicationJson.encoder}}e.fromOptions=t})(Sx||(Sx={}));var Nx=class extends rp{constructor(n,r){super();I(this,"writable");I(this,"options");I(this,"errorCount");I(this,"writeSemaphore");this.writable=n,this.options=Sx.fromOptions(r),this.errorCount=0,this.writeSemaphore=new JW.Semaphore(1),this.writable.onError(i=>this.fireError(i)),this.writable.onClose(()=>this.fireClose())}async write(n){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(n,this.options).then(i=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(i):i).then(i=>{let o=[];return o.push(QW,i.byteLength.toString(),VR),o.push(VR),this.doWrite(n,o,i)},i=>{throw this.fireError(i),i}))}async doWrite(n,r,i){try{return await this.writable.write(r.join(""),"ascii"),this.writable.write(i)}catch(o){return this.handleError(o,n),Promise.reject(o)}}handleError(n,r){this.errorCount++,this.fireError(n,r,this.errorCount)}end(){this.writable.end()}};zt.WriteableStreamMessageWriter=Nx});var ZR=Ee(ip=>{"use strict";Object.defineProperty(ip,"__esModule",{value:!0});ip.AbstractMessageBuffer=void 0;var eU=13,tU=10,nU=`\r
|
|
@@ -2924,5 +2924,5 @@ ${n}`),this.inline?`{${i}}`:i}};function oX(e,t,n){if(e==="linkplain"||e==="link
|
|
|
2924
2924
|
}`));var fX={languageId:"nowline",fileExtensions:[".nowline"],caseInsensitive:!1,mode:"development"},bN={AstReflection:()=>new du},kN={Grammar:()=>_N(),LanguageMetaData:()=>fX,parser:{}};var RN={item:"an item",group:"a group",parallel:"a parallel block",swimlane:"a swimlane",anchor:"an anchor",milestone:"a milestone","floating-milestone":"a milestone without a date",wave:"a wave",label:"a label",size:"a size",status:"a status",person:"a person",team:"a team",footnote:"a footnote",roadmap:"the roadmap",style:"a style",symbol:"a symbol"},dX={item:"item",group:"group",parallel:"parallel block",swimlane:"swimlane",anchor:"anchor",milestone:"milestone","floating-milestone":"milestone",wave:"wave",label:"label",size:"size",status:"status",person:"person",team:"team",footnote:"footnote",roadmap:"roadmap",style:"style",symbol:"symbol"},GT=e=>e.charAt(0).toUpperCase()+e.slice(1);function tl(e){return e.kind==="parallel-block"?`the parallel block on line ${e.line}`:e.kind==="group-block"?`the group on line ${e.line}`:`${e.kind} "${e.name}"`}function AN(e){return e.name||e.line===void 0?`"${e.name}"`:tl({kind:e.kind==="parallel"?"parallel-block":"group-block",line:e.line})}function jT(e,t=!0){if(e.name)return`${e.kind} "${e.name}"`;let n=e.kind==="parallel"?"parallel block":e.kind,r=t?"the ":"";return e.line===void 0?`${r}${n}`:`${r}${n} on line ${e.line}`}function IN(e){return e.name?`${GT(e.kind)} "${e.name}"`:GT(jT(e))}function SN(e){return e===null?"has no start floor":`opens no earlier than ${e}`}function NN(e){return e?e.title===void 0?` Did you mean wave:${e.id}?`:` Did you mean wave:${e.id} ("${e.title}")?`:""}function PN(e){let t=e.slice(0,5).map(r=>`"${r}"`),n=e.length-t.length;return n>0?`${t.join(", ")} and ${n} more`:t.join(", ")}function _h(e){return`[${e.join(", ")}]`}var CN={"NL.E0001":()=>"Config section must appear before roadmap.","NL.E0002":()=>"Include declarations must appear before the config section.","NL.E0003":()=>"Include declarations must appear before the roadmap section.","NL.E0004":()=>"At least one swimlane is required.","NL.E0005":e=>`Line ${e.line}: mixed tabs and spaces in indentation. Use either tabs or spaces consistently.`,"NL.E0100":e=>`Invalid version format "${e.version}". Expected format: v1, v2, etc.`,"NL.E0101":e=>`This file requires Nowline ${e.version}, but the parser only supports up to ${e.supported}.`,"NL.E0102":e=>`Unknown directive property "${e.key}". Allowed: ${e.allowed}.`,"NL.E0103":e=>`Duplicate directive property "${e.key}".`,"NL.E0104":e=>`Invalid locale "${e.value}". Use a BCP-47 tag like "en-US", "fr", or "fr-CA".`,"NL.E0200":e=>`Invalid include mode "${e.value}". Must be merge, ignore, or isolate.`,"NL.E0201":e=>`Duplicate "${e.key}" option on include.`,"NL.E0202":e=>{switch(e.reason){case"mismatch":return`Included "${e.path}" declares waves ${_h(e.child)}, but this file's waves are ${_h(e.parent)}. Every included roadmap must declare the same waves in the same order: copy this file's wave lines into "${e.path}".`;case"child-none":return`Included "${e.path}" declares no waves, but this file's waves are ${_h(e.parent)}. Copy this file's wave lines into "${e.path}" so its work joins the waves.`;case"parent-none":return`Included "${e.path}" declares waves ${_h(e.child)}, but this file declares none. Declare the same waves here so the barriers apply to the whole roadmap.`;case"floor":return`Wave "${e.id}" in "${e.path}" ${SN(e.childFloor)}, but this file's wave "${e.id}" ${SN(e.parentFloor)}. A wave must have the same start floor in every included roadmap.`}},"NL.E0300":e=>`Duplicate identifier "${e.name}". First declared at ${e.location}.`,"NL.E0301":e=>`${e.type} must have an identifier, a title, or both.`,"NL.E0400":e=>`Invalid duration "${e.value}". Use a raw duration literal like 0.5d, 2w, 1m, 2q. Use "size:NAME" to reference a declared size.`,"NL.E0401":e=>`Invalid size "${e.value}". Use the id of a declared size (e.g. xs, m, lg).`,"NL.E0402":e=>`Invalid effort "${e.value}". Use a raw duration literal like 0.5d, 2w, 1m, 2q.`,"NL.E0403":e=>`Invalid remaining value "${e.value}". Use a percentage like 30% or a duration literal like 1w, 0.5d.`,"NL.E0404":e=>`Remaining must be between 0% and 100%, got ${e.value}.`,"NL.E0405":e=>`Invalid ${e.key} "${e.value}". Use ISO 8601 format: YYYY-MM-DD.`,"NL.E0406":e=>`Invalid scale "${e.value}". Use a raw duration literal like 1w, 2w, 1q (no name lookup).`,"NL.E0407":e=>`Invalid calendar "${e.value}". Must be business, full, or custom.`,"NL.E0408":e=>`Property "${e.key}" requires at least one reference.`,"NL.E0410":e=>`"${e.key}:" accepts at most one inline date per direction; collapse the multiple dates to a single binding date or use a declared anchor.`,"NL.E0411":e=>`Inline date in "${e.key}:" is not allowed on ${e.type}. Allowed only on item, parallel, and group, and on a wave's after:; for a milestone use "date:" instead.`,"NL.E0412":e=>`Inline date "${e.date}" in "${e.key}:" requires the roadmap to declare "start:". Add start:YYYY-MM-DD to the roadmap.`,"NL.E0413":e=>`Inline date "${e.date}" in "${e.key}:" is before roadmap start ${e.start}.`,"NL.E0500":e=>`Anchor "${e.name}" requires a "date:" property.`,"NL.E0501":e=>`Anchor "${e.name}" has a date but the roadmap is missing "start:". Add start:YYYY-MM-DD to the roadmap.`,"NL.E0502":e=>`Anchor "${e.name}" date ${e.date} is before roadmap start ${e.start}.`,"NL.E0503":e=>`Milestone "${e.name}" requires at least one of "date:" or "after:".`,"NL.E0504":e=>`Milestone "${e.name}" date ${e.date} is before roadmap start ${e.start}.`,"NL.E0505":()=>'Footnote requires an "on:" property referencing one or more entities.',"NL.E0600":e=>`Item "${e.name}" requires a "size:" or "duration:" property.`,"NL.E0800":e=>`Invalid non-working value "${e.value}". Use hide or show.`,"NL.E0801":e=>`Invalid color "${e.value}" for "${e.key}". Use a named color, hex value, or "none".`,"NL.E0802":e=>`Invalid value "${e.value}" for "${e.key}". Allowed: ${e.allowed}.`,"NL.E0803":e=>`Unknown style property "${e.key}".`,"NL.E0804":e=>`Raw style property "${e.key}" is not allowed on ${e.entity}. Declare a named style in config and reference it via "style:id".`,"NL.E0805":e=>`Symbol id "${e.name}" collides with a built-in icon name. Reserved built-ins: ${e.builtins}.`,"NL.E0806":e=>`Symbol "${e.name}" requires a "unicode:" property (e.g. unicode:"\u{1F4B0}" or unicode:"\\u{1F464}").`,"NL.E0807":e=>`Symbol "${e.name}" unicode: must be a non-empty value.`,"NL.E0808":e=>`Symbol "${e.name}" ascii: must be 1-3 ASCII characters (got ${e.length} character${e.length===1?"":"s"}).`,"NL.E0809":e=>`Unknown symbol property "${e.key}". Allowed: unicode, ascii, link, description.`,"NL.E0810":e=>`Duplicate symbol id "${e.name}". First declared at ${e.location}.`,"NL.E0811":e=>`${e.key}: "${e.value}" is neither a built-in (${e.builtins}) nor a declared symbol. Add "symbol ${e.value} unicode:..." earlier in config or use a quoted Unicode literal.`,"NL.E0812":e=>`${e.key}: symbol "${e.value}" is referenced before its declaration. Move "symbol ${e.value}" above this entry.`,"NL.E0900":e=>`A ${e.kind} declaration takes date:, or start: and end:, or every: with optional start: and end:.`,"NL.E0901":e=>`Unknown ${e.kind} property "${e.key}". Allowed: date, start, end, every.`,"NL.E0902":e=>`${e.key}: on a ${e.kind} declaration takes one date, not a list.`,"NL.E0903":e=>`end: ${e.end} is before start: ${e.start}.`,"NL.E0904":e=>`Invalid weekday "${e.value}". Use sun, mon, tue, wed, thu, fri or sat.`,"NL.E0905":e=>`Weekday "${e.value}" is listed more than once.`,"NL.E0906":()=>"This leaves no working day in the week with no end date. Keep at least one weekday working.","NL.E0907":e=>`Duplicate ${e.kind} id "${e.name}".`,"NL.W0700":e=>`Unknown property "${e.key}" on ${e.entity}. The renderer ignores it.${e.suggested?` Did you mean "${e.suggested}"?`:""}`,"NL.W0701":e=>`Wave "${e.id}" in "${e.path}" differs from this file's definition (${e.fields.map(t=>`${t.field} ${t.there===""?"none":`"${t.there}"`} there, ${t.here===""?"none":`"${t.here}"`} here`).join("; ")}); this file's definition is used.`,"NL.W0702":e=>`"wave:" on ${e.target.kind==="default"?`"default ${e.target.entityType}"`:!e.target.name&&e.target.line!==void 0?`the ${e.target.kind==="parallel"?"parallel block":e.target.kind} on line ${e.target.line}`:`${e.target.kind} "${e.target.name}"`} is ignored: this roadmap declares no waves. Declare waves with "wave <id>" to use it, or remove the property.`,"NL.W0703":e=>`"${e.key}" on "default ${e.entityType}" is ignored: it is a roadmap-only style key. Set it on "default roadmap" instead.`,"NL.W0704":e=>`"timeline-position:${e.position}" draws no dates: "header-height:none" removes every timeline date strip. Set header-height to xs, sm, md, lg or xl to show them.`,"NL.W0705":e=>`days-per-week is ${e.daysPerWeek}, but the week leaves ${e.working} working days.`,"NL.E1100":e=>`Wave ${e.title===void 0?`on line ${e.line}`:`"${e.title}"`} needs an explicit identifier so work can reference it with wave:<id>, e.g. wave build "Build".`,"NL.E1101":e=>{switch(e.reason){case"list":return`"wave:" takes exactly one wave id; an item belongs to at most one wave. Got "${e.value}".`;case"unknown":return`Wave "${e.value}" is not declared. Declared waves: ${e.declared.length>0?e.declared.join(", "):"none"}. Add "wave ${e.value}" above the first swimlane that uses it.${NN(e.suggestion)}`;case"forward":return`Wave "${e.value}" is used before its declaration on line ${e.line}. Declare waves above the swimlanes that use them.`;case"not-a-wave":return`"wave:" must name a wave, but "${e.value}" is ${RN[e.kind]}.${NN(e.suggestion)}`}},"NL.E1102":e=>`${GT(jT(e.entity))} has wave:${e.wave}, but its enclosing ${jT(e.container,!1)} has wave:${e.containerWave}. A container's wave applies to everything inside it; remove one of the two wave: properties.`,"NL.E1103":e=>{switch(e.reason){case"sequence":{let t=e.items.length>1,n=`${t?"Items":"Item"} ${e.items.map(i=>`"${i}"`).join(", ")} (wave "${e.itemWave}")`,r=typeof e.ref=="string"?`"${e.ref}"`:tl(e.ref);return`${n} ${t?"come":"comes"} after ${r} (wave "${e.refWave}") in ${tl(e.flow)}. Work in a lane or group runs in order, so it must also be ordered by wave: move ${r} below "${e.last}", or change their waves.`}case"join":return`Item "${e.name}" (wave "${e.wave}") comes after ${tl(e.block)} in ${tl(e.flow)}, and that block cannot end before its track "${e.track}" (wave "${e.trackWave}") does. Move "${e.name}" above the block or into a track of its own, or change one of their waves.`;case"after-item":return e.container?`${IN(e.container)} has after:${e.refId}, but "${e.ref}" is in later wave "${e.refWave}". Wave "${e.refWave}" cannot start until wave "${e.wave}" ends, so "${e.name}" (wave "${e.wave}") inside it could never start: move "${e.name}" to wave "${e.refWave}" or later, or remove the after:.`:`Item "${e.name}" (wave "${e.wave}") has after:${e.refId}, but "${e.ref}" is in later wave "${e.refWave}". Wave "${e.refWave}" cannot start until wave "${e.wave}" ends, so "${e.name}" could never start: move it to wave "${e.refWave}" or later, or remove the after:.`;case"after-wave":return e.container?`${IN(e.container)} (wave "${e.wave}") has after:${e.refId}, but work cannot wait for the end of its own wave or a later one. Use an earlier wave, or move the ${e.container.kind} to a later wave.`:`Item "${e.name}" (wave "${e.wave}") has after:${e.refId}, but work cannot wait for the end of its own wave or a later one. Use an earlier wave, or move "${e.name}" to a later wave.`;case"chain":return`Item "${e.name}" (wave "${e.wave}") could never start: through ${e.chain.join(" \u2192 ")}, it waits for work that cannot start until wave "${e.wave}" has ended. Move "${e.name}" to a later wave, or break the chain.`}},"NL.E1104":e=>{switch(e.reason){case"swimlane":return`"wave:" is not allowed on swimlane "${e.name}": a swimlane spans every wave. Put wave: on its items, or wrap them in "group wave:${e.value}".`;case"milestone":return`"wave:" is not allowed on milestone "${e.name}". To place a milestone at the end of a wave, use after:${e.value}.`;case"other":return`"wave:" is not allowed on ${dX[e.type]} "${e.name}"; only item, group, and parallel can belong to a wave.`}},"NL.E1105":e=>e.reason==="before"?`"before:" is not allowed on wave "${e.name}". A wave's end comes from its items; to give a wave a deadline, add a dated milestone: milestone ${e.name}-due date:<YYYY-MM-DD> after:${e.name}.`:`"${e.key}:" is not allowed on wave "${e.name}". A wave's span comes from its items; only after: (an anchor, a dated milestone, or one ISO date) can hold back a wave's start.`,"NL.E1106":e=>`Wave "${e.name}" has after:${e.ref}, but "${e.ref}" is ${RN[e.kind]}. A wave's after: accepts only anchors, dated milestones, or one ISO date; to make a wave wait for work, put that work in an earlier wave.`,"NL.W1000":e=>`Now-line date ${e.date} is outside the roadmap window (${e.start} \u2013 ${e.end}); it will not be drawn.`,"NL.W1001":e=>`Item "${e.name}" is pinned to ${e.pin} (${e.key}:), but wave "${e.wave}" cannot start until ${e.start}; the item starts at the wave start.`,"NL.W1002":e=>`Wave barriers did not settle after ${e.passes} layout passes, so the drawn schedule may not respect the wave order. The roadmap probably has an ordering conflict that validation did not catch.`,"NL.W1100":e=>{let t=AN(e);return e.reason==="item"?`before:${e.ref} on ${t} can never be met: ${t} is in wave "${e.wave}", which cannot start until "${e.ref}" (wave "${e.refWave}") has finished. The overrun will be painted.`:`before:${e.ref} on ${t} can never be met: ${t} is in wave "${e.wave}", which cannot finish before wave "${e.ref}" starts. The overrun will be painted.`},"NL.W1101":e=>{let t=AN(e);switch(e.reason){case"forward-lane":return`${e.key}:${e.ref} on ${t} refers to "${e.ref}", which is in a later swimlane ("${e.lane}"). Layout places swimlanes in order and ignores references to work it has not placed yet, so it ignores this ${e.key}:. Move swimlane "${e.lane}" above swimlane "${e.ownLane}", or remove the ${e.key}:.`;case"forward-flow":return`${e.key}:${e.ref} on ${t} refers to "${e.ref}", which comes later in ${tl(e.flow)}. Layout ignores references to work it has not placed yet, so it ignores this ${e.key}:. Move "${e.ref}" above ${t}, or remove the ${e.key}:.`;case"ancestor":return`${e.key}:${e.ref} on ${t} refers to "${e.ref}", which contains it. Layout ignores references to an enclosing group or parallel, so it ignores this ${e.key}:. Remove the ${e.key}:.`;case"floating-milestone":return`${e.key}:${e.ref} on ${t} refers to milestone "${e.ref}", which has no date. Floating milestones are placed after all work, so layout ignores this ${e.key}:. Reference the milestone's predecessors or a wave instead.`}},"NL.I1000":e=>`Title on item "${e.name}" is wider than its bar at this scale; it rendered to the right of the bar.`,"NL.I1001":e=>`Label chips on item "${e.name}" did not fit inside the bar; they rendered in a spill column to the right.`,"NL.I1002":e=>`Item "${e.name}" is too narrow to show its marker at this scale; decorations spilled beside the bar.`,"NL.I1003":e=>e.anchor?`Item "${e.name}" extends past its "before:" anchor "${e.anchor}".`:`Item "${e.name}" extends past its "before:" anchor.`,"NL.I1004":e=>`Swimlane "${e.lane}" packed into ${e.rows} rows to avoid overlap.`,"NL.I1005":e=>`Swimlane "${e.lane}" is over capacity in one or more periods (red utilization band).`,"NL.I1006":e=>{switch(e.reason){case"one":return`Wave "${e.name}" has no items, so it spans no time; it is drawn as a marker in the wave strip and listed in the wave legend.`;case"many":return`Waves ${PN(e.names)} have no items, so they span no time; they are drawn as markers in the wave strip and listed in the wave legend.`;case"all":return`None of the declared waves (${PN(e.names)}) has items yet. The wave strip shows a placeholder until work is assigned with wave:<id>.`}},"NL.I1007":e=>`Milestone "${e.name}" (${e.date}) is overrun: wave "${e.wave}" ends ${e.end}.`,"NL.I1008":e=>`Item "${e.name}" is pinned to ${e.pin} (${e.key}:), a non-working day; it starts on ${e.start}.`};var ee=e=>`\xAB\xA0${e}\xA0\xBB`,ON={item:"un \xE9l\xE9ment",group:"un groupe",parallel:"un bloc parall\xE8le",swimlane:"une swimlane",anchor:"une ancre",milestone:"un jalon","floating-milestone":"un jalon sans date",wave:"une vague",label:"une \xE9tiquette",size:"une taille",status:"un statut",person:"une personne",team:"une \xE9quipe",footnote:"une note de bas de page",roadmap:"la roadmap",style:"un style",symbol:"un symbole"},pX={item:"l'\xE9l\xE9ment",group:"le groupe",parallel:"le bloc parall\xE8le",swimlane:"la swimlane",anchor:"l'ancre",milestone:"le jalon","floating-milestone":"le jalon",wave:"la vague",label:"l'\xE9tiquette",size:"la taille",status:"le statut",person:"la personne",team:"l'\xE9quipe",footnote:"la note de bas de page",roadmap:"la roadmap",style:"le style",symbol:"le symbole"},HT=e=>e.charAt(0).toUpperCase()+e.slice(1);function nl(e){return e.kind==="parallel-block"?`le bloc parall\xE8le \xE0 la ligne ${e.line}`:e.kind==="group-block"?`le groupe \xE0 la ligne ${e.line}`:`${e.kind==="group"?"le groupe":e.kind==="parallel"?"le bloc parall\xE8le":"la swimlane"} ${ee(e.name)}`}function zT(e,t=!1){if(e.name||e.line===void 0)return t?`de ${ee(e.name)}`:ee(e.name);let n=nl({kind:e.kind==="parallel"?"parallel-block":"group-block",line:e.line});return t?`du ${n.slice(3)}`:n}function qT(e){let t=e.kind==="item"?"\xE9l\xE9ment":e.kind==="group"?"groupe":"bloc parall\xE8le",n=e.kind==="item"?"l'":"le ";return e.name?`${n}${t} ${ee(e.name)}`:e.line===void 0?`${n}${t}`:`${n}${t} \xE0 la ligne ${e.line}`}function $N(e){let t=e.kind==="parallel"?"le bloc parall\xE8le":"le groupe";return e.name?`${t} ${ee(e.name)}`:e.line===void 0?t:`${t} \xE0 la ligne ${e.line}`}function LN(e){return e?e.title===void 0?` Vouliez-vous dire wave:${e.id}\xA0?`:` Vouliez-vous dire wave:${e.id} (${ee(e.title)})\xA0?`:""}function DN(e){let t=e.slice(0,5).map(ee),n=e.length-t.length;return n>0?`${t.join(", ")} et ${n} autre${n>1?"s":""}`:t.join(", ")}function bh(e){return`[${e.join(", ")}]`}function MN(e){return e===null?"n'a pas de borne de d\xE9part":`ne s'ouvre pas avant ${e}`}function FN(e){return e===""?"aucun":ee(e)}var hX={title:"titre",style:"style",labels:"\xE9tiquettes",link:"lien",description:"description"},BN={"NL.E0001":()=>"La section config doit pr\xE9c\xE9der la section roadmap.","NL.E0002":()=>"Les d\xE9clarations include doivent pr\xE9c\xE9der la section config.","NL.E0003":()=>"Les d\xE9clarations include doivent pr\xE9c\xE9der la section roadmap.","NL.E0004":()=>"Au moins une swimlane est requise.","NL.E0005":e=>`Ligne ${e.line}\xA0: tabulations et espaces m\xE9lang\xE9s dans l'indentation. Utilisez l'un ou l'autre, mais pas les deux.`,"NL.E0100":e=>`Format de version invalide \xAB\xA0${e.version}\xA0\xBB. Format attendu\xA0: v1, v2, etc.`,"NL.E0101":e=>`Ce fichier requiert Nowline ${e.version}, mais l'analyseur ne prend en charge que jusqu'\xE0 ${e.supported}.`,"NL.E0102":e=>`Propri\xE9t\xE9 de directive inconnue \xAB\xA0${e.key}\xA0\xBB. Valeurs admises\xA0: ${e.allowed}.`,"NL.E0103":e=>`Propri\xE9t\xE9 de directive \xAB\xA0${e.key}\xA0\xBB en double.`,"NL.E0104":e=>`Locale invalide \xAB\xA0${e.value}\xA0\xBB. Utilisez une \xE9tiquette BCP-47 telle que \xAB\xA0en-US\xA0\xBB, \xAB\xA0fr\xA0\xBB ou \xAB\xA0fr-CA\xA0\xBB.`,"NL.E0200":e=>`Mode d'include invalide \xAB\xA0${e.value}\xA0\xBB. Doit \xEAtre merge, ignore ou isolate.`,"NL.E0201":e=>`Option \xAB\xA0${e.key}\xA0\xBB en double sur include.`,"NL.E0202":e=>{switch(e.reason){case"mismatch":return`L'include ${ee(e.path)} d\xE9clare les vagues ${bh(e.child)}, mais celles de ce fichier sont ${bh(e.parent)}. Chaque roadmap incluse doit d\xE9clarer les m\xEAmes vagues dans le m\xEAme ordre\xA0: copiez les lignes wave de ce fichier dans ${ee(e.path)}.`;case"child-none":return`L'include ${ee(e.path)} ne d\xE9clare aucune vague, mais celles de ce fichier sont ${bh(e.parent)}. Copiez les lignes wave de ce fichier dans ${ee(e.path)} pour que son travail rejoigne les vagues.`;case"parent-none":return`L'include ${ee(e.path)} d\xE9clare les vagues ${bh(e.child)}, mais ce fichier n'en d\xE9clare aucune. D\xE9clarez les m\xEAmes vagues ici pour que les barri\xE8res s'appliquent \xE0 toute la roadmap.`;case"floor":return`La vague ${ee(e.id)} dans ${ee(e.path)} ${MN(e.childFloor)}, mais la vague ${ee(e.id)} de ce fichier ${MN(e.parentFloor)}. Une vague doit avoir la m\xEAme borne de d\xE9part dans chaque roadmap incluse.`}},"NL.E0300":e=>`Identifiant en double \xAB\xA0${e.name}\xA0\xBB. Premi\xE8re d\xE9claration \xE0 ${e.location}.`,"NL.E0301":e=>`${e.type} doit comporter un identifiant, un titre, ou les deux.`,"NL.E0400":e=>`Dur\xE9e invalide \xAB\xA0${e.value}\xA0\xBB. Utilisez un litt\xE9ral de dur\xE9e brut comme 0.5d, 2w, 1m, 2q. Utilisez \xAB\xA0size:NOM\xA0\xBB pour r\xE9f\xE9rencer une taille d\xE9clar\xE9e.`,"NL.E0401":e=>`Taille invalide \xAB\xA0${e.value}\xA0\xBB. Utilisez l'identifiant d'une taille d\xE9clar\xE9e (p.\xA0ex. xs, m, lg).`,"NL.E0402":e=>`Effort invalide \xAB\xA0${e.value}\xA0\xBB. Utilisez un litt\xE9ral de dur\xE9e brut comme 0.5d, 2w, 1m, 2q.`,"NL.E0403":e=>`Valeur restante invalide \xAB\xA0${e.value}\xA0\xBB. Utilisez un pourcentage tel que 30% ou un litt\xE9ral de dur\xE9e comme 1w, 0.5d.`,"NL.E0404":e=>`La valeur restante doit \xEAtre comprise entre 0 % et 100 %, re\xE7u ${e.value}.`,"NL.E0405":e=>`${e.key} invalide \xAB\xA0${e.value}\xA0\xBB. Utilisez le format ISO 8601\xA0: AAAA-MM-JJ.`,"NL.E0406":e=>`\xC9chelle invalide \xAB\xA0${e.value}\xA0\xBB. Utilisez un litt\xE9ral de dur\xE9e brut comme 1w, 2w, 1q (pas de recherche par nom).`,"NL.E0407":e=>`Calendrier invalide \xAB\xA0${e.value}\xA0\xBB. Doit \xEAtre business, full ou custom.`,"NL.E0408":e=>`La propri\xE9t\xE9 \xAB\xA0${e.key}\xA0\xBB exige au moins une r\xE9f\xE9rence.`,"NL.E0410":e=>`\xAB\xA0${e.key}:\xA0\xBB n'accepte qu'une seule date inline par direction\xA0; regroupez les dates en une seule date contraignante ou utilisez une ancre d\xE9clar\xE9e.`,"NL.E0411":e=>`Une date inline dans \xAB\xA0${e.key}:\xA0\xBB n'est pas autoris\xE9e sur ${e.type}. Autoris\xE9e seulement sur item, parallel et group, et sur le \xAB\xA0after:\xA0\xBB d'une vague\xA0; pour un milestone utilisez \xAB\xA0date:\xA0\xBB \xE0 la place.`,"NL.E0412":e=>`La date inline \xAB\xA0${e.date}\xA0\xBB dans \xAB\xA0${e.key}:\xA0\xBB exige que la roadmap d\xE9clare \xAB\xA0start:\xA0\xBB. Ajoutez start:AAAA-MM-JJ \xE0 la roadmap.`,"NL.E0413":e=>`La date inline \xAB\xA0${e.date}\xA0\xBB dans \xAB\xA0${e.key}:\xA0\xBB pr\xE9c\xE8de le d\xE9but de la roadmap (${e.start}).`,"NL.E0500":e=>`L'ancre \xAB\xA0${e.name}\xA0\xBB exige une propri\xE9t\xE9 \xAB\xA0date:\xA0\xBB.`,"NL.E0501":e=>`L'ancre \xAB\xA0${e.name}\xA0\xBB a une date, mais \xAB\xA0start:\xA0\xBB manque sur la roadmap. Ajoutez start:AAAA-MM-JJ \xE0 la roadmap.`,"NL.E0502":e=>`La date ${e.date} de l'ancre \xAB\xA0${e.name}\xA0\xBB pr\xE9c\xE8de le d\xE9but de la roadmap (${e.start}).`,"NL.E0503":e=>`Le jalon \xAB\xA0${e.name}\xA0\xBB exige au moins l'une des propri\xE9t\xE9s \xAB\xA0date:\xA0\xBB ou \xAB\xA0after:\xA0\xBB.`,"NL.E0504":e=>`La date ${e.date} du jalon \xAB\xA0${e.name}\xA0\xBB pr\xE9c\xE8de le d\xE9but de la roadmap (${e.start}).`,"NL.E0505":()=>"Une note de bas de page exige une propri\xE9t\xE9 \xAB\xA0on:\xA0\xBB r\xE9f\xE9ren\xE7ant au moins une entit\xE9.","NL.E0600":e=>`L'\xE9l\xE9ment \xAB\xA0${e.name}\xA0\xBB exige une propri\xE9t\xE9 \xAB\xA0size:\xA0\xBB ou \xAB\xA0duration:\xA0\xBB.`,"NL.E0800":e=>`Valeur non-working invalide \xAB\xA0${e.value}\xA0\xBB. Utilisez hide ou show.`,"NL.E0801":e=>`Couleur invalide \xAB\xA0${e.value}\xA0\xBB pour \xAB\xA0${e.key}\xA0\xBB. Utilisez une couleur nomm\xE9e, une valeur hexad\xE9cimale ou \xAB\xA0none\xA0\xBB.`,"NL.E0802":e=>`Valeur invalide \xAB\xA0${e.value}\xA0\xBB pour \xAB\xA0${e.key}\xA0\xBB. Valeurs admises\xA0: ${e.allowed}.`,"NL.E0803":e=>`Propri\xE9t\xE9 de style inconnue \xAB\xA0${e.key}\xA0\xBB.`,"NL.E0804":e=>`La propri\xE9t\xE9 de style brute \xAB\xA0${e.key}\xA0\xBB n'est pas permise sur ${e.entity}. D\xE9clarez un style nomm\xE9 dans la config et r\xE9f\xE9rencez-le avec \xAB\xA0style:id\xA0\xBB.`,"NL.E0805":e=>`L'identifiant de symbole \xAB\xA0${e.name}\xA0\xBB entre en conflit avec le nom d'une ic\xF4ne int\xE9gr\xE9e. Noms r\xE9serv\xE9s\xA0: ${e.builtins}.`,"NL.E0806":e=>`Le symbole \xAB\xA0${e.name}\xA0\xBB exige une propri\xE9t\xE9 \xAB\xA0unicode:\xA0\xBB (p.\xA0ex. unicode:"\u{1F4B0}" ou unicode:"\\u{1F464}").`,"NL.E0807":e=>`La propri\xE9t\xE9 \xAB\xA0unicode:\xA0\xBB du symbole \xAB\xA0${e.name}\xA0\xBB doit avoir une valeur non vide.`,"NL.E0808":e=>`La propri\xE9t\xE9 \xAB\xA0ascii:\xA0\xBB du symbole \xAB\xA0${e.name}\xA0\xBB doit compter de 1 \xE0 3 caract\xE8res ASCII (re\xE7u\xA0: ${e.length} caract\xE8re${e.length>1?"s":""}).`,"NL.E0809":e=>`Propri\xE9t\xE9 de symbole inconnue \xAB\xA0${e.key}\xA0\xBB. Valeurs admises\xA0: unicode, ascii, link, description.`,"NL.E0810":e=>`Identifiant de symbole en double \xAB\xA0${e.name}\xA0\xBB. Premi\xE8re d\xE9claration \xE0 ${e.location}.`,"NL.E0811":e=>`${e.key}: \xAB\xA0${e.value}\xA0\xBB n'est ni une ic\xF4ne int\xE9gr\xE9e (${e.builtins}) ni un symbole d\xE9clar\xE9. Ajoutez \xAB\xA0symbol ${e.value} unicode:...\xA0\xBB plus haut dans la config ou utilisez un litt\xE9ral Unicode entre guillemets.`,"NL.E0812":e=>`${e.key}: le symbole \xAB\xA0${e.value}\xA0\xBB est r\xE9f\xE9renc\xE9 avant sa d\xE9claration. D\xE9placez \xAB\xA0symbol ${e.value}\xA0\xBB au-dessus de cette entr\xE9e.`,"NL.E0900":e=>`Une d\xE9claration ${e.kind} prend date:, ou start: et end:, ou every: avec start: et end: facultatifs.`,"NL.E0901":e=>`Propri\xE9t\xE9 ${e.kind} inconnue \xAB\xA0${e.key}\xA0\xBB. Autoris\xE9es\xA0: date, start, end, every.`,"NL.E0902":e=>`${e.key}: sur une d\xE9claration ${e.kind} prend une seule date, pas une liste.`,"NL.E0903":e=>`end: ${e.end} pr\xE9c\xE8de start: ${e.start}.`,"NL.E0904":e=>`Jour de semaine invalide \xAB\xA0${e.value}\xA0\xBB. Utilisez sun, mon, tue, wed, thu, fri ou sat.`,"NL.E0905":e=>`Le jour \xAB\xA0${e.value}\xA0\xBB appara\xEEt plusieurs fois.`,"NL.E0906":()=>"Il ne reste aucun jour ouvr\xE9 dans la semaine sans date de fin. Gardez au moins un jour ouvr\xE9.","NL.E0907":e=>`Identifiant ${e.kind} \xAB\xA0${e.name}\xA0\xBB en double.`,"NL.W0700":e=>`Propri\xE9t\xE9 inconnue \xAB\xA0${e.key}\xA0\xBB sur ${e.entity}. Le moteur de rendu l'ignore.${e.suggested?` Vouliez-vous dire \xAB\xA0${e.suggested}\xA0\xBB\xA0?`:""}`,"NL.W0701":e=>`La vague ${ee(e.id)} dans ${ee(e.path)} diff\xE8re de la d\xE9finition de ce fichier (${e.fields.map(t=>`${hX[t.field]} ${FN(t.there)} l\xE0-bas, ${FN(t.here)} ici`).join("\xA0; ")})\xA0; la d\xE9finition de ce fichier est utilis\xE9e.`,"NL.W0702":e=>`\xAB\xA0wave:\xA0\xBB sur ${e.target.kind==="default"?ee(`default ${e.target.entityType}`):!e.target.name&&e.target.line!==void 0?e.target.kind==="item"||e.target.kind==="group"||e.target.kind==="parallel"?qT({kind:e.target.kind,name:"",line:e.target.line}):`${e.target.kind} \xE0 la ligne ${e.target.line}`:`${e.target.kind} ${ee(e.target.name)}`} est ignor\xE9\xA0: cette roadmap ne d\xE9clare aucune vague. D\xE9clarez des vagues avec \xAB\xA0wave <id>\xA0\xBB pour l'utiliser, ou retirez la propri\xE9t\xE9.`,"NL.W0703":e=>`${ee(e.key)} sur ${ee(`default ${e.entityType}`)} est ignor\xE9\xA0: c'est une cl\xE9 de style propre \xE0 la roadmap. D\xE9finissez-la plut\xF4t sur \xAB\xA0default roadmap\xA0\xBB.`,"NL.W0704":e=>`${ee(`timeline-position:${e.position}`)} n'affiche aucune date\xA0: ${ee("header-height:none")} retire tous les bandeaux de dates de la frise. Donnez \xE0 header-height la valeur xs, sm, md, lg ou xl pour les afficher.`,"NL.W0705":e=>`days-per-week vaut ${e.daysPerWeek}, mais la semaine laisse ${e.working} jours ouvr\xE9s.`,"NL.E1100":e=>`La vague ${e.title===void 0?`\xE0 la ligne ${e.line}`:ee(e.title)} exige un identifiant explicite pour que le travail puisse la r\xE9f\xE9rencer avec wave:<id>, p.\xA0ex. wave build "Build".`,"NL.E1101":e=>{switch(e.reason){case"list":return`\xAB\xA0wave:\xA0\xBB accepte exactement un identifiant de vague\xA0; un \xE9l\xE9ment appartient \xE0 une seule vague au plus. Re\xE7u ${ee(e.value)}.`;case"unknown":return`La vague ${ee(e.value)} n'est pas d\xE9clar\xE9e. Vagues d\xE9clar\xE9es\xA0: ${e.declared.length>0?e.declared.join(", "):"aucune"}. Ajoutez \xAB\xA0wave ${e.value}\xA0\xBB au-dessus de la premi\xE8re swimlane qui l'utilise.${LN(e.suggestion)}`;case"forward":return`La vague ${ee(e.value)} est utilis\xE9e avant sa d\xE9claration \xE0 la ligne ${e.line}. D\xE9clarez les vagues au-dessus des swimlanes qui les utilisent.`;case"not-a-wave":return`\xAB\xA0wave:\xA0\xBB doit nommer une vague, mais ${ee(e.value)} est ${ON[e.kind]}.${LN(e.suggestion)}`}},"NL.E1102":e=>`${HT(qT(e.entity))} a wave:${e.wave}, mais ${qT(e.container)} qui le contient a wave:${e.containerWave}. La vague d'un conteneur s'applique \xE0 tout ce qu'il contient\xA0; retirez l'une des deux propri\xE9t\xE9s wave:.`,"NL.E1103":e=>{switch(e.reason){case"sequence":{let t=e.items.length>1,n=`${t?"Les \xE9l\xE9ments":"L'\xE9l\xE9ment"} ${e.items.map(ee).join(", ")} (vague ${ee(e.itemWave)})`,r=typeof e.ref=="string"?ee(e.ref):nl(e.ref);return`${n} ${t?"viennent":"vient"} apr\xE8s ${r} (vague ${ee(e.refWave)}) dans ${nl(e.flow)}. Le travail d'une swimlane ou d'un groupe s'ex\xE9cute dans l'ordre, il doit donc aussi \xEAtre ordonn\xE9 par vague\xA0: d\xE9placez ${r} sous ${ee(e.last)}, ou changez leurs vagues.`}case"join":return`L'\xE9l\xE9ment ${ee(e.name)} (vague ${ee(e.wave)}) vient apr\xE8s ${nl(e.block)} dans ${nl(e.flow)}, et ce bloc ne peut pas se terminer avant sa piste ${ee(e.track)} (vague ${ee(e.trackWave)}). D\xE9placez ${ee(e.name)} au-dessus du bloc ou dans une piste distincte, ou changez l'une de leurs vagues.`;case"after-item":return e.container?`${HT($N(e.container))} a after:${e.refId}, mais ${ee(e.ref)} est dans la vague ult\xE9rieure ${ee(e.refWave)}. La vague ${ee(e.refWave)} ne peut pas d\xE9marrer avant la fin de la vague ${ee(e.wave)}, donc ${ee(e.name)} (vague ${ee(e.wave)}) \xE0 l'int\xE9rieur ne pourrait jamais d\xE9marrer\xA0: d\xE9placez ${ee(e.name)} dans la vague ${ee(e.refWave)} ou une vague ult\xE9rieure, ou retirez le after:.`:`L'\xE9l\xE9ment ${ee(e.name)} (vague ${ee(e.wave)}) a after:${e.refId}, mais ${ee(e.ref)} est dans la vague ult\xE9rieure ${ee(e.refWave)}. La vague ${ee(e.refWave)} ne peut pas d\xE9marrer avant la fin de la vague ${ee(e.wave)}, donc ${ee(e.name)} ne pourrait jamais d\xE9marrer\xA0: d\xE9placez-le dans la vague ${ee(e.refWave)} ou une vague ult\xE9rieure, ou retirez le after:.`;case"after-wave":{let t=e.container?.kind==="parallel"?"bloc parall\xE8le":"groupe";return e.container?`${HT($N(e.container))} (vague ${ee(e.wave)}) a after:${e.refId}, mais le travail ne peut pas attendre la fin de sa propre vague ni d'une vague ult\xE9rieure. Utilisez une vague ant\xE9rieure, ou d\xE9placez le ${t} dans une vague ult\xE9rieure.`:`L'\xE9l\xE9ment ${ee(e.name)} (vague ${ee(e.wave)}) a after:${e.refId}, mais le travail ne peut pas attendre la fin de sa propre vague ni d'une vague ult\xE9rieure. Utilisez une vague ant\xE9rieure, ou d\xE9placez ${ee(e.name)} dans une vague ult\xE9rieure.`}case"chain":return`L'\xE9l\xE9ment ${ee(e.name)} (vague ${ee(e.wave)}) ne pourrait jamais d\xE9marrer\xA0: via ${e.chain.join(" \u2192 ")}, il attend du travail qui ne peut pas d\xE9marrer avant la fin de la vague ${ee(e.wave)}. D\xE9placez ${ee(e.name)} dans une vague ult\xE9rieure, ou rompez la cha\xEEne.`}},"NL.E1104":e=>{switch(e.reason){case"swimlane":return`\xAB\xA0wave:\xA0\xBB n'est pas autoris\xE9 sur la swimlane ${ee(e.name)}\xA0: une swimlane couvre toutes les vagues. Placez wave: sur ses \xE9l\xE9ments, ou regroupez-les dans \xAB\xA0group wave:${e.value}\xA0\xBB.`;case"milestone":return`\xAB\xA0wave:\xA0\xBB n'est pas autoris\xE9 sur le jalon ${ee(e.name)}. Pour placer un jalon \xE0 la fin d'une vague, utilisez after:${e.value}.`;case"other":return`\xAB\xA0wave:\xA0\xBB n'est pas autoris\xE9 sur ${pX[e.type]} ${ee(e.name)}\xA0; seuls item, group et parallel peuvent appartenir \xE0 une vague.`}},"NL.E1105":e=>e.reason==="before"?`\xAB\xA0before:\xA0\xBB n'est pas autoris\xE9 sur la vague ${ee(e.name)}. La fin d'une vague d\xE9coule de ses \xE9l\xE9ments\xA0; pour donner une \xE9ch\xE9ance \xE0 une vague, ajoutez un jalon dat\xE9\xA0: milestone ${e.name}-due date:<AAAA-MM-JJ> after:${e.name}.`:`\xAB\xA0${e.key}:\xA0\xBB n'est pas autoris\xE9 sur la vague ${ee(e.name)}. L'\xE9tendue d'une vague d\xE9coule de ses \xE9l\xE9ments\xA0; seul after: (une ancre, un jalon dat\xE9 ou une date ISO) peut retarder le d\xE9but d'une vague.`,"NL.E1106":e=>`La vague ${ee(e.name)} a after:${e.ref}, mais ${ee(e.ref)} est ${ON[e.kind]}. Le after: d'une vague accepte seulement des ancres, des jalons dat\xE9s ou une date ISO\xA0; pour qu'une vague attende du travail, placez ce travail dans une vague ant\xE9rieure.`,"NL.W1001":e=>`L'\xE9l\xE9ment ${ee(e.name)} est \xE9pingl\xE9 \xE0 ${e.pin} (${e.key}:), mais la vague ${ee(e.wave)} ne peut pas d\xE9marrer avant le ${e.start}\xA0; l'\xE9l\xE9ment d\xE9marre au d\xE9but de la vague.`,"NL.W1002":e=>`Les barri\xE8res de vagues ne se sont pas stabilis\xE9es apr\xE8s ${e.passes} passes de mise en page\xA0; le calendrier dessin\xE9 pourrait donc ne pas respecter l'ordre des vagues. La roadmap comporte probablement un conflit d'ordre que la validation n'a pas d\xE9tect\xE9.`,"NL.W1100":e=>{let t=zT(e);return e.reason==="item"?`before:${e.ref} sur ${t} ne peut jamais \xEAtre respect\xE9\xA0: ${t} est dans la vague ${ee(e.wave)}, qui ne peut pas d\xE9marrer avant la fin de ${ee(e.ref)} (vague ${ee(e.refWave)}). Le d\xE9passement sera peint.`:`before:${e.ref} sur ${t} ne peut jamais \xEAtre respect\xE9\xA0: ${t} est dans la vague ${ee(e.wave)}, qui ne peut pas se terminer avant le d\xE9but de la vague ${ee(e.ref)}. Le d\xE9passement sera peint.`},"NL.W1101":e=>{let t=zT(e);switch(e.reason){case"forward-lane":return`${e.key}:${e.ref} sur ${t} r\xE9f\xE9rence ${ee(e.ref)}, qui se trouve dans une swimlane ult\xE9rieure (${ee(e.lane)}). La mise en page place les swimlanes dans l'ordre et ignore les r\xE9f\xE9rences \xE0 du travail qu'elle n'a pas encore plac\xE9, elle ignore donc ce ${e.key}:. D\xE9placez la swimlane ${ee(e.lane)} au-dessus de la swimlane ${ee(e.ownLane)}, ou retirez le ${e.key}:.`;case"forward-flow":return`${e.key}:${e.ref} sur ${t} r\xE9f\xE9rence ${ee(e.ref)}, qui vient plus tard dans ${nl(e.flow)}. La mise en page ignore les r\xE9f\xE9rences \xE0 du travail qu'elle n'a pas encore plac\xE9, elle ignore donc ce ${e.key}:. D\xE9placez ${ee(e.ref)} au-dessus ${zT(e,!0)}, ou retirez le ${e.key}:.`;case"ancestor":return`${e.key}:${e.ref} sur ${t} r\xE9f\xE9rence ${ee(e.ref)}, qui le contient. La mise en page ignore les r\xE9f\xE9rences \xE0 un groupe ou un bloc parall\xE8le englobant, elle ignore donc ce ${e.key}:. Retirez le ${e.key}:.`;case"floating-milestone":return`${e.key}:${e.ref} sur ${t} r\xE9f\xE9rence le jalon ${ee(e.ref)}, qui n'a pas de date. Les jalons sans date sont plac\xE9s apr\xE8s tout le travail, la mise en page ignore donc ce ${e.key}:. R\xE9f\xE9rencez plut\xF4t les pr\xE9d\xE9cesseurs du jalon ou une vague.`}},"NL.I1006":e=>{switch(e.reason){case"one":return`La vague ${ee(e.name)} n'a aucun \xE9l\xE9ment, elle ne couvre donc aucune dur\xE9e\xA0; elle est dessin\xE9e comme un rep\xE8re dans la bande des vagues et list\xE9e dans la l\xE9gende des vagues.`;case"many":return`Les vagues ${DN(e.names)} n'ont aucun \xE9l\xE9ment, elles ne couvrent donc aucune dur\xE9e\xA0; elles sont dessin\xE9es comme des rep\xE8res dans la bande des vagues et list\xE9es dans la l\xE9gende des vagues.`;case"all":return`Aucune des vagues d\xE9clar\xE9es (${DN(e.names)}) n'a encore d'\xE9l\xE9ment. La bande des vagues affiche un espace r\xE9serv\xE9 jusqu'\xE0 ce que du travail soit affect\xE9 avec wave:<id>.`}},"NL.I1007":e=>`Le jalon ${ee(e.name)} (${e.date}) est d\xE9pass\xE9\xA0: la vague ${ee(e.wave)} se termine le ${e.end}.`,"NL.I1008":e=>`L'\xE9l\xE9ment ${ee(e.name)} est \xE9pingl\xE9 \xE0 ${e.pin} (${e.key}:), un jour non ouvr\xE9\xA0; il d\xE9marre le ${e.start}.`};var WN={};var UN={};var mX=new Map([["en-US",CN],["fr",BN],["fr-CA",WN],["fr-FR",UN]]);function Kr(e,t,...n){for(let r of gX(e)){let o=mX.get(r)?.[t];if(o)return o(...n)}return t}var XN="en-US";function gX(e){let t=[],n=yX(e);for(;n.length>0;){t.includes(n)||t.push(n);let r=n.lastIndexOf("-");if(r<=0)break;n=n.slice(0,r)}return t.includes(XN)||t.push(XN),t}function yX(e){return e.split("-").map((n,r)=>r===0?n.toLowerCase():/^[a-zA-Z]{2}$/.test(n)?n.toUpperCase():n).join("-")}var xX=/[\\/]/;function HN(e){for(let t=e.length-1;t>=0;t--){let n=e.charCodeAt(t);if(n===47||n===92)return t}return-1}function GN(...e){for(let t of e)if(t){if(t.includes("\\")&&!t.includes("/"))return"\\";if(t.includes("/"))return"/"}return"/"}function vX(e){return e?e[0]==="/"||e[0]==="\\"?!0:e.length>=3&&/^[A-Za-z]:[\\/]/.test(e):!1}function zN(e){let t=HN(e);return t<0?".":t===0?e[0]:t===2&&/^[A-Za-z]:[\\/]/.test(e)?e.slice(0,3):e.slice(0,t)}function rl(e){let t=HN(e);return t<0?e:e.slice(t+1)}function VT(e,t){if(vX(t))return jN(t,GN(t));let n=GN(e,t);return jN(`${e}${n}${t}`,n)}function jN(e,t){let n="",r=e,i=/^([A-Za-z]:)([\\/])?/.exec(r);i?(n=i[1]+(i[2]?t:""),r=r.slice(i[0].length)):(r[0]==="/"||r[0]==="\\")&&(n=t,r=r.replace(/^[\\/]+/,""));let o=[];for(let s of r.split(xX))if(!(s===""||s===".")){if(s===".."){o.length>0&&o[o.length-1]!==".."?o.pop():n||o.push("..");continue}o.push(s)}return n+o.join(t)}function yn(e){return/[\r\n]/.test(e)?e.replace(/\s*[\r\n]+\s*/g," ").trim():e}var Ft=/^\d{4}-\d{2}-\d{2}$/;function fe(e){return e.key.endsWith(":")?e.key.slice(0,-1):e.key}function qN(e,t,n){if(e===t)return 0;let r=e.length,i=t.length;if(Math.abs(r-i)>n)return n+1;if(r===0)return i;if(i===0)return r;let o=new Array(i+1),s=new Array(i+1);for(let a=0;a<=i;a++)o[a]=a;for(let a=1;a<=r;a++){s[0]=a;let c=a;for(let u=1;u<=i;u++){let f=e.charCodeAt(a-1)===t.charCodeAt(u-1)?0:1;s[u]=Math.min(o[u]+1,s[u-1]+1,o[u-1]+f),s[u]<c&&(c=s[u])}if(c>n)return n+1;let l=o;o=s,s=l}return o[i]}function VN(e,t,n=2){let r,i=n+1;for(let o of t){let s=qN(e,o,n);if(s<i&&(r=o,i=s,s===0))break}return r}function YN(e,t,n=2){let r,i=n+1,o=!1;for(let s of t){let a=qN(e,s,n);a<i?(r=s,i=a,o=!1):a===i&&a<=n&&s!==r&&(o=!0)}return o?void 0:r}function it(e){return e.name??(e.title===void 0?"<unnamed>":yn(e.title))}function qo(e){return e.$type==="NonWorkingDeclaration"?"non-working":e.$type.replace(/Declaration$|Block$/,"").toLowerCase()}function kh(e){let t=qo(e),n=e.name??(e.title===void 0?void 0:yn(e.title));return n?`${t} "${n}"`:t}function vr(e){let t=e.$cstNode;return t?t.range.start.line+1:0}function Rh(e,t){return`"${e}" cannot be set on "default ${t}". Identity-defining, sizing, sequencing, reference, and prose properties must be explicit on each entity.`}function Jn(e){let t=new Set,n=[];for(let r of e.roadmapEntries)!on(r)||!r.name||t.has(r.name)||(t.add(r.name),n.push(r));return n}function TX(e){let t=new Map;return Jn(e).forEach((n,r)=>{t.set(n.name,r+1)}),t}function ZN(e){return(e.properties??[]).filter(n=>fe(n)==="wave")}function JN(e){return ZN(e)[0]}function YT(e){return e.value!==void 0?e.value:e.values.length===1?e.values[0]:`[${e.values.join(", ")}]`}function wX(e){let t=e;for(;t?.$container&&!Qa(t.$container);)t=t.$container;let n=t?.$container;if(!(!t||!n||!Qa(n)))return{file:n,index:n.roadmapEntries.indexOf(t),waveDecls:QN(n)}}function QN(e){let t=new Map;return e.roadmapEntries.forEach((n,r)=>{on(n)&&n.name&&!t.has(n.name)&&t.set(n.name,r)}),t}function KT(e,t,n,r=wX(t)){let i=YT(e);if(e.value===void 0&&e.values.length!==1)return{status:"list",value:i};let o=n.get(i);if(o===void 0)return{status:"missing",value:i};if(r){let s=r.waveDecls.get(i);if(s!==void 0&&(r.index<0||s>r.index))return{status:"forward",value:i,line:vr(r.file.roadmapEntries[s])}}return{status:"valid",id:i,index:o}}function EX(e){return Ve(e)||_t(e)}function _X(e,t,n,r){let i=JN(e);if(!i)return t;let o=KT(i,e,n,r);if(o.status==="valid")return t??o.index}function Ah(e,t){let n=new Map,r=new Map,i=new Map,o=(s,a,c)=>{let l=_X(s,a,t,c);l!==void 0&&n.set(s,l);let u=l;if(Ve(s)||_t(s)){let f=[];for(let d of s.content)yr(d)||f.push(o(d,l,c));l===void 0&&(Ve(s)?u=f[0]:f.length>0&&!f.includes(void 0)&&(u=Math.min(...f)))}return u!==void 0&&r.set(s,u),u};for(let s of e){let a,c=s.$container;if(Qa(c)){let l=i.get(c);l||(l=QN(c),i.set(c,l)),a={file:c,index:c.roadmapEntries.indexOf(s),waveDecls:l}}for(let l of s.content)yr(l)||o(l,void 0,a)}return{waveOf:n,leadOf:r}}function bX(e){return Ft.test(e)&&!Number.isNaN(new Date(e).getTime())}function eP(e){return(e.properties??[]).find(n=>fe(n)==="date")?.value}function kX(e){let t=new Map,n=r=>{let i=r.name;if(i&&!t.has(i)&&t.set(i,r),bt(r)||_t(r)||Ve(r))for(let o of r.content)n(o);else if(Wt(r))for(let o of r.content)(Wt(o)||On(o))&&n(o)};e.roadmapDecl&&n(e.roadmapDecl);for(let r of e.roadmapEntries)n(r);return t}function il(e){let t=kX(e);return n=>t.get(n)}function yu(e,t){let n=null;for(let r of e.properties){if(fe(r)!=="after")continue;let i=r.value!==void 0?[r.value]:r.values;for(let o of i){if(!o)continue;let s;if(Ft.test(o))s=o;else{let a=t(o);(eo(a)||Cn(a))&&(s=eP(a))}s===void 0||!bX(s)||(n===null||s>n.date)&&(n={date:s,ref:o})}}return n}var tP=new Set(["before","date","start","length","duration","size","capacity","remaining","wave"]);function xu(e){return on(e.$container)&&tP.has(fe(e))}var RX={ItemDeclaration:"item",GroupBlock:"group",ParallelBlock:"parallel",SwimlaneDeclaration:"swimlane",AnchorDeclaration:"anchor",MilestoneDeclaration:"milestone",WaveDeclaration:"wave",LabelDeclaration:"label",SizeDeclaration:"size",StatusDeclaration:"status",PersonDeclaration:"person",TeamDeclaration:"team",FootnoteDeclaration:"footnote",RoadmapDeclaration:"roadmap",StyleDeclaration:"style",SymbolDeclaration:"symbol"};function gu(e){return RX[e.$type]??qo(e)}function AX(e,t){let n=[],r=it(e),i=!e.name&&e.title===void 0;if(e.name||n.push({severity:"error",code:"NL.E1100",args:{...e.title===void 0?{}:{title:yn(e.title)},line:vr(e)},node:e}),i)return n;for(let o of e.properties){let s=fe(o);if(tP.has(s)){n.push({severity:"error",code:"NL.E1105",args:s==="before"?{reason:"before",name:r}:{reason:"other",key:s,name:r},node:o,property:"key"});continue}if(s!=="after")continue;let a=o.value!==void 0?[o.value]:o.values;for(let c of a){if(!c||Ft.test(c))continue;let l=t(c);if(!(!l||eo(l))){if(Cn(l)){if(eP(l)!==void 0)continue;n.push({severity:"error",code:"NL.E1106",args:{name:r,ref:c,kind:"floating-milestone"},node:o});continue}n.push({severity:"error",code:"NL.E1106",args:{name:r,ref:c,kind:gu(l)},node:o})}}}return n}function Ih(e){let t=il(e);return e.roadmapEntries.filter(on).flatMap(n=>AX(n,t))}function IX(e){let t=[],n=r=>{if(!on(r)){if(t.push(r),bt(r)||_t(r)||Ve(r))for(let i of r.content)yr(i)||n(i);else if(Wt(r))for(let i of r.content)(Wt(i)||On(i))&&n(i)}};for(let r of e.configEntries)gn(r)&&t.push(r);e.roadmapDecl&&n(e.roadmapDecl);for(let r of e.roadmapEntries)n(r);return t}function SX(e,t){let n=e.toLowerCase(),r=t.filter(o=>o.title!==void 0&&yn(o.title).toLowerCase()===n),i;if(r.length===1)i=r[0];else{let o=YN(e,t.map(s=>s.name));i=o===void 0?void 0:t.find(s=>s.name===o)}if(i)return i.title===void 0?{id:i.name}:{id:i.name,title:yn(i.title)}}function NX(e,t,n){let r=n(t);if(r)return gu(r);for(let i of e.configEntries)if((xr(i)||zo(i))&&i.name===t)return gu(i)}function PX(e,t){let n=e.$container;for(;EX(n);){let r=JN(n);if(r)return KT(r,n,t).status==="valid"?{container:n,prop:r}:void 0;n=n?.$container}}function KN(e,t){let n=t.name??(t.title===void 0?"":yn(t.title));return n?{kind:e,name:n}:{kind:e,name:n,line:vr(t)}}function CX(e){if(gn(e))return{kind:"default",entityType:e.entityType};let t=e,n=t.name??(t.title===void 0?"":yn(t.title)),r=gu(e);return n?{kind:r,name:n}:{kind:r,name:n,line:vr(e)}}function OX(e,t,n,r,i,o){let s=KT(n,t,i);switch(s.status){case"list":return{severity:"error",code:"NL.E1101",args:{reason:"list",value:s.value},node:n};case"forward":return{severity:"error",code:"NL.E1101",args:{reason:"forward",value:s.value,line:s.line},node:n};case"missing":{let u=NX(e,s.value,o),f=SX(s.value,r);return{severity:"error",code:"NL.E1101",args:u===void 0?{reason:"unknown",value:s.value,declared:r.map(d=>d.name),...f?{suggestion:f}:{}}:{reason:"not-a-wave",value:s.value,kind:u,...f?{suggestion:f}:{}},node:n}}case"valid":break}let a=PX(t,i);if(!a)return;let c=YT(a.prop);if(c===s.id)return;let l=Mt(t)?"item":Ve(t)?"group":"parallel";return{severity:"error",code:"NL.E1102",args:{entity:KN(l,t),wave:s.id,container:KN(Ve(a.container)?"group":"parallel",a.container),containerWave:c},node:n}}function Sh(e){let t=Jn(e),n=t.length>0,r=TX(e),i=il(e),o=[];for(let s of IX(e)){let a=ZN(s);if(a.length===0)continue;if(!n){for(let h of a)o.push({severity:"warning",code:"NL.W0702",args:{target:CX(s)},node:h,property:"key"});continue}if(gn(s)){for(let h of a)o.push({severity:"error",message:Rh("wave",s.entityType),node:h});continue}let c=s,l=it(c);if(!c.name&&c.title===void 0&&!Mt(s)&&!Ve(s)&&!_t(s))continue;if(bt(s)||Cn(s)){for(let h of a)o.push({severity:"error",code:"NL.E1104",args:{reason:bt(s)?"swimlane":"milestone",name:l,value:YT(h)},node:h});continue}if(!Mt(s)&&!Ve(s)&&!_t(s)){for(let h of a)o.push({severity:"error",code:"NL.E1104",args:{reason:"other",type:gu(s),name:l},node:h});continue}let[f,...d]=a,p=OX(e,s,f,t,r,i);if(p&&o.push(p),d.length>0){let h=a.flatMap(g=>g.value!==void 0?[g.value]:g.values);for(let g of d)o.push({severity:"error",code:"NL.E1101",args:{reason:"list",value:`[${h.join(", ")}]`},node:g})}}return o}var $X=["after-wave","after-item","sequence","join"];function Vo(e){return e.name??(e.title===void 0?void 0:yn(e.title))}function Nh(e){let t=Vo(e);if(bt(e))return{kind:"swimlane",name:it(e)};let n=Ve(e);return t?{kind:n?"group":"parallel",name:t}:{kind:n?"group-block":"parallel-block",line:vr(e)}}function nP(e){let t=Vo(e);return t!==void 0||e.$type==="ItemDeclaration"?t:{kind:Ve(e)?"group-block":"parallel-block",line:vr(e)}}function rP(e){return e.$type==="ItemDeclaration"||Vo(e)!==void 0?{name:it(e)}:{name:"",kind:Ve(e)?"group":"parallel",line:vr(e)}}function LX(e){let t=Ve(e)?"group":"parallel",n=Vo(e);return n?{kind:t,name:n}:{kind:t,name:"",line:vr(e)}}function ZT(e){return(e.value!==void 0?[e.value]:e.values).filter(t=>!!t)}function DX(e){return Cn(e)&&!e.properties.some(t=>fe(t)==="date")}function MX(e){return e.$type!=="ItemDeclaration"?!1:e.properties.some(t=>{let n=fe(t);return(n==="date"||n==="start")&&!!t.value&&Ft.test(t.value)})}function ol(e,t,n={}){if(t.length===0)return[];let r=new Map;t.forEach((k,O)=>{k.name&&r.set(k.name,O+1)});let i=k=>t[k-1]?.name??"",{lanes:o,lookup:s}=e,{waveOf:a,leadOf:c}=Ah(o,r),l=[],u=new Map,f=0,d=(k,O,B,H)=>{let J=l.length,V={node:k,lane:O,parent:B,children:[],prev:H,start:f++,reg:-1,ew:a.get(k),lw:c.get(k),pinned:MX(k),after:[],afterWaves:[]};if(l.push(V),Ve(k)||_t(k)){let ie=-1;for(let le of k.content)yr(le)||(ie=d(le,O,J,Ve(k)?ie:-1),V.children.push(ie));V.reg=f++}else V.reg=V.start;if(k.name){let ie=u.get(k.name)??[];ie.push(J),u.set(k.name,ie)}return J};o.forEach((k,O)=>{let B=-1;for(let H of k.content)yr(H)||(B=d(H,O,-1,B))});let p=(k,O)=>{let B=u.get(k);if(B){for(let H=B.length-1;H>=0;H--)if(l[B[H]].reg<l[O].start)return B[H]}},h=[],g=n.suppressCycleRefs??!0?BX(l,o,s):()=>!1;for(let k=0;k<l.length;k++){let O=l[k],B=rP(O.node);for(let H of O.node.properties){let J=fe(H);if(!(J!=="after"&&J!=="before"))for(let V of ZT(H)){if(Ft.test(V))continue;let ie=p(V,k),le=ie===void 0?r.get(V):void 0;if(J==="after"&&!O.pinned&&(ie!==void 0?O.after.push({from:ie,prop:H,ref:V}):le!==void 0&&O.afterWaves.push({prop:H,ref:V,j:le})),ie!==void 0||le!==void 0)continue;let xe=u.get(V)?.[0];if(xe===void 0&&!DX(s(V))||g(O.node.name,J,V))continue;let ve=!1;for(let ge=O.parent;ge>=0&&!ve;ge=l[ge].parent)ve=l[ge].node.name===V;h.push({severity:"warning",code:"NL.W1101",args:xe===void 0?{reason:"floating-milestone",key:J,ref:V,...B}:ve?{reason:"ancestor",key:J,ref:V,...B}:l[xe].lane!==O.lane?{reason:"forward-lane",key:J,ref:V,...B,lane:it(o[l[xe].lane]),ownLane:it(o[O.lane])}:{reason:"forward-flow",key:J,ref:V,...B,flow:Nh(FX(l,o,k,xe))},node:H})}}}let T=new Array(l.length),x=new Array(l.length);for(let k=l.length-1;k>=0;k--){let O=l[k];if(O.node.$type==="ItemDeclaration"){T[k]=O.ew,x[k]=O.ew;continue}for(let B of O.children){let H=T[B],J=x[B];H!==void 0&&(T[k]=Math.max(T[k]??H,H)),J!==void 0&&(x[k]=Math.min(x[k]??J,J))}}for(let k=0;k<l.length;k++){let O=T[k];if(O===void 0)continue;let B=rP(l[k].node);for(let H of l[k].node.properties)if(fe(H)==="before")for(let J of ZT(H)){if(Ft.test(J))continue;let V=p(J,k);if(V!==void 0){let le=x[V];if(le===void 0||O<=le)continue;h.push({severity:"warning",code:"NL.W1100",args:{reason:"item",ref:J,...B,wave:i(O),refWave:i(le)},node:H});continue}let ie=r.get(J);ie===void 0||O<ie||h.push({severity:"warning",code:"NL.W1100",args:{reason:"wave",ref:J,...B,wave:i(O)},node:H})}}let y=k=>l[k].node.$type!=="ItemDeclaration",E=k=>{let{parent:O,pinned:B}=l[k];return B||O<0?!1:_t(l[O].node)||l[O].children[0]===k},w=new Array(l.length).fill(0),b=new Array(l.length).fill(0),L=k=>{let O=l[k],B=[];O.lw!==void 0&&B.push({term:{kind:O.ew!==void 0?"wave":"lead"},value:O.lw-1});for(let H of O.afterWaves)B.push({term:{kind:"after-wave",prop:H.prop,ref:H.ref},value:H.j});E(k)&&B.push({term:{kind:"parent",from:O.parent},value:w[O.parent]}),!O.pinned&&O.prev>=0&&B.push({term:{kind:"seq",from:O.prev},value:b[O.prev]});for(let H of O.after)B.push({term:{kind:"after",from:H.from,prop:H.prop,ref:H.ref},value:b[H.from]});return B},P=k=>{let O=w[k];for(let B of l[k].children)O=Math.max(O,b[B]);return O},$=l.map((k,O)=>[2*O+1]),G=l.map(()=>[]);for(let k=0;k<l.length;k++){let O=l[k];E(k)&&$[O.parent].push(2*k),O.prev>=0&&G[O.prev].push(2*k);for(let B of O.after)G[B.from].push(2*k);O.parent>=0&&G[k].push(2*O.parent+1)}let Y=[],D=new Array(2*l.length).fill(!0);for(let k=0;k<l.length;k++)Y.push(2*k,2*k+1);for(let k=0;k<Y.length;k++){let O=Y[k];D[O]=!1;let B=O>>1,H=(O&1)===1,J=H?P(B):Math.max(0,...L(B).map(V=>V.value));if(!(J<=(H?b[B]:w[B]))){H?b[B]=J:w[B]=J;for(let V of H?G[B]:$[B])D[V]||(D[V]=!0,Y.push(V))}}let S=(k,O)=>L(k).filter(B=>B.value===O).map(B=>B.term),F=(k,O)=>{if(!y(k))return[{kind:"start"}];let B=l[k].children.filter(H=>b[H]===O).map(H=>({kind:"child",from:H}));return B.length>0?Ve(l[k].node)?B.reverse():B:w[k]===O?[{kind:"start"}]:[]},X=(k,O)=>{let B=[{i:k,via:k}];for(;B.length>0;){let{i:H,via:J}=B.pop(),V=F(H,O);for(let ie=V.length-1;ie>=0;ie--){let le=V[ie];if(le.kind==="start"){let xe=l[H].ew;if(xe!==void 0&&xe-1===O)return{origin:H,via:J}}else le.kind==="child"&&B.push({i:le.from,via:H===k?le.from:J})}}},R=(k,O)=>{let B=l[k].ew;return B!==void 0&&B-1===O},C=(k,O)=>{for(let B=k;!l[B].pinned;){let H=l[B].prev;if(H<0){if(!E(B))return;B=l[B].parent;continue}let J=l[H].ew;if(J!==void 0&&J>O)return H;B=H}},N=new Map,j=[],q=new Map,z=(k,O,B)=>`${k}:${l[k].node.properties.indexOf(O)}:${B}`,ne=(k,O)=>{let B=[],H=k;for(;;){let J=S(H,O);for(let ie of J)if(ie.kind==="after-wave")B.push({variant:"after-wave",owner:H,prop:ie.prop,ref:ie.ref});else if(ie.kind==="after")R(ie.from,O)&&B.push({variant:"after-item",owner:H,prop:ie.prop,ref:ie.ref});else if(ie.kind==="seq"){let le=ie.from,xe=l[le].node;if(_t(xe)&&l[le].ew===void 0){let ve=X(le,O),ge=ve&&(Vo(l[ve.via].node)??Vo(l[ve.origin].node));ge&&B.push({variant:"join",owner:H,block:le,track:ge})}else if(R(le,O)){let ve=nP(xe);ve&&B.push({variant:"sequence",owner:H,pred:le,ref:ve})}}let V=J.find(ie=>ie.kind==="parent");if(!V)break;H=V.from}for(let J of $X){let V=B.find(ie=>ie.variant===J);if(V)return V}},oe=(k,O)=>{let B=[{key:2*k,from:-1}],H=new Set([2*k]),J,V=(ie,le)=>{H.has(ie)||(H.add(ie),B.push({key:ie,from:le}))};for(let ie=0;ie<B.length;ie++){let le=B[ie].key>>1;if(le!==k&&N.has(le)){J??(J=le);continue}if((B[ie].key&1)===1){for(let ge of F(le,O))ge.kind==="start"?V(2*le,ie):ge.kind==="child"&&V(2*ge.from+1,ie);continue}let xe=S(le,O),ve=xe.find(ge=>ge.kind==="wave"||ge.kind==="lead")??xe.find(ge=>ge.kind==="after-wave");if(ve){let ge=[];for(let Fe=ie;Fe>=0;Fe=B[Fe].from){let ot=B[Fe].key>>1;ge[ge.length-1]!==ot&&ge.push(ot)}let Ye=it(l[le].node);return{path:ge,origin:ve.kind==="after-wave"?`${Ye} (after:${ve.ref})`:`${Ye} (wave "${i(O+1)}")`}}for(let ge of xe)ge.kind==="parent"?V(2*ge.from,ie):(ge.kind==="seq"||ge.kind==="after")&&V(2*ge.from+1,ie)}return{hit:J}},he=(k,O,B,H)=>{let J=it(l[O].node),V=i(B),ie=i(H+1),le=l[k.owner].node,xe=k.owner===O?void 0:LX(le);switch(k.variant){case"after-wave":{let ve=l[k.owner].ew===void 0?void 0:xe;return{node:k.prop,run:[O],build:()=>({reason:"after-wave",name:J,wave:V,refId:k.ref,...ve?{container:ve}:{}})}}case"after-item":return{node:k.prop,run:[O],build:()=>({reason:"after-item",name:J,wave:V,refId:k.ref,ref:k.ref,refWave:ie,...xe?{container:xe}:{}})};case"join":{let ve=l[k.block];return{node:l[O].node,run:[O],build:()=>({reason:"join",name:J,wave:V,block:Nh(ve.node),flow:Nh(iP(l,o,k.block)),track:k.track,trackWave:ie})}}case"sequence":{let ve=k.pred,ge=l[ve].parent,Ye=Fe=>{if(ge<0)return l[Fe].lane===l[ve].lane;for(let ot=l[Fe].parent;ot>=0;ot=l[ot].parent)if(ot===ge)return!0;return!1};return{node:l[O].node,run:[O],build:Fe=>{let ot=Fe.filter(Ye);return{reason:"sequence",items:ot.map(sn=>it(l[sn].node)),itemWave:V,ref:k.ref,refWave:i(l[ve].ew??H+1),flow:Nh(iP(l,o,ve)),last:it(l[ot[ot.length-1]].node)}},seq:{pred:ve,ref:k.ref,inFlow:Ye}}}}},re=(k,O)=>(j.push(O),k!==void 0&&q.set(k,O),O),ae=(k,O,B,H)=>{let J=k.variant==="sequence"?`sequence:${k.pred}:${B}`:k.variant==="join"?`join:${k.block}:${B}`:`${k.variant}:${z(k.owner,k.prop,k.ref)}`,V=q.get(J);return V?(V.run.push(O),V):re(J,he(k,O,B,H))};for(let k=0;k<l.length;k++){let O=l[k],B=O.ew;if(O.node.$type!=="ItemDeclaration"||B===void 0||w[k]<B)continue;let H=w[k],J=ne(k,H),V;if(J)V=ae(J,k,B,H);else{let ie=oe(k,H);if("path"in ie){let le=ie.path.slice(1).filter(Ye=>!y(Ye)||Vo(l[Ye].node)!==void 0).map(Ye=>it(l[Ye].node)),xe=[ie.origin,...le.filter((Ye,Fe)=>le[Fe-1]!==Ye)],ve=it(O.node),ge=i(B);V=re(void 0,{node:O.node,run:[k],build:()=>({reason:"chain",name:ve,wave:ge,chain:xe})})}else{let le=ie.hit===void 0?void 0:N.get(ie.hit),xe=le?.seq;if(xe?.inFlow(k)){let ve=C(k,B),ge=ve===void 0?void 0:nP(l[ve].node),Ye=ve!==void 0&&ge!==void 0?{variant:"sequence",owner:k,pred:ve,ref:ge}:{variant:"sequence",owner:k,pred:xe.pred,ref:xe.ref};V=ae(Ye,k,B,H)}else V=le,V?.run.push(k)}}V&&N.set(k,V)}for(let k of j)h.push({severity:"error",code:"NL.E1103",args:k.build(k.run),node:k.node});return h}function iP(e,t,n){let r=e[n].parent;return r<0?t[e[n].lane]:e[r].node}function FX(e,t,n,r){let i=new Set;for(let o=e[r].parent;o>=0;o=e[o].parent)i.add(o);for(let o=e[n].parent;o>=0;o=e[o].parent)if(i.has(o))return e[o].node;return t[e[n].lane]}function BX(e,t,n){let r=new Map,i=(l,u)=>{let f=r.get(l)??new Set;f.add(u),r.set(l,f)},o=[],s=(l,u)=>{if(l)for(let f of u){let d=fe(f);if(!(d!=="after"&&d!=="before"))for(let p of ZT(f))Ft.test(p)||(d==="after"?i(l,p):i(p,l),o.push(p))}};for(let l of t)s(l.name,l.properties);for(let l of e)s(l.node.name,l.node.properties);let a=new Set;for(;o.length>0;){let l=o.pop();if(a.has(l))continue;a.add(l);let u=n(l);Cn(u)&&s(u.name,u.properties)}let c=(l,u)=>{let f=new Set([l]),d=[l];for(;d.length>0;){let p=d.pop();if(p===u)return!0;for(let h of r.get(p)??[])f.has(h)||(f.add(h),d.push(h))}return!1};return(l,u,f)=>l?u==="after"?c(f,l):c(l,f):!1}var oP="v1",JT=new Set(["planned","in-progress","active","done","completed","at-risk","blocked"]),Ph=new Set(["bg","fg","text","border","icon","shadow","font","weight","italic","text-size","padding","spacing","header-height","corner-radius","bracket","header-position","capacity-icon","timeline-position","minor-grid","non-working"]),WX=new Set(["hide","show"]),UX=new Set(["header-height","header-position","timeline-position","minor-grid","non-working"]),iw=new Set(["none","multiplier","person","people","points","time"]),Ch=new Set([...iw,"shield","warning","lock","calendar"]),xP="none",Oh={border:new Set(["solid","dashed","dotted"]),shadow:new Set(["none","subtle","soft","hard"]),font:new Set(["sans","serif","mono"]),weight:new Set(["thin","light","normal","bold"]),italic:new Set(["true","false"]),"text-size":new Set(["none","xs","sm","md","lg","xl"]),padding:new Set(["none","xs","sm","md","lg","xl"]),spacing:new Set(["none","xs","sm","md","lg","xl"]),"header-height":new Set(["none","xs","sm","md","lg","xl"]),"corner-radius":new Set(["none","xs","sm","md","lg","xl","full"]),bracket:new Set(["none","solid","dashed"]),"header-position":new Set(["beside","above"]),"timeline-position":new Set(["top","bottom","both"]),"minor-grid":new Set(["true","false"])},XX=new Set(["red","blue","yellow","green","orange","purple","violet","gray","grey","navy","white","none"]),GX=new Set(["business","full","custom"]),QT=new Set(["days-per-week","days-per-month","days-per-quarter","days-per-year"]),sP=new Set(["name","label-every","label"]),aP=new Set(["item","label","swimlane","roadmap","milestone","footnote","anchor","parallel","group"]),jX={item:new Set(["size","duration","after","before","remaining","link","description","owner"]),milestone:new Set(["date","after","link","description"]),anchor:new Set(["date","link","description"]),footnote:new Set(["on","link","description"]),label:new Set(["link","description"]),swimlane:new Set(["capacity"]),roadmap:new Set,parallel:new Set,group:new Set},lP=new Set(["labels","link","style","description"]),HX={RoadmapDeclaration:new Set(["author","start","length","scale","calendar","logo","logo-size"]),AnchorDeclaration:new Set(["date"]),SwimlaneDeclaration:new Set(["owner","capacity","utilization-warn-at","utilization-over-at","status","after","before"]),ItemDeclaration:new Set(["size","duration","status","owner","after","before","remaining","capacity","date","start"]),ParallelBlock:new Set(["owner","after","before","status"]),GroupBlock:new Set(["owner","after","before","status"]),MilestoneDeclaration:new Set(["date","after"]),FootnoteDeclaration:new Set(["on"]),PersonDeclaration:new Set,TeamDeclaration:new Set,LabelDeclaration:new Set,SizeDeclaration:new Set(["effort"]),StatusDeclaration:new Set,WaveDeclaration:new Set(["after"])},zX=[{keys:new Set(["progress","percent","percentage","pct","complete","completion"]),requires:"remaining",suggest:"status: + remaining:"}];function qX(e,t){let n=e.toLowerCase();for(let r of zX)if(r.keys.has(n)&&t.has(r.requires))return r.suggest}var vu=/^\d+(?:\.\d+)?[dwmqy]$/,VX=/^\d+%$/,YX=/^#[0-9a-fA-F]{3,8}$/,KX=/^v\d+$/,cP=/^\d+$/,ZX=/^[dwmqy]$/,uP=/^\d+(\.\d+)?$/,ow=/^\d+(\.\d+)?%$/,vP=/^\d+\.\d+$/,JX=/^\d+$/,QX=/^[\x20-\x7E]{1,3}$/,eG=/^[a-zA-Z]{2,3}(-[a-zA-Z]{2}|-\d{3})?$/,tG=new Set(["merge","ignore","isolate"]),fP=new Set(["locale"]);function ew(e){let t=e?.roadmapDecl?.properties.find(i=>fe(i)==="start");if(!t)return{kind:"missing"};let n=t.value;if(!n||!Ft.test(n))return{kind:"invalid"};let r=new Date(n);return Number.isNaN(r.getTime())?{kind:"invalid"}:{kind:"valid",iso:n,date:r}}function ce(e,t,n,r,...i){e(t,Kr("en-US",r,...i),{...n,data:{code:r,args:i}})}function tw(e,t){let n={node:t.node,...t.property===void 0?{}:{property:t.property}};if("message"in t){e(t.severity,t.message,n);return}ce(e,t.severity,n,t.code,t.args)}function TP(e){let t=e.validation.ValidationRegistry,n=e.validation.NowlineValidator,r={NowlineFile:[n.checkFileStructure,n.checkUniqueIdentifiers,n.checkSwimlaneRequired,n.checkIndentationConsistency,n.checkRoadmapOnlyKeywordsPosition,n.checkForwardReferences,n.checkReferenceResolution,n.checkInlineDatePins,n.checkCircularDependencies,n.checkWaves,n.checkDuplicateSizeIds,n.checkCalendarBlockConsistency,n.checkHiddenTimelineStrip,n.checkPersonDeclarations,n.checkDuplicateSymbolIds,n.checkSymbolReferences,n.checkCalendarWeek,n.checkDuplicateCalendarDeclarationIds],NowlineDirective:[n.checkDirectiveVersion,n.checkDirectiveProperties],IncludeOption:[n.checkIncludeMode],IncludeDeclaration:[n.checkIncludeDuplicateOptions],EntityProperty:[n.checkPropertyValues],RoadmapDeclaration:[n.checkEntityIdOrTitle,n.checkRoadmapProperties,n.checkNoRawStyleProperties,n.checkUnknownEntityProperties],AnchorDeclaration:[n.checkEntityIdOrTitle,n.checkAnchorRequiredDate,n.checkAnchorAgainstStart,n.checkNoRawStyleProperties,n.checkNoFootnoteProperty,n.checkUnknownEntityProperties],SwimlaneDeclaration:[n.checkEntityIdOrTitle,n.checkNoRawStyleProperties,n.checkUtilizationOrdering,n.checkNoFootnoteProperty,n.checkUnknownEntityProperties],ItemDeclaration:[n.checkEntityIdOrTitle,n.checkItemRequiredDuration,n.checkNoRawStyleProperties,n.checkNoFootnoteProperty,n.checkUnknownEntityProperties],ParallelBlock:[n.checkParallelMinChildren,n.checkNoComputedProperties,n.checkNoRawStyleProperties,n.checkNoFootnoteProperty,n.checkUnknownEntityProperties],GroupBlock:[n.checkGroupMinChildren,n.checkNoComputedProperties,n.checkNoRawStyleProperties,n.checkNoFootnoteProperty,n.checkUnknownEntityProperties],MilestoneDeclaration:[n.checkEntityIdOrTitle,n.checkMilestoneRequirement,n.checkMilestoneAgainstStart,n.checkNoRawStyleProperties,n.checkNoFootnoteProperty,n.checkUnknownEntityProperties],FootnoteDeclaration:[n.checkEntityIdOrTitle,n.checkFootnoteOn,n.checkNoRawStyleProperties,n.checkUnknownEntityProperties],PersonDeclaration:[n.checkEntityIdOrTitle,n.checkNoRawStyleProperties,n.checkNoFootnoteProperty,n.checkUnknownEntityProperties],TeamDeclaration:[n.checkEntityIdOrTitle,n.checkNoRawStyleProperties,n.checkNoFootnoteProperty,n.checkUnknownEntityProperties],StyleDeclaration:[n.checkEntityIdOrTitle],StyleProperty:[n.checkStylePropertyEnum],SymbolDeclaration:[n.checkEntityIdOrTitle,n.checkSymbolDeclaration],NonWorkingDeclaration:[n.checkCalendarDeclaration],WorkingDeclaration:[n.checkCalendarDeclaration],LabelDeclaration:[n.checkEntityIdOrTitle,n.checkNoRawStyleProperties,n.checkUnknownEntityProperties],SizeDeclaration:[n.checkEntityIdOrTitle,n.checkSizeDeclaration,n.checkNoRawStyleProperties,n.checkUnknownEntityProperties],StatusDeclaration:[n.checkEntityIdOrTitle,n.checkStatusDeclaration,n.checkNoRawStyleProperties,n.checkUnknownEntityProperties],WaveDeclaration:[n.checkNoRawStyleProperties,n.checkNoFootnoteProperty,n.checkUnknownEntityProperties],DefaultDeclaration:[n.checkDefaultDeclaration,n.checkUtilizationOrdering],CalendarBlock:[n.checkCalendarBlock],ScaleBlock:[n.checkScaleBlock]};t.register(r,n)}var Lh=class{checkFileStructure(t,n){let r=t.hasConfig?Lf.findNodeForKeyword(t.$cstNode,"config")?.offset:void 0,i=t.roadmapDecl?.$cstNode?.offset;r!==void 0&&i!==void 0&&r>i&&ce(n,"error",{node:t,property:"hasConfig"},"NL.E0001");for(let o of t.includes){let s=o.$cstNode?.offset??0;r!==void 0&&s>r&&ce(n,"error",{node:o},"NL.E0002"),i!==void 0&&s>i&&ce(n,"error",{node:o},"NL.E0003")}}checkRoadmapOnlyKeywordsPosition(t,n){}checkDirectiveVersion(t,n){if(!KX.test(t.version)){ce(n,"error",{node:t,property:"version"},"NL.E0100",{version:t.version});return}let r=parseInt(t.version.slice(1),10),i=parseInt(oP.slice(1),10);r>i&&ce(n,"error",{node:t,property:"version"},"NL.E0101",{version:t.version,supported:oP})}checkDirectiveProperties(t,n){let r=new Set;for(let i of t.properties){let o=fe(i);if(!fP.has(o)){ce(n,"error",{node:i,property:"key"},"NL.E0102",{key:o,allowed:[...fP].join(", ")});continue}if(r.has(o)&&ce(n,"error",{node:i,property:"key"},"NL.E0103",{key:o}),r.add(o),o==="locale"){let s=i.value;eG.test(s)||ce(n,"error",{node:i,property:"value"},"NL.E0104",{value:s})}}}checkEntityIdOrTitle(t,n){!t.name&&!t.title&&ce(n,"error",{node:t},"NL.E0301",{type:t.$type})}checkUniqueIdentifiers(t,n){let r=new Map,i=(o,s)=>{if(!o)return;let a=r.get(o);a?ce(n,"error",{node:s},"NL.E0300",{name:o,location:$h(a)}):r.set(o,s)};t.roadmapDecl?.name&&i(t.roadmapDecl.name,t.roadmapDecl);for(let o of t.roadmapEntries)lw(o,i);for(let o of t.configEntries)xr(o)&&o.name&&i(o.name,o)}checkIndentationConsistency(t,n){let r=t.$document?.textDocument.getText()??t.$cstNode?.text;if(!r)return;let i=r.split(/\r?\n/);for(let o=0;o<i.length;o++){let s=i[o];if(s.length===0)continue;let a=s.match(/^([\t ]+)/);if(!a)continue;let c=a[1];if(c.includes(" ")&&c.includes(" ")){ce(n,"error",{node:t},"NL.E0005",{line:o+1});return}}}checkSwimlaneRequired(t,n){let r=t.roadmapEntries.some(bt);t.roadmapDecl&&!r&&ce(n,"error",{node:t.roadmapDecl},"NL.E0004")}checkIncludeMode(t,n){tG.has(t.value)||ce(n,"error",{node:t,property:"value"},"NL.E0200",{value:t.value})}checkIncludeDuplicateOptions(t,n){let r=new Set;for(let i of t.options){let o=i.key.replace(/:$/,"");r.has(o)&&ce(n,"error",{node:i},"NL.E0201",{key:o}),r.add(o)}}checkPropertyValues(t,n){if(xu(t))return;let r=fe(t),i=t.value,o=t.values,s=i?[i]:o;switch(r){case"status":break;case"duration":i&&!vu.test(i)&&ce(n,"error",{node:t,property:"value"},"NL.E0400",{value:i});break;case"size":i&&!hP(i)&&ce(n,"error",{node:t,property:"value"},"NL.E0401",{value:i});break;case"effort":i&&!vu.test(i)&&ce(n,"error",{node:t,property:"value"},"NL.E0402",{value:i});break;case"remaining":{if(i)if(VX.test(i)){let a=parseFloat(i);(a<0||a>100)&&ce(n,"error",{node:t,property:"value"},"NL.E0404",{value:i})}else vu.test(i)||ce(n,"error",{node:t,property:"value"},"NL.E0403",{value:i});break}case"date":case"start":case"end":i&&!wu(i,nw(t.$container))&&ce(n,"error",{node:t,property:"value"},"NL.E0405",{key:r,value:i});break;case"scale":i&&!vu.test(i)&&ce(n,"error",{node:t,property:"value"},"NL.E0406",{value:i});break;case"calendar":i&&!GX.has(i)&&ce(n,"error",{node:t,property:"value"},"NL.E0407",{value:i});break;case"on":case"after":case"before":s.length===0&&ce(n,"error",{node:t},"NL.E0408",{key:r});break;case"capacity":{if(!i)break;let a=t.$container,c=nG(a);if(c==="invalid")break;c==="lane"?(!uP.test(i)||parseFloat(i)<=0)&&n("error",`Invalid swimlane capacity "${i}". Use a positive integer (e.g. capacity:5) or decimal (e.g. capacity:1.5). Percent literals are not allowed on swimlanes.`,{node:t,property:"value"}):ow.test(i)?parseFloat(i)<=0&&n("error",`Item capacity "${i}" must be positive.`,{node:t,property:"value"}):uP.test(i)?parseFloat(i)<=0&&n("error",`Item capacity "${i}" must be positive.`,{node:t,property:"value"}):n("error",`Invalid item capacity "${i}". Use a positive integer (capacity:2), decimal (capacity:0.5), or percent literal (capacity:50%).`,{node:t,property:"value"});break}case"overcapacity":{n("error",'"overcapacity:" was removed. Use "utilization-over-at:none" (and/or "utilization-warn-at:none") to suppress the lane utilization underline.',{node:t});break}case"utilization-warn-at":case"utilization-over-at":{if(!i)break;if(!rG(t.$container)){n("error",`"${r}:" is only valid on "swimlane" or "default swimlane".`,{node:t});break}if(i===xP)break;if(ow.test(i)){parseFloat(i)<=0&&n("error",`${r} value "${i}" must be positive.`,{node:t,property:"value"});break}if(vP.test(i)){parseFloat(i)<=0&&n("error",`${r} value "${i}" must be positive.`,{node:t,property:"value"});break}if(JX.test(i)){n("error",`Ambiguous ${r} value "${i}". Use the percent form ("${i}%") or the decimal-fraction form ("0.${i}") to make the intent explicit.`,{node:t,property:"value"});break}n("error",`Invalid ${r} value "${i}". Use a positive percent (e.g. 80%), a positive decimal fraction (e.g. 0.8), or "none" to opt out.`,{node:t,property:"value"});break}case"capacity-icon":break;case"icon":break;case"non-working":gn(t.$container)&&pP(i,t,n);break;default:if(Ph.has(r)){if(r==="bg"||r==="fg"||r==="text")i&&!dP(i)&&ce(n,"error",{node:t,property:"value"},"NL.E0801",{value:i,key:r});else if(r in Oh){let a=Oh[r];i&&!a.has(i)&&ce(n,"error",{node:t,property:"value"},"NL.E0802",{value:i,key:r,allowed:[...a].join(", ")})}}break}}checkAnchorRequiredDate(t,n){t.properties.find(i=>fe(i)==="date")||ce(n,"error",{node:t},"NL.E0500",{name:it(t)})}checkAnchorAgainstStart(t,n){let r=t.properties.find(a=>fe(a)==="date");if(!r?.value)return;let i=r.value;if(!Ft.test(i))return;let o=new Date(i);if(Number.isNaN(o.getTime()))return;let s=ew(t.$container);switch(s.kind){case"invalid":return;case"missing":ce(n,"error",{node:r,property:"value"},"NL.E0501",{name:it(t)});return;case"valid":o<s.date&&ce(n,"error",{node:r,property:"value"},"NL.E0502",{name:it(t),date:i,start:s.iso});return}}checkMilestoneRequirement(t,n){let r=t.properties.some(o=>fe(o)==="date"),i=t.properties.some(o=>fe(o)==="after");!r&&!i&&ce(n,"error",{node:t},"NL.E0503",{name:it(t)})}checkMilestoneAgainstStart(t,n){let r=t.properties.find(a=>fe(a)==="date");if(!r?.value)return;let i=r.value;if(!Ft.test(i))return;let o=new Date(i);if(Number.isNaN(o.getTime()))return;let s=ew(t.$container);switch(s.kind){case"invalid":return;case"missing":n("error",`Milestone "${it(t)}" has a date but the roadmap is missing "start:". Add start:YYYY-MM-DD to the roadmap.`,{node:r,property:"value"});return;case"valid":o<s.date&&ce(n,"error",{node:r,property:"value"},"NL.E0504",{name:it(t),date:i,start:s.iso});return}}checkFootnoteOn(t,n){t.properties.some(i=>fe(i)==="on")||ce(n,"error",{node:t},"NL.E0505")}checkNoFootnoteProperty(t,n){for(let r of t.properties)fe(r)==="footnote"&&n("error",`Property "footnote:" is not valid on ${kh(t)}. Footnotes attach via "on:" on the footnote declaration \u2014 declare \`footnote <id> on:<target-id>\` instead.`,{node:r})}checkItemRequiredDuration(t,n){let r=t.properties.some(o=>fe(o)==="duration"),i=t.properties.some(o=>fe(o)==="size");!r&&!i&&ce(n,"error",{node:t},"NL.E0600",{name:it(t)})}checkNoComputedProperties(t,n){for(let r of t.properties){let i=fe(r);(i==="size"||i==="duration"||i==="remaining"||i==="capacity")&&n("error",`"${i}" is not valid on ${t.$type==="ParallelBlock"?"parallel":"group"} (computed from children).`,{node:r})}}checkParallelMinChildren(t,n){let r=t.content.filter(i=>!yr(i));r.length===0?n("error","Parallel block must contain at least 2 children.",{node:t}):r.length===1&&n("warning","Parallel block has only 1 child. Use at least 2 for parallel execution.",{node:t})}checkGroupMinChildren(t,n){t.content.filter(i=>!yr(i)).length===0&&n("error","Group must contain at least 1 child.",{node:t})}checkNoRawStyleProperties(t,n){for(let r of t.properties){let i=fe(r);Ph.has(i)&&ce(n,"error",{node:r},"NL.E0804",{key:i,entity:kh(t)})}}checkUnknownEntityProperties(t,n){let r=HX[t.$type];if(!r)return;let i=t.$type==="ParallelBlock"||t.$type==="GroupBlock"?new Set(["size","duration","remaining","capacity"]):null;for(let o of t.properties){let s=fe(o);if(r.has(s)||lP.has(s)||Ph.has(s)||s==="footnote"||i?.has(s)||s==="wave"||xu(o))continue;let a=[...r,...lP],c=qX(s,r)??VN(s,a)??"";ce(n,"warning",{node:o,property:"key"},"NL.W0700",{key:s,entity:kh(t),suggested:c})}}checkRoadmapProperties(t,n){}checkStylePropertyEnum(t,n){let r=fe(t),i=t.value;if(r==="bg"||r==="fg"||r==="text")dP(i)||ce(n,"error",{node:t,property:"value"},"NL.E0801",{value:i,key:r});else if(r==="non-working")pP(i,t,n);else if(r in Oh){let o=Oh[r];o.has(i)||ce(n,"error",{node:t,property:"value"},"NL.E0802",{value:i,key:r,allowed:[...o].join(", ")})}else Ph.has(r)||ce(n,"error",{node:t,property:"key"},"NL.E0803",{key:r})}checkSizeDeclaration(t,n){t.properties.find(i=>fe(i)==="effort")||n("error",`Size "${it(t)}" requires an "effort:" property.`,{node:t}),t.name&&(vu.test(t.name)||ZX.test(t.name))&&n("error",`Size id "${t.name}" collides with the raw duration pattern. Choose a different name (e.g. "xs", "small", "quarter").`,{node:t,property:"name"})}checkStatusDeclaration(t,n){t.name&&JT.has(t.name)&&n("error",`Status id "${t.name}" collides with the built-in status value. Built-ins: ${[...JT].join(", ")}.`,{node:t,property:"name"})}checkWaves(t,n){for(let o of Ih(t))tw(n,o);for(let o of Sh(t))tw(n,o);let r=Jn(t);if(r.length===0)return;let i={lanes:t.roadmapEntries.filter(bt),lookup:il(t)};for(let o of ol(i,r))tw(n,o)}checkDuplicateSizeIds(t,n){let r=new Map;for(let i of t.roadmapEntries)if(Ho(i)&&i.name){let o=r.get(i.name);o?n("error",`Duplicate size id "${i.name}". First declared at ${$h(o)}.`,{node:i,property:"name"}):r.set(i.name,i)}}checkUtilizationOrdering(t,n){if(gn(t)&&t.entityType!=="swimlane")return;let r=t.properties.find(a=>fe(a)==="utilization-warn-at"),i=t.properties.find(a=>fe(a)==="utilization-over-at");if(!r||!i)return;let o=mP(r.value),s=mP(i.value);o===null||s===null||o>s&&n("error",`utilization-warn-at (${r.value}) must be \u2264 utilization-over-at (${i.value}). Warn fires below over; if both fire at the same point, the warn band collapses to zero.`,{node:r,property:"value"})}checkDefaultDeclaration(t,n){if(!aP.has(t.entityType)){n("error",`"${t.entityType}" is not a supported entity type for default. Allowed: ${[...aP].join(", ")}.`,{node:t,property:"entityType"});return}let r=t.$container,i=-1;for(let s=0;s<r.configEntries.length;s++){let a=r.configEntries[s];if(gn(a)&&a.entityType===t.entityType){if(i<0)i=s;else if(a===t){n("error",`Duplicate "default ${t.entityType}" declaration. Only one is allowed per entity type per file.`,{node:t});break}}}let o=jX[t.entityType];if(o)for(let s of t.properties){let a=fe(s);o.has(a)&&n("error",Rh(a,t.entityType),{node:s})}if(t.entityType!=="roadmap")for(let s of t.properties){let a=fe(s);UX.has(a)&&ce(n,"warning",{node:s,property:"key"},"NL.W0703",{key:a,entityType:t.entityType})}}checkHiddenTimelineStrip(t,n){let r=t.roadmapDecl;if(!r)return;let i=new Map,o;for(let h of t.configEntries)xr(h)&&h.name&&!i.has(h.name)?i.set(h.name,h):gn(h)&&h.entityType==="roadmap"&&(o??(o=h));let s=new Map;for(let h of t.roadmapEntries)if(Ja(h)&&h.name&&!s.has(h.name)){let g=h.properties.find(T=>fe(T)==="style");s.set(h.name,g?.value)}let a,c,l=h=>{for(let g of h){let T=fe(g);T==="header-height"?a=g:T==="timeline-position"&&(c=g)}},u=h=>{if(!h)return!0;let g=i.get(h);return g&&l(g.properties),g!==void 0};if(o){let h=o.properties.find(g=>fe(g)==="style");if(!u(h?.value))return;l(o.properties)}let f=r.properties.find(h=>fe(h)==="labels"),d=f?.value?[f.value]:f?.values??[];for(let h of[...d].reverse())if(!s.has(h)||!u(s.get(h)))return;let p=r.properties.find(h=>fe(h)==="style");u(p?.value)&&a?.value==="none"&&(c?.value!=="bottom"&&c?.value!=="both"||ce(n,"warning",{node:c,property:"value"},"NL.W0704",{position:c.value}))}checkCalendarBlockConsistency(t,n){let r=t.configEntries.filter(pu),o=t.roadmapDecl?.properties.find(s=>fe(s)==="calendar")?.value;if(r.length>0&&o!=="custom")for(let s of r)n("error",'A "calendar" config block is only valid when the roadmap declares calendar:custom.',{node:s});if(o==="custom"&&r.length===0&&n("error",'calendar:custom requires a "calendar" config block with days-per-week, days-per-month, days-per-quarter, and days-per-year.',{node:t.roadmapDecl,property:"properties"}),o==="custom"&&r.length>0)for(let s of r){let a=new Set(s.properties.map(c=>fe(c)));for(let c of QT)a.has(c)||n("error",`calendar:custom requires "${c}" in the calendar config block.`,{node:s})}}checkCalendarBlock(t,n){let r=new Set;for(let i of t.properties){let o=fe(i);if(!QT.has(o)){n("error",`Unknown calendar property "${o}". Allowed: ${[...QT].join(", ")}.`,{node:i,property:"key"});continue}r.has(o)&&n("error",`Duplicate calendar property "${o}".`,{node:i,property:"key"}),r.add(o),(!cP.test(i.value)||parseInt(i.value,10)<=0)&&n("error",`"${o}" must be a positive integer, got "${i.value}".`,{node:i,property:"value"})}}checkScaleBlock(t,n){let r=new Set;for(let i of t.properties){let o=fe(i);if(!sP.has(o)){n("error",`Unknown scale property "${o}". Allowed: ${[...sP].join(", ")}.`,{node:i,property:"key"});continue}r.has(o)&&n("error",`Duplicate scale property "${o}".`,{node:i,property:"key"}),r.add(o),o==="label-every"&&(!cP.test(i.value)||parseInt(i.value,10)<=0)&&n("error",`"label-every" must be a positive integer, got "${i.value}".`,{node:i,property:"value"})}}checkForwardReferences(t,n){let r=new Map,i=new Map;for(let o=0;o<t.roadmapEntries.length;o++){let s=t.roadmapEntries[o];Ho(s)&&s.name?r.has(s.name)||r.set(s.name,o):el(s)&&s.name&&(i.has(s.name)||i.set(s.name,o))}for(let o=0;o<t.roadmapEntries.length;o++){let s=t.roadmapEntries[o];yP(s,a=>{if(xu(a))return;let c=fe(a);if(c==="size"&&a.value){let l=a.value,u=r.get(l);u===void 0?n("error",`Size "${l}" is not declared. Add "size ${l} effort:<literal>" earlier in the roadmap section.`,{node:a,property:"value"}):u>=o&&n("error",`Size "${l}" is referenced before its declaration. Move "size ${l}" above this entity.`,{node:a,property:"value"})}else if(c==="status"&&a.value){let l=a.value;if(JT.has(l))return;let u=i.get(l);u===void 0?n("error",`Status "${l}" is not a built-in and has no declaration. Add "status ${l}" earlier in the roadmap section.`,{node:a,property:"value"}):u>=o&&n("error",`Status "${l}" is referenced before its declaration. Move "status ${l}" above this entity.`,{node:a,property:"value"})}})}}checkReferenceResolution(t,n){let r=aG(t),i=o=>{yP(o,s=>{let a=fe(s);if(a!=="after"&&a!=="before"&&a!=="on"||xu(s))return;let c=s.value?[s.value]:s.values;for(let l of c)l&&((a==="after"||a==="before")&&Ft.test(l)||r.has(l)||n("error",`${a}: reference "${l}" does not resolve to any declared entity in this file.`,{node:s}))})};for(let o of t.roadmapEntries)i(o)}checkInlineDatePins(t,n){let r=ew(t),i=o=>{let s=o.properties??[],a=on(o),c=Mt(o)||_t(o)||Ve(o)||a;for(let l of s){let u=fe(l);if(u!=="after"&&u!=="before"||a&&u==="before")continue;let d=(l.value?[l.value]:l.values).filter(p=>!!p&&Ft.test(p));if(d.length!==0){if(!c){ce(n,"error",{node:l},"NL.E0411",{key:u,type:qo(o)});continue}d.length>1&&ce(n,"error",{node:l},"NL.E0410",{key:u});for(let p of d)switch(r.kind){case"invalid":continue;case"missing":ce(n,"error",{node:l},"NL.E0412",{key:u,date:p});continue;case"valid":{let h=new Date(p);if(Number.isNaN(h.getTime()))continue;h<r.date&&ce(n,"error",{node:l},"NL.E0413",{key:u,date:p,start:r.iso})}}}}if(bt(o))for(let l of o.content)i(l);else if(_t(o)||Ve(o))for(let l of o.content)i(l)};for(let o of t.roadmapEntries)i(o)}checkCircularDependencies(t,n){let r=new Map,i=(p,h)=>{r.has(p)||r.set(p,new Set),r.get(p).add(h)},o=(p,h,g)=>{if(p)for(let T of h){let x=fe(T);if(x==="after"){let y=T.value?[T.value]:T.values;for(let E of y)E&&(Ft.test(E)||i(p,E))}else if(x==="before"){let y=T.value?[T.value]:T.values;for(let E of y)E&&(Ft.test(E)||i(E,p))}}},s=p=>{if(on(p))return;let h=p.name,g=p.properties??[];if(o(h,g,t),bt(p))for(let T of p.content)s(T);else if(_t(p)||Ve(p))for(let T of p.content)s(T)};for(let p of t.roadmapEntries)s(p);let a=0,c=1,l=2,u=new Map;for(let p of r.keys())u.set(p,a);let f=new Set,d=(p,h)=>{u.set(p,c),h.push(p);for(let g of r.get(p)??[]){let T=u.get(g)??a;if(T===c){let x=h.indexOf(g),y=h.slice(x).concat(g),E=[...y].sort().join("\u2192");f.has(E)||(f.add(E),n("error",`Circular dependency detected: ${y.join(" \u2192 ")}.`,{node:t.roadmapDecl??t}))}else T===a&&d(g,h)}h.pop(),u.set(p,l)};for(let p of r.keys())(u.get(p)??a)===a&&d(p,[])}checkPersonDeclarations(t,n){let r=new Map,i=a=>!!a.title||a.properties.length>0||a.description!==void 0,o=a=>{if(!a.name)return;let c=i(a);r.has(a.name)||r.set(a.name,[]),r.get(a.name).push({node:a,isDeclaration:c}),!c&&a.$container.$type==="NowlineFile"&&n("warning",`Bare "person ${a.name}" at roadmap top level has no declaration. Either add properties (title, link, etc.) or remove the line.`,{node:a})},s=a=>{for(let c of a.content)On(c)?o(c):Wt(c)&&s(c)};for(let a of t.roadmapEntries)On(a)?o(a):Wt(a)&&s(a);for(let[a,c]of r){let l=c.filter(u=>u.isDeclaration);if(l.length>1)for(let u=1;u<l.length;u++)n("error",`Person "${a}" is declared more than once. First declaration at ${$h(l[0].node)}.`,{node:l[u].node})}}checkSymbolDeclaration(t,n){t.name&&Ch.has(t.name)&&ce(n,"error",{node:t,property:"name"},"NL.E0805",{name:t.name,builtins:[...Ch].sort().join(", ")});let r=t.properties.find(o=>fe(o)==="unicode");r?(!r.value||r.value.length===0)&&ce(n,"error",{node:r,property:"value"},"NL.E0807",{name:it(t)}):ce(n,"error",{node:t},"NL.E0806",{name:it(t)});let i=t.properties.find(o=>fe(o)==="ascii");if(i){let o=i.value??"";QX.test(o)||ce(n,"error",{node:i,property:"value"},"NL.E0808",{name:it(t),length:o.length})}for(let o of t.properties){let s=fe(o);s!=="unicode"&&s!=="ascii"&&s!=="link"&&s!=="description"&&ce(n,"error",{node:o,property:"key"},"NL.E0809",{key:s})}}checkDuplicateSymbolIds(t,n){let r=new Map;for(let i of t.configEntries)if(zo(i)&&i.name){let o=r.get(i.name);o?ce(n,"error",{node:i,property:"name"},"NL.E0810",{name:i.name,location:$h(o)}):r.set(i.name,i)}}checkCalendarDeclaration(t,n){let r=qo(t),i=_u(t);for(let l of t.properties)wP.has(fe(l))||ce(n,"error",{node:l,property:"key"},"NL.E0901",{kind:r,key:fe(l)});EP(i)||ce(n,"error",{node:t},"NL.E0900",{kind:r});let o=i.get("date");o&&o.values.length>0&&o.values.forEach((l,u)=>{wu(l,!0)||ce(n,"error",{node:o,property:"values",index:u},"NL.E0405",{key:"date",value:l})});for(let l of["start","end"]){let u=i.get(l);u&&_P(u)?ce(n,"error",{node:u},"NL.E0902",{kind:r,key:l}):u&&u.values.length===1&&!wu(u.values[0],!0)&&ce(n,"error",{node:u,property:"values",index:0},"NL.E0405",{key:l,value:u.values[0]})}let s=Tu(i.get("start")),a=Tu(i.get("end"));s&&a&&a<s&&ce(n,"error",{node:i.get("end"),property:"value"},"NL.E0903",{start:s,end:a});let c=i.get("every");if(c){let l=new Set;Eu(c).forEach((u,f)=>{let d=c.values.length>0?{node:c,property:"values",index:f}:{node:c,property:"value"};u in aw?l.has(u)&&ce(n,"error",d,"NL.E0905",{value:u}):ce(n,"error",d,"NL.E0904",{value:u}),l.add(u)})}}checkCalendarWeek(t,n){let r=t.roadmapDecl;if(!r)return;let i=t.configEntries.filter(nw),o=i.filter(iG),s=o.filter(y=>oG(y)),a=r.properties.find(y=>fe(y)==="calendar"),c=t.configEntries.find(pu),l=a?.value==="custom"&&c!==void 0,u=a?.value==="full",f=l?c.properties.find(y=>fe(y)==="days-per-week"):void 0,d=parseInt(f?.value??"",10),p=l?Number.isFinite(d)&&d>0?d:gP:u?7:gP,h=i.some(y=>Yr(y)&&y.name==="weekend"),g=new Set(!l&&!u&&!h?[0,6]:[]);for(let y of s)if(Yr(y))for(let E of rw(y))g.add(E);for(let y of s)if(mu(y))for(let E of rw(y))g.delete(E);if(g.size===7)for(let y of s)Yr(y)&&ce(n,"error",{node:y},"NL.E0906");for(let y of o){if(!Yr(y)||!sG(y))continue;new Set([...g,...rw(y)]).size===7&&ce(n,"error",{node:y},"NL.E0906")}let T=7-g.size;if(T===0||T===p)return;let x=l?f?{node:f,property:"value"}:{node:c}:a?{node:a}:s.length>0?{node:s[0]}:{node:r};ce(n,"warning",x,"NL.W0705",{daysPerWeek:p,working:T})}checkDuplicateCalendarDeclarationIds(t,n){let r=new Map;for(let i of t.configEntries){if(!nw(i)||!i.name)continue;let o=`${i.$type}:${i.name}`;r.has(o)?ce(n,"error",{node:i,property:"name"},"NL.E0907",{kind:qo(i),name:i.name}):r.set(o,i)}}checkSymbolReferences(t,n){let r=new Map;for(let o=0;o<t.configEntries.length;o++){let s=t.configEntries[o];zo(s)&&s.name&&(r.has(s.name)||r.set(s.name,o))}let i=(o,s,a,c)=>{if(s!=="icon"&&s!=="capacity-icon"||!a||!hP(a)||s==="capacity-icon"&&iw.has(a)||s==="icon"&&Ch.has(a))return;let l=r.get(a);if(l===void 0){let u=s==="capacity-icon"?[...iw].sort().join(", "):[...Ch].sort().join(", ");ce(n,"error",{node:c,property:"value"},"NL.E0811",{key:s,value:a,builtins:u})}else l>=o&&ce(n,"error",{node:c,property:"value"},"NL.E0812",{key:s,value:a})};for(let o=0;o<t.configEntries.length;o++){let s=t.configEntries[o];if(xr(s))for(let a of s.properties)i(o,fe(a),a.value,a);else if(gn(s))for(let a of s.properties)i(o,fe(a),a.value,a)}}};function dP(e){return XX.has(e)||YX.test(e)}function pP(e,t,n){e===void 0||WX.has(e)||ce(n,"error",{node:t,property:"value"},"NL.E0800",{value:e})}function hP(e){return/^[a-zA-Z_][a-zA-Z0-9_-]*$/.test(e)}function nG(e){return e?bt(e)?"lane":Mt(e)?"item":gn(e)?e.entityType==="swimlane"?"lane":"item":"invalid":"invalid"}function rG(e){return e?!!(bt(e)||gn(e)&&e.entityType==="swimlane"):!1}function mP(e){if(!e||e===xP)return null;if(ow.test(e)){let t=parseFloat(e);return Number.isFinite(t)&&t>0?t/100:null}if(vP.test(e)){let t=parseFloat(e);return Number.isFinite(t)&&t>0?t:null}return null}var wP=new Set(["date","start","end","every"]),aw={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},gP=5;function nw(e){return Yr(e)||mu(e)}function _u(e){let t=new Map;for(let n of e.properties){let r=fe(n);wP.has(r)&&!t.has(r)&&t.set(r,n)}return t}function EP(e){return e.has("date")?!e.has("every")&&!e.has("start")&&!e.has("end"):e.has("every")?!0:e.has("start")&&e.has("end")}function Eu(e){return e.value!==void 0?[e.value]:[...e.values]}function _P(e){return e.values.length>1}function Tu(e){if(!e||_P(e))return;let[t]=Eu(e);return t!==void 0&&wu(t,!0)?t:void 0}function wu(e,t){if(!Ft.test(e)||Number.isNaN(new Date(e).getTime()))return!1;if(!t)return!0;let[n,r,i]=e.split("-").map(s=>parseInt(s,10)),o=new Date(0);return o.setUTCFullYear(n,r-1,i),o.getUTCFullYear()===n&&o.getUTCMonth()===r-1&&o.getUTCDate()===i}function rw(e){let t=_u(e).get("every");return t?Eu(t).map(n=>aw[n]).filter(n=>n!==void 0):[]}function iG(e){let t=_u(e);if(!EP(t))return!1;let n=t.get("date");if(n&&!Eu(n).every(s=>wu(s,!0)))return!1;for(let s of["start","end"]){let a=t.get(s);if(a&&Tu(a)===void 0)return!1}let r=Tu(t.get("start")),i=Tu(t.get("end"));if(r&&i&&i<r)return!1;let o=t.get("every");return!(o&&!Eu(o).every(s=>s in aw))}function oG(e){let t=_u(e);return t.has("every")&&!t.has("start")&&!t.has("end")}function sG(e){let t=_u(e);return t.has("every")&&t.has("start")!==t.has("end")}function $h(e){let t=e.$cstNode;return t?`line ${t.range.start.line+1}`:"unknown location"}function lw(e,t){if(bt(e)){t(e.name,e);for(let n of e.content)sw(n,t)}else On(e)?t(e.name,e):Wt(e)?bP(e,t):(eo(e)||Cn(e)||hu(e)||Ja(e)||Ho(e)||el(e)||on(e))&&t(e.name,e)}function bP(e,t){t(e.name,e);for(let n of e.content)Wt(n)&&bP(n,t)}function sw(e,t){if(Mt(e))t(e.name,e);else if(_t(e)){t(e.name,e);for(let n of e.content)sw(n,t)}else if(Ve(e)){t(e.name,e);for(let n of e.content)sw(n,t)}}function yP(e,t){let n=r=>{let i=r.properties;if(Array.isArray(i))for(let o of i)t(o);if(bt(r))for(let o of r.content)n(o);else if(_t(r)||Ve(r))for(let o of r.content)n(o);else if(Wt(r))for(let o of r.content)(Wt(o)||On(o))&&n(o)};n(e)}function aG(e){let t=new Set;e.roadmapDecl?.name&&t.add(e.roadmapDecl.name);let n=r=>{let i=r.name;if(i&&t.add(i),bt(r))for(let o of r.content)n(o);else if(_t(r)||Ve(r))for(let o of r.content)n(o);else if(Wt(r))for(let o of r.content)Wt(o)||On(o)?n(o):TN(o)};for(let r of e.roadmapEntries)n(r);return t}function sl(e){return t=>e.anchors.get(t)??e.milestones.get(t)??e.waves?.get(t)}function lG(e){let t=e.$document?.parseResult;return!!t&&(t.lexerErrors.length>0||t.parserErrors.length>0)}function RP(e,t,n){return n||lG(e)?!1:!!e.roadmapDecl||t.swimlanes.size>0||Jn(e).length>0}function Yo(e,t,n,r,...i){return{severity:e,message:Kr("en-US",r,...i),sourcePath:t,...n===void 0?{}:{line:n},code:r,args:i,rule:"wave"}}function Dh(e){return e.map(t=>t.name)}function kP(e){let t=n=>{let r=e.properties.find(i=>fe(i)===n);return r?r.value??r.values.join(", "):""};return{title:e.title===void 0?"":yn(e.title),style:t("style"),labels:t("labels"),link:t("link"),description:e.description?yn(e.description.text):""}}var cG=["title","style","labels","link","description"];function AP(e,t,n){let r={diagnostics:[],failed:!1};if(n.mode==="ignore"||!n.participates||n.childFile.roadmapEntries.some(p=>on(p)&&!p.name))return r;let i=n.parentAbs,o=n.inc.$cstNode?.range.start.line,s=n.childRelPath,a=Jn(e),c=Jn(n.childFile),l=p=>({diagnostics:[p],failed:!0});if(a.length===0&&c.length===0)return r;if(c.length===0)return l(Yo("error",i,o,"NL.E0202",{reason:"child-none",path:s,parent:Dh(a)}));if(a.length===0)return l(Yo("error",i,o,"NL.E0202",{reason:"parent-none",path:s,child:Dh(c)}));if(a.length!==c.length||a.some((p,h)=>p.name!==c[h].name))return l(Yo("error",i,o,"NL.E0202",{reason:"mismatch",path:s,child:Dh(c),parent:Dh(a)}));let u=sl(t),f=sl(n.childContent);for(let p=0;p<a.length;p++){let h=yu(a[p],u)?.date??null,g=yu(c[p],f)?.date??null;if(h!==g)return l(Yo("error",i,o,"NL.E0202",{reason:"floor",id:a[p].name,path:s,childFloor:g,parentFloor:h}))}let d=[];for(let p=0;p<a.length;p++){let h=kP(a[p]),g=kP(c[p]),T=cG.filter(x=>h[x]!==g[x]).map(x=>({field:x,there:g[x],here:h[x]}));T.length!==0&&d.push(Yo("warning",i,o,"NL.W0701",{id:a[p].name,path:s,fields:T}))}return{diagnostics:d,failed:!1}}function uG(e){let t=e;for(;t&&!Qa(t);)t=t.$container;return t}function IP(e){let{rootFile:t,rootAbs:n,rootContent:r,files:i,edges:o,failed:s}=e,a=[],c=new Set,l=b=>{let L=JSON.stringify([b.sourcePath,b.line,b.code,b.args,b.message]);c.has(L)||(c.add(L),a.push(b))},u=b=>{let L=uG(b);return L?i.get(L):void 0},f=(b,L)=>{let P=b.node.$cstNode?.range.start.line;return"message"in b?{severity:b.severity,message:b.message,sourcePath:L,...P===void 0?{}:{line:P},rule:"wave"}:Yo(b.severity,L,P,b.code,b.args)},d=[],p=new Set([n]),h=b=>{for(let L of o.get(b)??[])L.mode==="ignore"||!L.participates||p.has(L.childAbs)||(p.add(L.childAbs),s.has(L.childAbs)||d.push({file:L.childFile,abs:L.childAbs}),h(L.childAbs))};h(n);let g=Jn(t),T=new Map(g.map(b=>[b.name,b]));for(let{file:b,abs:L}of d){for(let $ of Ih(b))l(f($,L));for(let $ of Sh(b))l(f($,L));if(T.size===0)continue;let P=($,G)=>{let Y=$===void 0?void 0:T.get($);if(!Y||on(G))return;let D=Y.$cstNode?Y.$cstNode.range.start.line+1:0;l(Yo("error",L,G.$cstNode?.range.start.line,"NL.E0300",{name:$,location:`${rl(n)}:${D}`}))};b.roadmapDecl&&P(b.roadmapDecl.name,b.roadmapDecl);for(let $ of b.roadmapEntries)lw($,P);for(let $ of b.configEntries)xr($)&&P($.name,$)}if(g.length===0)return a;let x=b=>"message"in b?b.message:`${b.code}\0${JSON.stringify(b.args)}`,y=new Map,E={lanes:t.roadmapEntries.filter(bt),lookup:il(t)};for(let b of ol(E,g,{suppressCycleRefs:!1})){let L=y.get(b.node)??new Set;L.add(x(b)),y.set(b.node,L)}let w=b=>{for(let L of b){if(y.get(L.node)?.has(x(L)))continue;let P=u(L.node);P===void 0||s.has(P)||l(f(L,P))}};w(ol({lanes:[...r.swimlanes.values()],lookup:sl(r)},g,{suppressCycleRefs:!1}));for(let b of r.isolatedRegions){let L=b.content.roadmap?u(b.content.roadmap):void 0;if(L!==void 0&&s.has(L))continue;let P=[...b.content.waves?.values()??[]];P.length!==0&&w(ol({lanes:[...b.content.swimlanes.values()],lookup:sl(b.content)},P,{suppressCycleRefs:!1}))}return a}var dG=/^\d{4}-\d{2}-\d{2}$/;function PP(e){let t=e?.properties.find(n=>n.key==="start");if(t?.value&&dG.test(t.value)&&!Number.isNaN(new Date(t.value).getTime()))return t.value}function pG(e,t,n){return t&&n?`Included "${e}" declares start:${n}, which doesn't match this file's start:${t}. Both files must declare the same start date, or neither should.`:t?`Included "${e}" has no start:, but this file declares start:${t}. Both files must declare the same start date, or neither should.`:`Included "${e}" declares start:${n}, but this file has no start:. Both files must declare the same start date, or neither should.`}function al(e){return e.code!==void 0||e.rule==="wave"}function CP(){return{styles:new Map,defaults:new Map,symbols:new Map,calendarDeclarations:[]}}function OP(){return{persons:new Map,teams:new Map,anchors:new Map,labels:new Map,sizes:new Map,statuses:new Map,swimlanes:new Map,milestones:new Map,footnotes:new Map,isolatedRegions:[]}}async function uw(e,t,n){let r=n.readFile??(async c=>{let{nodeReadFile:l}=await Promise.resolve().then(()=>(NP(),SP));return l(c)}),i={services:n.services,diagnostics:[],resolving:[],processed:new Map,readFile:r,files:new Map,edges:new Map,stubs:new Set,failedWaves:new Set},o=VT("",t),{config:s,content:a}=await DP(e,o,i);return i.diagnostics.push(...IP({rootFile:e,rootAbs:o,rootContent:a,files:i.files,edges:i.edges,failed:i.failedWaves})),{config:s,content:a,diagnostics:i.diagnostics,processedFiles:new Set(i.processed.keys())}}async function DP(e,t,n){if(n.processed.has(t))return n.processed.get(t);if(n.resolving.includes(t)){n.diagnostics.push({severity:"error",message:`Circular include detected: ${[...n.resolving,t].join(" \u2192 ")}`,sourcePath:t});let l={config:CP(),content:OP()};return n.stubs.add(l.content),n.processed.set(t,l),l}n.resolving.push(t),n.files.set(e,t);let r=CP(),i=OP();vG(r,e),_G(i,e);let o=Jn(e);o.length>0&&(i.waves=new Map(o.map(l=>[l.name,l])));let s=[];n.edges.set(t,s);let a=new Set;for(let l of e.includes){let u=l.path,f=VT(zN(t),u);if(a.has(f)){n.diagnostics.push({severity:"error",message:`Duplicate include "${u}" in ${rl(t)}.`,sourcePath:t,line:l.$cstNode?.range.start.line});continue}a.add(f);let d=$P(l,"config")??"merge",p=$P(l,"roadmap")??"merge",h;try{let x=await n.readFile(f);h=await hG(n.services,x,f)}catch(x){n.diagnostics.push({severity:"error",message:`Could not read include "${u}": ${x.message}`,sourcePath:t,line:l.$cstNode?.range.start.line});continue}let{config:g,content:T}=await DP(h,f,n);if(s.push({parentAbs:t,inc:l,childRelPath:u,childAbs:f,mode:p,childFile:h,childContent:T,participates:RP(h,T,n.stubs.has(T))}),mG(r,g,d,f,n.diagnostics),gG(i,T,g,p,f,u,n.diagnostics),p==="isolate"&&!T.roadmap&&n.diagnostics.push({severity:"error",message:`Cannot isolate "${u}": it has no roadmap declaration.`,sourcePath:t,line:l.$cstNode?.range.start.line}),p!=="ignore"&&h.roadmapDecl){let x=PP(e.roadmapDecl),y=PP(h.roadmapDecl);x!==y&&n.diagnostics.push({severity:"error",message:pG(u,x,y),sourcePath:t,line:l.$cstNode?.range.start.line})}}i.waves&&EG(i,i.waves);for(let l of s){let{diagnostics:u,failed:f}=AP(e,i,l);n.diagnostics.push(...u),f&&n.failedWaves.add(l.childAbs)}n.resolving.pop();let c={config:r,content:i};return n.processed.set(t,c),c}function $P(e,t){let n=e.options.find(r=>r.key===t);if(n&&(n.value==="merge"||n.value==="ignore"||n.value==="isolate"))return n.value}async function hG(e,t,n){let r=yt.file(n),o=e.shared.workspace.LangiumDocumentFactory.fromString(t,r);return await e.shared.workspace.DocumentBuilder.build([o],{validation:!1}),o.parseResult.value}function mG(e,t,n,r,i){if(n==="ignore"||n==="isolate")return;let o=(s,a)=>i.push({severity:"warning",message:`${a} "${s}" from ${rl(r)} is shadowed by the parent's definition.`,sourcePath:r});cw(e.styles,t.styles,s=>o(s,"Style")),cw(e.defaults,t.defaults,s=>o(s,"Default")),cw(e.symbols,t.symbols,s=>o(s,"Symbol")),yG(e.calendarDeclarations,t.calendarDeclarations,s=>o(s.name,xG(s))),t.scale&&!e.scale&&(e.scale=t.scale),t.calendar&&!e.calendar&&(e.calendar=t.calendar)}function gG(e,t,n,r,i,o,s){if(r==="ignore")return;if(r==="isolate"){t.roadmap&&e.isolatedRegions.push({sourcePath:o,config:n,content:t});return}let a=(c,l)=>s.push({severity:"warning",message:`${l} "${c}" from ${rl(i)} is shadowed by the parent's definition.`,sourcePath:i});Zr(e.persons,t.persons,c=>a(c,"Person")),Zr(e.teams,t.teams,c=>a(c,"Team")),Zr(e.anchors,t.anchors,c=>a(c,"Anchor")),Zr(e.labels,t.labels,c=>a(c,"Label")),Zr(e.sizes,t.sizes,c=>a(c,"Size")),Zr(e.statuses,t.statuses,c=>a(c,"Status")),Zr(e.swimlanes,t.swimlanes,c=>a(c,"Swimlane")),Zr(e.milestones,t.milestones,c=>a(c,"Milestone")),Zr(e.footnotes,t.footnotes,c=>a(c,"Footnote")),t.roadmap&&!e.roadmap&&(e.roadmap=t.roadmap)}function cw(e,t,n){for(let[r,i]of t){if(e.has(r)){e.get(r)!==i&&n(r);continue}e.set(r,i)}}function yG(e,t,n){let r=new Set(e),i=new Set(e.filter(o=>o.name).map(LP));for(let o of t)if(!r.has(o)){if(o.name&&i.has(LP(o))){n(o);continue}e.push(o),r.add(o)}}function LP(e){return`${e.$type}:${e.name}`}function xG(e){return Yr(e)?"Non-working":"Working"}function Zr(e,t,n){let r=new Set(e.values());for(let[i,o]of t)if(!r.has(o)){if(!o.name&&o.title){e.set(fw(e,MP(o.title)),o);continue}if(e.has(i)){n(i);continue}e.set(i,o)}}function vG(e,t){for(let n of t.configEntries)TG(e,n)}function TG(e,t){wN(t)?e.scale||(e.scale=t):pu(t)?e.calendar||(e.calendar=t):xr(t)?t.name&&!e.styles.has(t.name)&&e.styles.set(t.name,t):zo(t)?t.name&&!e.symbols.has(t.name)&&e.symbols.set(t.name,t):gn(t)?e.defaults.has(t.entityType)||e.defaults.set(t.entityType,t):(Yr(t)||mu(t))&&e.calendarDeclarations.push(t)}function wG(e){let t={swimlanes:new Set,persons:new Set,teams:new Set,anchors:new Set,labels:new Set,sizes:new Set,statuses:new Set,milestones:new Set,footnotes:new Set};for(let n of e){let r=n.name;if(r){if(bt(n))t.swimlanes.add(r);else if(On(n))t.persons.add(r);else if(Wt(n))t.teams.add(r);else if(eo(n))t.anchors.add(r);else if(Ja(n))t.labels.add(r);else if(Ho(n))t.sizes.add(r);else if(el(n))t.statuses.add(r);else if(Cn(n))t.milestones.add(r);else if(hu(n))t.footnotes.add(r);else if(on(n))for(let i of Object.values(t))i.add(r)}}return t}function EG(e,t){let n=[e.persons,e.teams,e.anchors,e.labels,e.sizes,e.statuses,e.swimlanes,e.milestones,e.footnotes],r=(i,o)=>t.has(i)&&!o.name&&!!o.title;for(let i of n){let o=[...i];if(!o.some(([a,c])=>r(a,c)))continue;let s=new Set([...i.keys(),...t.keys()]);i.clear();for(let[a,c]of o){let l=r(a,c)?fw(i,a,s):a;s.add(l),i.set(l,c)}}}function _G(e,t){t.roadmapDecl&&!e.roadmap&&(e.roadmap=t.roadmapDecl);let n=wG(t.roadmapEntries);for(let r of t.roadmapEntries)bG(e,r,n)}function MP(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"entity"}function fw(e,t,n){let r=o=>e.has(o)||(n?.has(o)??!1);if(!r(t))return t;let i=2;for(;r(`${t}-${i}`);)i++;return`${t}-${i}`}function Jr(e,t,n){t.name?e.has(t.name)||e.set(t.name,t):t.title&&e.set(fw(e,MP(t.title),n),t)}function bG(e,t,n){bt(t)?Jr(e.swimlanes,t,n.swimlanes):On(t)?Jr(e.persons,t,n.persons):Wt(t)?Jr(e.teams,t,n.teams):eo(t)?Jr(e.anchors,t,n.anchors):Ja(t)?Jr(e.labels,t,n.labels):Ho(t)?Jr(e.sizes,t,n.sizes):el(t)?Jr(e.statuses,t,n.statuses):Cn(t)?Jr(e.milestones,t,n.milestones):hu(t)&&Jr(e.footnotes,t,n.footnotes)}var dw=class extends sa{runConverter(t,n,r){return t.name==="PROPERTY_KEY_WITH_COLON"||t.name==="INCLUDE_OPTION_KEY"?n.endsWith(":")?n.slice(0,-1):n:super.runConverter(t,n,r)}},pw=class extends su{isStartOfLine(t,n){if(!super.isStartOfLine(t,n))return!1;let r=n-1;for(;r>=0&&(t[r]===" "||t[r]===" ");)r--;for(;r>=0&&(t[r]==="\r"||t[r]===`
|
|
2925
2925
|
`);)r--;for(;r>=0&&(t[r]===" "||t[r]===" ");)r--;return r<0||t[r]!=="\\"}},FP={parser:{TokenBuilder:()=>new pw({indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[["[","]"]]}),Lexer:e=>new gh(e),ParserConfig:()=>({maxLookahead:4}),ValueConverter:()=>new dw},validation:{NowlineValidator:()=>new Lh}};function hw(e={}){let t=e.shared??Da(mh(yh),bN),n=Da(hh({shared:t}),kN,FP);return t.ServiceRegistry.register(n),TP(n),{shared:t,Nowline:n}}function mw(e,t){return t.code===void 0?t.message:Kr(e,t.code,...t.args??[])}function gw(e){let{content:t}=e,n=[...t.waves?.values()??[]];if(n.length===0)return;let r=new Map;n.forEach((u,f)=>{r.set(u.name,f+1)});let i=sl(t),o=n.map(u=>yu(u,i)),s=new WeakMap,a=new WeakMap,c=u=>{let f=Ah(u,r);for(let[d,p]of f.waveOf)s.set(d,p);for(let[d,p]of f.leadOf)a.set(d,p)};c([...t.swimlanes.values()]);for(let u of t.isolatedRegions)c([...u.content.swimlanes.values()]);let l=u=>Mt(u)?s.get(u):void 0;return{waves:n,index:r,floors:o,waveOf:s,leadOf:a,memberWave:l,isMember:(u,f)=>{let d=l(u);return d!==void 0&&(f===void 0||d===f)}}}var Mh=class{constructor(t){I(this,"items");I(this,"brackets");this.items=t.itemBars,this.brackets=t.brackets}hasObstacle(t,n,r){let i=Math.min(n,r),o=Math.max(n,r);for(let s of this.items)if(!(t<=s.x||t>=s.x+s.width)&&!(s.y+s.height<=i||s.y>=o))return!0;return!1}bracketsNear(t,n,r,i){let o=Math.min(n,r),s=Math.max(n,r),a=[];for(let c of this.brackets)Math.abs(c.x-t)>i||c.yBottom<=o||c.yTop>=s||a.push(c);return a}};function BP(e,t){let n=[],r=[],i=s=>{if(s.kind==="item"){n.push(s.box);return}if(s.kind==="parallel"){if(s.style.bracket==="solid"||s.style.bracket==="dashed"){let l=s.box.y-12,u=s.box.y+s.box.height+12,f=s.box.x,d=s.box.x+s.box.width;r.push({x:f,yTop:l,yBottom:u}),r.push({x:d,yTop:l,yBottom:u}),r.push({x:f+4,yTop:l-1,yBottom:l+1}),r.push({x:f+4,yTop:u-1,yBottom:u+1}),r.push({x:d-4,yTop:l-1,yBottom:l+1}),r.push({x:d-4,yTop:u-1,yBottom:u+1})}for(let a of s.children)i(a);return}if(s.kind==="group"){!(s.style.bg!=="none"&&s.style.bg!=="#ffffff")&&s.style.bracket&&s.style.bracket!=="none"&&r.push({x:s.box.x,yTop:s.box.y,yBottom:s.box.y+s.box.height});for(let c of s.children)i(c);return}},o=s=>{for(let a of s.children)i(a);for(let a of s.nested)o(a)};for(let s of e)o(s);for(let s of t)for(let a of s.nestedSwimlanes)o(a);return{itemBars:n,brackets:r}}function kG(e,t){let{from:n,to:r}=e;if(Math.abs(n.y-r.y)<.5)return{x:(n.x+r.x)/2,underBar:!1,range:null};let i=Math.min(n.y,r.y),o=Math.max(n.y,r.y);if(n.x<=r.x){let a=n.x+6,c=r.x-6;if(a>c)return{x:r.x-6,underBar:!0,range:null};let l={minX:a,maxX:c},u=(n.x+r.x)/2,f=Math.max(a,Math.min(c,u));if(!t.hasObstacle(f,i,o))return{x:f,underBar:!1,range:l};let d=c-a;for(let p=1;p<=d;p++){let h=f-p;if(h>=a&&!t.hasObstacle(h,i,o))return{x:h,underBar:!1,range:l};let g=f+p;if(g<=c&&!t.hasObstacle(g,i,o))return{x:g,underBar:!1,range:l}}return{x:f,underBar:!0,range:l}}let s=[n.x+10,r.x-10];for(let a of s)if(a>0&&!t.hasObstacle(a,i,o))return{x:a,underBar:!1,range:null};return{x:n.x+10,underBar:!0,range:null}}function RG(e,t,n,r){let i=Math.min(n.from.y,n.to.y),o=Math.max(n.from.y,n.to.y),s=r.bracketsNear(e,i,o,4);if(s.length===0)return{x:e,forceUnderBar:!1};let a=s[0],c=Math.abs(s[0].x-e);for(let d=1;d<s.length;d++){let p=Math.abs(s[d].x-e);p<c&&(a=s[d],c=p)}let l=[a.x+4,a.x-4],u=4-.01;for(let d of l){if(t&&(d<t.minX||d>t.maxX))continue;let p=t?d:Math.max(Math.min(n.from.x,n.to.x)+1,Math.min(Math.max(n.from.x,n.to.x)-1,d));if(r.bracketsNear(p,i,o,u).length===0)return{x:p,forceUnderBar:!1}}return{x:t?Math.min(Math.max(e,t.minX),t.maxX):e,forceUnderBar:!0}}function AG(e){let t=[...e].sort((i,o)=>Math.abs(i.channelX-o.channelX)>=1?i.channelX-o.channelX:i.orderIndex-o.orderIndex),n=new Map,r=0;for(;r<t.length;){let i=r+1;for(;i<t.length&&Math.abs(t[i].channelX-t[r].channelX)<1;)i++;let s=[...t.slice(r,i)].sort((c,l)=>{let u=Math.min(c.req.from.y,c.req.to.y),f=Math.min(l.req.from.y,l.req.to.y);return Math.abs(u-f)>.5?u-f:c.orderIndex-l.orderIndex}),a=[];for(let c of s){let l=Math.min(c.req.from.y,c.req.to.y),u=Math.max(c.req.from.y,c.req.to.y),f=-1;for(let d=0;d<a.length;d++)if(a[d]<=l){f=d,a[d]=u;break}f===-1&&(f=a.length,a.push(u)),n.set(c.orderIndex,f)}r=i}return n}function IG(e){if(e===0||e>4)return 0;let t=Math.ceil(e/2);return(e%2===1?1:-1)*t*3}function SG(e){let t=e.from.x>=e.to.x?{x:e.to.x-1,y:e.from.y}:e.from;return{fromId:e.fromId,toId:e.toId,waypoints:[t,e.to],underBar:!1}}function WP(e,t){let n=new Array(e.length),r=[];for(let o=0;o<e.length;o++){let s=e[o];if(s.isMarkerSource){n[o]=SG(s);continue}if(Math.abs(s.from.y-s.to.y)<.5&&s.to.x-s.from.x<20){n[o]={fromId:s.fromId,toId:s.toId,waypoints:[s.from,s.to],underBar:!1};continue}let{x:a,underBar:c,range:l}=kG(s,t),{x:u,forceUnderBar:f}=RG(a,l,s,t),d=c||f;r.push({req:s,channelX:u,underBar:d,orderIndex:o})}let i=AG(r);for(let o of r){let s=IG(i.get(o.orderIndex)??0),a=o.channelX+s;n[o.orderIndex]={fromId:o.req.fromId,toId:o.req.toId,waypoints:NG(o.req.from,o.req.to,a),underBar:o.underBar}}return n}function NG(e,t,n){return Math.abs(e.y-t.y)<.5?[e,t]:[e,{x:n,y:e.y},{x:n,y:t.y},t]}var bu="en-US",PG={"en-US":{nowLabel:"now",quarterPrefix:"Q",waveHeldBy:"held by",waveNoItems:"no items",waveBackgroundItem:"Background (no wave)",waveLegendBackground:"Background work (not in a wave)",waveLegendBoundary:"Wave boundary",waveLegendPrefix:"Waves:",wavesDeclaredPlaceholder:"Waves declared: {names} \u2014 no items assigned yet"},fr:{nowLabel:"maint.",quarterPrefix:"T",waveHeldBy:"retenue par",waveNoItems:"aucun \xE9l\xE9ment",waveBackgroundItem:"Travail de fond (hors vague)",waveLegendBackground:"Travail de fond (dans aucune vague)",waveLegendBoundary:"Limite de vague",waveLegendPrefix:"Vagues\xA0:",wavesDeclaredPlaceholder:"Vagues d\xE9clar\xE9es\xA0: {names} \u2014 aucun \xE9l\xE9ment affect\xE9 pour l\u2019instant"}};function UP(e,t){return t??e??bu}function ll(e){let t={};for(let n of CG(e)){let r=PG[n];if(r)for(let i of Object.keys(r))t[i]===void 0&&r[i]!==void 0&&(t[i]=r[i])}return t}function XP(e,t){return e.wavesDeclaredPlaceholder.replace("{names}",()=>t.join(", "))}function CG(e){let t=[],n=OG(e);for(;n.length>0;){t.includes(n)||t.push(n);let r=n.lastIndexOf("-");if(r<=0)break;n=n.slice(0,r)}return t.includes(bu)||t.push(bu),t}function OG(e){return e.split("-").map((n,r)=>r===0?n.toLowerCase():/^[a-zA-Z]{2}$/.test(n)?n.toUpperCase():n).join("-")}function GP(e){let{box:t,afterDate:n,beforeDate:r,hasLinkIcon:i,footnoteCount:o}=e;if(!n&&!r)return[];let s=[],a=kr,c=t.y+s_,l=cg(t.width);if(n){let u=ug(t.x,i),f=l?{x:t.x-Ar-a,y:c}:{x:u,y:c};s.push({side:"after",isoDate:n,glyphTopLeft:f,glyphSize:a,spilled:l})}if(r){let u=t.x+t.width,f=fg(u,o),d=l?{x:u+Ar,y:c}:{x:f,y:c};s.push({side:"before",isoDate:r,glyphTopLeft:d,glyphSize:a,spilled:l})}return s}function Fh(e){let{box:t,afterDate:n,beforeDate:r,row:i}=e;if(!n&&!r)return[];let o=[],s=kr,a,c,l;if(i.kind==="title-tab-row"){a=t.y+(ao-s)/2;let u=i.titleTabWidth!==void 0?t.x+i.titleTabWidth:void 0;c=u!==void 0?u+Rr:t.x+po,l=u??t.x}else a=t.y-fs+(fs-s)/2,c=t.x+po,l=i.title?mo(t.x,i.titleInsetX,!!n)+hg(i.title):t.x;if(n&&(l=Math.max(l,c+s),o.push({side:"after",isoDate:n,glyphTopLeft:{x:c,y:a},glyphSize:s,spilled:!1})),r){let u=t.x+t.width-lg-s;o.push({side:"before",isoDate:r,glyphTopLeft:{x:Math.max(u,l+Rr),y:a},glyphSize:s,spilled:!1})}return o}function $n(e){for(let t of e)if(/^\d{4}-\d{2}-\d{2}$/.test(t))return t}function jP(e){return e.box.y+e.box.height-tr/2}function HP(e,t){let{box:n}=e;return{x:n.x,y:n.y+t/2}}function zP(e,t){let{box:n}=e;return{x:n.x+n.width,y:e.textSpills?jP(e):n.y+t/2}}function qP(e,t){return e.textSpills?jP(e):e.box.y+t/2}function Bh(e,t){return{x:e,y:t,height:0,maxX:e}}function Wh(e,t){e.box.y+=t;for(let n of e.inlineDatePins??[])n.glyphTopLeft.y+=t;if(e.kind==="item"){for(let n of e.labelChips)n.box.y+=t;e.overflowBox&&(e.overflowBox.y+=t);return}for(let n of e.children)Wh(n,t)}function Uh(e,t){e.box.y+=t;for(let n of e.children)Wh(n,t);for(let n of e.nested)Uh(n,t)}function VP(e,t){e.box.y+=t;for(let n of e.nestedSwimlanes)Uh(n,t)}var cl=class{constructor(t){I(this,"rows");I(this,"opts");this.opts=t,this.rows=[{y:t.originY,height:t.minRowHeight,rightEdge:t.laneLeftX,spillX:t.laneLeftX,placedChildren:[]}]}placeItem(t){for(let r=0;r<this.rows.length;r+=1){let i=this.rows[r];if(!(t.desiredStart<i.rightEdge)&&!(t.desiredStart<i.spillX)&&!this.rowIntersectsCorridor(i,t))return{rowIndex:r,y:i.y}}let n=this.appendRow(Math.max(this.opts.minRowHeight,t.predictedHeight));return{rowIndex:this.rows.length-1,y:n.y}}placeBlock(){let t=this.rows[this.rows.length-1];if(t.rightEdge>this.opts.laneLeftX){let n=this.appendRow(this.opts.minRowHeight);return{rowIndex:this.rows.length-1,y:n.y}}return{rowIndex:this.rows.length-1,y:t.y}}commitItem(t){let n=this.rows[t.rowIndex],r=Math.max(t.placed.box.height,t.rowHeight??0);this.growRowHeight(t.rowIndex,r),n.rightEdge=t.logicalEnd,n.spillX=t.spillReservation??this.opts.laneLeftX,n.placedChildren.push(t.placed)}commitBlock(t){let n=this.rows[t.rowIndex];this.growRowHeight(t.rowIndex,t.blockHeight),n.rightEdge=t.blockEnd,n.spillX=t.spillReservation??this.opts.laneLeftX,n.placedChildren.push(t.placed)}usedHeight(){let t=this.rows[this.rows.length-1];return t.y+t.height-this.opts.originY}usedRightX(){let t=this.opts.laneLeftX;for(let n of this.rows)n.rightEdge>t&&(t=n.rightEdge),n.spillX>t&&(t=n.spillX);return t}rowIntersectsCorridor(t,n){return this.opts.slackCorridors.some(r=>r.y>=t.y&&r.y<t.y+t.height&&n.desiredStart<r.xEnd&&n.desiredEnd>r.xStart&&r.slackPredId!==n.childId)}appendRow(t){let n=this.rows[this.rows.length-1],r={y:n.y+n.height,height:t,rightEdge:this.opts.laneLeftX,spillX:this.opts.laneLeftX,placedChildren:[]};return this.rows.push(r),r}growRowHeight(t,n){let r=this.rows[t],i=n-r.height;if(!(i<=0)){r.height=n;for(let o=t+1;o<this.rows.length;o+=1){let s=this.rows[o];s.y+=i;for(let a of s.placedChildren)Wh(a,i)}}}};function Xh(e){return e==="hide"||e==="show"}var YP={red:"#f87171",blue:"#60a5fa",yellow:"#facc15",green:"#34d399",orange:"#fb923c",purple:"#a78bfa",gray:"#94a3b8",navy:"#818cf8",white:"#e2e8f0"},Qr={bg:"none",fg:"#e2e8f0",text:"#e2e8f0",border:"solid",icon:"none",shadow:"none",font:"sans",weight:"normal",italic:!1,textSize:"md",padding:"sm",spacing:"sm",headerHeight:"sm",cornerRadius:"sm",bracket:"none",capacityIcon:"multiplier"},yw={name:"dark",surface:{page:"#0b1220",chart:"#111827",headerBox:"#1e293b"},entities:{roadmap:{...Qr,headerHeight:"md",padding:"md"},swimlane:{...Qr,fg:"#e2e8f0",text:"#e2e8f0",padding:"sm",spacing:"none",textSize:"sm"},item:{...Qr,bg:"#0f172a",fg:"#94a3b8",text:"#e2e8f0",shadow:"subtle",cornerRadius:"sm"},parallel:{...Qr,bracket:"none",padding:"xs"},group:{...Qr,bracket:"solid",padding:"xs",fg:"#94a3b8"},anchor:{...Qr,bg:"#0b1220",fg:"#cbd5e1",text:"#cbd5e1",cornerRadius:"sm"},milestone:{...Qr,bg:"#e2e8f0",fg:"#e2e8f0",text:"#0b1220",border:"solid"},footnote:{...Qr,bg:"none",fg:"#94a3b8",text:"#e2e8f0",textSize:"sm"},label:{...Qr,bg:"#1e293b",fg:"#94a3b8",text:"#e2e8f0",textSize:"xs",padding:"xs",cornerRadius:"full"}},swimlane:{bandEven:"#111827",bandOdd:"#0f172a",separator:"#1f2937",frameTabText:"#e2e8f0",frameTabMuted:"#94a3b8",border:"#334155",tabFill:"#1e293b",tabStroke:"#475569",tabText:"#e2e8f0",ownerText:"#94a3b8",footnoteIndicator:"#f87171",rowTintEven:"#0f172a",rowTintOdd:"#1e293b",utilizationOk:"#34d399",utilizationWarn:"#fbbf24",utilizationOver:"#f87171"},timeline:{gridLine:"#475569",minorGridLine:"#334155",nonWorkingSeam:"#6b7a90",nonWorkingFill:"#94a3b8",tickMark:"#334155",labelText:"#cbd5e1",panelFill:"#0f172a",border:"#334155"},header:{cardBorder:"#475569",author:"#94a3b8"},item:{overflowX:"#f87171",linkIconFg:"#94a3b8",overflowTailFill:"#7f1d1d",overflowTailStroke:"#f87171",overflowCaption:"#fecaca"},parallel:{bracketStroke:"#cbd5e1"},anchorDiamond:{fill:"#0f172a",stroke:"#cbd5e1",label:"#cbd5e1",cutLine:"#94a3b8"},milestoneDiamond:{fill:"#e2e8f0",label:"#e2e8f0",cutLineNormal:"#a5b4fc",cutLineOverrun:"#ef4444",slack:"#cbd5e1"},footnotePanel:{fill:"#0f172a",border:"#334155",header:"#e2e8f0",title:"#e2e8f0",description:"#94a3b8",number:"#f87171"},nowline:{stroke:"#f87171",labelText:"#0b1220",labelBg:"#f87171"},milestone:{dashedInk:"#a5b4fc",overrun:"#ef4444"},anchor:{predecessorLine:"#94a3b8"},dependency:{edgeStroke:"#cbd5e1",overflowStroke:"#ef5350"},footnote:{indicatorText:"#f87171",descriptionMuted:"#94a3b8"},includeRegion:{border:"#475569",label:"#cbd5e1",badge:"#94a3b8",fill:"#0b1220",tabFill:"#111827",tabStroke:"#475569",tabText:"#e2e8f0",badgeFill:"#1e293b",badgeStroke:"#475569",badgeText:"#94a3b8"},wave:{stripFill:"#042f2e",stripFillAlt:"#134e4a",labelText:"#99f6e4",labelMuted:"#5eead4",boundary:"#2dd4bf",hatch:"#0f172a",hatchOnDark:"#ffffff"},arrowhead:{neutral:"#94a3b8",light:"#64748b",dark:"#e2e8f0"},status:{done:"#34d399",inProgress:"#60a5fa",atRisk:"#facc15",blocked:"#ef4444",planned:"#94a3b8",neutral:"#94a3b8"},statusDot:{onLight:{done:"#065f46",inProgress:"#1e3a8a",atRisk:"#92400e",blocked:"#991b1b",planned:"#334155",neutral:"#334155"},onDark:{done:"#d1fae5",inProgress:"#dbeafe",atRisk:"#fef3c7",blocked:"#fee2e2",planned:"#e2e8f0",neutral:"#e2e8f0"}},attribution:{mark:"#cbd5e1",link:"#f87171"},diagnostic:{overlayBg:"#7f1d1d",errorText:"#fecaca"}};var KP={red:"#4a4a4a",blue:"#6b6b6b",green:"#8a8a8a",yellow:"#c8c8c8",orange:"#5c5c5c",purple:"#3a3a3a",gray:"#9e9e9e",navy:"#2a2a2a",white:"#ffffff"},ei={bg:"none",fg:"#1a1a1a",text:"#1a1a1a",border:"solid",icon:"none",shadow:"none",font:"sans",weight:"normal",italic:!1,textSize:"md",padding:"sm",spacing:"sm",headerHeight:"sm",cornerRadius:"sm",bracket:"none",capacityIcon:"multiplier"},xw={name:"grayscale",surface:{page:"#f5f5f5",chart:"#ffffff",headerBox:"#ffffff"},entities:{roadmap:{...ei,headerHeight:"md",padding:"md"},swimlane:{...ei,fg:"#3a3a3a",text:"#3a3a3a",padding:"sm",spacing:"none",textSize:"sm"},item:{...ei,bg:"#ffffff",fg:"#9e9e9e",text:"#1a1a1a",shadow:"subtle",cornerRadius:"sm"},parallel:{...ei,bracket:"none",padding:"xs"},group:{...ei,bracket:"solid",padding:"xs",fg:"#595959"},anchor:{...ei,bg:"#1a1a1a",fg:"#1a1a1a",text:"#1a1a1a",cornerRadius:"sm"},milestone:{...ei,bg:"#2a2a2a",fg:"#2a2a2a",text:"#ffffff",border:"solid"},footnote:{...ei,bg:"none",fg:"#595959",text:"#595959",textSize:"sm"},label:{...ei,bg:"#e8e8e8",fg:"#595959",text:"#595959",textSize:"xs",padding:"xs",cornerRadius:"full"}},swimlane:{bandEven:"#ffffff",bandOdd:"#f5f5f5",separator:"#d4d4d4",frameTabText:"#3a3a3a",frameTabMuted:"#737373",border:"#d4d4d4",tabFill:"#e8e8e8",tabStroke:"#bdbdbd",tabText:"#3a3a3a",ownerText:"#737373",footnoteIndicator:"#4a4a4a",rowTintEven:"#ffffff",rowTintOdd:"#f5f5f5",utilizationOk:"#8a8a8a",utilizationWarn:"#595959",utilizationOver:"#1a1a1a"},timeline:{gridLine:"#bdbdbd",minorGridLine:"#d4d4d4",nonWorkingSeam:"#9a9a9a",nonWorkingFill:"#737373",tickMark:"#bdbdbd",labelText:"#737373",panelFill:"#ffffff",border:"#d4d4d4"},header:{cardBorder:"#d4d4d4",author:"#737373"},item:{overflowX:"#1a1a1a",linkIconFg:"#1a1a1a",overflowTailFill:"#e8e8e8",overflowTailStroke:"#4a4a4a",overflowCaption:"#3a3a3a"},parallel:{bracketStroke:"#3a3a3a"},anchorDiamond:{fill:"#ffffff",stroke:"#3a3a3a",label:"#3a3a3a",cutLine:"#737373"},milestoneDiamond:{fill:"#1a1a1a",label:"#1a1a1a",cutLineNormal:"#2a2a2a",cutLineOverrun:"#4a4a4a",slack:"#1a1a1a"},footnotePanel:{fill:"#ffffff",border:"#d4d4d4",header:"#1a1a1a",title:"#1a1a1a",description:"#737373",number:"#4a4a4a"},nowline:{stroke:"#1a1a1a",labelText:"#ffffff",labelBg:"#1a1a1a"},milestone:{dashedInk:"#9e9e9e",overrun:"#4a4a4a"},anchor:{predecessorLine:"#9e9e9e"},dependency:{edgeStroke:"#595959",overflowStroke:"#1a1a1a"},footnote:{indicatorText:"#4a4a4a",descriptionMuted:"#737373"},includeRegion:{border:"#9e9e9e",label:"#3a3a3a",badge:"#737373",fill:"#f5f5f5",tabFill:"#ffffff",tabStroke:"#bdbdbd",tabText:"#1a1a1a",badgeFill:"#e8e8e8",badgeStroke:"#bdbdbd",badgeText:"#595959"},wave:{stripFill:"#fafafa",stripFillAlt:"#e0e0e0",labelText:"#212121",labelMuted:"#616161",boundary:"#616161",hatch:"#000000",hatchOnDark:"#ffffff"},arrowhead:{neutral:"#595959",light:"#9e9e9e",dark:"#1a1a1a"},status:{done:"#8a8a8a",inProgress:"#595959",atRisk:"#737373",blocked:"#3a3a3a",planned:"#bdbdbd",neutral:"#bdbdbd"},statusDot:{onLight:{done:"#3a3a3a",inProgress:"#2a2a2a",atRisk:"#4a4a4a",blocked:"#1a1a1a",planned:"#595959",neutral:"#595959"},onDark:{done:"#d4d4d4",inProgress:"#e8e8e8",atRisk:"#c8c8c8",blocked:"#f0f0f0",planned:"#d4d4d4",neutral:"#d4d4d4"}},attribution:{mark:"#9e9e9e",link:"#1a1a1a"},diagnostic:{overlayBg:"#e8e8e8",errorText:"#1a1a1a"}};var ZP={red:"#e53935",blue:"#1e88e5",yellow:"#fdd835",green:"#43a047",orange:"#fb8c00",purple:"#8e24aa",gray:"#9e9e9e",navy:"#0d47a1",white:"#ffffff"},ti={bg:"none",fg:"#0f172a",text:"#0f172a",border:"solid",icon:"none",shadow:"none",font:"sans",weight:"normal",italic:!1,textSize:"md",padding:"sm",spacing:"sm",headerHeight:"sm",cornerRadius:"sm",bracket:"none",capacityIcon:"multiplier"},vw={name:"light",surface:{page:"#f8fafc",chart:"#ffffff",headerBox:"#ffffff"},entities:{roadmap:{...ti,headerHeight:"md",padding:"md"},swimlane:{...ti,fg:"#334155",text:"#334155",padding:"sm",spacing:"none",textSize:"sm"},item:{...ti,bg:"#ffffff",fg:"#94a3b8",text:"#0f172a",shadow:"subtle",cornerRadius:"sm"},parallel:{...ti,bracket:"none",padding:"xs"},group:{...ti,bracket:"solid",padding:"xs",fg:"#475569"},anchor:{...ti,bg:"#0f172a",fg:"#0f172a",text:"#0f172a",cornerRadius:"sm"},milestone:{...ti,bg:"#312e81",fg:"#312e81",text:"#ffffff",border:"solid"},footnote:{...ti,bg:"none",fg:"#475569",text:"#475569",textSize:"sm"},label:{...ti,bg:"#f1f5f9",fg:"#475569",text:"#475569",textSize:"xs",padding:"xs",cornerRadius:"full"}},swimlane:{bandEven:"#ffffff",bandOdd:"#f8fafc",separator:"#e2e8f0",frameTabText:"#334155",frameTabMuted:"#64748b",border:"#e2e8f0",tabFill:"#f1f5f9",tabStroke:"#cbd5e1",tabText:"#334155",ownerText:"#64748b",footnoteIndicator:"#dc2626",rowTintEven:"#ffffff",rowTintOdd:"#f8fafc",utilizationOk:"#10b981",utilizationWarn:"#f59e0b",utilizationOver:"#ef4444"},timeline:{gridLine:"#cbd5e1",minorGridLine:"#e2e8f0",nonWorkingSeam:"#a0aec0",nonWorkingFill:"#64748b",tickMark:"#cbd5e1",labelText:"#64748b",panelFill:"#ffffff",border:"#e2e8f0"},header:{cardBorder:"#e2e8f0",author:"#64748b"},item:{overflowX:"#dc2626",linkIconFg:"#0f172a",overflowTailFill:"#fee2e2",overflowTailStroke:"#ef4444",overflowCaption:"#b91c1c"},parallel:{bracketStroke:"#334155"},anchorDiamond:{fill:"#ffffff",stroke:"#334155",label:"#334155",cutLine:"#64748b"},milestoneDiamond:{fill:"#0f172a",label:"#0f172a",cutLineNormal:"#1e1b4b",cutLineOverrun:"#b91c1c",slack:"#0f172a"},footnotePanel:{fill:"#ffffff",border:"#e2e8f0",header:"#0f172a",title:"#0f172a",description:"#64748b",number:"#dc2626"},nowline:{stroke:"#e53e3e",labelText:"#ffffff",labelBg:"#e53e3e"},milestone:{dashedInk:"#94a3b8",overrun:"#ef4444"},anchor:{predecessorLine:"#94a3b8"},dependency:{edgeStroke:"#475569",overflowStroke:"#d32f2f"},footnote:{indicatorText:"#e53e3e",descriptionMuted:"#64748b"},includeRegion:{border:"#94a3b8",label:"#334155",badge:"#64748b",fill:"#f8fafc",tabFill:"#ffffff",tabStroke:"#cbd5e1",tabText:"#0f172a",badgeFill:"#e2e8f0",badgeStroke:"#cbd5e1",badgeText:"#475569"},wave:{stripFill:"#f0fdfa",stripFillAlt:"#ccfbf1",labelText:"#134e4a",labelMuted:"#0f766e",boundary:"#0d9488",hatch:"#0f172a",hatchOnDark:"#ffffff"},arrowhead:{neutral:"#475569",light:"#94a3b8",dark:"#0f172a"},status:{done:"#10b981",inProgress:"#3b82f6",atRisk:"#f59e0b",blocked:"#ef4444",planned:"#94a3b8",neutral:"#94a3b8"},statusDot:{onLight:{done:"#065f46",inProgress:"#1e3a8a",atRisk:"#92400e",blocked:"#991b1b",planned:"#334155",neutral:"#334155"},onDark:{done:"#d1fae5",inProgress:"#dbeafe",atRisk:"#fef3c7",blocked:"#fee2e2",planned:"#e2e8f0",neutral:"#e2e8f0"}},attribution:{mark:"#94a3b8",link:"#e53e3e"},diagnostic:{overlayBg:"#fee2e2",errorText:"#991b1b"}};var JP=["light","dark","grayscale"],Tw={light:vw,dark:yw,grayscale:xw};var $G={greyscale:"grayscale"};function ww(e){let t=e.toLowerCase(),n=$G[t]??t;return JP.find(r=>r===n)}var LG={grey:"gray",violet:"purple"};function ni(e,t){if(e==="none")return"none";if(e.startsWith("#"))return e;let n=t.name==="dark"?YP:t.name==="grayscale"?KP:ZP,r=LG[e]??e,i=n[r];return typeof i=="string"?i:e}function Ru(e){return e.key.endsWith(":")?e.key.slice(0,-1):e.key}function DG(e,t){return{bg:ni(e.bg,t),fg:ni(e.fg,t),text:ni(e.text,t),border:e.border,icon:e.icon,shadow:e.shadow,font:e.font,weight:e.weight,italic:e.italic,textSize:e.textSize,padding:e.padding,spacing:e.spacing,headerHeight:e.headerHeight,cornerRadius:e.cornerRadius,bracket:e.bracket,headerPosition:"beside",capacityIcon:e.capacityIcon,timelinePosition:"top",minorGrid:!1,nonWorking:"hide"}}function tC(e,t,n,r){switch(t){case"bg":e.bg=ni(n,r);break;case"fg":e.fg=ni(n,r);break;case"text":e.text=ni(n,r);break;case"border":(n==="solid"||n==="dashed"||n==="dotted")&&(e.border=n);break;case"icon":e.icon=n;break;case"shadow":(n==="none"||n==="subtle"||n==="soft"||n==="hard")&&(e.shadow=n);break;case"font":(n==="sans"||n==="serif"||n==="mono")&&(e.font=n);break;case"weight":(n==="thin"||n==="light"||n==="normal"||n==="bold")&&(e.weight=n);break;case"italic":e.italic=n==="true";break;case"text-size":e.textSize=ku(n,"xl");break;case"padding":e.padding=ku(n,"xl");break;case"spacing":e.spacing=ku(n,"xl");break;case"header-height":e.headerHeight=ku(n,"xl");break;case"corner-radius":e.cornerRadius=ku(n,"full");break;case"bracket":(n==="none"||n==="solid"||n==="dashed")&&(e.bracket=n);break;case"header-position":(n==="beside"||n==="above")&&(e.headerPosition=n);break;case"capacity-icon":e.capacityIcon=n;break;case"timeline-position":(n==="top"||n==="bottom"||n==="both")&&(e.timelinePosition=n);break;case"minor-grid":e.minorGrid=n==="true";break;case"non-working":Xh(n)&&(e.nonWorking=n);break;default:break}}function ku(e,t){let n=["none","xs","sm","md","lg","xl","full"],r=n.indexOf(t),i=n.indexOf(e);return i<0?"md":i>r?n[r]:n[i]}function nC(e,t,n){if(t)for(let r of t.properties)tC(e,Ru(r),r.value,n)}function QP(e,t,n){for(let r of t){let i=Ru(r);r.value!==void 0&&tC(e,i,r.value,n)}}function MG(e,t,n){let r=t.find(o=>Ru(o)==="labels");if(!r)return;let i=r.value?[r.value]:r.values;for(let o of[...i].reverse()){let s=n.labels.get(o);if(!s)continue;let a=s.properties.find(c=>Ru(c)==="style");a?.value&&nC(e,n.styles.get(a.value),n.theme)}}function eC(e,t,n){let r=t.find(i=>Ru(i)==="style");r?.value&&nC(e,n.styles.get(r.value),n.theme)}function mt(e,t,n){let r=n.theme.entities[e],i=DG(r,n.theme),o=n.defaults.get(e);return o&&(eC(i,o.properties,n),QP(i,o.properties,n.theme)),MG(i,t,n),eC(i,t,n),QP(i,t,n.theme),i}function rC(e,t){return mt("label",e.properties,t)}function Gh(e,t,n,r,i=0){let o=n.map(c=>c??-1/0),s=[];for(let c=0;c<e;c++)s.push(iC(c===0?t:s[c-1],o[c],i));let a=[...s];for(let c=1;c<=e+1;c++){let l=r(s,a).memberEnd,u=[],f=[];for(let d=0;d<e;d++)u.push(d===0?s[0]:iC(f[d-1],o[d],i)),f.push(Math.max(u[d],l[d]??-1/0));if(oC(s,u)&&oC(a,f))return{S:s,E:a,passes:c,capped:!1};s=u,a=f}return r(s,a),{S:s,E:a,passes:e+1,capped:!0}}function iC(e,t,n){return t-e>n?t:e}function oC(e,t){for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function sC(e,t,n){return e.floors.map(r=>{let i=r?ze(r.date):null;return i?n.workingIndexOf(t,i):null})}var Ko=class{constructor(t,n){I(this,"plan");I(this,"S");I(this,"memberEnd");I(this,"binding");I(this,"memberCount");this.plan=t,this.S=n;let r=t.waves.length;this.memberEnd=new Array(r).fill(-1/0),this.binding=new Array(r).fill(void 0),this.memberCount=new Array(r).fill(0)}floor(t){let n=this.plan.waveOf.get(t),r=t.$type==="ItemDeclaration"?void 0:this.plan.leadOf.get(t),i;return n!==void 0&&(i=this.S[n-1]),r!==void 0&&(i=Math.max(i??-1/0,this.S[r-1])),i}apply(t,n){let r=this.floor(t);return r===void 0?n:Math.max(n,r)}accumulate(t,n){let r=this.plan.memberWave(t);r!==void 0&&(this.memberCount[r-1]++,n>this.memberEnd[r-1]&&(this.memberEnd[r-1]=n,this.binding[r-1]=t))}};function aC(e,t,n,r,i,o=0){return e.waves.map((s,a)=>{let c={id:s.name,index:a+1,start:t.S[a],end:t.E[a],memberCount:n.memberCount[a]},l=n.binding[a];if(l!==void 0&&n.memberEnd[a]===t.E[a]&&t.E[a]>t.S[a]){let p=l.name??l.title;p!==void 0&&(c.heldBy=p)}let u=i[a],f=e.floors[a]?.ref,d=a===0?r:t.E[a-1];return u!=null&&f!==void 0&&u-d>o&&(c.floorRef=f),c})}var Yt=.5;function lC(e,t,n){let r=e.waves.map(()=>n);return{plan:e,ids:e.waves.map(i=>i.name),origin:n,floors:e.floors.map(i=>{let o=i?ze(i.date):null;return o?t.forward(o):null}),S:r,E:r,pass:new Ko(e,r),frozen:!1}}function cC(e,t,n){e.S=t,e.E=n,e.pass=new Ko(e.plan,t)}function uC(e,t){e.S=t.S,e.E=t.E,e.frozen=!0,e.solve=t}function jh(e,t,n){e.ids.forEach((r,i)=>{t.set(r,e.S[i]),n.set(r,e.E[i])})}function Zo(e,t,n){return n.waves?n.waves.pass.apply(e,t):t}function fC(e,t,n){n.waves&&!n.waves.frozen&&n.waves.pass.accumulate(e,t)}function dC(e,t){if(t.waves)return t.waves.plan.memberWave(e)!==void 0?"member":"background"}function pC(e,t,n){let r=n.waves?.plan.waveOf.get(e);if(!n.waves||r===void 0)return;let i=pe(e.properties,"date"),o=ze(i)?"date":"start",s=o==="date"?i:pe(e.properties,"start"),a=ze(s);if(s===void 0||!a)return;let c=n.scale.forwardWithinDomain(a),l=n.waves.pass.floor(e);if(!(c===null||l===void 0||l-c<Yt)&&!(t-l>Yt))return{wave:n.waves.ids[r-1],key:o,pin:s,start:Au(l,n).toISOString().slice(0,10)}}function hC(e,t){for(let n of[...e.S,...e.E])if(!(Math.abs(n-e.origin)<Yt)&&Math.abs(t-n)<Yt)return!0;return!1}function Ew(e,t){let n=Math.round((e-t.timeline.originX)/t.timeline.pixelsPerDay);if(!t.scale.showsNonWorking)return n;let r=t.timeline.startDate;return t.calendar.workingIndexOf(r,wt(r,n))}function Au(e,t){return t.calendar.dateAtWorkingIndex(t.timeline.startDate,Ew(e,t))}function mC(e,t,n){return OE(n.calendar,n.timeline.startDate,Ew(e,n),Ew(t,n))}function Jo(e,t,n){return e.scale.showsNonWorking?e.scale.advanceX(t,n)-t:n*e.timeline.pixelsPerDay}var Hh=class{constructor(t,n){I(this,"node");I(this,"deps");this.node=t,this.deps=n}get id(){return this.node.name??""}place(t,n){let{node:r}=this,{deps:i}=this,o=mt("group",r.properties,n.styleCtx),s=Zo(r,t.x,n),a=n.waves!==void 0&&r.title===void 0&&pe(r.properties,"wave")!==void 0&&pe(r.properties,"style")===void 0&&Le(r.properties,"labels").length===0,c=a?void 0:r.title??r.name,l=n.currentFlowKey;n.nextGroupId+=1,n.currentFlowKey=`${l}/group:${r.name??`group-${n.nextGroupId}`}`;let u=$n(Le(r.properties,"after")),f=$n(Le(r.properties,"before")),d=!!(u||f),p=lo(o.bg),g=p&&!!c||p&&d,T=g?ao+Pm:0,x=g?Lm:0,y=Ul(p,!!c,d),E=t.y+y,w=n.bandScale.step(),b=s,L=new cl({laneLeftX:b,originY:E+T,minRowHeight:w,slackCorridors:n.slackCorridors}),P=b,$=[];for(let N of r.content){if(N.$type==="DescriptionDirective")continue;if(!Mt(N)){let xe=i.resolveChildStart(N,P,b,n),{rowIndex:ve,y:ge}=L.placeBlock(),Ye=i.newCursor(xe,ge),Fe=i.sequenceOne(N,Ye,n);$.push(Fe);let ot=Fe.box.x+Fe.box.width,sn=Math.max(w,Ye.height);L.commitBlock({rowIndex:ve,placed:Fe,blockHeight:sn,blockEnd:ot,spillReservation:lf(Fe)}),P=Math.max(P,ot);continue}let j=N.properties,q=i.resolveChildStart(N,P,b,n),z=fi(j,n.sizes,n.cal),ne=n.scale.startX(q),oe=Math.max(Rn,Jo(n,ne,z)),he=ne+oe,re=N.name??"",ae=i.predictItemBarExtraHeight(N,ne,n),k=w+ae,{rowIndex:O,y:B}=L.placeItem({childId:re,desiredStart:ne,desiredEnd:he,predictedHeight:k}),H=i.newCursor(q,B),J=i.sequenceItem(N,H,n);$.push(J);let V=J.box.x+J.box.width+an;P=Math.max(P,V);let ie=null;(J.textSpills||J.chipsOutside||J.dotSpills||J.iconSpills||J.footnoteSpills)&&(ie=Math.max(J.decorationsRightX,J.chipsOutside?J.chipsRightX:0)+6),L.commitItem({rowIndex:O,placed:J,logicalEnd:V,spillReservation:ie,rowHeight:Math.max(k,w+(J.box.height-n.bandScale.bandwidth()))})}let G=Math.max(w,L.usedHeight()),Y=Math.max(P,L.usedRightX()),D=n.scale.showsNonWorking?n.scale.startX(s):s,S=n.scale.showsNonWorking?Math.max(D,Y):Y,F={x:D,y:E,width:S-D,height:T+G+x};t.x=P+kl,t.maxX=Math.max(t.maxX,t.x);let X=n.bandScale.step()-n.bandScale.bandwidth();t.height=Math.max(t.height,y+F.height+X);let R=r.name;R&&(n.entityLeftEdges.set(R,F.x),n.entityRightEdges.set(R,F.x+F.width)),n.currentFlowKey=l;let C=Fh({box:F,afterDate:u,beforeDate:f,row:p?{kind:"title-tab-row",titleTabWidth:c?co(c):void 0}:{kind:"header-band",title:c,titleInsetX:ds}});return{kind:"group",id:R,title:c,box:F,children:$,style:o,inlineDatePins:C.length>0?C:void 0,...a?{waveOnly:!0}:{}}}};var FG=12,BG=4,zh=13,WG=11;function _w(e,t){return(e?ft(e,WG):0)+t}function gC(e){if(!/[\r\n]/.test(e))return;let t=e.replace(/\r\n?/g,`
|
|
2926
2926
|
`).split(`
|
|
2927
|
-
`).map(i=>i.trim()),n=0,r=t.length;for(;n<r&&t[n]==="";)n+=1;for(;r>n&&t[r-1]==="";)r-=1;return t.slice(n,r)}function bw(e,t,n,r=t){let i=e,o=gC(e);if(o){if(o.length>=2)return{textSpills:!(n<=t&&o.every((l,u)=>ft(l,zh)<=(u===0?r:t))),titleLines:o};i=o[0]??""}let s=i.length>0&&ft(i,zh)>r,a=n>t;if(!s&&!a)return{textSpills:!1,titleLines:[i]};if(s&&!a){let c=$l(i,t,zh,r);if(c.length>=2&&c.length<=og&&c.every((l,u)=>ft(l,zh)<=(u===0?r:t)))return{textSpills:!1,titleLines:c}}return{textSpills:!0,titleLines:[i]}}function kw(e,t,n){let r=gC(e);return r&&r.length>=2?r:!t.textSpills&&!n&&t.titleLines.length>=2?t.titleLines:[r?r[0]??"":e]}var qh=class{constructor(t){I(this,"input");this.input=t}get id(){return this.input.id}measure(t){return{width:Math.max(Rn,this.input.logicalRightX-this.input.logicalLeftX),height:t.bands.bandwidth()}}place(t,n){let r=this.measure(n),i=Math.max(Rn,r.width-2*an),o=t.x+an,s={x:o,y:t.y,width:i,height:r.height},a=hi(!!this.input.hasLinkIcon,this.input.hasAfterGlyph?{barWidth:i}:void 0),c=Math.max(0,i-a-FG),l=this.input.title,u=_w(this.input.metaText,this.input.metaTrailingWidth??0),f=Math.max(0,i-a-(this.input.titleFirstLineRightReservePx??Bl({barWidth:i,footnoteLabels:[],hasBeforeGlyph:!1}))),{textSpills:d,titleLines:p}=bw(l,c,u,f),h=d?o+i+BG:o+a;return{id:this.input.id,box:s,textX:h,textSpills:d,titleLines:p}}};var Vh=class{constructor(t,n){I(this,"node");I(this,"deps");this.node=t,this.deps=n}get id(){return this.node.name??""}place(t,n){let{node:r}=this,{deps:i}=this,o=mt("parallel",r.properties,n.styleCtx),s=Zo(r,t.x,n),a=$n(Le(r.properties,"after")),c=$n(Le(r.properties,"before")),l=r.title??r.name,u=l_(!!(a||c)),f=t.y+u,d=n.scale.showsNonWorking?n.scale.startX(s):s,p=[],h=d,g=0,T=n.currentFlowKey;n.nextParallelId+=1;let x=r.name??`parallel-${n.nextParallelId}`,y=0;for(let L of r.content){if(L.$type==="DescriptionDirective")continue;n.currentFlowKey=`${T}/par:${x}#${y}`;let P=i.newCursor(s,f+g),$=i.sequenceOne(L,P,n);p.push($),g+=Math.max(n.bandScale.step(),P.height),h=Math.max(h,P.maxX),y++}n.currentFlowKey=T;let E={x:d,y:f,width:h-d,height:g};t.x=h+kl,t.maxX=Math.max(t.maxX,t.x),t.height=Math.max(t.height,u+g);let w=r.name;w&&(n.entityLeftEdges.set(w,E.x),n.entityRightEdges.set(w,E.x+E.width));let b=Fh({box:E,afterDate:a,beforeDate:c,row:{kind:"header-band",title:l,titleInsetX:ps}});return{kind:"parallel",id:w,title:l,box:E,children:p,style:o,inlineDatePins:b.length>0?b:void 0}}};var ul=class extends Map{constructor(t,n=GG){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(let[r,i]of t)this.set(r,i)}get(t){return super.get(yC(this,t))}has(t){return super.has(yC(this,t))}set(t,n){return super.set(UG(this,t),n)}delete(t){return super.delete(XG(this,t))}};function yC({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function UG({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function XG({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function GG(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Yh(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r<i;)o[r]=e+r*n;return o}function Kh(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}var xC=Symbol("implicit");function Zh(){var e=new ul,t=[],n=[],r=xC;function i(o){let s=e.get(o);if(s===void 0){if(r!==xC)return r;e.set(o,s=t.push(o)-1)}return n[s%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new ul;for(let s of o)e.has(s)||e.set(s,t.push(s)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Zh(t,n).unknown(r)},Kh.apply(i,arguments),i}function Iu(){var e=Zh().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,o,s,a=!1,c=0,l=0,u=.5;delete e.unknown;function f(){var d=t().length,p=i<r,h=p?i:r,g=p?r:i;o=(g-h)/Math.max(1,d-c+l*2),a&&(o=Math.floor(o)),h+=(g-h-o*(d-c))*u,s=o*(1-c),a&&(h=Math.round(h),s=Math.round(s));var T=Yh(d).map(function(x){return h+o*x});return n(p?T.reverse():T)}return e.domain=function(d){return arguments.length?(t(d),f()):t()},e.range=function(d){return arguments.length?([r,i]=d,r=+r,i=+i,f()):[r,i]},e.rangeRound=function(d){return[r,i]=d,r=+r,i=+i,a=!0,f()},e.bandwidth=function(){return s},e.step=function(){return o},e.round=function(d){return arguments.length?(a=!!d,f()):a},e.padding=function(d){return arguments.length?(c=Math.min(1,l=+d),f()):c},e.paddingInner=function(d){return arguments.length?(c=Math.min(1,d),f()):c},e.paddingOuter=function(d){return arguments.length?(l=+d,f()):l},e.align=function(d){return arguments.length?(u=Math.max(0,Math.min(1,d)),f()):u},e.copy=function(){return Iu(t(),[r,i]).round(a).paddingInner(c).paddingOuter(l).align(u)},Kh.apply(f(),arguments)}var Rw=class e{constructor(t,n,r){I(this,"bandwidthPx");I(this,"stepPx");I(this,"d3");this.bandwidthPx=t,this.stepPx=n,this.d3=r}static fixedRow(t){return new e(t.bandwidth,t.step)}static forRows(t){let n=Array.from({length:t.count},(i,o)=>String(o)),r=Iu().domain(n).range(t.range).paddingInner(t.paddingInner??0).paddingOuter(t.paddingOuter??0);return new e(r.bandwidth(),r.step(),r)}bandwidth(){return this.bandwidthPx}step(){return this.stepPx}forward(t){if(!this.d3)throw new Error("BandScale.forward is only available on closed-domain bands (BandScale.forRows)");let n=this.d3(t);if(n===void 0)throw new Error(`BandScale: unknown band id "${t}"`);return n}},jG={bandwidth:56,step:64};function vC(){return Rw.fixedRow(jG)}var TC=1e-6,Su=class{constructor(t){I(this,"domain");I(this,"range");I(this,"pixelsPerDay");I(this,"calendar");I(this,"nonWorking");this.domain=t.domain,this.range=t.range,this.calendar=t.calendar,this.nonWorking=t.nonWorking??"hide";let n=Math.max(1,this.showsNonWorking?xn(t.domain[0],t.domain[1]):this.indexOf(t.domain[1]));this.pixelsPerDay=(t.range[1]-t.range[0])/n}get showsNonWorking(){return this.nonWorking==="show"&&this.calendar?.hasNonWorkingDays===!0}indexOf(t){return this.calendar?this.calendar.workingIndexOf(this.domain[0],t):xn(this.domain[0],t)}dayAt(t){let n=(t-this.range[0])/this.pixelsPerDay;return{days:n,day:Math.floor(n+TC)}}forward(t){return this.showsNonWorking?this.range[0]+xn(this.domain[0],t)*this.pixelsPerDay:this.range[0]+this.indexOf(t)*this.pixelsPerDay}forwardWithinDomain(t){return t<this.domain[0]||t>this.domain[1]?null:this.forward(t)}invert(t){let n=Math.round((t-this.range[0])/this.pixelsPerDay);return this.showsNonWorking?wt(this.domain[0],n):this.calendar?this.calendar.dateAtWorkingIndex(this.domain[0],n):wt(this.domain[0],n)}indexAtX(t){let{days:n,day:r}=this.dayAt(t);if(!this.showsNonWorking||!this.calendar)return n;let i=wt(this.domain[0],r),o=this.calendar.workingIndexOf(this.domain[0],i);return this.calendar.isWorkingDay(i)?o+Math.max(0,n-r):o}startX(t){if(!this.showsNonWorking||!this.calendar)return t;let n=wt(this.domain[0],this.dayAt(t).day);if(this.calendar.isWorkingDay(n))return t;let r=this.calendar.workingIndexOf(this.domain[0],n);return this.forward(this.calendar.dateAtWorkingIndex(this.domain[0],r))}advanceX(t,n){if(!this.showsNonWorking||!this.calendar)return t+n*this.pixelsPerDay;let r=this.startX(t);if(n<=0)return r;let i=this.indexAtX(r)+n,o=Math.ceil(i-TC)-1,s=i-o,a=this.calendar.dateAtWorkingIndex(this.domain[0],o);return this.forward(a)+s*this.pixelsPerDay}get originX(){return this.range[0]}get widthPx(){return this.range[1]-this.range[0]}};function Jh(e){return e.endsWith(":")?e.slice(0,-1):e}function EC(e,t){let r=e.roadmapDecl?.properties.find(l=>Jh(l.key)==="scale")?.value,i="weeks",o,s;if(r)if(r==="days"||r==="weeks"||r==="months"||r==="quarters"||r==="years")i=r;else{let l=/^(\d+)([dwmqy])$/.exec(r);if(l){let u=Math.max(1,parseInt(l[1],10));switch(l[2]){case"d":i="days";break;case"w":i="weeks";break;case"m":i="months";break;case"q":i="quarters";break;case"y":i="years";break}o=Qh(i)*u,s=1}}let a=s??i_[i]??4,c=l=>s===void 0&&!l?{labelEveryDefault:!0}:{};if(t){let u=t.properties.find(T=>Jh(T.key)==="unit")?.value??i,f=t.properties.find(T=>Jh(T.key)==="label-every"),d=t.properties.find(T=>Jh(T.key)==="pixels-per-unit"),p=f&&parseInt(f.value,10)||0,h=p!==0?Math.max(1,p):a,g=d?Math.max(1,parseInt(d.value,10)||Qh(u)):o??Qh(u);return{unit:u,labelEvery:h,pixelsPerUnit:g,...c(p!==0)}}return{unit:i,labelEvery:a,pixelsPerUnit:o??Qh(i),...c(!1)}}function Qh(e){switch(e){case"days":return e_;case"weeks":return 40;case"months":return 80;case"quarters":return 160;case"years":return 320}}var HG=.5,Aw=.5,Iw=7;function Qo(e){return e==="months"||e==="quarters"||e==="years"}function em(e,t){let n=e.getUTCFullYear(),r=e.getUTCMonth();switch(t){case"months":return new Date(Date.UTC(n,r+1,1));case"quarters":return new Date(Date.UTC(n,r-r%3+3,1));case"years":return new Date(Date.UTC(n+1,0,1))}}function zG(e,t){if(e.getUTCDate()!==1)return!1;let n=e.getUTCMonth();switch(t){case"months":return!0;case"quarters":return n%3===0;case"years":return n===0}}function tm(e,t,n,r,i){let o=Math.ceil(t-1e-6);if(i?.hasNonWorkingDays){if(!Qo(n)&&o<=0)return 0;let a=o<=0?e:wt(i.dateAtWorkingIndex(e,o-1),1),c=Qo(n)?wC(a,n):n==="weeks"?_C(a,e,i.weekStart):a;return i.workingIndexOf(e,c)}if(!Qo(n))return Math.ceil(t/r)*r;let s=wt(e,o);return xn(e,wC(s,n))}function wC(e,t){return zG(e,t)?e:em(e,t)}function _C(e,t,n){let r=n===void 0?-xn(t,e):n-e.getUTCDay();return wt(e,(r%Iw+Iw)%Iw)}function qG(e,t,n){return _C(wt(e,1),t,n)}function Sw(e,t,n,r=bu){if(e.calendar?.hasNonWorkingDays)return VG(e,t,e.calendar,r);if(Qo(t.unit))return JG(e,t,t.unit,r);let i=n.daysPerUnit(t.unit),o=i*e.pixelsPerDay,s=Math.max(1,Math.round(e.widthPx/e.pixelsPerDay)),a=Math.floor(s/i)+1,c=[];for(let l=0;l<a;l++){let u=l*i,f=e.originX+u*e.pixelsPerDay,d=l%t.labelEvery===0,p=l===a-1;c.push({x:f,labelX:p?void 0:f+o/2,major:d,label:d&&!p?Cw(t.unit,wt(e.domain[0],u),l,r):void 0})}return c}function VG(e,t,n,r){let{unit:i}=t,[o,s]=e.domain,a=T=>Qo(i)?em(T,i):i==="weeks"?qG(T,o,n.weekStart):wt(T,1),c=[o];for(let T=a(o);T<s;T=a(T))c.push(T);let l=e.forward(s),u=[];c.forEach((T,x)=>{let y=e.forward(T);(x+1<c.length?e.forward(c[x+1]):l)>y&&!YG(e,i,c,x)&&u.push({date:T,x:y})});let f=i==="days"&&t.labelEveryDefault===!0&&n.weekStart!==void 0,d=(T,x)=>f?T.getUTCDay()===n.weekStart:x%t.labelEvery===0,h=(e.showsNonWorking?DE(i):n.daysPerUnit(i))*e.pixelsPerDay,g=u.map(({date:T,x},y)=>{let E=(y+1<u.length?u[y+1].x:l)-x,w=d(T,y),b=w?Cw(i,T,y,r):void 0;if(b!==void 0){let L=ft(b,so)>E,P=Qo(i)?y===0||y===u.length-1:E<h-HG;L&&P&&(b=void 0)}return{x,labelX:x+E/2,major:w,label:b}});return s>o&&g.push({x:l,labelX:void 0,major:d(s,u.length),label:void 0}),g}function YG(e,t,n,r){let i=e.calendar;if(!e.showsNonWorking||!i||!Qo(t)||r===0||r!==n.length-1)return!1;let[o,s]=e.domain;return i.workingIndexOf(o,n[r])>=i.workingIndexOf(o,s)}function Nw(e,t,n,r){let i=e.calendar;if(!i?.hasNonWorkingDays)return;let o=i.nonWorkingRuns(e.domain[0],e.domain[1]);if(o.length===0)return;let[s,a]=e.range;if(e.showsNonWorking)return o.map(l=>ZG(e,l,n));let c=l=>t.some(u=>Math.abs(u.x-l)<Aw&&(u.major||r));return o.map(l=>{let u=e.forward(l.from),f={x:u,width:e.forward(wt(l.through,1))-u,from:l.from,through:l.through};l.titles.length>0&&(f.titles=l.titles,f.label=kC(l,i.workingWeekdays),f.cut=!0);let d=u-s>Aw&&a-u>Aw;return n==="days"&&d&&!c(u)&&(f.seam=!0),f})}function Pw(e){let t=e.calendar?.workingExceptionRuns(e.domain[0],e.domain[1])??[];if(t.length===0)return;let[n]=e.range;return t.map(r=>({x:Math.max(n,e.forward(r.from)),from:r.from,through:r.through,titles:r.titles,label:KG(r)}))}function KG(e){let t=xn(e.from,e.through)+1;return`${e.titles.join(", ")}${bC}+${t}d`}var bC=" \xB7 ";function kC(e,t){let n=0;for(let i=e.from;i<=e.through;i=wt(i,1))t.has(i.getUTCDay())&&n++;let r=e.titles.join(", ");return n>0?`${r}${bC}${n}d`:r}function ZG(e,t,n){let[r,i]=e.range,o=Math.max(r,e.forward(t.from)),s=Math.min(i,e.forward(wt(t.through,1))),a={x:o,width:s-o,from:t.from,through:t.through};return t.titles.length>0&&(a.titles=t.titles,e.calendar&&(a.label=kC(t,e.calendar.workingWeekdays))),(n==="days"||n==="weeks"||t.titles.length>0)&&(a.band=!0),a}function JG(e,t,n,r){let[i,o]=e.domain,s=[i];for(let l=em(i,n);l<o;l=em(l,n))s.push(l);o>i&&s.push(o);let a=s.map(l=>e.forward(l)),c=s.length-1;return s.map((l,u)=>{let f=a[u],d=u%t.labelEvery===0;if(u===c)return{x:f,labelX:void 0,major:d,label:void 0};let p=a[u+1]-f,h=d?Cw(n,l,u,r):void 0,g=u===0||u===c-1;return h!==void 0&&g&&ft(h,so)>p&&(h=void 0),{x:f,labelX:f+p/2,major:d,label:h}})}function Cw(e,t,n,r){switch(e){case"days":return`${t.getUTCMonth()+1}/${t.getUTCDate()}`;case"weeks":{let i=t.toLocaleString(r,{month:"short",timeZone:"UTC"}),o=t.getUTCDate().toString().padStart(2,"0");return`${i} ${o}`}case"months":return t.toLocaleString(r,{month:"short",timeZone:"UTC"});case"quarters":{let i=Math.floor(t.getUTCMonth()/3)+1;return`${ll(r).quarterPrefix}${i} ${t.getUTCFullYear()}`}case"years":return`${t.getUTCFullYear()}`}}var Ow=class{constructor(t,n){I(this,"id");I(this,"anchor");this.id=t,this.anchor=n}place(t,n){let r=pe(this.anchor.properties,"date"),i=ze(r);if(!i)return null;let o=t.scale.forwardWithinDomain(i);if(o===null)return null;let s=mt("anchor",this.anchor.properties,t.styleCtx),a=t.markerRowPlacements.get(this.id),c=a?.centerY??t.timeline.markerRow.y,l={x:o,y:c},u=a?.labelBox??{x:o+6+6,y:c-4,width:0,height:12},f=a?.labelSide??"right";t.entityLeftEdges.set(this.id,o),t.entityRightEdges.set(this.id,o),t.entityMidpoints.set(this.id,l);let d={id:this.id,title:this.anchor.title??this.id,center:l,radius:6,style:s,predecessorPoints:[],cutTopY:t.chartTopY,cutBottomY:t.swimlaneBottomY,bumpedUp:(a?.rowIndex??0)>0,labelBox:u,labelSide:f};return!t.scale.showsNonWorking&&!t.calendar.isWorkingDay(i)&&(d.hiddenDate=_r(i)),d}};function AC(e,t,n){let r=[];for(let[i,o]of e){let s=new Ow(i,o).place(t,n);s&&r.push(s)}return r}function dl(e){let t=0;for(let n of e)t=Math.max(t,IC(n.children)),n.nested.length>0&&(t=Math.max(t,dl(n.nested)));return t}function IC(e){let t=0;for(let n of e)n.kind==="item"?t=Math.max(t,n.box.x+n.box.width):t=Math.max(t,IC(n.children));return t}function $w(e,t,n){let r=[],i=new Map,o=new Map;return[...e.entries()].sort(([c],[l])=>c.localeCompare(l)).forEach(([c,l],u)=>{let f=u+1;i.set(c,f),o.set(c,Le(l.properties,"on")),r.push({number:f,title:l.title??c,description:l.description?.text,style:mt("footnote",l.properties,t.styleCtx)})}),{area:{box:{x:Fn,y:n+Fn,width:t.chartRightX-2*Fn,height:r.length===0?0:Il+r.length*Sl+Fn},entries:r},index:i,hosts:o}}var QG=.8,e4=1;function t4(e){let t=[];return NC(e,t),t}function NC(e,t){for(let n of e)if(n.kind==="item"){let r=n4(n);r>0&&n.box.width>0&&t.push({startX:n.box.x,endX:n.box.x+n.box.width,load:r})}else(n.kind==="parallel"||n.kind==="group")&&NC(n.children,t)}function n4(e){return e.capacity?e.capacity.value:e.size?1:0}function PC(e){if(e.capacityValue<=0||e.warnFraction===null&&e.overFraction===null)return null;let t=t4(e.children);if(t.length===0)return null;let n=new Set;for(let s of t)n.add(s.startX),n.add(s.endX);let r=Array.from(n).sort((s,a)=>s-a);if(r.length<2)return null;let i=[];for(let s=0;s<r.length-1;s++){let a=r[s],c=r[s+1],l=(a+c)/2,u=0;for(let f of t)f.startX<=l&&l<f.endX&&(u+=f.load);i.push({startX:a,endX:c,load:u,classification:r4(u,e.capacityValue,e.warnFraction,e.overFraction)})}let o=[];for(let s of i){let a=o[o.length-1];a&&a.classification===s.classification&&a.endX===s.startX?a.endX=s.endX:o.push({...s})}return{segments:o,capacityValue:e.capacityValue,warnFraction:e.warnFraction,overFraction:e.overFraction}}function r4(e,t,n,r){let i=e/t;return r!==null&&i>=r?"red":n!==null&&i>=n?"yellow":"green"}function CC(e,t){let n=t.get("swimlane"),r=SC(pe(e.properties,"utilization-warn-at"),n?pe(n.properties,"utilization-warn-at"):void 0,QG),i=SC(pe(e.properties,"utilization-over-at"),n?pe(n.properties,"utilization-over-at"):void 0,e4);return{warn:r,over:i}}function SC(e,t,n){let i=s4(e??t);return i.kind==="unset"?n:i.kind==="none"?null:i.value}var i4=/^\d+(?:\.\d+)?%$/,o4=/^\d+\.\d+$/;function s4(e){if(e===void 0)return{kind:"unset"};if(e==="none")return{kind:"none"};if(i4.test(e)){let t=parseFloat(e)/100;return Number.isFinite(t)&&t>0?{kind:"number",value:t}:{kind:"unset"}}if(o4.test(e)){let t=parseFloat(e);return Number.isFinite(t)&&t>0?{kind:"number",value:t}:{kind:"unset"}}return{kind:"unset"}}var OC=10;function a4(e,t,n){let r=pe(e.properties,"capacity"),i=ui(r);if(i===null)return{capacity:null,badgeWidthPx:0};let o=yl(i),s=xl(t.capacityIcon,n),a=oo(o,s,OC);return{capacity:{value:i,text:o,icon:s},badgeWidthPx:a}}var l4=10,c4=38,u4=8;function f4(e,t,n){let r=e.title??e.name??"";if(!r)return 0;let i=pe(e.properties,"owner");return Xl(0,r,i??void 0,t,n).rightX}function d4(e,t){if(!e.name)return[];let n=[];for(let[r,i]of t.footnoteHosts.entries())if(i.includes(e.name)){let o=t.footnoteIndex.get(r);o!==void 0&&n.push(o)}return n.sort((r,i)=>r-i),n}function p4(e,t,n,r){for(let i of e.content)if(i.$type!=="DescriptionDirective")return n.scale.startX(r.resolveChildStart(i,t,t,n))}var pl=class{constructor(t,n){I(this,"input");I(this,"deps");this.input=t,this.deps=n}get id(){return this.input.lane.name??""}place(t,n){let{lane:r,bandIndex:i}=this.input,{deps:o}=this,s=mt("swimlane",r.properties,n.styleCtx),a=t.x,c=n.bandScale.step(),l=n.currentFlowKey;n.currentFlowKey=`lane:${r.name??i}`;let{capacity:u,badgeWidthPx:f}=a4(r,s,n.symbols),d=d4(r,n),p=d.length>0?o.estimateTextWidth(d.join(","),OC):0,h=f4(r,f,p),g=p4(r,a,n,o),T=!r.title||g===void 0||g>=h+u4,x=t.y+(T?l4:c4),y=new cl({laneLeftX:a,originY:x,minRowHeight:c,slackCorridors:n.slackCorridors}),E=a,w=[];for(let S of r.content){if(S.$type==="DescriptionDirective")continue;if(!Mt(S)){let H=o.resolveChildStart(S,E,a,n),{rowIndex:J,y:V}=y.placeBlock(),ie=o.newCursor(H,V),le=o.sequenceOne(S,ie,n);w.push(le);let xe=le.box.x+le.box.width,ve=Math.max(c,ie.height);y.commitBlock({rowIndex:J,placed:le,blockHeight:ve,blockEnd:xe,spillReservation:lf(le)}),E=Math.max(E,xe);continue}let F=S.properties,X=o.resolveChildStart(S,E,a,n),R=fi(F,n.sizes,n.cal),C=n.scale.startX(X),N=Math.max(Rn,Jo(n,C,R)),j=C+N,q=S.name??"",z=o.predictItemBarExtraHeight(S,C,n),ne=c+z,{rowIndex:oe,y:he}=y.placeItem({childId:q,desiredStart:C,desiredEnd:j,predictedHeight:ne}),re=o.newCursor(X,he),ae=o.sequenceItem(S,re,n);w.push(ae);let k=ae.box.x+ae.box.width+an;E=Math.max(E,k);let O=null;(ae.textSpills||ae.chipsOutside||ae.dotSpills||ae.iconSpills||ae.footnoteSpills)&&(O=Math.max(ae.decorationsRightX,ae.chipsOutside?ae.chipsRightX:0)+6),y.commitItem({rowIndex:oe,placed:ae,logicalEnd:k,spillReservation:O,rowHeight:Math.max(ne,c+(ae.box.height-n.bandScale.bandwidth()))})}let b=x-t.y,L=Math.max(c+32,b+y.usedHeight()+16),P=Math.max(y.usedRightX(),h),$={x:0,y:t.y,width:n.chartRightX,height:L},G=pe(r.properties,"owner"),Y;if(G){let S=n.teams.get(G),F=n.persons.get(G);Y=S?.title??F?.title??G}let D=u?(()=>{let{warn:S,over:F}=CC(r,n.styleCtx.defaults);return PC({children:w,capacityValue:u.value,warnFraction:S,overFraction:F})})():null;return n.currentFlowKey=l,{positioned:{id:r.name,title:r.title??r.name??"",box:$,bandIndex:i,children:w,nested:[],style:s,owner:Y,footnoteIndicators:d,capacity:u,utilization:D},usedHeight:L,usedRightX:P}}};var h4=18,m4=14,g4=14,y4=16,x4=32;function Lw(e,t,n,r){let i=n+h4,o=[],s=!0;for(let a of e){s||(i+=y4),s=!1;let c=a.content.roadmap?.title??a.sourcePath,l=i+m4,u={cal:t.cal,styleCtx:{theme:t.styleCtx.theme,styles:a.config.styles,defaults:a.config.defaults,labels:a.content.labels},sizes:is(a.content.sizes,t.cal),labels:a.content.labels,teams:a.content.teams,persons:a.content.persons,symbols:a.config.symbols,footnoteIndex:new Map,footnoteHosts:new Map,timeline:t.timeline,scale:t.scale,calendar:t.calendar,bandScale:t.bandScale,entityLeftEdges:new Map,entityRightEdges:new Map,entityMidpoints:new Map,placedItems:new Map,itemFlowKey:new Map,currentFlowKey:"",slackCorridors:[],markerRowPlacements:new Map,chartTopY:l,chartBottomY:l,swimlaneBottomY:l,chartRightX:t.chartRightX,nextParallelId:0,nextGroupId:0,...t.waves?{waves:t.waves}:{}};t.waves&&jh(t.waves,u.entityLeftEdges,u.entityRightEdges);let f=[],d=l,p=0;for(let y of a.content.swimlanes.values()){u.nextParallelId=0,u.nextGroupId=0;let{positioned:E,usedHeight:w}=new pl({lane:y,bandIndex:p},r).place({x:u.timeline.originX,y:d},u);f.push(E),d+=w,p++}let h=d,g=Math.max(t.bandScale.bandwidth(),h-i+g4),T={x:0,y:i,width:0,height:g},x={sourcePath:a.sourcePath,label:c,box:T,nestedSwimlanes:f,style:mt("swimlane",[],t.styleCtx)};Dw(x,t.chartRightX),o.push(x),i+=g}return{regions:o,endY:i}}function Dw(e,t){let n=e.box.x,{chromeRightX:r}=Gl(n,e.label,e.sourcePath),i=dl(e.nestedSwimlanes),o=Math.max(r,i)+x4,s=Math.min(t-n,o-n);e.box.width=s;for(let a of e.nestedSwimlanes)a.box.width=s}function rm(e,t){let n=[];for(let r of e){let i=t.placedItems.get(r),o=i?i.box.x+i.box.width:t.entityRightEdges.get(r);if(o===void 0)continue;let s=i?qP(i,t.bandScale.bandwidth()):t.entityMidpoints.get(r)?.y??0;if(!i&&t.waves?.plan.index.has(r)){n.push({ref:r,x:o,y:s,flowKey:`wave:${r}`,wave:r});continue}let a=t.itemFlowKey.get(r)??`marker:${r}`;n.push({ref:r,x:o,y:s,flowKey:a})}return n}function im(e){let t=new Map;for(let n of e){let r=t.get(n.flowKey);(!r||n.x>r.x)&&t.set(n.flowKey,n)}return Array.from(t.values())}function Fw(e){let t=null;for(let n of e)n.wave===void 0&&(!t||n.x>t.x)&&(t=n);return t}function v4(e,t){let n;for(let r of e)r.wave===void 0||r.x-t<Yt||(!n||r.x>n.x)&&(n=r);return n?.wave}function $C(e,t,n,r,i,o,s,a){let c=r.length*i*.58*(o?1.05:1),l=e+n+6,u=e-n-6-c,f=l+c<=a,d=u>=s,p=f?"right":d?"left":"right";return{box:{x:p==="right"?l:u,y:t-4,width:c,height:12},side:p}}var Mw=class{constructor(t,n){I(this,"id");I(this,"milestone");this.id=t,this.milestone=n}place(t){let n=this.milestone,r=mt("milestone",n.properties,t.styleCtx),i=pe(n.properties,"date"),o=Le(n.properties,"after"),s=ze(i),a=t.timeline.markerRow.y,c=6,l=n.title??this.id,u=null,f=a,d=null,p="right",h=!1,g,T=!1,x;if(s){let w=t.scale.forwardWithinDomain(s);if(w===null)return null;u=w,h=!0;let b=t.markerRowPlacements.get(this.id);b&&(f=b.centerY,d=b.labelBox,p=b.labelSide);let L=rm(o,t),P=im(L),$=Fw(P);$&&$.x>w&&(T=!0,g=[{x:$.x,y:$.y>0?$.y:f}]),x=v4(P,w),x!==void 0&&(T=!0)}else if(o.length>0){let w=rm(o,t),b=im(w);b.sort((G,Y)=>Y.x-G.x);let L=b[0]?.x??t.timeline.originX;u=L,h=!1;let P=$C(u,a,c,l,10,!0,t.timeline.box.x,t.chartRightX);f=a,d=P.box,p=P.side,t.markerRowPlacements.set(this.id,{rowIndex:0,centerY:f,labelBox:d,labelSide:p});let $=[];for(let G=1;G<b.length;G++){let Y=b[G];Y.x<L&&Y.y>0&&Y.wave===void 0&&$.push({x:Y.x,y:Y.y})}$.length>0&&(g=$)}if(u===null)return null;if(!d){let w=$C(u,f,c,l,10,!0,t.timeline.box.x,t.chartRightX);d=w.box,p=w.side}let y={x:u,y:f};t.entityLeftEdges.set(this.id,y.x),t.entityRightEdges.set(this.id,y.x),t.entityMidpoints.set(this.id,y);let E={id:this.id,title:l,center:y,radius:c,fixed:h,slackArrows:g,isOverrun:T,style:r,cutTopY:t.chartTopY,cutBottomY:t.swimlaneBottomY,labelBox:d,labelSide:p};return t.waves&&!T&&hC(t.waves,y.x)&&(E.onWaveBoundary=!0),x!==void 0&&s&&(E.overrunByWave=x,E.overrunDate=_r(s)),s&&!t.scale.showsNonWorking&&!t.calendar.isWorkingDay(s)&&(E.hiddenDate=_r(s)),E}};function LC(e,t){let n=[];for(let[r,i]of e){let o=new Mw(r,i).place(t);o&&n.push(o)}return n}function sm(e){let t=e.trim().replace(/^#/,"");if(t.length===3&&(t=t.split("").map(n=>n+n).join("")),!/^[0-9a-fA-F]{6}$/.test(t))throw new Error(`Unsupported hex colour: ${e}`);return[Number.parseInt(t.slice(0,2),16),Number.parseInt(t.slice(2,4),16),Number.parseInt(t.slice(4,6),16)]}function DC(e){let[t,n,r]=sm(e).map(i=>{let o=i/255;return o<=.03928?o/12.92:((o+.055)/1.055)**2.4});return .2126*t+.7152*n+.0722*r}function am(e,t){let n=DC(e),r=DC(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}var T4=4.5;function BC(e,t,n,r,i){if(!e.frozen||!e.solve)throw new Error("buildWaves: the wave barrier has not settled");let o=t.timeline.waveStrip;if(!o)throw new Error("buildWaves: the timeline has no wave strip");let s=aC(e.plan,e.solve,e.pass,e.origin,e.floors,Yt),a=s.every(y=>y.memberCount===0),c=t.timeline.box.x,l=c+t.timeline.box.width,u=o.y+o.height/2,f=[],d=0,p=s.map((y,E)=>{let w=e.plan.waves[E],b=w.title??y.id,L=y.memberCount===0,P=Au(y.start,t),$=mC(y.start,y.end,t),G=L?void 0:d++,Y=w4(y.id,t),D=E4(w.properties,G,t),S=Math.max(y.start,c),F=Math.min(y.end,l),X=Math.max(0,F-S),R,C=!1;if(!L){if(Y.length>0){let he=Y.length*An;R=MC(b,y.id,E+1,X,he),C=R!==void 0}R??(R=MC(b,y.id,E+1,X,0))}let N=(S+F)/2,j;if(L&&(N=y.start,!a)){let he=f.filter(re=>Math.abs(re-y.start)<Yt).length;f.push(y.start),N=y.start+he*ng,j={x:N,y:u}}let q=L?Bw(P):`${Bw(P)} \u2013 ${Bw($)}`,z=[b,q];L?z.push(n.waveNoItems):y.heldBy!==void 0&&z.push(`${n.waveHeldBy} ${y.heldBy}`);let ne,oe=s[E-1];if(!a&&oe!==void 0&&y.floorRef!==void 0&&y.start-oe.end>Yt){let he=Math.max(oe.end,c),re=Math.min(y.start,l);ft(y.floorRef,nr)+2*br<=re-he&&(ne={text:y.floorRef,x:(he+re)/2})}return{id:y.id,title:b,index:E,...G!==void 0?{visibleOrdinal:G}:{},startX:y.start,endX:y.end,startDate:P,endDate:$,memberCount:y.memberCount,empty:L,...y.heldBy!==void 0?{heldBy:y.heldBy}:{},...y.floorRef!==void 0?{floorRef:y.floorRef}:{},columnBox:{x:y.start,y:t.chartTopY,width:y.end-y.start,height:t.swimlaneBottomY-t.chartTopY},strip:{box:{x:y.start,y:o.y,width:y.end-y.start,height:o.height},...R?{label:R.label}:{},labelKind:R?.kind??"none",labelX:N,tooltip:z.join(" \xB7 "),footnotesShown:C,...j?{marker:j}:{},...ne?{gapLabel:ne}:{}},style:D,footnoteIndicators:Y}}),h=a?[]:k4(p,e.origin,o.y,t),g=Ww(r),T=i.map(y=>Ww(y.nestedSwimlanes));for(let y of[...g,...T.flat()])y.waveTooltip=n.waveBackgroundItem;let x={waves:p,boundaries:h,crossings:FC(g,h),regionCrossings:T.map(y=>FC(y,h)),hasBackground:g.length+T.flat().length>0};return a&&(x.placeholder=XP(n,p.map(y=>y.title))),x}function MC(e,t,n,r,i){let o=a=>ft(a,nr)*1.05+i+2*br<=r;if(o(e))return{kind:"title",label:e};if(t!==e&&o(t))return{kind:"id",label:t};for(let a=e.length-1;a>=3;a--){let c=e.slice(0,a).trimEnd();if(c.length<3)break;let l=`${c}\u2026`;if(o(l))return{kind:"ellipsis",label:l}}let s=`#${n}`;if(o(s))return{kind:"ordinal",label:s}}function w4(e,t){let n=[];for(let[r,i]of t.footnoteHosts.entries()){if(!i.includes(e))continue;let o=t.footnoteIndex.get(r);o!==void 0&&n.push(o)}return n.sort((r,i)=>r-i)}function E4(e,t,n){let r=n.styleCtx.theme,i=new Map,o=pe(e,"style"),s=o?n.styleCtx.styles.get(o):void 0;for(let d of s?.properties??[]){let p=d.key.endsWith(":")?d.key.slice(0,-1):d.key;i.set(p,d.value)}let a=d=>{let p=i.get(d);if(p===void 0)return;let h=ni(p,r);return h==="none"?void 0:h},c=a("bg"),l=t!==void 0&&t%2===1?r.wave.stripFillAlt:r.wave.stripFill,u=c?_4(l,c,Cl)??l:l,f=i.get("border");return{...c?{tint:c}:{},stripFill:l,text:a("text")??b4(r.wave,u),boundary:a("fg")??r.wave.boundary,boundaryDash:f==="dashed"?"4 2":f==="dotted"?"1 2":null}}var lm=/^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;function _4(e,t,n){if(!lm.test(e)||!lm.test(t))return;let r=sm(e),i=sm(t);return`#${r.map((o,s)=>Math.round(o*(1-n)+i[s]*n).toString(16).padStart(2,"0")).join("")}`}function b4(e,t){let n=e.labelText;return!lm.test(n)||!lm.test(t)||am(n,t)>=T4?n:am(e.hatch,t)>=am(e.hatchOnDark,t)?e.hatch:e.hatchOnDark}function k4(e,t,n,r){let i=[];for(let a of e)a.empty||(i.push({x:a.startX,wave:a,opening:!0}),i.push({x:a.endX,wave:a,opening:!1}));i.sort((a,c)=>a.x-c.x);let o=[],s=0;for(;s<i.length;){let a=s;for(;a<i.length&&i[a].x-i[s].x<Yt;)a++;let c=i.slice(s,a);s=a;let l=c[0].x;if(Math.abs(l-t)<Yt)continue;let u=(c.find(f=>f.opening)??c[0]).wave;o.push({x:l,topY:n,bottomY:r.swimlaneBottomY,stroke:u.style.boundary,dash:u.style.boundaryDash})}return o}function Ww(e){let t=[],n=r=>{for(let i of r)i.kind==="item"?i.waveRole==="background"&&t.push(i):n(i.children)};for(let r of e)n(r.children),t.push(...Ww(r.nested));return t}function FC(e,t){let n=[];for(let r of e){let i=r.box.x,o=r.box.x+r.box.width;for(let s of t)i<s.x&&s.x<o&&n.push({x:s.x,topY:r.box.y,bottomY:r.box.y+r.box.height,stroke:s.stroke})}return n}var R4="\u2070\xB9\xB2\xB3\u2074\u2075\u2076\u2077\u2078\u2079";function A4(e){return String(e).replace(/[0-9]/g,t=>R4[Number(t)])}function WC(e,t,n,r){let{waves:i}=e,o=i.some(w=>!w.empty&&w.strip.labelKind!=="title"),s=i.some(w=>w.empty),a=i.some(w=>w.footnoteIndicators.length>0&&!w.strip.footnotesShown);if(!e.hasBackground&&!o&&!s&&!a)return;let c=nr,l=w=>ft(w,c),u=t.timeline.originX,f=Math.max(u,t.chartRightX-ln),d=0,p=u,h=!1,g=0,T=w=>r+w*Ol+ef,x=w=>{h&&p+Qu+w>f&&(d++,p=u,h=!1);let b=h?p+Qu:p;return p=b+w,h=!0,g=Math.max(g,p-u),b},y=[],E=(w,b)=>{let L=Zu+rg,P=x(L+l(b)),$=T(d);y.push({kind:w,text:b,swatch:{x:P,y:$-ef+(Ol-Ju)/2,width:Zu,height:Ju},runs:[{text:b,x:P+L,y:$}]})};if(e.hasBackground&&E("background",n.waveLegendBackground),e.boundaries.length>0&&E("boundary",n.waveLegendBoundary),o||s||a){let w=i.map($=>{let G=`#${$.index+1} ${$.title}`;return $.footnoteIndicators.length>0&&!$.strip.footnotesShown&&(G+=` ${$.footnoteIndicators.map(A4).join(",")}`),$.empty&&(G+=` (${n.waveNoItems})`),G}),b=" \xB7 ",L=`${n.waveLegendPrefix} ${w[0]}`,P=[{text:L,x:x(l(L)),y:T(d)}];for(let $ of w.slice(1)){let G=P[P.length-1];p+l(b+$)<=f?(G.text+=b+$,p+=l(b+$),g=Math.max(g,p-u)):(d++,p=u,h=!1,P.push({text:$,x:x(l($)),y:T(d)}))}y.push({kind:"waves",text:`${n.waveLegendPrefix} ${w.join(b)}`,runs:P})}return{box:{x:u,y:r,width:g,height:(d+1)*Ol},entries:y}}function Bw(e){return e.toISOString().slice(0,10)}var I4=4;function Uw(e,t){t>e.chartRightX&&(e.chartRightX=t)}function qC(e){return`nonworking:${e.from.toISOString().slice(0,10)}`}function VC(e){return`working:${e.from.toISOString().slice(0,10)}`}function YC(e,t,n){return{id:e,centerX:t,radius:0,title:n,fontSize:10,bold:!1}}function XC(e){let t=[];for(let n of e??[])n.label!==void 0&&t.push(YC(qC(n),n.x,n.label));return t}function GC(e){return(e??[]).map(t=>YC(VC(t),t.x,t.label))}function jC(e,t,n,r){let i=n;for(let o of e){let s=KC(o,r),a=o.centerX+o.radius+6+s,c=o.centerX-o.radius-6-s;a>n&&c<t&&(i=Math.max(i,a+ln))}return i}function HC(e,t,n){let r=Nw(t,e.ticks,n,e.minorGrid);r&&(e.nonWorkingDisplay=t.showsNonWorking?"show":"hide",e.nonWorking=r);let i=Pw(t);i&&(e.workingExceptions=i)}var um=class{place(t,n,r,i,o){let s=r.theme??"light",a=Tw[s],c=UP(r.locale,N4(t)),{config:l,working:u}=VE(t,n),f=EC(t,n.config.scale),d=is(n.content.sizes,l),p={theme:a,styles:n.config.styles,defaults:n.config.defaults,labels:n.content.labels},{startDate:h,endDate:g}=o.computeDateWindow(t,{cal:l,sizes:d,calendar:u},n,r.today,f,i),T=mt("roadmap",t.roadmapDecl?.properties??[],p),x=T.headerPosition==="beside",y=_l[T.headerHeight]??_l.md,E=y>0&&T.timelinePosition!=="bottom",w=y>0&&(T.timelinePosition==="bottom"||T.timelinePosition==="both"),b=Xh(r.nonWorking)?r.nonWorking:T.nonWorking,L=b==="show"&&u.hasNonWorkingDays,P=t.roadmapDecl?.title??t.roadmapDecl?.name??"",$=pe(t.roadmapDecl?.properties??[],"author"),G=o.sizeBesideHeader(P,$),Y=x?{x:0,y:0,width:G.boxWidth,height:0}:{x:0,y:0,width:0,height:Hu},D=x?G.boxWidth:0,S=x?8:Hu+8,F=Math.max(1,u.workingIndexOf(h,g)),X=L?Math.max(1,xn(h,g)):F,R=KE({naturalPixelsPerDay:f.pixelsPerUnit/u.daysPerUnit(f.unit),dayCount:X,chromeWidth:D+2*ln,maxWidth:r.width}),C=X*R,N=D+ln,j=C,z=r.today!==void 0&&r.today>=h&&r.today<=g?di:0,ne=E?y:0,oe=i?Ym:0,he=new Su({domain:[h,g],range:[N,N+C],calendar:u,nonWorking:b}),re=[...XC(Nw(he,[],f.unit,!1)),...GC(Pw(he))],ae=n.content.anchors.size+n.content.milestones.size>0||re.length>0,k=N+j+ln,O=[];for(let[K,de]of n.content.anchors){let st=ze(pe(de.properties,"date"));if(!st)continue;let Mn=he.forwardWithinDomain(st);Mn!==null&&O.push({id:K,centerX:Mn,radius:6,title:de.title??K,fontSize:10,bold:!1,date:st,isMilestone:!1})}for(let[K,de]of n.content.milestones){let st=ze(pe(de.properties,"date"));if(!st)continue;let Mn=he.forwardWithinDomain(st);Mn!==null&&O.push({id:K,centerX:Mn,radius:6,title:de.title??K,fontSize:10,bold:!0,date:st,isMilestone:!0})}let B=[...O,...re],H=zC(B,D,jC(B,D,k,o.estimateTextWidth),o.estimateTextWidth),J=ae?Math.max(1,H.rowCount):0,V=J*26,ie=z+ne+oe+V,le=ie+8,xe=x?G.cardHeight+I4:0,ve=Math.max(S,xe-ie),ge=ve+z,Ye=ge+ne,Fe=Ye+oe,ot=Fe+V,sn=Sw(he,f,u,c),ut={box:{x:N,y:ve,width:C,height:0},ticks:sn,pixelsPerDay:R,originX:N,startDate:h,endDate:g,labelStyle:mt("roadmap",[],p),pillRowHeight:z,tickPanelY:ge,tickPanelHeight:ne,markerRow:{y:Fe+13,height:V,collisionY:Fe-8},minorGrid:T.minorGrid,...i?{waveStrip:{y:Ye,height:oe}}:{}};HC(ut,he,f.unit);let Tr=new Map;for(let[K,de]of H.placements){let st=Fe+13+de.rowIndex*26;Tr.set(K,{rowIndex:de.rowIndex,centerY:st,labelBox:{...de.labelBox,y:st-4},labelSide:de.labelSide})}let Q={cal:l,styleCtx:p,sizes:d,labels:n.content.labels,teams:n.content.teams,persons:n.content.persons,symbols:n.config.symbols,footnoteIndex:new Map,footnoteHosts:new Map,timeline:ut,scale:he,calendar:u,bandScale:vC(),entityLeftEdges:new Map,entityRightEdges:new Map,entityMidpoints:new Map,placedItems:new Map,itemFlowKey:new Map,currentFlowKey:"",slackCorridors:[],markerRowPlacements:Tr,chartTopY:ve+le,chartBottomY:0,swimlaneBottomY:0,chartRightX:k,nextParallelId:0,nextGroupId:0,...i?{waves:lC(i,he,N)}:{}};for(let K of O){let de=Tr.get(K.id);de&&(Q.entityLeftEdges.set(K.id,K.centerX),Q.entityRightEdges.set(K.id,K.centerX),Q.entityMidpoints.set(K.id,{x:K.centerX,y:de.centerY}))}let er=$w(n.content.footnotes,Q,0);Q.footnoteIndex=er.index,Q.footnoteHosts=er.hosts;let si=new Map(Q.entityLeftEdges),ai=new Map(Q.entityRightEdges),li=new Map(Q.entityMidpoints),no=()=>{Q.entityLeftEdges=new Map(si),Q.entityRightEdges=new Map(ai),Q.entityMidpoints=new Map(li),Q.placedItems=new Map,Q.itemFlowKey=new Map,Q.currentFlowKey="",Q.waves&&jh(Q.waves,Q.entityLeftEdges,Q.entityRightEdges)},Dn=[...n.content.swimlanes.values()],_=mt("swimlane",[],p),W=ZE[_.spacing]??0,Z=()=>{Q.nextParallelId=0,Q.nextGroupId=0;let K=[],de=Q.chartTopY,st=0,Mn=Q.timeline.originX;for(let I$ of Dn){st>0&&(de+=W);let{positioned:S$,usedHeight:N$,usedRightX:_E}=new pl({lane:I$,bandIndex:st},o).place({x:Q.timeline.originX,y:de},Q);K.push(S$),de+=N$,_E>Mn&&(Mn=_E),st++}return{swimlanes:K,nextY:de,maxRightX:Mn}},se=n.content.isolatedRegions,Te,Be,Re=Q.waves;if(Re){let K,de=Gh(Re.ids.length,Re.origin,Re.floors,(st,Mn)=>(cC(Re,st,Mn),no(),K=Z(),se.length>0&&Lw(se,Q,K.nextY+8,o),Re.pass),Yt);uC(Re,de),Be={passes:de.passes,capped:de.capped},Te=K}else Te=Z();let _e=Te.swimlanes,$e=Te.nextY,Ge=S4(n.content.milestones,Q);Ge.length>0&&(no(),Q.slackCorridors=Ge,Te=Z(),_e=Te.swimlanes,$e=Te.nextY),Uw(Q,Te.maxRightX+ln);let Ce=[];if(se.length>0){let K=Lw(se,Q,$e+8,o);Ce=K.regions,$e=K.endY}Q.chartBottomY=$e,Q.swimlaneBottomY=$e,ut.box.height=Q.chartBottomY-ut.box.y;let vt=LC(n.content.milestones,Q),Tt=dl(_e);for(let K of Ce)Tt=Math.max(Tt,dl(K.nestedSwimlanes));for(let K of O)Tt=Math.max(Tt,K.centerX+K.radius);for(let K of vt)Tt=Math.max(Tt,K.center.x+K.radius);let wr=u.daysPerUnit(f.unit),Ut=Q.scale.showsNonWorking?Q.scale.indexAtX(Tt):(Tt-N)/R,Xt=Ut>0?tm(h,Ut,f.unit,wr,u):0;if(Xt>F){let K=u.dateAtWorkingIndex(h,Xt),de=Q.scale.showsNonWorking?xn(h,K)*R:Xt*R,st=new Su({domain:[h,K],range:[N,N+de],calendar:u,nonWorking:b});Q.scale=st,ut.endDate=K,ut.box.width=de,ut.ticks=Sw(st,f,u,c),HC(ut,st,f.unit),Uw(Q,N+de+ln)}let Er=O.map(K=>({id:K.id,centerX:K.centerX,radius:K.radius,title:K.title,fontSize:K.fontSize,bold:K.bold}));for(let K of vt)K.fixed||Er.push({id:K.id??"",centerX:K.center.x,radius:K.radius,title:K.title,fontSize:10,bold:!0});let ci=[...XC(ut.nonWorking),...GC(ut.workingExceptions)];Er.push(...ci),Uw(Q,jC(Er,D,Q.chartRightX,o.estimateTextWidth));for(let K of _e)K.box.width=Q.chartRightX;for(let K of Ce)Dw(K,Q.chartRightX);let ml=zC(Er,D,Q.chartRightX,o.estimateTextWidth);Q.markerRowPlacements.clear();for(let[K,de]of ml.placements){let st=Fe+13+de.rowIndex*26;Q.markerRowPlacements.set(K,{rowIndex:de.rowIndex,centerY:st,labelBox:{...de.labelBox,y:st-4},labelSide:de.labelSide})}for(let K of vt){let de=Q.markerRowPlacements.get(K.id??"");de&&(K.center={x:K.center.x,y:de.centerY},K.labelBox=de.labelBox,K.labelSide=de.labelSide)}for(let K of ut.nonWorking??[]){if(K.label===void 0)continue;let de=Q.markerRowPlacements.get(qC(K));de&&(K.labelBox=de.labelBox,K.labelSide=de.labelSide)}for(let K of ut.workingExceptions??[]){let de=Q.markerRowPlacements.get(VC(K));de&&(K.labelBox=de.labelBox,K.labelSide=de.labelSide)}for(let K of O){let de=Q.markerRowPlacements.get(K.id);de&&Q.entityMidpoints.set(K.id,{x:K.centerX,y:de.centerY})}for(let K of vt)K.fixed||Q.entityMidpoints.set(K.id??"",{x:K.center.x,y:K.center.y});let je=ae||ci.length>0?Math.max(1,ml.rowCount):0;if(je>J){let K=(je-J)*26;Q.timeline.markerRow.height=je*26,Q.timeline.box.height+=K,Q.chartTopY+=K,Q.chartBottomY+=K,Q.swimlaneBottomY+=K;for(let de of _e)Uh(de,K);for(let de of Ce)VP(de,K);for(let de of vt)if(de.cutTopY=Q.chartTopY,de.cutBottomY=Q.swimlaneBottomY,de.slackArrows)for(let st of de.slackArrows)st.y+=K}w&&(Q.timeline.bottomTickPanelY=Q.chartBottomY+8,Q.timeline.bottomTickPanelHeight=y,Q.chartBottomY+=8+y);let Kt=ll(c),He=Q.waves?BC(Q.waves,Q,Kt,_e,Ce):void 0;He&&(He.regionCrossings.forEach((K,de)=>{K.length>0&&(Ce[de].waveCrossings=K)}),He.placeholder!==void 0&&ut.waveStrip&&(ut.waveStrip.placeholder=He.placeholder));let ro=new Set(vt.map(K=>K.center.x)),io=AC(n.content.anchors,Q,ro),Lu=o.collectItems(Dn),E$=o.buildDependencies(Lu,_e,Ce,Q),_$=o.buildNowline(r.today,Q,c),Du=He?WC(He,Q,Kt,Q.chartBottomY+Ku):void 0;Du&&(Q.chartBottomY+=Ku+Du.box.height);let ns=$w(n.content.footnotes,Q,Q.chartBottomY);Q.footnoteIndex=ns.index,Q.footnoteHosts=ns.hosts,Y.height=Y.height||Q.chartBottomY,x||(Y.width=Q.chartRightX);let b$=x?{x:6,y:ot-G.cardHeight,width:G.cardWidth,height:G.cardHeight}:{x:0,y:0,width:Q.chartRightX,height:Hu},k$=ns.area.entries.length>0?ns.area.box.y+ns.area.box.height:Q.chartBottomY,km={x:Q.chartRightX-ln-Hm,y:k$+ln,width:Hm,height:r_},R$=km.y+km.height+ln,A$={box:Y,position:T.headerPosition,title:P,author:$,titleLines:G.titleLines,authorLines:G.authorLines,cardBox:b$,logo:void 0,style:T,attributionBox:km};return{width:Q.chartRightX,height:R$,theme:s,palette:a,backgroundColor:a.surface.page,header:A$,timeline:ut,nowline:_$,swimlanes:_e,anchors:io,milestones:vt,edges:E$,footnotes:ns.area,includes:Ce,chartBox:{x:D,y:Q.chartTopY,width:Q.chartRightX-D,height:Q.chartBottomY-Q.chartTopY},...Be?{waveSolve:Be}:{},...He?{waves:He.waves}:{},...He&&He.boundaries.length>0?{waveBoundaries:He.boundaries}:{},...He&&He.crossings.length>0?{waveCrossings:He.crossings}:{},...Du?{waveLegend:Du}:{}}}};function S4(e,t){let n=[];for(let[r,i]of e){let o=pe(i.properties,"date"),s=Le(i.properties,"after"),a=ze(o),c=rm(s,t),l=im(c);if(a){let f=t.scale.forwardWithinDomain(a);if(f===null)continue;let d=Fw(l);d&&d.x>f&&d.y>0&&n.push({xStart:Math.min(d.x,f),xEnd:Math.max(d.x,f),y:d.y,slackPredId:d.ref,milestoneId:r});continue}if(l.length===0)continue;l.sort((f,d)=>d.x-f.x);let u=l[0].x;for(let f=1;f<l.length;f++){let d=l[f];d.x<u&&d.y>0&&d.wave===void 0&&n.push({xStart:d.x,xEnd:u,y:d.y,slackPredId:d.ref,milestoneId:r})}}return n}function KC(e,t){return t(e.title,e.fontSize)*(e.bold?1.05:1)}function zC(e,t,n,r){let i=[...e].sort((a,c)=>a.centerX-c.centerX),o=new Map,s=[];for(let a of i){let c=KC(a,r),l=a.centerX+a.radius+6,u=a.centerX-a.radius-6-c,f=l+c<=n,d=u>=t,p=a.centerX-a.radius,h=a.centerX+a.radius,g=P=>P==="right"?l:u,T=P=>P==="right"?f:d,x=(P,$)=>{let G=Math.min(p,P),Y=Math.max(h,P+c);return s[$].some(D=>D.left<Y&&D.right>G)},y=-1,E="right",w=l;e:for(let P=s.length-1;P>=0;P--)for(let $ of["right","left"]){if(!T($))continue;let G=g($);if(!x(G,P)){y=P,E=$,w=G;break e}}if(y===-1){for(let[P,$]of o)o.set(P,{...$,rowIndex:$.rowIndex+1});s=[[],...s],y=0,E=f?"right":"left",w=g(E)}let b=Math.min(p,w),L=Math.max(h,w+c);s[y].push({left:b,right:L}),o.set(a.id,{rowIndex:y,labelBox:{x:w,y:0,width:c,height:12},labelSide:E})}return{placements:o,rowCount:s.length}}function N4(e){return e.directive?.properties.find(n=>P4(n.key)==="locale")?.value}function P4(e){return e.endsWith(":")?e.slice(0,-1):e}function C4(e){switch(e){case"done":case"completed":return"done";case"in-progress":case"active":return"in-progress";case"at-risk":case"blocked":case"planned":return e;case void 0:return"planned";default:return"neutral"}}function O4(e){if(!e)return 0;let t=/^(\d{1,3})%$/.exec(e);return t?Math.max(0,Math.min(100,parseInt(t[1],10)))/100:0}function $4(e,t){if(e)return/^\d+(?:\.\d+)?[dwmqy]$/.test(e)||/^\d+%$/.test(e)?e:t.sizes.get(e)?.effortLiteral??e}function L4(e,t){if(e)return t.teams.get(e)?.title??t.persons.get(e)?.title??e}function D4(e){if(!e)return{icon:"none"};let t=e.toLowerCase();return t.includes("linear.app")?{icon:"linear",href:e}:t.includes("github.com")?{icon:"github",href:e}:t.includes("atlassian.net")||t.includes("jira.")?{icon:"jira",href:e}:{icon:"generic",href:e}}function fm(e,t,n,r,i){let o=rC(e,t),s=e.name??e.title??"",a=o.padding==="none"?"xs":o.padding,c=JE[a],l=Math.max(20,Math.round(s.length*5.5+c*2));return i!==void 0&&(l=Math.min(l,i)),{text:s,style:o,box:{x:n,y:r,width:l,height:ho}}}function QC(e,t){let n=SE(e,t.sizes,t.cal),r=IE(pe(e,"remaining"),t.sizes,t.cal),i=pe(e,"status"),o=C4(i),s=O4(i);s===0&&o==="done"&&(s=1);let a=/^(\d{1,3})%$/.exec(pe(e,"remaining")??"");return s===0&&o==="in-progress"&&a&&(s=1-Math.max(0,Math.min(100,parseInt(a[1],10)))/100),s===0&&o==="in-progress"&&r>0&&n>0&&(s=Math.max(0,Math.min(1,1-r/n))),{status:o,progress:s}}function eO(e,t,n,r,i,o,s){let a=pe(e,"duration"),c=!!a&&/^\d+(?:\.\d+)?[dwmqy]$/.test(a),l=r?r.title??r.name:"",u=c?a:l||void 0,f=pe(e,"remaining"),d=$4(f,t),p=L4(n??pe(e,"owner"),t),h=()=>[u,p].filter(Boolean).join(" "),g;if(i==="in-progress"&&d){let w=h();g=w?`${w} \u2014 ${d} remaining`:`${d} remaining`}else if(i==="in-progress"&&o>0&&o<1){let w=Math.round((1-o)*100),b=h();g=b?`${b} \u2014 ${w}% remaining`:`${w}% remaining`}else(p||u)&&(g=h()||void 0);let T=pe(e,"capacity"),x=ui(T),y=null,E=0;if(x!==null){let w=yl(x),b=xl(s,t.symbols);y={value:x,text:w,icon:b};let L=11;E=(g?ft(" ",L):0)+oo(w,b,L)}return{metaText:g,ownerDisplay:p,capacity:y,capacityTrailingWidth:E}}function tO(e,t){let n=new Set;if(e){for(let[r,i]of t.footnoteHosts.entries())if(i.includes(e)){let o=t.footnoteIndex.get(r);o!==void 0&&n.add(o)}}return[...n].sort((r,i)=>r-i)}function nO(e,t,n){return Bl({barWidth:e,footnoteLabels:t.map(String),hasBeforeGlyph:$n(n)!==void 0})}function qw(e,t,n,r){let i=e.properties,o=mt("item",i,n.styleCtx),s=pe(i,"size"),a=s?n.sizes.get(s)??null:null,c=fi(i,n.sizes,n.cal),l=Le(i,"after"),u=Le(i,"before"),f=aO(i,t.x,t.x,n),d;n.waves&&(f=Zo(e,f,n),d=pC(e,f,n));let p=d===void 0?B4(i,f,n):void 0,h=n.scale.startX(f),g=Math.max(Rn,Jo(n,h,c)),T=h,x=h+g,y=pe(i,"link"),E=D4(y),w=E.icon!=="none",b=Math.max(Rn,g-2*an),L=Le(i,"labels"),P=[];for(let je of L){let Kt=n.labels.get(je);if(!Kt)continue;let He=fm(Kt,n.styleCtx,0,0);P.push({id:Kt,width:He.box.width})}let $=0;for(let je=0;je<P.length;je+=1)je>0&&($+=Sr),$+=P[je].width;let G=Math.max(0,b-2*rr),Y=P.length>0&&$>G,D=!1,S,F;if(u.length>0){let je,Kt;for(let He of u){let ro=ze(He),io=ro?n.scale.forwardWithinDomain(ro)??void 0:n.entityLeftEdges.get(He);io!==void 0&&(je===void 0||io<je)&&(je=io,Kt=He)}je!==void 0&&x>je&&(D=!0,S={x:je,y:t.y,width:x-je,height:n.bandScale.bandwidth()},F=Kt)}let{status:X,progress:R}=QC(i,n),C={done:"#ecfdf5","in-progress":"#eff6ff","at-risk":"#fffbeb",blocked:"#fee2e2",planned:"#f8fafc",neutral:"#f8fafc"},N={done:"#052e16","in-progress":"#172554","at-risk":"#422006",blocked:"#7f1d1d",planned:"#1e293b",neutral:"#1e293b"},j={done:"#ebebeb","in-progress":"#e4e4e4","at-risk":"#eeeeee",blocked:"#dcdcdc",planned:"#f5f5f5",neutral:"#f5f5f5"},q={done:n.styleCtx.theme.status.done,"in-progress":n.styleCtx.theme.status.inProgress,"at-risk":n.styleCtx.theme.status.atRisk,blocked:n.styleCtx.theme.status.blocked,planned:n.styleCtx.theme.status.planned,neutral:n.styleCtx.theme.status.neutral},z=n.styleCtx.theme.name,ne=z==="dark",oe=ne?"#0f172a":"#ffffff",he=z==="grayscale"?"#9e9e9e":"#94a3b8";o.bg===oe&&(o.bg=z==="grayscale"?j[X]:ne?N[X]:C[X]),o.fg===he&&(o.fg=q[X]);let{metaText:re,ownerDisplay:ae,capacity:k,capacityTrailingWidth:O}=eO(i,n,r,a,X,R,o.capacityIcon),B=e.title??e.name??"",H=tO(e.name,n),J=new qh({id:e.name??"",title:B,logicalLeftX:T,logicalRightX:x,metaText:re,metaTrailingWidth:O,hasLinkIcon:w,hasAfterGlyph:$n(l)!==void 0,titleFirstLineRightReservePx:nO(b,H,u)}).place({x:T,y:t.y},{time:n.scale,bands:n.bandScale,style:o}),V=J.box,ie=n.bandScale.bandwidth(),le=V.width<us,xe=w&&V.width<of,ve=V.width<sf,ge=J.textSpills||xe,Ye=kw(B,J,xe),Fe=Ye.length,ot=null;Y&&(ot=pg(P,V.width));let sn=ot?ot.rows.length:P.length>0?1:0,ut=re!==void 0||k!==null,Tr=Ml(Fe,ut),Q=rf(Fe,ut),er=iO(Y,ge,sn,ie,Tr),si=Math.max(Q,er);si>0&&(V.height=ie+si);let ai=[],li=V.y+ie-tr-ho-mi,no=V.y+(Y&&ge?Math.max(ls,Tr):Tr)+mi,_=Y&&ge||!Y&&P.length>0?Math.max(li,no):li,W=Y?V.x+V.width+Ar:V.x+rr,Z=W;if(ot)for(let je=0;je<ot.rows.length;je+=1){let Kt=_+je*dg,He=W;for(let io of ot.rows[je]){let Lu=fm(io.id,n.styleCtx,He,Kt);ai.push(Lu),He+=Lu.box.width+Sr}let ro=He-Sr;ro>Z&&(Z=ro)}else{let je=W;for(let Kt of P){let He=fm(Kt.id,n.styleCtx,je,_);ai.push(He),je+=He.box.width+Sr}Z=P.length>0?je-Sr:W}let se=ae??r??pe(i,"owner"),Te=e.description?.text,Be=H.length>0&&ve,_e=V.x+V.width+Ar,$e=!1,Ge=null;xe&&($e&&(_e+=In),Ge=_e,_e=Ge+Ir,$e=!0);let Ce=0;if(ge){$e&&(_e+=In);let je=Math.max(...Ye.map(He=>ft(He,Ll))),Kt=(re?ft(re,11):0)+O;Ce=Math.max(je,Kt),_e+=Ce,$e=!0}let vt=null;Be&&($e&&(_e+=In),vt=_e,_e+=H.length*An,$e=!0);let Tt=null;le&&($e&&(_e+=In),Tt=_e+ir,_e=Tt+ir,$e=!0);let wr=Math.max(V.x+V.width,_e),Ut=e.name;Ut&&(n.entityLeftEdges.set(Ut,T),n.entityRightEdges.set(Ut,x)),fC(e,V.x+V.width+an,n);let Xt=Ut??rO(e);n.itemFlowKey.set(Xt,n.currentFlowKey),t.x=x,t.maxX=Math.max(t.maxX,t.x),t.height=Math.max(t.height,n.bandScale.step()+si);let Er=GP({box:V,afterDate:$n(l),beforeDate:$n(u),hasLinkIcon:w,footnoteCount:H.length}),ci={kind:"item",id:Ut,title:B,...Ye.length>=2||Ye[0]!==B?{titleLines:Ye}:{},box:V,status:X,progressFraction:R,footnoteIndicators:H,labelChips:ai,chipsOutside:Y,chipsRightX:Z,linkIcon:E.icon,linkHref:E.href,hasOverflow:D,overflowBox:S,overflowAnchorId:F,owner:se,description:Te,metaText:re,textSpills:ge,dotSpills:le,iconSpills:xe,footnoteSpills:Be,dotSpillCx:Tt,iconSpillX:Ge,footnoteSpillStartX:vt,decorationsRightX:wr,capacity:k,size:a,style:o,inlineDatePins:Er.length>0?Er:void 0},ml=dC(e,n);return ml!==void 0&&(ci.waveRole=ml),d!==void 0&&(ci.wavePinOverride=d),p!==void 0&&(ci.nonWorkingPin=p),n.placedItems.set(Xt,ci),ci}function M4(e,t,n){return new Vh(e,{sequenceOne:Vw,newCursor:Bh}).place(t,n)}function F4(e,t,n){return new Hh(e,{sequenceItem:qw,sequenceOne:Vw,resolveChildStart:sO,newCursor:Bh,estimateTextWidth:ft,predictItemBarExtraHeight:oO}).place(t,n)}function Vw(e,t,n){if(Mt(e))return qw(e,t,n);if(_t(e))return M4(e,t,n);if(Ve(e))return F4(e,t,n);throw new Error(`Unknown swimlane child type: ${e.$type??"unknown"}`)}function rO(e){let t=e.$cstNode?.range.start;return`#item@${t?t.line+1:0}:${t?t.character+1:0}`}function iO(e,t,n,r,i){if(n===0)return 0;let o=r-tr-ho-mi,s;e&&t?s=Math.max(ls,i)+mi:e?s=o:s=Math.max(o,i+mi);let c=s+(n-1)*dg+ho+mi+tr;return Math.max(0,c-r)}function oO(e,t,n){let r=e.properties,i=n.bandScale.bandwidth(),o=fi(r,n.sizes,n.cal),s=Math.max(Rn,Jo(n,t,o)),a=Math.max(Rn,s-2*an),c=pe(r,"size"),l=c?n.sizes.get(c)??null:null,{status:u,progress:f}=QC(r,n),{metaText:d,capacity:p,capacityTrailingWidth:h}=eO(r,n,void 0,l,u,f,mt("item",r,n.styleCtx).capacityIcon),g=d!==void 0||p!==null,T=!!pe(r,"link"),x=e.title??e.name??"",y=$n(Le(r,"after"))!==void 0,E=hi(T,y?{barWidth:a}:void 0),w=Math.max(0,a-E-rr),b=Math.max(0,a-E-nO(a,tO(e.name,n),Le(r,"before"))),L=bw(x,w,_w(d,h),b),P=T&&a<of,$=L.textSpills||P,G=kw(x,L,P).length,Y=rf(G,g),D=Le(r,"labels"),S=[];for(let q of D){let z=n.labels.get(q);if(!z)continue;let ne=fm(z,n.styleCtx,0,0);S.push({id:z,width:ne.box.width})}if(S.length===0)return Y;let F=0;for(let q=0;q<S.length;q+=1)q>0&&(F+=Sr),F+=S[q].width;let X=Math.max(0,a-2*rr),R=F>X,C=R?pg(S,a):null,N=C?C.rows.length:1,j=iO(R,$,N,i,Ml(G,g));return Math.max(Y,j)}function sO(e,t,n,r){return Zo(e,aO(e.properties,t,n,r),r)}function aO(e,t,n,r){let i=ze(pe(e,"date"))??ze(pe(e,"start"));if(i){let s=r.scale.forwardWithinDomain(i);if(s!==null)return s}let o=Le(e,"after");if(o.length>0){let s=n;for(let a of o){let c=ze(a);if(c){let u=r.scale.forwardWithinDomain(c);u!==null&&(s=Math.max(s,u));continue}let l=r.entityRightEdges.get(a);l!==void 0&&(s=Math.max(s,l))}return Math.max(n,s)}return t}function B4(e,t,n){if(!n.calendar.hasNonWorkingDays)return;let r=W4(e);if(!r||n.calendar.isWorkingDay(r.date))return;let i=n.scale.forwardWithinDomain(r.date);if(!(i===null||Math.abs(t-i)>=Yt))return{key:r.key,pin:r.raw,start:_r(Au(t,n))}}function W4(e){for(let t of["date","start"]){let n=pe(e,t),r=ze(n);if(n!==void 0&&r)return{key:t,raw:n,date:r}}for(let t of Le(e,"after")){let n=ze(t);if(n)return{key:"after",raw:t,date:n}}}var Xw=6;function U4(e,t){let n=Wm-32,r=$l(e,n,16),i=$l(t??"",n,11),o=0;for(let d of r)o=Math.max(o,ft(d,16));for(let d of i)o=Math.max(o,ft(d,11));let s=o+32,a=Math.max(t_-Xw,Math.min(Wm-Xw,s)),c=r.length>0?(r.length-1)*20:0,l=i.length>0?18+(i.length-1)*14:0,u=26+c+l+14,f=a+Xw;return{titleLines:r,authorLines:i,cardWidth:a,cardHeight:u,boxWidth:f}}function X4(e,t,n,r,i,o){let a=e.roadmapDecl?.properties??[],c=pe(a,"start"),l=ze(c)??G4(r),u=pe(a,"length"),f=0;if(u){let x=j4(u,t.cal);x>0&&(f=x)}let d=t.calendar??Tl(t.cal),p=lO(n,{cal:t.cal,sizes:t.sizes,calendar:d},l,f>0?void 0:r,o),h=$E(i.unit,t.cal),g=tm(l,p>0?p:4*t.cal.daysPerWeek,i.unit,h,d),T=Math.max(f,g);return{startDate:l,endDate:d.dateAtWorkingIndex(l,Math.max(1,T))}}function G4(e){let t=e??new Date;return new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()))}function j4(e,t){let n=/^(\d+(?:\.\d+)?)([dwmqy])$/.exec(e);if(!n)return 0;let r=parseFloat(n[1]);switch(n[2]){case"d":return r;case"w":return r*t.daysPerWeek;case"m":return r*t.daysPerMonth;case"q":return r*t.daysPerQuarter;case"y":return r*t.daysPerYear;default:return 0}}function lO(e,t,n,r,i){let o=h=>t.calendar.workingIndexOf(n,h),s=new Map,a=new Map,c=new Map,l=0;for(let h of e.content.anchors.values()){let g=ze(pe(h.properties,"date"));if(g&&h.name){let T=o(g);a.set(h.name,T),l=Math.max(l,T)}}let u=()=>({itemEnd:s,anchorEnd:a,milestoneEnd:c,sizes:t.sizes}),f=(h,g,T)=>{let x=w=>{let b=ze(w);return b?o(b):h.itemEnd.has(w)?h.itemEnd.get(w):h.anchorEnd.has(w)?h.anchorEnd.get(w):h.milestoneEnd.has(w)?h.milestoneEnd.get(w):0},y=(w,b)=>{let L=b;for(let P of w)P.$type!=="DescriptionDirective"&&(L=E(P,L),T(L));return L},E=(w,b)=>{if(Mt(w)){let L=fi(w.properties,h.sizes,t.cal),P=ze(pe(w.properties,"date")),$=ze(pe(w.properties,"start")),G=Le(w.properties,"after"),Y=b;P?Y=o(P):$?Y=o($):G.length>0&&(Y=Math.max(b,...G.map(x))),g&&(Y=g.apply(w,Y));let D=Y+L;return w.name&&h.itemEnd.set(w.name,D),g?.accumulate(w,D),D}if(_t(w)){let L=Le(w.properties,"after"),P=L.length>0?Math.max(b,...L.map(x)):b;g&&(P=g.apply(w,P));let $=P;for(let G of w.content){if(G.$type==="DescriptionDirective")continue;let Y=E(G,P);$=Math.max($,Y)}return $}if(Ve(w)){let L=Le(w.properties,"after"),P=L.length>0?Math.max(b,...L.map(x)):b;return g&&(P=g.apply(w,P)),y(w.content,P)}return b};return{walkLane:y,resolveAfterDay:x}},d=h=>{l=Math.max(l,h)};if(i){let h=i.waves.map(y=>y.name),g=0,T=y=>{g=Math.max(g,y)},x=Gh(h.length,0,sC(i,n,t.calendar),(y,E)=>{let w=h.map((P,$)=>[P,E[$]]);s=new Map(w),g=0;let b=new Ko(i,y),{walkLane:L}=f(u(),b,T);for(let P of e.content.swimlanes.values())L(P.content,0);for(let P of e.content.isolatedRegions){let $=f({itemEnd:new Map(w),anchorEnd:new Map,milestoneEnd:new Map,sizes:is(P.content.sizes,t.cal)},b,T);for(let G of P.content.swimlanes.values())$.walkLane(G.content,0)}return b});l=Math.max(l,g,...x.S,...x.E.slice(-1))}else{let{walkLane:h}=f(u(),void 0,d);for(let g of e.content.swimlanes.values())h(g.content,0)}let{resolveAfterDay:p}=f(u(),void 0,d);for(let h of e.content.milestones.values()){let g=ze(pe(h.properties,"date"));if(g){let x=o(g);h.name&&c.set(h.name,x),l=Math.max(l,x);continue}let T=Le(h.properties,"after");if(T.length>0){let x=Math.max(0,...T.map(p));h.name&&c.set(h.name,x),l=Math.max(l,x)}}if(!i)for(let h of e.content.isolatedRegions){let g=lO({config:h.config,content:h.content,diagnostics:[],processedFiles:new Set},t,n,void 0);l=Math.max(l,g)}if(r){let h=o(r);h>0&&(l=Math.max(l,h))}return l}function H4(e,t,n,r){let i=new Mh(BP(t,n)),o=[],s=[],a=r.bandScale.bandwidth();for(let[u,f]of e){let d=Le(f.properties,"after"),p=r.placedItems.get(u);if(!p)continue;let h=HP(p,a);for(let g of d){let T=r.placedItems.get(g),x,y=T===void 0;if(T)x=zP(T,a);else{let E=r.entityMidpoints.get(g);if(!E)continue;x={x:E.x,y:h.y}}!y&&Math.abs(x.y-h.y)<.5&&h.x-x.x<20||(o.push({fromId:g,toId:u,from:x,to:h,isMarkerSource:y}),s.push({fromId:g,toId:u}))}}let c=WP(o,i),l=[];for(let u=0;u<c.length;u++){let f=c[u];l.push({fromId:s[u].fromId,toId:s[u].toId,waypoints:f.waypoints,kind:f.underBar?"underBar":"normal",style:mt("item",[],r.styleCtx)})}return l}function z4(e,t,n){if(!e)return null;let r=t.scale.forwardWithinDomain(e);if(r===null)return null;let i=t.timeline.box.y,o=t.timeline.tickPanelY,s=ll(n).nowLabel,a=ft(s,Al),c=Math.max(Mm,Math.ceil(a+2*as)),l=t.timeline.originX-ln,u=c/2,f;r-u<l?f="flag-right":r+u>t.chartRightX?f="flag-left":f="center";let d=t.timeline.bottomTickPanelY,p=t.timeline.bottomTickPanelHeight??0,h=d!==void 0&&p>0?d+p:t.swimlaneBottomY;return{x:r,topY:o,bottomY:h,pillTopY:i,pillMode:f,label:s,pillWidth:c,style:mt("item",[],t.styleCtx)}}function q4(e){let t=new Map,n=r=>{if(Mt(r)){t.set(r.name??rO(r),r);return}if(_t(r)){for(let i of r.content)i.$type!=="DescriptionDirective"&&n(i);return}if(Ve(r)){for(let i of r.content)i.$type!=="DescriptionDirective"&&n(i);return}};for(let r of e)for(let i of r.content)i.$type!=="DescriptionDirective"&&n(i);return t}function Yw(e,t,n={}){let r=gw(t);return new um().place(e,t,n,r,{sequenceItem:qw,sequenceOne:Vw,resolveChildStart:sO,newCursor:Bh,estimateTextWidth:ft,predictItemBarExtraHeight:oO,computeDateWindow:X4,sizeBesideHeader:U4,collectItems:q4,buildDependencies:H4,buildNowline:z4})}function pm(e){return e.toISOString().slice(0,10)}function Kw(e){return e.id!==void 0?e.id:/[\r\n]/.test(e.title)?e.title.replace(/\s*[\r\n]+\s*/g," ").trim():e.title}function Zw(e,t){for(let n of e)n.kind==="item"?t(n):Zw(n.children,t)}function V4(e,t,n){let r=Kw(e);e.textSpills&&n.push(Ln(t,"NL.I1000","info",{name:r},r)),e.chipsOutside&&n.push(Ln(t,"NL.I1001","info",{name:r},r)),(e.box.width<us||e.dotSpills||e.iconSpills||e.footnoteSpills)&&n.push(Ln(t,"NL.I1002","info",{name:r},r)),e.hasOverflow&&n.push(Ln(t,"NL.I1003","info",{name:r,anchor:e.overflowAnchorId},r)),cO(e,t,n),uO(e,t,n)}function cO(e,t,n){let r=e.wavePinOverride;if(!r)return;let i=Kw(e);n.push(Ln(t,"NL.W1001","warning",{name:i,pin:r.pin,key:r.key,wave:r.wave,start:r.start},i))}function uO(e,t,n){let r=e.nonWorkingPin;if(!r)return;let i=Kw(e);n.push(Ln(t,"NL.I1008","info",{name:i,pin:r.pin,key:r.key,start:r.start},i))}function Ln(e,t,n,r,i){return{message:Kr(e,t,r),severity:n,code:t,entityId:i,lspSeverity:n==="warning"?2:3,data:{code:t,args:r}}}function fO(e,t,n){let r=e.id??e.title,i=[];Zw(e.children,a=>i.push(a));for(let a of i)V4(a,t,n);let o=new Set(i.map(a=>a.box.y));o.size>1&&n.push(Ln(t,"NL.I1004","info",{lane:r,rows:o.size},r)),(e.utilization?.segments.some(a=>a.classification==="red")??!1)&&n.push(Ln(t,"NL.I1005","info",{lane:r},r));for(let a of e.nested)fO(a,t,n)}function dO(e,t,n){Zw(e.children,r=>{cO(r,t,n),uO(r,t,n)});for(let r of e.nested)dO(r,t,n)}function Y4(e,t,n){e.waveSolve?.capped&&n.push(Ln(t,"NL.W1002","warning",{passes:e.waveSolve.passes}));let r=e.waves??[],i=r.filter(o=>o.empty).map(o=>o.id);if(i.length>0){let o=i.length===r.length?{reason:"all",names:i}:i.length===1?{reason:"one",name:i[0]}:{reason:"many",names:i};n.push(Ln(t,"NL.I1006","info",o,o.reason==="one"?o.name:void 0))}for(let o of e.milestones){if(o.overrunByWave===void 0||o.overrunDate===void 0)continue;let s=r.find(c=>c.id===o.overrunByWave);if(!s)continue;let a=o.id??o.title;n.push(Ln(t,"NL.I1007","info",{name:a,date:o.overrunDate,wave:s.id,end:pm(s.endDate)},a))}}function Jw(e,t={}){let n=t.locale??"en-US",r=[];for(let i of e.swimlanes)fO(i,n,r);for(let i of e.includes)for(let o of i.nestedSwimlanes)dO(o,n,r);if(Y4(e,n,r),t.today){let i=t.today,o=e.timeline.startDate,s=e.timeline.endDate;(i<o||i>s)&&r.push(Ln(n,"NL.W1000","warning",{date:pm(i),start:pm(o),end:pm(s)}))}return r}var es=class extends Error{constructor(t){super(t),this.name="TimezoneError"}};function Qw(e){if(!e||e.toLowerCase()==="local")return{kind:"local"};if(e.toUpperCase()==="UTC")return{kind:"utc"};if(e==="Z")return{kind:"offset",ms:0};let t=/^([+-])(\d{2})(?::?(\d{2}))?$/.exec(e);if(t){let n=t[1]==="+"?1:-1,r=parseInt(t[2],10),i=t[3]!==void 0?parseInt(t[3],10):0;if(r>23||i>59)throw new es(`nowline: invalid timezone offset "${e}". Hours must be 0\u201323 and minutes 0\u201359.`);return{kind:"offset",ms:n*(r*60+i)*6e4}}try{return{kind:"iana",name:Intl.DateTimeFormat(void 0,{timeZone:e}).resolvedOptions().timeZone}}catch{throw new es(`nowline: unrecognised timezone "${e}". Use "local", "UTC", an ISO 8601 offset (e.g. "+05:30", "-07:00", "Z"), or an IANA timezone name (e.g. "America/Los_Angeles", "Asia/Kolkata").`)}}function hm(e,t){switch(t.kind){case"local":return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()));case"utc":return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()));case"offset":{let n=new Date(e.getTime()+t.ms);return new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()))}case"iana":{let n=new Intl.DateTimeFormat("en-CA",{timeZone:t.name,year:"numeric",month:"2-digit",day:"2-digit"}).formatToParts(e),r=0,i=0,o=0;for(let s of n)s.type==="year"?r=parseInt(s.value,10):s.type==="month"?i=parseInt(s.value,10)-1:s.type==="day"&&(o=parseInt(s.value,10));return new Date(Date.UTC(r,i,o))}}}var K4=/^(\d{4})-(\d{2})-(\d{2})$/,Z4=/^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?)(Z|([+-])(\d{2})(?::?(\d{2}))?)$/,J4=/^(\d{4})-(\d{2})-(\d{2})T\d{2}:\d{2}:\d{2}(?:\.\d+)?$/;function eE(e={}){let t=e.zone??{kind:"local"},n=e.clock??(()=>new Date),r=e.now;if(!(r==="-"||r===null)){if(r instanceof Date)return r;if(r!==void 0){let i=K4.exec(r);if(i)return new Date(Date.UTC(parseInt(i[1],10),parseInt(i[2],10)-1,parseInt(i[3],10)));let o=Z4.exec(r);if(o){let a=new Date(r);if(!Number.isNaN(a.getTime())){if(o[2]==="Z")return hm(a,{kind:"utc"});let l=o[3]==="+"?1:-1,u=parseInt(o[4],10),f=o[5]!==void 0?parseInt(o[5],10):0,d=l*(u*60+f)*6e4;return hm(a,{kind:"offset",ms:d})}}let s=J4.exec(r);return s?new Date(Date.UTC(parseInt(s[1],10),parseInt(s[2],10)-1,parseInt(s[3],10))):void 0}return hm(n(),t)}}function Q4(e){return e===2?"warning":e===3?"info":"error"}function pO(e,t){return{severity:Q4(e.severity),code:gg(e),message:e.message,suggestion:cf(e.message),file:t,line:(e.range?.start.line??0)+1,column:(e.range?.start.character??0)+1}}function hO(e,t){return{severity:"error",code:"parse-error",message:e.message,file:t,line:e.token?.startLine??1,column:e.token?.startColumn??1}}function mO(e,t){return{severity:"error",code:"lex-error",message:e.message,file:t,line:e.line??1,column:e.column??1}}function gO(e,t){let n=e.line!==void 0?e.line+1:1;if(!al(e))return{severity:e.severity,code:"include",message:e.message,file:e.sourcePath,line:n,column:1};let r=t?mw(t,e):e.message,i=cf(r);return{severity:e.severity,code:e.code??uf(e.message),message:r,...i===void 0?{}:{suggestion:i},file:e.sourcePath,line:n,column:1}}function yO(e,t,n="warning"){return{severity:n,code:"render.warning",message:e,file:t,line:1,column:1}}function xO(e,t){return{severity:e.severity,code:e.code,message:e.message,file:t,line:1,column:1}}var vO="__nowline_browser_noop_include__";async function TO(e){throw new Error(`${vO}: include "${e}" was skipped \u2014 running in single-file mode.`)}function tE(e){return e.includes(vO)}var to={person:{viewBox:"0 0 24 24",body:'<circle cx="12" cy="8" r="4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M4 21a8 8 0 0 1 16 0" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>',ascii:"p"},people:{viewBox:"0 0 24 24",body:'<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><circle cx="9" cy="7" r="4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M22 21v-2a4 4 0 0 0-3-3.87" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M16 3.13a4 4 0 0 1 0 7.75" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>',ascii:"P"},points:{viewBox:"0 0 24 24",body:'<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" fill="currentColor" stroke="currentColor" stroke-width="1" stroke-linejoin="round"/>',ascii:"*"},time:{viewBox:"0 0 24 24",body:'<line x1="10" x2="14" y1="2" y2="2" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><line x1="12" x2="15" y1="14" y2="11" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><circle cx="12" cy="14" r="8" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>',ascii:"t"}},ej={calendar:{viewBox:"0 0 24 24",body:'<rect x="3" y="4" width="18" height="18" rx="2" ry="2" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><line x1="16" x2="16" y1="2" y2="6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><line x1="8" x2="8" y1="2" y2="6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><line x1="3" x2="21" y1="10" y2="10" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>',ascii:"d"}},wO={...to,...ej};var Mae={none:"",multiplier:"x",person:to.person.ascii,people:to.people.ascii,points:to.points.ascii,time:to.time.ascii};var mm=class{constructor(t="nl"){I(this,"prefix");I(this,"counter",0);this.prefix=t}next(t){let n=`${this.prefix}-${this.counter++}`;return t?`${n}-${t}`:n}};var tj=new Set(["svg","g","defs","symbol","use","path","rect","circle","ellipse","line","polyline","polygon","text","tspan","title","desc","linearGradient","radialGradient","stop","clipPath","mask","pattern","filter","feGaussianBlur","feColorMatrix","feOffset","feMerge","feMergeNode","feFlood","feComposite","feBlend","feDropShadow","image"]),nj=new Set(["d","x","y","x1","y1","x2","y2","cx","cy","r","rx","ry","width","height","viewBox","preserveAspectRatio","fill","fill-opacity","fill-rule","stroke","stroke-width","stroke-opacity","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-dasharray","stroke-dashoffset","opacity","transform","points","id","class","clip-path","mask","filter","font-family","font-size","font-weight","font-style","text-anchor","dx","dy","rotate","letter-spacing","word-spacing","style","xmlns","href","xlink:href","offset","stop-color","stop-opacity","gradientUnits","gradientTransform","spreadMethod","maskUnits","maskContentUnits","stdDeviation","values","in","in2","mode","type","result","flood-color","flood-opacity","patternUnits","patternContentUnits","role","aria-label"]);function rj(e){let t=[],n=0,r=e.length;for(;n<r;){if(e[n]!=="<"){let u=n;for(;n<r&&e[n]!=="<";)n++;let f=e.slice(u,n);f.trim().length>0?t.push({kind:"text",text:f}):f.length>0&&t.push({kind:"text",text:f});continue}if(e.startsWith("<!--",n)){let u=e.indexOf("-->",n+4);if(u<0)break;t.push({kind:"comment",text:e.slice(n+4,u)}),n=u+3;continue}if(e.startsWith("<![CDATA[",n)){let u=e.indexOf("]]>",n+9);if(u<0)break;t.push({kind:"cdata",text:e.slice(n+9,u)}),n=u+3;continue}if(e.startsWith("<?",n)){let u=e.indexOf("?>",n+2);if(u<0)break;t.push({kind:"decl",text:e.slice(n+2,u)}),n=u+2;continue}if(e.startsWith("<!",n)){let u=e.indexOf(">",n+2);if(u<0)break;t.push({kind:"decl",text:e.slice(n+2,u)}),n=u+1;continue}if(e[n+1]==="/"){let u=e.indexOf(">",n+2);if(u<0)break;let f=e.slice(n+2,u).trim();t.push({kind:"close",name:f}),n=u+1;continue}let i=ij(e,n);if(i<0)break;let o=e.slice(n+1,i).trim(),s=o.endsWith("/"),a=s?o.slice(0,-1).trim():o,{name:c,attrs:l}=oj(a);t.push({kind:s?"self":"open",name:c,attrs:l}),n=i+1}return t}function ij(e,t){let n=t+1,r=null;for(;n<e.length;){let i=e[n];if(r)i===r&&(r=null);else if(i==='"'||i==="'")r=i;else if(i===">")return n;n++}return-1}function oj(e){let t=0;for(;t<e.length&&/\s/.test(e[t]);)t++;let n=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;let r=e.slice(n,t),i={};for(;t<e.length;){for(;t<e.length&&/\s/.test(e[t]);)t++;if(t>=e.length)break;let o=t;for(;t<e.length&&e[t]!=="="&&!/\s/.test(e[t]);)t++;let s=e.slice(o,t);if(t>=e.length||e[t]!=="="){s&&(i[s]="");continue}if(t++,t>=e.length)break;let a=e[t];if(a!=='"'&&a!=="'"){let l=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;i[s]=e.slice(l,t);continue}t++;let c=t;for(;t<e.length&&e[t]!==a;)t++;i[s]=e.slice(c,t),t<e.length&&t++}return{name:r,attrs:i}}function Nu(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function sj(e,t){if(e.startsWith("#")){let n=t.get(e.slice(1));return n?`#${n}`:null}if(/^url\(#[^)]+\)$/.test(e)){let n=e.slice(5,-1),r=t.get(n);return r?`url(#${r})`:null}return null}function EO(e,t={}){let n=t.idPrefix??"nl-logo",r=t.onWarn??(()=>{}),i=rj(e),o=new Map,s=0;for(let l of i)if((l.kind==="open"||l.kind==="self")&&l.attrs&&"id"in l.attrs){let u=l.attrs.id;u&&!o.has(u)&&o.set(u,`${n}-${s++}`)}let a=[],c=[];for(let l of i)if(l.kind!=="comment"&&l.kind!=="decl"){if(l.kind==="cdata"){c[c.length-1]&&a.push(Nu(l.text??""));continue}if(l.kind==="text"){if(c.length===0||c[c.length-1]){let u=(l.text??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");a.push(u)}continue}if(l.kind==="open"||l.kind==="self"){let u=l.name??"";if(u==="script"||u==="foreignObject"||u==="animate"||u==="animateTransform"||u==="animateMotion"||u==="set"){r(`sanitizer: dropping <${u}>`),l.kind==="open"&&c.push(!1);continue}if(!tj.has(u)){r(`sanitizer: dropping unknown element <${u}>`),l.kind==="open"&&c.push(!1);continue}let f=[`<${u}`],d=Object.keys(l.attrs??{}).sort();for(let p of d){let h=l.attrs[p];if(/^on/i.test(p)){r(`sanitizer: dropping event handler ${p}`);continue}if(!nj.has(p)){r(`sanitizer: dropping attribute ${p}`);continue}if(p==="href"||p==="xlink:href"){let g=sj(h,o);if(g===null){r(`sanitizer: dropping external href ${h}`);continue}f.push(` ${p}="${Nu(g)}"`);continue}if(p==="style"){r("sanitizer: dropping inline style");continue}if(p==="id"){let g=o.get(h);g&&f.push(` id="${Nu(g)}"`);continue}if(/\burl\(#/i.test(h)){let g=h.replace(/url\(#([^)]+)\)/gi,(T,x)=>{let y=o.get(x);return y?`url(#${y})`:"none"});f.push(` ${p}="${Nu(g)}"`);continue}if(/data:|javascript:|vbscript:/i.test(h)){r(`sanitizer: dropping suspicious value at ${p}`);continue}f.push(` ${p}="${Nu(h)}"`)}f.push(l.kind==="self"?"/>":">"),a.push(f.join("")),l.kind==="open"&&c.push(!0);continue}l.kind==="close"&&c.pop()&&a.push(`</${l.name}>`)}return a.join("")}var _O=/&/g,bO=/</g,kO=/>/g,aj=/"/g,lj=/'/g;function Bt(e){return e.replace(_O,"&").replace(bO,"<").replace(kO,">")}function ri(e){return e.replace(_O,"&").replace(bO,"<").replace(kO,">").replace(aj,""").replace(lj,"'")}function hl(e){let t=Object.keys(e).sort(),n=[];for(let r of t){let i=e[r];i==null||i===!1||(i===!0?n.push(r):n.push(`${r}="${ri(String(i))}"`))}return n.length?` ${n.join(" ")}`:""}function te(e,t,n){return n===void 0||n===""?`<${e}${hl(t)}/>`:`<${e}${hl(t)}>${n}</${e}>`}function Se(e,t){return`<text${hl(e)}>${Bt(t)}</text>`}function m(e){return Number.isFinite(e)?Number.isInteger(e)?e.toString():(Math.round(e*100)/100).toString():"0"}var cj={none:{dx:0,dy:0,stdDeviation:0,opacity:0},subtle:{dx:0,dy:1,stdDeviation:1.5,opacity:.2},soft:{dx:0,dy:3,stdDeviation:5,opacity:.3},hard:{dx:2,dy:2,stdDeviation:0,opacity:.45}};function uj(e,t){let n=`${e}-shadow-${t}`,r=cj[t],i=`<feGaussianBlur in="SourceAlpha" stdDeviation="${r.stdDeviation}"/><feOffset dx="${r.dx}" dy="${r.dy}" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="${r.opacity}"/></feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge>`;return te("filter",{id:n,x:"-50%",y:"-50%",width:"200%",height:"200%"},i)}function RO(e,t){return t==="none"?null:`url(#${e}-shadow-${t})`}function AO(e){return["subtle","soft","hard"].map(t=>uj(e,t)).join("")}var fj={thin:100,light:300,normal:400,bold:700};function dj(e){return ss[e]??14}function iE(e,t,n){return{"font-family":t[e.font],"font-size":n??dj(e.textSize),"font-weight":fj[e.weight]??400,"font-style":e.italic?"italic":"normal",fill:e.text}}function pj(e){if(e.border==="dashed")return"4 3";if(e.border==="dotted")return"1 3"}function $O(e){if(!e||e==="none"||e==="transparent")return 1;let t=e.startsWith("#")?e.slice(1):e;if(t.length===3&&(t=t.split("").map(s=>s+s).join("")),t.length!==6)return 1;let n=parseInt(t.slice(0,2),16)/255,r=parseInt(t.slice(2,4),16)/255,i=parseInt(t.slice(4,6),16)/255,o=s=>s<=.03928?s/12.92:((s+.055)/1.055)**2.4;return .2126*o(n)+.7152*o(r)+.0722*o(i)}function hj(e,t){return $O(e)>=.24?t.statusDot.onLight:t.statusDot.onDark}function xm(e,t){return e.length*t*.58}function LO(e,t,n,r,i,o,s){let a=i*.58,c=t?xm(t,i):0,l=t?a:0,u=n+c+l,{text:f,icon:d}=e,p=xm(f,i),h={"font-family":o,"font-size":i,fill:s};if(!d)return Se({x:m(u),y:m(r),...h},f);if(d.kind==="builtin"&&d.name==="multiplier")return Se({x:m(u),y:m(r),...h},`${f}\xD7`);if(d.kind==="builtin"){let T=to[d.name],x=Se({x:m(u),y:m(r),...h},f),y=i*.1,E=i,w=u+p+y,b=r-i*.85,L=`<svg x="${m(w)}" y="${m(b)}" width="${m(E)}" height="${m(E)}" viewBox="${T.viewBox}" style="color:${ri(s)}" aria-hidden="true">${T.body}</svg>`;return x+L}let g=m(i*.1);return`<text x="${m(u)}" y="${m(r)}" font-family="${ri(o)}" font-size="${i}" fill="${ri(s)}">${Bt(f)}<tspan dx="${g}">${Bt(d.text)}</tspan></text>`}var IO=.6,mj=.5;function gj(e){let{metaText:t,capacity:n,x:r,baselineY:i,fontSize:o,fontFamily:s,color:a}=e;if(!t&&!n)return"";let c={"font-family":s,"font-size":o,fill:a};if(!n)return Se({x:m(r),y:m(i),...c},t);if(!t)return LO(n,void 0,r,i,o,s,a);let l=m(o*IO),u=`<text x="${m(r)}" y="${m(i)}" font-family="${ri(s)}" font-size="${o}" fill="${ri(a)}">`,{text:f,icon:d}=n;if(!d)return u+Bt(t)+`<tspan dx="${l}">${Bt(f)}</tspan></text>`;if(d.kind==="builtin"&&d.name==="multiplier")return u+Bt(t)+`<tspan dx="${l}">${Bt(f)}\xD7</tspan></text>`;if(d.kind==="literal"){let L=m(o*.1);return u+Bt(t)+`<tspan dx="${l}">${Bt(f)}</tspan><tspan dx="${L}">${Bt(d.text)}</tspan></text>`}let p=to[d.name],h=L=>L.length*o*mj,g=r+h(t)+o*IO,T=o*.1,x=o,y=g+h(f)+T,E=i-o*.85,w=u+Bt(t)+`<tspan dx="${l}">${Bt(f)}</tspan></text>`,b=`<svg x="${m(y)}" y="${m(E)}" width="${m(x)}" height="${m(x)}" viewBox="${p.viewBox}" style="color:${ri(a)}" aria-hidden="true">${p.body}</svg>`;return w+b}function yj(e,t){let n=wO.calendar,r=`<svg x="${m(e.glyphTopLeft.x)}" y="${m(e.glyphTopLeft.y)}" width="${m(e.glyphSize)}" height="${m(e.glyphSize)}" viewBox="${n.viewBox}" style="color:${ri(t)}" aria-hidden="true">${n.body}</svg>`,i=`<title>${Bt(e.isoDate)}</title>`;return te("g",{"data-layer":"inline-date-pin","data-side":e.side,"data-date":e.isoDate,"data-spilled":e.spilled?"true":null},i+r)}function oE(e,t){return!e||e.length===0?"":e.map(n=>yj(n,t)).join("")}function xj(e){return(e?.length??0)>0}function DO(e){return e?.some(t=>t.side==="after")??!1}function vj(e,t,n,r,i,o={}){let s=Math.min(El[i.cornerRadius]??4,r/2);return te("rect",{x:m(e),y:m(t),width:m(n),height:m(r),rx:m(s),ry:m(s),fill:i.bg==="none"?"transparent":i.bg,stroke:i.fg,"stroke-width":1,"stroke-dasharray":pj(i)??null,...o})}function Tj(e,t,n,r){let i=e.box.x+e.cardBox.x,o=e.box.y+e.cardBox.y,s=e.cardBox.width,a=e.cardBox.height,c=e.style.bg==="none"?n.surface.headerBox:e.style.bg,l=n.header.cardBorder,u=te("rect",{x:m(i),y:m(o),width:m(s),height:m(a),rx:6,ry:6,fill:c,stroke:l,"stroke-width":1,filter:`url(#${t}-shadow-subtle)`}),f=[];e.titleLines.forEach((x,y)=>{f.push(Se({x:m(i+16),y:m(o+26+y*20),"font-family":r[e.style.font],"font-size":16,"font-weight":600,fill:e.style.text},x))});let d=f.join(""),p=o+26+Math.max(0,e.titleLines.length-1)*20,h=n.header.author,g=[];e.authorLines.forEach((x,y)=>{g.push(Se({x:m(i+16),y:m(p+18+y*14),"font-family":r[e.style.font],"font-size":11,fill:h},x))});let T=g.join("");return te("g",{"data-layer":"header","data-id":`${t}-header`},u+d+T)}function wj(e,t,n){let r=n.timeline.gridLine,i=n.timeline.minorGridLine,o=e.bottomTickPanelHeight??0,s=e.bottomTickPanelY!==void 0&&o>0,a=e.tickPanelY,c=s?e.bottomTickPanelY+o:e.box.y+e.box.height,l=t,u=e.box.y+e.box.height,f=[];for(let d of e.ticks)if(d.major)f.push(te("line",{x1:m(d.x),y1:m(a),x2:m(d.x),y2:m(c),stroke:r,"stroke-width":1}));else if(e.minorGrid){if(d.labelX===void 0)continue;f.push(te("line",{x1:m(d.x),y1:m(l),x2:m(d.x),y2:m(u),stroke:i,"stroke-width":1}))}for(let d of e.nonWorking??[])d.seam&&f.push(te("line",{x1:m(d.x),y1:m(l),x2:m(d.x),y2:m(u),stroke:n.timeline.nonWorkingSeam,"stroke-width":1,"stroke-dasharray":"1 3"}));return te("g",{"data-layer":"grid"},f.join(""))}function MO(e,t,n,r){let i=e.box.y+e.box.height,o=[];for(let s of e.nonWorking??[]){if(!s.band)continue;let a={x:s.x,y:t,width:s.width,height:i-t},c=r?aE(a,r):a;!c||c.width<=0||c.height<=0||o.push(te("rect",{x:m(c.x),y:m(c.y),width:m(c.width),height:m(c.height),fill:n.timeline.nonWorkingFill,"fill-opacity":Vm}))}return o.length===0?"":te("g",{"data-layer":"non-working"},o.join(""))}function Ej(e,t,n){let r=e.box.y+e.box.height,i=[];for(let o of e.nonWorking??[])o.label===void 0||!o.labelBox||(o.cut&&i.push(te("line",{x1:m(o.x),y1:m(o.labelBox.y+4),x2:m(o.x),y2:m(r),stroke:t.timeline.nonWorkingSeam,"stroke-width":1,"stroke-dasharray":"1 3"})),i.push(SO(o.label,o.labelBox,o.labelSide,t,n)));for(let o of e.workingExceptions??[])o.labelBox&&i.push(SO(o.label,o.labelBox,o.labelSide,t,n));return i.length===0?"":te("g",{"data-layer":"non-working-label"},i.join(""))}function SO(e,t,n,r,i){let o=n==="left",s=t.y+4,a={x:m(o?t.x+t.width:t.x),y:m(s+4),"font-family":i.sans,"font-size":10,fill:r.timeline.labelText};return o&&(a["text-anchor"]="end"),Se(a,e)}function _j(e,t,n){let r=t.timeline.panelFill,i=t.timeline.border,o=t.timeline.labelText,s=[],a=e.tickPanelY,c=e.tickPanelHeight,l=c>0,u=e.markerRow.height>0,f=e.waveStrip?e.waveStrip.y+e.waveStrip.height:a+c,d=e.markerRow.height,p=e.bottomTickPanelY,h=e.bottomTickPanelHeight??0,g=p!==void 0&&h>0;l&&s.push(te("rect",{x:m(e.box.x),y:m(a),width:m(e.box.width),height:m(c),rx:4,ry:4,fill:r,stroke:i,"stroke-width":1})),u&&s.push(te("rect",{x:m(e.box.x),y:m(f),width:m(e.box.width),height:m(d),rx:4,ry:4,fill:r,stroke:i,"stroke-width":1})),g&&s.push(te("rect",{x:m(e.box.x),y:m(p),width:m(e.box.width),height:m(h),rx:4,ry:4,fill:r,stroke:i,"stroke-width":1}));for(let T of e.ticks)T.major&&(!T.label||T.labelX===void 0||(l&&s.push(Se({x:m(T.labelX),y:m(a+bl(c)),"font-family":n.sans,"font-size":so,fill:o,"text-anchor":"middle"},T.label)),g&&s.push(Se({x:m(T.labelX),y:m(p+bl(h)),"font-family":n.sans,"font-size":so,fill:o,"text-anchor":"middle"},T.label))));return te("g",{"data-layer":"timeline"},s.join(""))}function bj(e,t,n){if(!e)return"";let r=t.nowline.stroke,i=t.nowline.labelText,o=te("line",{x1:m(e.x),y1:m(e.topY),x2:m(e.x),y2:m(e.bottomY),stroke:r,"stroke-width":ju}),s=kj(e,r),a=Rj(e,i,n);return te("g",{"data-layer":"nowline"},o+s+a)}function FO(e){let t=ju/2;return e.pillMode==="flag-right"?e.x-t:e.pillMode==="flag-left"?e.x+t:e.x}function kj(e,t){let n=e.pillTopY,r=e.pillTopY+di,i=Fm,o=e.pillWidth;if(e.pillMode==="center")return te("rect",{x:m(e.x-o/2),y:m(n),width:m(o),height:m(di),rx:i,ry:i,fill:t});let s=FO(e);if(e.pillMode==="flag-right"){let l=s+o,u=[`M ${m(s)} ${m(n)}`,`L ${m(l-i)} ${m(n)}`,`A ${i} ${i} 0 0 1 ${m(l)} ${m(n+i)}`,`L ${m(l)} ${m(r-i)}`,`A ${i} ${i} 0 0 1 ${m(l-i)} ${m(r)}`,`L ${m(s)} ${m(r)}`,"Z"].join(" ");return te("path",{d:u,fill:t})}let a=s-o,c=[`M ${m(s)} ${m(n)}`,`L ${m(a+i)} ${m(n)}`,`A ${i} ${i} 0 0 0 ${m(a)} ${m(n+i)}`,`L ${m(a)} ${m(r-i)}`,`A ${i} ${i} 0 0 0 ${m(a+i)} ${m(r)}`,`L ${m(s)} ${m(r)}`,"Z"].join(" ");return te("path",{d:c,fill:t})}function Rj(e,t,n){let r=e.pillTopY+Bm,i=FO(e),o,s;return e.pillMode==="center"?(o=e.x,s="middle"):e.pillMode==="flag-right"?(o=i+as,s="start"):(o=i-as,s="end"),Se({x:m(o),y:m(r),"font-family":n.sans,"font-size":Al,"font-weight":700,fill:t,"text-anchor":s},e.label)}function Aj(e,t,n,r,i){let o=[];e.waveTooltip!==void 0&&o.push(`<title>${Bt(e.waveTooltip)}</title>`);let s=RO(n,e.style.shadow);o.push(vj(e.box.x,e.box.y,e.box.width,e.box.height,e.style,{filter:s??null})),e.waveRole==="background"&&o.push(Yj(e.box,e.style,n));let a=hj(e.style.bg,r),c={done:a.done,"in-progress":a.inProgress,"at-risk":a.atRisk,blocked:a.blocked,planned:a.planned,neutral:a.neutral},l=c[e.status]??c.neutral;if(e.progressFraction>0){let x=Math.max(0,Math.min(e.box.width,e.box.width*e.progressFraction));o.push(te("rect",{x:m(e.box.x),y:m(e.box.y+e.box.height-tr),width:m(x),height:tr,fill:e.style.fg,opacity:.55}))}let u=e.dotSpills&&e.dotSpillCx!==null?e.dotSpillCx:e.box.x+e.box.width-uo;o.push(te("circle",{cx:m(u),cy:m(e.box.y+sg),r:ir,fill:l})),o.push(oE(e.inlineDatePins,e.style.fg));let f;if(e.textSpills)f=e.box.x+e.box.width+Ar,e.iconSpills&&(f+=Ir+In);else{let x=!!e.linkIcon&&e.linkIcon!=="none",E=e.inlineDatePins?.find(w=>w.side==="after"&&!w.spilled)?hi(x,{barWidth:e.box.width}):hi(!t.noLinks&&x&&!e.iconSpills);f=e.box.x+E}let d=e.style.text,p=r.entities.item.text,h=e.textSpills?p:d,g=e.textSpills?p:e.style.fg,T=e.titleLines??(e.title?[e.title]:[]);if(T.forEach((x,y)=>{x!==""&&o.push(Se({x:m(f),y:m(e.box.y+tf+y*Dl),"font-family":i[e.style.font],"font-size":Ll,"font-weight":600,fill:h},x))}),(e.metaText||e.capacity)&&o.push(gj({metaText:e.metaText,capacity:e.capacity,x:f,baselineY:e.box.y+nf(T.length),fontSize:ig,fontFamily:i[e.style.font],color:g})),e.footnoteIndicators.length>0){let x=e.box.y+ag;if(e.footnoteSpills&&e.footnoteSpillStartX!==null){let y=e.footnoteSpillStartX;for(let E=0;E<e.footnoteIndicators.length;E++){let w=e.footnoteIndicators[E];o.push(Se({x:m(y),y:m(x),"font-family":i.sans,"font-size":Fl,"font-weight":700,fill:p},String(w))),y+=An}}else{let y=e.box.x+e.box.width-cs;for(let E=e.footnoteIndicators.length-1;E>=0;E--){let w=e.footnoteIndicators[E];o.push(Se({x:m(y),y:m(x),"font-family":i.sans,"font-size":Fl,"font-weight":700,fill:e.style.text,"text-anchor":"end"},String(w))),y-=An}}}if(!t.noLinks&&e.linkIcon&&e.linkIcon!=="none"){let x={linear:"#5e6ad2",github:"#0f172a",jira:"#0052cc",generic:r.item.linkIconFg},y=x[e.linkIcon]??x.generic,E=Ir,w=e.iconSpills&&e.iconSpillX!==null?e.iconSpillX:e.box.x+fo,b=e.box.y+fo,L=te("rect",{x:m(w),y:m(b),width:E,height:E,rx:2,ry:2,fill:y}),P=w,$=b,G=te("path",{d:`M${m(P+4)} ${m($+10)} L${m(P+10)} ${m($+4)} M${m(P+6)} ${m($+4)} H${m(P+10)} V${m($+8)}`,stroke:"#ffffff",fill:"none","stroke-width":1.1,"stroke-linecap":"round","stroke-linejoin":"round"}),Y=L+G,D=e.linkHref?te("a",{href:e.linkHref,target:"_blank",rel:"noopener"},Y):Y;o.push(D)}if(e.hasOverflow&&e.overflowBox){let x=r.item.overflowTailFill,y=r.item.overflowTailStroke,E=r.item.overflowCaption;o.push(te("rect",{x:m(e.overflowBox.x),y:m(e.overflowBox.y),width:m(e.overflowBox.width),height:m(e.overflowBox.height),fill:x,stroke:y,"stroke-width":1})),e.overflowAnchorId&&e.overflowBox.width>60&&o.push(Se({x:m(e.overflowBox.x+e.overflowBox.width/2),y:m(e.overflowBox.y+e.overflowBox.height/2+3),"font-family":i.sans,"font-size":9,"font-weight":700,fill:E,"text-anchor":"middle"},`past ${e.overflowAnchorId}`))}for(let x of e.labelChips){let y=Math.min(El[x.style.cornerRadius]??8,x.box.height/2);o.push(te("rect",{x:m(x.box.x),y:m(x.box.y),width:m(x.box.width),height:m(x.box.height),rx:m(y),ry:m(y),fill:x.style.bg==="none"?"transparent":x.style.bg,stroke:x.style.fg,"stroke-width":.5})),o.push(Se({x:m(x.box.x+x.box.width/2),y:m(x.box.y+x.box.height/2+3),...iE(x.style,i,ss.xs),"text-anchor":"middle"},x.text))}return te("g",{"data-layer":"item","data-id":e.id??null},o.join(""))}function Ij(e,t,n,r,i){let o=[],s=lo(e.style.bg);if(s){if(o.push(te("rect",{x:m(e.box.x),y:m(e.box.y),width:m(e.box.width),height:m(e.box.height),rx:6,ry:6,fill:e.style.bg,stroke:e.style.fg,"stroke-width":1,"fill-opacity":.18,filter:`url(#${n}-shadow-subtle)`})),e.title){let a=co(e.title),c=e.box.x,l=e.box.y,u=ao,f=6,d=`M${m(c+f)} ${m(l)}H${m(c+a)}V${m(l+u-f)}A${f} ${f} 0 0 1 ${m(c+a-f)} ${m(l+u)}H${m(c)}V${m(l+f)}A${f} ${f} 0 0 1 ${m(c+f)} ${m(l)}Z`;o.push(te("path",{d,fill:e.style.fg})),o.push(Se({x:m(c+Rl),y:m(l+Cm),"font-family":i[e.style.font],"font-size":Om,"font-weight":600,fill:"#ffffff"},e.title))}}else{let a=e.style.fg,c=Ul(s,!!e.title,xj(e.inlineDatePins));if(e.style.bracket!=="none"&&!e.waveOnly){let u=e.box.y+e.box.height,f=e.style.bracket==="dashed"?"3 2":null,d=c>0?`M${m(e.box.x+4)} ${m(e.box.y-c)} L${m(e.box.x)} ${m(e.box.y-c)} L${m(e.box.x)} ${m(u)} L${m(e.box.x+4)} ${m(u)}`:`M${m(e.box.x)} ${m(e.box.y)} L${m(e.box.x)} ${m(u)} L${m(e.box.x+4)} ${m(u)}`;o.push(te("path",{d,fill:"none",stroke:a,"stroke-width":1,"stroke-dasharray":f}))}e.title&&o.push(Se({x:m(mo(e.box.x,ds,DO(e.inlineDatePins))),y:m(e.box.y-af),...iE(e.style,i,Wl),"fill-opacity":.7},e.title))}o.push(oE(e.inlineDatePins,e.style.fg));for(let a of e.children)o.push(sE(a,t,n,r,i));return te("g",{"data-layer":"group","data-id":e.id??null},o.join(""))}function Sj(e,t,n,r,i){let o=[];if(e.style.bracket==="solid"||e.style.bracket==="dashed"){let c=e.box.y-12,l=e.box.y+e.box.height+12,u=e.box.x,f=e.box.x+e.box.width,d=r.parallel.bracketStroke;o.push(te("path",{d:`M${m(u+4)} ${m(c)} H${m(u)} V${m(l)} H${m(u+4)}`,fill:"none",stroke:d,"stroke-width":1.25,"stroke-dasharray":e.style.bracket==="dashed"?"3 3":null,"stroke-linejoin":"round"})),o.push(te("path",{d:`M${m(f-4)} ${m(c)} H${m(f)} V${m(l)} H${m(f-4)}`,fill:"none",stroke:d,"stroke-width":1.25,"stroke-dasharray":e.style.bracket==="dashed"?"3 3":null,"stroke-linejoin":"round"}))}e.title&&o.push(Se({x:m(mo(e.box.x,ps,DO(e.inlineDatePins))),y:m(e.box.y-af),...iE(e.style,i,Wl),"fill-opacity":.7},e.title)),o.push(oE(e.inlineDatePins,e.style.fg));for(let s of e.children)o.push(sE(s,t,n,r,i));return te("g",{"data-layer":"parallel","data-id":e.id??null},o.join(""))}function sE(e,t,n,r,i){return e.kind==="item"?Aj(e,t,n,r,i):e.kind==="group"?Ij(e,t,n,r,i):Sj(e,t,n,r,i)}var NO=2;function Nj(e,t){switch(e){case"green":return t.swimlane.utilizationOk;case"yellow":return t.swimlane.utilizationWarn;case"red":return t.swimlane.utilizationOver}}function Pj(e,t){if(!e.utilization||e.utilization.segments.length===0)return"";let n=e.box.y+e.box.height-NO,r=e.utilization.segments.map(i=>{let o=i.endX-i.startX;return o<=0?"":te("rect",{x:m(i.startX),y:m(n),width:m(o),height:NO,fill:Nj(i.classification,t),"data-utilization":i.classification,"data-load":m(i.load)})});return te("g",{"data-layer":"lane-utilization","data-id":e.id??null},r.join(""))}function Cj(e,t){let n=e.bandIndex%2===0?t.swimlane.rowTintEven:t.swimlane.rowTintOdd,r=t.swimlane.border;return te("g",{"data-layer":"swimlane-bg","data-id":e.id??null},te("rect",{x:m(e.box.x),y:m(e.box.y),width:m(e.box.width),height:m(e.box.height),fill:n,stroke:r,"stroke-width":1}))}function BO(e,t,n,r,i){let o=r.swimlane.tabFill,s=r.swimlane.tabStroke,a=r.swimlane.tabText,c=r.swimlane.ownerText,l=r.swimlane.footnoteIndicator,u=[];if(e.title){let d=e.capacity?oo(e.capacity.text,e.capacity.icon,10):0,p=e.footnoteIndicators.length>0?e.footnoteIndicators.join(","):"",h=p?xm(p,10):0,g=Xl(e.box.x,e.title,e.owner,d,h),T=Uu,x=e.box.y+10,y=x+Xu;u.push(te("rect",{x:m(g.tabX),y:m(x),width:m(g.tabW),height:m(T),rx:4,ry:4,fill:o,stroke:s,"stroke-width":1})),u.push(Se({x:m(g.titleX),y:m(y),"font-family":i[e.style.font],"font-size":12,"font-weight":600,fill:a},e.title)),e.owner&&u.push(Se({x:m(g.ownerX),y:m(y),"font-family":i[e.style.font],"font-size":10,fill:c},`owner: ${e.owner}`)),e.capacity&&u.push(LO(e.capacity,void 0,g.badgeX,y,10,i[e.style.font],c)),p&&u.push(Se({x:m(g.footnoteRightX),y:m(x+14),"font-family":i.sans,"font-size":10,"font-weight":700,fill:l,"text-anchor":"end"},p))}for(let f of e.children)u.push(sE(f,t,n,r,i));return u.push(Pj(e,r)),te("g",{"data-layer":"swimlane","data-id":e.id??null},u.join(""))}function Oj(e,t,n){let r=e.radius,i=e.center.x,o=e.center.y,s=t.anchorDiamond.fill,a=t.anchorDiamond.stroke,c=te("path",{d:`M${m(i)} ${m(o-r)} L${m(i+r)} ${m(o)} L${m(i)} ${m(o+r)} L${m(i-r)} ${m(o)} Z`,fill:s,stroke:a,"stroke-width":1.25}),l=t.anchorDiamond.label,u=e.labelSide==="left"?e.labelBox.x+e.labelBox.width:e.labelBox.x,f={x:m(u),y:m(o+4),"font-family":n.sans,"font-size":10,fill:l};e.labelSide==="left"&&(f["text-anchor"]="end");let d=e.title?Se(f,e.title):"";return te("g",{"data-layer":"anchor","data-id":e.id??null},WO(e.hiddenDate)+c+d)}function $j(e,t){let n=t.anchorDiamond.cutLine;return te("line",{x1:m(e.center.x),y1:m(e.center.y+e.radius+1),x2:m(e.center.x),y2:m(e.cutBottomY),stroke:n,"stroke-width":1,"stroke-dasharray":"1 3"})}function Lj(e,t,n){let r=e.center.x,i=e.center.y,o=e.radius,s=t.milestoneDiamond.fill,a=te("path",{d:`M${m(r)} ${m(i-o)} L${m(r+o)} ${m(i)} L${m(r)} ${m(i+o)} L${m(r-o)} ${m(i)} Z`,fill:s,stroke:s,"stroke-width":1}),c=t.milestoneDiamond.label,l=e.labelSide==="left"?e.labelBox.x+e.labelBox.width:e.labelBox.x,u={x:m(l),y:m(i+4),"font-family":n.sans,"font-size":10,"font-weight":600,fill:c};e.labelSide==="left"&&(u["text-anchor"]="end");let f=e.title?Se(u,e.title):"";return te("g",{"data-layer":"milestone","data-id":e.id??null},WO(e.hiddenDate)+a+f)}function WO(e){return e===void 0?"":`<title>${Bt(e)}</title>`}function Dj(e,t,n){let r=e.isOverrun?n.milestoneDiamond.cutLineOverrun:n.milestoneDiamond.cutLineNormal,i=[];if(e.onWaveBoundary||i.push(te("line",{x1:m(e.center.x),y1:m(e.center.y+e.radius+1),x2:m(e.center.x),y2:m(e.cutBottomY),stroke:r,"stroke-width":2,"stroke-dasharray":Gu,"stroke-linecap":"round"})),e.slackArrows&&e.slackArrows.length>0){let o=n.milestoneDiamond.slack;for(let s of e.slackArrows)i.push(te("path",{d:`M${m(s.x)} ${m(s.y)} H${m(e.center.x-6)}`,fill:"none",stroke:o,"stroke-width":1.1,"stroke-dasharray":"3 3","stroke-linecap":"round","marker-end":`url(#${t}-arrow-dark)`}))}return i.join("")}function PO(e,t,n){let r=e.kind==="overflow"?n.dependency.overflowStroke:n.dependency.edgeStroke,i=e.waypoints;if(i.length<2)return"";let o=e.kind==="underBar"?.8:1.1;return te("path",{d:Mj(i,zm),fill:"none",stroke:r,"stroke-width":o,"stroke-dasharray":e.kind==="overflow"?"4 2":null,"stroke-linejoin":"round","marker-end":`url(#${t}-arrow)`})}function Mj(e,t){if(e.length<2)return"";let n=[`M${m(e[0].x)} ${m(e[0].y)}`];for(let r=1;r<e.length;r++){let i=e[r-1],o=e[r];if(r===e.length-1){n.push(`L${m(o.x)} ${m(o.y)}`);continue}let s=e[r+1],a=Math.sign(o.x-i.x),c=Math.sign(o.y-i.y),l=Math.sign(s.x-o.x),u=Math.sign(s.y-o.y),f=Math.hypot(o.x-i.x,o.y-i.y),d=Math.hypot(s.x-o.x,s.y-o.y),p=Math.min(t,f/2,d/2);if(p<=0||a!==0&&l!==0||c!==0&&u!==0){n.push(`L${m(o.x)} ${m(o.y)}`);continue}let h={x:o.x-a*p,y:o.y-c*p},g={x:o.x+l*p,y:o.y+u*p};n.push(`L${m(h.x)} ${m(h.y)}`),n.push(`Q${m(o.x)} ${m(o.y)} ${m(g.x)} ${m(g.y)}`)}return n.join(" ")}function Fj(e,t,n,r){if(e.entries.length===0)return"";let i=n.footnotePanel.fill,o=n.footnotePanel.border,s=n.footnotePanel.header,a=n.footnotePanel.title,c=n.footnotePanel.description,l=n.footnotePanel.number,u=[];u.push(te("rect",{x:m(e.box.x),y:m(e.box.y),width:m(e.box.width),height:m(e.box.height),rx:6,ry:6,fill:i,stroke:o,"stroke-width":1,filter:`url(#${t}-shadow-subtle)`})),u.push(Se({x:m(e.box.x+Fn),y:m(e.box.y+Um),"font-family":r.sans,"font-size":12,"font-weight":700,fill:s},"Footnotes"));let f=e.box.y+Il+Fn,d=e.box.x+Fn,p=d+Fn;return e.entries.forEach((h,g)=>{let T=f+g*Sl;u.push(Se({x:m(d),y:m(T),"font-family":r.sans,"font-size":10,"font-weight":700,fill:l},String(h.number))),u.push(Se({x:m(p),y:m(T),"font-family":r.sans,"font-size":11,"font-weight":600,fill:a},h.title)),h.description&&u.push(Se({x:m(p+Math.max(120,h.title.length*6)),y:m(T),"font-family":r.sans,"font-size":11,fill:c},`\u2014 ${h.description}`))}),te("g",{"data-layer":"footnotes"},u.join(""))}function Bj(e,t,n,r,i,o){let s=r.includeRegion.border,a=r.includeRegion.fill,c=r.includeRegion.tabFill,l=r.includeRegion.tabStroke,u=r.includeRegion.tabText,f=r.includeRegion.badgeFill,d=r.includeRegion.badgeStroke,p=r.includeRegion.badgeText,h=e.box.x+8,g=e.box.y,T=e.box.width-16,x=e.box.height,y=te("rect",{x:m(h),y:m(g),width:m(T),height:m(x),rx:8,ry:8,fill:a,stroke:s,"stroke-width":1,"stroke-dasharray":Gu}),E=Uu,w=Gl(e.box.x,e.label,e.sourcePath),b=g-E/2,L=te("rect",{x:m(w.tabX),y:m(b),width:m(w.tabWidth),height:E,rx:4,ry:4,fill:c,stroke:l,"stroke-width":1}),P=Se({x:m(w.tabLabelX),y:m(b+Xu),"font-family":i.sans,"font-size":11,"font-weight":600,fill:u},e.label),$=w.badgeX,G=w.badgeSize,Y=g-G/2,D=te("rect",{x:m($),y:m(Y),width:G,height:G,rx:4,ry:4,fill:f,stroke:d,"stroke-width":1}),S=te("path",{d:`M${m($+7)} ${m(Y+4)} H${m($+14)} V${m(Y+11)} M${m($+4)} ${m(Y+7)} H${m($+11)} V${m(Y+14)} H${m($+4)} Z`,stroke:p,"stroke-width":1.4,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}),F=9,X=g+4,R=te("rect",{x:m(w.sourceHaloX),y:m(X-F),width:m(w.sourceHaloWidth),height:F+6,fill:a}),C=Se({x:m(w.sourceTextX),y:m(X),"font-family":i.mono,"font-size":F,fill:p},e.sourcePath),N={x:h,y:g,width:T,height:x},j=o?MO(o.timeline,o.chartBox.y,r,N):"",q=o?.waves?jO(o.waves,N)+HO(o.waveBoundaries,N):"",z=o?.waves?zO(e.waveCrossings):"",ne=e.nestedSwimlanes.map(oe=>BO(oe,t,n,r,i)).join("");return te("g",{"data-layer":"include"},y+j+q+ne+z+L+P+D+S+R+C)}function Wj(e,t){let n=e.palette.attribution.mark,r=e.palette.attribution.link;if(e.swimlanes.length===0)return"";let i=e.header.attributionBox.x,o=e.header.attributionBox.y,s=pi,a=Se({x:"0",y:s,"font-family":t.sans,"font-size":qu,"font-weight":400,fill:n},zu)+Se({x:Pl,y:s,"font-family":t.sans,"font-size":pi,"font-weight":700,fill:n},"now")+te("rect",{x:Gm,y:12,width:jm,height:pi,fill:r})+Se({x:Vu,y:s,"font-family":t.sans,"font-size":pi,"font-weight":400,fill:n},"ine"),c=te("g",{transform:`translate(${m(i)} ${m(o)}) scale(${m(Nl)})`},a);return te("a",{href:Xm,target:"_blank",rel:"noopener","aria-label":"Powered by nowline"},te("g",{"data-layer":"attribution"},c))}async function Uj(e,t,n,r,i,o,s){if(!t)return"";let a;try{a=await t(e)}catch(u){let f=`logo: failed to load ${e}: ${u instanceof Error?u.message:String(u)}`;if(r.strict)throw u;return r.warn?.(f),""}let c=(a.mime??"").toLowerCase();if(c==="image/svg+xml"){let u=new TextDecoder().decode(a.bytes),f=EO(u,{idPrefix:`${n}-logo`,onWarn:r.warn});return te("g",{transform:`translate(${m(i)} ${m(o)})`},f)}if(c==="image/png"||c==="image/jpeg"||c==="image/jpg"||c==="image/webp"){let u=Xj(a.bytes);return te("image",{href:`data:${c};base64,${u}`,x:m(i),y:m(o),width:m(s),height:m(s),preserveAspectRatio:"xMidYMid meet"})}let l=`logo: unsupported mime ${c} for ${e}`;if(r.strict)throw new Error(l);return r.warn?.(l),""}function Xj(e){if(typeof btoa<"u"){let n="";for(let r=0;r<e.length;r++)n+=String.fromCharCode(e[r]);return btoa(n)}let t=globalThis;if(t.Buffer)return t.Buffer.from(e).toString("base64");throw new Error("renderer: no base64 encoder available")}var Gj=.24,gm=2,CO=3,jj=4,Hj=8,zj=10;function UO(e){return e.bg==="none"?"transparent":e.bg}function vm(e){return $O(e)>=Gj?"dark":"light"}function XO(e,t){return`url(#${e}-wave-hatch-${t})`}function qj(e,t,n){let r=Jm;return te("pattern",{id:`${e}-wave-hatch-${t}`,width:r,height:r,patternUnits:"userSpaceOnUse",patternTransform:"rotate(45)"},te("line",{x1:m(r/2),y1:0,x2:m(r/2),y2:r,stroke:t==="dark"?n.wave.hatch:n.wave.hatchOnDark,"stroke-width":Qm,opacity:Zm}))}function Vj(e){if(!e.waves)return[];let t=new Set,n=i=>{for(let o of i)o.kind==="item"?o.waveRole==="background"&&t.add(vm(UO(o.style))):n(o.children)},r=i=>{for(let o of i)n(o.children),r(o.nested)};r(e.swimlanes);for(let i of e.includes)r(i.nestedSwimlanes);return e.waveLegend?.entries.some(i=>i.kind==="background")&&t.add(vm(qO(e.palette))),["dark","light"].filter(i=>t.has(i))}function Yj(e,t,n){let i=Math.min(El[t.cornerRadius]??4,e.height/2);return te("rect",{x:m(e.x+.5),y:m(e.y+.5),width:m(Math.max(0,e.width-2*.5)),height:m(Math.max(0,e.height-2*.5)),rx:m(i),ry:m(i),fill:XO(n,vm(UO(t)))})}function aE(e,t){let n=Math.max(e.x,t.x),r=Math.max(e.y,t.y),i=Math.min(e.x+e.width,t.x+t.width),o=Math.min(e.y+e.height,t.y+t.height);if(!(i<=n||o<=r))return{x:n,y:r,width:i-n,height:o-r}}var nE=4,ym=.5;function GO(e,t){if(e.empty)return;let n=ym;return aE({x:e.strip.box.x,y:e.strip.box.y+n,width:e.strip.box.width,height:e.strip.box.height-2*n},{x:t.box.x+n,y:e.strip.box.y,width:t.box.width-2*n,height:e.strip.box.height})}function Kj(e,t){let n=Math.min(nE-ym,e.width/2,e.height/2),r=1e-6;return{left:e.x<=t.box.x+ym+r?n:0,right:e.x+e.width>=t.box.x+t.box.width-ym-r?n:0}}function Zj(e,t){let{x:n,y:r,width:i,height:o}=e,s=(a,c,l)=>a>0?` A${m(a)} ${m(a)} 0 0 1 ${m(c)} ${m(l)}`:"";return`M${m(n+t.left)} ${m(r)} H${m(n+i-t.right)}`+s(t.right,n+i,r+t.right)+` V${m(r+o-t.right)}`+s(t.right,n+i-t.right,r+o)+` H${m(n+t.left)}`+s(t.left,n,r+o-t.left)+` V${m(r+t.left)}`+s(t.left,n+t.left,r)+" Z"}function rE(e,t,n){let r=o=>n&&(n.left>0||n.right>0)?te("path",{d:Zj(t,n),...o}):te("rect",{x:m(t.x),y:m(t.y),width:m(t.width),height:m(t.height),...o}),i=r({fill:e.style.stripFill});return e.style.tint?i+r({fill:e.style.tint,"fill-opacity":Cl}):i}function Jj(e,t){let n=e.timeline,r=n.waveStrip;if(!e.waves||!r)return"";let i=[te("rect",{x:m(n.box.x),y:m(r.y),width:m(n.box.width),height:m(r.height),rx:nE,ry:nE,fill:t.timeline.panelFill,stroke:t.timeline.border,"stroke-width":1})];for(let o of e.waves){let s=GO(o,n);s&&i.push(te("g",{"data-id":o.id},`<title>${Bt(o.strip.tooltip)}</title>${rE(o,s,Kj(s,n))}`))}return te("g",{"data-layer":"wave-strip"},i.join(""))}function jO(e,t){let n=[];for(let r of e){if(!r.style.tint||r.empty)continue;let i=t?aE(r.columnBox,t):r.columnBox;!i||i.width<=0||i.height<=0||n.push(te("rect",{x:m(i.x),y:m(i.y),width:m(i.width),height:m(i.height),fill:r.style.tint,"fill-opacity":eg}))}return n.length===0?"":te("g",{"data-layer":"wave-bg"},n.join(""))}function HO(e,t){let n=[];for(let r of e??[]){let i=r.topY,o=r.bottomY;t&&(r.x<=t.x||r.x>=t.x+t.width||(i=Math.max(i,t.y),o=Math.min(o,t.y+t.height),o<=i))||n.push(te("line",{x1:m(r.x),y1:m(i),x2:m(r.x),y2:m(o),stroke:r.stroke,"stroke-width":Yu,"stroke-dasharray":r.dash}))}return n.length===0?"":te("g",{"data-layer":"wave-boundary"},n.join(""))}function OO(e,t){let n=xm(e,nr);return t?n*1.05:n}function Qj(e,t,n){let r=e.timeline,i=r.waveStrip;if(!e.waves||!i)return"";let o=i.y+i.height/2+jj,s=i.y+CO,a=i.height-2*CO,c=[],l=(u,f)=>{let d=OO(f,!1)+2*gm;return te("rect",{x:m(u-d/2),y:m(s),width:m(d),height:m(a),fill:t.timeline.panelFill})+Se({x:m(u),y:m(o),"font-family":n.sans,"font-size":nr,"font-style":"italic",fill:t.wave.labelMuted,"text-anchor":"middle"},f)};i.placeholder!==void 0&&c.push(l(r.box.x+r.box.width/2,i.placeholder));for(let u of e.waves){if(u.strip.gapLabel){let{text:h,x:g}=u.strip.gapLabel;c.push(l(g,h))}if(u.strip.marker){let{x:h,y:g}=u.strip.marker,T=tg/2;c.push(te("path",{d:`M${m(h)} ${m(g-T)} L${m(h+T)} ${m(g)} L${m(h)} ${m(g+T)} L${m(h-T)} ${m(g)} Z`,fill:t.timeline.panelFill,stroke:t.wave.boundary,"stroke-width":1.5},`<title>${Bt(u.strip.tooltip)}</title>`))}let f=GO(u,r);if(!f)continue;let d=f.x+f.width,p=u.strip.footnotesShown?u.footnoteIndicators.length*An:0;if(p){let h=d-br+gm,g=d-br-p-gm;c.push(rE(u,{x:g,y:s,width:h-g,height:a}))}if(u.strip.label!==void 0){let h=OO(u.strip.label,!0),g=p?Math.min(u.strip.labelX,d-br-p-h/2):u.strip.labelX,T=h+2*gm;c.push(rE(u,{x:g-T/2,y:s,width:T,height:a})),c.push(Se({x:m(g),y:m(o),"font-family":n.sans,"font-size":nr,"font-weight":600,fill:u.style.text,"text-anchor":"middle"},u.strip.label))}if(u.strip.footnotesShown){let h=d-br;for(let g=u.footnoteIndicators.length-1;g>=0;g--)c.push(Se({x:m(h),y:m(i.y+zj),"font-family":n.sans,"font-size":Hj,"font-weight":700,fill:u.style.text,"text-anchor":"end"},String(u.footnoteIndicators[g]))),h-=An}}return c.length===0?"":te("g",{"data-layer":"wave-labels"},c.join(""))}function zO(e){if(!e||e.length===0)return"";let t=e.map(n=>te("line",{x1:m(n.x),y1:m(n.topY),x2:m(n.x),y2:m(n.bottomY),stroke:n.stroke,"stroke-width":1,"stroke-dasharray":Km}));return te("g",{"data-layer":"wave-cross"},t.join(""))}function qO(e){let t=e.entities.item.bg;return t==="none"?"transparent":t}function eH(e,t,n,r){if(!e)return"";let i=[];for(let o of e.entries){let s=o.swatch;if(s&&o.kind==="background"){let a=qO(n),c={x:m(s.x),y:m(s.y),width:m(s.width),height:m(s.height)};i.push(te("rect",{...c,rx:2,ry:2,fill:a,stroke:n.entities.item.fg,"stroke-width":1})),i.push(te("rect",{x:m(s.x+.5),y:m(s.y+.5),width:m(s.width-1),height:m(s.height-1),rx:2,ry:2,fill:XO(t,vm(a))}))}else if(s&&o.kind==="boundary"){let a=s.x+s.width/2;i.push(te("line",{x1:m(a),y1:m(s.y),x2:m(a),y2:m(s.y+s.height),stroke:n.wave.boundary,"stroke-width":Yu}))}for(let a of o.runs)i.push(Se({x:m(a.x),y:m(a.y),"font-family":r.sans,"font-size":nr,fill:n.wave.labelText},a.text))}return te("g",{"data-layer":"wave-legend"},i.join(""))}async function lE(e,t={}){let r=new mm(t.idPrefix??"nl").next("root"),i=e.palette,o=t.fontFamilies??qm,s=[],a=i.arrowhead.neutral,c=i.arrowhead.light,l=i.arrowhead.dark,u=(p,h)=>`<marker id="${p}" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M 0 0 L 10 5 L 0 10 z" fill="${h}"/></marker>`,f=`<defs>${AO(r)}`+u(`${r}-arrow`,a)+u(`${r}-arrow-light`,c)+u(`${r}-arrow-dark`,l)+Vj(e).map(p=>qj(r,p,i)).join("")+"</defs>";s.push(f),s.push(te("rect",{x:0,y:0,width:m(e.width),height:m(e.height),fill:e.backgroundColor})),s.push(_j(e.timeline,i,o)),s.push(Jj(e,i));for(let p of e.swimlanes)s.push(Cj(p,i));s.push(MO(e.timeline,e.chartBox.y,i)),e.waves&&s.push(jO(e.waves)),s.push(wj(e.timeline,e.chartBox.y,i)),s.push(HO(e.waveBoundaries)),s.push(Qj(e,i,o));for(let p of e.edges)p.kind==="underBar"&&s.push(PO(p,r,i));for(let p of e.swimlanes)s.push(BO(p,t,r,i,o));for(let p of e.includes)s.push(Bj(p,t,r,i,o,e));s.push(zO(e.waveCrossings));for(let p of e.edges)p.kind!=="underBar"&&s.push(PO(p,r,i));for(let p of e.anchors)s.push($j(p,i));for(let p of e.milestones)s.push(Dj(p,r,i));s.push(Ej(e.timeline,i,o));for(let p of e.anchors)s.push(Oj(p,i,o));for(let p of e.milestones)s.push(Lj(p,i,o));if(s.push(bj(e.nowline,i,o)),s.push(Fj(e.footnotes,r,i,o)),s.push(eH(e.waveLegend,r,i,o)),s.push(Tj(e.header,r,i,o)),s.push(Wj(e,o)),e.header.logo&&t.assetResolver){let p=await Uj(e.header.logo.assetRef??"",t.assetResolver,r,t,e.header.logo.box.x,e.header.logo.box.y,Math.max(e.header.logo.box.width,e.header.logo.box.height));p&&s.push(p)}return`<svg${hl({xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${m(e.width)} ${m(e.height)}`,width:m(e.width),height:m(e.height),"data-theme":e.theme,"data-generator":"nowline"})}>${s.join("")}</svg>`}var cE="/browser-source.nowline",tH={error:3,warning:2,info:1},nH={error:3,warning:2,info:1};function VO(e,t){return tH[e]>=nH[t]}var Tm,YO=0;function KO(){return Tm||(Tm=hw()),Tm}function rH(){return yt.parse(`memory:///nowline-browser-${++YO}.nowline`)}async function wm(e,t={}){let n=t.filePath??cE,r=KO(),o=r.shared.workspace.LangiumDocumentFactory.fromString(e,rH());await r.shared.workspace.DocumentBuilder.build([o],{validation:!0});let s=[];for(let a of mg(o))a.origin==="lexer"?s.push(mO(a.error,n)):a.origin==="parser"?s.push(hO(a.error,n)):s.push(pO(a.diagnostic,n));return{ast:o.parseResult.value,diagnostics:s}}async function uE(e,t={}){let n=t.filePath??cE,r=await wm(e,{filePath:n});if(r.diagnostics.some(E=>E.severity==="error"))return{kind:"diagnostics",diagnostics:r.diagnostics};let i=KO(),o=t.readFile??TO,s=await uw(r.ast,n,{services:i.Nowline,readFile:o}),a=s.diagnostics.some(E=>E.severity==="error"&&!al(E)&&!tE(E.message)),c=[...r.diagnostics];for(let E of s.diagnostics){if(E.severity==="error"&&tE(E.message)){t.onSkippedInclude?.({sourcePath:E.sourcePath,message:E.message});continue}a&&al(E)||c.push(gO(E))}if(c.some(E=>E.severity==="error"))return{kind:"diagnostics",diagnostics:c};let l;if(t.timezone)try{l=Qw(t.timezone)}catch(E){if(E instanceof es)return{kind:"diagnostics",diagnostics:[{severity:"error",code:"invalid-timezone",message:E.message,file:n,line:1,column:1}]};throw E}let u=eE({now:t.today,zone:l}),f=Yw(r.ast,s,{theme:t.theme,today:u,locale:t.locale,width:t.width,nonWorking:t.nonWorking}),d=t.diagnosticLevel??"error",p=Jw(f,{today:u??void 0,locale:t.locale??"en-US"}).map(E=>xO(E,n)),h=t.showLinks!==!1,g=t.strict===!0,T=[],x=await lE(f,{idPrefix:t.idPrefix,assetResolver:t.assetResolver,noLinks:!h,strict:g,warn:E=>T.push(E),fontFamilies:t.fontFamilies}),y=[...p,...T.map(E=>yO(E,n,g?"error":"warning"))].filter(E=>VO(E.severity,d));return g&&y.length>0?{kind:"diagnostics",diagnostics:[...c,...y]}:{kind:"svg",svg:x,warnings:y}}function fE(){Tm=void 0,YO=0}var ZO="/embed.nowline",dE=!1;async function JO(e){let{ast:t,diagnostics:n}=await wm(e,{filePath:ZO});return{ast:t,errors:n.filter(r=>r.severity==="error").map(r=>r.message)}}async function Em(e,t={}){let n={filePath:ZO,theme:t.theme,today:t.today,timezone:t.timezone,locale:t.locale,width:t.width,nonWorking:t.nonWorking,idPrefix:t.idPrefix,onSkippedInclude:()=>{dE||(dE=!0,console.warn("nowline: `include` directives are skipped in the browser embed (single-file mode). Render multi-file roadmaps with the CLI or the GitHub Action."))}},r=await uE(e,n);if(r.kind==="svg")return r.svg;let i=r.diagnostics.filter(o=>o.severity==="error").map(o=>o.message);throw new Pu(`Failed to render Nowline source: ${i.join("; ")}`,i)}var Pu=class extends Error{constructor(n,r){super(n);I(this,"details",r);this.name="EmbedRenderError"}};function QO(){dE=!1,fE()}var Qn=Uint8Array,kn=Uint16Array,yE=Int32Array,xE=new Qn([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),vE=new Qn([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),e$=new Qn([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),i$=function(e,t){for(var n=new kn(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];for(var i=new yE(n[30]),r=1;r<30;++r)for(var o=n[r];o<n[r+1];++o)i[o]=o-n[r]<<5|r;return{b:n,r:i}},o$=i$(xE,2),iH=o$.b,hE=o$.r;iH[28]=258,hE[258]=28;var s$=i$(vE,0),dle=s$.b,t$=s$.r,mE=new kn(32768);for(Me=0;Me<32768;++Me)ii=(Me&43690)>>1|(Me&21845)<<1,ii=(ii&52428)>>2|(ii&13107)<<2,ii=(ii&61680)>>4|(ii&3855)<<4,mE[Me]=((ii&65280)>>8|(ii&255)<<8)>>1;var ii,Me,$u=(function(e,t,n){for(var r=e.length,i=0,o=new kn(t);i<r;++i)e[i]&&++o[e[i]-1];var s=new kn(t);for(i=1;i<t;++i)s[i]=s[i-1]+o[i-1]<<1;var a;if(n){a=new kn(1<<t);var c=15-t;for(i=0;i<r;++i)if(e[i])for(var l=i<<4|e[i],u=t-e[i],f=s[e[i]-1]++<<u,d=f|(1<<u)-1;f<=d;++f)a[mE[f]>>c]=l}else for(a=new kn(r),i=0;i<r;++i)e[i]&&(a[i]=mE[s[e[i]-1]++]>>15-e[i]);return a}),ts=new Qn(288);for(Me=0;Me<144;++Me)ts[Me]=8;var Me;for(Me=144;Me<256;++Me)ts[Me]=9;var Me;for(Me=256;Me<280;++Me)ts[Me]=7;var Me;for(Me=280;Me<288;++Me)ts[Me]=8;var Me,_m=new Qn(32);for(Me=0;Me<32;++Me)_m[Me]=5;var Me,oH=$u(ts,9,0);var sH=$u(_m,5,0);var a$=function(e){return(e+7)/8|0},aH=function(e,t,n){return(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length),new Qn(e.subarray(t,n))};var oi=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8},Cu=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8,e[r+2]|=n>>16},pE=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,o=n.slice();if(!i)return{t:c$,l:0};if(i==1){var s=new Qn(n[0].s+1);return s[n[0].s]=1,{t:s,l:1}}n.sort(function(b,L){return b.f-L.f}),n.push({s:-1,f:25001});var a=n[0],c=n[1],l=0,u=1,f=2;for(n[0]={s:-1,f:a.f+c.f,l:a,r:c};u!=i-1;)a=n[n[l].f<n[f].f?l++:f++],c=n[l!=u&&n[l].f<n[f].f?l++:f++],n[u++]={s:-1,f:a.f+c.f,l:a,r:c};for(var d=o[0].s,r=1;r<i;++r)o[r].s>d&&(d=o[r].s);var p=new kn(d+1),h=gE(n[u-1],p,0);if(h>t){var r=0,g=0,T=h-t,x=1<<T;for(o.sort(function(L,P){return p[P.s]-p[L.s]||L.f-P.f});r<i;++r){var y=o[r].s;if(p[y]>t)g+=x-(1<<h-p[y]),p[y]=t;else break}for(g>>=T;g>0;){var E=o[r].s;p[E]<t?g-=1<<t-p[E]++-1:++r}for(;r>=0&&g;--r){var w=o[r].s;p[w]==t&&(--p[w],++g)}h=t}return{t:new Qn(p),l:h}},gE=function(e,t,n){return e.s==-1?Math.max(gE(e.l,t,n+1),gE(e.r,t,n+1)):t[e.s]=n},n$=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new kn(++t),r=0,i=e[0],o=1,s=function(c){n[r++]=c},a=1;a<=t;++a)if(e[a]==i&&a!=t)++o;else{if(!i&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(i),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(i);o=1,i=e[a]}return{c:n.subarray(0,r),n:t}},Ou=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},l$=function(e,t,n){var r=n.length,i=a$(t+2);e[i]=r&255,e[i+1]=r>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var o=0;o<r;++o)e[i+o+4]=n[o];return(i+4+r)*8},r$=function(e,t,n,r,i,o,s,a,c,l,u){oi(t,u++,n),++i[256];for(var f=pE(i,15),d=f.t,p=f.l,h=pE(o,15),g=h.t,T=h.l,x=n$(d),y=x.c,E=x.n,w=n$(g),b=w.c,L=w.n,P=new kn(19),$=0;$<y.length;++$)++P[y[$]&31];for(var $=0;$<b.length;++$)++P[b[$]&31];for(var G=pE(P,7),Y=G.t,D=G.l,S=19;S>4&&!Y[e$[S-1]];--S);var F=l+5<<3,X=Ou(i,ts)+Ou(o,_m)+s,R=Ou(i,d)+Ou(o,g)+s+14+3*S+Ou(P,Y)+2*P[16]+3*P[17]+7*P[18];if(c>=0&&F<=X&&F<=R)return l$(t,u,e.subarray(c,c+l));var C,N,j,q;if(oi(t,u,1+(R<X)),u+=2,R<X){C=$u(d,p,0),N=d,j=$u(g,T,0),q=g;var z=$u(Y,D,0);oi(t,u,E-257),oi(t,u+5,L-1),oi(t,u+10,S-4),u+=14;for(var $=0;$<S;++$)oi(t,u+3*$,Y[e$[$]]);u+=3*S;for(var ne=[y,b],oe=0;oe<2;++oe)for(var he=ne[oe],$=0;$<he.length;++$){var re=he[$]&31;oi(t,u,z[re]),u+=Y[re],re>15&&(oi(t,u,he[$]>>5&127),u+=he[$]>>12)}}else C=oH,N=ts,j=sH,q=_m;for(var $=0;$<a;++$){var ae=r[$];if(ae>255){var re=ae>>18&31;Cu(t,u,C[re+257]),u+=N[re+257],re>7&&(oi(t,u,ae>>23&31),u+=xE[re]);var k=ae&31;Cu(t,u,j[k]),u+=q[k],k>3&&(Cu(t,u,ae>>5&8191),u+=vE[k])}else Cu(t,u,C[ae]),u+=N[ae]}return Cu(t,u,C[256]),u+N[256]},lH=new yE([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),c$=new Qn(0),cH=function(e,t,n,r,i,o){var s=o.z||e.length,a=new Qn(r+s+5*(1+Math.ceil(s/7e3))+i),c=a.subarray(r,a.length-i),l=o.l,u=(o.r||0)&7;if(t){u&&(c[0]=o.r>>3);for(var f=lH[t-1],d=f>>13,p=f&8191,h=(1<<n)-1,g=o.p||new kn(32768),T=o.h||new kn(h+1),x=Math.ceil(n/3),y=2*x,E=function(xe){return(e[xe]^e[xe+1]<<x^e[xe+2]<<y)&h},w=new yE(25e3),b=new kn(288),L=new kn(32),P=0,$=0,G=o.i||0,Y=0,D=o.w||0,S=0;G+2<s;++G){var F=E(G),X=G&32767,R=T[F];if(g[X]=R,T[F]=X,D<=G){var C=s-G;if((P>7e3||Y>24576)&&(C>423||!l)){u=r$(e,c,0,w,b,L,$,Y,S,G-S,u),Y=P=$=0,S=G;for(var N=0;N<286;++N)b[N]=0;for(var N=0;N<30;++N)L[N]=0}var j=2,q=0,z=p,ne=X-R&32767;if(C>2&&F==E(G-ne))for(var oe=Math.min(d,C)-1,he=Math.min(32767,G),re=Math.min(258,C);ne<=he&&--z&&X!=R;){if(e[G+j]==e[G+j-ne]){for(var ae=0;ae<re&&e[G+ae]==e[G+ae-ne];++ae);if(ae>j){if(j=ae,q=ne,ae>oe)break;for(var k=Math.min(ne,ae-2),O=0,N=0;N<k;++N){var B=G-ne+N&32767,H=g[B],J=B-H&32767;J>O&&(O=J,R=B)}}}X=R,R=g[X],ne+=X-R&32767}if(q){w[Y++]=268435456|hE[j]<<18|t$[q];var V=hE[j]&31,ie=t$[q]&31;$+=xE[V]+vE[ie],++b[257+V],++L[ie],D=G+j,++P}else w[Y++]=e[G],++b[e[G]]}}for(G=Math.max(G,D);G<s;++G)w[Y++]=e[G],++b[e[G]];u=r$(e,c,l,w,b,L,$,Y,S,G-S,u),l||(o.r=u&7|c[u/8|0]<<3,u-=7,o.h=T,o.p=g,o.i=G,o.w=D)}else{for(var G=o.w||0;G<s+l;G+=65535){var le=G+65535;le>=s&&(c[u/8|0]=l,le=s),u=l$(c,u+1,e.subarray(G,le))}o.i=s}return aH(a,0,r+a$(u)+i)};var u$=function(){var e=1,t=0;return{p:function(n){for(var r=e,i=t,o=n.length|0,s=0;s!=o;){for(var a=Math.min(s+2655,o);s<a;++s)i+=r+=n[s];r=(r&65535)+15*(r>>16),i=(i&65535)+15*(i>>16)}e=r,t=i},d:function(){return e%=65521,t%=65521,(e&255)<<24|(e&65280)<<8|(t&255)<<8|t>>8}}},uH=function(e,t,n,r,i){if(!i&&(i={l:1},t.dictionary)){var o=t.dictionary.subarray(-32768),s=new Qn(o.length+e.length);s.set(o),s.set(e,o.length),e=s,i.w=o.length}return cH(e,t.level==null?6:t.level,t.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,n,r,i)};var f$=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};var fH=function(e,t){var n=t.level,r=n==0?0:n<6?1:n==9?3:2;if(e[0]=120,e[1]=r<<6|(t.dictionary&&32),e[1]|=31-(e[0]<<8|e[1])%31,t.dictionary){var i=u$();i.p(t.dictionary),f$(e,2,i.d())}};function d$(e,t){t||(t={});var n=u$();n.p(e);var r=uH(e,t,t.dictionary?6:2,4);return fH(r,t),f$(r,r.length-4,n.d()),r}var dH=typeof TextDecoder<"u"&&new TextDecoder,pH=0;try{dH.decode(c$,{stream:!0}),pH=1}catch{}var m$="https://free.nowline.io/open";function p$(e){let t=new TextEncoder().encode(e),n=d$(t),r=32768,i="";for(let o=0;o<n.length;o+=r)i+=String.fromCharCode(...n.subarray(o,o+r));return btoa(i).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function TE({source:e,sourceUrl:t,share:n}){if(n===!1||n==="none")return null;if(typeof n=="object")return t!==void 0&&h$(t)?n.remoteUrl.replace("{url}",encodeURIComponent(t)):n.textUrl.replace("{text}",p$(e));let r=n===!0?m$:n,i=new URL(r);return t!==void 0&&h$(t)?i.hash=`url=${encodeURIComponent(t)}`:i.hash=`text=${p$(e)}`,i.toString()}function h$(e){try{return new URL(e).protocol==="https:"}catch{return!1}}var g$=0;async function y$(e){let t=e.document??globalThis.document;if(!t)return{rendered:0,failed:0};let n=t.querySelectorAll(e.selector),r=0,i=0,o=++g$,s=e.share??!0,a=[],c=0;for(let l of Array.from(n)){let u=hH(l);if(!u)continue;let f=mH(l),d=`nl-r${o}-${c++}`,p={theme:e.theme,locale:e.locale,width:e.width,nonWorking:e.nonWorking,today:e.today,timezone:e.timezone,idPrefix:d},h=u.parentElement,g=u.nextSibling,x=l.getAttribute("data-nowline-source-url")??void 0??e.sourceUrl;a.push(Em(f,p).then(y=>{if(gH(u,y),r++,h!==null){let E=TE({source:f,sourceUrl:x,share:s});if(E!==null){let w=t.createElement("a");w.className="nowline-share",w.href=E,w.target="_blank",w.rel="noopener noreferrer",w.textContent="Share on Nowline",h.insertBefore(w,g)}}},y=>{i++,console.error("nowline: render failed",y)}))}return await Promise.all(a),{rendered:r,failed:i}}function hH(e){let t=e.parentElement;return t&&t.tagName.toUpperCase()==="PRE"?t:e}function mH(e){return e.textContent??""}function gH(e,t){e.outerHTML=t}function x$(){g$=0}function bm(){if(typeof globalThis>"u")return"light";let e=globalThis.matchMedia;if(typeof e!="function")return"light";try{return e("(prefers-color-scheme: dark)").matches?"dark":"light"}catch{return"light"}}function v$(e,t){return e&&e!=="auto"?ww(e)??t:t}var yH="0.0.0-dev.20261013004110.g00a00d7",xH="00a00d7",vH="pre code.language-nowline, code.language-nowline",T$={theme:"auto",startOnLoad:!0,selector:vH,systemTheme:bm(),share:!0},Ze={...T$},wE=!1;function TH(e={}){Ze={theme:e.theme??Ze.theme,startOnLoad:e.startOnLoad??Ze.startOnLoad,selector:e.selector??Ze.selector,locale:e.locale??Ze.locale,width:e.width??Ze.width,nonWorking:e.nonWorking??Ze.nonWorking,today:e.today!==void 0?e.today:Ze.today,timezone:e.timezone??Ze.timezone,share:e.share??Ze.share,sourceUrl:e.sourceUrl??Ze.sourceUrl,systemTheme:bm()}}function w$(){return{theme:v$(Ze.theme,Ze.systemTheme),locale:Ze.locale,width:Ze.width,nonWorking:Ze.nonWorking,today:Ze.today,timezone:Ze.timezone}}async function wH(e,t={}){let n={...w$(),...t};return Em(e,n)}async function EH(e){return JO(e)}async function EE(e){let t={selector:e?.selector??Ze.selector,theme:e?.theme??w$().theme,locale:e?.locale??Ze.locale,width:e?.width??Ze.width,nonWorking:e?.nonWorking??Ze.nonWorking,today:e?.today!==void 0?e.today:Ze.today,timezone:e?.timezone??Ze.timezone,share:e?.share??Ze.share,sourceUrl:e?.sourceUrl??Ze.sourceUrl,document:e?.document};return y$(t)}var _H=EE;if(typeof document<"u"&&!wE){wE=!0;let e=()=>{Ze.startOnLoad&&EE()};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e,{once:!0}):queueMicrotask(e)}function bH(){Ze={...T$,systemTheme:bm()},wE=!1,QO(),x$()}return Fu(kH);})();
|
|
2927
|
+
`).map(i=>i.trim()),n=0,r=t.length;for(;n<r&&t[n]==="";)n+=1;for(;r>n&&t[r-1]==="";)r-=1;return t.slice(n,r)}function bw(e,t,n,r=t){let i=e,o=gC(e);if(o){if(o.length>=2)return{textSpills:!(n<=t&&o.every((l,u)=>ft(l,zh)<=(u===0?r:t))),titleLines:o};i=o[0]??""}let s=i.length>0&&ft(i,zh)>r,a=n>t;if(!s&&!a)return{textSpills:!1,titleLines:[i]};if(s&&!a){let c=$l(i,t,zh,r);if(c.length>=2&&c.length<=og&&c.every((l,u)=>ft(l,zh)<=(u===0?r:t)))return{textSpills:!1,titleLines:c}}return{textSpills:!0,titleLines:[i]}}function kw(e,t,n){let r=gC(e);return r&&r.length>=2?r:!t.textSpills&&!n&&t.titleLines.length>=2?t.titleLines:[r?r[0]??"":e]}var qh=class{constructor(t){I(this,"input");this.input=t}get id(){return this.input.id}measure(t){return{width:Math.max(Rn,this.input.logicalRightX-this.input.logicalLeftX),height:t.bands.bandwidth()}}place(t,n){let r=this.measure(n),i=Math.max(Rn,r.width-2*an),o=t.x+an,s={x:o,y:t.y,width:i,height:r.height},a=hi(!!this.input.hasLinkIcon,this.input.hasAfterGlyph?{barWidth:i}:void 0),c=Math.max(0,i-a-FG),l=this.input.title,u=_w(this.input.metaText,this.input.metaTrailingWidth??0),f=Math.max(0,i-a-(this.input.titleFirstLineRightReservePx??Bl({barWidth:i,footnoteLabels:[],hasBeforeGlyph:!1}))),{textSpills:d,titleLines:p}=bw(l,c,u,f),h=d?o+i+BG:o+a;return{id:this.input.id,box:s,textX:h,textSpills:d,titleLines:p}}};var Vh=class{constructor(t,n){I(this,"node");I(this,"deps");this.node=t,this.deps=n}get id(){return this.node.name??""}place(t,n){let{node:r}=this,{deps:i}=this,o=mt("parallel",r.properties,n.styleCtx),s=Zo(r,t.x,n),a=$n(Le(r.properties,"after")),c=$n(Le(r.properties,"before")),l=r.title??r.name,u=l_(!!(a||c)),f=t.y+u,d=n.scale.showsNonWorking?n.scale.startX(s):s,p=[],h=d,g=0,T=n.currentFlowKey;n.nextParallelId+=1;let x=r.name??`parallel-${n.nextParallelId}`,y=0;for(let L of r.content){if(L.$type==="DescriptionDirective")continue;n.currentFlowKey=`${T}/par:${x}#${y}`;let P=i.newCursor(s,f+g),$=i.sequenceOne(L,P,n);p.push($),g+=Math.max(n.bandScale.step(),P.height),h=Math.max(h,P.maxX),y++}n.currentFlowKey=T;let E={x:d,y:f,width:h-d,height:g};t.x=h+kl,t.maxX=Math.max(t.maxX,t.x),t.height=Math.max(t.height,u+g);let w=r.name;w&&(n.entityLeftEdges.set(w,E.x),n.entityRightEdges.set(w,E.x+E.width));let b=Fh({box:E,afterDate:a,beforeDate:c,row:{kind:"header-band",title:l,titleInsetX:ps}});return{kind:"parallel",id:w,title:l,box:E,children:p,style:o,inlineDatePins:b.length>0?b:void 0}}};var ul=class extends Map{constructor(t,n=GG){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(let[r,i]of t)this.set(r,i)}get(t){return super.get(yC(this,t))}has(t){return super.has(yC(this,t))}set(t,n){return super.set(UG(this,t),n)}delete(t){return super.delete(XG(this,t))}};function yC({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function UG({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function XG({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function GG(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Yh(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r<i;)o[r]=e+r*n;return o}function Kh(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}var xC=Symbol("implicit");function Zh(){var e=new ul,t=[],n=[],r=xC;function i(o){let s=e.get(o);if(s===void 0){if(r!==xC)return r;e.set(o,s=t.push(o)-1)}return n[s%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new ul;for(let s of o)e.has(s)||e.set(s,t.push(s)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Zh(t,n).unknown(r)},Kh.apply(i,arguments),i}function Iu(){var e=Zh().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,o,s,a=!1,c=0,l=0,u=.5;delete e.unknown;function f(){var d=t().length,p=i<r,h=p?i:r,g=p?r:i;o=(g-h)/Math.max(1,d-c+l*2),a&&(o=Math.floor(o)),h+=(g-h-o*(d-c))*u,s=o*(1-c),a&&(h=Math.round(h),s=Math.round(s));var T=Yh(d).map(function(x){return h+o*x});return n(p?T.reverse():T)}return e.domain=function(d){return arguments.length?(t(d),f()):t()},e.range=function(d){return arguments.length?([r,i]=d,r=+r,i=+i,f()):[r,i]},e.rangeRound=function(d){return[r,i]=d,r=+r,i=+i,a=!0,f()},e.bandwidth=function(){return s},e.step=function(){return o},e.round=function(d){return arguments.length?(a=!!d,f()):a},e.padding=function(d){return arguments.length?(c=Math.min(1,l=+d),f()):c},e.paddingInner=function(d){return arguments.length?(c=Math.min(1,d),f()):c},e.paddingOuter=function(d){return arguments.length?(l=+d,f()):l},e.align=function(d){return arguments.length?(u=Math.max(0,Math.min(1,d)),f()):u},e.copy=function(){return Iu(t(),[r,i]).round(a).paddingInner(c).paddingOuter(l).align(u)},Kh.apply(f(),arguments)}var Rw=class e{constructor(t,n,r){I(this,"bandwidthPx");I(this,"stepPx");I(this,"d3");this.bandwidthPx=t,this.stepPx=n,this.d3=r}static fixedRow(t){return new e(t.bandwidth,t.step)}static forRows(t){let n=Array.from({length:t.count},(i,o)=>String(o)),r=Iu().domain(n).range(t.range).paddingInner(t.paddingInner??0).paddingOuter(t.paddingOuter??0);return new e(r.bandwidth(),r.step(),r)}bandwidth(){return this.bandwidthPx}step(){return this.stepPx}forward(t){if(!this.d3)throw new Error("BandScale.forward is only available on closed-domain bands (BandScale.forRows)");let n=this.d3(t);if(n===void 0)throw new Error(`BandScale: unknown band id "${t}"`);return n}},jG={bandwidth:56,step:64};function vC(){return Rw.fixedRow(jG)}var TC=1e-6,Su=class{constructor(t){I(this,"domain");I(this,"range");I(this,"pixelsPerDay");I(this,"calendar");I(this,"nonWorking");this.domain=t.domain,this.range=t.range,this.calendar=t.calendar,this.nonWorking=t.nonWorking??"hide";let n=Math.max(1,this.showsNonWorking?xn(t.domain[0],t.domain[1]):this.indexOf(t.domain[1]));this.pixelsPerDay=(t.range[1]-t.range[0])/n}get showsNonWorking(){return this.nonWorking==="show"&&this.calendar?.hasNonWorkingDays===!0}indexOf(t){return this.calendar?this.calendar.workingIndexOf(this.domain[0],t):xn(this.domain[0],t)}dayAt(t){let n=(t-this.range[0])/this.pixelsPerDay;return{days:n,day:Math.floor(n+TC)}}forward(t){return this.showsNonWorking?this.range[0]+xn(this.domain[0],t)*this.pixelsPerDay:this.range[0]+this.indexOf(t)*this.pixelsPerDay}forwardWithinDomain(t){return t<this.domain[0]||t>this.domain[1]?null:this.forward(t)}invert(t){let n=Math.round((t-this.range[0])/this.pixelsPerDay);return this.showsNonWorking?wt(this.domain[0],n):this.calendar?this.calendar.dateAtWorkingIndex(this.domain[0],n):wt(this.domain[0],n)}indexAtX(t){let{days:n,day:r}=this.dayAt(t);if(!this.showsNonWorking||!this.calendar)return n;let i=wt(this.domain[0],r),o=this.calendar.workingIndexOf(this.domain[0],i);return this.calendar.isWorkingDay(i)?o+Math.max(0,n-r):o}startX(t){if(!this.showsNonWorking||!this.calendar)return t;let n=wt(this.domain[0],this.dayAt(t).day);if(this.calendar.isWorkingDay(n))return t;let r=this.calendar.workingIndexOf(this.domain[0],n);return this.forward(this.calendar.dateAtWorkingIndex(this.domain[0],r))}advanceX(t,n){if(!this.showsNonWorking||!this.calendar)return t+n*this.pixelsPerDay;let r=this.startX(t);if(n<=0)return r;let i=this.indexAtX(r)+n,o=Math.ceil(i-TC)-1,s=i-o,a=this.calendar.dateAtWorkingIndex(this.domain[0],o);return this.forward(a)+s*this.pixelsPerDay}get originX(){return this.range[0]}get widthPx(){return this.range[1]-this.range[0]}};function Jh(e){return e.endsWith(":")?e.slice(0,-1):e}function EC(e,t){let r=e.roadmapDecl?.properties.find(l=>Jh(l.key)==="scale")?.value,i="weeks",o,s;if(r)if(r==="days"||r==="weeks"||r==="months"||r==="quarters"||r==="years")i=r;else{let l=/^(\d+)([dwmqy])$/.exec(r);if(l){let u=Math.max(1,parseInt(l[1],10));switch(l[2]){case"d":i="days";break;case"w":i="weeks";break;case"m":i="months";break;case"q":i="quarters";break;case"y":i="years";break}o=Qh(i)*u,s=1}}let a=s??i_[i]??4,c=l=>s===void 0&&!l?{labelEveryDefault:!0}:{};if(t){let u=t.properties.find(T=>Jh(T.key)==="unit")?.value??i,f=t.properties.find(T=>Jh(T.key)==="label-every"),d=t.properties.find(T=>Jh(T.key)==="pixels-per-unit"),p=f&&parseInt(f.value,10)||0,h=p!==0?Math.max(1,p):a,g=d?Math.max(1,parseInt(d.value,10)||Qh(u)):o??Qh(u);return{unit:u,labelEvery:h,pixelsPerUnit:g,...c(p!==0)}}return{unit:i,labelEvery:a,pixelsPerUnit:o??Qh(i),...c(!1)}}function Qh(e){switch(e){case"days":return e_;case"weeks":return 40;case"months":return 80;case"quarters":return 160;case"years":return 320}}var HG=.5,Aw=.5,Iw=7;function Qo(e){return e==="months"||e==="quarters"||e==="years"}function em(e,t){let n=e.getUTCFullYear(),r=e.getUTCMonth();switch(t){case"months":return new Date(Date.UTC(n,r+1,1));case"quarters":return new Date(Date.UTC(n,r-r%3+3,1));case"years":return new Date(Date.UTC(n+1,0,1))}}function zG(e,t){if(e.getUTCDate()!==1)return!1;let n=e.getUTCMonth();switch(t){case"months":return!0;case"quarters":return n%3===0;case"years":return n===0}}function tm(e,t,n,r,i){let o=Math.ceil(t-1e-6);if(i?.hasNonWorkingDays){if(!Qo(n)&&o<=0)return 0;let a=o<=0?e:wt(i.dateAtWorkingIndex(e,o-1),1),c=Qo(n)?wC(a,n):n==="weeks"?_C(a,e,i.weekStart):a;return i.workingIndexOf(e,c)}if(!Qo(n))return Math.ceil(t/r)*r;let s=wt(e,o);return xn(e,wC(s,n))}function wC(e,t){return zG(e,t)?e:em(e,t)}function _C(e,t,n){let r=n===void 0?-xn(t,e):n-e.getUTCDay();return wt(e,(r%Iw+Iw)%Iw)}function qG(e,t,n){return _C(wt(e,1),t,n)}function Sw(e,t,n,r=bu){if(e.calendar?.hasNonWorkingDays)return VG(e,t,e.calendar,r);if(Qo(t.unit))return JG(e,t,t.unit,r);let i=n.daysPerUnit(t.unit),o=i*e.pixelsPerDay,s=Math.max(1,Math.round(e.widthPx/e.pixelsPerDay)),a=Math.floor(s/i)+1,c=[];for(let l=0;l<a;l++){let u=l*i,f=e.originX+u*e.pixelsPerDay,d=l%t.labelEvery===0,p=l===a-1;c.push({x:f,labelX:p?void 0:f+o/2,major:d,label:d&&!p?Cw(t.unit,wt(e.domain[0],u),l,r):void 0})}return c}function VG(e,t,n,r){let{unit:i}=t,[o,s]=e.domain,a=T=>Qo(i)?em(T,i):i==="weeks"?qG(T,o,n.weekStart):wt(T,1),c=[o];for(let T=a(o);T<s;T=a(T))c.push(T);let l=e.forward(s),u=[];c.forEach((T,x)=>{let y=e.forward(T);(x+1<c.length?e.forward(c[x+1]):l)>y&&!YG(e,i,c,x)&&u.push({date:T,x:y})});let f=i==="days"&&t.labelEveryDefault===!0&&n.weekStart!==void 0,d=(T,x)=>f?T.getUTCDay()===n.weekStart:x%t.labelEvery===0,h=(e.showsNonWorking?DE(i):n.daysPerUnit(i))*e.pixelsPerDay,g=u.map(({date:T,x},y)=>{let E=(y+1<u.length?u[y+1].x:l)-x,w=d(T,y),b=w?Cw(i,T,y,r):void 0;if(b!==void 0){let L=ft(b,so)>E,P=Qo(i)?y===0||y===u.length-1:E<h-HG;L&&P&&(b=void 0)}return{x,labelX:x+E/2,major:w,label:b}});return s>o&&g.push({x:l,labelX:void 0,major:d(s,u.length),label:void 0}),g}function YG(e,t,n,r){let i=e.calendar;if(!e.showsNonWorking||!i||!Qo(t)||r===0||r!==n.length-1)return!1;let[o,s]=e.domain;return i.workingIndexOf(o,n[r])>=i.workingIndexOf(o,s)}function Nw(e,t,n,r){let i=e.calendar;if(!i?.hasNonWorkingDays)return;let o=i.nonWorkingRuns(e.domain[0],e.domain[1]);if(o.length===0)return;let[s,a]=e.range;if(e.showsNonWorking)return o.map(l=>ZG(e,l,n));let c=l=>t.some(u=>Math.abs(u.x-l)<Aw&&(u.major||r));return o.map(l=>{let u=e.forward(l.from),f={x:u,width:e.forward(wt(l.through,1))-u,from:l.from,through:l.through};l.titles.length>0&&(f.titles=l.titles,f.label=kC(l,i.workingWeekdays),f.cut=!0);let d=u-s>Aw&&a-u>Aw;return n==="days"&&d&&!c(u)&&(f.seam=!0),f})}function Pw(e){let t=e.calendar?.workingExceptionRuns(e.domain[0],e.domain[1])??[];if(t.length===0)return;let[n]=e.range;return t.map(r=>({x:Math.max(n,e.forward(r.from)),from:r.from,through:r.through,titles:r.titles,label:KG(r)}))}function KG(e){let t=xn(e.from,e.through)+1;return`${e.titles.join(", ")}${bC}+${t}d`}var bC=" \xB7 ";function kC(e,t){let n=0;for(let i=e.from;i<=e.through;i=wt(i,1))t.has(i.getUTCDay())&&n++;let r=e.titles.join(", ");return n>0?`${r}${bC}${n}d`:r}function ZG(e,t,n){let[r,i]=e.range,o=Math.max(r,e.forward(t.from)),s=Math.min(i,e.forward(wt(t.through,1))),a={x:o,width:s-o,from:t.from,through:t.through};return t.titles.length>0&&(a.titles=t.titles,e.calendar&&(a.label=kC(t,e.calendar.workingWeekdays))),(n==="days"||n==="weeks"||t.titles.length>0)&&(a.band=!0),a}function JG(e,t,n,r){let[i,o]=e.domain,s=[i];for(let l=em(i,n);l<o;l=em(l,n))s.push(l);o>i&&s.push(o);let a=s.map(l=>e.forward(l)),c=s.length-1;return s.map((l,u)=>{let f=a[u],d=u%t.labelEvery===0;if(u===c)return{x:f,labelX:void 0,major:d,label:void 0};let p=a[u+1]-f,h=d?Cw(n,l,u,r):void 0,g=u===0||u===c-1;return h!==void 0&&g&&ft(h,so)>p&&(h=void 0),{x:f,labelX:f+p/2,major:d,label:h}})}function Cw(e,t,n,r){switch(e){case"days":return`${t.getUTCMonth()+1}/${t.getUTCDate()}`;case"weeks":{let i=t.toLocaleString(r,{month:"short",timeZone:"UTC"}),o=t.getUTCDate().toString().padStart(2,"0");return`${i} ${o}`}case"months":return t.toLocaleString(r,{month:"short",timeZone:"UTC"});case"quarters":{let i=Math.floor(t.getUTCMonth()/3)+1;return`${ll(r).quarterPrefix}${i} ${t.getUTCFullYear()}`}case"years":return`${t.getUTCFullYear()}`}}var Ow=class{constructor(t,n){I(this,"id");I(this,"anchor");this.id=t,this.anchor=n}place(t,n){let r=pe(this.anchor.properties,"date"),i=ze(r);if(!i)return null;let o=t.scale.forwardWithinDomain(i);if(o===null)return null;let s=mt("anchor",this.anchor.properties,t.styleCtx),a=t.markerRowPlacements.get(this.id),c=a?.centerY??t.timeline.markerRow.y,l={x:o,y:c},u=a?.labelBox??{x:o+6+6,y:c-4,width:0,height:12},f=a?.labelSide??"right";t.entityLeftEdges.set(this.id,o),t.entityRightEdges.set(this.id,o),t.entityMidpoints.set(this.id,l);let d={id:this.id,title:this.anchor.title??this.id,center:l,radius:6,style:s,predecessorPoints:[],cutTopY:t.chartTopY,cutBottomY:t.swimlaneBottomY,bumpedUp:(a?.rowIndex??0)>0,labelBox:u,labelSide:f};return!t.scale.showsNonWorking&&!t.calendar.isWorkingDay(i)&&(d.hiddenDate=_r(i)),d}};function AC(e,t,n){let r=[];for(let[i,o]of e){let s=new Ow(i,o).place(t,n);s&&r.push(s)}return r}function dl(e){let t=0;for(let n of e)t=Math.max(t,IC(n.children)),n.nested.length>0&&(t=Math.max(t,dl(n.nested)));return t}function IC(e){let t=0;for(let n of e)n.kind==="item"?t=Math.max(t,n.box.x+n.box.width):t=Math.max(t,IC(n.children));return t}function $w(e,t,n){let r=[],i=new Map,o=new Map;return[...e.entries()].sort(([c],[l])=>c.localeCompare(l)).forEach(([c,l],u)=>{let f=u+1;i.set(c,f),o.set(c,Le(l.properties,"on")),r.push({number:f,title:l.title??c,description:l.description?.text,style:mt("footnote",l.properties,t.styleCtx)})}),{area:{box:{x:Fn,y:n+Fn,width:t.chartRightX-2*Fn,height:r.length===0?0:Il+r.length*Sl+Fn},entries:r},index:i,hosts:o}}var QG=.8,e4=1;function t4(e){let t=[];return NC(e,t),t}function NC(e,t){for(let n of e)if(n.kind==="item"){let r=n4(n);r>0&&n.box.width>0&&t.push({startX:n.box.x,endX:n.box.x+n.box.width,load:r})}else(n.kind==="parallel"||n.kind==="group")&&NC(n.children,t)}function n4(e){return e.capacity?e.capacity.value:e.size?1:0}function PC(e){if(e.capacityValue<=0||e.warnFraction===null&&e.overFraction===null)return null;let t=t4(e.children);if(t.length===0)return null;let n=new Set;for(let s of t)n.add(s.startX),n.add(s.endX);let r=Array.from(n).sort((s,a)=>s-a);if(r.length<2)return null;let i=[];for(let s=0;s<r.length-1;s++){let a=r[s],c=r[s+1],l=(a+c)/2,u=0;for(let f of t)f.startX<=l&&l<f.endX&&(u+=f.load);i.push({startX:a,endX:c,load:u,classification:r4(u,e.capacityValue,e.warnFraction,e.overFraction)})}let o=[];for(let s of i){let a=o[o.length-1];a&&a.classification===s.classification&&a.endX===s.startX?a.endX=s.endX:o.push({...s})}return{segments:o,capacityValue:e.capacityValue,warnFraction:e.warnFraction,overFraction:e.overFraction}}function r4(e,t,n,r){let i=e/t;return r!==null&&i>=r?"red":n!==null&&i>=n?"yellow":"green"}function CC(e,t){let n=t.get("swimlane"),r=SC(pe(e.properties,"utilization-warn-at"),n?pe(n.properties,"utilization-warn-at"):void 0,QG),i=SC(pe(e.properties,"utilization-over-at"),n?pe(n.properties,"utilization-over-at"):void 0,e4);return{warn:r,over:i}}function SC(e,t,n){let i=s4(e??t);return i.kind==="unset"?n:i.kind==="none"?null:i.value}var i4=/^\d+(?:\.\d+)?%$/,o4=/^\d+\.\d+$/;function s4(e){if(e===void 0)return{kind:"unset"};if(e==="none")return{kind:"none"};if(i4.test(e)){let t=parseFloat(e)/100;return Number.isFinite(t)&&t>0?{kind:"number",value:t}:{kind:"unset"}}if(o4.test(e)){let t=parseFloat(e);return Number.isFinite(t)&&t>0?{kind:"number",value:t}:{kind:"unset"}}return{kind:"unset"}}var OC=10;function a4(e,t,n){let r=pe(e.properties,"capacity"),i=ui(r);if(i===null)return{capacity:null,badgeWidthPx:0};let o=yl(i),s=xl(t.capacityIcon,n),a=oo(o,s,OC);return{capacity:{value:i,text:o,icon:s},badgeWidthPx:a}}var l4=10,c4=38,u4=8;function f4(e,t,n){let r=e.title??e.name??"";if(!r)return 0;let i=pe(e.properties,"owner");return Xl(0,r,i??void 0,t,n).rightX}function d4(e,t){if(!e.name)return[];let n=[];for(let[r,i]of t.footnoteHosts.entries())if(i.includes(e.name)){let o=t.footnoteIndex.get(r);o!==void 0&&n.push(o)}return n.sort((r,i)=>r-i),n}function p4(e,t,n,r){for(let i of e.content)if(i.$type!=="DescriptionDirective")return n.scale.startX(r.resolveChildStart(i,t,t,n))}var pl=class{constructor(t,n){I(this,"input");I(this,"deps");this.input=t,this.deps=n}get id(){return this.input.lane.name??""}place(t,n){let{lane:r,bandIndex:i}=this.input,{deps:o}=this,s=mt("swimlane",r.properties,n.styleCtx),a=t.x,c=n.bandScale.step(),l=n.currentFlowKey;n.currentFlowKey=`lane:${r.name??i}`;let{capacity:u,badgeWidthPx:f}=a4(r,s,n.symbols),d=d4(r,n),p=d.length>0?o.estimateTextWidth(d.join(","),OC):0,h=f4(r,f,p),g=p4(r,a,n,o),T=!r.title||g===void 0||g>=h+u4,x=t.y+(T?l4:c4),y=new cl({laneLeftX:a,originY:x,minRowHeight:c,slackCorridors:n.slackCorridors}),E=a,w=[];for(let S of r.content){if(S.$type==="DescriptionDirective")continue;if(!Mt(S)){let H=o.resolveChildStart(S,E,a,n),{rowIndex:J,y:V}=y.placeBlock(),ie=o.newCursor(H,V),le=o.sequenceOne(S,ie,n);w.push(le);let xe=le.box.x+le.box.width,ve=Math.max(c,ie.height);y.commitBlock({rowIndex:J,placed:le,blockHeight:ve,blockEnd:xe,spillReservation:lf(le)}),E=Math.max(E,xe);continue}let F=S.properties,X=o.resolveChildStart(S,E,a,n),R=fi(F,n.sizes,n.cal),C=n.scale.startX(X),N=Math.max(Rn,Jo(n,C,R)),j=C+N,q=S.name??"",z=o.predictItemBarExtraHeight(S,C,n),ne=c+z,{rowIndex:oe,y:he}=y.placeItem({childId:q,desiredStart:C,desiredEnd:j,predictedHeight:ne}),re=o.newCursor(X,he),ae=o.sequenceItem(S,re,n);w.push(ae);let k=ae.box.x+ae.box.width+an;E=Math.max(E,k);let O=null;(ae.textSpills||ae.chipsOutside||ae.dotSpills||ae.iconSpills||ae.footnoteSpills)&&(O=Math.max(ae.decorationsRightX,ae.chipsOutside?ae.chipsRightX:0)+6),y.commitItem({rowIndex:oe,placed:ae,logicalEnd:k,spillReservation:O,rowHeight:Math.max(ne,c+(ae.box.height-n.bandScale.bandwidth()))})}let b=x-t.y,L=Math.max(c+32,b+y.usedHeight()+16),P=Math.max(y.usedRightX(),h),$={x:0,y:t.y,width:n.chartRightX,height:L},G=pe(r.properties,"owner"),Y;if(G){let S=n.teams.get(G),F=n.persons.get(G);Y=S?.title??F?.title??G}let D=u?(()=>{let{warn:S,over:F}=CC(r,n.styleCtx.defaults);return PC({children:w,capacityValue:u.value,warnFraction:S,overFraction:F})})():null;return n.currentFlowKey=l,{positioned:{id:r.name,title:r.title??r.name??"",box:$,bandIndex:i,children:w,nested:[],style:s,owner:Y,footnoteIndicators:d,capacity:u,utilization:D},usedHeight:L,usedRightX:P}}};var h4=18,m4=14,g4=14,y4=16,x4=32;function Lw(e,t,n,r){let i=n+h4,o=[],s=!0;for(let a of e){s||(i+=y4),s=!1;let c=a.content.roadmap?.title??a.sourcePath,l=i+m4,u={cal:t.cal,styleCtx:{theme:t.styleCtx.theme,styles:a.config.styles,defaults:a.config.defaults,labels:a.content.labels},sizes:is(a.content.sizes,t.cal),labels:a.content.labels,teams:a.content.teams,persons:a.content.persons,symbols:a.config.symbols,footnoteIndex:new Map,footnoteHosts:new Map,timeline:t.timeline,scale:t.scale,calendar:t.calendar,bandScale:t.bandScale,entityLeftEdges:new Map,entityRightEdges:new Map,entityMidpoints:new Map,placedItems:new Map,itemFlowKey:new Map,currentFlowKey:"",slackCorridors:[],markerRowPlacements:new Map,chartTopY:l,chartBottomY:l,swimlaneBottomY:l,chartRightX:t.chartRightX,nextParallelId:0,nextGroupId:0,...t.waves?{waves:t.waves}:{}};t.waves&&jh(t.waves,u.entityLeftEdges,u.entityRightEdges);let f=[],d=l,p=0;for(let y of a.content.swimlanes.values()){u.nextParallelId=0,u.nextGroupId=0;let{positioned:E,usedHeight:w}=new pl({lane:y,bandIndex:p},r).place({x:u.timeline.originX,y:d},u);f.push(E),d+=w,p++}let h=d,g=Math.max(t.bandScale.bandwidth(),h-i+g4),T={x:0,y:i,width:0,height:g},x={sourcePath:a.sourcePath,label:c,box:T,nestedSwimlanes:f,style:mt("swimlane",[],t.styleCtx)};Dw(x,t.chartRightX),o.push(x),i+=g}return{regions:o,endY:i}}function Dw(e,t){let n=e.box.x,{chromeRightX:r}=Gl(n,e.label,e.sourcePath),i=dl(e.nestedSwimlanes),o=Math.max(r,i)+x4,s=Math.min(t-n,o-n);e.box.width=s;for(let a of e.nestedSwimlanes)a.box.width=s}function rm(e,t){let n=[];for(let r of e){let i=t.placedItems.get(r),o=i?i.box.x+i.box.width:t.entityRightEdges.get(r);if(o===void 0)continue;let s=i?qP(i,t.bandScale.bandwidth()):t.entityMidpoints.get(r)?.y??0;if(!i&&t.waves?.plan.index.has(r)){n.push({ref:r,x:o,y:s,flowKey:`wave:${r}`,wave:r});continue}let a=t.itemFlowKey.get(r)??`marker:${r}`;n.push({ref:r,x:o,y:s,flowKey:a})}return n}function im(e){let t=new Map;for(let n of e){let r=t.get(n.flowKey);(!r||n.x>r.x)&&t.set(n.flowKey,n)}return Array.from(t.values())}function Fw(e){let t=null;for(let n of e)n.wave===void 0&&(!t||n.x>t.x)&&(t=n);return t}function v4(e,t){let n;for(let r of e)r.wave===void 0||r.x-t<Yt||(!n||r.x>n.x)&&(n=r);return n?.wave}function $C(e,t,n,r,i,o,s,a){let c=r.length*i*.58*(o?1.05:1),l=e+n+6,u=e-n-6-c,f=l+c<=a,d=u>=s,p=f?"right":d?"left":"right";return{box:{x:p==="right"?l:u,y:t-4,width:c,height:12},side:p}}var Mw=class{constructor(t,n){I(this,"id");I(this,"milestone");this.id=t,this.milestone=n}place(t){let n=this.milestone,r=mt("milestone",n.properties,t.styleCtx),i=pe(n.properties,"date"),o=Le(n.properties,"after"),s=ze(i),a=t.timeline.markerRow.y,c=6,l=n.title??this.id,u=null,f=a,d=null,p="right",h=!1,g,T=!1,x;if(s){let w=t.scale.forwardWithinDomain(s);if(w===null)return null;u=w,h=!0;let b=t.markerRowPlacements.get(this.id);b&&(f=b.centerY,d=b.labelBox,p=b.labelSide);let L=rm(o,t),P=im(L),$=Fw(P);$&&$.x>w&&(T=!0,g=[{x:$.x,y:$.y>0?$.y:f}]),x=v4(P,w),x!==void 0&&(T=!0)}else if(o.length>0){let w=rm(o,t),b=im(w);b.sort((G,Y)=>Y.x-G.x);let L=b[0]?.x??t.timeline.originX;u=L,h=!1;let P=$C(u,a,c,l,10,!0,t.timeline.box.x,t.chartRightX);f=a,d=P.box,p=P.side,t.markerRowPlacements.set(this.id,{rowIndex:0,centerY:f,labelBox:d,labelSide:p});let $=[];for(let G=1;G<b.length;G++){let Y=b[G];Y.x<L&&Y.y>0&&Y.wave===void 0&&$.push({x:Y.x,y:Y.y})}$.length>0&&(g=$)}if(u===null)return null;if(!d){let w=$C(u,f,c,l,10,!0,t.timeline.box.x,t.chartRightX);d=w.box,p=w.side}let y={x:u,y:f};t.entityLeftEdges.set(this.id,y.x),t.entityRightEdges.set(this.id,y.x),t.entityMidpoints.set(this.id,y);let E={id:this.id,title:l,center:y,radius:c,fixed:h,slackArrows:g,isOverrun:T,style:r,cutTopY:t.chartTopY,cutBottomY:t.swimlaneBottomY,labelBox:d,labelSide:p};return t.waves&&!T&&hC(t.waves,y.x)&&(E.onWaveBoundary=!0),x!==void 0&&s&&(E.overrunByWave=x,E.overrunDate=_r(s)),s&&!t.scale.showsNonWorking&&!t.calendar.isWorkingDay(s)&&(E.hiddenDate=_r(s)),E}};function LC(e,t){let n=[];for(let[r,i]of e){let o=new Mw(r,i).place(t);o&&n.push(o)}return n}function sm(e){let t=e.trim().replace(/^#/,"");if(t.length===3&&(t=t.split("").map(n=>n+n).join("")),!/^[0-9a-fA-F]{6}$/.test(t))throw new Error(`Unsupported hex colour: ${e}`);return[Number.parseInt(t.slice(0,2),16),Number.parseInt(t.slice(2,4),16),Number.parseInt(t.slice(4,6),16)]}function DC(e){let[t,n,r]=sm(e).map(i=>{let o=i/255;return o<=.03928?o/12.92:((o+.055)/1.055)**2.4});return .2126*t+.7152*n+.0722*r}function am(e,t){let n=DC(e),r=DC(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}var T4=4.5;function BC(e,t,n,r,i){if(!e.frozen||!e.solve)throw new Error("buildWaves: the wave barrier has not settled");let o=t.timeline.waveStrip;if(!o)throw new Error("buildWaves: the timeline has no wave strip");let s=aC(e.plan,e.solve,e.pass,e.origin,e.floors,Yt),a=s.every(y=>y.memberCount===0),c=t.timeline.box.x,l=c+t.timeline.box.width,u=o.y+o.height/2,f=[],d=0,p=s.map((y,E)=>{let w=e.plan.waves[E],b=w.title??y.id,L=y.memberCount===0,P=Au(y.start,t),$=mC(y.start,y.end,t),G=L?void 0:d++,Y=w4(y.id,t),D=E4(w.properties,G,t),S=Math.max(y.start,c),F=Math.min(y.end,l),X=Math.max(0,F-S),R,C=!1;if(!L){if(Y.length>0){let he=Y.length*An;R=MC(b,y.id,E+1,X,he),C=R!==void 0}R??(R=MC(b,y.id,E+1,X,0))}let N=(S+F)/2,j;if(L&&(N=y.start,!a)){let he=f.filter(re=>Math.abs(re-y.start)<Yt).length;f.push(y.start),N=y.start+he*ng,j={x:N,y:u}}let q=L?Bw(P):`${Bw(P)} \u2013 ${Bw($)}`,z=[b,q];L?z.push(n.waveNoItems):y.heldBy!==void 0&&z.push(`${n.waveHeldBy} ${y.heldBy}`);let ne,oe=s[E-1];if(!a&&oe!==void 0&&y.floorRef!==void 0&&y.start-oe.end>Yt){let he=Math.max(oe.end,c),re=Math.min(y.start,l);ft(y.floorRef,nr)+2*br<=re-he&&(ne={text:y.floorRef,x:(he+re)/2})}return{id:y.id,title:b,index:E,...G!==void 0?{visibleOrdinal:G}:{},startX:y.start,endX:y.end,startDate:P,endDate:$,memberCount:y.memberCount,empty:L,...y.heldBy!==void 0?{heldBy:y.heldBy}:{},...y.floorRef!==void 0?{floorRef:y.floorRef}:{},columnBox:{x:y.start,y:t.chartTopY,width:y.end-y.start,height:t.swimlaneBottomY-t.chartTopY},strip:{box:{x:y.start,y:o.y,width:y.end-y.start,height:o.height},...R?{label:R.label}:{},labelKind:R?.kind??"none",labelX:N,tooltip:z.join(" \xB7 "),footnotesShown:C,...j?{marker:j}:{},...ne?{gapLabel:ne}:{}},style:D,footnoteIndicators:Y}}),h=a?[]:k4(p,e.origin,o.y,t),g=Ww(r),T=i.map(y=>Ww(y.nestedSwimlanes));for(let y of[...g,...T.flat()])y.waveTooltip=n.waveBackgroundItem;let x={waves:p,boundaries:h,crossings:FC(g,h),regionCrossings:T.map(y=>FC(y,h)),hasBackground:g.length+T.flat().length>0};return a&&(x.placeholder=XP(n,p.map(y=>y.title))),x}function MC(e,t,n,r,i){let o=a=>ft(a,nr)*1.05+i+2*br<=r;if(o(e))return{kind:"title",label:e};if(t!==e&&o(t))return{kind:"id",label:t};for(let a=e.length-1;a>=3;a--){let c=e.slice(0,a).trimEnd();if(c.length<3)break;let l=`${c}\u2026`;if(o(l))return{kind:"ellipsis",label:l}}let s=`#${n}`;if(o(s))return{kind:"ordinal",label:s}}function w4(e,t){let n=[];for(let[r,i]of t.footnoteHosts.entries()){if(!i.includes(e))continue;let o=t.footnoteIndex.get(r);o!==void 0&&n.push(o)}return n.sort((r,i)=>r-i)}function E4(e,t,n){let r=n.styleCtx.theme,i=new Map,o=pe(e,"style"),s=o?n.styleCtx.styles.get(o):void 0;for(let d of s?.properties??[]){let p=d.key.endsWith(":")?d.key.slice(0,-1):d.key;i.set(p,d.value)}let a=d=>{let p=i.get(d);if(p===void 0)return;let h=ni(p,r);return h==="none"?void 0:h},c=a("bg"),l=t!==void 0&&t%2===1?r.wave.stripFillAlt:r.wave.stripFill,u=c?_4(l,c,Cl)??l:l,f=i.get("border");return{...c?{tint:c}:{},stripFill:l,text:a("text")??b4(r.wave,u),boundary:a("fg")??r.wave.boundary,boundaryDash:f==="dashed"?"4 2":f==="dotted"?"1 2":null}}var lm=/^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;function _4(e,t,n){if(!lm.test(e)||!lm.test(t))return;let r=sm(e),i=sm(t);return`#${r.map((o,s)=>Math.round(o*(1-n)+i[s]*n).toString(16).padStart(2,"0")).join("")}`}function b4(e,t){let n=e.labelText;return!lm.test(n)||!lm.test(t)||am(n,t)>=T4?n:am(e.hatch,t)>=am(e.hatchOnDark,t)?e.hatch:e.hatchOnDark}function k4(e,t,n,r){let i=[];for(let a of e)a.empty||(i.push({x:a.startX,wave:a,opening:!0}),i.push({x:a.endX,wave:a,opening:!1}));i.sort((a,c)=>a.x-c.x);let o=[],s=0;for(;s<i.length;){let a=s;for(;a<i.length&&i[a].x-i[s].x<Yt;)a++;let c=i.slice(s,a);s=a;let l=c[0].x;if(Math.abs(l-t)<Yt)continue;let u=(c.find(f=>f.opening)??c[0]).wave;o.push({x:l,topY:n,bottomY:r.swimlaneBottomY,stroke:u.style.boundary,dash:u.style.boundaryDash})}return o}function Ww(e){let t=[],n=r=>{for(let i of r)i.kind==="item"?i.waveRole==="background"&&t.push(i):n(i.children)};for(let r of e)n(r.children),t.push(...Ww(r.nested));return t}function FC(e,t){let n=[];for(let r of e){let i=r.box.x,o=r.box.x+r.box.width;for(let s of t)i<s.x&&s.x<o&&n.push({x:s.x,topY:r.box.y,bottomY:r.box.y+r.box.height,stroke:s.stroke})}return n}var R4="\u2070\xB9\xB2\xB3\u2074\u2075\u2076\u2077\u2078\u2079";function A4(e){return String(e).replace(/[0-9]/g,t=>R4[Number(t)])}function WC(e,t,n,r){let{waves:i}=e,o=i.some(w=>!w.empty&&w.strip.labelKind!=="title"),s=i.some(w=>w.empty),a=i.some(w=>w.footnoteIndicators.length>0&&!w.strip.footnotesShown);if(!e.hasBackground&&!o&&!s&&!a)return;let c=nr,l=w=>ft(w,c),u=t.timeline.originX,f=Math.max(u,t.chartRightX-ln),d=0,p=u,h=!1,g=0,T=w=>r+w*Ol+ef,x=w=>{h&&p+Qu+w>f&&(d++,p=u,h=!1);let b=h?p+Qu:p;return p=b+w,h=!0,g=Math.max(g,p-u),b},y=[],E=(w,b)=>{let L=Zu+rg,P=x(L+l(b)),$=T(d);y.push({kind:w,text:b,swatch:{x:P,y:$-ef+(Ol-Ju)/2,width:Zu,height:Ju},runs:[{text:b,x:P+L,y:$}]})};if(e.hasBackground&&E("background",n.waveLegendBackground),e.boundaries.length>0&&E("boundary",n.waveLegendBoundary),o||s||a){let w=i.map($=>{let G=`#${$.index+1} ${$.title}`;return $.footnoteIndicators.length>0&&!$.strip.footnotesShown&&(G+=` ${$.footnoteIndicators.map(A4).join(",")}`),$.empty&&(G+=` (${n.waveNoItems})`),G}),b=" \xB7 ",L=`${n.waveLegendPrefix} ${w[0]}`,P=[{text:L,x:x(l(L)),y:T(d)}];for(let $ of w.slice(1)){let G=P[P.length-1];p+l(b+$)<=f?(G.text+=b+$,p+=l(b+$),g=Math.max(g,p-u)):(d++,p=u,h=!1,P.push({text:$,x:x(l($)),y:T(d)}))}y.push({kind:"waves",text:`${n.waveLegendPrefix} ${w.join(b)}`,runs:P})}return{box:{x:u,y:r,width:g,height:(d+1)*Ol},entries:y}}function Bw(e){return e.toISOString().slice(0,10)}var I4=4;function Uw(e,t){t>e.chartRightX&&(e.chartRightX=t)}function qC(e){return`nonworking:${e.from.toISOString().slice(0,10)}`}function VC(e){return`working:${e.from.toISOString().slice(0,10)}`}function YC(e,t,n){return{id:e,centerX:t,radius:0,title:n,fontSize:10,bold:!1}}function XC(e){let t=[];for(let n of e??[])n.label!==void 0&&t.push(YC(qC(n),n.x,n.label));return t}function GC(e){return(e??[]).map(t=>YC(VC(t),t.x,t.label))}function jC(e,t,n,r){let i=n;for(let o of e){let s=KC(o,r),a=o.centerX+o.radius+6+s,c=o.centerX-o.radius-6-s;a>n&&c<t&&(i=Math.max(i,a+ln))}return i}function HC(e,t,n){let r=Nw(t,e.ticks,n,e.minorGrid);r&&(e.nonWorkingDisplay=t.showsNonWorking?"show":"hide",e.nonWorking=r);let i=Pw(t);i&&(e.workingExceptions=i)}var um=class{place(t,n,r,i,o){let s=r.theme??"light",a=Tw[s],c=UP(r.locale,N4(t)),{config:l,working:u}=VE(t,n),f=EC(t,n.config.scale),d=is(n.content.sizes,l),p={theme:a,styles:n.config.styles,defaults:n.config.defaults,labels:n.content.labels},{startDate:h,endDate:g}=o.computeDateWindow(t,{cal:l,sizes:d,calendar:u},n,r.today,f,i),T=mt("roadmap",t.roadmapDecl?.properties??[],p),x=T.headerPosition==="beside",y=_l[T.headerHeight]??_l.md,E=y>0&&T.timelinePosition!=="bottom",w=y>0&&(T.timelinePosition==="bottom"||T.timelinePosition==="both"),b=Xh(r.nonWorking)?r.nonWorking:T.nonWorking,L=b==="show"&&u.hasNonWorkingDays,P=t.roadmapDecl?.title??t.roadmapDecl?.name??"",$=pe(t.roadmapDecl?.properties??[],"author"),G=o.sizeBesideHeader(P,$),Y=x?{x:0,y:0,width:G.boxWidth,height:0}:{x:0,y:0,width:0,height:Hu},D=x?G.boxWidth:0,S=x?8:Hu+8,F=Math.max(1,u.workingIndexOf(h,g)),X=L?Math.max(1,xn(h,g)):F,R=KE({naturalPixelsPerDay:f.pixelsPerUnit/u.daysPerUnit(f.unit),dayCount:X,chromeWidth:D+2*ln,maxWidth:r.width}),C=X*R,N=D+ln,j=C,z=r.today!==void 0&&r.today>=h&&r.today<=g?di:0,ne=E?y:0,oe=i?Ym:0,he=new Su({domain:[h,g],range:[N,N+C],calendar:u,nonWorking:b}),re=[...XC(Nw(he,[],f.unit,!1)),...GC(Pw(he))],ae=n.content.anchors.size+n.content.milestones.size>0||re.length>0,k=N+j+ln,O=[];for(let[K,de]of n.content.anchors){let st=ze(pe(de.properties,"date"));if(!st)continue;let Mn=he.forwardWithinDomain(st);Mn!==null&&O.push({id:K,centerX:Mn,radius:6,title:de.title??K,fontSize:10,bold:!1,date:st,isMilestone:!1})}for(let[K,de]of n.content.milestones){let st=ze(pe(de.properties,"date"));if(!st)continue;let Mn=he.forwardWithinDomain(st);Mn!==null&&O.push({id:K,centerX:Mn,radius:6,title:de.title??K,fontSize:10,bold:!0,date:st,isMilestone:!0})}let B=[...O,...re],H=zC(B,D,jC(B,D,k,o.estimateTextWidth),o.estimateTextWidth),J=ae?Math.max(1,H.rowCount):0,V=J*26,ie=z+ne+oe+V,le=ie+8,xe=x?G.cardHeight+I4:0,ve=Math.max(S,xe-ie),ge=ve+z,Ye=ge+ne,Fe=Ye+oe,ot=Fe+V,sn=Sw(he,f,u,c),ut={box:{x:N,y:ve,width:C,height:0},ticks:sn,pixelsPerDay:R,originX:N,startDate:h,endDate:g,labelStyle:mt("roadmap",[],p),pillRowHeight:z,tickPanelY:ge,tickPanelHeight:ne,markerRow:{y:Fe+13,height:V,collisionY:Fe-8},minorGrid:T.minorGrid,...i?{waveStrip:{y:Ye,height:oe}}:{}};HC(ut,he,f.unit);let Tr=new Map;for(let[K,de]of H.placements){let st=Fe+13+de.rowIndex*26;Tr.set(K,{rowIndex:de.rowIndex,centerY:st,labelBox:{...de.labelBox,y:st-4},labelSide:de.labelSide})}let Q={cal:l,styleCtx:p,sizes:d,labels:n.content.labels,teams:n.content.teams,persons:n.content.persons,symbols:n.config.symbols,footnoteIndex:new Map,footnoteHosts:new Map,timeline:ut,scale:he,calendar:u,bandScale:vC(),entityLeftEdges:new Map,entityRightEdges:new Map,entityMidpoints:new Map,placedItems:new Map,itemFlowKey:new Map,currentFlowKey:"",slackCorridors:[],markerRowPlacements:Tr,chartTopY:ve+le,chartBottomY:0,swimlaneBottomY:0,chartRightX:k,nextParallelId:0,nextGroupId:0,...i?{waves:lC(i,he,N)}:{}};for(let K of O){let de=Tr.get(K.id);de&&(Q.entityLeftEdges.set(K.id,K.centerX),Q.entityRightEdges.set(K.id,K.centerX),Q.entityMidpoints.set(K.id,{x:K.centerX,y:de.centerY}))}let er=$w(n.content.footnotes,Q,0);Q.footnoteIndex=er.index,Q.footnoteHosts=er.hosts;let si=new Map(Q.entityLeftEdges),ai=new Map(Q.entityRightEdges),li=new Map(Q.entityMidpoints),no=()=>{Q.entityLeftEdges=new Map(si),Q.entityRightEdges=new Map(ai),Q.entityMidpoints=new Map(li),Q.placedItems=new Map,Q.itemFlowKey=new Map,Q.currentFlowKey="",Q.waves&&jh(Q.waves,Q.entityLeftEdges,Q.entityRightEdges)},Dn=[...n.content.swimlanes.values()],_=mt("swimlane",[],p),W=ZE[_.spacing]??0,Z=()=>{Q.nextParallelId=0,Q.nextGroupId=0;let K=[],de=Q.chartTopY,st=0,Mn=Q.timeline.originX;for(let I$ of Dn){st>0&&(de+=W);let{positioned:S$,usedHeight:N$,usedRightX:_E}=new pl({lane:I$,bandIndex:st},o).place({x:Q.timeline.originX,y:de},Q);K.push(S$),de+=N$,_E>Mn&&(Mn=_E),st++}return{swimlanes:K,nextY:de,maxRightX:Mn}},se=n.content.isolatedRegions,Te,Be,Re=Q.waves;if(Re){let K,de=Gh(Re.ids.length,Re.origin,Re.floors,(st,Mn)=>(cC(Re,st,Mn),no(),K=Z(),se.length>0&&Lw(se,Q,K.nextY+8,o),Re.pass),Yt);uC(Re,de),Be={passes:de.passes,capped:de.capped},Te=K}else Te=Z();let _e=Te.swimlanes,$e=Te.nextY,Ge=S4(n.content.milestones,Q);Ge.length>0&&(no(),Q.slackCorridors=Ge,Te=Z(),_e=Te.swimlanes,$e=Te.nextY),Uw(Q,Te.maxRightX+ln);let Ce=[];if(se.length>0){let K=Lw(se,Q,$e+8,o);Ce=K.regions,$e=K.endY}Q.chartBottomY=$e,Q.swimlaneBottomY=$e,ut.box.height=Q.chartBottomY-ut.box.y;let vt=LC(n.content.milestones,Q),Tt=dl(_e);for(let K of Ce)Tt=Math.max(Tt,dl(K.nestedSwimlanes));for(let K of O)Tt=Math.max(Tt,K.centerX+K.radius);for(let K of vt)Tt=Math.max(Tt,K.center.x+K.radius);let wr=u.daysPerUnit(f.unit),Ut=Q.scale.showsNonWorking?Q.scale.indexAtX(Tt):(Tt-N)/R,Xt=Ut>0?tm(h,Ut,f.unit,wr,u):0;if(Xt>F){let K=u.dateAtWorkingIndex(h,Xt),de=Q.scale.showsNonWorking?xn(h,K)*R:Xt*R,st=new Su({domain:[h,K],range:[N,N+de],calendar:u,nonWorking:b});Q.scale=st,ut.endDate=K,ut.box.width=de,ut.ticks=Sw(st,f,u,c),HC(ut,st,f.unit),Uw(Q,N+de+ln)}let Er=O.map(K=>({id:K.id,centerX:K.centerX,radius:K.radius,title:K.title,fontSize:K.fontSize,bold:K.bold}));for(let K of vt)K.fixed||Er.push({id:K.id??"",centerX:K.center.x,radius:K.radius,title:K.title,fontSize:10,bold:!0});let ci=[...XC(ut.nonWorking),...GC(ut.workingExceptions)];Er.push(...ci),Uw(Q,jC(Er,D,Q.chartRightX,o.estimateTextWidth));for(let K of _e)K.box.width=Q.chartRightX;for(let K of Ce)Dw(K,Q.chartRightX);let ml=zC(Er,D,Q.chartRightX,o.estimateTextWidth);Q.markerRowPlacements.clear();for(let[K,de]of ml.placements){let st=Fe+13+de.rowIndex*26;Q.markerRowPlacements.set(K,{rowIndex:de.rowIndex,centerY:st,labelBox:{...de.labelBox,y:st-4},labelSide:de.labelSide})}for(let K of vt){let de=Q.markerRowPlacements.get(K.id??"");de&&(K.center={x:K.center.x,y:de.centerY},K.labelBox=de.labelBox,K.labelSide=de.labelSide)}for(let K of ut.nonWorking??[]){if(K.label===void 0)continue;let de=Q.markerRowPlacements.get(qC(K));de&&(K.labelBox=de.labelBox,K.labelSide=de.labelSide)}for(let K of ut.workingExceptions??[]){let de=Q.markerRowPlacements.get(VC(K));de&&(K.labelBox=de.labelBox,K.labelSide=de.labelSide)}for(let K of O){let de=Q.markerRowPlacements.get(K.id);de&&Q.entityMidpoints.set(K.id,{x:K.centerX,y:de.centerY})}for(let K of vt)K.fixed||Q.entityMidpoints.set(K.id??"",{x:K.center.x,y:K.center.y});let je=ae||ci.length>0?Math.max(1,ml.rowCount):0;if(je>J){let K=(je-J)*26;Q.timeline.markerRow.height=je*26,Q.timeline.box.height+=K,Q.chartTopY+=K,Q.chartBottomY+=K,Q.swimlaneBottomY+=K;for(let de of _e)Uh(de,K);for(let de of Ce)VP(de,K);for(let de of vt)if(de.cutTopY=Q.chartTopY,de.cutBottomY=Q.swimlaneBottomY,de.slackArrows)for(let st of de.slackArrows)st.y+=K}w&&(Q.timeline.bottomTickPanelY=Q.chartBottomY+8,Q.timeline.bottomTickPanelHeight=y,Q.chartBottomY+=8+y);let Kt=ll(c),He=Q.waves?BC(Q.waves,Q,Kt,_e,Ce):void 0;He&&(He.regionCrossings.forEach((K,de)=>{K.length>0&&(Ce[de].waveCrossings=K)}),He.placeholder!==void 0&&ut.waveStrip&&(ut.waveStrip.placeholder=He.placeholder));let ro=new Set(vt.map(K=>K.center.x)),io=AC(n.content.anchors,Q,ro),Lu=o.collectItems(Dn),E$=o.buildDependencies(Lu,_e,Ce,Q),_$=o.buildNowline(r.today,Q,c),Du=He?WC(He,Q,Kt,Q.chartBottomY+Ku):void 0;Du&&(Q.chartBottomY+=Ku+Du.box.height);let ns=$w(n.content.footnotes,Q,Q.chartBottomY);Q.footnoteIndex=ns.index,Q.footnoteHosts=ns.hosts,Y.height=Y.height||Q.chartBottomY,x||(Y.width=Q.chartRightX);let b$=x?{x:6,y:ot-G.cardHeight,width:G.cardWidth,height:G.cardHeight}:{x:0,y:0,width:Q.chartRightX,height:Hu},k$=ns.area.entries.length>0?ns.area.box.y+ns.area.box.height:Q.chartBottomY,km={x:Q.chartRightX-ln-Hm,y:k$+ln,width:Hm,height:r_},R$=km.y+km.height+ln,A$={box:Y,position:T.headerPosition,title:P,author:$,titleLines:G.titleLines,authorLines:G.authorLines,cardBox:b$,logo:void 0,style:T,attributionBox:km};return{width:Q.chartRightX,height:R$,theme:s,palette:a,backgroundColor:a.surface.page,header:A$,timeline:ut,nowline:_$,swimlanes:_e,anchors:io,milestones:vt,edges:E$,footnotes:ns.area,includes:Ce,chartBox:{x:D,y:Q.chartTopY,width:Q.chartRightX-D,height:Q.chartBottomY-Q.chartTopY},...Be?{waveSolve:Be}:{},...He?{waves:He.waves}:{},...He&&He.boundaries.length>0?{waveBoundaries:He.boundaries}:{},...He&&He.crossings.length>0?{waveCrossings:He.crossings}:{},...Du?{waveLegend:Du}:{}}}};function S4(e,t){let n=[];for(let[r,i]of e){let o=pe(i.properties,"date"),s=Le(i.properties,"after"),a=ze(o),c=rm(s,t),l=im(c);if(a){let f=t.scale.forwardWithinDomain(a);if(f===null)continue;let d=Fw(l);d&&d.x>f&&d.y>0&&n.push({xStart:Math.min(d.x,f),xEnd:Math.max(d.x,f),y:d.y,slackPredId:d.ref,milestoneId:r});continue}if(l.length===0)continue;l.sort((f,d)=>d.x-f.x);let u=l[0].x;for(let f=1;f<l.length;f++){let d=l[f];d.x<u&&d.y>0&&d.wave===void 0&&n.push({xStart:d.x,xEnd:u,y:d.y,slackPredId:d.ref,milestoneId:r})}}return n}function KC(e,t){return t(e.title,e.fontSize)*(e.bold?1.05:1)}function zC(e,t,n,r){let i=[...e].sort((a,c)=>a.centerX-c.centerX),o=new Map,s=[];for(let a of i){let c=KC(a,r),l=a.centerX+a.radius+6,u=a.centerX-a.radius-6-c,f=l+c<=n,d=u>=t,p=a.centerX-a.radius,h=a.centerX+a.radius,g=P=>P==="right"?l:u,T=P=>P==="right"?f:d,x=(P,$)=>{let G=Math.min(p,P),Y=Math.max(h,P+c);return s[$].some(D=>D.left<Y&&D.right>G)},y=-1,E="right",w=l;e:for(let P=s.length-1;P>=0;P--)for(let $ of["right","left"]){if(!T($))continue;let G=g($);if(!x(G,P)){y=P,E=$,w=G;break e}}if(y===-1){for(let[P,$]of o)o.set(P,{...$,rowIndex:$.rowIndex+1});s=[[],...s],y=0,E=f?"right":"left",w=g(E)}let b=Math.min(p,w),L=Math.max(h,w+c);s[y].push({left:b,right:L}),o.set(a.id,{rowIndex:y,labelBox:{x:w,y:0,width:c,height:12},labelSide:E})}return{placements:o,rowCount:s.length}}function N4(e){return e.directive?.properties.find(n=>P4(n.key)==="locale")?.value}function P4(e){return e.endsWith(":")?e.slice(0,-1):e}function C4(e){switch(e){case"done":case"completed":return"done";case"in-progress":case"active":return"in-progress";case"at-risk":case"blocked":case"planned":return e;case void 0:return"planned";default:return"neutral"}}function O4(e){if(!e)return 0;let t=/^(\d{1,3})%$/.exec(e);return t?Math.max(0,Math.min(100,parseInt(t[1],10)))/100:0}function $4(e,t){if(e)return/^\d+(?:\.\d+)?[dwmqy]$/.test(e)||/^\d+%$/.test(e)?e:t.sizes.get(e)?.effortLiteral??e}function L4(e,t){if(e)return t.teams.get(e)?.title??t.persons.get(e)?.title??e}function D4(e){if(!e)return{icon:"none"};let t=e.toLowerCase();return t.includes("linear.app")?{icon:"linear",href:e}:t.includes("github.com")?{icon:"github",href:e}:t.includes("atlassian.net")||t.includes("jira.")?{icon:"jira",href:e}:{icon:"generic",href:e}}function fm(e,t,n,r,i){let o=rC(e,t),s=e.name??e.title??"",a=o.padding==="none"?"xs":o.padding,c=JE[a],l=Math.max(20,Math.round(s.length*5.5+c*2));return i!==void 0&&(l=Math.min(l,i)),{text:s,style:o,box:{x:n,y:r,width:l,height:ho}}}function QC(e,t){let n=SE(e,t.sizes,t.cal),r=IE(pe(e,"remaining"),t.sizes,t.cal),i=pe(e,"status"),o=C4(i),s=O4(i);s===0&&o==="done"&&(s=1);let a=/^(\d{1,3})%$/.exec(pe(e,"remaining")??"");return s===0&&o==="in-progress"&&a&&(s=1-Math.max(0,Math.min(100,parseInt(a[1],10)))/100),s===0&&o==="in-progress"&&r>0&&n>0&&(s=Math.max(0,Math.min(1,1-r/n))),{status:o,progress:s}}function eO(e,t,n,r,i,o,s){let a=pe(e,"duration"),c=!!a&&/^\d+(?:\.\d+)?[dwmqy]$/.test(a),l=r?r.title??r.name:"",u=c?a:l||void 0,f=pe(e,"remaining"),d=$4(f,t),p=L4(n??pe(e,"owner"),t),h=()=>[u,p].filter(Boolean).join(" "),g;if(i==="in-progress"&&d){let w=h();g=w?`${w} \u2014 ${d} remaining`:`${d} remaining`}else if(i==="in-progress"&&o>0&&o<1){let w=Math.round((1-o)*100),b=h();g=b?`${b} \u2014 ${w}% remaining`:`${w}% remaining`}else(p||u)&&(g=h()||void 0);let T=pe(e,"capacity"),x=ui(T),y=null,E=0;if(x!==null){let w=yl(x),b=xl(s,t.symbols);y={value:x,text:w,icon:b};let L=11;E=(g?ft(" ",L):0)+oo(w,b,L)}return{metaText:g,ownerDisplay:p,capacity:y,capacityTrailingWidth:E}}function tO(e,t){let n=new Set;if(e){for(let[r,i]of t.footnoteHosts.entries())if(i.includes(e)){let o=t.footnoteIndex.get(r);o!==void 0&&n.add(o)}}return[...n].sort((r,i)=>r-i)}function nO(e,t,n){return Bl({barWidth:e,footnoteLabels:t.map(String),hasBeforeGlyph:$n(n)!==void 0})}function qw(e,t,n,r){let i=e.properties,o=mt("item",i,n.styleCtx),s=pe(i,"size"),a=s?n.sizes.get(s)??null:null,c=fi(i,n.sizes,n.cal),l=Le(i,"after"),u=Le(i,"before"),f=aO(i,t.x,t.x,n),d;n.waves&&(f=Zo(e,f,n),d=pC(e,f,n));let p=d===void 0?B4(i,f,n):void 0,h=n.scale.startX(f),g=Math.max(Rn,Jo(n,h,c)),T=h,x=h+g,y=pe(i,"link"),E=D4(y),w=E.icon!=="none",b=Math.max(Rn,g-2*an),L=Le(i,"labels"),P=[];for(let je of L){let Kt=n.labels.get(je);if(!Kt)continue;let He=fm(Kt,n.styleCtx,0,0);P.push({id:Kt,width:He.box.width})}let $=0;for(let je=0;je<P.length;je+=1)je>0&&($+=Sr),$+=P[je].width;let G=Math.max(0,b-2*rr),Y=P.length>0&&$>G,D=!1,S,F;if(u.length>0){let je,Kt;for(let He of u){let ro=ze(He),io=ro?n.scale.forwardWithinDomain(ro)??void 0:n.entityLeftEdges.get(He);io!==void 0&&(je===void 0||io<je)&&(je=io,Kt=He)}je!==void 0&&x>je&&(D=!0,S={x:je,y:t.y,width:x-je,height:n.bandScale.bandwidth()},F=Kt)}let{status:X,progress:R}=QC(i,n),C={done:"#ecfdf5","in-progress":"#eff6ff","at-risk":"#fffbeb",blocked:"#fee2e2",planned:"#f8fafc",neutral:"#f8fafc"},N={done:"#052e16","in-progress":"#172554","at-risk":"#422006",blocked:"#7f1d1d",planned:"#1e293b",neutral:"#1e293b"},j={done:"#ebebeb","in-progress":"#e4e4e4","at-risk":"#eeeeee",blocked:"#dcdcdc",planned:"#f5f5f5",neutral:"#f5f5f5"},q={done:n.styleCtx.theme.status.done,"in-progress":n.styleCtx.theme.status.inProgress,"at-risk":n.styleCtx.theme.status.atRisk,blocked:n.styleCtx.theme.status.blocked,planned:n.styleCtx.theme.status.planned,neutral:n.styleCtx.theme.status.neutral},z=n.styleCtx.theme.name,ne=z==="dark",oe=ne?"#0f172a":"#ffffff",he=z==="grayscale"?"#9e9e9e":"#94a3b8";o.bg===oe&&(o.bg=z==="grayscale"?j[X]:ne?N[X]:C[X]),o.fg===he&&(o.fg=q[X]);let{metaText:re,ownerDisplay:ae,capacity:k,capacityTrailingWidth:O}=eO(i,n,r,a,X,R,o.capacityIcon),B=e.title??e.name??"",H=tO(e.name,n),J=new qh({id:e.name??"",title:B,logicalLeftX:T,logicalRightX:x,metaText:re,metaTrailingWidth:O,hasLinkIcon:w,hasAfterGlyph:$n(l)!==void 0,titleFirstLineRightReservePx:nO(b,H,u)}).place({x:T,y:t.y},{time:n.scale,bands:n.bandScale,style:o}),V=J.box,ie=n.bandScale.bandwidth(),le=V.width<us,xe=w&&V.width<of,ve=V.width<sf,ge=J.textSpills||xe,Ye=kw(B,J,xe),Fe=Ye.length,ot=null;Y&&(ot=pg(P,V.width));let sn=ot?ot.rows.length:P.length>0?1:0,ut=re!==void 0||k!==null,Tr=Ml(Fe,ut),Q=rf(Fe,ut),er=iO(Y,ge,sn,ie,Tr),si=Math.max(Q,er);si>0&&(V.height=ie+si);let ai=[],li=V.y+ie-tr-ho-mi,no=V.y+(Y&&ge?Math.max(ls,Tr):Tr)+mi,_=Y&&ge||!Y&&P.length>0?Math.max(li,no):li,W=Y?V.x+V.width+Ar:V.x+rr,Z=W;if(ot)for(let je=0;je<ot.rows.length;je+=1){let Kt=_+je*dg,He=W;for(let io of ot.rows[je]){let Lu=fm(io.id,n.styleCtx,He,Kt);ai.push(Lu),He+=Lu.box.width+Sr}let ro=He-Sr;ro>Z&&(Z=ro)}else{let je=W;for(let Kt of P){let He=fm(Kt.id,n.styleCtx,je,_);ai.push(He),je+=He.box.width+Sr}Z=P.length>0?je-Sr:W}let se=ae??r??pe(i,"owner"),Te=e.description?.text,Be=H.length>0&&ve,_e=V.x+V.width+Ar,$e=!1,Ge=null;xe&&($e&&(_e+=In),Ge=_e,_e=Ge+Ir,$e=!0);let Ce=0;if(ge){$e&&(_e+=In);let je=Math.max(...Ye.map(He=>ft(He,Ll))),Kt=(re?ft(re,11):0)+O;Ce=Math.max(je,Kt),_e+=Ce,$e=!0}let vt=null;Be&&($e&&(_e+=In),vt=_e,_e+=H.length*An,$e=!0);let Tt=null;le&&($e&&(_e+=In),Tt=_e+ir,_e=Tt+ir,$e=!0);let wr=Math.max(V.x+V.width,_e),Ut=e.name;Ut&&(n.entityLeftEdges.set(Ut,T),n.entityRightEdges.set(Ut,x)),fC(e,V.x+V.width+an,n);let Xt=Ut??rO(e);n.itemFlowKey.set(Xt,n.currentFlowKey),t.x=x,t.maxX=Math.max(t.maxX,t.x),t.height=Math.max(t.height,n.bandScale.step()+si);let Er=GP({box:V,afterDate:$n(l),beforeDate:$n(u),hasLinkIcon:w,footnoteCount:H.length}),ci={kind:"item",id:Ut,title:B,...Ye.length>=2||Ye[0]!==B?{titleLines:Ye}:{},box:V,status:X,progressFraction:R,footnoteIndicators:H,labelChips:ai,chipsOutside:Y,chipsRightX:Z,linkIcon:E.icon,linkHref:E.href,hasOverflow:D,overflowBox:S,overflowAnchorId:F,owner:se,description:Te,metaText:re,textSpills:ge,dotSpills:le,iconSpills:xe,footnoteSpills:Be,dotSpillCx:Tt,iconSpillX:Ge,footnoteSpillStartX:vt,decorationsRightX:wr,capacity:k,size:a,style:o,inlineDatePins:Er.length>0?Er:void 0},ml=dC(e,n);return ml!==void 0&&(ci.waveRole=ml),d!==void 0&&(ci.wavePinOverride=d),p!==void 0&&(ci.nonWorkingPin=p),n.placedItems.set(Xt,ci),ci}function M4(e,t,n){return new Vh(e,{sequenceOne:Vw,newCursor:Bh}).place(t,n)}function F4(e,t,n){return new Hh(e,{sequenceItem:qw,sequenceOne:Vw,resolveChildStart:sO,newCursor:Bh,estimateTextWidth:ft,predictItemBarExtraHeight:oO}).place(t,n)}function Vw(e,t,n){if(Mt(e))return qw(e,t,n);if(_t(e))return M4(e,t,n);if(Ve(e))return F4(e,t,n);throw new Error(`Unknown swimlane child type: ${e.$type??"unknown"}`)}function rO(e){let t=e.$cstNode?.range.start;return`#item@${t?t.line+1:0}:${t?t.character+1:0}`}function iO(e,t,n,r,i){if(n===0)return 0;let o=r-tr-ho-mi,s;e&&t?s=Math.max(ls,i)+mi:e?s=o:s=Math.max(o,i+mi);let c=s+(n-1)*dg+ho+mi+tr;return Math.max(0,c-r)}function oO(e,t,n){let r=e.properties,i=n.bandScale.bandwidth(),o=fi(r,n.sizes,n.cal),s=Math.max(Rn,Jo(n,t,o)),a=Math.max(Rn,s-2*an),c=pe(r,"size"),l=c?n.sizes.get(c)??null:null,{status:u,progress:f}=QC(r,n),{metaText:d,capacity:p,capacityTrailingWidth:h}=eO(r,n,void 0,l,u,f,mt("item",r,n.styleCtx).capacityIcon),g=d!==void 0||p!==null,T=!!pe(r,"link"),x=e.title??e.name??"",y=$n(Le(r,"after"))!==void 0,E=hi(T,y?{barWidth:a}:void 0),w=Math.max(0,a-E-rr),b=Math.max(0,a-E-nO(a,tO(e.name,n),Le(r,"before"))),L=bw(x,w,_w(d,h),b),P=T&&a<of,$=L.textSpills||P,G=kw(x,L,P).length,Y=rf(G,g),D=Le(r,"labels"),S=[];for(let q of D){let z=n.labels.get(q);if(!z)continue;let ne=fm(z,n.styleCtx,0,0);S.push({id:z,width:ne.box.width})}if(S.length===0)return Y;let F=0;for(let q=0;q<S.length;q+=1)q>0&&(F+=Sr),F+=S[q].width;let X=Math.max(0,a-2*rr),R=F>X,C=R?pg(S,a):null,N=C?C.rows.length:1,j=iO(R,$,N,i,Ml(G,g));return Math.max(Y,j)}function sO(e,t,n,r){return Zo(e,aO(e.properties,t,n,r),r)}function aO(e,t,n,r){let i=ze(pe(e,"date"))??ze(pe(e,"start"));if(i){let s=r.scale.forwardWithinDomain(i);if(s!==null)return s}let o=Le(e,"after");if(o.length>0){let s=n;for(let a of o){let c=ze(a);if(c){let u=r.scale.forwardWithinDomain(c);u!==null&&(s=Math.max(s,u));continue}let l=r.entityRightEdges.get(a);l!==void 0&&(s=Math.max(s,l))}return Math.max(n,s)}return t}function B4(e,t,n){if(!n.calendar.hasNonWorkingDays)return;let r=W4(e);if(!r||n.calendar.isWorkingDay(r.date))return;let i=n.scale.forwardWithinDomain(r.date);if(!(i===null||Math.abs(t-i)>=Yt))return{key:r.key,pin:r.raw,start:_r(Au(t,n))}}function W4(e){for(let t of["date","start"]){let n=pe(e,t),r=ze(n);if(n!==void 0&&r)return{key:t,raw:n,date:r}}for(let t of Le(e,"after")){let n=ze(t);if(n)return{key:"after",raw:t,date:n}}}var Xw=6;function U4(e,t){let n=Wm-32,r=$l(e,n,16),i=$l(t??"",n,11),o=0;for(let d of r)o=Math.max(o,ft(d,16));for(let d of i)o=Math.max(o,ft(d,11));let s=o+32,a=Math.max(t_-Xw,Math.min(Wm-Xw,s)),c=r.length>0?(r.length-1)*20:0,l=i.length>0?18+(i.length-1)*14:0,u=26+c+l+14,f=a+Xw;return{titleLines:r,authorLines:i,cardWidth:a,cardHeight:u,boxWidth:f}}function X4(e,t,n,r,i,o){let a=e.roadmapDecl?.properties??[],c=pe(a,"start"),l=ze(c)??G4(r),u=pe(a,"length"),f=0;if(u){let x=j4(u,t.cal);x>0&&(f=x)}let d=t.calendar??Tl(t.cal),p=lO(n,{cal:t.cal,sizes:t.sizes,calendar:d},l,f>0?void 0:r,o),h=$E(i.unit,t.cal),g=tm(l,p>0?p:4*t.cal.daysPerWeek,i.unit,h,d),T=Math.max(f,g);return{startDate:l,endDate:d.dateAtWorkingIndex(l,Math.max(1,T))}}function G4(e){let t=e??new Date;return new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()))}function j4(e,t){let n=/^(\d+(?:\.\d+)?)([dwmqy])$/.exec(e);if(!n)return 0;let r=parseFloat(n[1]);switch(n[2]){case"d":return r;case"w":return r*t.daysPerWeek;case"m":return r*t.daysPerMonth;case"q":return r*t.daysPerQuarter;case"y":return r*t.daysPerYear;default:return 0}}function lO(e,t,n,r,i){let o=h=>t.calendar.workingIndexOf(n,h),s=new Map,a=new Map,c=new Map,l=0;for(let h of e.content.anchors.values()){let g=ze(pe(h.properties,"date"));if(g&&h.name){let T=o(g);a.set(h.name,T),l=Math.max(l,T)}}let u=()=>({itemEnd:s,anchorEnd:a,milestoneEnd:c,sizes:t.sizes}),f=(h,g,T)=>{let x=w=>{let b=ze(w);return b?o(b):h.itemEnd.has(w)?h.itemEnd.get(w):h.anchorEnd.has(w)?h.anchorEnd.get(w):h.milestoneEnd.has(w)?h.milestoneEnd.get(w):0},y=(w,b)=>{let L=b;for(let P of w)P.$type!=="DescriptionDirective"&&(L=E(P,L),T(L));return L},E=(w,b)=>{if(Mt(w)){let L=fi(w.properties,h.sizes,t.cal),P=ze(pe(w.properties,"date")),$=ze(pe(w.properties,"start")),G=Le(w.properties,"after"),Y=b;P?Y=o(P):$?Y=o($):G.length>0&&(Y=Math.max(b,...G.map(x))),g&&(Y=g.apply(w,Y));let D=Y+L;return w.name&&h.itemEnd.set(w.name,D),g?.accumulate(w,D),D}if(_t(w)){let L=Le(w.properties,"after"),P=L.length>0?Math.max(b,...L.map(x)):b;g&&(P=g.apply(w,P));let $=P;for(let G of w.content){if(G.$type==="DescriptionDirective")continue;let Y=E(G,P);$=Math.max($,Y)}return $}if(Ve(w)){let L=Le(w.properties,"after"),P=L.length>0?Math.max(b,...L.map(x)):b;return g&&(P=g.apply(w,P)),y(w.content,P)}return b};return{walkLane:y,resolveAfterDay:x}},d=h=>{l=Math.max(l,h)};if(i){let h=i.waves.map(y=>y.name),g=0,T=y=>{g=Math.max(g,y)},x=Gh(h.length,0,sC(i,n,t.calendar),(y,E)=>{let w=h.map((P,$)=>[P,E[$]]);s=new Map(w),g=0;let b=new Ko(i,y),{walkLane:L}=f(u(),b,T);for(let P of e.content.swimlanes.values())L(P.content,0);for(let P of e.content.isolatedRegions){let $=f({itemEnd:new Map(w),anchorEnd:new Map,milestoneEnd:new Map,sizes:is(P.content.sizes,t.cal)},b,T);for(let G of P.content.swimlanes.values())$.walkLane(G.content,0)}return b});l=Math.max(l,g,...x.S,...x.E.slice(-1))}else{let{walkLane:h}=f(u(),void 0,d);for(let g of e.content.swimlanes.values())h(g.content,0)}let{resolveAfterDay:p}=f(u(),void 0,d);for(let h of e.content.milestones.values()){let g=ze(pe(h.properties,"date"));if(g){let x=o(g);h.name&&c.set(h.name,x),l=Math.max(l,x);continue}let T=Le(h.properties,"after");if(T.length>0){let x=Math.max(0,...T.map(p));h.name&&c.set(h.name,x),l=Math.max(l,x)}}if(!i)for(let h of e.content.isolatedRegions){let g=lO({config:h.config,content:h.content,diagnostics:[],processedFiles:new Set},t,n,void 0);l=Math.max(l,g)}if(r){let h=o(r);h>0&&(l=Math.max(l,h))}return l}function H4(e,t,n,r){let i=new Mh(BP(t,n)),o=[],s=[],a=r.bandScale.bandwidth();for(let[u,f]of e){let d=Le(f.properties,"after"),p=r.placedItems.get(u);if(!p)continue;let h=HP(p,a);for(let g of d){let T=r.placedItems.get(g),x,y=T===void 0;if(T)x=zP(T,a);else{let E=r.entityMidpoints.get(g);if(!E)continue;x={x:E.x,y:h.y}}!y&&Math.abs(x.y-h.y)<.5&&h.x-x.x<20||(o.push({fromId:g,toId:u,from:x,to:h,isMarkerSource:y}),s.push({fromId:g,toId:u}))}}let c=WP(o,i),l=[];for(let u=0;u<c.length;u++){let f=c[u];l.push({fromId:s[u].fromId,toId:s[u].toId,waypoints:f.waypoints,kind:f.underBar?"underBar":"normal",style:mt("item",[],r.styleCtx)})}return l}function z4(e,t,n){if(!e)return null;let r=t.scale.forwardWithinDomain(e);if(r===null)return null;let i=t.timeline.box.y,o=t.timeline.tickPanelY,s=ll(n).nowLabel,a=ft(s,Al),c=Math.max(Mm,Math.ceil(a+2*as)),l=t.timeline.originX-ln,u=c/2,f;r-u<l?f="flag-right":r+u>t.chartRightX?f="flag-left":f="center";let d=t.timeline.bottomTickPanelY,p=t.timeline.bottomTickPanelHeight??0,h=d!==void 0&&p>0?d+p:t.swimlaneBottomY;return{x:r,topY:o,bottomY:h,pillTopY:i,pillMode:f,label:s,pillWidth:c,style:mt("item",[],t.styleCtx)}}function q4(e){let t=new Map,n=r=>{if(Mt(r)){t.set(r.name??rO(r),r);return}if(_t(r)){for(let i of r.content)i.$type!=="DescriptionDirective"&&n(i);return}if(Ve(r)){for(let i of r.content)i.$type!=="DescriptionDirective"&&n(i);return}};for(let r of e)for(let i of r.content)i.$type!=="DescriptionDirective"&&n(i);return t}function Yw(e,t,n={}){let r=gw(t);return new um().place(e,t,n,r,{sequenceItem:qw,sequenceOne:Vw,resolveChildStart:sO,newCursor:Bh,estimateTextWidth:ft,predictItemBarExtraHeight:oO,computeDateWindow:X4,sizeBesideHeader:U4,collectItems:q4,buildDependencies:H4,buildNowline:z4})}function pm(e){return e.toISOString().slice(0,10)}function Kw(e){return e.id!==void 0?e.id:/[\r\n]/.test(e.title)?e.title.replace(/\s*[\r\n]+\s*/g," ").trim():e.title}function Zw(e,t){for(let n of e)n.kind==="item"?t(n):Zw(n.children,t)}function V4(e,t,n){let r=Kw(e);e.textSpills&&n.push(Ln(t,"NL.I1000","info",{name:r},r)),e.chipsOutside&&n.push(Ln(t,"NL.I1001","info",{name:r},r)),(e.box.width<us||e.dotSpills||e.iconSpills||e.footnoteSpills)&&n.push(Ln(t,"NL.I1002","info",{name:r},r)),e.hasOverflow&&n.push(Ln(t,"NL.I1003","info",{name:r,anchor:e.overflowAnchorId},r)),cO(e,t,n),uO(e,t,n)}function cO(e,t,n){let r=e.wavePinOverride;if(!r)return;let i=Kw(e);n.push(Ln(t,"NL.W1001","warning",{name:i,pin:r.pin,key:r.key,wave:r.wave,start:r.start},i))}function uO(e,t,n){let r=e.nonWorkingPin;if(!r)return;let i=Kw(e);n.push(Ln(t,"NL.I1008","info",{name:i,pin:r.pin,key:r.key,start:r.start},i))}function Ln(e,t,n,r,i){return{message:Kr(e,t,r),severity:n,code:t,entityId:i,lspSeverity:n==="warning"?2:3,data:{code:t,args:r}}}function fO(e,t,n){let r=e.id??e.title,i=[];Zw(e.children,a=>i.push(a));for(let a of i)V4(a,t,n);let o=new Set(i.map(a=>a.box.y));o.size>1&&n.push(Ln(t,"NL.I1004","info",{lane:r,rows:o.size},r)),(e.utilization?.segments.some(a=>a.classification==="red")??!1)&&n.push(Ln(t,"NL.I1005","info",{lane:r},r));for(let a of e.nested)fO(a,t,n)}function dO(e,t,n){Zw(e.children,r=>{cO(r,t,n),uO(r,t,n)});for(let r of e.nested)dO(r,t,n)}function Y4(e,t,n){e.waveSolve?.capped&&n.push(Ln(t,"NL.W1002","warning",{passes:e.waveSolve.passes}));let r=e.waves??[],i=r.filter(o=>o.empty).map(o=>o.id);if(i.length>0){let o=i.length===r.length?{reason:"all",names:i}:i.length===1?{reason:"one",name:i[0]}:{reason:"many",names:i};n.push(Ln(t,"NL.I1006","info",o,o.reason==="one"?o.name:void 0))}for(let o of e.milestones){if(o.overrunByWave===void 0||o.overrunDate===void 0)continue;let s=r.find(c=>c.id===o.overrunByWave);if(!s)continue;let a=o.id??o.title;n.push(Ln(t,"NL.I1007","info",{name:a,date:o.overrunDate,wave:s.id,end:pm(s.endDate)},a))}}function Jw(e,t={}){let n=t.locale??"en-US",r=[];for(let i of e.swimlanes)fO(i,n,r);for(let i of e.includes)for(let o of i.nestedSwimlanes)dO(o,n,r);if(Y4(e,n,r),t.today){let i=t.today,o=e.timeline.startDate,s=e.timeline.endDate;(i<o||i>s)&&r.push(Ln(n,"NL.W1000","warning",{date:pm(i),start:pm(o),end:pm(s)}))}return r}var es=class extends Error{constructor(t){super(t),this.name="TimezoneError"}};function Qw(e){if(!e||e.toLowerCase()==="local")return{kind:"local"};if(e.toUpperCase()==="UTC")return{kind:"utc"};if(e==="Z")return{kind:"offset",ms:0};let t=/^([+-])(\d{2})(?::?(\d{2}))?$/.exec(e);if(t){let n=t[1]==="+"?1:-1,r=parseInt(t[2],10),i=t[3]!==void 0?parseInt(t[3],10):0;if(r>23||i>59)throw new es(`nowline: invalid timezone offset "${e}". Hours must be 0\u201323 and minutes 0\u201359.`);return{kind:"offset",ms:n*(r*60+i)*6e4}}try{return{kind:"iana",name:Intl.DateTimeFormat(void 0,{timeZone:e}).resolvedOptions().timeZone}}catch{throw new es(`nowline: unrecognised timezone "${e}". Use "local", "UTC", an ISO 8601 offset (e.g. "+05:30", "-07:00", "Z"), or an IANA timezone name (e.g. "America/Los_Angeles", "Asia/Kolkata").`)}}function hm(e,t){switch(t.kind){case"local":return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()));case"utc":return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()));case"offset":{let n=new Date(e.getTime()+t.ms);return new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()))}case"iana":{let n=new Intl.DateTimeFormat("en-CA",{timeZone:t.name,year:"numeric",month:"2-digit",day:"2-digit"}).formatToParts(e),r=0,i=0,o=0;for(let s of n)s.type==="year"?r=parseInt(s.value,10):s.type==="month"?i=parseInt(s.value,10)-1:s.type==="day"&&(o=parseInt(s.value,10));return new Date(Date.UTC(r,i,o))}}}var K4=/^(\d{4})-(\d{2})-(\d{2})$/,Z4=/^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?)(Z|([+-])(\d{2})(?::?(\d{2}))?)$/,J4=/^(\d{4})-(\d{2})-(\d{2})T\d{2}:\d{2}:\d{2}(?:\.\d+)?$/;function eE(e={}){let t=e.zone??{kind:"local"},n=e.clock??(()=>new Date),r=e.now;if(!(r==="-"||r===null)){if(r instanceof Date)return r;if(r!==void 0){let i=K4.exec(r);if(i)return new Date(Date.UTC(parseInt(i[1],10),parseInt(i[2],10)-1,parseInt(i[3],10)));let o=Z4.exec(r);if(o){let a=new Date(r);if(!Number.isNaN(a.getTime())){if(o[2]==="Z")return hm(a,{kind:"utc"});let l=o[3]==="+"?1:-1,u=parseInt(o[4],10),f=o[5]!==void 0?parseInt(o[5],10):0,d=l*(u*60+f)*6e4;return hm(a,{kind:"offset",ms:d})}}let s=J4.exec(r);return s?new Date(Date.UTC(parseInt(s[1],10),parseInt(s[2],10)-1,parseInt(s[3],10))):void 0}return hm(n(),t)}}function Q4(e){return e===2?"warning":e===3?"info":"error"}function pO(e,t){return{severity:Q4(e.severity),code:gg(e),message:e.message,suggestion:cf(e.message),file:t,line:(e.range?.start.line??0)+1,column:(e.range?.start.character??0)+1}}function hO(e,t){return{severity:"error",code:"parse-error",message:e.message,file:t,line:e.token?.startLine??1,column:e.token?.startColumn??1}}function mO(e,t){return{severity:"error",code:"lex-error",message:e.message,file:t,line:e.line??1,column:e.column??1}}function gO(e,t){let n=e.line!==void 0?e.line+1:1;if(!al(e))return{severity:e.severity,code:"include",message:e.message,file:e.sourcePath,line:n,column:1};let r=t?mw(t,e):e.message,i=cf(r);return{severity:e.severity,code:e.code??uf(e.message),message:r,...i===void 0?{}:{suggestion:i},file:e.sourcePath,line:n,column:1}}function yO(e,t,n="warning"){return{severity:n,code:"render.warning",message:e,file:t,line:1,column:1}}function xO(e,t){return{severity:e.severity,code:e.code,message:e.message,file:t,line:1,column:1}}var vO="__nowline_browser_noop_include__";async function TO(e){throw new Error(`${vO}: include "${e}" was skipped \u2014 running in single-file mode.`)}function tE(e){return e.includes(vO)}var to={person:{viewBox:"0 0 24 24",body:'<circle cx="12" cy="8" r="4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M4 21a8 8 0 0 1 16 0" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>',ascii:"p"},people:{viewBox:"0 0 24 24",body:'<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><circle cx="9" cy="7" r="4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M22 21v-2a4 4 0 0 0-3-3.87" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M16 3.13a4 4 0 0 1 0 7.75" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>',ascii:"P"},points:{viewBox:"0 0 24 24",body:'<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" fill="currentColor" stroke="currentColor" stroke-width="1" stroke-linejoin="round"/>',ascii:"*"},time:{viewBox:"0 0 24 24",body:'<line x1="10" x2="14" y1="2" y2="2" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><line x1="12" x2="15" y1="14" y2="11" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><circle cx="12" cy="14" r="8" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>',ascii:"t"}},ej={calendar:{viewBox:"0 0 24 24",body:'<rect x="3" y="4" width="18" height="18" rx="2" ry="2" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><line x1="16" x2="16" y1="2" y2="6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><line x1="8" x2="8" y1="2" y2="6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><line x1="3" x2="21" y1="10" y2="10" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>',ascii:"d"}},wO={...to,...ej};var Mae={none:"",multiplier:"x",person:to.person.ascii,people:to.people.ascii,points:to.points.ascii,time:to.time.ascii};var mm=class{constructor(t="nl"){I(this,"prefix");I(this,"counter",0);this.prefix=t}next(t){let n=`${this.prefix}-${this.counter++}`;return t?`${n}-${t}`:n}};var tj=new Set(["svg","g","defs","symbol","use","path","rect","circle","ellipse","line","polyline","polygon","text","tspan","title","desc","linearGradient","radialGradient","stop","clipPath","mask","pattern","filter","feGaussianBlur","feColorMatrix","feOffset","feMerge","feMergeNode","feFlood","feComposite","feBlend","feDropShadow","image"]),nj=new Set(["d","x","y","x1","y1","x2","y2","cx","cy","r","rx","ry","width","height","viewBox","preserveAspectRatio","fill","fill-opacity","fill-rule","stroke","stroke-width","stroke-opacity","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-dasharray","stroke-dashoffset","opacity","transform","points","id","class","clip-path","mask","filter","font-family","font-size","font-weight","font-style","text-anchor","dx","dy","rotate","letter-spacing","word-spacing","style","xmlns","href","xlink:href","offset","stop-color","stop-opacity","gradientUnits","gradientTransform","spreadMethod","maskUnits","maskContentUnits","stdDeviation","values","in","in2","mode","type","result","flood-color","flood-opacity","patternUnits","patternContentUnits","role","aria-label"]);function rj(e){let t=[],n=0,r=e.length;for(;n<r;){if(e[n]!=="<"){let u=n;for(;n<r&&e[n]!=="<";)n++;let f=e.slice(u,n);f.trim().length>0?t.push({kind:"text",text:f}):f.length>0&&t.push({kind:"text",text:f});continue}if(e.startsWith("<!--",n)){let u=e.indexOf("-->",n+4);if(u<0)break;t.push({kind:"comment",text:e.slice(n+4,u)}),n=u+3;continue}if(e.startsWith("<![CDATA[",n)){let u=e.indexOf("]]>",n+9);if(u<0)break;t.push({kind:"cdata",text:e.slice(n+9,u)}),n=u+3;continue}if(e.startsWith("<?",n)){let u=e.indexOf("?>",n+2);if(u<0)break;t.push({kind:"decl",text:e.slice(n+2,u)}),n=u+2;continue}if(e.startsWith("<!",n)){let u=e.indexOf(">",n+2);if(u<0)break;t.push({kind:"decl",text:e.slice(n+2,u)}),n=u+1;continue}if(e[n+1]==="/"){let u=e.indexOf(">",n+2);if(u<0)break;let f=e.slice(n+2,u).trim();t.push({kind:"close",name:f}),n=u+1;continue}let i=ij(e,n);if(i<0)break;let o=e.slice(n+1,i).trim(),s=o.endsWith("/"),a=s?o.slice(0,-1).trim():o,{name:c,attrs:l}=oj(a);t.push({kind:s?"self":"open",name:c,attrs:l}),n=i+1}return t}function ij(e,t){let n=t+1,r=null;for(;n<e.length;){let i=e[n];if(r)i===r&&(r=null);else if(i==='"'||i==="'")r=i;else if(i===">")return n;n++}return-1}function oj(e){let t=0;for(;t<e.length&&/\s/.test(e[t]);)t++;let n=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;let r=e.slice(n,t),i={};for(;t<e.length;){for(;t<e.length&&/\s/.test(e[t]);)t++;if(t>=e.length)break;let o=t;for(;t<e.length&&e[t]!=="="&&!/\s/.test(e[t]);)t++;let s=e.slice(o,t);if(t>=e.length||e[t]!=="="){s&&(i[s]="");continue}if(t++,t>=e.length)break;let a=e[t];if(a!=='"'&&a!=="'"){let l=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;i[s]=e.slice(l,t);continue}t++;let c=t;for(;t<e.length&&e[t]!==a;)t++;i[s]=e.slice(c,t),t<e.length&&t++}return{name:r,attrs:i}}function Nu(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function sj(e,t){if(e.startsWith("#")){let n=t.get(e.slice(1));return n?`#${n}`:null}if(/^url\(#[^)]+\)$/.test(e)){let n=e.slice(5,-1),r=t.get(n);return r?`url(#${r})`:null}return null}function EO(e,t={}){let n=t.idPrefix??"nl-logo",r=t.onWarn??(()=>{}),i=rj(e),o=new Map,s=0;for(let l of i)if((l.kind==="open"||l.kind==="self")&&l.attrs&&"id"in l.attrs){let u=l.attrs.id;u&&!o.has(u)&&o.set(u,`${n}-${s++}`)}let a=[],c=[];for(let l of i)if(l.kind!=="comment"&&l.kind!=="decl"){if(l.kind==="cdata"){c[c.length-1]&&a.push(Nu(l.text??""));continue}if(l.kind==="text"){if(c.length===0||c[c.length-1]){let u=(l.text??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");a.push(u)}continue}if(l.kind==="open"||l.kind==="self"){let u=l.name??"";if(u==="script"||u==="foreignObject"||u==="animate"||u==="animateTransform"||u==="animateMotion"||u==="set"){r(`sanitizer: dropping <${u}>`),l.kind==="open"&&c.push(!1);continue}if(!tj.has(u)){r(`sanitizer: dropping unknown element <${u}>`),l.kind==="open"&&c.push(!1);continue}let f=[`<${u}`],d=Object.keys(l.attrs??{}).sort();for(let p of d){let h=l.attrs[p];if(/^on/i.test(p)){r(`sanitizer: dropping event handler ${p}`);continue}if(!nj.has(p)){r(`sanitizer: dropping attribute ${p}`);continue}if(p==="href"||p==="xlink:href"){let g=sj(h,o);if(g===null){r(`sanitizer: dropping external href ${h}`);continue}f.push(` ${p}="${Nu(g)}"`);continue}if(p==="style"){r("sanitizer: dropping inline style");continue}if(p==="id"){let g=o.get(h);g&&f.push(` id="${Nu(g)}"`);continue}if(/\burl\(#/i.test(h)){let g=h.replace(/url\(#([^)]+)\)/gi,(T,x)=>{let y=o.get(x);return y?`url(#${y})`:"none"});f.push(` ${p}="${Nu(g)}"`);continue}if(/data:|javascript:|vbscript:/i.test(h)){r(`sanitizer: dropping suspicious value at ${p}`);continue}f.push(` ${p}="${Nu(h)}"`)}f.push(l.kind==="self"?"/>":">"),a.push(f.join("")),l.kind==="open"&&c.push(!0);continue}l.kind==="close"&&c.pop()&&a.push(`</${l.name}>`)}return a.join("")}var _O=/&/g,bO=/</g,kO=/>/g,aj=/"/g,lj=/'/g;function Bt(e){return e.replace(_O,"&").replace(bO,"<").replace(kO,">")}function ri(e){return e.replace(_O,"&").replace(bO,"<").replace(kO,">").replace(aj,""").replace(lj,"'")}function hl(e){let t=Object.keys(e).sort(),n=[];for(let r of t){let i=e[r];i==null||i===!1||(i===!0?n.push(r):n.push(`${r}="${ri(String(i))}"`))}return n.length?` ${n.join(" ")}`:""}function te(e,t,n){return n===void 0||n===""?`<${e}${hl(t)}/>`:`<${e}${hl(t)}>${n}</${e}>`}function Se(e,t){return`<text${hl(e)}>${Bt(t)}</text>`}function m(e){return Number.isFinite(e)?Number.isInteger(e)?e.toString():(Math.round(e*100)/100).toString():"0"}var cj={none:{dx:0,dy:0,stdDeviation:0,opacity:0},subtle:{dx:0,dy:1,stdDeviation:1.5,opacity:.2},soft:{dx:0,dy:3,stdDeviation:5,opacity:.3},hard:{dx:2,dy:2,stdDeviation:0,opacity:.45}};function uj(e,t){let n=`${e}-shadow-${t}`,r=cj[t],i=`<feGaussianBlur in="SourceAlpha" stdDeviation="${r.stdDeviation}"/><feOffset dx="${r.dx}" dy="${r.dy}" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="${r.opacity}"/></feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge>`;return te("filter",{id:n,x:"-50%",y:"-50%",width:"200%",height:"200%"},i)}function RO(e,t){return t==="none"?null:`url(#${e}-shadow-${t})`}function AO(e){return["subtle","soft","hard"].map(t=>uj(e,t)).join("")}var fj={thin:100,light:300,normal:400,bold:700};function dj(e){return ss[e]??14}function iE(e,t,n){return{"font-family":t[e.font],"font-size":n??dj(e.textSize),"font-weight":fj[e.weight]??400,"font-style":e.italic?"italic":"normal",fill:e.text}}function pj(e){if(e.border==="dashed")return"4 3";if(e.border==="dotted")return"1 3"}function $O(e){if(!e||e==="none"||e==="transparent")return 1;let t=e.startsWith("#")?e.slice(1):e;if(t.length===3&&(t=t.split("").map(s=>s+s).join("")),t.length!==6)return 1;let n=parseInt(t.slice(0,2),16)/255,r=parseInt(t.slice(2,4),16)/255,i=parseInt(t.slice(4,6),16)/255,o=s=>s<=.03928?s/12.92:((s+.055)/1.055)**2.4;return .2126*o(n)+.7152*o(r)+.0722*o(i)}function hj(e,t){return $O(e)>=.24?t.statusDot.onLight:t.statusDot.onDark}function xm(e,t){return e.length*t*.58}function LO(e,t,n,r,i,o,s){let a=i*.58,c=t?xm(t,i):0,l=t?a:0,u=n+c+l,{text:f,icon:d}=e,p=xm(f,i),h={"font-family":o,"font-size":i,fill:s};if(!d)return Se({x:m(u),y:m(r),...h},f);if(d.kind==="builtin"&&d.name==="multiplier")return Se({x:m(u),y:m(r),...h},`${f}\xD7`);if(d.kind==="builtin"){let T=to[d.name],x=Se({x:m(u),y:m(r),...h},f),y=i*.1,E=i,w=u+p+y,b=r-i*.85,L=`<svg x="${m(w)}" y="${m(b)}" width="${m(E)}" height="${m(E)}" viewBox="${T.viewBox}" style="color:${ri(s)}" aria-hidden="true">${T.body}</svg>`;return x+L}let g=m(i*.1);return`<text x="${m(u)}" y="${m(r)}" font-family="${ri(o)}" font-size="${i}" fill="${ri(s)}">${Bt(f)}<tspan dx="${g}">${Bt(d.text)}</tspan></text>`}var IO=.6,mj=.5;function gj(e){let{metaText:t,capacity:n,x:r,baselineY:i,fontSize:o,fontFamily:s,color:a}=e;if(!t&&!n)return"";let c={"font-family":s,"font-size":o,fill:a};if(!n)return Se({x:m(r),y:m(i),...c},t);if(!t)return LO(n,void 0,r,i,o,s,a);let l=m(o*IO),u=`<text x="${m(r)}" y="${m(i)}" font-family="${ri(s)}" font-size="${o}" fill="${ri(a)}">`,{text:f,icon:d}=n;if(!d)return u+Bt(t)+`<tspan dx="${l}">${Bt(f)}</tspan></text>`;if(d.kind==="builtin"&&d.name==="multiplier")return u+Bt(t)+`<tspan dx="${l}">${Bt(f)}\xD7</tspan></text>`;if(d.kind==="literal"){let L=m(o*.1);return u+Bt(t)+`<tspan dx="${l}">${Bt(f)}</tspan><tspan dx="${L}">${Bt(d.text)}</tspan></text>`}let p=to[d.name],h=L=>L.length*o*mj,g=r+h(t)+o*IO,T=o*.1,x=o,y=g+h(f)+T,E=i-o*.85,w=u+Bt(t)+`<tspan dx="${l}">${Bt(f)}</tspan></text>`,b=`<svg x="${m(y)}" y="${m(E)}" width="${m(x)}" height="${m(x)}" viewBox="${p.viewBox}" style="color:${ri(a)}" aria-hidden="true">${p.body}</svg>`;return w+b}function yj(e,t){let n=wO.calendar,r=`<svg x="${m(e.glyphTopLeft.x)}" y="${m(e.glyphTopLeft.y)}" width="${m(e.glyphSize)}" height="${m(e.glyphSize)}" viewBox="${n.viewBox}" style="color:${ri(t)}" aria-hidden="true">${n.body}</svg>`,i=`<title>${Bt(e.isoDate)}</title>`;return te("g",{"data-layer":"inline-date-pin","data-side":e.side,"data-date":e.isoDate,"data-spilled":e.spilled?"true":null},i+r)}function oE(e,t){return!e||e.length===0?"":e.map(n=>yj(n,t)).join("")}function xj(e){return(e?.length??0)>0}function DO(e){return e?.some(t=>t.side==="after")??!1}function vj(e,t,n,r,i,o={}){let s=Math.min(El[i.cornerRadius]??4,r/2);return te("rect",{x:m(e),y:m(t),width:m(n),height:m(r),rx:m(s),ry:m(s),fill:i.bg==="none"?"transparent":i.bg,stroke:i.fg,"stroke-width":1,"stroke-dasharray":pj(i)??null,...o})}function Tj(e,t,n,r){let i=e.box.x+e.cardBox.x,o=e.box.y+e.cardBox.y,s=e.cardBox.width,a=e.cardBox.height,c=e.style.bg==="none"?n.surface.headerBox:e.style.bg,l=n.header.cardBorder,u=te("rect",{x:m(i),y:m(o),width:m(s),height:m(a),rx:6,ry:6,fill:c,stroke:l,"stroke-width":1,filter:`url(#${t}-shadow-subtle)`}),f=[];e.titleLines.forEach((x,y)=>{f.push(Se({x:m(i+16),y:m(o+26+y*20),"font-family":r[e.style.font],"font-size":16,"font-weight":600,fill:e.style.text},x))});let d=f.join(""),p=o+26+Math.max(0,e.titleLines.length-1)*20,h=n.header.author,g=[];e.authorLines.forEach((x,y)=>{g.push(Se({x:m(i+16),y:m(p+18+y*14),"font-family":r[e.style.font],"font-size":11,fill:h},x))});let T=g.join("");return te("g",{"data-layer":"header","data-id":`${t}-header`},u+d+T)}function wj(e,t,n){let r=n.timeline.gridLine,i=n.timeline.minorGridLine,o=e.bottomTickPanelHeight??0,s=e.bottomTickPanelY!==void 0&&o>0,a=e.tickPanelY,c=s?e.bottomTickPanelY+o:e.box.y+e.box.height,l=t,u=e.box.y+e.box.height,f=[];for(let d of e.ticks)if(d.major)f.push(te("line",{x1:m(d.x),y1:m(a),x2:m(d.x),y2:m(c),stroke:r,"stroke-width":1}));else if(e.minorGrid){if(d.labelX===void 0)continue;f.push(te("line",{x1:m(d.x),y1:m(l),x2:m(d.x),y2:m(u),stroke:i,"stroke-width":1}))}for(let d of e.nonWorking??[])d.seam&&f.push(te("line",{x1:m(d.x),y1:m(l),x2:m(d.x),y2:m(u),stroke:n.timeline.nonWorkingSeam,"stroke-width":1,"stroke-dasharray":"1 3"}));return te("g",{"data-layer":"grid"},f.join(""))}function MO(e,t,n,r){let i=e.box.y+e.box.height,o=[];for(let s of e.nonWorking??[]){if(!s.band)continue;let a={x:s.x,y:t,width:s.width,height:i-t},c=r?aE(a,r):a;!c||c.width<=0||c.height<=0||o.push(te("rect",{x:m(c.x),y:m(c.y),width:m(c.width),height:m(c.height),fill:n.timeline.nonWorkingFill,"fill-opacity":Vm}))}return o.length===0?"":te("g",{"data-layer":"non-working"},o.join(""))}function Ej(e,t,n){let r=e.box.y+e.box.height,i=[];for(let o of e.nonWorking??[])o.label===void 0||!o.labelBox||(o.cut&&i.push(te("line",{x1:m(o.x),y1:m(o.labelBox.y+4),x2:m(o.x),y2:m(r),stroke:t.timeline.nonWorkingSeam,"stroke-width":1,"stroke-dasharray":"1 3"})),i.push(SO(o.label,o.labelBox,o.labelSide,t,n)));for(let o of e.workingExceptions??[])o.labelBox&&i.push(SO(o.label,o.labelBox,o.labelSide,t,n));return i.length===0?"":te("g",{"data-layer":"non-working-label"},i.join(""))}function SO(e,t,n,r,i){let o=n==="left",s=t.y+4,a={x:m(o?t.x+t.width:t.x),y:m(s+4),"font-family":i.sans,"font-size":10,fill:r.timeline.labelText};return o&&(a["text-anchor"]="end"),Se(a,e)}function _j(e,t,n){let r=t.timeline.panelFill,i=t.timeline.border,o=t.timeline.labelText,s=[],a=e.tickPanelY,c=e.tickPanelHeight,l=c>0,u=e.markerRow.height>0,f=e.waveStrip?e.waveStrip.y+e.waveStrip.height:a+c,d=e.markerRow.height,p=e.bottomTickPanelY,h=e.bottomTickPanelHeight??0,g=p!==void 0&&h>0;l&&s.push(te("rect",{x:m(e.box.x),y:m(a),width:m(e.box.width),height:m(c),rx:4,ry:4,fill:r,stroke:i,"stroke-width":1})),u&&s.push(te("rect",{x:m(e.box.x),y:m(f),width:m(e.box.width),height:m(d),rx:4,ry:4,fill:r,stroke:i,"stroke-width":1})),g&&s.push(te("rect",{x:m(e.box.x),y:m(p),width:m(e.box.width),height:m(h),rx:4,ry:4,fill:r,stroke:i,"stroke-width":1}));for(let T of e.ticks)T.major&&(!T.label||T.labelX===void 0||(l&&s.push(Se({x:m(T.labelX),y:m(a+bl(c)),"font-family":n.sans,"font-size":so,fill:o,"text-anchor":"middle"},T.label)),g&&s.push(Se({x:m(T.labelX),y:m(p+bl(h)),"font-family":n.sans,"font-size":so,fill:o,"text-anchor":"middle"},T.label))));return te("g",{"data-layer":"timeline"},s.join(""))}function bj(e,t,n){if(!e)return"";let r=t.nowline.stroke,i=t.nowline.labelText,o=te("line",{x1:m(e.x),y1:m(e.topY),x2:m(e.x),y2:m(e.bottomY),stroke:r,"stroke-width":ju}),s=kj(e,r),a=Rj(e,i,n);return te("g",{"data-layer":"nowline"},o+s+a)}function FO(e){let t=ju/2;return e.pillMode==="flag-right"?e.x-t:e.pillMode==="flag-left"?e.x+t:e.x}function kj(e,t){let n=e.pillTopY,r=e.pillTopY+di,i=Fm,o=e.pillWidth;if(e.pillMode==="center")return te("rect",{x:m(e.x-o/2),y:m(n),width:m(o),height:m(di),rx:i,ry:i,fill:t});let s=FO(e);if(e.pillMode==="flag-right"){let l=s+o,u=[`M ${m(s)} ${m(n)}`,`L ${m(l-i)} ${m(n)}`,`A ${i} ${i} 0 0 1 ${m(l)} ${m(n+i)}`,`L ${m(l)} ${m(r-i)}`,`A ${i} ${i} 0 0 1 ${m(l-i)} ${m(r)}`,`L ${m(s)} ${m(r)}`,"Z"].join(" ");return te("path",{d:u,fill:t})}let a=s-o,c=[`M ${m(s)} ${m(n)}`,`L ${m(a+i)} ${m(n)}`,`A ${i} ${i} 0 0 0 ${m(a)} ${m(n+i)}`,`L ${m(a)} ${m(r-i)}`,`A ${i} ${i} 0 0 0 ${m(a+i)} ${m(r)}`,`L ${m(s)} ${m(r)}`,"Z"].join(" ");return te("path",{d:c,fill:t})}function Rj(e,t,n){let r=e.pillTopY+Bm,i=FO(e),o,s;return e.pillMode==="center"?(o=e.x,s="middle"):e.pillMode==="flag-right"?(o=i+as,s="start"):(o=i-as,s="end"),Se({x:m(o),y:m(r),"font-family":n.sans,"font-size":Al,"font-weight":700,fill:t,"text-anchor":s},e.label)}function Aj(e,t,n,r,i){let o=[];e.waveTooltip!==void 0&&o.push(`<title>${Bt(e.waveTooltip)}</title>`);let s=RO(n,e.style.shadow);o.push(vj(e.box.x,e.box.y,e.box.width,e.box.height,e.style,{filter:s??null})),e.waveRole==="background"&&o.push(Yj(e.box,e.style,n));let a=hj(e.style.bg,r),c={done:a.done,"in-progress":a.inProgress,"at-risk":a.atRisk,blocked:a.blocked,planned:a.planned,neutral:a.neutral},l=c[e.status]??c.neutral;if(e.progressFraction>0){let x=Math.max(0,Math.min(e.box.width,e.box.width*e.progressFraction));o.push(te("rect",{x:m(e.box.x),y:m(e.box.y+e.box.height-tr),width:m(x),height:tr,fill:e.style.fg,opacity:.55}))}let u=e.dotSpills&&e.dotSpillCx!==null?e.dotSpillCx:e.box.x+e.box.width-uo;o.push(te("circle",{cx:m(u),cy:m(e.box.y+sg),r:ir,fill:l})),o.push(oE(e.inlineDatePins,e.style.fg));let f;if(e.textSpills)f=e.box.x+e.box.width+Ar,e.iconSpills&&(f+=Ir+In);else{let x=!!e.linkIcon&&e.linkIcon!=="none",E=e.inlineDatePins?.find(w=>w.side==="after"&&!w.spilled)?hi(x,{barWidth:e.box.width}):hi(!t.noLinks&&x&&!e.iconSpills);f=e.box.x+E}let d=e.style.text,p=r.entities.item.text,h=e.textSpills?p:d,g=e.textSpills?p:e.style.fg,T=e.titleLines??(e.title?[e.title]:[]);if(T.forEach((x,y)=>{x!==""&&o.push(Se({x:m(f),y:m(e.box.y+tf+y*Dl),"font-family":i[e.style.font],"font-size":Ll,"font-weight":600,fill:h},x))}),(e.metaText||e.capacity)&&o.push(gj({metaText:e.metaText,capacity:e.capacity,x:f,baselineY:e.box.y+nf(T.length),fontSize:ig,fontFamily:i[e.style.font],color:g})),e.footnoteIndicators.length>0){let x=e.box.y+ag;if(e.footnoteSpills&&e.footnoteSpillStartX!==null){let y=e.footnoteSpillStartX;for(let E=0;E<e.footnoteIndicators.length;E++){let w=e.footnoteIndicators[E];o.push(Se({x:m(y),y:m(x),"font-family":i.sans,"font-size":Fl,"font-weight":700,fill:p},String(w))),y+=An}}else{let y=e.box.x+e.box.width-cs;for(let E=e.footnoteIndicators.length-1;E>=0;E--){let w=e.footnoteIndicators[E];o.push(Se({x:m(y),y:m(x),"font-family":i.sans,"font-size":Fl,"font-weight":700,fill:e.style.text,"text-anchor":"end"},String(w))),y-=An}}}if(!t.noLinks&&e.linkIcon&&e.linkIcon!=="none"){let x={linear:"#5e6ad2",github:"#0f172a",jira:"#0052cc",generic:r.item.linkIconFg},y=x[e.linkIcon]??x.generic,E=Ir,w=e.iconSpills&&e.iconSpillX!==null?e.iconSpillX:e.box.x+fo,b=e.box.y+fo,L=te("rect",{x:m(w),y:m(b),width:E,height:E,rx:2,ry:2,fill:y}),P=w,$=b,G=te("path",{d:`M${m(P+4)} ${m($+10)} L${m(P+10)} ${m($+4)} M${m(P+6)} ${m($+4)} H${m(P+10)} V${m($+8)}`,stroke:"#ffffff",fill:"none","stroke-width":1.1,"stroke-linecap":"round","stroke-linejoin":"round"}),Y=L+G,D=e.linkHref?te("a",{href:e.linkHref,target:"_blank",rel:"noopener"},Y):Y;o.push(D)}if(e.hasOverflow&&e.overflowBox){let x=r.item.overflowTailFill,y=r.item.overflowTailStroke,E=r.item.overflowCaption;o.push(te("rect",{x:m(e.overflowBox.x),y:m(e.overflowBox.y),width:m(e.overflowBox.width),height:m(e.overflowBox.height),fill:x,stroke:y,"stroke-width":1})),e.overflowAnchorId&&e.overflowBox.width>60&&o.push(Se({x:m(e.overflowBox.x+e.overflowBox.width/2),y:m(e.overflowBox.y+e.overflowBox.height/2+3),"font-family":i.sans,"font-size":9,"font-weight":700,fill:E,"text-anchor":"middle"},`past ${e.overflowAnchorId}`))}for(let x of e.labelChips){let y=Math.min(El[x.style.cornerRadius]??8,x.box.height/2);o.push(te("rect",{x:m(x.box.x),y:m(x.box.y),width:m(x.box.width),height:m(x.box.height),rx:m(y),ry:m(y),fill:x.style.bg==="none"?"transparent":x.style.bg,stroke:x.style.fg,"stroke-width":.5})),o.push(Se({x:m(x.box.x+x.box.width/2),y:m(x.box.y+x.box.height/2+3),...iE(x.style,i,ss.xs),"text-anchor":"middle"},x.text))}return te("g",{"data-layer":"item","data-id":e.id??null},o.join(""))}function Ij(e,t,n,r,i){let o=[],s=lo(e.style.bg);if(s){if(o.push(te("rect",{x:m(e.box.x),y:m(e.box.y),width:m(e.box.width),height:m(e.box.height),rx:6,ry:6,fill:e.style.bg,stroke:e.style.fg,"stroke-width":1,"fill-opacity":.18,filter:`url(#${n}-shadow-subtle)`})),e.title){let a=co(e.title),c=e.box.x,l=e.box.y,u=ao,f=6,d=`M${m(c+f)} ${m(l)}H${m(c+a)}V${m(l+u-f)}A${f} ${f} 0 0 1 ${m(c+a-f)} ${m(l+u)}H${m(c)}V${m(l+f)}A${f} ${f} 0 0 1 ${m(c+f)} ${m(l)}Z`;o.push(te("path",{d,fill:e.style.fg})),o.push(Se({x:m(c+Rl),y:m(l+Cm),"font-family":i[e.style.font],"font-size":Om,"font-weight":600,fill:"#ffffff"},e.title))}}else{let a=e.style.fg,c=Ul(s,!!e.title,xj(e.inlineDatePins));if(e.style.bracket!=="none"&&!e.waveOnly){let u=e.box.y+e.box.height,f=e.style.bracket==="dashed"?"3 2":null,d=c>0?`M${m(e.box.x+4)} ${m(e.box.y-c)} L${m(e.box.x)} ${m(e.box.y-c)} L${m(e.box.x)} ${m(u)} L${m(e.box.x+4)} ${m(u)}`:`M${m(e.box.x)} ${m(e.box.y)} L${m(e.box.x)} ${m(u)} L${m(e.box.x+4)} ${m(u)}`;o.push(te("path",{d,fill:"none",stroke:a,"stroke-width":1,"stroke-dasharray":f}))}e.title&&o.push(Se({x:m(mo(e.box.x,ds,DO(e.inlineDatePins))),y:m(e.box.y-af),...iE(e.style,i,Wl),"fill-opacity":.7},e.title))}o.push(oE(e.inlineDatePins,e.style.fg));for(let a of e.children)o.push(sE(a,t,n,r,i));return te("g",{"data-layer":"group","data-id":e.id??null},o.join(""))}function Sj(e,t,n,r,i){let o=[];if(e.style.bracket==="solid"||e.style.bracket==="dashed"){let c=e.box.y-12,l=e.box.y+e.box.height+12,u=e.box.x,f=e.box.x+e.box.width,d=r.parallel.bracketStroke;o.push(te("path",{d:`M${m(u+4)} ${m(c)} H${m(u)} V${m(l)} H${m(u+4)}`,fill:"none",stroke:d,"stroke-width":1.25,"stroke-dasharray":e.style.bracket==="dashed"?"3 3":null,"stroke-linejoin":"round"})),o.push(te("path",{d:`M${m(f-4)} ${m(c)} H${m(f)} V${m(l)} H${m(f-4)}`,fill:"none",stroke:d,"stroke-width":1.25,"stroke-dasharray":e.style.bracket==="dashed"?"3 3":null,"stroke-linejoin":"round"}))}e.title&&o.push(Se({x:m(mo(e.box.x,ps,DO(e.inlineDatePins))),y:m(e.box.y-af),...iE(e.style,i,Wl),"fill-opacity":.7},e.title)),o.push(oE(e.inlineDatePins,e.style.fg));for(let s of e.children)o.push(sE(s,t,n,r,i));return te("g",{"data-layer":"parallel","data-id":e.id??null},o.join(""))}function sE(e,t,n,r,i){return e.kind==="item"?Aj(e,t,n,r,i):e.kind==="group"?Ij(e,t,n,r,i):Sj(e,t,n,r,i)}var NO=2;function Nj(e,t){switch(e){case"green":return t.swimlane.utilizationOk;case"yellow":return t.swimlane.utilizationWarn;case"red":return t.swimlane.utilizationOver}}function Pj(e,t){if(!e.utilization||e.utilization.segments.length===0)return"";let n=e.box.y+e.box.height-NO,r=e.utilization.segments.map(i=>{let o=i.endX-i.startX;return o<=0?"":te("rect",{x:m(i.startX),y:m(n),width:m(o),height:NO,fill:Nj(i.classification,t),"data-utilization":i.classification,"data-load":m(i.load)})});return te("g",{"data-layer":"lane-utilization","data-id":e.id??null},r.join(""))}function Cj(e,t){let n=e.bandIndex%2===0?t.swimlane.rowTintEven:t.swimlane.rowTintOdd,r=t.swimlane.border;return te("g",{"data-layer":"swimlane-bg","data-id":e.id??null},te("rect",{x:m(e.box.x),y:m(e.box.y),width:m(e.box.width),height:m(e.box.height),fill:n,stroke:r,"stroke-width":1}))}function BO(e,t,n,r,i){let o=r.swimlane.tabFill,s=r.swimlane.tabStroke,a=r.swimlane.tabText,c=r.swimlane.ownerText,l=r.swimlane.footnoteIndicator,u=[];if(e.title){let d=e.capacity?oo(e.capacity.text,e.capacity.icon,10):0,p=e.footnoteIndicators.length>0?e.footnoteIndicators.join(","):"",h=p?xm(p,10):0,g=Xl(e.box.x,e.title,e.owner,d,h),T=Uu,x=e.box.y+10,y=x+Xu;u.push(te("rect",{x:m(g.tabX),y:m(x),width:m(g.tabW),height:m(T),rx:4,ry:4,fill:o,stroke:s,"stroke-width":1})),u.push(Se({x:m(g.titleX),y:m(y),"font-family":i[e.style.font],"font-size":12,"font-weight":600,fill:a},e.title)),e.owner&&u.push(Se({x:m(g.ownerX),y:m(y),"font-family":i[e.style.font],"font-size":10,fill:c},`owner: ${e.owner}`)),e.capacity&&u.push(LO(e.capacity,void 0,g.badgeX,y,10,i[e.style.font],c)),p&&u.push(Se({x:m(g.footnoteRightX),y:m(x+14),"font-family":i.sans,"font-size":10,"font-weight":700,fill:l,"text-anchor":"end"},p))}for(let f of e.children)u.push(sE(f,t,n,r,i));return u.push(Pj(e,r)),te("g",{"data-layer":"swimlane","data-id":e.id??null},u.join(""))}function Oj(e,t,n){let r=e.radius,i=e.center.x,o=e.center.y,s=t.anchorDiamond.fill,a=t.anchorDiamond.stroke,c=te("path",{d:`M${m(i)} ${m(o-r)} L${m(i+r)} ${m(o)} L${m(i)} ${m(o+r)} L${m(i-r)} ${m(o)} Z`,fill:s,stroke:a,"stroke-width":1.25}),l=t.anchorDiamond.label,u=e.labelSide==="left"?e.labelBox.x+e.labelBox.width:e.labelBox.x,f={x:m(u),y:m(o+4),"font-family":n.sans,"font-size":10,fill:l};e.labelSide==="left"&&(f["text-anchor"]="end");let d=e.title?Se(f,e.title):"";return te("g",{"data-layer":"anchor","data-id":e.id??null},WO(e.hiddenDate)+c+d)}function $j(e,t){let n=t.anchorDiamond.cutLine;return te("line",{x1:m(e.center.x),y1:m(e.center.y+e.radius+1),x2:m(e.center.x),y2:m(e.cutBottomY),stroke:n,"stroke-width":1,"stroke-dasharray":"1 3"})}function Lj(e,t,n){let r=e.center.x,i=e.center.y,o=e.radius,s=t.milestoneDiamond.fill,a=te("path",{d:`M${m(r)} ${m(i-o)} L${m(r+o)} ${m(i)} L${m(r)} ${m(i+o)} L${m(r-o)} ${m(i)} Z`,fill:s,stroke:s,"stroke-width":1}),c=t.milestoneDiamond.label,l=e.labelSide==="left"?e.labelBox.x+e.labelBox.width:e.labelBox.x,u={x:m(l),y:m(i+4),"font-family":n.sans,"font-size":10,"font-weight":600,fill:c};e.labelSide==="left"&&(u["text-anchor"]="end");let f=e.title?Se(u,e.title):"";return te("g",{"data-layer":"milestone","data-id":e.id??null},WO(e.hiddenDate)+a+f)}function WO(e){return e===void 0?"":`<title>${Bt(e)}</title>`}function Dj(e,t,n){let r=e.isOverrun?n.milestoneDiamond.cutLineOverrun:n.milestoneDiamond.cutLineNormal,i=[];if(e.onWaveBoundary||i.push(te("line",{x1:m(e.center.x),y1:m(e.center.y+e.radius+1),x2:m(e.center.x),y2:m(e.cutBottomY),stroke:r,"stroke-width":2,"stroke-dasharray":Gu,"stroke-linecap":"round"})),e.slackArrows&&e.slackArrows.length>0){let o=n.milestoneDiamond.slack;for(let s of e.slackArrows)i.push(te("path",{d:`M${m(s.x)} ${m(s.y)} H${m(e.center.x-6)}`,fill:"none",stroke:o,"stroke-width":1.1,"stroke-dasharray":"3 3","stroke-linecap":"round","marker-end":`url(#${t}-arrow-dark)`}))}return i.join("")}function PO(e,t,n){let r=e.kind==="overflow"?n.dependency.overflowStroke:n.dependency.edgeStroke,i=e.waypoints;if(i.length<2)return"";let o=e.kind==="underBar"?.8:1.1;return te("path",{d:Mj(i,zm),fill:"none",stroke:r,"stroke-width":o,"stroke-dasharray":e.kind==="overflow"?"4 2":null,"stroke-linejoin":"round","marker-end":`url(#${t}-arrow)`})}function Mj(e,t){if(e.length<2)return"";let n=[`M${m(e[0].x)} ${m(e[0].y)}`];for(let r=1;r<e.length;r++){let i=e[r-1],o=e[r];if(r===e.length-1){n.push(`L${m(o.x)} ${m(o.y)}`);continue}let s=e[r+1],a=Math.sign(o.x-i.x),c=Math.sign(o.y-i.y),l=Math.sign(s.x-o.x),u=Math.sign(s.y-o.y),f=Math.hypot(o.x-i.x,o.y-i.y),d=Math.hypot(s.x-o.x,s.y-o.y),p=Math.min(t,f/2,d/2);if(p<=0||a!==0&&l!==0||c!==0&&u!==0){n.push(`L${m(o.x)} ${m(o.y)}`);continue}let h={x:o.x-a*p,y:o.y-c*p},g={x:o.x+l*p,y:o.y+u*p};n.push(`L${m(h.x)} ${m(h.y)}`),n.push(`Q${m(o.x)} ${m(o.y)} ${m(g.x)} ${m(g.y)}`)}return n.join(" ")}function Fj(e,t,n,r){if(e.entries.length===0)return"";let i=n.footnotePanel.fill,o=n.footnotePanel.border,s=n.footnotePanel.header,a=n.footnotePanel.title,c=n.footnotePanel.description,l=n.footnotePanel.number,u=[];u.push(te("rect",{x:m(e.box.x),y:m(e.box.y),width:m(e.box.width),height:m(e.box.height),rx:6,ry:6,fill:i,stroke:o,"stroke-width":1,filter:`url(#${t}-shadow-subtle)`})),u.push(Se({x:m(e.box.x+Fn),y:m(e.box.y+Um),"font-family":r.sans,"font-size":12,"font-weight":700,fill:s},"Footnotes"));let f=e.box.y+Il+Fn,d=e.box.x+Fn,p=d+Fn;return e.entries.forEach((h,g)=>{let T=f+g*Sl;u.push(Se({x:m(d),y:m(T),"font-family":r.sans,"font-size":10,"font-weight":700,fill:l},String(h.number))),u.push(Se({x:m(p),y:m(T),"font-family":r.sans,"font-size":11,"font-weight":600,fill:a},h.title)),h.description&&u.push(Se({x:m(p+Math.max(120,h.title.length*6)),y:m(T),"font-family":r.sans,"font-size":11,fill:c},`\u2014 ${h.description}`))}),te("g",{"data-layer":"footnotes"},u.join(""))}function Bj(e,t,n,r,i,o){let s=r.includeRegion.border,a=r.includeRegion.fill,c=r.includeRegion.tabFill,l=r.includeRegion.tabStroke,u=r.includeRegion.tabText,f=r.includeRegion.badgeFill,d=r.includeRegion.badgeStroke,p=r.includeRegion.badgeText,h=e.box.x+8,g=e.box.y,T=e.box.width-16,x=e.box.height,y=te("rect",{x:m(h),y:m(g),width:m(T),height:m(x),rx:8,ry:8,fill:a,stroke:s,"stroke-width":1,"stroke-dasharray":Gu}),E=Uu,w=Gl(e.box.x,e.label,e.sourcePath),b=g-E/2,L=te("rect",{x:m(w.tabX),y:m(b),width:m(w.tabWidth),height:E,rx:4,ry:4,fill:c,stroke:l,"stroke-width":1}),P=Se({x:m(w.tabLabelX),y:m(b+Xu),"font-family":i.sans,"font-size":11,"font-weight":600,fill:u},e.label),$=w.badgeX,G=w.badgeSize,Y=g-G/2,D=te("rect",{x:m($),y:m(Y),width:G,height:G,rx:4,ry:4,fill:f,stroke:d,"stroke-width":1}),S=te("path",{d:`M${m($+7)} ${m(Y+4)} H${m($+14)} V${m(Y+11)} M${m($+4)} ${m(Y+7)} H${m($+11)} V${m(Y+14)} H${m($+4)} Z`,stroke:p,"stroke-width":1.4,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}),F=9,X=g+4,R=te("rect",{x:m(w.sourceHaloX),y:m(X-F),width:m(w.sourceHaloWidth),height:F+6,fill:a}),C=Se({x:m(w.sourceTextX),y:m(X),"font-family":i.mono,"font-size":F,fill:p},e.sourcePath),N={x:h,y:g,width:T,height:x},j=o?MO(o.timeline,o.chartBox.y,r,N):"",q=o?.waves?jO(o.waves,N)+HO(o.waveBoundaries,N):"",z=o?.waves?zO(e.waveCrossings):"",ne=e.nestedSwimlanes.map(oe=>BO(oe,t,n,r,i)).join("");return te("g",{"data-layer":"include"},y+j+q+ne+z+L+P+D+S+R+C)}function Wj(e,t){let n=e.palette.attribution.mark,r=e.palette.attribution.link;if(e.swimlanes.length===0)return"";let i=e.header.attributionBox.x,o=e.header.attributionBox.y,s=pi,a=Se({x:"0",y:s,"font-family":t.sans,"font-size":qu,"font-weight":400,fill:n},zu)+Se({x:Pl,y:s,"font-family":t.sans,"font-size":pi,"font-weight":700,fill:n},"now")+te("rect",{x:Gm,y:12,width:jm,height:pi,fill:r})+Se({x:Vu,y:s,"font-family":t.sans,"font-size":pi,"font-weight":400,fill:n},"ine"),c=te("g",{transform:`translate(${m(i)} ${m(o)}) scale(${m(Nl)})`},a);return te("a",{href:Xm,target:"_blank",rel:"noopener","aria-label":"Powered by nowline"},te("g",{"data-layer":"attribution"},c))}async function Uj(e,t,n,r,i,o,s){if(!t)return"";let a;try{a=await t(e)}catch(u){let f=`logo: failed to load ${e}: ${u instanceof Error?u.message:String(u)}`;if(r.strict)throw u;return r.warn?.(f),""}let c=(a.mime??"").toLowerCase();if(c==="image/svg+xml"){let u=new TextDecoder().decode(a.bytes),f=EO(u,{idPrefix:`${n}-logo`,onWarn:r.warn});return te("g",{transform:`translate(${m(i)} ${m(o)})`},f)}if(c==="image/png"||c==="image/jpeg"||c==="image/jpg"||c==="image/webp"){let u=Xj(a.bytes);return te("image",{href:`data:${c};base64,${u}`,x:m(i),y:m(o),width:m(s),height:m(s),preserveAspectRatio:"xMidYMid meet"})}let l=`logo: unsupported mime ${c} for ${e}`;if(r.strict)throw new Error(l);return r.warn?.(l),""}function Xj(e){if(typeof btoa<"u"){let n="";for(let r=0;r<e.length;r++)n+=String.fromCharCode(e[r]);return btoa(n)}let t=globalThis;if(t.Buffer)return t.Buffer.from(e).toString("base64");throw new Error("renderer: no base64 encoder available")}var Gj=.24,gm=2,CO=3,jj=4,Hj=8,zj=10;function UO(e){return e.bg==="none"?"transparent":e.bg}function vm(e){return $O(e)>=Gj?"dark":"light"}function XO(e,t){return`url(#${e}-wave-hatch-${t})`}function qj(e,t,n){let r=Jm;return te("pattern",{id:`${e}-wave-hatch-${t}`,width:r,height:r,patternUnits:"userSpaceOnUse",patternTransform:"rotate(45)"},te("line",{x1:m(r/2),y1:0,x2:m(r/2),y2:r,stroke:t==="dark"?n.wave.hatch:n.wave.hatchOnDark,"stroke-width":Qm,opacity:Zm}))}function Vj(e){if(!e.waves)return[];let t=new Set,n=i=>{for(let o of i)o.kind==="item"?o.waveRole==="background"&&t.add(vm(UO(o.style))):n(o.children)},r=i=>{for(let o of i)n(o.children),r(o.nested)};r(e.swimlanes);for(let i of e.includes)r(i.nestedSwimlanes);return e.waveLegend?.entries.some(i=>i.kind==="background")&&t.add(vm(qO(e.palette))),["dark","light"].filter(i=>t.has(i))}function Yj(e,t,n){let i=Math.min(El[t.cornerRadius]??4,e.height/2);return te("rect",{x:m(e.x+.5),y:m(e.y+.5),width:m(Math.max(0,e.width-2*.5)),height:m(Math.max(0,e.height-2*.5)),rx:m(i),ry:m(i),fill:XO(n,vm(UO(t)))})}function aE(e,t){let n=Math.max(e.x,t.x),r=Math.max(e.y,t.y),i=Math.min(e.x+e.width,t.x+t.width),o=Math.min(e.y+e.height,t.y+t.height);if(!(i<=n||o<=r))return{x:n,y:r,width:i-n,height:o-r}}var nE=4,ym=.5;function GO(e,t){if(e.empty)return;let n=ym;return aE({x:e.strip.box.x,y:e.strip.box.y+n,width:e.strip.box.width,height:e.strip.box.height-2*n},{x:t.box.x+n,y:e.strip.box.y,width:t.box.width-2*n,height:e.strip.box.height})}function Kj(e,t){let n=Math.min(nE-ym,e.width/2,e.height/2),r=1e-6;return{left:e.x<=t.box.x+ym+r?n:0,right:e.x+e.width>=t.box.x+t.box.width-ym-r?n:0}}function Zj(e,t){let{x:n,y:r,width:i,height:o}=e,s=(a,c,l)=>a>0?` A${m(a)} ${m(a)} 0 0 1 ${m(c)} ${m(l)}`:"";return`M${m(n+t.left)} ${m(r)} H${m(n+i-t.right)}`+s(t.right,n+i,r+t.right)+` V${m(r+o-t.right)}`+s(t.right,n+i-t.right,r+o)+` H${m(n+t.left)}`+s(t.left,n,r+o-t.left)+` V${m(r+t.left)}`+s(t.left,n+t.left,r)+" Z"}function rE(e,t,n){let r=o=>n&&(n.left>0||n.right>0)?te("path",{d:Zj(t,n),...o}):te("rect",{x:m(t.x),y:m(t.y),width:m(t.width),height:m(t.height),...o}),i=r({fill:e.style.stripFill});return e.style.tint?i+r({fill:e.style.tint,"fill-opacity":Cl}):i}function Jj(e,t){let n=e.timeline,r=n.waveStrip;if(!e.waves||!r)return"";let i=[te("rect",{x:m(n.box.x),y:m(r.y),width:m(n.box.width),height:m(r.height),rx:nE,ry:nE,fill:t.timeline.panelFill,stroke:t.timeline.border,"stroke-width":1})];for(let o of e.waves){let s=GO(o,n);s&&i.push(te("g",{"data-id":o.id},`<title>${Bt(o.strip.tooltip)}</title>${rE(o,s,Kj(s,n))}`))}return te("g",{"data-layer":"wave-strip"},i.join(""))}function jO(e,t){let n=[];for(let r of e){if(!r.style.tint||r.empty)continue;let i=t?aE(r.columnBox,t):r.columnBox;!i||i.width<=0||i.height<=0||n.push(te("rect",{x:m(i.x),y:m(i.y),width:m(i.width),height:m(i.height),fill:r.style.tint,"fill-opacity":eg}))}return n.length===0?"":te("g",{"data-layer":"wave-bg"},n.join(""))}function HO(e,t){let n=[];for(let r of e??[]){let i=r.topY,o=r.bottomY;t&&(r.x<=t.x||r.x>=t.x+t.width||(i=Math.max(i,t.y),o=Math.min(o,t.y+t.height),o<=i))||n.push(te("line",{x1:m(r.x),y1:m(i),x2:m(r.x),y2:m(o),stroke:r.stroke,"stroke-width":Yu,"stroke-dasharray":r.dash}))}return n.length===0?"":te("g",{"data-layer":"wave-boundary"},n.join(""))}function OO(e,t){let n=xm(e,nr);return t?n*1.05:n}function Qj(e,t,n){let r=e.timeline,i=r.waveStrip;if(!e.waves||!i)return"";let o=i.y+i.height/2+jj,s=i.y+CO,a=i.height-2*CO,c=[],l=(u,f)=>{let d=OO(f,!1)+2*gm;return te("rect",{x:m(u-d/2),y:m(s),width:m(d),height:m(a),fill:t.timeline.panelFill})+Se({x:m(u),y:m(o),"font-family":n.sans,"font-size":nr,"font-style":"italic",fill:t.wave.labelMuted,"text-anchor":"middle"},f)};i.placeholder!==void 0&&c.push(l(r.box.x+r.box.width/2,i.placeholder));for(let u of e.waves){if(u.strip.gapLabel){let{text:h,x:g}=u.strip.gapLabel;c.push(l(g,h))}if(u.strip.marker){let{x:h,y:g}=u.strip.marker,T=tg/2;c.push(te("path",{d:`M${m(h)} ${m(g-T)} L${m(h+T)} ${m(g)} L${m(h)} ${m(g+T)} L${m(h-T)} ${m(g)} Z`,fill:t.timeline.panelFill,stroke:t.wave.boundary,"stroke-width":1.5},`<title>${Bt(u.strip.tooltip)}</title>`))}let f=GO(u,r);if(!f)continue;let d=f.x+f.width,p=u.strip.footnotesShown?u.footnoteIndicators.length*An:0;if(p){let h=d-br+gm,g=d-br-p-gm;c.push(rE(u,{x:g,y:s,width:h-g,height:a}))}if(u.strip.label!==void 0){let h=OO(u.strip.label,!0),g=p?Math.min(u.strip.labelX,d-br-p-h/2):u.strip.labelX,T=h+2*gm;c.push(rE(u,{x:g-T/2,y:s,width:T,height:a})),c.push(Se({x:m(g),y:m(o),"font-family":n.sans,"font-size":nr,"font-weight":600,fill:u.style.text,"text-anchor":"middle"},u.strip.label))}if(u.strip.footnotesShown){let h=d-br;for(let g=u.footnoteIndicators.length-1;g>=0;g--)c.push(Se({x:m(h),y:m(i.y+zj),"font-family":n.sans,"font-size":Hj,"font-weight":700,fill:u.style.text,"text-anchor":"end"},String(u.footnoteIndicators[g]))),h-=An}}return c.length===0?"":te("g",{"data-layer":"wave-labels"},c.join(""))}function zO(e){if(!e||e.length===0)return"";let t=e.map(n=>te("line",{x1:m(n.x),y1:m(n.topY),x2:m(n.x),y2:m(n.bottomY),stroke:n.stroke,"stroke-width":1,"stroke-dasharray":Km}));return te("g",{"data-layer":"wave-cross"},t.join(""))}function qO(e){let t=e.entities.item.bg;return t==="none"?"transparent":t}function eH(e,t,n,r){if(!e)return"";let i=[];for(let o of e.entries){let s=o.swatch;if(s&&o.kind==="background"){let a=qO(n),c={x:m(s.x),y:m(s.y),width:m(s.width),height:m(s.height)};i.push(te("rect",{...c,rx:2,ry:2,fill:a,stroke:n.entities.item.fg,"stroke-width":1})),i.push(te("rect",{x:m(s.x+.5),y:m(s.y+.5),width:m(s.width-1),height:m(s.height-1),rx:2,ry:2,fill:XO(t,vm(a))}))}else if(s&&o.kind==="boundary"){let a=s.x+s.width/2;i.push(te("line",{x1:m(a),y1:m(s.y),x2:m(a),y2:m(s.y+s.height),stroke:n.wave.boundary,"stroke-width":Yu}))}for(let a of o.runs)i.push(Se({x:m(a.x),y:m(a.y),"font-family":r.sans,"font-size":nr,fill:n.wave.labelText},a.text))}return te("g",{"data-layer":"wave-legend"},i.join(""))}async function lE(e,t={}){let r=new mm(t.idPrefix??"nl").next("root"),i=e.palette,o=t.fontFamilies??qm,s=[],a=i.arrowhead.neutral,c=i.arrowhead.light,l=i.arrowhead.dark,u=(p,h)=>`<marker id="${p}" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M 0 0 L 10 5 L 0 10 z" fill="${h}"/></marker>`,f=`<defs>${AO(r)}`+u(`${r}-arrow`,a)+u(`${r}-arrow-light`,c)+u(`${r}-arrow-dark`,l)+Vj(e).map(p=>qj(r,p,i)).join("")+"</defs>";s.push(f),s.push(te("rect",{x:0,y:0,width:m(e.width),height:m(e.height),fill:e.backgroundColor})),s.push(_j(e.timeline,i,o)),s.push(Jj(e,i));for(let p of e.swimlanes)s.push(Cj(p,i));s.push(MO(e.timeline,e.chartBox.y,i)),e.waves&&s.push(jO(e.waves)),s.push(wj(e.timeline,e.chartBox.y,i)),s.push(HO(e.waveBoundaries)),s.push(Qj(e,i,o));for(let p of e.edges)p.kind==="underBar"&&s.push(PO(p,r,i));for(let p of e.swimlanes)s.push(BO(p,t,r,i,o));for(let p of e.includes)s.push(Bj(p,t,r,i,o,e));s.push(zO(e.waveCrossings));for(let p of e.edges)p.kind!=="underBar"&&s.push(PO(p,r,i));for(let p of e.anchors)s.push($j(p,i));for(let p of e.milestones)s.push(Dj(p,r,i));s.push(Ej(e.timeline,i,o));for(let p of e.anchors)s.push(Oj(p,i,o));for(let p of e.milestones)s.push(Lj(p,i,o));if(s.push(bj(e.nowline,i,o)),s.push(Fj(e.footnotes,r,i,o)),s.push(eH(e.waveLegend,r,i,o)),s.push(Tj(e.header,r,i,o)),s.push(Wj(e,o)),e.header.logo&&t.assetResolver){let p=await Uj(e.header.logo.assetRef??"",t.assetResolver,r,t,e.header.logo.box.x,e.header.logo.box.y,Math.max(e.header.logo.box.width,e.header.logo.box.height));p&&s.push(p)}return`<svg${hl({xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${m(e.width)} ${m(e.height)}`,width:m(e.width),height:m(e.height),"data-theme":e.theme,"data-generator":"nowline"})}>${s.join("")}</svg>`}var cE="/browser-source.nowline",tH={error:3,warning:2,info:1},nH={error:3,warning:2,info:1};function VO(e,t){return tH[e]>=nH[t]}var Tm,YO=0;function KO(){return Tm||(Tm=hw()),Tm}function rH(){return yt.parse(`memory:///nowline-browser-${++YO}.nowline`)}async function wm(e,t={}){let n=t.filePath??cE,r=KO(),o=r.shared.workspace.LangiumDocumentFactory.fromString(e,rH());await r.shared.workspace.DocumentBuilder.build([o],{validation:!0});let s=[];for(let a of mg(o))a.origin==="lexer"?s.push(mO(a.error,n)):a.origin==="parser"?s.push(hO(a.error,n)):s.push(pO(a.diagnostic,n));return{ast:o.parseResult.value,diagnostics:s}}async function uE(e,t={}){let n=t.filePath??cE,r=await wm(e,{filePath:n});if(r.diagnostics.some(E=>E.severity==="error"))return{kind:"diagnostics",diagnostics:r.diagnostics};let i=KO(),o=t.readFile??TO,s=await uw(r.ast,n,{services:i.Nowline,readFile:o}),a=s.diagnostics.some(E=>E.severity==="error"&&!al(E)&&!tE(E.message)),c=[...r.diagnostics];for(let E of s.diagnostics){if(E.severity==="error"&&tE(E.message)){t.onSkippedInclude?.({sourcePath:E.sourcePath,message:E.message});continue}a&&al(E)||c.push(gO(E))}if(c.some(E=>E.severity==="error"))return{kind:"diagnostics",diagnostics:c};let l;if(t.timezone)try{l=Qw(t.timezone)}catch(E){if(E instanceof es)return{kind:"diagnostics",diagnostics:[{severity:"error",code:"invalid-timezone",message:E.message,file:n,line:1,column:1}]};throw E}let u=eE({now:t.today,zone:l}),f=Yw(r.ast,s,{theme:t.theme,today:u,locale:t.locale,width:t.width,nonWorking:t.nonWorking}),d=t.diagnosticLevel??"error",p=Jw(f,{today:u??void 0,locale:t.locale??"en-US"}).map(E=>xO(E,n)),h=t.showLinks!==!1,g=t.strict===!0,T=[],x=await lE(f,{idPrefix:t.idPrefix,assetResolver:t.assetResolver,noLinks:!h,strict:g,warn:E=>T.push(E),fontFamilies:t.fontFamilies}),y=[...p,...T.map(E=>yO(E,n,g?"error":"warning"))].filter(E=>VO(E.severity,d));return g&&y.length>0?{kind:"diagnostics",diagnostics:[...c,...y]}:{kind:"svg",svg:x,warnings:y}}function fE(){Tm=void 0,YO=0}var ZO="/embed.nowline",dE=!1;async function JO(e){let{ast:t,diagnostics:n}=await wm(e,{filePath:ZO});return{ast:t,errors:n.filter(r=>r.severity==="error").map(r=>r.message)}}async function Em(e,t={}){let n={filePath:ZO,theme:t.theme,today:t.today,timezone:t.timezone,locale:t.locale,width:t.width,nonWorking:t.nonWorking,idPrefix:t.idPrefix,onSkippedInclude:()=>{dE||(dE=!0,console.warn("nowline: `include` directives are skipped in the browser embed (single-file mode). Render multi-file roadmaps with the CLI or the GitHub Action."))}},r=await uE(e,n);if(r.kind==="svg")return r.svg;let i=r.diagnostics.filter(o=>o.severity==="error").map(o=>o.message);throw new Pu(`Failed to render Nowline source: ${i.join("; ")}`,i)}var Pu=class extends Error{constructor(n,r){super(n);I(this,"details",r);this.name="EmbedRenderError"}};function QO(){dE=!1,fE()}var Qn=Uint8Array,kn=Uint16Array,yE=Int32Array,xE=new Qn([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),vE=new Qn([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),e$=new Qn([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),i$=function(e,t){for(var n=new kn(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];for(var i=new yE(n[30]),r=1;r<30;++r)for(var o=n[r];o<n[r+1];++o)i[o]=o-n[r]<<5|r;return{b:n,r:i}},o$=i$(xE,2),iH=o$.b,hE=o$.r;iH[28]=258,hE[258]=28;var s$=i$(vE,0),dle=s$.b,t$=s$.r,mE=new kn(32768);for(Me=0;Me<32768;++Me)ii=(Me&43690)>>1|(Me&21845)<<1,ii=(ii&52428)>>2|(ii&13107)<<2,ii=(ii&61680)>>4|(ii&3855)<<4,mE[Me]=((ii&65280)>>8|(ii&255)<<8)>>1;var ii,Me,$u=(function(e,t,n){for(var r=e.length,i=0,o=new kn(t);i<r;++i)e[i]&&++o[e[i]-1];var s=new kn(t);for(i=1;i<t;++i)s[i]=s[i-1]+o[i-1]<<1;var a;if(n){a=new kn(1<<t);var c=15-t;for(i=0;i<r;++i)if(e[i])for(var l=i<<4|e[i],u=t-e[i],f=s[e[i]-1]++<<u,d=f|(1<<u)-1;f<=d;++f)a[mE[f]>>c]=l}else for(a=new kn(r),i=0;i<r;++i)e[i]&&(a[i]=mE[s[e[i]-1]++]>>15-e[i]);return a}),ts=new Qn(288);for(Me=0;Me<144;++Me)ts[Me]=8;var Me;for(Me=144;Me<256;++Me)ts[Me]=9;var Me;for(Me=256;Me<280;++Me)ts[Me]=7;var Me;for(Me=280;Me<288;++Me)ts[Me]=8;var Me,_m=new Qn(32);for(Me=0;Me<32;++Me)_m[Me]=5;var Me,oH=$u(ts,9,0);var sH=$u(_m,5,0);var a$=function(e){return(e+7)/8|0},aH=function(e,t,n){return(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length),new Qn(e.subarray(t,n))};var oi=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8},Cu=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8,e[r+2]|=n>>16},pE=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,o=n.slice();if(!i)return{t:c$,l:0};if(i==1){var s=new Qn(n[0].s+1);return s[n[0].s]=1,{t:s,l:1}}n.sort(function(b,L){return b.f-L.f}),n.push({s:-1,f:25001});var a=n[0],c=n[1],l=0,u=1,f=2;for(n[0]={s:-1,f:a.f+c.f,l:a,r:c};u!=i-1;)a=n[n[l].f<n[f].f?l++:f++],c=n[l!=u&&n[l].f<n[f].f?l++:f++],n[u++]={s:-1,f:a.f+c.f,l:a,r:c};for(var d=o[0].s,r=1;r<i;++r)o[r].s>d&&(d=o[r].s);var p=new kn(d+1),h=gE(n[u-1],p,0);if(h>t){var r=0,g=0,T=h-t,x=1<<T;for(o.sort(function(L,P){return p[P.s]-p[L.s]||L.f-P.f});r<i;++r){var y=o[r].s;if(p[y]>t)g+=x-(1<<h-p[y]),p[y]=t;else break}for(g>>=T;g>0;){var E=o[r].s;p[E]<t?g-=1<<t-p[E]++-1:++r}for(;r>=0&&g;--r){var w=o[r].s;p[w]==t&&(--p[w],++g)}h=t}return{t:new Qn(p),l:h}},gE=function(e,t,n){return e.s==-1?Math.max(gE(e.l,t,n+1),gE(e.r,t,n+1)):t[e.s]=n},n$=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new kn(++t),r=0,i=e[0],o=1,s=function(c){n[r++]=c},a=1;a<=t;++a)if(e[a]==i&&a!=t)++o;else{if(!i&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(i),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(i);o=1,i=e[a]}return{c:n.subarray(0,r),n:t}},Ou=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},l$=function(e,t,n){var r=n.length,i=a$(t+2);e[i]=r&255,e[i+1]=r>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var o=0;o<r;++o)e[i+o+4]=n[o];return(i+4+r)*8},r$=function(e,t,n,r,i,o,s,a,c,l,u){oi(t,u++,n),++i[256];for(var f=pE(i,15),d=f.t,p=f.l,h=pE(o,15),g=h.t,T=h.l,x=n$(d),y=x.c,E=x.n,w=n$(g),b=w.c,L=w.n,P=new kn(19),$=0;$<y.length;++$)++P[y[$]&31];for(var $=0;$<b.length;++$)++P[b[$]&31];for(var G=pE(P,7),Y=G.t,D=G.l,S=19;S>4&&!Y[e$[S-1]];--S);var F=l+5<<3,X=Ou(i,ts)+Ou(o,_m)+s,R=Ou(i,d)+Ou(o,g)+s+14+3*S+Ou(P,Y)+2*P[16]+3*P[17]+7*P[18];if(c>=0&&F<=X&&F<=R)return l$(t,u,e.subarray(c,c+l));var C,N,j,q;if(oi(t,u,1+(R<X)),u+=2,R<X){C=$u(d,p,0),N=d,j=$u(g,T,0),q=g;var z=$u(Y,D,0);oi(t,u,E-257),oi(t,u+5,L-1),oi(t,u+10,S-4),u+=14;for(var $=0;$<S;++$)oi(t,u+3*$,Y[e$[$]]);u+=3*S;for(var ne=[y,b],oe=0;oe<2;++oe)for(var he=ne[oe],$=0;$<he.length;++$){var re=he[$]&31;oi(t,u,z[re]),u+=Y[re],re>15&&(oi(t,u,he[$]>>5&127),u+=he[$]>>12)}}else C=oH,N=ts,j=sH,q=_m;for(var $=0;$<a;++$){var ae=r[$];if(ae>255){var re=ae>>18&31;Cu(t,u,C[re+257]),u+=N[re+257],re>7&&(oi(t,u,ae>>23&31),u+=xE[re]);var k=ae&31;Cu(t,u,j[k]),u+=q[k],k>3&&(Cu(t,u,ae>>5&8191),u+=vE[k])}else Cu(t,u,C[ae]),u+=N[ae]}return Cu(t,u,C[256]),u+N[256]},lH=new yE([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),c$=new Qn(0),cH=function(e,t,n,r,i,o){var s=o.z||e.length,a=new Qn(r+s+5*(1+Math.ceil(s/7e3))+i),c=a.subarray(r,a.length-i),l=o.l,u=(o.r||0)&7;if(t){u&&(c[0]=o.r>>3);for(var f=lH[t-1],d=f>>13,p=f&8191,h=(1<<n)-1,g=o.p||new kn(32768),T=o.h||new kn(h+1),x=Math.ceil(n/3),y=2*x,E=function(xe){return(e[xe]^e[xe+1]<<x^e[xe+2]<<y)&h},w=new yE(25e3),b=new kn(288),L=new kn(32),P=0,$=0,G=o.i||0,Y=0,D=o.w||0,S=0;G+2<s;++G){var F=E(G),X=G&32767,R=T[F];if(g[X]=R,T[F]=X,D<=G){var C=s-G;if((P>7e3||Y>24576)&&(C>423||!l)){u=r$(e,c,0,w,b,L,$,Y,S,G-S,u),Y=P=$=0,S=G;for(var N=0;N<286;++N)b[N]=0;for(var N=0;N<30;++N)L[N]=0}var j=2,q=0,z=p,ne=X-R&32767;if(C>2&&F==E(G-ne))for(var oe=Math.min(d,C)-1,he=Math.min(32767,G),re=Math.min(258,C);ne<=he&&--z&&X!=R;){if(e[G+j]==e[G+j-ne]){for(var ae=0;ae<re&&e[G+ae]==e[G+ae-ne];++ae);if(ae>j){if(j=ae,q=ne,ae>oe)break;for(var k=Math.min(ne,ae-2),O=0,N=0;N<k;++N){var B=G-ne+N&32767,H=g[B],J=B-H&32767;J>O&&(O=J,R=B)}}}X=R,R=g[X],ne+=X-R&32767}if(q){w[Y++]=268435456|hE[j]<<18|t$[q];var V=hE[j]&31,ie=t$[q]&31;$+=xE[V]+vE[ie],++b[257+V],++L[ie],D=G+j,++P}else w[Y++]=e[G],++b[e[G]]}}for(G=Math.max(G,D);G<s;++G)w[Y++]=e[G],++b[e[G]];u=r$(e,c,l,w,b,L,$,Y,S,G-S,u),l||(o.r=u&7|c[u/8|0]<<3,u-=7,o.h=T,o.p=g,o.i=G,o.w=D)}else{for(var G=o.w||0;G<s+l;G+=65535){var le=G+65535;le>=s&&(c[u/8|0]=l,le=s),u=l$(c,u+1,e.subarray(G,le))}o.i=s}return aH(a,0,r+a$(u)+i)};var u$=function(){var e=1,t=0;return{p:function(n){for(var r=e,i=t,o=n.length|0,s=0;s!=o;){for(var a=Math.min(s+2655,o);s<a;++s)i+=r+=n[s];r=(r&65535)+15*(r>>16),i=(i&65535)+15*(i>>16)}e=r,t=i},d:function(){return e%=65521,t%=65521,(e&255)<<24|(e&65280)<<8|(t&255)<<8|t>>8}}},uH=function(e,t,n,r,i){if(!i&&(i={l:1},t.dictionary)){var o=t.dictionary.subarray(-32768),s=new Qn(o.length+e.length);s.set(o),s.set(e,o.length),e=s,i.w=o.length}return cH(e,t.level==null?6:t.level,t.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,n,r,i)};var f$=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};var fH=function(e,t){var n=t.level,r=n==0?0:n<6?1:n==9?3:2;if(e[0]=120,e[1]=r<<6|(t.dictionary&&32),e[1]|=31-(e[0]<<8|e[1])%31,t.dictionary){var i=u$();i.p(t.dictionary),f$(e,2,i.d())}};function d$(e,t){t||(t={});var n=u$();n.p(e);var r=uH(e,t,t.dictionary?6:2,4);return fH(r,t),f$(r,r.length-4,n.d()),r}var dH=typeof TextDecoder<"u"&&new TextDecoder,pH=0;try{dH.decode(c$,{stream:!0}),pH=1}catch{}var m$="https://free.nowline.io/open";function p$(e){let t=new TextEncoder().encode(e),n=d$(t),r=32768,i="";for(let o=0;o<n.length;o+=r)i+=String.fromCharCode(...n.subarray(o,o+r));return btoa(i).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function TE({source:e,sourceUrl:t,share:n}){if(n===!1||n==="none")return null;if(typeof n=="object")return t!==void 0&&h$(t)?n.remoteUrl.replace("{url}",encodeURIComponent(t)):n.textUrl.replace("{text}",p$(e));let r=n===!0?m$:n,i=new URL(r);return t!==void 0&&h$(t)?i.hash=`url=${encodeURIComponent(t)}`:i.hash=`text=${p$(e)}`,i.toString()}function h$(e){try{return new URL(e).protocol==="https:"}catch{return!1}}var g$=0;async function y$(e){let t=e.document??globalThis.document;if(!t)return{rendered:0,failed:0};let n=t.querySelectorAll(e.selector),r=0,i=0,o=++g$,s=e.share??!0,a=[],c=0;for(let l of Array.from(n)){let u=hH(l);if(!u)continue;let f=mH(l),d=`nl-r${o}-${c++}`,p={theme:e.theme,locale:e.locale,width:e.width,nonWorking:e.nonWorking,today:e.today,timezone:e.timezone,idPrefix:d},h=u.parentElement,g=u.nextSibling,x=l.getAttribute("data-nowline-source-url")??void 0??e.sourceUrl;a.push(Em(f,p).then(y=>{if(gH(u,y),r++,h!==null){let E=TE({source:f,sourceUrl:x,share:s});if(E!==null){let w=t.createElement("a");w.className="nowline-share",w.href=E,w.target="_blank",w.rel="noopener noreferrer",w.textContent="Share on Nowline",h.insertBefore(w,g)}}},y=>{i++,console.error("nowline: render failed",y)}))}return await Promise.all(a),{rendered:r,failed:i}}function hH(e){let t=e.parentElement;return t&&t.tagName.toUpperCase()==="PRE"?t:e}function mH(e){return e.textContent??""}function gH(e,t){e.outerHTML=t}function x$(){g$=0}function bm(){if(typeof globalThis>"u")return"light";let e=globalThis.matchMedia;if(typeof e!="function")return"light";try{return e("(prefers-color-scheme: dark)").matches?"dark":"light"}catch{return"light"}}function v$(e,t){return e&&e!=="auto"?ww(e)??t:t}var yH="0.0.0-dev.20261013004638.g65543f6",xH="65543f6",vH="pre code.language-nowline, code.language-nowline",T$={theme:"auto",startOnLoad:!0,selector:vH,systemTheme:bm(),share:!0},Ze={...T$},wE=!1;function TH(e={}){Ze={theme:e.theme??Ze.theme,startOnLoad:e.startOnLoad??Ze.startOnLoad,selector:e.selector??Ze.selector,locale:e.locale??Ze.locale,width:e.width??Ze.width,nonWorking:e.nonWorking??Ze.nonWorking,today:e.today!==void 0?e.today:Ze.today,timezone:e.timezone??Ze.timezone,share:e.share??Ze.share,sourceUrl:e.sourceUrl??Ze.sourceUrl,systemTheme:bm()}}function w$(){return{theme:v$(Ze.theme,Ze.systemTheme),locale:Ze.locale,width:Ze.width,nonWorking:Ze.nonWorking,today:Ze.today,timezone:Ze.timezone}}async function wH(e,t={}){let n={...w$(),...t};return Em(e,n)}async function EH(e){return JO(e)}async function EE(e){let t={selector:e?.selector??Ze.selector,theme:e?.theme??w$().theme,locale:e?.locale??Ze.locale,width:e?.width??Ze.width,nonWorking:e?.nonWorking??Ze.nonWorking,today:e?.today!==void 0?e.today:Ze.today,timezone:e?.timezone??Ze.timezone,share:e?.share??Ze.share,sourceUrl:e?.sourceUrl??Ze.sourceUrl,document:e?.document};return y$(t)}var _H=EE;if(typeof document<"u"&&!wE){wE=!0;let e=()=>{Ze.startOnLoad&&EE()};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e,{once:!0}):queueMicrotask(e)}function bH(){Ze={...T$,systemTheme:bm()},wE=!1,QO(),x$()}return Fu(kH);})();
|
|
2928
2928
|
//# sourceMappingURL=nowline.min.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nowline/embed",
|
|
3
|
-
"version": "0.0.0-dev.
|
|
3
|
+
"version": "0.0.0-dev.20261013004638.g65543f6",
|
|
4
4
|
"description": "Browser embed bundle for Nowline. Drop a <script> tag and ```nowline``` blocks render in place.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"engines": {
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
"cdn"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@nowline/browser": "0.0.0-dev.
|
|
43
|
-
"@nowline/core": "0.0.0-dev.
|
|
44
|
-
"@nowline/layout": "0.0.0-dev.
|
|
45
|
-
"@nowline/renderer": "0.0.0-dev.
|
|
46
|
-
"@nowline/share-link": "0.0.0-dev.
|
|
42
|
+
"@nowline/browser": "0.0.0-dev.20261013004638.g65543f6",
|
|
43
|
+
"@nowline/core": "0.0.0-dev.20261013004638.g65543f6",
|
|
44
|
+
"@nowline/layout": "0.0.0-dev.20261013004638.g65543f6",
|
|
45
|
+
"@nowline/renderer": "0.0.0-dev.20261013004638.g65543f6",
|
|
46
|
+
"@nowline/share-link": "0.0.0-dev.20261013004638.g65543f6",
|
|
47
47
|
"langium": "~4.4.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|