@nowline/embed 0.0.0-dev.20261012225207.gfc38dc0 → 0.0.0-dev.20261012225446.ga80ca46

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.
@@ -1,4 +1,4 @@
1
- /*! @nowline/embed 0.0.0-dev.20261012225207.gfc38dc0 sha=fc38dc0 built=2026-10-12T22:47:58Z */
1
+ /*! @nowline/embed 0.0.0-dev.20261012225446.ga80ca46 sha=a80ca46 built=2026-10-12T22:50:09Z */
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -43616,8 +43616,8 @@ function effectiveTheme(theme, systemTheme) {
43616
43616
  }
43617
43617
 
43618
43618
  // src/index.ts
43619
- var version = true ? "0.0.0-dev.20261012225207.gfc38dc0" : "0.0.0";
43620
- var sha = true ? "fc38dc0" : "unknown";
43619
+ var version = true ? "0.0.0-dev.20261012225446.ga80ca46" : "0.0.0";
43620
+ var sha = true ? "a80ca46" : "unknown";
43621
43621
  var DEFAULT_SELECTOR = "pre code.language-nowline, code.language-nowline";
43622
43622
  var initialConfig = {
43623
43623
  theme: "auto",
@@ -1,4 +1,4 @@
1
- /*! @nowline/embed 0.0.0-dev.20261012225207.gfc38dc0 sha=fc38dc0 built=2026-10-12T22:47:58Z */
1
+ /*! @nowline/embed 0.0.0-dev.20261012225446.ga80ca46 sha=a80ca46 built=2026-10-12T22:50:09Z */
2
2
  "use strict";var nowline=(()=>{var v$=Object.create;var gl=Object.defineProperty;var T$=Object.getOwnPropertyDescriptor;var w$=Object.getOwnPropertyNames;var _$=Object.getPrototypeOf,E$=Object.prototype.hasOwnProperty;var b$=(e,t,n)=>t in e?gl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var E_=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var we=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Du=(e,t)=>{for(var n in t)gl(e,n,{get:t[n],enumerable:!0})},b_=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of w$(t))!E$.call(e,i)&&i!==n&&gl(e,i,{get:()=>t[i],enumerable:!(r=T$(t,i))||r.enumerable});return e};var km=(e,t,n)=>(n=e!=null?v$(_$(e)):{},b_(t||!e||!e.__esModule?gl(n,"default",{value:e,enumerable:!0}):n,e)),Mu=e=>b_(gl({},"__esModule",{value:!0}),e);var S=(e,t,n)=>b$(e,typeof t!="symbol"?t+"":t,n);var la=we(Hr=>{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.boolean=dW;Hr.string=SA;Hr.number=pW;Hr.error=hW;Hr.func=mW;Hr.array=NA;Hr.stringArray=gW;function dW(e){return e===!0||e===!1}function SA(e){return typeof e=="string"||e instanceof String}function pW(e){return typeof e=="number"||e instanceof Number}function hW(e){return e instanceof Error}function mW(e){return typeof e=="function"}function NA(e){return Array.isArray(e)}function gW(e){return NA(e)&&e.every(t=>SA(t))}});var cx=we(ue=>{"use strict";var yW=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]})),xW=ue&&ue.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),vW=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"&&yW(n,t,r[i]);return xW(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 Bo=vW(la()),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);S(this,"code");S(this,"data");this.code=Bo.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 zn=class zn{constructor(t){S(this,"kind");this.kind=t}static is(t){return t===zn.auto||t===zn.byName||t===zn.byPosition}toString(){return this.kind}};S(zn,"auto",new zn("auto")),S(zn,"byPosition",new zn("byPosition")),S(zn,"byName",new zn("byName"));var Bi=zn;ue.ParameterStructures=Bi;var at=class{constructor(t,n){S(this,"method");S(this,"numberOfParams");this.method=t,this.numberOfParams=n}get parameterStructures(){return Bi.auto}};ue.AbstractMessageSignature=at;var Uy=class extends at{constructor(n){super(n,0);S(this,"_")}};ue.RequestType0=Uy;var Xy=class extends at{constructor(n,r=Bi.auto){super(n,1);S(this,"_parameterStructures");S(this,"_");this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};ue.RequestType=Xy;var Gy=class extends at{constructor(n,r=Bi.auto){super(n,1);S(this,"_parameterStructures");S(this,"_");this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};ue.RequestType1=Gy;var jy=class extends at{constructor(n){super(n,2);S(this,"_")}};ue.RequestType2=jy;var Hy=class extends at{constructor(n){super(n,3);S(this,"_")}};ue.RequestType3=Hy;var zy=class extends at{constructor(n){super(n,4);S(this,"_")}};ue.RequestType4=zy;var qy=class extends at{constructor(n){super(n,5);S(this,"_")}};ue.RequestType5=qy;var Vy=class extends at{constructor(n){super(n,6);S(this,"_")}};ue.RequestType6=Vy;var Yy=class extends at{constructor(n){super(n,7);S(this,"_")}};ue.RequestType7=Yy;var Ky=class extends at{constructor(n){super(n,8);S(this,"_")}};ue.RequestType8=Ky;var Zy=class extends at{constructor(n){super(n,9);S(this,"_")}};ue.RequestType9=Zy;var Jy=class extends at{constructor(n,r=Bi.auto){super(n,1);S(this,"_parameterStructures");S(this,"_");this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};ue.NotificationType=Jy;var Qy=class extends at{constructor(n){super(n,0);S(this,"_")}};ue.NotificationType0=Qy;var ex=class extends at{constructor(n,r=Bi.auto){super(n,1);S(this,"_parameterStructures");S(this,"_");this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};ue.NotificationType1=ex;var tx=class extends at{constructor(n){super(n,2);S(this,"_")}};ue.NotificationType2=tx;var nx=class extends at{constructor(n){super(n,3);S(this,"_")}};ue.NotificationType3=nx;var rx=class extends at{constructor(n){super(n,4);S(this,"_")}};ue.NotificationType4=rx;var ix=class extends at{constructor(n){super(n,5);S(this,"_")}};ue.NotificationType5=ix;var ox=class extends at{constructor(n){super(n,6);S(this,"_")}};ue.NotificationType6=ox;var sx=class extends at{constructor(n){super(n,7);S(this,"_")}};ue.NotificationType7=sx;var ax=class extends at{constructor(n){super(n,8);S(this,"_")}};ue.NotificationType8=ax;var lx=class extends at{constructor(n){super(n,9);S(this,"_")}};ue.NotificationType9=lx;var PA;(function(e){function t(i){let o=i;return o&&Bo.string(o.method)&&(Bo.string(o.id)||Bo.number(o.id))}e.isRequest=t;function n(i){let o=i;return o&&Bo.string(o.method)&&i.id===void 0}e.isNotification=n;function r(i){let o=i;return o&&(o.result!==void 0||!!o.error)&&(Bo.string(o.id)||Bo.number(o.id)||o.id===null)}e.isResponse=r})(PA||(ue.Message=PA={}))});var fx=we(Wi=>{"use strict";Object.defineProperty(Wi,"__esModule",{value:!0});Wi.LRUCache=Wi.LinkedMap=Wi.Touch=void 0;var Ht;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(Ht||(Wi.Touch=Ht={}));var CA,Yd=class{constructor(){S(this,CA,"LinkedMap");S(this,"_map");S(this,"_head");S(this,"_tail");S(this,"_size");S(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=Ht.None){let r=this._map.get(t);if(r)return n!==Ht.None&&this.touch(r,n),r.value}set(t,n,r=Ht.None){let i=this._map.get(t);if(i)i.value=n,r!==Ht.None&&this.touch(i,r);else{switch(i={key:t,value:n,next:void 0,previous:void 0},r){case Ht.None:this.addItemLast(i);break;case Ht.First:this.addItemFirst(i);break;case Ht.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}[(CA=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!==Ht.First&&n!==Ht.Last)){if(n===Ht.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===Ht.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=Yd;var ux=class extends Yd{constructor(n,r=1){super();S(this,"_limit");S(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=Ht.AsNew){return super.get(n,r)}peek(n){return super.get(n,Ht.None)}set(n,r){return super.set(n,r,Ht.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};Wi.LRUCache=ux});var $A=we(Kd=>{"use strict";Object.defineProperty(Kd,"__esModule",{value:!0});Kd.Disposable=void 0;var OA;(function(e){function t(n){return{dispose:n}}e.create=t})(OA||(Kd.Disposable=OA={}))});var Ui=we(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 ca=we(Xi=>{"use strict";var TW=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 wW=TW(Ui()),LA;(function(e){let t={dispose(){}};e.None=function(){return t}})(LA||(Xi.Event=LA={}));var mx=class{constructor(){S(this,"_callbacks");S(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,wW.default)().console.error(a)}return n}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},Zd=class Zd{constructor(t){S(this,"_options");S(this,"_event");S(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=Zd._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)}};S(Zd,"_noop",function(){});var gx=Zd;Xi.Emitter=gx});var ep=we(mn=>{"use strict";var _W=mn&&mn.__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]})),EW=mn&&mn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),bW=mn&&mn.__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"&&_W(n,t,r[i]);return EW(n,t),n}})(),kW=mn&&mn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(mn,"__esModule",{value:!0});mn.CancellationTokenSource=mn.CancellationToken=void 0;var AW=kW(Ui()),RW=bW(la()),yx=ca(),Jd;(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||RW.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}e.is=t})(Jd||(mn.CancellationToken=Jd={}));var IW=Object.freeze(function(e,t){let n=(0,AW.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}}),Qd=class{constructor(){S(this,"_isCancelled",!1);S(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?IW:(this._emitter||(this._emitter=new yx.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},xx=class{constructor(){S(this,"_token")}get token(){return this._token||(this._token=new Qd),this._token}cancel(){this._token?this._token.cancel():this._token=Jd.Cancelled}dispose(){this._token?this._token instanceof Qd&&this._token.dispose():this._token=Jd.None}};mn.CancellationTokenSource=xx});var DA=we(ua=>{"use strict";Object.defineProperty(ua,"__esModule",{value:!0});ua.SharedArrayReceiverStrategy=ua.SharedArraySenderStrategy=void 0;var SW=ep(),$c;(function(e){e.Continue=0,e.Cancelled=1})($c||($c={}));var vx=class{constructor(){S(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]=$c.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,$c.Cancelled)}cleanup(t){this.buffers.delete(t)}dispose(){this.buffers.clear()}};ua.SharedArraySenderStrategy=vx;var Tx=class{constructor(t){S(this,"data");this.data=new Int32Array(t,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===$c.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},wx=class{constructor(t){S(this,"token");this.token=new Tx(t)}cancel(){}dispose(){}},_x=class{constructor(){S(this,"kind","request")}createCancellationTokenSource(t){let n=t.$cancellationData;return n===void 0?new SW.CancellationTokenSource:new wx(n)}};ua.SharedArrayReceiverStrategy=_x});var bx=we(fa=>{"use strict";var NW=fa&&fa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fa,"__esModule",{value:!0});fa.Semaphore=void 0;var PW=NW(Ui()),Ex=class{constructor(t=1){S(this,"_capacity");S(this,"_active");S(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,PW.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()}}};fa.Semaphore=Ex});var FA=we(zt=>{"use strict";var CW=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]})),OW=zt&&zt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),$W=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"&&CW(n,t,r[i]);return OW(n,t),n}})(),LW=zt&&zt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zt,"__esModule",{value:!0});zt.ReadableStreamMessageReader=zt.AbstractMessageReader=zt.MessageReader=void 0;var Ax=LW(Ui()),da=$W(la()),kx=ca(),DW=bx(),MA;(function(e){function t(n){let r=n;return r&&da.func(r.listen)&&da.func(r.dispose)&&da.func(r.onError)&&da.func(r.onClose)&&da.func(r.onPartialMessage)}e.is=t})(MA||(zt.MessageReader=MA={}));var tp=class{constructor(){S(this,"errorEmitter");S(this,"closeEmitter");S(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: ${da.string(t.message)?t.message:"unknown"}`)}};zt.AbstractMessageReader=tp;var Rx;(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,Ax.default)().applicationJson.decoder,c.set(a.name,a)),{charset:r,contentDecoder:o,contentDecoders:s,contentTypeDecoder:a,contentTypeDecoders:c}}e.fromOptions=t})(Rx||(Rx={}));var Ix=class extends tp{constructor(n,r){super();S(this,"readable");S(this,"options");S(this,"callback");S(this,"nextMessageLength");S(this,"messageToken");S(this,"buffer");S(this,"partialMessageTimer");S(this,"_partialMessageTimeout");S(this,"readSemaphore");this.readable=n,this.options=Rx.fromOptions(r),this.buffer=(0,Ax.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new DW.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,Ax.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))}};zt.ReadableStreamMessageReader=Ix});var GA=we(qt=>{"use strict";var MW=qt&&qt.__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]})),FW=qt&&qt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),BW=qt&&qt.__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"&&MW(n,t,r[i]);return FW(n,t),n}})(),WW=qt&&qt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qt,"__esModule",{value:!0});qt.WriteableStreamMessageWriter=qt.AbstractMessageWriter=qt.MessageWriter=void 0;var BA=WW(Ui()),Lc=BW(la()),UW=bx(),WA=ca(),XW="Content-Length: ",UA=`\r
4
4
  `,XA;(function(e){function t(n){let r=n;return r&&Lc.func(r.dispose)&&Lc.func(r.onClose)&&Lc.func(r.onError)&&Lc.func(r.write)}e.is=t})(XA||(qt.MessageWriter=XA={}));var np=class{constructor(){S(this,"errorEmitter");S(this,"closeEmitter");this.errorEmitter=new WA.Emitter,this.closeEmitter=new WA.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: ${Lc.string(t.message)?t.message:"unknown"}`)}};qt.AbstractMessageWriter=np;var Sx;(function(e){function t(n){return n===void 0||typeof n=="string"?{charset:n??"utf-8",contentTypeEncoder:(0,BA.default)().applicationJson.encoder}:{charset:n.charset??"utf-8",contentEncoder:n.contentEncoder,contentTypeEncoder:n.contentTypeEncoder??(0,BA.default)().applicationJson.encoder}}e.fromOptions=t})(Sx||(Sx={}));var Nx=class extends np{constructor(n,r){super();S(this,"writable");S(this,"options");S(this,"errorCount");S(this,"writeSemaphore");this.writable=n,this.options=Sx.fromOptions(r),this.errorCount=0,this.writeSemaphore=new UW.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(XW,i.byteLength.toString(),UA),o.push(UA),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()}};qt.WriteableStreamMessageWriter=Nx});var jA=we(rp=>{"use strict";Object.defineProperty(rp,"__esModule",{value:!0});rp.AbstractMessageBuffer=void 0;var GW=13,jW=10,HW=`\r
@@ -2924,5 +2924,5 @@ ${n}`),this.inline?`{${i}}`:i}};function VU(e,t,n){if(e==="linkplain"||e==="link
2924
2924
  }`));var eX={languageId:"nowline",fileExtensions:[".nowline"],caseInsensitive:!1,mode:"development"},yN={AstReflection:()=>new fu},xN={Grammar:()=>gN(),LanguageMetaData:()=>eX,parser:{}};var vN={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"},tX={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 nl(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 TN(e){return e.name||e.line===void 0?`"${e.name}"`:nl({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 wN(e){return e.name?`${GT(e.kind)} "${e.name}"`:GT(jT(e))}function _N(e){return e===null?"has no start floor":`opens no earlier than ${e}`}function EN(e){return e?e.title===void 0?` Did you mean wave:${e.id}?`:` Did you mean wave:${e.id} ("${e.title}")?`:""}function bN(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 kN={"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}" ${_N(e.childFloor)}, but this file's wave "${e.id}" ${_N(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.${EN(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 ${vN[e.kind]}.${EN(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}"`:nl(e.ref);return`${n} ${t?"come":"comes"} after ${r} (wave "${e.refWave}") in ${nl(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 ${nl(e.block)} in ${nl(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?`${wN(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?`${wN(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 ${tX[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 ${vN[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=TN(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=TN(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 ${nl(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 ${bN(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 (${bN(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`,AN={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"},nX={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 rl(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=rl({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 RN(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 IN(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 SN(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 Eh(e){return`[${e.join(", ")}]`}function NN(e){return e===null?"n'a pas de borne de d\xE9part":`ne s'ouvre pas avant ${e}`}function PN(e){return e===""?"aucun":ee(e)}var rX={title:"titre",style:"style",labels:"\xE9tiquettes",link:"lien",description:"description"},CN={"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 ${Eh(e.child)}, mais celles de ce fichier sont ${Eh(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 ${Eh(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 ${Eh(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)} ${NN(e.childFloor)}, mais la vague ${ee(e.id)} de ce fichier ${NN(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=>`${rX[t.field]} ${PN(t.there)} l\xE0-bas, ${PN(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.${IN(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 ${AN[e.kind]}.${IN(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):rl(e.ref);return`${n} ${t?"viennent":"vient"} apr\xE8s ${r} (vague ${ee(e.refWave)}) dans ${rl(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 ${rl(e.block)} dans ${rl(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(RN(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(RN(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 ${nX[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 ${AN[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 ${rl(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 ${SN(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 (${SN(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 ON={};var $N={};var iX=new Map([["en-US",kN],["fr",CN],["fr-CA",ON],["fr-FR",$N]]);function Zr(e,t,...n){for(let r of oX(e)){let o=iX.get(r)?.[t];if(o)return o(...n)}return t}var LN="en-US";function oX(e){let t=[],n=sX(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(LN)||t.push(LN),t}function sX(e){return e.split("-").map((n,r)=>r===0?n.toLowerCase():/^[a-zA-Z]{2}$/.test(n)?n.toUpperCase():n).join("-")}var aX=/[\\/]/;function FN(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 DN(...e){for(let t of e)if(t){if(t.includes("\\")&&!t.includes("/"))return"\\";if(t.includes("/"))return"/"}return"/"}function lX(e){return e?e[0]==="/"||e[0]==="\\"?!0:e.length>=3&&/^[A-Za-z]:[\\/]/.test(e):!1}function BN(e){let t=FN(e);return t<0?".":t===0?e[0]:t===2&&/^[A-Za-z]:[\\/]/.test(e)?e.slice(0,3):e.slice(0,t)}function il(e){let t=FN(e);return t<0?e:e.slice(t+1)}function VT(e,t){if(lX(t))return MN(t,DN(t));let n=DN(e,t);return MN(`${e}${n}${t}`,n)}function MN(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(aX))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 vn(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 WN(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 UN(e,t,n=2){let r,i=n+1;for(let o of t){let s=WN(e,o,n);if(s<i&&(r=o,i=s,s===0))break}return r}function XN(e,t,n=2){let r,i=n+1,o=!1;for(let s of t){let a=WN(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>":vn(e.title))}function zo(e){return e.$type==="NonWorkingDeclaration"?"non-working":e.$type.replace(/Declaration$|Block$/,"").toLowerCase()}function bh(e){let t=zo(e),n=e.name??(e.title===void 0?void 0:vn(e.title));return n?`${t} "${n}"`:t}function Tr(e){let t=e.$cstNode;return t?t.range.start.line+1:0}function kh(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 Qn(e){let t=new Set,n=[];for(let r of e.roadmapEntries)!ln(r)||!r.name||t.has(r.name)||(t.add(r.name),n.push(r));return n}function cX(e){let t=new Map;return Qn(e).forEach((n,r)=>{t.set(n.name,r+1)}),t}function jN(e){return(e.properties??[]).filter(n=>fe(n)==="wave")}function HN(e){return jN(e)[0]}function YT(e){return e.value!==void 0?e.value:e.values.length===1?e.values[0]:`[${e.values.join(", ")}]`}function uX(e){let t=e;for(;t?.$container&&!el(t.$container);)t=t.$container;let n=t?.$container;if(!(!t||!n||!el(n)))return{file:n,index:n.roadmapEntries.indexOf(t),waveDecls:zN(n)}}function zN(e){let t=new Map;return e.roadmapEntries.forEach((n,r)=>{ln(n)&&n.name&&!t.has(n.name)&&t.set(n.name,r)}),t}function KT(e,t,n,r=uX(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:Tr(r.file.roadmapEntries[s])}}return{status:"valid",id:i,index:o}}function fX(e){return He(e)||Tt(e)}function dX(e,t,n,r){let i=HN(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=dX(s,a,t,c);l!==void 0&&n.set(s,l);let u=l;if(He(s)||Tt(s)){let f=[];for(let d of s.content)xr(d)||f.push(o(d,l,c));l===void 0&&(He(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(el(c)){let l=i.get(c);l||(l=zN(c),i.set(c,l)),a={file:c,index:c.roadmapEntries.indexOf(s),waveDecls:l}}for(let l of s.content)xr(l)||o(l,void 0,a)}return{waveOf:n,leadOf:r}}function pX(e){return Ft.test(e)&&!Number.isNaN(new Date(e).getTime())}function qN(e){return(e.properties??[]).find(n=>fe(n)==="date")?.value}function hX(e){let t=new Map,n=r=>{let i=r.name;if(i&&!t.has(i)&&t.set(i,r),wt(r)||Tt(r)||He(r))for(let o of r.content)n(o);else if(Ut(r))for(let o of r.content)(Ut(o)||$n(o))&&n(o)};e.roadmapDecl&&n(e.roadmapDecl);for(let r of e.roadmapEntries)n(r);return t}function ol(e){let t=hX(e);return n=>t.get(n)}function gu(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)||On(a))&&(s=qN(a))}s===void 0||!pX(s)||(n===null||s>n.date)&&(n={date:s,ref:o})}}return n}var VN=new Set(["before","date","start","length","duration","size","capacity","remaining","wave"]);function yu(e){return ln(e.$container)&&VN.has(fe(e))}var mX={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 mu(e){return mX[e.$type]??zo(e)}function gX(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:vn(e.title)},line:Tr(e)},node:e}),i)return n;for(let o of e.properties){let s=fe(o);if(VN.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(On(l)){if(qN(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:mu(l)},node:o})}}}return n}function Rh(e){let t=ol(e);return e.roadmapEntries.filter(ln).flatMap(n=>gX(n,t))}function yX(e){let t=[],n=r=>{if(!ln(r)){if(t.push(r),wt(r)||Tt(r)||He(r))for(let i of r.content)xr(i)||n(i);else if(Ut(r))for(let i of r.content)(Ut(i)||$n(i))&&n(i)}};for(let r of e.configEntries)xn(r)&&t.push(r);e.roadmapDecl&&n(e.roadmapDecl);for(let r of e.roadmapEntries)n(r);return t}function xX(e,t){let n=e.toLowerCase(),r=t.filter(o=>o.title!==void 0&&vn(o.title).toLowerCase()===n),i;if(r.length===1)i=r[0];else{let o=XN(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:vn(i.title)}}function vX(e,t,n){let r=n(t);if(r)return mu(r);for(let i of e.configEntries)if((vr(i)||Ho(i))&&i.name===t)return mu(i)}function TX(e,t){let n=e.$container;for(;fX(n);){let r=HN(n);if(r)return KT(r,n,t).status==="valid"?{container:n,prop:r}:void 0;n=n?.$container}}function GN(e,t){let n=t.name??(t.title===void 0?"":vn(t.title));return n?{kind:e,name:n}:{kind:e,name:n,line:Tr(t)}}function wX(e){if(xn(e))return{kind:"default",entityType:e.entityType};let t=e,n=t.name??(t.title===void 0?"":vn(t.title)),r=mu(e);return n?{kind:r,name:n}:{kind:r,name:n,line:Tr(e)}}function _X(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=vX(e,s.value,o),f=xX(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=TX(t,i);if(!a)return;let c=YT(a.prop);if(c===s.id)return;let l=Mt(t)?"item":He(t)?"group":"parallel";return{severity:"error",code:"NL.E1102",args:{entity:GN(l,t),wave:s.id,container:GN(He(a.container)?"group":"parallel",a.container),containerWave:c},node:n}}function Ih(e){let t=Qn(e),n=t.length>0,r=cX(e),i=ol(e),o=[];for(let s of yX(e)){let a=jN(s);if(a.length===0)continue;if(!n){for(let h of a)o.push({severity:"warning",code:"NL.W0702",args:{target:wX(s)},node:h,property:"key"});continue}if(xn(s)){for(let h of a)o.push({severity:"error",message:kh("wave",s.entityType),node:h});continue}let c=s,l=it(c);if(!c.name&&c.title===void 0&&!Mt(s)&&!He(s)&&!Tt(s))continue;if(wt(s)||On(s)){for(let h of a)o.push({severity:"error",code:"NL.E1104",args:{reason:wt(s)?"swimlane":"milestone",name:l,value:YT(h)},node:h});continue}if(!Mt(s)&&!He(s)&&!Tt(s)){for(let h of a)o.push({severity:"error",code:"NL.E1104",args:{reason:"other",type:mu(s),name:l},node:h});continue}let[f,...d]=a,p=_X(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 EX=["after-wave","after-item","sequence","join"];function qo(e){return e.name??(e.title===void 0?void 0:vn(e.title))}function Sh(e){let t=qo(e);if(wt(e))return{kind:"swimlane",name:it(e)};let n=He(e);return t?{kind:n?"group":"parallel",name:t}:{kind:n?"group-block":"parallel-block",line:Tr(e)}}function YN(e){let t=qo(e);return t!==void 0||e.$type==="ItemDeclaration"?t:{kind:He(e)?"group-block":"parallel-block",line:Tr(e)}}function KN(e){return e.$type==="ItemDeclaration"||qo(e)!==void 0?{name:it(e)}:{name:"",kind:He(e)?"group":"parallel",line:Tr(e)}}function bX(e){let t=He(e)?"group":"parallel",n=qo(e);return n?{kind:t,name:n}:{kind:t,name:"",line:Tr(e)}}function ZT(e){return(e.value!==void 0?[e.value]:e.values).filter(t=>!!t)}function kX(e){return On(e)&&!e.properties.some(t=>fe(t)==="date")}function AX(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 sl(e,t,n={}){if(t.length===0)return[];let r=new Map;t.forEach((k,L)=>{k.name&&r.set(k.name,L+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,L,F,G)=>{let Z=l.length,Y={node:k,lane:L,parent:F,children:[],prev:G,start:f++,reg:-1,ew:a.get(k),lw:c.get(k),pinned:AX(k),after:[],afterWaves:[]};if(l.push(Y),He(k)||Tt(k)){let re=-1;for(let le of k.content)xr(le)||(re=d(le,L,Z,He(k)?re:-1),Y.children.push(re));Y.reg=f++}else Y.reg=Y.start;if(k.name){let re=u.get(k.name)??[];re.push(Z),u.set(k.name,re)}return Z};o.forEach((k,L)=>{let F=-1;for(let G of k.content)xr(G)||(F=d(G,L,-1,F))});let p=(k,L)=>{let F=u.get(k);if(F){for(let G=F.length-1;G>=0;G--)if(l[F[G]].reg<l[L].start)return F[G]}},h=[],g=n.suppressCycleRefs??!0?IX(l,o,s):()=>!1;for(let k=0;k<l.length;k++){let L=l[k],F=KN(L.node);for(let G of L.node.properties){let Z=fe(G);if(!(Z!=="after"&&Z!=="before"))for(let Y of ZT(G)){if(Ft.test(Y))continue;let re=p(Y,k),le=re===void 0?r.get(Y):void 0;if(Z==="after"&&!L.pinned&&(re!==void 0?L.after.push({from:re,prop:G,ref:Y}):le!==void 0&&L.afterWaves.push({prop:G,ref:Y,j:le})),re!==void 0||le!==void 0)continue;let xe=u.get(Y)?.[0];if(xe===void 0&&!kX(s(Y))||g(L.node.name,Z,Y))continue;let Te=!1;for(let me=L.parent;me>=0&&!Te;me=l[me].parent)Te=l[me].node.name===Y;h.push({severity:"warning",code:"NL.W1101",args:xe===void 0?{reason:"floating-milestone",key:Z,ref:Y,...F}:Te?{reason:"ancestor",key:Z,ref:Y,...F}:l[xe].lane!==L.lane?{reason:"forward-lane",key:Z,ref:Y,...F,lane:it(o[l[xe].lane]),ownLane:it(o[L.lane])}:{reason:"forward-flow",key:Z,ref:Y,...F,flow:Sh(RX(l,o,k,xe))},node:G})}}}let _=new Array(l.length),x=new Array(l.length);for(let k=l.length-1;k>=0;k--){let L=l[k];if(L.node.$type==="ItemDeclaration"){_[k]=L.ew,x[k]=L.ew;continue}for(let F of L.children){let G=_[F],Z=x[F];G!==void 0&&(_[k]=Math.max(_[k]??G,G)),Z!==void 0&&(x[k]=Math.min(x[k]??Z,Z))}}for(let k=0;k<l.length;k++){let L=_[k];if(L===void 0)continue;let F=KN(l[k].node);for(let G of l[k].node.properties)if(fe(G)==="before")for(let Z of ZT(G)){if(Ft.test(Z))continue;let Y=p(Z,k);if(Y!==void 0){let le=x[Y];if(le===void 0||L<=le)continue;h.push({severity:"warning",code:"NL.W1100",args:{reason:"item",ref:Z,...F,wave:i(L),refWave:i(le)},node:G});continue}let re=r.get(Z);re===void 0||L<re||h.push({severity:"warning",code:"NL.W1100",args:{reason:"wave",ref:Z,...F,wave:i(L)},node:G})}}let y=k=>l[k].node.$type!=="ItemDeclaration",T=k=>{let{parent:L,pinned:F}=l[k];return F||L<0?!1:Tt(l[L].node)||l[L].children[0]===k},w=new Array(l.length).fill(0),b=new Array(l.length).fill(0),$=k=>{let L=l[k],F=[];L.lw!==void 0&&F.push({term:{kind:L.ew!==void 0?"wave":"lead"},value:L.lw-1});for(let G of L.afterWaves)F.push({term:{kind:"after-wave",prop:G.prop,ref:G.ref},value:G.j});T(k)&&F.push({term:{kind:"parent",from:L.parent},value:w[L.parent]}),!L.pinned&&L.prev>=0&&F.push({term:{kind:"seq",from:L.prev},value:b[L.prev]});for(let G of L.after)F.push({term:{kind:"after",from:G.from,prop:G.prop,ref:G.ref},value:b[G.from]});return F},P=k=>{let L=w[k];for(let F of l[k].children)L=Math.max(L,b[F]);return L},O=l.map((k,L)=>[2*L+1]),H=l.map(()=>[]);for(let k=0;k<l.length;k++){let L=l[k];T(k)&&O[L.parent].push(2*k),L.prev>=0&&H[L.prev].push(2*k);for(let F of L.after)H[F.from].push(2*k);L.parent>=0&&H[k].push(2*L.parent+1)}let z=[],M=new Array(2*l.length).fill(!0);for(let k=0;k<l.length;k++)z.push(2*k,2*k+1);for(let k=0;k<z.length;k++){let L=z[k];M[L]=!1;let F=L>>1,G=(L&1)===1,Z=G?P(F):Math.max(0,...$(F).map(Y=>Y.value));if(!(Z<=(G?b[F]:w[F]))){G?b[F]=Z:w[F]=Z;for(let Y of G?H[F]:O[F])M[Y]||(M[Y]=!0,z.push(Y))}}let A=(k,L)=>$(k).filter(F=>F.value===L).map(F=>F.term),U=(k,L)=>{if(!y(k))return[{kind:"start"}];let F=l[k].children.filter(G=>b[G]===L).map(G=>({kind:"child",from:G}));return F.length>0?He(l[k].node)?F.reverse():F:w[k]===L?[{kind:"start"}]:[]},X=(k,L)=>{let F=[{i:k,via:k}];for(;F.length>0;){let{i:G,via:Z}=F.pop(),Y=U(G,L);for(let re=Y.length-1;re>=0;re--){let le=Y[re];if(le.kind==="start"){let xe=l[G].ew;if(xe!==void 0&&xe-1===L)return{origin:G,via:Z}}else le.kind==="child"&&F.push({i:le.from,via:G===k?le.from:Z})}}},R=(k,L)=>{let F=l[k].ew;return F!==void 0&&F-1===L},C=(k,L)=>{for(let F=k;!l[F].pinned;){let G=l[F].prev;if(G<0){if(!T(F))return;F=l[F].parent;continue}let Z=l[G].ew;if(Z!==void 0&&Z>L)return G;F=G}},N=new Map,j=[],q=new Map,V=(k,L,F)=>`${k}:${l[k].node.properties.indexOf(L)}:${F}`,ie=(k,L)=>{let F=[],G=k;for(;;){let Z=A(G,L);for(let re of Z)if(re.kind==="after-wave")F.push({variant:"after-wave",owner:G,prop:re.prop,ref:re.ref});else if(re.kind==="after")R(re.from,L)&&F.push({variant:"after-item",owner:G,prop:re.prop,ref:re.ref});else if(re.kind==="seq"){let le=re.from,xe=l[le].node;if(Tt(xe)&&l[le].ew===void 0){let Te=X(le,L),me=Te&&(qo(l[Te.via].node)??qo(l[Te.origin].node));me&&F.push({variant:"join",owner:G,block:le,track:me})}else if(R(le,L)){let Te=YN(xe);Te&&F.push({variant:"sequence",owner:G,pred:le,ref:Te})}}let Y=Z.find(re=>re.kind==="parent");if(!Y)break;G=Y.from}for(let Z of EX){let Y=F.find(re=>re.variant===Z);if(Y)return Y}},oe=(k,L)=>{let F=[{key:2*k,from:-1}],G=new Set([2*k]),Z,Y=(re,le)=>{G.has(re)||(G.add(re),F.push({key:re,from:le}))};for(let re=0;re<F.length;re++){let le=F[re].key>>1;if(le!==k&&N.has(le)){Z??(Z=le);continue}if((F[re].key&1)===1){for(let me of U(le,L))me.kind==="start"?Y(2*le,re):me.kind==="child"&&Y(2*me.from+1,re);continue}let xe=A(le,L),Te=xe.find(me=>me.kind==="wave"||me.kind==="lead")??xe.find(me=>me.kind==="after-wave");if(Te){let me=[];for(let Ze=re;Ze>=0;Ze=F[Ze].from){let Xe=F[Ze].key>>1;me[me.length-1]!==Xe&&me.push(Xe)}let ze=it(l[le].node);return{path:me,origin:Te.kind==="after-wave"?`${ze} (after:${Te.ref})`:`${ze} (wave "${i(L+1)}")`}}for(let me of xe)me.kind==="parent"?Y(2*me.from,re):(me.kind==="seq"||me.kind==="after")&&Y(2*me.from+1,re)}return{hit:Z}},ye=(k,L,F,G)=>{let Z=it(l[L].node),Y=i(F),re=i(G+1),le=l[k.owner].node,xe=k.owner===L?void 0:bX(le);switch(k.variant){case"after-wave":{let Te=l[k.owner].ew===void 0?void 0:xe;return{node:k.prop,run:[L],build:()=>({reason:"after-wave",name:Z,wave:Y,refId:k.ref,...Te?{container:Te}:{}})}}case"after-item":return{node:k.prop,run:[L],build:()=>({reason:"after-item",name:Z,wave:Y,refId:k.ref,ref:k.ref,refWave:re,...xe?{container:xe}:{}})};case"join":{let Te=l[k.block];return{node:l[L].node,run:[L],build:()=>({reason:"join",name:Z,wave:Y,block:Sh(Te.node),flow:Sh(ZN(l,o,k.block)),track:k.track,trackWave:re})}}case"sequence":{let Te=k.pred,me=l[Te].parent,ze=Ze=>{if(me<0)return l[Ze].lane===l[Te].lane;for(let Xe=l[Ze].parent;Xe>=0;Xe=l[Xe].parent)if(Xe===me)return!0;return!1};return{node:l[L].node,run:[L],build:Ze=>{let Xe=Ze.filter(ze);return{reason:"sequence",items:Xe.map(cn=>it(l[cn].node)),itemWave:Y,ref:k.ref,refWave:i(l[Te].ew??G+1),flow:Sh(ZN(l,o,Te)),last:it(l[Xe[Xe.length-1]].node)}},seq:{pred:Te,ref:k.ref,inFlow:ze}}}}},ne=(k,L)=>(j.push(L),k!==void 0&&q.set(k,L),L),se=(k,L,F,G)=>{let Z=k.variant==="sequence"?`sequence:${k.pred}:${F}`:k.variant==="join"?`join:${k.block}:${F}`:`${k.variant}:${V(k.owner,k.prop,k.ref)}`,Y=q.get(Z);return Y?(Y.run.push(L),Y):ne(Z,ye(k,L,F,G))};for(let k=0;k<l.length;k++){let L=l[k],F=L.ew;if(L.node.$type!=="ItemDeclaration"||F===void 0||w[k]<F)continue;let G=w[k],Z=ie(k,G),Y;if(Z)Y=se(Z,k,F,G);else{let re=oe(k,G);if("path"in re){let le=re.path.slice(1).filter(ze=>!y(ze)||qo(l[ze].node)!==void 0).map(ze=>it(l[ze].node)),xe=[re.origin,...le.filter((ze,Ze)=>le[Ze-1]!==ze)],Te=it(L.node),me=i(F);Y=ne(void 0,{node:L.node,run:[k],build:()=>({reason:"chain",name:Te,wave:me,chain:xe})})}else{let le=re.hit===void 0?void 0:N.get(re.hit),xe=le?.seq;if(xe?.inFlow(k)){let Te=C(k,F),me=Te===void 0?void 0:YN(l[Te].node),ze=Te!==void 0&&me!==void 0?{variant:"sequence",owner:k,pred:Te,ref:me}:{variant:"sequence",owner:k,pred:xe.pred,ref:xe.ref};Y=se(ze,k,F,G)}else Y=le,Y?.run.push(k)}}Y&&N.set(k,Y)}for(let k of j)h.push({severity:"error",code:"NL.E1103",args:k.build(k.run),node:k.node});return h}function ZN(e,t,n){let r=e[n].parent;return r<0?t[e[n].lane]:e[r].node}function RX(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 IX(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);On(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 JN="v1",JT=new Set(["planned","in-progress","active","done","completed","at-risk","blocked"]),Nh=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"]),SX=new Set(["hide","show"]),NX=new Set(["header-height","timeline-position","minor-grid","non-working"]),iw=new Set(["none","multiplier","person","people","points","time"]),Ph=new Set([...iw,"shield","warning","lock","calendar"]),fP="none",Ch={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"])},PX=new Set(["red","blue","yellow","green","orange","purple","violet","gray","grey","navy","white","none"]),CX=new Set(["business","full","custom"]),QT=new Set(["days-per-week","days-per-month","days-per-quarter","days-per-year"]),QN=new Set(["name","label-every","label"]),eP=new Set(["item","label","swimlane","roadmap","milestone","footnote","anchor","parallel","group"]),OX={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},tP=new Set(["labels","link","style","description"]),$X={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"])},LX=[{keys:new Set(["progress","percent","percentage","pct","complete","completion"]),requires:"remaining",suggest:"status: + remaining:"}];function DX(e,t){let n=e.toLowerCase();for(let r of LX)if(r.keys.has(n)&&t.has(r.requires))return r.suggest}var xu=/^\d+(?:\.\d+)?[dwmqy]$/,MX=/^\d+%$/,FX=/^#[0-9a-fA-F]{3,8}$/,BX=/^v\d+$/,nP=/^\d+$/,WX=/^[dwmqy]$/,rP=/^\d+(\.\d+)?$/,ow=/^\d+(\.\d+)?%$/,dP=/^\d+\.\d+$/,UX=/^\d+$/,XX=/^[\x20-\x7E]{1,3}$/,GX=/^[a-zA-Z]{2,3}(-[a-zA-Z]{2}|-\d{3})?$/,jX=new Set(["merge","ignore","isolate"]),iP=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,Zr("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 pP(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 $h=class{checkFileStructure(t,n){let r=t.hasConfig?$f.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(!BX.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(JN.slice(1),10);r>i&&ce(n,"error",{node:t,property:"version"},"NL.E0101",{version:t.version,supported:JN})}checkDirectiveProperties(t,n){let r=new Set;for(let i of t.properties){let o=fe(i);if(!iP.has(o)){ce(n,"error",{node:i,property:"key"},"NL.E0102",{key:o,allowed:[...iP].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;GX.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:Oh(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)vr(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(wt);t.roadmapDecl&&!r&&ce(n,"error",{node:t.roadmapDecl},"NL.E0004")}checkIncludeMode(t,n){jX.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(yu(t))return;let r=fe(t),i=t.value,o=t.values,s=i?[i]:o;switch(r){case"status":break;case"duration":i&&!xu.test(i)&&ce(n,"error",{node:t,property:"value"},"NL.E0400",{value:i});break;case"size":i&&!aP(i)&&ce(n,"error",{node:t,property:"value"},"NL.E0401",{value:i});break;case"effort":i&&!xu.test(i)&&ce(n,"error",{node:t,property:"value"},"NL.E0402",{value:i});break;case"remaining":{if(i)if(MX.test(i)){let a=parseFloat(i);(a<0||a>100)&&ce(n,"error",{node:t,property:"value"},"NL.E0404",{value:i})}else xu.test(i)||ce(n,"error",{node:t,property:"value"},"NL.E0403",{value:i});break}case"date":case"start":case"end":i&&!Tu(i,nw(t.$container))&&ce(n,"error",{node:t,property:"value"},"NL.E0405",{key:r,value:i});break;case"scale":i&&!xu.test(i)&&ce(n,"error",{node:t,property:"value"},"NL.E0406",{value:i});break;case"calendar":i&&!CX.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=HX(a);if(c==="invalid")break;c==="lane"?(!rP.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"}):rP.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(!zX(t.$container)){n("error",`"${r}:" is only valid on "swimlane" or "default swimlane".`,{node:t});break}if(i===fP)break;if(ow.test(i)){parseFloat(i)<=0&&n("error",`${r} value "${i}" must be positive.`,{node:t,property:"value"});break}if(dP.test(i)){parseFloat(i)<=0&&n("error",`${r} value "${i}" must be positive.`,{node:t,property:"value"});break}if(UX.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":xn(t.$container)&&sP(i,t,n);break;default:if(Nh.has(r)){if(r==="bg"||r==="fg"||r==="text")i&&!oP(i)&&ce(n,"error",{node:t,property:"value"},"NL.E0801",{value:i,key:r});else if(r in Ch){let a=Ch[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 ${bh(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=>!xr(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=>!xr(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);Nh.has(i)&&ce(n,"error",{node:r},"NL.E0804",{key:i,entity:bh(t)})}}checkUnknownEntityProperties(t,n){let r=$X[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)||tP.has(s)||Nh.has(s)||s==="footnote"||i?.has(s)||s==="wave"||yu(o))continue;let a=[...r,...tP],c=DX(s,r)??UN(s,a)??"";ce(n,"warning",{node:o,property:"key"},"NL.W0700",{key:s,entity:bh(t),suggested:c})}}checkRoadmapProperties(t,n){}checkStylePropertyEnum(t,n){let r=fe(t),i=t.value;if(r==="bg"||r==="fg"||r==="text")oP(i)||ce(n,"error",{node:t,property:"value"},"NL.E0801",{value:i,key:r});else if(r==="non-working")sP(i,t,n);else if(r in Ch){let o=Ch[r];o.has(i)||ce(n,"error",{node:t,property:"value"},"NL.E0802",{value:i,key:r,allowed:[...o].join(", ")})}else Nh.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&&(xu.test(t.name)||WX.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 Rh(t))tw(n,o);for(let o of Ih(t))tw(n,o);let r=Qn(t);if(r.length===0)return;let i={lanes:t.roadmapEntries.filter(wt),lookup:ol(t)};for(let o of sl(i,r))tw(n,o)}checkDuplicateSizeIds(t,n){let r=new Map;for(let i of t.roadmapEntries)if(jo(i)&&i.name){let o=r.get(i.name);o?n("error",`Duplicate size id "${i.name}". First declared at ${Oh(o)}.`,{node:i,property:"name"}):r.set(i.name,i)}}checkUtilizationOrdering(t,n){if(xn(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=lP(r.value),s=lP(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(!eP.has(t.entityType)){n("error",`"${t.entityType}" is not a supported entity type for default. Allowed: ${[...eP].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(xn(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=OX[t.entityType];if(o)for(let s of t.properties){let a=fe(s);o.has(a)&&n("error",kh(a,t.entityType),{node:s})}if(t.entityType!=="roadmap")for(let s of t.properties){let a=fe(s);NX.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)vr(h)&&h.name&&!i.has(h.name)?i.set(h.name,h):xn(h)&&h.entityType==="roadmap"&&(o??(o=h));let s=new Map;for(let h of t.roadmapEntries)if(Qa(h)&&h.name&&!s.has(h.name)){let g=h.properties.find(_=>fe(_)==="style");s.set(h.name,g?.value)}let a,c,l=h=>{for(let g of h){let _=fe(g);_==="header-height"?a=g:_==="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(du),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),(!nP.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(!QN.has(o)){n("error",`Unknown scale property "${o}". Allowed: ${[...QN].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"&&(!nP.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];jo(s)&&s.name?r.has(s.name)||r.set(s.name,o):tl(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];uP(s,a=>{if(yu(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=KX(t),i=o=>{uP(o,s=>{let a=fe(s);if(a!=="after"&&a!=="before"&&a!=="on"||yu(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=ln(o),c=Mt(o)||Tt(o)||He(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:zo(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(wt(o))for(let l of o.content)i(l);else if(Tt(o)||He(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 _ of h){let x=fe(_);if(x==="after"){let y=_.value?[_.value]:_.values;for(let T of y)T&&(Ft.test(T)||i(p,T))}else if(x==="before"){let y=_.value?[_.value]:_.values;for(let T of y)T&&(Ft.test(T)||i(T,p))}}},s=p=>{if(ln(p))return;let h=p.name,g=p.properties??[];if(o(h,g,t),wt(p))for(let _ of p.content)s(_);else if(Tt(p)||He(p))for(let _ of p.content)s(_)};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 _=u.get(g)??a;if(_===c){let x=h.indexOf(g),y=h.slice(x).concat(g),T=[...y].sort().join("\u2192");f.has(T)||(f.add(T),n("error",`Circular dependency detected: ${y.join(" \u2192 ")}.`,{node:t.roadmapDecl??t}))}else _===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)$n(c)?o(c):Ut(c)&&s(c)};for(let a of t.roadmapEntries)$n(a)?o(a):Ut(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 ${Oh(l[0].node)}.`,{node:l[u].node})}}checkSymbolDeclaration(t,n){t.name&&Ph.has(t.name)&&ce(n,"error",{node:t,property:"name"},"NL.E0805",{name:t.name,builtins:[...Ph].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??"";XX.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(Ho(i)&&i.name){let o=r.get(i.name);o?ce(n,"error",{node:i,property:"name"},"NL.E0810",{name:i.name,location:Oh(o)}):r.set(i.name,i)}}checkCalendarDeclaration(t,n){let r=zo(t),i=_u(t);for(let l of t.properties)hP.has(fe(l))||ce(n,"error",{node:l,property:"key"},"NL.E0901",{kind:r,key:fe(l)});mP(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)=>{Tu(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&&gP(u)?ce(n,"error",{node:u},"NL.E0902",{kind:r,key:l}):u&&u.values.length===1&&!Tu(u.values[0],!0)&&ce(n,"error",{node:u,property:"values",index:0},"NL.E0405",{key:l,value:u.values[0]})}let s=vu(i.get("start")),a=vu(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;wu(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(qX),s=o.filter(y=>VX(y)),a=r.properties.find(y=>fe(y)==="calendar"),c=t.configEntries.find(du),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:cP:u?7:cP,h=i.some(y=>Kr(y)&&y.name==="weekend"),g=new Set(!l&&!u&&!h?[0,6]:[]);for(let y of s)if(Kr(y))for(let T of rw(y))g.add(T);for(let y of s)if(hu(y))for(let T of rw(y))g.delete(T);if(g.size===7)for(let y of s)Kr(y)&&ce(n,"error",{node:y},"NL.E0906");for(let y of o){if(!Kr(y)||!YX(y))continue;new Set([...g,...rw(y)]).size===7&&ce(n,"error",{node:y},"NL.E0906")}let _=7-g.size;if(_===0||_===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:_})}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:zo(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];Ho(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||!aP(a)||s==="capacity-icon"&&iw.has(a)||s==="icon"&&Ph.has(a))return;let l=r.get(a);if(l===void 0){let u=s==="capacity-icon"?[...iw].sort().join(", "):[...Ph].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(vr(s))for(let a of s.properties)i(o,fe(a),a.value,a);else if(xn(s))for(let a of s.properties)i(o,fe(a),a.value,a)}}};function oP(e){return PX.has(e)||FX.test(e)}function sP(e,t,n){e===void 0||SX.has(e)||ce(n,"error",{node:t,property:"value"},"NL.E0800",{value:e})}function aP(e){return/^[a-zA-Z_][a-zA-Z0-9_-]*$/.test(e)}function HX(e){return e?wt(e)?"lane":Mt(e)?"item":xn(e)?e.entityType==="swimlane"?"lane":"item":"invalid":"invalid"}function zX(e){return e?!!(wt(e)||xn(e)&&e.entityType==="swimlane"):!1}function lP(e){if(!e||e===fP)return null;if(ow.test(e)){let t=parseFloat(e);return Number.isFinite(t)&&t>0?t/100:null}if(dP.test(e)){let t=parseFloat(e);return Number.isFinite(t)&&t>0?t:null}return null}var hP=new Set(["date","start","end","every"]),aw={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},cP=5;function nw(e){return Kr(e)||hu(e)}function _u(e){let t=new Map;for(let n of e.properties){let r=fe(n);hP.has(r)&&!t.has(r)&&t.set(r,n)}return t}function mP(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 wu(e){return e.value!==void 0?[e.value]:[...e.values]}function gP(e){return e.values.length>1}function vu(e){if(!e||gP(e))return;let[t]=wu(e);return t!==void 0&&Tu(t,!0)?t:void 0}function Tu(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?wu(t).map(n=>aw[n]).filter(n=>n!==void 0):[]}function qX(e){let t=_u(e);if(!mP(t))return!1;let n=t.get("date");if(n&&!wu(n).every(s=>Tu(s,!0)))return!1;for(let s of["start","end"]){let a=t.get(s);if(a&&vu(a)===void 0)return!1}let r=vu(t.get("start")),i=vu(t.get("end"));if(r&&i&&i<r)return!1;let o=t.get("every");return!(o&&!wu(o).every(s=>s in aw))}function VX(e){let t=_u(e);return t.has("every")&&!t.has("start")&&!t.has("end")}function YX(e){let t=_u(e);return t.has("every")&&t.has("start")!==t.has("end")}function Oh(e){let t=e.$cstNode;return t?`line ${t.range.start.line+1}`:"unknown location"}function lw(e,t){if(wt(e)){t(e.name,e);for(let n of e.content)sw(n,t)}else $n(e)?t(e.name,e):Ut(e)?yP(e,t):(eo(e)||On(e)||pu(e)||Qa(e)||jo(e)||tl(e)||ln(e))&&t(e.name,e)}function yP(e,t){t(e.name,e);for(let n of e.content)Ut(n)&&yP(n,t)}function sw(e,t){if(Mt(e))t(e.name,e);else if(Tt(e)){t(e.name,e);for(let n of e.content)sw(n,t)}else if(He(e)){t(e.name,e);for(let n of e.content)sw(n,t)}}function uP(e,t){let n=r=>{let i=r.properties;if(Array.isArray(i))for(let o of i)t(o);if(wt(r))for(let o of r.content)n(o);else if(Tt(r)||He(r))for(let o of r.content)n(o);else if(Ut(r))for(let o of r.content)(Ut(o)||$n(o))&&n(o)};n(e)}function KX(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),wt(r))for(let o of r.content)n(o);else if(Tt(r)||He(r))for(let o of r.content)n(o);else if(Ut(r))for(let o of r.content)Ut(o)||$n(o)?n(o):pN(o)};for(let r of e.roadmapEntries)n(r);return t}function al(e){return t=>e.anchors.get(t)??e.milestones.get(t)??e.waves?.get(t)}function ZX(e){let t=e.$document?.parseResult;return!!t&&(t.lexerErrors.length>0||t.parserErrors.length>0)}function vP(e,t,n){return n||ZX(e)?!1:!!e.roadmapDecl||t.swimlanes.size>0||Qn(e).length>0}function Vo(e,t,n,r,...i){return{severity:e,message:Zr("en-US",r,...i),sourcePath:t,...n===void 0?{}:{line:n},code:r,args:i,rule:"wave"}}function Lh(e){return e.map(t=>t.name)}function xP(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?"":vn(e.title),style:t("style"),labels:t("labels"),link:t("link"),description:e.description?vn(e.description.text):""}}var JX=["title","style","labels","link","description"];function TP(e,t,n){let r={diagnostics:[],failed:!1};if(n.mode==="ignore"||!n.participates||n.childFile.roadmapEntries.some(p=>ln(p)&&!p.name))return r;let i=n.parentAbs,o=n.inc.$cstNode?.range.start.line,s=n.childRelPath,a=Qn(e),c=Qn(n.childFile),l=p=>({diagnostics:[p],failed:!0});if(a.length===0&&c.length===0)return r;if(c.length===0)return l(Vo("error",i,o,"NL.E0202",{reason:"child-none",path:s,parent:Lh(a)}));if(a.length===0)return l(Vo("error",i,o,"NL.E0202",{reason:"parent-none",path:s,child:Lh(c)}));if(a.length!==c.length||a.some((p,h)=>p.name!==c[h].name))return l(Vo("error",i,o,"NL.E0202",{reason:"mismatch",path:s,child:Lh(c),parent:Lh(a)}));let u=al(t),f=al(n.childContent);for(let p=0;p<a.length;p++){let h=gu(a[p],u)?.date??null,g=gu(c[p],f)?.date??null;if(h!==g)return l(Vo("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=xP(a[p]),g=xP(c[p]),_=JX.filter(x=>h[x]!==g[x]).map(x=>({field:x,there:g[x],here:h[x]}));_.length!==0&&d.push(Vo("warning",i,o,"NL.W0701",{id:a[p].name,path:s,fields:_}))}return{diagnostics:d,failed:!1}}function QX(e){let t=e;for(;t&&!el(t);)t=t.$container;return t}function wP(e){let{rootFile:t,rootAbs:n,rootContent:r,files:i,edges:o,failed:s}=e,a=[],c=new Set,l=b=>{let $=JSON.stringify([b.sourcePath,b.line,b.code,b.args,b.message]);c.has($)||(c.add($),a.push(b))},u=b=>{let $=QX(b);return $?i.get($):void 0},f=(b,$)=>{let P=b.node.$cstNode?.range.start.line;return"message"in b?{severity:b.severity,message:b.message,sourcePath:$,...P===void 0?{}:{line:P},rule:"wave"}:Vo(b.severity,$,P,b.code,b.args)},d=[],p=new Set([n]),h=b=>{for(let $ of o.get(b)??[])$.mode==="ignore"||!$.participates||p.has($.childAbs)||(p.add($.childAbs),s.has($.childAbs)||d.push({file:$.childFile,abs:$.childAbs}),h($.childAbs))};h(n);let g=Qn(t),_=new Map(g.map(b=>[b.name,b]));for(let{file:b,abs:$}of d){for(let O of Rh(b))l(f(O,$));for(let O of Ih(b))l(f(O,$));if(_.size===0)continue;let P=(O,H)=>{let z=O===void 0?void 0:_.get(O);if(!z||ln(H))return;let M=z.$cstNode?z.$cstNode.range.start.line+1:0;l(Vo("error",$,H.$cstNode?.range.start.line,"NL.E0300",{name:O,location:`${il(n)}:${M}`}))};b.roadmapDecl&&P(b.roadmapDecl.name,b.roadmapDecl);for(let O of b.roadmapEntries)lw(O,P);for(let O of b.configEntries)vr(O)&&P(O.name,O)}if(g.length===0)return a;let x=b=>"message"in b?b.message:`${b.code}\0${JSON.stringify(b.args)}`,y=new Map,T={lanes:t.roadmapEntries.filter(wt),lookup:ol(t)};for(let b of sl(T,g,{suppressCycleRefs:!1})){let $=y.get(b.node)??new Set;$.add(x(b)),y.set(b.node,$)}let w=b=>{for(let $ of b){if(y.get($.node)?.has(x($)))continue;let P=u($.node);P===void 0||s.has(P)||l(f($,P))}};w(sl({lanes:[...r.swimlanes.values()],lookup:al(r)},g,{suppressCycleRefs:!1}));for(let b of r.isolatedRegions){let $=b.content.roadmap?u(b.content.roadmap):void 0;if($!==void 0&&s.has($))continue;let P=[...b.content.waves?.values()??[]];P.length!==0&&w(sl({lanes:[...b.content.swimlanes.values()],lookup:al(b.content)},P,{suppressCycleRefs:!1}))}return a}var tG=/^\d{4}-\d{2}-\d{2}$/;function bP(e){let t=e?.properties.find(n=>n.key==="start");if(t?.value&&tG.test(t.value)&&!Number.isNaN(new Date(t.value).getTime()))return t.value}function nG(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 ll(e){return e.code!==void 0||e.rule==="wave"}function kP(){return{styles:new Map,defaults:new Map,symbols:new Map,calendarDeclarations:[]}}function AP(){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(()=>(EP(),_P));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 SP(e,o,i);return i.diagnostics.push(...wP({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 SP(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:kP(),content:AP()};return n.stubs.add(l.content),n.processed.set(t,l),l}n.resolving.push(t),n.files.set(e,t);let r=kP(),i=AP();lG(r,e),dG(i,e);let o=Qn(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(BN(t),u);if(a.has(f)){n.diagnostics.push({severity:"error",message:`Duplicate include "${u}" in ${il(t)}.`,sourcePath:t,line:l.$cstNode?.range.start.line});continue}a.add(f);let d=RP(l,"config")??"merge",p=RP(l,"roadmap")??"merge",h;try{let x=await n.readFile(f);h=await rG(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:_}=await SP(h,f,n);if(s.push({parentAbs:t,inc:l,childRelPath:u,childAbs:f,mode:p,childFile:h,childContent:_,participates:vP(h,_,n.stubs.has(_))}),iG(r,g,d,f,n.diagnostics),oG(i,_,g,p,f,u,n.diagnostics),p==="isolate"&&!_.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=bP(e.roadmapDecl),y=bP(h.roadmapDecl);x!==y&&n.diagnostics.push({severity:"error",message:nG(u,x,y),sourcePath:t,line:l.$cstNode?.range.start.line})}}i.waves&&fG(i,i.waves);for(let l of s){let{diagnostics:u,failed:f}=TP(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 RP(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 rG(e,t,n){let r=gt.file(n),o=e.shared.workspace.LangiumDocumentFactory.fromString(t,r);return await e.shared.workspace.DocumentBuilder.build([o],{validation:!1}),o.parseResult.value}function iG(e,t,n,r,i){if(n==="ignore"||n==="isolate")return;let o=(s,a)=>i.push({severity:"warning",message:`${a} "${s}" from ${il(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")),sG(e.calendarDeclarations,t.calendarDeclarations,s=>o(s.name,aG(s))),t.scale&&!e.scale&&(e.scale=t.scale),t.calendar&&!e.calendar&&(e.calendar=t.calendar)}function oG(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 ${il(i)} is shadowed by the parent's definition.`,sourcePath:i});Jr(e.persons,t.persons,c=>a(c,"Person")),Jr(e.teams,t.teams,c=>a(c,"Team")),Jr(e.anchors,t.anchors,c=>a(c,"Anchor")),Jr(e.labels,t.labels,c=>a(c,"Label")),Jr(e.sizes,t.sizes,c=>a(c,"Size")),Jr(e.statuses,t.statuses,c=>a(c,"Status")),Jr(e.swimlanes,t.swimlanes,c=>a(c,"Swimlane")),Jr(e.milestones,t.milestones,c=>a(c,"Milestone")),Jr(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 sG(e,t,n){let r=new Set(e),i=new Set(e.filter(o=>o.name).map(IP));for(let o of t)if(!r.has(o)){if(o.name&&i.has(IP(o))){n(o);continue}e.push(o),r.add(o)}}function IP(e){return`${e.$type}:${e.name}`}function aG(e){return Kr(e)?"Non-working":"Working"}function Jr(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,NP(o.title)),o);continue}if(e.has(i)){n(i);continue}e.set(i,o)}}function lG(e,t){for(let n of t.configEntries)cG(e,n)}function cG(e,t){hN(t)?e.scale||(e.scale=t):du(t)?e.calendar||(e.calendar=t):vr(t)?t.name&&!e.styles.has(t.name)&&e.styles.set(t.name,t):Ho(t)?t.name&&!e.symbols.has(t.name)&&e.symbols.set(t.name,t):xn(t)?e.defaults.has(t.entityType)||e.defaults.set(t.entityType,t):(Kr(t)||hu(t))&&e.calendarDeclarations.push(t)}function uG(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(wt(n))t.swimlanes.add(r);else if($n(n))t.persons.add(r);else if(Ut(n))t.teams.add(r);else if(eo(n))t.anchors.add(r);else if(Qa(n))t.labels.add(r);else if(jo(n))t.sizes.add(r);else if(tl(n))t.statuses.add(r);else if(On(n))t.milestones.add(r);else if(pu(n))t.footnotes.add(r);else if(ln(n))for(let i of Object.values(t))i.add(r)}}return t}function fG(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 dG(e,t){t.roadmapDecl&&!e.roadmap&&(e.roadmap=t.roadmapDecl);let n=uG(t.roadmapEntries);for(let r of t.roadmapEntries)pG(e,r,n)}function NP(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 Qr(e,t,n){t.name?e.has(t.name)||e.set(t.name,t):t.title&&e.set(fw(e,NP(t.title),n),t)}function pG(e,t,n){wt(t)?Qr(e.swimlanes,t,n.swimlanes):$n(t)?Qr(e.persons,t,n.persons):Ut(t)?Qr(e.teams,t,n.teams):eo(t)?Qr(e.anchors,t,n.anchors):Qa(t)?Qr(e.labels,t,n.labels):jo(t)?Qr(e.sizes,t,n.sizes):tl(t)?Qr(e.statuses,t,n.statuses):On(t)?Qr(e.milestones,t,n.milestones):pu(t)&&Qr(e.footnotes,t,n.footnotes)}var dw=class extends aa{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 ou{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]!=="\\"}},PP={parser:{TokenBuilder:()=>new pw({indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[["[","]"]]}),Lexer:e=>new mh(e),ParserConfig:()=>({maxLookahead:4}),ValueConverter:()=>new dw},validation:{NowlineValidator:()=>new $h}};function hw(e={}){let t=e.shared??Ma(hh(gh),yN),n=Ma(ph({shared:t}),xN,PP);return t.ServiceRegistry.register(n),pP(n),{shared:t,Nowline:n}}function mw(e,t){return t.code===void 0?t.message:Zr(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=al(t),o=n.map(u=>gu(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 Dh=class{constructor(t){S(this,"items");S(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 CP(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 hG(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 mG(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 gG(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 yG(e){if(e===0||e>4)return 0;let t=Math.ceil(e/2);return(e%2===1?1:-1)*t*3}function xG(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 OP(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]=xG(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}=hG(s,t),{x:u,forceUnderBar:f}=mG(a,l,s,t),d=c||f;r.push({req:s,channelX:u,underBar:d,orderIndex:o})}let i=gG(r);for(let o of r){let s=yG(i.get(o.orderIndex)??0),a=o.channelX+s;n[o.orderIndex]={fromId:o.req.fromId,toId:o.req.toId,waypoints:vG(o.req.from,o.req.to,a),underBar:o.underBar}}return n}function vG(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 Eu="en-US",TG={"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 $P(e,t){return t??e??Eu}function cl(e){let t={};for(let n of wG(e)){let r=TG[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 LP(e,t){return e.wavesDeclaredPlaceholder.replace("{names}",()=>t.join(", "))}function wG(e){let t=[],n=_G(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(Eu)||t.push(Eu),t}function _G(e){return e.split("-").map((n,r)=>r===0?n.toLowerCase():/^[a-zA-Z]{2}$/.test(n)?n.toUpperCase():n).join("-")}function DP(e){let{box:t,afterDate:n,beforeDate:r,hasLinkIcon:i,footnoteCount:o}=e;if(!n&&!r)return[];let s=[],a=Ar,c=t.y+Q_,l=cg(t.width);if(n){let u=ug(t.x,i),f=l?{x:t.x-Ir-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+Ir,y:c}:{x:f,y:c};s.push({side:"before",isoDate:r,glyphTopLeft:d,glyphSize:a,spilled:l})}return s}function Mh(e){let{box:t,afterDate:n,beforeDate:r,row:i}=e;if(!n&&!r)return[];let o=[],s=Ar,a,c,l;if(i.kind==="title-tab-row"){a=t.y+(so-s)/2;let u=i.titleTabWidth!==void 0?t.x+i.titleTabWidth:void 0;c=u!==void 0?u+Rr:t.x+fo,l=u??t.x}else a=t.y-ds+(ds-s)/2,c=t.x+fo,l=i.title?ho(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 Ln(e){for(let t of e)if(/^\d{4}-\d{2}-\d{2}$/.test(t))return t}function MP(e){return e.box.y+e.box.height-nr/2}function FP(e,t){let{box:n}=e;return{x:n.x,y:n.y+t/2}}function BP(e,t){let{box:n}=e;return{x:n.x+n.width,y:e.textSpills?MP(e):n.y+t/2}}function WP(e,t){return e.textSpills?MP(e):e.box.y+t/2}function Fh(e,t){return{x:e,y:t,height:0,maxX:e}}function Bh(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)Bh(n,t)}function Wh(e,t){e.box.y+=t;for(let n of e.children)Bh(n,t);for(let n of e.nested)Wh(n,t)}function UP(e,t){e.box.y+=t;for(let n of e.nestedSwimlanes)Wh(n,t)}var ul=class{constructor(t){S(this,"rows");S(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)Bh(a,i)}}}};function Uh(e){return e==="hide"||e==="show"}var XP={red:"#f87171",blue:"#60a5fa",yellow:"#facc15",green:"#34d399",orange:"#fb923c",purple:"#a78bfa",gray:"#94a3b8",navy:"#818cf8",white:"#e2e8f0"},ei={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:{...ei,headerHeight:"md",padding:"md"},swimlane:{...ei,fg:"#e2e8f0",text:"#e2e8f0",padding:"sm",spacing:"none",textSize:"sm"},item:{...ei,bg:"#0f172a",fg:"#94a3b8",text:"#e2e8f0",shadow:"subtle",cornerRadius:"sm"},parallel:{...ei,bracket:"none",padding:"xs"},group:{...ei,bracket:"solid",padding:"xs",fg:"#94a3b8"},anchor:{...ei,bg:"#0b1220",fg:"#cbd5e1",text:"#cbd5e1",cornerRadius:"sm"},milestone:{...ei,bg:"#e2e8f0",fg:"#e2e8f0",text:"#0b1220",border:"solid"},footnote:{...ei,bg:"none",fg:"#94a3b8",text:"#e2e8f0",textSize:"sm"},label:{...ei,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 GP={red:"#4a4a4a",blue:"#6b6b6b",green:"#8a8a8a",yellow:"#c8c8c8",orange:"#5c5c5c",purple:"#3a3a3a",gray:"#9e9e9e",navy:"#2a2a2a",white:"#ffffff"},ti={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:{...ti,headerHeight:"md",padding:"md"},swimlane:{...ti,fg:"#3a3a3a",text:"#3a3a3a",padding:"sm",spacing:"none",textSize:"sm"},item:{...ti,bg:"#ffffff",fg:"#9e9e9e",text:"#1a1a1a",shadow:"subtle",cornerRadius:"sm"},parallel:{...ti,bracket:"none",padding:"xs"},group:{...ti,bracket:"solid",padding:"xs",fg:"#595959"},anchor:{...ti,bg:"#1a1a1a",fg:"#1a1a1a",text:"#1a1a1a",cornerRadius:"sm"},milestone:{...ti,bg:"#2a2a2a",fg:"#2a2a2a",text:"#ffffff",border:"solid"},footnote:{...ti,bg:"none",fg:"#595959",text:"#595959",textSize:"sm"},label:{...ti,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 jP={red:"#e53935",blue:"#1e88e5",yellow:"#fdd835",green:"#43a047",orange:"#fb8c00",purple:"#8e24aa",gray:"#9e9e9e",navy:"#0d47a1",white:"#ffffff"},ni={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:{...ni,headerHeight:"md",padding:"md"},swimlane:{...ni,fg:"#334155",text:"#334155",padding:"sm",spacing:"none",textSize:"sm"},item:{...ni,bg:"#ffffff",fg:"#94a3b8",text:"#0f172a",shadow:"subtle",cornerRadius:"sm"},parallel:{...ni,bracket:"none",padding:"xs"},group:{...ni,bracket:"solid",padding:"xs",fg:"#475569"},anchor:{...ni,bg:"#0f172a",fg:"#0f172a",text:"#0f172a",cornerRadius:"sm"},milestone:{...ni,bg:"#312e81",fg:"#312e81",text:"#ffffff",border:"solid"},footnote:{...ni,bg:"none",fg:"#475569",text:"#475569",textSize:"sm"},label:{...ni,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 HP=["light","dark","grayscale"],Tw={light:vw,dark:yw,grayscale:xw};var EG={greyscale:"grayscale"};function ww(e){let t=e.toLowerCase(),n=EG[t]??t;return HP.find(r=>r===n)}var bG={grey:"gray",violet:"purple"};function ri(e,t){if(e==="none")return"none";if(e.startsWith("#"))return e;let n=t.name==="dark"?XP:t.name==="grayscale"?GP:jP,r=bG[e]??e,i=n[r];return typeof i=="string"?i:e}function ku(e){return e.key.endsWith(":")?e.key.slice(0,-1):e.key}function kG(e,t){return{bg:ri(e.bg,t),fg:ri(e.fg,t),text:ri(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 VP(e,t,n,r){switch(t){case"bg":e.bg=ri(n,r);break;case"fg":e.fg=ri(n,r);break;case"text":e.text=ri(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=bu(n,"xl");break;case"padding":e.padding=bu(n,"xl");break;case"spacing":e.spacing=bu(n,"xl");break;case"header-height":e.headerHeight=bu(n,"xl");break;case"corner-radius":e.cornerRadius=bu(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":Uh(n)&&(e.nonWorking=n);break;default:break}}function bu(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 YP(e,t,n){if(t)for(let r of t.properties)VP(e,ku(r),r.value,n)}function zP(e,t,n){for(let r of t){let i=ku(r);r.value!==void 0&&VP(e,i,r.value,n)}}function AG(e,t,n){let r=t.find(o=>ku(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=>ku(c)==="style");a?.value&&YP(e,n.styles.get(a.value),n.theme)}}function qP(e,t,n){let r=t.find(i=>ku(i)==="style");r?.value&&YP(e,n.styles.get(r.value),n.theme)}function pt(e,t,n){let r=n.theme.entities[e],i=kG(r,n.theme),o=n.defaults.get(e);return o&&(qP(i,o.properties,n),zP(i,o.properties,n.theme)),AG(i,t,n),qP(i,t,n),zP(i,t,n.theme),i}function KP(e,t){return pt("label",e.properties,t)}function Xh(e,t,n,r,i=0){let o=n.map(c=>c??-1/0),s=[];for(let c=0;c<e;c++)s.push(ZP(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]:ZP(f[d-1],o[d],i)),f.push(Math.max(u[d],l[d]??-1/0));if(JP(s,u)&&JP(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 ZP(e,t,n){return t-e>n?t:e}function JP(e,t){for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function QP(e,t,n){return e.floors.map(r=>{let i=r?Ge(r.date):null;return i?n.workingIndexOf(t,i):null})}var Yo=class{constructor(t,n){S(this,"plan");S(this,"S");S(this,"memberEnd");S(this,"binding");S(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 eC(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 Kt=.5;function tC(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?Ge(i.date):null;return o?t.forward(o):null}),S:r,E:r,pass:new Yo(e,r),frozen:!1}}function nC(e,t,n){e.S=t,e.E=n,e.pass=new Yo(e.plan,t)}function rC(e,t){e.S=t.S,e.E=t.E,e.frozen=!0,e.solve=t}function Gh(e,t,n){e.ids.forEach((r,i)=>{t.set(r,e.S[i]),n.set(r,e.E[i])})}function Ko(e,t,n){return n.waves?n.waves.pass.apply(e,t):t}function iC(e,t,n){n.waves&&!n.waves.frozen&&n.waves.pass.accumulate(e,t)}function oC(e,t){if(t.waves)return t.waves.plan.memberWave(e)!==void 0?"member":"background"}function sC(e,t,n){let r=n.waves?.plan.waveOf.get(e);if(!n.waves||r===void 0)return;let i=de(e.properties,"date"),o=Ge(i)?"date":"start",s=o==="date"?i:de(e.properties,"start"),a=Ge(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<Kt)&&!(t-l>Kt))return{wave:n.waves.ids[r-1],key:o,pin:s,start:Au(l,n).toISOString().slice(0,10)}}function aC(e,t){for(let n of[...e.S,...e.E])if(!(Math.abs(n-e.origin)<Kt)&&Math.abs(t-n)<Kt)return!0;return!1}function _w(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,xt(r,n))}function Au(e,t){return t.calendar.dateAtWorkingIndex(t.timeline.startDate,_w(e,t))}function lC(e,t,n){return C_(n.calendar,n.timeline.startDate,_w(e,n),_w(t,n))}function Zo(e,t,n){return e.scale.showsNonWorking?e.scale.advanceX(t,n)-t:n*e.timeline.pixelsPerDay}var jh=class{constructor(t,n){S(this,"node");S(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=pt("group",r.properties,n.styleCtx),s=Ko(r,t.x,n),a=n.waves!==void 0&&r.title===void 0&&de(r.properties,"wave")!==void 0&&de(r.properties,"style")===void 0&&De(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=Ln(De(r.properties,"after")),f=Ln(De(r.properties,"before")),d=!!(u||f),p=ao(o.bg),g=p&&!!c||p&&d,_=g?so+Pm:0,x=g?Lm:0,y=Wl(p,!!c,d),T=t.y+y,w=n.bandScale.step(),b=s,$=new ul({laneLeftX:b,originY:T+_,minRowHeight:w,slackCorridors:n.slackCorridors}),P=b,O=[];for(let N of r.content){if(N.$type==="DescriptionDirective")continue;if(!Mt(N)){let xe=i.resolveChildStart(N,P,b,n),{rowIndex:Te,y:me}=$.placeBlock(),ze=i.newCursor(xe,me),Ze=i.sequenceOne(N,ze,n);O.push(Ze);let Xe=Ze.box.x+Ze.box.width,cn=Math.max(w,ze.height);$.commitBlock({rowIndex:Te,placed:Ze,blockHeight:cn,blockEnd:Xe,spillReservation:af(Ze)}),P=Math.max(P,Xe);continue}let j=N.properties,q=i.resolveChildStart(N,P,b,n),V=fi(j,n.sizes,n.cal),ie=n.scale.startX(q),oe=Math.max(Rn,Zo(n,ie,V)),ye=ie+oe,ne=N.name??"",se=i.predictItemBarExtraHeight(N,ie,n),k=w+se,{rowIndex:L,y:F}=$.placeItem({childId:ne,desiredStart:ie,desiredEnd:ye,predictedHeight:k}),G=i.newCursor(q,F),Z=i.sequenceItem(N,G,n);O.push(Z);let Y=Z.box.x+Z.box.width+un;P=Math.max(P,Y);let re=null;(Z.textSpills||Z.chipsOutside||Z.dotSpills||Z.iconSpills||Z.footnoteSpills)&&(re=Math.max(Z.decorationsRightX,Z.chipsOutside?Z.chipsRightX:0)+6),$.commitItem({rowIndex:L,placed:Z,logicalEnd:Y,spillReservation:re,rowHeight:Math.max(k,w+(Z.box.height-n.bandScale.bandwidth()))})}let H=Math.max(w,$.usedHeight()),z=Math.max(P,$.usedRightX()),M=n.scale.showsNonWorking?n.scale.startX(s):s,A=n.scale.showsNonWorking?Math.max(M,z):z,U={x:M,y:T,width:A-M,height:_+H+x};t.x=P+bl,t.maxX=Math.max(t.maxX,t.x);let X=n.bandScale.step()-n.bandScale.bandwidth();t.height=Math.max(t.height,y+U.height+X);let R=r.name;R&&(n.entityLeftEdges.set(R,U.x),n.entityRightEdges.set(R,U.x+U.width)),n.currentFlowKey=l;let C=Mh({box:U,afterDate:u,beforeDate:f,row:p?{kind:"title-tab-row",titleTabWidth:c?lo(c):void 0}:{kind:"header-band",title:c,titleInsetX:ps}});return{kind:"group",id:R,title:c,box:U,children:O,style:o,inlineDatePins:C.length>0?C:void 0,...a?{waveOnly:!0}:{}}}};var RG=12,IG=4,Hh=13,SG=11;function Ew(e,t){return(e?ct(e,SG):0)+t}function cC(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=cC(e);if(o){if(o.length>=2)return{textSpills:!(n<=t&&o.every((l,u)=>ct(l,Hh)<=(u===0?r:t))),titleLines:o};i=o[0]??""}let s=i.length>0&&ct(i,Hh)>r,a=n>t;if(!s&&!a)return{textSpills:!1,titleLines:[i]};if(s&&!a){let c=Ol(i,t,Hh,r);if(c.length>=2&&c.length<=og&&c.every((l,u)=>ct(l,Hh)<=(u===0?r:t)))return{textSpills:!1,titleLines:c}}return{textSpills:!0,titleLines:[i]}}function kw(e,t,n){let r=cC(e);return r&&r.length>=2?r:!t.textSpills&&!n&&t.titleLines.length>=2?t.titleLines:[r?r[0]??"":e]}var zh=class{constructor(t){S(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*un),o=t.x+un,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-RG),l=this.input.title,u=Ew(this.input.metaText,this.input.metaTrailingWidth??0),f=Math.max(0,i-a-(this.input.titleFirstLineRightReservePx??Fl({barWidth:i,footnoteLabels:[],hasBeforeGlyph:!1}))),{textSpills:d,titleLines:p}=bw(l,c,u,f),h=d?o+i+IG:o+a;return{id:this.input.id,box:s,textX:h,textSpills:d,titleLines:p}}};var qh=class{constructor(t,n){S(this,"node");S(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=pt("parallel",r.properties,n.styleCtx),s=Ko(r,t.x,n),a=Ln(De(r.properties,"after")),c=Ln(De(r.properties,"before")),l=r.title??r.name,u=tE(!!(a||c)),f=t.y+u,d=n.scale.showsNonWorking?n.scale.startX(s):s,p=[],h=d,g=0,_=n.currentFlowKey;n.nextParallelId+=1;let x=r.name??`parallel-${n.nextParallelId}`,y=0;for(let $ of r.content){if($.$type==="DescriptionDirective")continue;n.currentFlowKey=`${_}/par:${x}#${y}`;let P=i.newCursor(s,f+g),O=i.sequenceOne($,P,n);p.push(O),g+=Math.max(n.bandScale.step(),P.height),h=Math.max(h,P.maxX),y++}n.currentFlowKey=_;let T={x:d,y:f,width:h-d,height:g};t.x=h+bl,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,T.x),n.entityRightEdges.set(w,T.x+T.width));let b=Mh({box:T,afterDate:a,beforeDate:c,row:{kind:"header-band",title:l,titleInsetX:hs}});return{kind:"parallel",id:w,title:l,box:T,children:p,style:o,inlineDatePins:b.length>0?b:void 0}}};var fl=class extends Map{constructor(t,n=CG){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(uC(this,t))}has(t){return super.has(uC(this,t))}set(t,n){return super.set(NG(this,t),n)}delete(t){return super.delete(PG(this,t))}};function uC({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function NG({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function PG({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function CG(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Vh(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 Yh(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}var fC=Symbol("implicit");function Kh(){var e=new fl,t=[],n=[],r=fC;function i(o){let s=e.get(o);if(s===void 0){if(r!==fC)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 fl;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 Kh(t,n).unknown(r)},Yh.apply(i,arguments),i}function Ru(){var e=Kh().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 _=Vh(d).map(function(x){return h+o*x});return n(p?_.reverse():_)}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 Ru(t(),[r,i]).round(a).paddingInner(c).paddingOuter(l).align(u)},Yh.apply(f(),arguments)}var Aw=class e{constructor(t,n,r){S(this,"bandwidthPx");S(this,"stepPx");S(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=Ru().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}},OG={bandwidth:56,step:64};function dC(){return Aw.fixedRow(OG)}var pC=1e-6,Iu=class{constructor(t){S(this,"domain");S(this,"range");S(this,"pixelsPerDay");S(this,"calendar");S(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?An(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):An(this.domain[0],t)}dayAt(t){let n=(t-this.range[0])/this.pixelsPerDay;return{days:n,day:Math.floor(n+pC)}}forward(t){return this.showsNonWorking?this.range[0]+An(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?xt(this.domain[0],n):this.calendar?this.calendar.dateAtWorkingIndex(this.domain[0],n):xt(this.domain[0],n)}indexAtX(t){let{days:n,day:r}=this.dayAt(t);if(!this.showsNonWorking||!this.calendar)return n;let i=xt(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=xt(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-pC)-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 Zh(e){return e.endsWith(":")?e.slice(0,-1):e}function mC(e,t){let r=e.roadmapDecl?.properties.find(l=>Zh(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=Jh(i)*u,s=1}}let a=s??Z_[i]??4,c=l=>s===void 0&&!l?{labelEveryDefault:!0}:{};if(t){let u=t.properties.find(_=>Zh(_.key)==="unit")?.value??i,f=t.properties.find(_=>Zh(_.key)==="label-every"),d=t.properties.find(_=>Zh(_.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)||Jh(u)):o??Jh(u);return{unit:u,labelEvery:h,pixelsPerUnit:g,...c(p!==0)}}return{unit:i,labelEvery:a,pixelsPerUnit:o??Jh(i),...c(!1)}}function Jh(e){switch(e){case"days":return q_;case"weeks":return 40;case"months":return 80;case"quarters":return 160;case"years":return 320}}var $G=.5,Rw=.5,Iw=7;function Jo(e){return e==="months"||e==="quarters"||e==="years"}function Qh(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 LG(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 em(e,t,n,r,i){let o=Math.ceil(t-1e-6);if(i?.hasNonWorkingDays){if(!Jo(n)&&o<=0)return 0;let a=o<=0?e:xt(i.dateAtWorkingIndex(e,o-1),1),c=Jo(n)?hC(a,n):n==="weeks"?gC(a,e,i.weekStart):a;return i.workingIndexOf(e,c)}if(!Jo(n))return Math.ceil(t/r)*r;let s=xt(e,o);return An(e,hC(s,n))}function hC(e,t){return LG(e,t)?e:Qh(e,t)}function gC(e,t,n){let r=n===void 0?-An(t,e):n-e.getUTCDay();return xt(e,(r%Iw+Iw)%Iw)}function DG(e,t,n){return gC(xt(e,1),t,n)}function Sw(e,t,n,r=Eu){if(e.calendar?.hasNonWorkingDays)return MG(e,t,e.calendar,r);if(Jo(t.unit))return UG(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?Pw(t.unit,xt(e.domain[0],u),l,r):void 0})}return c}function MG(e,t,n,r){let{unit:i}=t,[o,s]=e.domain,a=_=>Jo(i)?Qh(_,i):i==="weeks"?DG(_,o,n.weekStart):xt(_,1),c=[o];for(let _=a(o);_<s;_=a(_))c.push(_);let l=e.forward(s),u=[];c.forEach((_,x)=>{let y=e.forward(_);(x+1<c.length?e.forward(c[x+1]):l)>y&&!FG(e,i,c,x)&&u.push({date:_,x:y})});let f=i==="days"&&t.labelEveryDefault===!0&&n.weekStart!==void 0,d=(_,x)=>f?_.getUTCDay()===n.weekStart:x%t.labelEvery===0,h=(e.showsNonWorking?L_(i):n.daysPerUnit(i))*e.pixelsPerDay,g=u.map(({date:_,x},y)=>{let T=(y+1<u.length?u[y+1].x:l)-x,w=d(_,y),b=w?Pw(i,_,y,r):void 0;if(b!==void 0){let $=ct(b,oo)>T,P=Jo(i)?y===0||y===u.length-1:T<h-$G;$&&P&&(b=void 0)}return{x,labelX:x+T/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 FG(e,t,n,r){let i=e.calendar;if(!e.showsNonWorking||!i||!Jo(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=>WG(e,l,n));let c=l=>t.some(u=>Math.abs(u.x-l)<Rw&&(u.major||r));return o.map(l=>{let u=e.forward(l.from),f={x:u,width:e.forward(xt(l.through,1))-u,from:l.from,through:l.through};l.titles.length>0&&(f.titles=l.titles,f.label=yC(l,i.workingWeekdays),f.cut=!0);let d=u-s>Rw&&a-u>Rw;return n==="days"&&d&&!c(u)&&(f.seam=!0),f})}var BG=" \xB7 ";function yC(e,t){let n=0;for(let i=e.from;i<=e.through;i=xt(i,1))t.has(i.getUTCDay())&&n++;let r=e.titles.join(", ");return n>0?`${r}${BG}${n}d`:r}function WG(e,t,n){let[r,i]=e.range,o=Math.max(r,e.forward(t.from)),s=Math.min(i,e.forward(xt(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=yC(t,e.calendar.workingWeekdays))),(n==="days"||n==="weeks"||t.titles.length>0)&&(a.band=!0),a}function UG(e,t,n,r){let[i,o]=e.domain,s=[i];for(let l=Qh(i,n);l<o;l=Qh(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?Pw(n,l,u,r):void 0,g=u===0||u===c-1;return h!==void 0&&g&&ct(h,oo)>p&&(h=void 0),{x:f,labelX:f+p/2,major:d,label:h}})}function Pw(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`${cl(r).quarterPrefix}${i} ${t.getUTCFullYear()}`}case"years":return`${t.getUTCFullYear()}`}}var Cw=class{constructor(t,n){S(this,"id");S(this,"anchor");this.id=t,this.anchor=n}place(t,n){let r=de(this.anchor.properties,"date"),i=Ge(r);if(!i)return null;let o=t.scale.forwardWithinDomain(i);if(o===null)return null;let s=pt("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=Er(i)),d}};function vC(e,t,n){let r=[];for(let[i,o]of e){let s=new Cw(i,o).place(t,n);s&&r.push(s)}return r}function pl(e){let t=0;for(let n of e)t=Math.max(t,TC(n.children)),n.nested.length>0&&(t=Math.max(t,pl(n.nested)));return t}function TC(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,TC(n.children));return t}function Ow(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,De(l.properties,"on")),r.push({number:f,title:l.title??c,description:l.description?.text,style:pt("footnote",l.properties,t.styleCtx)})}),{area:{box:{x:Bn,y:n+Bn,width:t.chartRightX-2*Bn,height:r.length===0?0:Rl+r.length*Il+Bn},entries:r},index:i,hosts:o}}var XG=.8,GG=1;function jG(e){let t=[];return _C(e,t),t}function _C(e,t){for(let n of e)if(n.kind==="item"){let r=HG(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")&&_C(n.children,t)}function HG(e){return e.capacity?e.capacity.value:e.size?1:0}function EC(e){if(e.capacityValue<=0||e.warnFraction===null&&e.overFraction===null)return null;let t=jG(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:zG(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 zG(e,t,n,r){let i=e/t;return r!==null&&i>=r?"red":n!==null&&i>=n?"yellow":"green"}function bC(e,t){let n=t.get("swimlane"),r=wC(de(e.properties,"utilization-warn-at"),n?de(n.properties,"utilization-warn-at"):void 0,XG),i=wC(de(e.properties,"utilization-over-at"),n?de(n.properties,"utilization-over-at"):void 0,GG);return{warn:r,over:i}}function wC(e,t,n){let i=YG(e??t);return i.kind==="unset"?n:i.kind==="none"?null:i.value}var qG=/^\d+(?:\.\d+)?%$/,VG=/^\d+\.\d+$/;function YG(e){if(e===void 0)return{kind:"unset"};if(e==="none")return{kind:"none"};if(qG.test(e)){let t=parseFloat(e)/100;return Number.isFinite(t)&&t>0?{kind:"number",value:t}:{kind:"unset"}}if(VG.test(e)){let t=parseFloat(e);return Number.isFinite(t)&&t>0?{kind:"number",value:t}:{kind:"unset"}}return{kind:"unset"}}var kC=10;function KG(e,t,n){let r=de(e.properties,"capacity"),i=ui(r);if(i===null)return{capacity:null,badgeWidthPx:0};let o=yl(i),s=xl(t.capacityIcon,n),a=io(o,s,kC);return{capacity:{value:i,text:o,icon:s},badgeWidthPx:a}}var ZG=10,JG=38,QG=8;function e4(e,t,n){let r=e.title??e.name??"";if(!r)return 0;let i=de(e.properties,"owner");return Ul(0,r,i??void 0,t,n).rightX}function t4(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 n4(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 hl=class{constructor(t,n){S(this,"input");S(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=pt("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}=KG(r,s,n.symbols),d=t4(r,n),p=d.length>0?o.estimateTextWidth(d.join(","),kC):0,h=e4(r,f,p),g=n4(r,a,n,o),_=!r.title||g===void 0||g>=h+QG,x=t.y+(_?ZG:JG),y=new ul({laneLeftX:a,originY:x,minRowHeight:c,slackCorridors:n.slackCorridors}),T=a,w=[];for(let A of r.content){if(A.$type==="DescriptionDirective")continue;if(!Mt(A)){let G=o.resolveChildStart(A,T,a,n),{rowIndex:Z,y:Y}=y.placeBlock(),re=o.newCursor(G,Y),le=o.sequenceOne(A,re,n);w.push(le);let xe=le.box.x+le.box.width,Te=Math.max(c,re.height);y.commitBlock({rowIndex:Z,placed:le,blockHeight:Te,blockEnd:xe,spillReservation:af(le)}),T=Math.max(T,xe);continue}let U=A.properties,X=o.resolveChildStart(A,T,a,n),R=fi(U,n.sizes,n.cal),C=n.scale.startX(X),N=Math.max(Rn,Zo(n,C,R)),j=C+N,q=A.name??"",V=o.predictItemBarExtraHeight(A,C,n),ie=c+V,{rowIndex:oe,y:ye}=y.placeItem({childId:q,desiredStart:C,desiredEnd:j,predictedHeight:ie}),ne=o.newCursor(X,ye),se=o.sequenceItem(A,ne,n);w.push(se);let k=se.box.x+se.box.width+un;T=Math.max(T,k);let L=null;(se.textSpills||se.chipsOutside||se.dotSpills||se.iconSpills||se.footnoteSpills)&&(L=Math.max(se.decorationsRightX,se.chipsOutside?se.chipsRightX:0)+6),y.commitItem({rowIndex:oe,placed:se,logicalEnd:k,spillReservation:L,rowHeight:Math.max(ie,c+(se.box.height-n.bandScale.bandwidth()))})}let b=x-t.y,$=Math.max(c+32,b+y.usedHeight()+16),P=Math.max(y.usedRightX(),h),O={x:0,y:t.y,width:n.chartRightX,height:$},H=de(r.properties,"owner"),z;if(H){let A=n.teams.get(H),U=n.persons.get(H);z=A?.title??U?.title??H}let M=u?(()=>{let{warn:A,over:U}=bC(r,n.styleCtx.defaults);return EC({children:w,capacityValue:u.value,warnFraction:A,overFraction:U})})():null;return n.currentFlowKey=l,{positioned:{id:r.name,title:r.title??r.name??"",box:O,bandIndex:i,children:w,nested:[],style:s,owner:z,footnoteIndicators:d,capacity:u,utilization:M},usedHeight:$,usedRightX:P}}};var r4=18,i4=14,o4=14,s4=16,a4=32;function $w(e,t,n,r){let i=n+r4,o=[],s=!0;for(let a of e){s||(i+=s4),s=!1;let c=a.content.roadmap?.title??a.sourcePath,l=i+i4,u={cal:t.cal,styleCtx:{theme:t.styleCtx.theme,styles:a.config.styles,defaults:a.config.defaults,labels:a.content.labels},sizes:os(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&&Gh(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:T,usedHeight:w}=new hl({lane:y,bandIndex:p},r).place({x:u.timeline.originX,y:d},u);f.push(T),d+=w,p++}let h=d,g=Math.max(t.bandScale.bandwidth(),h-i+o4),_={x:0,y:i,width:0,height:g},x={sourcePath:a.sourcePath,label:c,box:_,nestedSwimlanes:f,style:pt("swimlane",[],t.styleCtx)};Lw(x,t.chartRightX),o.push(x),i+=g}return{regions:o,endY:i}}function Lw(e,t){let n=e.box.x,{chromeRightX:r}=Xl(n,e.label,e.sourcePath),i=pl(e.nestedSwimlanes),o=Math.max(r,i)+a4,s=Math.min(t-n,o-n);e.box.width=s;for(let a of e.nestedSwimlanes)a.box.width=s}function nm(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?WP(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 rm(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 Mw(e){let t=null;for(let n of e)n.wave===void 0&&(!t||n.x>t.x)&&(t=n);return t}function l4(e,t){let n;for(let r of e)r.wave===void 0||r.x-t<Kt||(!n||r.x>n.x)&&(n=r);return n?.wave}function AC(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 Dw=class{constructor(t,n){S(this,"id");S(this,"milestone");this.id=t,this.milestone=n}place(t){let n=this.milestone,r=pt("milestone",n.properties,t.styleCtx),i=de(n.properties,"date"),o=De(n.properties,"after"),s=Ge(i),a=t.timeline.markerRow.y,c=6,l=n.title??this.id,u=null,f=a,d=null,p="right",h=!1,g,_=!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 $=nm(o,t),P=rm($),O=Mw(P);O&&O.x>w&&(_=!0,g=[{x:O.x,y:O.y>0?O.y:f}]),x=l4(P,w),x!==void 0&&(_=!0)}else if(o.length>0){let w=nm(o,t),b=rm(w);b.sort((H,z)=>z.x-H.x);let $=b[0]?.x??t.timeline.originX;u=$,h=!1;let P=AC(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 O=[];for(let H=1;H<b.length;H++){let z=b[H];z.x<$&&z.y>0&&z.wave===void 0&&O.push({x:z.x,y:z.y})}O.length>0&&(g=O)}if(u===null)return null;if(!d){let w=AC(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 T={id:this.id,title:l,center:y,radius:c,fixed:h,slackArrows:g,isOverrun:_,style:r,cutTopY:t.chartTopY,cutBottomY:t.swimlaneBottomY,labelBox:d,labelSide:p};return t.waves&&!_&&aC(t.waves,y.x)&&(T.onWaveBoundary=!0),x!==void 0&&s&&(T.overrunByWave=x,T.overrunDate=Er(s)),s&&!t.scale.showsNonWorking&&!t.calendar.isWorkingDay(s)&&(T.hiddenDate=Er(s)),T}};function RC(e,t){let n=[];for(let[r,i]of e){let o=new Dw(r,i).place(t);o&&n.push(o)}return n}function om(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 IC(e){let[t,n,r]=om(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 sm(e,t){let n=IC(e),r=IC(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}var c4=4.5;function PC(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=eC(e.plan,e.solve,e.pass,e.origin,e.floors,Kt),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,T)=>{let w=e.plan.waves[T],b=w.title??y.id,$=y.memberCount===0,P=Au(y.start,t),O=lC(y.start,y.end,t),H=$?void 0:d++,z=u4(y.id,t),M=f4(w.properties,H,t),A=Math.max(y.start,c),U=Math.min(y.end,l),X=Math.max(0,U-A),R,C=!1;if(!$){if(z.length>0){let ye=z.length*In;R=SC(b,y.id,T+1,X,ye),C=R!==void 0}R??(R=SC(b,y.id,T+1,X,0))}let N=(A+U)/2,j;if($&&(N=y.start,!a)){let ye=f.filter(ne=>Math.abs(ne-y.start)<Kt).length;f.push(y.start),N=y.start+ye*ng,j={x:N,y:u}}let q=$?Fw(P):`${Fw(P)} \u2013 ${Fw(O)}`,V=[b,q];$?V.push(n.waveNoItems):y.heldBy!==void 0&&V.push(`${n.waveHeldBy} ${y.heldBy}`);let ie,oe=s[T-1];if(!a&&oe!==void 0&&y.floorRef!==void 0&&y.start-oe.end>Kt){let ye=Math.max(oe.end,c),ne=Math.min(y.start,l);ct(y.floorRef,rr)+2*kr<=ne-ye&&(ie={text:y.floorRef,x:(ye+ne)/2})}return{id:y.id,title:b,index:T,...H!==void 0?{visibleOrdinal:H}:{},startX:y.start,endX:y.end,startDate:P,endDate:O,memberCount:y.memberCount,empty:$,...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:V.join(" \xB7 "),footnotesShown:C,...j?{marker:j}:{},...ie?{gapLabel:ie}:{}},style:M,footnoteIndicators:z}}),h=a?[]:h4(p,e.origin,o.y,t),g=Bw(r),_=i.map(y=>Bw(y.nestedSwimlanes));for(let y of[...g,..._.flat()])y.waveTooltip=n.waveBackgroundItem;let x={waves:p,boundaries:h,crossings:NC(g,h),regionCrossings:_.map(y=>NC(y,h)),hasBackground:g.length+_.flat().length>0};return a&&(x.placeholder=LP(n,p.map(y=>y.title))),x}function SC(e,t,n,r,i){let o=a=>ct(a,rr)*1.05+i+2*kr<=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 u4(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 f4(e,t,n){let r=n.styleCtx.theme,i=new Map,o=de(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=ri(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?d4(l,c,Pl)??l:l,f=i.get("border");return{...c?{tint:c}:{},stripFill:l,text:a("text")??p4(r.wave,u),boundary:a("fg")??r.wave.boundary,boundaryDash:f==="dashed"?"4 2":f==="dotted"?"1 2":null}}var am=/^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;function d4(e,t,n){if(!am.test(e)||!am.test(t))return;let r=om(e),i=om(t);return`#${r.map((o,s)=>Math.round(o*(1-n)+i[s]*n).toString(16).padStart(2,"0")).join("")}`}function p4(e,t){let n=e.labelText;return!am.test(n)||!am.test(t)||sm(n,t)>=c4?n:sm(e.hatch,t)>=sm(e.hatchOnDark,t)?e.hatch:e.hatchOnDark}function h4(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<Kt;)a++;let c=i.slice(s,a);s=a;let l=c[0].x;if(Math.abs(l-t)<Kt)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 Bw(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(...Bw(r.nested));return t}function NC(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 m4="\u2070\xB9\xB2\xB3\u2074\u2075\u2076\u2077\u2078\u2079";function g4(e){return String(e).replace(/[0-9]/g,t=>m4[Number(t)])}function CC(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=rr,l=w=>ct(w,c),u=t.timeline.originX,f=Math.max(u,t.chartRightX-Qt),d=0,p=u,h=!1,g=0,_=w=>r+w*Cl+Qu,x=w=>{h&&p+Ju+w>f&&(d++,p=u,h=!1);let b=h?p+Ju:p;return p=b+w,h=!0,g=Math.max(g,p-u),b},y=[],T=(w,b)=>{let $=Ku+rg,P=x($+l(b)),O=_(d);y.push({kind:w,text:b,swatch:{x:P,y:O-Qu+(Cl-Zu)/2,width:Ku,height:Zu},runs:[{text:b,x:P+$,y:O}]})};if(e.hasBackground&&T("background",n.waveLegendBackground),e.boundaries.length>0&&T("boundary",n.waveLegendBoundary),o||s||a){let w=i.map(O=>{let H=`#${O.index+1} ${O.title}`;return O.footnoteIndicators.length>0&&!O.strip.footnotesShown&&(H+=` ${O.footnoteIndicators.map(g4).join(",")}`),O.empty&&(H+=` (${n.waveNoItems})`),H}),b=" \xB7 ",$=`${n.waveLegendPrefix} ${w[0]}`,P=[{text:$,x:x(l($)),y:_(d)}];for(let O of w.slice(1)){let H=P[P.length-1];p+l(b+O)<=f?(H.text+=b+O,p+=l(b+O),g=Math.max(g,p-u)):(d++,p=u,h=!1,P.push({text:O,x:x(l(O)),y:_(d)}))}y.push({kind:"waves",text:`${n.waveLegendPrefix} ${w.join(b)}`,runs:P})}return{box:{x:u,y:r,width:g,height:(d+1)*Cl},entries:y}}function Fw(e){return e.toISOString().slice(0,10)}var y4=4;function Ww(e,t){t>e.chartRightX&&(e.chartRightX=t)}function FC(e){return`nonworking:${e.from.toISOString().slice(0,10)}`}function $C(e){let t=[];for(let n of e??[])n.label!==void 0&&t.push({id:FC(n),centerX:n.x,radius:0,title:n.label,fontSize:10,bold:!1});return t}function LC(e,t,n,r){let i=n;for(let o of e){let s=r(o.title,o.fontSize),a=o.centerX+o.radius+6+s,c=o.centerX-o.radius-6-s;a>n&&c<t&&(i=Math.max(i,a+Qt))}return i}function DC(e,t,n){let r=Nw(t,e.ticks,n,e.minorGrid);r&&(e.nonWorkingDisplay=t.showsNonWorking?"show":"hide",e.nonWorking=r)}var cm=class{place(t,n,r,i,o){let s=r.theme??"light",a=Tw[s],c=r.width??1280,l=$P(r.locale,v4(t)),{config:u,working:f}=X_(t,n),d=mC(t,n.config.scale),p=os(n.content.sizes,u),h={theme:a,styles:n.config.styles,defaults:n.config.defaults,labels:n.content.labels},{startDate:g,endDate:_}=o.computeDateWindow(t,{cal:u,sizes:p,calendar:f},n,r.today,d,i),x=pt("roadmap",t.roadmapDecl?.properties??[],h),y=x.headerPosition==="beside",T=_l[x.headerHeight]??_l.md,w=T>0&&x.timelinePosition!=="bottom",b=T>0&&(x.timelinePosition==="bottom"||x.timelinePosition==="both"),$=Uh(r.nonWorking)?r.nonWorking:x.nonWorking,P=$==="show"&&f.hasNonWorkingDays,O=t.roadmapDecl?.title??t.roadmapDecl?.name??"",H=de(t.roadmapDecl?.properties??[],"author"),z=o.sizeBesideHeader(O,H),M=y?{x:0,y:0,width:z.boxWidth,height:0}:{x:0,y:0,width:0,height:ju},A=y?z.boxWidth:0,U=y?8:ju+8,X=d.pixelsPerUnit/f.daysPerUnit(d.unit),R=Math.max(1,f.workingIndexOf(g,_)),C=P?Math.max(1,An(g,_))*X:R*X,N=A+Qt,j=C,q=A+Qt+j+Qt,V=Math.min(c,q),oe=r.today!==void 0&&r.today>=g&&r.today<=_?di:0,ye=w?T:0,ne=i?Ym:0,se=new Iu({domain:[g,_],range:[N,N+C],calendar:f,nonWorking:$}),k=$C(Nw(se,[],d.unit,!1)),L=n.content.anchors.size+n.content.milestones.size>0||k.length>0,F=Math.max(V,N+j+Qt),G=[];for(let[Q,pe]of n.content.anchors){let ot=Ge(de(pe.properties,"date"));if(!ot)continue;let Fn=se.forwardWithinDomain(ot);Fn!==null&&G.push({id:Q,centerX:Fn,radius:6,title:pe.title??Q,fontSize:10,bold:!1,date:ot,isMilestone:!1})}for(let[Q,pe]of n.content.milestones){let ot=Ge(de(pe.properties,"date"));if(!ot)continue;let Fn=se.forwardWithinDomain(ot);Fn!==null&&G.push({id:Q,centerX:Fn,radius:6,title:pe.title??Q,fontSize:10,bold:!0,date:ot,isMilestone:!0})}let Z=MC([...G,...k],A,LC(k,A,F,o.estimateTextWidth),o.estimateTextWidth),Y=L?Math.max(1,Z.rowCount):0,re=Y*26,le=oe+ye+ne+re,xe=le+8,Te=y?z.cardHeight+y4:0,me=Math.max(U,Te-le),ze=me+oe,Ze=ze+ye,Xe=Ze+ne,cn=Xe+re,tr=Sw(se,d,f,l),It={box:{x:N,y:me,width:C,height:0},ticks:tr,pixelsPerDay:X,originX:N,startDate:g,endDate:_,labelStyle:pt("roadmap",[],h),pillRowHeight:oe,tickPanelY:ze,tickPanelHeight:ye,markerRow:{y:Xe+13,height:re,collisionY:Xe-8},minorGrid:x.minorGrid,...i?{waveStrip:{y:Ze,height:ne}}:{}};DC(It,se,d.unit);let no=new Map;for(let[Q,pe]of Z.placements){let ot=Xe+13+pe.rowIndex*26;no.set(Q,{rowIndex:pe.rowIndex,centerY:ot,labelBox:{...pe.labelBox,y:ot-4},labelSide:pe.labelSide})}let K={cal:u,styleCtx:h,sizes:p,labels:n.content.labels,teams:n.content.teams,persons:n.content.persons,symbols:n.config.symbols,footnoteIndex:new Map,footnoteHosts:new Map,timeline:It,scale:se,calendar:f,bandScale:dC(),entityLeftEdges:new Map,entityRightEdges:new Map,entityMidpoints:new Map,placedItems:new Map,itemFlowKey:new Map,currentFlowKey:"",slackCorridors:[],markerRowPlacements:no,chartTopY:me+xe,chartBottomY:0,swimlaneBottomY:0,chartRightX:F,nextParallelId:0,nextGroupId:0,...i?{waves:tC(i,se,N)}:{}};for(let Q of G){let pe=no.get(Q.id);pe&&(K.entityLeftEdges.set(Q.id,Q.centerX),K.entityRightEdges.set(Q.id,Q.centerX),K.entityMidpoints.set(Q.id,{x:Q.centerX,y:pe.centerY}))}let wr=Ow(n.content.footnotes,K,0);K.footnoteIndex=wr.index,K.footnoteHosts=wr.hosts;let ai=new Map(K.entityLeftEdges),li=new Map(K.entityRightEdges),ts=new Map(K.entityMidpoints),Mn=()=>{K.entityLeftEdges=new Map(ai),K.entityRightEdges=new Map(li),K.entityMidpoints=new Map(ts),K.placedItems=new Map,K.itemFlowKey=new Map,K.currentFlowKey="",K.waves&&Gh(K.waves,K.entityLeftEdges,K.entityRightEdges)},E=[...n.content.swimlanes.values()],B=pt("swimlane",[],h),J=j_[B.spacing]??0,ae=()=>{K.nextParallelId=0,K.nextGroupId=0;let Q=[],pe=K.chartTopY,ot=0,Fn=K.timeline.originX;for(let g$ of E){ot>0&&(pe+=J);let{positioned:y$,usedHeight:x$,usedRightX:__}=new hl({lane:g$,bandIndex:ot},o).place({x:K.timeline.originX,y:pe},K);Q.push(y$),pe+=x$,__>Fn&&(Fn=__),ot++}return{swimlanes:Q,nextY:pe,maxRightX:Fn}},_e=n.content.isolatedRegions,Se,Oe,Ee=K.waves;if(Ee){let Q,pe=Xh(Ee.ids.length,Ee.origin,Ee.floors,(ot,Fn)=>(nC(Ee,ot,Fn),Mn(),Q=ae(),_e.length>0&&$w(_e,K,Q.nextY+8,o),Ee.pass),Kt);rC(Ee,pe),Oe={passes:pe.passes,capped:pe.capped},Se=Q}else Se=ae();let $e=Se.swimlanes,Le=Se.nextY,qe=x4(n.content.milestones,K);qe.length>0&&(Mn(),K.slackCorridors=qe,Se=ae(),$e=Se.swimlanes,Le=Se.nextY),Ww(K,Se.maxRightX+Qt);let ht=[];if(_e.length>0){let Q=$w(_e,K,Le+8,o);ht=Q.regions,Le=Q.endY}K.chartBottomY=Le,K.swimlaneBottomY=Le,It.box.height=K.chartBottomY-It.box.y;let _t=RC(n.content.milestones,K),Xt=pl($e);for(let Q of ht)Xt=Math.max(Xt,pl(Q.nestedSwimlanes));for(let Q of G)Xt=Math.max(Xt,Q.centerX+Q.radius);for(let Q of _t)Xt=Math.max(Xt,Q.center.x+Q.radius);let Zt=f.daysPerUnit(d.unit),Jt=K.scale.showsNonWorking?K.scale.indexAtX(Xt):(Xt-N)/X,ci=Jt>0?em(g,Jt,d.unit,Zt,f):0;if(ci>R){let Q=f.dateAtWorkingIndex(g,ci),pe=K.scale.showsNonWorking?An(g,Q)*X:ci*X,ot=new Iu({domain:[g,Q],range:[N,N+pe],calendar:f,nonWorking:$});K.scale=ot,It.endDate=Q,It.box.width=pe,It.ticks=Sw(ot,d,f,l),DC(It,ot,d.unit),Ww(K,N+pe+Qt)}let _r=$C(It.nonWorking);Ww(K,LC(_r,A,K.chartRightX,o.estimateTextWidth));for(let Q of $e)Q.box.width=K.chartRightX;for(let Q of ht)Lw(Q,K.chartRightX);let ns=G.map(Q=>({id:Q.id,centerX:Q.centerX,radius:Q.radius,title:Q.title,fontSize:Q.fontSize,bold:Q.bold}));for(let Q of _t)Q.fixed||ns.push({id:Q.id??"",centerX:Q.center.x,radius:Q.radius,title:Q.title,fontSize:10,bold:!0});ns.push(..._r);let Ve=MC(ns,A,K.chartRightX,o.estimateTextWidth);K.markerRowPlacements.clear();for(let[Q,pe]of Ve.placements){let ot=Xe+13+pe.rowIndex*26;K.markerRowPlacements.set(Q,{rowIndex:pe.rowIndex,centerY:ot,labelBox:{...pe.labelBox,y:ot-4},labelSide:pe.labelSide})}for(let Q of _t){let pe=K.markerRowPlacements.get(Q.id??"");pe&&(Q.center={x:Q.center.x,y:pe.centerY},Q.labelBox=pe.labelBox,Q.labelSide=pe.labelSide)}for(let Q of It.nonWorking??[]){if(Q.label===void 0)continue;let pe=K.markerRowPlacements.get(FC(Q));pe&&(Q.labelBox=pe.labelBox,Q.labelSide=pe.labelSide)}for(let Q of G){let pe=K.markerRowPlacements.get(Q.id);pe&&K.entityMidpoints.set(Q.id,{x:Q.centerX,y:pe.centerY})}for(let Q of _t)Q.fixed||K.entityMidpoints.set(Q.id??"",{x:Q.center.x,y:Q.center.y});let Gt=L||_r.length>0?Math.max(1,Ve.rowCount):0;if(Gt>Y){let Q=(Gt-Y)*26;K.timeline.markerRow.height=Gt*26,K.timeline.box.height+=Q,K.chartTopY+=Q,K.chartBottomY+=Q,K.swimlaneBottomY+=Q;for(let pe of $e)Wh(pe,Q);for(let pe of ht)UP(pe,Q);for(let pe of _t)if(pe.cutTopY=K.chartTopY,pe.cutBottomY=K.swimlaneBottomY,pe.slackArrows)for(let ot of pe.slackArrows)ot.y+=Q}b&&(K.timeline.bottomTickPanelY=K.chartBottomY+8,K.timeline.bottomTickPanelHeight=T,K.chartBottomY+=8+T);let Wt=cl(l),kt=K.waves?PC(K.waves,K,Wt,$e,ht):void 0;kt&&(kt.regionCrossings.forEach((Q,pe)=>{Q.length>0&&(ht[pe].waveCrossings=Q)}),kt.placeholder!==void 0&&It.waveStrip&&(It.waveStrip.placeholder=kt.placeholder));let ro=new Set(_t.map(Q=>Q.center.x)),$u=vC(n.content.anchors,K,ro),c$=o.collectItems(E),u$=o.buildDependencies(c$,$e,ht,K),f$=o.buildNowline(r.today,K,l),Lu=kt?CC(kt,K,Wt,K.chartBottomY+Yu):void 0;Lu&&(K.chartBottomY+=Yu+Lu.box.height);let rs=Ow(n.content.footnotes,K,K.chartBottomY);K.footnoteIndex=rs.index,K.footnoteHosts=rs.hosts,M.height=M.height||K.chartBottomY,y||(M.width=K.chartRightX);let d$=y?{x:6,y:cn-z.cardHeight,width:z.cardWidth,height:z.cardHeight}:{x:0,y:0,width:K.chartRightX,height:ju},p$=rs.area.entries.length>0?rs.area.box.y+rs.area.box.height:K.chartBottomY,bm={x:K.chartRightX-Qt-Hm,y:p$+Qt,width:Hm,height:K_},h$=bm.y+bm.height+Qt,m$={box:M,position:x.headerPosition,title:O,author:H,titleLines:z.titleLines,authorLines:z.authorLines,cardBox:d$,logo:void 0,style:x,attributionBox:bm};return{width:K.chartRightX,height:h$,theme:s,palette:a,backgroundColor:a.surface.page,header:m$,timeline:It,nowline:f$,swimlanes:$e,anchors:$u,milestones:_t,edges:u$,footnotes:rs.area,includes:ht,chartBox:{x:A,y:K.chartTopY,width:K.chartRightX-A,height:K.chartBottomY-K.chartTopY},...Oe?{waveSolve:Oe}:{},...kt?{waves:kt.waves}:{},...kt&&kt.boundaries.length>0?{waveBoundaries:kt.boundaries}:{},...kt&&kt.crossings.length>0?{waveCrossings:kt.crossings}:{},...Lu?{waveLegend:Lu}:{}}}};function x4(e,t){let n=[];for(let[r,i]of e){let o=de(i.properties,"date"),s=De(i.properties,"after"),a=Ge(o),c=nm(s,t),l=rm(c);if(a){let f=t.scale.forwardWithinDomain(a);if(f===null)continue;let d=Mw(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 MC(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=r(a.title,a.fontSize)*(a.bold?1.05:1),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,_=P=>P==="right"?f:d,x=(P,O)=>{let H=Math.min(p,P),z=Math.max(h,P+c);return s[O].some(M=>M.left<z&&M.right>H)},y=-1,T="right",w=l;e:for(let P=s.length-1;P>=0;P--)for(let O of["right","left"]){if(!_(O))continue;let H=g(O);if(!x(H,P)){y=P,T=O,w=H;break e}}if(y===-1){for(let[P,O]of o)o.set(P,{...O,rowIndex:O.rowIndex+1});s=[[],...s],y=0,T=f?"right":"left",w=g(T)}let b=Math.min(p,w),$=Math.max(h,w+c);s[y].push({left:b,right:$}),o.set(a.id,{rowIndex:y,labelBox:{x:w,y:0,width:c,height:12},labelSide:T})}return{placements:o,rowCount:s.length}}function v4(e){return e.directive?.properties.find(n=>T4(n.key)==="locale")?.value}function T4(e){return e.endsWith(":")?e.slice(0,-1):e}function w4(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 _4(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 E4(e,t){if(e)return/^\d+(?:\.\d+)?[dwmqy]$/.test(e)||/^\d+%$/.test(e)?e:t.sizes.get(e)?.effortLiteral??e}function b4(e,t){if(e)return t.teams.get(e)?.title??t.persons.get(e)?.title??e}function k4(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 um(e,t,n,r,i){let o=KP(e,t),s=e.name??e.title??"",a=o.padding==="none"?"xs":o.padding,c=H_[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:po}}}function UC(e,t){let n=I_(e,t.sizes,t.cal),r=R_(de(e,"remaining"),t.sizes,t.cal),i=de(e,"status"),o=w4(i),s=_4(i);s===0&&o==="done"&&(s=1);let a=/^(\d{1,3})%$/.exec(de(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 XC(e,t,n,r,i,o,s){let a=de(e,"duration"),c=!!a&&/^\d+(?:\.\d+)?[dwmqy]$/.test(a),l=r?r.title??r.name:"",u=c?a:l||void 0,f=de(e,"remaining"),d=E4(f,t),p=b4(n??de(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 _=de(e,"capacity"),x=ui(_),y=null,T=0;if(x!==null){let w=yl(x),b=xl(s,t.symbols);y={value:x,text:w,icon:b};let $=11;T=(g?ct(" ",$):0)+io(w,b,$)}return{metaText:g,ownerDisplay:p,capacity:y,capacityTrailingWidth:T}}function GC(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 jC(e,t,n){return Fl({barWidth:e,footnoteLabels:t.map(String),hasBeforeGlyph:Ln(n)!==void 0})}function zw(e,t,n,r){let i=e.properties,o=pt("item",i,n.styleCtx),s=de(i,"size"),a=s?n.sizes.get(s)??null:null,c=fi(i,n.sizes,n.cal),l=De(i,"after"),u=De(i,"before"),f=YC(i,t.x,t.x,n),d;n.waves&&(f=Ko(e,f,n),d=sC(e,f,n));let p=d===void 0?I4(i,f,n):void 0,h=n.scale.startX(f),g=Math.max(Rn,Zo(n,h,c)),_=h,x=h+g,y=de(i,"link"),T=k4(y),w=T.icon!=="none",b=Math.max(Rn,g-2*un),$=De(i,"labels"),P=[];for(let Ve of $){let Gt=n.labels.get(Ve);if(!Gt)continue;let Wt=um(Gt,n.styleCtx,0,0);P.push({id:Gt,width:Wt.box.width})}let O=0;for(let Ve=0;Ve<P.length;Ve+=1)Ve>0&&(O+=Nr),O+=P[Ve].width;let H=Math.max(0,b-2*ir),z=P.length>0&&O>H,M=!1,A,U;if(u.length>0){let Ve,Gt;for(let Wt of u){let kt=Ge(Wt),ro=kt?n.scale.forwardWithinDomain(kt)??void 0:n.entityLeftEdges.get(Wt);ro!==void 0&&(Ve===void 0||ro<Ve)&&(Ve=ro,Gt=Wt)}Ve!==void 0&&x>Ve&&(M=!0,A={x:Ve,y:t.y,width:x-Ve,height:n.bandScale.bandwidth()},U=Gt)}let{status:X,progress:R}=UC(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},V=n.styleCtx.theme.name,ie=V==="dark",oe=ie?"#0f172a":"#ffffff",ye=V==="grayscale"?"#9e9e9e":"#94a3b8";o.bg===oe&&(o.bg=V==="grayscale"?j[X]:ie?N[X]:C[X]),o.fg===ye&&(o.fg=q[X]);let{metaText:ne,ownerDisplay:se,capacity:k,capacityTrailingWidth:L}=XC(i,n,r,a,X,R,o.capacityIcon),F=e.title??e.name??"",G=GC(e.name,n),Z=new zh({id:e.name??"",title:F,logicalLeftX:_,logicalRightX:x,metaText:ne,metaTrailingWidth:L,hasLinkIcon:w,hasAfterGlyph:Ln(l)!==void 0,titleFirstLineRightReservePx:jC(b,G,u)}).place({x:_,y:t.y},{time:n.scale,bands:n.bandScale,style:o}),Y=Z.box,re=n.bandScale.bandwidth(),le=Y.width<fs,xe=w&&Y.width<rf,Te=Y.width<of,me=Z.textSpills||xe,ze=kw(F,Z,xe),Ze=ze.length,Xe=null;z&&(Xe=pg(P,Y.width));let cn=Xe?Xe.rows.length:P.length>0?1:0,tr=ne!==void 0||k!==null,It=Dl(Ze,tr),no=nf(Ze,tr),K=zC(z,me,cn,re,It),wr=Math.max(no,K);wr>0&&(Y.height=re+wr);let ai=[],li=Y.y+re-nr-po-mi,ts=Y.y+(z&&me?Math.max(cs,It):It)+mi,E=z&&me||!z&&P.length>0?Math.max(li,ts):li,B=z?Y.x+Y.width+Ir:Y.x+ir,J=B;if(Xe)for(let Ve=0;Ve<Xe.rows.length;Ve+=1){let Gt=E+Ve*dg,Wt=B;for(let ro of Xe.rows[Ve]){let $u=um(ro.id,n.styleCtx,Wt,Gt);ai.push($u),Wt+=$u.box.width+Nr}let kt=Wt-Nr;kt>J&&(J=kt)}else{let Ve=B;for(let Gt of P){let Wt=um(Gt.id,n.styleCtx,Ve,E);ai.push(Wt),Ve+=Wt.box.width+Nr}J=P.length>0?Ve-Nr:B}let ae=se??r??de(i,"owner"),_e=e.description?.text,Se=G.length>0&&Te,Ee=Y.x+Y.width+Ir,$e=!1,Le=null;xe&&($e&&(Ee+=Sn),Le=Ee,Ee=Le+Sr,$e=!0);let qe=0;if(me){$e&&(Ee+=Sn);let Ve=Math.max(...ze.map(Wt=>ct(Wt,$l))),Gt=(ne?ct(ne,11):0)+L;qe=Math.max(Ve,Gt),Ee+=qe,$e=!0}let ht=null;Se&&($e&&(Ee+=Sn),ht=Ee,Ee+=G.length*In,$e=!0);let _t=null;le&&($e&&(Ee+=Sn),_t=Ee+or,Ee=_t+or,$e=!0);let Xt=Math.max(Y.x+Y.width,Ee),Zt=e.name;Zt&&(n.entityLeftEdges.set(Zt,_),n.entityRightEdges.set(Zt,x)),iC(e,Y.x+Y.width+un,n);let Jt=Zt??HC(e);n.itemFlowKey.set(Jt,n.currentFlowKey),t.x=x,t.maxX=Math.max(t.maxX,t.x),t.height=Math.max(t.height,n.bandScale.step()+wr);let ci=DP({box:Y,afterDate:Ln(l),beforeDate:Ln(u),hasLinkIcon:w,footnoteCount:G.length}),_r={kind:"item",id:Zt,title:F,...ze.length>=2||ze[0]!==F?{titleLines:ze}:{},box:Y,status:X,progressFraction:R,footnoteIndicators:G,labelChips:ai,chipsOutside:z,chipsRightX:J,linkIcon:T.icon,linkHref:T.href,hasOverflow:M,overflowBox:A,overflowAnchorId:U,owner:ae,description:_e,metaText:ne,textSpills:me,dotSpills:le,iconSpills:xe,footnoteSpills:Se,dotSpillCx:_t,iconSpillX:Le,footnoteSpillStartX:ht,decorationsRightX:Xt,capacity:k,size:a,style:o,inlineDatePins:ci.length>0?ci:void 0},ns=oC(e,n);return ns!==void 0&&(_r.waveRole=ns),d!==void 0&&(_r.wavePinOverride=d),p!==void 0&&(_r.nonWorkingPin=p),n.placedItems.set(Jt,_r),_r}function A4(e,t,n){return new qh(e,{sequenceOne:qw,newCursor:Fh}).place(t,n)}function R4(e,t,n){return new jh(e,{sequenceItem:zw,sequenceOne:qw,resolveChildStart:VC,newCursor:Fh,estimateTextWidth:ct,predictItemBarExtraHeight:qC}).place(t,n)}function qw(e,t,n){if(Mt(e))return zw(e,t,n);if(Tt(e))return A4(e,t,n);if(He(e))return R4(e,t,n);throw new Error(`Unknown swimlane child type: ${e.$type??"unknown"}`)}function HC(e){let t=e.$cstNode?.range.start;return`#item@${t?t.line+1:0}:${t?t.character+1:0}`}function zC(e,t,n,r,i){if(n===0)return 0;let o=r-nr-po-mi,s;e&&t?s=Math.max(cs,i)+mi:e?s=o:s=Math.max(o,i+mi);let c=s+(n-1)*dg+po+mi+nr;return Math.max(0,c-r)}function qC(e,t,n){let r=e.properties,i=n.bandScale.bandwidth(),o=fi(r,n.sizes,n.cal),s=Math.max(Rn,Zo(n,t,o)),a=Math.max(Rn,s-2*un),c=de(r,"size"),l=c?n.sizes.get(c)??null:null,{status:u,progress:f}=UC(r,n),{metaText:d,capacity:p,capacityTrailingWidth:h}=XC(r,n,void 0,l,u,f,pt("item",r,n.styleCtx).capacityIcon),g=d!==void 0||p!==null,_=!!de(r,"link"),x=e.title??e.name??"",y=Ln(De(r,"after"))!==void 0,T=hi(_,y?{barWidth:a}:void 0),w=Math.max(0,a-T-ir),b=Math.max(0,a-T-jC(a,GC(e.name,n),De(r,"before"))),$=bw(x,w,Ew(d,h),b),P=_&&a<rf,O=$.textSpills||P,H=kw(x,$,P).length,z=nf(H,g),M=De(r,"labels"),A=[];for(let q of M){let V=n.labels.get(q);if(!V)continue;let ie=um(V,n.styleCtx,0,0);A.push({id:V,width:ie.box.width})}if(A.length===0)return z;let U=0;for(let q=0;q<A.length;q+=1)q>0&&(U+=Nr),U+=A[q].width;let X=Math.max(0,a-2*ir),R=U>X,C=R?pg(A,a):null,N=C?C.rows.length:1,j=zC(R,O,N,i,Dl(H,g));return Math.max(z,j)}function VC(e,t,n,r){return Ko(e,YC(e.properties,t,n,r),r)}function YC(e,t,n,r){let i=Ge(de(e,"date"))??Ge(de(e,"start"));if(i){let s=r.scale.forwardWithinDomain(i);if(s!==null)return s}let o=De(e,"after");if(o.length>0){let s=n;for(let a of o){let c=Ge(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 I4(e,t,n){if(!n.calendar.hasNonWorkingDays)return;let r=S4(e);if(!r||n.calendar.isWorkingDay(r.date))return;let i=n.scale.forwardWithinDomain(r.date);if(!(i===null||Math.abs(t-i)>=Kt))return{key:r.key,pin:r.raw,start:Er(Au(t,n))}}function S4(e){for(let t of["date","start"]){let n=de(e,t),r=Ge(n);if(n!==void 0&&r)return{key:t,raw:n,date:r}}for(let t of De(e,"after")){let n=Ge(t);if(n)return{key:"after",raw:t,date:n}}}var Uw=6;function N4(e,t){let n=Wm-32,r=Ol(e,n,16),i=Ol(t??"",n,11),o=0;for(let d of r)o=Math.max(o,ct(d,16));for(let d of i)o=Math.max(o,ct(d,11));let s=o+32,a=Math.max(V_-Uw,Math.min(Wm-Uw,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+Uw;return{titleLines:r,authorLines:i,cardWidth:a,cardHeight:u,boxWidth:f}}function P4(e,t,n,r,i,o){let a=e.roadmapDecl?.properties??[],c=de(a,"start"),l=Ge(c)??C4(r),u=de(a,"length"),f=0;if(u){let x=O4(u,t.cal);x>0&&(f=x)}let d=t.calendar??Tl(t.cal),p=KC(n,{cal:t.cal,sizes:t.sizes,calendar:d},l,f>0?void 0:r,o),h=O_(i.unit,t.cal),g=em(l,p>0?p:4*t.cal.daysPerWeek,i.unit,h,d),_=Math.max(f,g);return{startDate:l,endDate:d.dateAtWorkingIndex(l,Math.max(1,_))}}function C4(e){let t=e??new Date;return new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()))}function O4(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 KC(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=Ge(de(h.properties,"date"));if(g&&h.name){let _=o(g);a.set(h.name,_),l=Math.max(l,_)}}let u=()=>({itemEnd:s,anchorEnd:a,milestoneEnd:c,sizes:t.sizes}),f=(h,g,_)=>{let x=w=>{let b=Ge(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 $=b;for(let P of w)P.$type!=="DescriptionDirective"&&($=T(P,$),_($));return $},T=(w,b)=>{if(Mt(w)){let $=fi(w.properties,h.sizes,t.cal),P=Ge(de(w.properties,"date")),O=Ge(de(w.properties,"start")),H=De(w.properties,"after"),z=b;P?z=o(P):O?z=o(O):H.length>0&&(z=Math.max(b,...H.map(x))),g&&(z=g.apply(w,z));let M=z+$;return w.name&&h.itemEnd.set(w.name,M),g?.accumulate(w,M),M}if(Tt(w)){let $=De(w.properties,"after"),P=$.length>0?Math.max(b,...$.map(x)):b;g&&(P=g.apply(w,P));let O=P;for(let H of w.content){if(H.$type==="DescriptionDirective")continue;let z=T(H,P);O=Math.max(O,z)}return O}if(He(w)){let $=De(w.properties,"after"),P=$.length>0?Math.max(b,...$.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,_=y=>{g=Math.max(g,y)},x=Xh(h.length,0,QP(i,n,t.calendar),(y,T)=>{let w=h.map((P,O)=>[P,T[O]]);s=new Map(w),g=0;let b=new Yo(i,y),{walkLane:$}=f(u(),b,_);for(let P of e.content.swimlanes.values())$(P.content,0);for(let P of e.content.isolatedRegions){let O=f({itemEnd:new Map(w),anchorEnd:new Map,milestoneEnd:new Map,sizes:os(P.content.sizes,t.cal)},b,_);for(let H of P.content.swimlanes.values())O.walkLane(H.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=Ge(de(h.properties,"date"));if(g){let x=o(g);h.name&&c.set(h.name,x),l=Math.max(l,x);continue}let _=De(h.properties,"after");if(_.length>0){let x=Math.max(0,..._.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=KC({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 $4(e,t,n,r){let i=new Dh(CP(t,n)),o=[],s=[],a=r.bandScale.bandwidth();for(let[u,f]of e){let d=De(f.properties,"after"),p=r.placedItems.get(u);if(!p)continue;let h=FP(p,a);for(let g of d){let _=r.placedItems.get(g),x,y=_===void 0;if(_)x=BP(_,a);else{let T=r.entityMidpoints.get(g);if(!T)continue;x={x:T.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=OP(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:pt("item",[],r.styleCtx)})}return l}function L4(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=cl(n).nowLabel,a=ct(s,Al),c=Math.max(Mm,Math.ceil(a+2*ls)),l=t.timeline.originX-Qt,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:pt("item",[],t.styleCtx)}}function D4(e){let t=new Map,n=r=>{if(Mt(r)){t.set(r.name??HC(r),r);return}if(Tt(r)){for(let i of r.content)i.$type!=="DescriptionDirective"&&n(i);return}if(He(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 Vw(e,t,n={}){let r=gw(t);return new cm().place(e,t,n,r,{sequenceItem:zw,sequenceOne:qw,resolveChildStart:VC,newCursor:Fh,estimateTextWidth:ct,predictItemBarExtraHeight:qC,computeDateWindow:P4,sizeBesideHeader:N4,collectItems:D4,buildDependencies:$4,buildNowline:L4})}function dm(e){return e.toISOString().slice(0,10)}function Yw(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 Kw(e,t){for(let n of e)n.kind==="item"?t(n):Kw(n.children,t)}function M4(e,t,n){let r=Yw(e);e.textSpills&&n.push(Dn(t,"NL.I1000","info",{name:r},r)),e.chipsOutside&&n.push(Dn(t,"NL.I1001","info",{name:r},r)),(e.box.width<fs||e.dotSpills||e.iconSpills||e.footnoteSpills)&&n.push(Dn(t,"NL.I1002","info",{name:r},r)),e.hasOverflow&&n.push(Dn(t,"NL.I1003","info",{name:r,anchor:e.overflowAnchorId},r)),ZC(e,t,n),JC(e,t,n)}function ZC(e,t,n){let r=e.wavePinOverride;if(!r)return;let i=Yw(e);n.push(Dn(t,"NL.W1001","warning",{name:i,pin:r.pin,key:r.key,wave:r.wave,start:r.start},i))}function JC(e,t,n){let r=e.nonWorkingPin;if(!r)return;let i=Yw(e);n.push(Dn(t,"NL.I1008","info",{name:i,pin:r.pin,key:r.key,start:r.start},i))}function Dn(e,t,n,r,i){return{message:Zr(e,t,r),severity:n,code:t,entityId:i,lspSeverity:n==="warning"?2:3,data:{code:t,args:r}}}function QC(e,t,n){let r=e.id??e.title,i=[];Kw(e.children,a=>i.push(a));for(let a of i)M4(a,t,n);let o=new Set(i.map(a=>a.box.y));o.size>1&&n.push(Dn(t,"NL.I1004","info",{lane:r,rows:o.size},r)),(e.utilization?.segments.some(a=>a.classification==="red")??!1)&&n.push(Dn(t,"NL.I1005","info",{lane:r},r));for(let a of e.nested)QC(a,t,n)}function eO(e,t,n){Kw(e.children,r=>{ZC(r,t,n),JC(r,t,n)});for(let r of e.nested)eO(r,t,n)}function F4(e,t,n){e.waveSolve?.capped&&n.push(Dn(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(Dn(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(Dn(t,"NL.I1007","info",{name:a,date:o.overrunDate,wave:s.id,end:dm(s.endDate)},a))}}function Zw(e,t={}){let n=t.locale??"en-US",r=[];for(let i of e.swimlanes)QC(i,n,r);for(let i of e.includes)for(let o of i.nestedSwimlanes)eO(o,n,r);if(F4(e,n,r),t.today){let i=t.today,o=e.timeline.startDate,s=e.timeline.endDate;(i<o||i>s)&&r.push(Dn(n,"NL.W1000","warning",{date:dm(i),start:dm(o),end:dm(s)}))}return r}var Qo=class extends Error{constructor(t){super(t),this.name="TimezoneError"}};function Jw(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 Qo(`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 Qo(`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 pm(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 B4=/^(\d{4})-(\d{2})-(\d{2})$/,W4=/^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?)(Z|([+-])(\d{2})(?::?(\d{2}))?)$/,U4=/^(\d{4})-(\d{2})-(\d{2})T\d{2}:\d{2}:\d{2}(?:\.\d+)?$/;function Qw(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=B4.exec(r);if(i)return new Date(Date.UTC(parseInt(i[1],10),parseInt(i[2],10)-1,parseInt(i[3],10)));let o=W4.exec(r);if(o){let a=new Date(r);if(!Number.isNaN(a.getTime())){if(o[2]==="Z")return pm(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 pm(a,{kind:"offset",ms:d})}}let s=U4.exec(r);return s?new Date(Date.UTC(parseInt(s[1],10),parseInt(s[2],10)-1,parseInt(s[3],10))):void 0}return pm(n(),t)}}function X4(e){return e===2?"warning":e===3?"info":"error"}function tO(e,t){return{severity:X4(e.severity),code:gg(e),message:e.message,suggestion:lf(e.message),file:t,line:(e.range?.start.line??0)+1,column:(e.range?.start.character??0)+1}}function nO(e,t){return{severity:"error",code:"parse-error",message:e.message,file:t,line:e.token?.startLine??1,column:e.token?.startColumn??1}}function rO(e,t){return{severity:"error",code:"lex-error",message:e.message,file:t,line:e.line??1,column:e.column??1}}function iO(e,t){let n=e.line!==void 0?e.line+1:1;if(!ll(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=lf(r);return{severity:e.severity,code:e.code??cf(e.message),message:r,...i===void 0?{}:{suggestion:i},file:e.sourcePath,line:n,column:1}}function oO(e,t,n="warning"){return{severity:n,code:"render.warning",message:e,file:t,line:1,column:1}}function sO(e,t){return{severity:e.severity,code:e.code,message:e.message,file:t,line:1,column:1}}var aO="__nowline_browser_noop_include__";async function lO(e){throw new Error(`${aO}: include "${e}" was skipped \u2014 running in single-file mode.`)}function e_(e){return e.includes(aO)}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"}},G4={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"}},cO={...to,...G4};var bae={none:"",multiplier:"x",person:to.person.ascii,people:to.people.ascii,points:to.points.ascii,time:to.time.ascii};var hm=class{constructor(t="nl"){S(this,"prefix");S(this,"counter",0);this.prefix=t}next(t){let n=`${this.prefix}-${this.counter++}`;return t?`${n}-${t}`:n}};var j4=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"]),H4=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 z4(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=q4(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}=V4(a);t.push({kind:s?"self":"open",name:c,attrs:l}),n=i+1}return t}function q4(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 V4(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 Su(e){return e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Y4(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 uO(e,t={}){let n=t.idPrefix??"nl-logo",r=t.onWarn??(()=>{}),i=z4(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(Su(l.text??""));continue}if(l.kind==="text"){if(c.length===0||c[c.length-1]){let u=(l.text??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");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(!j4.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(!H4.has(p)){r(`sanitizer: dropping attribute ${p}`);continue}if(p==="href"||p==="xlink:href"){let g=Y4(h,o);if(g===null){r(`sanitizer: dropping external href ${h}`);continue}f.push(` ${p}="${Su(g)}"`);continue}if(p==="style"){r("sanitizer: dropping inline style");continue}if(p==="id"){let g=o.get(h);g&&f.push(` id="${Su(g)}"`);continue}if(/\burl\(#/i.test(h)){let g=h.replace(/url\(#([^)]+)\)/gi,(_,x)=>{let y=o.get(x);return y?`url(#${y})`:"none"});f.push(` ${p}="${Su(g)}"`);continue}if(/data:|javascript:|vbscript:/i.test(h)){r(`sanitizer: dropping suspicious value at ${p}`);continue}f.push(` ${p}="${Su(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 fO=/&/g,dO=/</g,pO=/>/g,K4=/"/g,Z4=/'/g;function Bt(e){return e.replace(fO,"&amp;").replace(dO,"&lt;").replace(pO,"&gt;")}function ii(e){return e.replace(fO,"&amp;").replace(dO,"&lt;").replace(pO,"&gt;").replace(K4,"&quot;").replace(Z4,"&#39;")}function ml(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}="${ii(String(i))}"`))}return n.length?` ${n.join(" ")}`:""}function te(e,t,n){return n===void 0||n===""?`<${e}${ml(t)}/>`:`<${e}${ml(t)}>${n}</${e}>`}function Ie(e,t){return`<text${ml(e)}>${Bt(t)}</text>`}function m(e){return Number.isFinite(e)?Number.isInteger(e)?e.toString():(Math.round(e*100)/100).toString():"0"}var J4={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 Q4(e,t){let n=`${e}-shadow-${t}`,r=J4[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 hO(e,t){return t==="none"?null:`url(#${e}-shadow-${t})`}function mO(e){return["subtle","soft","hard"].map(t=>Q4(e,t)).join("")}var ej={thin:100,light:300,normal:400,bold:700};function tj(e){return as[e]??14}function r_(e,t,n){return{"font-family":t[e.font],"font-size":n??tj(e.textSize),"font-weight":ej[e.weight]??400,"font-style":e.italic?"italic":"normal",fill:e.text}}function nj(e){if(e.border==="dashed")return"4 3";if(e.border==="dotted")return"1 3"}function wO(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 rj(e,t){return wO(e)>=.24?t.statusDot.onLight:t.statusDot.onDark}function ym(e,t){return e.length*t*.58}function _O(e,t,n,r,i,o,s){let a=i*.58,c=t?ym(t,i):0,l=t?a:0,u=n+c+l,{text:f,icon:d}=e,p=ym(f,i),h={"font-family":o,"font-size":i,fill:s};if(!d)return Ie({x:m(u),y:m(r),...h},f);if(d.kind==="builtin"&&d.name==="multiplier")return Ie({x:m(u),y:m(r),...h},`${f}\xD7`);if(d.kind==="builtin"){let _=to[d.name],x=Ie({x:m(u),y:m(r),...h},f),y=i*.1,T=i,w=u+p+y,b=r-i*.85,$=`<svg x="${m(w)}" y="${m(b)}" width="${m(T)}" height="${m(T)}" viewBox="${_.viewBox}" style="color:${ii(s)}" aria-hidden="true">${_.body}</svg>`;return x+$}let g=m(i*.1);return`<text x="${m(u)}" y="${m(r)}" font-family="${ii(o)}" font-size="${i}" fill="${ii(s)}">${Bt(f)}<tspan dx="${g}">${Bt(d.text)}</tspan></text>`}var gO=.6,ij=.5;function oj(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 Ie({x:m(r),y:m(i),...c},t);if(!t)return _O(n,void 0,r,i,o,s,a);let l=m(o*gO),u=`<text x="${m(r)}" y="${m(i)}" font-family="${ii(s)}" font-size="${o}" fill="${ii(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 $=m(o*.1);return u+Bt(t)+`<tspan dx="${l}">${Bt(f)}</tspan><tspan dx="${$}">${Bt(d.text)}</tspan></text>`}let p=to[d.name],h=$=>$.length*o*ij,g=r+h(t)+o*gO,_=o*.1,x=o,y=g+h(f)+_,T=i-o*.85,w=u+Bt(t)+`<tspan dx="${l}">${Bt(f)}</tspan></text>`,b=`<svg x="${m(y)}" y="${m(T)}" width="${m(x)}" height="${m(x)}" viewBox="${p.viewBox}" style="color:${ii(a)}" aria-hidden="true">${p.body}</svg>`;return w+b}function sj(e,t){let n=cO.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:${ii(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 i_(e,t){return!e||e.length===0?"":e.map(n=>sj(n,t)).join("")}function aj(e){return(e?.length??0)>0}function EO(e){return e?.some(t=>t.side==="after")??!1}function lj(e,t,n,r,i,o={}){let s=Math.min(wl[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":nj(i)??null,...o})}function cj(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(Ie({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(Ie({x:m(i+16),y:m(p+18+y*14),"font-family":r[e.style.font],"font-size":11,fill:h},x))});let _=g.join("");return te("g",{"data-layer":"header","data-id":`${t}-header`},u+d+_)}function uj(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 bO(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?s_(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 fj(e,t,n){let r=e.box.y+e.box.height,i=[];for(let o of e.nonWorking??[]){if(o.label===void 0||!o.labelBox)continue;let s=o.labelBox,a=s.y+4;o.cut&&i.push(te("line",{x1:m(o.x),y1:m(a),x2:m(o.x),y2:m(r),stroke:t.timeline.nonWorkingSeam,"stroke-width":1,"stroke-dasharray":"1 3"}));let c=o.labelSide==="left",l={x:m(c?s.x+s.width:s.x),y:m(a+4),"font-family":n.sans,"font-size":10,fill:t.timeline.labelText};c&&(l["text-anchor"]="end"),i.push(Ie(l,o.label))}return i.length===0?"":te("g",{"data-layer":"non-working-label"},i.join(""))}function dj(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 _ of e.ticks)_.major&&(!_.label||_.labelX===void 0||(l&&s.push(Ie({x:m(_.labelX),y:m(a+El(c)),"font-family":n.sans,"font-size":oo,fill:o,"text-anchor":"middle"},_.label)),g&&s.push(Ie({x:m(_.labelX),y:m(p+El(h)),"font-family":n.sans,"font-size":oo,fill:o,"text-anchor":"middle"},_.label))));return te("g",{"data-layer":"timeline"},s.join(""))}function pj(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":Gu}),s=hj(e,r),a=mj(e,i,n);return te("g",{"data-layer":"nowline"},o+s+a)}function kO(e){let t=Gu/2;return e.pillMode==="flag-right"?e.x-t:e.pillMode==="flag-left"?e.x+t:e.x}function hj(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=kO(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 mj(e,t,n){let r=e.pillTopY+Bm,i=kO(e),o,s;return e.pillMode==="center"?(o=e.x,s="middle"):e.pillMode==="flag-right"?(o=i+ls,s="start"):(o=i-ls,s="end"),Ie({x:m(o),y:m(r),"font-family":n.sans,"font-size":Al,"font-weight":700,fill:t,"text-anchor":s},e.label)}function gj(e,t,n,r,i){let o=[];e.waveTooltip!==void 0&&o.push(`<title>${Bt(e.waveTooltip)}</title>`);let s=hO(n,e.style.shadow);o.push(lj(e.box.x,e.box.y,e.box.width,e.box.height,e.style,{filter:s??null})),e.waveRole==="background"&&o.push(Fj(e.box,e.style,n));let a=rj(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-nr),width:m(x),height:nr,fill:e.style.fg,opacity:.55}))}let u=e.dotSpills&&e.dotSpillCx!==null?e.dotSpillCx:e.box.x+e.box.width-co;o.push(te("circle",{cx:m(u),cy:m(e.box.y+sg),r:or,fill:l})),o.push(i_(e.inlineDatePins,e.style.fg));let f;if(e.textSpills)f=e.box.x+e.box.width+Ir,e.iconSpills&&(f+=Sr+Sn);else{let x=!!e.linkIcon&&e.linkIcon!=="none",T=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+T}let d=e.style.text,p=r.entities.item.text,h=e.textSpills?p:d,g=e.textSpills?p:e.style.fg,_=e.titleLines??(e.title?[e.title]:[]);if(_.forEach((x,y)=>{x!==""&&o.push(Ie({x:m(f),y:m(e.box.y+ef+y*Ll),"font-family":i[e.style.font],"font-size":$l,"font-weight":600,fill:h},x))}),(e.metaText||e.capacity)&&o.push(oj({metaText:e.metaText,capacity:e.capacity,x:f,baselineY:e.box.y+tf(_.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 T=0;T<e.footnoteIndicators.length;T++){let w=e.footnoteIndicators[T];o.push(Ie({x:m(y),y:m(x),"font-family":i.sans,"font-size":Ml,"font-weight":700,fill:p},String(w))),y+=In}}else{let y=e.box.x+e.box.width-us;for(let T=e.footnoteIndicators.length-1;T>=0;T--){let w=e.footnoteIndicators[T];o.push(Ie({x:m(y),y:m(x),"font-family":i.sans,"font-size":Ml,"font-weight":700,fill:e.style.text,"text-anchor":"end"},String(w))),y-=In}}}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,T=Sr,w=e.iconSpills&&e.iconSpillX!==null?e.iconSpillX:e.box.x+uo,b=e.box.y+uo,$=te("rect",{x:m(w),y:m(b),width:T,height:T,rx:2,ry:2,fill:y}),P=w,O=b,H=te("path",{d:`M${m(P+4)} ${m(O+10)} L${m(P+10)} ${m(O+4)} M${m(P+6)} ${m(O+4)} H${m(P+10)} V${m(O+8)}`,stroke:"#ffffff",fill:"none","stroke-width":1.1,"stroke-linecap":"round","stroke-linejoin":"round"}),z=$+H,M=e.linkHref?te("a",{href:e.linkHref,target:"_blank",rel:"noopener"},z):z;o.push(M)}if(e.hasOverflow&&e.overflowBox){let x=r.item.overflowTailFill,y=r.item.overflowTailStroke,T=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(Ie({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:T,"text-anchor":"middle"},`past ${e.overflowAnchorId}`))}for(let x of e.labelChips){let y=Math.min(wl[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(Ie({x:m(x.box.x+x.box.width/2),y:m(x.box.y+x.box.height/2+3),...r_(x.style,i,as.xs),"text-anchor":"middle"},x.text))}return te("g",{"data-layer":"item","data-id":e.id??null},o.join(""))}function yj(e,t,n,r,i){let o=[],s=ao(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=lo(e.title),c=e.box.x,l=e.box.y,u=so,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(Ie({x:m(c+kl),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=Wl(s,!!e.title,aj(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(Ie({x:m(ho(e.box.x,ps,EO(e.inlineDatePins))),y:m(e.box.y-sf),...r_(e.style,i,Bl),"fill-opacity":.7},e.title))}o.push(i_(e.inlineDatePins,e.style.fg));for(let a of e.children)o.push(o_(a,t,n,r,i));return te("g",{"data-layer":"group","data-id":e.id??null},o.join(""))}function xj(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(Ie({x:m(ho(e.box.x,hs,EO(e.inlineDatePins))),y:m(e.box.y-sf),...r_(e.style,i,Bl),"fill-opacity":.7},e.title)),o.push(i_(e.inlineDatePins,e.style.fg));for(let s of e.children)o.push(o_(s,t,n,r,i));return te("g",{"data-layer":"parallel","data-id":e.id??null},o.join(""))}function o_(e,t,n,r,i){return e.kind==="item"?gj(e,t,n,r,i):e.kind==="group"?yj(e,t,n,r,i):xj(e,t,n,r,i)}var yO=2;function vj(e,t){switch(e){case"green":return t.swimlane.utilizationOk;case"yellow":return t.swimlane.utilizationWarn;case"red":return t.swimlane.utilizationOver}}function Tj(e,t){if(!e.utilization||e.utilization.segments.length===0)return"";let n=e.box.y+e.box.height-yO,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:yO,fill:vj(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 wj(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 AO(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?io(e.capacity.text,e.capacity.icon,10):0,p=e.footnoteIndicators.length>0?e.footnoteIndicators.join(","):"",h=p?ym(p,10):0,g=Ul(e.box.x,e.title,e.owner,d,h),_=Wu,x=e.box.y+10,y=x+Uu;u.push(te("rect",{x:m(g.tabX),y:m(x),width:m(g.tabW),height:m(_),rx:4,ry:4,fill:o,stroke:s,"stroke-width":1})),u.push(Ie({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(Ie({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(_O(e.capacity,void 0,g.badgeX,y,10,i[e.style.font],c)),p&&u.push(Ie({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(o_(f,t,n,r,i));return u.push(Tj(e,r)),te("g",{"data-layer":"swimlane","data-id":e.id??null},u.join(""))}function _j(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?Ie(f,e.title):"";return te("g",{"data-layer":"anchor","data-id":e.id??null},RO(e.hiddenDate)+c+d)}function Ej(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 bj(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?Ie(u,e.title):"";return te("g",{"data-layer":"milestone","data-id":e.id??null},RO(e.hiddenDate)+a+f)}function RO(e){return e===void 0?"":`<title>${Bt(e)}</title>`}function kj(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":Xu,"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 xO(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:Aj(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 Aj(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 Rj(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(Ie({x:m(e.box.x+Bn),y:m(e.box.y+Um),"font-family":r.sans,"font-size":12,"font-weight":700,fill:s},"Footnotes"));let f=e.box.y+Rl+Bn,d=e.box.x+Bn,p=d+Bn;return e.entries.forEach((h,g)=>{let _=f+g*Il;u.push(Ie({x:m(d),y:m(_),"font-family":r.sans,"font-size":10,"font-weight":700,fill:l},String(h.number))),u.push(Ie({x:m(p),y:m(_),"font-family":r.sans,"font-size":11,"font-weight":600,fill:a},h.title)),h.description&&u.push(Ie({x:m(p+Math.max(120,h.title.length*6)),y:m(_),"font-family":r.sans,"font-size":11,fill:c},`\u2014 ${h.description}`))}),te("g",{"data-layer":"footnotes"},u.join(""))}function Ij(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,_=e.box.width-16,x=e.box.height,y=te("rect",{x:m(h),y:m(g),width:m(_),height:m(x),rx:8,ry:8,fill:a,stroke:s,"stroke-width":1,"stroke-dasharray":Xu}),T=Wu,w=Xl(e.box.x,e.label,e.sourcePath),b=g-T/2,$=te("rect",{x:m(w.tabX),y:m(b),width:m(w.tabWidth),height:T,rx:4,ry:4,fill:c,stroke:l,"stroke-width":1}),P=Ie({x:m(w.tabLabelX),y:m(b+Uu),"font-family":i.sans,"font-size":11,"font-weight":600,fill:u},e.label),O=w.badgeX,H=w.badgeSize,z=g-H/2,M=te("rect",{x:m(O),y:m(z),width:H,height:H,rx:4,ry:4,fill:f,stroke:d,"stroke-width":1}),A=te("path",{d:`M${m(O+7)} ${m(z+4)} H${m(O+14)} V${m(z+11)} M${m(O+4)} ${m(z+7)} H${m(O+11)} V${m(z+14)} H${m(O+4)} Z`,stroke:p,"stroke-width":1.4,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}),U=9,X=g+4,R=te("rect",{x:m(w.sourceHaloX),y:m(X-U),width:m(w.sourceHaloWidth),height:U+6,fill:a}),C=Ie({x:m(w.sourceTextX),y:m(X),"font-family":i.mono,"font-size":U,fill:p},e.sourcePath),N={x:h,y:g,width:_,height:x},j=o?bO(o.timeline,o.chartBox.y,r,N):"",q=o?.waves?PO(o.waves,N)+CO(o.waveBoundaries,N):"",V=o?.waves?OO(e.waveCrossings):"",ie=e.nestedSwimlanes.map(oe=>AO(oe,t,n,r,i)).join("");return te("g",{"data-layer":"include"},y+j+q+ie+V+$+P+M+A+R+C)}function Sj(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=Ie({x:"0",y:s,"font-family":t.sans,"font-size":zu,"font-weight":400,fill:n},Hu)+Ie({x:Nl,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})+Ie({x:qu,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(Sl)})`},a);return te("a",{href:Xm,target:"_blank",rel:"noopener","aria-label":"Powered by nowline"},te("g",{"data-layer":"attribution"},c))}async function Nj(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=uO(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=Pj(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 Pj(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 Cj=.24,mm=2,vO=3,Oj=4,$j=8,Lj=10;function IO(e){return e.bg==="none"?"transparent":e.bg}function xm(e){return wO(e)>=Cj?"dark":"light"}function SO(e,t){return`url(#${e}-wave-hatch-${t})`}function Dj(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 Mj(e){if(!e.waves)return[];let t=new Set,n=i=>{for(let o of i)o.kind==="item"?o.waveRole==="background"&&t.add(xm(IO(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(xm($O(e.palette))),["dark","light"].filter(i=>t.has(i))}function Fj(e,t,n){let i=Math.min(wl[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:SO(n,xm(IO(t)))})}function s_(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 t_=4,gm=.5;function NO(e,t){if(e.empty)return;let n=gm;return s_({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 Bj(e,t){let n=Math.min(t_-gm,e.width/2,e.height/2),r=1e-6;return{left:e.x<=t.box.x+gm+r?n:0,right:e.x+e.width>=t.box.x+t.box.width-gm-r?n:0}}function Wj(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 n_(e,t,n){let r=o=>n&&(n.left>0||n.right>0)?te("path",{d:Wj(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":Pl}):i}function Uj(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:t_,ry:t_,fill:t.timeline.panelFill,stroke:t.timeline.border,"stroke-width":1})];for(let o of e.waves){let s=NO(o,n);s&&i.push(te("g",{"data-id":o.id},`<title>${Bt(o.strip.tooltip)}</title>${n_(o,s,Bj(s,n))}`))}return te("g",{"data-layer":"wave-strip"},i.join(""))}function PO(e,t){let n=[];for(let r of e){if(!r.style.tint||r.empty)continue;let i=t?s_(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 CO(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":Vu,"stroke-dasharray":r.dash}))}return n.length===0?"":te("g",{"data-layer":"wave-boundary"},n.join(""))}function TO(e,t){let n=ym(e,rr);return t?n*1.05:n}function Xj(e,t,n){let r=e.timeline,i=r.waveStrip;if(!e.waves||!i)return"";let o=i.y+i.height/2+Oj,s=i.y+vO,a=i.height-2*vO,c=[],l=(u,f)=>{let d=TO(f,!1)+2*mm;return te("rect",{x:m(u-d/2),y:m(s),width:m(d),height:m(a),fill:t.timeline.panelFill})+Ie({x:m(u),y:m(o),"font-family":n.sans,"font-size":rr,"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,_=tg/2;c.push(te("path",{d:`M${m(h)} ${m(g-_)} L${m(h+_)} ${m(g)} L${m(h)} ${m(g+_)} L${m(h-_)} ${m(g)} Z`,fill:t.timeline.panelFill,stroke:t.wave.boundary,"stroke-width":1.5},`<title>${Bt(u.strip.tooltip)}</title>`))}let f=NO(u,r);if(!f)continue;let d=f.x+f.width,p=u.strip.footnotesShown?u.footnoteIndicators.length*In:0;if(p){let h=d-kr+mm,g=d-kr-p-mm;c.push(n_(u,{x:g,y:s,width:h-g,height:a}))}if(u.strip.label!==void 0){let h=TO(u.strip.label,!0),g=p?Math.min(u.strip.labelX,d-kr-p-h/2):u.strip.labelX,_=h+2*mm;c.push(n_(u,{x:g-_/2,y:s,width:_,height:a})),c.push(Ie({x:m(g),y:m(o),"font-family":n.sans,"font-size":rr,"font-weight":600,fill:u.style.text,"text-anchor":"middle"},u.strip.label))}if(u.strip.footnotesShown){let h=d-kr;for(let g=u.footnoteIndicators.length-1;g>=0;g--)c.push(Ie({x:m(h),y:m(i.y+Lj),"font-family":n.sans,"font-size":$j,"font-weight":700,fill:u.style.text,"text-anchor":"end"},String(u.footnoteIndicators[g]))),h-=In}}return c.length===0?"":te("g",{"data-layer":"wave-labels"},c.join(""))}function OO(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 $O(e){let t=e.entities.item.bg;return t==="none"?"transparent":t}function Gj(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=$O(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:SO(t,xm(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":Vu}))}for(let a of o.runs)i.push(Ie({x:m(a.x),y:m(a.y),"font-family":r.sans,"font-size":rr,fill:n.wave.labelText},a.text))}return te("g",{"data-layer":"wave-legend"},i.join(""))}async function a_(e,t={}){let r=new hm(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>${mO(r)}`+u(`${r}-arrow`,a)+u(`${r}-arrow-light`,c)+u(`${r}-arrow-dark`,l)+Mj(e).map(p=>Dj(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(dj(e.timeline,i,o)),s.push(Uj(e,i));for(let p of e.swimlanes)s.push(wj(p,i));s.push(bO(e.timeline,e.chartBox.y,i)),e.waves&&s.push(PO(e.waves)),s.push(uj(e.timeline,e.chartBox.y,i)),s.push(CO(e.waveBoundaries)),s.push(Xj(e,i,o));for(let p of e.edges)p.kind==="underBar"&&s.push(xO(p,r,i));for(let p of e.swimlanes)s.push(AO(p,t,r,i,o));for(let p of e.includes)s.push(Ij(p,t,r,i,o,e));s.push(OO(e.waveCrossings));for(let p of e.edges)p.kind!=="underBar"&&s.push(xO(p,r,i));for(let p of e.anchors)s.push(Ej(p,i));for(let p of e.milestones)s.push(kj(p,r,i));s.push(fj(e.timeline,i,o));for(let p of e.anchors)s.push(_j(p,i,o));for(let p of e.milestones)s.push(bj(p,i,o));if(s.push(pj(e.nowline,i,o)),s.push(Rj(e.footnotes,r,i,o)),s.push(Gj(e.waveLegend,r,i,o)),s.push(cj(e.header,r,i,o)),s.push(Sj(e,o)),e.header.logo&&t.assetResolver){let p=await Nj(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${ml({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 l_="/browser-source.nowline",jj={error:3,warning:2,info:1},Hj={error:3,warning:2,info:1};function LO(e,t){return jj[e]>=Hj[t]}var vm,DO=0;function MO(){return vm||(vm=hw()),vm}function zj(){return gt.parse(`memory:///nowline-browser-${++DO}.nowline`)}async function Tm(e,t={}){let n=t.filePath??l_,r=MO(),o=r.shared.workspace.LangiumDocumentFactory.fromString(e,zj());await r.shared.workspace.DocumentBuilder.build([o],{validation:!0});let s=[];for(let a of mg(o))a.origin==="lexer"?s.push(rO(a.error,n)):a.origin==="parser"?s.push(nO(a.error,n)):s.push(tO(a.diagnostic,n));return{ast:o.parseResult.value,diagnostics:s}}async function c_(e,t={}){let n=t.filePath??l_,r=await Tm(e,{filePath:n});if(r.diagnostics.some(T=>T.severity==="error"))return{kind:"diagnostics",diagnostics:r.diagnostics};let i=MO(),o=t.readFile??lO,s=await uw(r.ast,n,{services:i.Nowline,readFile:o}),a=s.diagnostics.some(T=>T.severity==="error"&&!ll(T)&&!e_(T.message)),c=[...r.diagnostics];for(let T of s.diagnostics){if(T.severity==="error"&&e_(T.message)){t.onSkippedInclude?.({sourcePath:T.sourcePath,message:T.message});continue}a&&ll(T)||c.push(iO(T))}if(c.some(T=>T.severity==="error"))return{kind:"diagnostics",diagnostics:c};let l;if(t.timezone)try{l=Jw(t.timezone)}catch(T){if(T instanceof Qo)return{kind:"diagnostics",diagnostics:[{severity:"error",code:"invalid-timezone",message:T.message,file:n,line:1,column:1}]};throw T}let u=Qw({now:t.today,zone:l}),f=Vw(r.ast,s,{theme:t.theme,today:u,locale:t.locale,width:t.width,nonWorking:t.nonWorking}),d=t.diagnosticLevel??"error",p=Zw(f,{today:u??void 0,locale:t.locale??"en-US"}).map(T=>sO(T,n)),h=t.showLinks!==!1,g=t.strict===!0,_=[],x=await a_(f,{idPrefix:t.idPrefix,assetResolver:t.assetResolver,noLinks:!h,strict:g,warn:T=>_.push(T),fontFamilies:t.fontFamilies}),y=[...p,..._.map(T=>oO(T,n,g?"error":"warning"))].filter(T=>LO(T.severity,d));return g&&y.length>0?{kind:"diagnostics",diagnostics:[...c,...y]}:{kind:"svg",svg:x,warnings:y}}function u_(){vm=void 0,DO=0}var FO="/embed.nowline",f_=!1;async function BO(e){let{ast:t,diagnostics:n}=await Tm(e,{filePath:FO});return{ast:t,errors:n.filter(r=>r.severity==="error").map(r=>r.message)}}async function wm(e,t={}){let n={filePath:FO,theme:t.theme,today:t.today,timezone:t.timezone,locale:t.locale,width:t.width,nonWorking:t.nonWorking,idPrefix:t.idPrefix,onSkippedInclude:()=>{f_||(f_=!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 c_(e,n);if(r.kind==="svg")return r.svg;let i=r.diagnostics.filter(o=>o.severity==="error").map(o=>o.message);throw new Nu(`Failed to render Nowline source: ${i.join("; ")}`,i)}var Nu=class extends Error{constructor(n,r){super(n);S(this,"details",r);this.name="EmbedRenderError"}};function WO(){f_=!1,u_()}var er=Uint8Array,kn=Uint16Array,g_=Int32Array,y_=new er([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]),x_=new er([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]),UO=new er([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),HO=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 g_(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}},zO=HO(y_,2),qj=zO.b,p_=zO.r;qj[28]=258,p_[258]=28;var qO=HO(x_,0),Qae=qO.b,XO=qO.r,h_=new kn(32768);for(Fe=0;Fe<32768;++Fe)oi=(Fe&43690)>>1|(Fe&21845)<<1,oi=(oi&52428)>>2|(oi&13107)<<2,oi=(oi&61680)>>4|(oi&3855)<<4,h_[Fe]=((oi&65280)>>8|(oi&255)<<8)>>1;var oi,Fe,Ou=(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[h_[f]>>c]=l}else for(a=new kn(r),i=0;i<r;++i)e[i]&&(a[i]=h_[s[e[i]-1]++]>>15-e[i]);return a}),es=new er(288);for(Fe=0;Fe<144;++Fe)es[Fe]=8;var Fe;for(Fe=144;Fe<256;++Fe)es[Fe]=9;var Fe;for(Fe=256;Fe<280;++Fe)es[Fe]=7;var Fe;for(Fe=280;Fe<288;++Fe)es[Fe]=8;var Fe,_m=new er(32);for(Fe=0;Fe<32;++Fe)_m[Fe]=5;var Fe,Vj=Ou(es,9,0);var Yj=Ou(_m,5,0);var VO=function(e){return(e+7)/8|0},Kj=function(e,t,n){return(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length),new er(e.subarray(t,n))};var si=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8},Pu=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},d_=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:KO,l:0};if(i==1){var s=new er(n[0].s+1);return s[n[0].s]=1,{t:s,l:1}}n.sort(function(b,$){return b.f-$.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=m_(n[u-1],p,0);if(h>t){var r=0,g=0,_=h-t,x=1<<_;for(o.sort(function($,P){return p[P.s]-p[$.s]||$.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>>=_;g>0;){var T=o[r].s;p[T]<t?g-=1<<t-p[T]++-1:++r}for(;r>=0&&g;--r){var w=o[r].s;p[w]==t&&(--p[w],++g)}h=t}return{t:new er(p),l:h}},m_=function(e,t,n){return e.s==-1?Math.max(m_(e.l,t,n+1),m_(e.r,t,n+1)):t[e.s]=n},GO=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}},Cu=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},YO=function(e,t,n){var r=n.length,i=VO(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},jO=function(e,t,n,r,i,o,s,a,c,l,u){si(t,u++,n),++i[256];for(var f=d_(i,15),d=f.t,p=f.l,h=d_(o,15),g=h.t,_=h.l,x=GO(d),y=x.c,T=x.n,w=GO(g),b=w.c,$=w.n,P=new kn(19),O=0;O<y.length;++O)++P[y[O]&31];for(var O=0;O<b.length;++O)++P[b[O]&31];for(var H=d_(P,7),z=H.t,M=H.l,A=19;A>4&&!z[UO[A-1]];--A);var U=l+5<<3,X=Cu(i,es)+Cu(o,_m)+s,R=Cu(i,d)+Cu(o,g)+s+14+3*A+Cu(P,z)+2*P[16]+3*P[17]+7*P[18];if(c>=0&&U<=X&&U<=R)return YO(t,u,e.subarray(c,c+l));var C,N,j,q;if(si(t,u,1+(R<X)),u+=2,R<X){C=Ou(d,p,0),N=d,j=Ou(g,_,0),q=g;var V=Ou(z,M,0);si(t,u,T-257),si(t,u+5,$-1),si(t,u+10,A-4),u+=14;for(var O=0;O<A;++O)si(t,u+3*O,z[UO[O]]);u+=3*A;for(var ie=[y,b],oe=0;oe<2;++oe)for(var ye=ie[oe],O=0;O<ye.length;++O){var ne=ye[O]&31;si(t,u,V[ne]),u+=z[ne],ne>15&&(si(t,u,ye[O]>>5&127),u+=ye[O]>>12)}}else C=Vj,N=es,j=Yj,q=_m;for(var O=0;O<a;++O){var se=r[O];if(se>255){var ne=se>>18&31;Pu(t,u,C[ne+257]),u+=N[ne+257],ne>7&&(si(t,u,se>>23&31),u+=y_[ne]);var k=se&31;Pu(t,u,j[k]),u+=q[k],k>3&&(Pu(t,u,se>>5&8191),u+=x_[k])}else Pu(t,u,C[se]),u+=N[se]}return Pu(t,u,C[256]),u+N[256]},Zj=new g_([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),KO=new er(0),Jj=function(e,t,n,r,i,o){var s=o.z||e.length,a=new er(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=Zj[t-1],d=f>>13,p=f&8191,h=(1<<n)-1,g=o.p||new kn(32768),_=o.h||new kn(h+1),x=Math.ceil(n/3),y=2*x,T=function(xe){return(e[xe]^e[xe+1]<<x^e[xe+2]<<y)&h},w=new g_(25e3),b=new kn(288),$=new kn(32),P=0,O=0,H=o.i||0,z=0,M=o.w||0,A=0;H+2<s;++H){var U=T(H),X=H&32767,R=_[U];if(g[X]=R,_[U]=X,M<=H){var C=s-H;if((P>7e3||z>24576)&&(C>423||!l)){u=jO(e,c,0,w,b,$,O,z,A,H-A,u),z=P=O=0,A=H;for(var N=0;N<286;++N)b[N]=0;for(var N=0;N<30;++N)$[N]=0}var j=2,q=0,V=p,ie=X-R&32767;if(C>2&&U==T(H-ie))for(var oe=Math.min(d,C)-1,ye=Math.min(32767,H),ne=Math.min(258,C);ie<=ye&&--V&&X!=R;){if(e[H+j]==e[H+j-ie]){for(var se=0;se<ne&&e[H+se]==e[H+se-ie];++se);if(se>j){if(j=se,q=ie,se>oe)break;for(var k=Math.min(ie,se-2),L=0,N=0;N<k;++N){var F=H-ie+N&32767,G=g[F],Z=F-G&32767;Z>L&&(L=Z,R=F)}}}X=R,R=g[X],ie+=X-R&32767}if(q){w[z++]=268435456|p_[j]<<18|XO[q];var Y=p_[j]&31,re=XO[q]&31;O+=y_[Y]+x_[re],++b[257+Y],++$[re],M=H+j,++P}else w[z++]=e[H],++b[e[H]]}}for(H=Math.max(H,M);H<s;++H)w[z++]=e[H],++b[e[H]];u=jO(e,c,l,w,b,$,O,z,A,H-A,u),l||(o.r=u&7|c[u/8|0]<<3,u-=7,o.h=_,o.p=g,o.i=H,o.w=M)}else{for(var H=o.w||0;H<s+l;H+=65535){var le=H+65535;le>=s&&(c[u/8|0]=l,le=s),u=YO(c,u+1,e.subarray(H,le))}o.i=s}return Kj(a,0,r+VO(u)+i)};var ZO=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}}},Qj=function(e,t,n,r,i){if(!i&&(i={l:1},t.dictionary)){var o=t.dictionary.subarray(-32768),s=new er(o.length+e.length);s.set(o),s.set(e,o.length),e=s,i.w=o.length}return Jj(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 JO=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};var eH=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=ZO();i.p(t.dictionary),JO(e,2,i.d())}};function QO(e,t){t||(t={});var n=ZO();n.p(e);var r=Qj(e,t,t.dictionary?6:2,4);return eH(r,t),JO(r,r.length-4,n.d()),r}var tH=typeof TextDecoder<"u"&&new TextDecoder,nH=0;try{tH.decode(KO,{stream:!0}),nH=1}catch{}var n$="https://free.nowline.io/open";function e$(e){let t=new TextEncoder().encode(e),n=QO(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 v_({source:e,sourceUrl:t,share:n}){if(n===!1||n==="none")return null;if(typeof n=="object")return t!==void 0&&t$(t)?n.remoteUrl.replace("{url}",encodeURIComponent(t)):n.textUrl.replace("{text}",e$(e));let r=n===!0?n$:n,i=new URL(r);return t!==void 0&&t$(t)?i.hash=`url=${encodeURIComponent(t)}`:i.hash=`text=${e$(e)}`,i.toString()}function t$(e){try{return new URL(e).protocol==="https:"}catch{return!1}}var r$=0;async function i$(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=++r$,s=e.share??!0,a=[],c=0;for(let l of Array.from(n)){let u=rH(l);if(!u)continue;let f=iH(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(wm(f,p).then(y=>{if(oH(u,y),r++,h!==null){let T=v_({source:f,sourceUrl:x,share:s});if(T!==null){let w=t.createElement("a");w.className="nowline-share",w.href=T,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 rH(e){let t=e.parentElement;return t&&t.tagName.toUpperCase()==="PRE"?t:e}function iH(e){return e.textContent??""}function oH(e,t){e.outerHTML=t}function o$(){r$=0}function Em(){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 s$(e,t){return e&&e!=="auto"?ww(e)??t:t}var sH="0.0.0-dev.20261012225207.gfc38dc0",aH="fc38dc0",lH="pre code.language-nowline, code.language-nowline",a$={theme:"auto",startOnLoad:!0,selector:lH,systemTheme:Em(),share:!0},Ke={...a$},T_=!1;function cH(e={}){Ke={theme:e.theme??Ke.theme,startOnLoad:e.startOnLoad??Ke.startOnLoad,selector:e.selector??Ke.selector,locale:e.locale??Ke.locale,width:e.width??Ke.width,nonWorking:e.nonWorking??Ke.nonWorking,today:e.today!==void 0?e.today:Ke.today,timezone:e.timezone??Ke.timezone,share:e.share??Ke.share,sourceUrl:e.sourceUrl??Ke.sourceUrl,systemTheme:Em()}}function l$(){return{theme:s$(Ke.theme,Ke.systemTheme),locale:Ke.locale,width:Ke.width,nonWorking:Ke.nonWorking,today:Ke.today,timezone:Ke.timezone}}async function uH(e,t={}){let n={...l$(),...t};return wm(e,n)}async function fH(e){return BO(e)}async function w_(e){let t={selector:e?.selector??Ke.selector,theme:e?.theme??l$().theme,locale:e?.locale??Ke.locale,width:e?.width??Ke.width,nonWorking:e?.nonWorking??Ke.nonWorking,today:e?.today!==void 0?e.today:Ke.today,timezone:e?.timezone??Ke.timezone,share:e?.share??Ke.share,sourceUrl:e?.sourceUrl??Ke.sourceUrl,document:e?.document};return i$(t)}var dH=w_;if(typeof document<"u"&&!T_){T_=!0;let e=()=>{Ke.startOnLoad&&w_()};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e,{once:!0}):queueMicrotask(e)}function pH(){Ke={...a$,systemTheme:Em()},T_=!1,WO(),o$()}return Mu(hH);})();
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=cC(e);if(o){if(o.length>=2)return{textSpills:!(n<=t&&o.every((l,u)=>ct(l,Hh)<=(u===0?r:t))),titleLines:o};i=o[0]??""}let s=i.length>0&&ct(i,Hh)>r,a=n>t;if(!s&&!a)return{textSpills:!1,titleLines:[i]};if(s&&!a){let c=Ol(i,t,Hh,r);if(c.length>=2&&c.length<=og&&c.every((l,u)=>ct(l,Hh)<=(u===0?r:t)))return{textSpills:!1,titleLines:c}}return{textSpills:!0,titleLines:[i]}}function kw(e,t,n){let r=cC(e);return r&&r.length>=2?r:!t.textSpills&&!n&&t.titleLines.length>=2?t.titleLines:[r?r[0]??"":e]}var zh=class{constructor(t){S(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*un),o=t.x+un,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-RG),l=this.input.title,u=Ew(this.input.metaText,this.input.metaTrailingWidth??0),f=Math.max(0,i-a-(this.input.titleFirstLineRightReservePx??Fl({barWidth:i,footnoteLabels:[],hasBeforeGlyph:!1}))),{textSpills:d,titleLines:p}=bw(l,c,u,f),h=d?o+i+IG:o+a;return{id:this.input.id,box:s,textX:h,textSpills:d,titleLines:p}}};var qh=class{constructor(t,n){S(this,"node");S(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=pt("parallel",r.properties,n.styleCtx),s=Ko(r,t.x,n),a=Ln(De(r.properties,"after")),c=Ln(De(r.properties,"before")),l=r.title??r.name,u=tE(!!(a||c)),f=t.y+u,d=n.scale.showsNonWorking?n.scale.startX(s):s,p=[],h=d,g=0,_=n.currentFlowKey;n.nextParallelId+=1;let x=r.name??`parallel-${n.nextParallelId}`,y=0;for(let $ of r.content){if($.$type==="DescriptionDirective")continue;n.currentFlowKey=`${_}/par:${x}#${y}`;let P=i.newCursor(s,f+g),O=i.sequenceOne($,P,n);p.push(O),g+=Math.max(n.bandScale.step(),P.height),h=Math.max(h,P.maxX),y++}n.currentFlowKey=_;let T={x:d,y:f,width:h-d,height:g};t.x=h+bl,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,T.x),n.entityRightEdges.set(w,T.x+T.width));let b=Mh({box:T,afterDate:a,beforeDate:c,row:{kind:"header-band",title:l,titleInsetX:hs}});return{kind:"parallel",id:w,title:l,box:T,children:p,style:o,inlineDatePins:b.length>0?b:void 0}}};var fl=class extends Map{constructor(t,n=CG){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(uC(this,t))}has(t){return super.has(uC(this,t))}set(t,n){return super.set(NG(this,t),n)}delete(t){return super.delete(PG(this,t))}};function uC({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function NG({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function PG({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function CG(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Vh(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 Yh(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}var fC=Symbol("implicit");function Kh(){var e=new fl,t=[],n=[],r=fC;function i(o){let s=e.get(o);if(s===void 0){if(r!==fC)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 fl;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 Kh(t,n).unknown(r)},Yh.apply(i,arguments),i}function Ru(){var e=Kh().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 _=Vh(d).map(function(x){return h+o*x});return n(p?_.reverse():_)}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 Ru(t(),[r,i]).round(a).paddingInner(c).paddingOuter(l).align(u)},Yh.apply(f(),arguments)}var Aw=class e{constructor(t,n,r){S(this,"bandwidthPx");S(this,"stepPx");S(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=Ru().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}},OG={bandwidth:56,step:64};function dC(){return Aw.fixedRow(OG)}var pC=1e-6,Iu=class{constructor(t){S(this,"domain");S(this,"range");S(this,"pixelsPerDay");S(this,"calendar");S(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?An(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):An(this.domain[0],t)}dayAt(t){let n=(t-this.range[0])/this.pixelsPerDay;return{days:n,day:Math.floor(n+pC)}}forward(t){return this.showsNonWorking?this.range[0]+An(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?xt(this.domain[0],n):this.calendar?this.calendar.dateAtWorkingIndex(this.domain[0],n):xt(this.domain[0],n)}indexAtX(t){let{days:n,day:r}=this.dayAt(t);if(!this.showsNonWorking||!this.calendar)return n;let i=xt(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=xt(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-pC)-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 Zh(e){return e.endsWith(":")?e.slice(0,-1):e}function mC(e,t){let r=e.roadmapDecl?.properties.find(l=>Zh(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=Jh(i)*u,s=1}}let a=s??Z_[i]??4,c=l=>s===void 0&&!l?{labelEveryDefault:!0}:{};if(t){let u=t.properties.find(_=>Zh(_.key)==="unit")?.value??i,f=t.properties.find(_=>Zh(_.key)==="label-every"),d=t.properties.find(_=>Zh(_.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)||Jh(u)):o??Jh(u);return{unit:u,labelEvery:h,pixelsPerUnit:g,...c(p!==0)}}return{unit:i,labelEvery:a,pixelsPerUnit:o??Jh(i),...c(!1)}}function Jh(e){switch(e){case"days":return q_;case"weeks":return 40;case"months":return 80;case"quarters":return 160;case"years":return 320}}var $G=.5,Rw=.5,Iw=7;function Jo(e){return e==="months"||e==="quarters"||e==="years"}function Qh(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 LG(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 em(e,t,n,r,i){let o=Math.ceil(t-1e-6);if(i?.hasNonWorkingDays){if(!Jo(n)&&o<=0)return 0;let a=o<=0?e:xt(i.dateAtWorkingIndex(e,o-1),1),c=Jo(n)?hC(a,n):n==="weeks"?gC(a,e,i.weekStart):a;return i.workingIndexOf(e,c)}if(!Jo(n))return Math.ceil(t/r)*r;let s=xt(e,o);return An(e,hC(s,n))}function hC(e,t){return LG(e,t)?e:Qh(e,t)}function gC(e,t,n){let r=n===void 0?-An(t,e):n-e.getUTCDay();return xt(e,(r%Iw+Iw)%Iw)}function DG(e,t,n){return gC(xt(e,1),t,n)}function Sw(e,t,n,r=Eu){if(e.calendar?.hasNonWorkingDays)return MG(e,t,e.calendar,r);if(Jo(t.unit))return UG(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?Pw(t.unit,xt(e.domain[0],u),l,r):void 0})}return c}function MG(e,t,n,r){let{unit:i}=t,[o,s]=e.domain,a=_=>Jo(i)?Qh(_,i):i==="weeks"?DG(_,o,n.weekStart):xt(_,1),c=[o];for(let _=a(o);_<s;_=a(_))c.push(_);let l=e.forward(s),u=[];c.forEach((_,x)=>{let y=e.forward(_);(x+1<c.length?e.forward(c[x+1]):l)>y&&!FG(e,i,c,x)&&u.push({date:_,x:y})});let f=i==="days"&&t.labelEveryDefault===!0&&n.weekStart!==void 0,d=(_,x)=>f?_.getUTCDay()===n.weekStart:x%t.labelEvery===0,h=(e.showsNonWorking?L_(i):n.daysPerUnit(i))*e.pixelsPerDay,g=u.map(({date:_,x},y)=>{let T=(y+1<u.length?u[y+1].x:l)-x,w=d(_,y),b=w?Pw(i,_,y,r):void 0;if(b!==void 0){let $=ct(b,oo)>T,P=Jo(i)?y===0||y===u.length-1:T<h-$G;$&&P&&(b=void 0)}return{x,labelX:x+T/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 FG(e,t,n,r){let i=e.calendar;if(!e.showsNonWorking||!i||!Jo(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=>WG(e,l,n));let c=l=>t.some(u=>Math.abs(u.x-l)<Rw&&(u.major||r));return o.map(l=>{let u=e.forward(l.from),f={x:u,width:e.forward(xt(l.through,1))-u,from:l.from,through:l.through};l.titles.length>0&&(f.titles=l.titles,f.label=yC(l,i.workingWeekdays),f.cut=!0);let d=u-s>Rw&&a-u>Rw;return n==="days"&&d&&!c(u)&&(f.seam=!0),f})}var BG=" \xB7 ";function yC(e,t){let n=0;for(let i=e.from;i<=e.through;i=xt(i,1))t.has(i.getUTCDay())&&n++;let r=e.titles.join(", ");return n>0?`${r}${BG}${n}d`:r}function WG(e,t,n){let[r,i]=e.range,o=Math.max(r,e.forward(t.from)),s=Math.min(i,e.forward(xt(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=yC(t,e.calendar.workingWeekdays))),(n==="days"||n==="weeks"||t.titles.length>0)&&(a.band=!0),a}function UG(e,t,n,r){let[i,o]=e.domain,s=[i];for(let l=Qh(i,n);l<o;l=Qh(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?Pw(n,l,u,r):void 0,g=u===0||u===c-1;return h!==void 0&&g&&ct(h,oo)>p&&(h=void 0),{x:f,labelX:f+p/2,major:d,label:h}})}function Pw(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`${cl(r).quarterPrefix}${i} ${t.getUTCFullYear()}`}case"years":return`${t.getUTCFullYear()}`}}var Cw=class{constructor(t,n){S(this,"id");S(this,"anchor");this.id=t,this.anchor=n}place(t,n){let r=de(this.anchor.properties,"date"),i=Ge(r);if(!i)return null;let o=t.scale.forwardWithinDomain(i);if(o===null)return null;let s=pt("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=Er(i)),d}};function vC(e,t,n){let r=[];for(let[i,o]of e){let s=new Cw(i,o).place(t,n);s&&r.push(s)}return r}function pl(e){let t=0;for(let n of e)t=Math.max(t,TC(n.children)),n.nested.length>0&&(t=Math.max(t,pl(n.nested)));return t}function TC(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,TC(n.children));return t}function Ow(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,De(l.properties,"on")),r.push({number:f,title:l.title??c,description:l.description?.text,style:pt("footnote",l.properties,t.styleCtx)})}),{area:{box:{x:Bn,y:n+Bn,width:t.chartRightX-2*Bn,height:r.length===0?0:Rl+r.length*Il+Bn},entries:r},index:i,hosts:o}}var XG=.8,GG=1;function jG(e){let t=[];return _C(e,t),t}function _C(e,t){for(let n of e)if(n.kind==="item"){let r=HG(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")&&_C(n.children,t)}function HG(e){return e.capacity?e.capacity.value:e.size?1:0}function EC(e){if(e.capacityValue<=0||e.warnFraction===null&&e.overFraction===null)return null;let t=jG(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:zG(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 zG(e,t,n,r){let i=e/t;return r!==null&&i>=r?"red":n!==null&&i>=n?"yellow":"green"}function bC(e,t){let n=t.get("swimlane"),r=wC(de(e.properties,"utilization-warn-at"),n?de(n.properties,"utilization-warn-at"):void 0,XG),i=wC(de(e.properties,"utilization-over-at"),n?de(n.properties,"utilization-over-at"):void 0,GG);return{warn:r,over:i}}function wC(e,t,n){let i=YG(e??t);return i.kind==="unset"?n:i.kind==="none"?null:i.value}var qG=/^\d+(?:\.\d+)?%$/,VG=/^\d+\.\d+$/;function YG(e){if(e===void 0)return{kind:"unset"};if(e==="none")return{kind:"none"};if(qG.test(e)){let t=parseFloat(e)/100;return Number.isFinite(t)&&t>0?{kind:"number",value:t}:{kind:"unset"}}if(VG.test(e)){let t=parseFloat(e);return Number.isFinite(t)&&t>0?{kind:"number",value:t}:{kind:"unset"}}return{kind:"unset"}}var kC=10;function KG(e,t,n){let r=de(e.properties,"capacity"),i=ui(r);if(i===null)return{capacity:null,badgeWidthPx:0};let o=yl(i),s=xl(t.capacityIcon,n),a=io(o,s,kC);return{capacity:{value:i,text:o,icon:s},badgeWidthPx:a}}var ZG=10,JG=38,QG=8;function e4(e,t,n){let r=e.title??e.name??"";if(!r)return 0;let i=de(e.properties,"owner");return Ul(0,r,i??void 0,t,n).rightX}function t4(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 n4(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 hl=class{constructor(t,n){S(this,"input");S(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=pt("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}=KG(r,s,n.symbols),d=t4(r,n),p=d.length>0?o.estimateTextWidth(d.join(","),kC):0,h=e4(r,f,p),g=n4(r,a,n,o),_=!r.title||g===void 0||g>=h+QG,x=t.y+(_?ZG:JG),y=new ul({laneLeftX:a,originY:x,minRowHeight:c,slackCorridors:n.slackCorridors}),T=a,w=[];for(let A of r.content){if(A.$type==="DescriptionDirective")continue;if(!Mt(A)){let G=o.resolveChildStart(A,T,a,n),{rowIndex:Z,y:Y}=y.placeBlock(),re=o.newCursor(G,Y),le=o.sequenceOne(A,re,n);w.push(le);let xe=le.box.x+le.box.width,Te=Math.max(c,re.height);y.commitBlock({rowIndex:Z,placed:le,blockHeight:Te,blockEnd:xe,spillReservation:af(le)}),T=Math.max(T,xe);continue}let U=A.properties,X=o.resolveChildStart(A,T,a,n),R=fi(U,n.sizes,n.cal),C=n.scale.startX(X),N=Math.max(Rn,Zo(n,C,R)),j=C+N,q=A.name??"",V=o.predictItemBarExtraHeight(A,C,n),ie=c+V,{rowIndex:oe,y:ye}=y.placeItem({childId:q,desiredStart:C,desiredEnd:j,predictedHeight:ie}),ne=o.newCursor(X,ye),se=o.sequenceItem(A,ne,n);w.push(se);let k=se.box.x+se.box.width+un;T=Math.max(T,k);let L=null;(se.textSpills||se.chipsOutside||se.dotSpills||se.iconSpills||se.footnoteSpills)&&(L=Math.max(se.decorationsRightX,se.chipsOutside?se.chipsRightX:0)+6),y.commitItem({rowIndex:oe,placed:se,logicalEnd:k,spillReservation:L,rowHeight:Math.max(ie,c+(se.box.height-n.bandScale.bandwidth()))})}let b=x-t.y,$=Math.max(c+32,b+y.usedHeight()+16),P=Math.max(y.usedRightX(),h),O={x:0,y:t.y,width:n.chartRightX,height:$},H=de(r.properties,"owner"),z;if(H){let A=n.teams.get(H),U=n.persons.get(H);z=A?.title??U?.title??H}let M=u?(()=>{let{warn:A,over:U}=bC(r,n.styleCtx.defaults);return EC({children:w,capacityValue:u.value,warnFraction:A,overFraction:U})})():null;return n.currentFlowKey=l,{positioned:{id:r.name,title:r.title??r.name??"",box:O,bandIndex:i,children:w,nested:[],style:s,owner:z,footnoteIndicators:d,capacity:u,utilization:M},usedHeight:$,usedRightX:P}}};var r4=18,i4=14,o4=14,s4=16,a4=32;function $w(e,t,n,r){let i=n+r4,o=[],s=!0;for(let a of e){s||(i+=s4),s=!1;let c=a.content.roadmap?.title??a.sourcePath,l=i+i4,u={cal:t.cal,styleCtx:{theme:t.styleCtx.theme,styles:a.config.styles,defaults:a.config.defaults,labels:a.content.labels},sizes:os(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&&Gh(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:T,usedHeight:w}=new hl({lane:y,bandIndex:p},r).place({x:u.timeline.originX,y:d},u);f.push(T),d+=w,p++}let h=d,g=Math.max(t.bandScale.bandwidth(),h-i+o4),_={x:0,y:i,width:0,height:g},x={sourcePath:a.sourcePath,label:c,box:_,nestedSwimlanes:f,style:pt("swimlane",[],t.styleCtx)};Lw(x,t.chartRightX),o.push(x),i+=g}return{regions:o,endY:i}}function Lw(e,t){let n=e.box.x,{chromeRightX:r}=Xl(n,e.label,e.sourcePath),i=pl(e.nestedSwimlanes),o=Math.max(r,i)+a4,s=Math.min(t-n,o-n);e.box.width=s;for(let a of e.nestedSwimlanes)a.box.width=s}function nm(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?WP(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 rm(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 Mw(e){let t=null;for(let n of e)n.wave===void 0&&(!t||n.x>t.x)&&(t=n);return t}function l4(e,t){let n;for(let r of e)r.wave===void 0||r.x-t<Kt||(!n||r.x>n.x)&&(n=r);return n?.wave}function AC(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 Dw=class{constructor(t,n){S(this,"id");S(this,"milestone");this.id=t,this.milestone=n}place(t){let n=this.milestone,r=pt("milestone",n.properties,t.styleCtx),i=de(n.properties,"date"),o=De(n.properties,"after"),s=Ge(i),a=t.timeline.markerRow.y,c=6,l=n.title??this.id,u=null,f=a,d=null,p="right",h=!1,g,_=!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 $=nm(o,t),P=rm($),O=Mw(P);O&&O.x>w&&(_=!0,g=[{x:O.x,y:O.y>0?O.y:f}]),x=l4(P,w),x!==void 0&&(_=!0)}else if(o.length>0){let w=nm(o,t),b=rm(w);b.sort((H,z)=>z.x-H.x);let $=b[0]?.x??t.timeline.originX;u=$,h=!1;let P=AC(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 O=[];for(let H=1;H<b.length;H++){let z=b[H];z.x<$&&z.y>0&&z.wave===void 0&&O.push({x:z.x,y:z.y})}O.length>0&&(g=O)}if(u===null)return null;if(!d){let w=AC(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 T={id:this.id,title:l,center:y,radius:c,fixed:h,slackArrows:g,isOverrun:_,style:r,cutTopY:t.chartTopY,cutBottomY:t.swimlaneBottomY,labelBox:d,labelSide:p};return t.waves&&!_&&aC(t.waves,y.x)&&(T.onWaveBoundary=!0),x!==void 0&&s&&(T.overrunByWave=x,T.overrunDate=Er(s)),s&&!t.scale.showsNonWorking&&!t.calendar.isWorkingDay(s)&&(T.hiddenDate=Er(s)),T}};function RC(e,t){let n=[];for(let[r,i]of e){let o=new Dw(r,i).place(t);o&&n.push(o)}return n}function om(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 IC(e){let[t,n,r]=om(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 sm(e,t){let n=IC(e),r=IC(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}var c4=4.5;function PC(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=eC(e.plan,e.solve,e.pass,e.origin,e.floors,Kt),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,T)=>{let w=e.plan.waves[T],b=w.title??y.id,$=y.memberCount===0,P=Au(y.start,t),O=lC(y.start,y.end,t),H=$?void 0:d++,z=u4(y.id,t),M=f4(w.properties,H,t),A=Math.max(y.start,c),U=Math.min(y.end,l),X=Math.max(0,U-A),R,C=!1;if(!$){if(z.length>0){let ye=z.length*In;R=SC(b,y.id,T+1,X,ye),C=R!==void 0}R??(R=SC(b,y.id,T+1,X,0))}let N=(A+U)/2,j;if($&&(N=y.start,!a)){let ye=f.filter(ne=>Math.abs(ne-y.start)<Kt).length;f.push(y.start),N=y.start+ye*ng,j={x:N,y:u}}let q=$?Fw(P):`${Fw(P)} \u2013 ${Fw(O)}`,V=[b,q];$?V.push(n.waveNoItems):y.heldBy!==void 0&&V.push(`${n.waveHeldBy} ${y.heldBy}`);let ie,oe=s[T-1];if(!a&&oe!==void 0&&y.floorRef!==void 0&&y.start-oe.end>Kt){let ye=Math.max(oe.end,c),ne=Math.min(y.start,l);ct(y.floorRef,rr)+2*kr<=ne-ye&&(ie={text:y.floorRef,x:(ye+ne)/2})}return{id:y.id,title:b,index:T,...H!==void 0?{visibleOrdinal:H}:{},startX:y.start,endX:y.end,startDate:P,endDate:O,memberCount:y.memberCount,empty:$,...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:V.join(" \xB7 "),footnotesShown:C,...j?{marker:j}:{},...ie?{gapLabel:ie}:{}},style:M,footnoteIndicators:z}}),h=a?[]:h4(p,e.origin,o.y,t),g=Bw(r),_=i.map(y=>Bw(y.nestedSwimlanes));for(let y of[...g,..._.flat()])y.waveTooltip=n.waveBackgroundItem;let x={waves:p,boundaries:h,crossings:NC(g,h),regionCrossings:_.map(y=>NC(y,h)),hasBackground:g.length+_.flat().length>0};return a&&(x.placeholder=LP(n,p.map(y=>y.title))),x}function SC(e,t,n,r,i){let o=a=>ct(a,rr)*1.05+i+2*kr<=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 u4(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 f4(e,t,n){let r=n.styleCtx.theme,i=new Map,o=de(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=ri(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?d4(l,c,Pl)??l:l,f=i.get("border");return{...c?{tint:c}:{},stripFill:l,text:a("text")??p4(r.wave,u),boundary:a("fg")??r.wave.boundary,boundaryDash:f==="dashed"?"4 2":f==="dotted"?"1 2":null}}var am=/^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;function d4(e,t,n){if(!am.test(e)||!am.test(t))return;let r=om(e),i=om(t);return`#${r.map((o,s)=>Math.round(o*(1-n)+i[s]*n).toString(16).padStart(2,"0")).join("")}`}function p4(e,t){let n=e.labelText;return!am.test(n)||!am.test(t)||sm(n,t)>=c4?n:sm(e.hatch,t)>=sm(e.hatchOnDark,t)?e.hatch:e.hatchOnDark}function h4(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<Kt;)a++;let c=i.slice(s,a);s=a;let l=c[0].x;if(Math.abs(l-t)<Kt)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 Bw(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(...Bw(r.nested));return t}function NC(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 m4="\u2070\xB9\xB2\xB3\u2074\u2075\u2076\u2077\u2078\u2079";function g4(e){return String(e).replace(/[0-9]/g,t=>m4[Number(t)])}function CC(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=rr,l=w=>ct(w,c),u=t.timeline.originX,f=Math.max(u,t.chartRightX-Qt),d=0,p=u,h=!1,g=0,_=w=>r+w*Cl+Qu,x=w=>{h&&p+Ju+w>f&&(d++,p=u,h=!1);let b=h?p+Ju:p;return p=b+w,h=!0,g=Math.max(g,p-u),b},y=[],T=(w,b)=>{let $=Ku+rg,P=x($+l(b)),O=_(d);y.push({kind:w,text:b,swatch:{x:P,y:O-Qu+(Cl-Zu)/2,width:Ku,height:Zu},runs:[{text:b,x:P+$,y:O}]})};if(e.hasBackground&&T("background",n.waveLegendBackground),e.boundaries.length>0&&T("boundary",n.waveLegendBoundary),o||s||a){let w=i.map(O=>{let H=`#${O.index+1} ${O.title}`;return O.footnoteIndicators.length>0&&!O.strip.footnotesShown&&(H+=` ${O.footnoteIndicators.map(g4).join(",")}`),O.empty&&(H+=` (${n.waveNoItems})`),H}),b=" \xB7 ",$=`${n.waveLegendPrefix} ${w[0]}`,P=[{text:$,x:x(l($)),y:_(d)}];for(let O of w.slice(1)){let H=P[P.length-1];p+l(b+O)<=f?(H.text+=b+O,p+=l(b+O),g=Math.max(g,p-u)):(d++,p=u,h=!1,P.push({text:O,x:x(l(O)),y:_(d)}))}y.push({kind:"waves",text:`${n.waveLegendPrefix} ${w.join(b)}`,runs:P})}return{box:{x:u,y:r,width:g,height:(d+1)*Cl},entries:y}}function Fw(e){return e.toISOString().slice(0,10)}var y4=4;function Ww(e,t){t>e.chartRightX&&(e.chartRightX=t)}function FC(e){return`nonworking:${e.from.toISOString().slice(0,10)}`}function $C(e){let t=[];for(let n of e??[])n.label!==void 0&&t.push({id:FC(n),centerX:n.x,radius:0,title:n.label,fontSize:10,bold:!1});return t}function LC(e,t,n,r){let i=n;for(let o of e){let s=r(o.title,o.fontSize),a=o.centerX+o.radius+6+s,c=o.centerX-o.radius-6-s;a>n&&c<t&&(i=Math.max(i,a+Qt))}return i}function DC(e,t,n){let r=Nw(t,e.ticks,n,e.minorGrid);r&&(e.nonWorkingDisplay=t.showsNonWorking?"show":"hide",e.nonWorking=r)}var cm=class{place(t,n,r,i,o){let s=r.theme??"light",a=Tw[s],c=r.width??1280,l=$P(r.locale,v4(t)),{config:u,working:f}=X_(t,n),d=mC(t,n.config.scale),p=os(n.content.sizes,u),h={theme:a,styles:n.config.styles,defaults:n.config.defaults,labels:n.content.labels},{startDate:g,endDate:_}=o.computeDateWindow(t,{cal:u,sizes:p,calendar:f},n,r.today,d,i),x=pt("roadmap",t.roadmapDecl?.properties??[],h),y=x.headerPosition==="beside",T=_l[x.headerHeight]??_l.md,w=T>0&&x.timelinePosition!=="bottom",b=T>0&&(x.timelinePosition==="bottom"||x.timelinePosition==="both"),$=Uh(r.nonWorking)?r.nonWorking:x.nonWorking,P=$==="show"&&f.hasNonWorkingDays,O=t.roadmapDecl?.title??t.roadmapDecl?.name??"",H=de(t.roadmapDecl?.properties??[],"author"),z=o.sizeBesideHeader(O,H),M=y?{x:0,y:0,width:z.boxWidth,height:0}:{x:0,y:0,width:0,height:ju},A=y?z.boxWidth:0,U=y?8:ju+8,X=d.pixelsPerUnit/f.daysPerUnit(d.unit),R=Math.max(1,f.workingIndexOf(g,_)),C=P?Math.max(1,An(g,_))*X:R*X,N=A+Qt,j=C,q=A+Qt+j+Qt,V=Math.min(c,q),oe=r.today!==void 0&&r.today>=g&&r.today<=_?di:0,ye=w?T:0,ne=i?Ym:0,se=new Iu({domain:[g,_],range:[N,N+C],calendar:f,nonWorking:$}),k=$C(Nw(se,[],d.unit,!1)),L=n.content.anchors.size+n.content.milestones.size>0||k.length>0,F=Math.max(V,N+j+Qt),G=[];for(let[Q,pe]of n.content.anchors){let ot=Ge(de(pe.properties,"date"));if(!ot)continue;let Fn=se.forwardWithinDomain(ot);Fn!==null&&G.push({id:Q,centerX:Fn,radius:6,title:pe.title??Q,fontSize:10,bold:!1,date:ot,isMilestone:!1})}for(let[Q,pe]of n.content.milestones){let ot=Ge(de(pe.properties,"date"));if(!ot)continue;let Fn=se.forwardWithinDomain(ot);Fn!==null&&G.push({id:Q,centerX:Fn,radius:6,title:pe.title??Q,fontSize:10,bold:!0,date:ot,isMilestone:!0})}let Z=MC([...G,...k],A,LC(k,A,F,o.estimateTextWidth),o.estimateTextWidth),Y=L?Math.max(1,Z.rowCount):0,re=Y*26,le=oe+ye+ne+re,xe=le+8,Te=y?z.cardHeight+y4:0,me=Math.max(U,Te-le),ze=me+oe,Ze=ze+ye,Xe=Ze+ne,cn=Xe+re,tr=Sw(se,d,f,l),It={box:{x:N,y:me,width:C,height:0},ticks:tr,pixelsPerDay:X,originX:N,startDate:g,endDate:_,labelStyle:pt("roadmap",[],h),pillRowHeight:oe,tickPanelY:ze,tickPanelHeight:ye,markerRow:{y:Xe+13,height:re,collisionY:Xe-8},minorGrid:x.minorGrid,...i?{waveStrip:{y:Ze,height:ne}}:{}};DC(It,se,d.unit);let no=new Map;for(let[Q,pe]of Z.placements){let ot=Xe+13+pe.rowIndex*26;no.set(Q,{rowIndex:pe.rowIndex,centerY:ot,labelBox:{...pe.labelBox,y:ot-4},labelSide:pe.labelSide})}let K={cal:u,styleCtx:h,sizes:p,labels:n.content.labels,teams:n.content.teams,persons:n.content.persons,symbols:n.config.symbols,footnoteIndex:new Map,footnoteHosts:new Map,timeline:It,scale:se,calendar:f,bandScale:dC(),entityLeftEdges:new Map,entityRightEdges:new Map,entityMidpoints:new Map,placedItems:new Map,itemFlowKey:new Map,currentFlowKey:"",slackCorridors:[],markerRowPlacements:no,chartTopY:me+xe,chartBottomY:0,swimlaneBottomY:0,chartRightX:F,nextParallelId:0,nextGroupId:0,...i?{waves:tC(i,se,N)}:{}};for(let Q of G){let pe=no.get(Q.id);pe&&(K.entityLeftEdges.set(Q.id,Q.centerX),K.entityRightEdges.set(Q.id,Q.centerX),K.entityMidpoints.set(Q.id,{x:Q.centerX,y:pe.centerY}))}let wr=Ow(n.content.footnotes,K,0);K.footnoteIndex=wr.index,K.footnoteHosts=wr.hosts;let ai=new Map(K.entityLeftEdges),li=new Map(K.entityRightEdges),ts=new Map(K.entityMidpoints),Mn=()=>{K.entityLeftEdges=new Map(ai),K.entityRightEdges=new Map(li),K.entityMidpoints=new Map(ts),K.placedItems=new Map,K.itemFlowKey=new Map,K.currentFlowKey="",K.waves&&Gh(K.waves,K.entityLeftEdges,K.entityRightEdges)},E=[...n.content.swimlanes.values()],B=pt("swimlane",[],h),J=j_[B.spacing]??0,ae=()=>{K.nextParallelId=0,K.nextGroupId=0;let Q=[],pe=K.chartTopY,ot=0,Fn=K.timeline.originX;for(let g$ of E){ot>0&&(pe+=J);let{positioned:y$,usedHeight:x$,usedRightX:__}=new hl({lane:g$,bandIndex:ot},o).place({x:K.timeline.originX,y:pe},K);Q.push(y$),pe+=x$,__>Fn&&(Fn=__),ot++}return{swimlanes:Q,nextY:pe,maxRightX:Fn}},_e=n.content.isolatedRegions,Se,Oe,Ee=K.waves;if(Ee){let Q,pe=Xh(Ee.ids.length,Ee.origin,Ee.floors,(ot,Fn)=>(nC(Ee,ot,Fn),Mn(),Q=ae(),_e.length>0&&$w(_e,K,Q.nextY+8,o),Ee.pass),Kt);rC(Ee,pe),Oe={passes:pe.passes,capped:pe.capped},Se=Q}else Se=ae();let $e=Se.swimlanes,Le=Se.nextY,qe=x4(n.content.milestones,K);qe.length>0&&(Mn(),K.slackCorridors=qe,Se=ae(),$e=Se.swimlanes,Le=Se.nextY),Ww(K,Se.maxRightX+Qt);let ht=[];if(_e.length>0){let Q=$w(_e,K,Le+8,o);ht=Q.regions,Le=Q.endY}K.chartBottomY=Le,K.swimlaneBottomY=Le,It.box.height=K.chartBottomY-It.box.y;let _t=RC(n.content.milestones,K),Xt=pl($e);for(let Q of ht)Xt=Math.max(Xt,pl(Q.nestedSwimlanes));for(let Q of G)Xt=Math.max(Xt,Q.centerX+Q.radius);for(let Q of _t)Xt=Math.max(Xt,Q.center.x+Q.radius);let Zt=f.daysPerUnit(d.unit),Jt=K.scale.showsNonWorking?K.scale.indexAtX(Xt):(Xt-N)/X,ci=Jt>0?em(g,Jt,d.unit,Zt,f):0;if(ci>R){let Q=f.dateAtWorkingIndex(g,ci),pe=K.scale.showsNonWorking?An(g,Q)*X:ci*X,ot=new Iu({domain:[g,Q],range:[N,N+pe],calendar:f,nonWorking:$});K.scale=ot,It.endDate=Q,It.box.width=pe,It.ticks=Sw(ot,d,f,l),DC(It,ot,d.unit),Ww(K,N+pe+Qt)}let _r=$C(It.nonWorking);Ww(K,LC(_r,A,K.chartRightX,o.estimateTextWidth));for(let Q of $e)Q.box.width=K.chartRightX;for(let Q of ht)Lw(Q,K.chartRightX);let ns=G.map(Q=>({id:Q.id,centerX:Q.centerX,radius:Q.radius,title:Q.title,fontSize:Q.fontSize,bold:Q.bold}));for(let Q of _t)Q.fixed||ns.push({id:Q.id??"",centerX:Q.center.x,radius:Q.radius,title:Q.title,fontSize:10,bold:!0});ns.push(..._r);let Ve=MC(ns,A,K.chartRightX,o.estimateTextWidth);K.markerRowPlacements.clear();for(let[Q,pe]of Ve.placements){let ot=Xe+13+pe.rowIndex*26;K.markerRowPlacements.set(Q,{rowIndex:pe.rowIndex,centerY:ot,labelBox:{...pe.labelBox,y:ot-4},labelSide:pe.labelSide})}for(let Q of _t){let pe=K.markerRowPlacements.get(Q.id??"");pe&&(Q.center={x:Q.center.x,y:pe.centerY},Q.labelBox=pe.labelBox,Q.labelSide=pe.labelSide)}for(let Q of It.nonWorking??[]){if(Q.label===void 0)continue;let pe=K.markerRowPlacements.get(FC(Q));pe&&(Q.labelBox=pe.labelBox,Q.labelSide=pe.labelSide)}for(let Q of G){let pe=K.markerRowPlacements.get(Q.id);pe&&K.entityMidpoints.set(Q.id,{x:Q.centerX,y:pe.centerY})}for(let Q of _t)Q.fixed||K.entityMidpoints.set(Q.id??"",{x:Q.center.x,y:Q.center.y});let Gt=L||_r.length>0?Math.max(1,Ve.rowCount):0;if(Gt>Y){let Q=(Gt-Y)*26;K.timeline.markerRow.height=Gt*26,K.timeline.box.height+=Q,K.chartTopY+=Q,K.chartBottomY+=Q,K.swimlaneBottomY+=Q;for(let pe of $e)Wh(pe,Q);for(let pe of ht)UP(pe,Q);for(let pe of _t)if(pe.cutTopY=K.chartTopY,pe.cutBottomY=K.swimlaneBottomY,pe.slackArrows)for(let ot of pe.slackArrows)ot.y+=Q}b&&(K.timeline.bottomTickPanelY=K.chartBottomY+8,K.timeline.bottomTickPanelHeight=T,K.chartBottomY+=8+T);let Wt=cl(l),kt=K.waves?PC(K.waves,K,Wt,$e,ht):void 0;kt&&(kt.regionCrossings.forEach((Q,pe)=>{Q.length>0&&(ht[pe].waveCrossings=Q)}),kt.placeholder!==void 0&&It.waveStrip&&(It.waveStrip.placeholder=kt.placeholder));let ro=new Set(_t.map(Q=>Q.center.x)),$u=vC(n.content.anchors,K,ro),c$=o.collectItems(E),u$=o.buildDependencies(c$,$e,ht,K),f$=o.buildNowline(r.today,K,l),Lu=kt?CC(kt,K,Wt,K.chartBottomY+Yu):void 0;Lu&&(K.chartBottomY+=Yu+Lu.box.height);let rs=Ow(n.content.footnotes,K,K.chartBottomY);K.footnoteIndex=rs.index,K.footnoteHosts=rs.hosts,M.height=M.height||K.chartBottomY,y||(M.width=K.chartRightX);let d$=y?{x:6,y:cn-z.cardHeight,width:z.cardWidth,height:z.cardHeight}:{x:0,y:0,width:K.chartRightX,height:ju},p$=rs.area.entries.length>0?rs.area.box.y+rs.area.box.height:K.chartBottomY,bm={x:K.chartRightX-Qt-Hm,y:p$+Qt,width:Hm,height:K_},h$=bm.y+bm.height+Qt,m$={box:M,position:x.headerPosition,title:O,author:H,titleLines:z.titleLines,authorLines:z.authorLines,cardBox:d$,logo:void 0,style:x,attributionBox:bm};return{width:K.chartRightX,height:h$,theme:s,palette:a,backgroundColor:a.surface.page,header:m$,timeline:It,nowline:f$,swimlanes:$e,anchors:$u,milestones:_t,edges:u$,footnotes:rs.area,includes:ht,chartBox:{x:A,y:K.chartTopY,width:K.chartRightX-A,height:K.chartBottomY-K.chartTopY},...Oe?{waveSolve:Oe}:{},...kt?{waves:kt.waves}:{},...kt&&kt.boundaries.length>0?{waveBoundaries:kt.boundaries}:{},...kt&&kt.crossings.length>0?{waveCrossings:kt.crossings}:{},...Lu?{waveLegend:Lu}:{}}}};function x4(e,t){let n=[];for(let[r,i]of e){let o=de(i.properties,"date"),s=De(i.properties,"after"),a=Ge(o),c=nm(s,t),l=rm(c);if(a){let f=t.scale.forwardWithinDomain(a);if(f===null)continue;let d=Mw(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 MC(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=r(a.title,a.fontSize)*(a.bold?1.05:1),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,_=P=>P==="right"?f:d,x=(P,O)=>{let H=Math.min(p,P),z=Math.max(h,P+c);return s[O].some(M=>M.left<z&&M.right>H)},y=-1,T="right",w=l;e:for(let P=s.length-1;P>=0;P--)for(let O of["right","left"]){if(!_(O))continue;let H=g(O);if(!x(H,P)){y=P,T=O,w=H;break e}}if(y===-1){for(let[P,O]of o)o.set(P,{...O,rowIndex:O.rowIndex+1});s=[[],...s],y=0,T=f?"right":"left",w=g(T)}let b=Math.min(p,w),$=Math.max(h,w+c);s[y].push({left:b,right:$}),o.set(a.id,{rowIndex:y,labelBox:{x:w,y:0,width:c,height:12},labelSide:T})}return{placements:o,rowCount:s.length}}function v4(e){return e.directive?.properties.find(n=>T4(n.key)==="locale")?.value}function T4(e){return e.endsWith(":")?e.slice(0,-1):e}function w4(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 _4(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 E4(e,t){if(e)return/^\d+(?:\.\d+)?[dwmqy]$/.test(e)||/^\d+%$/.test(e)?e:t.sizes.get(e)?.effortLiteral??e}function b4(e,t){if(e)return t.teams.get(e)?.title??t.persons.get(e)?.title??e}function k4(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 um(e,t,n,r,i){let o=KP(e,t),s=e.name??e.title??"",a=o.padding==="none"?"xs":o.padding,c=H_[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:po}}}function UC(e,t){let n=I_(e,t.sizes,t.cal),r=R_(de(e,"remaining"),t.sizes,t.cal),i=de(e,"status"),o=w4(i),s=_4(i);s===0&&o==="done"&&(s=1);let a=/^(\d{1,3})%$/.exec(de(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 XC(e,t,n,r,i,o,s){let a=de(e,"duration"),c=!!a&&/^\d+(?:\.\d+)?[dwmqy]$/.test(a),l=r?r.title??r.name:"",u=c?a:l||void 0,f=de(e,"remaining"),d=E4(f,t),p=b4(n??de(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 _=de(e,"capacity"),x=ui(_),y=null,T=0;if(x!==null){let w=yl(x),b=xl(s,t.symbols);y={value:x,text:w,icon:b};let $=11;T=(g?ct(" ",$):0)+io(w,b,$)}return{metaText:g,ownerDisplay:p,capacity:y,capacityTrailingWidth:T}}function GC(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 jC(e,t,n){return Fl({barWidth:e,footnoteLabels:t.map(String),hasBeforeGlyph:Ln(n)!==void 0})}function zw(e,t,n,r){let i=e.properties,o=pt("item",i,n.styleCtx),s=de(i,"size"),a=s?n.sizes.get(s)??null:null,c=fi(i,n.sizes,n.cal),l=De(i,"after"),u=De(i,"before"),f=YC(i,t.x,t.x,n),d;n.waves&&(f=Ko(e,f,n),d=sC(e,f,n));let p=d===void 0?I4(i,f,n):void 0,h=n.scale.startX(f),g=Math.max(Rn,Zo(n,h,c)),_=h,x=h+g,y=de(i,"link"),T=k4(y),w=T.icon!=="none",b=Math.max(Rn,g-2*un),$=De(i,"labels"),P=[];for(let Ve of $){let Gt=n.labels.get(Ve);if(!Gt)continue;let Wt=um(Gt,n.styleCtx,0,0);P.push({id:Gt,width:Wt.box.width})}let O=0;for(let Ve=0;Ve<P.length;Ve+=1)Ve>0&&(O+=Nr),O+=P[Ve].width;let H=Math.max(0,b-2*ir),z=P.length>0&&O>H,M=!1,A,U;if(u.length>0){let Ve,Gt;for(let Wt of u){let kt=Ge(Wt),ro=kt?n.scale.forwardWithinDomain(kt)??void 0:n.entityLeftEdges.get(Wt);ro!==void 0&&(Ve===void 0||ro<Ve)&&(Ve=ro,Gt=Wt)}Ve!==void 0&&x>Ve&&(M=!0,A={x:Ve,y:t.y,width:x-Ve,height:n.bandScale.bandwidth()},U=Gt)}let{status:X,progress:R}=UC(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},V=n.styleCtx.theme.name,ie=V==="dark",oe=ie?"#0f172a":"#ffffff",ye=V==="grayscale"?"#9e9e9e":"#94a3b8";o.bg===oe&&(o.bg=V==="grayscale"?j[X]:ie?N[X]:C[X]),o.fg===ye&&(o.fg=q[X]);let{metaText:ne,ownerDisplay:se,capacity:k,capacityTrailingWidth:L}=XC(i,n,r,a,X,R,o.capacityIcon),F=e.title??e.name??"",G=GC(e.name,n),Z=new zh({id:e.name??"",title:F,logicalLeftX:_,logicalRightX:x,metaText:ne,metaTrailingWidth:L,hasLinkIcon:w,hasAfterGlyph:Ln(l)!==void 0,titleFirstLineRightReservePx:jC(b,G,u)}).place({x:_,y:t.y},{time:n.scale,bands:n.bandScale,style:o}),Y=Z.box,re=n.bandScale.bandwidth(),le=Y.width<fs,xe=w&&Y.width<rf,Te=Y.width<of,me=Z.textSpills||xe,ze=kw(F,Z,xe),Ze=ze.length,Xe=null;z&&(Xe=pg(P,Y.width));let cn=Xe?Xe.rows.length:P.length>0?1:0,tr=ne!==void 0||k!==null,It=Dl(Ze,tr),no=nf(Ze,tr),K=zC(z,me,cn,re,It),wr=Math.max(no,K);wr>0&&(Y.height=re+wr);let ai=[],li=Y.y+re-nr-po-mi,ts=Y.y+(z&&me?Math.max(cs,It):It)+mi,E=z&&me||!z&&P.length>0?Math.max(li,ts):li,B=z?Y.x+Y.width+Ir:Y.x+ir,J=B;if(Xe)for(let Ve=0;Ve<Xe.rows.length;Ve+=1){let Gt=E+Ve*dg,Wt=B;for(let ro of Xe.rows[Ve]){let $u=um(ro.id,n.styleCtx,Wt,Gt);ai.push($u),Wt+=$u.box.width+Nr}let kt=Wt-Nr;kt>J&&(J=kt)}else{let Ve=B;for(let Gt of P){let Wt=um(Gt.id,n.styleCtx,Ve,E);ai.push(Wt),Ve+=Wt.box.width+Nr}J=P.length>0?Ve-Nr:B}let ae=se??r??de(i,"owner"),_e=e.description?.text,Se=G.length>0&&Te,Ee=Y.x+Y.width+Ir,$e=!1,Le=null;xe&&($e&&(Ee+=Sn),Le=Ee,Ee=Le+Sr,$e=!0);let qe=0;if(me){$e&&(Ee+=Sn);let Ve=Math.max(...ze.map(Wt=>ct(Wt,$l))),Gt=(ne?ct(ne,11):0)+L;qe=Math.max(Ve,Gt),Ee+=qe,$e=!0}let ht=null;Se&&($e&&(Ee+=Sn),ht=Ee,Ee+=G.length*In,$e=!0);let _t=null;le&&($e&&(Ee+=Sn),_t=Ee+or,Ee=_t+or,$e=!0);let Xt=Math.max(Y.x+Y.width,Ee),Zt=e.name;Zt&&(n.entityLeftEdges.set(Zt,_),n.entityRightEdges.set(Zt,x)),iC(e,Y.x+Y.width+un,n);let Jt=Zt??HC(e);n.itemFlowKey.set(Jt,n.currentFlowKey),t.x=x,t.maxX=Math.max(t.maxX,t.x),t.height=Math.max(t.height,n.bandScale.step()+wr);let ci=DP({box:Y,afterDate:Ln(l),beforeDate:Ln(u),hasLinkIcon:w,footnoteCount:G.length}),_r={kind:"item",id:Zt,title:F,...ze.length>=2||ze[0]!==F?{titleLines:ze}:{},box:Y,status:X,progressFraction:R,footnoteIndicators:G,labelChips:ai,chipsOutside:z,chipsRightX:J,linkIcon:T.icon,linkHref:T.href,hasOverflow:M,overflowBox:A,overflowAnchorId:U,owner:ae,description:_e,metaText:ne,textSpills:me,dotSpills:le,iconSpills:xe,footnoteSpills:Se,dotSpillCx:_t,iconSpillX:Le,footnoteSpillStartX:ht,decorationsRightX:Xt,capacity:k,size:a,style:o,inlineDatePins:ci.length>0?ci:void 0},ns=oC(e,n);return ns!==void 0&&(_r.waveRole=ns),d!==void 0&&(_r.wavePinOverride=d),p!==void 0&&(_r.nonWorkingPin=p),n.placedItems.set(Jt,_r),_r}function A4(e,t,n){return new qh(e,{sequenceOne:qw,newCursor:Fh}).place(t,n)}function R4(e,t,n){return new jh(e,{sequenceItem:zw,sequenceOne:qw,resolveChildStart:VC,newCursor:Fh,estimateTextWidth:ct,predictItemBarExtraHeight:qC}).place(t,n)}function qw(e,t,n){if(Mt(e))return zw(e,t,n);if(Tt(e))return A4(e,t,n);if(He(e))return R4(e,t,n);throw new Error(`Unknown swimlane child type: ${e.$type??"unknown"}`)}function HC(e){let t=e.$cstNode?.range.start;return`#item@${t?t.line+1:0}:${t?t.character+1:0}`}function zC(e,t,n,r,i){if(n===0)return 0;let o=r-nr-po-mi,s;e&&t?s=Math.max(cs,i)+mi:e?s=o:s=Math.max(o,i+mi);let c=s+(n-1)*dg+po+mi+nr;return Math.max(0,c-r)}function qC(e,t,n){let r=e.properties,i=n.bandScale.bandwidth(),o=fi(r,n.sizes,n.cal),s=Math.max(Rn,Zo(n,t,o)),a=Math.max(Rn,s-2*un),c=de(r,"size"),l=c?n.sizes.get(c)??null:null,{status:u,progress:f}=UC(r,n),{metaText:d,capacity:p,capacityTrailingWidth:h}=XC(r,n,void 0,l,u,f,pt("item",r,n.styleCtx).capacityIcon),g=d!==void 0||p!==null,_=!!de(r,"link"),x=e.title??e.name??"",y=Ln(De(r,"after"))!==void 0,T=hi(_,y?{barWidth:a}:void 0),w=Math.max(0,a-T-ir),b=Math.max(0,a-T-jC(a,GC(e.name,n),De(r,"before"))),$=bw(x,w,Ew(d,h),b),P=_&&a<rf,O=$.textSpills||P,H=kw(x,$,P).length,z=nf(H,g),M=De(r,"labels"),A=[];for(let q of M){let V=n.labels.get(q);if(!V)continue;let ie=um(V,n.styleCtx,0,0);A.push({id:V,width:ie.box.width})}if(A.length===0)return z;let U=0;for(let q=0;q<A.length;q+=1)q>0&&(U+=Nr),U+=A[q].width;let X=Math.max(0,a-2*ir),R=U>X,C=R?pg(A,a):null,N=C?C.rows.length:1,j=zC(R,O,N,i,Dl(H,g));return Math.max(z,j)}function VC(e,t,n,r){return Ko(e,YC(e.properties,t,n,r),r)}function YC(e,t,n,r){let i=Ge(de(e,"date"))??Ge(de(e,"start"));if(i){let s=r.scale.forwardWithinDomain(i);if(s!==null)return s}let o=De(e,"after");if(o.length>0){let s=n;for(let a of o){let c=Ge(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 I4(e,t,n){if(!n.calendar.hasNonWorkingDays)return;let r=S4(e);if(!r||n.calendar.isWorkingDay(r.date))return;let i=n.scale.forwardWithinDomain(r.date);if(!(i===null||Math.abs(t-i)>=Kt))return{key:r.key,pin:r.raw,start:Er(Au(t,n))}}function S4(e){for(let t of["date","start"]){let n=de(e,t),r=Ge(n);if(n!==void 0&&r)return{key:t,raw:n,date:r}}for(let t of De(e,"after")){let n=Ge(t);if(n)return{key:"after",raw:t,date:n}}}var Uw=6;function N4(e,t){let n=Wm-32,r=Ol(e,n,16),i=Ol(t??"",n,11),o=0;for(let d of r)o=Math.max(o,ct(d,16));for(let d of i)o=Math.max(o,ct(d,11));let s=o+32,a=Math.max(V_-Uw,Math.min(Wm-Uw,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+Uw;return{titleLines:r,authorLines:i,cardWidth:a,cardHeight:u,boxWidth:f}}function P4(e,t,n,r,i,o){let a=e.roadmapDecl?.properties??[],c=de(a,"start"),l=Ge(c)??C4(r),u=de(a,"length"),f=0;if(u){let x=O4(u,t.cal);x>0&&(f=x)}let d=t.calendar??Tl(t.cal),p=KC(n,{cal:t.cal,sizes:t.sizes,calendar:d},l,f>0?void 0:r,o),h=O_(i.unit,t.cal),g=em(l,p>0?p:4*t.cal.daysPerWeek,i.unit,h,d),_=Math.max(f,g);return{startDate:l,endDate:d.dateAtWorkingIndex(l,Math.max(1,_))}}function C4(e){let t=e??new Date;return new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()))}function O4(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 KC(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=Ge(de(h.properties,"date"));if(g&&h.name){let _=o(g);a.set(h.name,_),l=Math.max(l,_)}}let u=()=>({itemEnd:s,anchorEnd:a,milestoneEnd:c,sizes:t.sizes}),f=(h,g,_)=>{let x=w=>{let b=Ge(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 $=b;for(let P of w)P.$type!=="DescriptionDirective"&&($=T(P,$),_($));return $},T=(w,b)=>{if(Mt(w)){let $=fi(w.properties,h.sizes,t.cal),P=Ge(de(w.properties,"date")),O=Ge(de(w.properties,"start")),H=De(w.properties,"after"),z=b;P?z=o(P):O?z=o(O):H.length>0&&(z=Math.max(b,...H.map(x))),g&&(z=g.apply(w,z));let M=z+$;return w.name&&h.itemEnd.set(w.name,M),g?.accumulate(w,M),M}if(Tt(w)){let $=De(w.properties,"after"),P=$.length>0?Math.max(b,...$.map(x)):b;g&&(P=g.apply(w,P));let O=P;for(let H of w.content){if(H.$type==="DescriptionDirective")continue;let z=T(H,P);O=Math.max(O,z)}return O}if(He(w)){let $=De(w.properties,"after"),P=$.length>0?Math.max(b,...$.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,_=y=>{g=Math.max(g,y)},x=Xh(h.length,0,QP(i,n,t.calendar),(y,T)=>{let w=h.map((P,O)=>[P,T[O]]);s=new Map(w),g=0;let b=new Yo(i,y),{walkLane:$}=f(u(),b,_);for(let P of e.content.swimlanes.values())$(P.content,0);for(let P of e.content.isolatedRegions){let O=f({itemEnd:new Map(w),anchorEnd:new Map,milestoneEnd:new Map,sizes:os(P.content.sizes,t.cal)},b,_);for(let H of P.content.swimlanes.values())O.walkLane(H.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=Ge(de(h.properties,"date"));if(g){let x=o(g);h.name&&c.set(h.name,x),l=Math.max(l,x);continue}let _=De(h.properties,"after");if(_.length>0){let x=Math.max(0,..._.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=KC({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 $4(e,t,n,r){let i=new Dh(CP(t,n)),o=[],s=[],a=r.bandScale.bandwidth();for(let[u,f]of e){let d=De(f.properties,"after"),p=r.placedItems.get(u);if(!p)continue;let h=FP(p,a);for(let g of d){let _=r.placedItems.get(g),x,y=_===void 0;if(_)x=BP(_,a);else{let T=r.entityMidpoints.get(g);if(!T)continue;x={x:T.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=OP(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:pt("item",[],r.styleCtx)})}return l}function L4(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=cl(n).nowLabel,a=ct(s,Al),c=Math.max(Mm,Math.ceil(a+2*ls)),l=t.timeline.originX-Qt,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:pt("item",[],t.styleCtx)}}function D4(e){let t=new Map,n=r=>{if(Mt(r)){t.set(r.name??HC(r),r);return}if(Tt(r)){for(let i of r.content)i.$type!=="DescriptionDirective"&&n(i);return}if(He(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 Vw(e,t,n={}){let r=gw(t);return new cm().place(e,t,n,r,{sequenceItem:zw,sequenceOne:qw,resolveChildStart:VC,newCursor:Fh,estimateTextWidth:ct,predictItemBarExtraHeight:qC,computeDateWindow:P4,sizeBesideHeader:N4,collectItems:D4,buildDependencies:$4,buildNowline:L4})}function dm(e){return e.toISOString().slice(0,10)}function Yw(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 Kw(e,t){for(let n of e)n.kind==="item"?t(n):Kw(n.children,t)}function M4(e,t,n){let r=Yw(e);e.textSpills&&n.push(Dn(t,"NL.I1000","info",{name:r},r)),e.chipsOutside&&n.push(Dn(t,"NL.I1001","info",{name:r},r)),(e.box.width<fs||e.dotSpills||e.iconSpills||e.footnoteSpills)&&n.push(Dn(t,"NL.I1002","info",{name:r},r)),e.hasOverflow&&n.push(Dn(t,"NL.I1003","info",{name:r,anchor:e.overflowAnchorId},r)),ZC(e,t,n),JC(e,t,n)}function ZC(e,t,n){let r=e.wavePinOverride;if(!r)return;let i=Yw(e);n.push(Dn(t,"NL.W1001","warning",{name:i,pin:r.pin,key:r.key,wave:r.wave,start:r.start},i))}function JC(e,t,n){let r=e.nonWorkingPin;if(!r)return;let i=Yw(e);n.push(Dn(t,"NL.I1008","info",{name:i,pin:r.pin,key:r.key,start:r.start},i))}function Dn(e,t,n,r,i){return{message:Zr(e,t,r),severity:n,code:t,entityId:i,lspSeverity:n==="warning"?2:3,data:{code:t,args:r}}}function QC(e,t,n){let r=e.id??e.title,i=[];Kw(e.children,a=>i.push(a));for(let a of i)M4(a,t,n);let o=new Set(i.map(a=>a.box.y));o.size>1&&n.push(Dn(t,"NL.I1004","info",{lane:r,rows:o.size},r)),(e.utilization?.segments.some(a=>a.classification==="red")??!1)&&n.push(Dn(t,"NL.I1005","info",{lane:r},r));for(let a of e.nested)QC(a,t,n)}function eO(e,t,n){Kw(e.children,r=>{ZC(r,t,n),JC(r,t,n)});for(let r of e.nested)eO(r,t,n)}function F4(e,t,n){e.waveSolve?.capped&&n.push(Dn(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(Dn(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(Dn(t,"NL.I1007","info",{name:a,date:o.overrunDate,wave:s.id,end:dm(s.endDate)},a))}}function Zw(e,t={}){let n=t.locale??"en-US",r=[];for(let i of e.swimlanes)QC(i,n,r);for(let i of e.includes)for(let o of i.nestedSwimlanes)eO(o,n,r);if(F4(e,n,r),t.today){let i=t.today,o=e.timeline.startDate,s=e.timeline.endDate;(i<o||i>s)&&r.push(Dn(n,"NL.W1000","warning",{date:dm(i),start:dm(o),end:dm(s)}))}return r}var Qo=class extends Error{constructor(t){super(t),this.name="TimezoneError"}};function Jw(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 Qo(`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 Qo(`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 pm(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 B4=/^(\d{4})-(\d{2})-(\d{2})$/,W4=/^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?)(Z|([+-])(\d{2})(?::?(\d{2}))?)$/,U4=/^(\d{4})-(\d{2})-(\d{2})T\d{2}:\d{2}:\d{2}(?:\.\d+)?$/;function Qw(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=B4.exec(r);if(i)return new Date(Date.UTC(parseInt(i[1],10),parseInt(i[2],10)-1,parseInt(i[3],10)));let o=W4.exec(r);if(o){let a=new Date(r);if(!Number.isNaN(a.getTime())){if(o[2]==="Z")return pm(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 pm(a,{kind:"offset",ms:d})}}let s=U4.exec(r);return s?new Date(Date.UTC(parseInt(s[1],10),parseInt(s[2],10)-1,parseInt(s[3],10))):void 0}return pm(n(),t)}}function X4(e){return e===2?"warning":e===3?"info":"error"}function tO(e,t){return{severity:X4(e.severity),code:gg(e),message:e.message,suggestion:lf(e.message),file:t,line:(e.range?.start.line??0)+1,column:(e.range?.start.character??0)+1}}function nO(e,t){return{severity:"error",code:"parse-error",message:e.message,file:t,line:e.token?.startLine??1,column:e.token?.startColumn??1}}function rO(e,t){return{severity:"error",code:"lex-error",message:e.message,file:t,line:e.line??1,column:e.column??1}}function iO(e,t){let n=e.line!==void 0?e.line+1:1;if(!ll(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=lf(r);return{severity:e.severity,code:e.code??cf(e.message),message:r,...i===void 0?{}:{suggestion:i},file:e.sourcePath,line:n,column:1}}function oO(e,t,n="warning"){return{severity:n,code:"render.warning",message:e,file:t,line:1,column:1}}function sO(e,t){return{severity:e.severity,code:e.code,message:e.message,file:t,line:1,column:1}}var aO="__nowline_browser_noop_include__";async function lO(e){throw new Error(`${aO}: include "${e}" was skipped \u2014 running in single-file mode.`)}function e_(e){return e.includes(aO)}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"}},G4={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"}},cO={...to,...G4};var bae={none:"",multiplier:"x",person:to.person.ascii,people:to.people.ascii,points:to.points.ascii,time:to.time.ascii};var hm=class{constructor(t="nl"){S(this,"prefix");S(this,"counter",0);this.prefix=t}next(t){let n=`${this.prefix}-${this.counter++}`;return t?`${n}-${t}`:n}};var j4=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"]),H4=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 z4(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=q4(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}=V4(a);t.push({kind:s?"self":"open",name:c,attrs:l}),n=i+1}return t}function q4(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 V4(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 Su(e){return e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Y4(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 uO(e,t={}){let n=t.idPrefix??"nl-logo",r=t.onWarn??(()=>{}),i=z4(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(Su(l.text??""));continue}if(l.kind==="text"){if(c.length===0||c[c.length-1]){let u=(l.text??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");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(!j4.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(!H4.has(p)){r(`sanitizer: dropping attribute ${p}`);continue}if(p==="href"||p==="xlink:href"){let g=Y4(h,o);if(g===null){r(`sanitizer: dropping external href ${h}`);continue}f.push(` ${p}="${Su(g)}"`);continue}if(p==="style"){r("sanitizer: dropping inline style");continue}if(p==="id"){let g=o.get(h);g&&f.push(` id="${Su(g)}"`);continue}if(/\burl\(#/i.test(h)){let g=h.replace(/url\(#([^)]+)\)/gi,(_,x)=>{let y=o.get(x);return y?`url(#${y})`:"none"});f.push(` ${p}="${Su(g)}"`);continue}if(/data:|javascript:|vbscript:/i.test(h)){r(`sanitizer: dropping suspicious value at ${p}`);continue}f.push(` ${p}="${Su(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 fO=/&/g,dO=/</g,pO=/>/g,K4=/"/g,Z4=/'/g;function Bt(e){return e.replace(fO,"&amp;").replace(dO,"&lt;").replace(pO,"&gt;")}function ii(e){return e.replace(fO,"&amp;").replace(dO,"&lt;").replace(pO,"&gt;").replace(K4,"&quot;").replace(Z4,"&#39;")}function ml(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}="${ii(String(i))}"`))}return n.length?` ${n.join(" ")}`:""}function te(e,t,n){return n===void 0||n===""?`<${e}${ml(t)}/>`:`<${e}${ml(t)}>${n}</${e}>`}function Ie(e,t){return`<text${ml(e)}>${Bt(t)}</text>`}function m(e){return Number.isFinite(e)?Number.isInteger(e)?e.toString():(Math.round(e*100)/100).toString():"0"}var J4={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 Q4(e,t){let n=`${e}-shadow-${t}`,r=J4[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 hO(e,t){return t==="none"?null:`url(#${e}-shadow-${t})`}function mO(e){return["subtle","soft","hard"].map(t=>Q4(e,t)).join("")}var ej={thin:100,light:300,normal:400,bold:700};function tj(e){return as[e]??14}function r_(e,t,n){return{"font-family":t[e.font],"font-size":n??tj(e.textSize),"font-weight":ej[e.weight]??400,"font-style":e.italic?"italic":"normal",fill:e.text}}function nj(e){if(e.border==="dashed")return"4 3";if(e.border==="dotted")return"1 3"}function wO(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 rj(e,t){return wO(e)>=.24?t.statusDot.onLight:t.statusDot.onDark}function ym(e,t){return e.length*t*.58}function _O(e,t,n,r,i,o,s){let a=i*.58,c=t?ym(t,i):0,l=t?a:0,u=n+c+l,{text:f,icon:d}=e,p=ym(f,i),h={"font-family":o,"font-size":i,fill:s};if(!d)return Ie({x:m(u),y:m(r),...h},f);if(d.kind==="builtin"&&d.name==="multiplier")return Ie({x:m(u),y:m(r),...h},`${f}\xD7`);if(d.kind==="builtin"){let _=to[d.name],x=Ie({x:m(u),y:m(r),...h},f),y=i*.1,T=i,w=u+p+y,b=r-i*.85,$=`<svg x="${m(w)}" y="${m(b)}" width="${m(T)}" height="${m(T)}" viewBox="${_.viewBox}" style="color:${ii(s)}" aria-hidden="true">${_.body}</svg>`;return x+$}let g=m(i*.1);return`<text x="${m(u)}" y="${m(r)}" font-family="${ii(o)}" font-size="${i}" fill="${ii(s)}">${Bt(f)}<tspan dx="${g}">${Bt(d.text)}</tspan></text>`}var gO=.6,ij=.5;function oj(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 Ie({x:m(r),y:m(i),...c},t);if(!t)return _O(n,void 0,r,i,o,s,a);let l=m(o*gO),u=`<text x="${m(r)}" y="${m(i)}" font-family="${ii(s)}" font-size="${o}" fill="${ii(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 $=m(o*.1);return u+Bt(t)+`<tspan dx="${l}">${Bt(f)}</tspan><tspan dx="${$}">${Bt(d.text)}</tspan></text>`}let p=to[d.name],h=$=>$.length*o*ij,g=r+h(t)+o*gO,_=o*.1,x=o,y=g+h(f)+_,T=i-o*.85,w=u+Bt(t)+`<tspan dx="${l}">${Bt(f)}</tspan></text>`,b=`<svg x="${m(y)}" y="${m(T)}" width="${m(x)}" height="${m(x)}" viewBox="${p.viewBox}" style="color:${ii(a)}" aria-hidden="true">${p.body}</svg>`;return w+b}function sj(e,t){let n=cO.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:${ii(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 i_(e,t){return!e||e.length===0?"":e.map(n=>sj(n,t)).join("")}function aj(e){return(e?.length??0)>0}function EO(e){return e?.some(t=>t.side==="after")??!1}function lj(e,t,n,r,i,o={}){let s=Math.min(wl[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":nj(i)??null,...o})}function cj(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(Ie({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(Ie({x:m(i+16),y:m(p+18+y*14),"font-family":r[e.style.font],"font-size":11,fill:h},x))});let _=g.join("");return te("g",{"data-layer":"header","data-id":`${t}-header`},u+d+_)}function uj(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 bO(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?s_(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 fj(e,t,n){let r=e.box.y+e.box.height,i=[];for(let o of e.nonWorking??[]){if(o.label===void 0||!o.labelBox)continue;let s=o.labelBox,a=s.y+4;o.cut&&i.push(te("line",{x1:m(o.x),y1:m(a),x2:m(o.x),y2:m(r),stroke:t.timeline.nonWorkingSeam,"stroke-width":1,"stroke-dasharray":"1 3"}));let c=o.labelSide==="left",l={x:m(c?s.x+s.width:s.x),y:m(a+4),"font-family":n.sans,"font-size":10,fill:t.timeline.labelText};c&&(l["text-anchor"]="end"),i.push(Ie(l,o.label))}return i.length===0?"":te("g",{"data-layer":"non-working-label"},i.join(""))}function dj(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 _ of e.ticks)_.major&&(!_.label||_.labelX===void 0||(l&&s.push(Ie({x:m(_.labelX),y:m(a+El(c)),"font-family":n.sans,"font-size":oo,fill:o,"text-anchor":"middle"},_.label)),g&&s.push(Ie({x:m(_.labelX),y:m(p+El(h)),"font-family":n.sans,"font-size":oo,fill:o,"text-anchor":"middle"},_.label))));return te("g",{"data-layer":"timeline"},s.join(""))}function pj(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":Gu}),s=hj(e,r),a=mj(e,i,n);return te("g",{"data-layer":"nowline"},o+s+a)}function kO(e){let t=Gu/2;return e.pillMode==="flag-right"?e.x-t:e.pillMode==="flag-left"?e.x+t:e.x}function hj(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=kO(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 mj(e,t,n){let r=e.pillTopY+Bm,i=kO(e),o,s;return e.pillMode==="center"?(o=e.x,s="middle"):e.pillMode==="flag-right"?(o=i+ls,s="start"):(o=i-ls,s="end"),Ie({x:m(o),y:m(r),"font-family":n.sans,"font-size":Al,"font-weight":700,fill:t,"text-anchor":s},e.label)}function gj(e,t,n,r,i){let o=[];e.waveTooltip!==void 0&&o.push(`<title>${Bt(e.waveTooltip)}</title>`);let s=hO(n,e.style.shadow);o.push(lj(e.box.x,e.box.y,e.box.width,e.box.height,e.style,{filter:s??null})),e.waveRole==="background"&&o.push(Fj(e.box,e.style,n));let a=rj(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-nr),width:m(x),height:nr,fill:e.style.fg,opacity:.55}))}let u=e.dotSpills&&e.dotSpillCx!==null?e.dotSpillCx:e.box.x+e.box.width-co;o.push(te("circle",{cx:m(u),cy:m(e.box.y+sg),r:or,fill:l})),o.push(i_(e.inlineDatePins,e.style.fg));let f;if(e.textSpills)f=e.box.x+e.box.width+Ir,e.iconSpills&&(f+=Sr+Sn);else{let x=!!e.linkIcon&&e.linkIcon!=="none",T=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+T}let d=e.style.text,p=r.entities.item.text,h=e.textSpills?p:d,g=e.textSpills?p:e.style.fg,_=e.titleLines??(e.title?[e.title]:[]);if(_.forEach((x,y)=>{x!==""&&o.push(Ie({x:m(f),y:m(e.box.y+ef+y*Ll),"font-family":i[e.style.font],"font-size":$l,"font-weight":600,fill:h},x))}),(e.metaText||e.capacity)&&o.push(oj({metaText:e.metaText,capacity:e.capacity,x:f,baselineY:e.box.y+tf(_.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 T=0;T<e.footnoteIndicators.length;T++){let w=e.footnoteIndicators[T];o.push(Ie({x:m(y),y:m(x),"font-family":i.sans,"font-size":Ml,"font-weight":700,fill:p},String(w))),y+=In}}else{let y=e.box.x+e.box.width-us;for(let T=e.footnoteIndicators.length-1;T>=0;T--){let w=e.footnoteIndicators[T];o.push(Ie({x:m(y),y:m(x),"font-family":i.sans,"font-size":Ml,"font-weight":700,fill:e.style.text,"text-anchor":"end"},String(w))),y-=In}}}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,T=Sr,w=e.iconSpills&&e.iconSpillX!==null?e.iconSpillX:e.box.x+uo,b=e.box.y+uo,$=te("rect",{x:m(w),y:m(b),width:T,height:T,rx:2,ry:2,fill:y}),P=w,O=b,H=te("path",{d:`M${m(P+4)} ${m(O+10)} L${m(P+10)} ${m(O+4)} M${m(P+6)} ${m(O+4)} H${m(P+10)} V${m(O+8)}`,stroke:"#ffffff",fill:"none","stroke-width":1.1,"stroke-linecap":"round","stroke-linejoin":"round"}),z=$+H,M=e.linkHref?te("a",{href:e.linkHref,target:"_blank",rel:"noopener"},z):z;o.push(M)}if(e.hasOverflow&&e.overflowBox){let x=r.item.overflowTailFill,y=r.item.overflowTailStroke,T=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(Ie({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:T,"text-anchor":"middle"},`past ${e.overflowAnchorId}`))}for(let x of e.labelChips){let y=Math.min(wl[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(Ie({x:m(x.box.x+x.box.width/2),y:m(x.box.y+x.box.height/2+3),...r_(x.style,i,as.xs),"text-anchor":"middle"},x.text))}return te("g",{"data-layer":"item","data-id":e.id??null},o.join(""))}function yj(e,t,n,r,i){let o=[],s=ao(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=lo(e.title),c=e.box.x,l=e.box.y,u=so,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(Ie({x:m(c+kl),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=Wl(s,!!e.title,aj(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(Ie({x:m(ho(e.box.x,ps,EO(e.inlineDatePins))),y:m(e.box.y-sf),...r_(e.style,i,Bl),"fill-opacity":.7},e.title))}o.push(i_(e.inlineDatePins,e.style.fg));for(let a of e.children)o.push(o_(a,t,n,r,i));return te("g",{"data-layer":"group","data-id":e.id??null},o.join(""))}function xj(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(Ie({x:m(ho(e.box.x,hs,EO(e.inlineDatePins))),y:m(e.box.y-sf),...r_(e.style,i,Bl),"fill-opacity":.7},e.title)),o.push(i_(e.inlineDatePins,e.style.fg));for(let s of e.children)o.push(o_(s,t,n,r,i));return te("g",{"data-layer":"parallel","data-id":e.id??null},o.join(""))}function o_(e,t,n,r,i){return e.kind==="item"?gj(e,t,n,r,i):e.kind==="group"?yj(e,t,n,r,i):xj(e,t,n,r,i)}var yO=2;function vj(e,t){switch(e){case"green":return t.swimlane.utilizationOk;case"yellow":return t.swimlane.utilizationWarn;case"red":return t.swimlane.utilizationOver}}function Tj(e,t){if(!e.utilization||e.utilization.segments.length===0)return"";let n=e.box.y+e.box.height-yO,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:yO,fill:vj(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 wj(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 AO(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?io(e.capacity.text,e.capacity.icon,10):0,p=e.footnoteIndicators.length>0?e.footnoteIndicators.join(","):"",h=p?ym(p,10):0,g=Ul(e.box.x,e.title,e.owner,d,h),_=Wu,x=e.box.y+10,y=x+Uu;u.push(te("rect",{x:m(g.tabX),y:m(x),width:m(g.tabW),height:m(_),rx:4,ry:4,fill:o,stroke:s,"stroke-width":1})),u.push(Ie({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(Ie({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(_O(e.capacity,void 0,g.badgeX,y,10,i[e.style.font],c)),p&&u.push(Ie({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(o_(f,t,n,r,i));return u.push(Tj(e,r)),te("g",{"data-layer":"swimlane","data-id":e.id??null},u.join(""))}function _j(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?Ie(f,e.title):"";return te("g",{"data-layer":"anchor","data-id":e.id??null},RO(e.hiddenDate)+c+d)}function Ej(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 bj(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?Ie(u,e.title):"";return te("g",{"data-layer":"milestone","data-id":e.id??null},RO(e.hiddenDate)+a+f)}function RO(e){return e===void 0?"":`<title>${Bt(e)}</title>`}function kj(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":Xu,"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 xO(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:Aj(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 Aj(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 Rj(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(Ie({x:m(e.box.x+Bn),y:m(e.box.y+Um),"font-family":r.sans,"font-size":12,"font-weight":700,fill:s},"Footnotes"));let f=e.box.y+Rl+Bn,d=e.box.x+Bn,p=d+Bn;return e.entries.forEach((h,g)=>{let _=f+g*Il;u.push(Ie({x:m(d),y:m(_),"font-family":r.sans,"font-size":10,"font-weight":700,fill:l},String(h.number))),u.push(Ie({x:m(p),y:m(_),"font-family":r.sans,"font-size":11,"font-weight":600,fill:a},h.title)),h.description&&u.push(Ie({x:m(p+Math.max(120,h.title.length*6)),y:m(_),"font-family":r.sans,"font-size":11,fill:c},`\u2014 ${h.description}`))}),te("g",{"data-layer":"footnotes"},u.join(""))}function Ij(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,_=e.box.width-16,x=e.box.height,y=te("rect",{x:m(h),y:m(g),width:m(_),height:m(x),rx:8,ry:8,fill:a,stroke:s,"stroke-width":1,"stroke-dasharray":Xu}),T=Wu,w=Xl(e.box.x,e.label,e.sourcePath),b=g-T/2,$=te("rect",{x:m(w.tabX),y:m(b),width:m(w.tabWidth),height:T,rx:4,ry:4,fill:c,stroke:l,"stroke-width":1}),P=Ie({x:m(w.tabLabelX),y:m(b+Uu),"font-family":i.sans,"font-size":11,"font-weight":600,fill:u},e.label),O=w.badgeX,H=w.badgeSize,z=g-H/2,M=te("rect",{x:m(O),y:m(z),width:H,height:H,rx:4,ry:4,fill:f,stroke:d,"stroke-width":1}),A=te("path",{d:`M${m(O+7)} ${m(z+4)} H${m(O+14)} V${m(z+11)} M${m(O+4)} ${m(z+7)} H${m(O+11)} V${m(z+14)} H${m(O+4)} Z`,stroke:p,"stroke-width":1.4,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}),U=9,X=g+4,R=te("rect",{x:m(w.sourceHaloX),y:m(X-U),width:m(w.sourceHaloWidth),height:U+6,fill:a}),C=Ie({x:m(w.sourceTextX),y:m(X),"font-family":i.mono,"font-size":U,fill:p},e.sourcePath),N={x:h,y:g,width:_,height:x},j=o?bO(o.timeline,o.chartBox.y,r,N):"",q=o?.waves?PO(o.waves,N)+CO(o.waveBoundaries,N):"",V=o?.waves?OO(e.waveCrossings):"",ie=e.nestedSwimlanes.map(oe=>AO(oe,t,n,r,i)).join("");return te("g",{"data-layer":"include"},y+j+q+ie+V+$+P+M+A+R+C)}function Sj(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=Ie({x:"0",y:s,"font-family":t.sans,"font-size":zu,"font-weight":400,fill:n},Hu)+Ie({x:Nl,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})+Ie({x:qu,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(Sl)})`},a);return te("a",{href:Xm,target:"_blank",rel:"noopener","aria-label":"Powered by nowline"},te("g",{"data-layer":"attribution"},c))}async function Nj(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=uO(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=Pj(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 Pj(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 Cj=.24,mm=2,vO=3,Oj=4,$j=8,Lj=10;function IO(e){return e.bg==="none"?"transparent":e.bg}function xm(e){return wO(e)>=Cj?"dark":"light"}function SO(e,t){return`url(#${e}-wave-hatch-${t})`}function Dj(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 Mj(e){if(!e.waves)return[];let t=new Set,n=i=>{for(let o of i)o.kind==="item"?o.waveRole==="background"&&t.add(xm(IO(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(xm($O(e.palette))),["dark","light"].filter(i=>t.has(i))}function Fj(e,t,n){let i=Math.min(wl[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:SO(n,xm(IO(t)))})}function s_(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 t_=4,gm=.5;function NO(e,t){if(e.empty)return;let n=gm;return s_({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 Bj(e,t){let n=Math.min(t_-gm,e.width/2,e.height/2),r=1e-6;return{left:e.x<=t.box.x+gm+r?n:0,right:e.x+e.width>=t.box.x+t.box.width-gm-r?n:0}}function Wj(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 n_(e,t,n){let r=o=>n&&(n.left>0||n.right>0)?te("path",{d:Wj(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":Pl}):i}function Uj(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:t_,ry:t_,fill:t.timeline.panelFill,stroke:t.timeline.border,"stroke-width":1})];for(let o of e.waves){let s=NO(o,n);s&&i.push(te("g",{"data-id":o.id},`<title>${Bt(o.strip.tooltip)}</title>${n_(o,s,Bj(s,n))}`))}return te("g",{"data-layer":"wave-strip"},i.join(""))}function PO(e,t){let n=[];for(let r of e){if(!r.style.tint||r.empty)continue;let i=t?s_(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 CO(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":Vu,"stroke-dasharray":r.dash}))}return n.length===0?"":te("g",{"data-layer":"wave-boundary"},n.join(""))}function TO(e,t){let n=ym(e,rr);return t?n*1.05:n}function Xj(e,t,n){let r=e.timeline,i=r.waveStrip;if(!e.waves||!i)return"";let o=i.y+i.height/2+Oj,s=i.y+vO,a=i.height-2*vO,c=[],l=(u,f)=>{let d=TO(f,!1)+2*mm;return te("rect",{x:m(u-d/2),y:m(s),width:m(d),height:m(a),fill:t.timeline.panelFill})+Ie({x:m(u),y:m(o),"font-family":n.sans,"font-size":rr,"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,_=tg/2;c.push(te("path",{d:`M${m(h)} ${m(g-_)} L${m(h+_)} ${m(g)} L${m(h)} ${m(g+_)} L${m(h-_)} ${m(g)} Z`,fill:t.timeline.panelFill,stroke:t.wave.boundary,"stroke-width":1.5},`<title>${Bt(u.strip.tooltip)}</title>`))}let f=NO(u,r);if(!f)continue;let d=f.x+f.width,p=u.strip.footnotesShown?u.footnoteIndicators.length*In:0;if(p){let h=d-kr+mm,g=d-kr-p-mm;c.push(n_(u,{x:g,y:s,width:h-g,height:a}))}if(u.strip.label!==void 0){let h=TO(u.strip.label,!0),g=p?Math.min(u.strip.labelX,d-kr-p-h/2):u.strip.labelX,_=h+2*mm;c.push(n_(u,{x:g-_/2,y:s,width:_,height:a})),c.push(Ie({x:m(g),y:m(o),"font-family":n.sans,"font-size":rr,"font-weight":600,fill:u.style.text,"text-anchor":"middle"},u.strip.label))}if(u.strip.footnotesShown){let h=d-kr;for(let g=u.footnoteIndicators.length-1;g>=0;g--)c.push(Ie({x:m(h),y:m(i.y+Lj),"font-family":n.sans,"font-size":$j,"font-weight":700,fill:u.style.text,"text-anchor":"end"},String(u.footnoteIndicators[g]))),h-=In}}return c.length===0?"":te("g",{"data-layer":"wave-labels"},c.join(""))}function OO(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 $O(e){let t=e.entities.item.bg;return t==="none"?"transparent":t}function Gj(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=$O(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:SO(t,xm(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":Vu}))}for(let a of o.runs)i.push(Ie({x:m(a.x),y:m(a.y),"font-family":r.sans,"font-size":rr,fill:n.wave.labelText},a.text))}return te("g",{"data-layer":"wave-legend"},i.join(""))}async function a_(e,t={}){let r=new hm(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>${mO(r)}`+u(`${r}-arrow`,a)+u(`${r}-arrow-light`,c)+u(`${r}-arrow-dark`,l)+Mj(e).map(p=>Dj(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(dj(e.timeline,i,o)),s.push(Uj(e,i));for(let p of e.swimlanes)s.push(wj(p,i));s.push(bO(e.timeline,e.chartBox.y,i)),e.waves&&s.push(PO(e.waves)),s.push(uj(e.timeline,e.chartBox.y,i)),s.push(CO(e.waveBoundaries)),s.push(Xj(e,i,o));for(let p of e.edges)p.kind==="underBar"&&s.push(xO(p,r,i));for(let p of e.swimlanes)s.push(AO(p,t,r,i,o));for(let p of e.includes)s.push(Ij(p,t,r,i,o,e));s.push(OO(e.waveCrossings));for(let p of e.edges)p.kind!=="underBar"&&s.push(xO(p,r,i));for(let p of e.anchors)s.push(Ej(p,i));for(let p of e.milestones)s.push(kj(p,r,i));s.push(fj(e.timeline,i,o));for(let p of e.anchors)s.push(_j(p,i,o));for(let p of e.milestones)s.push(bj(p,i,o));if(s.push(pj(e.nowline,i,o)),s.push(Rj(e.footnotes,r,i,o)),s.push(Gj(e.waveLegend,r,i,o)),s.push(cj(e.header,r,i,o)),s.push(Sj(e,o)),e.header.logo&&t.assetResolver){let p=await Nj(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${ml({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 l_="/browser-source.nowline",jj={error:3,warning:2,info:1},Hj={error:3,warning:2,info:1};function LO(e,t){return jj[e]>=Hj[t]}var vm,DO=0;function MO(){return vm||(vm=hw()),vm}function zj(){return gt.parse(`memory:///nowline-browser-${++DO}.nowline`)}async function Tm(e,t={}){let n=t.filePath??l_,r=MO(),o=r.shared.workspace.LangiumDocumentFactory.fromString(e,zj());await r.shared.workspace.DocumentBuilder.build([o],{validation:!0});let s=[];for(let a of mg(o))a.origin==="lexer"?s.push(rO(a.error,n)):a.origin==="parser"?s.push(nO(a.error,n)):s.push(tO(a.diagnostic,n));return{ast:o.parseResult.value,diagnostics:s}}async function c_(e,t={}){let n=t.filePath??l_,r=await Tm(e,{filePath:n});if(r.diagnostics.some(T=>T.severity==="error"))return{kind:"diagnostics",diagnostics:r.diagnostics};let i=MO(),o=t.readFile??lO,s=await uw(r.ast,n,{services:i.Nowline,readFile:o}),a=s.diagnostics.some(T=>T.severity==="error"&&!ll(T)&&!e_(T.message)),c=[...r.diagnostics];for(let T of s.diagnostics){if(T.severity==="error"&&e_(T.message)){t.onSkippedInclude?.({sourcePath:T.sourcePath,message:T.message});continue}a&&ll(T)||c.push(iO(T))}if(c.some(T=>T.severity==="error"))return{kind:"diagnostics",diagnostics:c};let l;if(t.timezone)try{l=Jw(t.timezone)}catch(T){if(T instanceof Qo)return{kind:"diagnostics",diagnostics:[{severity:"error",code:"invalid-timezone",message:T.message,file:n,line:1,column:1}]};throw T}let u=Qw({now:t.today,zone:l}),f=Vw(r.ast,s,{theme:t.theme,today:u,locale:t.locale,width:t.width,nonWorking:t.nonWorking}),d=t.diagnosticLevel??"error",p=Zw(f,{today:u??void 0,locale:t.locale??"en-US"}).map(T=>sO(T,n)),h=t.showLinks!==!1,g=t.strict===!0,_=[],x=await a_(f,{idPrefix:t.idPrefix,assetResolver:t.assetResolver,noLinks:!h,strict:g,warn:T=>_.push(T),fontFamilies:t.fontFamilies}),y=[...p,..._.map(T=>oO(T,n,g?"error":"warning"))].filter(T=>LO(T.severity,d));return g&&y.length>0?{kind:"diagnostics",diagnostics:[...c,...y]}:{kind:"svg",svg:x,warnings:y}}function u_(){vm=void 0,DO=0}var FO="/embed.nowline",f_=!1;async function BO(e){let{ast:t,diagnostics:n}=await Tm(e,{filePath:FO});return{ast:t,errors:n.filter(r=>r.severity==="error").map(r=>r.message)}}async function wm(e,t={}){let n={filePath:FO,theme:t.theme,today:t.today,timezone:t.timezone,locale:t.locale,width:t.width,nonWorking:t.nonWorking,idPrefix:t.idPrefix,onSkippedInclude:()=>{f_||(f_=!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 c_(e,n);if(r.kind==="svg")return r.svg;let i=r.diagnostics.filter(o=>o.severity==="error").map(o=>o.message);throw new Nu(`Failed to render Nowline source: ${i.join("; ")}`,i)}var Nu=class extends Error{constructor(n,r){super(n);S(this,"details",r);this.name="EmbedRenderError"}};function WO(){f_=!1,u_()}var er=Uint8Array,kn=Uint16Array,g_=Int32Array,y_=new er([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]),x_=new er([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]),UO=new er([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),HO=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 g_(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}},zO=HO(y_,2),qj=zO.b,p_=zO.r;qj[28]=258,p_[258]=28;var qO=HO(x_,0),Qae=qO.b,XO=qO.r,h_=new kn(32768);for(Fe=0;Fe<32768;++Fe)oi=(Fe&43690)>>1|(Fe&21845)<<1,oi=(oi&52428)>>2|(oi&13107)<<2,oi=(oi&61680)>>4|(oi&3855)<<4,h_[Fe]=((oi&65280)>>8|(oi&255)<<8)>>1;var oi,Fe,Ou=(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[h_[f]>>c]=l}else for(a=new kn(r),i=0;i<r;++i)e[i]&&(a[i]=h_[s[e[i]-1]++]>>15-e[i]);return a}),es=new er(288);for(Fe=0;Fe<144;++Fe)es[Fe]=8;var Fe;for(Fe=144;Fe<256;++Fe)es[Fe]=9;var Fe;for(Fe=256;Fe<280;++Fe)es[Fe]=7;var Fe;for(Fe=280;Fe<288;++Fe)es[Fe]=8;var Fe,_m=new er(32);for(Fe=0;Fe<32;++Fe)_m[Fe]=5;var Fe,Vj=Ou(es,9,0);var Yj=Ou(_m,5,0);var VO=function(e){return(e+7)/8|0},Kj=function(e,t,n){return(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length),new er(e.subarray(t,n))};var si=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8},Pu=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},d_=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:KO,l:0};if(i==1){var s=new er(n[0].s+1);return s[n[0].s]=1,{t:s,l:1}}n.sort(function(b,$){return b.f-$.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=m_(n[u-1],p,0);if(h>t){var r=0,g=0,_=h-t,x=1<<_;for(o.sort(function($,P){return p[P.s]-p[$.s]||$.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>>=_;g>0;){var T=o[r].s;p[T]<t?g-=1<<t-p[T]++-1:++r}for(;r>=0&&g;--r){var w=o[r].s;p[w]==t&&(--p[w],++g)}h=t}return{t:new er(p),l:h}},m_=function(e,t,n){return e.s==-1?Math.max(m_(e.l,t,n+1),m_(e.r,t,n+1)):t[e.s]=n},GO=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}},Cu=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},YO=function(e,t,n){var r=n.length,i=VO(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},jO=function(e,t,n,r,i,o,s,a,c,l,u){si(t,u++,n),++i[256];for(var f=d_(i,15),d=f.t,p=f.l,h=d_(o,15),g=h.t,_=h.l,x=GO(d),y=x.c,T=x.n,w=GO(g),b=w.c,$=w.n,P=new kn(19),O=0;O<y.length;++O)++P[y[O]&31];for(var O=0;O<b.length;++O)++P[b[O]&31];for(var H=d_(P,7),z=H.t,M=H.l,A=19;A>4&&!z[UO[A-1]];--A);var U=l+5<<3,X=Cu(i,es)+Cu(o,_m)+s,R=Cu(i,d)+Cu(o,g)+s+14+3*A+Cu(P,z)+2*P[16]+3*P[17]+7*P[18];if(c>=0&&U<=X&&U<=R)return YO(t,u,e.subarray(c,c+l));var C,N,j,q;if(si(t,u,1+(R<X)),u+=2,R<X){C=Ou(d,p,0),N=d,j=Ou(g,_,0),q=g;var V=Ou(z,M,0);si(t,u,T-257),si(t,u+5,$-1),si(t,u+10,A-4),u+=14;for(var O=0;O<A;++O)si(t,u+3*O,z[UO[O]]);u+=3*A;for(var ie=[y,b],oe=0;oe<2;++oe)for(var ye=ie[oe],O=0;O<ye.length;++O){var ne=ye[O]&31;si(t,u,V[ne]),u+=z[ne],ne>15&&(si(t,u,ye[O]>>5&127),u+=ye[O]>>12)}}else C=Vj,N=es,j=Yj,q=_m;for(var O=0;O<a;++O){var se=r[O];if(se>255){var ne=se>>18&31;Pu(t,u,C[ne+257]),u+=N[ne+257],ne>7&&(si(t,u,se>>23&31),u+=y_[ne]);var k=se&31;Pu(t,u,j[k]),u+=q[k],k>3&&(Pu(t,u,se>>5&8191),u+=x_[k])}else Pu(t,u,C[se]),u+=N[se]}return Pu(t,u,C[256]),u+N[256]},Zj=new g_([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),KO=new er(0),Jj=function(e,t,n,r,i,o){var s=o.z||e.length,a=new er(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=Zj[t-1],d=f>>13,p=f&8191,h=(1<<n)-1,g=o.p||new kn(32768),_=o.h||new kn(h+1),x=Math.ceil(n/3),y=2*x,T=function(xe){return(e[xe]^e[xe+1]<<x^e[xe+2]<<y)&h},w=new g_(25e3),b=new kn(288),$=new kn(32),P=0,O=0,H=o.i||0,z=0,M=o.w||0,A=0;H+2<s;++H){var U=T(H),X=H&32767,R=_[U];if(g[X]=R,_[U]=X,M<=H){var C=s-H;if((P>7e3||z>24576)&&(C>423||!l)){u=jO(e,c,0,w,b,$,O,z,A,H-A,u),z=P=O=0,A=H;for(var N=0;N<286;++N)b[N]=0;for(var N=0;N<30;++N)$[N]=0}var j=2,q=0,V=p,ie=X-R&32767;if(C>2&&U==T(H-ie))for(var oe=Math.min(d,C)-1,ye=Math.min(32767,H),ne=Math.min(258,C);ie<=ye&&--V&&X!=R;){if(e[H+j]==e[H+j-ie]){for(var se=0;se<ne&&e[H+se]==e[H+se-ie];++se);if(se>j){if(j=se,q=ie,se>oe)break;for(var k=Math.min(ie,se-2),L=0,N=0;N<k;++N){var F=H-ie+N&32767,G=g[F],Z=F-G&32767;Z>L&&(L=Z,R=F)}}}X=R,R=g[X],ie+=X-R&32767}if(q){w[z++]=268435456|p_[j]<<18|XO[q];var Y=p_[j]&31,re=XO[q]&31;O+=y_[Y]+x_[re],++b[257+Y],++$[re],M=H+j,++P}else w[z++]=e[H],++b[e[H]]}}for(H=Math.max(H,M);H<s;++H)w[z++]=e[H],++b[e[H]];u=jO(e,c,l,w,b,$,O,z,A,H-A,u),l||(o.r=u&7|c[u/8|0]<<3,u-=7,o.h=_,o.p=g,o.i=H,o.w=M)}else{for(var H=o.w||0;H<s+l;H+=65535){var le=H+65535;le>=s&&(c[u/8|0]=l,le=s),u=YO(c,u+1,e.subarray(H,le))}o.i=s}return Kj(a,0,r+VO(u)+i)};var ZO=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}}},Qj=function(e,t,n,r,i){if(!i&&(i={l:1},t.dictionary)){var o=t.dictionary.subarray(-32768),s=new er(o.length+e.length);s.set(o),s.set(e,o.length),e=s,i.w=o.length}return Jj(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 JO=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};var eH=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=ZO();i.p(t.dictionary),JO(e,2,i.d())}};function QO(e,t){t||(t={});var n=ZO();n.p(e);var r=Qj(e,t,t.dictionary?6:2,4);return eH(r,t),JO(r,r.length-4,n.d()),r}var tH=typeof TextDecoder<"u"&&new TextDecoder,nH=0;try{tH.decode(KO,{stream:!0}),nH=1}catch{}var n$="https://free.nowline.io/open";function e$(e){let t=new TextEncoder().encode(e),n=QO(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 v_({source:e,sourceUrl:t,share:n}){if(n===!1||n==="none")return null;if(typeof n=="object")return t!==void 0&&t$(t)?n.remoteUrl.replace("{url}",encodeURIComponent(t)):n.textUrl.replace("{text}",e$(e));let r=n===!0?n$:n,i=new URL(r);return t!==void 0&&t$(t)?i.hash=`url=${encodeURIComponent(t)}`:i.hash=`text=${e$(e)}`,i.toString()}function t$(e){try{return new URL(e).protocol==="https:"}catch{return!1}}var r$=0;async function i$(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=++r$,s=e.share??!0,a=[],c=0;for(let l of Array.from(n)){let u=rH(l);if(!u)continue;let f=iH(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(wm(f,p).then(y=>{if(oH(u,y),r++,h!==null){let T=v_({source:f,sourceUrl:x,share:s});if(T!==null){let w=t.createElement("a");w.className="nowline-share",w.href=T,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 rH(e){let t=e.parentElement;return t&&t.tagName.toUpperCase()==="PRE"?t:e}function iH(e){return e.textContent??""}function oH(e,t){e.outerHTML=t}function o$(){r$=0}function Em(){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 s$(e,t){return e&&e!=="auto"?ww(e)??t:t}var sH="0.0.0-dev.20261012225446.ga80ca46",aH="a80ca46",lH="pre code.language-nowline, code.language-nowline",a$={theme:"auto",startOnLoad:!0,selector:lH,systemTheme:Em(),share:!0},Ke={...a$},T_=!1;function cH(e={}){Ke={theme:e.theme??Ke.theme,startOnLoad:e.startOnLoad??Ke.startOnLoad,selector:e.selector??Ke.selector,locale:e.locale??Ke.locale,width:e.width??Ke.width,nonWorking:e.nonWorking??Ke.nonWorking,today:e.today!==void 0?e.today:Ke.today,timezone:e.timezone??Ke.timezone,share:e.share??Ke.share,sourceUrl:e.sourceUrl??Ke.sourceUrl,systemTheme:Em()}}function l$(){return{theme:s$(Ke.theme,Ke.systemTheme),locale:Ke.locale,width:Ke.width,nonWorking:Ke.nonWorking,today:Ke.today,timezone:Ke.timezone}}async function uH(e,t={}){let n={...l$(),...t};return wm(e,n)}async function fH(e){return BO(e)}async function w_(e){let t={selector:e?.selector??Ke.selector,theme:e?.theme??l$().theme,locale:e?.locale??Ke.locale,width:e?.width??Ke.width,nonWorking:e?.nonWorking??Ke.nonWorking,today:e?.today!==void 0?e.today:Ke.today,timezone:e?.timezone??Ke.timezone,share:e?.share??Ke.share,sourceUrl:e?.sourceUrl??Ke.sourceUrl,document:e?.document};return i$(t)}var dH=w_;if(typeof document<"u"&&!T_){T_=!0;let e=()=>{Ke.startOnLoad&&w_()};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e,{once:!0}):queueMicrotask(e)}function pH(){Ke={...a$,systemTheme:Em()},T_=!1,WO(),o$()}return Mu(hH);})();
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.20261012225207.gfc38dc0",
3
+ "version": "0.0.0-dev.20261012225446.ga80ca46",
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.20261012225207.gfc38dc0",
43
- "@nowline/core": "0.0.0-dev.20261012225207.gfc38dc0",
44
- "@nowline/layout": "0.0.0-dev.20261012225207.gfc38dc0",
45
- "@nowline/renderer": "0.0.0-dev.20261012225207.gfc38dc0",
46
- "@nowline/share-link": "0.0.0-dev.20261012225207.gfc38dc0",
42
+ "@nowline/browser": "0.0.0-dev.20261012225446.ga80ca46",
43
+ "@nowline/core": "0.0.0-dev.20261012225446.ga80ca46",
44
+ "@nowline/layout": "0.0.0-dev.20261012225446.ga80ca46",
45
+ "@nowline/renderer": "0.0.0-dev.20261012225446.ga80ca46",
46
+ "@nowline/share-link": "0.0.0-dev.20261012225446.ga80ca46",
47
47
  "langium": "~4.4.0"
48
48
  },
49
49
  "devDependencies": {